First  |  Prev |  Next  |  Last
Pages: 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
getting array input from command line
Hi everyone, I want to get some data from a user, that I want to put in an array.. well the first one is filename and the rest are a bunch of numbers which are sepparated by -i and -o options. inFile = ARGV[0] myArr = -i params myArr2 = -o params Any help appreciated. Ted. -- Posted via http://ww... 2 Jul 2010 00:25
RCR: IO.popen4
Currently with the std lib there is no (built in) way to get the PID of a currently running child process (short of using fork, which is unavailable on windows). i.e. IO.popen("ls") # what's the PID? r,w,e,thread = Open3.popen3("ls") # what's the PID? begin Timeout.timeout(1) { system("bash /c ... 1 Jul 2010 16:41
$? is always new?
Is the following expected? $ irb $? => #<Process::Status: pid 20110 exit 0> $? => #<Process::Status: pid 20122 exit 0> $? => #<Process::Status: pid 20134 exit 0> What are those phantom processes? -r -- Posted via http://www.ruby-forum.com/. ... 29 Jun 2010 10:44
redirecting the end of a pipe
2010/6/25 Thomas Secret <martin.gerdes(a)directbox.com>: Following interesting problem: 1. I have created two pipe end points via IO.pipe: stdin_read,stdin_write=IO.pipe 2. I have forked of a child, and redirected stdin of the child with: $stdin.reopen(stdin_read) 3. In the parent process, I have ... 25 Jun 2010 10:58
Highline giving EOFERROR, input stream exhausted
I am first taking multiline input from user. User may end input using Ctr-d. Then I use highline's menu and get: /opt/local/lib/ruby1.9/gems/1.9.1/gems/highline-1.5.2/lib/highline.rb:603:in `get_line': The input stream is exhausted. (EOFError) However, experimentally, if I end multiline input on user entering ... 26 Jun 2010 16:18
Best place to begin?
Any non-Google preferences would be awesome. As well as links to favorite/personal sites. Thanks. - Ross Kalmbach ... 25 Jun 2010 04:24
rdoc vs hanna vs YARD
A year or so back I adopted Yard, i liked the ability to define params and return values etc (coming from a java background, it looked good). Today, i see some really great output in docs using Hanna -- although I've yet to find a document specifying a template. I assume therefore that it uses the good old rdoc f... 25 Jun 2010 05:32
writing binary file
Hi everyone, I'm trying to write a couple of numbers to a binary file: num = [1234567, 30, 40] File.open("test.file", "wb") { |f| num.each { |e| f.write e.to_i.pack("I") } # f.write num.pack("I") } a = [] File.open("test.file", "rb") { |f| a = f.read(4).unpack("I") puts a } but I get errors ... 25 Jun 2010 02:15
Singleton class in Ruby
Can we see the singleton class as object in ruby. -- Posted via http://www.ruby-forum.com/. ... 28 Jun 2010 22:44
Problem starting Rake in some directories
Hi, I tried to invoke rake from a Command Window, with a couple of failures and one success. I haven't consciously done anything to my system to impact rake Any idea what's going on? First try: K:\>rake --trace rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) ... 25 Jun 2010 00:05
First  |  Prev |  Next  |  Last
Pages: 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71