Similar Threads:
1.Complex problem I need to solve with perl
I have a problem that to me seems complex. I put it here in the perl
forum because this is how I need to solve it. I've translated the
scenario into a psuedo scenario below but the concept is identical.
Here goes:
I have 10 people: p1..p10
I have 2 products: milk and cookies
I have a list of all 10 people:
p1 gets cookies
p2 gets milk
p3 gets either
p4 gets either
p5 gets milk
p6 gets cookies
p7 gets either
p8 gets cookies
p9 gets milk
p10 gets cookies
I turn the assembly belt on and out comes cookies and milk, random
order. I need to distribute, one at a time, to the 10 people in a way
that somebody doesn't get seconds, before everybody else capable of
getting that item gets firsts. I've been trying to figure out how to
keep indexes of where each item type was but the problem is the people
that get both. How do I store who got what? Now, here's the kicker.
I need to store this in-between program runs. If it runs every 5
minutes, one time I may get 20 items and one time I may get 2.
Whatever the case may be, it's a continuous loop that needs to start
where it left off.
2.complex problem
ela wrote:
) I have a hundred of files that have predefined columns but unknown number of
) rows:
<snip>
) While using regular expression to extract the information is easy, and then
) building the table by associative array is also simple, the main problem
) falls into padding the previous columns with no records.
Easy. Do two passes over the data.
First pass finds max number of columns, second pass does all the padding.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
3.problem in creating a complex hash
Hi All
I have a small issue in arranging data with a array ref .
$arrayref = [ [ [ 'user1, 'c'], [ 'user2', 'a'], [ 'user2', 'b' ],[
'user2', 'd' ],[ 'user3', 'a' ],[ 'user2', 'f' ] ] ];
i tried the following
my %sh ;
foreach my $i ( @$arrayref) {
push (@{$sh{$i->[0]}},{group => [$i->[1] } );
}
required hash
%sh = ( user1 => { group => [ c ] },
user2 => { group => [ a b d f] },
user3 => { group => [ a ] }
)
but i am not able to get it in this format .
Can some one please help me out
Thanks a lot
--
Regards
Agnello D'souza
4.Problem with IF Statement Using Complex Variables
Hello;
I would very much appreciate your help.
The following IF statement in g95 Fortran compiler:
Real EPS
Complex x
if (abs(aimag(x)) .le. 2.*EPS**2*abs(real(x))) x=cmplx(real(x),0.)
.................................................................(1)
produces the following error:
Error: Unclassifiable statement following IF-clause at (1)
Thank you kindly.
Monir
5.Problem with (rather) complex grid
As part of a test suite, we have automatically generated a grid pattern
that seems to bug. I have extracted the corresponding instructions. I
would appreciate expert comments. Is there a bug in our program, or
should I create a bug report on SourceForge ?
Here is a standalone code snippet. The frames are expected to fill
exactly the parent window, with no empty space. Which is not the case.
------------
. configure -width 800 -height 500
grid propagate . 0
# first column
frame .panel1 -width 280 -height 200 -bg #123458
frame .panel2 -width 280 -height 200 -bg #3030ff
frame .panel3 -width 500 -bg #20E080
grid .panel1 -row 0 -column 0 -rowspan 2 -sticky w
grid .panel2 -row 2 -column 0 -sticky w
grid .panel3 -row 3 -column 0 -sticky nsw -columnspan 2
grid rowconfigure . 3 -weight 1
# second column
frame .panel4 -height 100 -bg #E0E020
frame .panel5 -height 300 -bg #E020E0
frame .panel6 -bg #A0A0E0
grid .panel4 -row 0 -column 1 -sticky ew -columnspan 2
grid .panel5 -row 1 -column 1 -sticky ew -rowspan 2 -columnspan 2
grid .panel6 -row 3 -column 2 -sticky nsew
grid columnconfigure . 2 -weight 1
-----------------
Thanks,
Franck
6. More problems with complex notation
7. Problem to pass complex array between subroutine and main program
8. splitting a complex string