Saturday, April 21, 2012

ITC280 Update 3

What we learned on Week 3 of ITC280 Class...


1. We don’t need a closing php tag if there are no conflicts.
<? php
echo "does this work?";

2. A function that has data passed to it as a parameter.
$myPay = 50000;


areYouHappy(140000);


function areYouHappy($myPay)


{


   if($myPay >= 110000)


  {


  echo "I'm Happy!";


  }else{


  echo "Not so Happy!";


  }


}


3. We can use curly braces to identify the variable - with backslash added to escape dollar sign
echo "I'm Happy with the \${$myPay}!";


4. We can pass in a variable via the keyword global.
$myPay = 50000;


areYouHappy();


function areYouHappy()


{


 global $myPay;


   if($myPay >= 110000)


  {


        echo "I'm Happy with the \${$myPay}!";


  }else{


        echo "Not so Happy with the \${$myPay}!";


  }


}









5. Use the keyword return to pass data out of a function.

$myPay = 50000;


echo areYouHappy();


function areYouHappy()


{


 global $myPay;


   if($myPay >= 110000)


  {


        return "I'm Happy with the \${$myPay}!";


       


  }else{


        return "Not so Happy with the \${$myPay}!";


  }


}


6. We can pass the data in as a parameter, and add br tags for readability.
$myPay = 50000;
echo areYouHappy($myPay);


echo areYouHappy(5);


echo areYouHappy(140000);


echo areYouHappy(30);


function areYouHappy($myPay)


{


   if($myPay >= 110000)


  {


        return "I'm Happy with the \${$myPay}!<br />";


  }else{


        return "Not so Happy with the \${$myPay}!<br />";


  }


}


7. Text is the default type attribute for the input element.
First Name: <input name="FirstName" />


8. An example of data in a querystring
forms1.php?FirstName=Leopaul


9. If we have more than one piece of data, it is separated by ampersand.
forms1.php?FirstName=Leopaul&LastName=DelRosario


10. If a value has a space, it is replaced with a plus sign.
FirstName=Leo+Paul&LastName=Del+Rosario

11. Our first web application.
if(isset($_POST['FirstName']))


{


echo $_POST['FirstName']; 


}




12. Our first REAL web application.
<html>


<body>


 <?php


 if(isset($_POST['FirstName']))


{


echo $_POST['FirstName'];


echo '<br /><a href="forms2.php">RESET</a>'; 


}else{


?>


 <form action="forms2.php" method="post">


 First Name: <input type="text" name="FirstName" /><br />


 Last Name: <input type="text" name="LastName" /><br />


 <input type="submit" />


 </form>


 <?php


}


?>


</body>


</html>


13. Example of a superglobal. It gives us the current file name.
$_SERVER['PHP_SELF']


14. Force cast data to an integer
$myTires = (int)$_POST['Tires'];//forced cast to int

NOTES:

Sadly, my scores at Pop Quiz # 4 and Test # 3 are badly. For Pop Quiz # 4, I got 67% then on Test # 3, it's a 50%. Can't believe that most of the questions here are extremely difficult. I tried looking back at past lessons but the questions are too complicated to answer. Next time, I should remain focused on my class in order to get a better grade.

Speaking of which, I am currently working on Assignment # 3, which is the Troubleshooting Exercise. Due Monday, Apr. 23rd. In class, we only finished 5 out of 10 errors to find on this assignment. The trouble is, how can I find the remaining five errors?

Anyway, Mr. Newman set up the fixed version but the link is broken. I e-mailed him to get this link to the fixed "adder.php" page fixed so I can get the five remaining errors found. God, help us...

SCORES:

Pop Quiz # 4 - 7/10 (67%)
Test # 3 - 9/18 (50%)

2nd generation Mazda 3 and Mazda CX-5 arrived in the Philippines!!!

After three years of waiting, the all new 2nd generation Mazda 3 has arrived in the Philippines! Finally!

2012 Mazda Axela

So, what would you expect on the new Mazda 3? Well, you know how it looked like right? As for the engine types; it comes with either a 1.6L or a 2.0L petrol engines.

The cost? 999,000 Pesos for the 1.6 V sedan, 1,099,000 Pesos for the 1.6 V hatch, and 1,299,000 Pesos for the 2.0 S sedan.


Yes, we are happy that it's about damn time the new Mazda 3 arrived but there's something that bothered here....

2013 Mazda CX-5

