Forum: JavaScript / DHTML / AJAX Aug 8th, 2009 |
| Replies: 8 Views: 998 Since you have the web page (web site), can't you:
<div id="mydiv">
<p id="mydiv_p1">first</p>
</div>
In other words, have your code that creates the <p> assign an ID to it. Fetching the... |
Forum: JavaScript / DHTML / AJAX Aug 6th, 2009 |
| Replies: 11 Views: 778 As an answer is promised, I won't butt in. Instead, I'll give some tidbits as reminders to how the web works.
Generally speaking, cookies are sent between the server and the browser by way of HTTP... |
Forum: Windows NT / 2000 / XP Jul 21st, 2009 |
| Replies: 11 Views: 461 It's been a while since I looked at this. I'll skip the 'irrelevant' items.
rdisk should be the BIOS disk drive ID, counting from zero (0).
partition should be the partition number, counting... |
Forum: PHP Jul 10th, 2009 |
| Replies: 4 Views: 561 <?php
// Set array parts
$a = array("1" => "one", "2" => "two");
$b = array("a" => "aye", "b" => "bee");
$c = array("a scalar", $a, $b);
// Extract a sub-element from an array in the... |
Forum: PHP Jul 5th, 2009 |
| Replies: 8 Views: 456 Or, in plain English, you are overwriting the result of your SELECT query with the result of your DELETE query, which is not suitable for fetching rows from. Thus your script ABENDs at the top of the... |
Forum: PHP May 24th, 2009 |
| Replies: 10 Views: 542 I tripped on this a few times myself, early on.
As you have discovered, there's a strict order in which data are to be sent to the browser. Headers first, then the HTML. It isn't that 'the header... |
Forum: PHP May 22nd, 2009 |
| Replies: 2 Views: 816 If your table has exactly one row in it and it has exactly one field, you can simply$query_string = "UPDATE my_table SET my_column='$item'";
mysql_query($query_string) or die ...
This will update... |
Forum: Shell Scripting May 12th, 2009 |
| Replies: 8 Views: 836 Each of your -exec clauses needs to be terminated with an escaped semi-colon, as in:
find / -name \*JPG -exec chmod 644 {} \; -print
At least the shell and possibly find() are having... |
Forum: Shell Scripting May 11th, 2009 |
| Replies: 2 Views: 621 Weird, but it can be done.
CUST_1=filename
b=1
eval c=\$CUST_$b
echo $c
There may be easier ways to do what you mean, like using an array. But this works, and gets points for being... |
Forum: PHP Apr 24th, 2009 |
| Replies: 5 Views: 1,182 You should go to PayPal's dev site and see how to do it properly. They have a method by which your site receives the form data, processes it, then sends the user off to PayPal with a transaction... |
Forum: PHP Mar 24th, 2009 |
| Replies: 9 Views: 638 Will it help if I shout?
DELETE THE LINE WHERE YOU CALL MYSQL_FETCH_ASSOC()! IT IS EATING THE FIRST ROW RETURNED. IT IS THE LINE RIGHT ABOVE THE LINE WHERE YOU CALL MYSQL_NUM_ROWS()! DELETE THE... |
Forum: PHP Mar 24th, 2009 |
| Replies: 9 Views: 638 Let me try again. If there is only one matching row in the database, the mysql_fetch_assoc() function grabs it, leaving nothing for your while loop to do. If there is more than one matching row, your... |
Forum: PHP Mar 23rd, 2009 |
| Replies: 9 Views: 638 Are you missing the connect statement, like:$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
And why are you fetching data into an associative array via mysql_fetch_assoc() and... |
Forum: PHP Mar 23rd, 2009 |
| Replies: 9 Views: 638 In short, "WHERE field=value", you should have "value" inside single quotes ('). I stubbed my toes on this many times until I learned to put the value in quotes. Unless it was a function, of course. |
Forum: Shell Scripting Mar 19th, 2009 |
| Replies: 4 Views: 1,214 /usr/ucb/ps -auxxx | awk '{printf("%4s %4s %5s %4s %s\n", $3,$4,$2,$1,$11)}' | grep -v 0.0probably does what you really want: line up the columns. If you truly want the numbers to be %5.2f format,... |
Forum: Shell Scripting Mar 11th, 2009 |
| Replies: 16 Views: 5,671 Of course it won't work now. You changed the watchdog line in crontab from */5 * * * */opt/watchdog/startwatchdog.sh as you originally specified, to /5 * * * * /opt/watchdog/startupWatchdog.sh
You... |
Forum: Shell Scripting Mar 11th, 2009 |
| Replies: 16 Views: 5,671 Forty lashes with a wet noodle for me for posting the wrong thing. The code above should work now; I've reduced it to a single line. This time I actually tested them. :$
It appears you don't have... |
Forum: MySQL Feb 10th, 2009 |
| Replies: 6 Views: 824 No, not showing the definition. Rather, showing the current date. For example, on my desktop computer:mysql> select curdate();
+------------+
| curdate() |
+------------+
| 2009-02-10 | ... |
Forum: MySQL Feb 9th, 2009 |
| Replies: 6 Views: 824 What does 'select curdate();' return? |
Forum: Shell Scripting Jan 9th, 2009 |
| Replies: 16 Views: 5,671 First, it assumes that the editor you are using to edit the crontab is vi(). If you've 'export EDITOR=vi' in the script, then this should be OK.
It is feeding vi() commands to the 'crontab -e'... |
Forum: Shell Scripting Jan 9th, 2009 |
| Replies: 16 Views: 5,671 The following should do the trick quite easily.
To comment out the line:
crontab -l >/tmp/crontab.a
sed -e 's=\(^.*/opt/watchdog/startwatchdog.sh$\)=#\1' /tmp/crontab.a | crontab
rm... |
Forum: Shell Scripting Dec 12th, 2008 |
| Replies: 6 Views: 1,344 bc(1) is your friend. It computes to arbitrary precision.
"-e" tells bash to interpret \x sequences; ksh might not need it.
.
.
.
integer read=`echo -e "scale=2\n$rBytes/1000000" |... |
Forum: Shell Scripting Dec 4th, 2008 |
| Replies: 10 Views: 2,440 The following may be closer to what you want:
lsof | grep QuarkXP \
| cut -c76- \
| sort | uniq \
| awk '{ printf("\"%s\"\n", $0)}' > /tmp/output1
The cut(1) deletes... |
Forum: Networking Hardware Configuration Jul 7th, 2008 |
| Replies: 8 Views: 6,758 By the way, it *is* possible to run DHCP and static addressing on the same router. Technically, all addresses DHCP serves, including static addresses, must be allocated to its pool, and all other... |
Forum: Networking Hardware Configuration Aug 23rd, 2007 |
| Replies: 6 Views: 1,121 Yes, it would. However, the OP said he didn't want to change his network layout. And he might have a valid reason for leaving his PCs wide open to the internet. For example, he might have multiple... |
Forum: Networking Hardware Configuration Aug 22nd, 2007 |
| Replies: 6 Views: 1,121 You should be able to configure the Linksys as a bridge (that is, it is not a router, gateway or firewall). If the OEM firmware doesn't allow this, then you might be able to install the DD-WRT... |
Forum: Networking Hardware Configuration Aug 21st, 2007 |
| Replies: 8 Views: 6,758 delete McAfee and Norton from the computer, if they exist. Simply turning them off will leave the network stack screwed up; at a minimum, they must be disabled but still running. And they are so... |