Does Java have release compilation mode or only debug mode ?

October 30th, 2011

If you ever worked with native languages such as c or c++, or even with managed / semi-compiled languages such as Microsoft .NET or even action script, you would have probably noticed the debug/release option in the compiler/IDE. However, search as you want, you wont find this compiler option in java, nor in its popluar IDE such as eclipse or Netbeans
Read the rest of this entry »

Linux and Unix commands – the most useful command line tutorial collection

August 22nd, 2011
Goal to ReachLinux || Unix command
Print working directorypwd
List directory ls -lh
List directory and show hidden filesls -ali
Get directory sizedu -h | tail -n 1
Delete/remove filerm -f filename
Delete/remove directoryrm -rf *
Find files specifying a criteriafind . -name *.so
Remove specific files under sub directoriesfind . -type f -name "*.so" -exec rm -f {} \;
List Processps -ef
Find asteriskps -ef | grep asterisk
Change Permissions chmod -R 0777 .
Time an executiondate;sleep 10;date
ssh server2ssh 10.16.26.69

(Requires user/pass, also type "exit" to end session).
compress tar -czvf myarchive.tgz myfile.txt

(Note that .tgz is the same thing as .tar.gz).
decompress tar -zxf dahdi-linux-complete-current.tar.gz
copy / duplicate folderscp -rf directory1 directory2
ssh copyscp file.tar.gz root@10.16.26.69:/usr/src/goodreflex
stack sizeulimit -a
set stack sizeulimit -s 32768 (32 MB)
update systemyum update
or
apt-get update (Debian / Ubuntu)
Disk space usage du -k | sort -g
stop firewallservice iptables stop
open port 8570iptables -A INPUT -p tcp --dport 8570 -j ACCEPT
close port 8570iptables -A INPUT -p tcp --dport 8570 -j DROP
remove port addediptables -D INPUT -p tcp --dport 8570 -j ACCEPT
remove port closediptables -D INPUT -p tcp --dport 8570 -j DROP
list loaded moduleslsmod
driver messagesdmesg (print or control the kernel ring buffer )
JAVA
compile javac HelloWorld.java -nowarn
execute java HelloWorld
execute jar java -jar myApp.jar

Full listing can be found here : http://www.goodreflex.com/useful-linux-commands/

How to download youtube movies to your android phone and play them (KeepVid + MX)

July 24th, 2011

If you ever needed to download youtube movies on your Android phone, for offline viewing but couldnt do it, here are simple steps to achieve it:

First you need to download the great application called : KeepVid
Read the rest of this entry »

Simple build.xml sample for eclipse

July 10th, 2011

I never quite understood why Eclipse IDE never creates a build.xml (ant build file) when creating a new project. Netbeans creates one by default, but not eclipse :-( Even if you import a java project without a build.xml, Eclipse does not create one…

Long story short, if you want a simple build.xml check out this sample.
Read the rest of this entry »

Dermandar.com – Easy, free, online panorama for ur iphone, Made in Lebanon !

July 3rd, 2011
Dermandar.com

Dermandar.com

In case you have been living under a rock for a while and didnt hear about Dermandar.com, well, here is a short story about it:

Dermandar has been entirely developed in Lebanon. The team ( just 2 :-P ) released a web version of the panoramic software then moved on to create an iphone app. The iphone app hit more than 500000 downloads in less than 1 month, that is certainly a record for Lebanon and surely rarely seen on the international level.

What make this app so special is its simplicity of use matched with great results. If ur an iphone user u must check it out here. Not only it is great it is also free, so no reason not to try it !

PS: An android version is coming soon, so stay alert if ur an android user!

How to install apps for the android not available on Android market.

June 8th, 2011

The best (and securest) place to get an application for your Android device is Google official market place. But what would you do if you know the app exists but is not showing in Google market place ? The reason for this is that the market place is “Location aware” meaning that it will detect your country and show you only the results relevant to your country (not all app are available in every country).
Read the rest of this entry »

HTC desire battery life

May 22nd, 2011

You hear and read a lot about how HTC desire phones behaves poorly from a battery point of view. A lot of people are even saying that it doesn’t last a single day and had to be recharged… Well the truth is I faced this problem too when I first got my used HTC device.

While I was using it to the max (games, music, wifi, skype…) I was hoping to get more than 18 hours of battery life !
The problem was due to the first golden rule of smart phones:
Read the rest of this entry »

HTC Desire Android 2.2

May 14th, 2011

It’s been just 1 week that I got my HTC desire running Android 2.2 and I have to say that I love this amazing device !


Read the rest of this entry »