Abhinav Bindra won GOLD

India’s Abhinav Bindra won a gold in men’s 10-metre Air Rifle event in Beijing. Bindra shot 104.5 to take his total to 700.5 in the final. This is India’s first ever Olympic gold in any individual event and ninth in total.

In ten rounds, Bindra shot 10.7, 10.3, 10.4, 10.5, 10.5, 10.5, 10.6, 10.0, 10.2, 10.8 to clinch the first berth. China’s Qinan Zhu won silver while Finland’s Henri Hakkinen won bronze.

Bindra had shot a total of 596 out of 600, shooting a perfect 100 in 3 of the 6 rounds of the qualifiers. Bindra finished 4th to qualify 2 points behind Henri Hakkinen of Finland.

Abhinav Bindra won GOLD MEDAL

Abhinav Bindra won GOLD MEDAL

Add comment August 11, 2008

Large development@Rails

With my recent Googling, I could crawl through few sites, blogs and data analytic graphs. I was shocked to know the jumping intercourse relation of web development with RoR, Specially on the blog http://www.railsonwave.com/ about the migration of site http://www.yellowpages.com/ from JAVA to Rails with so many positive results. I won’t make you to go through the blog and read each and every line unless you want…

Yes I am up with few highlights :

· Yellowpage has got 23 million visitors a month, this shows the Rails is fit for a large application in terms of performance.

· From 125.000 lines of code in Java, mainly written by external consultants from 2004 to 2005, to at least 20.000 lines of code in only 3 months of development from a team of 4 developers.

Sites those are developed in Rails and could be matter of a crown here, I would love to list few of them: (Yeah all of them has got 10+ million visitors@per month)

· http://www.yellowpages.com/

· http://www.revolutionhealth.com/

· http://www.43things.com/

· http://odeo.com/

· http://twitter.com/

Few more can be highlighted here:

· http://www.spock.com/

· http://penny-arcade.com/

· http://chowhound.com/

Add comment August 6, 2008

Visibility of a method

By default methods within a class in Ruby is PUBLIC. But as we know, ruby supports meta programming and hence a new/updated code can be generated on fly during the runtime.
here is a way to make the public class methods to private.

class Myclass
  def mymethod
    puts "I am public and wishing to be private!"
  end
  private :mymethod
  # OR also can be written as
  # private_class_method :mymethod
end

obj = Myclass.new
obj.mymethod
# private method `mymethod' called for # (NoMethodError)

Similary public :mymethod or public_class_method :mymethod

Add comment July 3, 2008

Regular expression

Here is the most frequently used special characters in regular expression of Java script. In a simple and concise way. [Background support : AMIT R.]

*   - 0/n chars >> /raj*/ -> ra, raj,rajj,rajesh, krajesh too [talking about j]
+   - 1/n chars >> /raj=/ -> raj,rajesh, krajesh too but not ra [talking about j]
?   - 0/1 char  >> /raj?/ -> ra, raj, rajj [talking about j]
.   - any SINGLE char expecting at its postion except \n.  [no previous no after]
    /.n/ >> in,on,an but not nan
|  - or >> /java|ruby/  -> java or ruby (dont think a or r) , matches also jruby or rjava
[abc] - matches ANY ONE , same can be written as [a-c]
^   - begin with /^ruby/ -> ruby, ruby programmer but not jruby
$   - end with /ruby$/ -> End with y >> ruby, jruby, kruby but not rubyk
[^a-z]  - Any single match other than a-z
\d   /[0-9]/  i.e. any single digit
\D   /^[0-9]/ i.e. any single char other than 0 to
\w  - Any alphanumeric char other than underscore  [A-Za-Z0-9]

Add comment July 3, 2008

Ruby security vulnerabilities

Multiple arbitrary code execution vulnerabilities in Ruby have been revealed by the Apple Product Security team which could lead to Denial of Service attacks. A total of five vulnerabilities have been reported, with versions impacted being:

1.8.4 and all prior versions
1.8.5-p230 and all prior versions
1.8.6-p229 and all prior versions
1.8.7-p21 and all prior versions
1.9.0-1 and all prior versions

Upgrading to either 1.8.5-p231, 1.8.6-p230, 1.8.7-p22 or 1.9.0-2 is recommended.

Details could be found at

http://weblog.rubyonrails.org/2008/6/21/multiple-ruby-security-vulnerabilities

http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities

Add comment June 23, 2008

Generate Unique ID

Here is a very simple way to generate a unique id.
[Background support : Abhishek S.]

def generate_unique_id( len )
    chars_pattern = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
    unique_id = ""
    1.upto(len) {
			|i| unique_id << chars_pattern[rand(chars_pattern.size-1)]  }
    return unique_id
end
#generates a key of length 10
mykey = generate_unique_id(10)
print mykey # gives a result like "qeKX0myIQh"

Add comment June 23, 2008

Previous Posts


Categories

posts[:recent]

episodes[:recycled]

@@name = PRAYAS

Step down at my blog with your ideas,comments,suggestions on Ruby,RoR,Ajax or Web2.0.You may reach me at
infostall@gmail.com

find_by_tags

Links

visitors[:since_Mar'08]

free web counter

Spam Blocked

Feeds

Meta

RSS Prayas here