Simple Server


Then in your terminal, make sure you are at the location of your server.js file. Then type: node server.js Go to any browser and type in localhost:8888 and you should be able to hit it. Also, be sure to end the server process when you want to turn on another server. ctrl-c should […]

count recursively

Abstract class and virtual functions

mysql basic commands

ref: The SHOW statement can be used to obtain information about several aspects of your databases and tables: List the databases managed by the server:

List the tables in the current database or in a given database:

Note that SHOW TABLES doesn’t show TEMPORARY tables. Display information about columns or indexes in […]

Guided Access (Locking home button)

Guided Access is a new feature found in iOS 6, and enabled on iOS 6 beta 2, which allows you to enable a “kiosk mode” on your iDevice. This can be handy for users who use the iPads or iPhones as retail assistants, in stores, in restaurants, as menus, etc. To enable Guided Access mode, […]

Remove all invisible .svn folder recursively from svn-ed folders

first make sure you show all invisible files so you can see the effects of your recursive removal of those pesky .svn folders:

Please take note that its and not ‘ is on the left side of the number key 1.

char array copying and pointer manipulation

Basically, the idea is that you DO NOT touch the original arrays. Instead, you declare two char pointers and point to them. Then, assign the data from source to destination as you move each pointer down the arrays.

result: destination is: || source is: |BLUR SAMPLE| destination is: |B| destination is: |BL| destination is: […]

Installing OpenCV on Mac OS X 10.9.2 Maverick and running with xCode 5.0.2

Building openCV i. Download the latest version of OpenCV for UNIX. At the time of writing this is version 2.4.8 ii. Execute the following commands one by one. Each command should complete without errors. unzip the OpenCV-2.4.8 zip file in your /users/(your account directory) Open your terminal and go into the unzipped opencv directory.


Synchronize on on a instance level (static)

I know that using the synchronize keyword before a method brings synchronization to that object. That is, 2 threads running the same instance of the object will be synchronized. However, since the synchronization is at the object level, 2 threads running different instances of the object will not be synchronized. So, if we have a […]

C++ parameter passing

result: Hello, World! Outside ptrOne value is: 10 Outside ptrOne address is: 0x100103ad0 inside changeOne. Number is: 20 inside changeOne: Address is: 0x100103ae0 Outside ptrOne value is: 10 Outside ptrOne address is: 0x100103ad0 inside changeTwo function. Number is: 20 inside changeTwo function. Address is: 0x100103ad0 Outside ptrOne value is: 20 Outside ptrOne address is: […]