Oh cock! The Mazda CX-5 has arrived and it only comes with a 2.0L SKYACTIV-G engine mated with either a 6AT or a 6MT. You know that this engine won't work in the Philippines due to the dirty fuel, or is it?

Prices start at 1,392,000 Pesos for the CX-5 MT up to 1,452,000 Pesos for the CX-5 AT

Bubble Gang's HOT SUMMER TREAT

Despite being a full-fledged SPG program, that wouldn't stop Bubble Gang for pulling the stops for their 2012 Summer Special in the April 20, 2012 episode. With Michael V, Ogie Alcasid, Rufa Mae Quinto, Antonio Aquitania, Boy2, Maureen Larrazabal, Ellen Adarna, Gwen Zamora, Jackie Rice, Sam Pinto, and guests like Pancho Macho, Betong, Michelle Madrigal and Chariz Solomon (among many others), they've turned this whole summer day-off into a more sensible one such as...

- Group Picture gags

Group picture


- Mr. Assimo's at the resort

Mr. Assimo


- WARNING! Head & Shonggals causes severe hair touching obsession. Bubble Gang does Head and Shoulders Smooth and Silky by spoofing this commercial as HEAD AND SHONGGALS Smooth and Silky.

Bubble Gang does Head and Shoulders


- Guess who's back? Yes! It's Coach Calmado and wow, ain't he's getting angry at those who's interrupting the wedding at the resort!

Coach Calmado


- Who's going to wear that swimsuit? Cheche or Bureche?

Cheche Bureche


- Pick Up Lines for the summer special!!!

Pick Up Lines


1) Kung saranggola ka, pisi ako. Kasi gusto ko ng lasong nakatali sa iyo.

2) Shooting Star ka ba? Kasi makita ka lang saglit, grabe na ang tuwa ko!

3) Pendulum ka ba? Kasi habang napapalapit ka, nahi-hypnotize ako.

4) Alam mo, para lang tayong EDSA. Kasi, we are made for EDSA-ther!

Boy Pick Up


5) Manila ka ba? Kasi hinahanap hanap kita!

6) Love bird ka ba? Kasi maraming tindang stainless sa San Pablo

7) FEU ka ba? Kasi, TAMA-RAW kung mahal kita!

8) Bibingka ka ba? Kasi, may byaheng Marinduque galing Lucena

- IyoTube in Lady Gaga's Born This Way

- Kuya Bondying's suffering from heart attack! Can you help him? (we say no)

Kuya Bondying


- Vamos! Explore the swash-buckling adventure with ZORO the EXPLORER and his companion, BOOTS! Si! Muy bien!

Zoro the Explorer


..and there you are! Every BG 2012 Summer Special moments remembered for every Bubble Gang fans worldwide! If you think Pueblo Por La Playa wasn't messy enough, wait 'till it gets messy on Part Two next week!

Friday, April 20, 2012

Two of the Top Gear favorites are thrashing the Nurburgring...

Ariel Atom V8


Noble M600

Let's admit it that both the Ariel Atom V8 and the Noble M600 are two of our favorite cars as seen on Top Gear. We seen the Ariel Atom V8 hailed as the fastest car to get round at the Top Gear Test Track. 

The Noble M600? Some say that on its maximum power mode, the power to weight ratio is stronger than the Bugatti Veyron. Question, is it better than the Lamborghini Aventador or the McLaren MP4-12C? Let's see, the MP4-12C has a top speed of 205mph while the Lamborghini Aventador beats that with 217mph of top speed. This Noble M600 can do 225mph, so on paper, this is the fastest of the three or is it?! Remember, the MP4-12C is the 2nd fastest on the Top Gear Test Track while the Aventador is the 3rd fastest. The Noble M600 is the 8th fastest on cold condition so, who cares?!

On the Season 18 opener of Top Gear, this was Richard Hammond's until he broke the gearbox and Noble sent him a replacement.

Anyway, forget chitter chatter because I watched a clip on Youtube that both the Ariel Atom V8 and the Noble M600 are trashing around the Nurburgring 24HR course. I said Nurburgring 24HR because it used both the Nordschleife and the GP Circuit as the basis. Both are driven by Chris Harris so here's the clip...

Doctor Who's Sonic Screwdriver gets real...kind of...

The Eleventh Doctor's Sonic Screwdriver


Every Doctor Who fan has a dream of having a "sonic screwdriver" because this device does almost everything such as opening locked doors or defend themselves from intergalactic enemies. Guess what? The boffins from University of Dundee created their own "sonic screwdriver" but it remains as a prototype and it hasn't been tested against incoming Dalek threats.




