Author Archives: admin

Processing Countdown Timer

In case you need to implement timer in your project that have a specific countdown time and you can check if it has expired or not , this code snippet will help.  

Web Hosting

I started my first web hosting with Xoom in 90s and then Geocities. They are both free hosting services. Thanks to hosting company like Lunarpages and Exabytes, I able to afford my own cpanel hosting at reasonable fee as low as RM300 annually. I even subscribed for a reseller plan so I can host multiples sites under one WHM. Now, I am more keen to use cloud services such as Heroku, AWS, Azure and Google Hosting. My recent favorite cloud provider is Digital Ocean. I had tried both Heroku and AWS and they are all charge like utilities bill base on usage, which can be very expensive for my free project. Digital Ocean offered fixed price and somehow I feel the vm are more stable than AWS Ec2 although Amazon S3 are still my all time favorite when come to storing static files. With emerging trend like dns cloudflare, baas, smtp mandrill… it seems that all infrastructure can be provided as service base (IaaS) and programmer can more focus on coding than setting up server.

Embed Astro Awani Player to your site

All you needs are the following code:    

Python + openCV + video

The purpose here is to play video in rPi using python + openCv. However, the avi file i call do not load as expected. I stripped off all the other code pieces, and focus on the loading to cheack what is wrong: and it printed False, which means it cant read my video format a quick google brought me here. I will need to download mplayer first and use the memcoder in it to convert the format. and now, it runs perfectly The complete code to play video:  

Processing + SimpleOpenNi + Export exe

Seems like there’s an issue here where your code run find in IDE but not after exported to exe.
So the solution is found here:
So, you will need to download the simpleOpenNI fix and replace with the one in your exportedApp\lib. Good luck!

Processing and Arduino port

Processing app that used serial method to talk to arduino need the correct port to connect with. This app can help you: processingScanner (run on 64bit computer) scanner Double check with your control panel -> Device Manager. deviceManager Device Manager show COM16 where our arduino board connected with, is match with index 0 in the processingScanner. So, the number/index to use in process is 0.

Kinect Pixel Mirror

This installation use Kinect to turn real human into pixel. A clever implementation as it avoided showing off kinect weakness but highlighted the strength. 1670870-inline-iris-interaction-04 1670870-slide-iris-interaction-02 More reading can be found here:
Perhaps a animated gif can present the idea better. Iris-by-Hybe-3 However, Hybe is not the only one doing thing like this. There are many other attempts: Here is my version of it, done using processing with screen base display. Havent have time to draw the grid yet, and i use icon from font-awesome for the representation. 20140913_200628 and here is a short video:  

AutoHotKey force app fullscreen automatically

For example, you have an exe that you need to force it fullscreen, on top and borderless and yet you have no access to the source code. AutoHotKey is here to rescue. Do you know that you can compile an AutoHotKey script into exe file? Then, you can pass parameter to it from CLI.

Step 1: grab this code

(assume your screen resolution is 1920×1080) and save as fullscreen.ahk

Step 2: convert it to fullscreen.exe

You can use the free Ahk2Exe.exe to convert the ahk into a exe file. Look for the compiler at path like: “C:\Program Files (x86)\AutoHotkey\Compiler”

Step 3: create a launcher.bat

Put the following line inside: make sure your fullscreen.exe and app.exe (program to launch in fullscreen) are in the same folder (in this case is in C:\MyApps). You will also need to change the window_title_name to the correct title name.

How to know my application title name

AutoHotKey come with another goodies called “Active Windows Info” or simple window spy. You can locate it at path like “C:\Program Files (x86)\AutoHotkey\AU3_Spy.exe” Launch it then focus on the application that you wanto find out the title. Look for the first line under >>>>>>>>>>( Window Title & Class )<<<<<<<<<<< section, that’s your application title name!