text:
Q: Failing to build because of _OBJC_CLASS_$_UIViewController I think it might have to do with where  I am saving it and builds. Here are my errors:
These never happened before and they are probably more related to where I am building?
Undefined symbols:
  "_OBJC_CLASS_$_UIViewController", referenced from:
      _OBJC_CLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_CLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_CLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_CLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_CLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_CLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_CLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_CLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_CLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_CLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_CLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_CLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_CLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_CLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_CLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_CLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_CLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_CLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_CLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_CLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_CLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_CLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_CLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_CLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_CLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_CLASS_$_WinnerViewController in WinnerViewController.o
  "__objc_empty_cache", referenced from:
      _OBJC_METACLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_CLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_METACLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_CLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_METACLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_CLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_METACLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_CLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_METACLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_CLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_METACLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_CLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_METACLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_CLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_METACLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_CLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_METACLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_CLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_METACLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_CLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_METACLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_CLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_METACLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_CLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_METACLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_CLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_METACLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_CLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_METACLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_CLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_METACLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_CLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_METACLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_CLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_METACLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_CLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_METACLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_CLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_METACLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_CLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_METACLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_CLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_METACLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_CLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_METACLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_CLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_METACLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_CLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_METACLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_CLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_METACLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_CLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_METACLASS_$_WinnerViewController in WinnerViewController.o
      _OBJC_CLASS_$_WinnerViewController in WinnerViewController.o
  "_OBJC_METACLASS_$_UIViewController", referenced from:
      _OBJC_METACLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_METACLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_METACLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_METACLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_METACLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_METACLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_METACLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_METACLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_METACLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_METACLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_METACLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_METACLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_METACLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_METACLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_METACLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_METACLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_METACLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_METACLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_METACLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_METACLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_METACLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_METACLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_METACLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_METACLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_METACLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_METACLASS_$_WinnerViewController in WinnerViewController.o
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref-to-NSAutoreleasePool in main.o
  "_objc_msgSendSuper2", referenced from:
      -[StupidQuizAppDelegate dealloc] in StupidQuizAppDelegate.o
      -[StupidQuizViewController didReceiveMemoryWarning] in StupidQuizViewController.o
      -[StupidQuizViewController dealloc] in StupidQuizViewController.o
      -[Q2ViewController didReceiveMemoryWarning] in Q2ViewController.o
      -[Q2ViewController viewDidUnload] in Q2ViewController.o
      -[Q2ViewController dealloc] in Q2ViewController.o
      -[Q2WrongViewController didReceiveMemoryWarning] in Q2WrongViewController.o
      -[Q2WrongViewController viewDidUnload] in Q2WrongViewController.o
      -[Q2WrongViewController dealloc] in Q2WrongViewController.o
      -[Q3ViewController didReceiveMemoryWarning] in Q3ViewController.o
      -[Q3ViewController viewDidUnload] in Q3ViewController.o
      -[Q3ViewController dealloc] in Q3ViewController.o
      -[Q3WrongViewController didReceiveMemoryWarning] in Q3WrongViewController.o
      -[Q3WrongViewController viewDidUnload] in Q3WrongViewController.o
      -[Q3WrongViewController dealloc] in Q3WrongViewController.o
      -[Q4ViewController didReceiveMemoryWarning] in Q4ViewController.o
      -[Q4ViewController viewDidUnload] in Q4ViewController.o
      -[Q4ViewController dealloc] in Q4ViewController.o
      -[Q4WrongViewController didReceiveMemoryWarning] in Q4WrongViewController.o
      -[Q4WrongViewController viewDidUnload] in Q4WrongViewController.o
      -[Q4WrongViewController dealloc] in Q4WrongViewController.o
      -[Q5ViewController didReceiveMemoryWarning] in Q5ViewController.o
      -[Q5ViewController viewDidUnload] in Q5ViewController.o
      -[Q5ViewController dealloc] in Q5ViewController.o
      -[Q5WrongViewController didReceiveMemoryWarning] in Q5WrongViewController.o
      -[Q5WrongViewController viewDidUnload] in Q5WrongViewController.o
      -[Q5WrongViewController dealloc] in Q5WrongViewController.o
      -[Q1LoseViewController didReceiveMemoryWarning] in Q1LoseViewController.o
      -[Q1LoseViewController viewDidUnload] in Q1LoseViewController.o
      -[Q1LoseViewController dealloc] in Q1LoseViewController.o
      -[Q1ViewController didReceiveMemoryWarning] in Q1ViewController.o
      -[Q1ViewController viewDidUnload] in Q1ViewController.o
      -[Q1ViewController dealloc] in Q1ViewController.o
      -[Q6ViewController didReceiveMemoryWarning] in Q6ViewController.o
      -[Q6ViewController viewDidUnload] in Q6ViewController.o
      -[Q6ViewController dealloc] in Q6ViewController.o
      -[Q6WrongViewController didReceiveMemoryWarning] in Q6WrongViewController.o
      -[Q6WrongViewController viewDidUnload] in Q6WrongViewController.o
      -[Q6WrongViewController dealloc] in Q6WrongViewController.o
      -[Q7ViewController didReceiveMemoryWarning] in Q7ViewController.o
      -[Q7ViewController viewDidUnload] in Q7ViewController.o
      -[Q7ViewController dealloc] in Q7ViewController.o
      -[Q7WrongViewController didReceiveMemoryWarning] in Q7WrongViewController.o
      -[Q7WrongViewController viewDidUnload] in Q7WrongViewController.o
      -[Q7WrongViewController dealloc] in Q7WrongViewController.o
      -[Q8ViewController didReceiveMemoryWarning] in Q8ViewController.o
      -[Q8ViewController viewDidUnload] in Q8ViewController.o
      -[Q8ViewController dealloc] in Q8ViewController.o
      -[Q8WrongViewController didReceiveMemoryWarning] in Q8WrongViewController.o
      -[Q8WrongViewController viewDidUnload] in Q8WrongViewController.o
      -[Q8WrongViewController dealloc] in Q8WrongViewController.o
      -[Q9ViewController didReceiveMemoryWarning] in Q9ViewController.o
      -[Q9ViewController viewDidUnload] in Q9ViewController.o
      -[Q9ViewController dealloc] in Q9ViewController.o
      -[Q9WrongViewController didReceiveMemoryWarning] in Q9WrongViewController.o
      -[Q9WrongViewController viewDidUnload] in Q9WrongViewController.o
      -[Q9WrongViewController dealloc] in Q9WrongViewController.o
      -[Q11ViewController didReceiveMemoryWarning] in Q11ViewController.o
      -[Q11ViewController viewDidUnload] in Q11ViewController.o
      -[Q11ViewController dealloc] in Q11ViewController.o
      -[Q12ViewController didReceiveMemoryWarning] in Q12ViewController.o
      -[Q12ViewController viewDidUnload] in Q12ViewController.o
      -[Q12ViewController dealloc] in Q12ViewController.o
      -[Q13ViewController didReceiveMemoryWarning] in Q13ViewController.o
      -[Q13ViewController viewDidUnload] in Q13ViewController.o
      -[Q13ViewController dealloc] in Q13ViewController.o
      -[Q14ViewController didReceiveMemoryWarning] in Q14ViewController.o
      -[Q14ViewController viewDidUnload] in Q14ViewController.o
      -[Q14ViewController dealloc] in Q14ViewController.o
      -[Q10ViewController didReceiveMemoryWarning] in Q10ViewController.o
      -[Q10ViewController viewDidUnload] in Q10ViewController.o
      -[Q10ViewController dealloc] in Q10ViewController.o
      -[Q15ViewController didReceiveMemoryWarning] in Q15ViewController.o
      -[Q15ViewController viewDidUnload] in Q15ViewController.o
      -[Q15ViewController dealloc] in Q15ViewController.o
      -[WinnerViewController didReceiveMemoryWarning] in WinnerViewController.o
      -[WinnerViewController viewDidUnload] in WinnerViewController.o
      -[WinnerViewController dealloc] in WinnerViewController.o
  "_UIApplicationMain", referenced from:
      _main in main.o
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_METACLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_METACLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_METACLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_METACLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_METACLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_METACLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_METACLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_METACLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_METACLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_METACLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_METACLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_METACLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_METACLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_METACLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_METACLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_METACLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_METACLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_METACLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_METACLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_METACLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_METACLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_METACLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_METACLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_METACLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_METACLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_METACLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_METACLASS_$_WinnerViewController in WinnerViewController.o
  "_objc_msgSend", referenced from:
      _main in main.o
      _main in main.o
      _main in main.o
      -[StupidQuizAppDelegate application:didFinishLaunchingWithOptions:] in StupidQuizAppDelegate.o
      -[StupidQuizAppDelegate application:didFinishLaunchingWithOptions:] in StupidQuizAppDelegate.o
      -[StupidQuizAppDelegate application:didFinishLaunchingWithOptions:] in StupidQuizAppDelegate.o
      -[StupidQuizAppDelegate dealloc] in StupidQuizAppDelegate.o
      -[StupidQuizAppDelegate dealloc] in StupidQuizAppDelegate.o
      -[StupidQuizViewController Q1] in StupidQuizViewController.o
      -[StupidQuizViewController Q1] in StupidQuizViewController.o
      -[StupidQuizViewController Q1] in StupidQuizViewController.o
      -[StupidQuizViewController QSkip] in StupidQuizViewController.o
      -[StupidQuizViewController QSkip] in StupidQuizViewController.o
      -[StupidQuizViewController QSkip] in StupidQuizViewController.o
      -[Q2ViewController Q3] in Q2ViewController.o
      -[Q2ViewController Q3] in Q2ViewController.o
      -[Q2ViewController Q3] in Q2ViewController.o
      -[Q2ViewController Q2lose] in Q2ViewController.o
      -[Q2ViewController Q2lose] in Q2ViewController.o
      -[Q2ViewController Q2lose] in Q2ViewController.o
      -[Q2WrongViewController restart] in Q2WrongViewController.o
      -[Q2WrongViewController restart] in Q2WrongViewController.o
      -[Q2WrongViewController restart] in Q2WrongViewController.o
      -[Q3ViewController Q4] in Q3ViewController.o
      -[Q3ViewController Q4] in Q3ViewController.o
      -[Q3ViewController Q4] in Q3ViewController.o
      -[Q3ViewController Q3lose] in Q3ViewController.o
      -[Q3ViewController Q3lose] in Q3ViewController.o
      -[Q3ViewController Q3lose] in Q3ViewController.o
      -[Q3WrongViewController restart] in Q3WrongViewController.o
      -[Q3WrongViewController restart] in Q3WrongViewController.o
      -[Q3WrongViewController restart] in Q3WrongViewController.o
      -[Q4ViewController Q5] in Q4ViewController.o
      -[Q4ViewController Q5] in Q4ViewController.o
      -[Q4ViewController Q5] in Q4ViewController.o
      -[Q4ViewController Q4lose] in Q4ViewController.o
      -[Q4ViewController Q4lose] in Q4ViewController.o
      -[Q4ViewController Q4lose] in Q4ViewController.o
      -[Q4WrongViewController restart] in Q4WrongViewController.o
      -[Q4WrongViewController restart] in Q4WrongViewController.o
      -[Q4WrongViewController restart] in Q4WrongViewController.o
      -[Q5ViewController Q6] in Q5ViewController.o
      -[Q5ViewController Q6] in Q5ViewController.o
      -[Q5ViewController Q6] in Q5ViewController.o
      -[Q5ViewController Q5lose] in Q5ViewController.o
      -[Q5ViewController Q5lose] in Q5ViewController.o
      -[Q5ViewController Q5lose] in Q5ViewController.o
      -[Q5WrongViewController restart] in Q5WrongViewController.o
      -[Q5WrongViewController restart] in Q5WrongViewController.o
      -[Q5WrongViewController restart] in Q5WrongViewController.o
      -[Q1LoseViewController restart] in Q1LoseViewController.o
      -[Q1LoseViewController restart] in Q1LoseViewController.o
      -[Q1LoseViewController restart] in Q1LoseViewController.o
      -[Q1ViewController Q2] in Q1ViewController.o
      -[Q1ViewController Q2] in Q1ViewController.o
      -[Q1ViewController Q2] in Q1ViewController.o
      -[Q1ViewController Q1lose] in Q1ViewController.o
      -[Q1ViewController Q1lose] in Q1ViewController.o
      -[Q1ViewController Q1lose] in Q1ViewController.o
      -[Q6ViewController Q7] in Q6ViewController.o
      -[Q6ViewController Q7] in Q6ViewController.o
      -[Q6ViewController Q7] in Q6ViewController.o
      -[Q6ViewController Q6lose] in Q6ViewController.o
      -[Q6ViewController Q6lose] in Q6ViewController.o
      -[Q6ViewController Q6lose] in Q6ViewController.o
      -[Q6WrongViewController restart] in Q6WrongViewController.o
      -[Q6WrongViewController restart] in Q6WrongViewController.o
      -[Q6WrongViewController restart] in Q6WrongViewController.o
      -[Q7ViewController Q8] in Q7ViewController.o
      -[Q7ViewController Q8] in Q7ViewController.o
      -[Q7ViewController Q8] in Q7ViewController.o
      -[Q7ViewController Q7lose] in Q7ViewController.o
      -[Q7ViewController Q7lose] in Q7ViewController.o
      -[Q7ViewController Q7lose] in Q7ViewController.o
      -[Q7WrongViewController restart] in Q7WrongViewController.o
      -[Q7WrongViewController restart] in Q7WrongViewController.o
      -[Q7WrongViewController restart] in Q7WrongViewController.o
      -[Q8ViewController Q9] in Q8ViewController.o
      -[Q8ViewController Q9] in Q8ViewController.o
      -[Q8ViewController Q9] in Q8ViewController.o
      -[Q8ViewController Q8lose] in Q8ViewController.o
      -[Q8ViewController Q8lose] in Q8ViewController.o
      -[Q8ViewController Q8lose] in Q8ViewController.o
      -[Q8WrongViewController restart] in Q8WrongViewController.o
      -[Q8WrongViewController restart] in Q8WrongViewController.o
      -[Q8WrongViewController restart] in Q8WrongViewController.o
      -[Q9ViewController Q10] in Q9ViewController.o
      -[Q9ViewController Q10] in Q9ViewController.o
      -[Q9ViewController Q10] in Q9ViewController.o
      -[Q9ViewController Q9lose] in Q9ViewController.o
      -[Q9ViewController Q9lose] in Q9ViewController.o
      -[Q9ViewController Q9lose] in Q9ViewController.o
      -[Q9WrongViewController restart] in Q9WrongViewController.o
      -[Q9WrongViewController restart] in Q9WrongViewController.o
      -[Q9WrongViewController restart] in Q9WrongViewController.o
      -[Q11ViewController next] in Q11ViewController.o
      -[Q11ViewController next] in Q11ViewController.o
      -[Q11ViewController next] in Q11ViewController.o
      -[Q11ViewController wrong] in Q11ViewController.o
      -[Q11ViewController wrong] in Q11ViewController.o
      -[Q11ViewController wrong] in Q11ViewController.o
      -[Q12ViewController next] in Q12ViewController.o
      -[Q12ViewController next] in Q12ViewController.o
      -[Q12ViewController next] in Q12ViewController.o
      -[Q12ViewController wrong] in Q12ViewController.o
      -[Q12ViewController wrong] in Q12ViewController.o
      -[Q12ViewController wrong] in Q12ViewController.o
      -[Q13ViewController next] in Q13ViewController.o
      -[Q13ViewController next] in Q13ViewController.o
      -[Q13ViewController next] in Q13ViewController.o
      -[Q13ViewController wrong] in Q13ViewController.o
      -[Q13ViewController wrong] in Q13ViewController.o
      -[Q13ViewController wrong] in Q13ViewController.o
      -[Q14ViewController next] in Q14ViewController.o
      -[Q14ViewController next] in Q14ViewController.o
      -[Q14ViewController next] in Q14ViewController.o
      -[Q14ViewController wrong] in Q14ViewController.o
      -[Q14ViewController wrong] in Q14ViewController.o
      -[Q14ViewController wrong] in Q14ViewController.o
      -[Q10ViewController next] in Q10ViewController.o
      -[Q10ViewController next] in Q10ViewController.o
      -[Q10ViewController next] in Q10ViewController.o
      -[Q10ViewController wrong] in Q10ViewController.o
      -[Q10ViewController wrong] in Q10ViewController.o
      -[Q10ViewController wrong] in Q10ViewController.o
      -[Q15ViewController next] in Q15ViewController.o
      -[Q15ViewController next] in Q15ViewController.o
      -[Q15ViewController next] in Q15ViewController.o
      -[Q15ViewController wrong] in Q15ViewController.o
      -[Q15ViewController wrong] in Q15ViewController.o
      -[Q15ViewController wrong] in Q15ViewController.o
      -[WinnerViewController restart] in WinnerViewController.o
      -[WinnerViewController restart] in WinnerViewController.o
      -[WinnerViewController restart] in WinnerViewController.o
  "__objc_empty_vtable", referenced from:
      _OBJC_METACLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_CLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
      _OBJC_METACLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_CLASS_$_StupidQuizViewController in StupidQuizViewController.o
      _OBJC_METACLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_CLASS_$_Q2ViewController in Q2ViewController.o
      _OBJC_METACLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_CLASS_$_Q2WrongViewController in Q2WrongViewController.o
      _OBJC_METACLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_CLASS_$_Q3ViewController in Q3ViewController.o
      _OBJC_METACLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_CLASS_$_Q3WrongViewController in Q3WrongViewController.o
      _OBJC_METACLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_CLASS_$_Q4ViewController in Q4ViewController.o
      _OBJC_METACLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_CLASS_$_Q4WrongViewController in Q4WrongViewController.o
      _OBJC_METACLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_CLASS_$_Q5ViewController in Q5ViewController.o
      _OBJC_METACLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_CLASS_$_Q5WrongViewController in Q5WrongViewController.o
      _OBJC_METACLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_CLASS_$_Q1LoseViewController in Q1LoseViewController.o
      _OBJC_METACLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_CLASS_$_Q1ViewController in Q1ViewController.o
      _OBJC_METACLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_CLASS_$_Q6ViewController in Q6ViewController.o
      _OBJC_METACLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_CLASS_$_Q6WrongViewController in Q6WrongViewController.o
      _OBJC_METACLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_CLASS_$_Q7ViewController in Q7ViewController.o
      _OBJC_METACLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_CLASS_$_Q7WrongViewController in Q7WrongViewController.o
      _OBJC_METACLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_CLASS_$_Q8ViewController in Q8ViewController.o
      _OBJC_METACLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_CLASS_$_Q8WrongViewController in Q8WrongViewController.o
      _OBJC_METACLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_CLASS_$_Q9ViewController in Q9ViewController.o
      _OBJC_METACLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_CLASS_$_Q9WrongViewController in Q9WrongViewController.o
      _OBJC_METACLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_CLASS_$_Q11ViewController in Q11ViewController.o
      _OBJC_METACLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_CLASS_$_Q12ViewController in Q12ViewController.o
      _OBJC_METACLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_CLASS_$_Q13ViewController in Q13ViewController.o
      _OBJC_METACLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_CLASS_$_Q14ViewController in Q14ViewController.o
      _OBJC_METACLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_CLASS_$_Q10ViewController in Q10ViewController.o
      _OBJC_METACLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_CLASS_$_Q15ViewController in Q15ViewController.o
      _OBJC_METACLASS_$_WinnerViewController in WinnerViewController.o
      _OBJC_CLASS_$_WinnerViewController in WinnerViewController.o
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_StupidQuizAppDelegate in StupidQuizAppDelegate.o
  "_objc_setProperty", referenced from:
      -[StupidQuizAppDelegate setViewController:] in StupidQuizAppDelegate.o
      -[StupidQuizAppDelegate setWindow:] in StupidQuizAppDelegate.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