Cool, isn't it? But no, it takes time to create a real-life Sonic Screwdriver for those who want to save the galaxy. What's next? TARDIS?

Let's Do The News (April 20, 2012)

So, does the new Porsche Boxster really be an alternative to the new 911 Carrera Cabriolet? I don't think so and now the news but before that, we were really quite bugged about the whole "Cinderella Girls" stuff ever since THE IDOLM@STER CINDERELLA MASTER series came out in the music stores. Seriously, what's CINDERELLA GIRLS?

Richard, like I told before that THE IDOLM@STER CINDERELLA GIRLS is a social game that pits the players as the producer and he/she has over 100 idols to produce. The idea for this social mobile game is to make it to eventually produce a “top idol unit”. As of now, over one million users on Mobage has reached, making it a milestone for the first social game from the mega popular iM@S franchise.

Really, James? 

Exactly.

You know, when I was visiting to a CD store finding the whole CINDERELLA MASTER range, someone told me earlier that "Hey, are those girls haven't featured on the game or the anime?" He's right, those aren't came from both the iM@S game or the anime because they're originals made for this social mobile game made for Mobage.

Seriously, Hammond, what's Mobage?

If you never heard of Mobage, you're not alone. It's a social gaming platform that links up to over 25 million users worldwide. This is somewhat known as Android's biggest social gaming service.

That mobile game didn't go well as I expected Hammond!

Clarkson, what is it?

James, Richard, there was some explanation about this whole CINDERELLA GIRLS stuff, something that drove me up the wall here on this social game. To them, this is more addicting than...well, you know. Some say, it's more like a collectible card game. A player can pay 300 "Mobacoins" (At ¥1 (US$0.012) per Mobacoin) to draw a random idol that they train and compete with. This is the kind of game you would "cock about". I once saw a clip of someone playing CINDERELLA GIRLS and he told me that he's trying to get some super rare idols. Guess how much did he spent? ¥78,000 (US$949)! And did he get any? None!

(laughing)

Wait, 78,000 yen? That's the pricing of um...

James May, there's even more. Some players spent a massive ¥100,000 (US$1,217) for something else, proving that this whole CINDERELLA GIRLS game to be highly addictive.

Hang on a second, Clarkson. HIGHLY ADDICTIVE? How addictive could that be? Spending massive money for "imaginary idols?" You got to be kidding me...


Oh, someone told me a couple of weeks ago that a something something occurred right in the middle of THE IDOLM@STER CINDERELLA GIRLS social game. It was something about the "rare" idol has the posing that looked exactly the same as the one from a Japanese retail site. Here's how it look like...


(audience laughing)


You have got to be kidding me Jeremy...

No I'm not! Look look! It does look exactly the same! Remember the once defunct GREE mobile game called Hime Koi? Those girls look more like the exact ripoff of Loveplus! I'm not kidding. They did look more like Manaka, Rinko, and Nene!

Anyway, let's forget about that whole CINDERELLA GIRLS stuff. Wanna eat some fish custard?

Fish custard?

Fish custard! It's from DOCTOR WHO, ever since Matt Smith's maiden voyage as the 11th Doctor. I kinda love that whole Fish Custard stuff since the beginning of Season 5. Question is, which custard do you like most? The Tubby Custard from the Teletubbies or the Fish Custard from Doctor Who? We have to balance it because this is the BBC but anyway, we're grown men. Let's prefer the Fish Custard. I haven't tasted a Tubby Custard but how does it taste? It's pink! How can you eat a tubby custard? It's too complicated!

(laughing)

Clearly, more work for the upcoming Season 7 is underway, and currently, the cast and crew of Doctor Who are in New York for some more filming. More info at http://doctorwho.tumblr.com/tagged/new-york-city-2012

Oh, and about Karen Gillan, the woman who played as Amy Pond on the series, told fans that she has a twitter account to follow. Feel free to follow Karen Gillan at https://twitter.com/#!/KarenGillan2

Anyway, since when did you got addicted to this whole Doctor Who stuff?

Clearly, my addiction of Top Gear led me to this. Oh, and remember one episode of Top Gear Season 18 where Matt Smith, the Eleventh Doctor Who, stepped out from the TARDIS and into the Kia Cee'd and set a lap time of 1:43.7, making him the fastest Doctor Who round the Top Gear Test Track? You can't deny that HE IS THE FASTEST DOCTOR WHO IN THE TOP GEAR TEST TRACK.

Uh, Clarkson...Please, enough with the whole DOCTOR WHO stuff and let's move on...

