First  |  Prev |  Next  |  Last
Pages: 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
Dissapearing data from array
Hi all. I have the next problem. a = %w(a b) z = %w(1) a.insert(1, z) puts a a 1 b z.clear puts a a b Oopss... where "1" is? what happened? what can I do to keep "1" when I clear the array (z)? Thanks a lot. -- Posted via http://www.ruby-forum.com/. ... 7 Apr 2010 14:37
xml to ruby compactible json
Hi, I have an xml which i need in ruby json format I use the below code : data=Hash.from_xml(xml).to_json() where xml contains the xml data. i get the result in the below format : {'responseHeader':{'status':0,'QTime':0}} but i require the result as : { 'responseHeader'=>{ 'status'=>0, 'QTim... 7 Apr 2010 20:17
Getting output of program with some DRb for good measure
I'm running a DRb service which accepts a string<file name> and than processes that file name on the server side. So I've been digging around the internet and it seems people have been running into the same problems as me. The DRb service will execute the file ... but doing so will block the DRb service until IO.po... 7 Apr 2010 16:52
modifying a Hash in one process when .each is running in another
I want one process to continually loop through a list of objects (in the form of a hash), while another process continually refreshes that list. I've done it the most obvious way below, but are there any pitfalls here? I don't really know how the each method works, so will it be looking for keys that may not be the... 7 Apr 2010 11:12
How to convert a float into time
Hello, I am querying from the database which is storing time in double format. I need to convert this to time format. I was able to convert time into float but not able to convert the float into time format. Regards, Madhusudhan. -- Posted via http://www.ruby-forum.com/. ... 7 Apr 2010 11:11
UML Diagrams
Hi list, someone know with what app i can draw UML diagrams like the ones appear at PraProg books, for example, that seems handmaded? Something like yuml but standalone :) Thanks in advance, Francesco Vollero ... 7 Apr 2010 14:37
Precision and ==
[Note: parts of this message were removed to make it a legal post.] We all know that finite representation comes with some difficulties... but... x = 45.0*(Math::PI / 180.0) y = 0.785398163397448 puts "#{x.class} : #{x}" puts "#{y.class} : #{y}" puts 45.0*(Math::PI / 180.0) == 0.785398163397448 prints ... 7 Apr 2010 07:50
Ruby uninstall and fresh install
Everything was working fine , until we decided to upgrade ruby to 1.8.7 from 1.8.6, and thats when all hell broke loose. When we compiled Ruby 1.8.7 from source it got installed into /usr/local/bin and Ruby 1.8.6 stayed in /usr/bin. Currently, we've uninstalled ruby 1.8.6 and by some stroke we deleted the ruby 1.8.... 7 Apr 2010 07:50
Parse the data in an array index in ruby
2010/4/7 Brk Anl <banil86(a)yahoo.com>: Actually i try to fill a table class Sorm_Table def initialize  # define table structure and array for data @template = Struct.new(:nofcall,:obj,:rpn,:rac,:cg1,:cgpn,:cd1,:cdpn,:stt) There is no point in recreating this class over and over again. Rather do ... 7 Apr 2010 04:34
Executing a program (a quick question)
Hi! I want to launch a program and I don't care about its return value or output. I also don't want it to block my ruby program. On Linux I do this as follows: if !fork system("xpdf /path/to/some/file") exit! # ... or exec() ... end But it doesn't work on MS-Windows... it complains that... 7 Apr 2010 12:20
First  |  Prev |  Next  |  Last
Pages: 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139