7 July 2009 View Comments

A Benchmark of Opensource Search Engines

A Benchmark of Opensource Search Engines
This is gonna be a long hike (and an announcem...

I’ve always wanted to know how the various opensource search engines performed when running head to head with each other. I’ve personally not had the time nor patience to setup such a benchmark. Luckily Vik Singh has done just that and blogged the results of the benchmark.

He’s benchmarked the latest versions of Lucene, sqlite, Xapian, zettair and sphinx while indexing twitter messages (968,937 tweets to be exact) and Medical data sets. I was not too surprised when Lucene came up as a winner from these benchmarks :)

Read the Blog post by Vik to get the details of the benchmarks.

Reblog this post [with Zemanta]

1 July 2009 View Comments

Saving Data into Excel the Easy Way using PHP

Excel Stream Writer

If you’re looking for an easy way to output your data from a PHP script into a Excel file, you’ve got to check out this script MS-Excel Stream Handler which I came across at the PHP Classes site. What this script essentially does is to implement a stream handler interface to write Microsoft Excel spreadsheet files.

All you have to do to output data into an Excel file is to create an associative array with the data to be exported. For example if you wanted an excel sheet in this format:
Excel Stream Writer

all you need to do is to create an array like this:

$output = array(
    array("Serial" => "1", "Item" => "Cables", "Stock" => "100", "Cost per unit" => "$2" ),
    array("Serial" => "2", "Item" => "Phones", "Stock" => "40", "Cost per unit" => "$23" ),
    array("Serial" => "3", "Item" => "Keypads", "Stock" => "5", "Cost per unit" => "$4" ),
    array("Serial" => "4", "Item" => "Helmets", "Stock" => "54", "Cost per unit" => "$42" ),
);

Now to output this into an Excel file, all you need to do is to use the excel.php from Ignatius’s script and open a xlsfile stream to output the data. Here’s a script which creates the Excel file from the array above and allows the user to download the file to their system:

require "excel.php";
//open Excel Stream to output
$export_file = "xlsfile://tmp/example.xls";
 
$fp = fopen($export_file, "wb");
$output = array(
    array("Serial" => "1", "Item" => "Cables", "Stock" => "100", "Cost per unit" => "$2" ),
    array("Serial" => "2", "Item" => "Phones", "Stock" => "40", "Cost per unit" => "$23" ),
    array("Serial" => "3", "Item" => "Keypads", "Stock" => "5", "Cost per unit" => "$4" ),
    array("Serial" => "4", "Item" => "Helmets", "Stock" => "54", "Cost per unit" => "$42" ),
);
//write the array to Excel
fwrite($fp, serialize($output));
fclose($fp);
//set headers to download Excel sheet
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Content-type: application/vnd.ms-excel");
header ("Content-Disposition: attachment; filename=\"" . basename($export_file) . "\"" );
 
readfile($export_file);

This script allows you to quickly export any data which you can form into an array quickly into an Excel sheet. If you’re looking for an Excel export with advanced features like formatting the cells in the sheet, adding colors or the likes of those, you’re out of luck with this script.

You can get this script and more information about it from the PHP Classes site:
http://www.phpclasses.org/browse/package/1919.html

Reblog this post [with Zemanta]

Tags: ,
26 June 2009 View Comments

GIMP “Save for Web” plugin for Ubuntu

Gimp Save for Web

Gimp Save for WebHere is a plugin for Gimp which gives you a “Save for Web” option in GIMP. This plugin gives you the option of preparing your images for the web by optimizing it, adding additional compression, stripping EXIF information from the images to reduce it’s size. You can preview the resultant image before you save your final image.

You can get the deb files for this plugin over at GetDeb.net:
http://www.getdeb.net/app/GIMP+%22Save+for+Web%22+plugin

Just download the deb file for your version of Ubuntu and double click the deb file once downloaded to start the Package Installer.

Reblog this post [with Zemanta]

Tags: ,
10 June 2009 View Comments

Nokia N97 Blogger’s Meet in Bangalore

3612168551_0871542b88

Yesterday Nokia India had arranged for a blogger’s meet in Bangalore to familizarize us with the upcoming N97 mobile phone. The meet featured Axel Meyer, Nokia’s Global Design Head for Nokia Nseries, who took us through a presentation which showed what the Design team took into account while designing this phone.

