|
First
|
Prev |
Next
|
Last
Pages: 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
Ruby good-practice Hi, I'm fairly new to Ruby (3 weeks) and I always find my code for my little projects to be awefully cluttered and excessive. Also, I'm never sure when to use what. I'm sure a lot of this comes with practice and experience, but it would be nice if someone could give me some general pointers for good-practice or lin... 30 Jun 2008 19:57
Trouble with strings.. Mornin' folks - I'm trying to get my head around ruby, writing a few scripts. This one is meant to head off to a webpage and grab a big table, which it does. The problem is that I don't know how to specifically grab that entire table, but I can manage to grab the content based on classes. Doing it this way howe... 30 Jun 2008 18:55
using gems without installing them (like jar files) Hello, Is it possible to use gem files without having to install them, like you can with jar files in Java? For instance, I have a gem/ directory containing various gems, and I would like to add gem/ to the load path and simply require() the gem by name: # add gem/ to load path $: << File.join(File.dir... 30 Jun 2008 20:58
working around frozen hash I need to parse the following date string (part of a file I need to parse) irb(main):001:0> date='Fri Jun 20 02:32:28 GST 2008' => "Fri Jun 20 02:32:28 GST 2008" It seems like the DateTime parsing handles GST as Guam Standard time UTC+10 irb(main):002:0> require 'date' => true irb(main):003:0> DateTime.pa... 1 Jul 2008 03:06
how to - quickly make permutations? can anyone provide an elegant implementation for this method? #gives all distinct combinations of numbers up to n, with maximum size max_size def permutations(n,max_size) so, eg, permutations(4,2) => [[1],[2],[3],[4],[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]] permutations(4,3) => above + [[1,2,3],[1,2,4],[2,3... 1 Jul 2008 18:30
Ruby patch level I have Ruby 1.8.5 on Windows XP and unable to identify the patch level for that release. I have tried the following commands without success * ruby -e 'puts(RUBY_PATCHLEVEL)' gives uninitialized constant * ruby -v does not show patch level * from irb: puts RUBY_PATCHLEVEL gives uninitialized constant The reason ... 30 Jun 2008 18:55
Hiding a password in code. Dana Merrick wrote: Hello! The other day I wrote a small Ruby app to check my finances on Mint.com. My intentions were to have this script run every once and a while and display the information on my desktop (via a tool like Conky or GeekTool). My problem is, how do I handle my password? Here a... 1 Jul 2008 08:12
Something like import/package in java? Hi, I keep feeling frustrated with my ruby project. My problem is one of organization. My code looks a bit like this: lib/ main.rb comman ds/ logio.rb create.rb chat.rb server/ io/ protocol/ utils/ And I keep writing code like require 'commands/logio' require 'commands/create' ... 8 Jul 2008 03:52
Errror: Both user and Secret Are Required Hello when i try to send mail using actionmailer using gmail i get an error "Both user and Secret Are Required" Any Idea What needs to be done. here are my settings config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :authentication => :plain, :use... 30 Jun 2008 13:45
help with threads hi all, i'm trying to do some automated tasks with threads. Basically, my app is initialized with an input file, and an output path and some processing is done on that. I'm trying to automatically detect when the thread dies, so that it can tell the parent class that this thread is complete. Is there a nice way t... 1 Jul 2008 09:14 |