Search Results

Search found 21111 results on 845 pages for 'null pointer'.

Page 2/845 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • wcf web service in post method, object properties are null, although the object is not null

    - by Abdalhadi Kolayb
    i have this problem in post method when i send object parameter to the method, then the object is not null, but all its properties have the default values. here is data module: [DataContract] public class Products { [DataMember(Order = 1)] public int ProdID { get; set; } [DataMember(Order = 2)] public string ProdName { get; set; } [DataMember(Order = 3)] public float PrpdPrice { get; set; } } and here is the interface: [OperationContract] [WebInvoke( Method = "POST", UriTemplate = "AddProduct", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json)] string AddProduct([MessageParameter(Name = "prod")]Products prod); public string AddProduct(Products prod) { ProductsList.Add(prod); return "return string"; } here is the json request: Content-type:application/json {"prod":[{"ProdID": 111,"ProdName": "P111","PrpdPrice": 111}]} but in the server the object received: {"prod":[{"ProdID": 0,"ProdName": NULL,"PrpdPrice": 0}]}

    Read the article

  • Oral Tradition Check: Two Hundred Meanings for "NULL" in SQL

    - by Thomas L Holaday
    Two decades ago, the topic of "NULL" came up in conversation with a scholarly colleague. As I remember it, he said that C.J.Date, in an essay critical of commercial implementations of SQL, had listed over two hundred meanings for NULL. To my regret, I did not persist the details; but finding that list has since been on my Bucket List. Has anyone else heard this legend? Was it perhaps not Date, but another critic of commercial implementations of SQL?

    Read the article

  • Much ado about NULL: Exploiting a kernel NULL dereference

    <b>Ksplice:</b> "We think that it&#8217;s important for developers and system administrators to be more knowledgeable about the attacks that black hats regularly use to take control of systems, and so, today, we&#8217;re going to start from where we left off and go all the way to a working exploit for a NULL pointer dereference in a toy kernel module."

    Read the article

  • Determining distribution of NULL values

    - by AaronBertrand
    Today on the twitter hash tag #sqlhelp, @leenux_tux asked: How can I figure out the percentage of fields that don't have data ? After further clarification, it turns out he is after what proportion of columns are NULL. Some folks suggested using a data profiling task in SSIS . There may be some validity to that, but I'm still a fan of sticking to T-SQL when I can, so here is how I would approach it: Create a #temp table or @table variable to store the results. Create a cursor that loops through all...(read more)

    Read the article

  • What is the difference between NULL in C++ and null in Java?

    - by Stephano
    I've been trying to figure out why C++ is making me crazy typing NULL. Suddenly it hits me the other day; I've been typing null (lower case) in Java for years. Now suddenly I'm programming in C++ and that little chunk of muscle memory is making me crazy. Wikiperipatetic defines C++ NULL as part of the stddef: A macro that expands to a null pointer constant. It may be defined as ((void*)0), 0 or 0L depending on the compiler and the language. Sun's docs tells me this about Java's "null literal": The null type has one value, the null reference, represented by the literal null, which is formed from ASCII characters. A null literal is always of the null type. So this is all very nice. I know what a null pointer reference is, and thank you for the compiler notes. Now I'm a little fuzzy on the idea of a literal in Java so I read on... A literal is the source code representation of a fixed value; literals are represented directly in your code without requiring computation. There's also a special null literal that can be used as a value for any reference type. null may be assigned to any variable, except variables of primitive types. There's little you can do with a null value beyond testing for its presence. Therefore, null is often used in programs as a marker to indicate that some object is unavailable. Ok, so I think I get it now. In C++ NULL is a macro that, when compiled, defines the null pointer constant. In Java, null is a fixed value that any non-primitive can be assigned too; great for testing in a handy if statement. Java does not have pointers, so I can see why they kept null a simple value rather than anything fancy. But why did java decide to change the all caps NULL to null? Furthermore, am I missing anything here?

    Read the article

  • Undefined symbols after installing new xcode 3.2.3 build

    - by toofah
    I want to move to the new XCode 3.2.3 GM Seed build for development, but when I bring up my project I get 'base sdk missing' because my project is set to use iPhone SDK 3.0. If I change 'base SDK' to iPhone 3.2 or 4.0 and then compile I get a lot of errors that I don't understand. I dumped a few of them below. Can anyone tell me what I am missing? Also, can someone confirm that if I choose 'base sdk' of iPhone 3.2 or 4.0 that I can still choose 'target device' of iPhone 3.0 and not force my customers to install the new SDK. I really don't want to be the app that forces my customers to upgrade their OS. Thanks! Undefined symbols: ".objc_class_name_NSObject", referenced from: .objc_class_name_FlurryAPI in libFlurry.a(FlurryAPI.o) .objc_class_name_FlurrySession in libFlurry.a(FlurrySession.o) .objc_class_name_FlurryHTTPEater in libFlurry.a(FlurryHTTPEater.o) .objc_class_name_FlurryHTTPResponse in libFlurry.a(FlurryHTTPResponse.o) .objc_class_name_FlurryConnectionDelegate in libFlurry.a(FlurryConnectionDelegate.o) .objc_class_name_FlurryAd in libFlurry.a(FlurryAd.o) .objc_class_name_FlurryAdParser in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSObject in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdImage in libFlurry.a(FlurryAdImage.o) .objc_class_name_FlurryAdImpression in libFlurry.a(FlurryAdImpression.o) .objc_class_name_FlurryPageViewDelegate in libFlurry.a(FlurryPageViewDelegate.o) .objc_class_name_FlurryAdTheme in libFlurry.a(FlurryAdTheme.o) .objc_class_name_FlurryAdHook in libFlurry.a(FlurryAdHook.o) .objc_class_name_FlurryAdProperties in libFlurry.a(FlurryAdProperties.o) .objc_class_name_FlurryFileCache in libFlurry.a(FlurryFileCache.o) .objc_class_name_FlurryEvent in libFlurry.a(FlurryEvent.o) .objc_class_name_FlurryProtocolData in libFlurry.a(FlurryProtocolData.o) .objc_class_name_FlurryAdAssignment in libFlurry.a(FlurryAdAssignment.o) .objc_class_name_FlurryAdAppStoreConnectionDelegate in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) .objc_class_name_FlurryHeartBeater in libFlurry.a(FlurryHeartBeater.o) .objc_class_name_FlurryImageCache in libFlurry.a(FlurryImageCache.o) .objc_class_name_FlurryUtil in libFlurry.a(FlurryUtil.o) .objc_class_name_FlurryAdNavigationDelegate in libFlurry.a(FlurryAdNavigationDelegate.o) .objc_class_name_FlurryAdLocation in libFlurry.a(FlurryAdLocation.o) .objc_class_name_FlurryAdDimension in libFlurry.a(FlurryAdDimension.o) .objc_class_name_FlurryAdTextStyle in libFlurry.a(FlurryAdTextStyle.o) ".objc_class_name_NSFileManager", referenced from: literal-pointer@_OBJC@_cls_refs@NSFileManager in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSFileManager in libFlurry.a(FlurryFileCache.o) ".objc_class_name_NSString", referenced from: literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryHTTPResponse.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAd.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryFileCache.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSError", referenced from: literal-pointer@_OBJC@_cls_refs@NSError in libFlurry.a(FlurryUtil.o) "_OBJC_METACLASS_$_FlurryAPI", referenced from: _OBJC_METACLASS_$_NFlurryAPI in NFlurryAPI.o ".objc_class_name_UIWindow", referenced from: literal-pointer@_OBJC@_cls_refs@UIWindow in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSException", referenced from: literal-pointer@_OBJC@_cls_refs@NSException in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSException in libFlurry.a(FlurryUtil.o) ".objc_class_name_UIColor", referenced from: literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdCanvasView.o) "_OBJC_CLASS_$_FlurryAPI", referenced from: _OBJC_CLASS_$_NFlurryAPI in NFlurryAPI.o ".objc_class_name_NSMutableSet", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableSet in libFlurry.a(FlurryAdAssignment.o) ".objc_class_name_UIFont", referenced from: literal-pointer@_OBJC@_cls_refs@UIFont in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIFont in libFlurry.a(FlurryAdCanvasView.o) ".objc_class_name_UIImage", referenced from: literal-pointer@_OBJC@_cls_refs@UIImage in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@UIImage in libFlurry.a(FlurryAdImage.o) ".objc_class_name_UIApplication", referenced from: literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) ".objc_class_name_UILabel", referenced from: literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdCanvasView.o) ".objc_class_name_UIView", referenced from: literal-pointer@_OBJC@_cls_refs@UIView in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdView in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIView in libFlurry.a(FlurryAdCanvasViewController.o) .objc_class_name_FlurryAdListView in libFlurry.a(FlurryAdListView.o) ".objc_class_name_NSMutableString", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurryAdView.o) ".objc_class_name_NSTimer", referenced from: literal-pointer@_OBJC@_cls_refs@NSTimer in libFlurry.a(FlurryHeartBeater.o) ".objc_class_name_NSMutableData", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryConnectionDelegate.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryEvent.o) ".objc_class_name_NSNumber", referenced from: literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAPI.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdCanvasViewController.o) "_objc_exception_match", referenced from: +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) ".objc_class_name_UINavigationItem", referenced from: literal-pointer@_OBJC@_cls_refs@UINavigationItem in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_UIViewController", referenced from: literal-pointer@_OBJC@_cls_refs@UIViewController in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdCanvasViewController in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSMutableArray", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryImageCache.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryAdNavigationDelegate.o) ".objc_class_name_UIScreen", referenced from: literal-pointer@_OBJC@_cls_refs@UIScreen in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSURLCache", referenced from: literal-pointer@_OBJC@_cls_refs@NSURLCache in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSNotificationCenter", referenced from: literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAPI.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryHeartBeater.o) ".objc_class_name_NSInvocation", referenced from: literal-pointer@_OBJC@_cls_refs@NSInvocation in libFlurry.a(FlurryPageViewDelegate.o) ".objc_class_name_NSURL", referenced from: literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryAdCanvasViewController.o) "_objc_exception_extract", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurryAdParser oldInstance] in libFlurry.a(FlurryAdParser.o) +[FlurryAdParser instance] in libFlurry.a(FlurryAdParser.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) +[FlurryFileCache createInstanceWithApiKey:] in libFlurry.a(FlurryFileCache.o) +[FlurryAdAssignment createInstance] in libFlurry.a(FlurryAdAssignment.o) +[FlurryHeartBeater createAndStartInstance:] in libFlurry.a(FlurryHeartBeater.o) +[FlurryImageCache createInstanceWithFileCache:] in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSMutableURLRequest", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableURLRequest in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSRunLoop", referenced from: literal-pointer@_OBJC@_cls_refs@NSRunLoop in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSKeyedUnarchiver", referenced from: literal-pointer@_OBJC@_cls_refs@NSKeyedUnarchiver in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSKeyedUnarchiver in libFlurry.a(FlurryFileCache.o) ".objc_class_name_NSData", referenced from: literal-pointer@_OBJC@_cls_refs@NSData in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSData in libFlurry.a(FlurryAdParser.o) ".objc_class_name_NSDate", referenced from: literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryEvent.o) ".objc_class_name_UIBarButtonItem", referenced from: literal-pointer@_OBJC@_cls_refs@UIBarButtonItem in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSURLRequest", referenced from: literal-pointer@_OBJC@_cls_refs@NSURLRequest in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@NSURLRequest in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) ".objc_class_name_UIDevice", referenced from: literal-pointer@_OBJC@_cls_refs@UIDevice in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@UIDevice in libFlurry.a(FlurryAdView.o) ".objc_class_name_UIImageView", referenced from: literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdCanvasView.o) "_objc_exception_try_exit", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurryAdParser oldInstance] in libFlurry.a(FlurryAdParser.o) +[FlurryAdParser instance] in libFlurry.a(FlurryAdParser.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) +[FlurryFileCache createInstanceWithApiKey:] in libFlurry.a(FlurryFileCache.o) +[FlurryAdAssignment createInstance] in libFlurry.a(FlurryAdAssignment.o) +[FlurryHeartBeater createAndStartInstance:] in libFlurry.a(FlurryHeartBeater.o) +[FlurryImageCache createInstanceWithFileCache:] in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSDateFormatter", referenced from: literal-pointer@_OBJC@_cls_refs@NSDateFormatter in libFlurry.a(FlurrySession.o) "_objc_exception_try_enter", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o)

    Read the article

  • ON DELETE RESTRICT Causing Error 150

    - by Levi Hackwith
    CREATE TABLE project ( id INTEGER NOT NULL AUTO_INCREMENT, created_at DATETIME NOT NULL, name VARCHAR(75) NOT NULL, description LONGTEXT NOT NULL, is_active TINYINT NOT NULL DEFAULT '1', PRIMARY KEY (id), INDEX(name, created_at) ) ENGINE = INNODB; CREATE TABLE role ( id INTEGER NOT NULL, name VARCHAR(50) NOT NULL, description LONGTEXT NOT NULL, PRIMARY KEY (id) ) ENGINE = INNODB; CREATE TABLE organization ( id INTEGER NOT NULL AUTO_INCREMENT, created_at DATETIME NOT NULL, name VARCHAR(100) NOT NULL, is_active TINYINT NOT NULL DEFAULT '1', PRIMARY KEY (id) ) ENGINE = INNODB; CREATE TABLE user ( id INTEGER NOT NULL AUTO_INCREMENT, created_at DATETIME NOT NULL, role_id INTEGER NOT NULL, organization_id INTEGER NOT NULL, last_login_at DATETIME NOT NULL, last_ip_address VARCHAR(25) NOT NULL, username VARCHAR(45) NOT NULL, password CHAR(32) NOT NULL, email_address VARCHAR(255) NOT NULL, first_name VARCHAR(45) NOT NULL, last_name VARCHAR(45) NOT NULL, address_1 VARCHAR(100) NOT NULL, address_2 VARCHAR(25) NULL, city VARCHAR(25) NOT NULL, state CHAR(2) NOT NULL, zip_code VARCHAR(10) NOT NULL, primary_phone_number VARCHAR(10) NOT NULL, secondary_phone_number VARCHAR(10) NOT NULL, is_primary_organization_contact TINYINT NOT NULL DEFAULT '0', is_active TINYINT NOT NULL DEFAULT '1', PRIMARY KEY (id), CONSTRAINT fk_user_role_id FOREIGN KEY (role_id) REFERENCES role (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_user_organization_id FOREIGN KEY (organization_id) REFERENCES organization (id) ON UPDATE RESTRICT ON DELETE RESTRICT ) ENGINE = INNODB; CREATE TABLE project_user ( user_id INTEGER NOT NULL, project_id INTEGER NOT NULL, PRIMARY KEY (user_id, project_id), CONSTRAINT fk_project_user_user_id FOREIGN KEY (user_id) REFERENCES user (id) ON UPDATE RESTRICT ON DELETE CASCADE, CONSTRAINT fk_project_user_project_id FOREIGN KEY (project_id) REFERENCES project (id) ON UPDATE RESTRICT ON DELETE RESTRICT ) ENGINE = INNODB; CREATE TABLE ticket_category ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(20) NOT NULL, description LONGTEXT NOT NULL, PRIMARY KEY (id) ) ENGINE = INNODB; CREATE TABLE ticket_type ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(20) NOT NULL, description LONGTEXT NOT NULL, PRIMARY KEY (id) ) ENGINE = INNODB; CREATE TABLE ticket_status ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(20) NOT NULL, description LONGTEXT NOT NULL, PRIMARY KEY (id) ) ENGINE = INNODB; CREATE TABLE ticket ( id INTEGER NOT NULL AUTO_INCREMENT, created_at DATETIME NOT NULL, project_id INTEGER NOT NULL, created_by INTEGER NOT NULL, submitted_by INTEGER NOT NULL, assigned_to INTEGER NULL, category_id INTEGER NOT NULL, type_id INTEGER NOT NULL, title VARCHAR(75) NOT NULL, description LONGTEXT NOT NULL, contact_type_id TINYINT NOT NULL, affects_all_clients TINYINT NOT NULL DEFAULT '0', is_billable TINYINT NOT NULL DEFAULT '1', esimated_hours DECIMAL(4, 1) NOT NULL DEFAULT '0', hours_worked DECIMAL (4, 1) NOT NULL DEFAULT '0', status_id TINYINT NOT NULL, PRIMARY KEY (id), CONSTRAINT fk_ticket_project_id FOREIGN KEY (project_id) REFERENCES project (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_created_by FOREIGN KEY (created_by) REFERENCES user (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_submitted_by FOREIGN KEY (submitted_by) REFERENCES user (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_assigned_to FOREIGN KEY (assigned_to) REFERENCES user (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_category_id FOREIGN KEY (category_id) REFERENCES ticket_category (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_type_id FOREIGN KEY (type_id) REFERENCES ticket_type (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_status_id FOREIGN KEY (status_id) REFERENCES ticket_status (id) ON UPDATE RESTRICT ON DELETE RESTRICT ) ENGINE = INNODB; CREATE TABLE ticket_time_entry ( id INTEGER NOT NULL AUTO_INCREMENT, user_id INTEGER NOT NULL, ticket_id INTEGER NOT NULL, started_at DATETIME NOT NULL, ended_at DATETIME NOT NULL, PRIMARY KEY (id), CONSTRAINT fk_ticket_time_entry_user_id FOREIGN KEY (user_id) REFERENCES user (id) ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT fk_ticket_time_entry_ticket_id FOREIGN KEY (ticket_id) REFERENCES ticket (id) ON UPDATE RESTRICT ON DELETE RESTRICT ) ENGINE = INNODB; The ticket table's create statement causes an error 150. I have no clue why. When I remove the ON DELETE RESTRICT statements from the table declaration, it works. Why is that?

    Read the article

  • null values vs "empty" singleton for optional fields

    - by Uko
    First of all I'm developing a parser for an XML-based format for 3D graphics called XGL. But this question can be applied to any situation when you have fields in your class that are optional i.e. the value of this field can be missing. As I was taking a Scala course on coursera there was an interesting pattern when you create an abstract class with all the methods you need and then create a normal fully functional subclass and an "empty" singleton subclass that always returns false for isEmpty method and throws exceptions for the other ones. So my question is: is it better to just assign null if the optional field's value is missing or make a hierarchy described above and assign it an empty singleton implementation?

    Read the article

  • Avoiding null in a controller

    - by Kevin Burke
    I'm trying to work through how to write this code. def get(params): """ Fetch a user's details, or 404 """ user = User.fetch_by_id(params['id']) if not user: abort(404) # Render some template for the user... What's the best way to handle the case where the lookup fails? One principle says you should avoid returning null values from functions. These lead to mistakes and AttributeErrors etc. later on in the file. Another idea is to have fetch_by_id raise a ValueError or similar if no user exists with that id. However there's a general principle that you shouldn't use exceptions for control flow, either, which doesn't help much. What could be done better in this case?

    Read the article

  • Comparable and Comparator contract with regards to null

    - by polygenelubricants
    Comparable contract specifies that e.compareTo(null) must throw NullPointerException. From the API: Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false. On the other hand, Comparator API mentions nothing about what needs to happen when comparing null. Consider the following attempt of a generic method that takes a Comparable, and return a Comparator for it that puts null as the minimum element. static <T extends Comparable<? super T>> Comparator<T> nullComparableComparator() { return new Comparator<T>() { @Override public int compare(T el1, T el2) { return el1 == null ? -1 : el2 == null ? +1 : el1.compareTo(el2); } }; } This allows us to do the following: List<Integer> numbers = new ArrayList<Integer>( Arrays.asList(3, 2, 1, null, null, 0) ); Comparator<Integer> numbersComp = nullComparableComparator(); Collections.sort(numbers, numbersComp); System.out.println(numbers); // "[null, null, 0, 1, 2, 3]" List<String> names = new ArrayList<String>( Arrays.asList("Bob", null, "Alice", "Carol") ); Comparator<String> namesComp = nullComparableComparator(); Collections.sort(names, namesComp); System.out.println(names); // "[null, Alice, Bob, Carol]" So the questions are: Is this an acceptable use of a Comparator, or is it violating an unwritten rule regarding comparing null and throwing NullPointerException? Is it ever a good idea to even have to sort a List containing null elements, or is that a sure sign of a design error?

    Read the article

  • NHibernate IUserType convert nullable DateTime to DB not-null value

    - by barakbbn
    I have legacy DB that store dates that means no-date as 9999-21-31, The column Till_Date is of type DateTime not-null="true". in the application i want to build persisted class that represent no-date as null, So i used nullable DateTime in C# //public DateTime? TillDate {get; set; } I created IUserType that knows to convert the entity null value to DB 9999-12-31 but it seems that NHibernate doesn't call SafeNullGet, SafeNullSet on my IUserType when the entity value is null, and report a null is used for not-null column. I tried to by-pass it by mapping the column as not-null="false" (changed only the mapping file, not the DB) but it still didn't help, only now it tries to insert the null value to the DB and get ADOException. Any knowledge if NHibernate doesn't support IUseType that convert null to not-null values? Thanks //Implementation public class NullableDateTimeToNotNullUserType : IUserType { private static readonly DateTime MaxDate = new DateTime(9999, 12, 31); public new bool Equals(object x, object y) { //This didn't work as well if (ReferenceEquals(x, y)) return true; //if(x == null && y == null) return false; if (x == null || y == null) return false; return x.Equals(y); } public int GetHashCode(object x) { return x == null ? 0 : x.GetHashCode(); } public object NullSafeGet(IDataReader rs, string[] names, object owner) { var value = rs.GetDateTime(rs.GetOrdinal(names[0])); return (value == MaxDate)? null : value; } public void NullSafeSet(IDbCommand cmd, object value, int index) { var dateValue = (DateTime?)value; var dbValue = (dateValue.HasValue) ? dateValue.Value : MaxDate; ((IDataParameter)cmd.Parameters[index]).Value = dbValue; } public object DeepCopy(object value) { return value; } public object Replace(object original, object target, object owner) { return original; } public object Assemble(object cached, object owner) { return cached; } public object Disassemble(object value) { return value; } public SqlType[] SqlTypes { get { return new[] { NHibernateUtil.DateTime.SqlType }; } } public Type ReturnedType { get { return typeof(DateTime?); } } public bool IsMutable { get { return false; } } } } //Final Implementation with fixes. make the column mapping in hbm.xml not-null="false" public class NullableDateTimeToNotNullUserType : IUserType { private static readonly DateTime MaxDate = new DateTime(9999, 12, 31); public new bool Equals(object x, object y) { //This didn't work as well if (ReferenceEquals(x, y)) return true; //if(x == null && y == null) return false; if (x == null || y == null) return false; return x.Equals(y); } public int GetHashCode(object x) { return x == null ? 0 : x.GetHashCode(); } public object NullSafeGet(IDataReader rs, string[] names, object owner) { var value = NHibernateUtil.Date.NullSafeGet(rs, names[0]); return (value == MaxDate)? default(DateTime?) : value; } public void NullSafeSet(IDbCommand cmd, object value, int index) { var dateValue = (DateTime?)value; var dbValue = (dateValue.HasValue) ? dateValue.Value : MaxDate; NHibernateUtil.Date.NullSafeSet(cmd, valueToSet, index); } public object DeepCopy(object value) { return value; } public object Replace(object original, object target, object owner) { return original; } public object Assemble(object cached, object owner) { return cached; } public object Disassemble(object value) { return value; } public SqlType[] SqlTypes { get { return new[] { NHibernateUtil.DateTime.SqlType }; } } public Type ReturnedType { get { return typeof(DateTime?); } } public bool IsMutable { get { return false; } } } }

    Read the article

  • null from C# getting converted into 'NULL' in Sql Server

    - by Anand
    I am trying to insert NULL value in Sql Server if I have null value in corresponding C# String object like below : String Residence = xmlDoc.Descendants("Appointment").Single().Element("StateOfResidence") == null ? null : xmlDoc.Descendants("Appointment").Elements("StateOfResidence").Single().Value; I am using Entity framework for Database access. So if Residence is null, 'NULL' gets inserted into Database instead of NULL. How can insert NULL for null ?

    Read the article

  • MS Access PIVOT with User Defined Field

    - by user2535359
    Any of you good souls please help!! I need to query the source table shown in the below. (NULL are blank fields) UNUM, Ticket, Overflow 1 , 135 , NULL 1 , 136 ,NULL 1, 137, NULL 1, 138, NULL 1, NULL, 2b 2, 135, NULL 2, 136, NULL 2, 137, NULL 3, 135, NULL 3, 136, NULL 3, 137,NULL 3, 138, NULL 3, 139, NULL 3, 140, NULL 3, NULL, 66a 4, NULL, 12a 5, NULL, 14a I need to generate the output as shown below. UserNum, Ticket1, Ticket2, Ticket3, Ticket4, Ticket5, Ticket6, Ticket7, Ticket8, Ticket9, Overflow 1, 135, 136, 137, 138, Null, Null, Null, Null, Null, 2b 2, 135, 136, 137, Null, Null, Null, Null, Null, Null, Null 3, 135, 136, 137, 138, 139, 140, Null, Null, Null, 66a 4, Null, Null, Null, Null, Null, Null, Null, Null, Null, 12a 5, Null, Null, Null, Null, Null, Null, Null, Null, Null, 14a The source table has multiple tickets assigned to user. There are always maximum of 9 tickets. The user either has a ticket or an overflow but here can be only overflow per user. I am having issue pivoting the data in Ticket column to pre-defined field names like Ticket1, Ticket2...

    Read the article

  • Problems Enforcing Referential Integrity on SQL Server Tables

    - by SidC
    Hello All, I have a SQL Server 2005 database comprised of Customer, Quote, QuoteDetail tables. I want/need to enforce referential integrity such that when an insert is made on quotedetail, the quote and customer tables are also affected. I have tried my best to set up primary/foreign keys on my tables but need some help. Here's the scripts for my tables as they stand now (please don't laugh): Customers: USE [Diel_inventory] GO /****** Object: Table [dbo].[Customers] Script Date: 05/08/2010 03:39:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Customers]( [pkCustID] [int] IDENTITY(1,1) NOT NULL, [CompanyName] [nvarchar](50) NULL, [Address] [nvarchar](50) NULL, [City] [nvarchar](50) NULL, [State] [nvarchar](2) NULL, [ZipCode] [nvarchar](5) NULL, [OfficePhone] [nvarchar](12) NULL, [OfficeFAX] [nvarchar](12) NULL, [Email] [nvarchar](50) NULL, [PrimaryContactName] [nvarchar](50) NULL, CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED ([pkCustID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] Quotes: USE [Diel_inventory] GO /****** Object: Table [dbo].[Quotes] Script Date: 05/08/2010 03:30:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Quotes]( [pkQuoteID] [int] IDENTITY(1,1) NOT NULL, [fkCustomerID] [int] NOT NULL, [QuoteDate] [timestamp] NOT NULL, [NeedbyDate] [datetime] NULL, [QuoteAmt] [decimal](6, 2) NOT NULL, [QuoteApproved] [bit] NOT NULL, [fkOrderID] [int] NOT NULL, CONSTRAINT [PK_Bids] PRIMARY KEY CLUSTERED ( [pkQuoteID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[Quotes] WITH CHECK ADD CONSTRAINT [fkCustomerID] FOREIGN KEY([fkCustomerID]) REFERENCES [dbo].[Customers] ([pkCustID]) GO ALTER TABLE [dbo].[Quotes] CHECK CONSTRAINT [fkCustomerID] QuoteDetail: USE [Diel_inventory] GO /****** Object: Table [dbo].[QuoteDetail] Script Date: 05/08/2010 03:31:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[QuoteDetail]( [ID] [int] IDENTITY(1,1) NOT NULL, [fkQuoteID] [int] NOT NULL, [fkCustomerID] [int] NOT NULL, [fkPartID] [int] NULL, [PartNumber1] [float] NOT NULL, [Qty1] [int] NOT NULL, [PartNumber2] [float] NULL, [Qty2] [int] NULL, [PartNumber3] [float] NULL, [Qty3] [int] NULL, [PartNumber4] [float] NULL, [Qty4] [int] NULL, [PartNumber5] [float] NULL, [Qty5] [int] NULL, [PartNumber6] [float] NULL, [Qty6] [int] NULL, [PartNumber7] [float] NULL, [Qty7] [int] NULL, [PartNumber8] [float] NULL, [Qty8] [int] NULL, [PartNumber9] [float] NULL, [Qty9] [int] NULL, [PartNumber10] [float] NULL, [Qty10] [int] NULL, [PartNumber11] [float] NULL, [Qty11] [int] NULL, [PartNumber12] [float] NULL, [Qty12] [int] NULL, [PartNumber13] [float] NULL, [Qty13] [int] NULL, [PartNumber14] [float] NULL, [Qty14] [int] NULL, [PartNumber15] [float] NULL, [Qty15] [int] NULL, [PartNumber16] [float] NULL, [Qty16] [int] NULL, [PartNumber17] [float] NULL, [Qty17] [int] NULL, [PartNumber18] [float] NULL, [Qty18] [int] NULL, [PartNumber19] [float] NULL, [Qty19] [int] NULL, [PartNumber20] [float] NULL, [Qty20] [int] NULL, CONSTRAINT [PK_QuoteDetail] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[QuoteDetail] WITH CHECK ADD CONSTRAINT [FK_QuoteDetail_Customers] FOREIGN KEY ([fkCustomerID]) REFERENCES [dbo].[Customers] ([pkCustID]) GO ALTER TABLE [dbo].[QuoteDetail] CHECK CONSTRAINT [FK_QuoteDetail_Customers] GO ALTER TABLE [dbo].[QuoteDetail] WITH CHECK ADD CONSTRAINT [FK_QuoteDetail_PartList] FOREIGN KEY ([fkPartID]) REFERENCES [dbo].[PartList] ([RecID]) GO ALTER TABLE [dbo].[QuoteDetail] CHECK CONSTRAINT [FK_QuoteDetail_PartList] GO ALTER TABLE [dbo].[QuoteDetail] WITH CHECK ADD CONSTRAINT [FK_QuoteDetail_Quotes] FOREIGN KEY([fkQuoteID]) REFERENCES [dbo].[Quotes] ([pkQuoteID]) GO ALTER TABLE [dbo].[QuoteDetail] CHECK CONSTRAINT [FK_QuoteDetail_Quotes] Your advice/guidance on how to set these up so that customer ID in Customers is the same as in Quotes (referential integrity) and that CustomerID is inserted on Quotes and Customers when an insert is made to QuoteDetial would be much appreciated. Thanks, Sid

    Read the article

  • SQL SERVER – A Puzzle – Fun with NULL – Fix Error 8117

    - by pinaldave
    During my 8 years of career, I have been involved in many interviews. Quite often, I act as the  interview. If I am the interviewer, I ask many questions – from easy questions to difficult ones. When I am the interviewee, I frequently get an opportunity to ask the interviewer some questions back. Regardless of the my capacity in attending the interview, I always make it a point to ask the interviewer at least one question. What is NULL? It’s always fun to ask this question during interviews, because in every interview, I get a different answer. NULL is often confused with false, absence of value or infinite value. Honestly, NULL is a very interesting subject as it bases its behavior in server settings. There are a few properties of NULL that are universal, but the knowledge about these properties is not known in a universal sense. Let us run this simple puzzle. Run the following T-SQL script: SELECT SUM(data) FROM (SELECT NULL AS data) t It will return the following error: Msg 8117, Level 16, State 1, Line 1 Operand data type NULL is invalid for sum operator. Now the error makes it very clear that NULL is invalid for sum Operator. Frequently enough, I have showed this simple query to many folks whom I came across. I asked them if they could modify the subquery and return the result as NULL. Here is what I expected: Even though this is a very simple looking query, so far I’ve got the correct answer from only 10% of the people to whom I have asked this question. It was common for me to receive this kind of answer – convert the NULL to some data type. However, doing so usually returns the value as 0 or the integer they passed. SELECT SUM(data) FROM (SELECT ISNULL(NULL,0) AS data) t I usually see many people modifying the outer query to get desired NULL result, but that is not allowed in this simple puzzle. This small puzzle made me wonder how many people have a clear understanding about NULL. Well, here is the answer to my simple puzzle. Just CAST NULL AS INT and it will return the final result as NULL: SELECT SUM(data) FROM (SELECT CAST(NULL AS INT) AS data) t Now that you know the answer, don’t you think it was very simple indeed? This blog post is especially dedicated to my friend Madhivanan who has written an excellent blog post about NULL. I am confident that after reading the blog post from Madhivanan, you will have no confusion regarding NULL in the future. Read: NULL, NULL, NULL and nothing but NULL. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • C Programming: malloc() for a 2D array (using pointer-to-pointer)

    - by vikramtheone
    Hi Guys, yesterday I had posted a question: How should I pass a pointer to a function and allocate memory for the passed pointer from inside the called function? From the answers I got, I was able to understand what mistake I was doing. I'm facing a new problem now, can anyone help out with this? I want to dynamically allocate a 2D array, so I'm passing a Pointer-to-Pointer from my main() to another function called alloc_2D_pixels(...), where I use malloc(...) and for(...) loop to allocate memory for the 2D array. Well, after returning from the alloc_2D_pixels(...) function, the pointer-to-pointer still remains NULL, so naturally, when I try accessing or try to free(...) the Pointer-to-Pointer, the program hangs. Can anyone suggest me what mistakes I'm doing here? Help!!! Vikram SOURCE: main() { unsigned char **ptr; unsigned int rows, cols; if(alloc_2D_pixels(&ptr, rows, cols)==ERROR) // Satisfies this condition printf("Memory for the 2D array not allocated"); // NO ERROR is returned if(ptr == NULL) // ptr is NULL so no memory was allocated printf("Yes its NULL!"); // Because ptr is NULL, with any of these 3 statements below the program HANGS ptr[0][0] = 10; printf("Element: %d",ptr[0][0]); free_2D_alloc(&ptr); } signed char alloc_2D_pixels(unsigned char ***memory, unsigned int rows, unsigned int cols) { signed char status = NO_ERROR; memory = malloc(rows * sizeof(unsigned char** )); if(memory == NULL) { status = ERROR; printf("ERROR: Memory allocation failed!"); } else { int i; for(i = 0; i< cols; i++) { memory[i] = malloc(cols * sizeof(unsigned char)); if(memory[i]==NULL) { status = ERROR; printf("ERROR: Memory allocation failed!"); } } } // Inserted the statements below for debug purpose only memory[0][0] = (unsigned char)10; // I'm able to access the array from printf("\nElement %d",memory[0][0]); // here with no problems return status; } void free_2D_pixels(unsigned char ***ptr, unsigned int rows) { int i; for(i = 0; i < rows; i++) { free(ptr[i]); } free(ptr); }

    Read the article

  • In retrospect, has it been a good idea to use three-valued logic for SQL NULL comparisons?

    - by Heinzi
    In SQL, NULL means "unknown value". Thus, every comparison with NULL yields NULL (unknown) rather than TRUE or FALSE. From a conceptional point of view, this three-valued logic makes sense. From a practical point of view, every learner of SQL has, one time or another, made the classic WHERE myField = NULL mistake or learned the hard way that NOT IN does not do what one would expect when NULL values are present. It is my impression (please correct me if I am wrong) that the cases where this three-valued logic helps (e.g. WHERE myField IS NOT NULL AND myField <> 2 can be shortened to WHERE myField <> 2) are rare and, in those cases, people tend to use the longer version anyway for clarity, just like you would add a comment when using a clever, non-obvious hack. Is there some obvious advantage that I am missing? Or is there a general consensus among the development community that this has been a mistake?

    Read the article

  • C - Complicated pointer declarations - help understanding

    - by Emmel
    In my burgeoning new self-education in the C language, I've come across a set of declarations that I do not understand how to read. I'd love for someone to break these down. I'll explain at the bottom where I got these examples from. 1. char (*(*x())[])() "x: function returning pointer to array[] of pointer to function returning char" - huh? 2. char (*(*x[3])())[5] "x: array[3] of pointer to function returning pointer to array[5] of char" - come again? 3. char **argv This I understand. "Pointer to pointer to char." But what I don't understand is -- what's the use case for a pointer to a pointer? Follow-up question: does anyone every use declarations this complex or is this just academic fun on the part of the authors of the examples I got this from? These examples are from section 5.12 of the K&R book. This is the first time I'm genuinely stumped by an explanation, in an otherwise well-written classic. Thanks.

    Read the article

  • Pointer incrementing query

    - by Craig
    I have been looking at this piece of code, and it is not doing what I expect. I have 3 globals. int x, y, *pointer, z; Inside of main I declare them. x = 10; y = 25; pointer = &x; now at this point &x is 0x004A144 &y is 0x004A138 pointer is pointing to 0x004A144 Now when I increment: y = *++pointer; it points to 0x004A148, this is the address y should be at shouldn't it? The idea is that incrementing the pointer to 'x' should increment it to point at y, but it doesn't seem to want to declare them in in order like I expect. If this a VS2005 / 2008 problem? Or maybe an Express problem? This isn't really homework, as I have done it a couple of years ago but I was revising on my pointer stuff and I tried this again. But this time I am getting unexpected results. Does anyone have opinions on this? *UPDATE sorry should be more clear, 'thought' on declaration 'y' should be at 148, and that incrementing the pointer pointing to x should increment 'pointer' to 148 (which it does), but that isn't where y is. Why isn't y declaring where it should be.

    Read the article

  • Dereferencing the null pointer

    - by zilgo
    The standard says that dereferencing the null pointer leads to undefined behaviour. But what is "the null pointer"? In the following code, what we call "the null pointer": struct X { static X* get() { return reinterpret_cast<X*>(1); } void f() { } }; int main() { X* x = 0; (*x).f(); // the null pointer? (1) x = X::get(); (*x).f(); // the null pointer? (2) x = reinterpret_cast<X*>( X::get() - X::get() ); (*x).f(); // the null pointer? (3) (*(X*)0).f(); // I think that this the only null pointer here (4) } My thought is that dereferencing of the null pointer takes place only in the last case. Am I right? Is there difference between compile time null pointers and runtime according to C++ Standard?

    Read the article

  • Java Constructor Style (Check parameters aren't null)

    - by Peter
    What are the best practices if you have a class which accepts some parameters but none of them are allowed to be null? The following is obvious but the exception is a little unspecific: public class SomeClass { public SomeClass(Object one, Object two) { if (one == null || two == null) { throw new IllegalArgumentException("Parameters can't be null"); } //... } } Here the exceptions let you know which parameter is null, but the constructor is now pretty ugly: public class SomeClass { public SomeClass(Object one, Object two) { if (one == null) { throw new IllegalArgumentException("one can't be null"); } if (two == null) { throw new IllegalArgumentException("two can't be null"); } //... } Here the constructor is neater, but now the constructor code isn't really in the constructor: public class SomeClass { public SomeClass(Object one, Object two) { setOne(one); setTwo(two); } public void setOne(Object one) { if (one == null) { throw new IllegalArgumentException("one can't be null"); } //... } public void setTwo(Object two) { if (two == null) { throw new IllegalArgumentException("two can't be null"); } //... } } Which of these styles is best? Or is there an alternative which is more widely accepted? Cheers, Pete

    Read the article

  • segfault when cd-ing into certain directories in bash

    - by user84207
    I have noticed this very strange behavior recently. After cd into certain directories, I get a segfault on the terminal. --- SIGSEGV (Segmentation fault) @ 0 (0) --- --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV (core dumped) +++ segmentation fault (core dumped) I proceeded to strace a bash session in which I cd into the target directory, and was able to reproduce the problem. I attached the log to this pastebin: I paste below the few lines from the read of "cd stumpwm", which is the directory in question, until the segfault. I included a few of the repetitions of calls to "rt_sigprocmask" and "brk" to give a glimpse of the pattern, which occurs for most of the strace, read(0, cd stumpwm "c", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "d", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, " ", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "s", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "t", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "u", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "m", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "p", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "w", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "m", 1) = 1 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(0, "\n", 1) = 1 rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon -echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon -echo ...}) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGINT, {0x457d50, [], SA_RESTORER, 0x7ffff76254a0}, {0x49edc0, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGTERM, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGALRM, {0x457f50, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x7ffff76254a0}, {0x49edc0, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGTTOU, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGTTIN, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, {SIG_IGN, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGWINCH, {0x457920, [], SA_RESTORER, 0x7ffff76254a0}, {0x49e6e0, [], SA_RESTORER|SA_RESTART, 0x7ffff76254a0}, 8) = 0 rt_sigaction(SIGINT, {0x457d50, [], SA_RESTORER, 0x7ffff76254a0}, {0x457d50, [], SA_RESTORER, 0x7ffff76254a0}, 8) = 0 brk(0xa9a000) = 0xa9a000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xa9b000) = 0xa9b000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xa9c000) = 0xa9c000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xa9d000) = 0xa9d000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xa9e000) = 0xa9e000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xa9f000) = 0xa9f000 brk(0xaa0000) = 0xaa0000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0xaa1000) = 0xaa1000 brk(0xaa2000) = 0xaa2000 (pattern of rt_sigprocmask, brk continues ...) rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x1d5b000) = 0x1d5b000 brk(0x1d5c000) = 0x1d5c000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x1d5d000) = 0x1d5d000 brk(0x1d5e000) = 0x1d5e000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV (core dumped) +++ segmentation fault (core dumped) How can I debug this? Is this likely to be a bash problem? The error does not occur with another shell, such as eshell. I have also run an fschk, although I haven't been able to see the output because of this bug.

    Read the article

  • Avoiding That Null Reference!

    - by TheJuice
    A coworker had this conversation with another of our developers. Names have been changed to protect the guilty. Clueless: hey! Clueless: I am using the ?? operator for null check below Nice Guy: hey Clueless: FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral ?? null; Nice Guy: that's not exactly how it works Clueless: I want to achive: FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral != null ? request.BoatCollateral : null; Clueless: isnt that equal to:  FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral ?? null; Nice Guy: that is functionally equivalent to FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral Nice Guy: you're checking if it's null and if so setting it to null Clueless: yeah Clueless: if its null I want to set it to null Nice Guy: if it's null then you're already going to set it to null, no special logic needed Clueless: I wanted to avoid a null reference if BoatCollateral is null   The sad part of all of this is that "Clueless" has been with our company for years and has a Master's in Computer Science.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >