Friday, September 22, 2006

Testing from the live!

It is till the end of life of windows XP and many other matters. Including my life too may be. I wonder if this tool is going to give us new life.. Or may be it is going to made us miserable.

Life if short. Microsoft is clever enought to sing about it and provide the elixir.

To try out the feature, you have really have to click on link that are available on the live! webpage . The google will never return the correct link if you enter "microsoft live". They are rivals .. again officially.

Thursday, July 27, 2006

What a ODBD connection strings look like :

http://www.asp101.com/articles/john/connstring/default.asp

How To Handle Multiple Results by Using the DataReader in Visual C# .NET

http://support.microsoft.com/default.aspx?scid=kb;EN-US;311274

Connecting to MySQL database from your .NET applications -- introducing two methods.

http://www.codeproject.com/cs/database/ConnectMySQL.asp

Typed SQLDataReader
http://www.codeproject.com/cs/database/SmartReader.asp

ASP.NET: Accessing Data with C#
http://www.exforsys.com/content/view/1341/266/

MySQL 5 C# sample code using ObjectDataSources
http://www.codeproject.com/aspnet/MySQLCsharp.asp

Another way of connection in C#

http://forums.devshed.com/net-development-87/mysql-query-within-c-sharp-backend-page-for-asp-370283.html

Well I'm assuming you need to know how to use MySQL with C# in general so I'll post this...
I personally use the MySQL.DataClient when using MySQL with .NET so I'll post that, though there are other options, just google .NET and MySQL.

You can download them from:
http://dev.mysql.com/downloads/connector/net/1.0.html

Code:

using MySql.Data.MySqlClient;

Connection string...
private string connectionString = "Server=localhost;Database=yourtable;User ID=youruser;Password=yourpw;Pooling=false";

Main body...

MySqlConnection MySqlConn = new MySqlConnection(connectionString);
MySqlConn.Open();

MySqlCommand MySqlCmd = MySqlConn.CreateCommand();
MySqlCmd.CommandText = "SELECT MAX(field) FROM table";

try
{
MySqlDataReader MySqlRead = MySqlCmd.ExecuteReader();

while (MySqlRead.Read())
{
Console.Write(MySqlRead.GetString(0));
}

MySqlRead.Close();
MySqlRead = null;
}
catch (MySqlException e)
{
Console.WriteLine(e.Message);
}
finally
{
MySqlConn.Close();
MySqlConn = null;
}
Another Example from
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Microsoft.Data.Odbc;

namespace myApplication
{
///
/// Summary description for WebForm1.
///

public class WebForm1 : Page
{
protected System.Web.UI.WebControls.Button myButton;

public void butClick(object sender, System.EventArgs e)
{
string dbConnect; //Defines how we connect to MySQL
int count = 0; //Cycle through Records
OdbcConnection DB; //The MySQL Connection
OdbcCommand query; //The Query We Send
OdbcDataReader reader; // How we read the records

dbConnect = "driver={mysql ODBC 3.51 driver};server=localhost;port=3306;database=aspwork;uid=localhost;"; //Define how we connect
DB = new OdbcConnection( dbConnect ); //Define our connection
DB.Open(); //Open our connection

query = new OdbcCommand( "select * from testtable", DB );//Define our query

reader = query.ExecuteReader();//Execute the query
while( reader.Read() )//While we can read, read.
{
Response.Write( reader.GetString( count ) );//Write results
count++;//Increment our counter.
}
reader.Close();//Close our reader
DB.Close();//Close our connection

}

}
}

Friday, June 09, 2006

Not so common afterall

Common sense - not so common after all

When I passed by the corridor .. A worker was fixing the electric lining of the lights. He was on a portable ladder and holding a electrical drill. The floor was scatter with pieces of dirts and paint fallling from the wall. Surprisingly, there is not warning sign located around the work area. Instinctly, I moved away from there.
Just then, a small kid, happily walking through the work area and couldn't help to stop and watch for a while. While the drill was still operating, I was worried what would happen to him if that gadget fell on his little head. His face may not be as cute as used to be.

