you may be interested in pdl, see pdl.perl.org.
it might make your whole matrix life easier.
ed c
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Mike wrote: [snipped]
> items that specifically referred to the floating point Error in the first
batch of Pentium chips
Sorry, I should have narrowed the search then. This is not specific to that
error, it is a consequence of
the FP number system representation. It arises in certain circumstance
this is top-posted because it doesn't follow from any one of the previous posts.
just a warning to be careful of subtracting or dividing similar numbers in
floating point
and what your expectations are for the results. google for 'catastrophic loss of
precision'
or similar, or check out the floa
John Deighan::
> Is there a safe way to compare 2 floating point numbers in Perl? [snip]
> My debugger says that they're both '630.24' [snip]
> However, the == test fails and the != test succeeds
can you post code with the comparison == that fails ?
if the debugger says they're the same, they're
Chris Wagner wrote:
> I think this will do what u want.
> foreach $i ( grep($something, $maybeBiggerOriginalArray) ) { $hash{$i} = 1 }
thanks - it does, its what i posted compacted a little :)
see eric's post about a hash slice, its neat.
tly? once again i'm sure i'm missing something.
thanks a lot, have a good weekend wherever you are.
ed chester
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
bruce wrote a cross-post with:
> i can access the mysql db/livejournal from the mysql client/command line.
> mysql -ulj -host192.168.1.55 -p
what happens when you try this with the user/host you specified for the
database? i.e.
mysql -u lj -host localhost -p
or omit the host altogether. see
ated, i'll post back whatever half-baked solution
i come up with meanwhile...
ed chester
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
ce out of @MyArray.
$buffer = pack('C*',0x7c,0x45,0x3e,0x02);
$MyArray[0] = [ unpack('C*',$buffer) ];
print $MyArray[0];
print join " ", @{$MyArray[0]};
ARRAY(0x1555220)
124 69 62 2
At 06:39 AM 3/7/05 -0800, Ed Chester wrote:
>Thanks for the suggestion - you&
> How about:
> my @array = unpack ("H8", $buffer);
> $MyArray[$i] = [EMAIL PROTECTED];
> Or even:
> $MyArray[$i] = [ unpack ("H8", $buffer) ];
Thanks for the suggestion - you're right, unpack is seeing scalar context. Your
two ideas are the same, they do indeed assign the output of pack to a
(1
Hello all -
I posted sometime last week about ways of parsing image file data and doing
image processing 'raw' without external software/libraries.
I'm working on this at byte level now and will post the basic code to populate
an array with pixel values when its cleaned up.
Meanwhile, I have
thanks for the tip - that may well help. the biggest problem i've found is the
dependency of the relevant modules upon things like imagemagick/gd (this is a
windows problem)...
thanks again though - i'll look at that.
ed c
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECT
Hallo All -
I am faced with the prospect of wanting to parse a greyscale image in either
GIF or BMP format, in order to do some stats on pixel values.
After being read, the image is not altered, and no image is output. Off I went
on a CPAN quest.
I quickly learn all about PerlMagick, Prima::
one way: use the windows scheduler service. see docs for the 'AT' command. consider using your perl program to add the time of its next execution to the schedule. its then easy to control if you mean 5 minutes between program start of execution, or 5 minutes between end of execution and start of ne
> Is there a java equivalent for Digest::HMAC_SHA1 package?
is there a java mailing list equivalent to perl-win32-users?
if so, find it, because that's the place to ask the question! ;-)
ed c
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Krishna,
Ha
> #!wperl
the shebang ('sharp, bang') line should have the full path... ?
#!/c:/perl/bin/wperl -w
ed c
-Original Message-
From: Lasher, Brian [mailto:[EMAIL PROTECTED]
Sent: 15 December 2004 21:02
To: Ed Chester; [EMAIL PROTECTED]
Subject: RE: black box
Have got se
Title: Message
use
wperl instead of perl
they
will behave the same on win32, except that wperl won't support any options that
require a console window to be there...
ed
c
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Lasher, BrianSe
> 1100
> If the approach is correct, then what are the rules for setting the bits
> in floating point numbers ?
IEEE standard 754. there's a sign bit, an offset exponent (11 bits) and
the rest is the mantissa (without the implicit lea
> I thought its just the same comparison as we normally do for numbers.
so did i, so did the perldocs, so did the people who are quite happily comparing
values like this. perhaps if you post your code people can have a stab at
finding
the problem?
sorry thats not more useful. you're right. it s
> I have the following code fragment, and i can't work out how the "?",
> "<=>" and ":" operators in the 'foreach' line work. Any help would be
> most appreciated.
? : are part of one operator ... eg.
a ? b : c;
evaluates a, and if true returns b otherwise returns c. of course, nested y
In my opinion you have two choices:
i) store the image in a binary BLOB field
ii) store a reference to a filename in a sensible text field, and actually store the
image in your normal filesystem
Of these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do.
It will lead
Thanks for that Charles -
> foreach my $bit ( values %bits ) {
>if ( ref $bit eq 'ARRAY' ) {
yep, that helps a lot. I didn't know ref existed, very useful. I am still a bit
surprised there
isn't a way that perl can just infer what to do from context like it usually
does. Still, this
opens u
$thing\n"; }
}
Needless to say this didn't do what I wanted. Any tips very welcome, I know several of
you who understand these things better than I do. I am once again happy to make myself
look silly in the interests of educating the masses :)
ed chester
> What is the best way to parse command line arguments so I can avoid
> Use of uninitialized value in string eq at program.pl at line xx
> There may be 0, 1 ,2
use GetOpt::Std; # for single-char options e.g. -s, -o=4
# or
use GetOpt::Long;# for POSIX-like options, e.g. --verbose 5, --noQu
i wrote, obviously with my eyes closed:
> s/-x/''/;
which of course should be s/-x//; - sorry!
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Could anyone let me know by using regular expression, how can I get rid of
"-x"?
If that's all you really want, and you know that's the only place it can occur,
then its no problem to use just
s/-x/''/;
(substitute '-x' by '')
ed c
___
Perl-Win32-U
Thanks to Bill and Charles for their input (output?) on the random list routine:
both ideas have some useful stuff in.
I'm still interested in rounding in general - what other functions/mods are out
there?
ed c
___
Perl-Win32-Users mailing list
[EMA
I can never get a
random number in the list which is actually equal to the maximum value, $x. Ideally,
I'd like the rounding direction to be random as well I guess, at the minute the
distribution will be skewed towards 0. Any tips?
Thanks, happy cod
the actual _work_ - changing the
network settings - I can't solve.
any pointers much appreciated,
ed chester
national space centre, uk
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> What's the best text editor for perl?
what's your favourite editor for anything? use that.
I find that anything that properly supports regular
expression matching / replacing / etc. is good. on
solaris/linux I tend to use nedit, on windoesnt either
komodo (see below) or PFE.
if on the othe
30 matches
Mail list logo