Monday, July 4, 2011

4th of July

Happy birth day, America.
I had BBQ party in Beth's house with international students.
I have problem with reading a book.
I am not sure it's my reading problem or time management.
Reading process is very very slow.
Need to concentrate on it!!!!

Friday, July 1, 2011

One day in America

I am in America.
I've been here since 09 Sep 2010

Sunday, April 25, 2010

chartFx

http://support.softwarefx.com/OnlineDoc/CfxJava65//

Sunday, April 18, 2010

div handling

[html]
[body]
[script]
[!--

function showTable(object){
document.list =
eval('document.getElementById("drop1")');
document.div1 = eval('document.getElementById("div1")');
document.div2 = eval('document.getElementById("div2")');
document.div3 = eval('document.getElementById("div3")');
document.div4 = eval('document.getElementById("div4")');
document.div5 = eval('document.getElementById("div5")');
document.div6 = eval('document.getElementById("div6")');
document.div7 = eval('document.getElementById("div7")');
document.div1.style.visibility = "hidden";
document.div2.style.visibility = "hidden";
document.div3.style.visibility = "hidden";
document.div4.style.visibility = "hidden";
document.div5.style.visibility = "hidden";
document.div6.style.visibility = "hidden";
document.div7.style.visibility = "hidden";
document.selectedDiv = eval('document.getElementById("div'+document.list.value+'")');
// alert("]"+object.value+"[")
document.selectedDiv.style.visibility = "visible";
}

//--]
[/script]


[form]
[select name="drop1" id="drop1" onchange="javascript:showTable(this)"]
[option value="1"]item 1[/option]
[option value="2"]item 2[/option]
[option value="3"]item 3[/option]
[option value="4"]item 4[/option]
[option value="5"]item 5[/option]
[option value="6"]item 6[/option]
[option value="7"]item 7[/option]
[/select]

[div id="div1" style="display:table-row " style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:visible"]
[table width="100" border="1"]
[tr]
[td]
[table width="50" border="1"]
[td]
hey
[/td]
[/table]
[/td]
[td]
[/td]
[td]
1-2
[/td]
[td]
[/td]
[/tr]
[tr]
[td]
1-3
[/td]
[td]
[/td]
[td]
1-4
[/td]
[td]
[/td]
[/tr]
[/table]
[/div]
[div id="div2" style="display:table-row " style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="100" border="1"]
[tr]
[td]
[table width="50" border="1"]
[td]
hey 2
[/td]
[/table]
[/td]
[td]
[/td]
[td]
2-2
[/td]
[td]
[/td]
[/tr]
[tr]
[td]
2-3
[/td]
[td]
[/td]
[td]
2-4
[/td]
[td]
[/td]
[/tr]
[/table]
[/div]
[div id="div3" style="display:table-row " style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="100" border="1"]
[tr]
[td]
[table width="50" border="1"]
[td]
hey3
[/td]
[/table]
[/td]
[td]
[/td]
[td]
3-2
[/td]
[td]
[/td]
[/tr]
[tr]
[td]
3-3
[/td]
[td]
[/td]
[td]
3-4
[/td]
[td]
[/td]
[/tr]
[/table]
[/div]
[div id="div4" style="display:table-row " style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="100" border="1"]
[tr]
[td]
[table width="50" border="1"]
[td]
hey4
[/td]
[/table]
[/td]
[td]
[/td]
[td]
4-2
[/td]
[td]
[/td]
[/tr]
[tr]
[td]
4-3
[/td]
[td]
[/td]
[td]
4-4
[/td]
[td]
[/td]
[/tr]
[/table]
[/div]
[div id="div5" style="display:table-row " style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="10" border="1"]
[td]
5
[/td]
[/table]
[/div]
[div id="div6" style="display:block" style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="10" border="1"]
[td]
6
[/td]
[/table]
[/div]
[div id="div7" style="display:block" style="position: absolute; left: 610px; top: 80px; height: 400px;visibility:hidden"]
[table width="10" border="1"]
[td]
7
[/td]
[/table]
[/div]
hey last line
[/body]
[/html]

Thursday, October 2, 2008

it was sort problem of arrays

how to sort arrays with multiple elements of them?

I have a problem with sort of arrays.

for example

problem
//code start
...
public static void main(String [] args){
//case 1
//chkBoxPre, chkboxPost, code1, code2
String a1 = {"1","0","42","12"};
String a2 = {"0","1","32","23",};
List a = new ArrayList();
a.add(a1);
a.add(a2);

TestBean tb01 = new TestBean();
TestBean tb02 = new TestBean();
List b = new ArrayList();
b.add(tb01 );
b.add(tb02 );
}
...

public class TestBean implements Comparable, Serializable{
...
public int compareTo(Object arg0) {
TestBean tb = (TestBean) arg0;
//play with compareTo
if(tb.chkBoxPre.compareTo(this.chkBoxPre)==-1){
return 1;
}else{
return -1;
}
}
}
//code ends

current status
1. it's impossible to sort arrays in a list.

solution
1. so make the array to class shaped like bean.
1.1 the bean implements comparable
1.2 and implements compareTo