What I liked about the design was the 30 degree tilt of the screen when the QWERTY keypad slides open. This allows the user to interact with the keyboard and the touch-screen at the same time. The tilt also allows the user to hold the phone with just the index finger – pretty comfortable – unlike the slide out of the E75.

One snippet which kind of surprised me in the presentation is that Axel mentioned that there  more than 1 billion users of Nokia phones. This particular model is targeted to users who are looking at having a personal experience with their mobiles – targeted towards people who share photos, videos, microblog, are active on social network and need a phone which doubles up as a personal computer on the go. During the Q&A session, one of the bloggers did ask about the high price of this model (expected to be around Rs. 35,000 during the launch). Axel answered that this mobile is meant for people who are looking a niche phone which provides the full online and social experience  the N97 provides.

After the presentations, I got to play around with the N97 for sometime – pics of the phone are at the end of this post.

Some of the points which caught my attention about the N97 are:

  • A whopping 32GB of internal memory – which can be expanded to a maximum of 48GB. This is great for carrying around your media and there’s no need of another media player :)
  • 16:9 screen ratio – perfect for viewing widescreen movies on the go – this unit’s got a TV out so you can project the movies on your phone on the big screen.
  • A FM transmitter – to listen to your music on the car radio without the need of extra cables to hook it on.
  • Home Screen Widgets – this allows you to have a pieces of the Internet on your home screen.
  • The QWERTY keyboard had a good feel to it. Even though the keys on the N97 are smaller than the E75′s, they layout seems to just feel better laid out on the N97.
  • The touchscreen also seems to perform better than the 5800′s.
  • The phone comes bundled with the Facebook application, apart from other Social Media application like Hi5 and Qik. So you don’t have to hunt for these apps once you get your phone.
  • The tilt of the screen when the keypad is open is a very useful feature allowing the user to place the phone on a table while typing out messages and emails, taking calls or surfing the web.

Thanks to Nokia India and Songita B. Verma & team for getting this event organized! It was great having to hear direct from the Design Team on the rationale behind the various features which are packed in the N-Series phones.

Learn more about the Nokia N97:
The Nokia N97 Datasheet
Nokia NSeries Background
Nokia N97′s product page

Some of the Pictures from the Event:

The N97 Presentation

Home Screen Widgets

Axel Meyer during his presentation

Axel Meyer during his presentation

Q&A Session

Q&A Session

First look at the N97

First look at the N97

Trying out the Handwriting Recognition

Trying out the Handwriting Recognition

30 Degrees Tilt of the Screen when the keypads open

30 Degrees Tilt of the Screen when the keypad's open

More pictures from the event are available on Flickr.

Reblog this post [with Zemanta]

8 June 2009 View Comments

Google Mobile App for Nokia S60 Phones

Google Mobile App

Google Mobile App

Google has brought out their Google Mobile App for Nokia S60 Phones. You can get the application by visiting m.google.com on your mobile browser. This application provides a shell for Google applications and services. When you start the app, you get a search screen, and the app detects your location to give you area specific suggestions.

As you start typing in a search term, you get search suggestions. Performing  a search opens up the mobile browser to continue browsing. The app provides a shortcut key to quickly jump to Google search from the Home screen on your mobile. This cuts down the number of keystrokes required to startup a Google search.

Apart from the quick access to Google Search and mobile apps, this app provides little else for Indian users, as the suggestions I saw while using the search were hardly relevant to my location.

Link : http://www.google.com/mobile/nokia_smart/app.html

Reblog this post [with Zemanta]

Tags: ,
5 June 2009 View Comments

Google Page Speed

page-speed-javascript-defered1

page-speedWeb developers have to check out Google’s new Firefox + Firebug addon called Page Speed. This addon inspects your webpage to see how you can optimize the load time. Yahoo’s YSlow was good, but Google takes it a few steps further to even inspect your html and styles to see what can hider the render time of the page once it’s loaded.

Apart from the standard tests on if your content is gzipped, server headers are correct and enable client side caching and parallelizing downloads from differnent host names, this addon also does the following:

  • Inspect your CSS files for unused styles
  • Inspect your Cookie size – the bigger the cookie size, the bigger the request sent to the server everytime, since every request will send your cookies from the browser to the server
  • Checks image compression ratios to see if you’re running on the optimal compression.
  • Checks to see if your Javascript is minified, if not, it’ll show you how much you can save if you minify your javascripts
  • Inspects the execution of Javascript on the page on load to show which Javascript files can be deferred in loading, by placing the Javascript loads at the end of the page instead of the head. This can drastically increase the page render times.
  • If you load multiple Javascripts and CSS files, Page speed will give you recommendations to merge these into a single file.

