RSS

Monthly Archives: October 2011

Weekly version – العدد الاسبوعي

السلام عليكم ورحمه الله وبركاته…
العدد الاسبوعي الجديد

 
 

بين كاتاوي ومخنوق ومنفسن !

الكاتاوي : ماتيجي أحكيلكوا حكاية كده

المخنوق : لا ماتحكيش


الكاتاوي : لا دي حكاية ليها علاقة بالعلم وكده


المنفسن : انت ايه يا اخي , مش بتزهق من الكلام
في العلم
الكاتاوي : طيب اسمعوني بس , هقولكوا على 3 حكايات صغيرة

المخنوق : لا انت بتهزر باين , انا قايم امشي ياعم , ده شاكلوا فاضي !!
المنفسن : طيب اقعد بس , شوية وهمشي معاك
المنفسن ل الكاتاوي : ارغي ياعم الفلحوس

( *ملحوظة

لاحظ مين اللي هيبتدي الكلام في كل حالة )

وبدأ يحكي الكاتاوي

____________

1

في احدى شركات الطيران

العميل : انا ماتهمنيش الفلوس في حاجة , المهم عندي اني ابقى مرتاح في سفري
الموظف المخدوع !!” : طبعا طبعا يا فندم , أنا بأكد لحضرتك انك هترتاح على الاخر

ياعيني الراجل ميعرفش انه هيرتاح راحة أبدية


*
نداء الى السادة المسافرين الى زائير : نرجوا سرعة التوجه الى البوابة رقم 2862256
😀
الحقيقة الشركة كانت متعاونة جدا , في مقابل مادي كبييير , و فعلاَ ريحت العميل على الاخر و كان طالع الطيارة مبسوط جدا . . . . .
بس . . .
الطيارة وقعت

الله يرحمه
______________________________
المخنوق : الله يرحمه ياعم , فين الكلام المفيد في كده يعني ؟؟!!
الكاتاوي : اصبر شوية بس . متبقاش مخنوق من نفسك علطول كده ومش عايز حد يتكلم خالص !

_____________________________

2


في احدى شركات الطيران

العميل :أنا أدفع أى حاجة مش مشكلة , انا يس عايز أسأل على وسائل الامان في الطائرة و
يقاطعه الموظف : يافندم متشغلش نفسك بأى حاجة خالص
العميل : طب ايه وسائل التكنولوجيا اللي
يقاطعه الموظف مرة تانية : يافندم متقلقش , كله تحت السيطرة


*
نداء الى السادة المسافرين الى زائير : نرجوا سرعة التوجه الى البوابة رقم 2862256

و طلعت الطيارة , صحيح ان الراجل اتكلف كتير جدا بس الكرسي كان مريح جدا , والطائرة طلعت وهبطت في ميعادها بالضبط
و . . . .
والراجل وصل بالسلامة
بس كان متضايق جدا جدا من المعاملة وانه لازم ميسألش على أى حاجة , أى حاجة
كان مخنووق فعلاَ وكاره الرحلة
______________________________

المخنوق : وانا كمان اتخنقت منك , ارحمني انا عندي الضغط , ماتموتنيش ناقص عمر !

المنفسن : شاكلك أصلن ملكش في اى حاجة خالص

الكاتاوي : ياجماعة اصبروا شوية بس

_____________________________

3

في احدى شركات الطيران

الموظف : ملهاش لازمة انك تتعب حضرتك وتيجي لحد هنا

العمبل : طب احجز ازاى ؟؟!!

الموظف : من على النت و كمان تقدر تطبع التذكرة في البيت وتروح المطار على ميعاد الطيارة علطول

العميل : ياراااجل !!! طب قشطة أوي
😀


*
نداء الى السادة المسافرين الى زائير : نرجوا سرعة التوجه الى البوابة رقم 2862256

الراجل راح المطار وركب الطيارة وكان متلخبط جدا علشان ميعرفش اى حاجة
ولما طلع الطيارة لقى الكرسي مرييح جدا و الحياة حلوة
شوية ولقى واحد قاعد قدامه بيلعب في الكرسي اللي قاعد عليه
الراجل استغرب جدا
وفجأة الكرسي بقى الة للجري , !!!
وكل شوية الراجل يحول الكرسي لحاجة تانية حسب احتياجاته , !!!

الطيار كان عبقري وبياخد طرق مختصرة وصعبة , بس واثق من قدراته ومن كفاءة الطائرة
وفي الاخر . . . الطائرة وصلت بسلام وفي أقل وقت

