Monday 30 January 2012

ACT-II •••(Source Code)•••

        Jake Gyllenhaal as Colter Stevens is an Army helicopter Pilot, he wakes up on a commuter train going to Chicago, but he doesn't  seem to know himself. When he on the bathroom mirror he saw a man  and he appears as Sean Fentress a school teacher. The woman his traveling partner named Christina Warren (Michelle Monaghan) seems to know him by the name Sean Fentress. After 8 minutes the bomb was explode in the train, killing everyone aboard and derailing it and a train travelling in the other direction. The mission og stevens was not successful using the Source Code and then, it was Flaskbacks/Alternate Timeslines.

Stevens awakes again with no memory and how he became involved in the source code projects. Stevens regains consciousness inside unfamiliar cockpit. Air force Captain Collen, Goodwin (Vera Farmiga) explain steven’s identity through a computer screen that he is colter stevens, she explain stevens is in the source code. Dr. Rutledge (Jeffry Wright) scientist for Beleaguered Castle (a military Unit named after the card named),he created the source code an experimental device, that allows its user to experience the last 8 minutes of another compatible person’s life within an alternate time. stevens last memory is he on helicopter on a mission in Afghanistan.

Stevens mission by using source code to discover the location of a bomb aboard the train and to know the bomber who detonated it. Goodwin explain to stevens the  train explosion occur that morning, and was a warning by the bomber as a precursor to a larger dirty bomb that would be detonated in downtown of Chicago and it can cause the deaths of Millions people. Through stevens actions cannot change the past and save the lives aboard the train, identifier the bomber in the alternate timeline will prevent the deaths of Millions people.

Stevens sent into the Source Code several more times and continues to rule out passengers suspected to be the bomber, he’s still finding the terrorist, as well as developing increasingly strong romantic feelings and empathy for Christina. Until the bomb explode and destroy the train again and Fentress dies, stevens send back to the chamber. Rutledge and Goodwin want to focus and keep on finding the bomber, when every time he sent into the Source Code, he remember the incident while on duty in Afghanistan that reportedly killed him. When stevens discover he verbally accost Goodwin for more information, she forced to explain the real life steven situation. Stevens make a deal to  complete the mission, if he complete the mission they terminate his life support after it is completed, then Dr. Rutledge agrees.

Stevens back in the Source Code, he eventually identifies the bomber named Derek Frost (Micheal Arden). Stevens mission was successful. Rutledge tells Goodwin to erased the memory of Stevens and renege in the deal so he can be used next mission. Stevens convince Goodwin to let him return to Source Code. One more time, after she will disable his life support against Rutledge’s orders. Stevens back aboard the train he disarms the bomb, immobilize Frost before the train destroy. After 8 minutes, stevens kisses and the time seems to freeze and Goodwin turns off his life support per his request Steven. Steven was surprised he was still in the same Fentress and his minds still remains. Stevens and Christina goes out for their Coffee and visit to cloud Gate in Chicago’s AT&T Plaza and live happily ever after, and then Goodwin arriving to work earlier that morning she receive and email from stevens explaining that he has changed the course of the future by saving the passengers. And that the comatose soldier in the lab will eventually go on to a different first Source Code mission one day.

Advantages:




Through using the Source Code we can use this Experimental Device to prevent an incident easily.

Disadvantages:

But through this Device Source Code, it can suffer a person, because instead that person having he’s rest in peace but they just given a task.

          Reflection:

The movie was created successfully it can go to virtual life because he/she ca n make changes in certain time. When we used programming we can easily and safety make our daily life. Nothing is impossible in programming it can make a changes.






rawr..

Saturday 28 January 2012

bring home exam

7. Fibonacci Series: Create a program that will print out a Fibonacci series,
e.g.           1 1 2 3 5 8 13 21 34 …  

Answer : 

function fibo($fnum)
{
$a = 1;
$b = 1;
$c = 0;
echo $a." ".$b;
for($i=0;$i<$fnum-2;$i++) {
$c = $a + $b;
$a = $b;
$b = $c;
echo $c;
}
}
$num = 8;
echo $num <br>;
fibo($num);
function fibo($fnum)
{
$a = 1;
$b = 1;
$c = 0;
echo $a." ".$b;
for($i=0;$i<$fnum-2;$i++) {
$c = $a + $b;
$a = $b;
$b = $c;
echo $c;
}
}
$num = 8;
echo $num <br>;

Part 1 Exam

3. Evens, Odds, and Dozens: Create a program that will count down to 0 from a given number—$start.  For each number, print the number and then print (“ is even”) if it is even and (“ is odd”), if it is odd.  In addition, if the number is a multiple of 12, print the number of dozens that it represents.  For example if $start=27, the output might look like:
26 is even.
25 is odd.
24 is even.  24 is 2 dozen.
23 is odd. … 

27 is odd.

Answer :


function OddEven($testNum)
{
if($testNum % 2 == 0)
{
echo " is Even";
}
else
{
echo " is Odd";
}
}
$start = 20;
do
{
echo $start <br>;
OddEven($start);
$start--;
}
while($start>=1)

Part 1 Exam

 2. “Mod” calculation: The mod (%) operator in PHP calculates the remainder when $a is divided by $b.  Create a program that calculates the remainder by repeatedly subtracting $b from $a until it can no longer be subtracted (i.e. stop subtracting when $a is less than $b).  Print out the remainder, nicely formatted (e.g. if $a=7 and $b=2 you might print “7 mod 2 = 1”). 


Answer:

function mod($modB)
{
if($modB % 2 == 0)
{
echo "0";
}
else
{
echo "1";
}
}
$a = 2;
$b = 7;
do
{
echo '$b % $a =';
mod($b);
$b -= $a;
}
while($b > 1)




Part 1 Exam

 2. “Mod” calculation: The mod (%) operator in PHP calculates the remainder when $a is divided by $b.  Create a program that calculates the remainder by repeatedly subtracting $b from $a until it can no longer be subtracted (i.e. stop subtracting when $a is less than $b).  Print out the remainder, nicely formatted (e.g. if $a=7 and $b=2 you might print “7 mod 2 = 1”). 


Answer:


function mod($modB)
{
if($modB % 2 == 0)
{
echo "0";
}
else
{
echo "1";
}
}
$a = 2;
$b = 7;
do
{
echo '$b % $a =';
mod($b);
$b -= $a;
}
while($b > 1)


Part 1 Exam

1. Leap Year Calculation: Given a variable called $year, create a program that will print out “<xxxx> is a leap year” or “<xxxx> is not a leap year” (where <xxxx> is the value of $year).  Use the following rules to determine if a year is a leap year:  if the year is divisible by 4 then it is a leap year, unless it is also divisible by 100 (in which case it is not a leap year), unless it is divisible by 400 (in which case it is a leap year). 


Answer:


 $year = 2012;
if($year % 4 == 0)
{
if($year % 100 == 0)
  {
if($year % 400 == 0)
  {
  echo "Leapyear";
    }
else
{
echo "Not a Leapyear";
}
   }
else
{
echo "Leapyear";
}
}
else
{
echo "Not a Leapyear";
}