waiting thread until a condition has been occurred

You need conditional variables. If your compiler supports std::conditional introduced by C++11, then you can see this for detail: std::condition_variable (C++11 threads) If your compiler doesn’t support it, and you work with win32 threads, then see this: Condition Variables (Win32 threads) And here is a complete example. And if you work with POSIX threads, then … Read more

Why isn’t my assembly program setting r1 to the correct value?

HALT is just a “pseudo-instruction” for a TRAP instruction used to halt the machine. You could write: TRAP x25 ;HALT the machine But in this way you need to remember the position in the TRAP vector, in this case x25. So is better to just use HALT instead. Others common TRAPs also have pseduo-instructions: IN, … Read more

Is there a way to simulate multiple iphones using xcode/iphone sim?

It is possible but only with multiple users. Read this: http://www.coderebel.com/2010/08/31/iphone_simulator Assuming you have two projects (P1,P2) which you want to debug simultaneously, do as follows. Steps to set up: Create a new user (U2) on your Mac Give it R/W access to P2, especially to its build folder. Download the launcher app from the … Read more

How to use web camera in android emulator to capture a live image?

Download all the source files listed on the page: CameraSource, GenuineCamera, HttpCamera, SocketCamera, BitmapCamera, and WebcamBroadcaster. Create a package in your project called com.tomgibara.android.camera and place the first 4 source files inside. Download JMF from here and install it. Compile WebcamBroadcaster using the following command: “C:\Program Files (x86)\Java\jdk1.6.0_15\bin\javac.exe” -classpath “C:\Program Files (x86)\JMF2.1.1e\lib” WebcamBroadcaster.java or what’s … Read more