We don’t want Java controlled by Oracle

Oracle sue Google because suspected Google using Java in its Google Android Operating System Framework. Oracle said that Java is an operating system framework language, and Google Android publishes its framework had infringed its seven patents. Is Java an operating system framework?

As Java Developer, I want to say something. Java is an open source product, should be maintained by open source community, and free to use by any company, any people, but not fully controlled by one central company, such as Oracle.

This Oracle’s decision to take over Java from Sun, to have fully control of the Java, will be a wrong step for Oracle, or the future of Java. If not Google, IBM, these companies using Java, Java may be die soon.

Oracle, please listen what Java developers thought, freeing Java, please, otherwise Java will die soon. Please don’t play fire yourself, which will burn your hand.

The Internet of Things (物联网)

In computing, the term Internet of Things (also known as the Internet of Objects) refers to the networked interconnection of everyday objects. It is generally viewed as a self-configuring wireless network of sensors whose purpose would be to interconnect all things. The concept is attributed to the original Auto-ID Center, founded in 1999 and based at the time in MIT.
The idea is as simple as its application is difficult. If all cans, books, shoes or parts of cars are equipped with minuscule identifying devices, daily life on our planet will undergo a transformation. Things like running out of stock or wasted products will no longer exist as we will know exactly what is being consumed on the other side of the globe. Theft will be a thing of the past as we will know where a product is at all times. The same applies to parcels lost in the post.

物联网(The Internet of things)的定义是:通过射频识别(RFID)、红外感应器、全球定位系统、激光扫描器等信息传感设备,按约定的协议,把任何物品与互联网连接起来,进行信息交换和通讯,以实现智能化识别、定位、跟踪、监控和管理的一种网络。物联网的概念是在1999年提出的。

Proposed HTML5 Simple Payment Protocol

HTML5 is a new generation web browser markup language and the ways the developer to create web application with full of desktop experience. HTML5 had introduced a lot of new tags, such as improvement of semantic tags (<header>, <footer>, <aside>, <section>, <article>) that made the different parts of the website can be represented by these tags rather than using <div>. Additionally, supports of <video> and <audio> make possible for browser to view video and listen music without installing Flash Plugin but using browser-implemented engine to run it. Besides that it had improvement for CSS3 as well, that allowed animation, shadow and many exciting features etc. Moreover, improvement to JavaScript API such as support geolocation API, Canvas (Rich Animation and 2D Drawing, will support 3D Drawing in the future), local Web Storage, and many yet features that not be shown here.

We known that the full HTML5 specification will be completed in 2030. In 2012, WhatWG will submit the suggestion documentation to W3C. Most of the browsers today except IE had already implemented HTML5, although not full features had implemented, but at least implemented a bit. Thanks Apple, Google, Opera and Mozilla implemented HTML5 in their browsers, either from PC or smart phone such as iPhone and Android. Market share is big, due to the fact that mobile market is emerging, associated with the rapid development of HTML5 and cloud computing, it made our future life more easier and convenient.

After thinking from my current country, Malaysia, electronic payment still not very popular like western country. Due to the fact that the security of payment still not getting trust from the users. As well as the supports from government, every aspects such as low internet speed, NEP, and it almost slow down the free development of the technology.

Moreover, due to the fact that nowadays there are many types of payment option in the world, in international we have Visa, MasterCard, Paypal and so on.  In Facebook, we have Facebook Credits also.

Hereby I proposed that new implementation for simple payment protocol for HTML5.

What is Simple Payment Protocol?

Simple Payment Protocol can be implemented in HTML5, by providing <payment> HTML5 tag, that will be rendered as payment panel with showing product name and price and the button where click to submit the payment. Proposed that it is a standard payment panel supported by different types of browser. Different types of browser either from PC Google Chrome, or smart phone such as Apple iPhone, both will render the same payment panel for user to make payment. Any seller or bank can collaborate with browser company, to build certain standard security layer that support encryption up to 128-bit and more. The browser itself can support the e-wallet function, allows user to carry their e-wallet at the same time carry their mobile devices anytime and anywhere.

Advantage is that the payment method will become the standard, using the standard the life of the user will be easier. Using the standard, payment process will be easier and fast and secure. When your web application need to implement payment method, you not need to learn specific API such as Paypal or another types of payment option, even you want to change from one payment method to another you will face problems. By using proposed implementation of HTML5 Simple Payment Protocol the web developers can just learn one API and easier to implement the payment function in their web application.

 

Noted that this proposal is the work of Khor Yong Hao, and this is only a draft and will be improved in the future. The further modification of this page will be carried out anytime in the future without notification.

Simple Java BBCode Implementation

I have made a simple Java BBCode Implementation, and it is open source and free to use. Feel free to take it into your project.

Below is the Java static method to convert the bbcode-based text into HTML form to be displayed in browser.

