Blogadda

Blogadda
Visit BlogAdda.com to discover Indian blogs

Monday, September 14, 2009

Scala-- The Future of java is here!!

Scala is a statically typed, object-oriented programming language that blends imperative and functional programming styles. Scala is designed to integrate easily with applications that run on modern virtual machines, primarily the Java virtual machine (JVM). The main Scala compiler, scalac, generates Java class files that can be run on the JVM. However, another Scala compiler exists that generates binaries that can be run on the .NET CLR, as Scala is designed to integrate with both the Java and .NET worlds. In the Java world, the Scala language can be used alongside the Java language—either as an alternative to Java—to build applications that run on the JVM.

Scala was developed starting in 2003 by Martin Odersky's group at EPFL, Lausanne, Switzerland. Previously, Martin had been active in the Java field. He co-designed the first version of Java generics and was the original author of the current javac compiler. The work on Scala was motivated by the desire to overcome limitations imposed by backwards compatibility with Java. So Scala is not a superset of Java, but it retains seamless interoperability.

One reason you might want to use Scala is that it allows you to increase your productivity compared to Java while leveraging JVM execution speed, your existing investments in Java code, knowledge, and the vast array of APIs available for the JVM. It has the conciseness of a dynamic language like Ruby or Python, but it is statically typed, like Java. Another reason is that Scala comes with an Erlang-like Actors library that greatly simplifies concurrent programming, but runs on the JVM.



By: http://www.artima.com/scalazine/articles/steps.html

Wednesday, September 9, 2009

Mashups

Mashups
In the context of learning and assessments mashups can be categorized as follows:

  1. Portlet – configured by an end user
  2. Page (Web, Wiki or Blog) – configured by a web author
  3. Data – configured by a programmer

Portlet Based Mashup
Portlet based mashups provide different “windows” that interact with different and separate applications and users can move these portlets around their screen to meet their own personal requirements.

Page Based Mashup
Page based mashups are configured by the author of the web page, wiki and or blog to determine where application data and interactions might occur.

Documentation, learning content and assessments are often available throughout an organization’s infrastructure but challenging to find and they are especially difficult to find in context. Wikis, blogs and web pages can be used to expose existing resources, wrap context, to provide a meaningful learning and/or assessment experience. Learning mashups can improve learner experiences and learning outcomes.

Data Mashups

A data mash up is where data is drawn from different data sources and displayed within a single page. In this style a programmer constructs a program to retrieve the data, from different data sources, and then display it within a web page.

Courtesy- http://www.linkedin.com/news?viewArticle=&articleID=66406667&gid=55108&articleURL=http%3A%2F%2Fblog.eric.info%2F2009%2F09%2F01%2Flearning-mashups%2F&urlhash=tz-h&trk=news_discuss

Monday, September 7, 2009

Load balancing FMS servers using LVS (DR mode)

Load balancing FMS servers using LVS (DR mode)

How do we configure LVS (or any load balancer for that matter) to detect when there has been a failure of a particular real server?

Answer by Jean--

It is possible to load balance using LVS, we could do an HTTP health monitor against FMS since it supports tunneling over HTTP. We can also probably hit the admin service port of the FMS server, which has a REST like interface and use some metrics like the number of streams or number of application instances. keep alived or something similar should work for the actual interface for putting servers in an out of rotation for local server load balancing. People generally know who use LVS write their own custom health check layer.

Friday, September 4, 2009

Lawn Tennis - Scoring

Lawn

Tennis - Scoring

The Server wins the point
  • if the ball served, not being a let, touches the receiver or anything which he wears or carries, before it hits the ground

  • if the receiver loses the point

The Receiver wins the point

  • if the server serves two consecutive faults

  • if the server loses the point

If the ball in play touches a permanent fixture (other than the net, posts, singles sticks, cord or metal cable, strap or band) after it has hit the ground, the player who struck it, wins the point;

If the ball in play touches a permanent fixture (other than the net, posts, singles sticks, cord or metal cable, strap or band) before it hits the ground his opponent wins the point.

