First  |  Prev |  Next  |  Last
Pages: 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
i don't know:&:empty?
there is one commade: '["ffgh"]78'.split(/\[|\]/).reject(&:empty?) i can get two character: "ffgh" 78 but i don't know what is the meaning of : &:empty? 1\what is : 2\what is &: think you for advance. -- Posted via http://www.ruby-forum.com/. ... 14 Apr 2010 05:28
rp_trap_pending/rb_trap_exec in 1.9?
Hey, I've been using rb_trap_pending/rb_trap_exec in 1.8 to safely interrupt the process at a point where I can allocate objects without upsetting the GC. These have been removed in 1.9 and I don't see anything similar? What's the safe way to interrupt a 1.9 process? Cheers Ian ... 13 Apr 2010 20:41
how to delete the first two characters of each row?
On Apr 13, 11:26 am, Tony Arcieri <tony.arci...(a)medioh.com> wrote: Another option, utilizing Ruby's mutable strings: while line = io.gets   line.slice!(0, 2)   io1.write line end If you want to avoid temporary files: # Backup your file first, just in case, for testing purposes. require 'm... 14 Apr 2010 02:13
Detect whether a key is being held before script executi
Command Line. I want to have the script launched at startup, by having a Terminal command call the script, then when the script executes, it determines whether or not the key is being held down and if it is, it then modifies the permissions of certain folders on my hard disk. I am using OSX. Andrew ... 13 Apr 2010 21:48
Detect whether a key is being held before script execution?
Hi All! I am looking for a way to have a script detect whether or not a key is pressed and held down before it runs. Basically, I want the script to execute one way if the key is pressed and another if it is not pressed. I plan on having the script launched automatically at startup and will need to have the... 13 Apr 2010 17:19
Gem help
I'm trying to DL a gem but I keep getting this message: E:\Ruby\bin>cmd /k "F:\Torque Game Engine Demo\System\Hack\Ruby\bin\gem.bat" The system cannot find the drive specified. E:\Ruby\bin>gem i narray Building native extensions. This could take a while... ERROR: Error installing narray: ER... 14 Apr 2010 16:39
QTKit glitchy on Snow Leopard Server - Help!
I have written a script to pull a frame image from a QuickTime Movie. It works great on Snow Leopard, Leopard, and Leopard Server but I get weird results on Snow Leopard Server. When pulling on the 3 working OSs I get the frame at the specified time. However when I execute the exact same script with the exact sam... 15 Apr 2010 14:43
How to find multiple matches in a string
I know how to use regular expressions to find the first match of a pattern in a string. But, how do I most easily find multiple matches? For example, if the string is s = 'abcde_abcde_abcde' and I want to find the location of ALL the 'b' characters, how do I do it? If I use m = s.match(/b/) then m.offs... 14 Apr 2010 02:13
YAML and DateTime
There's a workarount you can do, in /usr/local/lib/ruby/1.8/yaml/rubytypes.rb you have this definition of #to_yaml on Date class. 1 class Date 2 yaml_as "tag:yaml.org,2002:timestamp#ymd" 3 def to_yaml( opts = {} ) 4 YAML::quick_emit( self, opts ) do |out| 5 out.scalar( "tag:yaml.org,2002:timestamp... 13 Apr 2010 11:40
IronRuby 1.0 has been released
I don't know why the project admins haven't posted a notice here since this happened yesterday, so I'll lend them a hand. IronRuby 1.0 is out! All the details are here... http://ironruby.codeplex.com/releases/view/25901 cr ... 13 Apr 2010 09:26
First  |  Prev |  Next  |  Last
Pages: 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132