You can check the following link for a step-by-step guide to build your rails environment on the MAC OS 10.4.
you can just change the versions you need to install. (I get the latest ones)
After finishing don't use the $ruby -version
In this case, you will get an error. the error is due that ruby tries to evaluate ruby -v then "ersion".
to check ur version just run $ruby -v
About Me

- Ahmed Abd-ElHaffiez Hussein
- PhD Candidate at Purdue University, Computer Science.
Monday, December 24, 2007
Saturday, December 22, 2007
I will "Facebook" you
The word Facebook has been added to the 2008 edition of the Collins English Dictionary, as both a noun and a verb.
Grat Goal for Facebook.....
Grat Goal for Facebook.....
Thursday, December 20, 2007
Top 10 ways to un-bake your brain
I passed through a very interesting blog entry, among the co-workers I had through my working life, I think more than 95% need to try some of these techniques.
baking brains has a negative impact on the surrounding, not just you. so, Plz be helpful and try to De-Stress.
In the following I am listing the entry with some comments:
1. Mindfulness-based stress reduction: I don't have access for this , so maybe later I can experience it.
2. Get lost in music : I do that a lot. I try to be ready with my hits player armed. I use to listen to Quraan, soft music, french melodies..etc
3. Get Active for 30 minutes: I don't do that :( , but I really need to do it. I am thinking of getting a part of it during my half hour break. I think it will help me a lot.
4. Get a breath-break: My favorite practice :), I just knew by nature that this helps me a lot to de-stress.
5. BioFeedback: I liked the idea. I hope I can do it sometime.
6. Game-out: Actually I don't feel good with gamed requiring an intense concentration. so, maybe i should reconsider this habit.
the part of writing things down is very nice. I thought it was only me the stupid person who totally forgets the details of his finished tasks.
baking brains has a negative impact on the surrounding, not just you. so, Plz be helpful and try to De-Stress.
In the following I am listing the entry with some comments:
1. Mindfulness-based stress reduction: I don't have access for this , so maybe later I can experience it.
2. Get lost in music : I do that a lot. I try to be ready with my hits player armed. I use to listen to Quraan, soft music, french melodies..etc
3. Get Active for 30 minutes: I don't do that :( , but I really need to do it. I am thinking of getting a part of it during my half hour break. I think it will help me a lot.
4. Get a breath-break: My favorite practice :), I just knew by nature that this helps me a lot to de-stress.
5. BioFeedback: I liked the idea. I hope I can do it sometime.
6. Game-out: Actually I don't feel good with gamed requiring an intense concentration. so, maybe i should reconsider this habit.
the part of writing things down is very nice. I thought it was only me the stupid person who totally forgets the details of his finished tasks.
Wednesday, December 19, 2007
بسبب نوم السائق مصرع وإصابة 24 حاجا مصريا في السعودية
الرياض حازم الشرقاوي:
لقي 5 حجاج مصريين مصرعهم وأصيب 19آخرون أثناء توجههم من مدينة الرياض إلي مكة المكرمة لأداء مناسك الحج والحجاج المتوفون هم: محمد جمعة مقصود ومحمد سيد أحمد محمد ومحمد عبدالله أحمد وابراهيم أحمد متولي وأحمد عبدالعال والمصابون في مستشفي الملك عبدالعزيز في الطائف هم: سعيد عبدالغني أحمد ومحمد عبدالفتاح وسلوي أمين عز ووائل صالح ورنيم وائل صالح وفاتن عبدالباقي وهويدا حسن ناصر وعز الدين عبد الرؤوف ونادية عبدالرحمن وحسن محمد عبدالغفار ومعتز سيد محمود وإسلام محمود إسلام وطه محمد أبو الفتوح وسوسن المصري. أما المصابون في مستشفي الملك فيصل بالطائف وهم: أحمد سعيد محمد وأحمد عبدالبديع وأسماء محمود وأشرف سعيد وكريم محمد. وقال فتحي خميس الملحق الإداري في القنصلية العامة المصرية في جدة: إن السفير عفيفي عبدالوهاب القنصل العام قام بتشكيل فريق من ممثلي الجالية المصرية في الطائف للتوجه إلي مكان الحادث وزيارة المصابين في المستشفيات، وأشار فتحي خميس إلي ان الفريق توجه إلي المصابين وأطمأن عليهم وكانت حالتهم متفاوتة ما بين متوسطة وكبيرة لأن الحادث كان صعبا بسبب انقلاب الاتوبيس عدة مرات، وأضاف أن القنصلية تتابع الحالات أولا بأول كما ستقوم بالتنسيق مع الجهات السعودية لإنهاء إجراءات دفن المتوفين في الأراضي السعودية أو نقلهم إلي مصر حسب رغبة ذويهم. وكان الحادث قد وقع أول أمس في منطقة 'ظلم' بالقرب من الطائف غرب السعودية حيث تسببت غفوة قائد الحافلة في انحراف الاتوبيس عن الطريق علي بعد 25 كيلو مترا من مركز 'ظلم' علي طريق الطائف الرياض مما أدي لانقلابها عدة مرات وتناثرت الجثث وأجساد المصابين علي جنبات الطريق فيما احتجز أكثر من 8 أشخاص بين ركام الحافلة، وهرعت إلي مكان الحادث 28 فرقة إسعافية من الهلال الأحمر والمراكز الصحية.
لقي 5 حجاج مصريين مصرعهم وأصيب 19آخرون أثناء توجههم من مدينة الرياض إلي مكة المكرمة لأداء مناسك الحج والحجاج المتوفون هم: محمد جمعة مقصود ومحمد سيد أحمد محمد ومحمد عبدالله أحمد وابراهيم أحمد متولي وأحمد عبدالعال والمصابون في مستشفي الملك عبدالعزيز في الطائف هم: سعيد عبدالغني أحمد ومحمد عبدالفتاح وسلوي أمين عز ووائل صالح ورنيم وائل صالح وفاتن عبدالباقي وهويدا حسن ناصر وعز الدين عبد الرؤوف ونادية عبدالرحمن وحسن محمد عبدالغفار ومعتز سيد محمود وإسلام محمود إسلام وطه محمد أبو الفتوح وسوسن المصري. أما المصابون في مستشفي الملك فيصل بالطائف وهم: أحمد سعيد محمد وأحمد عبدالبديع وأسماء محمود وأشرف سعيد وكريم محمد. وقال فتحي خميس الملحق الإداري في القنصلية العامة المصرية في جدة: إن السفير عفيفي عبدالوهاب القنصل العام قام بتشكيل فريق من ممثلي الجالية المصرية في الطائف للتوجه إلي مكان الحادث وزيارة المصابين في المستشفيات، وأشار فتحي خميس إلي ان الفريق توجه إلي المصابين وأطمأن عليهم وكانت حالتهم متفاوتة ما بين متوسطة وكبيرة لأن الحادث كان صعبا بسبب انقلاب الاتوبيس عدة مرات، وأضاف أن القنصلية تتابع الحالات أولا بأول كما ستقوم بالتنسيق مع الجهات السعودية لإنهاء إجراءات دفن المتوفين في الأراضي السعودية أو نقلهم إلي مصر حسب رغبة ذويهم. وكان الحادث قد وقع أول أمس في منطقة 'ظلم' بالقرب من الطائف غرب السعودية حيث تسببت غفوة قائد الحافلة في انحراف الاتوبيس عن الطريق علي بعد 25 كيلو مترا من مركز 'ظلم' علي طريق الطائف الرياض مما أدي لانقلابها عدة مرات وتناثرت الجثث وأجساد المصابين علي جنبات الطريق فيما احتجز أكثر من 8 أشخاص بين ركام الحافلة، وهرعت إلي مكان الحادث 28 فرقة إسعافية من الهلال الأحمر والمراكز الصحية.
GoodBye My Friend

