322 Topics

Member Avatar for
Member Avatar for johndoe444

Why is this regular expression (pat) not working? According to documentation, scan takes both string and regexp. [CODE]irb(main):001:0> pat = '\d+ (\w+) \(\d+\)' => "\\d+ (\\w+) \\(\\d+\\)" irb(main):002:0> string = 'dfasdf 1 up (2009) sdfasdf 2 walle (2008) adfasdf' => "dfasdf 1 up (2009) sdfasdf 2 walle (2008) adfasdf" irb(main):003:0> …

Member Avatar for johndoe444
0
115
Member Avatar for mhenry

After twitter, many people are ready to do projects with ruby on rails, let me tell you frankly i dont know even a inch about it, I just know basic languages like javascript, xml, html , asp. Give me a roadmap how to read ruby on rails and master at …

Member Avatar for mhenry
0
209
Member Avatar for sram6

Hello everyone, I am a newbie to Ruby. I installed Instant Rails on a Windows Vista machine and whenever I started the InstantRails, it gave an error message "Either Apache or MySQL cannot run because another program is using it's ports." I have checked my firewall settings and couldn't figure …

Member Avatar for tiger86
0
158
Member Avatar for phper

Hi! Does anyone know of a good tutorial for installing Ruby with Php, Apache and MySQL. I have tried InstantRails but i want to install it without using the instant option! Thanks.

Member Avatar for tiger86
0
306
Member Avatar for skrithikaa

Hi, Can some one tell me how to create elements like (text, tables) in memory, then edit them in memory and finally print it on a file. Thanks, K

0
90
Member Avatar for skrithikaa

Hi, I am new to ruby programming. I would like to know how to create a document and add elements like texts and tables. I also need to modify those and then write them into a file. Is it possible to do it with Ruby? Thanks, K

Member Avatar for codejoust
0
82
Member Avatar for sheishei

anyone here who could help me make a webpage using ruby? is it possible? im having a hard time..

Member Avatar for codejoust
0
82
Member Avatar for linux

1) Is it possible to install Ruby (the compiler) onto a flashdrive and run it on another machine without adding the registry edits? Is there like a portable copy of the compiler that I can use? I need Ruby at school, but I can't install anything. 2) I think my …

Member Avatar for HiHe
0
196
Member Avatar for ringling

How would I go about writing a Mad Libs program? Any examples would be greatly appreciated. Thanks!

Member Avatar for codejoust
0
70
Member Avatar for theGraffo

Hey! I have a strange problem. When developing with Ruby on Windows Xp, if I try to run the .rb file with [CODE]ruby mycode.rb[/CODE] The execution stops returning: [CODE]/usr/lib/ruby/site_ruby/1.8/i386-cygwin/sdl.so: [BUG] Segmentation fault[/CODE] Of course, /usr makes no sense in windows. On the other hand, if I simply double-click mycode.rb from …

0
103
Member Avatar for EddieC

