<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>[MeIsProgrammer]</title>
	<atom:link href="http://just-thor.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://just-thor.com</link>
	<description>all play and no work makes me a dull boy</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:28:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>HTML5 Geolocation &#8211; Google Map with Modernizr</title>
		<link>http://just-thor.com/2010/07/04/html5-geolocation-google-map-with-modernizr/</link>
		<comments>http://just-thor.com/2010/07/04/html5-geolocation-google-map-with-modernizr/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:28:21 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=147</guid>
		<description><![CDATA[HTML5 defines a very handy function, which is geolocation. Basically, this function will try to locate user&#8217;s location. But at the moment, not every browser supports this function. We need [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 defines a very handy function, which is geolocation. Basically, this function will try to locate user&#8217;s location. But at the moment, not every browser supports this function. We need to implement some tedious conditions to check whether the browser supports Geolocation or not. Luckily, there is an open source javascript library, Modernizr. Using modernizr is simple, just import a script and use it. For example, if I want to check the browser whether Geolocation is supported or not, I just write the following code</p>
<p><pre><code>
if (Modernizr.geolocation){
//...Your logic here
}
</code></pre></p>
<p>Here, I wrote a simple html page that locate your location using Geolocation and show it on the Google map.</p>
<p><a href="http://just-thor.com/sample-works/geolocation.html">http://just-thor.com/sample-works/geolocation.html</a></p>
<p>Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/07/04/html5-geolocation-google-map-with-modernizr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obtaining Google Android Map API Key</title>
		<link>http://just-thor.com/2010/06/30/obtaining-google-android-map-api-key/</link>
		<comments>http://just-thor.com/2010/06/30/obtaining-google-android-map-api-key/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 08:53:32 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=152</guid>
		<description><![CDATA[As a beginner on Android platform, I was trying to embed Google map in my application. I have everything right, except the map is not loading, and no exception was [...]]]></description>
			<content:encoded><![CDATA[<p>As a beginner on Android platform, I was trying to embed Google map in my application. I have everything right, except the map is not loading, and no exception was thrown at the console.</p>
<p>After doing some searching on the internet, my problem seems like caused by incorrect API key. Obtaining Android Map API key is different from normal Google Map API key. I assume you are running Android emulator and also a beginner(like me <img src='http://just-thor.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ), first step is to find out the location of your keystore. In Eclipse, fire up the  &#8220;Preferences&#8221; window, and locate the Android-&gt;Build settings, you should see the location of your keystore file in the &#8220;Default debug keystore&#8221; field.</p>
<p>Type the following command in your command line. By the way, I am using Mac, I think *Nix user should have no problem running the following command, but for Windows Users, I think you need to find a way to do it.</p>
<p><em>keytool -list -keystore ~/.android/debug.keystore</em></p>
<p>and when it prompts you for the password, just hit the Enter key, no need to enter any password.<br /> And you will get something like this in the output</p>
<p>Certificate fingerprint (MD5): 8E:6F:5D:3F:A9:94:96:69:42:D2: <em>and more</em></p>
<p>copy the value of it, and go to this URL<br /> http://code.google.com/intl/sv-SE/android/maps-api-signup.html</p>
<p>Paste your value into the textbox and submit, and you should be able to get your API key. By using this Android Map API key, I was able to get the map working in my Android apps. <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/06/30/obtaining-google-android-map-api-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 4-ever video</title>
		<link>http://just-thor.com/2010/06/29/java-4-ever-video/</link>
		<comments>http://just-thor.com/2010/06/29/java-4-ever-video/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 04:41:57 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=148</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/fzza-ZbEY70&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/fzza-ZbEY70&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/06/29/java-4-ever-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implement Index controller in Spring Roo</title>
		<link>http://just-thor.com/2010/06/28/implement-index-controller-in-spring-roo/</link>
		<comments>http://just-thor.com/2010/06/28/implement-index-controller-in-spring-roo/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 08:01:05 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Roo]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=144</guid>
		<description><![CDATA[Recently been using Spring roo to produce a rapid prototype. I must say that Spring roo is a very good framework, although still lacking of some features but the potentials [...]]]></description>
			<content:encoded><![CDATA[<p>Recently been using Spring roo to produce a rapid prototype. I must say that Spring roo is a very good framework, although still lacking of some features but the potentials are there.</p>
<p>When you start a new Spring roo project, the default page will be &#8220;index.jspx&#8221;, what if we want to implement a controller to it?</p>
<p>First of all, locate the webmvc-config.xml in your project folder. Find and remove the following line<br />
<code>&amp;lt;mvc:view-controller path=&quot;/index&quot;/&amp;gt;</code></p>
<p>Then, create a Java class file in the source folder, in my case, will be the web folder. Let&#8217;s call it IndexController<br />
<pre><pre class="brush: java">
package com.justthor.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping(&quot;/&quot;)
@Controller
public class IndexController {
&nbsp;&nbsp;@RequestMapping(value = &quot;/index&quot;, method = RequestMethod.GET)
&nbsp;&nbsp;public String index(ModelMap modelMap) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implement logic here...*/
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &quot;index&quot;;
&nbsp;&nbsp;}
}</pre></pre><br />
That&#8217;s it. To test it, you can implement a logger in your controller. Its quite useful if we want to load some data on the index page.</p>
<p>Happy coding <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/06/28/implement-index-controller-in-spring-roo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A JSON Util</title>
		<link>http://just-thor.com/2010/03/17/a-json-util/</link>
		<comments>http://just-thor.com/2010/03/17/a-json-util/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 12:00:29 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=140</guid>
		<description><![CDATA[Nowadays JSON(json.org) is a very common data-interchange format other than XML, and its much more lightweights. I was trying to write a JSON util class today and came across many [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays JSON(json.org) is a very common data-interchange format other than XML, and its much more lightweights. I was trying to write a JSON util class today and came across many JSON lbraries. Its hard to determine which library is better, and I am not planning to do it here in this post neither. I wrote a simple wrapper and wish to share it out with you guys. I used json-simple(http://code.google.com/p/json-simple/), a simple yet useful JSON library. Here&#8217;s my code :<br />
<pre><pre class="brush: java">
package com.justthor;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import org.json.simple.parser.JSONParser;

public final class JsonUtil {
&nbsp;&nbsp;private static final LoggingUtil logger = LoggingUtil.getInstance(JsonUtil.class);
&nbsp;&nbsp;
&nbsp;&nbsp;private static final JSONParser jsonParser = new JSONParser();

&nbsp;&nbsp;@SuppressWarnings(&quot;unchecked&quot;)
&nbsp;&nbsp;private static final Map EMPTY_MAP = Collections.EMPTY_MAP;
&nbsp;&nbsp;
&nbsp;&nbsp;@SuppressWarnings(&quot;unchecked&quot;)
&nbsp;&nbsp;private static final List EMPTY_LIST = Collections.EMPTY_LIST;
&nbsp;&nbsp;
&nbsp;&nbsp;private final JSONObject obj;
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Private constructor
&nbsp;&nbsp; */
&nbsp;&nbsp;private JsonUtil() {
&nbsp;&nbsp;&nbsp;&nbsp;obj = new JSONObject();
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Encode object to JSON string. Object can be String, Integer etc.
&nbsp;&nbsp; * @param Object 
&nbsp;&nbsp; * @return String
&nbsp;&nbsp; */
&nbsp;&nbsp;public static String encode(final Object obj) {
&nbsp;&nbsp;&nbsp;&nbsp;return JSONValue.toJSONString(obj);
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Decode string to raw object
&nbsp;&nbsp; * @param String 
&nbsp;&nbsp; * @return Object
&nbsp;&nbsp; */
&nbsp;&nbsp;public static Object decode(final String string) {
&nbsp;&nbsp;&nbsp;&nbsp;Object result;
&nbsp;&nbsp;&nbsp;&nbsp;try{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = jsonParser.parse(string);
&nbsp;&nbsp;&nbsp;&nbsp;} catch (Exception e) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = new Object();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logger.error(e.getMessage(), e);
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;return result;
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Decode string to List
&nbsp;&nbsp; * @param String 
&nbsp;&nbsp; * @return List
&nbsp;&nbsp; */
&nbsp;&nbsp;@SuppressWarnings(&quot;unchecked&quot;)
&nbsp;&nbsp;public static List decodeAsList(final String string) {
&nbsp;&nbsp;&nbsp;&nbsp;List result = EMPTY_LIST;
&nbsp;&nbsp;&nbsp;&nbsp;try{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = (List)jsonParser.parse(string);
&nbsp;&nbsp;&nbsp;&nbsp;} catch (Exception e) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logger.error(e.getMessage(), e);
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;return result;
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Decode string to Map
&nbsp;&nbsp; * @param String 
&nbsp;&nbsp; * @return Map
&nbsp;&nbsp; */
&nbsp;&nbsp;@SuppressWarnings(&quot;unchecked&quot;)
&nbsp;&nbsp;public static Map decodeAsMap(final String string) {
&nbsp;&nbsp;&nbsp;&nbsp;Map result = EMPTY_MAP;
&nbsp;&nbsp;&nbsp;&nbsp;try{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = (Map)jsonParser.parse(string);
&nbsp;&nbsp;&nbsp;&nbsp;} catch (Exception e) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logger.error(e.getMessage(), e);
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;return result;
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Get an instance of JsonUtil.
&nbsp;&nbsp; * @return JsonUtil
&nbsp;&nbsp; */
&nbsp;&nbsp;public static JsonUtil getInstance() {
&nbsp;&nbsp;&nbsp;&nbsp;return new JsonUtil();
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Put a name and value. 
&nbsp;&nbsp; * Example : 
&nbsp;&nbsp; * JsonUtil.getInstance().put(&quot;name&quot;, &quot;thor&quot;).put(&quot;vehicle&quot;, &quot;none&quot;).put(&quot;height&quot;, 165).toJsonString();
&nbsp;&nbsp; * @param Object
&nbsp;&nbsp; * @param Object
&nbsp;&nbsp; * @return JsonUtil
&nbsp;&nbsp; */
&nbsp;&nbsp;@SuppressWarnings(&quot;unchecked&quot;)
&nbsp;&nbsp;public JsonUtil put(final Object name, final Object value) {
&nbsp;&nbsp;&nbsp;&nbsp;obj.put(name, value);
&nbsp;&nbsp;&nbsp;&nbsp;return this;
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;/**
&nbsp;&nbsp; * Convert stored name and value into Json string.
&nbsp;&nbsp; * @return String
&nbsp;&nbsp; */
&nbsp;&nbsp;public String toJsonString(){
&nbsp;&nbsp;&nbsp;&nbsp;return obj.toString();
&nbsp;&nbsp;}
}
</pre></pre></p>
<p>You can use it as a static class, such as<br />
<pre><pre class="brush: java">
List&lt;String&gt; list = new ArrayList&lt;String&gt;();
... your code to populate the list here...

// Encode!
String jsonEncodedString = JsonUtil.encode(list);
</pre></pre></p>
<p>To decode, simply type the following<br />
<pre><pre class="brush: java">
List decodedList = (List)JsonUtil.decode(jsonEncodedString);
// Or even easier, I wrote another method to decode JSON String as List
List decodedList = JsonUtil.decodeList(jsonEncodedString);
</pre></pre></p>
<p>If you don&#8217;t feel like using Map, you can do this<br />
<pre><pre  class="brush: java">
String jsonEncodedString = JsonUtil.getInstance()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.put(&quot;name&quot;, &quot;Thor&quot;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.put(&quot;url&quot;, &quot;www.just-thor.com&quot;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.toJsonString();
</pre></pre></p>
<p>A wrapper is important to encapsulate how things actually works. When you using the wrapper I wrote, you don&#8217;t have to import or even know that I am using json-simple or whatsoever. I hope this example helps you to understand the importance of writing a wrapper class.</p>
<p>Happy programming <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/03/17/a-json-util/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My blog just went down&#8230;</title>
		<link>http://just-thor.com/2010/03/05/my-blog-just-went-down/</link>
		<comments>http://just-thor.com/2010/03/05/my-blog-just-went-down/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:47:17 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=136</guid>
		<description><![CDATA[I just found out my website was down, and reported to the webhosting company. After I sent out the email, I received 3 emails, 2 claimed that they can browse [...]]]></description>
			<content:encoded><![CDATA[<p>I just found out my website was down, and reported to the webhosting company. After I sent out the email, I received 3 emails, 2 claimed that they can browse the website.<br />
Here&#8217;s the reply from the sales team<br />
&#8220;We can browse both websites without problems. See enclosed printscreen.&#8221;</p>
<p>And here&#8217;s the reply from the domain team (technical team,I suppose)<br />
&#8220;Both websites http://just-thor.com/ and http://bobokow.com/ are working fine at our side. Please check again.&#8221;</p>
<p>But I still can&#8217;t open the website on my site. I even asked a friend of mine which was at another location to test and still failed. Hence I replied an email.</p>
<p>&#8220;Sir/Madam,<br />
Attached with the error page. I am glad its working on your side, but I am not browsing at your side,so please fix it.&#8221;</p>
<p>ps. site was up one hour later I replied the email. Thank you for the hardwork. <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/03/05/my-blog-just-went-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Ajax Libraries Gotcha!</title>
		<link>http://just-thor.com/2010/02/23/google-ajax-libraries-gotch/</link>
		<comments>http://just-thor.com/2010/02/23/google-ajax-libraries-gotch/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 09:37:58 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=129</guid>
		<description><![CDATA[I was working on Google Map for the past few days, and was using jQuery to retrieve markers information from another URL using ajax. I came across the Google Ajax [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on Google Map for the past few days, and was using jQuery to retrieve markers information from another URL using ajax. I came across the Google Ajax Libraries (http://code.google.com/apis/ajaxlibs/) which helps to load Javascript from CDN.</p>
<p>Here&#8217;s part of the code<br />
<pre><pre class="brush: javascript">
//sample code taken from http://code.google.com/apis/ajaxlibs/
&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
&lt;script&gt;
&nbsp;&nbsp;// Load jQuery
&nbsp;&nbsp;google.load(&quot;jquery&quot;, &quot;1&quot;);

&nbsp;&nbsp;// on page load complete, fire off a jQuery json-p query
&nbsp;&nbsp;// against Google web search
&nbsp;&nbsp;google.setOnLoadCallback(function() {
&nbsp;&nbsp;&nbsp;&nbsp;$.getJSON(&quot;http://ajax.googleapis.com/ajax/services/search/web?q=google&amp;v=1.0&amp;callback=?&quot;,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// on search completion, process the results
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function (data) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data.responseData.results &amp;&amp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data.responseData.results.length &gt; 0) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var results = data.responseData.results;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0; i &lt; results.length; i++) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Display each result however you wish
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(results[i].titleNoFormatting);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
&nbsp;&nbsp;&nbsp;&nbsp;});
&lt;/script&gt;
</pre></pre><br />
By using this code, we actually load jQuery 1 from the CDN. However, there is a gotcha. If you follow the example I attached just now, it probably won&#8217;t work, well, at least not on my FF3.5 and IE8. In fact, you will have to do something like the following instead<br />
<pre><pre class="brush: javascript">
//sample code taken from http://code.google.com/apis/ajaxlibs/
&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
&lt;script&gt;
&nbsp;&nbsp;// Load jQuery
&nbsp;&nbsp;google.load(&quot;jquery&quot;, &quot;1&quot;);
&lt;/script&gt;
&lt;script&gt;
&nbsp;&nbsp;// on page load complete, fire off a jQuery json-p query
&nbsp;&nbsp;// against Google web search
&nbsp;&nbsp;google.setOnLoadCallback(function() {
&nbsp;&nbsp;&nbsp;&nbsp;$.getJSON(&quot;http://ajax.googleapis.com/ajax/services/search/web?q=google&amp;v=1.0&amp;callback=?&quot;,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// on search completion, process the results
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function (data) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data.responseData.results &amp;&amp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data.responseData.results.length &gt; 0) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var results = data.responseData.results;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0; i &lt; results.length; i++) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Display each result however you wish
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(results[i].titleNoFormatting);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
&nbsp;&nbsp;&nbsp;&nbsp;});
&lt;/script&gt;
</pre></pre><br />
You will have to close the script tag that load external script from CDN before you can use it. Else you will get javascript error, in IE8, it shows &#8216;Object expected&#8217;.I really hope you will be able to read my article before you pull all your hair off. <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Happy Coding</p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/02/23/google-ajax-libraries-gotch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Released of Scala 2.8 Beta</title>
		<link>http://just-thor.com/2010/01/28/released-of-scala-2-8-beta/</link>
		<comments>http://just-thor.com/2010/01/28/released-of-scala-2-8-beta/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 01:59:09 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=125</guid>
		<description><![CDATA[Finally,Scala 2.8 beta is out&#8230; Here&#8217;s the release note. The new Scala 2.8 codebase includes the following new fixes and features: Redesigned collection library The collection library has undergone a [...]]]></description>
			<content:encoded><![CDATA[<p>Finally,Scala 2.8 beta is out&#8230;</p>
<p id="Whatisnew">Here&#8217;s the release note.</p>
<p>The new Scala 2.8 codebase includes the following new fixes and features:</p>
<ul>
<li><strong>Redesigned collection library</strong><br />
The collection library has undergone a complete overhaul for Scala 2.8, offering a more coherent and efficient design, while maintaining virtually complete compatibility with existing sources. Detailed information at: <a href="http://www.scala-lang.org/sid/3">http://www.scala-lang.org/sid/3</a></li>
<li><strong>New array implementation, manifests for polymorphic arrays</strong><strong><br />
</strong>Handling of arrays has been simplified and optimized in Scala 2.8. The previous compiler magic has been replaced by a more systematic and predictable implementation in terms of implicit conversions. Full details at: <a href="http://www.scala-lang.org/sid/7">http://www.scala-lang.org/sid/7</a></li>
<li><strong>Type specialization</strong><br />
Scala 2.8 adds specialized type parameters, which enable the compiler to generate transparently multiple versions of a given definition, and to use the most specific version whenever the static type information at a call site allows it. Details at: <a href="http://www.scala-lang.org/sid/9">http://www.scala-lang.org/sid/9</a></li>
</ul>
<ul>
<li><strong>Named and default arguments</strong><br />
Named arguments improve the readability of method calls with many arguments. Default arguments reduce code duplication, and enable &#8220;copy&#8221; methods for case classes, useful to generate quickly modified copies of case classes. A complete description at: <a href="http://www.scala-lang.org/sid/1">http://www.scala-lang.org/sid/1</a></li>
</ul>
<ul>
<li><strong>Package objects</strong><br />
Packages can now contain besides classes and objects also methods, fields or type aliases. These are added to a package by declaring a package object. Package objects are still work in progress; more capabilities might come for 2.8 final or a release soon afterwards.</li>
</ul>
<ul>
<li><strong>Beefed up Scala Swing libraries, better documentation</strong><br />
Components publish key events, input events can be consumed, refactored window subhierarchy, additional demos, Swing listeners are installed lazily, more complete component caching, minor refactorings, bugfixes, more Scaladocs. Design document at: <a href="http://www.scala-lang.org/sid/8">http://www.scala-lang.org/sid/8</a></li>
</ul>
<ul>
<li><strong>Revamped REPL</strong><br />
Many bugfixes. Tab-completion for all packages on the classpath, as well as object and instance methods and fields, including type aliases and package objects. Searchable history, integrated shell access, and a power mode which offers direct access to compiler internals.</li>
</ul>
<ul>
<li><strong>Implicits changes</strong><br />
We have refined the implicit resolution process so that resolution is now able to determine type variables.</li>
</ul>
<ul>
<li><strong>Improved equality</strong><br />
Equality across numeric types is to be consistent across all the primitives types, while also adhering to the equals/hashCode contract. Numeric comparisons will have the same results as they would between Java primitives. This is currently still being completed.</li>
</ul>
<ul>
<li><strong>Packrat parser combinators</strong><br />
With support for packrat parsing, parser combinators are now able to handle left-recursive grammars and will show improved performance for ambiguous productions.</li>
</ul>
<ul>
<li><strong>Improved XML library</strong><br />
Many bugfixes.</li>
</ul>
<ul>
<li><strong>Type constructor inference</strong><br />
Type inference has been extended to deal with type constructors, so that, in certain cases, you can omit type parameter lists that contain higher-kinded types (aka type constructors, e.g., <span style="font-family: monospace;">List</span>).</li>
</ul>
<ul>
<li><strong>Improved Annotations</strong><br />
Scala 2.8 adds support for nested java annotations. For annotations on fields, it is now possible to specify which synthetic members (getter / setter) will have the annotation. Documentation about Scala annotations can be found at: <a href="http://www.scala-lang.org/sid/5">http://www.scala-lang.org/sid/5</a></li>
</ul>
<ul>
<li><strong>Enhanced actors</strong><br />
New Reactors provide more lightweight, purely event-based actors with optional, implicit sender identification. Support for actors with daemon-style semantics was added. Actors can be configured to use the efficient JSR166y fork/join pool, resulting in significant performance improvements on 1.6 JVMs. Schedulers are now pluggable and easier to customize.</li>
</ul>
<ul>
<li><strong>Support for continuations</strong><br />
Continuations are supported by a compiler plugin. This plugin is not included in this first beta, but will be added in subsequent releases.</li>
</ul>
<p>Here&#8217;s the <a title="Scala 2.8 Beta released" href="http://www.scala-lang.org/node/4587" target="_blank">office page link</a> and here&#8217;s the <a title="Scala download link" href="http://www.scala-lang.org/downloads" target="_blank">download link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2010/01/28/released-of-scala-2-8-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google is making me stupid</title>
		<link>http://just-thor.com/2009/12/23/google-is-making-me-stupid/</link>
		<comments>http://just-thor.com/2009/12/23/google-is-making-me-stupid/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 05:49:27 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=122</guid>
		<description><![CDATA[For the past few years, I am so used to google services, especially search engine and email. I can&#8217;t even remember when was the last time i use a Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few years, I am so used to google services, especially search engine and email. I can&#8217;t even remember when was the last time i use a Microsoft Outlook as my email client. Web based is great, I mean, the first thing I turned on my pc will be firing up a Mozilla Firefox or Google Chrome, why do I still need to launch another application just to receive emails or notifications? Maybe I am not good at using Outlook.</p>
<p>And now,my current company requested every one in the company to use Outlook as the mail client. The experience isn&#8217;t that great though. I took 5 minutes to send an email because I don&#8217;t know how to use the address book function. I used to get that by typing name or email,and gmail just suggest me possible match. Too many buttons, what&#8217;s the difference between &#8220;Attach Item&#8221; and &#8220;Attach File&#8221;? And when I try to search for person in my address book,I just can&#8217;t. For instance, I am trying to search for a name &#8220;John Doe&#8221;,I have to type &#8220;John&#8221; first in Outlook to locate the entry,but instead I type &#8220;Doe&#8221; in Gmail it will start suggesting me.And there are so many fields in address book.Oh man,its driving me crazy.</p>
<p>I think the simplicity and usability of Gmail had make me stupid.Thanks, Google.</p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2009/12/23/google-is-making-me-stupid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A circular linked list in Java</title>
		<link>http://just-thor.com/2009/12/03/a-circular-linked-list-in-java/</link>
		<comments>http://just-thor.com/2009/12/03/a-circular-linked-list-in-java/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:26:21 +0000</pubDate>
		<dc:creator>Thor</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://just-thor.com/?p=117</guid>
		<description><![CDATA[I was helping a friend of mine with her work today, and we came across with a requirement that there are few players in the room we need to know [...]]]></description>
			<content:encoded><![CDATA[<p>I was helping a friend of mine with her work today, and we came across with a requirement that there are few players in the room we need to know whose turn is it after this. Yes, we can definitely use a LinkedList or an ArrayList, but its not so convenient as we have to check whether this player is at the last position of the list. If so,we will need to start from the beginning of the list again. And its also quite cumbersome to retrieve the next player info after this. Therefore, I wrote a simple yet functional Circular Linked List. You can download the source code and the compiled class <a href="http://just-thor.com/sample-works/CircularLinkedList.jar">here</a> . I will port this over to Scala whenever I have the time to do so.</p>
<p>Happy coding <img src='http://just-thor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://just-thor.com/2009/12/03/a-circular-linked-list-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
