Q:

Undefined symbols after installing new xcode 3.2.3 build

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)

A:

Flurry posted v2.4 of their SDK today (or last night) seems to work fine in the simulator on xcode 3.2.3 with iOS 4.0...


Q:

Submit button too close to form - Bootstrap

The submit button of the form tends to be soo close to the field for some reason. I am using Bootstrap by the way.
Code:

Contact Email

    <form class="form-group" role="form" action="{$_SERVER['PHP_SELF']}" method="POST">
    <input type="email" class="form-control" name="email" value="$email" id="email">
    <button type="Submit" class="btn btn-success pull-right">Submit</button>
    </form>

</div

The site has other forms in other pages and all, and doesnt really had the problem. Not sure why is it happening for this one.
Note : closing <form> just before the button fixes the issue, but then it wont submit since the button is no longer the part of the form.!
Looking to find whats wrong in the code, rather than a hack fix in the css.
This is how it looks.
FIX : In the code, made
 and ended the div before the input button. Fixed it.
Fixed Codes, just incase come here from Google with similar issue :

Contact Email

<form role="form" action="{$_SERVER['PHP_SELF']}" method="POST">
<input type="email" class="form-control" name="email" value="$email" id="email">

<button type="Submit" class="btn btn-success pull-right">Submit</button>
</form>

A:

Wrap your input in an element with the form-group class. This class souldn't be
on the form itself as you currently have it...

Contact Email

    <form role="form" action="{$_SERVER['PHP_SELF']}" method="POST">

        <input class="form-control" name="email" value="$email" id="email" type="email">

      <button type="Submit" class="btn btn-success pull-right">Submit</button>
    </form>

DEMO


Q:

How can I make text in meld readable?

A few months ago, meld started behaving oddly. Common lines are almost unreadable, and shown as dark grey text on a black background.

Oddly enough, running it as root is fine (with kdesudo meld), although the theme is less pretty.

How can I specify the text's colour options for meld?
I'm using:

Arch Linux
KDE 4.14.3 (also seen in 4.14.2)
meld 3.12.2 (also seen in 3.12.1)
gtk3 3.14.6 (also seen in 3.14.5)

Troubleshooting
KDE system settings
meld uses GTK3, so I fiddled with System Settings > Common Appearance and Behaviour > Application Appearance > GTK > Select a GTK3 Theme. This change was reflected in meld, but none of the three options I selected changed the text. (The available options were Default, Emacs, and oxygen-gtk; the latter is used in the screenshot above.)
Manually modifying config files
I looked in ~ for files with gtk in their name.
~/.gtkrc-2.0
~/.gtkrc-2.0-kde4
~/.config/gtk-2.0
~/.config/gtk-3.0
~/.kde4/share/config/gtkrc
~/.kde4/share/config/gtkrc-2.0

