iPhone 4 and iOS 4 Announced at Apple’s 2010 World Wide Developer Conference

Steve Jobs announced iPhone 4 at Apple’s 2010 World Wide Developers Conference today.

The new device is 9.3mm thick (24% thinner than the iPhone 3GS) with a 3.5″ display (960px by 640px), delivering an 800:1 contrast ratio (4 times better than the iPhone 3GS) that uses IPS technology for superb colors and a wide viewing angle. The iPhone 4 design features glass on the front and rear with stainless steel running along the sides.

New additions to the iPhone 4 hardware includes a front-facing camera, a Micro-SIM tray, a camera with a LED flash on the back, and the Apple A4 processor. A better battery in combination with the A4 processor delivers up to 40% more talk time – 7 hours of talking, 6 hours of 3G browsing, 10 hours of WiFi browsing, 10 hours of video playback, 40 hours of music playback, and 300 hours of standby.

iPhone 4 comes with either 16Gb or 32Gb of storage, supports quad-band HSDPA / HSUPA, and is capable of 7.2mbit download and 5.8mbit upload speeds once carriers support it. Like the iPad it will allow home screen wallpapers and the use of bluetooth keyboards.

Full technical specifications can be found here.

Read more…

Sending Tweets from the command line using a Bash script

The Twitter API makes it very simple to send tweets from the command line using curl via a Bash script.

The curl command you need to use will look like the following (replace “{USERNAME}”, “{PASSWORD}”, and “{TWEET}” with your relevant values):

curl -u {USERNAME}:{PASSWORD} -d status="{TWEET}" https://twitter.com/statuses/update.xml

In the above command, curl’s “-u” parameter allows you to specify a username and password for authentication. The “-d” parameter allows you to specify POST variables, and “https://twitter.com/statuses/update.xml” is the target of the POST request.

To wrap the above command in a Bash script, create a new file with the following contents (replace “{USERNAME}” with your Twitter username):

Read more…

List comments and files changed for a specific Subversion Revision

If you need to check which files changed during a specific revision, open a new Terminal window, switch to the directory containing the working copy, and enter the following command (replacing “{SVN_REPOSITORY_ADDRESS}” with the actual URL to your SVN Repository):

svn log -v -r 7447 {SVN_REPOSITORY_ADDRESS}

The above command will present you with output similar to the following:

------------------------------------------------------------------------
r158 | willem | 2010-01-28 12:54:23 +0200 (Thu, 28 Jan 2010) | 1 line
Changed paths:
   A /trunk/system/application/config/common_passwords.php
   M /trunk/system/application/javascript/general.js
   M /trunk/system/application/javascript/jquery.passwordStrength.js
   M /trunk/system/application/models/ajax_model.php
   M /trunk/system/application/views/administration/administration_users-add_view.php
 
Working on ticket #59. Added common passwords list.
------------------------------------------------------------------------

The “svn log” command has several additional parameters available, these can be viewed by entering the following in a Terminal window:

svn help log

How to play Rock-Paper-Scissors-Lizard-Spock

Fans of The Big Bang Theory might have seen the episode where Sheldon and Rajesh try to decide whether to watch Saturn 3 or Deep Space Nine by playing “Rock-Paper-Scissors-Lizard-Spock” (“The Lizard-Spock Expansion”, season 2, episode 8).

Samuel Kass and Karen Bryla originally invented this modification of the popular Rock-Paper-Scissors game in 1998 to lower the perceived probability of 75-80% of games played between friends ending in ties.

rock-paper-scissors-lizard-spock

While the rules for the original “Rock-Paper-Scissors” game are:

  • Scissors cuts Paper
  • Paper covers Rock
  • Rock crushes Scissors

… the rules for the improved “Rock-Paper-Scissors-Lizard-Spock” version are:

  • Scissors cuts Paper
  • Paper covers Rock
  • Rock crushes Lizard
  • Lizard spoisons Spock
  • Spock smashes Scissors
  • Scissors decapitates Lizard
  • Lizard eats Paper
  • Paper disproves Spock
  • Spock vaporizes Rock
  • Rock crushes Scissors

Importing or Exporting comma-separated (CSV) and other text-based files to / from MySQL databases

If you need to import data from CSV or other text-based files to a MySQL database or vice-versa, you can use the LOAD DATA or SELECT INTO OUTFILE statements explained below.

Examples – Importing files with LOAD DATA

A MySQL LOAD DATA statement can be used to load values from any text-based files (such as comma separated, tab separated, etc.) into database tables.

In the examples below, a CSV file with the following content is imported:

"column1","column2","column3"
1,"foo",10
2,"bar",20
3,"baz",30

… into a table with the following structure:

CREATE TABLE `test_table` (
`column1` INT NOT NULL,
`column2` VARCHAR(100) NOT NULL,
`column3` INT NOT NULL,
PRIMARY KEY (`column1`)
);

A simple import:

Read more…

Apple launched their new “iPad” media tablet device

Steve Jobs opened today’s Apple Event at the Yerba Buena Center for the Arts Theater in San Francisco by stating, “We want to kick off 2010 by introducing a truly magical and revolutionary new product.”

apple-ipad-iworkJobs explained that due to iPods, iPhones, and MacBooks, Apple is the largest mobile devices business in the world today, generating more revenue than Sony, Samsung or Nokia.

According to Steve, a new device aimed at the niche between laptops and smartphones would need to be able to perform certain functions (browsing the web, enjoying and sharing photos, videos and music, playing games, and reading e-books) better than either laptops or smartphones, and to me it looks like Apple’s new iPad will succeed where netbooks have failed.

Join the discussion of the Apple iPad in the Geekology Forums here.

Introductory Video

Keynote Video

Apple iPad Features

The iPad runs an operating system similar to the iPhone OS with a customizable homescreen and a full multi-touch interface on a 9.7-inch IPS capacitive glass screen. Like with the iPhone, a semi-translucent keyboard appears on-screen when needed, and web pages, photos, movies, books, calendars, emails, and other applications and games can be enjoyed in a landscape or portrait orientation.

Apple iPad - Software - iTunes

The device comes with several applications built-in: Safari, Mail, iCal, Address Book, Google Maps, YouTube, Photos, Music, and more. All these applications have had a major user interface redesign to optimize them for a large multi-touch screen, and their data can be synchronized with your Mac or PC via a USB cable. If you’re using a Mac, the iPad will also pull Places and Faces for photos from iPhoto.

Read more…

Afrigator