Search Results

Search found 9410 results on 377 pages for 'simulator difference'.

Page 92/377 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • casting vs using the 'as' keyword in the CLR

    - by Frank V
    I'm learning about design patterns and because of that I've ended using a lot of interfaces. One of my "goals" is to program to an interface, not an implementation. What I've found is that I'm doing a lot of casting or object type conversion. What I'd like to know is if there is a difference between these two methods of conversion: public interface IMyInterface { void AMethod(); } public class MyClass : IMyInterface { public void AMethod() { //Do work } // other helper methods.... } public class Implementation { IMyInterface _MyObj; MyClass _myCls1; MyClass _myCls2; public Implementation() { _MyObj = new MyClass(); // What is the difference here: _myCls1 = (MyClass)_MyObj; _myCls2 = (_MyObj as MyClass); } } If there is a difference, is there a cost difference or how does this affect my program? Hopefully this makes sense. Sorry for the bad example; it is all I could think of... Update: What is "in general" the preferred method? (I had a question similar to this posted in the 'answers'. I moved it up here at the suggestion of Michael Haren. Also, I want to thank everyone who's provided insight and perspective on my question.

    Read the article

  • Algorithm: Find smallest subset containing K 0's

    - by Vishal
    I have array of 1's and 0's only. Now I want to find contiguous subset/subarray which contains at least K 0's. Example Array is 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 and K(6) should be 0 0 1 0 1 1 0 0 0 or 0 0 0 0 1 0 1 1 0.... My Solution Array: 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 Index: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Sum: 1 2 2 3 4 4 5 6 6 6 6 6 7 7 8 9 9 9 9 10 11 11 11 Diff(I-S): 0 0 1 1 1 2 2 2 3 4 5 6 6 7 7 7 8 9 10 10 10 11 12 For K(6) Start with 9-15 = Store difference in diff. Next increase difference 8-15(Difference in index) 8-14(Compare Difference in index) So on keep moving to find element with least elements... I am looking for better algorithm for this solution.

    Read the article

  • Overhead of TLS/SSL on a TCP socket connection?

    - by TK Kocheran
    Is there any bandwidth overhead on using SSL on a TCP connection? I understand, of course, the processing/memory usage overhead in encrypting and decrypting packets, but as far as bandwidth is concerned, what is the difference, if any? For example, given a XML file which is 64KB, will there be any tangible difference in the transfer size of the file over HTTP vs. HTTPS? (Ignoring mod_deflate and mod_gzip, of course)

    Read the article

  • Windows Backup (2008 R2) recovery and timezone

    - by GrZeCh
    Hello, does difference between timezones on Windows Server 2008 where backup was made and reovery console makes difference? Recovery console (wbadmin from command line too) is not finding any backup on local hard drive connected to server. Thanks EDIT: I'm working on Windows Server 2008 R2 EDIT2: This is not related to timezone. When I connected backup hard drive from Windows 2008 R2 Release Candidate recovery console runned from RTM system version DVD found stored backups from it without problems.

    Read the article

  • Is special memory required for a MacBook Pro ?

    - by user38900
    I have a MacBook Pro (MacBookPro5,2 / 2.8 GHz) with 4 GB of ram (2x2GB). I'm looking to upgrade to 8GB. The memory in it now is DDR3 PC3-8500 1067. Checking out prices for 4 GB sticks of PC3-8500 there is about $100 difference for "apple certified" ram. Will any DDR3 PC3-8500 module work or is there really a difference?

    Read the article

  • Bash or Zsh - which one and why?

    - by Andrew
    So, the question pretty much says it all. I'm on Snow Leopard, and I do a lot of web development, particularly in Rails 3 which makes heavy use of the console. I've seen some notable bloggers etc. mention Zsh as their preference over Bash, but I don't know what difference it would make. Could anyone give me a good comparison of what difference there is and what might make one prefer one option or the other? Thanks!

    Read the article

  • Apache mod_proxy vs mod_rewrite

    - by Scott
    What is the difference between using mod_proxy and mod_rewrite? I have a requirement to send certain url patterns through the tomcat, which runs on the same host but under port 8080. I know this is something for mod_proxy, but I"m wondering why I can't just use mod_rewrite, or what the difference is? Probably has to do w/ reverse proxy, and also when in the pipeline it gets handled? Thanks.

    Read the article

  • Malware vs Viruses

    - by Kyle Brandt
    Is there a legitimate technical difference between malware and viruses? I have looked at the Wikipedia entries but I am not really seeing the difference. Currently, I kind of feel like this is just Symantec's way of getting more money for products (features). But maybe someone involved more deeply in this area can explain this.

    Read the article

  • Which type of motherboard i should by and why?

    - by metal gear solid
    If budged is not matter. I just need best performance with less power consumption. I can purchase any cabinet , power supply and Motherboard. Is Power supply has any relation with Form factor? Is the size of motherboard and number of Slots only difference between all form factors? Is there any difference related to performance of motherboard? Is bigger in Size (ATX) motherboard always better?

    Read the article

  • Xcode duplicate symbol _main .

    - by Prithvi Raj
    I'm getting the following error in Xcode 3.2.1 on Snow Leopard 10.6.2 whenever I try to compile any iPhone application generated by Appcelerator's Titanium . However , the build error only appears when I select iPhone simulator on the architecture menu , and if I select iPhone device , I am able to run the app on my device . Further , the iPhone simulator launches successfully and executes the program directly from the Titanium environment , which uses Xcode to build . Why is this happening ? ld: duplicate symbol _main in Resources/libTitanium.a(main.o) and /Users/prithviraj/Documents/project/Final/build/iphone/build/Final.build/Debug-iphonesimulator/Final.build/Objects-normal/i386/main.o collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

    Read the article

  • Resizing an image with stretchableImageWithLeftCapWidth

    - by Stephan Burlot
    I'm trying to resize an image using stretchableImageWithLeftCapWidth: it works on the simulator, but on the device, vertical green bars appears. I've tried to use imageNamed, imageWithContentOfFile and imageWithData lo load the image, it doesnt change. UIImage *bottomImage = [[UIImage imageWithData: [NSData dataWithContentsOfFile: [NSString stringWithFormat:@"%@/bottom_part.png", [[NSBundle mainBundle] resourcePath]]]] stretchableImageWithLeftCapWidth:27 topCapHeight:9]; UIImageView *bottomView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 200+73, 100, 73)]; [self.view addSubview:bottomView]; UIGraphicsBeginImageContext(CGSizeMake(100, 73)); [bottomImage drawInRect:CGRectMake(0, 0, 100, 73)]; UIImage *bottomResizedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); bottomView.image = bottomResizedImage; See the result: the green bars shouldn't be there, they dont appear on the simulator.

    Read the article

  • Problems with video playback in iPad.

    - by Leg10n
    I'm trying to implement a MPMoviePlayerView but I can't play the video files, I don't have a device yet to try it on, now I'm testing with simulator, I don't know if this is the cause. So far I've been able to present the view and it shows the first frame of the video, but if I click play, it doesn't play I can move the progress bar and it shows the images, but there's no movement, it stays still. Has anyone experienced something like this? The code of my UIViewController goes like this: NSURL *movieURL=[NSURL fileURLWithPath:@"video.mp4"]; MPMoviePlayerViewController *playerView=[[MPMoviePlayerViewController alloc] initWithContentURL:movieURL]; [self presentMoviePlayerViewControllerAnimated:playerView]; As I said, it shows up, I can move the progress bar back and forth, I see a still image, but no movement. Am I missing something here? or is it the simulator? Thank you

    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

  • networkActivityIndicatorVisible on iOS 4

    - by user365660
    Hi, I just downloaded xcode 3.2.3 (seperate directory installation) and ios 4 to my iphone. I'm having a problem with networkActivityIndicatorVisible. This works on 3.1.3, both phone and simulator. My code is (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIApplication* app2 = [UIApplication sharedApplication]; app2.networkActivityIndicatorVisible = YES; [self loadSources]; // Loads data in table view app2.networkActivityIndicatorVisible = NO; } I get the same effect in the simulator and on the phone both with ios 4.o The networkActivity indicator becomes visible for a fraction of a second and then invisible and this is done after loading the data for the tableView. Has something changed with this? Teo

    Read the article

  • Java: notify() vs. notifyAll() all over again

    - by Sergey Mikhanov
    If one google for "difference between notify() and notifyAll()" then a lot of explanations will pop up (leaving apart the javadoc paragraphs). It all boils down to the number of waiting threads being waken up: one in notify() and all in notifyAll(). However (if I do understand the difference between these methods right), only one thread is always selected for further monitor acquisition; in the first case the one selected by the VM, in the second case the one selected by the system thread scheduler. The exact selection procedures for both of them (in general case) are not known to the programmer. What's is the useful difference between notify() and notifyAll() then? Am I missing something?

    Read the article

  • UITabBar in iPad - Won't go into landscape mode with more than 2 items

    - by Sam Diaz
    I created a new project and selected the Tab Bar template for iPad. I opened it up in Interface Builder and added 4 more items, bringing the total items to 6. I did a build and run and it opened up fine in the iPad simulator, but it wouldn't go into landscape! I then backtracked in interface builder and found that it would go landscape if there were only 2 items in the tab bar, but not if there were any more. The simulator rotates but all the content (currently just the placeholders put in place by Apple) stays as if it was portrait. Any ideas why?

    Read the article

  • Categories in static library for iPhone device 3.0

    - by Nick
    I have categories in my static library. Any application developer should set -ObjC flag to "Other Linker Flags" to use my static library properly. It works fine for iPhone device/iPhone Simulator 2.x and iPhone Simulator 3.0. But it crashes for iPhone device 3.0. As written in this article it is new linker bug. They suggest to use one more linker flag: -all_load. But when I add this flag, build fails too, because there are duplicate symbols. How to use categories in static libraries for iPhone device 3.0? Any suggestions?

    Read the article

  • Universal iPhone/iPad application debug compilation error for iPhone testing

    - by andybee
    I have written an iPhone and iPad universal app which runs fine in the iPad simulator on Xcode, but I would now like to test the iPhone functionality. I seem unable to run the iPhone simulator with this code as it always defaults to the iPad? Instead I tried to run on the device and as it begins to run I get the following error: dyld: Symbol not found: _OBJC_CLASS_$_UISplitViewController Referenced from: /var/mobile/Applications/9770ACFA-0B88-41D4-AF56-77B66B324640/Test.app/Test Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications/9770ACFA-0B88-41D4-AF56-77B66B324640/Test.app/TEST As the App is built programmatically rather than using XIB's, I've split the 2 device logics using the following lines in the main.m method: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate_Pad"); } else { retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate_Phone"); } From that point forth they use different AppDelegates and I've checked my headers to ensure the UISplitView is never used nor imported via the Phone logic. How do I avoid this error and is there a better way to split the universal logic paths in this programmatically-created app?

    Read the article

  • .NET command line argument bug?

    - by Tomas
    Hello, I am trying to read command lien argument but it seems there is some kind of bug in .NET. The parameter which I pass to my console application /i "C:\Projects\PC\trunk\Simulator\PDF-Source\PDF-Source\bin\Debug\ConversionFiles\dummy.pdf" /o "result" CommandLine variable return three arguments, but I pass four and values of these arguments messed up. /i = true "C:\Projects\PC\trunk\Simulator\PDF-Source\PDF-Source\bin\Debug\ConversionFiles\dummy.pdf" = true /o = "result" As you see only the last argument is parsed corectlly. Is this bug? regards, Tomas My code static void Main(string[] args) { Arguments CommandLine = new Arguments(args);

    Read the article

  • XCode toolchain error: dyld: Symbol not found: _objc_collect_if_needed

    - by freespace
    I have been seeing the following error message a lot whenever I build something using the simulator: dyld: Symbol not found: _objc_collect_if_needed Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation Expected in: /usr/lib/libobjc.A.dylib in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation I am running XCode 3.2.2 on OS X 10.6.3, and have reinstalled the SDK twice with no avail. This error makes running any code on the simulator something of a Russian Roulette, but with 5 out of 6 chambers loaded. I have checked the files mentioned in the error message, and they all checkout as being present. This sometimes go away if I restart XCode. Other times I have to logout, or even restart. And sometimes nothing works. I have googled this, even tried apple's developer forums. Other than a reference to this in the MonoTouch list, this bug appears to be completely unknown otherwise. Anything help would be greatly appreciated - this is a real PITA. Cheers, Steve

    Read the article

  • iPhone image distortion

    - by Corey Floyd
    Are there any reasons why the simulator will display UIImageViews properly, but incorrectly on the iPhone? My Process: An image in a PNG file Start a UIGraphicsBeginImageContext() Draw the PNG in a CGrect Draw text in the CGRect Create an UIImage from the context Set the image of a UIImaveView to the UIImage Set the frame of the UIImageView to the size of the PNG Add as a subview Outcome: The image does not display correctly. The rightmost 1-3 pixels of the image is just a vertical white line. This occurs only on the device and not on the simulator. I can fix the problem, but only by increasing the size of the UIImageView. If I increase the size.height of the UIImageView by 1 pixel, it displays the UIImage correctly. Of course, these leaves the iPhone to scale my image before drawing it on screen which is not desirable. Any ideas why this occurs or any fixes for it? (I will post my code if needed)

    Read the article

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