Search Results

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

Page 90/347 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • EHsc vc EHa (synchronous vs asynchronous exception handling)

    - by watson1180
    Could you give a bullet list of practical differences/implication? I read relevant MSDN article, but my understanding asynchronous exceptions is still a bit hazy. I am writing a test suite using Boost.Test and my compiler emits a warning that EHa should be enabled: warning C4535: calling _set_se_translator() requires /EHa The project itself uses only plain exceptions (from STL) and doesn't need /EHa switch. Do I have to recompile it with /EHa switch to make the test suite work properly? My feeling is that I need /EHa for the test suit only. Thank you and happy new year.

    Read the article

  • How can I get a fixed-position menu like slashdot's comment filtration menu

    - by pkaeding
    Slashdot has a little widget that allows you to tweak your comment threshold to filter out down-modded comments. It will be in one place if you scroll to the top of the page, and as you scroll down, at some point, where its original home is about to scroll off the page, it will switch to fixed position, and stay on your screen. (To see an example, click here.) My question is, how can I accomplish the same effect of having a menu be in one place when scrolled up, and switch to fixed position as the user scrolls down? I know this will involve a combination of CSS and javascript. I'm not necessarily looking for a full example of working code, but what steps will my code need to go through?

    Read the article

  • Multi-process builds in Visual Studio 2010: Worth it?

    - by coryr
    I've started testing our C++ software with VS2010 and the build times are really bad (30-45 minutes, about double the VS2005 times). I've been reading about the /MP switch for multi-process compilation. Unfortunately, it is incompatible with some features that we use quite a bit like #import, incremental compilation, and precompiled headers. Have you had a similar project where you tried the /MP switch after turning off things like precompiled headers? Did you get faster builds? My machine is running 64-bit Windows 7 on a 4 core machine with 4 GB of RAM and a fast SSD storage. Virus scanner disabled and a pretty minimal software environment.

    Read the article

  • MATLAB submatrix over variable dimensions

    - by rlbond
    I have a variable dimension matrix, X. I want a function that will get the first half of X in one dimension. I.E., I want something like this: function x = variableSubmatrix(x, d) if d == 1 switch ndims(x) case 1 x = x(1:end/2); case 2 x = x(1:end/2, :); case 3 x = x(1:end/2, :, :); (...) end elseif d == 2 switch ndims(x) case 2 x = x(:, 1:end/2); case 3 x = x(:, 1:end/2, :); (...) end elseif (...) end end I'm not quite sure how to do this. I need it to be fast, as this will be used many times in computation.

    Read the article

  • C2360 compiler error on TFS build, but not on desktop

    - by pdmaguire
    A c++ code snippet similar to the code below caused our TFS build to fail with a C2360 compiler error. switch (i) { case 0 : for each (int n in a) System::Console::WriteLine(n.ToString()); break; case 1 : System::Console::WriteLine("n is not in scope here"); break; } This is fixed by using {} brackets within the body of case 0, as below: switch (i) { case 0 : { for each (int n in a) System::Console::WriteLine(n.ToString()); } break; case 1 : System::Console::WriteLine("n is not in scope here"); break; } The developer had successfully compiled the code on their desktop before committing the changes. A cursory look at versions of things like compilers, Visual Studio etc on the server and desktop suggest they are the same. The source code is the same, obviously. What is the difference between a desktop build and TFS build that would smother a compiler error like this?

    Read the article

  • Implementing Multitasking on an iPhone/iOS4 Web App

    - by Peter Watts
    I am looking to build a web app that implements background audio and fast app switching. These features work out of the box, when run as regular Safari web pages, but as soon as you add the web-app-capable tag, and try to run in full screen mode, this functionality breaks. I did some testing and even the most basic web app will reload every time when you switch back to it. And seeing as it's a web app, we can't exactly implement the multitasking API. Has anyone found a work around? This isn't a deal-breaker, as you can just avoid full screen mode, but then you also lose the ability to use your own icon in the app switch tray. Perhaps this explains a lack of full screen mode in YouTube's new web app....

    Read the article

  • Learn C# now or finish up with Java and then learn C#?

    - by Sahat
    Ok here is my situation. I've studied Java in my college for 2 semesters. But you know they teach you jack in there, just the basics. We skipped half of our textbook and even then our professors don't teach from section to section of each chapter. I don't blame them. It's hard as it is for new students to understand even the basic concepts of programming. Now this is a community college we are talking about and not Stanford, MIT or Berkeley. So like I said I've done 2 semester of Java. I really like our textbook because it has some challenging projects to do at the end of each chapter. This textbook is pretty clear and i have no problem understanding it (although 2-D and 3-D Arrays have given me some trouble). I have tried reading a few C# books such as Pro C# 2008 and .NET 3.5 and C# 4.0 in a Nutshell. I found these books to be dry and overloaded with information that put me to sleep (No offense to the authors of those 2 wonderful, according to amazon ratings, books). Would you suggest I finish my Java textbook, brush up my knowledge of Arrays, Polymorphism, and etc that are universal to most programming languages. And then switch to C#, plus the syntax is very similar so it should be easy to switch. Or should I just start learning C# right now from the very beginning? If it's the latter then could you recommend some free online resources that will keep me engaged and at the same time teach me everything I need to know about C#. Someone has recommended me to learn .NET first, but I found it to be not the brightest idea. .NET is just a big monster full of libraries. How am I going to apply it if I don't even know the C# or VB!? Anyway back to my question: Master Java and switch to C# or just go with C#? DISCLAIMER: I don't want to start .NET vs J2EE or C# vs Java flame war. I am going with C#. I've decided that I want to work in a Microsoft shop in the future. .NET is what I want to learn. Thanks! Will be waiting for the answers.

    Read the article

  • open iphone Mail from Actionsheet..

    - by totato
    hi .. I want to open Mail app from my app when the one button in actionsheet is pressed, I know this way : -(IBAtion)openClick:(id)sender { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:[email protected]”]]; } but can I write this method inside if statement or switch case?(in ControlView class NOT NSObject class , because I use actionsheet for this propose) like this: - (void)actionSheet:(UIActionSheet *)modalView clickedButtonAtIndex:(NSInteger)buttonIndex { switch (buttonIndex) { case 0: { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:[email protected]”]]; break; } I can't test my code because simulator doesn't have the Mail app.. So I need to know is this will work in controlView or must write it in NSObject class ? + seconde question : I want to open Mail app from my app and copy the content in the view to mail body,then the user choice the contact from his contacts list ! Is this way achieve my goal?

    Read the article

  • Better way to write this Java code?

    - by Macha
    public void handleParsedCommand(String[] commandArr) { if(commandArr[0].equalsIgnoreCase("message")) { int target = Integer.parseInt(commandArr[1]); String message = commandArr[2]; MachatServer.sendMessage(target, this.conId, message); } else if(commandArr[0].equalsIgnoreCase("quit")) { // Tell the server to disconnect us. MachatServer.disconnect(conId); } else if(commandArr[0].equalsIgnoreCase("confirmconnect")) { // Blah blah and so on for another 10 types of command } else { try { out.write("Unknown: " + commandArr[0] + "\n"); } catch (IOException e) { System.out.println("Failed output warning of unknown command."); } } } I have this part of my server code for handling the types of messages. Each message contains the type in commandArr[0] and the parameters in the rest of commandArr[]. However, this current code, while working seems very unelegant. Is there a better way to handle it? (To the best of my knowledge, String values can't be used in switch statements, and even then, a switch statement would only be a small improvement.

    Read the article

  • buffer overflow with boost::program_options

    - by f4
    Hello, I have a problem using boost:program_options this simple program, copy-pasted from boosts' documentation : #include <boost/program_options.hpp> int main( int argc, char** argv ) { namespace po = boost::program_options; po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("compression", po::value<int>(), "set compression level") ; return 0; } fails with a buffer overflow. I have activated the "buffer security switch", and when I run it I get an "unknown exception (0xc0000409)" when I step over the line desc.add_options()... I use Visual Studio 2005 and boost 1.43.0. By the way it does run if I deactivate the switch but I don't feel comfortable doing so... unless it's possible to deactivate it locally. So do you have a solution to this problem? EDIT I found the problem I was linking against libboost_program_options-vc80-mt.lib which wasn't the good library.

    Read the article

  • Javascript - Determine if String Is In List

    - by Emtucifor
    In SQL we can see if a string is in a list like so: Column IN ('a', 'b', 'c') What's a good way to do this in javascript? I realize one can use the switch function: var str = 'a' var flag = false; switch (str) { case 'a': case 'b': case 'c': flag = true; default: } if (thisthing || thatthing || flag === true) { // do something } But this is a horrible mess. It's also clunky to do this: if (thisthing || thatthing || str === 'a' || str === 'b' || str = 'c') { // do something } And I'm not sure about the performance or clarity of this: if (thisthing || thatthing || {a:1, b:1, c:1}[str]) { // do something } Any ideas?

    Read the article

  • How do I change the UIView programmatically?

    - by user317834
    I have created View A and View B. My window has View A displayed on the screen. I also have a UIButton on View A. I want to switch from View A to View B when I click on the Button. I am not using any UIViewController. Is it possible to switch the views without using controller? I am calling buttonAction method on TOUCHUPINSIDE The problem is that it doesn't do anything when I say [ViewA removeFromSuperView]; What should I do now?

    Read the article

  • Is it possible to use multi keyboards with multi keyboard layouts simultaneously?

    - by mono
    Considering to switch to dvorak layout, but this terminal is used by multi users as the same user account. It is unacceptable to ask all people to switch layout, plus it is hard to use dvorak layout with a keyboard qwerty-ly labeled. But there are spare (USB,qwerty) keyboards, so if I plug another keyboard in and be able to use multi layouts on different psyical keyboard simultaneously (I will rearrange letters on keys), the problem get solved. solution for either windows or linux is fine. anyway thanks all.

    Read the article

  • Switching Javascript Function states

    - by webzide
    Dear experts, I would like to implement a API of Javascript that sort of resemble a light switch. For instance, there are two buttons on the actual HTML page act as the UI. Both of the buttons have event handlers that invokes a different function. Each function have codes that act like a state, for instance. button1.onclick=function (){ $("div").click( //code effects 2 ) } button2.onclick=function (){ $("div").click( //Code effects 2 ) } I the code works fine on the surface but the 2 state functions overlap. the effects is going to take place for the rest of the way until the next reload of the document. Basically what I want to achieve is that when 1 button is clicked, it will switch "OFF" the state of function invoked by the other button and vice versa. Thus, the effects achieved are unique are not overlapped. Is there anyway to achieve this or could any experts point me to the right direction. Thanks in advance.

    Read the article

  • iPhone Application: force landscape mode, strange behaviour...?

    - by David Lawson
    This is a method I use to switch display views, based on a string passed (for example you could pass MainMenuViewController to switch views to a new instance of that class): - (void)displayView:(NSString *)newView { NSLog(@"%@", newView); [[currentView view] removeFromSuperview]; [currentView release]; UIViewController *newView = [[NSClassFromString(newView) alloc] init]; [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; [self setCurrentView:newView]; [[self view] addSubview:[currentView view]]; } I have my application forced into landscape view (.plist and -shouldRotate), but if you look in the code: [[newView view] setFrame:CGRectMake(0, 0, 320, 460)]; I have to set the frame of the newView to a portrait frame for the view to be displayed correctly - otherwise, for example, a button on the new view can only be pressed in certain parts of the screen (rectangle up the top), unresponsive anywhere else. Even though in all my NIB files they are set to landscape.

    Read the article

  • OutOfMemory exception as I rotating the emulator.

    - by michael
    I get the following OutOfMemory Error as I rotating my android emulator. I start with Portrait mode. I switch to Landscape mode. And then when I switch back to Portrait mode, I get the following error: E/AndroidRuntime( 239): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 239): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 239): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 239): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 239): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 239): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 239): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 239): at android.content.res.Resources.loadDrawable(Resources.java:1705) E/AndroidRuntime( 239): at android.content.res.Resources.getDrawable(Resources.java:580)

    Read the article

  • Switching layouts page jumping (improvement to script)

    - by Ricardo Zea
    Hello, I'm using this script to switch layouts in a page: $("span.switcher").click(function () { $("span.switcher").toggleClass("swap"); /*!*/ $("ol.search-results").fadeOut("fast", function() { $(this).fadeIn("fast").toggleClass("grid"); }); The script works fine, the problem I have is that if the switch view is down the page, the layout changes and then the page jumps back up. If I add 'return false' right where you see the /* ! */ in the second line the script doesn't work. Also, as you can see, I'm using < span instead of < a since I was told that using other element other than < a would stop the page from jumping. Any idea how to fix the jumping of the page? Thanks.

    Read the article

  • Android return to the original position of the view after MotionEvent

    - by Kurty
    My application currently changes to another random int (View) when I let go of it (ACTION_UP) but the view stays in the same spot where I dropped it. I want it to return to the original location (the middle of the screen) when I drop it so I can repeat the process. // OnTouch and MotionEvent OnTouchListener dragt = new OnTouchListener() { public boolean onTouch(View v, MotionEvent me) { FrameLayout.LayoutParams par = (FrameLayout.LayoutParams) v.getLayoutParams(); switch (v.getId()) { case R.id.randomView: } switch(me.getAction()) { case MotionEvent.ACTION_MOVE: par.gravity = 0; par.setMargins((int)me.getRawX() - (v.getWidth())/2, (int)me.getRawY() - (v.getHeight())/2, 0, 0); v.setLayoutParams(par); break; case MotionEvent.ACTION_UP: // tallies score. score++; textScore.setText(String.valueOf(score)); // this generates the new view but the location is still the same color.setImageResource(mImageIds[rgenerator.nextInt(mImageIds.length)]); break; } return true; } };

    Read the article

  • Switching between TabBarController Views when event fired

    - by aahrens
    I have a UITabBarController with two different views to switch between. What I would like to do is when a button is clicked in View1 to switch directly to View2. Then in View2 if they click a button it switches them to View1. It transfers between View1 and View2 when the click on the tabBarController fine but I'm trying to perform the switching for them when an event occurs Is there a way to do this by calling a method on my UITabBarController? @interface CalcAppDelegate : NSObject <UIApplicationDelegate> { UITabBarController *tabBarController; }

    Read the article

  • Starting mongrel with a custom command line argument

    - by whaka
    I would like to be able to start a mongrel or webrick server by passing an extra command line argument that I can read somewhere inside my rails application. An example would be: ruby script/server -p3000 --target=FOO Here, --target is a custom switch who's value I would like to intercept in my rails application. However, this yields the error: server: invalid option: --target=FOO I found mongrel documentation which mentions a -C (--config=PATH) argument specifying a full path to a yml configuration file, but specifying that switch gives the same error as above. I presume this option is deprecated. Is there another way to accomplish this?

    Read the article

  • What segments does C compiled program use?

    - by b-gen-jack-o-neill
    Hi, I read on OSDev wiki, that protected mode of x86 architecture allow you to create separate segments for code and data, while you cannot write into code section. That Windows (yes, this is the platform) loads new code into code segment, and data are created on data segment. But, if this is the case, how does program know it must switch segments to the data segment? Becouse if I understand it right, all adress instructions point to the segment you run the code from, unless you switch the descriptor. But I also read, that so colled flat memory model allows you to run code and data within one segment. But I read this only in connection to assembler. So, please, what is the case with C compiled code on Windows? Thanks.

    Read the article

  • android: ListView.setAdapter() is causing IllegalStateException. Not sure how to fix it.

    - by Stev0
    I'm trying to populate a listview with the contents of various ListAdapters based upon the results of a switch statement nested in an OnItemClickListener. When clicking the item, the application was force closing, so I ran it through the dev tools and android debugger. Eclipse is showing me the in the main thread that the application has suspended due an IllegalStateException. I have a marginal understanding of what the particular exception indicates, but not sure how to fix it, or what in my code is causing it to be thrown. Code as follows: final ListView lv = (ListView) findViewById(R.id.main_list); final String[] autos = getResources().getStringArray(R.array.auto_array); final ListAdapter la_auto = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_2, autos); And then further down in the portion dealing with the onclicklistener gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { switch(gallery.getSelectedItemPosition()) { case 0: lv.setAdapter(la_auto); break;

    Read the article

  • Dynamically Creating Flex Components In ActionScript

    - by Joshua
    Isn't there some way to re-write the following code, such that I don't need a gigantic switch statement with every conceivable type? Also, if I can replace the switch statement with some way to dynamically create new controls, then I can make the code smaller, more direct, and don't have to anticipate the possibility of custom control types. Before: <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ import mx.containers.HBox; import mx.controls.Button; import mx.controls.Label; public function CreateControl(event:Event):void { var Type:String=Edit.text; var NewControl:Object; switch (Type) { case 'mx.controls::Label':NewControl=new Label();break; case 'mx.controls::Button':NewControl=new Button();break; case 'mx.containers::HBox':NewControl=new HBox();break; ... every other type, including unforeseeable custom types } this.addChild(NewControl as DisplayObject); } ]]> </mx:Script> <mx:Label text="Control Type"/> <mx:TextInput id="Edit"/> <mx:Button label="Create" click="CreateControl(event);"/> </mx:WindowedApplication> AFTER: <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ import mx.containers.HBox; import mx.controls.Button; import mx.controls.Label; public function CreateControl(event:Event):void { var Type:String=Edit.text; var NewControl:Object= *???*(Type); this.addChild(NewControl as DisplayObject); } ]]> </mx:Script> <mx:Label text="Control Type"/> <mx:TextInput id="Edit"/> <mx:Button label="Create" click="CreateControl(event);"/> </mx:WindowedApplication>

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >