From mark at wcws.com Mon Oct 2 13:39:46 2000 From: mark at wcws.com (Mark A. Sharkey) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: update of HUGE text file Message-ID: <39D8D672.5F7CA7A7@wcws.com> Is there a way in perl to do an update on a huge (100MB+ text file) without bringing the whole thing into memory? I have client that is using a text file as a make-shift database table. The client needs to be able to add/modify/delete lines in the text file. He does a search against the file, edits the results, and then needs to make the edits "stick". Can I make modifications to certain lines in the file, without reading the whole thing into memory? If this is explained by the Camel someplace, even just pointing me in the right direction would be very helpful. Thanks. Mark -- Do you want the power and flexibility of having your own iServer without the risk or hassle of maintaining it yourself? Professional management of your iServer account http://www.iServerPros.com @---------------------------@-----------------------@ | Mark A. Sharkey | mailto:mark@wcws.com | | World Class Web Sites | http://www.wcws.com | | | 800 844 4434 | | Custom CGI Scripts | 480 461 9765 | | Perl PHP MySQL JavaScript | 480 461 9312 (fax) | @---------------------------@-----------------------@ From sinck at ugive.com Mon Oct 2 14:19:05 2000 From: sinck at ugive.com (sinck@ugive.com) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: update of HUGE text file References: <39D8D672.5F7CA7A7@wcws.com> Message-ID: <14808.57257.958233.390122@owmyeye.ugive.com> \_ Is there a way in perl to do an update on a huge (100MB+ text file) without \_ bringing the whole thing into memory? sysread, syswrite, seek, flock. Trust me. Do flock first, or you're not gonna be happy. Unless, of course, you've already flocked the file, for which I would award several brownie points. The biggest trick with data-already-existant is to write the *same* size records. If you need to s/a123b/c12345667d/, you're gonna need to update all the bytes in the file after the 'b' in 'a123b'. Also, if you'll need to cope with s/a123b/ab/ ... where do those three bytes go? If you're not careful, you're liable to wind up with 'ab23b' in that spot. Happy joy. \_ I have client that is using a text file as a make-shift database table. The \_ client needs to be able to add/modify/delete lines in the text file. He does a \_ search against the file, edits the results, and then needs to make the edits \_ "stick". @ 100MB, it's prolly time to take it to a sql db and let it worry about edits natively. David From kev at primenet.com Mon Oct 2 14:21:13 2000 From: kev at primenet.com (Kevin Buettner) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: update of HUGE text file In-Reply-To: "Mark A. Sharkey" "Phoenix.pm: update of HUGE text file" (Oct 2, 11:39am) References: <39D8D672.5F7CA7A7@wcws.com> Message-ID: <1001002192113.ZM28278@saguaro.lan> On Oct 2, 11:39am, Mark A. Sharkey wrote: > Is there a way in perl to do an update on a huge (100MB+ text file) without > bringing the whole thing into memory? > > I have client that is using a text file as a make-shift database table. The > client needs to be able to add/modify/delete lines in the text file. He does a > search against the file, edits the results, and then needs to make the edits > "stick". > > Can I make modifications to certain lines in the file, without reading the whole > thing into memory? I think you're asking if it's possible to modify the file in place. You can certainly sysseek (lseek() in C) to the right place and then modify the file. The catch is that this will only work if the total number of characters in the file stays the same. I.e, if you add or delete any characters, you will still need to rewrite the rest of the file (i.e, the part after the point of modification.) This will necessarily entail bringing the rest of the file into memory and writing it back out. Also, when growing the file, you'll need to be careful to not overwrite data that will need to be "shifted" when making the initial modification. When shrinking the file, you'll need to make sure that you truncate the file to the new size when you're finished. Seeking to the correct point in the file and modifying it in place in this way will certainly be helpful if most of the modifications are going to be near the end of the file, but of little help whatsoever if they're likely to be near the front. I think maybe you'd better investigate the use of a proper database. Kevin From eric at thelin.org Mon Oct 2 16:36:13 2000 From: eric at thelin.org (Eric Thelin) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: update of HUGE text file In-Reply-To: <39D8D672.5F7CA7A7@wcws.com> Message-ID: On Mon, 2 Oct 2000, Mark A. Sharkey wrote: > Is there a way in perl to do an update on a huge (100MB+ text file) without > bringing the whole thing into memory? > > I have client that is using a text file as a make-shift database table. The > client needs to be able to add/modify/delete lines in the text file. He does a > search against the file, edits the results, and then needs to make the edits > "stick". > > Can I make modifications to certain lines in the file, without reading the whole > thing into memory? > > If this is explained by the Camel someplace, even just pointing me in the right > direction would be very helpful. If you are going to add, delete, or modify the file changing its length you will need to rewrite the file. Note this doesn't require bringing it all into ram. You can open two files one to the old file for read and one to a new file with write access. Then you read a certain number of characters from the infile make any modification and write that block to the outfile. Then repeat with the next block. Do this until you have read the whole file. You will have to make sure that your changes either don't span two blocks of read or handle cases where they would specially. A very simple example: $blocksize=100; # read 100 lines into memory at a time $file="myinfo.dat"; open(IN,$file); open(OUT,">".$file.".new"); while(!eof(IN)) { $x=0; while($x<$blocksize && $line=) { $block.=$line; $x++; } # transform $block here # ie. $block=~s/bad/good/g; # print OUT $block; } move($file.".new",$file); (I typed this just for this email so there may be syntax errors or minor issues I forgot. Consider yourself warned.) This doesn't handle locking or address the possibility of needing to change a string that is more that one line long and therefore could be the last part of one block of text and the first part of the next block. But it should show you the idea. This is the style of solution that you will find in many programs that are designed to work with files larger than the machine memory. In the example I am reading 100 lines at a time you could also read a given number of characters with read() or sysread(). Hope this helps. Eric Eric Thelin erict@aztechbiz.com AZtechBiz.com: Where Arizona Does Tech Business Voice: 480-377-6743 Fax: 480-377-6755 From mark at wcws.com Mon Oct 2 17:54:17 2000 From: mark at wcws.com (Mark A. Sharkey) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: update of HUGE text file Message-ID: <39D91219.4B1ACFA8@wcws.com> Thanks to everyone that resonded on and off the list. The information was just what I was looking for. Thanks again. mark -- Do you want the power and flexibility of having your own iServer without the risk or hassle of maintaining it yourself? Professional management of your iServer account http://www.iServerPros.com @---------------------------@-----------------------@ | Mark A. Sharkey | mailto:mark@wcws.com | | World Class Web Sites | http://www.wcws.com | | | 800 844 4434 | | Custom CGI Scripts | 480 461 9765 | | Perl PHP MySQL JavaScript | 480 461 9312 (fax) | @---------------------------@-----------------------@ From doug.miles at bpxinternet.com Thu Oct 5 12:04:19 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 Message-ID: <39DCB493.4E9D3EEF@bpxinternet.com> Please RSVP! I'll be re-presenting Perl 201 part 1: We'll be having a Phoenix.pm meeting Thursday, October 5th at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. I'll be presenting Perl 201 (everything beyond my Perl 101 that I can cram in to 2 hours :). Seriously, there is way too much to cover, so I'll try to focus on the most relevant stuff. -- For a list of the ways which technology has failed to improve our quality of life, press 3. From janis at primenet.com Thu Oct 5 12:08:39 2000 From: janis at primenet.com (Janis) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 In-Reply-To: <39DCB493.4E9D3EEF@bpxinternet.com> from "Doug Miles" at Oct 05, 2000 10:04:19 AM Message-ID: <200010051708.KAA25588@usr02.primenet.com> Argh! I really didnt want to miss the 201 again, but I have a friend flying into PHX tonight @8. :( -Heather From Bryan.Lane at VITALPS.COM Thu Oct 5 12:12:35 2000 From: Bryan.Lane at VITALPS.COM (Bryan Lane) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 Message-ID: <219B26AF200FD411A11200805FE6EF25F210D5@tef00021.vitalps.com> I'll be there... -----Original Message----- From: doug.miles@bpxinternet.com [mailto:doug.miles@bpxinternet.com] Sent: Thursday, October 05, 2000 10:04 AM To: Phoenix.pm Cc: Rose Keys Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 Please RSVP! I'll be re-presenting Perl 201 part 1: We'll be having a Phoenix.pm meeting Thursday, October 5th at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. I'll be presenting Perl 201 (everything beyond my Perl 101 that I can cram in to 2 hours :). Seriously, there is way too much to cover, so I'll try to focus on the most relevant stuff. -- For a list of the ways which technology has failed to improve our quality of life, press 3. From doug.miles at bpxinternet.com Thu Oct 5 13:02:08 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 References: <200010051708.KAA25588@usr02.primenet.com> Message-ID: <39DCC220.210F8A93@bpxinternet.com> Janis wrote: > > Argh! I really didnt want to miss the 201 again, but I have a friend > flying into PHX tonight @8. :( > -Heather Sorry. :( Maybe next time! -- - Doug Don't anthropomorphize computers. They hate that. From eric at thelin.org Thu Oct 5 13:34:32 2000 From: eric at thelin.org (Eric Thelin) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 In-Reply-To: <39DCB493.4E9D3EEF@bpxinternet.com> Message-ID: Unfortunately, I have a class on thursdays so I won't be able to attend either. Someone needs to invent a way be in two places at once. Perhaps they could even use perl :) Eric Eric Thelin erict@aztechbiz.com AZtechBiz.com: Where Arizona Does Tech Business Voice: 480-377-6743 Fax: 480-377-6755 From lajandy at yahoo.com Thu Oct 5 15:46:38 2000 From: lajandy at yahoo.com (Andrew Johnson) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 Message-ID: <20001005204638.1235.qmail@web2005.mail.yahoo.com> In addition to myself, a friend from work wants to come, too. Is the meeting still on? --- Doug Miles wrote: > Please RSVP! > > I'll be re-presenting Perl 201 part 1: > [snip] ===== __________________________________________________ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/ From mdearman at inficad.com Thu Oct 5 17:17:56 2000 From: mdearman at inficad.com (Michael Dearman) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 References: <39DCB493.4E9D3EEF@bpxinternet.com> Message-ID: <39DCFE14.C14AD009@inficad.com> Hi Doug, Made the last 201 presentation, so will pass on this one. Catch everyone up, I'm ready for part 2. Later, Mike D. From doug.miles at bpxinternet.com Thu Oct 5 16:47:05 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 References: <20001005204638.1235.qmail@web2005.mail.yahoo.com> Message-ID: <39DCF6D9.6CA26F44@bpxinternet.com> Andrew Johnson wrote: > > In addition to myself, a friend from work wants to come, too. Is the > meeting still on? > > --- Doug Miles wrote: > > Please RSVP! > > > > I'll be re-presenting Perl 201 part 1: > > [snip] > > ===== > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! > http://photos.yahoo.com/ Yep. Same time, same station. -- - Doug Don't anthropomorphize computers. They hate that. From jimm at amug.org Thu Oct 5 18:38:18 2000 From: jimm at amug.org (jim mckay) Date: Thu Aug 5 00:16:16 2004 Subject: Reminder: Phoenix.pm: Meeting 10/05/2000 In-Reply-To: <39DCB493.4E9D3EEF@bpxinternet.com> Message-ID: <200010052338.QAA24268@link-maker.com> I'll be there, and hopefully will bring a friend also.. Jim M On 10/5/00 at 10:04 AM, doug.miles@bpxinternet.com (Doug Miles) wrote: > Please RSVP! > > I'll be re-presenting Perl 201 part 1: > > We'll be having a Phoenix.pm meeting Thursday, October 5th at 7:00PM. > It will be held at Bowne, which is located at 1500 N. Central Avenue, > which is on the Southwest corner of Central and McDowell. The parking > lot is gated, so just press the button on the intercom, and tell the > receptionist that you are there for the Perl meeting. Park in the lot > that is straight ahead from the entrance on the South side of McDowell. > Park in any uncovered, non-reserved space. Proceed to the main lobby, > which is on the Northeast side of the parking lot. > > I'll be presenting Perl 201 (everything beyond my Perl 101 that I can > cram in to 2 hours :). Seriously, there is way too much to cover, so > I'll try to focus on the most relevant stuff. > > -- > For a list of the ways which technology has failed > to improve our quality of life, press 3. > From webmaster at azwebs.com Mon Oct 9 13:36:04 2000 From: webmaster at azwebs.com (Webmaster) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: Addition to MySQL DBD References: <39A4176F.6F233E2A@bpxinternet.com> Message-ID: <002801c0321f$df5a83c0$6b4a91ac@computer> Well, it's a slow Columbus day, so I'd thought I'd share this little bit of MySQL code. DBI POD describes a method called 'selectcol_array' which the MySQL DBD does not support as it supposedly should. The 'selectcol_array' method is a very useful one, as you can get an array of column values from a select statement in one fell swoop. It's a good example of adding a little piece of your own code to an already existing class. Here is the code: package DBI::db; # This is the class that a MySQL database handle belongs to (which calls this method) # The method name that is supposed to be there according to DBI docs, but isn't (that I know of) sub selectcol_array { # Use an existing DBI::db method. # NOTE: @_ automatically is sent to sub if you leave off '()'. # i.e. &selectall_arrayref() would not work. my $arrayref = &selectall_arrayref; my @return = ($arrayref)?(map { $$_[0] } @$arrayref):(); # The expected return is a list... unless... # The behavior of selectrow_array is to send the first item in the list if called in a scalar context. # So, lets make selectcol_array behave the same, Even though in scalar context, the two now do the same thing. # ed. that makes very efficient calls to selectrow_array if you only want one value, # i.e. my $email = $DBH->selectrow_array("select email from users where uid=3"); return (wantarray)?@return:$return[0] } # SYNOPSIS package main; $DBH = DBI->connect('DBI:mysql:azwebs', 'azwebs', 'acompletelybogupassword') || die "unable to connect"; # to get a list of email addresses that have a certain preference selected from a prefs column... for ($DBH->selectcol_array( "select email from users where find_in_set('send_updates', prefs)")) { ICM::Utilities->email_update_message( $_ ); } Any questions on this? Couple of neat MySQL things here... Happy Columbus Day (That 'eeeevil' European!) Tim From doug.miles at bpxinternet.com Mon Oct 9 15:45:11 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: Addition to MySQL DBD References: <39A4176F.6F233E2A@bpxinternet.com> <002801c0321f$df5a83c0$6b4a91ac@computer> Message-ID: <39E22E57.645DC220@bpxinternet.com> Cool. You should send the maintainer a patch. :) Webmaster wrote: > > Well, it's a slow Columbus day, so I'd thought I'd share this little bit of > MySQL code. > > DBI POD describes a method called 'selectcol_array' which the MySQL DBD does > not support as it supposedly should. > > The 'selectcol_array' method is a very useful one, as you can get an array > of column values from a select statement in one fell swoop. > > It's a good example of adding a little piece of your own code to an already > existing class. > > Here is the code: > > package DBI::db; # This is the class that a MySQL database handle belongs > to (which calls this method) > > # The method name that is supposed to be there according to DBI docs, but > isn't (that I know of) > sub selectcol_array { > # Use an existing DBI::db method. > # NOTE: @_ automatically is sent to sub if you leave off '()'. > # i.e. &selectall_arrayref() would not work. > my $arrayref = &selectall_arrayref; > my @return = ($arrayref)?(map { $$_[0] } @$arrayref):(); # The expected > return is a list... unless... > # The behavior of selectrow_array is to send the first item in the > list if called in a scalar context. > # So, lets make selectcol_array behave the same, Even though in > scalar context, the two now do the same thing. > # ed. that makes very efficient calls to selectrow_array if you only > want one value, > # i.e. my $email = $DBH->selectrow_array("select email from > users where uid=3"); > return (wantarray)?@return:$return[0] > } > > # SYNOPSIS > > package main; > > $DBH = DBI->connect('DBI:mysql:azwebs', 'azwebs', 'acompletelybogupassword') > || die "unable to connect"; > > # to get a list of email addresses that have a certain preference selected > from a prefs column... > > for ($DBH->selectcol_array( "select email from users where > find_in_set('send_updates', prefs)")) { > ICM::Utilities->email_update_message( $_ ); > } > > Any questions on this? Couple of neat MySQL things here... > > Happy Columbus Day (That 'eeeevil' European!) > > Tim -- - Doug Don't anthropomorphize computers. They hate that. From djmilesfamily at earthlink.net Tue Oct 10 18:39:04 2000 From: djmilesfamily at earthlink.net (Doug and Julie Miles) Date: Thu Aug 5 00:16:16 2004 Subject: Phoenix.pm: Job (Sort of :) Fwd: looking for Perlmongers who can spare 5 mins Message-ID: <4.3.2.7.0.20001010163833.03553d20@mail.earthlink.net> >Date: Tue, 10 Oct 2000 05:57:16 -0400 >From: "Mayur Jobanputra" >Reply-To: >X-Sender: >To: >Subject: looking for Perlmongers who can spare 5 mins >X-Mailer: > >I am looking for a script that is very similar to the PerlMagic Mogrify >tools, except that I can't install the ImageMagick program on the server >(NT server). The script requirements are VERY simple: > >1. I want to pass a single image (jpeg or gif) at the command line to the >script (ie : img src="/cgi-bin/resize.cgi?betty.jpg">). The original >image is either GIF or JPEG (I can run two different scripts if necessary >- resizegif.cgi and resizejpeg.cgi) and is a large image (<30K), but I >want that down to 2-4K. > >2. the script should simply take an image, resize it, and then display >it. Ideally, the image should be within the boundaries of 120x120, or >even better be able to tell if the image is portrait, landscape or square, >and resize accordingly. I have seen dozens of thumbnail gallery scripts, >but nothing that does something as basic as what I want. All the other >scripts try to give me all sorts of HTML crap that I don't want. I just >want to perform the resize on a single image!!!! so I can place my own >HREF tags around it!!! > >Anyone, please help! I am willing to throw in a $20 gift certificate at >Amazon if anyone can give me a script that is ready to run!! From Eden.Li at asu.edu Tue Oct 10 20:31:26 2000 From: Eden.Li at asu.edu (Eden Li) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Job (Sort of :) Fwd: looking for Perlmongers who can spare 5 mins In-Reply-To: <4.3.2.7.0.20001010163833.03553d20@mail.earthlink.net>; from djmilesfamily@earthlink.net on Tue, Oct 10, 2000 at 04:39:04PM -0700 References: <4.3.2.7.0.20001010163833.03553d20@mail.earthlink.net> Message-ID: <20001010183126.A7227@godel.wox.org> Here's a start, it does JPEG images.. it uses the GD library which is availible for most platforms. Right now no gif support is included with GD, but there are certain current versions of GD that do GIFs.. i'm not sure Perl GD supports them :/... anyway it's attached, email me at Eden.Li@asu.edu if you need help with it. Eden Doug and Julie Miles wrote: > >I am looking for a script that is very similar to the PerlMagic Mogrify > >tools, except that I can't install the ImageMagick program on the server > >(NT server). The script requirements are VERY simple: > > > >1. I want to pass a single image (jpeg or gif) at the command line to the > >script (ie : img src="/cgi-bin/resize.cgi?betty.jpg">). The original > >image is either GIF or JPEG (I can run two different scripts if necessary > >- resizegif.cgi and resizejpeg.cgi) and is a large image (<30K), but I > >want that down to 2-4K. > > > >2. the script should simply take an image, resize it, and then display > >it. Ideally, the image should be within the boundaries of 120x120, or > >even better be able to tell if the image is portrait, landscape or square, > >and resize accordingly. I have seen dozens of thumbnail gallery scripts, > >but nothing that does something as basic as what I want. All the other > >scripts try to give me all sorts of HTML crap that I don't want. I just > >want to perform the resize on a single image!!!! so I can place my own > >HREF tags around it!!! -------------- next part -------------- #!/usr/bin/perl use GD; use CGI qw/:standard/; # requires trailing slash.. use constant BASE_PATH => "/home/li/"; # resize the image to within these proportions use constant RESIZE_WIDTH => 100; use constant RESIZE_HEIGHT => 100; if (-e BASE_PATH . param ('file')) { my $im = imageResized (BASE_PATH . param ('file'), RESIZE_WIDTH, RESIZE_HEIGHT); print header ('image/jpeg'); print $im->jpeg; } sub imageResized { my ($file, $x, $y) = @_[0..2]; my $im = GD::Image->newFromJpeg ($file); my ($im_x, $im_y) = $im->getBounds (); # solve for x if ($im_y > $im_x) { $x = ($y * $im_x) / $im_y; } # solve for y else { $y = ($x * $im_y) / $im_x; } my $out_im = new GD::Image ($x, $y); $out_im->copyResized ($im, 0, 0, 0, 0, $x, $y, $im_x, $im_y); return $out_im; } From jimm at amug.org Tue Oct 10 21:27:47 2000 From: jimm at amug.org (jim mckay) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Job (Sort of :) Fwd: looking for Perlmongers who can spare 5 mins In-Reply-To: <20001010183126.A7227@godel.wox.org> Message-ID: <200010110227.TAA06736@link-maker.com> try Imager.pm it supports jpeg, gif png... only thing is it crashes on corrupt files. You'll need to install the libs for jpeg and gif.. here's some sample code.. #!/usr/bin/perl use Imager; my($in)=shift(@ARGV); my($out)=shift(@ARGV); for(@ARGV){ if(/^(.*)=(.*)$/){ $params{$1}=$2; } } $img = Imager->new(); $img->open(file=>$in,type=>'jpeg'); $scaled = $img->scale(%params); $scaled->write(file=>$out,type=>'jpeg'); print "$out written successfuly\n"; -Jim On 10/10/00 at 6:31 PM, Eden.Li@asu.edu (Eden Li) wrote: > Here's a start, it does JPEG images.. it uses the GD library which is > availible for most platforms. Right now no gif support is included with > GD, but there are certain current versions of GD that do GIFs.. i'm not > sure Perl GD supports them :/... anyway it's attached, email me at > Eden.Li@asu.edu if you need help with it. > > Eden > > Doug and Julie Miles wrote: > > >I am looking for a script that is very similar to the PerlMagic Mogrify > > >tools, except that I can't install the ImageMagick program on the server > > >(NT server). The script requirements are VERY simple: > > > > > >1. I want to pass a single image (jpeg or gif) at the command line to the > > >script (ie : img src="/cgi-bin/resize.cgi?betty.jpg">). The original > > >image is either GIF or JPEG (I can run two different scripts if necessary > > >- resizegif.cgi and resizejpeg.cgi) and is a large image (<30K), but I > > >want that down to 2-4K. > > > > > >2. the script should simply take an image, resize it, and then display > > >it. Ideally, the image should be within the boundaries of 120x120, or > > >even better be able to tell if the image is portrait, landscape or square, > > >and resize accordingly. I have seen dozens of thumbnail gallery scripts, > > >but nothing that does something as basic as what I want. All the other > > >scripts try to give me all sorts of HTML crap that I don't want. I just > > >want to perform the resize on a single image!!!! so I can place my own > > >HREF tags around it!!! From doug.miles at bpxinternet.com Wed Oct 11 12:26:01 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Job (Sort of :) Fwd: looking for Perlmongers who can spare 5 mins References: <4.3.2.7.0.20001010163833.03553d20@mail.earthlink.net> <20001010183126.A7227@godel.wox.org> Message-ID: <39E4A2A9.7B33D7DC@bpxinternet.com> Eden Li wrote: > > Here's a start, it does JPEG images.. it uses the GD library which is > availible for most platforms. Right now no gif support is included with > GD, but there are certain current versions of GD that do GIFs.. i'm not > sure Perl GD supports them :/... anyway it's attached, email me at > Eden.Li@asu.edu if you need help with it. Just FYI, this is somebody off list. Send replies to info@bcbold.com. > > Doug and Julie Miles wrote: > > >I am looking for a script that is very similar to the PerlMagic Mogrify > > >tools, except that I can't install the ImageMagick program on the server > > >(NT server). The script requirements are VERY simple: > > > > > >1. I want to pass a single image (jpeg or gif) at the command line to the > > >script (ie : img src="/cgi-bin/resize.cgi?betty.jpg">). The original > > >image is either GIF or JPEG (I can run two different scripts if necessary > > >- resizegif.cgi and resizejpeg.cgi) and is a large image (<30K), but I > > >want that down to 2-4K. > > > > > >2. the script should simply take an image, resize it, and then display > > >it. Ideally, the image should be within the boundaries of 120x120, or > > >even better be able to tell if the image is portrait, landscape or square, > > >and resize accordingly. I have seen dozens of thumbnail gallery scripts, > > >but nothing that does something as basic as what I want. All the other > > >scripts try to give me all sorts of HTML crap that I don't want. I just > > >want to perform the resize on a single image!!!! so I can place my own > > >HREF tags around it!!! > > ------------------------------------------------------------------------ > > resize.cgiName: resize.cgi > Type: Plain Text (text/plain) -- - Doug Don't anthropomorphize computers. They hate that. From doug.miles at bpxinternet.com Thu Oct 12 11:49:47 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Meeting 10/17/2000 Message-ID: <39E5EBAB.DFCE90A6@bpxinternet.com> We'll be having a Phoenix.pm meeting Tuesday, October 17th at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. I'll be presenting Perl 201 part II. Topics include Packages, Modules and Objects. -- - Doug Don't anthropomorphize computers. They hate that. From mdearman at inficad.com Thu Oct 12 16:44:57 2000 From: mdearman at inficad.com (Michael Dearman) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Meeting 10/17/2000 References: <39E5EBAB.DFCE90A6@bpxinternet.com> Message-ID: <39E630D9.8B6B7ECB@inficad.com> Hi Doug, Save me a seat! Been knee deep in PHP - Need a Perl fix bad. Mike D. From doug.miles at bpxinternet.com Tue Oct 17 11:28:36 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:17 2004 Subject: Reminder: Phoenix.pm: Meeting 10/17/2000 (Tonight) Message-ID: <39EC7E34.77D33F28@bpxinternet.com> Please RSVP if you haven't already! We'll be having a Phoenix.pm meeting Tuesday, October 17th at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. I'll be presenting Perl 201 part II. Topics include Packages, Modules and Objects. -- - Doug Don't anthropomorphize computers. They hate that. From lajandy at yahoo.com Tue Oct 17 11:59:17 2000 From: lajandy at yahoo.com (Andrew Johnson) Date: Thu Aug 5 00:16:17 2004 Subject: Reminder: Phoenix.pm: Meeting 10/17/2000 (Tonight) Message-ID: <20001017165917.531.qmail@web2005.mail.yahoo.com> I'll be there! --- Doug Miles wrote: > Please RSVP if you haven't already! > > We'll be having a Phoenix.pm meeting Tuesday, October 17th at 7:00PM. > ===== __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ From Bryan.Lane at VITALPS.COM Tue Oct 17 16:07:19 2000 From: Bryan.Lane at VITALPS.COM (Bryan Lane) Date: Thu Aug 5 00:16:17 2004 Subject: Reminder: Phoenix.pm: Meeting 10/17/2000 (Tonight) Message-ID: <219B26AF200FD411A11200805FE6EF25F210F8@tef00021.vitalps.com> I'll be there! -----Original Message----- From: doug.miles@bpxinternet.com [mailto:doug.miles@bpxinternet.com] Sent: Tuesday, October 17, 2000 9:29 AM To: Phoenix.pm; Walt Walonoski; Erik Tank Cc: Rose Keys Subject: Reminder: Phoenix.pm: Meeting 10/17/2000 (Tonight) Please RSVP if you haven't already! We'll be having a Phoenix.pm meeting Tuesday, October 17th at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. I'll be presenting Perl 201 part II. Topics include Packages, Modules and Objects. -- - Doug Don't anthropomorphize computers. They hate that. From yomahz at devnull.org Tue Oct 17 21:37:08 2000 From: yomahz at devnull.org (Mike Cantrell) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: nsapi_perl problems References: <219B26AF200FD411A11200805FE6EF25F210F8@tef00021.vitalps.com> Message-ID: <000d01c038ac$50cfcd20$ae7079a5@uswest.net> Has anyone on the list got nsapi_perl to work with solaris? I tried the mail list for it but I didn't get a response. If anyone can help, I'm appending my note that I sent to the nsapi_perl mail list ================================================== I'm having troubles getting netscape to start after editing the obj.conf file as directed in the README. The start command produces no output and the daemons are not started. obj.conf: Init fn="load-modules" shlib="/opt/NSCP/server4/perl/nsapi_perl.so" funcs="nsapi_perl_init,nsapi_perl_handler" Init fn="nsapi_perl_init" shlib="/opt/NSCP/server4/perl/nsapi_perl.so" error log: [16/Oct/2000:09:48:21] info ( 4057): successful server startup [16/Oct/2000:09:48:21] info ( 4057): Netscape-Enterprise/4.0 SP4 BB1-02/07/100 17:53 [16/Oct/2000:09:48:21] warning ( 4057): Unable to initialize NLS property bundle (res/cjava) [16/Oct/2000:09:48:21] info ( 4057): nsapi_perl_bootstrap reports: calling dlopen("/opt/NSCP/server4/lib/nsapi_perl.so", RTLD_LAZY|RTLD_GLOBAL) [16/Oct/2000:09:48:21] info ( 4057): nsapi_perl_bootstrap reports: dlopen of /opt/NSCP/server4/lib/nsapi_perl.so ok platform: Solaris (sparc) 2.7, Netscape Enterprise Server 4.0 (SP4), perl 5.005_03 (non-threaded). It appears that it is the second line in the obj.conf that is causing the problems. If I comment it out, the server will start just fine. I've tried it with and without the shared lib. Anyone have any ideas? -- Regards, Mike Cantrell From doug.miles at bpxinternet.com Fri Oct 27 12:51:42 2000 From: doug.miles at bpxinternet.com (Doug Miles) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Meeting 11/2/2000 Message-ID: <39F9C0AE.866DF35B@bpxinternet.com> We'll be having a Phoenix.pm meeting Thursday, November 2nd at 7:00PM. It will be held at Bowne, which is located at 1500 N. Central Avenue, which is on the Southwest corner of Central and McDowell. The parking lot is gated, so just press the button on the intercom, and tell the receptionist that you are there for the Perl meeting. Park in the lot that is straight ahead from the entrance on the South side of McDowell. Park in any uncovered, non-reserved space. Proceed to the main lobby, which is on the Northeast side of the parking lot. Scott Walters will be presenting an incremental backup program he recently wrote. Topics include: -drudgery -function prototyping tricks -parsing command line arguments -array slices to access stat, localtime etc data without lots of clutter vars -chaining together map {}'s and join()'s and split()'s etc -when Perl *needs* parens to disambiguate and minimalizing code you wish would just go away -File::Find.pm -Archive::Tar.pm -references/symbol table as a means to save typing -__DATA__ -SCSI tape drives -- - Doug Don't anthropomorphize computers. They hate that. From mdearman at inficad.com Sat Oct 28 00:39:08 2000 From: mdearman at inficad.com (Michael Dearman) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: Meeting 11/2/2000 References: <39F9C0AE.866DF35B@bpxinternet.com> Message-ID: <39FA667C.7C20696E@inficad.com> Doug Miles wrote: > > We'll be having a Phoenix.pm meeting Thursday, November 2nd at 7:00PM. > It will be held at Bowne, which is located at 1500 N. Central Avenue, > which is on the Southwest corner of Central and McDowell. The parking > lot is gated, so just press the button on the intercom, and tell the > receptionist that you are there for the Perl meeting. Park in the lot > that is straight ahead from the entrance on the South side of McDowell. > Park in any uncovered, non-reserved space. Proceed to the main lobby, > which is on the Northeast side of the parking lot. > > Scott Walters will be presenting an incremental backup program he > recently wrote. Topics include: > > -drudgery > -function prototyping tricks > -parsing command line arguments > -array slices to access stat, localtime etc data without lots of clutter > vars I definitely want to hear someone verbalize on this! > -chaining together map {}'s and join()'s and split()'s etc > -when Perl *needs* parens to disambiguate and minimalizing code you > wish would just go away > -File::Find.pm > -Archive::Tar.pm > -references/symbol table as a means to save typing > -__DATA__ > -SCSI tape drives Sounds great. Save me an aisle seat. Mike D. From djmilesfamily at earthlink.net Mon Oct 30 17:25:48 2000 From: djmilesfamily at earthlink.net (Doug and Julie Miles) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: JOB: Fwd: Pro Perl authors Message-ID: <4.3.2.7.0.20001030162458.03b0fcf0@mail.earthlink.net> Reply to JuliaG@wrox.com if you are interested. >From: Julia Gilbert >To: "'djmilesfamily@earthlink.net'" >Subject: Pro Perl authors >Date: Fri, 27 Oct 2000 12:01:16 +0100 >X-Mailer: Internet Mail Service (5.5.2448.0) > >Hi Doug, > >My name is Julia Gilbert and I am an Author Agent for Wrox > . > >You may be familiar with our range of books. Our trademark is "Programmer >to Programmer", because Wrox books are written by professional programmers >for professional programmers and are subsequently reviewed by professional >programmers. > >We are currently in the process of producing a publication dedicated to >professional Perl programming and are seeking authors who have the expertise >to write chapters on one or more of the following subjects:- > >1) Perl and Relational Databases >(access to MS SQL servers via the Sybase drivers, Oracle, and probably a bit >of MySQL too. Modules that should be covered include DBI::W32ODBC, >Win32::ODBC, Win32::DBIODBC, DBFramework, and Tangram) > >2) Mathematical and Computational Applications >(Perl Math Modules, Mathematical Algorithms with Perl, Matrices, >Cryptography) > >3) Distributed Perl Programming >(IPC, RPC, CORBA) > >In addition to these chapters, we need authors to write the following >sections: > > * A section on "Perl IDEs and Editors" > * Integrating Perl with IIS > * Integrating Perl with Netscape > >We have unfortunately been let down by a couple of authors and so would need >your first draft of the chapter(s)/section(s) within 2 weeks, so please let >me know ASAP if you are interested in writing for us. > >I look forward to hearing from you soon, > >Julia > >Julia Gilbert >Author Agent > >Wrox Press >http://www.wrox.com From phaedrus at contactdesigns.com Mon Oct 30 15:25:58 2000 From: phaedrus at contactdesigns.com (Scott Walters) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: JOB: Fwd: Pro Perl authors In-Reply-To: <4.3.2.7.0.20001030162458.03b0fcf0@mail.earthlink.net> Message-ID: Nifty! I think Doug and Kevin and Kurt should write this book, myself. -scott On Mon, 30 Oct 2000, Doug and Julie Miles wrote: > Reply to JuliaG@wrox.com if you are interested. > > >From: Julia Gilbert > >To: "'djmilesfamily@earthlink.net'" > >Subject: Pro Perl authors > >Date: Fri, 27 Oct 2000 12:01:16 +0100 > >X-Mailer: Internet Mail Service (5.5.2448.0) > > > >Hi Doug, > > > >My name is Julia Gilbert and I am an Author Agent for Wrox > > . > > > >You may be familiar with our range of books. Our trademark is "Programmer > >to Programmer", because Wrox books are written by professional programmers > >for professional programmers and are subsequently reviewed by professional > >programmers. > > > >We are currently in the process of producing a publication dedicated to > >professional Perl programming and are seeking authors who have the expertise > >to write chapters on one or more of the following subjects:- > > > >1) Perl and Relational Databases > >(access to MS SQL servers via the Sybase drivers, Oracle, and probably a bit > >of MySQL too. Modules that should be covered include DBI::W32ODBC, > >Win32::ODBC, Win32::DBIODBC, DBFramework, and Tangram) > > > >2) Mathematical and Computational Applications > >(Perl Math Modules, Mathematical Algorithms with Perl, Matrices, > >Cryptography) > > > >3) Distributed Perl Programming > >(IPC, RPC, CORBA) > > > >In addition to these chapters, we need authors to write the following > >sections: > > > > * A section on "Perl IDEs and Editors" > > * Integrating Perl with IIS > > * Integrating Perl with Netscape > > > >We have unfortunately been let down by a couple of authors and so would need > >your first draft of the chapter(s)/section(s) within 2 weeks, so please let > >me know ASAP if you are interested in writing for us. > > > >I look forward to hearing from you soon, > > > >Julia > > > >Julia Gilbert > >Author Agent > > > >Wrox Press > >http://www.wrox.com > > > From forsythe at primenet.com Mon Oct 30 22:04:25 2000 From: forsythe at primenet.com (Tran Forsythe) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: JOB: Fwd: Pro Perl authors References: Message-ID: <002f01c042ef$aa415840$0301a8c0@kurtvontiehl.com> *laugh* I hardly have the time, and the only thing I'd be able to contribute on would be the DB and IPC end of things (at least, given the topics they have listed). Duly flattered, -Kurt > Nifty! > I think Doug and Kevin and Kurt should write this book, myself. > -scott > > On Mon, 30 Oct 2000, Doug and Julie Miles wrote: > > > Reply to JuliaG@wrox.com if you are interested. > > > > >From: Julia Gilbert > > >To: "'djmilesfamily@earthlink.net'" > > >Subject: Pro Perl authors > > >Date: Fri, 27 Oct 2000 12:01:16 +0100 > > >X-Mailer: Internet Mail Service (5.5.2448.0) > > > > > >Hi Doug, > > > > > >My name is Julia Gilbert and I am an Author Agent for Wrox > > > . > > > > > >You may be familiar with our range of books. Our trademark is "Programmer > > >to Programmer", because Wrox books are written by professional programmers > > >for professional programmers and are subsequently reviewed by professional > > >programmers. > > > > > >We are currently in the process of producing a publication dedicated to > > >professional Perl programming and are seeking authors who have the expertise > > >to write chapters on one or more of the following subjects:- > > > > > >1) Perl and Relational Databases > > >(access to MS SQL servers via the Sybase drivers, Oracle, and probably a bit > > >of MySQL too. Modules that should be covered include DBI::W32ODBC, > > >Win32::ODBC, Win32::DBIODBC, DBFramework, and Tangram) > > > > > >2) Mathematical and Computational Applications > > >(Perl Math Modules, Mathematical Algorithms with Perl, Matrices, > > >Cryptography) > > > > > >3) Distributed Perl Programming > > >(IPC, RPC, CORBA) > > > > > >In addition to these chapters, we need authors to write the following > > >sections: > > > > > > * A section on "Perl IDEs and Editors" > > > * Integrating Perl with IIS > > > * Integrating Perl with Netscape > > > > > >We have unfortunately been let down by a couple of authors and so would need > > >your first draft of the chapter(s)/section(s) within 2 weeks, so please let > > >me know ASAP if you are interested in writing for us. > > > > > >I look forward to hearing from you soon, > > > > > >Julia > > > > > >Julia Gilbert > > >Author Agent > > > > > >Wrox Press > > >http://www.wrox.com > > > > > > > > From sinck at ugive.com Tue Oct 31 09:04:45 2000 From: sinck at ugive.com (sinck@ugive.com) Date: Thu Aug 5 00:16:17 2004 Subject: Phoenix.pm: JOB: Fwd: Pro Perl authors References: <4.3.2.7.0.20001030162458.03b0fcf0@mail.earthlink.net> Message-ID: <14846.57229.640193.152254@owmyeye.ugive.com> \_ >We have unfortunately been let down by a couple of authors and so \_ >would need your first draft of the chapter(s)/section(s) within 2 \_ >weeks, so please let me know ASAP if you are interested in writing \_ >for us. Hahahahahaha...one chapter in two weeks, without a contract no less. Yeah, I'll get right on that. Golly, that was funny, do it again. David