Archive for May, 2008

Abeera

May 30, 2008

Some days back I had promised that I will upload some pictures of Abeera, my first niece. She is now one month old, but I still don’t have any good pictures of her with me. I had packed my camera, when I was last visiting her at her nanu’s home (maternal grand parent). But we all forgot when we left home from Multan. I was very angry at that moment on myself.

Anyhow one of her relative snapped some on his mobile and sent us, look how cute she looks in them.

Abeera - yawning

my hammer, my head

May 28, 2008

I follow Wusat-u-Allah’s writing on BBC Urdu site regularly, today I had a chance to read an interesting article on basics politics in Pakistan. I would love to translate that article in English, need to ask his permission before doing that. In the mean time just read that article and enjoy. Here is its excerpt from that article.

مجھے پچھلوں کا تو معلوم نہیں البتہ ایوب خان کے آخری دور میں جب کچھ کچھ باتیں سمجھ میں آنے لگیں تو ایک بات تواتر سے سنائی دیتی تھی۔

Link to the original article

Type.GetType()

May 27, 2008

Browsing through ASP.NET Forums, I found an interesting questions raised by a member that when he tried to get type information of a class using Type.GetType it was a charm in C#, but VB did not worked in same manners. He was trying to create new instances of that class at runtime, and populate those instances with data fetched from any database.

(more…)

Gentleman – you have guts, but not for good

May 27, 2008

Some days back I received an email from one of my friends. It had a very interesting picturesque story in it. A well-dressed gentleman, comes in a bank, goes to the a teller counter. That teller was not on his desk at the moment. But he has mistakenly put a huge amount on his counter. That gentleman did an astonishing act, he noticed those bundles of currency, picked them up and started moving out of bank.

Banks do have such an arrangements that main door and all cash counters are constantly monitored through digital cameras, and captured video is saved for a specific time-period before discarding them out.

That gentleman obviously did not noticed those cameras, and had guts to do this. A good confidence but not for a good cause.

Here are some snaps from his adventure for your thoughts.



Dancing to the tunes

May 21, 2008

Yesterday I was watching Capital Talk with Hamid Mir, there was a mention of a Youtube video, which had Chairman CBR Abdullah Yousuf displaying his agility skills to the audience. And the audience was none other than world renown Musharaf and recently going Prime Minister of Pakistan, Shaukat Aziz.

It shows us one side of our social face, where we love to appreciate these kinds of gathering and other where it displays how our top cadre think of our people.

So enjoy it yourself too, he is really very agile and athletic.

When people take law in their own hand

May 19, 2008

I was reading a blog entry by Wussat on BBC Urdu, and find myself agreeing to the point he has raised in it, how we are changing our thinking process.

Adding more to this, yesterday similar incident happened in Lahore, check it out.

Using boolean algebra in sql

May 16, 2008

Recently I was working on a procedure which required that I marked some items in different categories, and then based on that marking we have to summarize items in different sections. I have extracted the main idea from this procedure for our example. It is using some boolean algebra to segregate items into different sections.

(more…)

Bucketing consecutive numbers in a range

May 12, 2008

Recently we had a little tricky problem to solve. We were displaying a report in which we had to bucket numbers in a range, such that only consecutive numbers should be in that range, if any break is there, then a new range should start. Our first solution did not worked as required. Most difficult part was identifying numbers in a sequence, and placing them in a bucket. We could not create any simple T-SQL queries which could easily sort these things out. Then we thought of first capturing the bucket of each number so that we can easily work it out, and that was not possible without cursors. Lets have a look how we did that.

(more…)

T-SQL Puzzle

May 12, 2008

Recently I saw a puzzle on SQL Server Central, I was intrigued to solve it myself, so here is what I was able to accomplish, and in less than 10 minutes.

DECLARE @i int

SET @i = 0

CREATE TABLE #X
(
val int
)

WHILE @i  < 100
BEGIN

SELECT @i = @i + 1
INSERT INTO #X VALUES (@i)

END

SELECT
val,
val % 3,
val % 5,
CASE
WHEN val % 3 = 0 AND val % 5 = 0 THEN 'BIZZBUZZ'
WHEN val % 3 = 0 THEN 'BIZZ'
WHEN val % 5 = 0 THEN 'BUZZ'
END xval
FROM
#X

DROP TABLE #X