_____________________________

( افتكر الملحوظة اللي قلتلك عليها في الاول )

______________________________

المخنوق : بص يابني , انت حرام فيك الشتيمة , مع السلامة
ومشى المخنوق
الكاتاوي : هيفضل طول عمره كده !!
المنفسن : ما هو عنده حق , فين الكلام المفيد في الحكايات دي ؟؟!!

الكاتاوي : هقولك ياسيدي على الفولة كلها في 3 جمل
المنفسن : قول ياعم باتمان
الكاتاوي : الحكاية الاولى تفهمك ايه هو الويندوز
الحلو منه بفلوس كتير , ولما تشتري الحلو هتفتكر انك خلاص بقى عندك نظام تشغيل رائع , بس . . . شوف الراجل حصل ليه ايه في الاخر !! “

أما الحكاية الثانية تفهمك ايه هو الماك
مريح بس تكلفتوا كبيرة ومينفعش تتدخل في اى حاجة خالص صغيرة او كبيرة , يعني من الاخر انت محكوم عليك بالماك

😀 “

والحكاية الثالثة بقى تفهمك ايه هو اللينكس
قمة الراحة والامان , تقدر تتحكم فيه وتشكله زي ما تحب وتقدر تطور من امكانياته على حسب احتياجاتك , متعة العمل

المنفسن : امممم , طيب استأذن انا بقى , مع السلامة يا فلحوس
الكاتاوي : هيجي اليوم اللي تفهمني
_____________________________

انتهى الحوار لكن فيه بعض التوضيحات
ليه كاتاوي و مخنوق ومنفسن ؟؟
كاتاوي اشارة ل اللينكس وسعة صدره
😀


مخنوق اشارة ل الماك وضيق صدره , زي اللي حصل في الحوار وكمان اللي حصل في الحكابة 2


منفسن اشارة ل الويندوز وو…. وعدم وجود صدر أساسا

😀

والملحوظة فاكرها ؟ دي اشارة ل ان اللينكس هو اللي دائما بيدور على راحتك ويحققهالك , بس الباقي لازم انت اللي تدور على راحتك وتطلبها بنفسك ( بغض النظر عن الحوار اللي مكتوب )

طيب ليه زائير ورقم البوابة الكبير ؟؟

هي جات كده على بالي

مع تحيات
الحملة الوطنية لتطهير الويندوز من البلد , ونشر اللينكس في كل السيبرات

 
2 Comments

Posted by on October 28, 2011 in CAT, Featured

 

The GNU C Compiler (GCC)

Let’s first talk a little bit about the C Standards and Diaclets
The First ANSI Standard for C was named C89 and it became an ISO Standard in 1990. Then some errors modifications were made on the C89 and the new standard became C99 and it has became an ISO in the same year.
some modifications were made to the C99 on 2001.

But what are those standards are for?
Standards were made for more portability. So no run-time problems happen once you try running your code on a platform that is different from the one you compiled your code on

How can you specify the standard you want to use in your GNU C Compiler?
since you are reading this article I think you should be familiar with GNU/Linux and the shells. and of course how commands work on the shells. Anyway, you can specify the Diaclet you want to use via gcc options. the first option to mention is std=%%% and that sets the language standard you are using.
another option is -traditional and that supports some of the K&R features.
yet another one is -funsigned-char and that option makes the compiler handle char variables as unsigned char which I dont see a very valuable option since those data-types can be used directly in the code..But hey we are just giving examples ;). and -fno-unsigned-char does exactly the oppsite.
-fno-asm disables using inline asm function in your code and inline functions and typeof keyword.

But…What have GCC or GNU C enabled us?
Frankly, GNU C have provided the C language a very precious features. Like:

  1. Local Labels
  2. Labels as a value
  3. Nesting Functions
  4. Typeof
  5. setting an array length to zero or variable
  6. passing variable number of arguments to macros
  7. supporting arthemtics on pointers
  8. inline functions
  9. function names
  10. return address

And much more than those But I have only mentioned the most important features.

Local Labels: –
defining and supporting local scopes for labels was a true amazing feature.

void a(void){
__label__ lbl;
int b = 2;
{
__label__ lbl;
goto lbl;
lbl:
b+=2;
}
goto lbl;
lbl:
b+=3;

}