A: It fails on linking against the Cocoa frameworks. Have you possibly removed UIKit.framework and Foundation.framework from your project?
You should have them in your 'Frameworks' Category/Folder in Xcode and in your Target they have to be in 'Link Binary With Libraries'


text:
Q: Spring 4 @Autowire not binding correctly? I m trying to Autowire a bean to a implementation but it returns a null pointer Exception.
package org.com.api;

public interface Multiply {
    public int multipler(int a, int b);
}

package org.com.core;
import org.com.api.Multiply;

public class MultiplyImpA implements Multiply {
    public int multipler(int a, int b){
        return a*b;
    }
}

package org.com.core;
import org.com.api.Multiply;
public class MultiplyImpB implements Multiply {
    public int multipler(int a, int b){
        int total = 0;
        for(int i = 1; i <=b; i++){
            total += a;
        }
        return total;
    }
}

package org.com.Service;
import org.com.api.Multiply;
public Calculator {
    @Autowire
    private Multiply multiply;
    public int calcMultiply(int a, int b){
        return multiply.multipler(a,b);
    }
}

In my applicationContext.xml I  have added the following
<bean id="multiply" class="org.com.core.MultiplyImpA" scope="prototype"/>

Now in runtime I get a NullPointerExpection. multiply is null.
for testing purpose I tried this. It works, I understand here I m explicitly getting the Bean. So this means the autowire didnt work ? is there something I m missing ?
Multiply m = (Multiply)factory.getBean("multiply");
System.out.println(m.multiplier(2,4);

A: Autowiring resolves by type, since there are two different impl, you need to use qualifier to narrow it down. SO try the below.
public Calculator {
@Autowire
@Qualifier("multiply")
private Multiply multiply ;
public int calcMultiply(int a, int b){
    return multiply.multipler(a,b);
}
}

A: Seems you have a typo in your bean xml.
Instead of
<bean id="multiply" class="package org.com.core.MultiplyImpA" scope="prototype"/>

it should be (using the full qualified classname only)
<bean id="multiply" class="org.com.core.MultiplyImpA" scope="prototype"/>

EDIT:
Possible error could be that the Calculator class is not managed by spring. Instantiating the class using the new operator would fail because there is no way that spring would get a reference to inject the collaborator:
Calculator calculator = new Calculator();
calculator.calcMultiply(1, 2); // would throw a NPE because the `Multiply` instance (in your case `MultiplyImpA`) has not been injected.

So instead instantiate the Calculator class using spring:
<bean id="calculator" class="org.com.service.Calculator"/>
<bean id="multiply" class="org.com.core.MultiplyImpA"/>

Retrieve it through the application-context:
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("application-context.xml");
Calculator calculator = ctx.getBean(Calculator.class);

Spring would then manage the dependencies by scanning the @Autowired annotation, looking at the field type and trying to find a qualified bean from the application context.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Injecting script into iframe before load in node-webkit I'm Trying to make a simple web browser in node-webkit, to polyfill features that Chromium doesn't support yet (time element, etc). I have had success in listening for the iframe.onload event and then appending a script tag with the polyfills, but this still means that features that I've polyfilled won't be detected by Modernizr or other feature detention.
I've tried loading the page using the http node module, appending a script tag and then turning the page source into a data URI for the frame but data uris essentially turn external pages into static html with no scripting, which renders many web pages unusable.
Also, loading a page through node's http module is proving extremely slow compared to loading through an iframe.
So, is there any other way? Ideally I run a script in the iframe before any other scripts are run.
Yes, I am using nwfaketop and nwdisable on the iframe.

A: The 'document-start' event should be helpful. See https://github.com/rogerwang/node-webkit/wiki/Window#document-start
See also Window.eval() in https://github.com/rogerwang/node-webkit/wiki/Window#windowevalframe-script


text:
Q: Simple Python Temperature Converter I'm fairly new to programming, and have decided to start with Python as my entry into it. Anyway, I can't seem to figure out why this temperature conversion script I wrote isn't running.
def convert_to_fahrenheit(celsius):

    c = celsius
    f = c * 9 / 5 + 32
    print '%r Celsius, converted to Fahrenheit, is: %r Fahrenheit.' % c, f

def convert_to_celsius(fahrenheit):

    f = fahrenheit
    c = (f - 32) * 5 / 9
    print '%r Fahrenheit, converted to Celsius, is: %r Celsius.' % f, c

def convert():

    print 'To convert a temperature from Celsius to Fahrenheit:'
    cels = raw_input('CELSIUS: ')
    print ''
    convert_to_fahrenheit(cels)

    print ''
    print 'To convert a temperature from Fahrenheit to Celsius:'
    fahr = raw_input('FAHRENHEIT: ')
    convert_to_celsius(fahr)

convert()

It returns a TypeError:
Traceback (most recent call last):
  File "C:/Users/Brandon/PycharmProjects/IntroTo/Ch1/Exercises.py", line 32,     in <module>
    convert()
  File "C:/Users/Brandon/PycharmProjects/IntroTo/Ch1/Exercises.py", line 24,     in convert
    convert_to_fahrenheit(cels)
  File "C:/Users/Brandon/PycharmProjects/IntroTo/Ch1/Exercises.py", line 8,      in convert_to_fahrenheit
    f = c * 9 / 5 + 32
TypeError: unsupported operand type(s) for /: 'str' and 'int'

A: One problem is that you pass and string to the first two functions, but expect it to be a float. You can solve it by converting the value you get from string to float. You should do that
c = float(celcius)

in the first function, and
f = float(farenheit)

in the second one.

Another prblem is that you need to put parentheses around (c, f) and (f, c) for % to work properly.

And one more thing you probably want to do is to ask whether user wants to convert for cel to far or the other way around. You can do it using if:
def convert():

    user_input = raw_input('From what do you want to convert?: ')

    if user_input == 'celsius':
        print 'To convert a temperature from Celsius to Fahrenheit:'
        cels = raw_input('CELSIUS: ')
        convert_to_fahrenheit(cels)

    elif user_input == 'farenheit':
        print 'To convert a temperature from Fahrenheit to Celsius:'
        fahr = raw_input('FAHRENHEIT: ')
        convert_to_celsius(fahr)


text:
Q: want to get values from URL through GET method and then want show those values on right top corner of my header area I want to get values from URL through GET method and then want to show those values on right top        corner of my header area.
function GetUrlValue(variable)
 {
    var SearchString = window.location.search.substring(1);
    var VariableArray = SearchString.split('&');
        for (var i = 0; i < VariableArray.length; i++)
        {
            var KeyValuePair = VariableArray[i].split('=');
            if (KeyValuePair[0] == variable)
            {
                return KeyValuePair[1];
            }
        }
}

A: Your code above wouldn't get the first querystring value only the subsequest ones as you split on & and the first qs value would follow a ?
Try the code below. I've used one of the answers from this post to get the querystring values and added some basic HTML and CSS

function getParameterByName(name) {

    //var url = window.location.search
    var url = 'http://example.com?email=myname@email.com&username=myusername';

    var match = RegExp('[?&]' + name + '=([^&]*)').exec(url);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

$( document ).ready(function() {
    var email = getParameterByName('email');
    var username = getParameterByName('username');
    $("#userDetails").text(email + ' ' + username)
});
#header{
    top:0;
    left:0;
    right:0;
    position: absolute;
    height:30px;
    width:100%;
    background-color:blue;
}

#userDetails {
    float: right;
    color: #fff;
}


