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.

Sunday, November 30, 2008

Musharraf & Attacks on India

Is it just a coincidence that , since the return of ‘democracy’ in Pakistan, attacks on India have increased exponentially.

In my opinion, it goes on to show that only a military dictator can truly control the Pakistan army / ISI. Under Musharraf, attacks from Pakistani elements (not the state per se) on India almost came to standstill. And since the return of so called ‘democracy’, the ‘elements’ seem to be back in business.

Can it be just coinidence ?

Saturday, November 29, 2008

Mumbai Blasts and Moral High Ground

After the mumbai blasts, entire world is stressing upon the fact that it is too early to jump to any conclusions.

Of course, no one denies that.

But, when a country (Pakistan) allows an organization (Lashkar-e-toiba) to grow and develop for decades, what is the end result ?

It is easy to wash one’s hands off it so easily, and very difficult to assume responsibility for the same. I am not sure why the media is not focusing on this aspect. A person has to be made accountable for the mistakes, even if in the past, so as to make the future more secure.

Everyone knows where Dawood Ibrahim lives.. Can Pakistan hand him back to India …

Saturday, November 22, 2008

Who's the culprit ?

In response to

Mahendra Singh Dhoni threatens to resign

First thing: There is nothing wrong in having difference of opinion. Everyone is entitled to an opinion, and discussions are the best way to sort out any differences.

The first problem in this incident is the person who leaked this news. Obviously that person has acted against his employer's code of conduct and should be sacked.

Secondly, if this incident is indeed true, MS should act in a mature manner, and not threaten with this kind of childish behaviour.

He should keep in mind that he is one person in the whole structure (however important) and no one is above system.

Friday, November 21, 2008

Tasteless Victory

Having got up at 3:30 AM in London to watch India England match, it was a tasteless victory. It would have been great to watch the complete match, and not get into D/L charade. It is time, independent regulation is introduced in cricket.

Having said that, there is one point I would like to make. In the last 3-4 overs that Dhoni/Pathan faced, India scored at a rate 2-3 runs an over. Clearly, India was playing with D/L in mind (which would qualify as a tactic, however controversial.)

Why was Pieterson not attacking with all his strength. The bowlers were bowling a magnificent spell, and all they needed were 2 wickets to turn the game around. A friendly advice - Pieterson should stop standing in awe of Yuvraj/Indian team, and give us spectators something to be able to watch all 7 games - rather than making it a one-sided victory. Sure, he will do better next time.

Wednesday, November 19, 2008

Australia - Sore Losers ?

Ricky, You have been a great captain and a great team in the past decade. So, please shut up, and enjoy the moments gone by and work hard to keep the team alive.

Don't let a few bad patches ruin your magnificent decade. Otherwise, I am sure, you will see lot of people repeating certain words - 'Sore Losers?' and none of them would be giving a shit about - whether they are at a risk of sounding monotonous or repeating the next man in queue.

In response to This Article

Australia - Sore Losers ?

Ricky, You have been a great captain and a great team in the past decade. So, please shut up, and enjoy the moments gone by and work hard to keep the team alive.

Don't let a few bad patches ruin your magnificent decade. Otherwise, I am sure, you will see lot of repeating words - 'Sore Losers?' and none of them would be giving a shit about - whether they are at a risk of sounding monotonous or repeating the next man in queue.

In response to This Article

Sunday, November 16, 2008

Allen Stanford in Spying Row

While the International media is still trying to find faults with IPL and trying to ‘pick’ on it, there haven’t been many reports of raids on Allen Stanford’s Offices in Venezuela. Why ?

Because it wouldn’t in any way help the English T20 cause. hmm..

So much for the neutrality of International media. I wonder !!!

Article

Shane Watson’s Comments

People don't want to see robots who don't show any emotion. They want to see people having a go," the 27-year-old explained.

I haven’t seen many robots using ‘F’ word repeatedly. So much for sportsmanship.

Friday, November 14, 2008

Sporty Australia

Character is only tested in time of adversity. These are some of the comments made by Matthew Hayden in Aussie Media:

