Skip to main content

Posts

Showing posts from 2010

Happy 2011 WSO2 wallpaper

WSO2Con 2010 -- Colombo ,Sri Lanka September 14 & 15

type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="315"> Designed to help prepare you for the future enterprise, WSO2Con features some of the most renowned technical thought leaders and focuses on the unique convergence of SOA and Cloud. For more information or to register visit http://wso2.com/event Keynotes Imagining the Future and Making it Happen Prof. Rohan Samarajiva Chairman & CEO, LIRNEasia Enterprise Computing in 2020 Paul Fremantle Co-Founder & CTO, WSO2 Inc. A Walk Down Memory Lane: XML, Web Services & SOA from 1990 to 2010 James Clark Father of XML & Founder, Thai Open Source Software Center Sanjiva Weerawarana, Ph. D Founder, Chairman & CEO, WSO2 Inc. Jonathan Marsh VP, Business Development & Marketing, WSO2 Inc.

Worst fruit in the world

This is kiwi fruit. If you want to catch a diarrhea, eat a small piece.

Google analytics style Hour/Day/Month range picker

Download Date Picker I was searching for a Google analytics date picker style control to put on WSO2 BAM . All the date pickers out there are just selecting a date range. They don't support the ability to select an hour range or a month range. So I rote a one. I use YUI to handle Dom. Plus the date rage picker is YUI date picker. This control is used in " The WSO2 Business Activity Monitor (WSO2 BAM) ".

How to randomly displaying images on page refresh

This script display images in "imageRot" div randomly on every page load. Replace "quote-xx.gif" with your image name. <div id="imageRot"></div> <script type="text/javascript"> var images = new Array(); images.push("quote-01.gif"); images.push("quote-02.gif"); images.push("quote-03.gif"); images.push("quote-04.gif"); images.push("quote-05.gif"); images.push("quote-06.gif"); images.push("quote-07.gif"); var random = Math.floor(Math.random() * 7); var imageRot = document.getElementById("imageRot"); imageRot.innerHTML = '<img src="images/' + images[random] + '" alt="">'; </script>

Simple tree control

download HTML tree controls are often bit complicated than it should be. But the above tree control is very simple. It also has some animated effect. If you have simple tree to display in your user interface this tree will be a good starting point. Basically the tree is a structured list nested in to layers. <div class="treeControl"> <ul> <li><a class="nodata" onclick="treeColapse(this)"> </a> <a class="treeNode" onclick="treeColapse(this)">lev1-one</a></li> <li><a class="minus" onclick="treeColapse(this)"> </a> <a class="treeNode" onclick="treeColapse(this)">lev1-two</a> <ul> <li><a class="nodata" onclick="treeColapse(this)"> </a> <a class="treeNode" onclick="treeColapse(this)">lev2-one</a...

Getting Flexy - Flex quick start project with Ant build script

download Flex has open up endless possibilities to web designers and developers around the world. Since Flex has been around for a while now ,there are tremendous amount of resources available on the subject. Most of these guides and tutorials are base on Flex builder. The above code is a starting point to your Flex project. It contains an Ant build file which will compile the source files to a swf file and create html wrappers for you. You have to edit the build.xml file inside the extracted "flexy" directory. This is how the project is structured. The following image will give you a guild lines to edit the build files. If you setup Ant, Flex Sdk and change the build.xml file you will be able to generate something like this.

Drawing a cartoon character

I am using Inkscape to draw cartoon characters. You can easily draw cartoons even if you are not a born artist. It is not necessary to draw from start to end. You can using Bezier curve tool to draw layer by layer. One in top of the other one. Finally color them. Following is scren shots I got from a drawing sequence step by step until the final art.

New Lost Season Rocks !!!!!

New Lost season started on ABC network last Tuesday. In last two seasons they introduced time travel. Now it seems they are talking about parallel universe theory. They say this is going to be there last season of the long running amazing TV show. "The aftermath from the detonation of the hydrogen bomb is revealed."

Sql queries result table column selecting javascript function