text:
Q: My ammap doesnt work for my Nigerian map I'm currently working on the Nigerian map from amCharts and I want the map to read from an external source of which .json is the only format for now. Am using SharePoint 2010 as my server and it doesn't allow me copy .json files so I decided to store my data in the JSON way but in a text file(.txt). The sample (USA) that came with the amCharts documentation works well. But when I change the data and the script to that of the Nigeria map, it doesn't work. Please if you can hep me out. Here is the sample of my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
  <html xmlns:mso="urn:schemas-microsoft-com:office:office"

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="http://www.amcharts.com/lib/3/ammap.css" type="text/css">

And the external document m attaching is this

========================================================================
{
"map": "nigeriaLow",
"areas"=[{
 { "id":"NG-AB",
 "value": 4447100
 },{
 "id":"NG-AD",
 "value": 4447100
 },{
 "id":"NG-AK",
 "value": 4447100
 },{
 "id":"NG-AN",
 "value": 4447100
 },{
 "id":"NG-BA",
 "value": 4447100
 },{
 "id":"NG-BE",
 "value": 4447100
 },{
 "id":"NG-BO",
 "value": 4447100
 },{
"id":"NG-BY",
 "value": 4447100
 },{
  "id":"NG-CR",
 "value": 4447100
 },{
 "id":"NG-DE",
 "value": 4447100
 },{
 "id":"NG-EB",
 "value": 4447100
 },{
 "id":"NG-ED",
 "value": 4447100
 },{
 "id":"NG-EK",
 "value": 4447100
 },{
 "id":"NG-EN",
 "value": 4447100
 },{
 "id":"NG-FC",
 "value": 4447100
 },{
 "id":"NG-GO",
 "value": 4447100
 },{
"id":"NG-IM",
 "value": 4447100
 },{
 "id":"NG-JI",
 "value": 4447100
 },{
 "id":"NG-KD",
 "value": 4447100
 },{
 "id":"NG-KE",
 "value": 4447100
 },{
 "id":"NG-KN",
 "value": 4447100
 },{
 "id":"NG-KO",
 "value": 4447100
 },{
"id":"NG-KT",
 "value": 4447100
 },{
"id":"NG-KW",
 "value": 4447100
 },{
 "id":"NG-LA",
 "value": 4447100
 },{
 "id":"NG-NA",
 "value": 4447100
 },{
 "id":"NG-NI",
 "value": 4447100
 },{
"id":"NG-OG",
 "value": 4447100
 },{
 "id":"NG-ON",
 "value": 4447100
 },{
 "id":"NG-OS",
 "value": 4447100
 },{
 "id":"NG-OY",
 "value": 4447100
 },{
 "id":"NG-PL",
 "value": 4447100
 },{
 "id":"NG-RI",
 "value": 4447100
 },{
 "id":"NG-SO",
 "value": 4447100
 },{
"id":"NG-TA",
 "value": 4447100
 },{
 "id":"NG-YO",
 "value": 4447100
 },{
 "id":"NG-ZA",
 "value": 4447100

}]
}


text:
Q: Neural network fails to capture 2D shape possibly due to biases I am attempting to develop a Neural Network that I can generalize to several different applications.  As part of this, I am attempting to verify that my Neural Network works properly on a simple scenario: recognizing areas of a two-dimensional graph.
I started with the simplest case of a single line, classifying answers as above or below.  After training, the network fit the line to my satisfaction as shown in the first image. For this and the following examples the neural network was trained on 10000 points randomly sampled from around the graph. The net takes in two inputs for the x and y coordinates of each point, passes them through an 8 node hidden layer, and produces a single output (1 if above the shape, -1 if below).  My graph classifies four different areas: blue and green are CORRECTLY identified, while orange and red are INCORRECTLY identified by the neural net.  Red and green colors are used above the supplied curve whereas orange and blue are used below the supplied curve.

Similarly, the network functioned properly for a line with corner, i.e. two line segments joined together at a point.

However, it has mixed results when running on y = x^2.  Near the origin, the neural network appears to be matching the curve of the parabola reasonably well.

Away from the origin, however, it seems to be using a single line to approximate the parabola's shape.

Moreover, when the parabola is translated away from the origin, as in y = (x-10)^2 + 30 the neural network completely fails to capture the shape.

Finally, I also tested the network approximating a circle (recognizing that one layer is not necessarily sufficient to do this) and achieved the following result. I don't know if this is typical of one hidden layer neural networks, but I thought it might provide insight into a potential problem that my net might have.

Based on these results, my current suspicion is that the biases on the net's nodes are not getting as large as they should in training, thus causing all of the line segments that the net uses to pass close to the origin, and thereby causing it to fail on approximating shapes that would require larger biases.
Any help you can provide would be much appreciated!  Feel free to let me know if sharing any sections of my code or the results of any other tests would be useful in debugging this. Thank you.


text:
Q: Sonata admin bundle create and return to list not working I'm using the SonataAdminBundle to generate a back office in Symfony 2 and manage some entities. I've added all the properties I wanted in the create form, and Soanta generates a view with 3 buttons : Create, Create and return to list, Create and add another.
Now, regardless of what button I chose to save my form, Sonata redirects me to edit. How can I change this? Why is it that it created the buttons but doesn't do the redirect?

A: I've got same problem but I found how to fix it.
All you need to do is to override function 'redirectTo' in your model admin controller class (the one extending Sonata\AdminBundle\Controller\CRUDController) to this:
/**
 * redirect the user depend on this choice
 *
 * @param object $object
 *
 * @return Response
 */
protected function redirectTo($object)
{
    $url = false;

    if ($this->get('request')->get('btn_update_and_list') !== null) {
        $url = $this->admin->generateUrl('list');
    }
    if ($this->get('request')->get('btn_create_and_list') !== null) {
        $url = $this->admin->generateUrl('list');
    }

    if ($this->get('request')->get('btn_create_and_create') !== null) {
        $params = array();
        if ($this->admin->hasActiveSubClass()) {
            $params['subclass'] = $this->get('request')->get('subclass');
        }
        $url = $this->admin->generateUrl('create', $params);
    }

    if (!$url) {
        $url = $this->admin->generateObjectUrl('edit', $object);
    }

    return new RedirectResponse($url);
}

You can find this function inside CRUDController inside SonataAdminBundle.
The problem is the buttons' values are empty and empty string is treated as false for if conditions.
I thing other option could be to add value to this buttons but I think this solution is much simpler.
This works for me but I can't say it is perfect solution. :)


text:
Q: Creating a mask with n empty pages for stamping I want to use pdftk's multistamp feature to add annotations to a script of which I don't own the source code.
My goal is to create an empty pdf file of n empty pages (this would then serve as my mask for stamping), in such a way that I can, for any k, easily add some content to the k-th page.
I do not know how to do that and would appreciate any input!

A: \documentclass[a4paper]{article}

\newcommand{\multistamp}[1]{%
  \loop\unless\ifnum\value{page}>#1
    \dowhatsonthispage
  \repeat}

\newcommand{\dowhatsonthispage}{%
  \null\csname onthispage\thepage\endcsname\newpage}

\newcommand{\putonpage}[2]{%
  \expandafter\def\csname onthispage#1\endcsname{#2}}

\begin{document}

\putonpage{1}{Hello world}
\putonpage{3}{\vspace*{\fill}Hello world\par\vspace{\fill}}

\multistamp{4}

\end{document}

This creates a four page document, with something on the first and third pages as decided by the commands \putonpage.
When producing page number 2, this code executes the macro \onthispage2 that's not defined, but it's with \csname onthispage2\endcsname so it's \relax. When at page 3, the macro \onthispage3 is defined and so its definition can be used.


text:
Q: Algorithm needed to calculate difference between two times I have an hour selection drop down 0-23 and minutes selection drop down 0-59 for Start time and End time respectively (so four controls).
I'm looking for an algorithm to calculate time difference using these four values.
Since they're not stored in fancy date/time selection controls, I don't think I can use any standard date/time manipulation functions.
How do I calculate the difference between the two times?

A: This pseudo-code gives you the algorithm to work out the difference in minutes. It assumes that, if the start time is after the end time, the start time was actually on the previous day.
const MINS_PER_HR = 60, MINS_PER_DAY = 1440

startx = starthour * MINS_PER_HR + startminute
endx = endhour * MINS_PER_HR + endminute

duration = endx - startx
if duration < 0:
    duration = duration + MINS_PER_DAY

The startx and endx values are the number of minutes since midnight.
This is basically doing:

*

*Get number of minutes from start of day for start time.

*Get number of minutes from start of day for end time.

*Subtract the former from the latter.

*If result is negative, add number of minutes in a day.

Don't be so sure though that you can't use date/time manipulation functions. You may find that you could easily construct a date/time and calculate differences with something like:
DateTime startx = new DateTime (1, 1, 2010, starthour, startminute, 0);
DateTime endx   = new DateTime (1, 1, 2010, endhour  , endminute  , 0);
Integer duration = DateTime.DiffSecs(endx, startx) / 60;
if (duration < 0)
    duration = duration + 1440;

although it's probably not needed for your simple scenario. I'd stick with the pseudo-code I gave above unless you find yourself doing some trickier date/time manipulation.

If you then want to turn the duration (in minutes) into hours and minutes:
durHours = int(duration / 60)
durMinutes = duration % 60 // could also use duration - (durHours * 60)

A: This will compute duration in minutes including the year as factor
//* Assumptions:
Date is in Julian Format

startx = starthour * 60 + startminute
endx = endhour * 60 + endminute
duration = endx - startx
if duration <= 0:
    duration = duration + 1440
end-if
if currday > prevday
    duration = duration + ((currday-preday) - 1 * 1440)
end-if

A: First you need to check to see if the end time is greater than or equal to the start time to prevent any problems. To do this you first check to see if the End_Time_Hour is greater than Start_Time_Hour. If they're equal you would instead check to see if End_Time_Min is greater than or equal to Start_Time_Min.
Next you would subtract Start_Time_Hour from End_Time_Hour. Then you would subtract Start_Time_Min from End_Time_Min. If the difference of the minutes is less than 0 you would decrement the hour difference by one and add the minute difference to 60 (or 59, test that). Concat these two together and you should be all set.

A: $start_time_hr = 5;

$start_time_mi = 50;

$end_time_hr = 8;

$end_time_mi = 30;

$diff = (($end_time_hr*60)+$end_time_mi) - (($start_time_hr*60)+$start_time_mi);

$diff_hr = (int)($diff / 60);

$diff_mi = (int)($diff) - ($diff_hr*60);

echo $diff_hr . ':' . $diff_mi;

A: simple equation should help:
mindiff = 60 + endtime.min - starttime.min
hrdiff  = ((mindiff/60) - 1) + endtime.hr - starttime.hr

A: This gives you the duration in hours and minutes
h1 = "hora1"
m1 "min1"
h2 "hora2"
m2 = "min2"

if ( m1 > m2)
{
    h3 = (h2 - h1) - 1;
}
else
{
    h3 = h2 - h1;
}

m1 = 60 - m1;

if (m1 + m2 >= 60)
{
    m3 = 60 - (m1 + m2);

} else if (m3 < 0)
{
    m3 = m3 * -1;
}
else
{
    m3 = m1 + m2;
}

System.out.println("duration:" + h3 + "h" + m3 + "min");

A: If you have a function that returns the number of days since some start date (e.g. dayssince1900) you can just convert both dates to seconds since that start date, do the ABS(d1-d2) then convert the seconds back to whatever format you want e.g. HHHH:MM:SS
Simple e.g.
SecondsSince1900(d)
{
return  dayssince1900(d)*86400
       +hours(d)*3600
       +minutes(d)*60
       +seconds(d);
}

diff = ABS(SecondsSince1900(d1)-SecondsSince1900(d2))

return format(diff DIV 3600)+':'+format((diff DIV 60) MOD 60)+':'+format(diff MOD 60);

Hum: Not that simple if you have to take into account the leap seconds astronomers are keen to put in from time to time.


text:
Q: MySQL combine columns of multiple tables I have two tables like indicated below:
Table1:
name    surname    age
----    -------    ---
 a         b       null
 c         d       null

Table 2:
age
---
 1
 4

I want to combine them into first table (Table1) like
name    surname    age
----    -------    ---
 a         b        1
 c         d        4

(they have the same number of rows) How can I combine them?

A: maybe you want this,
SELECT a.Name, a.SurName, b.Age
FROM
  (
    SELECT @row := @row + 1 RankNo,
           Name, Surname
    FROM   Table1, (SELECT @row := 0) r
  ) a
  INNER JOIN
  (
    SELECT @row1 := @row1 + 1 RankNo,
           Age
    FROM   Table2, (SELECT @row1 := 0) r
  ) b ON a.RankNo = b.RankNo

*

*SQLFiddle Demo


text:
Q: Change PHP binary being used by localhost I had been PHP version using 5.5.11 on my Mac and have some modules installed. They took quite a lot of tinkering around to get working. I have my OSX already using this version by using a PATH in my ./~profile. After I installed Yosemite though my localhost now runs PHP 5.5.14, which doesn't have the modules installed. How do I get my localhost to use my other PHP installation?
I have tried in httpd.conf LoadModule php5_module \path\to\other\binary. I restarted Apache but it wouldn't load my page then. So i'm unsure of how to achieve this.

A: Not so easy, in my mind the easy way should be to install a new version with the modules you need
If you are lucky all modules you need are present in the package from
http://php-osx.liip.ch/
The hard way : install manually the php and all modules ...


text:
Q: How can i use a custom style with setters and triggers? I would like to do something like this, but obviously I cannot have 2 style properties specified.  I cant figure out the syntax for adding the style resource to the "<Button.Style>" attribute.
<Button x:Name="CreateProductButton" Style="{StaticResource GoldButton}" Content="Add Product" Click="CreateProductButton_Click" TabIndex="4">
        <Button.Style>
            <Style TargetType="{x:Type Button}">
                <Setter Property="IsEnabled" Value="false" />
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ElementName=OperatorId, Path=(Validation.HasError)}" Value="false" />
                            <Condition Binding="{Binding ElementName=NewProductId, Path=(Validation.HasError)}" Value="false" />
                            <Condition Binding="{Binding ElementName=NewYearId, Path=(Validation.HasError)}" Value="false" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="IsEnabled" Value="true" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>
        </Button.Style>
    </Button>

A: If you're trying to use an existing style with a few additions or changes, used Style.BasedOn. That is:
<Style x:Key="MyDerivedButtonStyle"
       TargetType="{x:Type Button}"
       BasedOn="{StaticResource GoldButton}">
    <Setter Property="IsEnabled" Value="false" />
    <Style.Triggers>
        ...
    </Style.Triggers>
</Style>

Then set your Button's style as Style={StaticResource MyDerivedButtonStyle}.


text:
Q: why is my background-color is not working for a specific class selector? I am new to HTML, CSS. Recently I was learning CSS grid property. I created some boxes with a div container and some items on it with a class selector. But I wanted to give style to a specific item with the class taco.
Though I defined background-color in .container div", but I can't change the background-color in the specific item called taco. I tried adding background-color by inline CSS in the div with class name taco.
In this case the background-color works but when I try to do the same thing in style.css file the background-color doesn't work for that specific item "taco". What I am missing here?

* {
  box-sizing: border-box;
}

body {
  margin: 20px;
  background-image: url(images/topography.svg), linear-gradient(110deg, #f93d66, #6d47d9);
  background-size: 100%;
  background-attachment: fixed;
}

.container div {
  background-color: rgb(182, 182, 58);
  text-align: center;
  font-weight: lighter;
  font-size: 30px;
  font-family: 'Permanent Marker', cursive;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.container {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

.taco {
  grid-column: 1/ -2;
  grid-row: span 2;
  background-color: #ffffff;
  /*background-color: #ffffff; doesn't work*/
}
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">

1

2

3

4

5

6

7

8

🌮

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

A: The problem is you are running into a specificity problem:
.container div is more specific than .taco. If you add div.taco as the selector, you'll get a CSS selector that is more specific.

* {
  box-sizing: border-box;
}

body {
  margin: 20px;
  background-image: url(images/topography.svg), linear-gradient(110deg, #f93d66, #6d47d9);
  background-size: 100%;
  background-attachment: fixed;
}

.container div {
  background-color: rgb(182, 182, 58);
  text-align: center;
  font-weight: lighter;
  font-size: 30px;
  font-family: 'Permanent Marker', cursive;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.container {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

div.taco {
  grid-column: 1/ -2;
  grid-row: span 2;
  background-color: #ffffff;
  /*background-color: #ffffff; doesn't work*/
}
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">

1

2

3

4

5

6

7

8

🌮

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

Here is some documentation about specificity:
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
And some more from Stack Overflow:
Understanding CSS selector priority / specificity


text:
Q: How to show multiple markers on google map I m new to google map API. My question is can we show multiple markers on the map using the API???

A: Yes, yes you can.  Just call the new google.maps.Marker() function for each marker location you want to add to your map.
I assume you've already got a map created, called 'map'.  This will add 2 markers to it.
var marker1 = new google.maps.Marker({
    position: new google.maps.LatLng(24.696554,-81.328238),
    map: map
});

var marker2 = new google.maps.Marker({
    position: new google.maps.LatLng(50.815155, -0.137072),
    map: map
});


text:
Q: How to stop dictation window when using speech recognition in .net? I've been attempting to create a voice dictation app in vb.net - but I'm afraid I haven't got past the first bit!
I have the issue (and I don't know if this is just a windows 10 thing and if it can even be disabled, I've had a look around and it appears to be an uncommon problem) that a dictation(?) window pops up whenever I open my application, and it doesn't let me do the recognition from just within my application.
The window It wont let me add the image.
Apologies if my question wasn't written well - I'm new to stackoverflow, and thanks in advance.


text:
Q: My parameter that I set inside the top_n for ggplot2 is not working? I want to limit my graph to just the top 10 words (doing sentiment analysis) to graph. My parameter that I set is not working. Here is my code:
df_boatstone_bing  %>%
    group_by(sentiment) %>%
    top_n(10) %>%
    ungroup() %>%
    mutate(word = reorder(word, n)) %>%
    ggplot(aes(word, n, fill = sentiment)) +
    geom_col(show.legend = FALSE) +
    facet_wrap(~sentiment, scales = "free_y") +
    labs(y = "Contribution to sentiment",
         x = NULL) +
    coord_flip()

If anyone can catch my mistake that would be great!
Edit: dput included
structure(list(word = c("awesome", "loud", "worth", "amazing",
"excellent", "nice"), n = c(38L, 33L, 29L, 28L, 26L, 22L), sentiment = c("positive",
"negative", "positive", "positive", "positive", "positive"),
 method = c("Bing et al.", "Bing et al.", "Bing et al.", "Bing et al.",
"Bing et al.", "Bing et al.")), .Names = c("word", "n", "sentiment",
"method"), row.names = c(NA, -6L), class = c("tbl_df", "tbl",
"data.frame"))

A: If we specify n in the top_n(word, n) term, and have enough words in our input data, it should work fine.
# OP's
df_bing_sample  %>%
  group_by(sentiment) %>%
  top_n(10, n) %>%   # <--- specify sort by n, rather than by method, the last column
  ungroup() %>%
  mutate(word = reorder(word, n)) %>%
  ggplot(aes(word, n, fill = sentiment)) +
  geom_col(show.legend = FALSE) +
  facet_wrap(~sentiment, scales = "free_y") +
  labs(y = "Contribution to sentiment",
       x = NULL) +
  coord_flip()

Sample fake data here with more than 10 each of positive & negative:
library(tidytext)
set.seed(42)
df_bing_sample <- tidytext::sentiments %>%
  filter(lexicon == "bing") %>%
  sample_n(50) %>%
  mutate(n = rnorm(50, 30, 10) %>% floor %>% as.integer()) %>%
  mutate(method = "Bing et al.") %>%
  select(word, n, sentiment, method)


text:
Q: WPF binding not working despite correct "using final value" I have a TextBox bound to property MinDuration of the ViewModel. And MinDuration always should be less or equal the Duration property of the ViewModel. So, my XAML:
<TextBox Text="{Binding BasePO.MinDuration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

And there is my property:
    private double minDuration;
    public double MinDuration
    {
        get { return minDuration; }
        set
        {
            if (value > Duration)
               minDuration = Duration;
            else
                minDuration = value;

            OnPropertyChanged("MinDuration");
        }
    }

So, let Duration = 40. Now, that is results of binding:

*

*if I put 4 -> TextBox displays 4

*if then I put 5 (the value is 45 now) -> TextBox displays 40 (Correct!)

But, there is the problem:

*

*if I put 4 -> TextBox displays 4

*if then I put 0 (the value is 40 now) -> TextBox displays 40

*if then I put, for example, 5 (the value is 405 now) -> TextBox displays 405 (Why???)

There is trace of binding:
System.Windows.Data Warning: 90 : BindingExpression (hash=22334206): Update - got raw value '4'
System.Windows.Data Warning: 93 : BindingExpression (hash=22334206): Update - implicit converter produced '4'
System.Windows.Data Warning: 94 : BindingExpression (hash=22334206): Update - using final value '4'
System.Windows.Data Warning: 102 : BindingExpression (hash=22334206): SetValue at level 1 to PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '4'
System.Windows.Data Warning: 95 : BindingExpression (hash=22334206): Got PropertyChanged event from PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 0 from PoTableForm (hash=53931641) using RuntimePropertyInfo(BasePO): PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 1 from PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '4'
System.Windows.Data Warning: 80 : BindingExpression (hash=22334206): TransferValue - got raw value '4'
System.Windows.Data Warning: 84 : BindingExpression (hash=22334206): TransferValue - implicit converter produced '4'
System.Windows.Data Warning: 89 : BindingExpression (hash=22334206): TransferValue - using final value '4'
Поток '<Без имени>' (0x19b4) завершился с кодом 0 (0x0).

System.Windows.Data Warning: 90 : BindingExpression (hash=22334206): Update - got raw value '45'
System.Windows.Data Warning: 93 : BindingExpression (hash=22334206): Update - implicit converter produced '45'
System.Windows.Data Warning: 94 : BindingExpression (hash=22334206): Update - using final value '45'
System.Windows.Data Warning: 102 : BindingExpression (hash=22334206): SetValue at level 1 to PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '45'
System.Windows.Data Warning: 95 : BindingExpression (hash=22334206): Got PropertyChanged event from PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 0 from PoTableForm (hash=53931641) using RuntimePropertyInfo(BasePO): PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 1 from PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '40'
System.Windows.Data Warning: 80 : BindingExpression (hash=22334206): TransferValue - got raw value '40'
System.Windows.Data Warning: 84 : BindingExpression (hash=22334206): TransferValue - implicit converter produced '40'
System.Windows.Data Warning: 89 : BindingExpression (hash=22334206): TransferValue - using final value '40'

System.Windows.Data Warning: 90 : BindingExpression (hash=22334206): Update - got raw value '405'
System.Windows.Data Warning: 93 : BindingExpression (hash=22334206): Update - implicit converter produced '405'
System.Windows.Data Warning: 94 : BindingExpression (hash=22334206): Update - using final value '405'
System.Windows.Data Warning: 102 : BindingExpression (hash=22334206): SetValue at level 1 to PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '405'
System.Windows.Data Warning: 95 : BindingExpression (hash=22334206): Got PropertyChanged event from PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 0 from PoTableForm (hash=53931641) using RuntimePropertyInfo(BasePO): PO (hash=59829654)
System.Windows.Data Warning: 101 : BindingExpression (hash=22334206): GetValue at level 1 from PO (hash=59829654) using RuntimePropertyInfo(MinDuration): '40'
System.Windows.Data Warning: 80 : BindingExpression (hash=22334206): TransferValue - got raw value '40'
System.Windows.Data Warning: 84 : BindingExpression (hash=22334206): TransferValue - implicit converter produced '40'
System.Windows.Data Warning: 89 : BindingExpression (hash=22334206): TransferValue - using final value '40'

As you can see, when I put 405 using final value '40', but TextBox displays 405. And the binding not working for every numbers starting with 40 (in this example).

A: This is a actually an old bug that has been fixed in the .NET Framework 4.5. Please refer to @Matt's answer here for more information.
Bound WPF TextBox is not updating value when the bound property enforces some business rules
If you can't upgrade to 4.5 for some reasons you may want to try the workaround suggested here:
WPF - MVVM - Textbox getting out of sync with viewmodel property
It should be mentioned that the oldest officially supported version of the .NET Framework is currently 4.5.2 so it might be an idea to upgrade after all: https://blogs.msdn.microsoft.com/dotnet/2015/12/09/support-ending-for-the-net-framework-4-4-5-and-4-5-1/


text:
Q: Sorting arguments from `...` to pass them only to functions they are designed to In my function, I either load a table from a file with fread(), or save a table to a file with write.table(). Those two functions have some overlapping parameter names (sep etc) while others are specific to a single function. Is there any way to pass correct parameters from my function call to those functions?
# fnDT is filename to seek, inDT is a function call to build a table
loadOrBuild <- function (fnDT, inDT, ...){
  if (file.exists(fnDT)){ # if file is found, then inDT is not evaluated
    cat('File found:', fnDT, '; will load it instead of building a new table.\n');
    return(loadDT(fnDT, ...)); # loadDT() is my wrapper for fread()
  } else {
    cat('File not found:', fnDT, '; we\'ll build new table and then save it.\n');
    save_DT(inDT, fnDT, row.names=F, ...); # save_DT() is my wrapper for write.table()
    return(inDT);
  }
}

build.dt <- function(n=10){
  return(data.table(test=rep('A',n)))
}

my.dt <- loadOrBuild('myfile.txt', build.dt(20), sep='\t') # this works correctly for both loading and saving

my.dt <- loadOrBuild('myfile.txt', build.dt(20), nrows=10) # this works correctly for loading but raises an error for saving because `nrows` is not an argument for `write.table()`

A: Thanks to the comment, I found a solution in this question - Is there a way to use two '...' statements in a function in R?. In my case, it was enough to modify the function to a following:
loadOrBuild <- function (fnDT, inDT, ...){
  nm.load <- c(names(formals(fread)), names(formals(loadDT)));
  nm.save <- c(names(formals(write.table)), names(formals(save_DT)));
  dots <- list(...);
  if (file.exists(fnDT)){
    cat('File found:', fnDT, '; will load it instead of building a new table.\n');
    return(
      do.call('loadDT',
              c(
                list(fnInput = fnDT),
                dots[names(dots) %in% nm.load]
              )
      ) # instead of  loadDT(fnDT, ...)
    );
  } else {
    cat('File not found:', fnDT, '; we\'ll build new table and then save it.\n');
    do.call('save_DT',
            c(list(dtIn=inDT, fnSaveTo = fnDT),
              dots[names(dots) %in% nm.save])
    ) # instead of  save_DT(inDT, fnDT, ...);
    return(inDT);
  }
}


text:
Q: How to stop default transition when using custom tab bar in React Native using React Navigation? I've made a custom tab bar in a Component which uses StackNavigator like so
export default StackNavigator(
  {
    Login: {
      screen: Login,
    },
    ForgotPassword: {
      screen: ForgotPassword,
    },
    SignUp: {
      screen: SignUp,
    },
    Home: {
      screen: Home,
    },
  },
  {
    headerMode: 'none',
    navigationOptions: {
      headerVisible: false,
    },
    initialRouteName: 'Home',
  },
);

Now my Home screen has a custom made Tab Bar like so
export default () => (
  <View>
    <Text>HOME</Text>
    <TabBar />
  </View>
)

I want my Home screens Tab bar to have no transition
Currently it animates (left to right for IOS & bottom to up for Android) when one of the Tab link is clicked
I checked docs & found mode property but it has only 2 props card & modal & I want no animation
How to do it ?

A: Thanks to @Vojtech, I got the answer
const customAnimationFunc = () => ({
  screenInterpolator: (sceneProps) => {
      const { scene } = sceneProps;
      const tabs = ['Home'];
      if (tabs.indexOf(scene.route.routeName) !== -1) return null;
    },
});

export default StackNavigator(
  {
    Login: {
      screen: Login,
    },
    ForgotPassword: {
      screen: ForgotPassword,
    },
    SignUp: {
      screen: SignUp,
    },
    Home: {
      screen: Home,
    },
  },
  {
    headerMode: 'none',
    transitionConfig: customAnimationFunc,
    navigationOptions: {
      headerVisible: false,
    },
    initialRouteName: 'Home',
  },
);

The only problem right now is nothing is animating. I'll edit the answer when few screens animate & tabs don't


text:
Q: How does one check completion status of LoadApplicationService? I have 2 action nodes in workflow : javaMainAction and javaMainAction2.
My LoadApplicationService method returns SUCCESS or FAILURE after execution.
How to check response if SUCCESS is returned?
workflow.xml :
<workflow-app name="WorkflowJavaMainAction" xmlns="uri:oozie:workflow:0.1">
    <start to="javaMainAction" />
    <action name="javaMainAction">
        <java>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
            </configuration>
            <main-class>in.augmentiq.maxiq.dataschedular.services.LoadApplicationService</main-class>
            <arg>${workflowAppPath}/javaMainActionInput/schedule_config.properties</arg>
            <arg>${workflowAppPath}/javaMainActionInput/appRequestParams.json</arg>
            <capture-output/>
        </java>
        <ok to="javaMainAction2" />
        <error to="killJobAction" />
    </action>
    <action name="javaMainAction2">
        <java>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
            </configuration>
            <main-class>in.augmentiq.maxiq.dataschedular.services.LoadApplicationService</main-class>
            <arg>${workflowAppPath}/javaMainAction2Input/schedule_config.properties</arg>
            <arg>${workflowAppPath}/javaMainAction2Input/appRequestParams.json</arg>
            <capture-output/>
        </java>
        <ok to="end" />
        <error to="killJobAction" />
    </action>
    <kill name="killJobAction">
        <message>"Killed job due to error: ${wf:errorMessage(wf:lastErrorNode())}"</message>
    </kill>
    <end name="end" />
</workflow-app>

A: LoadApplicationService needs to write the output into a key=pair format e.g. response=SUCCESS. The you can inspect the output like this:
${wf:actionData("action-name")["key"]}

Use Decision control node for comparing and taking decision Decision_Control_Node.

Edit for the comment: How to write property in a java action.

The main() method writes a Property file to the path specified in the oozie.action.output.properties ENVIRONMENT variable. Reference
   public static void main (String[] args)
   {
      String fileName = args[0];
      try{
         File file = new File(System.getProperty("oozie.action.output.properties"));
         Properties props = new Properties();
         props.setProperty("PASS_ME", "123456");

         OutputStream os = new FileOutputStream(file);
         props.store(os, "");
         os.close();
         System.out.println(file.getAbsolutePath());
      }
      catch (Exception e) {
         e.printStackTrace();
      }
   }


text:
Q: change magento admin nav menu title I'm trying to change the name of the main nav title from "CMS" to "Content".  But I'm not sure how to do this w/out touching the core files.  can I override this in my module config file?  or do I do this somewhere else?  This is my first experience w/ magento
<adminhtml>
    <menu>
        <cms>
            <children>
                <feature translate="title" module="feature">
                    <title>Feature</title>
                    <sort_order>2</sort_order>
                </feature>
            </children>
        </cms>
    </menu>
    <acl></acl>
    <events></events>
    <translate></translate>
</adminhtml>

A: You might try adding the title element for the cms element. Im pretty sure things share the same core structure at every nesting level of the config...
 <menu>
   <cms>
     <title>Content</title>
     <children>
       <feature translate="title" module="feature">
         <title>Feature</title>
         <sort_order>2</sort_order>
       </feature>
      </children>
    </cms>
  </menu>

A: Magento has a built in function available in the Admin to allow you to do this without touching ANY code at all. Why not just enable Translation in the Admin and then you can rename anything you want without changing anything!!
Go to [System] > [Configuration] > [Advanced] > [Developer] > [Translate Inline] and change "Enabled for Admin" to Yes.
When you save a little book icon will show up next to all menu items and most other text.  Click the icon and a popup will show allowing you to rename it to anything you want.  The results are stored in the Magento Translation csv files under your chosen Local and nothing at all is changed in the magento core.  That is how Magento is designed to use translate not by editing the core.
After you are happy with the results turn Translation back off in Admin.  BTW this works for the front end as well so you don't need to spend hours finding what file in your Theme is responsible for the text you want to change!!  :)


text:
Q: Non-zero measured single point sets under sigma-finitely additive measure are countable Problem:

If $(X,\mathcal{A},\mu)$ is a measure space,  $\mu$ is $\sigma-$finitely additive(exists an increase set list$\left\{X_i\right\}$ such that $\cup_{i=1}^\infty X_i=X$and$\mu(X_i)<\infty$), prove that $D_\mu=\left\{x\in X:\mu(\left\{x\right\}>0\right\}$ is countable.

In fact I just have a little idea about the question. I want to use the '$\sigma-$finitely additive' to say $D_\mu$ is countable(Construct an increase set list). But it seems impossible because we don't know whether$D_\mu$ is countable.


text:
Q: Inserting a C-String into another C-String We are going over c-strings in my C++ class right now. What is the best way to insert a user entered
c-string into a specific element in an existing c-string?

A: A pretty simple way of doing it is:
#include <iostream>
#include <string>
using namespace std;

int main() {
    string s1 = "my text";
    string s2 = " new";
    s1.insert(2,s2);
    cout<<s1<<endl;
    return 0;
}


text:
Q: how to align an image to the center of the div? I am trying to align an image in a div to center. I have tried the following but its not working. Please tell me how to fix this . thanks in advance.

A:

just you need style="text-align:center" in your div tag.

A: Try with the following CSS code. It makes your  aligned center horizontally and aligned middle vertically.
.erabox{
    width:200px;
    height:200px;
    display:table-cell;
    text-align:center;
    vertical-align:middle;
}

A: Just use margin auto:
  .erabox img {
    display: block;
    margin: auto;
  }

DEMO: http://jsbin.com/apiwox/edit#html,live

A: Try below code in CSS. it will work for sure
    align="absmiddle"

A: CSS
.erabox{
    position:relative;
}

.erabox img{
    position:absolute;
    top:50%;
    left:50%;
    margin-top:-19px; /* Half of images height */
    margin-left:-115px; /* Half of images width */
}

A: If .erabox div's width and height are fixed or at least it's height and width are always surely greater than image's you can use image as a background
HTML

CSS
.erabox{
    background:url("indicator2.gif") no-repeat;
    background-position:50% 50%;
}


text:
Q: how onSaveInstanceState keep the latest state of the Activity even if the Activity destroyed or stopped In this class, i am Overriding both of onSaveInstanceState and onRestoreInstanceState methods, it enabled me to keep the last state of the activity while rotating screen, however, if i navigated to another activity, or i went to Home of my device, it doesn't keep the latest state and start a new state.
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putSerializable("mylist",mAdapter);
}

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);
    savedInstanceState.getSerializable("mylist");

}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    try {
        ViewConfiguration config = ViewConfiguration.get(this);
        Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
        if (menuKeyField != null) {
            menuKeyField.setAccessible(true);
            menuKeyField.setBoolean(config, false);
        }
    } catch (Exception ex) {
        // Ignore
    }
    //setHasOptionsMenu(true);
    recyclerView = (RecyclerView) findViewById(R.id.card_recycler_view);
    if (savedInstanceState != null && savedInstanceState.getSerializable("mylist")!=null) {

        savedInstanceState.getSerializable("mylist");
        update_START();
        recyclerView.setHasFixedSize(true);
        RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this, 2);
        recyclerView.setLayoutManager(layoutManager);
        recyclerView.setAdapter(mAdapter);
    }else {
        update_START();
        recyclerView.setHasFixedSize(true);
        RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this, 2);
        recyclerView.setLayoutManager(layoutManager);
        recyclerView.setAdapter(mAdapter);
    }
}

can any body tell me what should i add to inforce my Activity to keep its latest state even if the activity has been destroyed, should i add any block of code to any other activities?
my onPostExecute method is as follows:
@Override
    protected void onPostExecute(ArrayList<MovieEntity> result) {
        mAdapter=null;
        mAdapter = new ImagesAdapter(getBaseContext(), result);
        recyclerView.setAdapter(mAdapter);
    }

This is my Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.prof_mohamed.movieapp">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<receiver
    android:name=".ConnectivityReceiver"
    android:enabled="true">
    <intent-filter>
        <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
    </intent-filter>
</receiver>
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity" android:label="Pop Movies">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".DetailActivity" android:label="MovieDetail"></activity>
</application>

It supposed that when i navigate between activities or even between other applications, then return to my first running app, it should restore its latest saved state before starting navigation to other Activities or apps.

A: If you want to save state for later use, you can write necessary data in either sqlite db or persistence storage. By this kind of design you have to save all data required to make activity in same state. There are other options also but saving data in permanent storage fit for your need and safe. (Assuming you want an activity always persist it state event it destroyed) OnSaveInstanceState and OnRestoreInstanceState automatically save views state (view with id defined in xml) not only for rotation but also for activity kill by system for memory requirement. So you have to save view state also. (for ex edittext with entered data or selected check box etc)

A: First of all, you are not using the savedInstanceState.getSerializable("mylist") correctly, you should save and cast the object in a variable and use it:
List list = (List) savedInstanceState.getSerializable("mylist");
At this point, The bundle is restored only in the onCreate method (for example on rotation when the activity is destroyed then re-created)
To support saving the instance state on activity navigation or when the home button is pressed (which call onStop then onStart), put the same logic in the if condition inside the onRestoreInstanceState which is called after onStart.

A: in developer options "do not keep activities" option was enabled, you have to make it disabled, and now every thing is running, saving state in Activities navigation, Home button navigation, and screen rotation besides Overriding both of these methods
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);
    if (savedInstanceState != null && savedInstanceState.getSerializable("mylist")!=null) {

        savedInstanceState.getSerializable("mylist");
    }
}

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
savedInstanceState.getSerializable("mylist");
}
@Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    savedInstanceState.getSerializable("mylist");

}
will make your app save its state completely ...