"Often we find ourselves with hands on hips waiting for someone to either face up or someone in the sightboard to move away; all the little frustrations that happen in third World countries and the heat as well,"

Article

I will leave you to judge about their sportsmanship spirit.

Tuesday, October 28, 2008

Is BBC anti-Obama ?

Having watched BBC closely over the past 3-4 weeks, I wonder !!!

Wednesday, April 23, 2008

Temptation

Nature does not try to enforce its laws in the short run, but there in lies the mankind's biggest temptation.
Will we resist it ?

Tuesday, April 15, 2008

Gandhi's relations with cricket

It provides the perfect coda to the story of Gandhi's relations with cricket: that his son, like the father a frequent visitor to Indian branches of His Majesty's Hotel, spent a night in the home of a British prison warden. To watch Bradman bat.

Complete story here..

Sunday, March 02, 2008

India Wins first CB Series Final at SCG

India pull off a great victory at SCG. It was a brilliant effort by Sachin, along with Rohit who batted magnificiently to take India 1-0 up in the series.

Lets see how Brisbane goes. Keep your fingers (and toes) crossed.


By the way, if you are traveling to Vaishno Devi and need a hotel in Katra, do visit this site for hotels in Katra

Walt Disnistan

Walt disney has teamed up with an Indian film house to promote their brand in India, and more importantly to cash the boom in Indian Cinema Industry. But, the sensible thing which they have done is - not to try to impose their characters on Indian audience. Everybody who has had the slightest interaction with Indian consumer knows that to be successful in India, they have to do it 'the Indian way'.

There is one thing which can make a civilization stay and live on - adaptability to change. And if there is one civilization on earth which is proud to have maintained its 'character', even after coming under influence of gazillions of foreigners, that is India. People say that India is changing and will loose its character soon. I think otherwise. If Indianness did not vanish under centuries of British oppression, if the constant raid of foreigners could not erase something, nothing else can. Man, by his very nature has a short memory - his own lifespan + may be few more years.

Think beyond.

Change is a good thing. Do not resist change, but stay in touch with your inner character, and nothing can beat you.

Friday, February 29, 2008

Harbhajan and Ishant fined 50%

The story goes that Harbhajan and Ishant Sharma have been fined 50% of their match fees. It would appear that these two Indians were behind Australia's loss to Srilanka on Friday at MCG.

We have all heard of the cults and the evil forces. It seems like these two people paid a voodoo specialist to create dolls of Clarke, Ponting, Symonds, Haddin, and Hussey, which were subsequently handed over to Muttiah Muralitharan...

This is the first reported occurrence of such an incident, and was unheard of in cricket, until now. But there we go...


:-)

Wednesday, February 27, 2008

Harbhajan fined 25% match fees for disrespecting

In the last match against Srilanka, i.e. 11th Match: India v Sri Lanka at Hobart - Feb 26, 2008, Harbhajan tossed the ball high in the air, and then tried to 'football' it, after taking the last wicket.

With the type of things happening in this tour, it would come as least surprise that poor harbhajan has been fined for that action i.e. disrespecting the ball as per clause 420 of ICC :-)

While on the topic, thinking about Hayden's remark, it speaks volumes about him. What kind of person says such a thing against another, leave aside the fact that you have to play with the same person.

Whatever happened to the gentleman's game, I am not certain.

I am sure critics will point me to the supposedly racist remarks made by Harbhajan. But, having lived in democratic institutions and by the law, I believe in one thing - If it cannot be proved by hard facts, it is best to leave it at that.

On the other hand, we all know what Hayden's remarks were - they were on radio. I will leave it to you to decide....

Friday, February 22, 2008

Imperialist India...

Its news like this that make me laugh. An australian wary of an Indian Imperialist organization. I think history lessons are due for some people. :-)

Thursday, August 16, 2007

Listen!!!

Great amitabh delivering greater message.!!!



For cheapest prices of hotels in srinagar, jammu, katra, click on the link...

Online booking facility available, No need to speak to anyone. We will do that for you...just click click click...

Sunday, March 18, 2007

New travel site

Check a new travel site at www.meriyatra.in