It is to me common sense. Walk away from construction area, avoid the work area, move away from the workers who are doing the lawn. The new generation seems to forget about the danger. They are not educated to that.
You could blame some other party for not setting up the warning sign. End of the day, the consequence is irreversible and the regret is on your own.
And then, I can't help but wonder.. when we say common sense. It is not so common after all. It change with geography , with time and may be with people. There is nothing to rely on, when it come to common sense. The only common sense that you could believe is, common sense change.

Saturday, May 27, 2006

Letter for vandetta

Letter to vandetta

hi vandetta,

I think I miss you. Simply as a friend. I think what I need is just a listener. You don't have to approve on what you heard. I need the nodding once in a while to signifiy that you have heard. Yes, I need to pour out a bit of the contents in the bottom brain (heart) .. so that it won't be overflow.
Has it been a rough week. Full of tension, expectation, frustration and hope. Met with evil persons (collegues ) and met with kind angels (strangers). The good and the bad are not necessary as what you expected. The good and the bad give you the biggest impact while you were on these big emotional ride.
I am moving slowly, with little tiny hope towards the exit. Which still seem a very far far distance away. I am working / procrastinating towards the end. During the process, not wanting to lose everything, I am trying very hard to grab on different things. The exercise, the reading and my work.
Do I have enough hands to hold on them. I wonder. I need to tell myself . I will be fine.

Sunday, May 14, 2006

More on food

Wonder what good food is? Wonder what good drink is? I tell you what good place to drink though. Here are two dreamy places that I will always remember sipping my coffee there.
Just quiet and cosy place to relax and indulge in the cafein sin.

The mornin sin





The evening sin



find out the difference















Find out the difference between the thow pictures ?

Just would like to remember this special curry bun meal. Bought at narita airport, about 9 USD per meal. (you don't think japan is cheap don't you). The curry is not spicy at all, although you can see some of the visitors were having difficult time to deal with it.
Sometimes, when we are on the road, we tend to move out of our comfort zone. The outside world, spurs up our adventurous spirit making everyone a hero. I wonder are all the pilots feel the same way whenever they fly to a new place. You just have to be more courageous and bold to experience the culture.
Yet, with globalisation waves flooding the whole world, one can always find goods that origine from thousands of miles away. (ignore the fact that Africa is part of the world ). It is quite stupid to try new thing at new place and put yourself out there for humiliation. What I am saying is, you don' t have any excuse to explain your ignorance to others culture, because we are one world now.

Sunday, May 07, 2006

Ten ways that you could be longed

Ten ways that you could be longed

1. longing - prolonged unfulfilled desire or need
2. yearning - A persistent, often wistful or melancholy desire; a longing: a yearning for romance and adventure.
3. desire - the feeling that accompanies an unsatisfied state
4. hankering, yen - a yearning for something or to do something
5. pining - a feeling of deep longing
6. wishfulness - an unrealistic yearning
7. wistfulness - a sadly pensive longing
8. nostalgia - longing for something past
9. discontent, discontentedness, discontentment - a longing for something better than the present situation
10. miss - feel or suffer from the lack of; "He misses his mother"
regret - feel sad about the loss or absence of
desire, want - feel or have a desire for; want strongly; "I want to go home now"; "I want my own room.


yearn - desire strongly or persistently

1. yearn - hanker, long
you can yearn by
pine, yen, yearn, ache, languish - have a desire for something or someone who is not present; "She ached for a cigarette"; "I am pining for my lover"
desire, want - feel or have a desire for; want strongly; "I want to go home now"; "I want my own room"

2. yearn - have a desire for something or someone who is not present; "She ached for a cigarette"; "I am pining for my lover"
you can yearn by
pine, yen, ache, languish
die - languish as with love or desire; "She dying for a cigarette"; "I was dying to leave"
hanker, long, yearn - desire strongly or persistently

3. yearn - have affection for; feel tenderness for
you can yearn by
cherish, hold dear, treasure, care for - be fond of; be attached to

Saturday, May 06, 2006