text:
Q: EF Code First - run Update-Database from Azure portal I am currently looking at the best way to update our database on Azure. Running Visual Studio to just run "Update-Database" command seems a bit cumbersome. Is there a way to deploy to Azure and then from Azure portal run the "Update-Database" command? Or is this just a standard way even when updating production database?

A: I'm not sure about running the powershell commands from azure portal directly.
However you could use System.Data.Entity.MigrateDatabaseToLatestVersion to do this for you automatically for deployments to azure. This can be automatically added to your web.config, if you select update-database in the publish profile wizard. Details on how to do this can be found here
https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application
https://msdn.microsoft.com/en-us/library/hh829293(v=vs.113).aspx

A: As already answered, you may setup your application to automatically apply new migrations to the database on startup.
Another way is to setup release process using Visual Studio Team Services and then setup database migration using powershell. Some details available here: VSTS Build Task that runs script on multiple shards


text:
Q: Switch's maximum safety voltage/current ratio for AC and DC The switch I'm going to use is MTS-202 [Datasheet].

The ratings is 6A/125V and 3A/250V. Most switches are rated like that, as voltage increases they pass less current.
Does it means that I can connect voltages at 500V/1.5A?
What about DC voltages? is the same rule applies?

A: The ratings you see are a combination of voltage and current. They originate as well from a combination of phenomena:

