In the name of Allah, Most Gracious, Most Merciful

Thursday, September 29, 2011

Experiments with HTML5 and JS.

Using and learning HTML5 and JS have been so much fun. The ideas and possiblities that can be done is amazing.

Check out my first experiments and games on the right of the blog ..

Sunday, August 7, 2011

Testing Github.

Well, Github is a site that helps coders to collaborate, and work for public open 'and even closed' source projects. it relays on Git as its VCS "Version Control System". it's a bit different than some of the other VCSs such as Subversion or such. [Read more about Git Git Tutorial].

You can use the site to join an already existing open source project "of course with permission of the master". Or, you can start your own Project.

Today I followed the basic tutorial for the Github located @ the homepage [Github Homepage]. And, successfully managed to get my project of the B+ Tree uploaded ..

check this link here B+ Tree project

Now I can give permission to anyone to view/edit the code, fork it, update it and recommit it to the original repository.

There're a lot for me to try and test on the site. But, the First steps was easy and didn't cause bugs or problems al 7amdllah :) ..

Thanks for reading and stay updated ;) ..

Sunday, April 24, 2011

CSED Schedule.

Now CSED 2013 Schedule is embedded right into my Blog :D ... enjoy :) ..

and this is the code if you wanted to embed it into your site :

Thursday, November 11, 2010

الله نور السموات و الأرض ...

اللَّـهُ نُورُ السَّمَاوَاتِ وَالْأَرْضِ ۚ مَثَلُ نُورِهِ كَمِشْكَاةٍ فِيهَا مِصْبَاحٌ ۖالْمِصْبَاحُ فِي زُجَاجَةٍ ۖ الزُّجَاجَةُ كَأَنَّهَا كَوْكَبٌ دُرِّيٌّ يُوقَدُ مِن شَجَرَةٍ مُّبَارَكَةٍ زَيْتُونَةٍ لَّا شَرْقِيَّةٍ وَلَا غَرْبِيَّةٍ يَكَادُ زَيْتُهَا يُضِيءُ وَلَوْ لَمْ تَمْسَسْهُ نَارٌ ۚ نُّورٌ عَلَىٰ نُورٍ ۗ يَهْدِي اللَّـهُ لِنُورِهِ مَن يَشَاءُ ۚوَيَضْرِبُ اللَّـهُ الْأَمْثَالَ لِلنَّاسِ ۗ وَاللَّـهُ بِكُلِّ شَيْءٍ عَلِيمٌ

... اللهم ارزقنا لذة النظر إلى وجهك الكريم ...

Thursday, September 30, 2010

Shortcuts.

one of the best things I love when using different programs -Especially those I use daily- is discovering and using their hidden shortcuts .. once you get used to their shortcuts you will be super fast at whatever you're doing ...

So now I'll be talking about two programs and I will try to give you the best shortcuts I know for them .. :

P S : Sometimes shortcuts doesn't feel that good/useful at first , but after some time of
"enforcing" yourself to use them, they make quite a good difference and you'll wonder how did you survive without them :) ..

1]Google Chrome :
Actually most of it's shortcuts are about dealing with tabs ..
  • Ctrl+Tab : go to the next tab. -Use it all the time-
  • Ctrl+Shift+Tab : reverse the circulation direction. -I'm still new to it so I don't use it that much-
  • Ctrl+(Pgdn || Pgup) : go to the next , previous tab respectively. -always use it to get the previous tabs- "I Prefer this one the most because it also works in Eclipse :)".
  • Ctrl+Shift+(Pgdn || Pgup) : change the order of the current tab and moves it to right or left -Pretty handy and sweet actually -
  • Ctrl+(0|1|2|3...|9) : will directly switch you to the tab of that index.
  • Most of the time I just use Ctrl+Tab .. and If I wanted a previous tab I just cycle until I hit it.
#####################################################
  • Ctrl+t : open a new tab -Love it :) -
  • Ctrl + "Click a link" : open the link in a new tab.
  • Ctrl+w : close the current tab.-Use it all the time-
  • Ctrl+f : open find -it's so useful btw-
#####################################################
  • Alt + (Right Arrow || Left Arrow) : previous page and next page -Don't know if it works on windows-
#####################################################
  • F5 : refresh the page .. No kidding :D !! ..
  • F6 : make you edit the address of the current tab.
#####################################################
  • Ctrl+j : open the Download page.
  • Ctrl+h : open the history page.
The next program will be Eclipse .. and I'll try to reveal the best shortcuts I've found hiding in there isAllah !! :) :) ..

Thursday, September 23, 2010

Regular Expressions.

Continuing talking about java tips and tricks .. here's one of my favorite tricks :) ..

Regular Expressions :

  • So what are Regular Expressions ? Do you know The Command Line in Windows or Terminal in linux .. There're always some sort of commands that are built into it in order to do specific tasks. E.x. in Linux : "ls" lists all the files in the current directory ,"pwd" Prints the current directory,"cd" Change the directory to the folder specified after calling it .. and so on ..

  • Regular Expressions are just the same .. but in the split method contained in the String Class !! .. Let's start taking examples so you get to know what I'm talking about ..

String stn = "My Name is Ahmed";
String[] array = stn.split(" ");

  • What this does is that it breaks the sentence on the spaces .. This is actually very common and nothing is special here.
  • What if we wanted to break the sentence using more than one character ? ..

String stn = "My,Name.is!Ahmed";
String[] array = stn.split("[,.!]");

  • What this will do is simply break the sentence on the characters BETWEEN the [] .. the [] is just used to tell the method what characters that will be used .. try use it without the [] ,it won't work ..
  • Lets take another problem what if multiple of those characters found consecutive in the sentence ? .. using the previous way it will result in an empty Strings in the String array , what we want to do is tell the method to deal with those consecutive characters as a whole chunk and break the sentence around it.

String stn = "My,Name. !?!is!Ahmed";
String[] array = stn.split("[ ,.!?]+");

  • We just add + after the [] to till the method that those characters can come in a consecutive way ..
  • Now another problem , what if we wanted to break the sentence using a wide range of characters ? .. E.x. we want to break on the Numbers from zero to nine ?

String stn = "My1Name6is9Ahmed";
String[] array = stn.split("[1234567890]");
OR .. String[] array = stn.split("[0-9]");

  • The - means from to .. from 0 -> 9 ..
  • Now I'll introduce you to a new Expression which is "^" .. what this does is invert the set of characters given .. What I mean is what if I wanted to only keep the Numbers and delete everything else ? ..

String stn = "My1Name6is9Ahmed";
String[] array = stn.split("[^0-9]");

  • There're still a wide range of Expressions .. I will show some of them to you and let you figure out what they do :) ..

String stn = "My1Name6is9Ahmed";
String[] array = stn.split("(Name|Ahmed)");

String stn = "My1Name111is11111Ahmed";
String[] array = stn.split("1{2,4}");

###################################################################

Here's an interesting article about it on TC ..

if you have found an interesting Expression don't hesitate to share it here :) :) ..