I was looking for a script which do the above. I couldn't find any. So I wrote a one. The following function takes a sql query string such as "SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo FROM Persons INNER JOIN Orders ON Persons.P_Id=Orders.P_Id ORDER BY Persons.LastName SELECT AVG(OrderPrice) AS OrderAverage FROM Orders" and returns a string array containing LastName,FirstName,OrderNo. function brakeColumns(query) { var columnList = new Array(); var patten1 = /^[\w\$][\w]*/i; var patten2 = /^[\w\$][\w]*\.[\w\$][\w]*$/i; var numEnd = query.search(/\sfrom\s/i); var elems = (query.substring(6, numEnd)).split(","); for (var i = 0; i < elems.length; i++) { var elem = elems[i].toString(); elem = trim(elem); var stPoint = ""; var wanted = ""; if (elem.search(/\sas\s/i) != -1) { stPoint = elem.search(/\sas\s/i); wanted = elem.substring(stPoint + 4); w...

Legal identifier matching regex pattern

The following will match any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign "$", or the underscore character /^[a-zA-Z\$_][a-zA-Z0-9]*/ The following is a example in Javascript alert(/^[a-zA-Z\$_][a-zA-Z0-9]*/.test("testVar"));

Simple way to converting html tags to display in web pages

I think every one has tried at least ones to put some html code in your blog post. I tried several ways but finally I ended up replacing special characters like " " with &lt; and &gt; Following is a solution that you can easily integrate in to your web page. Include this javascript method in your header section. function putInsidePre(txt,toPre){ var preText = document.createTextNode(txt); document.getElementById(toPre).appendChild(preText); } and put the following style class in your css or just include them in a new >style< tag. .codeStyle { background-color:#EAEFF1; border:1px solid #88BFCE; color:#325669; display:block; font-size:11px; height:200px; line-height:1.5em; overflow:auto; } Then you can create a tag and give it a id and call "putInsidePre" method to populate it. Here is a full working example. <html> <head> <style> .codeStyle { background-color:#EAEFF1; border:1px solid #88BFCE; color:#325669; display:block; font-size:1...

Best of TV in 2009

FlashForward (Sci-Fi | Mystery | Thriller) For me this is the best TV serious came out in 2009. A mysterious event causes nearly everyone on the planet to simultaneously lose consciousness for 137 seconds, during which people see what appear to be visions of their lives approximately six months in the future—a global “flashforward”. A team of Los Angeles FBI agents, led by Stanford Wedeck (Vance) and spearheaded by Mark Benford (Fiennes), begin the process of determining what happened, why, and whether it will happen again. Dollhouse (Sci-Fi | Mystery | Thriller) The show revolves around a corporation running numerous underground establishments (known as "Dollhouses") across the globe which program individuals referred to as Actives (or Dolls) with temporary personalities and skills. Wealthy clients hire Actives from Dollhouses at great expense for various purposes. The series primarily follows the Active known as Echo, played by Eliza Dushku, on her journey towards self-awar...

Vote

"Do you believe if the person you are voting for will not hesitate to kill you if you are the only thing that is keeping him/her from winning an election?"

WSO2 Data Services v2.2.0 released

WSO2 Data Services Server team has recently announce the release of version 2.2.0 of the WSO2 Data Services Server . The WSO2 Data Services Server is an extremely simple and elegant mechanism to take data and make it available as a set of WS-* style Web services or as a set of REST style Web resources. It augments SOA development efforts by providing an easy to use platform for creating and hosting data services. This enables easy integration of data into business processes, mashups, gadgets, BI applications and any service in general. Why should you use the new version? Support for large XML outputs - http://wso2.org/library/knowledge-base/large-scale-data-transfer-data-services-streaming Google Spreadsheets as a data source - http://wso2.org/project/solutions/data-services/java/2.2.0/docs/google_spread_sheet.html Content filtering based on user roles - http://wso2.org/library/articles/content-filtering-data-services-user-roles Support for named parameters Abili...