*

*voltage withstanding capability that is the ability to keep isolated two terminals across the gap of the open contact; of course there re margins dictated by standards, so that some overvoltage level and some impulsive overvoltage level are dictated for a given rated voltage (e.g. your mains voltage). Whe the manufacturer says "250 Vac", knows that thee test passed was e.g. 1500 Vrms for 1 minute, that is suitable for 250 Vac, no more than that.

*wearing of contacts and load handling: in this case you get a combination of voltage and current, as you see in your case. There are some assumptions behind: number of operation allowed before degradation (e.g. expected life), that is lower for higher rating using the same technology; but they also assume some kind of load (such as AC11, and similar notations, standing for a proportion between inductive and resistive parts, in some cases including also capacitive). Here you have some margin: provided you do not go beyond safety ratings (see 1), you can increase the current slightly, e.g. if you know that the load is almost resistive, if you put a snubber across contacts (with  snubber galvanic isolation is gone, however).

*the evil DC operation: DC waveforms can wear your contacts much faster, as they do not cross zero (as for sinusoidal waveforms) and can easily create arcing. DC capability depends strongly on contact technology. If not written explicitly, do not assume it can handle DC: for example, even 28V/1A dc is a burden for these types of switches. (I used in a hurry a much bigger one, but not good -- I swear --, to switch two relays with 12V DC coil and it broke after 6 months, maybe after 100 operations or so).

