Search Results

Search found 4242 results on 170 pages for 'mark szymanski'.

Page 17/170 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • iPhone app throwing EXC_BAD_ACCESS with dictionary from contents of file

    - by Mark Szymanski
    I have the code NSArray *paths = [[NSArray alloc] initWithArray:NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)]; NSString *docsDirectory = [[NSString alloc] initWithString:[paths objectAtIndex:0]]; NSLog(@"This app's documents directory: %@",docsDirectory); NSString *docsDirectoryWithPlist = [[NSString alloc] initWithFormat:@"%@/Stuff.plist", docsDirectory]; BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:docsDirectoryWithPlist isDirectory:NO]; if (fileExists) { chdir([docsDirectory UTF8String]); NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"Stuff.plist"]; in an application's applicationDidFinishLaunching method and whenever it gets to the last line it crashes, throwing EXC_BAD_ACCESS along the way. Thanks in advance!

    Read the article

  • Write Java objects to file

    - by Mark Szymanski
    Is it possible to write objects in Java to a binary file? The objects I want to write would be 2 arrays of String objects. The reason I want to do this is to save persistent data. If there is some easier way to do this let me know. Thanks in advance!

    Read the article

  • Lightbox close and loading images not showing

    - by Mark Szymanski
    I am using Lightbox 2 and I have followed the short tutorial on how to insert it in a webpage and it works perfectly but the close and refresh images don't show. They are replaced with the classic Mac OS X '?' box. I have checked the paths of these images in the lightbox.js file and they are correct. Thanks in advance!

    Read the article

  • Check whether server is up in AppleScript

    - by Mark Szymanski
    I have an intranet server running on a Windows XP computer and the internet connection on it has been known to be pretty unreliable (surprise, surprise) so I was wondering if there was a way to use an AppleScript to poll it every hour or so to see if it is up and running and if it isn't, execute something, like send myself an email. Thanks in advance!

    Read the article

  • What coding standards do you follow?

    - by Mark Szymanski
    I was just curious what coding standards people followed. I for one use the following: Brackets ALWAYS go on the next line. For instance: int main() { //Blah... } I never use code folding. (Yes my IDE's do support it (Xcode and Eclipse). Put related functions/methods single-spaced, otherwise double space. Here is an example: int foo = 0; printf("%d",foo); those are related while these are not: printf("Hello, World!"); return(0); I don't put else statements on the same line as the closing bracket for the preceding if statement. Most of the time in Java if a program needs multiple try catch statements I will just put the whole thing in one try catch.

    Read the article

  • iPhone Tab Bar application crash

    - by Mark Szymanski
    I have an application that uses a tab bar and whenever it launches it crashes and gives me the following error and stack trace: 2010-04-22 16:15:03.390 iCrushCans[59858:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIWindow 0x3e051a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key rootViewController.' 2010-04-22 16:15:03.392 iCrushCans[59858:207] Stack: ( 29680731, 2425423113, 29839809, 305768, 304309, 2957847, 4641908, 29583663, 4636459, 4644727, 2805842, 2844630, 2833204, 2815615, 2842721, 37776729, 29465472, 29461576, 2809365, 2846639 ) Thanks in advance!

    Read the article

  • Measure time in minutes in C

    - by Mark Szymanski
    I am writing a program that will need to measure time in minutes. To be exact, it will wait 10 minutes, execute some code, wait 2 minutes, execute more code and repeat this 5 times (anyone guess what I'm trying to do?) and I am wondering how to do the breaks. Thanks in advance! Oh, and by the way, I'm on Mac.

    Read the article

  • Why is my app delegate's didFinishLaunchingWithOptions method all of sudden being called AFTER my Ro

    - by BeachRunnerJoe
    Hi. I've been playing with the iPad's SplitView template in Xcode. Here are two of the many important methods that are auto-generated for you by the Split View-based Application template... AppNameAppDelegate.m #pragma mark - #pragma mark Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch rootViewController.managedObjectContext = self.managedObjectContext; // Add the split view controller's view to the window and display. [window addSubview:splitViewController.view]; [window makeKeyAndVisible]; return YES; } RootViewController.m #pragma mark - #pragma mark View lifecycle - (void)viewDidLoad { [super viewDidLoad]; self.clearsSelectionOnViewWillAppear = NO; self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0); NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } When you build and run the project before making any changes at all, the application:didFinishLaunchingWithOptions method is called before the RootViewController:viewDidLoad method is called. I'm new to iPhone development, but I'm assuming this is the correct and typical sequence. However, as soon as I changed the RootViewController code and set it as a subclass of UIViewController (instead of UITableViewController by default), and made the respective adjustments in Interface Builder, suddenly the RootViewController:viewDidLoad is being called before the application:didFinishLaunchingWithOptions method. I need to get it back to the way it was working before because, as you can see in the code, the viewDidLoad method depends on didFinishLauchingWithOptions method to execute so it can set the rootViewController's managedObjectContext that it uses to perform the fetch request. Any ideas what caused this? Any ideas how I can fix this? Thanks so much in advance for your help! I'm gonna keep researching and playing with the code.

    Read the article

  • GC output clarification

    - by elec
    I'm running a java application with the following settings: -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution I'm not sure how to interpret the related gc logs(below). In particular: Heap after GC invocations=31 (full 3): does this mean there were 31 minor GCs, and 3 full GCs ? What triggers the several consecutive lines of Total time for which the application threads were stopped and Application Time ? Is it possible to get the time stamps associated with each of these lines ? GC logs: Total time for which application threads were stopped: 0.0046910 seconds Application time: 0.7946670 seconds Total time for which application threads were stopped: 0.0002900 seconds Application time: 1.0153640 seconds Total time for which application threads were stopped: 0.0002780 seconds Application time: 1.0161890 seconds Total time for which application threads were stopped: 0.0002760 seconds Application time: 1.0145990 seconds Total time for which application threads were stopped: 0.0002950 seconds Application time: 0.9999800 seconds Total time for which application threads were stopped: 0.0002770 seconds Application time: 1.0151640 seconds Total time for which application threads were stopped: 0.0002730 seconds Application time: 0.9996590 seconds Total time for which application threads were stopped: 0.0002880 seconds Application time: 0.9624290 seconds {Heap before GC invocations=30 (full 3): par new generation total 131008K, used 130944K [0x00000000eac00000, 0x00000000f2c00000, 0x00000000f2c00000) eden space 130944K, 100% used [0x00000000eac00000, 0x00000000f2be0000, 0x00000000f2be0000) from space 64K, 0% used [0x00000000f2bf0000, 0x00000000f2bf0000, 0x00000000f2c00000) to space 64K, 0% used [0x00000000f2be0000, 0x00000000f2be0000, 0x00000000f2bf0000) concurrent mark-sweep generation total 131072K, used 48348K [0x00000000f2c00000, 0x00000000fac00000, 0x00000000fac00000) concurrent-mark-sweep perm gen total 30000K, used 19518K [0x00000000fac00000, 0x00000000fc94c000, 0x0000000100000000) 2010-05-11T09:30:13.888+0100: 384.955: [GC 384.955: [ParNew Desired survivor size 32768 bytes, new threshold 0 (max 0) : 130944K-0K(131008K), 0.0052470 secs] 179292K-48549K(262080K), 0.0053030 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] Heap after GC invocations=31 (full 3): par new generation total 131008K, used 0K [0x00000000eac00000, 0x00000000f2c00000, 0x00000000f2c00000) eden space 130944K, 0% used [0x00000000eac00000, 0x00000000eac00000, 0x00000000f2be0000) from space 64K, 0% used [0x00000000f2be0000, 0x00000000f2be0000, 0x00000000f2bf0000) to space 64K, 0% used [0x00000000f2bf0000, 0x00000000f2bf0000, 0x00000000f2c00000) concurrent mark-sweep generation total 131072K, used 48549K [0x00000000f2c00000, 0x00000000fac00000, 0x00000000fac00000) concurrent-mark-sweep perm gen total 30000K, used 19518K [0x00000000fac00000, 0x00000000fc94c000, 0x0000000100000000) } Total time for which application threads were stopped: 0.0056410 seconds Application time: 0.0475220 seconds Total time for which application threads were stopped: 0.0001800 seconds Application time: 1.0174830 seconds Total time for which application threads were stopped: 0.0003820 seconds Application time: 1.0126350 seconds Total time for which application threads were stopped: 0.0002750 seconds Application time: 1.0155910 seconds Total time for which application threads were stopped: 0.0002680 seconds Application time: 1.0155580 seconds Total time for which application threads were stopped: 0.0002880 seconds Application time: 1.0155480 seconds Total time for which application threads were stopped: 0.0002970 seconds Application time: 0.9896810 seconds

    Read the article

  • Why can't the 'NonSerialized' attribute be used at the class level? How to prevent serialization of

    - by ck
    I have a data object that is deep-cloned using a binary serialization. This data object supports property changed events, for example, PriceChanged. Let's say I attached a handler to PriceChanged. When the code attempts to serialize PriceChanged, it throws an exception that the handler isn't marked as serializable. My alternatives: I can't easily remove all handlers from the event before serialization I don't want to mark the handler as serializable because I'd have to recursively mark all the handlers dependencies as well. I don't want to mark PriceChanged as NonSerialized - there are tens of events like this that could potentially have handlers. Ideally, I'd like .NET to just stop going down the object graph at that point and make that a 'leaf'. So why can't I just mark the handler class as 'NonSerialized'? -- I finally worked around this problem by making the handler implement ISerializable and doing nothing in the serialize constructor/ GetDataObject method. But, the handler still is serialized, just with all its dependencies set to null - so I had to account for that as well. Is there a better way to prevent serialization of an entire class?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >