Archive for the ‘Programming’ Category

The Snake Game using JavaScript/JQuery with only a few lines of code !

Friday, February 28th, 2014

For the students of Master I studing Human Computer Interaction, here is the popular snake game developed using Javascript with a only a few lines of code.


snake-game-2
Simple tutorial for writing a Snake Game using JQuery/Javascript

A Hello World tutorial for running Java RMI

Tuesday, October 22nd, 2013

Just completed a step by step tutorial for running RMI which stands for :  Remote Method Invocation.

The tutorial is posted on the EJBTutorial.com website.

To read the tutorial click here:

Convert images to a VLF video

Wednesday, March 17th, 2010

ffmpeg  -i image%07d.png -s 640×480  -qscale 10 video.flv

Using FFMPEG to extract or convert videos to Images

Friday, December 12th, 2008

The simple command to use to convert a given video video.ext to a set of images preferably with the naming format XXXX.png is :

ffmpeg -i video.ext %4d.png

It will produce images with the naming : 0001.png 0002.png and so on. You can try different image format if needed ( Jpeg, bmp…)

In case you want to extract and convert only a specific portion of the video :

ffmpeg -ss hh:mm:ss -t hh:mm:ss -i video.ext %4d.png
-ss option is the starting point whilst -t option is the duration to be converted.

SQL : Using Count within the Where clause

Monday, December 8th, 2008

As trying to make a condition inside an SQL where clause based on the COUNT function or other functions, the trivial one is to use :

SELECT count(items) as cnt from user_items where cnt>3

This is not going to work, and therefore you need to use the following one instead :

SELECT count(items) as cnt from user_items having count(items)>3

In case you want to add a where clause to the SQL statement, here is how it should look :

SELECT count(items) as cnt from user_items where id>1000 having count(items)>3


imed.ws - Imed Bouchrika Website© 2003-2007.