Page Speed helps you improve your site’s performance based on the following categories of best practises:

Get Google Page Speed at: http://code.google.com/speed/page-speed/

Screenshots:

Google Page Speed Recommendations

Google Page Speed Recommendations

CSS Optimization Recommendations

CSS Optimization Recommendations

Javascript Minify Savings

Javascript Minify Savings

Suggestion to Defer Javascript Loading

Suggestion to Defer Javascript Loading

5 June 2009 View Comments

Tweets60 – Twitter client for S60 mobiles

tweet60 tweet entry

tweet60 Messages

If you’re looking for a free native Twitter client for your S60 device, you’ve got to check out Tweets60. It’s works on S60 3rd and 5th Edition phones. As with most Twitter clients you can view your Timeline, Replies, DMs and Favorites and follow/unfollow Tweeple.  The interface is good and simple with the actions to post, reply or retweet in the Option menu.

tweet60 tweet entryOne cool functionality in Tweets60 is that you can configure multiple access points and prioritize them. Useful when you’ve got Wifi access and then default to GPRS/3G connection when you’re not in Wifi range. If you’re on a tight data plan, this application also comes with an option to save your bandwidth by allowing you to set the refresh frequency to manual or set it to 5, 10 or 30 minutes.

For a basic twitter client – Tweets60 does it’s job pretty well. According to Ravensoft’s tweets, it looks like a pro version is in the making. I just hope the free version doesn’t get too crippled to promote the sales of the pro version.

A few missing functionalities in the current version of Tweets60 are (in my order of my preference):

  • Delete & Mark Tweets as Favorites
  • Custom Twitter Search Timelines
  • Post images from phone to twitpic ( hopefully will be out in a future version)
  • Multiple Twitter Accounts
  • Theme support – A darker theme ( like Gravity? )

Get Tweet60 from : http://www.tweets60.com/

Reblog this post [with Zemanta]

4 June 2009 View Comments

jQuery TOOLS

jQuery TOOLS

jQuery TOOLS

jQuery Tools provides some UI addons to the basic jQuery Library. You can create Tabs, Accordions, Tooltips, Overlays and more using this library. The whole library fits in less than 6Kb, so you can replace all the separate libraries you are using for these functionalities by using this library.

The library has an easy to use API, which both beginners and advanced developers can use to integrate. To show you how easy it is to setup tabs in this library, here’s an example from their site. The HTML code looks like this:

<!-- the tabs -->
<ul>
	<li><a href="#">Tab 1</a></li>
	<li><a href="#">Tab 2</a></li>
	<li><a href="#">Tab 3</a></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<div>pane 1 content</div>
<div>pane 2 content</div>
<div>pane 3 content</div>
</div>

The Javascript which powers the tabs is simply :

// setup ul.tabs to work as tabs for each div directly under div.panes
$("ul.tabs").tabs("div.panes &gt; div");

To see this in action and more information on the code, check this link out:
http://flowplayer.org/tools/tabs.html

You can also check out the other functionalities which this library provides :

Learn more about jQuery Tools over at: http://flowplayer.org/tools/index.html

Reblog this post [with Zemanta]

28 May 2009 View Comments

PHP Compiler Internal Slides by Sebastian Bergmann

phpcompilerinternals

Here’s an interesting slide from Sebastian Bergmann which explains the magic that happens when you execute your PHP code, and how it gets converted into bytecode. He also goes ahead to show you how to extend the PHP compiler in the presentation.

Reblog this post [with Zemanta]

12 May 2009 View Comments

Email with Ease

Expert Answers

Email with Ease

Nokia just launched a site emailwithease.com to help users setup email to go on their mobiles. The forum on this site is the place to go to if you’re looking for help on setting up emails on your mobile. Even though the main site is centered around the Nokia E75, the forums have sections to look in for help on other models as well.

If you’re looking for help on setting up your email on the E75, do head over there and check out the easy steps required to setup your emails.  Did you know that you can setup your mobile to get mails from your Corporate Exchange server as well?

Expert Answers

If you still can’t find your solution head over to the Email with Ease site, where you can ask your question and get experts to answer them.

Head over to Email at Ease’s latest poll and make sure you send in your views counted as well.

Link:
emailwithease.com
Email With Ease Forum

Tags: , ,