To a kind heart..to kind friend..
It's bad u don't feel how much you like someone until you loose him. :'(
اللهم تقبل منه صالح عمله و تجاوز عن سيئاته.
اللهم ثبته عند السؤال، وعند العرض عليك.
اللهم اغفر له و ارحمه
اللهم غسله بالماء و الثلج و البرد
اللهم نقه من الذنوب و الخطايا كما ينقى الثوب الأبيض من الدنس
اللهم اجعل عن يمينه نورا وعن شماله نورا ومن فوقه نورا ومن تحته نورا ومن خلفه نورا و من امامه نورا.
بِسْمِ اللّهِ الرَّحْمـَنِ الرَّحِيمِ
الْحَمْدُ للّهِ رَبِّ الْعَالَمِينَ
الرَّحْمـنِ الرَّحِيمِ
مَـالِكِ يَوْمِ الدِّينِ
إِيَّاكَ نَعْبُدُ وإِيَّاكَ نَسْتَعِينُ
اهدِنَــــا الصِّرَاطَ المُستَقِيمَ
صِرَاطَ الَّذِينَ أَنعَمتَ عَلَيهِمْ غَيرِ المَغضُوبِ عَلَيهِمْ وَلاَ الضَّالِّينَ
صدق الله العظيم
انا لله وانا اليه راجعون
Sunday, December 16, 2007
JAI handling files
I am using JAI to display images. First I run my development environment was MAC. Everything was going smooth with me.
The problems started when I moved to Windows. Somehow, when I try to delete the image file from the hard disk, it didn't work.
Seems that JAI keeps a reference over the file indefinitely.
Example:
The file load operation doesn't release the handler.
I tried to nullify the source handling the image, then call the System.gc(). (which is a really bad solution)
another solution is as following:
If this doesn't work, it maybe because file descriptor is not released. you may need to call the garbage collector.
The problems started when I moved to Windows. Somehow, when I try to delete the image file from the hard disk, it didn't work.
Seems that JAI keeps a reference over the file indefinitely.
Example:
PlanarImage image = JAI.create("fileload",path)
The file load operation doesn't release the handler.
I tried to nullify the source handling the image, then call the System.gc(). (which is a really bad solution)
another solution is as following:
//replace fileLoad operation
File image = new File(path);
FileInputStream fis = new FileInputStream(file);
byte[] buffer = new byte[(int)file.length()];
fis.read(buffer);
fis.close();
PlanarImage image = JAI.create("stream",new ByteArraySeekableStream(buffer));
//replace file store operation
JAI.create("filestore",image,file.getAbsolutePath(),"jpg",null);
If this doesn't work, it maybe because file descriptor is not released. you may need to call the garbage collector.
Tuesday, November 06, 2007
Configure libtiff for Visual C
I had to move my working environment to windows to realize integration with my organization. So, one of the steps was to configure libtiff to work on Visual C.
To use LIBTIFF in your existing VC++ 6.0 Project/WorkSpace, you need to do the following setting modifications:
- Open your existing Project/WorkSpace file in VC++ 6.0
- Choose Project-Settings... menu item.
- Click "C/C++" tab.
- Choose "Preprocessor" item in the "Category:" menu.
- Choose "All Configurations" item in the "Settings for" menu.
- Add to the "Additional Include Directories:" field the path to the include directory of the libtiff folder.
- Choose "Code Generation" item from the "Category" menu
- Choose "Win32 Release" item in the "Settings for:" menu
- Select "Multithreaded" option in the "Use run-time library:" menu.
- Select "Win32 Debug" item in the "Settings for:" menu
- Set "Use run-time library" menu to the option "Debug Multithreaded".
- Click "Link" tab in the dialog.
- Select "Input" item in the "Category:" menu.
- Choose "All Configurations" item in the "Settings for:" menu
- Add to the "Additional library path:" the path to the lib folder in the libtiff folder.
- Choose "Win32 Release" item in the "Settings for:" menu
- Add to the "Object/library modules:" field: libtiff.lib
- Choose "Win32 Debug" item in the "Settings for:" menu
- Add following text to the "Object/library modules:" field: dlibtiff.lib.
- Click "Ok".
Saturday, November 03, 2007
Installing Windows, Ubuntu7.10, Mac OS 10.4.10 on MacBook (Triple Boot)
I am happy with my MacBook with its running Mac OS X 10.4.10. I can't stand working on windows any more, I feel more comfortable with Mac OS.
My master Thesis is running on linux environment(basically Fedora, but I successfully turned it to be Ubuntu)
My current project delivery should be done on windows. An easy solution costing 60$ would be to purchase Fusion.
Although Fusion looks very interesting, I didn't submit to this solution, for the following reasons:
- Running virtual machines consumes more memory, in this case I will loose some performance which is something I will certainly need during development.
- More memory usage, means more power consumptions, hence less battery life time. in normal cases I enjoy having ~4hrs battery life time with my lovely Mac. this is sthg i don't stand to loose.
- to overcome the first problem, I can extend my RAM. this will make the virtual software costs me almost (60+90)$....I really can't afford this for now. (I didn't get paid for salary 3 months ago)
My MAC specs are:
Processor: 2.16GHz Intel Core 2 Duo
Memory: 1 GB 667 MHz DDR2 SDRAM
MAC OS X: 10.4.10
The target is to install Ubuntu 7.10 and WinXP SP2 on MacBook.
steps:
- Get BootCamp: I think it may force you to update to Mac 10.5. (luckily I installed it 1 month ago before leopard is released)
- Update your Mac OS.
- Install rEFIT.
- run BootCamp assistant and follow instructions to burn driver CD for windows. (don't proceed with installing steps)
- Backup your data. (you may not loose your data if things go smoothly)
- Check your disk partitions and identify the Mac Partion. I most cases it is /dev/disk0s2. but if you are not sure, you can verify this by running a shell command using the diskutil:
$ diskutil list
resize your HDD using Diskutil by running the following command. first you specify the volume to be resized, and its new size, then the type, and the name of the new volumes followed by their size.$ diskutil resizeVolume /dev/disk0s2 70G "Linux" "Linux" 20G "MS-DOS FAT32" "Windows" 20G
- insert your XP SP2 CD and hold down the "ALT" key.
- install XP on the valid partition, just give it a quick FAT32 format.
- you should now have a dual boot(windows with Mac).
- insert your Ubuntu 7.10 Live CD.
- run the installation normally. You should set up the partition manually. Don't mount the EFI system partition. you need only to mount / to the drive you allocated to your linux installation. I didn't make a SWAP file, I just don't need this for now, I relied on my 1GB RAM.
- Continue through the following steps.
- When you reboot, you should have triple boot.
Subscribe to:
Posts (Atom)