Marketplace for Content, Tests and Assessment
 
 

Archive

Archive for August, 2009

Implementing Charts in JSF using Jsf-Comp library

August 31st, 2009 smitha 5 comments

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 Closures

August 31st, 2009 sadhna No comments

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-

def closure1 = {params ->
//statements & logic
}
e.g-
//type 1  - closure without any parameter
def closure2 = {
    println "Test Only"
}
//type 2 – closure with two param
def closure3 = { String name, int age ->
    println "My name is : $name and age is: $age"
}

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-

closure1.call( args )
closure1(args )
e.g 

closure2()
closure2.call()
output- 
Test Only
Test Only
-------------------------------------------
closure3("sadhna", 30)
closure3.call("saisha", 3)

output- 
My name is : sadhna and age is: 30
My name is : saisha and age is: 3

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()

Output--
Test Again
null

Java  method  to  groovy closure

public class Test {
 public static void javaTest(final String s) {
  System.out.println("Java --" + s + "!");
 }
}

With the following script we use this Java class and convert the javaTest method to a closure:
// Simple list with names.
def names = ['groovy', 'grails', 'closure']
// Simple closure.
names.each { println 'Closure --' + it + '!' }
// Groovy method to convert to closure.
def groovySays(s) {
 "Groovy --${s}!"
}
// Use .& syntax to convert method to closure.
names.each(this.&groovySays)
// Convert Java method to closure and use it.
def javaTest = Test.&javaTest
names.each javaTest

output-
Closure --groovy!
Closure --grails!
Closure --closure!
Groovy --groovy!
Groovy --grails!
Groovy --closure!
Java --groovy!
Java --grails!
Java --closure!

Saving state if connection breaks

August 30th, 2009 Vinay No comments

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.

Categories: Miscellaneous Tags:

Are iPhones application worth the effort for a startup ?

August 30th, 2009 Vinay No comments

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

Categories: StartUp Tags: ,

Free Aptitude test

August 30th, 2009 Vinay No comments

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.

Categories: Aptitude Test Tags:

Signal Integrity Basics Test

August 29th, 2009 Vinay No comments

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.

Java Enterprise Edition 6

August 29th, 2009 Vinay No comments

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

Categories: Programming / tutorials Tags: ,

Facebook or Twitter

August 29th, 2009 wali No comments
Facebook along with MySpace have been the leaders in social networking portals. Facebook however is trying hard to bridge the gap between them and fame of twitter.

Recent developments in Facebook were paradigm shift to their original approach, they revamped their presentation and this time they concentrated more on status messages just like twitter but little more powerful. Twitter, however has been a micro-messaging tool which became popular cuz of its simplicity and yet being powerful. This internet evolution has become one of the most significant modern trends since it has affected the way in which we do business and communicate with peers.

In last week news Facebook has launched a twitter-app, where in Facebook user can automatically syndicate their posts to Twitter, read more here. When Facebook made an attempt to acquire Twitter, and failed there was a rumor in market that Facebook will take different route to go the Tweet Way. Let’s see how much they will succeed.

Categories: Miscellaneous Tags: ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes