dosage tegretol

Archive for January, 2011

Ruby on Rails Support Discontinued in NetBeans IDE

January 28th, 2011 | Category: Ruby

I just receive an email :

Dear NetBeans Community:

After thorough consideration, we have taken the difficult step to discontinue support for Ruby on Rails in the NetBeans IDE. Two main issues underpin this decision:

Java SE 7 and Java Development Kit 7 (JDK 7) are the next major releases of the Java SE platform, which Oracle is committed to deliver in 2011. A key objective of the NetBeans IDE has always been to offer superior support for the Java platform. To maintain that objective and capitalize on the JDK 7 release themes--multi-language support, developer productivity and performance--it is necessary that our engineering resources are committed to a timely and quality release of NetBeans IDE 7.0.

Second: Although our Ruby support has historically been well received, based on existing low usage trends we are unable to justify the continued allocation of resources to support the feature.

As of January 27, the Ruby on Rails module will be gone from development builds of NetBeans IDE 7.0. Developers who want to continue to use Ruby on Rails functionality in the NetBeans IDE should please visit the NetBeans Ruby Support page for details on how to do so going forward.

We remain committed to delivering a first-class product to our community of developers and users, and we encourage your feedback on our mailing lists and forums, on Twitter, or by writing to us.

Thank you for your continued support of NetBeans.
The NetBeans Team

My question now :

  • is this real ??
  • why Oracle do that for RoR community ??

NetBeans is one of the best alternative to develop ruby and ruby on rails. For my last tutorials, I’m using it and love the gem’s explorer. If the support of RoR on Glassfish will be abort then many questions for Oracle practice will come.

2 comments

RFID in shoes

January 26th, 2011 | Category: geek,Video

How to exploit RFID(NFC) ??? many proposition. One of them from KarmaTech using your shoes. and personally, I think it’s pretty cool.

RFID in shoes from Hampus Lemhag on Vimeo.

1 comment

How to retrieve Twitter account followers

January 25th, 2011 | Category: OpenSource,programmation,Ruby
Follow nihed on Twitter

With Ruby, Imagination is your limit. Our example is a way to retrieve a list of followers for an account.
For this sample, I’m using the twitter Gem.

  1. $ sudo gem install twitter

Now, we can explore our code.
First we must call our libraries (Gem).

  1. require "rubygems"
  2. require "twitter"

Next, we should configure an OAuth connexion.

  1. Twitter.configure do |config|
  2.   config.consumer_key = "AAAA"
  3.   config.consumer_secret = "BBBB"
  4.   config.oauth_token = "CCCC"
  5.   config.oauth_token_secret = "DDDD"
  6. end

(AAAA,BBBB,CCCC and DDDD) values can be retrieved on http://dev.twitter.com/apps/new when you create a new application.
After, We must initialize some variables

  1. myfile = File.new("write.txt", "w")
  2. client = Twitter::Client.new
  3. count=0
  4. cursor1=-1
  • myfile: file that be used to create a cvs file
  • client: our connexion with twitter service
  • count: number of count retrieved
  • cursor1: twitter send 100 per 100 account, this variable is used to follow this list

Finally, We can launch our code

  1. while (cursor1 != 0) do
  2. result =client.followers("Account","cursor"=>"#{cursor1}")
  3. cursor1=result.next_cursor
  4. users=result.users
  5. puts count
  6.  users.each do |follower|
  7.    count+=1
  8.     myfile.puts "\"#{count}\",\"#{follower.name}\",\"#{follower.screen_name}\",\"#{follower.url}\",\"#{follower.followers_count}\",\"#{follower.location}\",\"#{follower.created_at}\",\"#{follower.description}\",\"#{follower.friends_count}\",\"#{follower.lang}\",\"#{follower.time_zone}\",\"#{follower.verified}\""
  9.  end
  10.  sleep(5)
  11. end

While, our cursor is not equal 0, we retrieve accounts information using the request followers parameters the name of the account and the position of the cursor. We update our variables and we store the result in the our CVS file.

3 comments