lamyat2005
read my profile
sign my guestbook

Message: message me


Member Since: 6/8/2007

SubscriptionsSites I Read
neschai
yu_ting_0102
gabriela_J
kenlam218
mak_zhmu
pastormak
dadalove
tracylam514
thomasyks
Kalo_lulu
jovi923
h0145459
Mico_Chow
icammy
Vanessa_Tsang
ivanmusic
Shing319
ericdozo
takialan
ycleung456
denise_cheungsm
christybobo
lkslkslkslkslks
ricky_wy
ddkongbb
hollybooboo
rArA_chel
rubycy0802
mousetmk
sosohome
edithfung
carole_ting
mantinghk
love_muu
benjaminrx
iamchiho
fatfanny
Thankgod_George
yyh4u

Blogrings
i_aM_BScIT_^o^
previous - random - next


Posting Calendar

|<< oldest | newest >>|
view all weblog archives

Get Involved!

Suggest a link

Recommend to friend

Create a site


Tuesday, October 13, 2009

The entity name must immediately follow the '&' in the entity reference.

Problem:
"The entity name must immediately follow the '&' in the entity reference." This occurs mainly when adding javascripts to an JSF document.

Cause:
JSF documents adheres to the XML standard. '&' is not allowed.

Solution:
Use '&amp;' instead.

Example:
bValid = bValid && checkLength(name,"username",3,16);
change to:
bValid = bValid &amp;&amp; checkLength(name,"username",3,16);



In addition, the usage of the sign '>' javascripts embedded in JSF documents causes the JSF document to add a newline automatically, e.g.

(JSF)
<script type="text/javascript">
modifyDialogStr += ' <td><label for="symbol">Symbol</label></td>\n';
</script>

causes the web container to output to browser:
<script type="text/javascript">
modifyDialogStr += ' <td><label for="symbol">Symbol</label></td>
'\n;
</script>

The newline added automatically after the > causes a "unterminated string literal'.

Solution:
use &gt; and &lt;

modifyDialogStr += ' &lt;td&gt;&lt;label for="symbol"&gt;Symbol&lt;/label&gt;&lt;/td&gt;


This is a cost for such XML standardization. Readability is greatly reduced.

Standardization has a cost.


Monday, September 21, 2009

Googles Web Toolkit (GWT)

I followed the instructions to install gwt, and did a "ant build". However, I got the following exceptions:

     [java] Compiling module com.google.gwt.sample.mail.Mail
     [java] #
     [java] # An unexpected error has been detected by Java Runtime Environment:
     [java] #
     [java] #  SIGSEGV (0xb) at pc=0x0625665c, pid=7535, tid=2690198416
     [java] #
     [java] # Java VM: Java HotSpot(TM) Server VM (10.0-b23 mixed mode linux-x86)
     [java] # Problematic frame:
     [java] # V  [libjvm.so+0x25665c]

I searched all through the internet, but to no avail.

I spent hours dealing with this problem, only to find out the solution was:

"sudo ant build"

Only super users can compile gwt! Dunno why have such stupid requirement.

Thinking that GWT does not support Linux, those Google programmers must be using Windows only...


Eastern Front - 42000 Russian artilleries fired at Berlin.


Wednesday, September 16, 2009

The Japanese does not admit the Nanjing Massacre in 1937, neither does the Turks (formerly the Ottoman) admit the genocide of the Armenians in 1915. Their reasons are the same: why admit their grandfathers faults for something that (in their minds) did not happen.

Events recur under the sun, that is, the world we live in.


Thursday, September 03, 2009

小雞被活生生的碎掉, so cruel....

According to the most recent estimate by Food and Agriculture Organization of the United Nations, made in 2002, there were nearly sixteen billion chickens in the world. The estimate at that time was 15,853,900,000 Chicken population. The figures from the Global Livestock Production and Health Atlas for 2004 were as follows:

  1. China (8,860,000,000)
  2. United States (1,970,000,000)
  3. Indonesia (1,200,000,000)
  4. Brazil (1,100,000,000)
  5. Mexico (540,000,000)
  6. India (425,000,000)
  7. Russia (340,000,000)
  8. Japan (286,000,000)
  9. Iran (280,000,000)
  10. Turkey (250,000,000)



Next 5 >>