hougang horrible yet the best

Never thought of there is such scene in Singapore.
When I was amazed by HongKong people spirit to walk out for their rights, I always believe that no such thing in singapore. However, these pictures prove me wrong. Even that it could be temporary hype factor because of election hit, it is still a WoW to me. Singaporeans (in most case ) earn my respect today.

source
http://singaporeelection.blogspot.com/

Saturday, April 29, 2006

story teller

You got have good story to tell... of course. The story line must be new and exciting or painful or extremely unique so that no one would ever forget.. May be what I am saying is that it is what a story is all about. Else it should not be a story at all.
Although, looking through my own story, which I really mean the blogs that I have rubbished. I realized that some are horribly boring just like the person who wrote it. Exactly, who would want to read such tasteless expression.
There are yet some good (adjective: interesting, invigorating) one. It is quite obvious that, if the story was told to others, it sound nicer ( adjective : pleasant ) than the one that only me talking to myself.
Don't you think so ?

Therefore, I am very pleased to announce that -- a good story teller must always only tell the story to others but not to himself/herself.

Somehow, remember those were the days where I have writen tons and tons of essays and compositions for examination preparation. In many languages and in many genre, they are. Argumentative, narrative, descriptive ( although limited to adjective such as : good, nice , pleasant and pretty ) .. you name it. The good-essay need to have certain quality. I just can not remember all of them. And also, If I could, I may not be able to reproduce what I have written now. Ultimately, time has changed, mind is gone. Mentally, I could never be the myself in 17 again.

If day allows, it is endearing to read them back. I wish the special afternoon will realize in future.

Friday, April 21, 2006

words in third summer ep 2

The tumult had brought with it a certain strange exuberance, a feeling of living more extravagantly than ever before.

valia turned around somewhat belligerently, obviously feeling carmen's eyes on the back of her uncoiffed heed.

tartly

words in third summer ep1

guzzle - to consume to excess
voyage - A long journey to a foreign or distant place, especially sea
intertwine - to join or become joined by twining together
grumpily - asked grumpily - peevishly - surly - discontented
elm - Any of various deciduous trees of the genus Ulmus, characteristically having arching or curving branches and serrate leaves with asymmetrical bases. Elms are widely planted as shade trees.
dire - Warning of or having dreadful or terrible consequences; calamitous , desperate
culmination- To come to completion
cheek pressed together,
wrinkle - A small furrow, ridge, or crease on a normally smooth surface, caused by crumpling, folding, or shrinking.
heave of flesh
demise - death
egregiously bad dance music - enormously; shamefully (bad dance music)
ceremonial - ppropriate to, or characterized by ceremony; formal or ritual.
daunted - discouraged
flipped and flopped
hiatus , a brief hiatus - short break, pause, aperture
taxidermy - The art or operation of preparing, stuffing, and mounting the skins of dead animals for exhibition in a lifelike state
jauntily midstep - Having a buoyant or self-confident air; brisk
pedestal - A support or foundation
brass - alloy of zinc and copper
mystified,
gestured towards -
clammy - damn , colol , unpleasant -
utterly - completely
perplexed - Contrary to nature, reason, or common sense;
blurted it out - utter implusively
preposterousness - Contrary to nature, reason, or common sense; absurd

eerrily - nspiring inexplicable fear, dread, or uneasiness; strange and frightening.
rumple of consternation - rumple of fear resulting from the awareness of danger
bread crumbs
dwell on it - delay
subtly (resisted) - So slight as to be difficult to detect or describe; elusive
source of agony - The struggle that precedes death.
spocking on -
unquenchable - Impossible to slake or satisfy. e.g. unquenchable hope
cleavage - The act of splitting or cleaving; a fissure or division.
kohl - a cosmetic preparation used by women in Egypt and Arabia to darken the edges of their eyelids
dork - foolish people
hideous - Repulsive, especially to the sight; revoltingly ugly

