Saturday, June 20, 2009

Wickets!

Who would have thought that the mere existence of ‘wickets’ at the end of innings would come into question ?

Well, believe it or not, it has ..

Wickets are worthless at the end of innings, and that is the point people have to take from this T20.

Dont overvalue you wickets, because 20 overs / 11 playes is about 10 balls each.

And, if YOU cant hit 20 runs off those 10 balls, get out of the way, because someone else will.

The Third Party!

What is it about this T20 world cup, that seems ‘strangely’ right. I say strangely because you have to give it a moment or two, before the reality dawns upon you – that the teams in the final are – Sri lanka and Pakistan, the two countries going through the most timultuous times, of all the participating nations.

Is it strange? maybe ?

But, being a man of reason, I always tend to think of it in logical terms. Why is it that its ‘these’ two teams and no others. is it coincidence, maybe ?

Having trust in ‘THE’, I always believe that the world (as we know) is balanced by ‘something’, and there is justice for all. All ‘YOU’ need to think about is working hard, and delivering when it counts, and leave the rest to the balancer.

 

Good night & Good luck!!

Saturday, April 04, 2009

Approach!

No matter, how wrong you think you are at a specific point in time, but always stick to ‘your’ approach. This is one thing no one can take away from you.

And always believe that your approach is correct, no matter how incorrect it is in other people’s eyes.

Its better to have an incorrect approach than not have one at all.


And, remember, when you win with your approach – you win BIG.

Sunday, March 15, 2009

Kiwi Seaming Conditions

After India lost the last one of the One dayer, the critics were quick to point out – Oh, here we go again, India is NO GOOd in seaming conditions.

 

I do not mean to be judgemental, and I am not saying that Indians are great in Seaming conditions. However, in this particular game, the reasons for India’s loss were very similar to the first T20 – overambition.

 

DOnt believe me – Go Watch the wickets again.

Two wickets were lost to Indians pulling a waist high ball.

Two wickets were lost to Inside edges dragged on the wickets.

And, these were 4 of the top 6 wickets, which had nothing whatsoever to do with the seaming conditions, but more to do with the overambitious nature of batting.

Out of all the wickets, probably Yuvraj was the sole person to fall to the seam.

But, its just too tempting to point out your age old weakness, even though you have there are improvements.

The best reason I have seen is – Indians won because BCCI is very powerful and forced the Kiwi board to make batsman friendly pitches. hmmm..

SOon, they will say – BCCI forces other boards to make batting friendly pitches – for Indian Innings *only*.

 

Great !!!

Monday, March 09, 2009

Discretionary Revenue

Discretionary - available for use as needed.
We are all about finding ways of raising discretionary revenue.
This is what ryanair chief had to say to the idea of charging for restrooms.
Now that he has started assuming which services people will need, I think there are several other options:
Seat - available on demand
Soon there will be standing only planes, a no loo plane etc.
Jokes apart, I think the time has come for the governments to step in and categorize free services I.e. Services for which airlines cannot charge and services subject to charge.
The banking industry has taught us enough lessons to see what happens in a capitalist world without regulation and Govt intervention.
Capitalism is a great thing but we have to be careful that it's biggest virtue of wealth creation does not become it's biggest bane.
Human beings are inherently greedy and self centered (in general) and rather than trying to change that behaviour we should accept it and focus on regulation and appropriate systemic checks.


Posted with LifeCast


Sunday, February 22, 2009

Pakistan's Cricket Team

Is Pakistan's cricket team a reflectionof its political scene, where individuals think that they are above the law. Where Army thinks that they control the country and have no regard for law.
If not, then why is pakistan as a cricketing nation suffering from its worst crisis. Who would have thought that the land of Imran Khan, Wasim Akram, Waqar Younis, Mushtaq Ahmed, Saqlain Mushtaq and many others would go down to these levels.

It goes on to prove that individuals while being adept at their skill have one duty - to strenghen the establishment they represent and to abide by its laws. It is after all that establishment to which they owe their huge careers.

Sunday, February 01, 2009

Skin

You are not a snake. Be comfortable in your skin.


Posted with LifeCast


Test

Testing blog from my iPhone


Posted with LifeCast


Thursday, January 29, 2009

Flex UI Tip

While making complex Flex UI, it is very easy to get lost within the COmponent hierarchy, expecially when the hierarchu is very complex and design view is not practical to use.

In this case, here is something which I have found to be extremely helpful:

In your css file, ass borders for the generic components, like this:

Application {
backgroundColor: #ffffff;
border-style:solid;
border-color:#000000;

}
HBox {
border-style:solid;
border-color:#000000;
}

VBox {
border-style:solid;
border-color:#000000;
}

Panel {
border-style:solid;
border-color:#000000;
}

This will add a black border to all components and help you demarcate the boundaries of all the components in use. When you are done, just take them off.

Tuesday, January 27, 2009

The Good House

My lord – this is a good house !!!

Those were the words of a person in UK House of Lords, when one person was caught on tape boasting over payments made to cause changes to legislation.

I try hard to look for a similar incident, and coincidentally – the notes waving scene in Indian Lok Sabha comes to mind.

Is it really any different ? I think not….

Regulation, regulation, regulation – but who will keep an eye on regulators ?

Is the Worldwide Morality Index sinking to a new low in the 21st century ?

I hope not.

Friday, January 23, 2009

[FLEX] Adobe AIR – Local SQL DB – Flex Certification Topics #4.2 & 4.3


#4)  Interacting with data sources and servers:
                # 4.2: Create, connect to and define a local DB.
                # 4.3: Add, Update and Remove records from local database.


