Search Results

Search found 426 results on 18 pages for 'bb'.

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why does virtual assignment behave differently than other virtual functions of the same signature?

    - by David Rodríguez - dribeas
    While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior. Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed. struct Base { virtual Base& f( Base const & ) { std::cout << "Base::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Base::operator=(Base const &)" << std::endl; return *this; } }; struct Derived : public Base { virtual Base& f( Base const & ) { std::cout << "Derived::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Derived::operator=( Base const & )" << std::endl; return *this; } }; int main() { Derived a, b; a.f( b ); // [0] outputs: Derived::f(Base const &) (expected result) a = b; // [1] outputs: Base::operator=(Base const &) Base & ba = a; Base & bb = b; ba = bb; // [2] outputs: Derived::operator=(Base const &) Derived & da = a; Derived & db = b; da = db; // [3] outputs: Base::operator=(Base const &) ba = da; // [4] outputs: Derived::operator=(Base const &) da = ba; // [5] outputs: Derived::operator=(Base const &) } The effect is that the virtual operator= has a different behavior than any other virtual function with the same signature ([0] compared to [1]), by calling the Base version of the operator when called through real Derived objects ([1]) or Derived references ([3]) while it does perform as a regular virtual function when called through Base references ([2]), or when either the lvalue or rvalue are Base references and the other a Derived reference ([4],[5]). Is there any sensible explanation to this odd behavior?

    Read the article

  • Objective-C: Scope problems cellForRowAtIndexPath

    - by Mr. McPepperNuts
    How would I set each individual row in cellForRowAtIndexPath to the results of an array populated by a Fetch Request? (Fetch Request made when button is pressed.) - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // ... set up cell code here ... cell.textLabel.text = [results objectAtIndex:indexPath valueForKey:@"name"]; } warning: 'NSArray' may not respond to '-objectAtIndexPath:' Edit: - (NSArray *)SearchDatabaseForText:(NSString *)passdTextToSearchFor{ NSManagedObject *searchObj; XYZAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; NSManagedObjectContext *managedObjectContext = appDelegate.managedObjectContext; NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name contains [cd] %@", passdTextToSearchFor]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Entry" inManagedObjectContext:managedObjectContext]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors]; [request setEntity: entity]; [request setPredicate: predicate]; NSError *error; results = [managedObjectContext executeFetchRequest:request error:&error]; // NSLog(@"results %@", results); if([results count] == 0){ NSLog(@"No results found"); searchObj = nil; self.tempString = @"No results found."; }else{ if ([[[results objectAtIndex:0] name] caseInsensitiveCompare:passdTextToSearchFor] == 0) { NSLog(@"results %@", [[results objectAtIndex:0] name]); searchObj = [results objectAtIndex:0]; }else{ NSLog(@"No results found"); self.tempString = @"No results found."; searchObj = nil; } } [tableView reloadData]; [request release]; [sortDescriptors release]; return results; } - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{ textToSearchFor = mySearchBar.text; results = [self SearchDatabaseForText:textToSearchFor]; self.tempString = [myGlobalSearchObject valueForKey:@"name"]; NSLog(@"results count: %d", [results count]); NSLog(@"results 0: %@", [[results objectAtIndex:0] name]); NSLog(@"results 1: %@", [[results objectAtIndex:1] name]); } @end Console prints: 2010-06-10 16:11:18.581 XYZApp[10140:207] results count: 2 2010-06-10 16:11:18.581 XYZApp[10140:207] results 0: BB Bugs 2010-06-10 16:11:18.582 XYZApp[10140:207] results 1: BB Annie Program received signal: “EXC_BAD_ACCESS”. (gdb) Edit 2: BT: #0 0x95a91edb in objc_msgSend () #1 0x03b1fe20 in ?? () #2 0x0043cd2a in -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] () #3 0x0043ca9e in -[UITableViewRowData invalidateAllSections] () #4 0x002fc82f in -[UITableView(_UITableViewPrivate) _updateRowData] () #5 0x002f7313 in -[UITableView noteNumberOfRowsChanged] () #6 0x00301500 in -[UITableView reloadData] () #7 0x00008623 in -[SearchViewController SearchDatabaseForText:] (self=0x3d16190, _cmd=0xf02b, passdTextToSearchFor=0x3b29630) #8 0x000086ad in -[SearchViewController searchBarSearchButtonClicked:] (self=0x3d16190, _cmd=0x16492cc, searchBar=0x3d2dc50) #9 0x0047ac13 in -[UISearchBar(UISearchBarStatic) _searchFieldReturnPressed] () #10 0x0031094e in -[UIControl(Deprecated) sendAction:toTarget:forEvent:] () #11 0x00312f76 in -[UIControl(Internal) _sendActionsForEventMask:withEvent:] () #12 0x0032613b in -[UIFieldEditor webView:shouldInsertText:replacingDOMRange:givenAction:] () #13 0x01d5a72d in __invoking___ () #14 0x01d5a618 in -[NSInvocation invoke] () #15 0x0273fc0a in SendDelegateMessage () #16 0x033168bf in -[_WebSafeForwarder forwardInvocation:] () #17 0x01d7e6f4 in ___forwarding___ () #18 0x01d5a6c2 in __forwarding_prep_0___ () #19 0x03320fd4 in WebEditorClient::shouldInsertText () #20 0x0279dfed in WebCore::Editor::shouldInsertText () #21 0x027b67a5 in WebCore::Editor::insertParagraphSeparator () #22 0x0279d662 in WebCore::EventHandler::defaultTextInputEventHandler () #23 0x0276cee6 in WebCore::EventTargetNode::defaultEventHandler () #24 0x0276cb70 in WebCore::EventTargetNode::dispatchGenericEvent () #25 0x0276c611 in WebCore::EventTargetNode::dispatchEvent () #26 0x0279d327 in WebCore::EventHandler::handleTextInputEvent () #27 0x0279d229 in WebCore::Editor::insertText () #28 0x03320f4d in -[WebHTMLView(WebNSTextInputSupport) insertText:] () #29 0x0279d0b4 in -[WAKResponder tryToPerform:with:] () #30 0x03320a33 in -[WebView(WebViewEditingActions) _performResponderOperation:with:] () #31 0x03320990 in -[WebView(WebViewEditingActions) insertText:] () #32 0x00408231 in -[UIWebDocumentView insertText:] () #33 0x003ccd31 in -[UIKeyboardImpl acceptWord:firstDelete:addString:] () #34 0x003d2c8c in -[UIKeyboardImpl addInputString:fromVariantKey:] () #35 0x004d1a00 in -[UIKeyboardLayoutStar sendStringAction:forKey:] () #36 0x004d0285 in -[UIKeyboardLayoutStar handleHardwareKeyDownFromSimulator:] () #37 0x002b5bcb in -[UIApplication handleEvent:withNewEvent:] () #38 0x002b067f in -[UIApplication sendEvent:] () #39 0x002b7061 in _UIApplicationHandleEvent () #40 0x02542d59 in PurpleEventCallback () #41 0x01d55b80 in CFRunLoopRunSpecific () #42 0x01d54c48 in CFRunLoopRunInMode () #43 0x02541615 in GSEventRunModal () #44 0x025416da in GSEventRun () #45 0x002b7faf in UIApplicationMain () #46 0x00002578 in main (argc=1, argv=0xbfffef5c) at /Users/default/Documents/iPhone Projects/XYZApp/main.m:14

    Read the article

  • Ubuntu 12.04 freezes when booting

    - by Agustín González
    Translated I installed Ubuntu 12.04 LTS from the LiveCD, after finalizing the installation process and booting correctly, I applied the pending updates, which asked me to reboot. After rebooting, an error appeared saying "Out of Range". I pressed CTRL+ALT+F1, login to the tty1 terminal and edit the xorg.conf file and add VertRefresh 50.0 - 60.0 to it, which would solve the "Out of Range" problem that was mentioned before. After applying the changed and rebooting again, the following boot screen is all I see now: It freezes there. I even waited 2 hours and nothing happened. Can anybody help? Thank you! Original Instale Ubuntu 12.04 LTS desde el Live CD, al finalizar la instalación inicio el sistema operativo e inicia correctamente, después de aplicar actualizaciones me solicita reiniciar en lo cual acepto. Al volver a iniciar me daba un erro de "Fuera de rango", aprieto CTRL + ALT + F1, me logueo y edito el archivo xorg.conf en la sección Screen y agrego "VertRefresh 50.0 - 60.0", lo cual solucionaría el problema de "Fuera de rango", al aplicar los cambios, vuelvo a iniciar y solamente me aparece la pantalla de inicio (Véase imagen: http://t.bb/fH) y queda colgado, lo deje por lo menos 2 horas así y nada sucedió. ¿Alguien puede ayudarme? Gracias!

    Read the article

  • Internet Timeouts with TP-Link TL-WN821N v2 wireless usb stick

    - by user1622959
    A short time after accessing the internet, the browser/download times out. Before the timeout, the internet works OK briefly; afterwards, the wireless is still connected with a strong signal, but every internet access results in a timeout. When I leave the PC for a while, the internet is back just to timeout again as soon as I start using it. The same happens when I reconnect to the router. Also, when I surf the internet, it takes a couple of minutes until the timeout, but when I download something, it times out in a matter of seconds. The wireless adapter works just fine in Windows and internet via ethernet cable works just fine in Ubuntu. Does anyone have the same problem or knows a solution. I use Ubuntu 12.10 x64. The problem occurs since I installed ubuntu (which was a few days ago). Here some stuff that might be usefull: serus@serus-Ubuntu-PC:~$ lsusb Bus 002 Device 002: ID 0cf3:1002 Atheros Communications, Inc. TP-Link TL-WN821N v2 802.11n [Atheros AR9170] serus@serus-Ubuntu-PC:~$ lsmod Module Size Used by carl9170 82083 0 serus@serus-Ubuntu-PC:~$ modinfo carl9170 filename: /lib/modules/3.5.0-21- generic/kernel/drivers/net/wireless/ath/carl9170/carl9170.ko alias: arusb_lnx alias: ar9170usb firmware: carl9170-1.fw description: Atheros AR9170 802.11n USB wireless serus@serus-Ubuntu-PC:~$ iwconfig wlan0 IEEE 802.11bgn ESSID:"virginmedia0137463" Mode:Managed Frequency:2.462 GHz Access Point: A0:21:B7:F8:29:B6 Bit Rate=240 Mb/s Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=66/70 Signal level=-44 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:1399 Invalid misc:18 Missed beacon:0 serus@serus-Ubuntu-PC:~$ sudo lshw -C network *-network description: Wireless interface physical id: 1 bus info: usb@2:2 logical name: wlan0 serial: 00:27:19:bb:00:19 capabilities: ethernet physical wireless configuration: broadcast=yes driver=carl9170 driverversion=3.5.0-21-generic firmware=1.9.4 ip=192.168.0.6 link=yes multicast=yes wireless=IEEE 802.11bgn

    Read the article

  • I seem to be missing a few important concepts with PhoneGap

    - by garethdn
    I'm planning on developing an app on multiple platforms and I'm thinking that PhoneGap might be perfect for me. I had been reading that it's one codebase for all platforms but looking at the PhoneGap guide it seems there are separate instructions for each platform. So if i want to develop for iOS, Android, BB and WP7 I need to write 4 different sets of code? I'm sure i'm missing something fundamental here. Aside from that, how do people usually approach a PhoneGap build? You obviously / probably want the finished app to look like a native app - is it more common than not to use jQuery Mobile together with PhoneGap? Is there a preferred IDE? I see, in the guide, for iOS they seem to suggest Xcode. I'm fine using Xcode but it seems a bit overkill for HTML & CSS. Do I need to develop in Xcode and if not how do i approach it? Use a different IDE / Text Editor and then copy paste into Xcode for building and testing? I know this question is long-winded and fundamental but it something which i don't think is properly addressed in the guides. Thanks.

    Read the article

  • "Warning reaching end of non-void fuction" with Multiple Sections that pull in multiple CustomCells

    - by Newbyman
    I'm getting "Reaching end of non-void function" warning, but don't have anything else to return for the compiler. How do I get around the warning?? I'm using customCells to display a table with 3 Sections. Each CustomCell is different, linked with another viewcontroller's tableview within the App, and is getting its data from its individual model. Everything works great in the Simulator and Devices, but I would like to get rid of the warning that I have. It is the only one I have, and it is pending me from uploading to App Store!! Within the - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {, I have used 3 separate If() statements-(i.e.==0,==1,==2) to control which customCells are displayed within each section throughout the tableview's cells. Each of the customCells were created in IB, pull there data from different models, and are used with other ViewController tableViews. At the end of the function, I don't have a "cell" or anything else to return, because I already specified which CustomCell to return within each of the If() statements. Because each of the CustomCells are referenced through the AppDelegate, I can not set up an empty cell at the start of the function and just set the empty cell equal to the desired CustomCell within each of the If() statements, as you can for text, labels, etc... My question is not a matter of fixing code within the If() statements, unless it is required. My Questions is in "How to remove the warning for reaching end of non-void function-(cellForRowAtIndexPath:) when I have already returned a value for every possible case: if(section == 0); if(section == 1); and if(section == 2). *Code-Reference: The actual file names were knocked down for simplicity, (section 0 refers to M's, section 1 refers to D's, and section 2 refers to B's). Here is a sample Layout of the code: //CELL FOR ROW AT INDEX PATH: -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //Reference to the AppDelegate: MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate]; //Section 0: if(indexPath.section == 0) { static NSString *CustomMCellIdentifier = @"CustomMCellIdentifier"; MCustomCell *mCell = (MCustomCell *)[tableView dequeueReusableCellWithIdentifier:CustomMCellIdentifier]; if (mCell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MCustomCell" owner:tableView options:nil]; for (id oneObject in nib) if ([oneObject isKindOfClass:[MCustomCell class]]) mCell = (MCustomCell *)oneObject; } //Grab the Data for this item: M *mM = [appDelegate.mms objectAtIndex:indexPath.row]; //Set the Cell [mCell setM:mM]; mCell.selectionStyle =UITableViewCellSelectionStyleNone; mCell.root = tableView; return mCell; } //Section 1: if(indexPath.section == 1) { static NSString *CustomDCellIdentifier = @"CustomDCellIdentifier"; DCustomCell *dCell = (DCustomCell *)[tableView dequeueReusableCellWithIdentifier:CustomDaddyCellIdentifier]; if (dCell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"DCustomCell" owner:tableView options:nil]; for (id oneObject in nib) if ([oneObject isKindOfClass:[DCustomCell class]]) dCell = (DCustomCell *)oneObject; } //Grab the Data for this item: D *dD = [appDelegate.dds objectAtIndex:indexPath.row]; //Set the Cell [dCell setD:dD]; //Turns the Cell's SelectionStyle Blue Highlighting off, but still permits the code to run! dCell.selectionStyle =UITableViewCellSelectionStyleNone; dCell.root = tableView; return dCell; } //Section 2: if(indexPath.section == 2) { static NSString *CustomBCellIdentifier = @"CustomBCellIdentifier"; BCustomCell *bCell = (BCustomCell *)[tableView dequeueReusableCellWithIdentifier:CustomBCellIdentifier]; if (bCell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"BCustomCell" owner:tableView options:nil]; for (id oneObject in nib) if ([oneObject isKindOfClass:[BCustomCell class]]) bCell = (BCustomCell *)oneObject; } //Grab the Data for this item: B *bB = [appDelegate.bbs objectAtIndex:indexPath.row]; //Set the Cell [bCell setB:bB]; bCell.selectionStyle =UITableViewCellSelectionStyleNone; bCell.root = tableView; return bCell; } //** Getting Warning "Control reaches end of non-void function" //Not sure what else to "return ???" all CustomCells were specified within the If() statements above for their corresponding IndexPath.Sections. } Any Suggestions ??

    Read the article

  • Extracting useful information from free text

    - by insta
    We filter and analyse seats for events. Apparently writing a domain query language for the floor people isn't an option. I'm using C# 4.0 & .NET 4.0, and have relatively free reign to use whatever open-source tools are available. </background-info> If a request comes in for "FLOOR B", the sales people want it to show up if they've entered "FLOOR A-FLOOR F" in a filter. The only problem I have is that there's absolutely no structure to the parsed parameters. I get the string already concatenated (it actually uses a tilde instead of dash). Examples I've seen so far with matches after each: 101WC-199WC (needs to match 150WC) AAA-ZZZ (needs to match AAA, BBB, ABC but not BB) LOGE15-LOGE20 (needs to match LOGE15 but not LOGE150) At first I wanted to try just stripping off the numeric part of the lower and upper, and then incrementing through that. The problem I have is that only some entries have numbers, sometimes the numbers AND letters increment, sometimes its all letters that increment. Since I can't impose any kind of grammar to use (I really wanted [..] expansion syntax), I'm stuck using these entries. Are there any suggestions for how to approach this parsing problem?

    Read the article

  • Can't save my picture

    - by mamii
    I want to save the image that I draw, but I always failure is reported. I have tested and tried but I can correct any errors. Therefore, I appeal to you. This store is for me as a "cancer sore". And what is the drawing application without the possibility shranjevnja? sucks: D Question: What is wrong with my code for storage? or anything else? Posts: 09-12 07:30:34.346: E / Panel (8003): IOEception 09-12 07:30:34.346: E / Panel (8003): java.io.IOException: Parent directory of file does not exist: / sdcard/anppp/2012Sep1273034.png 09-12 07:30:34.346: E / Panel (8003): at java.io.File.createNewFile (File.java: 1263) 09-12 07:30:34.346: E / Panel (8003): at aa.bb.cc.Panel.saveapp (Panel.java: 67) 09-12 07:30:34.346: E / Panel (8003): at aa.bb.cc.AndroidPaint.onOptionsItemSelected (AndroidPaint.java: 94) 09-12 07:30:34.346: E / Panel (8003): at android.app.Activity.onMenuItemSelected (Activity.java: 2170) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java: 730) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.view.menu.MenuItemImpl.invoke (MenuItemImpl.java: 139) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java: 855) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.view.menu.ExpandedMenuView.invokeItem (ExpandedMenuView.java: 89) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.view.menu.ExpandedMenuView.onItemClick (ExpandedMenuView.java: 93) 09-12 07:30:34.346: E / Panel (8003): at android.widget.AdapterView.performItemClick (AdapterView.java: 284) 09-12 07:30:34.346: E / Panel (8003): at android.widget.ListView.performItemClick (ListView.java: 3285) 09-12 07:30:34.346: E / Panel (8003): at android.widget.AbsListView $ PerformClick.run (AbsListView.java: 1640) 09-12 07:30:34.346: E / Panel (8003): at android.os.Handler.handleCallback (Handler.java: 587) 09-12 07:30:34.346: E / Panel (8003): at android.os.Handler.dispatchMessage (Handler.java: 92) 09-12 07:30:34.346: E / Panel (8003): at android.os.Looper.loop (Looper.java: 123) 09-12 07:30:34.346: E / Panel (8003): at android.app.ActivityThread.main (ActivityThread.java: 4363) 09-12 07:30:34.346: E / Panel (8003): at java.lang.reflect.Method.invokeNative (Native Method) 09-12 07:30:34.346: E / Panel (8003): at java.lang.reflect.Method.invoke (Method.java: 521) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 860) 09-12 07:30:34.346: E / Panel (8003): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 618) 09-12 07:30:34.346: E / Panel (8003): at dalvik.system.NativeStart.main (Native Method) There is code: private Bitmap mBitmap; private Canvas mCanvas; private Bitmap tmpBitmap; private Canvas tmpCanvas; private DrawHandler mDrawHandler; private Canvas tCanvas; private String mImagePath = Environment.getExternalStorageDirectory() + "/anppp"; private File file; public void saveapp() { Calendar currentDate = Calendar.getInstance(); SimpleDateFormat formatter= new SimpleDateFormat("yyyyMMMddHmmss"); String dateNow = formatter.format(currentDate.getTime()); file = new File(mImagePath + "/" + dateNow +".png"); FileOutputStream fos; try { file.createNewFile(); fos = new FileOutputStream(file); tmpBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); fos.close(); } catch (FileNotFoundException e) { Log.e("Panel", "FileNotFoundException", e); } catch (IOException e) { Log.e("Panel", "IOEception", e); } } That's it .. I do not know what could be wrong ;(

    Read the article

  • Using JavaScript, how do I write the same text to multiple HTML elements, or how do I write text to all HTML elements of the same class?

    - by myfavoritenoisemaker
    I am writing this program to take a root music note and populate tables with various scales from that root note. So, many of the tables cells will have the exact same value in them. I realize I can call my "useScale" function for every single that I need to write text to but since there will be repeats, it seemed like there should be a way to run my function once and apply the results to multiple but it did not work to use the document.getElementsByClassName("").innerHTML, I had been using "ById" which worked fine but each ID must be unique so, I can't write to multiple elements. Here's my code, I'd love some suggestions. many thanks Root Note <input type="text" name="defineRootNote" id="rootNoteCapture" size="2"/> <button onclick="findScale()">Submit</button> <table id="majorTriad"> <th>Major Triad</th> <tr><td>1st</td><td class="root"> </td></tr> <tr><td>3rd</td><td class="3rd"> </td></tr> <tr><td>5th</td><td class="5th"> </td></tr> </table> <table id="minorTriad"> <th>Minor Triad</th> <tr><td>1st</td><td class="root"> </td></tr> <tr><td>3 Flat</td><td class="3Flat"> </td></tr> <tr><td>5th</td><td class="5th"> </td></tr> </table> <script type="text/javascript"> function findScale(rootNote){ var rootNote = document.getElementById("rootNoteCapture").value; rootNote = rootNote.toUpperCase(); var scaleCheck = ["A", "A#", "AB", "B", "BB", "C", "C#", "D", "D#", "DB", "E", "EB", "F", "F#", "G", "G#", "GB"]; if (scaleCheck.indexOf(rootNote) == -1) { document.getElementById("root").innerHTML = "Invalid Entry"; } else { switch(rootNote){ case "AB": rootNote = "G#"; break; case "BB": rootNote = "A#"; break; case "DB": rootNote = "C#"; break; case "EB": rootNote = "D#"; break; case "GB": rootNote = "F#"; break; rootNote = rootNote; } document.getElementsByClassName("root").innerHTML = rootNote; document.getElementsByClassName("3rd").innerHTML = useScale(rootNote, 4); document.getElementsByClassName("5th").innerHTML = useScale(rootNote, 7); document.getElementsByClassName("3Flat").innerHTML = useScale(rootNote, 3); } } function useScale(startPoint, offset){ var scale = ["A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#"]; var returnNote = null; var scalePoint = scale.indexOf(startPoint); for (var i = 0; i < offset; ){ i = i + 1; //console.log(i); //console.log(scalePoint); scalePoint ++; if (scalePoint > 11) {scalePoint = 0;} } returnNote = scale[scalePoint]; return returnNote; } </script>

    Read the article

  • Dual booting on separate hard drives

    - by tornadorider
    I have windows XP professional installed on 1 hard drive and Ubuntu 10.10 on my second hard drive. On start up the computer completely skips the grub menu and boots straight into 10.10. I have tried running os-prober with the windows hard drive mounted and then updating grub but it didnt work. Any ideas? I have changed the boot order so that the HDD with xp on it is first however the computer still booted into linux. I tried running grub-install /dev/sda and got this /usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.. /usr/sbin/grub-setup: warn: Sector 33 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.. Installation finished. No error reported I checked using disk utility and the code for my xp hard drive is sdb so i ran the camand grub-install /dev/sdb shich gave me this Installation finished. No error reported. So i rebooted but it still didnt work. Any other ideas? Additional info gedit /boot/grub/grub.cfg: # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi } function load_video { insmod vbe insmod vga } insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm fi terminal_output gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c set locale_dir=($root)/boot/grub/locale set lang=en insmod gettext if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash initrd /boot/initrd.img-2.6.35-28-generic } menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c echo 'Loading Linux 2.6.35-28-generic ...' linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.35-28-generic } menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash initrd /boot/initrd.img-2.6.35-22-generic } menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c echo 'Loading Linux 2.6.35-22-generic ...' linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.35-22-generic } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### if [ "x${timeout}" != "x-1" ]; then if keystatus; then if keystatus --shift; then set timeout=-1 else set timeout=0 fi else if sleep --interruptible 3 ; then set timeout=0 fi fi fi ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### sudo fdisk -l: Disk /dev/sda: 80.1 GB, 80060424192 bytes 255 heads, 63 sectors/track, 9733 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0008a483 Device Boot Start End Blocks Id System /dev/sda1 * 1 9352 75112448 83 Linux /dev/sda2 9352 9734 3068929 5 Extended /dev/sda5 9352 9734 3068928 82 Linux swap / Solaris Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xc5d6c5d6 Device Boot Start End Blocks Id System /dev/sdb1 1 60800 488375968+ 7 HPFS/NTFS sudo blkid /dev/sda1: UUID="d682c9bd-dd89-4827-9802-a1f921ebe21c" TYPE="ext4" /dev/sda5: UUID="09e9c2cb-d903-4f0b-a181-536951845231" TYPE="swap" /dev/sdb1: UUID="B21844EB1844AFE1" TYPE="ntfs" sudo os-prober (nothing) Boot Info Script 0.55 dated February 15th, 2010 ============================= Boot Info Summary: ============================== => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in partition #1 for (,msdos1)/boot/grub. => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in partition #1 for (,msdos1)/boot/grub. sda1: _________________________________________________________________________ File system: ext4 Boot sector type: - Boot sector info: Operating System: Ubuntu 10.10 Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img sda2: _________________________________________________________________________ File system: Extended Partition Boot sector type: Unknown Boot sector info: sda5: _________________________________________________________________________ File system: swap Boot sector type: - Boot sector info: sdb1: _________________________________________________________________________ File system: ntfs Boot sector type: Windows XP Boot sector info: No errors found in the Boot Parameter Block. Operating System: Windows XP Boot files/dirs: =========================== Drive/Partition Info: ============================= Drive: sda ___________________ _____________________________________________________ Disk /dev/sda: 80.1 GB, 80060424192 bytes 255 heads, 63 sectors/track, 9733 cylinders, total 156368016 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Partition Boot Start End Size Id System /dev/sda1 * 2,048 150,226,943 150,224,896 83 Linux /dev/sda2 150,228,990 156,366,847 6,137,858 5 Extended /dev/sda5 150,228,992 156,366,847 6,137,856 82 Linux swap / Solaris Drive: sdb ___________________ _____________________________________________________ Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Partition Boot Start End Size Id System /dev/sdb1 * 63 976,751,999 976,751,937 7 HPFS/NTFS blkid -c /dev/null: ____________________________________________________________ Device UUID TYPE LABEL /dev/sda1 d682c9bd-dd89-4827-9802-a1f921ebe21c ext4 /dev/sda2: PTTYPE="dos" /dev/sda5 09e9c2cb-d903-4f0b-a181-536951845231 swap /dev/sda: PTTYPE="dos" /dev/sdb1 B21844EB1844AFE1 ntfs /dev/sdb: PTTYPE="dos" ============================ "mount | grep ^/dev output: =========================== Device Mount_Point Type Options /dev/sda1 / ext4 (rw,errors=remount-ro,commit=0) =========================== sda1/boot/grub/grub.cfg: =========================== # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi } function load_video { insmod vbe insmod vga } insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm fi terminal_output gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c set locale_dir=($root)/boot/grub/locale set lang=en insmod gettext if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash initrd /boot/initrd.img-2.6.35-28-generic } menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c echo 'Loading Linux 2.6.35-28-generic ...' linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.35-28-generic } menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash initrd /boot/initrd.img-2.6.35-22-generic } menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c echo 'Loading Linux 2.6.35-22-generic ...' linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.35-22-generic } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### if [ "x${timeout}" != "x-1" ]; then if keystatus; then if keystatus --shift; then set timeout=-1 else set timeout=0 fi else if sleep --interruptible 3 ; then set timeout=0 fi fi fi ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry "Windows XP" { set root=(hd1,1) chainloader (hd1,1)+1 } ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### =============================== sda1/etc/fstab: =============================== # /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /dev/sda1 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=09e9c2cb-d903-4f0b-a181-536951845231 none swap sw 0 0 =================== sda1: Location of files loaded by Grub: =================== 51.7GB: boot/grub/core.img 58.5GB: boot/grub/grub.cfg 1.2GB: boot/initrd.img-2.6.35-22-generic 1.3GB: boot/initrd.img-2.6.35-28-generic 58.2GB: boot/vmlinuz-2.6.35-22-generic 51.7GB: boot/vmlinuz-2.6.35-28-generic 1.3GB: initrd.img 1.2GB: initrd.img.old 51.7GB: vmlinuz 58.2GB: vmlinuz.old =========================== Unknown MBRs/Boot Sectors/etc ======================= Unknown BootLoader on sda2 00000000 d9 ed 13 ab ff a8 33 8c 01 b2 47 99 e1 4a b1 f1 |......3...G..J..| 00000010 69 5f a7 29 a4 1a 03 9e 31 b9 45 02 71 e6 58 78 |i_.)....1.E.q.Xx| 00000020 3d f6 ee 7b 3e 33 1b 82 c6 7d cf 1a c8 e7 bc 2f |=..{>3...}...../| 00000030 b9 e1 70 75 cf 18 aa e7 d5 7e 3c f1 b4 e7 9e 3a |..pu.....~<....:| 00000040 55 38 f1 b4 ee 78 59 0b 5e f7 3c 4c 57 73 9c 2a |U8...xY.^.<LWs.*| 00000050 28 f1 19 ed 11 9c b2 19 e2 80 92 1c 7b 84 ee 0b |(...........{...| 00000060 e2 c0 ac af 0a 50 42 b9 cf 0c dc 2c 20 77 85 dc |.....PB...., w..| 00000070 8f 70 5f 7b 84 9b a1 f7 8c 2d ee 70 5c ae f7 39 |.p_{.....-.p\..9| 00000080 63 f7 09 8a ec 79 4c ed 9f cc ad 3c f8 1b 47 7d |c....yL....<..G}| 00000090 3f 97 d5 16 cb 29 45 38 25 61 36 08 de 10 93 0f |?....)E8%a6.....| 000000a0 95 4f ea 54 f9 89 ff f1 bf 9a cc bb fd b6 22 b1 |.O.T..........".| 000000b0 65 08 05 21 78 19 46 b0 24 7e fb de d4 b3 ba d6 |e..!x.F.$~......| 000000c0 ec 11 65 82 ee 10 1d 12 04 91 da 6d 67 47 ea 9b |..e........mgG..| 000000d0 6f b0 aa fb cb 67 10 64 86 e8 26 85 fb f9 50 77 |o....g.d..&...Pw| 000000e0 9d 13 9b 9e d9 11 f3 a1 50 1b 11 b7 93 79 9f ab |........P....y..| 000000f0 c1 b6 86 0f 35 ed d4 9f dc f8 db bd ed 45 3a 68 |....5........E:h| 00000100 54 68 4a 1d d1 fc b8 c9 72 b4 d7 7b 60 e7 39 2f |ThJ.....r..{`.9/| 00000110 2a 0a 4e 52 72 52 c6 e2 2a 55 6a 2a e1 82 40 71 |*.NRrR..*Uj*..@q| 00000120 11 11 e0 53 d6 ff 1b a9 c6 65 df 1e b7 15 6f a2 |...S.....e....o.| 00000130 15 02 a4 6d 19 b7 78 57 a6 ee 9e 36 08 7d 6f 7c |...m..xW...6.}o|| 00000140 fd f7 7c d5 40 ff 0f c7 97 dc aa 00 ce 8b bb dc |..|.@...........| 00000150 e2 eb 1c 50 74 d8 14 cc 9a d6 5c a2 ab f2 67 f9 |...Pt.....\...g.| 00000160 58 ed 43 79 0e 78 7a 5c a6 f8 7b e8 05 4e 62 8a |X.Cy.xz\..{..Nb.| 00000170 0a 5f 22 ee a6 38 b9 e1 32 45 97 08 cc 75 66 c6 |._"..8..2E...uf.| 00000180 b3 a2 2d 89 a1 e9 95 21 28 53 fd dd be b1 b2 a2 |..-....!(S......| 00000190 78 3f a3 c9 3d e3 31 54 88 cf 78 0d e1 21 a8 74 |x?..=.1T..x..!.t| 000001a0 06 60 9d 21 c6 7a 24 e1 cc 28 f8 98 e0 99 e3 fc |.`.!.z$..(......| 000001b0 fa 8b eb d5 56 03 20 b8 54 ba c6 ee 9f 57 00 fe |....V. .T....W..| 000001c0 ff ff 82 fe ff ff 02 00 00 00 00 a8 5d 00 00 00 |............]...| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200

    Read the article

  • Puppet's automatically generated certificates failing

    - by gparent
    I am running a default configuration of Puppet on Debian Squeeze 6.0.4. The server's FQDN is master.example.com. The client's FQDN is client.example.com. I am able to contact the puppet master and send a CSR. I sign it using puppetca -sa but the client will still not connect. Date of both machines is within 2 seconds of Tue Apr 3 20:59:00 UTC 2012 as I wrote this sentence. This is what appears in /var/log/syslog: Apr 3 17:03:52 localhost puppet-agent[18653]: Reopening log files Apr 3 17:03:52 localhost puppet-agent[18653]: Starting Puppet client version 2.6.2 Apr 3 17:03:53 localhost puppet-agent[18653]: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Apr 3 17:03:53 localhost puppet-agent[18653]: Using cached catalog Apr 3 17:03:53 localhost puppet-agent[18653]: Could not retrieve catalog; skipping run Here is some interesting output: OpenSSL client test: client:~# openssl s_client -host master.example.com -port 8140 -cert /var/lib/puppet/ssl/certs/client.example.com.pem -key /var/lib/puppet/ssl/private_keys/client.example.com.pem -CAfile /var/lib/puppet/ssl/certs/ca.pem CONNECTED(00000003) depth=1 /CN=Puppet CA: master.example.com verify return:1 depth=0 /CN=master.example.com verify error:num=7:certificate signature failure verify return:1 depth=0 /CN=master.example.com verify return:1 18509:error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error:s3_pkt.c:1102:SSL alert number 51 18509:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188: client:~# master's certificate: root@master:/etc/puppet# openssl x509 -text -noout -in /etc/puppet/ssl/certs/master.example.com.pem Certificate: Data: Version: 3 (0x2) Serial Number: 2 (0x2) Signature Algorithm: sha1WithRSAEncryption Issuer: CN=Puppet CA: master.example.com Validity Not Before: Apr 2 20:01:28 2012 GMT Not After : Apr 2 20:01:28 2017 GMT Subject: CN=master.example.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:a9:c1:f9:4c:cd:0f:68:84:7b:f4:93:16:20:44: 7a:2b:05:8e:57:31:05:8e:9c:c8:08:68:73:71:39: c1:86:6a:59:93:6e:53:aa:43:11:83:5b:2d:8c:7d: 54:05:65:c1:e1:0e:94:4a:f0:86:58:c3:3d:4f:f3: 7d:bd:8e:29:58:a6:36:f4:3e:b2:61:ec:53:b5:38: 8e:84:ac:5f:a3:e3:8c:39:bd:cf:4f:3c:ff:a9:65: 09:66:3c:ba:10:14:69:d5:07:57:06:28:02:37:be: 03:82:fb:90:8b:7d:b3:a5:33:7b:9b:3a:42:51:12: b3:ac:dd:d5:58:69:a9:8a:ed Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: critical CA:FALSE Netscape Comment: Puppet Ruby/OpenSSL Internal Certificate X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Subject Key Identifier: 8C:2F:14:84:B6:A1:B5:0C:11:52:36:AB:E5:3F:F2:B9:B3:25:F3:1C X509v3 Extended Key Usage: critical TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha1WithRSAEncryption 7b:2c:4f:c2:76:38:ab:03:7f:c6:54:d9:78:1d:ab:6c:45:ab: 47:02:c7:fd:45:4e:ab:b5:b6:d9:a7:df:44:72:55:0c:a5:d0: 86:58:14:ae:5f:6f:ea:87:4d:78:e4:39:4d:20:7e:3d:6d:e9: e2:5e:d7:c9:3c:27:43:a4:29:44:85:a1:63:df:2f:55:a9:6a: 72:46:d8:fb:c7:cc:ca:43:e7:e1:2c:fe:55:2a:0d:17:76:d4: e5:49:8b:85:9f:fa:0e:f6:cc:e8:28:3e:8b:47:b0:e1:02:f0: 3d:73:3e:99:65:3b:91:32:c5:ce:e4:86:21:b2:e0:b4:15:b5: 22:63 root@master:/etc/puppet# CA's certificate: root@master:/etc/puppet# openssl x509 -text -noout -in /etc/puppet/ssl/certs/ca.pem Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha1WithRSAEncryption Issuer: CN=Puppet CA: master.example.com Validity Not Before: Apr 2 20:01:05 2012 GMT Not After : Apr 2 20:01:05 2017 GMT Subject: CN=Puppet CA: master.example.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:b5:2c:3e:26:a3:ae:43:b8:ed:1e:ef:4d:a1:1e: 82:77:78:c2:98:3f:e2:e0:05:57:f0:8d:80:09:36: 62:be:6c:1a:21:43:59:1d:e9:b9:4d:e0:9c:fa:09: aa:12:a1:82:58:fc:47:31:ed:ad:ad:73:01:26:97: ef:d2:d6:41:6b:85:3b:af:70:00:b9:63:e9:1b:c3: ce:57:6d:95:0e:a6:d2:64:bd:1f:2c:1f:5c:26:8e: 02:fd:d3:28:9e:e9:8f:bc:46:bb:dd:25:db:39:57: 81:ed:e5:c8:1f:3d:ca:39:cf:e7:f3:63:75:f6:15: 1f:d4:71:56:ed:84:50:fb:5d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: critical CA:TRUE Netscape Comment: Puppet Ruby/OpenSSL Internal Certificate X509v3 Key Usage: critical Certificate Sign, CRL Sign X509v3 Subject Key Identifier: 8C:2F:14:84:B6:A1:B5:0C:11:52:36:AB:E5:3F:F2:B9:B3:25:F3:1C Signature Algorithm: sha1WithRSAEncryption 1d:cd:c6:65:32:42:a5:01:62:46:87:10:da:74:7e:8b:c8:c9: 86:32:9e:c2:2e:c1:fd:00:79:f0:ef:d8:73:dd:7e:1b:1a:3f: cc:64:da:a3:38:ad:49:4e:c8:4d:e3:09:ba:bc:66:f2:6f:63: 9a:48:19:2d:27:5b:1d:2a:69:bf:4f:f4:e0:67:5e:66:84:30: e5:85:f4:49:6e:d0:92:ae:66:77:50:cf:45:c0:29:b2:64:87: 12:09:d3:10:4d:91:b6:f3:63:c4:26:b3:fa:94:2b:96:18:1f: 9b:a9:53:74:de:9c:73:a4:3a:8d:bf:fa:9c:c0:42:9d:78:49: 4d:70 root@master:/etc/puppet# Client's certificate: client:~# openssl x509 -text -noout -in /var/lib/puppet/ssl/certs/client.example.com.pem Certificate: Data: Version: 3 (0x2) Serial Number: 3 (0x3) Signature Algorithm: sha1WithRSAEncryption Issuer: CN=Puppet CA: master.example.com Validity Not Before: Apr 2 20:01:36 2012 GMT Not After : Apr 2 20:01:36 2017 GMT Subject: CN=client.example.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:ae:88:6d:9b:e3:b1:fc:47:07:d6:bf:ea:53:d1: 14:14:9b:35:e6:70:43:e0:58:35:76:ac:c5:9d:86: 02:fd:77:28:fc:93:34:65:9d:dd:0b:ea:21:14:4d: 8a:95:2e:28:c9:a5:8d:a2:2c:0e:1c:a0:4c:fa:03: e5:aa:d3:97:98:05:59:3c:82:a9:7c:0e:e9:df:fd: 48:81:dc:33:dc:88:e9:09:e4:19:d6:e4:7b:92:33: 31:73:e4:f2:9c:42:75:b2:e1:9f:d9:49:8c:a7:eb: fa:7d:cb:62:22:90:1c:37:3a:40:95:a7:a0:3b:ad: 8e:12:7c:6e:ad:04:94:ed:47 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: critical CA:FALSE Netscape Comment: Puppet Ruby/OpenSSL Internal Certificate X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Subject Key Identifier: 8C:2F:14:84:B6:A1:B5:0C:11:52:36:AB:E5:3F:F2:B9:B3:25:F3:1C X509v3 Extended Key Usage: critical TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha1WithRSAEncryption 33:1f:ec:3c:91:5a:eb:c6:03:5f:a1:58:60:c3:41:ed:1f:fe: cb:b2:40:11:63:4d:ba:18:8a:8b:62:ba:ab:61:f5:a0:6c:0e: 8a:20:56:7b:10:a1:f9:1d:51:49:af:70:3a:05:f9:27:4a:25: d4:e6:88:26:f7:26:e0:20:30:2a:20:1d:c4:d3:26:f1:99:cf: 47:2e:73:90:bd:9c:88:bf:67:9e:dd:7c:0e:3a:86:6b:0b:8d: 39:0f:db:66:c0:b6:20:c3:34:84:0e:d8:3b:fc:1c:a8:6c:6c: b1:19:76:65:e6:22:3c:bf:ff:1c:74:bb:62:a0:46:02:95:fa: 83:41 client:~#

    Read the article

  • how can I invoke a webservice from another webservice

    - by vinny
    I have two webservices A and B. A needs to invoke one of the webMethods in B. How can I achieve this? I am using maven's wsimport plugin to build A. This is to generate the necessary stubs for B and include them as part of the Webservice A. However, when I try to Invoke the webmethod o f B, I get an Exception. Can anyone please tell me what is going on? Below Is the code and the exception trace: Code: BBeanService bbs = new BBeanService(); BBean bb = bbs.getBBeanPort(); bb.invokeWebService(); // this is throwing exception This is the exception trace: java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118) at $Proxy175.getCase(Unknown Source) at com.kebok.ais.billing.server.ejb.impl.ChargeManagerBean.generateBillDetails(ChargeManagerBean.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011) at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175) at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011) at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:190) at $Proxy173.generateBillDetails(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:78) at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106) at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:317) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:222) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:133) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87) at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:228) at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:157) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException at com.sun.enterprise.security.jmac.config.PipeHelper.makeFaultResponse(PipeHelper.java:328) at com.sun.enterprise.security.jmac.config.PipeHelper.getFaultResponse(PipeHelper.java:366) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:227) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:133) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87) at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:228) at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:157) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.

    Read the article

  • Blackberry support for Forms Authentication - ASP.NET MVC app

    - by Derek Mitchell
    I'm writing an ASP.NET MVC application that uses Forms Authentication. The target clients are a variety of mobile web browsers. When I use the BlackBerry 8530 simulator my MVC app authenticates as expected. I can visit pages whose controller methods are decorated with the [Authorize] attribute - no problem - they display and therefore I assume my Forms Authentication is working correctly. Using a physical Windows Mobile device to browse my site, I have the same experience as the BB simulator, the forms authentication works as I would expect. BUT when I try to visit the site using a Blackberry 8900 physical device the Login page keeps on looping back when I click the Login page. The device is not retaining it's "authenticated" status. I added code to verify this and I can see that: Request.IsAuthenticated: False User.Identity.IsAuthenticated: False So my question is what next steps can I take to try and find out why the Blackberry 8900 is losing it's authentication status. Is this cookie related? Anyone have any ideas? Cheers Derek

    Read the article

  • java.util.regex.Pattern matching the beginning of a String

    - by Pierre
    Hi all, Is it possible to know if a stream/string contains an input that could match a regular expression. For example String input="AA"; Pattern pat=Pattern.compile("AAAAAB"); Matcher matcher=pat.matcher(input); //<-- something here returning true ? or String input="BB"; Pattern pat=Pattern.compile("AAAAAB"); Matcher matcher=pat.matcher(input); //<-- something here returning false ? Thanks

    Read the article

  • xpath query in a servlet gives exception

    - by user1401071
    I have a Document object initialized in the init() method of the servlet and use it in the doPost() method to service the requests. selectNodeList() xpath query gives exception when the servlet services many request at same time. The Exception is shown below: Caused by: javax.xml.transform.TransformerException: -1 at org.apache.xpath.XPath.execute(XPath.java:331) at org.apache.xpath.CachedXPathAPI.eval(CachedXPathAPI.java:328) at org.apache.xpath.CachedXPathAPI.selectNodeList(CachedXPathAPI.java:255) at org.apache.xpath.CachedXPathAPI.selectNodeList(CachedXPathAPI.java:235) at com.pro.bb.servlets.Controller.getDataOrPeriodForReport(Controller.java:511) ... 23 more Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 at org.apache.xpath.XPathContext.pushCurrentNode(XPathContext.java:808) at org.apache.xpath.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:447) at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:409) at org.apache.xpath.axes.WalkingIterator.nextNode(WalkingIterator.java:176) at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:320) at org.apache.xpath.axes.NodeSequence.runTo(NodeSequence.java:474) at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:257) at org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:257) at org.apache.xpath.XPath.execute(XPath.java:308) Help me sort out the issue.

    Read the article

  • Open source license for test code

    - by Gary
    I'm creating a project to house an iPhone library for common code for the iPhone... essentially it's a library that'll save people from finding solutions to common problems that amount to copying and pasting snippets of code. The site is located here: http://code.google.com/p/devkit-bb/ I licensed it under Eclipse, because fosters the extension of the library without requiring constraints like LGPL on object files being provided/made available, which would be the case since everything is statically linked. What I'm wondering is how/what license to apply to the unit tests? Since they essentially demonstrate how to use various interfaces and components. Thus they're designed for potential copy and paste situations, and I don't want people who might end up using this as part of the building blocks of their environment to feel like the license would prohibit that "derivative work", ie. their application or game.

    Read the article

  • "call" instruction that seemingly jumps into itself

    - by Checkers
    I have gcc 4 compiling some C++ code into the following (from objdump): 00000030 <func()>: 30: 55 push %ebp 31: 89 e5 mov %esp,%ebp 33: 56 push %esi 34: 31 f6 xor %esi,%esi 36: 53 push %ebx 37: bb 00 00 00 00 mov $0x0,%ebx 3c: 83 ec 40 sub $0x40,%esp 3f: c7 04 24 01 00 00 00 movl $0x1,(%esp) 46: e8 fc ff ff ff call 47 <func()+0x17> 4b: 8d 55 ec lea 0xffffffec(%ebp),%edx 4e: 89 14 24 mov %edx,(%esp) 51: 89 5c 24 04 mov %ebx,0x4(%esp) 55: 89 74 24 08 mov %esi,0x8(%esp) 59: 89 44 24 0c mov %eax,0xc(%esp) ; the rest of the function is omitted I can't understand the operand of call instruction here, why does it call into itself, but with one byte off?

    Read the article

  • Java variadic function parameters

    - by Amir Rachum
    Hi, I have a function that accepts a variable number of parameters: foo (Class... types); In which I get a certain number of class types. Next, I want to have a function bar( ?? ) That will accepts a variable number of parameters as well, and be able to verify that the variables are the same number (that's easy) and of the same types (the hard part) as was specified in foo. How can I do that? Edit: to clarify, a call could be: foo (String.class, Int.class); bar ("aaa", 32); // OK! bar (3); // ERROR! bar ("aa" , "bb"); //ERROR! Also, foo and bar are methods of the same class.

    Read the article

  • python: using __import__ to import a module which in turn generates an ImportError

    - by bbb
    Hi there, I have a funny problem I'd like to ask you guys ('n gals) about. I'm importing some module A that is importing some non-existent module B. Of course this will result in an ImportError. This is what A.py looks like import B Now let's import A >>> import A Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tmp/importtest/A.py", line 1, in <module> import B ImportError: No module named B Alright, on to the problem. How can I know if this ImportError results from importing A or from some corrupt import inside A without looking at the error's string representation. The difference is that either A is not there or does have incorrect import statements. Hope you can help me out... Cheers bb

    Read the article

  • OpenCV SVD Matrix format.

    - by Rick
    I currently have a set of 2D Cartesian coordinates e.g. {(1,3), (2,2), (3,4)} Which will be put into a 2D array, to perform SVD properly would the matrix be put together such that the coordinates form the columns or the rows e.g. 1 3 2 2 3 4 or 1 2 3 3 2 4 I have been doing a little trial and error comparing to examples of SVD I have found online, the resulting matrix usually seems to be negated, with some of the values shuffled around. To clarify further if I had a matrix E which was MxN as shown here http://upload.wikimedia.org/wikipedia/commons/b/bb/Matrix.svg To define the matrix as a 2D array would it be Array[M][N] or Array[N][M] I am assuming this actually matters due to matrix arithmetic not being commutative? Can anyone actually verify this?

    Read the article

  • How to View Android Native Code Profiling?

    - by David R.
    I started my emulator with ./emulator -trace profile -avd emulator_15. I then tracked down the trace files to ~/.android/avd/rodgers_emulator_15.avd/traces/profile, where there are six files: qtrace.bb, qtrace.exc, qtrace.insn, qtrace.method, qtrace.pid, qtrace.static. I can't figure out what to do with these files. I've tried both dmtracedump and traceview on all of the files, but none seem to generate any output I can do anything with. How can I view the proportion of time taken by native method calls on Android?

    Read the article

  • java.util.regex.* Recursive matching

    - by amit.bhayani
    Hi Guys, I have been using the java.util.regex.* classes for Regular Expression in Java and all good so far. But today I have a different requirement. For example consider the pattern to be "aabb". Now if the input String is aa it will definitely not match, however there is still possibility that if I append bb it becomes aabb and it matches. However if I would have started with cc, no matter what I append it will never match. I have explored the Pattern and Matcher class but didn't find any way of achieving this. The input will come from user and system have to wait till pattern matches or it will never match irrespective of any input further. Any clue? Thanks.

    Read the article

  • Blackberry JDE generating bad .jad file (does not match compiled .cod file)

    - by matkas
    I Have a BB application that gets compiled into 3 siblings cod file. ( actualy one cod fil contaning 3 sub cod files). app.cod |--app.cod |--app-1.cod |--app-2.cod which is normal. the jad refers to those 3 inner .cod files. Now I have add some feature to my app, it is getting a little bit bigger. the jad now refers to 4 inner .cod files. but there is still 3 inside the app.cod that is generated. so I now still have app.cod |--app.cod |--app-1.cod |--app-2.cod but with the jad refering to app.cod app-1.cod app-2.cod AND app-3.cod. what is wrong the my compiled program? is it a bug from the JDE? I am using JDE 4.5.

    Read the article

  • WPF: CollectionViewSource - uneven grouping

    - by Eddy
    Hi! Im using the WPF-Toolkit DataGrid with an CollectionViewSource as Source. With PropertyGroupDescriptions I can create and display groups in the Grid. My problem is that i cannot create "uneven" groups, like: A A.A A.B B B.A B.B B.B.A B.B.B C D I want some groups that are deeper than other, and some, that are only elements (C and D) and no groups. I hope it is undestandable... Has someone an idea to solve this? Thanks!

    Read the article

  • Where clause in joins vs Where clause in Sub Query

    - by Kanavi
    DDL create table t ( id int Identity(1,1), nam varchar(100) ) create table t1 ( id int Identity(1,1), nam varchar(100) ) DML Insert into t( nam)values( 'a') Insert into t( nam)values( 'b') Insert into t( nam)values( 'c') Insert into t( nam)values( 'd') Insert into t( nam)values( 'e') Insert into t( nam)values( 'f') Insert into t1( nam)values( 'aa') Insert into t1( nam)values( 'bb') Insert into t1( nam)values( 'cc') Insert into t1( nam)values( 'dd') Insert into t1( nam)values( 'ee') Insert into t1( nam)values( 'ff') Query - 1 Select t.*, t1.* From t t Inner join t1 t1 on t.id = t1.id Where t.id = 1 Query 1 SQL profiler Result Reads = 56, Duration = 4 Query - 2 Select T1.*, K.* from ( Select id, nam from t Where id = 1 )K Inner Join t1 T1 on T1.id = K.id Query 2 SQL Profiler Results Reads = 262 and Duration = 2 You can also see my SQlFiddle Query - Which query should be used and why?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >