A client with a shopping application wanted to include support for a bluetooth barcode scanner. A customer should be able to add products to the basket by scanning its barcode.
Continue Reading →
Android and C++
In this tutorial we’ll be looking at using native C / C++ code inside an Android project.
Soemtimes libraries are only written in C++, or maybe we need that extra bit of performance. That’s why Google offers the Android NDK.
At the end of the tutorial you should be able to run C++ code in combination with your own Java classes.
Device and Interface Orientation with iOS
First, you have to know the difference between UIDeviceOrientation and UIInterfaceOrientation.
The device orientation is the orientation the device is currently at. We can get the device orientation with this call:
[[UIDevice currentDevice] orientation]
Selecting a Random Record with PHP and MySQL
Selecting a random record with MySQL can be achieved with one simple select:
SELECT * FROM `table` ORDER BY RAND() LIMIT 1;
This solution is very slow, especially when the table contains many rows. The thing is that mysql will create a temporary table and asign each row a random number.
Continue Reading →
How To Redirect Mobile Users
Providing a mobile friendly version of your website is defently a good idea. I summed up a few code snippets in different languages to help you redirect the visitor to your mobile website.
Continue Reading →
NullPointerBlog