Hi,
I've encountered a problem with a perl and ksh script that totals a certain field in a text file. The computed total of the script is 295540304 but the expected is 297959288, a 2 million difference. The KSH script reads from bottom to top, and the discrepancy started on line 47 (1279th MAN... (1 Reply)
Hi,
I am trying to get the cpu usage of a job/process. The machine that has these jobs is a cluster with 1 master node and 10 compute nodes.
Now, the complexity is that not all jobs are on the master node. So, in order to get the cpu usage of a job at another node, I have to ssh into it and... (0 Replies)
Hi All,
i have an input below.
As long as "x= 1" , i would want to capture 2 lines using sed or awk
for eg :
0001 x= 1 $---------------------------------..-.--..
0001 tt= 137 171 423 1682 2826 0
Pls help. Thanks in advance.
Note that the number of lines in each block do... (37 Replies)
Guys, have any idea for the script like this? also to compute w/ decimal.
thanks
a=10
b=20
c=30
d=40
if a < b then ( a -b)*1024 = free space
b + (c -d) = total space
if a > b then (b / d)*1024 = cpu (3 Replies)
Hi,
I use this script to compute compilation time several time to get system performance and compare different system:
#!/bin/sh
# measure the different between time before and
# after the compilation of benchmark
# Start at iteration 1
num=1
while
do
# Add one to the iteration... (3 Replies)
I have a project to migrate my club's membership database from Access to web based using MySQL/PHP, but I have a problem I can't get my head around and would appreciate some help...
Background...
I want to be able to display each member's data on screen and add a Previous and Next button to move... (2 Replies)
Hi Friends,
My input file is like this
chr1 100 200
chr1 300 330
chr1 2000 2000
chr1 5000 5000
chr2 7790 7890
chr2 8000 8000
If the difference of third and second columns is zero, then subtract 500 from second column and add 500 to the third column.
So, my output would be
chr1... (1 Reply)
Hi,
I want to calculate diff b/w these starttime and endtime with use of mktime. I need response time in milisecond. I am using mktime to get these times. last three digits are in milisecond
Starttime 2013-04-03 08:54:19,989
End time 2013-04-03 08:54:39,389 (9 Replies)
Hello,
sorry if this is an easy thing, but I tried to make it run the whole morning, but it doesn't work so far...
I am logged in on a visualization node of a high performance cluster. On this node I can run several gui-based software for the postprocessing of my cfd-data.
As the... (1 Reply)
Discussion started by: Shlaeae
1 Replies
LEARN ABOUT DEBIAN
set::infinite::_recurrence
Set::Infinite::_recurrence(3pm) User Contributed Perl Documentation Set::Infinite::_recurrence(3pm)NAME
Set::Infinite::_recurrence - Extends Set::Infinite with recurrence functions
SYNOPSIS
$recurrence = $base_set->_recurrence ( &next, &previous );
DESCRIPTION
This is an internal class used by the DateTime::Set module. The API is subject to change.
It provides all functionality provided by Set::Infinite, plus the ability to define recurrences with arbitrary objects, such as dates.
METHODS
o _recurrence ( &next, &previous )
Creates a recurrence set. The set is defined inside a 'base set'.
$recurrence = $base_set->_recurrence ( &next, &previous );
The recurrence functions take one argument, and return the 'next' or the 'previous' occurence.
Example: defines the set of all 'integer numbers':
use strict;
use Set::Infinite::_recurrence;
use POSIX qw(floor);
# define the recurrence span
my $forever = Set::Infinite::_recurrence->new(
Set::Infinite::_recurrence::NEG_INFINITY,
Set::Infinite::_recurrence::INFINITY
);
my $recurrence = $forever->_recurrence(
sub { # next
floor( $_[0] + 1 )
},
sub { # previous
my $tmp = floor( $_[0] );
$tmp < $_[0] ? $tmp : $_[0] - 1
},
);
print "sample recurrence ",
$recurrence->intersection( -5, 5 ), "
";
# sample recurrence -5,-4,-3,-2,-1,0,1,2,3,4,5
{
my $x = 234.567;
print "next occurence after $x = ",
$recurrence->{param}[0]->( $x ), "
"; # 235
print "previous occurence before $x = ",
$recurrence->{param}[2]->( $x ), "
"; # 234
}
{
my $x = 234;
print "next occurence after $x = ",
$recurrence->{param}[0]->( $x ), "
"; # 235
print "previous occurence before $x = ",
$recurrence->{param}[2]->( $x ), "
"; # 233
}
o is_forever
Returns true if the set is a single span, ranging from -Infinity to Infinity.
o _is_recurrence
Returns true if the set is an unbounded recurrence, ranging from -Infinity to Infinity.
CONSTANTS
o INFINITY
The "Infinity" value.
o NEG_INFINITY
The "-Infinity" value.
SUPPORT
Support is offered through the "datetime@perl.org" mailing list.
Please report bugs using rt.cpan.org
AUTHOR
Flavio Soibelmann Glock <fglock@gmail.com>
The recurrence generation algorithm is based on an idea from Dave Rolsky.
COPYRIGHT
Copyright (c) 2003 Flavio Soibelmann Glock. All rights reserved. This program is free software; you can distribute it and/or modify it
under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Set::Infinite
DateTime::Set
For details on the Perl DateTime Suite project please see <http://datetime.perl.org>.
perl v5.12.4 2011-08-22 Set::Infinite::_recurrence(3pm)