I've never seen proof that ruby is slower than perl in a general sense. I do know that the regex engine is a bit slower (like 10-15%), but not massively. There are, just like in perl, some things which are slower than you would think they would be, but, as in perl, there are almost always...
$h->header('Foo') will access <meta http-equiv="Foo" content="...">
and no,
you cannot get at data unless it is actually there.
hth "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
`man tail`
specifically, the '-f' option "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
i think the main pull to ruby for me was the way in which the syntax is nearly parallel with my own thinking processes for most problems i've had to solve, to the point where i am now solving most problems in ruby first before implementation into perl or java or whatever. what i think would be...
yes, putting 'g' at the end of your regexp will make it match globally.
post your actual code to see if there's something specific to it that would prevent this from working. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
in the tag, i think all you have to do is put:
VALUE=...
and have the '...' be the value of your stored variable. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
i only ever get to use ruby for fun (www.faeriemud.org). professional apps in the US are fairly uncommon.
it's also REALLY useful as a scripting language, to help automate your life (well, a subset of it). "If you think you're too small to make a difference, try spending a night in a...
sure.
make a loop, and have that loop through once for every link you want to display.
inside this loop, have your call to rand, but this time, instead of just accessing the element of the array of addresses, have it splice out the correct element. the usage of splice is:
splice(@arr, $index...
the perl modules under the name LWP are very sophisticated at dealing with web page using, that's all i can think of. search through/ask on the perl forum for more on those modules. "If you think you're too small to make a difference, try spending a night in a closed tent with a...
not to the extent of my knowledge.
but i use emacs, and can Meta-x comment-selection to automatically add in the "#"s... sorry i can't help any more.
stillflame "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
hey there,
if you're asking a question about formatting output, you probably don't have to put the rest of your program into the question...
anyway, yes, as the loops are currently set up, the $answest and $statwest variables don't even get defined until the second loop, so every call to...
well, lets say the GUI has its idea of what it is looking at - say a board and pieces on that board, implemented in pixels. now, it is subscribed to watch piece positions in the actual game engine, which it represents as which space on the board a piece is at. whenever those change, it does an...
the toString method of a double number returns a string which is as precise as the number can get, and as always with floating point arithmetic, there will be errors, which result in tini tiny little decimals being tacked onto the number. if you just want 2 decimal places, multiply the number...
an idea would be to have an index file automatically generated and put at the top directory. or even mini-indexes at various levels of the directory structure pointing searchers in the right direction as they traverse through. or you could order the directory structure like a binary tree, so...
Well, the GUI is an observer - that is, it watches something, in particular it watches for changes in that something, and when it sees those changes, it does something. that is what an observer is.
so, you're asking how to implement this. it is done with the 'subscribe' idea, where the...
ask your teacher, that's what they're there for. Their job is to teach you how to figure out computer problems, not to teach you the specific solutions to a few problems. if we were to just give you the answer, it wouldn't help you in the long run. we could take the time to walk through it...
well, basically you'll have to open a bi-directional pipe to the process, which you can read about in the perl faqs. the caveat there being that wait times will be unregulated, and you may send input at the wrong time. it would be better to rewrite the java program to work in a batch mode...
right on. good to hear you found it.
you might want to look around in the ruby cookbook (www.rubycookbook.org) for ideas on how people are using it. It is a fun language just to know, even if you don't get to develop in it. "If you think you're too small to make a difference, try spending...
question: are there commas inbetween all the numbers and strings? if so, the task becomes much simplified: read the contents of the file into a string, split that string on commas, and then take that list and make a hash out of it. here's the lookings of that:
my $file = join('', <TABLE>)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.