Sunday, April 12, 2009
List of countries
Thursday, April 9, 2009
Hitler (Charlie Charplin) Speech
"I'm sorry, but I don't want to be an emperor. That's not my business. I don't want to rule or conquer anyone. I should like to help everyone if possible - Jew, Gentile - black man - white.
We all want to help one another. Human beings are like that. We want to live by each other's happiness - not by each other's misery. We don't want to hate and despise one another. In this world there's room for everyone and the good earth is rich and can provide for everyone.
The way of life can be free and beautiful, but we have lost the way. Greed has poisoned men's souls - has barricaded the world with hate - has goose-stepped us into misery and bloodshed. We have developed speed, but we have shut ourselves in. Machinery that gives abundance has left us in want. Our knowledge has made us cynical; our cleverness, hard and unkind. We think too much and feel too little. More than machinery we need humanity. More than cleverness, we need kindness and gentleness. Withouhese qualities, life will be violent and all will be lost.
The aeroplane and the radio have brought us closer together. The very nature of these inventions cries out for the goodness in man - cries for universal brotherhood - for the unity of us all. Even now my voice is reaching millions throughout the world - millions of despairing men, women, and little children - victims of a system that makes men torture and imprison innocent people. To those who can hear me, I say: 'Do not despair.' The misery that is now upon us is but the passing of greed - the bitterness of men who fear the way of human progress. The hate of men will pass, and dictators die, and the power they took from the people will return to the people. And so long as men die, liberty will never perish.
Soldiers! Don't give yourselves to brutes - men who despise you and enslave you - who regiment your lives - tell you what to do - what to think and what to feel! Who drill you - diet you - treat you like cattle, use you as cannon fodder. Don't give yourselves to these unnatural men - machine men with machine minds and machine hearts! You are not machines! You are not cattle! You are men! You have the love of humanity in your hearts. You don't hate, only the unloved hate - the unloved and the unnatural!
Soldiers! Don't fight for slavery! Fight for liberty! In the seventeenth chapter of St Luke, it is written the kingdom of God is within man not one man nor a group of men, but in all men! In you! You, the people, have the power - the power to create machines. The power to create happiness! You, the people, have the power to make this life free and beautiful - to make this life a wonderful adventure. Then in the name of democracy - let us use that power - let us all unite. Let us fight for a new world - a decent world that will give men a chance to work - that will give youth a future and old age a security.
By the promise of these things, brutes have risen to power. But they lie! They do not fulfil that promise. They never will! Dictators free themselves but they enslave the people. Now let us fight to fulfil that promise! Let us fight to free the world - to do away with national barriers - to do away with greed, with hate and intolerance. Let us fight for a world of reason - a world where science and progress will lead to all men's happiness. Soldiers, in the name of democracy, let us unite!
Inmates as telemarketers
You know.. What I do to telemarketers when they call me? I will pick up and then I will say oh yes, and ask them to hold on for a second and go about doing my things, come back one hour later and hang up the phone. Its not such a good idea anymore huh? They are inmates, they have my telephone number, and they may come out one day.
--------------------------------------------------------------------------------
Tay Choon Teng (I kill you). Multiple disruptions. The NSF that burst my vein.
--------------------------------------------------------------------------------
Oh you are a scholar? Can I do project with you?
--------------------------------------------------------------------------------
The world is small, becareful on who you tell on. (I think he cannot make it in life)
Followed by the dinner with Erika which ended up with the conclusion
--------------------------------------------------------------------------------
Mango spoon licking incident
--------------------------------------------------------------------------------
Italy and how unsafe it is (coach lost camera). TomatoMayo. Breastfeeding with muslim
--------------------------------------------------------------------------------
USA, sucky weather, nothing to do, black man smile, thanksgiving turkey, black friday, online shopping addiction, research on HCI and Virtualization. Demographics of students, lack of exams, student quality - project manager only, z4, bribe, driving test that never materialize, danger, snow, spring carnival. Lost of iphone.
--------------------------------------------------------------------------------
Golf, pittsburgh, singapore, malaysia, indonesia
--------------------------------------------------------------------------------
Poly, KTV days, Javelin, President Track and Field, Play poker in car
--------------------------------------------------------------------------------
Kath, demanding, mad, clinic, jeans, combing hair, breakup threats, birthday breakup
--------------------------------------------------------------------------------
Perry, Samantha, Carol, MH, PY, Nikky. Running at gim moh, driving across the causeway. pimp
Monday, April 6, 2009
Populate Dropdownlist programmatically
try {
var qnsArrayList:ArrayCollection = new ArrayCollection();
var counter:int;
for (counter = 0; counter < qnsArray.length; counter++) {
var obj:Object = {data:qnsArray[counter][0],label:qnsArray[counter][1]};
qnsArrayList.addItem(obj);
}
ddl_response.labelField = "label";
ddl_response.dataProvider = qnsArrayList;
} catch (error:Error) {
Alert.show(error.message);
}
Saturday, April 4, 2009
SQL Left Join Twice
SELECT `categoryLinksId`, `_category`.`catId` as `pcatId`, `_category`.`catName` as `pcatName`, `category1`.`catId` as `ccatId`, `category1`.`catName` as `ccatName` FROM (`_categorylinks` LEFT JOIN `_category` ON `_categorylinks`.`parent_categoryId` = `_category`.`catId`) LEFT JOIN `_category` as `category1` ON `_categorylinks`.`child_categoryId` = `category1`.`catId`
Update parent body from child popup
Anyhow, the codes for the parent window is as follows:
<script type="text/javascript">
<!--
// What these codes does it open up a popup when you click on something and when we receive a signal from the child, we updateLayer
function openBrWindow(theURL,winName,features) {
(theURL,winName,features);
}
function updateLayer() {
var obj = document.getElementById('selectcat1');
obj.innerHTML = "Testing"; // I had to do it this way else Firefox won't accept it!
}
//-->
</script>
You can open a new window with the following:
<a onclick="openBrWindow('selectcat.php','selectcat1','location=0,scrollbars=1,width=700,height=300')" href="#">popup</a>
The thing to update in parent is a SPAN Tag:
<span id="selectcat1" class="greyFont">None</span>
The codes for the child popup window is:
<script type="text/javascript">
<!-- function updateParentCloseSelf() {
opener.updateLayer();
self.close();
}
//-->
</script>
The button within the child is:
<input onclick="javascript:updateParentCloseSelf();" border="0" value="Submit Query" type="submit" name="Submit">
Wednesday, April 1, 2009
Accurately Position Drag and Drop Item
This is due to the fact that the image (when you clicked) had a pointer that was not at coordinates zero, zero. When we click the image and drag, it was most likely at a portion of the image, and when we drag it around the canvas, the 'transparent rectangular background of the image' made it appear as if we are dropping the image at that particular rectangular position.
You can see the codes to do drag and drop for canvas at:
http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html
In order to overcome this problem, at line dragInitiator, i added the following lines:
ds.addData(event.localX, "NumberX");
ds.addData(event.localY, "NumberY");
Then at the line of dragDropHandler, I placed the following:
Image(event.dragInitiator).x =
Canvas(event.currentTarget).mouseX- parseInt("" + event.dragSource.dataForFormat("NumberX"));
Image(event.dragInitiator).y =
Canvas(event.currentTarget).mouseY- parseInt("" + event.dragSource.dataForFormat("NumberY"));
Viola! Your image should appear wherever you drop them now.