stupefaction - The state of being stupefied
glamour jock - jock is athletes
flew under - fly under
fray - dispute / contest
primping date - To dress or groom (oneself) with meticulous or excessive attention to detail.
finery - Elaborate adornment, especially fine clothing and accessories.
gussied - To dress or decorate elaborately; adorn or embellish
skittish - Moving quickly and lightly; lively.
equidistant

old sensation of a wind blowing through her midn. alternately hot and sultry, then cold and bracing. and when the wind subsided, she realized that the friendship, as it had been, was gone.

someday somebody's going to ask you a question that you should say yes to -

solace - Comfort in sorrow, misfortune, or distress; consolation. source of solace
shivery feeling - trembling
meager - deficient in quantity
hammy - Marked or characterized by overacting; affectedly humorous or dramatic.

skip to the crux of matter
stiffen her spine to mount a vivid defense
unwavering - marked by firm determination or resolution; not shakable; "firm convictions"; "a firm mouth"; "steadfast resolve"; "a man of unbendable perseverence"; "unwavering loyalty"
gaze

arching eyebrows -
monumental - Of outstanding significance:, astounding.






Tuesday, April 18, 2006

learning chinese words the english way.

降半旗 source half ride
骂人 horse man ( hokkien )
不三不四 not three not four
以鹅传鹅 chair goose boat goose
实事求是 ten yes ball yes

Saturday, April 15, 2006

30 mins and 24 hours