public static String bbcode(String text) {

String temp = nl2br(text);

Map<string , String> bbMap = new HashMap</string><string , String>();</string>

bbMap.put(“\\[b\\](.+?)\\[/b\\]”, “<strong>$1</strong>”);

bbMap.put(“\\[i\\](.+?)\\[/i\\]”, “<span style=’font-style:italic;’>$1</span>”);

bbMap.put(“\\[u\\](.+?)\\[/u\\]”, “<span style=’text-decoration:underline;’>$1</span>”);

bbMap.put(“\\[h1\\](.+?)\\[/h1\\]”, “<h1>$1</h1>”);

bbMap.put(“\\[h2\\](.+?)\\[/h2\\]”, “<h2>$1</h2>”);

bbMap.put(“\\[h3\\](.+?)\\[/h3\\]”, “<h3>$1</h3>”);

bbMap.put(“\\[h4\\](.+?)\\[/h4\\]”, “<h4>$1</h4>”);

bbMap.put(“\\[h5\\](.+?)\\[/h5\\]”, “<h5>$1</h5>”);

bbMap.put(“\\[h6\\](.+?)\\[/h6\\]”, “<h6>$1</h6>”);

bbMap.put(“\\[quote\\](.+?)\\[/quote\\]”, “<blockquote>$1</blockquote>”);

bbMap.put(“\\[p\\](.+?)\\[/p\\]”, “<p>$1</p>”);

bbMap.put(“\\[p=(.+?),(.+?)\\](.+?)\\[/p\\]”, “<p style=’text-indent:$1px;line-height:$2%;’>$3</p>”);

bbMap.put(“\\[center\\](.+?)\\[/center\\]”, “<div align=’center’>$1”);

bbMap.put(“\\[align=(.+?)\\](.+?)\\[/align\\]”, “<div align=’$1′>$2”);

bbMap.put(“\\[color=(.+?)\\](.+?)\\[/color\\]”, “<span style=’color:$1;’>$2</span>”);

bbMap.put(“\\[size=(.+?)\\](.+?)\\[/size\\]”, “<span style=’font-size:$1;’>$2</span>”);

bbMap.put(“\\[img\\](.+?)\\[/img\\]”, “<img src=’$1′ />”);

bbMap.put(“\\[img=(.+?),(.+?)\\](.+?)\\[/img\\]”, “<img width=’$1′ height=’$2′ src=’$3′ />”);

bbMap.put(“\\[email\\](.+?)\\[/email\\]”, “<a href=’mailto:$1′>$1</a>”);

bbMap.put(“\\[email=(.+?)\\](.+?)\\[/email\\]”, “<a href=’mailto:$1′>$2</a>”);

bbMap.put(“\\[url\\](.+?)\\[/url\\]”, “<a href=’$1′>$1</a>”);

bbMap.put(“\\[url=(.+?)\\](.+?)\\[/url\\]”, “<a href=’$1′>$2</a>”);

bbMap.put(“\\[video\\](.+?)\\[/video\\]”, “<video src=’$1′ />”);

for (Map.Entry entry: bbMap.entrySet()) {

temp = temp.replaceAll(entry.getKey().toString(), entry.getValue().toString());

}

return temp;

}


6 June 2011
Refer to stackoverflow, there is one topic that is related to Java BBCode I discovered just now.

SmokeScreen Convert Flash into HTML5+JavaScript

SmokeScreen, a project utilize JavaScript and HTML5, to convert Flash into pure HTML5 + JavaScript, therefore user can browser the Flash animation without Flash Plugin.

Chris Smoak, a programmer, recently started a project called SmokeScreen, to convert Flash into pure HTML5 + JavaScript, therefore user can browser the Flash animation without Flash Plugin. Here have some fantastic demo.

SmokeScreen totally run inside the browser, it reads SWF binary file, decrypt it using local JavaScript Online!!!, it retrieves the images and sound data from the SWF, convert them into Base64-encoded data. Then, it converts its vector graphic into SVG animation. We can use Google Chrome to open Web Inspector. During the time the demo running, you can see SVG is running in the real time. SmokeScreen also designed his own ActionScript compiler.

Most importantly, this converted animation can be viewed inside iPad and iPhone as well.

Watch FIFA World Cup 2010 Online

2010 FIFA World Cup Football (which is being played in South Africa) starts from June 11th 2010 and will go on for a month. The final match of the tournament will be played on 11th July 2010.

If you are the person who want to watch it using laptop but not television sets, below are the websites that provide online watching services.

TV Bunch

 

Click Here to Watch

I will also update the links if possible, feel free give some comments and introduction for the other links that provide relevant services.

JSF 2 f:ajax why execute onevent three times?

Recently when I doing <f:ajax> inside JSF 2.0, I specify onevent javascript callback function, when f:ajax execute to the server and return to the client, it will call the javascript callback function. But I discovered that it will call the function three times. Afterwards when I checked the Javascript Console Log in Google, I discovered onevent will have three different status when it called the function.

The status are: begin, complete, success.

Therefore, the problem has known. We just have to define an onevent callback function as below.

function onevent(e) {
    if(e.status == ‘success’) {
        // TODO: your business
    }
}