I have a machine that is notr able to get aaccess to the outside world to be able to install some libarlies.
So i am wondering how to do this manually.
Ww
Is it possible to talk to System V Message Queues using Ruby.
I want to be able to have an input txt file with a structure as follows:
var1 = "value1"
var2 = 'value2'
var3 = value3
var4 = 52+545
I want to be able to take the input from that file...
I'm a newbie with rails/ruby so please be patient with me thanks.
Here's my issue.
In rails, in the controller or in this case a model, let's say we do a xxx.find_all_by_some_field(some_...
Here is a two level deep initialization:
>> h = Hash.new{ |h,k| h[k] = Hash.new{ |h2,k2| h2[k2] = {} } }
=> {}
>> h["a"]["b"]
=> {}
I need the following to work to any depth
>> h["a"][...
Hello
Want to know how to sort by column asc or desc
Script is .......
require 'csv'
people = CSV.read("c:/foo.txt")
joe = people.find_all {|person| person[0] =~ /Joe/}
#when ...
I am having trouble in getting the value from an input field in a form.
The value is modified via an rjs file and the form shows the value in the field after the rjs file has modified it. ...
I am analysing a capture file for my company's DNS and would like Ruby code to get requests per each Top Level Domain (TLD) from the captured file and possibly in popularity order. I am a newb...
Hello,
I would like to learn a (preferably simple) way to e-mail a textfile as an attachment from within a Ruby program (without Rails).
If there is not a simple way in Ruby itself, a Li...
I have a hash with the key generated by distance_of_time_in_words. I want to be able to sort that hash chronologically instead of alphabetically. How would I do that?
i.e., the keys in my h...
Hello
Have a problem loading gems when at work - no problem at home - probably firewall?
Could someone look at the attached error log taken from when I tried to install a gem and hopefully g...
Hello
Below is my script to download data from an access table - it works. However, 2 questions:-
1 - how can I get the results loaded to a text file or csv file or excel file (lets call it ...
Hi, is there a conditional operator in Ruby like the ? in C/C#, ie
x = y == nil ? 0 : 1
I know you can do
x = if (y == nil) then 0 else 1 end
Just wondering if the more compact is ...
I can access the Ruby Reference documentation by entering the ri command into the terminal window, but I want to access the Ruby Reference documentation in Notepad or in Firefox. Is that possi...
Hello
I would like to know how to use a reg expression where you can select lines which contain parts of a string - i.e. if the the words "PEARS" or "FRED" appear in a given line then I need ...