It sometimes strike me if I begin to compute the time we spend for transportation.
The distance of less than 1 km would take as much as 3o0 minutes to commute. One major reason is the unpredictable public transport schedule and moderate distance involved. Although categorized as high quality public transport, it does not eliminate the fact that "waiting" is just part of it.
The detail composition of a bus ride, would consist of the walking distance from source to the first bus stop, then the waiting time of the bus stop. When the bus start to move, then you see waiting time in front of traffic lights, waiting time of pedestrian way, boarding and alighting of passengers at every bus stop and finally arriving at the last bus stop. Wait a minute, that's not the end of it. Usually you still have to walk a short distance to the final destination.
Taking into all the consideration, it is apparent that why a short 1 km ride can end up as long as 30 minutes. We have not mentioned about the rainy day effect, traffic jam at peak hours. And we are still talking about 1 leg ride. In many occasion, the passenger have to transfer to another service ( or more than 1 ) before arriving at destination. Oh my god.
Now, you may argue that: driving on your own will take similar time. What I am trying to say is, in your own vehicle you have a private space that somehow is very comfortable, cosy , with your own genre of music on radio, and most importantly a guranteed place to sit. No one will pick his nose in front of you, no one shout at the cell phone, and no smelly dirty freaks besides you.. and definitely no other people sneezing behind you ( that's is creepy ). Also you have storage to keep all the luggage and hand-carry. If you are lucky you have favourite beverage just at the reach of your left hand.
So, imagine the time we spend of transport every day. I wish god bless us all with less painful transportation. I wish scientist bless us with the transporter in those science fic. movie.

http://en.wikipedia.org/wiki/Teleportation

transporter

Thursday, April 13, 2006

blink and blink continue..

More on the "blink "

5 - Paul van riper's big victory - about a general retired from vietnam war. who has the gifted sense of ad-hoc situation during war. he defeated the opponent side which has very affluent information about everything in the war. Yet, the information seems to be too overloading to digest even with a "expert system" computer .
Another example is the cook hospital in chicago. the use of computer recognition problem mine the rule - found three criterias are the most relevant to critical cardio problem when the patients have chest pain. Text processing on one side of the brain can over-shadow the functionality of the other side of the brain that manage image. So it is good to break down the task separately.

6 - Kenna's dilemma - the right and worng way to ask people what they want.
--> pepsi challege with short sip is different from long drink time. package is many ways important.
--> why disney mickey has glove.. otherwise no one loves him with the claw out .
--> aeron chair -- the allen chair. - when the product is revolutionary.. can not rely on history data.
-- with really really a lot of experience. might be able to expose the locked door..
what a reverse statment to make. -- when it is working, attribute it to inner locked door. and always has a way to explain the other method was mimicking the "behind locked door" ..

7 - Seven seconds in bronx -
- killed of one innocent immigrant because of multiple
- lack of time can be the reason of missing "blicnk"

In short - the book does not have a stand. it discuss but it is unable to give any conclusion.
8 - Listening with your eyes -

blink and blink

Reading a book with title blink.

I have not come to conclusion on how useful it is. Possibly one of the so-so book that is written in easy language that I just flow through.

Mostly it is discussing concious mind and sub-concious mind.
Why do we have to pay attention to sub-concious mind. how different is sub-concious mind. The sub-concious mind is thin-slicing. it is simple and can be sometime more accurate to follow.

In contrary, you can find some instance that you won't want to follow the instant mind. Is there any guildlines to follow. In life / dead situation. you follow instinct.. the back door feel. In most day-to-day life, what do you do.

It also try to show the existence of such powerful - " locked /hidden " mind that enable the decision in a wink of time - blink.

Examples given is a good set of compilation (variety of psycology tests) . It is at least the effort of the author to pull everything together

1 - The status of kouros - how thin-slice work - no reason is produced
2 - The theory of thin slices - e.g. gottman's couple test about their positive/negative atttitude. interview for candidates of a jobs - you just have to find the most essential info that has the biggest influence. thin-slicing is good at it. our instinct is good at it. our usual way of solving problem (objectively) with survey and empirical method may not always be the good/correct way. In the example of couple relationship -- if there is a contempt ..then the marriage won't be long.

3 - The locked door - tennis player double fault/ speed dating / two ropes in a room.. the concious mind can be a noise to the sub-conscious mind. how could you filter the noisy concious mind. there are people who conciously know the correct and wrong Yet unable to act on it.

4 - The warren harding error - thin slicing can be dark side. the choice of warren harding as president was a bad decision. It was based on impression. and strong assiocation of external look. We all associate. Example of implicit associate test is really freaking me out. very true. It measuers our level of subconcious / altitude. also CEOs are average taller.. car salesman error to filter potential customer .. bottom line is you have to find out that you have the weakness of certain sub-concious and overcome it. easy to say.
note: very interesting IAT test

5 - Paul van riper's big victory -
6 - Kenna's dilemma -
7 - Seven seconds in bronx -
8 - Listening with your eyes -

Monday, March 20, 2006

committed workers

committed workers



bad bad ... writing scrappy note during office hours. My fellow co-workers from US may not understand this. For a typical asian office slave, doing something else while sitting in front of office desk is a sin. This would probably similar to the culture difference when I ask if men will happily become house-men and women become the bread-winner.

On the contrary, I personally think it is perfectly okay. However, the societies that I live will not like it. And the question remains how much I would do to please the society and the people. May be it is time to think of changing the society of living in.

Do you agree?

Friday, March 03, 2006

the diving island

It is always in my mind. Some place that one should at least put his/her feet on this island. The sipadan. Unfortunately (?)_ up until now, I have no take any action to do it. It is definitely on any of my priority list.
After japan, korea, or even Shang hai i would say.
The island is really a heaven to divers, and anyone who love love love the crystal clear sea water and cast-away feel from city noise.
My friend got this picture taken : I would believe, as such place, it is time to forget about any unhappy time. The world can be an island if you find the correct place to go.
Sometime I wonder, how much time should I spend to plan for my future life. How much of me should be in the future, how much of me should at the present. You couldn't just live the life now, or live the last minute of current life. It seems to take away all the hopes from you. It also prevent any accumulate efforts that you need for civil success. (in the definition of most people)
To live in future, aka plan well for future. Does it has any similarity to the karma or next-life in Buddism. It is something in the future, where no one knows what would happen.
The person who spends most of his time predicting what would happen, reacting to any signal he sees throught the crystal ball, does not turn out to be the successful one too.
Our capability as a human being is simply too weak.


Sunday, February 05, 2006

why you got stared

You can't blame them to stare at you .
No one has to be blamed because it is the city .
Everything is so dull and boring.
You only can observe people. And that is why you get stared.
Because apparently, no other thing to see in this world.