Virtual Private Server (VPS) Hosting provided by Central Point Networking cpnllc.com
For some reason, the "Nodelist" and "Recent Callers" features are not working.
| Sysop: | Ray Quinn |
|---|---|
| Location: | Visalia, CA |
| Users: | 60 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 64:31:02 |
| Calls: | 12 |
| Files: | 12,938 |
| Messages: | 99,119 |
Check out the US 99 menu above for links to information about US Highway 99, after which the US 99 BBS is named.
Be sure to click on the Amateur Radio menu item above for packet BBSes, packet software, packet organizations, as well as packet how-to's. Also included is links to local and some not-so-local Amateur Radio Clubs.
One thing I've always wanted to implement was a bit of a
history section, keyed by date. These go out on Sunday
mornings, of course.
This batch would run at midnight utc on Sunday of course adn prepare
the history information, compiling into it a file
that the weekly email generator code would find.
One thing I've always wanted to implement was a bit of a
history section, keyed by date. These go out on Sunday
mornings, of course.
This batch would run at midnight utc on Sunday of course adn prepare
the history information, compiling into it a file that the weekly
email generator code would find.
So, taking this Sunday's for example, the batch would look
in a defined directory for files named 0115.txt; 0116.txt; 0117 ...
etc.
One thing I've always wanted to implement was a bit of a
history section, keyed by date. These go out on Sunday
mornings, of course.
Uh, huh.
This batch would run at midnight utc on Sunday of course adn prepare
the history information, compiling into it a file that the weekly
email generator code would find.
Okay, I want to look at your system... no scripting at this point...
The daily files consist of some sort of activity logs? The weeklies consist of a compilation for the previous week?
I would be looking at a system something similar to...
So, taking this Sunday's for example, the batch would look
in a defined directory for files named 0115.txt; 0116.txt; 0117 ...
etc.
Ermm... shouldn't that be 0108.txt; 0109.txt; 0110.txt... :)
(With the system I propose, those files won't be necessary. The
weekly file would be built-up during the week's daily operations.
They would still be available in the relevant archive if something
screws up, somewhere.)
Question. What happens Sunday 5 February, with the 30th & 31st of January's logging? Do they get caught up in "week0212.txt"?
I would be looking at a system something similar to...
DO that with station logs, but this is for the whole group.
The weekly file is mainly what vessels have used us and
that's already done.
There are a couple of sections that prepend all this
hwoever, and they're built as well to generate this email.
they're a "welcome newcomers" type section, a logistics, who needs
pinch hitters, etc. section, etc.
Okay, I want to look at your system... no scripting at this point...<snip>
The daily files consist of some sort of activity logs? The weeklies consist of a compilation for the previous week?
Ermm... shouldn't that be 0108.txt; 0109.txt; 0110.txt... :)
Yep, had to lose the leading 0 in single digit months anyway because
when HOrst's count does its thing it loses it. I'm
sure you saw that later.
Question. What happens Sunday 5 February, with the 30th & 31st of January's logging? Do they get caught up in "week0212.txt"?
There's a good example of what I've had to wrestle with for
this part of it. This thing will go out on January 29, as
usual, discussing anything of significance for Sunday the
29th, Monday the 30th, the 31st, Wednesday the 1st, 2nd, 3rd and
finally the 4th.
The "logging" part of this as I say is already done,
automagically, on the fly. What isn't and has required some manual intervention by me was looking through these little
text files to find historic trivia to stuff in there. For
example, had this been built last week it would have noted
that Thursday the 12th was the 2nd anniversary of the big
quake in Haiti. A few ham ops really used our network
services to get help to people who needed it. So that would of
course be in 112.txt, (was 0112.txt) and would have been
automagically posted in last Sunday's history section.
Except, I never got to looking through those last weekend,
hence doing the automation shuffle <g..
The whoel thing keys for number of days in a given month off a little
text file which contains that info which my system creates at the beginning of each month. Of course I have to edit it for leap years, since by default it assumes February has 28 days. So, it should be
quite happy rolling over as it's supposed to when invoked on 2/26.
The whoel thing keys for number of days in a given month off a
little text file which contains that info which my system
creates at the beginning of each month. Of course I have to edit
it for leap years, since by default it assumes February has 28
days.
The whole thing keys for number of days in a given month off a little
text file which contains that info which my system creates at the beginning of each month. Of course I have to edit it for leap years, since by default it assumes February has 28 days. So, it should be
quite happy rolling over as it's supposed to when invoked on 2/26.
You know, I was only thinking about this the other day. I had
thought to ask how the doo-hickey had operated during the rollover,
and was gonna prompt you. I'm glad you got in first. Thanks for
the update. :)
edit it for leap years, since by default it assumes February has
28 days.
you know that you can automatically handle this with a small bit of
math, right? i'd have to look at some code to make sure i state it correctly but leap years can be determined by current year div 4 but there's also a 400 involved...
this is why i need to take a sec later
on and look at the real formula... then you can have an array with
all of the month days count and automatically adjust FEB when it has
29 days ;)
even handle that one, so I figured I'd leave them with their version
of Jerry Springer dealing with her mother in the other room and bury myself in a programming project.
The whoel thing keys for number of days in a given month off a
little text file which contains that info which my system
creates at the beginning of each month. Of course I have to edit
it for leap years, since by default it assumes February has 28
days.
you know that you can automatically handle this with a small bit of
math, right? i'd have to look at some code to make sure i state it correctly but leap years can be determined by current year div 4 but there's also a 400 involved... this is why i need to take a sec
later on and look at the real formula... then you can have an array
with all of the month days count and automatically adjust FEB when
it has 29 days ;)
Hi! mark,
edit it for leap years, since by default it assumes February has
28 days.
you know that you can automatically handle this with a small bit of
math, right? i'd have to look at some code to make sure i state it correctly but leap years can be determined by current year div 4 but there's also a 400 involved...
I think the 400 test is for century years, like: 1900, 2000, 2100 &
so on.
this is why i need to take a sec later
on and look at the real formula... then you can have an array with
all of the month days count and automatically adjust FEB when it has
29 days ;)
How about a bit of something in some old Turbo-C...
--- 8< ---
int leap_yr_test(int test_yr)
/*
function determines if a given year is a leap year
Uses: 'test_yr' which is defined prior to function call
Pre: none
Post: a boolean value is returned indicating TRUE/FALSE
*/
{
/* local variables */
int result = FALSE;
switch (test_yr % 100)
{
case 0 : if ((test_yr % 400) == 0) result = TRUE; break;
default : if ((test_yr % 4) == 0) result = TRUE;
}
/* end switch. */
return(result);
}
/* end function. */
--- 8< ---
=:)
even handle that one, so I figured I'd leave them with their version
of Jerry Springer dealing with her mother in the other room and bury myself in a programming project.
I've gone one better, and have moved downstairs again for summer.
(The house is a 100-odd year old place, high-set, where the huge
shady area downstairs is about 5-6 degrees cooler than 'up there'...
and away from the womenfolk.)
These days I tend to play a lot with various virtual machines. Most
of the older DOS ones don't get used but the Windows ones, except
the WinXP box, run pretty much 24/7. Check out...
http://members.dodo.com.au/~colgilly/hideaway/Page.html (for some
of them.)
this is why i need to take a sec later on and look at the real
formula... then you can have an array with all of the month days
count and automatically adjust FEB when it has 29 days ;)
How about a bit of something in some old Turbo-C...
YEp, knew about the divisible by four part, just hadn't
played with that in the code that runs Feb 1 yet. Would
like to see that other formula when you find it. I'm sure
we could plug it in. TImo's batch calculator does some
interesting things.
YEp, knew about the divisible by four part, just hadn't
played with that in the code that runs Feb 1 yet. Would
like to see that other formula when you find it. I'm sure
we could plug it in. TImo's batch calculator does some
interesting things.
i just posted pascal code for it... the modulo arithmetic (aka clock
math) routine is needed for ease of coding... the full explanation
of how to determine a leapyear is contained in the comments at the
start of the code i posted...
How about a bit of something in some old Turbo-C...pretty neat... but it looks like it is missing something...
function leapyear( year : integer) : boolean; { Returns true if YEAR[ ...trim... ]
Reference : Introductory Astronomy and Astrophysics, page 61
By E. v. P. Smith and K. C. Jacobs - (C) 1973 W. B. Saunders Co.}
{ By Jud McCranie, Jan. 4, 1987 } { Revised Jan. 5, 1987 }
How about a bit of something in some old Turbo-C...
--- 8< ---
int leap_yr_test(int test_yr)
/*
function determines if a given year is a leap year
Uses: 'test_yr' which is defined prior to function call
Pre: none
Post: a boolean value is returned indicating TRUE/FALSE
*/
Ah so if one were to compile that does it give you an errorlevel if
true and another if false? test_yr easy to define, especially as an environment variable as in
logecho $C$Y | nset test_yr=$1 USes HOrst's logecho and nset.
<snip>How about a bit of something in some old Turbo-C...
--- 8< ---
int leap_yr_test(int test_yr)
/*
function determines if a given year is a leap year
Ah so if one were to compile that does it give you an errorlevel if
true and another if false? test_yr easy to define, especially as an environment variable as in
logecho $C$Y | nset test_yr=$1 USes HOrst's logecho and nset.
Nah. It's only a 'function' stub. You would need to wrap a main
program section around it, and call the function.
Have a look at a couple of other utils from Horst's archive.
There's one that might simplify the job called "what.com". Another
one that might help is "isdate.com". I haven't played with either,
so caveat emptor. ;-)
Have a look at a couple of other utils from Horst's archive.
There's one that might simplify the job called "what.com". Another
one that might help is "isdate.com". I haven't played with either,
so caveat emptor. ;-)
Just had a look at what.com from HOrst, used Timo's level to test[ ...trimmed... ]
waht it does when given the command
"what year"
I've got a year to play with that one, but I think that'll
do it!
Thanks for reminding me of those. I use some other tools
for handling day of the month, so never really looked at
either one that closely. I've got all of HOrst's little
tools on my dos path though, and the documentation handy,
just because i know there will be just the occasion when
they're the right tool <g>.
I've got a year to play with that one, but I think that'll
do it!
I had in mind something simple, like...
-+- 8< ---
WHAT day
IF ERRORLEVEL 1 GOTO NEWMONTH
:NEWMONTH
:: Do your processing for a following new month...
--- 8< ---
That way it doesn't matter what month, or whether the year is a leap
year or not, it just does a new week's worth of post-able notes over
the rollover period.