Look at perldoc Tk::after. You can set up a callback to draw the line every few seconds in a subroutine.
my $id = $c1->repeat( 2500, \&draw_line );
MainLoop;
sub draw_line
{
# put the line drawing code here
}
After looking on perlmonks and in the PerlFAQ, i came up with this to force the geometry (works for windowsXP)
#!/usr/bin/perl
use Tk;
my $m=new MainWindow();
my $h=$m->screenheight();
my $w=$m->screenwidth();
$m->geometry($w."x$h+0+0" );
MainLoop;
Heh, fits in a twitter post even.
Kordaff
my $DISTNAME
= 'cn=admin,ou=unit,o=organisation,l=locality,c=country';
open (FILE, "dn") or die "File open failed: $!\n";
while (<FILE>)
{
chomp;
$result = $ldap->modify( $DISTNAME,
add => {uniqueMember => $_} );
$result->code &&
warn "failed to modify entry...
Note: you'll need to get http://search.cpan.org/CPAN/authors/id/B/BC/BCT/CGI-Ajax-0.701.tar.gz to see all the example scripts if you use Windows, as they don't seem to be installed under the version that ppm installs.
Kordaff
If you remember that Tk is not spelled 'use TK;' then you can use Win32::Sound in a not really less trivial example like this:
use strict;
use Tk;
use Win32::Sound;
my $sound="tada.wav";
my $timer_id;
my $mw=new MainWindow();
my %row1=(-side=>'left',-pady=>10,-padx=>10);
my...
True, but that is the difference between these snippets:
@a=(1,2,3);
if ( @a =~ /1/ ) {print "yes!!!\n"}
else {print "oh noes!!!\n"}
$a=[1,2,3];
if ( @$a[0] =~ /1/ ) {print "yes!!!\n"}
else {print "oh noes!!!\n"}
@a is the array, $a is the array ref. OP is missing ^ in regex...
Kordaff
This works on WinXP with last ActiveState(5.10.0, binary build 1002) that I installed:
use strict;
use Win32::Sound;
while()
{
Win32::Sound::Volume('100%');
Win32::Sound::Play("tada.wav");
Win32::Sound::Stop();
sleep 240;
}
Kordaff
The syntax for Class::ObjectTemplate may look different than most object code because that module uses anonymous arrays internally (keeping track of slots in the array emptied out thru deletions and reusing them) It has a nice long section in Advanced Perl Programming by Sriram Srinivasam...
As long as perl -c script isn't showing errors and nothing odd is showing up in the error_log, then it may be a virtual host config problem. Are you running cgi's under suexec? And are the user/group set correctly for the virtual host settings in httpd.conf? S'bout all I can think of at the...
How about a file with hosts you want to run this on named hosts.txt. Then do this:
for i in in `cat hosts.txt`
do
ssh $i ~/find-inactive # where find-inactive is the script
# that you're using which is installed at ~/ on each host
# in that hosts.txt file
done
I've used something...
Do you have a sort() operation earlier in your program? Aren't $a and $b reserved for sort() operations? Might be changing in that sort, if there is one...
Since your RSA key is installed for the user you wish to sudo to, you could try something like this:
$HOST="myhost.com"
$USER="anotherUser"
ssh $HOST <<END_SCRIPT_PART1
mv testfile.pl /tmp
exit
END_SCRIPT_PART1
ssh -l $USER $HOST <<END_SCRIPT_PART1
# sudo -H -u anotherUser bash
cd...
Have you tested it with Perl using DBD::Pg/DBI to see if it have the same type of crash as JBoss? There is a new version of postgresql out now, 8.1. It may be a recent bug fix there.
What sort of table structure / query fingerprint are we talking about? What's the insert to query ratio...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.