In a doubles game, if the ball served touches the partner of the receiver or anything which he wears or carries, before it hits the ground, the server wins the point. The ball shall be struck alternately by one or other player of the opposing pair and if a player touches the ball in play with his racket in contravention of this rule, his opponents wins the point.

A player loses the point if

  • he fails to return the ball in play directly over the net, before it hits the ground twice consecutively

  • he returns the ball in play so that it hits the ground, a permanent fixture or other object, outside any of the lines which bound his opponents court

  • he volleys the ball and fails to make a good return even when standing outside the court

  • he touches or strikes the ball in play with his racket more than once in making a stroke

  • he or his racket or anything which he wears or carries, touches the net, posts, cord or metal cable, strap or band or the ground within his opponents court at any time while the ball is in play

  • he volleys the ball before it has passed the net

  • the ball in play touches him or anything that he wears or carries, except his rackets or hands

  • he throws his racket and the racket hits the ball

  • a player deliberately and materially change the shape of the racket during the game

Result

If the player wins his first point, the score is called 15 for that player. On winning his second point, the score is called 30 for that player. On winning his third point the score is called 40 for that player and the fourth point won by the player who's score is 40 will win the game.

If both the players have won three points, the score is called Deuce and the next point won by a player is scored Advantage for that player. If the same player wins the next point, he wins the game. If the other player wins the next point the score is again called Deuce and so on, until the player wins the two points immediately following the score at deuce, when the game is scored for that player.

A player (or players) who first wins six games wins a Set, except that he must win by a margin of two games over his opponent and where necessary a Set shall be extended until this margin be achieved.

Tuesday, September 1, 2009

मैं ढूँढता तुझे था

मैं ढूँढता तुझे था, जब कुंज और वन में।
तू खोजता मुझे था, तब दीन के सदन में॥

तू 'आह' बन किसी की, मुझको पुकारता था।
मैं था तुझे बुलाता, संगीत में भजन में॥

मेरे लिए खड़ा था, दुखियों के द्वार पर तू।
मैं बाट जोहता था, तेरी किसी चमन में॥

बनकर किसी के आँसू, मेरे लिए बहा तू।
आँखे लगी थी मेरी, तब मान और धन में॥

बाजे बजाबजा कर, मैं था तुझे रिझाता।
तब तू लगा हुआ था, पतितों के संगठन में॥

मैं था विरक्त तुझसे, जग की अनित्यता पर।
उत्थान भर रहा था, तब तू किसी पतन में॥

बेबस गिरे हुओं के, तू बीच में खड़ा था।
मैं स्वर्ग देखता था, झुकता कहाँ चरन में॥

तूने दिया अनेकों अवसर न मिल सका मैं।
तू कर्म में मगन था, मैं व्यस्त था कथन में॥

तेरा पता सिकंदर को, मैं समझ रहा था।
पर तू बसा हुआ था, फरहाद कोहकन में॥

क्रीसस की 'हाय' में था, करता विनोद तू ही।
तू अंत में हंसा था, महमुद के रुदन में॥

प्रहलाद जानता था, तेरा सही ठिकाना।
तू ही मचल रहा था, मंसूर की रटन में॥

आखिर चमक पड़ा तू गाँधी की हड्डियों में।
मैं था तुझे समझता, सुहराब पीले तन में।

कैसे तुझे मिलूँगा, जब भेद इस कदर है।
हैरान होके भगवन, आया हूँ मैं सरन में॥

तू रूप कै किरन में सौंदर्य है सुमन में।
तू प्राण है पवन में, विस्तार है गगन में॥

तू ज्ञान हिन्दुओं में, ईमान मुस्लिमों में।
तू प्रेम क्रिश्चियन में, तू सत्य है सुजन में॥

हे दीनबंधु ऐसी, प्रतिभा प्रदान कर तू।
देखूँ तुझे दृगों में, मन में तथा वचन में॥

कठिनाइयों दुखों का, इतिहास ही सुयश है।
मुझको समर्थ कर तू, बस कष्ट के सहन में॥

दुख में न हार मानूँ, सुख में तुझे न भूलूँ।
ऐसा प्रभाव भर दे, मेरे अधीर मन में॥