Author: hasin

55 ways to have fun with Google

Its great!! simply amazing!! – Philipp Lenssen from Google Blogscoped has written a great book “55 ways to have fun with google” and he make it free for download. He released the book under CC (Creative Commons) license so that you can copy-read-share-print-distribute this book.

Visit the website : 55 Ways to have fun with Google

The whole idea of releasing the book free in internet is a great idea indeed. Like me, many other bloggers also blogging only because they read it for free, and thus make a huge publicity of this book. Though I agree, it is really a great book.

Oh God!! Case sensitivity and Poor M$ Access

Last night I was searching how I can run a case sensitive query in Microsoft Access. After searching for a while what I found in microsoft knowledge base is that there is no ANSI SQL compliant way to check case sensitivity in Access. All you have to do is compare it with StrComp() function. Poor Access!!

SELECT case_sensitive_data FROM table_name WHERE StrComp(case_sensitive_data, “some_data”,0)=0

Oh Selucas, what a world we live in!!!

So it was a long break – How about a wakeup?

I was extremely busy with a lot of tasks – beside these, I was able to manage really a small amount of time to spend with my family. Still I have to spend some time on nobobangla project and wordpress book. I couldnt develop myself as I used to. I lost most of study times for the little “Ubuntu”

But I am really planning to get back on the track. I am learning ruby, spending time on J2EE and definitely working with PHP. I will be regular to my group very soon, I have to.

Hey hasin, its time to wakeup….

Hey – It's just a rowCount()

Java is a cool language, everything in the bag – but you have to search a lot for some simple tasks. Just like what I was doing few minutes ago. These days I am learning J2EE, specially JSP, Struts etc… I was searching how to find out the count of rows in a resultset which is returned by a statement. But unfortunately I found these is no builtin property/method to find it out. However, after searching in net for a couple of minutes I found the following solution

Statement st =
   conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
               ResultSet.CONCUR_READ_ONLY);
ResultSet rs =
   st.executeQuery("SELECT * FROM employee WHERE id_emp LIKE '1%'");
rs.last();
count = rs.getRow();
rs.beforeFirst();

————————————————————-
Down the way, where the nights are gay,
and the sun shines
daily on the mountain top,
I took a trip on a sailing ship,
and when I reach Jamaica I made a stop.

But I’m sad to say,
I’m on my way,
won’t be back for many a day.
My heart is down,
my head is turning around,
I had to leave a little girl
in Kingston Town.
———————-
By – Harry Belafonte [Kinston Town]

Update June 21st

I met Dr. Shah Musa, one of the chip design architect from Intel corporation, to extend his Nobobangla project at a new level. So far the second phase is complete. As a lead developer of Nobobangla project phase I and II, I am extending a specll checker which works as an integrated module of MS word. I am also working for the “on-the-fly” nobobangla editor.

Last night I redesigned my resume to a short version. I removed all the detailed project info and kept only some important projects. Now its a two page short resume which highlight me and my workability.

FeedPHP is going to be an affliate of PHPClasses.org. Yesterday I talked to Manuel Lemos and finished the initial steps. He has written and great review to my book, Smarty. You can check out this review by clicking here

Its Rainbow – Can you see the seven colors?

Yesterday afternoon I received seven copies of my book, “Smarty”. Though I already thought that I missed the mail because it was so late. Good God that I finally got them. It was an awesome moment. When I see my books, my name there, It was beyond my imagination.

I remember when I mail David about wordpress and Got this chance to write Smarty. During the time Ayesha gave me an invaluable support and helped me to concentrate on my task. I am really grateful to her. David, Rushav, Arnab , Patricia and Nanda, From my Editors Panel also helped me upto the maximum. It was a great experience writing for Packt. My co-authors, Lucian Gheorge and Joao Prado were also very nice guy.

These days I am writing a book on wordpress. Hopefully it will be released by the end of this year. I have more three chapters to write.

FeedPHP is going to be the largest PHP News Source

php-feeds.gif

FeedPHP is a free RSS aggregator which collects feed, parse and display the titles with a link back to the original source. This is one top news source for PHP and relevant technologies. This website is currently displaying news feeds from different fields like PHP, PHP Blogs, MySQL, PostgreSQL, Ruby, Java and others. No doubt, this is going to be the largest PHP news source in near future.

The whole site is a single page with mod_rewrite tricks. For performance, the contents are cached for several minutes, otherwise my site will be convicted for consuming excess bandwidth from those sites. Moreover, the site will be extremely slow for consuming remote contents frequently. Output buffering was used to serve the content quickly.

BDBlogs.net – The first Bangla Blog Aggregator

Recently I have visited a site www.bdblogs.net which aggregates the posts from various bangla bloggers website. The service is really cool. The display all the posts in this page. When someone clicks over any post, it will redirect to the original blog. I like this service very much. But I suggest some modifications

1. Lets display more than 10 posts per page
2. Lets display the authors name under each post

Today I have subscribed to their RSS and you will find all their latest posts in my blog, at the lower right corner.

Thanks for developing such a service.

ZipLib2 – The Top rated class in phpclasses.org, compression category

I developed ZipLib2, a wrapper over the original Ziplib class, one year ago to create zipped archives using PHP. During this time It was in the top position in compression category in phpclasses. After arrival of dUnzip and some other very good classes, ZipLib2 losses its position and went to third/fourth place. After that I modified the code a little bit and add a huge documentation which was not present in previous release.

Now ZipLib2 is the Top user rated class in Compression Category with 82.4% rating. Thats some good result.

Visit : http://www.phpclasses.org/browse/package/2088.html

Caching – Save visitors time and Balance the load

Caching is a major process of speeding up your application. By caching the output of a potentially large scale operation and displaying that output later from that cache saves a lot of time. First if you have cached output of a large scale operation, just check whether the cache is out-of-date or not. If it succeeds all the parameters, display the cache which saves that time consuming procedures. These large scale operation may include fetching content from an remote source using CURL or any stream wrapper, or a database operation, or even a time consuming graph/chart generation.

There are several types of caching, like opcode caching, output caching etc. Compiler level caching are out of scope in this article. We are simply talking about the output caching. In this step PEAR::Cache or PEAR::Cache_Lite may save really a great amount of time. Lets take a look how.

In the following example we are using PEAR::Cache. You can also use Cache_Lite which functions great by sacrificing a bit performance.

<?
include("Cache/Output.php");

$cache = new Cache_Output("file");
if (!$cache->start($cacheid, "samplegroup"))
{
	//perform large scale operation
        echo "Hello";
	$cache->end();
}
else
{
	echo "Printing from Cache";
}

//display the cached content
echo $cache->get($cacheid);
?>

First time, the output is generated as usually. But from next time the output is displayed from cached bypassing the large scale operation.

You can flush content of any cached group by accessing it’s flush() method which looks like below

$cache->flush( “samplegroup”);

Thats it.