Many times we have requirement of displaying data using charts in our web application. Jsf-comp is a opensource library which I have used in my JSF application. I have used this for simple bar charts and using it is very simple. Below I have explained steps to use it in your application to create a bar chart.
Here I assume you have already had a jsf application running. If you are new to JSF, please read the earlier post JSF tutorial For Beginner . Read more…
Groovy supports closures and they are very useful when we create Groovy applications.
The most important difference between a normal function/method and a Closure is that Closures can be passed onto other functions as arguments and they serve as Callbacks to the calling function.
For example we can pass closures as arguments to methods to execute them. We can create closures ourselves, but we can also convert a method to a closure with the .& operator. And we can use the converted method just like a normal closure. Because Groovy can use Java objects we can also convert a Java method into a closure.
syntax to write Closure-
[[code]]czozMTM6XCJkZWYgY2xvc3VyZTEgPSB7cGFyYW1zIC0mZ3Q7DQovL3N0YXRlbWVudHMgJmFtcDsgbG9naWMNCn0NCjxzdHJvbmc+ZS57WyYqJl19Zy08L3N0cm9uZz4NCi8vdHlwZSAxwqAgLSBjbG9zdXJlIHdpdGhvdXQgYW55IHBhcmFtZXRlcg0KZGVmIGNsb3N1cmUyID0gew0KwntbJiomXX2gwqDCoMKgcHJpbnRsbiBcIlRlc3QgT25seVwiDQp9DQovL3R5cGUgMiDigJMgY2xvc3VyZSB3aXRoIHR3byBwYXJhbQ0KZGVmIGNsb3N7WyYqJl19dXJlMyA9IHsgU3RyaW5nIG5hbWUsIGludCBhZ2UgLSZndDsNCsKgwqDCoCBwcmludGxuIFwiTXkgbmFtZSBpcyA6ICRuYW1lIGFuZCB7WyYqJl19YWdlIGlzOiAkYWdlXCINCn1cIjt7WyYqJl19[[/code]]
A Closure is usually defined within the braces
{… }. Parameters defines the list of parameters that are to be passed for the closure. The symbol
'->' is used to separate the Arguments with the set of statements in the Closure Definition.
call a Closure Definition-
Like ‘this’ keyword which refers to the current object, there is ‘it’ keyword which, when used within a Closure Definition refers to the default first parameter being passed to the method. The following code will prove that,
def closure4 = {
println it
}
Closure4.call("Test Again")
Closure4.call()
<em>Output--</em>
Test Again
null
Java method to groovy closure
One of the users had complained that in skill-guru, if he was taking a test and he could not complete the test for some reason , let us say the internet connection breaks, he had to re start from the begining.
We had not thought of this feature but we could understand the frustration of the user hence we implemented this feature.
How this works : If a user is taking a test on skill-guru and he closes the browser or connection or switches of machine, he can resume the test once he logs back in. But he has to use the same machine and browser because we are saving the state in cookies.
This is a solution to help out the user from unforeseen circumstances.
This feature has been implemented from 26 August 2009.
Ever since the iphone application store has been opened , it has seen tremendous response from the developer community. There had been so many success stories and failure stories..who wants to read a failure story.
But with 55000+ applications in iPhone store , there is a limit to revenues an application can generate. And that too when most applications are free. Read this post by a developer who had launched his application successfully but had to pull out because of lack of revenues. I liked his reflections on failures and perhaps a lesson for all of us to learn
Why My startup failed
After the huge success of our technical tests, skill-guru is now bringing aptitude tests or you. One of your gurus has added the aptitude test which covers logical aptitude test and numerical aptitude test.
Hope you enjoy these tests. More to come very soon.
VikasShukla has added Signal Integrity Basics test on skill-guru. People who are looking to test their knowledge on Signals can take this test and gauge themselves.
VikasShukla is the lead designer at BL Healthcare . His expertise is in design of High Speed digital systems.
He has author of the book entitled Signal Integrity for PCB Designer which can be found at Amazon
You can find more about design on his site reference desginer. We are pleased to have Vikas share his expertise with the community and thank him for taking time to create the test.
Sun microsystems have posted a webinar of new features of Java 6 Enterprise Edition. Java enterprise is facing a tough challenge from SpringSource and with recent acquisition of Spring by VM Ware, it is going be an uphill task.
Below the is the link of the webinar and presentation
Java Enterprise Edition 6 overview