Salient Features:

  • Adobe AIR Local SQL DB is stored as a single file on user’s computer. Each DB is stored completely within a single file.
  • AIR Local DB Engine does NOT support foreign key constraints.
  • Classes used to work with Local SQL DB:
    • flash.data.SQLConnection – Corresponding to JDBC Connection
    • flash.data.SQLStatement – Corresponding to JDBC Statement
    • flash.data.SQLResult – Corresponding to JDBC ResultSet
  • Classes related to schema information describing the structure of the database:
    • flash.data.SQLSchemaResult
    • flash.data.SQLTableSchema
    • flash.data.SQLViewSchema
    • flash.data.SQLIndexSchema
    • flash.data.SQLTriggerSchema
  • Classes with constants
    • flash.data.SQLMode
    • flash.data.SQLColumnNameStyle
    • flash.data.SQLTransactionLockType
    • flash.data.SQLCollationType
  • Classes related to events/errors
    • flash.events.SQLEvent
    • flash.events.SQLErrorEvent
    • flash.events.SQLUpdateEvent
    • flash.events.SQLErrorEvent
    • flash.errors.SQLError
  • SQLConnection.open() – Connection is opened in synchronous mode.
  • SQLConnection.openAsync() – Connection is opened in asynchronous mode.
  • If open / openAsync method is called without a parameter, an in memory database is created rather than a file on disk.
  • If open / openAsync method is called with a non-existent file name, that database file is created.
  • Example:


    import flash.data.SQLConnection; 
    import flash.events.SQLErrorEvent;
    import flash.events.SQLEvent;
    import flash.filesystem.File;
    var conn:SQLConnection = new SQLConnection();
    conn.addEventListener(SQLEvent.OPEN, openHandler);
    conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
    var dbFile:File = File.applicationStorageDirectory.resolvePath("DBSample.db");
    conn.openAsync(dbFile);
    function openHandler(event:SQLEvent):void
    {
    trace("the database was created successfully");
    }
    function errorHandler(event:SQLErrorEvent):void
    {
    trace("Error message:", event.error.message);
    trace("Details:", event.error.details);
    }




  • SQLMode.UPDATE: Open the file for update purpose. Throws an error, if the file does not exist.


  • SQLMode.CREATE: Default. Creates the file if it does not exist.


  • SQLMode.READ: DB is opened for Read-Only operations. No Add, Update or Delete operations can be performed.


  • SQLStatement and named parameters:

    The SQLStatement supports names parameters. The parameters can be used using : or @ syntax.


  • SQLStatement and UNnamed parameters: In this case, the parameters are expressed using ? and assigned using position.


  • SQLStatement:

    • .sqlConnection = conn;


    • .text = “SQL Statement”;


    • .parameters[] = ….


    • .addEventListener(.., ..);


    • .execute()';


    • .getResult()




  • SQLResult

    • .data



FLEX 3 – Basics

 

  • A flex application is delivered as a Flash .SWF file wrapped in html .

Text Controls:

Flex comes with 5 pre-built text controls:
    • Label Control: Presents Single line of text. Used for displaying text. If the text is longer than the width of control, the text is truncated and three dots are added at the end. Change this behavior by adding truncateToFit=false, and the dots will no longer be there. It can display basic HTML tags.
    • Text Control: The text control has word wrapping enabled. Text over multiple lines. It can display basic HTML tags.
    • Text Input: Accepts single line of text.
    • TextArea:  Accepts multiple lines of text.
    • RichTextEdit:

Formatter Classes:

    • CurrencyFormatter
    • DateFormatter
    • NumberFormatter
    • PhoneFormatter
    • ZipCodeFormatter

Image Control

<mx:Image source=”assets/bigben.jpg” />: This downloads the image at runtime. Image is not bundled with the application.

<mx:Image source=”@Embed(‘assets/bigben.jpg’)” />: This embeds the image at compile time. No secondary request to web server. Increases the size of application.

Four kinds of graphics can be loaded dynamically: JPEG,  GIF, PNG, SWF.

Use SWFLoader for showing multiple images.

Monday, January 12, 2009

A Mixed Day

An Indian gets a Golden Globe award for music.

And an Indian company gets banned by World bank.

A mixed day for India as a nation, I would say.

Saturday, January 10, 2009

The Greatest Detective!!!

Hercule Poirot  - who else.

Having watched Agatha Christie’s hero endlessly, I sometimes think why I like him so much. The reasons I would say are – his greatness, his eccentric nature, his aloofness while being a part of it all, i would say appeals to the fish – the sign I belong to.

Its all in the detail – if you spend time with something, it pays off.

Good night & good luck.

Friday, January 09, 2009

Omar Abdullah

For those of you who don’t know, he is the latest chief Minister of the state of Jammu and kashmir in India.

Is he as secular as he pretends he is ?

hmm.. I don’t know. I would like to think that and sincerely hope that all he wants he is the well being of the ‘state’ – that means Jammu, Kashmir and Leh, while being a part of India.

Since winning election and getting to the CM position, he has made quite a few statements stressing upon the ‘separatist’ elements and finding a solution to the ‘Kashmir problem’. That to me seems a problem in itself.

Anyone who has followed that region in the recent past, will know that the solution to that problem lies south to that region, New Delhi to be precise. Whosoever mentions the ‘separatist’ forces, is giving them undue publicity, and I DO NOT believe that Omar is that foolish.

What is his agenda ? I don’t know, but I wish it is pro-India.