I saw someone at AUSTRALIA'S GOT TALENT and this guy sure knows how to pull proper race car sounds all by himself! Here's the clip and judge...





That's unbelievable! That guy can do proper car sounds from his mouth! I mean...OH COME ON! WE ARE A BIT BETTER THAN THAT AUSSIE WHO CAN MAKE RACECAR SOUNDS FROM HIS MOUTH!

Really?

Nope, I'm moderate at this...Moving on...

About the Lada Riva, as seen on Top Gear's Communist Cars episode. Guess what? It's officially dead!


Yep, the Lada Riva is dead. No doubt. Communist cars are rubbish!

(laughing)

NEXT!

Remember the time that Audi finally acquired Ducati?


Guess what? Here's an unexpected twist. Mercedes-Benz's AMG division officially disavows partnership with Ducati.


(AWWWW)

Sorry, it's the rules! Audi's got Ducati and there's no turning back.

That's the news!

Porsche Boxster 981

If the new Porsche 911 Carrera Cabriolet (991) wasn't your type of Porsche, there is an alternative for you. Welcome everyone to all new Porsche Boxster 981, the 3rd incarnation of Porsche's mid-engined roadster that lives it up to its name because the naming is a portmanteau of the word "boxer", referring to the vehicle's horizontally opposed or "boxer" engine, and the word "roadster", referring to the vehicle's two-seat capacity and convertible top. For the pricing, that's a lot if you're on benefits but that's not a lot if you're a premiership footballer.


2013 Porsche Boxster


At first glance, the exterior of the new Boxster looks similar from the previous model but on the back, this isn't what you've expected, even when there is PORSCHE spelled it out. If you parked the new Boxster among the old 987 Boxster outside Monte Carlo's casino square and if someone is hideously drunk, you wouldn't guess that there's a lot of explanation to do. Clearly, there's more work to be done with the new Boxster.


2013 Porsche Boxster interior


The interior of the new 981 Boxster seems to be fine but it's almost the same as the old 987 Boxster. Think of it as an updated version but it was heavily influenced by the defunct supercar known as the Porsche Carrera GT. The new Boxster do come with a choice of two further sound systems as an alternative to the CDR audio system, featured as standard. First was the Sound Package Plus with seven speakers and the last was the one I'd quite like; BOSE® Surround Sound with 10 speakers. I would prefer the BOSE option because the sound quality is just astonishingly the best! Most cars like the Renault Scenic, Nissan Elgrand, Samsung SM7, or others do come with BOSE Sound System because it offers the best sound experience than any other but with the Boxster, this is much like the other BOSE-equipped cars.


2013 Porsche Boxster


In terms of performance, the new Boxster is like something else but unfortunately, no 7-speed MT found on the new 911. What you do get was either a 7-speed Porsche-Doppelkupplungsgetriebe or a 6-speed manual transmission. The base model comes with a 2.7-litre boxer engine with 265 hp of power and top speed of 262 km/h (PDK) to 264 km/h (6MT). The Boxster S comes equipped with the 3.4-litre boxer engine with 315 hp of power and top speed of 277 km/h (PDK) to 279 km/h (6MT). What's new is the Porsche Torque Vectoring (PTV) with mechanical rear axle differential lock. The new Porsche Torque Vectoring (PTV), available in conjunction with PASM, goes one better: it improves cornering dynamics from the moment the vehicle enters the curve. It improves the steering behaviour and steering precision of the vehicle by selectively braking the inside rear wheel.

Available colors are schwarz, indischrot, carraraweiss, weiß, racinggelb, basaltschwarzmetallic, platinsilbermetallic, dunkelblaumetallic, aquablaumetallic, anthrazitbraunmetallic, mahagonimetallic, achatgraumetallic, GT-silbermetallic, cognacmetallic, limegoldmetallic, Verdeck schwarz, Verdeck blau, Verdeck rot, and Verdeck braun.

My Comment:

So, the new Boxster didn't come with the 7-speed manual from the new Porsche 911 but we did appreciate by the way it looks, it performs, and how comfortable it is but some sports settings will render the Boxster to be more uncomfortable. With the roof on, it doesn't look good and it will render the top speed lowered but with no roof, this is when it all starts to come good. The new Boxster is now evolved into something special not as a roadster but as an epic grand tourer for long distance cruising. I'd recommend you'll drive this to Transfăgărășan in Romania to see the Boxster's true self.

Photo: Dr. Ing. h.c. F. Porsche AG