[25861] in Perl-Users-Digest
Perl-Users Digest, Issue: 8096 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 19 18:05:29 2005
Date: Thu, 19 May 2005 15:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 19 May 2005 Volume: 10 Number: 8096
Today's topics:
Can Win32:: module be used under windows 98? <jinsun@agere.com>
Re: Can Win32:: module be used under windows 98? <noreply@gunnar.cc>
Re: Can Win32:: module be used under windows 98? <john@castleamber.com>
Re: DBI: adding columns to table xhoster@gmail.com
Mixing buffered and unbuffered I/O to support CONNECT m <jsm@jmarshall.com>
Re: semi-opacity with GD <sisyphus1@nomail.afraid.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 19 May 2005 16:04:17 -0400
From: "JJ" <jinsun@agere.com>
Subject: Can Win32:: module be used under windows 98?
Message-Id: <d6irg2$l4u$1@alageremail2.agere.com>
I am writing a perl script that uses some Win32 modules such as Win32,
Win32::Daemon, Win32:ChangeNotify etc.. The program can run under windows
XP. But when I tried under win98, I got compling problems. Is that because
Win32 module cannot be used under win98? Thanks.
Jin
------------------------------
Date: Thu, 19 May 2005 22:08:06 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Can Win32:: module be used under windows 98?
Message-Id: <3f49ufF5uqn2U1@individual.net>
JJ wrote:
> I am writing a perl script that uses some Win32 modules such as Win32,
> Win32::Daemon, Win32:ChangeNotify etc.. The program can run under windows
> XP. But when I tried under win98, I got compling problems. Is that because
> Win32 module cannot be used under win98?
No.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 19 May 2005 20:12:55 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Can Win32:: module be used under windows 98?
Message-Id: <Xns965B9AC0AD484castleamber@130.133.1.4>
JJ wrote:
> I am writing a perl script that uses some Win32 modules such as Win32,
> Win32::Daemon, Win32:ChangeNotify etc.. The program can run under
> windows XP. But when I tried under win98, I got compling problems. Is
> that because Win32 module cannot be used under win98? Thanks.
Afaik Win32 is Windows 95 and above. For Windows < 95 there is some kind of
emulation DLL (IIRC) but no idea if that's going to work, and it's besides
the point since you use 98.
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 19 May 2005 15:21:51 GMT
From: xhoster@gmail.com
Subject: Re: DBI: adding columns to table
Message-Id: <20050519112151.238$FR@newsreader.com>
"Bigus" <someone@somewhere.com> wrote:
> <xhoster@gmail.com> wrote in message
> news:20050518132317.407$bK@newsreader.com...
> > "Bigus" <someone@somewhere.com> wrote:
> > ...
> >> That's where $k = "owner". If I remove the single quotes round $k in
> >> teh ALTER TABLE line then the owner column is created fine, but of
> >> course it then falls over when $k = "reply-to" because of the hyphen.
> >>
> >> When I use PHPMyadmin to create the owner column it works fine and
> >> tells me it's used the syntax:
> >>
> >> ALTER TABLE `list_headers` ADD `owner` TEXT
> >
> > If PHPMyadmin told you that it used backticks, and that seemed to work,
> > then I would suggest that you try using backticks in your Perl program.
>
> It must have registered at a subconscious level and sown the seed. I
> didn't notice PHPmyadmin using backticks until you just pointed it out..
> still, the DBI prepare method is supposed to deal with quoting
> automatically but when I tried that and it didn't work.
Prepare is not supposed to deal with quoting. It is the execute
(or equivalent) that deals with the quoting, and that is only when bind
variables are used, which you didn't do. And bind variables are used for
data, not for names of DB structures.
Quotes are used to disambiguate things. If your SQLs weren't ambiguous,
why would you need quotes in the first place? And if they are ambiguous,
how is "prepare" supposed to magically figure out what you meant in order
to apply the quotes properly?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 19 May 2005 11:19:39 -0700
From: James Marshall <jsm@jmarshall.com>
Subject: Mixing buffered and unbuffered I/O to support CONNECT method?
Message-Id: <20050519104745.V62084@jmarshall.com>
I'm trying to write an HTTP proxy that supports the CONNECT method. This
requires first reading the textual request line and headers, and then
reading binary data that must be read and sent _immediately_ after being
written by the client. Thus, using read() won't work, because it blocks
until the buffer is full. However, the text headers are most
appropriately read using <>, and we have dire warnings not to mix buffered
reads with sysread() on the same socket.
So what's the preferred method of reading line-oriented text input
followed by unbuffered binary data on the same socket? I've used read()
in the past, but I guess I've just been lucky enough to get away with it!
Also, does anyone here know what the "heavy wizardry" is that the Camel
book mentions, regarding mixing of read() and sysread()? That may be one
solution.
Thanks a lot!
James
............................................................................
James Marshall james@jmarshall.com Berkeley, CA @}-'-,--
"Teach people what you know."
............................................................................
------------------------------
Date: Thu, 19 May 2005 23:52:26 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: semi-opacity with GD
Message-Id: <428c9a17$0$8122$afc38c87@news.optusnet.com.au>
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:428c76b7$0$4655$afc38c87@news.optusnet.com.au...
> I tried modifying the first of the 2 scripts that you provided so
> that it printed to a png file, but all I see is a pale blue square - and
> that doesn't tell me much about the effect that you're seeking.
>
I think I finally worked out what you're after - not entirely your fault
that it required effort on my part :-)
The following script seems to do the job for me. It prints to file
(opacity2.png) rather than stdout and it uses the same value for $alpha as
was used in your original posting.
use warnings;
my $im2 = newFromPng GD::Image('top.png', 1);
$im2->saveAlpha(1);
$im2->alphaBlending(0);
my $alpha_val = (70 & 0x7f) << 24;
for my $x(0..$xsize-1) {
for my $y(0..$ysize-1) {
$index = $im2->getPixel($x,$y);
$index |= $alpha_val;
$im2->setPixel($x,$y,$index);
}
}
open(PNG2, ">opacity2.png") or die "Can't open opacity2.png for writing:
$!";
binmode PNG2;
print PNG2 $im2->png;
close(PNG2) or die "Can't close opacity2.png after writing: $!";
__END__
Cheers,
Rob
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8096
***************************************