Search Results

Search found 8673 results on 347 pages for 'kvm switch'.

Page 77/347 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • C to C++ Conversion [closed]

    - by Annalyne
    Can someone convert this code to C++, pretty please? :( #include <stdio.h> #include <stdlib.h> #include <time.h> #define WEAPON_ROPE 10 #define WEAPON_REVOLVER 20 #define WEAPON_LEADPIPE 30 #define WEAPON_CANDLESTICK 40 #define WEAPON_KNIFE 50 #define WEAPON_WRENCH 60 #define PEOPLE_MRGREEN 100 #define PEOPLE_MSSCARLET 200 #define PEOPLE_CONLMUSTARD 300 #define PEOPLE_PROFPLUM 400 #define PEOPLE_MISPEACOCK 500 #define PEOPLE_MISWHITE 600 #define PLACE_KITCHEN 1 #define PLACE_HALL 2 #define PLACE_POOLROOM 3 #define PLACE_STUDY 4 #define PLACE_LOUNG 5 #define PLACE_LIBRARY 6 #define PLACE_CONSERVATORY 7 #define PLACE_DINING 8 #define PLACE_BILLIARDS 9 int main() { int die = 0; int players[6][9] = {{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}}; int allCards[] = {WEAPON_ROPE, WEAPON_REVOLVER, WEAPON_LEADPIPE, WEAPON_CANDLESTICK, WEAPON_CANDLESTICK, WEAPON_KNIFE, WEAPON_WRENCH, PEOPLE_MRGREEN, PEOPLE_MSSCARLET, PEOPLE_CONLMUSTARD, PEOPLE_CONLMUSTARD, PEOPLE_PROFPLUM, PEOPLE_MISPEACOCK, PEOPLE_MISWHITE, PLACE_KITCHEN, PLACE_HALL, PLACE_POOLROOM, PLACE_STUDY, PLACE_LOUNG, PLACE_LIBRARY, PLACE_CONSERVATORY, PLACE_DINING, PLACE_BILLIARDS}; int deckSize = 23; // number of cards in allCards array int count; for (count = 0; count < deckSize; ++count) { printf(", %d", allCards[count]); } // End for // These three array's are so you can put a card back, if need be... int weaponCards[] = {WEAPON_ROPE, WEAPON_REVOLVER, WEAPON_LEADPIPE, WEAPON_CANDLESTICK, WEAPON_CANDLESTICK, WEAPON_KNIFE, WEAPON_WRENCH}; int weaponDeckSize = 7; int peopleCards[] = {PEOPLE_MRGREEN, PEOPLE_MSSCARLET, PEOPLE_CONLMUSTARD, PEOPLE_CONLMUSTARD, PEOPLE_PROFPLUM, PEOPLE_MISPEACOCK, PEOPLE_MISWHITE}; int peopleDeckSize = 7; int placeCards[] = {PLACE_KITCHEN, PLACE_HALL, PLACE_POOLROOM, PLACE_STUDY, PLACE_LOUNG, PLACE_LIBRARY, PLACE_CONSERVATORY, PLACE_DINING, PLACE_BILLIARDS}; int placeDeckSize = 9; srand(clock()); // seed rand() using clock() which gives // the current tick your processor is at... int killer[3]; // no need to initialize yet. killer[0-2] will initialize int deckShuffle = rand() % weaponDeckSize; // picks one number out of the deck killer[0] = weaponCards[deckShuffle]; allCards[deckShuffle] = 0; // Card drawn. No longer exists in deck deckShuffle = rand() % peopleDeckSize; // picks another random card out of the deck killer[1] = peopleCards[deckShuffle]; allCards[deckShuffle + weaponDeckSize] = 0; // Card drawn. No longer exists in deck deckShuffle = rand() % placeDeckSize; // randomly picks the last card needed killer[2] = placeCards[deckShuffle]; allCards[deckShuffle + weaponDeckSize + peopleDeckSize] = 0; // Card drawn. No longer exists in deck int numberOfCards = 0; printf("CLUE\n"); printf("written by John Schintone\n"); printf("Origonal game delvoped by Hasbro\n"); int numberOfPlayers = 0; while ((numberOfPlayers < 3) || (numberOfPlayers > 6)) { printf("How many players are Going to play :\n"); printf("[number] > "); scanf("%d",&numberOfPlayers); // A very fast if statement which only uses integers/char's switch(numberOfPlayers) { case 6: { numberOfCards = 3; } break; case 5: { numberOfCards = 4; } break; case 4: { numberOfCards = 5; } break; case 3: { numberOfCards = 6; } break; default: { printf("You must enter a number between 3 and 6...\n"); } // End default } // End switch } // End while int index1, index2; // Note: ++index1; is faster than index1++; and will almost always // produce better code (index1++ happens after this statement line. // ++index1 increments index1 before this statement line) for (index1 = 0; index1 < numberOfPlayers; ++index1) { printf("Player %d", index1); for (index2 = 0; index2 < numberOfCards; ++index2) { // Remember that allCards[deckShuffle] == 0 because we removed that // card ages ago... works out well, just don't forget you did that : ) while (allCards[deckShuffle] == 0) { deckShuffle = rand() % deckSize; } // End while players[index1][index2] = allCards[deckShuffle]; allCards[deckShuffle] = 0; // Card removed for after loop... printf(", %d", players[index1][index2]); switch(players[index1][index2]) { case WEAPON_ROPE: { } break; // Add more... case PEOPLE_MRGREEN: { } break; // Add more... case PLACE_KITCHEN: { } break; // Add more... default: { printf("Program has caught player %d cheating...", index1); } // End default } // End switch } // End for printf("\n"); } // End for printf("The killer is %d, with the %d, and in the %d \n\n", killer[0], killer[1], killer[2]); printf("Type h for this help... \n"); printf("Type e to escape... \n"); printf("Type r to roll the die... \n"); char command = '\0'; // \0 represents zero, or the null character while (command != 'e') { printf("[one character] > "); scanf("%c", &command); if (command == 'r') { die = rand() % 6 + 1; printf("Your number is: %d \n", die); } // end while if (command == 'h') { printf("Type h for this help... \n"); printf("Type e to escape... \n"); printf("Type r to roll the die... \n"); } // End if printf("\n"); } // End while return(0); // Success. Program worked ok } // End main() Function

    Read the article

  • My new laptop - with a really nice battery option

    - by Rob Farley
    It was about time I got a new laptop, and so I made a phone-call to Dell to discuss my options. I decided not to get an SSD from them, because I’d rather choose one myself – the sales guy tells me that changing the HD doesn’t void my warranty, so that’s good (incidentally, I’d love to hear people’s recommendations for which SSD to get for my laptop). Unfortunately this machine only has one HD slot, but I figure that I’ll put lots of stuff onto external disks anyway. The machine I got was a Dell Studio XPS 16. It’s red (which suits my company), but also has the Intel® Core™ i7-820QM Processor, which is 4 Cores/8 Threads. Makes for a pretty Task Manager, but nothing like the one I saw at SQLBits last year (at 96 cores), or the one that my good friend James Rowland-Jones writes about here. But the reason for this post is actually something in the software that comes with the machine – you know, the stuff that most people uninstall at the earliest opportunity. I had just reinstalled the operating system, and was going through the utilities to get the drivers up-to-date, when I noticed that one of Dell applications included an option to disable battery charging. So I installed it. And sure enough, I can tell the battery not to charge now. Clearly Dell see it as a temporary option, and one that’s designed for when you’re on a plane. But for me, I most often use my laptop with the power plugged in, which means I don’t need to have my battery continually topping itself up. So I really love this option, but I feel like it could go a little further. I’d like “Not Charging” to be the default option, and let me set it when I want to charge it (which should theoretically make my battery last longer). I also intend to work out how this option works, so that I can script it and put it into my StartUp options (so it can be the Default setting). Actually – if someone has already worked this out and can tell me what it does, then please feel free to let me know. Even better would be an external switch. I had a switch on my old laptop (a Dell Latitude) for WiFi, so that I could turn that off before I turned on the computer (this laptop doesn’t give me that option – no physical switch for flight mode). I guess it just means I’ll get used to leaving the WiFi off by default, and turning it on when I want it – might save myself some battery power that way too. Soon I’ll need to take the plunge and sync my iPhone with the new laptop. I’m a little worried that I might lose something – Apple’s messages about how my stuff will be wiped and replaced with what’s on the PC doesn’t fill me with confidence, as it’s a new PC that doesn’t have stuff on it. But having a new machine is definitely a nice experience, and one that I can recommend. I’m sure when I get around to buying an SSD I’ll feel like it’s shiny and new all over again! Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • Enhanced Dynamic Filtering

    - by Ricardo Peres
    Remember my last post on dynamic filtering? Well, this time I'm extending the code in order to allow two levels of querying: Match type, represented by the following options: public enum MatchType { StartsWith = 0, Contains = 1 } And word match: public enum WordMatch { AnyWord = 0, AllWords = 1, ExactPhrase = 2 } You can combine the two levels in order to achieve the following combinations: MatchType.StartsWith + WordMatch.AnyWord Matches any record that starts with any of the words specified MatchType.StartsWith + WordMatch.AllWords Not available: does not make sense, throws an exception MatchType.StartsWith + WordMatch.ExactPhrase Matches any record that starts with the exact specified phrase MatchType.Contains + WordMatch.AnyWord Matches any record that contains any of the specified words MatchType.Contains + WordMatch.AllWords Matches any record that contains all of the specified words MatchType.Contains + WordMatch.ExactPhrase Matches any record that contains the exact specified phrase Here is the code: public static IList Search(IQueryable query, Type entityType, String dataTextField, String phrase, MatchType matchType, WordMatch wordMatch, Int32 maxCount) { String [] terms = phrase.Split(' ').Distinct().ToArray(); StringBuilder result = new StringBuilder(); PropertyInfo displayProperty = entityType.GetProperty(dataTextField); IList searchList = null; MethodInfo orderByMethod = typeof(Queryable).GetMethods(BindingFlags.Public | BindingFlags.Static).Where(m = m.Name == "OrderBy").ToArray() [ 0 ].MakeGenericMethod(entityType, displayProperty.PropertyType); MethodInfo takeMethod = typeof(Queryable).GetMethod("Take", BindingFlags.Public | BindingFlags.Static).MakeGenericMethod(entityType); MethodInfo whereMethod = typeof(Queryable).GetMethods(BindingFlags.Public | BindingFlags.Static).Where(m = m.Name == "Where").ToArray() [ 0 ].MakeGenericMethod(entityType); MethodInfo distinctMethod = typeof(Queryable).GetMethods(BindingFlags.Public | BindingFlags.Static).Where(m = m.Name == "Distinct" && m.GetParameters().Length == 1).Single().MakeGenericMethod(entityType); MethodInfo toListMethod = typeof(Enumerable).GetMethod("ToList", BindingFlags.Static | BindingFlags.Public).MakeGenericMethod(entityType); MethodInfo matchMethod = typeof(String).GetMethod ( (matchType == MatchType.StartsWith) ? "StartsWith" : "Contains", new Type [] { typeof(String) } ); MemberExpression member = Expression.MakeMemberAccess ( Expression.Parameter(entityType, "n"), displayProperty ); MethodCallExpression call = null; LambdaExpression where = null; LambdaExpression orderBy = Expression.Lambda ( member, member.Expression as ParameterExpression ); switch (matchType) { case MatchType.StartsWith: switch (wordMatch) { case WordMatch.AnyWord: call = Expression.Call ( member, matchMethod, Expression.Constant(terms [ 0 ]) ); where = Expression.Lambda ( call, member.Expression as ParameterExpression ); for (Int32 i = 1; i ()); where = Expression.Lambda ( Expression.Or ( where.Body, exp ), where.Parameters.ToArray() ); } break; case WordMatch.ExactPhrase: call = Expression.Call ( member, matchMethod, Expression.Constant(phrase) ); where = Expression.Lambda ( call, member.Expression as ParameterExpression ); break; case WordMatch.AllWords: throw (new Exception("The match type StartsWith is not supported with word match AllWords")); } break; case MatchType.Contains: switch (wordMatch) { case WordMatch.AnyWord: call = Expression.Call ( member, matchMethod, Expression.Constant(terms [ 0 ]) ); where = Expression.Lambda ( call, member.Expression as ParameterExpression ); for (Int32 i = 1; i ()); where = Expression.Lambda ( Expression.Or ( where.Body, exp ), where.Parameters.ToArray() ); } break; case WordMatch.ExactPhrase: call = Expression.Call ( member, matchMethod, Expression.Constant(phrase) ); where = Expression.Lambda ( call, member.Expression as ParameterExpression ); break; case WordMatch.AllWords: call = Expression.Call ( member, matchMethod, Expression.Constant(terms [ 0 ]) ); where = Expression.Lambda ( call, member.Expression as ParameterExpression ); for (Int32 i = 1; i ()); where = Expression.Lambda ( Expression.AndAlso ( where.Body, exp ), where.Parameters.ToArray() ); } break; } break; } query = orderByMethod.Invoke(null, new Object [] { query, orderBy }) as IQueryable; query = whereMethod.Invoke(null, new Object [] { query, where }) as IQueryable; if (maxCount != 0) { query = takeMethod.Invoke(null, new Object [] { query, maxCount }) as IQueryable; } searchList = toListMethod.Invoke(null, new Object [] { query }) as IList; return (searchList); } And this is how you'd use it: IQueryable query = ctx.MyEntities; IList list = Search(query, typeof(MyEntity), "Name", "Ricardo Peres", MatchType.Contains, WordMatch.ExactPhrase, 10 /*0 for all*/); SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • Improve Playback Using Enhancements in Windows Media Player 12

    - by DigitalGeekery
    Are you looking for ways to improve the playback of your media in Windows Media Player 12? We’ll show you how to do that by using the enhancements in WMP 12. If you are in Library mode, you’ll need to click the icon at the lower right to switch to Now Playing mode. Right-click anywhere in Media Player while in Now Playing mode, select Enhancements, and select any of the available options.   You can switch between the individual enhancements by clicking the right and left buttons at the top left.   Crossfading and Auto Volume Leveling The Auto Volume Leveling setting is just a simple toggle on and off. If your MP3 or WMA files have volume leveling information values.   You can automatically add volume leveling information values to all files you add to your library by switching to Library view, going to Tools > Options, and selecting Add volume leveling information values for new files on the Library tab. Click OK when finished.   Crossfading will gradually decrease the volume of the song that is ending (fade out) and increase volume of the song that is beginning. Click Turn on Crossfading and then click and drag the slider left or right change the amount of overlap between tracks. Graphic Equalizer The graphic equalizer is toggled on and off by clicking Turn on / Turn off at the top left. You can select pre-defined equalizer settings by music genre by clicking the Default list. The radio buttons on the left allow you to move the sliders individually, in a loose group or a tight group. You can always return to the default settings by clicking Reset. Play Speed Settings Choose a pre-defined settings by clicking Slow, Normal, or Fast. Uncheck the Snap slider to common speeds the move the slider right and left to your desired speed. If nothing else, these settings provide a little fun and amusement. Quiet Mode Quiet mode will level out any sharp volume highs and lows within a single track. Simply toggle the setting on or off and select whether you prefer Medium difference or Little difference by selecting one of the radio buttons. SRS WOW effects SRS WOW effects enhance low-frequency and stereo sound performance. Click Turn on to enable the TruBass and WOW Effect sliders. You can also optimize for your speaker type. Click to switch between Regular, Large, and Headphones. Video Settings Video Settings allow you to adjust the Hue, Brightness, Saturation, and Contrast.   You can also adjust the zoom settings by clicking Select video zoom settings.   Dolby Digital Settings Choose between Normal, Night, and Theater settings to adjust the audio for Dolby Digital content. This setting will only effect media with Dolby Digital sound. Looking for more ways to improve your media experience in WMP 12? Check out how to update metadata and cover art and how to share media with other Windows 7 computers on your home network. Similar Articles Productive Geek Tips Fixing When Windows Media Player Library Won’t Let You Add FilesInstall and Use the VLC Media Player on Ubuntu LinuxHow To Rip a Music CD in Windows 7 Media CenterStream Media from Windows 7 to XP with VLC Media PlayerInstalling Windows Media Player Plugin for Firefox TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Acronis Online Backup DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows Check these Awesome Chrome Add-ons iFixit Offers Gadget Repair Manuals Online Vista style sidebar for Windows 7 Create Nice Charts With These Web Based Tools Track Daily Goals With 42Goals Video Toolbox is a Superb Online Video Editor

    Read the article

  • How to Speed Up Any Android Phone By Disabling Animations

    - by Chris Hoffman
    Android phones — and tablets, too — display animations when moving between apps and screens. These animations look very slick, but they waste time — especially on fast phones, which could switch between apps instantly if not for the animations. Disabling these animations will speed up navigating between different apps and interface screens on your phone, saving you time. You can also speed up the animations if you’d rather see them. Access the Developer Options Menu First, we’ll need to access the Developer Options menu. It’s hidden by default so Android users won’t stumble across it unless they’re actually looking for it. To access the Developer Options menu, open the Settings screen, scroll down to the bottom of the list, and tap the About phone or About tablet option. Scroll down to the Build number field and tap it repeatedly. Eventually, you’ll see a message appear saying “You are now a developer!”. The Developer options submenu now appears on the Settings screen. You’ll find it near the bottom of the list, just above the About phone or About tablet option. Disable Interface Animations Open the Developer Options screen and slide the switch at the top of the screen to On. This allows you to change the hidden options on this screen. If you ever want to re-enable the animations and revert your changes, all you have to do is slide the Developer Options switch back to Off. Scroll down to the Drawing section. You’ll find the three options we want here — Window animation scale, Transition animation scale, and Animator duration scale. Tap each option and set it to Animation off to disable the associated animations. If you’d like to speed up the animations without disabling them entirely, select the Animation .5x option instead. If you’re feeling really crazy, you can even select longer animation durations. You can make the animations take as much as ten times longer with the Animation 10x setting. The Animator duration scale option applies to the transition animation that appears when you tap the app drawer button on your home screen.  Your change here won’t take effect immediately — you’ll have to restart Android’s launcher after changing the Animator duration scale setting. To restart Android’s launcher, open the Settings screen, tap Apps, swipe over to the All category, scroll down, and tap the Launcher app. Tap the Force stop button to forcibly close the launcher, then tap your device’s home button to re-launch the launcher. Your app drawer will now open immediately, too. Now whenever you open an app or transition to a new screen, it will pop up as quickly as possible — no waiting for animations and wasting processing power rendering them. How much of a speed improvement you’ll see here depends on your Android device and how fast it is. On our Nexus 4, this change makes many apps appear and become usable instantly if they’re running in the background. If you have a slower device, you may have to wait a moment for apps to be usable. That’s one of the big reasons why Android and other operating systems use animations. Animations help paper over delays that can occur while the operating system loads the app.     

    Read the article

  • ??Data Guard???????Redo GAP

    - by JaneZhang(???)
      ?Oracle Data Guard?,Redo Gap??????????????????redo????????????,?????????redo??????????,?????????????:ARC:????MRP:Media Recovery Process,????????redoRFS:Remote File Server ,???????????redo??FAL:Fetch Archive Log????:?????????gap?,??????????gap?????:Oracle 11.2.0.2 on Linux 5.????:1.?????????????:Primary:MAX(SEQUENCE#)--------------           86Standby:MAX(SEQUENCE#)--------------           862. ??????,??gap:????????: #ifconfig eth0 down???????switch logfile:SQL>alter system switch logfile;SQL>alter system switch logfile;...Primary:MAX(SEQUENCE#)--------------           96????alert log?????????????:TNS-00513: Destination host unreachable   nt secondary err code: 101   nt OS err code: 0Error 12543 received logging on to the standbyFAL[server, ARCp]: Error 12543 creating remote archivelog file 'STANDBY'FAL[server, ARCp]: FAL archive failed, see trace file.ARCH: FAL archive failed. Archiver continuingORACLE Instance orcl - Archival Error. Archiver continuing.3.??????????????,????????????:mv *.arc ../4. ???????:#ifconfig eth0 up5.??,???ARC???????????????????MRP???gap??gap fetching.??alert log:Thu Mar 29 19:58:49 2012Media Recovery Waiting for thread 1 sequence 87 (in transit) <====  ?????,??87...Thu Mar 29 20:08:45 2012...Media Recovery Waiting for thread 1 sequence 94Thu Mar 29 20:11:01 2012RFS[61]: Assigned to RFS process 13643RFS[61]: Opened log for thread 1 sequence 97 dbid 1285401128 branch 757620395Archived Log entry 80 added for thread 1 sequence 97 rlc 757620395 ID 0x4c9d8928 dest 2:Thu Mar 29 20:11:02 2012RFS[62]: Assigned to RFS process 13645RFS[62]: Selected log 4 for thread 1 sequence 98 dbid 1285401128 branch 757620395Thu Mar 29 20:11:02 2012Primary database is in MAXIMUM PERFORMANCE modeRe-archiving standby log 4 thread 1 sequence 98Thu Mar 29 20:11:02 2012Archived Log entry 81 added for thread 1 sequence 98 ID 0x4c9d8928 dest 1:RFS[63]: Assigned to RFS process 13647RFS[63]: Selected log 4 for thread 1 sequence 99 dbid 1285401128 branch 757620395Thu Mar 29 20:11:05 2012Fetching gap sequence in thread 1, gap sequence 94-96 <===========?gap...6.??MRP?trace,?????MRP ??fetching gap:MRP trace:*** 2012-03-29 20:08:45.375 4265 krsh.cMedia Recovery Waiting for thread 1 sequence 94*** 2012-03-29 20:11:05.543*** 2012-03-29 20:11:05.543 4265 krsh.cFetching gap sequence in thread 1, gap sequence 94-96 <==========MRP?gap.Redo shipping client performing standby login*** 2012-03-29 20:11:05.593 4595 krsu.cLogged on to standby successfullyClient logon and security negotiation successful!7.????????????,???RFS????????, MRP ????????apply.Thu Mar 29 20:12:06 2012RFS[64]: Assigned to RFS process 13649RFS[64]: Opened log for thread 1 sequence 94 dbid 1285401128 branch 757620395Archived Log entry 82 added for thread 1 sequence 94 rlc 757620395 ID 0x4c9d8928 dest 2:Thu Mar 29 20:12:06 2012RFS[65]: Assigned to RFS process 13651RFS[65]: Opened log for thread 1 sequence 95 dbid 1285401128 branch 757620395Thu Mar 29 20:12:06 2012RFS[66]: Assigned to RFS process 13653RFS[66]: Opened log for thread 1 sequence 96 dbid 1285401128 branch 757620395Archived Log entry 83 added for thread 1 sequence 95 rlc 757620395 ID 0x4c9d8928 dest 2:Archived Log entry 84 added for thread 1 sequence 96 rlc 757620395 ID 0x4c9d8928 dest 2:Thu Mar 29 20:12:16 2012Media Recovery Log /home/oracle/arch1/standby/1_94_757620395.arcMedia Recovery Log /home/oracle/arch1/standby/1_95_757620395.arcMedia Recovery Log /home/oracle/arch1/standby/1_96_757620395.arcMedia Recovery Log /home/oracle/arch1/standby/1_97_757620395.arcMedia Recovery Log /home/oracle/arch1/standby/1_98_757620395.arc????:????????,????gap???,???ARC?????????gap??,????????????MRP???apply log??????gap,???????FAL????? ?:?11g,??????ARC??????RFS?MRP?????????????gap. 8. ????????MRP??FAL??gap??,????????????,??MRP?trace???:FAL[client, MRP0],?????FAL??? *** 2012-03-29 21:18:15.964 4265 krsh.cError 1031 received logging on to the standby*** 2012-03-29 21:18:15.964 4265 krsh.cFAL[client, MRP0]: Error 1031 connecting to PRIMARY for fetching gap sequence

    Read the article

  • /sbin/getty process causing 100% CPU utilization

    - by scrrr
    I have an instance of Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-virtual i686) running as a KVM-VM on a host-machine that runs one more VM beside it. I deploy a Ruby on Rails application using the Capistrano deployment-gem. However, if I deploy twice in a row in a short time, the CPU usage jumps to 100% because of the /sbin/getty process. How can this be? I believe getty is a rather simple program that passes a login-name from a terminal to a login-process. Also: In my Capfile (Capistrano configuration file) I am running certain commands after the Rails application is deployed including a call to sudo /sbin/restart <APPNAME> which is an upstart task. Could this be related somehow? I can always kill the getty process and the problem is gone until the next deployment, but I would rather understand and fix the problem. Any help is appreciated. Attached is a screenshot of my problem.

    Read the article

  • Prevent service from starting

    - by Evan Plaice
    So, I do Arduino development on my system to program arduinos using the FTDI USB programming interface (if you have no idea what this means don't worry). The issue arises because the FTDI interface uses tty to communicate and it conflicts with one of the default ubuntu services. The default service in question is called brltty (which enables braille accessibility for people with impaired vision). Considering that I don't have any particular use for this service and it's annoying to stop it manually (using 'service brltty stop') after I restart my system... Where would I configure this (or any) service to prevent it from loading on startup? Note: I also have this issue with qemu-kvm conflicting with virtualbox.

    Read the article

  • Why the Enter key in a Mac keyboard is mapped to Level?

    - by Anentropic
    Just installing Ubuntu for the first time, glad to ditch Win 7. I have a KVM switch and also a Mac, hence I'm using a Mac keyboard (the full size alu one) Everything's pretty cool. First thing I wondered is why the numeric keypad doesn't work? Oh, I have to find the num lock key (which should default to on, sensibly, no?) which isn't labelled as such on a Mac keyboard. Ok no problem. Then for some reason the Enter key on the keypad doesn't work still. Check the keyboard layout (set to 'English UK Macintosh')... inspecting the layout the Enter key is mapped to something called 'Level' - WTF is 'Level'? Everything else about the keyboard works great ie the £ $ # @ " are all perfect, volume control works as expected... why this weird key mapping on the Enter key? More importantly... how do I change it to work as an Enter key ?

    Read the article

  • while upgrading a virtual machine do I need to install a bootloader

    - by Bond
    I have a virtualization server which is having a few virtual machines running at top of it. All this was done using Ubuntu server edition with KVM and using virt-manager on SSH connection. These VMs are Lucid 10.04 64 bit Vms. When I upgrade them via apt-get upgrade on an SSH connection in between the ncurses screen, it asks me if it should install a bootloader and to select Yes or No for it. I have no clue what should I select here and I cancel the upgrade.Since it is a production machine I can not specify any thing like this. So let me know what will be a correct.

    Read the article

  • How do I install Ubuntu to a USB key?

    - by badp
    If you are hurrying to reply, System ? Administration ? StartUp Disk Creator -- no, that's not what I'm talking about. I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install. To do this, I need to install the nVidia drivers first (sigh). To do this, I need changes to persist a reboot. To do this, I need to really install Ubuntu on a USB key. How do you do that? What I tried I tried to make a USB key from Testdrive, then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu: sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso ...but the installer didn't detect the disk properly.

    Read the article

  • GlassFish 4.0 Virtualization Progress - VirtualBox

    - by alexismp
    Wouldn't it be nice if you could spawn GlassFish instances as VirtualBox virtual machines? Well now with early versions of GlassFish 4.0 you can! This page on the GlassFish Wiki documents the steps to get this to work. It walks you through the various VirtualBox (network and services) and GlassFish configuration steps including the creation of VDI templates (typically JeOS images) to finally create a virtual machine on the fly, as part of the typical GlassFish deployment process. The more general virtualization support in GlassFish is discussed in this other Wiki page. Earlier demonstrations of GlassFish.next prototypes or early milestone builds showed support for KVM, "laptop mode" and OVM as well as community involvement from Serli, speaking of which this slide-deck is a good summary of what we're trying to achieve in the GlassFish 4.0 IMS (IaaS Management Service).

    Read the article

  • dpkg --set-selections from 11.10 on 12.04LTS

    - by Vixxo
    I have to move a server to a different DC in a different country. The server is currently running 11.10, but the new fresh installed OS will be 12.04. The hardware of both is completely different. In order to install the same packages that the server currently uses, I am thinking of exporting all packages to a list and then run this list on the new machine. I will after that proceed with transferring the configuration files for the LAMP stack. My question is if this will work, or if there will be a problem because of the differences in the versions of the OS? What is the correct way to do it? PS. I have no access to KVM to reload the OS as an image, so this would not be an option.

    Read the article

  • How do I reduce package content on a custom install CD?

    - by Pete Ashdown
    I normally do all my installs via PXE server, but I'm building a custom CD for kvm installs that are not on the same vlan as my PXE server. I would prefer this CD was as small as possible and it fetched packages from the network like netinstall mini.iso CD does, but netinstall doesn't mount /cdrom like the server install CD does. I need the cdrom for preseed. I've got my custom server install CD working, but it is still ~700MB. Trying to modify "dists/lucid/main/binary-amd64/Packages.gz" gives me no love as it complains that I've got a corrupt Packages.gz no matter what I do. I'd rather the preseeded mirror was used rather than CD once it gets the cdrom setup. Any ideas?

    Read the article

  • virt-manager not installing

    - by Registered User
    I am trying to install virt-manager on 11.10 on 64 bit machine sudo aptitude install virt-manager here is where it stopped the install Processing triggers for python-support ... Errors were encountered while processing: libvirt-bin E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up libvirt-bin (0.9.2-4ubuntu15) ... useradd: cannot lock /etc/passwd; try again later. adduser: `/usr/sbin/useradd -d /var/lib/libvirt -g kvm -s /bin/false -u 118 libvirt-qemu' returned error code 1. Exiting. dpkg: error processing libvirt-bin (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: libvirt-bin What should be done in this case to resolve it?

    Read the article

  • Upgraded to Ubuntu 12.04--keyboard & mouse no longer work--system down!

    - by Mackey Morgan
    I upgraded from Ubuntu 11 to 12.04, today, and everything seemed to go smoothly up to, and including the reboot. However, I now find that my mouse and keyboard no longer function, so I cannot login or otherwise use my computer. I have read other posts on this topic, but most of the answers seem to require the use of a keyboard to implement the solution--and I can't use my keyboard! I downloaded a 12.04 LiveCD and tried booting from it, but I have the same issue with that--no keyboard! My systems is a Lenovo with an AMD64 dual processor, and my keyboard and mouse are USB attached and shared with two other Windows PCs via a KVM switch (so I no the keyboard and mouse work!). I would appreciate some hints about how to make this PC usable, again. Thanks!

    Read the article

  • appearance incomplete

    - by user288986
    I'm using 14:04 which is pretty nice. Something wionders me: if I open a window (e.g. Ubuntu Software Centre) I can see SOME items (sometimes nothing) but by hovering the mouse over it it appears - and then disappears again. Sometimes the side mover acts the same way... Maybe it has to do with my hardware: P4, 3 GHz, 2 GB RAM, older graphics board, KVM-switch? There's no difference whether I use Gnome, Ubuntu standard, Ubuntu classic, Ubuntu fallback... Thanks for hints Jens

    Read the article

  • Binding TabControl ItemsSource to an ObservableCollection causes content to refresh on focus

    - by Brent
    I'm creating an WPF application using the MVVM framework, and I've adopted several features from Josh Smith's article on MVVM here... Most importantly, I'm binding a TabControl to an ObservableCollection of ViewModels. This means that am using a tabbed MDI interface that displays a UserControl as the content of a TabItem. The issue I'm seeing in my application is that when I have several tabs and I flip back and forth between tabs, the content is being refersh each time I change tabs. If you download Josh Smith's source code, you'll see that his app has the same problem. For example, click on the "View All Customers" button and scroll down to the bottom the ListView. Next click on the "Create New Customer" button. When you switch back to the All Customer view you'll notice that the ListView scrolls back to the top. If you switch back to the New Customer tab and place your cursor in one of the TextBoxes, then switch to All Customers tab and back, you'll notice that the cursor is now gone. I imagine that this is because I'm using an ObservableCollection, but I can't be sure. Is there any way to prevent the tab's content from refreshing when it receives the focus?

    Read the article

  • Strange options menu behavior in Android TabActivity

    - by jboxer
    I have a TabActivity with four tabs (each is its own Activity). Each tab defines its own onCreateOptionsMenu (and in some cases, onPrepareOptionsMenu). When each tab is loaded, an AsyncTask is kicked off to retrieve the data needed to populate that tab's list. If I switch between tabs very quickly (while they're still loading) and then press the menu button (while the current tab's AsyncApiTask is still running), I'm able to get the wrong options menu to appear. For example, let's say FooActivity (tab 1) has an options menu with a "Refresh" item, and BarActivity (tab 2) has an options menu with a "View All" item. If I start the app (with tab 1 active), quickly switch to tab 2, and then hit menu, the "Refresh" item (rather than the expected "View All" item) will sometimes show. Furthermore, while this weird behavior sometimes occurs just on the first menu press (and later presses show the right items), sometimes it gets "stuck", and the wrong items show up on every press until I switch tabs. Any idea what could be going on? I haven't heard of this happening before, and haven't been able to find any good suggestions.

    Read the article

  • monitoring iphone 3g/wifi bandswitch

    - by user262325
    Hello everyone I hope add the function to monitor iphone used 3g/wifi band switch. I know I can do these in my app, but I wonder if there is way to monitor all band switch usage of iPhone? I noticed that there is an app http://itunes.apple.com/ca/app/download-meter-for-wi-fi-gprs/id327227530?mt=8 It claims: Works with any carrier (iPods are supported too!). Requires no login/password to your carrier's site. Does not require Internet connection to get traffic usage statistics (works even in Airplane mode) because it gets information on traffic from the device, not a carrier; this means it won't cost you anything to view current traffic consumed, even while roaming in a location where traffic is very expensive. Allows the user to adjust consumed traffic for today or the current month to match traffic amounts reported by your carrier. Stats on the screen are updated every second. Measures traffic in real time with up to byte precision. Separates traffic into incoming and outgoing, Wi-Fi traffic and mobile Internet traffic. It looks like it gets the band switch info from carrier site, but they also said it gets info from device. I am really confused. Welcome any comment. Thanks interdev

    Read the article

  • jquery tab switching links so they jump to top of page?

    - by Evan
    I was given some great help by redsquare to get this far to change jquery tabs from links within the content, but I have one more issue that I'm looking for support on... When a user clicks a link to switch to a different tab from within the content, can i get the page to jump to the top of the page? Within my demo link, scroll to the bottom of the page to click the links and they switch tabs just perfectly, which you can confirm if you scroll up. So, I'm looking for the switch to also jump the user to the top of the page, so the user doesn't have to "scroll" to the top of the page to begin reading new content. Here's my demo: http://jsbin.com/etoku3/11 Existing code: <script type="text/javascript"> $(document).ready(function() { var $tabs = $("#container-1").tabs(); var changeTab = function(ev){ ev.preventDefault(); var tabIndex = this.hash.charAt(this.hash.length-1) -1; $tabs.tabs('select', tabIndex); }; $('a.tablink').click(changeTab); }); </script> Thank you so much! Evan

    Read the article

  • Question about 'git branching'

    - by michael
    Hi, I read this about git branch: http://book.git-scm.com/3_basic_branching_and_merging.html so I follow it and create 1 branch : experimental And I 1. switch to experimental branch (git checkout experimental) 2. make a bunch of changes 3. commit it (git commit -a) 4. switch to master branch (git checkout master) 5. make some changes and commit there 6. switch back to experimental (git checkout experimental) 7. merge master change to experimental (git merge master) 8. there are some conflicts but after I resolve them, I did 'git add myfile' And now i am stuck, I can't move back to master when I do $ git checkout master error: Entry 'res/layout/my_item.xml' would be overwritten by merge. Cannot merge. and I did: $ git rebase --abort No rebase in progress? and I did : $ git add res/layout/socialhub_list_item.xml $ git checkout master error: Entry 'res/layout/my_item.xml' would be overwritten by merge. Cannot merge. What can I do so that I can go back to my master branch? Thank you.

    Read the article

  • Testing background audio in the simulator

    - by Cactuar
    I'm experimenting with the new background audio service in iPhone OS 4.0 but I can't get it to work in the simulator. According to this page: iPhone Application Programming Guide: Executing Code in the Background it seems that all I have to do is add the a UIBackgroundModes key with an array containing audio to my Info.plist file and the audio my application plays should automatically continue when I switch to another app. I have done this but the audio still pauses as I switch to another app, when I switch back it continues where it left off. This is the code I'm using to play the sound: NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/audio.mp3", [[NSBundle mainBundle] resourcePath]]]; NSError *error; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]; audioPlayer.numberOfLoops = -1; if (audioPlayer == nil) NSLog(@"%@", [error userInfo]); else [audioPlayer play]; Has anyone gotten this to work? Could it be that it would work on an actual device and it's just a problem with the simulator? I'm a bit hesitant to install 4.0 on my phone since I've heard it's still very buggy. Wish I had another device to use only for development.

    Read the article

  • php - disconnecting and connecting to multiple databases

    - by Phil Jackson
    Hi, I want to be able to switch from the current db to multiple dbs though a loop: $query = mysql_query("SELECT * FROM `linkedin` ORDER BY id", $CON ) or die( mysql_error() ); if( mysql_num_rows( $query ) != 0 ) { $last_update = time() / 60; while( $rows = mysql_fetch_array( $query ) ) { $contacts_db = "NNJN_" . $rows['email']; // switch to the contacts db mysql_select_db( $contacts_db, $CON ); $query = mysql_query("SELECT * FROM `linkedin` WHERE token = '" . TOKEN . "'", $CON ) or die( mysql_error() ); if( mysql_num_rows( $query ) != 0 ) { mysql_query("UPDATE `linkedin` SET last_update = '{$last_update}' WHERE token = '" . TOKEN . "'", $CON ) or die( mysql_error() ); }else{ mysql_query("INSERT INTO `linkedin` (email, token, username, online, away, last_update) VALUES ('" . EMAIL . "', '" . TOKEN . "', '" . USERNAME . "', 'true', 'false', '$last_update')", $CON ) or die( mysql_error() ); } } mysql_free_result( $query ); } // switch back to your own mysql_select_db( USER_DB, $CON ); It does insert and update details from the other databases but it also inserts and edits data from the current users database which I dont want. Any ideas?

    Read the article

  • How to remove all ListBox items?

    - by Nano HE
    Hi, I created two RadioButton (Weight and Height). I will do switch between the two categories. But the they share the same ListBox Controllers (listBox1 and listBox2). Is there any good method to clear all the ListBox items simpler? I didn't find the removeAll() for ListBox. I don't like my complex multi-lines style which I posted here. private void Weight_Click(object sender, RoutedEventArgs e) { // switch between the radioButton "Weith" and "Height" // Clear all the items first listBox1.Items.Remove("foot"); listBox1.Items.Remove("inch"); listBox1.Items.Remove("meter"); listBox2.Items.Remove("foot"); listBox2.Items.Remove("inch"); listBox2.Items.Remove("meter"); // Add source units items for listBox1 listBox1.Items.Add("kilogram"); listBox1.Items.Add("pound"); // Add target units items for listBox2 listBox2.Items.Add("kilogram"); listBox2.Items.Add("pound"); } private void Height_Click(object sender, RoutedEventArgs e) { // switch between the radioButton "Weith" and "Height" // Clear all the items first listBox1.Items.Remove("kilogram"); listBox1.Items.Remove("pound"); listBox2.Items.Remove("kilogram"); listBox2.Items.Remove("pound"); // Add source units items for listBox1 listBox1.Items.Add("foot"); listBox1.Items.Add("inch"); listBox1.Items.Add("meter"); // Add target units items for listBox2 listBox2.Items.Add("foot"); listBox2.Items.Add("inch"); listBox2.Items.Add("meter"); }

    Read the article

< Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >