Archive for the ‘Uncategorized’ Category

GWT: JsonpRequestBuilder No source code is available, did you forget to inherit a required module

Thursday, March 4th, 2010

To use the JsonpRequestBuilder, you need to inherit the following in your x.gwt.xml

<inherits name="com.google.gwt.jsonp.Jsonp" />

Javascript: Triggering a click event on a element

Saturday, February 27th, 2010

Sometime, the jQuery(”#xx”).click() does not work. So, here is a way to do it directly:

var e = document.createEvent('MouseEvents');
e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
var r = $("#myElement").get(0).dispatchEvent(e);

Obviously, you can use the document.getElementById(”myElement”) if you do not want any jQuery dependency.

Android: Take an android screenshot from a PC

Friday, February 12th, 2010
  1. Install Android SDK and Android Driver
  2. Set android USB mode to debug (Settings > Applications > Development > USB Debugging)
  3. Connect Android to PC with USB cable
  4. launch \android-sdk-windows\tools\ddms.bat
  5. Click on Device > Screen Capture (or Ctrl S)
Tutorial video (not sure why the driver need to be installed manually. I installed it normally and it worked)

Skype: Advanced Links & Callto apis

Saturday, August 15th, 2009
<a href="skype:echo123?call">Click</a>(make a call to echo123)

<a href="skype:echo123">Click</a>(default action - call)

<a href="skype:echo123?add">Click</a>(add echo123 to your contacts)

<a href="skype:+14035551111?call">SkypeOut call</a>

<a href="skype:user1?chat">Start a text chat with user1</a>

<a href="skype:user1;user2;user3?chat">(Start a multichat with 3 people)</a>

<a href="skype:user1;+14035551111?call">User and Phone conference</a>

<a href="skype:user1?userinfo">User Info</a>

<a href="skype:user1?sendfile">(Send a file to user1)</a>

Official Advanced Skype links docs

Freemarker: XML Xpath Expression

Tuesday, June 30th, 2009
[#list doc["book/chapter[title='Ch1']/para"] as p]
<p>${p}</p>
[/#list]

See XPath Freemarker doc for more info.

CMS: Drupal vs Joomla

Wednesday, October 1st, 2008

I will probably go with Drupal (seems more robust and complete).