A: You can't exceed the datasheet ratings.
If there is no other mention, then those are the limits you are given, and you can't switch more than 6A at 125VAC or 3A at 250VAC.
The datasheet does not rate usage over 250VAC or any DC ratings, so they are unknown. Usually for a given switch, the DC voltage ratings are lower than AC voltage ratings.


text:
Q: NserviceBus (version 3.2) custom configuration Newbie needs help here.
I've been going over the custom configuration documentation. However, I'm not able to figure out what is missing, or if I'm on the correct path. I'm trying to custom configure using IWantCustomInitialization to create a message queue on the fly (instead of the App.Config) and send the message to the message queue.
The message class as follows:-
using System;
using NServiceBus;

namespace MyMessage
{
    [Serializable]
    public class EventMessage : ITaskInfo
    {
        public string CustomerName { get; set; }
        public string PrimeKey { get; set; }
        public string JobName { get; set; }
        public Guid JobRunId { get; set; }
    }

    public interface ITaskInfo : IMessage
    {
        string CustomerName { get; set; }
        string PrimeKey { get; set; }
        string JobName { get; set; }
        Guid JobRunId { get; set; }
    }
}

The test app is as follows:-

using System;
using NServiceBus;
using MyMessage;

namespace TestClient
{
    class DontSubscribe : IConfigureThisEndpoint, AsA_Client,
    IWantCustomInitialization
    {
        public void Init()
        {
            Configure.With()
            .DefineEndpointName("customendpoint")
            .Log4Net()
            .XmlSerializer()
            .DefaultBuilder()
            .MsmqTransport()
            .IsTransactional(true)
            .UnicastBus()
            .LoadMessageHandlers()
            .ImpersonateSender(false)
            .DoNotAutoSubscribe()
            .CreateBus().Start();
        }
    }