Research released this week by Evans Data showed that 73 percent of the market currently use or plan to adopt the [url=http://en.wikipedia.org/wiki/Spring_framework]Spring application framework for Java[/url] within the next two years. More remarkable is that 83 percent of companies with 500 or more developers use Spring, according to the study[/url]. …

Member Avatar for ~s.o.s~
0
653
Member Avatar for happygeek

[URL="http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/"]Multiple arbitrary code execution vulnerabilities in Ruby[/URL] have been revealed by the [URL="http://www.apple.com/support/security/"]Apple Product Security[/URL] team which could lead to Denial of Service attacks. A total of five vulnerabilities have been reported, with versions impacted being: [INDENT]1.8.4 and all prior versions 1.8.5-p230 and all prior versions 1.8.6-p229 and all prior …

1
241
Member Avatar for EddieC

If you’re a Ruby or Python developer building AJAX applications, you’ve got to learn JavaScript. Even if you’re converting Ruby code to client-side JavaScript with a tool like [URL= http://www.scribd.com/doc/220397/RJShow-it-works] RJS[/URL], it can still be helpful to know the AJAX component for adding features and debugging. Now Microsoft is promoting …

Member Avatar for lkcl
0
338
Member Avatar for slac3dork

A simple domain name checker. This script use service from who.is Usage: ruby domainchecker.rb <domain_name>

0
492
Member Avatar for Stylish

I needed a way to spawn multiple threads, have them monitored, and restarted if an error occured. I came up with the following. This snippet is from a larger program, so if there is a problem please let me know. This is for command line and tested on Linux (well, …

0
123
Member Avatar for Jessehk

This is a simple, but complete (pseudo) random password generator. Examples of usage: [code] $ ruby pgen.rb soovmuvytv $ ruby pgen.rb --length=20 bynnugipyeeghdbihcdn $ ruby pgen.rb --length=20 -n v3ji3awj1trzjlda5oax $ ruby pgen.rb --length=20 -np :sa6vafpummpttjp?qo: [/code] For complete usage guidelines, run [inlinecode]$ ruby pgen.rb --help[/inlinecode] This (hopefully) serves as both …

-1
158
Member Avatar for vegaseat

Using an SDL (Simple DirectMedia Layer) wrapper is one way to play sound and music with Ruby. I have tested this snippet with .MID .MOD and .WAV files and it performs well. There are several SDL wrappers for Ruby available, I picked RUDL because of its simplicity. RUDL is great …

0
272
Member Avatar for Dark_Omen

Okay, this introduces two new things into the widget. The first thing you need is a picture file (.jpg, .png, .bmp etc...). The new code makes the picture into the button with the text "Hello, World" on the side. In the parentheses next to File.open you would put the file …

Member Avatar for bumsfeld
0
141
Member Avatar for Dark_Omen

This is kind of an extension to my previous code snippet. This language is really fun to use. I find it pretty easy to use and understand. This will create a window with a button.

Member Avatar for bumsfeld
0
329
Member Avatar for Dark_Omen

This is a basic window coded in Ruby. To download Ruby go to [url]www.ruby-lang.org[/url] and download the latest version. The latest version includes the FX toolkit that is needed to create this window.

Member Avatar for Dark_Omen
0
228
Member Avatar for Nathan Campos

Hello, I'm learning Ruby, and i want to know how to compress files using Ruby. Thanks, Nathan Paulino Campos

Member Avatar for Nathan Campos
0
132
Member Avatar for drjay1627

What are names starting with the ":", are they variables, constants or something else? drjay

Member Avatar for Kevin_poison
0
109
Member Avatar for Renzokouken_22

Hi guys.. I want to learn Ruby on Rails.. Actually I already have a Computer Based Training CD in Ruby on Rails by Lynda.com.. But I'm having a hard time in deploying the requirement 'coz in the training video the speaker is working on Mac OS.. But I'm using Windows.. …

Member Avatar for Renzokouken_22
0
187
Member Avatar for dragonflyuk

I'm experimenting with ruby and watir for parsing data from the web. I'm having no problem getting info from standard fields, however I've come across a listbox on one of the pages I'm looking at, and I want to find an easy way of getting the number if items returned …

Member Avatar for sridharupputuri
0
84
Member Avatar for fightoplankton

I have been struggling for days on just the first part of this script. Please help! I need to add the ability to delete the last column of each csv, which vary in their lengths. [CODE] require 'rubygems' require 'roo' require 'fileutils' require 'rio' FileUtils.mkdir_p "/Users/pshapiro/Desktop/Excel/xls" FileUtils.mkdir_p "/Users/pshapiro/Desktop/Excel/tmp" FileUtils.mkdir_p "/Users/pshapiro/Desktop/Excel/csv" …

0
108
Member Avatar for drjay1627

i'm a java c/c++ person. trying out ruby for the 1st time! how do i do something like this in ruby: [code] //this is java public static void main ( String args [] ) { File inFile = new File ( args [ 0 ] ); File outFile = new …

Member Avatar for ~s.o.s~
0
205
Member Avatar for lyardson

I need a Good resource for ruby...as am fresh to ruby...need to learn from sctrach...suggest form source where i can learn from scratch

Member Avatar for kingarthur
0
87
Member Avatar for r_sathya

Hai I am sathiya, I install redmine in the mandriva linux server. Redmine is already running in mandriva in port number 3000. i want to install another copy of redmine in the same server . but it taking the port number 3000 as default. HOW DO I CHANGE THE PORT …

Member Avatar for aodanier
0
103
Member Avatar for ClimaxBeetle

How long does it take to count 1 billion? Determine the amount of time it takes the program. [CODE]Int i,j,k, count=0; For (i=0; i<N; i++) For (j=0; j<N; j++) For (k=0; k<N; k++) count++[/CODE] to complete in your programming environment, for N=1000, and 1000. If your compiler has optimization features …

0
93
Member Avatar for gadys

Hi I starting to work with ruby and soap and had a question : 1. how do I generate a WSDL file for the service I created ? will it be compatible with an .NET client ? Thanks, Gady ---------------------------------------------------------------- [code=ruby]begin class MyServer < SOAP::RPC::StandaloneServer # Handler methods def add(a, …

Member Avatar for unleashbf
0
94

The End.