Usage of class and id in CSS for DIVs
.newsRowText {
color:#333333;
margin:10px;
line-height:22px;}
.newsRowText#errors {
color:#CC0000;
margin:10px;
line-height:22px;
}
<div id="errors" class="newsRowText">Error Message</div>
<div class="newsRowText">Normal Message</div>
Sunday, April 12, 2009
css id and class
Flex getting objects that are created
1. When we create an object, they belong to a particular container, so when we access it we need to make sure that the accessor is going in order of it. Say for example, I have a button inside the RichTextArea object, I need to do this in order to access it:
this.richtextarea.textarea.button and not just simply this.richtextarea.button
2. We can access objects created on screen in two ways.
a. When we add the objects we created via an array. e.g.
public var imgArray:Array = new Array(); // this is declared at the top of the page
for (var count:int =0; count <>
var myImage:Image = new Image();
myImage.x = 10;
myImage.y = 10;
myImage.source = "whatever.jpg";
imgArray.push(myImage);
}
b. When we add a name to the object and obtain the current Event Source of it e.g.
public function init():void {
var myImage:Image = new Image();
myImage.x = 10;
myImage.y = 10;
myImage.source = "whatever.jpg";
myImage.name = "whatever";
myImage.addEventListener(MouseEvent.CLICK, getEventName);
}
public function getEventName(event:Event):void {
var myObject:Image = event.currentTarget as Image;
// if you want to get the image Name, we can do it like this:
// var myObjName:String = (event.currentTarget as Image).name;
}
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`