Earlier this week, I gave a much-tailored Tcl course, with a strong helping of expect.
Expect adds three major extra commands to Tcl - spawn to start a new process under the control of the running Tcl/Tk code, send to send information to it and expect to await for - and decide on how to process - a ....
PHP, Python, Tcl and a number of other languages have a global keyword. And it's a misnomer in most (if not all) cases.
To the un-initiated, "Global" means "worldwide" or "shared all around". So you would think that if you declare something as global, you're going to be sharing it with the same ....
Some useful (?) things to send somebody ...
a) A pair of scissors, in one of those hard plastic wraps that the stores use to prevent their products being used before they are sold, and you need a pair of scissors to open.
b) A decompression program, in a compressed format
c) A software download, ....
In languages such as Java, you must call your named blocks of code (methods) with the correct number and type of parameters, but in Perl you may call them with as many or as few parameters as you like ... then write the named block of code (a sub) to handle (or ignore) whatever it gets.
This week, ....
The slight young girl, perhaps aged about 17, was dressed in army fatigues. She waved her automatic rifle at me and ordered me to move away from my car. I did as ordered, without any hesitation. An hour or so later, I was in a prison building ...
I'm never quite sure what I'm going to find when I ....
From the manual page on feof:
Warning - If passed file pointer is not valid you may get an infinite loop, because EOF fails to return TRUE.
From a script on our server:
while (1) {
$nlines ++;
$line = fgets($fh,1024);
if (feof($fh)) break;
OOps! ... the file t ....
"Please help me debug this virus." I'm paraphrasing something that was posted, a long while ago now, on a board I look after ... and I deleted the code pretty darned fast, as I didn't (and still don't) want to form a source of information for the less scrupulous.
I was looking at a few issues on o ....
Do you want a web directory of pages, where each of them has its own page name (URL), but there isn't really a separate page for you to maintain - all the data is held in some sort of database on your server, and the pages are created automatically from the data as they're requested?
You can do thi ....
Firsts Bristol [zone] bus fares went up earlier this year. And I understand they're going up again next Monday. But that's all right, isn't it, because it's a commercial market and they can't price themselves out of the market?
Well - no - it's NOT all right; it's no longer really a commercial ma ....
Do we eat enough fruit and vegetables? I think I'm - personally - borderline with the recommended "five per day"; I take it as a flag to remind me that I should watch my diet in this area rather than something I keep careful track of - and in any case why should an apple and an orange count as "2 ....