Today I had a great trick for you that use sony ericsson phones. I call it sony ericsson bluetooth internet where you can share your broadband PC internet directly to your phone using bluetooth connection. I've tested it and very fast when your device surfing web with broadband speed (not with 115kbps GRPS anymore.. :D) Want to know how?

First, of course you need sony ericsson phones and a working internet connection in your PC. Any phone type are welcome I think, I use my old K750i.
Then you must download this SDK in order to connect your phone to PC via bluetooth COM ports (serial port). This called SE SDK (Sony Ericsson Standard Development Kit). The file is pretty big, 117MB. Download SE SDK now or you can goto SE developer homepage to check the new version of SE SDK.

Install it to your PC, follow the procedure till finish then restart your PC.
OK, while you restart your PC please make sure that you block your phone's internet access by change the internet profile to blank profile (or delete the working internet profile if you want.. :D) So now, your phone is can't establish connection to the net. Change it also in java setting.
Turn on your phone's bluetooth.

Now open link called connection proxy in start menu - all programs - Sony ericsson - Java ME SDK for CLDC. Click connect button. Don't forget to turn on your PC's bluetooth.
If the setting correct, then your phone will connected to PC like this. If there's connection error, please check you COM ports.



So far you phone will do send and receive packet with your PC through bluetooth. Minimize connection proxy then open device explorer link in the same location with above link.. :D
Device explorer will refresh and recognize your phone model, listing installed apps in your phone.



You're ready to go. Find opera mini (I assume that you already install opera mini) then right click start MIDlet. Opera mini will automatically run in your phones. You can browse the net from it and of course, using your PC's internet connection. Cool trick right? :D
So now I can browse anything in my phone using my PC's internet connection.

Encode javascript using eval P A C K E R

Posted by Andi Syahputra | 2:16 PM
Recently I found a cool tools that will encode your javascript using eval packer function. It make your script become hard to read. To access this eval packer you can go to dean edwards webpage. Paste your script there then choose base 62 encode and click pack button.

For example this is example original javascript:
function test(){
var a = 34;
alert("test");
document.write(a);
}

Packed script will become like this:
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 0(){3 1=4;5("0");6.7(1)}',8,8,'test|a|function|var|34|alert|document|write'.split('|'),0,{}))

Nothing different in script execution, just become hard to read... :D
Just for suggestion, don't pack a large script because the script size will become larger. Just pack important small script.. :D
Then, how do I decode it if I found similar script? Ok, wait for the next post.. :D
Hope this useful

Create non blocking javascript

Posted by Andi Syahputra | 12:00 PM
I have a trick for you to manage your webpage's javascript for faster page loading. Usually, browser loading javascript sequentially that cause it must wait for javascript to load complete, one by one.
This technique will load javascript while the webpage load, is called asynchronous javascript a.k.a non-blocking javascript. Now, I'll show you how to load your javascript as asynchronous one... :D

Non blocking script technique will use javascript to load javascript. Seems confusing?
This is how we embed javascript as usual:
<script src='javascript.js'></script>

Now here is the non-blocking version. You can put it into <head> or <body> tag:
<script type='text/javascript'>
(function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='javascript.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
</script>

So, whether the javascript is not loading (timeout) then the webpage and other element will still loading without have to wait that script to load complete.

To compare both techniques, you can use simple javascript alert("test");
Normal version: When alert function fired, the webpage won't load complete until we click OK to close alert box
Non-blocking version: The webpage will continue loading although the alert function fired and alert box still appear.