    public class Program : IWantToRunAtStartup
    {
        public IBus bus { get; set; }

        public void Run()
        {
            Console.WriteLine("Press enter to send a message.");

            while (Console.ReadLine() != null)
            {
                var msg = bus.CreateInstance<EventMessage>();
                msg.JobName = "JobName";
                msg.JobRunId = Guid.NewGuid();
                msg.PrimeKey = "PrimeKey";

                bus.Send("customendpoint", msg);
            }
        }

        public void Stop()
        {

        }

    }
}

And, the App.config is as follows:-
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="MsmqTransportConfig"
type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core"/>
</configSections>

<MsmqTransportConfig ErrorQueue="error" NumberOfWorkerThreads="1"
MaxRetries="0"/>

</configuration>

I'm encountering the following error:-
2012-05-24 15:33:10,386 [Worker.10] WARN NServiceBus.Unicast.Transport.Transact ional.TransactionalTransport [(null)] <(null)> - Failed raising 'transport messa ge received' event for message with ID=a7a885c5-2487-4049-9c41-2faa604c5767\214 System.InvalidOperationException: No handlers could be found for message type: M yMessage.ITaskInfo__impl at NServiceBus.Unicast.UnicastBus.HandleTransportMessage(IBuilder childBuilde r, TransportMessage msg) in d:\BuildAgent-01\work\nsb.master20\src\unicast\NServ iceBus.Unicast\UnicastBus.cs:line 1254 at NServiceBus.Unicast.UnicastBus.TransportMessageReceived(Object sender, Tra nsportMessageReceivedEventArgs e) in d:\BuildAgent-01\work\nsb.master20\src\unic ast\NServiceBus.Unicast\UnicastBus.cs:line 1171 at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTrans portMessageReceived(TransportMessage msg) in d:\BuildAgent-01\work\nsb.master20\ src\impl\unicast\transport\NServiceBus.Unicast.Transport.Transactional\Transacti onalTransport.cs:line 480
2012-05-24 15:33:10,386 [Worker.10] WARN NServiceBus.Unicast.Transport.Transact ional.TransactionalTransport [(null)] <(null)> - Failed raising 'transport messa ge received' event for message with ID=a7a885c5-2487-4049-9c41-2faa604c5767\214 System.InvalidOperationException: No handlers could be found for message type: MyMessage.ITaskInfo__impl at NServiceBus.Unicast.UnicastBus.HandleTransportMessage(IBuilder childBuilde r, TransportMessage msg) in d:\BuildAgent-01\work\nsb.master20\src\unicast\NServ iceBus.Unicast\UnicastBus.cs:line 1254 at NServiceBus.Unicast.UnicastBus.TransportMessageReceived(Object sender, Tra nsportMessageReceivedEventArgs e) in d:\BuildAgent-01\work\nsb.master20\src\unic ast\NServiceBus.Unicast\UnicastBus.cs:line 1171 at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTrans portMessageReceived(TransportMessage msg) in d:\BuildAgent-01\work\nsb.master20\ src\impl\unicast\transport\NServiceBus.Unicast.Transport.Transactional\Transacti onalTransport.cs:line 480
2012-05-24 15:33:11,290 [Worker.10] ERROR NServiceBus.Unicast.Transport.Transact ional.TransactionalTransport [(null)] <(null)> - Message has failed the maximum number of times allowed, ID=a7a885c5-2487-4049-9c41-2faa604c5767\214.

Any pointers, suggestions and comments are more than welcome for a newbie like
me. Thank you in advance.

A: I've had issues with this for days now... turned out that I was missing the following:

*

*Right Click Properties on your publisher's class library

*Click the Debug tab

*Add NServiceBus.Integration to the command line arguments box.

It sorted the issue for me, although I don't know why.


