From daniel.richter at wimba.com Fri Oct 3 12:45:29 2003
From: daniel.richter at wimba.com (Dan Richter)
Date: Fri Oct 3 20:45:44 2003
Subject: [prog] Word processing interface in Java
Message-ID: <3F7D5349.5020906@wimba.com>
Java Swing provides many powerful, pluggable components. For example,
there's a virtually ready-made web browser. Does anyone know if there's
a component that provides a web-processing interface, that is, an
interface that allows a user to enter text of different sizes, colors, etc.?
Failing that, does anyone know of an open-source Java program that
provides such an interface?
--
Mr. McCain, on MSNBC's Hardball, described the two duties of the
U.S. Vice President: "One is to inquire daily as to the health
of the President, and the other is to go to Third World dictators'
funerals."
From ldb at swmbo.ca Sun Oct 5 12:37:41 2003
From: ldb at swmbo.ca (Linda de Boer)
Date: Mon Oct 6 02:37:52 2003
Subject: [prog] Word processing interface in Java
References: <3F7D5349.5020906@wimba.com>
Message-ID: <3F8048D5.9050707@swmbo.ca>
G'day
Is this what you might be looking for, or have I misunderstood...;-)
http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
Dan Richter wrote:
> Java Swing provides many powerful, pluggable components. For example,
> there's a virtually ready-made web browser. Does anyone know if there's
> a component that provides a web-processing interface, that is, an
> interface that allows a user to enter text of different sizes, colors,
> etc.?
>
> Failing that, does anyone know of an open-source Java program that
> provides such an interface?
>
--
ldb
From wolf at wolfrising.net Tue Oct 7 23:43:21 2003
From: wolf at wolfrising.net (Saint-Wolfe)
Date: Wed Oct 8 13:43:27 2003
Subject: [prog] hyperlinks and php
Message-ID: <90128EA6-F941-11D7-9F9F-000393071122@wolfrising.net>
Would anyone happen to know how to make this into an a href so that it
links to another php page?
this is the block of info that is called to a table on a web page:
|
|
|
|
|
|
|
the first line where it says $row_Grade['c_code'] I need to be a
hyperlink to this a page that calls this information
CourseDetails.php?code=$code&term=$term&year=$year&course=""
I thought maybe
was perhaps the answer but I keep getting error messages, can anyone
shed any light on this?
Thank you : )
And thanks to everyone who made recommendations for php books, picked
up a couple and they've
helped : ) But talk about swimming up stream : )
From jarich at perltraining.com.au Wed Oct 8 14:01:07 2003
From: jarich at perltraining.com.au (Jacinta Richardson)
Date: Wed Oct 8 14:01:09 2003
Subject: [prog] hyperlinks and php
In-Reply-To: <90128EA6-F941-11D7-9F9F-000393071122@wolfrising.net>
Message-ID:
On Tue, 7 Oct 2003, Saint-Wolfe wrote:
> Would anyone happen to know how to make this into an a href so that it
> links to another php page?
> the first line where it says $row_Grade['c_code'] I need to be a
> hyperlink to this a page that calls this information
> CourseDetails.php?code=$code&term=$term&year=$year&course=""
>
> I thought maybe
>
>
what you probably want is:
' . $row_Grad['c_code'] . '';
?>
although I might have misunderstood and you may not want
'&course=' . $row_Grad['c_code'] .
as you may want to leave course blank.
To set course to blank, just don't mention it. It's not particularly
easy to set it explicitly to empty string in a GET string. This is why
you often see code like:
if(defined $code && $code ne "")
{
}
although that's Perl, and the semantics in PHP may be subtly different.
> was perhaps the answer but I keep getting error messages, can anyone
> shed any light on this?
If this doesn't answer the question post more code and include your
error messages
All the best,
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
From jarich at perltraining.com.au Wed Oct 8 14:53:41 2003
From: jarich at perltraining.com.au (Jacinta Richardson)
Date: Wed Oct 8 14:53:45 2003
Subject: [prog] hyperlinks and php
In-Reply-To: <9F93DD32-F949-11D7-835A-0050E406BA04@wolfrising.net>
Message-ID:
On Wed, 8 Oct 2003, wolf wrote:
> Thank you for responding : )
G'day Wolf,
While I'm happy to help people I'd prefer to keep such correspondance on
the list as then everyone can learn. Please refer all questions to the
list rather than to me directly.
> >>
> >>
> >
> > what you probably want is:
> >
> > > echo '' . $row_Grad['c_code'] . '';
?>
How about you print the above URL to STDERR too and see what it's
building. As for the unexpected ; without seeing exactly how you used
my code (and I couldn't see it in your code) I can't even hazard a guess
why it's unhappy.
> I attached the php file, I don't really know which bits of code are
> important and which bits aren't
> to know what to include : )
If you don't know this then I'm probably not going to know either. Why
don't you see if you can approach the problem from another side and see
if you can get a simple script working and then when you know that that
works, see if you can incorporate the relevant pieces into your
script...? Something like this perhaps:
' . $row_Grad['c_code'] . '';
?>
If that works then you know the problem is somewhere else...
all the best,
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
From wolf at wolfrising.net Wed Oct 8 01:16:27 2003
From: wolf at wolfrising.net (Saint-Wolfe)
Date: Wed Oct 8 15:16:36 2003
Subject: [prog] hyperlinks and php
Message-ID: <91D25F07-F94E-11D7-9F9F-000393071122@wolfrising.net>
Thank you again : )
These were the changes I made and low and behold it now works : )
' . $row_Grade['c_code'] . '';
?>
I don't really know what caused the first error message, could always
just be my typing : )
From adeveloper at ukr.net Wed Oct 8 12:53:15 2003
From: adeveloper at ukr.net (Yaroslav Fedevych)
Date: Wed Oct 8 19:53:22 2003
Subject: [prog] Hacker's assistance needed
In-Reply-To: <91D25F07-F94E-11D7-9F9F-000393071122@wolfrising.net>
Message-ID:
At my work, there's a printer. It's that damn GDI printer that's marked "Paperweight" at linuxprinting.org, but my boss doesn't want to replace it for now. It's Lexmark Z23.
I've got a driver from Lexmark. Unfortunately, the newest driver is for US (as I suspect), because no matter what paper size you feed to it, it prints everything as on Letter paper (although it's in fact rescaled on an A4). However, it sucks less, but sucks, no matter what you do.
Finally, it's got itself to work as I want - I mean, to work at all. But sometimes I have to reinstall the software, as there is no point to tweak (z33 filter simply hangs itself sometimes). What I'm looking for is: did anyone ever reverse engineered output data for Lexmark Z23 printer, in order to write something of driver or utility for it? Lexmark has libraries (object only) for Z55, but I'm unaware of it's (in)compatibility with Z23-Z33. Maybe, if I ever decrypt printer commands, the new filter or Ghostscript device will appear... Dunno. But if someone ever did it, please let me know.
I have mixed feelings about Lexmark's native drivers and libraries. They suck. I don't know how and why. And if they work, I also don't know anything about it. Printer is OK, I've sent .out files to it and it worked. It is the filter that hangs mysteriously, from time to time, like M$ Windows does.
Thanks in advance.
From wolf at wolfrising.net Tue Oct 14 01:22:46 2003
From: wolf at wolfrising.net (Saint-Wolfe)
Date: Tue Oct 14 15:25:07 2003
Subject: [prog] mysql, php, arrays
Message-ID: <722D1F90-FE06-11D7-9EED-000393071122@wolfrising.net>
I have a select statement that produces these results
mysql> select s_code, term, year, c_code, dayname(date), status from
attendance where s_code=193586498 and term='fall' and year=2003 and
date between '2003-09-01'and '2003-09-05';
+-----------+------+------+--------+---------------+---------------+
| s_code | term | year | c_code | dayname(date) | status |
+-----------+------+------+--------+---------------+---------------+
| 193586498 | Fall | 2003 | cp105 | Tuesday | in attendance |
| 193586498 | Fall | 2003 | cp105 | Wednesday | in attendance |
| 193586498 | Fall | 2003 | cp105 | Thursday | in attendance |
| 193586498 | Fall | 2003 | cp105 | Friday | in attendance |
| 193586498 | Fall | 2003 | GE119 | Tuesday | in attendance |
| 193586498 | Fall | 2003 | GE119 | Thursday | in attendance |
| 193586498 | Fall | 2003 | HI200 | Tuesday | in attendance |
| 193586498 | Fall | 2003 | HI200 | Wednesday | in attendance |
| 193586498 | Fall | 2003 | HI200 | Thursday | in attendance |
| 193586498 | Fall | 2003 | HI200 | Friday | in attendance |
| 193586498 | Fall | 2003 | WP207 | Wednesday | in attendance |
| 193586498 | Fall | 2003 | WP207 | Thursday | in attendance |
| 193586498 | Fall | 2003 | WP207 | Friday | in attendance |
+-----------+------+------+--------+---------------+---------------+
13 rows in set (0.14 sec)
I need to get this into a table that looks something like this
+-----------+------+------+--------+---------------+---------------+
MWF-TuTh | mon | tues | wed | thur | fri
+-----------+------+------+--------+---------------+---------------+
8am in attendance in
attendance
and so on and so forth, I'm thinking it requires an array of some sort
perhaps?
any help would be appreciated, it's the last thing I have to finish to
escape this project : )
I think I have exhausted all dreamweaver use for php, but it does help
with the
small stuff : )
Thank you : )
From c.daly at met.ie Tue Oct 14 08:53:28 2003
From: c.daly at met.ie (Conor Daly)
Date: Tue Oct 14 19:38:04 2003
Subject: [prog] mysql, php, arrays
In-Reply-To: <722D1F90-FE06-11D7-9EED-000393071122@wolfrising.net>
References: <722D1F90-FE06-11D7-9EED-000393071122@wolfrising.net>
Message-ID: <20031014085328.GA31195@bofh.irmet.ie>
On Tue, Oct 14, 2003 at 01:22:46AM -0400 or thereabouts, Saint-Wolfe wrote:
> I have a select statement that produces these results
>
> mysql> select s_code, term, year, c_code, dayname(date), status from
> attendance where s_code=193586498 and term='fall' and year=2003 and
> date between '2003-09-01'and '2003-09-05';
>
> I need to get this into a table that looks something like this
> +-----------+------+------+--------+---------------+---------------+
>
> MWF-TuTh | mon | tues | wed | thur | fri
> +-----------+------+------+--------+---------------+---------------+
> 8am in attendance in
> attendance
All you need for your table is a count of days in attendance rather than all
you've asked for. Something like:
select dayname(date), count(*) from attendance
where date between '2003-09-01'and '2003-09-05'
group by dayname(date);
will give you a list like:
Tuesday | 3
Wednesday | 2
Thursday | 3
Friday | 1
Now all you need is to parse that and print in your horizontal format. Of
course, you need to handle 's_code' also. Once you start building pivot
tables, sql isn't enough and you have to start looking at a program. I
found it best to use sql to get your first example as output to file and
then use a separate program to do the pivat table bit on the datafile.
Conor
--
Conor Daly
Met Eireann, Glasnevin Hill, Dublin 9, Ireland
Ph +353 1 8064276 Fax +353 1 8064247
------------------------------------
bofh.irmet.ie running RedHat Linux 08:47:00 up 39 days, 22:11, 13 users, load average: 0.00, 0.10, 0.09
**********************************************************************
This e-mail and any files transmitted with it are confidential
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.
**********************************************************************
From suzo at bigpond.net.au Wed Oct 15 22:38:41 2003
From: suzo at bigpond.net.au (Sue Stones)
Date: Wed Oct 15 22:33:28 2003
Subject: [prog] VRML and Linux
Message-ID: <200310152238.41301.suzo@bigpond.net.au>
I am looking for a VRMLviewer for linux, so far I have found a few that are in
early stages of developement, (though seem to have been in the same state for
some years!) but there have been problems trying to get them to install on my
system (Mandrake 9.1).
Does anyone have a VRML veiwer working, can you tell me where to obtain it?
And were there any problems with installation.
Once that is organised I will want to try and learn VRML, I know that there
are some VRML modellers on developement/ or available. WHat do you think of
these? Are they worth the trouble, is it easier/better to start with doing
things by hand. (This is my inclination, but I don't know what I am doing
and the book that I have doesn't address these issues!)
thanks
sue
From wolf at wolfrising.net Thu Oct 16 17:55:59 2003
From: wolf at wolfrising.net (Saint-Wolfe)
Date: Fri Oct 17 07:56:07 2003
Subject: [prog] code assistance
Message-ID: <86D20E1D-0023-11D8-BDA8-000393071122@wolfrising.net>
I am very much a php newbie, but trying to follow advice and few books
I've come up with this.
I have some php code I'm trying to get to work, it does properly draw
the table, except somewhere the code
is incorrect because it returns no results. Here is what it should
populate the table with:
mysql> select s_code as student_number, term, year, UPPER(c_code) as
course, dayname(date) AS date, period, status from attendance where
s_code=193586498 and term='Fall' and year=2003 and date between
'2003-09-01'and '2003-09-05';
+----------------+------+------+--------+-----------+--------
+---------------+
| student_number | term | year | course | date | period | status
|
+----------------+------+------+--------+-----------+--------
+---------------+
| 193586498 | Fall | 2003 | CP105 | Tuesday | 2 | in
attendance |
| 193586498 | Fall | 2003 | CP105 | Wednesday | 2 | in
attendance |
| 193586498 | Fall | 2003 | CP105 | Thursday | 2 | in
attendance |
| 193586498 | Fall | 2003 | CP105 | Friday | 2 | in
attendance |
| 193586498 | Fall | 2003 | GE119 | Tuesday | 3 | in
attendance |
| 193586498 | Fall | 2003 | GE119 | Thursday | 3 | in
attendance |
| 193586498 | Fall | 2003 | HI200 | Tuesday | 5 | in
attendance |
| 193586498 | Fall | 2003 | HI200 | Wednesday | 5 | in
attendance |
| 193586498 | Fall | 2003 | HI200 | Thursday | 5 | in
attendance |
| 193586498 | Fall | 2003 | HI200 | Friday | 5 | in
attendance |
| 193586498 | Fall | 2003 | WP207 | Wednesday | 6 | in
attendance |
| 193586498 | Fall | 2003 | WP207 | Thursday | 6 | in
attendance |
| 193586498 | Fall | 2003 | WP207 | Friday | 6 | in
attendance |
+----------------+------+------+--------+-----------+--------
+---------------+
does anyone happen to see any obvious mistakes?
here's the code:
// prime grid
for($i = 0;$i < 5; $i++) {
for($j = 0; $j < 8; $j++) {
for($k = 0; $k < 1; $k++) { // two cells per period per day
$grid[$i][$j][$k] = "";
}
}
}
// build query
$query = "select s_code, term, year, UPPER(c_code) as course,
dayname(date) AS date, period, status from attendance where
s_code=193586498 and term='Fall' and year=2003 and date between
'2003-09-01'and '2003-09-05'";
// retrieve result set
$result = mysql_db_query("db",$query);
//$numrows = mysql_num_rows($result);
// loop thru result
for($crow = 0; $crow < $numrows; $crow++) {
$res_array = mysql_fetch_assoc($result);
$period=$res_array['period'];
$status = $res_array['status'];
//$sch = str_pad($attendance, 64, "0", STR_PAD_LEFT);
// echo $course . " - " . $sch. "\n";
for($i = 0;$i < 5; $i++) {
for($j = 0; $j < 8; $j++) {
//if (substr($sch,(strlen($sch) - ($i * 8 + $j) - 1),1) == "1") {
if ( $grid[$i][$j][0] != "") { // another course scheduled for same
period
$grid[$i][$j][1] = $status;
} else {
$grid[$i][$j][0] = $status;
}
}
}
}
?>
Screen
// load periods into array
$per[0] = "8:30 / 8:30";
$per[1] = "9:30 / 9:20";
$per[2] = "10:30 / 10:10";
$per[3] = "11:30 / 11:00";
$per[4] = "12:30 / 12:55";
$per[5] = "1:30 / 1:45";
$per[6] = "2:30 / 2:35";
$per[7] = "3:30 / 3:30";
$per[8] = "4:30 / 4:30";
?>
MThF / TuWed |
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
\n");
print("" . $per[$j] . " | ");
for( $i =0;$i <5;$i ++) {
print("\n");
if ($grid[$i][$j][0] == "") {
echo " ";
} else {
echo $grid[$i][$j][0];
}
print(" | \n");
}
print("\n");
}
//print("
\n");
?>
From anthony at vsdtech.com Thu Oct 16 15:44:44 2003
From: anthony at vsdtech.com (Anthony Gorecki)
Date: Fri Oct 17 08:48:12 2003
Subject: [prog] code assistance
In-Reply-To: <86D20E1D-0023-11D8-BDA8-000393071122@wolfrising.net>
References: <86D20E1D-0023-11D8-BDA8-000393071122@wolfrising.net>
Message-ID: <200310161544.45371.anthony@vsdtech.com>
On Thursday 16 October 2003 2:55 pm, Saint-Wolfe wrote:
> I am very much a php newbie, but trying to follow advice and few books
> I've come up with this.
--snip--
At first glance I don't see any problems with how you're retrieving the
information from the database, but you seem to have commented out a required
piece of code before you start printing all of the data:
// retrieve result set
$result = mysql_db_query("db",$query);
//$numrows = mysql_num_rows($result);
// loop thru result
for($crow = 0; $crow < $numrows; $crow++) {
Without having $numrows set, the for loop is never executed, which in turn
results in you having no data to output to your table. Hope that helps.
--
Best Regards,
Anthony Gorecki
VSD Technologies
From wolf at wolfrising.net Thu Oct 16 22:21:47 2003
From: wolf at wolfrising.net (Saint-Wolfe)
Date: Fri Oct 17 12:27:59 2003
Subject: [prog] Re: code assistance
Message-ID:
I think in the loop I need some sort of additional if statement to tell
it which row to choose, would anyone
happen to know how to construct this if statement?
// loop thru result
for($crow = 0; $crow < $numrows; $crow++) {
$res_array = mysql_fetch_assoc($result);
$period=$res_array['period'];
$status = $res_array['status'];
for($i = 0;$i < 5; $i++) {
for($j = 0; $j < 8; $j++) {
<--------------------- need additional if statement here?
if ( $grid[$i][$j][0] != "") {
} else {
$grid[$i][$j][0] = $status;
}
}
}
}
Full Code below if needed
$query = "select s_code, term, year, UPPER(c_code) as course,
dayname(date) AS date, period, status from attendance where
s_code=193586498 and term='Fall' and year=2003 and date between
'2003-09-01'and '2003-09-05'";
// retrieve result set
$result = mysql_db_query("db",$query);
$numrows = mysql_num_rows($result);
// loop thru result
for($crow = 0; $crow < $numrows; $crow++) {
$res_array = mysql_fetch_assoc($result);
$period=$res_array['period'];
$status = $res_array['status'];
for($i = 0;$i < 5; $i++) {
for($j = 0; $j < 8; $j++) {
if ( $grid[$i][$j][0] != "") {
} else {
$grid[$i][$j][0] = $status;
}
}
}
}
?>
Screen
// load periods into array
$per[0] = "8:30 / 8:30";
$per[1] = "9:30 / 9:20";
$per[2] = "10:30 / 10:10";
$per[3] = "11:30 / 11:00";
$per[4] = "12:30 / 12:55";
$per[5] = "1:30 / 1:45";
$per[6] = "2:30 / 2:35";
$per[7] = "3:30 / 3:30";
$per[8] = "4:30 / 4:30";
?>
MThF / TuWed |
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
\n");
print("" . $per[$j] . " | ");
for( $i =0;$i <5;$i ++) {
print("\n");
if ($grid[$i][$j][0] == "") {
echo " ";
} else {
echo $grid[$i][$j][0];
}
print(" | \n");
}
print("\n");
}
//print("
\n");
?>
From petzold at villa-chaos.de Sat Oct 18 14:46:10 2003
From: petzold at villa-chaos.de (Wolfgang Petzold)
Date: Sat Oct 18 22:48:54 2003
Subject: [prog] VRML and Linux
In-Reply-To: <200310152238.41301.suzo@bigpond.net.au>
Message-ID:
> I am looking for a VRMLviewer for linux, so far I have found a few that are in
> early stages of developement, (though seem to have been in the same state for
> some years!) but there have been problems trying to get them to install on my
> system (Mandrake 9.1).
There's a quite long list of viewers at .
Anyway, the number of browsers that run with linux seems to be about three
or four:
FreeWRL
Coin3D
VRWave
And there's Casus Presenter from Fraunhofer Institute for Computer
Graphics which requires a (non-free) license
for OpenInventor. The link to OpenInventor they provide leads to a 404
page, anyway...
I have to say that I don't know anything to say about the mentioned
browsers; it was quite a while ago when I took the VRML course at my
university, and they seemed to have accepted that graphics software mostly
focused on W*nd*ws platforms back then.
Cheers
Wolfgang
From kat_lists at katspace.com Wed Oct 22 08:41:41 2003
From: kat_lists at katspace.com (Kathryn Andersen)
Date: Wed Oct 22 08:17:36 2003
Subject: [prog] Ideas for a script
Message-ID: <20031021224141.GA28696@katspace.com>
I'm thinking of starting a mailing list which has "dues" in it, and I'd
like to write a (Perl) script(s) to keep track of the individual dates that
people's dues are due, email them reminders, and email me if they are
overdue, so that I can unsubscribe them. And also have an easy way of
updating the data with (a) new subscribers and (b) updating when people
*did* post their dues, so that the script won't remind them if they've
already posted. And also keep track of people who have just left, so
that they can't get around the dues requirement by unsubscribing when
they're due and then resubscribing afterwards.
I'd like to have as much of this automated as possible.
Got any ideas as to how I should structure this, any helpful modules and
so on? Thanks.
Kathryn Andersen
-=-=-=-=-=-=-=-=-
Programming is one of the most difficult branches of applied mathematics;
the poorer mathematicians had better remain pure mathematicians.
-- Prof. Dr. Edsger W. Dijkstra (June 1975)
--
_--_|\ | Kathryn Andersen
/ \ |
\_.--.*/ | GenFicCrit mailing list
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
From kat_lists at katspace.com Fri Oct 24 13:49:28 2003
From: kat_lists at katspace.com (Kathryn Andersen)
Date: Fri Oct 24 13:31:48 2003
Subject: [prog] Ideas for a script
In-Reply-To: <20031021224141.GA28696@katspace.com>
References: <20031021224141.GA28696@katspace.com>
Message-ID: <20031024034928.GA7992@katspace.com>
On Wed, Oct 22, 2003 at 08:41:41AM +1000, Kathryn Andersen wrote:
> I'm thinking of starting a mailing list which has "dues" in it, and I'd
> like to write a (Perl) script(s) to keep track of the individual dates that
> people's dues are due, email them reminders, and email me if they are
> overdue, so that I can unsubscribe them. And also have an easy way of
> updating the data with (a) new subscribers and (b) updating when people
> *did* post their dues, so that the script won't remind them if they've
> already posted. And also keep track of people who have just left, so
> that they can't get around the dues requirement by unsubscribing when
> they're due and then resubscribing afterwards.
> I'd like to have as much of this automated as possible.
>
> Got any ideas as to how I should structure this, any helpful modules and
> so on? Thanks.
Now, someone wrote me privately but I think they meant to go to the
list, asking...
>Could you please give us an example? Like where you want to fetch the
>data from.....etc.
And my answer is -- it's all up in the air, isn't it? The data has to
be put *in* before it's fetched *out*, which means the data could be in
any form I choose to make it, depending on what seems to best suit the
task -- whether it's better in a flat file, in XML file, or in an SQL
database. While the mailing list is being run on a free server over
which I have no control, I'm intending this script suite to run on
my Linux box, which means I have a lot of choice as to what to do it
with. I've already got Postgres up and running for another database,
but I'm not sure that using Postgres for this wouldn't just be overkill,
and whether a flat file might be better. Not sure. Since comparing
dates is involved, then maybe a full database would be better, or maybe
just a good date module.
I don't know! Which is why I'm asking for advice.
The tasks needed to be done are as follows:
A) input mailing list member information. This might be done by hand,
or by parsing a "a new member had joined" email which I as the
list-owner would be sent. This would add to the data (whether database
or flat file)
B) input when a mailing list member has posted their dues. It would be
nice if this could be done by parsing the list mail in which they sent
their dues -- it wouldn't be hard to declare that all dues mail must
have "DUES" in the subject or something like that
C) a nightly cron job calls a script which
a) checks the dues data and emails the list member a week (or some
other period) before their dues are due
b) checks the dues data and emails the list owner informing that a
particular list member's dues are overdue.
D) a script to either delete or mark as left, those members who
are no longer members.
It would also be nice if one could put exemptions and extensions into
the data (file/table), so that the script doesn't make me look like a
list-nazi.
Kathryn Andersen
-=-=-=-=-=-=-=-=-
"Part of a dream is better than none."
-- Harriman Gray, "Eyes" (Babylon 5)
--
_--_|\ | Kathryn Andersen
/ \ |
\_.--.*/ | GenFicCrit mailing list
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
From rachel at xtreme.com Thu Oct 23 21:32:04 2003
From: rachel at xtreme.com (Rachel McConnell)
Date: Fri Oct 24 14:35:56 2003
Subject: [prog] Ideas for a script
In-Reply-To: <20031024034928.GA7992@katspace.com>
Message-ID: <031d01c399e7$ccdebb70$1201010a@qbert>
> -----Original Message-----
> From: programming-bounces@linuxchix.org
> [mailto:programming-bounces@linuxchix.org] On Behalf Of
> Kathryn Andersen
> Sent: Thursday, October 23, 2003 8:49 PM
[...]
> with. I've already got Postgres up and running for another database,
> but I'm not sure that using Postgres for this wouldn't just
> be overkill, and whether a flat file might be better. Not
I have always found that the 'overkill' part of using a database is the
setup part, and the learning how to talk to it. If you've already got
one running, and are familiar with how to access it, I'd say, why not?
It's much cleaner (imho) than mucking around with parsing flat file text
data, even XML formatted text. Plus SQL is fun!
Rachel
From acknak_halflife at yahoo.co.uk Thu Oct 30 01:08:22 2003
From: acknak_halflife at yahoo.co.uk (Noir)
Date: Thu Oct 30 00:01:15 2003
Subject: [prog] Java Confusions!
Message-ID: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
I have spent about an hour at [http://java.sun.com/linux/] & now I am
really perplexed.
I want to write simple Java codes & do network level programming using Java
& am wondering what to download.
Seems like there are 3 options: J2SE, J2EE & J2SDK.
Can anyone point me to the right direction?
---
Noir
From hamster at hamsternet.org Wed Oct 29 15:16:58 2003
From: hamster at hamsternet.org (Hamster)
Date: Thu Oct 30 00:14:18 2003
Subject: [prog] Java Confusions!
In-Reply-To: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
References: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
Message-ID: <20031029141658.78856290.hamster@hamsternet.org>
On Thu, 30 Oct 2003 00:08:22 +1100
Noir wrote:
> I want to write simple Java codes & do network level programming using
> Java & am wondering what to download.
>
> Seems like there are 3 options: J2SE, J2EE & J2SDK.
I suspect you need the SDK (software development kit). I'm not 100% sure
though, so if someone else tells you to download something else, believe
them!! :-)
Hamster
From rasjidw at openminddev.net Thu Oct 30 01:46:22 2003
From: rasjidw at openminddev.net (Rasjid Wilcox)
Date: Thu Oct 30 00:47:13 2003
Subject: [prog] Java Confusions!
In-Reply-To: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
References: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
Message-ID: <200310300046.22019.rasjidw@openminddev.net>
On Thursday 30 October 2003 00:08, Noir wrote:
> I have spent about an hour at [http://java.sun.com/linux/] & now I am
> really perplexed.
>
> I want to write simple Java codes & do network level programming using Java
> & am wondering what to download.
>
> Seems like there are 3 options: J2SE, J2EE & J2SDK.
>
> Can anyone point me to the right direction?
I would simply get the J2SE SDK.
http://java.sun.com/j2se/1.4.2/download.html
You definitely want the SDK (not the JRE), and if you want a native Java IDE
and you don't mind a somewhat bigger download, get the NetBeans IDE with J2SE
cobundle.
My understanding is that J2EE is for distributed application programming, and
(someone please correct me if I'm wrong) similar to the .NET concept.
(Actually, that is probably completely unfair, as I'm pretty sure that the
java distributed model predates .NET - it is just the .NET was marketed
better. No suprises there.)
I think each package is basically a superset of the previous. ie, the J2SE
SDK contains the JRE, plus all the things you need to make java class files.
The J2EE contains the J2SE, plus extra things to make distribued application
programming easier.
Of course, I could be completely mistaken... (I haven't really played with
Java for a while. I saw the Python light instead.)
Cheers,
Rasjid.
--
Rasjid Wilcox
Canberra, Australia (UTC +10 hrs)
http://www.openminddev.net
From bnorum at coe.neu.edu Wed Oct 29 10:05:14 2003
From: bnorum at coe.neu.edu (Becky L. Norum)
Date: Thu Oct 30 01:33:04 2003
Subject: [prog] Java Confusions!
In-Reply-To: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
Message-ID:
On Thu, 30 Oct 2003, Noir wrote:
> I have spent about an hour at [http://java.sun.com/linux/] & now I am
> really perplexed.
> Can anyone point me to the right direction?
Noir,
Afaik, J2SE and J2SDK are basically synonymous. Perhaps someone else can
comment. J2EE includes enterprise Java APIs (application programming
interfaces) and isn't necessary unless you start getting into server-side
web programming, web services, etc.
For basic Java programming , download J2SE 1.4.2
(http://java.sun.com/j2se/1.4.2/download.html).
Then I'd recommend the online tutorial at:
http://java.sun.com/docs/books/tutorial/
Regards,
Becky
From rachel at xtreme.com Wed Oct 29 08:53:51 2003
From: rachel at xtreme.com (Rachel McConnell)
Date: Thu Oct 30 02:57:27 2003
Subject: [prog] Java Confusions!
In-Reply-To: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
Message-ID: <020a01c39e34$d95aa430$1201010a@qbert>
> -----Original Message-----
> [mailto:programming-bounces@linuxchix.org] On Behalf Of Noir
>
> I want to write simple Java codes & do network level
> programming using Java
> & am wondering what to download.
>
> Seems like there are 3 options: J2SE, J2EE & J2SDK.
>
As Hamster suggested, yes you need the J2SDK if you are going to do
actual programming, as opposed to just running a program written in Java
- for which the J2SE is sufficient. And J2EE (Enterprise Edition) is
unneccessary for simple stuff, in fact there is a growing body of
opinion that it's unneccessary at all ;)
Not surprised either that java.sun.com has confused you, it always takes
me 3 times as long as it ought to to find stuff there as well. As a
result I have lots of java.sun.com bookmarks.
One other thing of note. In order to run any java programs, you need to
include the bin directory of where you installed java in your path. The
usual way is to set a JAVA_HOME variable in your environment, pointing
to the directory you installed java in, and put %JAVA_HOME%/bin in your
path. A number of very useful tools (such as ant, a jakarta.apache.org
build tool) require JAVA_HOME although it's not Officially required by
Java itself.
Rachel
From acknak_halflife at yahoo.co.uk Thu Oct 30 09:34:35 2003
From: acknak_halflife at yahoo.co.uk (Noir)
Date: Thu Oct 30 08:29:15 2003
Subject: [prog] Java Confusions!
In-Reply-To: <020a01c39e34$d95aa430$1201010a@qbert>
References: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
<020a01c39e34$d95aa430$1201010a@qbert>
Message-ID: <6.0.0.22.0.20031030083125.022761c0@pop.mail.yahoo.co.uk>
At 02:53 AM 10/30/2003, Rachel McConnell wrote:
> > -----Original Message-----
> > [mailto:programming-bounces@linuxchix.org] On Behalf Of Noir
>As Hamster suggested, yes you need the J2SDK if you are going to do
>actual programming, as opposed to just running a program written in Java
>- for which the J2SE is sufficient. And J2EE (Enterprise Edition) is
>unneccessary for simple stuff, in fact there is a growing body of
>opinion that it's unneccessary at all ;)
Hamster, Rasjid, Cindy, Becky, Rachel - thank you all for your quick
response. Much appreciated!
Regards
---
Noir
From ckpwong at letterboxes.org Wed Oct 29 10:05:56 2003
From: ckpwong at letterboxes.org (Cindy Wong)
Date: Thu Oct 30 08:35:26 2003
Subject: [prog] Java Confusions!
In-Reply-To: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
References: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
Message-ID: <3F9FC944.2070909@letterboxes.org>
Noir wrote:
> I have spent about an hour at [http://java.sun.com/linux/] & now I am
> really perplexed.
>
> I want to write simple Java codes & do network level programming using
> Java & am wondering what to download.
>
> Seems like there are 3 options: J2SE, J2EE & J2SDK.
>
> Can anyone point me to the right direction?
FYI, there's also J2ME. ;)
The three flavours of Java:
* J2SE - The basis of all things Java. If you're trying to write or run
desktop applications or applets, this is the flavour for you.
* J2EE - Think of it as the enterprise extension of regular Java,
because it cannot exists on its own and requires J2SE installed.
You'll need it if you're writing/running Servlets, EJB or JSP. If you
have no idea what these are, then you don't need it. =)
* J2ME - This is more like a stripped down version of J2SE, intended for
mobile devices and devices with small computing power and resources.
Again, if you don't know, then you don't need it. =)
Since you're not doing anything in the enterprise level or for mobile,
J2SE is the flavour you're looking for.
Now the flavour part is settled, you're left with two choices: the J2SE
runtime (aka JRE) or J2SE SDK (aka J2SDK).
* JRE - contains all the required components for *running* J2SE
programs. Most desktop systems already have one version of JRE or
another installed, because it is required to view those annoying
animated Java applet banners in your browser. =) JRE, however, does
not come with any tools for authoring Java programs.
* J2SDK - contains all things included in JRE, plus the applications
required to compile Java source into bytecode (i.e., the runnable
Java programs).
Now since you're trying to do some Java programming, you should get the
J2SDK.
You may also want to try a Java IDE. Currently there are three free
Java IDEs that are worth trying:
* Borland JBuilder Personal Edition is a free (beer) IDE. It does not
contain any J2EE support, but that's not your concern now so it's OK.
I particularly like the drag and drop GUI builder. You can download
it from Borland (http://www.borland.com/).
* Eclipse is an IBM-backed open source IDE. It is supposed to be the
successor for VisualAge. It's more resource-intensive than JBuilder,
but more flexible and supports more (programming) languages through
the use of plug-ins. The built-in CVS support is particularly useful.
Get it at http://www.eclipse.org/
* NetBeans is a Sun-backed open source IDE. The basis of Sun ONE
Studio. I tried it quite some time ago and I remember choosing
Eclipse over NetBeans, but the reasons have already been forgotten. ;)
It's available at http://www.netbeans.org/
My $0.02
Cindy
From millward at Ms.UManitoba.CA Wed Oct 29 17:52:52 2003
From: millward at Ms.UManitoba.CA (ed orphan)
Date: Thu Oct 30 09:50:36 2003
Subject: [prog] ncurses forms library
Message-ID: <200310292250.h9TMoHL1029082@naos.cc.umanitoba.ca>
Can anyone clarify for me just how the user's
data is collected by the program when using
the ncurses forms library?
I've got the Ncurses Programming HOWTO by
Pradeep Padala. It's full of good information,
but I can't figure out exactly how to gather
the information the user supplies to the form
so I can verify it and store it in a linked-list.
Can anyone give me example code or
point me to a souce for example code which
uses the ncurses forms library to gather data,
process the data, and store it for further use?
From rachel at xtreme.com Wed Oct 29 16:37:17 2003
From: rachel at xtreme.com (Rachel McConnell)
Date: Thu Oct 30 10:41:49 2003
Subject: [prog] Java Confusions!
In-Reply-To: <3F9FC944.2070909@letterboxes.org>
Message-ID: <02bb01c39e75$96c067e0$1201010a@qbert>
> -----Original Message-----
> From: programming-bounces@linuxchix.org
> [mailto:programming-bounces@linuxchix.org] On Behalf Of Cindy Wong
> Sent: Wednesday, October 29, 2003 6:06 AM
[...]
> The three flavours of Java:
>
> * J2SE - The basis of all things Java. If you're trying to
> write or run
> desktop applications or applets, this is the flavour for you.
> * J2EE - Think of it as the enterprise extension of regular Java,
> because it cannot exists on its own and requires J2SE installed.
> You'll need it if you're writing/running Servlets, EJB or
> JSP. If you
> have no idea what these are, then you don't need it. =)
> * J2ME - This is more like a stripped down version of J2SE,
> intended for
> mobile devices and devices with small computing power and
> resources.
> Again, if you don't know, then you don't need it. =)
[...]
One small correction here, you do not need J2EE to write servlets or JSP
(Java Server Pages) - J2SE contains all the required libraries for
(non-distributed) web applications. You do need J2EE for EJB
(Enterprise Java Beans). But as Cindy truly points out, if you don't
know what EJB is (are), you don't need them OR J2EE.
Rachel
From jenn at anthill.echidna.id.au Thu Oct 30 15:13:53 2003
From: jenn at anthill.echidna.id.au (Jenn Vesperman)
Date: Thu Oct 30 14:13:57 2003
Subject: [prog] Java Confusions!
In-Reply-To: <200310300046.22019.rasjidw@openminddev.net>
References: <6.0.0.22.0.20031030000227.02276e90@pop.mail.yahoo.co.uk>
<200310300046.22019.rasjidw@openminddev.net>
Message-ID: <1067483632.2127.10.camel@pharaoh.anthill>
On Thu, 2003-10-30 at 00:46, Rasjid Wilcox wrote:
> On Thursday 30 October 2003 00:08, Noir wrote:
> > I have spent about an hour at [http://java.sun.com/linux/] & now I am
> > really perplexed.
> >
> > I want to write simple Java codes & do network level programming using Java
> > & am wondering what to download.
> >
> > Seems like there are 3 options: J2SE, J2EE & J2SDK.
> >
> > Can anyone point me to the right direction?
SDK: software development kit.
EE: enterprise edition (Which always make me wonder what sort of
enterprise - and if its number is NCC1701)
SE: standard edition.
The only difference I've seen between SE and EE is that EE has some
libraries that SE doesn't.
Therefore, if you need a sockets library and SE doesn't have it, look in
the EE library docs. If EE has it and you need it, you need EE. If not,
SE will do.
Jenn V.
--
"Do you ever wonder if there's a whole section of geek culture
you miss out on by being a geek?" - Dancer.
My book 'Essential CVS': published by O'Reilly in June 2003.
jenn@anthill.echidna.id.au http://anthill.echidna.id.au/~jenn/
From c.daly at met.ie Fri Oct 24 11:51:05 2003
From: c.daly at met.ie (Conor Daly)
Date: Thu Oct 30 19:50:44 2003
Subject: [prog] mysql, php, arrays
In-Reply-To: <097BDCD5-FEAD-11D7-9CE9-0050E406BA04@wolfrising.net>
References: <20031014085328.GA31195@bofh.irmet.ie>
<097BDCD5-FEAD-11D7-9CE9-0050E406BA04@wolfrising.net>
Message-ID: <20031024115105.GB23961@bofh.irmet.ie>
On Tue, Oct 14, 2003 at 09:15:17PM -0400 or thereabouts, wolf wrote:
> what is a pivat table and what program is needed? it just happens this
> student was in attendance
> for all days, status can also report back absent or late.
A pivot (note spelling, my fault, I spelled it wrongly in the first place)
table is the result of comparing some property of a pair of columns of data.
For example, you have a lecture timetable in a list thus:
Subject Day Time Room
Math Monday 0900 12
DBMS Monday 1000 7
Hardware Monday 1100 13
DBMS Tuesday 1300 7
Comms Tuesday 1500 Lab1
Lab Thurs 1300 Lab2
Lab Thurs 1400 Lab2
Lab Thurs 1500 Lab2
Math Friday 1200 3
Hardware Monday 1000 7
not so easy to check as you dash down the corridor. If you create a pivot
table of Subject on Day and Time, you get:
0900 1000 1100 1200 1300 1400 1500
Mon Math DBMS Hardware
Tue DBMS COMMS
Wed
Thu Lab Lab Lab
Fri Math
And a pivot table of frequency of time and room gets you:
Monday 0900 1000 1100 1200 1300 1400 1500
1
2
3
7 2
12 1
13 1
Lab1
Lab2
Which shows you that you have accidentally scheduled two different classes
to use room 7 at 1000 on Monday.
So, in your case, you have a list of student ID, day and count of attendance
thus:
Student Day In
801 Mon 2
801 Tue 1
801 Wed 2
801 Thu 2
822 Mon 2
822 Wed 2
822 Thu 2
822 Fri 2
:
:
:
A pivot table of attendance on Student, Day gives you:
Mon Tue Wed Thu Fri
801 2 1 2 2
822 2 2 2 2
837 2 2 2 2 2
923 1 1 1 2 2
Now you see that student 801 skipped one Tuesday and has no classes on
Friday, 822 has nothing on a Tuesday, 837 missed nothing while 923 was out
sick for 3 days running.
Apologies for the delay in replying...
Conor
--
Conor Daly
Met Eireann, Glasnevin Hill, Dublin 9, Ireland
Ph +353 1 8064276 Fax +353 1 8064247
------------------------------------
bofh.irmet.ie running RedHat Linux 11:32:48 up 50 days, 56 min, 17 users, load average: 0.00, 0.00, 0.00
**********************************************************************
This e-mail and any files transmitted with it are confidential
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.
**********************************************************************
From lizzy at soggytrousers.net Thu Oct 30 06:39:26 2003
From: lizzy at soggytrousers.net (Elizabeth Barham)
Date: Thu Oct 30 22:40:13 2003
Subject: [prog] ncurses forms library
In-Reply-To: ed orphan's message of "Wed, 29 Oct 2003 16:52:52 -0600"
References: <200310292250.h9TMoHL1029082@naos.cc.umanitoba.ca>
Message-ID: <871xsvt0nl.fsf@liliwhite.renaissance.oasis>
You can use field_buffer to pull the data out of the field:
buff = field_buffer(field[0], 0);
assert(buff != 0);
printf("value: %s\n", buff);
where field[0] was assigned to earlier as:
field[0] = new_field(1, 10, 4, 18, 0, 0);
Elizabeth
From bnorum at coe.neu.edu Thu Oct 30 09:53:33 2003
From: bnorum at coe.neu.edu (Becky L. Norum)
Date: Fri Oct 31 01:22:47 2003
Subject: [prog] Java Confusions!
In-Reply-To: <02bb01c39e75$96c067e0$1201010a@qbert>
Message-ID:
On Wed, 29 Oct 2003, Rachel McConnell wrote:
> One small correction here, you do not need J2EE to write servlets or JSP
> (Java Server Pages) - J2SE contains all the required libraries for
> (non-distributed) web applications. You do need J2EE for EJB
> (Enterprise Java Beans). But as Cindy truly points out, if you don't
> know what EJB is (are), you don't need them OR J2EE.
You are correct that you don't _need_ J2EE for servlets and JSPs, but they
aren't included in J2SE, which is only the core Java classes. To use them
you need to download an extra implementation of those functionalities, which
are included in J2EE or could be used from a web server/application server
implementing those APIs, for example Tomcat (http://jakarta.apache.org/tomcat),
Resin, Weblogic, etc.
Regards,
Becky
From lizzy at soggytrousers.net Fri Oct 31 23:18:29 2003
From: lizzy at soggytrousers.net (Elizabeth Barham)
Date: Sat Nov 1 15:19:45 2003
Subject: [prog] use of assert (was: ncurses forms library)
In-Reply-To: ed orphan's message of "Fri, 31 Oct 2003 21:43:54 -0600"
References: <200311010341.hA13fdL1006919@naos.cc.umanitoba.ca>
Message-ID: <87ptgcraay.fsf@liliwhite.renaissance.oasis>
[This message sent to the programming mailing list of linuxchix
because of its informative nature.]
ed writes:
> Thank you for your informative reply to my question on how to obtain
> the user's input when using the ncurses forms library. I have
> searched all the documents I have on Ncurses, which are few enough,
> such as the HOWTO, Writting Programs in Ncurses by Raymond, and my
> man documentation, but I can not find any reference to the assert
> command as you have described:
> assert(buff != 0);
> My only question is, where does one find this information? Is there
> a book on Ncurses?
> Or a course of some kind?
> Any information would be most appreciated!
Hi Ed,
Oops. Assert is separate from ncurses and is in assert.h:
#include
#include
int main(int argc, char * argv[]) {
assert(0);
}
for example results in:
test: test.c:6: main: Assertion `0' failed.
Aborted
It is used to assert that a condition is true or else the program
errors with an informative message. It is often used when debugging:
ASSERT(3) Linux Programmer's Manual ASSERT(3)
NAME
assert - Abort the program if assertion is false.
SYNOPSIS
#include
void assert (int expression);
DESCRIPTION
assert() prints an error message to standard output and
terminates the program by calling abort() if expression is
false (i.e., compares equal to zero). This only happens
when the macro NDEBUG was undefined when was
last included.
RETURN VALUE
No value is returned.
CONFORMING TO
ISO9899 (ANSI C). In the 1990 standard, expression is
required to be of type int and undefined behavior results
if it is not, but in the 1999 standard it may have any
scalar type.
BUGS
assert() is implemented as a macro; if the expression
tested has side - effects, program behaviour will be dif
ferent depending on whether NDEBUG is defined. This may
create Heisenbugs which go away when debugging is turned
on.
SEE ALSO
exit(3), abort(3)
GNU 1993-04-04 ASSERT(3)
So, if you compile the above test program (test.c) as:
gcc -o test-with-assert test.c
you'll receive the above error message. OTOH if you compile it as:
gcc -o test-without-assert -DNDEBUG test.c
you won't receive an error message of any kind. In the example of
using ncurses forms, I was using it to insure that the return value
was not null and assumed you were familiar with assert's usage. My
apologies.
As to a book on ncurses, there is a book on curses by O'Reilly:
http://www.oreilly.com/catalog/curses/
and in fact I had a copy at one time but I probably gave it to the
library or sold it at half-price books some time back. ncurses is an
extension of curses and as far as I know ncurses implements all of
curses.
Half.com has one for $3.75:
http://half.ebay.com/cat/buy/prod.cgi?cpid=1534135&meta_id=1
Regards,
Elizabeth