02-22-2002
Good job everyone. This is an example of the posting doing his/her own work and being stuck on a tricky syntax or font issue. Posting homework problems are clearly frowned upon, but in this case considerable effort and work was put into the problem and the confusion between a "1" and an "I" was not really part of the assignment.
Perderabo did a stellar job in the way he answered this post
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need some help. I been doing system admin for the last several years and gotten very rusty on scripting. I need to write a script that will take a log entry and do math using two columns of data to create a new column. I am taking the column(#2) that contains the time and the column(#5) that... (3 Replies)
Discussion started by: scottzx7rr
3 Replies
2. Solaris
Hello
there are different opinions on how to get the swap space on Solaris.
some say: swap -s and the space= used + available
others say swap -l (donno how they get the swap size)
other say 'top' command
others say using format command (in print sub-command)
Could you please advise on... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
3. UNIX for Dummies Questions & Answers
The formula below will calculate a distance in miles between 2 points in excel. Can some put it to work in unix?
Lat = 43.335
Lon1 = -70.9884
Lat2 = 43.4829
Lon2 = -71.246
distance... (8 Replies)
Discussion started by: bobo
8 Replies
4. Shell Programming and Scripting
Hello Unix gurus,
Can anyone tell me the most efficient way to create script for the formula?
Formula:
Ans = 1 - ((Buffer pool data physical reads + Buffer pool xda physical reads + Buffer pool index physical reads + Buffer pool temporary data physical reads + Buffer pool temporary xda... (6 Replies)
Discussion started by: Rahulpict
6 Replies
5. Shell Programming and Scripting
Formula to get combination
Lats say, I have 5 values
ID Price
1 5
2 10
3 30
4 5
Resule with Possible combinations will be
ID Price
1 5
2 10
3 30
4 5
1+1 10
1+2 15
1+3 35
1+4 10 (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies
6. Shell Programming and Scripting
I'm new to Perl, but I need to use it to write into an excel spreadsheet. I want to copy the values of certain cells into a new sheet in the workbook. I'm unsure of how to do this because I don't know how to copy values instead of formulas.
Note: by formula I mean '=SUM(A1,A2)' and by value I... (0 Replies)
Discussion started by: AgentSmith88
0 Replies
7. Shell Programming and Scripting
Dear all,
I got a template excel file which contains several worksheets. Each worksheet contains some formulas in the cells.
I am using the perl script to read a CSV file and then put the data of CSV into template excel file(first worksheet) and then save it as new file name using ... (0 Replies)
Discussion started by: eldonlck
0 Replies
8. Shell Programming and Scripting
Hi all,
I use "Spreadsheet::ParseExcel::SaveParser" to
- read a existing excel file with :
$Parser = Spreadsheet::ParseExcel::SaveParser->new();
$HeaderFile = $Parser->Parse("XLS_FILE_ACCESS");
- modify some values in somes cell with :
$worksheet->AddCell($row_target,$col_max,... (3 Replies)
Discussion started by: Yom
3 Replies
9. Shell Programming and Scripting
Dear Masters,
Kindly need your helps for this issue..
I face a formula as a picture...
the input file is
A DEPT Vp Vs rho VPperVS
------------------------ ------------ ------------ ------------
700 151.9218 121.9269 ... (11 Replies)
Discussion started by: ipatah
11 Replies
10. Solaris
Hi There,
Just curious here...
If there formula to calculate scan rate on solaris?
Thanks
Edy (3 Replies)
Discussion started by: edydsuranta
3 Replies
LEARN ABOUT DEBIAN
theschwartz::worker
TheSchwartz::Worker(3pm) User Contributed Perl Documentation TheSchwartz::Worker(3pm)
NAME
TheSchwartz::Worker - superclass for defining task behavior
SYNOPSIS
package MyWorker;
use base qw( TheSchwartz::Worker );
sub work {
my $class = shift;
my TheSchwartz::Job $job = shift;
print "Workin' hard or hardly workin'? Hyuk!!
";
$job->completed();
}
package main;
my $client = TheSchwartz->new( databases => $DATABASE_INFO );
$client->can_do('MyWorker');
$client->work();
DESCRIPTION
TheSchwartz::Worker objects are the salt of the reliable job queuing earth. The behavior required to perform posted jobs are defined in
subclasses of TheSchwartz::Worker. These subclasses are named for the ability required of a "TheSchwartz" client to do the job, so that the
clients can dispatch automatically to the approprate worker routine.
Because jobs can be performed by any machine running code for capable worker classes, "TheSchwartz::Worker"s are generally stateless. All
mutable state is stored in the "TheSchwartz::Job" objects. This means all "TheSchwartz::Worker" methods are class methods, and
"TheSchwartz::Worker" classes are generally never instantiated.
SUBCLASSING
Define and customize how a job is performed by overriding these methods in your subclass:
"$class->work( $job )"
Performs the job that required ability $class. Override this method to define how to do the job you're defining.
Note that will need to call "$job->completed()" or "$job->failed()" as appropriate to indicate success or failure. See TheSchwartz::Job.
"$class->max_retries( $job )"
Returns the number of times workers should attempt the given job. After this many tries, the job is marked as completed with errors (that
is, a "TheSchwartz::ExitStatus" is recorded for it) and removed from the queue. By default, returns 0.
"$class->retry_delay( $num_failures )"
Returns the number of seconds after a failure workers should wait until reattempting a job that has already failed $num_failures times. By
default, returns 0.
"$class->keep_exit_status_for()"
Returns the number of seconds to allow a "TheSchwartz::ExitStatus" record for a job performed by this worker class to exist. By default,
returns 0.
"$class->grab_for()"
Returns the number of seconds workers of this class will claim a grabbed a job. That is, returns the length of the timeout after which
other workers will decide a worker that claimed a job has crashed or faulted without marking the job failed. Jobs that are marked as failed
by a worker are also marked for immediate retry after a delay indicated by "retry_delay()".
USAGE
"$class->grab_job( $client )"
Finds and claims a job for workers with ability $class, using "TheSchwartz" client $client. This job can then be passed to "work()" or
"work_safely()" to perform it.
"$class->work_safely( $job )"
Performs the job associated with the worker's class name. If an error is thrown while doing the job, the job is appropriately marked as
failed, unlike when calling "work()" directly.
perl v5.10.0 2008-03-02 TheSchwartz::Worker(3pm)