text:
Q: When is a Custom Content Provider called for? I have seen custom content providers for sqLite in apps, but thats about it. When should a Custom Content provider be built?

A: EboMike in this question says:

*

*Other apps will be able to access your data.

*You can wrap and abstract a lot of the query logic in your content provider, and limit access.

*You will be able to lean on the system to allow for things like managed queries.
Remember that you can control user interacts with your data,for example you can prevent user from modifying data or you can force system to open data with explicit App and so on.


text:
Q: New column based on multiple conditions ignoring missing values I have following dataframe with some missing values:
       A     B
0  63.0   9.0
1   NaN  35.0
2  51.0  95.0
3  25.0  11.0
4  91.0   NaN
5   2.0  47.0
6  37.0  10.0
7   NaN  88.0
8  75.0  87.0
9  92.0  21.0

I want to create a new column based on conditions of both above columns:
df['C'] = numpy.where((df['A']>55) | (df['B']>55), "Yes", "No")

This works but does not take into account missing values:
      A     B    C
0  63.0   9.0  Yes
1   NaN  35.0   No
2  51.0  95.0  Yes
3  25.0  11.0   No
4  91.0   NaN  Yes
5   2.0  47.0   No
6  37.0  10.0   No
7   NaN  88.0  Yes
8  75.0  87.0  Yes
9  92.0  21.0  Yes

For correcting for missing values, I have to run following code:
df['C'] = numpy.where((df['A'].isnull()) | (df['B'].isnull()), numpy.nan, df['C'])

Then I get proper new column:
      A     B    C
0  63.0   9.0  Yes
1   NaN  35.0  NaN
2  51.0  95.0  Yes
3  25.0  11.0   No
4  91.0   NaN  NaN
5   2.0  47.0   No
6  37.0  10.0   No
7   NaN  88.0  NaN
8  75.0  87.0  Yes
9  92.0  21.0  Yes

Is there any better way so that I can correct for missing values in single line of code only?

A: Using np.select.  The order of the conditions is important here, as np.select chooses the first valid option, so you must have your null check first.
c1 = df.isnull().any(1)
c2 = df.gt(55).any(1)

df['C'] = np.select([c1, c2], [np.nan, 'Yes'], 'No')

      A     B    C
0  63.0   9.0  Yes
1   NaN  35.0  nan
2  51.0  95.0  Yes
3  25.0  11.0   No
4  91.0   NaN  nan
5   2.0  47.0   No
6  37.0  10.0   No
7   NaN  88.0  nan
8  75.0  87.0  Yes
9  92.0  21.0  Yes

A: This becomes a little complicated depending on how many columns you want to do this for.
Here's an alternative with map and mask:
(df[['A', 'B']]
   .gt(55)
   .any(1)
   .map(lambda x: 'Yes' if x else 'No')  # .map({True : 'Yes', False : 'No'}.__getitem__)
   .mask(df[['A', 'B']].isna().any(1))
)

0    Yes
1    NaN
2    Yes
3     No
4    NaN
5     No
6     No
7    NaN
8    Yes
9    Yes
dtype: object

This is still a single statement, split across multiple lines for readability.

A: Chain two any and map
(df>55).any(1).mask((df.isnull()).any(1),np.nan).map({1:'Yes',0:'No'})
Out[405]:
0    Yes
1    NaN
2    Yes
3     No
4    NaN
5     No
6     No
7    NaN
8    Yes
9    Yes
dtype: object

Or using two np.where
a=(df>55).any(1)
b=df.isnull().any(1)
np.where(b,np.nan,np.where(a,'Yes','No'))
Out[407]:
array(['Yes', 'nan', 'Yes', 'No', 'nan', 'No', 'No', 'nan', 'Yes', 'Yes'],
      dtype='<U32')

A: IMO if we want to ignore the NaN rows, let's just drop them.  Assignment will align on the indices, resulting in NaNs where the index is missing.
In [317]: df["C"] = (df[["A","B"]].dropna() > 55).any(axis=1).replace(
                    {False: "No", True: "Yes"})

In [318]: df
Out[318]:
      A     B    C
0  63.0   9.0  Yes
1   NaN  35.0  NaN
2  51.0  95.0  Yes
3  25.0  11.0   No
4  91.0   NaN  NaN
5   2.0  47.0   No
6  37.0  10.0   No
7   NaN  88.0  NaN
8  75.0  87.0  Yes
9  92.0  21.0  Yes


text:
Q: I need Jquery crop picture plugin I need some plugin that crop picture before uploading it to the server. Do any body know some plugin or any thing to do that?

A: I have been using this one which outputs coordinates that you can then use server side.
https://github.com/fengyuanchen/cropper


text:
Q: group by alias in Oracle
I need get all state (1,2,3,4) with out duplicates.
1 xxx
2 yyy
3 zzz
4 jjj

My first and only idea was get all state and group them:
select state1 as state,desc1 as desc from table where id=X
Union
select state2 as state,desc2 as desc from table where id=X

This get in the example 6 rows. So, to discard the duplicate I try to use a alias:
select state,desc from
(
select state1 as state,desc1 as desc from table where id=X
    Union
    select state2 as state,desc2 as desc from table where id=X
)
group by state;

But I got the error is not a GROUP BY expression.
I saw similar questions but I can't resolve the problem.

A: All the select-list items have to either be in the group by, or be aggregates. You could include both state, desc in the group-by clause, but it would be neater to use distinct instead; however, union (without all) suppresses duplicates anyway, so neither is needed here.
As Bluefeet mentioned elsewhere, desc is a keyword and has a meaning in order-by clauses, so it is not a good name for a column or alias.
This gets four rows, not six:
select state1 as state_x, desc1 as desc_x from t42 where id = 'X'
union
select state2 as state_x, desc2 as desc_x from t42 where id = 'X';

| STATE_X | DESC_X |
|---------|--------|
|       1 |    xxx |
|       2 |    yyy |
|       3 |    zzz |
|       4 |    jjj |

SQL Fiddle. It isn't clear why you think you're getting six rows, or what you are really doing differently.

A: The UNION should remove any duplicates. If it doesn't then you should check the data -- maybe you have extra spaces in the text columns.
Try something like this.
select state1 as state,TRIM(desc1) as desc from table where id=X
Union
select state2 as state,TRIM(desc2) as desc from table where id=X

A: Your first query doesn't work probably because desc1 and desc2 columns have different types e.g. char(10) and char(20). Here is an example from SQL Fiddle that shows this effect. If you change char(20) to char(10) in the left pane the query will work.


text:
Q: ruby on rails:multiple upload and view I am currently using paperclip to upload a single photo. When the user goes to the show view, it shows the photo and the info related to it. Now I want to update it to accept multiple photos so that all of the photos are shown on the show view. What do I need to use? (JavaScript and update paper-clip to take multiple uploads?) Or is there something else?
I have read http://sleekd.com/general/adding-multiple-images-to-a-rails-model-with-paperclip/

A: If you want to handle multi file upload I suggest you use this jquery library
https://github.com/blueimp/jQuery-File-Upload
Its very in depth and great for multi-file upload.
Also, this good example as to how to implement with paperclip.
Rails 3.1 + Paperclip + jQuery fileupload

A: Create a Photo class which will save photos. Like this
class Photo < ActiveRecord::Base

  belongs_to :your_class_having_photos

  #paperclip methods and validations ....
end

In your upload view:
<%=file_field "'photos'[]"%>
<%=file_field "'photos'[]"%>
<%=file_field "'photos'[]"%>

...

do it as many as you want by JS or hardcoding whatever. Then after submit, there will be a parameter called params[:photos] containing an array of multiple photos in it. Then you can do
params[:photos].each do |p|
   photo = @your_class_object.photos.build(p)
   photo.save
end

in your controller, or maybe in more nicer codes you want.


text:
Q: Parse html in Flutter using HTML lib I'm using HTML 0.15.0  to parse HTML page content and show it in the Flutter app.
I managed to parse HTML page but I don't know how to show the content in the app.
I can print the HTML tags in the log only.
I'm asking how to show those tags as an HTML page in my app
This is my code
var document = parse(
      'Hello world! HTML5 rocks!');
print(document.outerHtml);

A: You could use flutter_html (https://pub.dev/packages/flutter_html)
Therefor you could use the widget:
var htmlData = 'Hello world! HTML5 rocks!'';

Html(
     data: htmlData,
);

The variable htmlData can contain the HTML markup.

A: You can use flutter_html package. It offers you a widget called 'Html' and you don't have to parse it just use it with string (I recommend you to use it with raw string):
Html(
  data: r"""Hello world! HTML5 rocks!""",
),


text:
Q: Read Arabic characters from webpage I am trying to extract PDF links from this LINK
There are three topics on this page and each is displayed by the collapse method and below each topic, there are sub-topics (months in Hijri calendar).
Below each sub-topic, there are PDF links.
How can I extract those links in organized columns: Column A would be for topics and Column B for sub-topics and Column C for the PDF links?
When trying this code
Sub Demo()
Dim intFF As Integer: intFF = FreeFile()
Dim iFile As String: iFile = "C:\Test\HTML.txt"
Dim html As HTMLDocument
Open iFile For Input As #intFF
strContent = Input(LOF(intFF), intFF)
Close #intFF

Set html = New HTMLDocument

With html
.body.innerHTML = strContent
Set x = .getElementsByTagName("a")
For i = 0 To x.Length - 1
    If x(i).getAttribute("data-parent") Like "*accordion1" Then
        Debug.Print x(i).innerText
    End If
    If x(i).getAttribute("data-parent") Like "*accordion2" Then
        Debug.Print x(i).innerText
    End If
Next
End With
End Sub

First problem the Arabic characters arenot displayed well. And another point this brings only the first main topic and there are two other main topics.
And here's the HTML in case the link doesn't work for you
https://drive.google.com/open?id=1lJ7U1z3vOWz4pfbhdKi31_q674rcnuxR


text:
Q: terminal unix command find problem with setting up modes I have trouble constructing a single find line to do the following:
find all files in the current dir and sub-dir with name ending with ~. or star and end with '#'.I think I have made a fundamental mistake but not so sure after 2 hours of thinking.
This is what I came up with and it does not seem to work:
find -name '[#]' -a -name '[~#]'
macOSX terminal

A: You could use a combination of ls and grep to find all the files ending with either ~ or #
ls * | grep -E "*.(\~|#)"

ls -R * will show all files in the current dir and sub-dir;
grep -E will search for lines matching a regular expression;
"*.(\~|#)" will match all lines ending with either ~ or # (note that you'll need to escape the ~ with \ since it's a special character).