Russell [EMAIL PROTECTED]
The simple way, in REBOL, to convert the day-of-week integers, 0 to 6, to
the corresponding strings, Sunday, Monday, etc is to create the block
dowdb: [0 "Sunday" 1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5
"Friday" 6 "Saturday"]
then select dowdb 1
"Business" asked about the mod function in
REBOL. x1 // x2 returns the remainder of dividing integer x1 by x2
'remainder x1 x2 does the same in pre-fix notation. the operator
'mod was implemented in earlier versions of REBOL/core, but it is undefined in V
2.2.
Russell [EMAIL PROTECTED]
Just wanted to let you know that it can be done even more simple. This comes
from http://www.rebol.com/howto.html
I have found some very useful stuff in this document and I regret there is
only one fairly hidden link to it on the website. IMHO it should have a
direct link to it in the left
In REBOL you can get the numerical day of week
quite simply, as follows ( copied/pasted from a REBOL console session)
:
date: 8-dec-1917
== 8-Dec-1917 date/weekday==
6
; Saturday, just like mother told me! Back
then, the doctor came to the house, on weekends!
there are no spaces in
them in a JForth program in 1992. The epoch date seems to be
that set by Joseph Scaliger in 1582, i.e., Jan 1 4713 BC, (that
would be Julian day number 1), but as this algorithm takes the
One thing to keep in mind is that a true Julian date based
on this style of
REBOL is perfect for storing a wide range of data values, so can be used for
creating databases up to and beyond several thousand records. This is useful
Does any one know what the true limit is? I've got a data
base of 23,000 records right now, growing at a rate of about
100 entries per week.
"Doomsday Algorithm." His algorithm is simple enough to perform in your head
for any date in history, with just a little practice. Knocking out a Rebol
implementation is on my todo list. A good starting point is
http://www.interlog.com/~r937/doomsday.html
I don't know Doomsday but will
In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes
[EMAIL PROTECTED] wrote:
Has anyone written a listen utility to monitor port 80? I am trying to
see what the remote web server is sending so that I can respond
appropriately from a rebol client.
www.rebol.org look at Sterling's
Shamshad
Shamshad
Shamshad
Get free email and a permanent address at http://www.netaddress.com
NO MORE PLEASE
1
Thanks Gabriele,
I was wondering where the to-integer was, but then i realised that the
(value: load value) took care of it.
Interesting that you looked at the data in terms of repeating groups and so
processed them using some..., when i came up with a parse rule, i tried to
use recursion and i
Hi,
try:
select system/options/cgi/other-headers "HTTP_REFERER"
If it's missing (i.e. when last page visited was not read by HTTP
protocol, or the user uses proxy that filters HTTP_REFERER header to
protect his privacy), select will return none.
[EMAIL PROTECTED] wrote:
How can I get the
Hi.
I'm working on tool to help ppl with writing cgis in rebol.
At first, I'm quite unsatisfied with built-in decode-cgi
(or decode-cgi-query - why this duplicity? These functions
are same...)
built-in decode-cgi has these two holes:
1)
If more values are of same name, only last value is
Hi.
Next one problem:
do you ever try return from forall in function?
test: func [blk][
forall blk [
if not integer? first blk [return "Not integer!"]
]
none
]
test [ 1 2 3 "a" 5 6]
== none
Dictionary says:
Exits the current function immediately, returning a value as the result
Hi.
I wanna ask what's the latest recomended way to read data submitted
from some www page with form by POST method.
I use:
tmp: load system/options/cgi/content-length
buffer: make string! (tmp + 10)
read-io system/ports/input buffer tmp
...
decode-cgi buffer
but IMHO it's
Here's my console session:
test: func [blk][
[ forall blk [
[if not integer? first blk [return "Not integer!"]
[ ]
[ none
[]
test ["a" 1]
== "Not integer!"
test [1 "a" 1]
== "Not integer!"
test [2 3 1 "a" 1]
== "Not integer!"
test [1 2 3 "a" 5 6]
== "Not
Hi Elan, 19-Feb-2000 you wrote:
Do you mean the Beta programming language,
Yes.
Cool! I've got to tell my study mates about that ;-)
[...]
And before I get your reply, I still think I'm
right on that one ;-) )
Yikes. I didn't know Beta was *that* unknown. I actually printed out and
Well, I should add that I use rebol/core version 2.2.0.4.2
Regards,
Jan
[Charset iso-8859-1 unsupported, filtering to ASCII...]
Here's my console session:
test: func [blk][
[ forall blk [
[if not integer? first blk [return "Not integer!"]
[ ]
[
The simple way, in REBOL, to convert the day-of-week integers, 0 to 6, to
the corresponding strings, Sunday, Monday, etc is to create the block
dowdb: [0 "Sunday" 1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5
"Friday" 6 "Saturday"]
then select dowdb 1 returns "Monday", etc.
now/weekday
REBOL [
Title: "day of the Week"
Date: 18-Feb--2000
Author: "J B"
Version: 1.0.0
Purpose: "Shows day of the week and number of days in months, it's a
prelude to an HTML monthly calendar"
]
This hader is wrong : remark the double '-' before the year. When I exec it
the
Hello GabrieIe!
n einer eMail vom 19.02.00 13:47:37 (MEZ) Mitteleuropäische Zeit schreibt
[EMAIL PROTECTED]:
On 18-Feb-00, you wrote:
V I did and got something similar to this, but was able to hack
V it with going to global scope by "/probe" instead of "probe".
Actually, it
Hi,all,
try following:
a: [ 1 2 3 4
5 6 7 8
]
b: c: copy []
foreach [d f] a [append b d append c f]
print b
result: 1 2 3 4 5 6 7 8
not 1 3 5 7
see also:
a: [ 1 2 3 4
5 6 7 8
]
b: c: copy []
foreach [d f] a [append b d append c f print d]
result: 1
3
5
7
gerry wrote:
Quote
Hi,all,
try following:
a: [ 1 2 3 4
5 6 7 8
]
b: c: copy []
foreach [d f] a [append b d append c f]
print b
result: 1 2 3 4 5 6 7 8
not 1 3 5 7
/Quote
b: copy []
== []
c: copy []
== []
foreach [d f] a [append b d append c f]
== [2 4 6 8]
print b
1 3 5 7
print c
Your statement b: c: [] causes b and c to be associated with the same block
so appending to b is the same as appending to c. If you want b and c to be
independent, use
b: copy [] c: copy []
(I haven't tested this, but it's the way I remember other discussions like
this.)
Russell [EMAIL
--
Erik Jorgensen
Programmer/Analyst - Principle
Customer Service and Support
Information Access Technology Services
University of Missouri - Columbia
(573) 882-5974
www.missouri.edu/~ccjorgie
[EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Warped minds think alike tried it but I get a windows write error!!?
(trying to write to a windows temp file)
--
Erik Jorgensen
Programmer/Analyst - Principle
Customer Service and Support
Information Access Technology Services
University of Missouri - Columbia
(573) 882-5974
25 matches
Mail list logo