Interestingly, there is nothing with gtk in its name in /root. Hence, I tried deleting some of the ~ files, to see if I could get the same effect for my user. I presume all the gtkrc-2.0 files are irrelevant to meld.
Firstly, I deleted ~/.config/gtk-3.0, but this had no effect, and was recreated when I opened meld.
The only other option appeared to be ~/.kde4/share/config/gtkrc, so deleted this and started meld, which was unaffected. However, the file was not recreated, and it contains some possibly pertinent lines (e.g. text[ACTIVE] = { 1.000, 1.000, 1.000 }). I'm unsure if the (missing) file was loaded at all. I tried kbuildsycoca4 ; kquitapp plasma-desktop ; sleep 2 ; kstart plasma-desktop, but this had no effect. Do I need to manually reload the gtkrc? And why is this file not being affected/rewritten by the system settings?
(Also, FWIW, I removed ~/.gtkrc-2.0-kde4, which was actually a symlink to ~/.gtkrc-2.0, and I also removed the target itself, but that didn't help. Again, I didn't reload gtk (I'm not sure if this is necessary, or possible), and the files weren't re-created when I tried running meld again.)
Possibly pertinent environment variables
$ export | grep -i gtk
declare -x GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:/home/sparhawk/.gtkrc-2.0:/home/sparhawk/.kde4/share/config/gtkrc-2.0"
declare -x GTK_IM_MODULE="xim"
declare -x GTK_MODULES="canberra-gtk-module"
declare -x GTK_RC_FILES="/etc/gtk/gtkrc:/home/sparhawk/.gtkrc:/home/sparhawk/.kde4/share/config/gtkrc"

(Disclosure: I've previously asked this question on the KDE forums, but didn't come to a solution.)

A:

At least from Meld 3.16.4 support different color schemes.
See Meld > Preferences:

(possibly this change was introduced in earlier versions)
Note:
It is also possible to force a specific theme for Meld by CLI: GTK_THEME=Adwaita:dark meld

A:

It looks like it was a regression introduced in Meld 3.12.1. I downloaded previous versions from the meld website.
Meld 3.12.0 works fine.

Meld 3.12.1 does not.

I contacted the devs and they told me that it was indeed a regression introduced in the gtk+ 3 port. They suggested trying the just-released 3.12.3, which now works. (However, it still doesn't fully explain why meld in a new account would work.)

A:

If I do locate -b meld | grep home, I get three directories you haven't mentioned;
~/.gconf/apps/meld
~/.gconf/apps/gnome-settings/meld
~/.local/share/meld

The one in ~/.local/share just seems to be a history of local comparisons, but the other two directories have xml files in them. I would try removing those.
If that doesn't work, you can see exactly which files meld reads with something like:
strace -e trace=file meld |& grep home

Looking at the output will should hopefully yield something else to investigate.
Failing that I would try creating another user account, logging in and running meld (but nothing else) there. If it displays ok, you could view the dot files/environment variables there and compare them to your own account. Note that you should log in via X and not just use su or sudo so that your desktop environment gets the chance to create the default dot files - this will likely be why it looks plain when running as root.
If none of that works, you could always give up and use Diffuse instead. I haven't tested it properly yet myself, but it does some things that meld can't (no directory comparisons though, so not quite a replacement). :)
Update
To try to track down the offending file(s) you can compare the dot files in the new account with the old. Unfortunately it could be almost any of the dot files in the new account, which is why it is important not to run any other applications (especially a web browser) as this will create/change more. To compare files you could try running something like this in the new account:
find . -type f -exec cmp {} /home/your_account/{} \;

For the ones that are different, you could investigate further with, er, Meld. If this doesn't yield anything then there is probably a file that you want to remove which would be hard to find. You could try going back to strace and comparing the outputs from the two accounts.


Q:

EF DbContext and StructureMap scoping

Ok, I give up...
What I want is to share the EF4's DbContext instance per request. I configured StructureMap like this:
For<MyContext>().Use(new MyContext("LocalhostConnString"));

But when I refresh my site, or even open it in another browser, I get the same exact instance of MyContext. Why is this shared across requests?
Am I missing something?

A:

Yes... about 4 characters. Try:
For<MyContext>().Use(() => new MyContext("LocalhostConnString"));

If you give StructureMap an object instance, it will treat that instance as a singleton and return the same one every time. If instead you give it a lambda that creates an instance, it will run that lambda each time the type is requested.


Q:

@OnDelete Hibernate annotation does not generate ON DELETE CASCADE for MySql

I have two entities parent and child with a unidirectional relationship
class Parent {
    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Long id;
}

and
class Child {
    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Long id;

    @ManyToOne(optional = false)
    @JoinColumn(name = "parent_id")
    @OnDelete(action = OnDeleteAction.CASCADE)
    private Parent parent;
}

In the application.properties file I have configured
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.database-platform = org.hibernate.dialect.MySQL5InnoDBDialect

But when I run the application the following statement is created
...
alter table child add constraint FKi62eg01ijyk2kya7eil2gafmx foreign key (parent_id) references parent (id)
...

So there is no ON CASCADE DELETE as there should be. The tables are created each time I run the application and I checked if the method
org.hibernate.dialect.MySQL5InnoDBDialect#supportsCascadeDelete()

is really called (it is). I am using spring-boot-parent version 1.4.3, which uses Hibernate 5.11. Any ideas? I do not want to use a bi-directional relationship by the way.
Edit
Thanks to @AlanHay I discovered that I omitted an important part. There actually is a third class involved
class Kindergarten {

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Long id;

    @OneToMany(mappedBy = "kindergarten", fetch = FetchType.EAGER)
    @MapKeyJoinColumn(name = "parent_id") // parent_id causes the problem!
    private Map<Parent, Child> children;
}

and Child with Kindergarten looks actually like this
class Child {

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Long id;

    @ManyToOne(optional = false)
    @JoinColumn(name = "parent_id")
    @OnDelete(action = OnDeleteAction.CASCADE)
    private Parent parent;

    @ManyToOne
    @JoinColumn(name = "kindergarten_id")
    private Kindergarten kindergarten;
}

and that is why the problem occurs. If you change "parent_id" in the MapKeyJoinColumn annotation to something not existing in Child as a column e.g. "map_id" the ON DELETE CASCADE is added to the foreign key parent_id in Child. If the parameter is the Child's column "parent_id" the ON DELETE CASCADE part will not be appended. Unfortunately the reason for this is not yet clear to me. Changing the parameter is no option because I want to use the existing link to parent of the child object.

A:

Maybe a little late, but since it is one of the top posts when searching for 'hibernate ondelete generate cascade':
For some reason putting @OnDelete on the ManyToOne side in Mysql did not work for me, but it worked on the OneToMany side. So if you are unlucky, try it on the other side.


Q:

What are irreducible factors?

What are Irreducible factors?
I have to solve this question:

Find the irreducible factors of $x^4 + 5x^3 + 8x^2 + 9x + 10$ in ${\bf Z}_{11} [x]$.

I couldn't find any websites that explained this clearly and our course notes aren't that helpful.
I'm pretty confused so any help would be great.

A:

Note that $1 \in \mathbb{Z}_{11}$ is a root of this polynomial $f(x)$, hence $(x-1)\mid f(x)$. Check that
$$
g(x) := \frac{f(x)}{(x-1)} = x^3 +6x^2 +3x +1
$$
Also, $1$ is a root of $g(x)$, so $(x-1)\mid g(x)$. And
$$
h(x) := \frac{g(x)}{(x-1)} = x^2 +7x + 10
$$
Now can you check if this factors?


Q:

Karnaugh map software for Ubuntu that accepts formula

Anybody knows of a Karnaugh map software for Ubuntu where I can input a Boolean formula e.g A+B(C+D) and the software translates it into a Karnaugh map?

A:

You can use karnaugh map minimizer (KMAP)
Read more about here
download from here
Also you can use Karnaugh Map Analyzer
read about here
downlaod from here
Hint: You can still use the windows tools you know using Wine


Q:

Why don't we define neighbourhoods to be open sets?

There seems to be two common definitions of neighborhoods of a point- an open set containing the point, or an set containing an open set which itself contains that point. Why don't we just use the former definition, it seems so much simpler? What do we gain from the latter?

A:

Sometimes it's more convenient to have the more general definition : topologists talk about "closed neighbourhoods of a point", e.g. A space $X$ is regular iff every open neighbourhood of a point contains a closed neighbourhood of that point. Also, local compactness is often defined as "every point has a compact neighbourhood". These ways of defining the notions make it easy to have a general definition. It also nicely singles out the open sets: a set $A$ is open iff $A$ is a neighbourhood of $x$ for all $x \in A$.
Also, as @GEdgar notices in a comment, it's convenient to have the set of all neighbourhoods of a point be a so-called filter, and to make it closed under supersets we need the general definition too.
In short, it's not necessary, but it is convenient. And we can define things how we like, as long as it's clear what we mean.

A:

It's a matter of convenience. Some times you need to talk about open sets containing the point, and some times you need to speak about sets containing an open set containing the point. So we need one name for each concept. We can (basically) choose between

Neighbourhood & set containing a neighbourhood
Open neighbourhood & neighbourhood

I personally think the second pair of names is more appealing, overall. So I would go for "neighbourhood of a point" meaning "a set which contains an open set which contains the point". Others may disagree, and they would think that "open set which contains the point" is a better definition.


Q:

How to dissmiss dialog on single click?

I am using a dialogbox contains list of StringArray.
I wants to dissmiss dialog on single click on item of StringArray.
But it is dissmissed after double click.
Thanks.
final Dialog dialog = new Dialog(Disease.this);
            dialog.setCancelable(true);
            dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
            final ListView listSpecialityView = new ListView(Disease.this);
            listSpecialityView.setCacheColorHint(Color.TRANSPARENT);
            listSpecialityView.setAdapter(adapter_list);

            listSpecialityView
                    .setOnItemClickListener(new OnItemClickListener() {

                        public void onItemClick(AdapterView<?> arg0, View arg1,
                                int arg2, long arg3) {
                            // TODO Auto-generated method stub
                            // Txt_Speciality.setText(Speciality_array[arg2]
                            // .toString());
                            // String id = String.valueOf(arg2);
                            if(immunString.equalsIgnoreCase("immun")){
                                data = immunizationsStrings[arg2];
                            }else {
                                data = Drugs[arg2];
                            }

                            showDialog(1);
                            dialog.dismiss();

                            //dialog.dismiss();
                        }
                    });
            dialog.setContentView(listSpecialityView);
            dialog.show();

A:

Change the order of calls on  listSpecialityView. Try setting adapter after setting the click listener .
Also in click listener, call showDialog(1) after calling dialog.dismiss()


Q:

Android Studio add test folder or module to existing project

I want to add testing to my android app in Android Studio 1.4. When I try to create and add them to /test folder under a root folder they aren't executed. Also, I tried to create a separate module for tests but there are no Test Module in a wizard. How can I add and run Junit tests?
Thank you in advance.

A:

https://stackoverflow.com/a/28630023/4955008
This helped me a lot, Studio recognized folder as a test and it passed.


Q:

Where to store files on server so they are not accessible through a browser?

When reading through questions and answers regarding maintaining security when allowing users to upload files to your server, some of the answers said to store the file in a location not accessible by a browser, and "above the document root".
If I had a site running in 'var/www/' such as:
var/www/MySite/Index.html
Does "above the document root" mean above the MySite folder, but still in the var/www folder, or does it mean in a seperate location from var/www altogether, somewhere else entirely on the server host's file system?
Also, why is it that making a file innaccessible from a browser makes it more secure? Thanks.

A:

I generally do not worry too much about moving certain files outside the www folder, because if your www folder is vulnerable (whether through apache or other means) you have a number of other problems, and those files are accessible anyways.  Moving it outside the www folder also has an effect on portability of the application, as most hosting companies do not allow access beyond your user www folder anyways.
Enabling Override in apache and placing a .htaccess file with the following contents within any folder you want restricted is recommended:
Order deny,allow
Deny from all

This way your application is self-contained and portable.
Apache2.4 and PHP5.5 are further hardened against issues involving access and execution of unwanted code on an OS level, so I also recommend using the latest versions of these packages where possible.


Q:

Diff. Eq. With Power Series

Is there a way to solve differential equations using power series?
Also, can you represent a derivative as a sum?

A:

Assume you are given an IVP
$$y'(t)=f\bigl(t,y(t)\bigr),\quad y(0)=0\ ,\tag{0}$$
where the given right hand side $f(t,y)$ can be expanded into a double power series in its variables:
$$f(t)=\sum_{j\geq 0, \>k\geq 0} c_{jk}t^j y^k\qquad\bigl(|t|<\delta, \>|y|<\delta\bigr)\ .\tag{1}$$
Then you can make the "Ansatz"
$$y(t)=\sum_{r\geq1} a_r t^r\tag{2}$$
with unknown coefficients $a_r$ $(r\geq1)$. Plugging this "Ansatz" into $(1)$ and comparing coefficients of $t^r$ for $r=1, \ 2,\ 3,\ldots$ you will obtain finitary recursion formulas for the $a_r$ in terms of the $a_l$ with $l<r$. The resulting power series $(2)$ then is indeed the solution to the given IVP $(0)$.


Q:

How to use GetPropertyValueSafely from CommonLibrary.NET?

When using the CommonLibrary.Net, how does one use the GetPropertyValueSafely() function correctly?
I want to do something like this:
public static string APP_TITLE = ComLib.ReflectionHelper.GetPropertyValueSafely(Application.ProductName);

but I need to add a second parameter, and I don't understand enough yet to know what is asked for.  Here is the syntax usage from the documentation file:
public static Object GetPropertyValueSafely(
    Object obj,
    PropertyInfo propInfo
)

This are the parameter requirements:

Parameters obj Type: System..::..Object Object whose property is to be retrieved.
propInfo Type: System.Reflection..::..PropertyInfo Property name.

So what do I put for object?  I tried this, too:
public static string APP_TITLE;
ComLib.ReflectionHelper.GetPropertyValueSafely(APP_TITLE, Application.ProductName);

but that's not the answer either.
I also tried this:
public static string APP_TITLE = ComLib.Reflection.ReflectionUtils.GetPropertyValue((object)APP_TITLE, Application.ProductName).ToString();

...which compiles, but it throws a runtime type error from the library.
Thanks for the help (I'm just starting to get this stuff into my head).

A:

Try something like this:
public static readonly string APP_TITLE = (string)ComLib.ReflectionHelper.GetPropertyValueSafely(new object(),
    ComLib.Reflection.ReflectionUtils.GetProperty(typeof(Application), "ProductName"));

NB: Technically, passing new object() to the PropertyInfo's GetValue method should throw a TargetException. However, since this is a static property, it seems to work.


Q:

Change div content by clicking a word/link with Javascript

I am basically trying to have a word (page 2) be clickable and act as a link to display different div content.  When they select option 2, then click the next button, they should be able to click "Page 2" test and cause that to display the id="test1" (Choice 1, Page 1) content.  I have tried a few  variables but haven't been able to get any to work.  The best I could do is get it to take you back to the choice options, but I'd like to eliminate any users error and just go straight to the first page of the choice they should have made.
Any help would be grateful. And sorry, JQuery is not an option.
<!DOCTYPE html>

<title>Test2</title>

This is a test of the radio buttons

<form>

    <input type="radio" name="grp1" id="1">1

    <input type="radio" name="grp1" id="2">2

    <input type="button" name="button" value="Next" onClick="nextPage()">

</form>

Choice 1
Page 1

  <input type="button" value="Reset" id="reset_form" onClick="formReset()">

Choice 2
Page 1

  <input type="button" value="Next" id="page_choice" onclick="otherPage()">
  <input type="button" value="Reset" id="reset_form" onClick="formReset()">

You should have chose
Choice 1

<input type="button" value="Reset" id="reset_form" onClick="formReset()">

A:

I think this is what you may be looking for
function showPage(id)
{
     document.getElementById(id).style.display = 'block';
}

Choice 1


Q:

How to disable the JSP validation in Eclipse helios?

I have a Maven project set up in my Eclipse Helios 3.6. It builds and deploys perfectly fine. But it shows a red mark on my project and shows a lot of JSP issues. I want to somehow get rid of these JSP validation issues in problem view. One example of JSP issue is ArrayList can not be resolved to a type.
    What I have done for this is  inside window->preferences->web->jsp files->validation I have unchecked the validate  jsp fragments Apart from this I right clicked
    On my project. Go to Properties->Validations then checked suspend all validator check box but stiil i see same issues in problem view and see red mark on my project?

A:

I do similar as Aravind but I do it on the general settings: Preferences > Validation. Here I deselect all 'Build' checkboxes but leave the 'Manual' select for when I want to manually validate a JSP, XML, ... .


Q:

Mootools: How to stop browser from freezing when Request is sent

i am developing an application.
On a form submit i am sending a request to server using Request class in mootools.
but when i click on submit button it freezes browser, till the response comes from server.
The ResponseText is sent to a custom function responseProcessor() for processing on it.
The Request Object is like:
 req = new Request({
    async: true, method: 'post',
    onSuccess: function(html) { responseProcessor(); },
    onFailure: function() { alert('Page Loading Failed ....!!'); },
 });
 req.send({url: "js/jsCode.php"});

I cant figure out why browser is freezing while Request takes place?

A:

your request is synchronous, so the browser will freeze until the request completes.
set async: true to resolve this


Q:

Clarification regarding storage account in web applications

I have an on-premises mvc application with a database calls to one more server.
When I deploy this application to windows azure, I am curious to know what will be stored in the storage account for this cloud service?
Is it database records or something else?

A:

Given you mentioned creating a Cloud Service (so, I'm assuming Web Role for your MVC app): The deployment needs a storage account, at a minimum, for storing diagnostic log information, as well as your cloud service package and configuration.


Q:

compile find a bad version of gradle

I use spring boot 2. In a multi java project.
I try to build my main library (no yet java file)
apply plugin: 'java-library-distribution'

plugins {
    id 'org.springframework.boot' version '2.0.0.M7'
}

repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
}

dependencies {
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.0.0.M7'
    compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
        testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.0.M7'
}

distributions {
    main{
        baseName = 'common-model'
    }
}

sourceCompatibility = 1.8

tasks.withType(JavaCompile) {
    options.compilerArgs = ["-Xlint:unchecked", "-Xlint:deprecation", "-parameters"]
}

In my gradle/wrapper, i have
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip

error i get

caused by: org.gradle.api.internal.plugins.PluginApplicationException:
  Failed to apply plugin [id 'org.springframework.boot']
Caused by: org.gradle.api.GradleException: Spring Boot plugin requires
  Gradle 4.0 or later. The current version is Gradle 2.13

i don't find any 2.13 version
In my main project i have
buildscript {
    ext {
        springBootVersion = '2.0.0.M7'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

mainClassName = 'com.zirgon.EmailApplication'

group = 'com.zirgon'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

tasks.withType(JavaCompile) {
    options.compilerArgs = ["-Xlint:unchecked", "-Xlint:deprecation", "-parameters"]
}

repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-data-jpa')

    compile project(':common-model')
    compile('org.springframework.boot:spring-boot-starter-mail')

    compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

A:

It's possible you might be building the project with gradle installed locally instead of using the wrapper i.e. using gradle build instead of ./gradlew build.

A:

These are the steps I took to fix the same problem.

I had a new project with a build.gradle file, but did not have a copy of gradle wrapper in my project directory. I think this caused the default gradle version for my IDE to be used (IntelliJ) and this is an older version.
Gradle was already installed on my system.
Ran "gradle wrapper" in my project directory.
Edited ./gradle/wrapper/gradle-wrapper.properties and made sure "distributionUrl" was pointed at the gradle version I wanted (4.6 in my case).
Reran my build and the correct version was then downloaded and installed. Problem fixed.

I hope this helps someone!
I copied my gradle wrapper folder over from another project, and edited ./gradle/wrapper/gradle-wrapper.properties


Q:

Magento 2 - How to add a custom column in customer grid

I am using below code to add a column in customer grid in admin.
/app/code/Namespace/Module/view/adminhtml/ui_component/customer_listing.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="magcustomer_customer_approve" class="Namespace\Module\Ui\Component\Listing\Column\Showisapproved">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="editor" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Is Approved</item>
                    <item name="sortOrder" xsi:type="number">51</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

/app/code/Namespace/Module/Ui/Component/Listing/Column/Showisapproved.php
<?php
namespace Namespace\Module\Ui\Component\Listing\Column;

use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;

class Showisapproved extends Column
{
    /**
     *
     * @param ContextInterface   $context
     * @param UiComponentFactory $uiComponentFactory
     * @param array              $components
     * @param array              $data
     */
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        array $components = [],
        array $data = []
    ) {
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }

    /**
     * Prepare Data Source
     *
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                $item[$this->getData('name')] = 0;//Value which you want to display
            }
        }
        return $dataSource;
    }
}

magcustomer_customer_approve is customer attribute created using below code.
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        /** @var CustomerSetup $customerSetup */
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        /** @var $attributeSet AttributeSet */
        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

        $customerSetup->addAttribute(Customer::ENTITY, 'magcustomer_customer_approve', [
            'type' => 'int',
            'label' => 'Is Approved',
            'input' => 'select',
            'required' => false,
            'visible' => true,
            'user_defined' => true,
            'sort_order' => 1001,
            'position' => 1001,
            'system' => 0,
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'adminhtml_only'=>1,
            'default'=>0
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'magcustomer_customer_approve')
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ['adminhtml_customer'],
        ]);

        $attribute->save();

    }

If I don't use Magecoder\Magcustomer\Ui\Component\Listing\Column\Showisapproved, the custom column comes blank.

But if I use then I need to fetch using customer model in function prepareDataSource because variable $dataSource does not contain value of custom column. Is it possible to show values without fetching data again?

Also when filter is used a SQL error is generated.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'magcustomer_customer_approve' in 'where clause'
, query was: SELECT COUNT(*) FROM `customer_grid_flat` AS `main_table` WHERE (`magcustomer_customer_approve
` = '1') AND (`magcustomer_customer_approve` = '1') AND (`magcustomer_customer_approve` = '1') AND (
`magcustomer_customer_approve` = '1') AND (`magcustomer_customer_approve` = '1')

A:

Solution for Magento 2.1

Add the attribute to the customer grid index:
etc/indexer.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="customer_grid">
        <fieldset name="customer">
            <field name="magcustomer_customer_approve" xsi:type="filterable" dataType="int"/>
        </fieldset>
    </indexer>
</config>

Note that the "indexer" and "fieldset" elements only have the "id" and "name" attributes respectively. The structure is merged into the existing indexer.
Mark the attribute as "used in grid"
In the installer:
        'is_used_in_grid' => true,

otherwise you will get another SQL error during indexing, because the indexer looks for the column in the customer_entity main table:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.magcustomer_customer_approve' in 'field list'

A:

Finally got the solution : We need to create indexer.xml file in /etc/di folder.
Main thing is view_id in view_id we need to pass "coloumn_name" which we need to show in grid.
For example here i need to display nickname so i have passed "nickname" in view_id.
<?xml version="1.0"?>
<!--
/**
 * Copyright Â© 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="customer_grid" view_id="nickname" class="Magento\Framework\Indexer\Action\Entity" primary="customer">
        <fieldset name="customer" source="Magento\Customer\Model\ResourceModel\Customer\Collection"
                  provider="Magento\Customer\Model\Indexer\AttributeProvider">
            <field name="nickname" xsi:type="filterable" dataType="varchar"/>
        </fieldset>
    </indexer>
</config>

It works on Magento 2.1.4


Q:

pigpio spiXfer in C++

I'm trying to communicate with MCP3008 ADC via SPI using "pigpio" library. Basically I'm trying to read an IR Sensor and I've managed to do it manually by sending the required signals but I can only read distances from 5 to 15 cm instead of 5 to 30 cm (I already tested in Arduino and It works fine), so I'm trying another approach. The only problem I have is that in "pigpio" we have the spiXfer() function to read and write from/to the ADC but I don't understand how the rxBuf and txBuf works, since they are char types.
I would appreciate some help in how to read and write the bytes needed for this communication between the RPi and the ADC.

A:

Using a char type to hold bytes is fairly common in C.  char is one of the basic C types and holds one byte.
Here is some C code to read channel 0 of the MCP3008.  The example should make clear how the functions are used.
#include <stdio.h>
#include <stdlib.h>

#include <pigpio.h>

/*
   gcc -pthread -o mcp3008 mcp3008.c -lpigpio
*/

int main(int argc, char *argv[])
{
   int i;
   int h;
   int v;
   int loops;
   int speed;
   double start, diff, sps;
   unsigned char buf[3];

   if (argc > 1) loops = atoi(argv[1]);
   else loops = 1000000;

   if (argc > 2) speed = atoi(argv[2]);
   else speed = 1000000;

   if (gpioInitialise() < 0) return 1;

   h = spiOpen(0, speed, 0);

   if (h < 0) return 2;

   start = time_time();

   for (i=0; i<loops; i++)
   {
      buf[0] = 1;
      buf[1] = 128;
      buf[2] = 0;

      spiXfer(h, buf, buf, 3);

      v = ((buf[1]&3)<<8) | buf[2];

      printf("%d\n", v);
   }

   diff = time_time() - start;

   fprintf(stderr, "sps=%.1f @ %d bps (%d/%.1f)\n",
      (double)loops / diff, speed, loops, diff);

   spiClose(h);

   gpioTerminate();

   return 0;
}


Q:

How to redirect after successful Async call with react-router?

I am using the react-router to navigate through my react/flux application.

Where I still have problems is: How is the best way to redirect to a new page (or just change the URI params) after a successful API
  call?

I have a API.js, where my async-calls are (with superagent). The actual call is done in my app-actions.js:
createWorkspace( workspace ) {
    Api.createWorkspace( workspace )
      .then(function( workspace ) {
        dispatch({ actionType: AppConstants.CREATE_WORKSPACE, workspace });
        history.replaceState('/workspace/' + workspace.body.data._id);
      }, function(error) {
        dispatch({ actionType: AppConstants.FAILED_TO_CREATE, error });
      });
  }

I am dispatching the success or failure event. So everything is according to the flux pattern.
As you can see, I am using history.replaceState to change the URL. But it is replacing all of the things, including the Hash.
To be honest, it's a nightmare. I am finding ES5 with react 0.13 things, I find ES6 with react-router 0.14 and ES6 with react-router 1.0 solutions.
I even don't remember where I found this history.replace method.
What I am using

React 0.14
react-router 1.0
ES6 syntax

Can somebody please tell me where my problem is? Why is the most straight forward ToDo, redirecting, such a huge deal? Should I just use plain JavaScript here and manipulate the browser url by my own?

A:

It took me a while to figure it out what the best practice could be. So here is how I've done it.
Create a history.js file
import createBrowserHistory from 'history/lib/createBrowserHistory'

export default createBrowserHistory();

And then, the not so nice solution, I have to replace the whole URL, so I have to take care of the hash sign while creating the new one:
history.replaceState(null, '#/workspace/' + workspace.body.data._id);

So here is my AppActions.js:
import AppConstants from '../constants/app-constants';
import { dispatch, register } from '../dispatchers/app-dispatcher';
import Api from '../lib/api';
import history from '../lib/history'

export default {
  addRestaurant ( restaurant ) {
    dispatch({ actionType: AppConstants.ADD_RESTAURANT, restaurant });
  },
  removeRestaurant ( restaurant ) {
    dispatch({ actionType: AppConstants.REMOVE_RESTAURANT, restaurant });
  },
  createWorkspace( workspace ) {
    Api.createWorkspace( workspace )
      .then(function( workspace ) {
        dispatch({ actionType: AppConstants.CREATE_WORKSPACE, workspace });
        history.replaceState(null, '#/workspace/' + workspace.body.data._id);
      }, function(error) {
        dispatch({ actionType: AppConstants.FAILED_TO_CREATE, error });
      });
  }
}

Working solution is here.


Q:

Technical debt report

I've been asked to create a report about the technical debt of an application, but I haven't receive further guidelines about its elaboration. I'll be assisted by Sonar code analysis tool.
My main doubt is: What fields would be useful to include in the report? I mean, what metrics, parameters, findings, suggestions, etc. would be the most important in such a report?

A:

When someone asks me to do something and I have questions about what they want, I go back and ask them.  That's the most direct way to get an answer.
As a manager, I would want these fields:

description, i.e. what's the issue and why it's a problem
amount of risk if not fixed
pervasiveness
level of effort to fix, including testing effort
associated bug numbers, if any

Note also that technical debt, as I've heard the term used, is a broader area that the set of problems a code analyzer will identify for you.

A:

In addition to user246's suggestions, I'd also recommend looking at these areas:

presence/absence of unit tests
effectiveness of unit tests (that is, do the unit tests cover more than the code paths - they should be covering all the potential logical boundaries as well)
presence/absence of higher-level automated tests (including system, API, GUI, integration...)
effectiveness and coverage of higher-level automated tests - as with unit tests this is more than simply how much of the code base the higher-level automated tests cover
areas of the application where customer-reported bugs cluster - this won't be found by a code analyzer, but it's usually a good pointer to areas of the application that have a high level of technical debt.

I also second user246 about the importance of talking to your manager/lead to find out more about what they want to see in the report. You've got a very broad task here: your manager could want a detailed analysis, or they could be looking for a thumbnail guide to where they need to focus improvement efforts.
Regardless, I strongly suggest talking to the developers and testers - anyone who has worked with the application for any length of time will have a good idea where the problem areas are. In my experience, the problem areas in an application are the areas with the greatest technical debt.


Q:

IGCSE Maths: Fractions Problem

I am currently trying to study for my IGCSE maths paper... I am stuck on this question ... can anybody help??
If 3/5 of people in a theatre buy a snack during interval, and of those who buy a snack 5/7 buy ice cream, what fraction of the people in the theatre buy ice cream??

A:

Note for the future: generally, people on Math.SE don't like it when you ask 'homework questions' if you don't show your attempts. It also helps to provide some context, though the degree to which this is necessary varies from question to question. In this case, you mentioned that it was from an IGCSE maths paper, which to me is enough context for people to gauge what level of mathematics you are working at, meaning that people can tailor their responses.
Now that is out of the way, here is a hint to your question:
What we are looking to do is translate this wordy problem into an equation that we can manipulate. Pay attention to the details: '$3/5$ of people in a theatre buy a snack during an interval'. In other words, for every $5$ people, $3$ of them buy a snack. Now, what is $5/7$ of $\frac{3}{5}$? Pay attention to which operator ($+,-,\div,\times)$ you are using when you calculate the answer.


Q:

Full page reload (Ctrl+F5) maintain scroll position in Firefox

Is it possible to maintain scroll position when making a full page reload (CTRL+F5) in Firefox instead of jumping to the top of the page?
When I make a full page reload in Chrome it maintain the scroll position.

A:

If you open up the Network Monitor using CTRL+SHIFT+E and check the "Disable cache" checkbox, Firefox should maintain scroll position upon refreshing using just the F5 key.


Q:

Bit not operation in PHP(or any other language probably)

Why does this code return -1 ?

$a = 0;
echo ~$a;

Isn't not suppose to revert the bits ?

A:

If you set all the bits on a two's complement integer then you get −1.
Let me illustrate with a (very tiny) two-bit signed integer using two's complement:
00 →  0
01 →  1
10 → −2
11 → −1

This is just counting up from 0, past the overflow from 1 to −2 and ending at −1. As you can see, if you clear all bits you get 0, if you set them all, you get −1 (regardless of how wide the integer is).
(Mind you, people using BASIC knew this already, as there were no boolean operators and things work just as well with bitwise operators, except that True is −1 instead of 1.)

A:

That zero is actually being represented by 32 zero bits, as PHP integer types are 32-bit signed integers, and not single bits:
0000 0000 0000 0000 0000 0000 0000 0000

So bitwise NOT flips all of them, resulting in the two's complement of -1 (with the leftmost one representing the sign):
1111 1111 1111 1111 1111 1111 1111 1111


Q:

Get preferences in AppWidget Provider

I seem to be having trouble reading preferences from my AppWidgetProvider class. My code works in an Activity, but it does not in an AppWidgetProvider. Here is the code I am using to read back a boolean:
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
boolean autoreplyon = settings.getBoolean("autoreplyon", false);

However, I get the "The method getSharedPreferences(String, int) is undefined for the type widget" error (widget is the name of my AppWidgetProvider class).
Thanks in advance for any suggestions!

A:

getSharedPreferences(), should you choose to use it, is only available on subclasses of Context, like Activity or Service. AppWidgetProvider is a subclass of BroadcastReceiver, which is not a Context.
That being said, if you are going to use the PreferenceScreen system, or if you are not certain that it's gotta gotta gotta be getSharedPreferences(), I would use PreferenceManager.getDefaultSharedPreferences() instead. Those are the SharedPreferences that PreferenceScreen/PreferenceActivity will use.

A:

You should have been passed a context in widget's onUpdate() method so you can call context.getSharedPreferences().
For per-appwidget preferences, I have used this:
public static String getSharedPreferencesNameForAppWidget(Context context, int appWidgetId) {
    return context.getPackageName() + "_preferences_" + appWidgetId;
}

public static SharedPreferences getSharedPreferencesForAppWidget(Context context, int appWidgetId) {
    return context.getSharedPreferences(
        getSharedPreferencesNameForAppWidget(context, appWidgetId), 0);
}


Q:

Getting a 400 when using http client.request in nodejs

I'm trying to fetch some data from a server using nodejs. I would like to send a POST data. There are two things that I would like to know about.

How do I send the POST data?
Whatever request I make using GET or POST, I always get a 400-BadRequest error. Have been searching through to solve this the whole day. Was not able to solve.

I'm sending the POST data now like request.write(JSON.stringify({key:"value"})); .. for which I'm always getting a 400 to whatever site I try this. Even on apache running at 127.0.0.1 on a php file that accepts the POST data.

A:

This question was answered in another SO thread: How to make an HTTP POST request in node.js?
Essentially:
use require('http');
set 'Content-Type': 'application/x-www-form-urlencoded' in the options
In the callback, use res.on('data', ...) to transfer the posted info.


Q:

Update database schema in Entity Framework

I installed VS SP1 and played around with Entity Framework.
I created a schema from an existing database and tried some basic operations.
Most of it went well, except the database schema update.
I changed the database in every basic way:

added a new table
deleted a table
added a new column to an existing table
deleted a column from an existing table
changed the type of an existing column

The first three went well, but the type change and the column deletion did not followed the database changes.
Is there any way to make is work from the designer? Or is it not supported at the moment? I didn't find any related material yet, but still searching.

A:

I would guess that possibly those don't happen because they would break the build for existing code, but that's just a guess on my part.
Here's my logic:
First, EF is supposed to be more than 1:1 table mapping, so it's quite possible that just because you are deleting a column from table A doesn't mean that for that entity, there shouldn't be a property Description. You might just map that property to another table.
Second, changing a type could just break builds. that's the only rationale there.

A:

I've found that, in general, there are still quite a few bugs with the 'Update Model from Database' functionality.
Keys are the killer for me - I've yet to have any modification I make to a foreign-key relationship or to add a Primary Key to a table and have the updater work correctly (in that it will give a compile error on the generated code) - but to solve the problem it's a simple matter of deleting the model and re-importing (only takes a minute) - this is less than ideal obviously, but I've never had a failure from a 'fresh' import.


Q:

vscode.workspace.workspaceFolders Returning Error. Vscode extensions

I was coding an extension for vscode when I came across an error which I don't know how to fix. I am trying to make a script in which creates a file based on some inputs but when I am trying to get the path for the new file it returns an error! Here's the code:
let command3 = vscode.commands.registerCommand('command-bot.createFile', () => {
    var fileName = vscode.window.showInputBox({
        placeHolder: "Name your file"
    });
    var fileExt = vscode.window.showInputBox({
        placeHolder: "What is the extention example: .py or .html"
    });
    const folderPath = vscode.workspace.workspaceFolders[0].uri.toString().split(":")[1];
            //The code above caused the error! Error: Object is possibly 'undefined'
});

A:

workspaceFolders is only available when the user opens a workspace, but not if the user merely opens a folder.
So you might try to use something similar to below,
        let path: string;
        if (!workspace.workspaceFolders) {
            path = workspace.rootPath;
        } else {
            let root: WorkspaceFolder;
            if (workspace.workspaceFolders.length === 1) {
                root = workspace.workspaceFolders[0];
            } else {
                root = workspace.getWorkspaceFolder(resource);
            }

            path = root.uri.fsPath;
        }

https://github.com/vscode-restructuredtext/vscode-restructuredtext/blob/128.0.0/src/features/utils/configuration.ts#L154


Q:

How to add active class in tab-pane portfolio item in wordpress?

I am making a dynamic portfolio section in wordpress. Site live link is here http://www.nayeemriddhi.info/testproject/portfolio/.
But the fact is when i open a portfolio item and select item from left side, for the first portfolio image it is working, the view portion of right side.but for the second and third image view portion of right side it is not working. although it has been added active class in static in code,it is working for the first image, why i don't know.Now i want to add active class dynamically in query3 loop portion for that item. Is it possible to add. the code is below....

  <?php
    args = array(
       'post_type' => 'custom_portfolio',
       'posts_per_page' => '-1',
        );
      // the query
        $query = new WP_Query( $args );
         // The Loop
         if ( $query->have_posts() )  ?>
          <?php while ( $query->have_posts() ) : $query->the_post() ; ?>

                  <a class="trigger" data-iziModal-open="#modal<?php the_ID(); ?>">
           <img src="<?php echo get_post_meta(get_the_ID(), 'portfolio_image', true);   ?>">

              <div id="modal<?php the_ID(); ?>" class="iziModal portfolio" data-izimodal-title="Portfolio Title" data-izimodal-subtitle="Web Design" style="max-width: 1200px important;">

                      <?php

                        $args2 = array(
                        'post_type' => 'custom_portfolio',
                        'posts_per_page' => '6',
                          );
                         // the query
                         $query2 = new WP_Query( $args2 );
                          // The Loop
                         if ( $query2->have_posts() )  ?>
                        <?php while ( $query2->have_posts() ) :
                          $query2->the_post() ; ?>

                        <a  href="#<?php the_ID(); ?>b" data-toggle="tab">
                                  <img src="<?php echo get_post_meta(get_the_ID(), 'portfolio_image', true);   ?>" class="portfolio-thumb"/>

             <?php endwhile; wp_reset_query();  ?>

         Launch Website

Request a Quote

                          <?php

                        $args3 = array(
                        'post_type' => 'custom_portfolio',
                        'posts_per_page' => '-1',
                          );
                         // the query
                         $query3 = new WP_Query( $args3 );
                          // The Loop
                         if ( $query3->have_posts() )  ?>
                        <?php while ( $query3->have_posts() ) :
                          $query3->the_post() ; ?>
                          <div class="tab-pane active" id="<?php the_ID(); ?>b">
                              <img src="<?php echo get_post_meta(get_the_ID(), 'portfolio_image', true);   ?>" class="img-responsive"/>

                        <?php endwhile; wp_reset_query();  ?>

             <?php  endwhile; wp_reset_query();   ?>

Thanks for help....

A:

You have to change the IDs of the second and third modal. Currently you have the same ID everywhere and the image changes on the first one too.
Add another ID from the url that opens up the modal


Q:

os.path.isfile(os.path.abspath("adb.exe")) Return false

Why does os.path.isfile(os.path.abspath("adb.exe")) return false?
i have adb.exe in script dir same with os.path.isfile(os.path.abspath("fastboot.exe"))
but when i copy them to my python dir, and then start interactive shell, eg. os.path.isfile(os.path.abspath("adb.exe")) gives me True.
Or there is better way to validate if file exist in script dir.

A:

The reason os.path.isfile(os.path.abspath("adb.exe")) returns False is because when you run the script, python is actually running from its installation directory, not the script location.
If you want to get the current folder path you can use:
os.path.dirname(os.path.abspath(__file__))

or as @blakev suggested:
os.path.split(__file__)[0]

Thus you can check a file exists in the scripts location using:
os.path.isfile(os.path.dirname(os.path.abspath(__file__)) + os.sep + filename)

Note:
os.sep contains the appropriate separator used by your operating systems file system, so \ on Windows systems.
__file__ exists only when running a script file, it won't work just running python in the command line. It returns the full path and name of the script. As an example, running a script on my desktop called script.py it may return C:\Users\Nick A\Desktop\script.py


Q:

iTunes Connect Developer reject - Delete non needed build / binaries

I uploaded a binary update to the new iTunesConnect, but had not submitted. I found a bug, and tried to remove the existing binary - could not find a way to do that. I then submitted for review but immediately rejected it. Still can't see a way to delete it and upload a new one. How do I upload my new version? OR how do I cancel my update and start a new one?

A:

You don't need to reject Binaries anymore, just change the BUILD number to something higher 1.1 or something like that. Leave the version number the same.
Then it will let you upload it and you can select it from the list to add to your submission.
It took me a while to figure out but it's actually a much better solution than all the rejecting nonsense.

A:

You can't delete binaries that are uploaded. I had to developer reject couple of times and I had 6 of these binaries there. I selected one and then submittted for approval. There is no way to remove "non-needed" ones from this list


Q:

How to solve MySQL “The table is full” error 1114 with Amazon RDS?

I am trying to add a new column in a table and the query giving me this error 1114.
My RDS instance size is small. 1.7 GB memory, 1 ECU (1 virtual core with 1 ECU) Table i am trying to modify is having 5 Million rows and 7GB in size. Disk size of instance is 15GB (40% free).
Its critical time for us as we are stuck, AWS RDS not allowing access to all parameters of mysql configurations. How do i get rid of this problem?

A:

If you only have 40% of 15 GB = 6 GB free, you aren't going to be able to have two copies of a 7 GB table on the instance at the same time, whether you use ALTER TABLE (which usually creates an entire copy of the table and then replaces the existing table with it, as RolandoMySQLDBA explained) or create another table and insert the data.
It sounds like your instance doesn't have enough storage to do either.
You should be able to increase the available storage on a running instance from the management console by selecting the instance, choosing "Modify," changing the amount of storage allocated, and clicking "ok." See:

http://docs.amazonwebservices.com/AmazonRDS/latest/UserGuide/USER_ScalingStorage.html
I don't know how RDS handles this in the background, so I don't know if your database will become unavailable for a short time during the change.
This operation will warn you about potential performance degradation while the instance is being modified, but you should find that the instance remains available and accessible and that within a few minutes the operation is complete without any disruption of your instance's availability.

A:

Here is the Problem: Whenever you run ALTER TABLE, there must be a temp table used. The temp table is not being written to your data folder. It is most likely written to /rdsdbdata/tmp. Please this query
SHOW VARIABLES LIKE 'tmpdir';

This will give you an idea where that folder is. Again, by default, it is /rdsdbdata/tmp.
Why would that halt things for mysqld? Blame it on MyISAM. Why MyISAM? Here is something to consider: According to MySQL 5.0 Certification Study Guide,

bulletpoint #11 says the following on Pages 408,409 Section 29.2:

If you run out of disk space while adding rows to a MyISAM table, no
  error occurs. The server suspends the operation until space becomes
  available, and then completes the operation.

When you run out of disk space, do not just shutdown or kill mysql. The count of the open file handles in any currently used MyISAM will not have been cleared. Thus, the MyISAM table is marked crashed. If you can free up disk space in the data volume with mysqld still running, mysqld will soldier on once disk space is made available. Please note that mysqld itself did not crash. It simply enters a state of suspended animation until free space materializes.
In your case, just kill the ALTER TABLE. The temp table, which uses MyISAM, simply locked up the disk space of /rdsdbdata/tmp. Killing the ALTER TABLE will get rid of the temp table and free up mysqld to continue with life as usual.
I have explained this in my past posts:

Mar 15, 2012 : Why do MySQL tables crash? How do I prevent it?
Apr 25, 2012 : Very Large Log Files

WHAT CAN YOU DO?
You may have to perform the ALTER TABLE yourself in manual stages.
For example, let's suppose you have this table:
CREATE TABLE ruchit_table
(
    id int not null auto_increment,
    field1 INT NOT NULL,
    field2 VARCHAR(20),
    primary key (id)
);

and you want to run ALTER TABLE ADD COLUMN field3 CHAR(5);
Here are the steps to perform this inside your datadir:
CREATE TABLE ruchit_table_new LIKE ruchit_table;
ALTER TABLE ruchit_table_new ADD COLUMN field3 CHAR(5);
INSERT INTO ruchit_table_new SELECT id,field1,field2 FROM ruchit_table;
ALTER TABLE ruchit_table RENAME ruchit_table_old;
ALTER TABLE ruchit_table_new RENAME ruchit_table;
DROP TABLE ruchit_table_old;

Note that

The temp table's location is in the datadir
Performed the ALTER TABLE

Added the new column to an empty temp table
Loaded the temp table
Got rid of the old table

These are things mysqld does internally with ALTER TABLE. These steps simply emulate this and does this emulation in the datadir.
Give it a Try !!!


Q:

Adding dynamic markup to menu items

In Drupal 7, how can I add additional dynamic markup to a menu item?  As an example, I'm trying to show the number of nodes 'needing attention' to the right of link in my primary navigation as noted in the attached graphic.
It seems like a theme function would be appropriate here, but I'm struggling to find which hook I should be implementing.

A:

Hope this will help you,

As answered theme_menu_link OR theme_menu_tree wil help you to do this. If you go through the above links you can get an idea to change the html of required menu item.

On page load:

for example im using theme_menu_link in template.php refer this code. Node count will be update on every page load, if any changes.
I have updated l() for you requirement. For example I have used a simple function , modify the function as per your requirement.
$output = l($element['#title'] . ''.get_node_count($parms).'', $element['#href'], array('html'=>TRUE));

function get_node_count($parms){
    //you code goes here for get node count
    return $node_cnt;
    }

If you don't want on page load, it can also be done using ajax callback, but not preferable to make ajax callback again and again.

If you want to do refer ajax callback, then the only change has to be done in the l(). Add the unique menu id, which is used to show the node count for the corresponding menu id.
$output = l($element['#title'] . '', $element['#href'], array('html'=>TRUE));

On sucessfull ajax callback you have to update the node count for each menu.
using
...
success: function(data) {
// Change node count
$('#menu_title__node_count').html(data);
}
You will get the class for each node count, you can style as required. And also you can add a common class for common style, based on your requirement.


Q:

How to access the related model without performing query

Here's what I am doing now:
Class Book{
    ....
    public int authorID { get; set; }
    [ForeignKey("AuthorID")]
    public virtual Author author { get; set; }

}

From a function where I get Book as input. In order to retrieve the author properties, I will have to call a query on Author by book.authorID even though I have Author as a property of Book.
public string getAuthor (int bookID){
    Book book = _db.Book.where(b => b.id == bookID).SingleOrDefault();
    int authorID = book.authorID;
    Author author = _db.Author.where(a => a.authorID == booking.authorID).SingleOrDefault();
    return author.name;
}

But I found this code unreasonably lengthy and I suspect there must be something that I missed so that I could not retrieve Author directly from the book instance like:
public string getAuthor (int bookID){
    Book book = _db.Book.where(b => b.id == bookID).singleOrDefault();
    // anyway to get book.author popuplated by this query?
    return book.author.name;
    //not working. book.author is null
}

Is this even possible?

A:

In order to retrieve the author properties, I will have to call a query on Author by booking.authorID even though I have Author as a property of Book.

No, you don't have that. You're in an API call, given the [FromBody] attribute. Every API call starts without any context of the previous one.
There's three possibilities:

You trust the client to provide Book.Author in their POST request. But you don't, because we never trust user input.
You query the information from the database, using the Book.Id input you receive in the POST request.
You cache the data somehow, and first try to obtain the relevant information from the cache, and if that fails, do #2 again.

That being said, a book can have multiple authors.


Q:

Angular Fullstack + CORS: XMLHttpRequest cannot load

I have been pulling my hair on this one.
I used the yeoman generator angular-fullstack to create a small angular app on a nodeJS server with Express. I am using a remote service so no api server side calls are written within my app.
Factory:
   var offerServiceURL = "https://www.example.com";
    angular.module("services", ['ngResource'])
    .factory('offerService', function($resource) {
        return $resource(offerServiceURL+'/offers/service/:action/:param1',
        {
            action: '@action'
        },
        {

            getOfferEligibility : {
                method: 'POST',
                params: {action:'get-offer-eligibility'}
            }
        });
    });

Controller:
angular.module('myApp')
.controller('myCtrl', function($scope, offerService){
   offerService.getOfferEligibility($scope.user, function(data){
         if(data.status == "SUCCESS"){
           ....
         }
   })
})

Chrome gives me a generic error:

XMLHttpRequest cannot load
  https://example.com/offers/service/get-offer-eligibility. No
  'Access-Control-Allow-Origin' header is present on the requested
  resource. Origin 'http://localhost.digitalink.com:9000' is therefore
  not allowed access.

The request header makes it to OPTIONS with the correct info:

Request Method:OPTIONS Status Code:200 OK Response Headers view source
  Access-Control-Allow-Credentials:true
  Access-Control-Allow-Headers:content-type
  Access-Control-Allow-Methods:GET, POST, OPTIONS
  Access-Control-Allow-Origin:http://localhost.digitalink.com:9000

However it breaks at POST and does not have the correct headers.
In fact, other people on my team are able to successfully access the service from their local machines using the same angular factory running on a webpage. I compared my headers with the headers on a successful POST. I am missing the Access-Control headers on my POST Request.
The only discrepancy I can think of is they are trying from Java apps with port 8080. Does that make a difference? Any insight will be helpful!

A:

The issue was not related to CORS problems on the client side. The answer is that the service did not like my data. If the data was bad, the API was returning bad CORS headers instead of sending a response that the data was bad.


Q:

How can I left and right align text to center?

I'm trying to align large text to both sides of the center of a page. For example:
Current Recommendation: Open
        Current Status: Closed

But imagine that text centered and larger.
The only way I've been able to accomplish this so far is with a table but I know that's the not a modern approach to web layouts. Here's the jsfiddle: https://jsfiddle.net/nyLLzy1m/3/
Is there a way to do this in HTML and CSS without a table? I've tried spans with float right and left but then the text floats all the way to the right or left, not right or left of center.

p {
    margin: 0;
}

Current Recommendation:

Open

Current Status:

Closed

A:

You can do this with display: flex;:

.centered {
  display: flex;
}

.centered .left {
  text-align: right;
  width: 50%;
}

.centered .right {
  text-align: left;
  width: 50%;
  padding: 0 0 0 10px;
  box-sizing: border-box;
}

    Current Recommendation:

    Open

    Current Status:

    Closed