Search Ali's Blog

Saturday, October 14, 2006

البحث عن الارقام

البشر يبحثون عن سبب للاحتفال, انها غريزه بشريه.

لادينيون يحتفلون بالفطر,

مسلمون يحتفلون بعيد ميلادهم,

ودروز في راس السنه,

انها مجرد ارقام, لتذكرك ان تحتفل, ليس انت فقط, بل كل من تذكر تلك الارقام,

فلا تهمل هذه الارقام,

لكن اياك ان تنسى حزنك بسبب ارقام مجرده,

مجرد ارقام.


Oh, I almost forgot,
Today is my birthday.
I am 23 yo...
They say that time changes things, but you actually have to change them yourself.
Hope I'll change more things next year.


Friday, October 13, 2006

operator "=" rc

After a long discussion with my brothers on the returned code of operator "=", Unsurprisingly, I was wrong, and it seems that the returned code of (a=b) in cpp is "a" by reference (and not by value as I thought).
simply run the following code by g++ to make sure:

int main() { int b; (b=5)++; printf("b=%d\n", b); return 0; }

Surprisingly, the output is b=6.

What about ANSI C?! hmm, it seems that the rc of (a=b) in C is "a" by value, thus the code won't compile.

Magnetics Pyramid

I bought 2 magnetic toys few weeks ago, I liked them a lot, so I bought another 6 sets, and built with my brothers a pyramid, nice one, we needed more than 1000 pieces to build it, and it took about 30 min, I uploaded 15 sec video in fast playback of the building process :P my first video in youtube (google just bought them couple of days ago for $1.65b).

From misc