lol BillyRay, that was my arguement too.
Jonty, that was also an option- saving data 'on the fly'.
I'm not sure what the best method to do this would be though. Perhaps I could add a mysql table to contain temporary data, and every time a form field is unfocused it saves the data. Then if...
I'm wondering what the best way to prevent users from accidentally closing the current window, or even navigating away from the page.
The page in question is a data entry page, and since people tend to accidentally close windows, I want to add a script to pop up a confirmation box or something...
I'm hoping someone can explain why an array with one element, when 'shifted' in a subroutine continues to contain one element once the subroutine finishes.
Consider the following:
use Data::Dumper;
@arrayone = [10, [1, 2, 3]];
@arraytwo = ();
$number = 10;
print "OUTSIDE...
I'm sure this is simple, but I can't seem to align my thoughts right.
I have a file that I'm reading into an array with a series of values. For the sake of arguement we'll say there's three numbers, then any number of other numbers.
I want to store the first three numbers separately, and then...
if I have this code (using on a mysql database):
while (my $row = $sth->fetchrow_arrayref) {
foreach (@$row) { $_ = "NULL" unless defined }
my (@end) = splice(@$row, -2);
print join (", ",@$row)." - ".join(", ",@end)."\n";
}
it will print the first row as it should, then it gives a...
EDIT: oops, bit off, here we go:
"SELECT DISTINCT `staffid` FROM `staff` WHERE NOT EXISTS (SELECT * FROM `users` WHERE users.`staffid` = staff.`staffid`) AND `has_user` = '1';
I found a solution... It required upgrading my mysql DB from 4.0 to 4.1 - but here it is:
"SELECT staffid FROM staff s WHERE NOT EXISTS (SELECT u.staffid FROM users u WHERE u.staffid = s.staffid) AND s.has_user='1'"
brilliant
Ok, here's the set-up.
I have two tables, for simplicty, we'll say
users and staff
the important fields are
users.userid
users.staffid
and
staff.staffid
staff.has_user (enum('0','1'))
All users must have an associated staff id (hence the users.staffid) but not all staff needs an associated...
oh, PS - I mean MSN Messenger client... I'm simply looking for a way to change my nickname through a perl script instead of through the messenger interface... No real reason why.. just something to do
P.S. If anyone can think of a better way of writing that
OR MORE IMPORTANTLY, a better "smoothing" algorithm, please post it, even if it's just an idea.
As it is, that works well, but it has flaws. For example, if there is an even number of columns, the middle column (widthwise)...
...// sorts course_s and indexes together (based on course_s)
for($i=0;$i<$asize;$i++){
$padding[$indexes[$i]] = $course_s[($asize-1-$i)] / $size * $padd;
}
So if the width of each header ($course_s) is:
(30.46, 8.94, 12.94, 13.17, 5.64, 14.82, 32.57, 17.64)
the padding for each field...
...say 20) that needs to be multiplied by one of these percentages, and added to the original element, such that the highest numbers are added to 20 * the lowest percentage.. but the orignal array must remain in order.
if the original array and percentage array were ordered, they'd become:
(5...
yeah I know. I've talked to him about it, he agrees, but both of us are too lazy to go comparing settings between the two machines :P
I'm sure we'll figure it out. Thanks for your help
Paul,
1) he is actually clicking the "back" button in the browser. I don't know if it matters, but it's a mac running MacOS 9.1 I believe, and IE 5.5 (mac version obviously). But I've tried it on other macs with the same setup and it works fine. It must be settings he has made to his...
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.