all posts

New pictures up in the portfolio page Posted by admin at 3:10PM Jul 05, 2010 news feed| 0 comments
iphone 4G Posted by admin at 3:10PM Jun 03, 2010 blog| 0 comments


So, as almost everybody knows, there have been different reported cases of the upcoming iphone 4G being found. WWDC is coming very soon and we're all anticipating the release or announcement of the iphone 4G.

I'm not going to talk about how the first reported one was found or where, and things of that nature. What I want to talk about the new improvements.

  • First off, the new OS. It's already in beta, but it really is going to improve the quality of the experience.
  • The new physical design of the phone is nice, and on the inside there is a much bigger battery than before, and much smaller components to make room.
  • It uses the same A4 processor as the ipad. It also includes a bigger camera lens (higher quality picture) with flash.
  • The back is made out of a different material than its earlier models to get better reception.
  • The screen resolution is much, much, much higher than before!


I'm very excited for its release!
php: connecting to a MySQL database Posted by admin at 8:48AM May 19, 2010 tutorials| 1 comments
I figured some new comers to PHP might like a simple tutorial on how to connect to a MySQL database.
So let's get started.

I, obviously, use PHP to run this website. All the information on this website, and on many, many, many others is dynamically shown or displayed by PHP.

Here's the code I use for this page itself to connect to my database.

// Connect to the database server
$con = mysql_connect("localhost", "YOUR USERNAME GOES HERE", "YOUR PASSWORD GOES HERE");
if(!$con) {
die("Could not connect to database: ".mysql_error());
}
// Open to the database
mysql_select_db("YOUR DATABASE GOES HERE") or die(mysql_error());


In the second line of code, "$con = mysql_connect("localhost", "YOUR USERNAME GOES HERE", "YOUR PASSWORD GOES HERE");", we are setting a variable called "con". The "$" symbol assigns a variable. The variable holds the code to connect to the database. If you wanted to, you could change the entire code I wrote above to:

// Connect to the database server
mysql_connect("localhost", "YOUR USERNAME GOES HERE", "YOUR PASSWORD GOES HERE");

// Open to the database
mysql_select_db("YOUR DATABASE GOES HERE") or die(mysql_error());


The reason why I don't do that, is because if something goes wrong, I don't get an error message. The next part of the code : if(!$con) {
die("Could not connect to database: ".mysql_error());
}
Runs the code (inside the variable "con"), and checks if the condition inside the "if" statement is true. In this case, there is an exclamation mark ("!"), which means not true. So if the connection is not true (well, really, if it doesn't work), the code will display an error message and tell you what's wrong.

The last piece of code:

// Open to the database
mysql_select_db("YOUR DATABASE GOES HERE") or die(mysql_error());


Opens a connection to your database, and if it doesn't work, it displays an error message.
Here, you may notice that instead of using an "if" statement, like before, to display an error message, I simply used "or die(...)". You could really do either way. I did this in the example to show that there is more than one way of doing things. If I wanted to, I could have changed to code to connect to the database itself to:

// Open to the database
$database = mysql_select_db("YOUR DATABASE GOES HERE");
if(!$database) {
die(mysql_error())
}



NOTE: when "//" is in front of a line of code, it makes what ever is on that line a "comment", meaning it is not executed. It is generally used to leave a little note to the person who is writing/changing the code.
Iron man 2 review Posted by admin at 11:13PM May 07, 2010 blog| 0 comments
For my friend's birthday, he, a group of friends of ours' and I went to see Iron Man 2. In 2008, two years ago, we saw the first Iron Man for his birthday. So, anyways, onto the review.

The actors played their parts amazingly. Robert Downy Jr. is by far one of my favorite actors, and he is more than fit to play the part of Tony Stark. If you like explosions, great acting, spectacular graphics and fairly good story lines, Iron Man 2 is a must see!

If I had to give a rating, I'd give Iron Man 2 a solid 4/5 stars.

http://ironmanmovie.marvel.com/
Photoshop CS5 Posted by admin at 7:00PM Apr 30, 2010 blog| 0 comments

Yesterday, on April 29 2010, Adobe released Photoshop CS5 for shipping. Photoshop CS5 comes with many new and exciting tools to get things done in one fourth the time than it may have taken in previous versions of Photoshop, e.g. the new and improved Refine Edge tool, the new Puppet Warp tool and the new Content Aware fill.

I, myself, can't wait to get my hands on this new version of Photoshop! I'm hoping I can get it sometime soon, and when I do, I may be inclined to make some tutorials on it.

For a cool preview of the tools mentioned, click the link below.
http://www.youtube.com/watch?v=vfkjHnsAsvg
Copyright © Ittai Svidler