in this function the local label lbl in the outer scope is very different than the one in the inner scope. so the compiler can discriminate between the lbl outside and the lbl inside and not pass into a conflict or return any errors. that’s an amazing feature indeed.

I think that is enough for this week. I will compelete that in another part.

 
Leave a comment

Posted by on October 28, 2011 in Featured, Linux, Software

 

Start with google


as most of you must have heard Start with google bus arrived at mansoura yesterday , and ofcourse we wouldn’t miss it ! So here’s our report for the lovely day incase you missed it.

They arrived around 6:00 PM at Misr library , they started by introducing the representative of one of the associations the was originated from Mansoura but is now big and covers all Egypt “SAS” that stands for “Science Age Society جمعية عصر العلم ” , It has programs that aim to spread science among all different levels of the society starting from kids till scientists . The association is one of the sponsors of the competition

Then in the discussion part , small communities that serve the same purpose were mentioned and the association’s representative welcomed any sort of collaboration -interesting no ?-

Make sure you check their website trust me you will be impressed 😉

http://www.sasegypt.org

Then Mr mohammed Aboud started talking about the competition itself , ofcourse starting with the video -actually we made him skip it we all saw it before the session 😀 – but here it is anyway


Then he started explaining the competition phases :

Phase 1 : the submission phase which will end on 31st this month so hurry up If you’ll participate

around 7000 submitted but only 1600 actually completed the submission , it’s expected that t the number will jump to 3000 by the dead line that’s why they wont extend it

a good note is that they limited the number of lines for the description , so be as innovative as

possible .

Phase 2 : 200 projects will be picked and will receive special training about business management and related stuff not that every team must be at maximum of 5 people , 2 will be picked for the training .

Phase 3 : 50 projects will be picked based on the prototypes of their project.

Phase 4 : 20 will be picked -suspense here-

finally , Winning team will be picked , and will receive a prize of 1.2 Millions to finance their startup

as you may guess we were all surprised how come the runner ups get nothing , mr mohamed

replied that there will be tons of investors there, so it’s a win win for whoever reaches phase 4

Note:team will not receive the prize unless they register their company -ouch- .

moving on to the discussion part , we were asked why on earth would google think of doing that ,

quoting wael el fakharany he said “We need people who can dream, who have ideas” . Google is simply investing and they picked Egypt for this because the saw too much potential in Egyptian youth after Jan25 , I was still sad that Wael el fakharany didn’t make it to mansoura 😦

Some equation I liked in the presentation :

القدرة X الرغبة X معرفة الدور = Success

The multiplication means that if one of the factors was zero , it’s all zero

so you CAN do it

you WANT to do it

you’re in the RIGHT PLACE where you can innovate

————————–

little hard work will do the trick

So If you have a good Idea you don’t want to miss this chance , Even if you don’t win you will be forced to work on it and humans 101 , deciding to start is always the hardest part.

Follow @Ebda2 on twitter for updates , and ofcourse here’s the website : http://startwithgoogle.com

Cheers !

 
1 Comment

Posted by on October 28, 2011 in Business, Companies, Featured, Google

 

Pthreads

POSIX Threads (phtread) [1]
————————

POSIX thread libraries are the standard thread API for C/C++ ,

as the name suggests it allows you to use threading which makes the exectution of your application faster

specially on multi-processor or multi-core systems where one process run on one processor while another one is running on the other , gains are also found on uniprocessor systems which exploit latency in I/O and other system functions which may halt process execution. (One thread may execute while
another is waiting for I/O or some other system latency.)

Note that all threads share the same address space of the main process ,so let’s hop on to the code explaination will be included in the comments

 

Now that you’ve read all that , what this code does is that it creates 2 different threads running the same function, waits for them to finish then prints their exit status and waves goodbye (here is the code without the comments : http://pastebin.com/X3qQDVrk << looks alot prettier on huh ? 😀 )
if you compile that using : gcc -o threads threads.c -lpthread
then run it ./threads
you should get this :

Thread 1 says hi!
Thread 2 says hi!
Thread 1 returns: 0
Thread 2 returns: 0

Perfect! now comment out the pthread_join lines and recompile and run then see what happens

Thread 1 says hi !
Thread 1 returns: 0
Thread 2 returns: 0

Uh..run again !

Thread 1 returns: 0
Thread 2 returns: 0

errr…

see the risk i told you about above ?

That’s enough for now We’ll continue this Next week isA 😉

 
2 Comments

Posted by on October 28, 2011 in Featured, Linux, Operating systems, Software