SPIES BERDAFTAR

11 January 2016

weekly reminder #3

بسم الله الرحمن الرحيم


everytime someone is prasing you, do reply :

هَـٰذَا مِن فَضْلِ رَبِّي
Haaza min fadhli rabbi. 
Ini termasuk kurnia Tuhanku.
This, by the Grace of my Lord.
and pray :

 



regards,

05 January 2016

personal blog #10 - I'M A LOSER

ASSALAMMUALAIKUM W.B.T. peeps !

being afraid of what others might think about you is just a unworthy, useless feelings for losers. I'm always telling myself that, but some of the time I'm just...a LOSER. I'm afraid of what people may talk about me, as I'm "not living up my potential," I'm "wasting my intelligence," I'm "taking useless course," & so on. Frankly, someone used to talk to me like that. THESE kind of thoughts are sometimes, also what I'm thinking about myself. In other hand, on the other time. I know is it not real, (is it?)

I'm just doing what I love, what I will enjoy when I'm working later in future insyaAllah. It is just cliché for someone who got straight A's in SPM....4.00 in foundation in engineering NEED to futher on ENGINEERING OR MEDIC ONLY.

SOMEHOW, sometimes, I'm just a SORE LOSER, feeling ashamed to tell others what am I studying for degree, if being asked. BUT some other time, I can tell 'em loud & proudly. Bcoz I'm living up my own live, no pressure.

"YOU'RE WASTING YOUR TIME LEARNING CHEMISTRY, PHYSICS, ADD MATH..."

NO I DON'T! I LEARNT 'EM FOR THE SAKE OF THE KNOWLEDGE, LILLAHI TAALA. TO GAIN KNOWLEDGE, TO KNOW ALLAH BETTER. WHAT'S WRONG WITH IT?!

Please, I need prayers from whoever reading this..to pray for me. May I stay strong with the path I've chose, no matter what other negative people talks.  Thank you in advanced. May Allah bless your life.

No, i'm not being 'riak' or proud by telling you I got excellent past academics records, I just need....to confess this to someone. to write 'em all out. To clear my head 'bout this thing, hopefully.



regards,

04 January 2016

weekly reminder #2

بسم الله الرحمن الرحيم


"NO MATTER WHAT LIFE THROWS AT US, NO MATTER WHAT WE'RE GOING THROUGH, NO MATTER WHAT IS HAPPENING AROUND US.

WHETHER IT BE PROBLEMS AT OUR HOUSE, WHETHER IT BE COMMUNAL PROBLEMS, WHETHER IT BE PROBLEMS IN SOCIETY, WHETHER IT BE POLITICAL ISSUES,   
WHETHER IT BE NATURAL DISASTERS, WHETHER IT BE HARDSHIPS, THIS AND THAT, LOSS OF LIFE, ILLNESSES, SICKNESSES,

NO MATTER WHAT IS GOING ON IN OUR LIFE..

YES, OUR BODY MAY BE UNCOMFORTABLE, OUR BODY MAY BE FACING SOME HARDSHIP, OUR BODY MAY BE IN PAIN. BUT OUR GOAL IS THAT OUR HEART IS FREE, & OUR HEART IS FREE IN SUBMISSION OF ALLAH SWT."

-Brother Saad Tasleem


                                                                                           regards,

28 December 2015

weekly reminder #1

بسم الله الرحمن الرحيم

Almighty. Keep reminding me that  
the blessings in my life are due to 
your Mercy & not my actions. 
When I get proud, give me a wake  
up call.


Mufti Menk, 27th Dec 2015 on twitter

regards,

03 November 2015

programming tips #1 : conditional expression (for c & c++)

ASSALAMMUALAIKUM W.B.T. peeps !

frankly, i'm inspired to share this on my blog bcoz on this evening, i got programming test and.... i'm stucked at this question. lol! never expect this one to be questioned on test... T.T k, my bad..


after finishing the test & went back to my room, i started to do some coding bout it to understand more. and now here i am, wanting to share to you all what i got.

so, first of all. what is conditional expression?  well, it is an expression that use conditional operators.

conditional operators are basically  ? and : symbols.

what are they used for? 
they are used to simplify or shorten if...else statement.

how?
here's the syntax >>
condition ? true case : false case

comparing it with an if..else statement;

if(condition)
   true case;
else
   false case;


got it? yes? congrats, fast-learner!

no? it's ok, let's move on with a simple example..

suppose there's a if...else statement;

if(marks>50)
   pass++; //increase number of student passed by 1
else
   fail++; //increase number of student failed by 1

converting this using conditional expression;
marks>50 ? pass++ : fail++ ;

condition before the ? will be tested. if true, execute pass++ (statement between ? and :). else, execute fail++ (statement after :) .


next example.. printing output.
from;

if(weight>65)
   cout<<"Fat!!"; 
else
   cout<<"Gorgeous!"; 

from what we had learnt before, converting this using conditional expression;
weight>65 ? cout<<"Fat!!" : cout<<"Gorgeous!" ;

but! there's a simpler way of doing this;
cout<<(weight>65 ? "Fat!!" : "Gorgeous!") ;

note that the second way we need to put brackets so the compiler will give priority to the conditional expression first.

same goes in c language;
from;

if(weight>65)
   printf("Fat!!"); 
else
   printf("Gorgeous!");

converting to conditional expression;
mark>50 ? printf("PASS") : printf("FAIL"); 

or putting the conditional expression inside printf;
printf(mark>50 ? "PASS" : "FAIL");

note that for the second way we did not need to put extra bracket (comparing to c++). bracket from the printf is enough.


all of examples above are the simple ones. of course, those that went out in my exam earlier is much more complicated. ~.~

such as (using c++):

if(cpa>3.0)
{
   if (cpa>3.5)
      cout<<"Dean's List";
   else
      cout<<"Second Class";
}
else
{
    if(cpa>2.0)
       cout<<"Passed";
    else
       cout<<"Failed!"; 
}

converting to conditional expression;
cout<<(cpa>3.0?cpa>3.5?"Dean's List":"Second Class":cpa>2.0?"Passed":"Failed");

if you compare both thoroughly, you can see that is just follow the flow as the if....else statement. line by line. and this is the example for nested if...else.


last example,
(using c language);

if(height>170)
{
   printf("So tall!") ; 
   tallpeople++ ; //increase number of tall people by 1
}
else
{
   printf("Hi shorty.") ;
   shortpeople++ ; //increase number of short people by 1
}

converting to conditional expression;
height>170 ? printf("So tall!") , tallpeople++ : printf("Hi shorty.") , shortpeople++ ;

or

printf(mark>50 ? "So tall!",tallpeople++ : "Hi shorty.",shortpeople++);

this example is actually for if...else with compound statements. we just need to put comma ',' between these statements.

final note, spaces between conditional operators are not necessary, but it'll make your coding easier to read.. as malay words, "sedap mata memandang" :3


that's all for tonight. hope this helps to enhance your knowledge. ^^


till we meet again!
regards,