
jaymc
Members-
Posts
1,521 -
Joined
-
Last visited
Never
Everything posted by jaymc
-
The 5% was a guess, its probably 1% This is declaring the variable right? var touched = 'yes' This is checking the variable? if(touched != 'yes' Im not great with javascript but seems pretty logical.. Are you sure this can not be done without using a cookie..
-
The var stuff should work though? Im 99% sure I have set vars like this previously If someone can advise?
-
Yeh, right lines but I dont want to use cookies, I tried this OnScrollDown="if(touched != 'yes'){do stuff} else {var touched = 'yes';}" But it doesnt work?
-
Ok, I have a div around 50 pix in height It has a scroll bar to show the other 49 pictures inside the div, as only 1 is visible without scrolling (each image is 50px) Problem is, only 5% of the time people will scroll the view the other 49 images, thus a waste of time loading them 95% of time as not visible without scroll So, I was going to create a dynamic javascript function to make it so when they scroll, it preloads the other 49 images I can do that no problem, its the OnSCroll even thats the problem If they touch the SCroll bar, I will load the images via the javascript, hence, scrolling executes my function However, if they scroll, then scroll again, the function is executed again. I know the images will probably be cached so no harm done, I just dont want the function executed numerous times after the first initial execution Not to mention that scrolling via the scroll button accounts for an ONSCROLL even everytime it moves a milimetre.. They use it on youtube if you have noticed.. When you click the scroll bar to view hidden content the images are preloaded So, in conclusion, how to make blah blah blah happens when the scroll bar/button is touched for the first time, then never again Cheers!
-
I think we have a winnner Looks like your right, although hav only tested a partial amount of the script Cheers man
-
What about this #!/bin/bash Sometimes I see people using #!/bin/bsh #!/bin/sh I have locations to all mentioned above btw, but just wondering if I should be using one rather than the other?
-
Erm, I think when I did tar -cf file.tar /home/blah/blah/file.txt when I open the tar in winrar or something It includes all the folders, even though they are empty So in the rar is literally /home/blah/blah/file.txt rather than just file.txt If CD isnt working, surely other commands will fail further along the lines without the correct shebang, if that is the problem in the first place..?
-
Ok, this works cp -ap /var/lib/mysql/db1 /home/backups/mysql/db1_temp However, I really want/need to use the CD command for the rest of this script and for future.. Any more ideas.. this is rather abnormal?
-
Its stranger that its saying /lib/mysql doesnt exist when the command is actually cd /var/lib/mysql Is #!/bin/bash important? I ran another script without that and it worked fine, so cant really see the relivence I thought # was a comment anyway P.S - I am running it as root
-
Huh? no.. Basically, if I do cd /var/lib/mysql in a command shell its fine If I put that in a shell script and run it as an ./sh it cant find it?
-
Have also tried #!/bin/bash
-
Yeh, I tried that but I get this error when including that at the top : bad interpreter: No such file or directory It is in /bin by the way
-
Here is a part of my script ##################### # BACKUP BOTH DATABASES # ##################### echo "----------------- Stopping MYSQL and copying the raw database folders..." #service mysqld stop cd /var/lib/mysql cp -ap db1 /home/backups/mysql/db1_temp cp -ap db2 /home/backups/mysql/db2_temp #service mysqld start I am getting this error when I run test.sh ./test.sh : command not found ----------------- Stopping MYSQL and copying the raw database folders... : No such file or directory/lib/mysql However, if I do cd /var/lib/mysql within a terminal, no issues as you would expect Am I missing something?
-
Sorry, my example of * 7 * * * wget -q http://site.com/cleanmessages.php Is correct, although I do have one in there marked as */7 * * * * wget -q http://site.com/stuff.php Which is duplicating multiple times. aswell as the one that runs every minute Any ideas?
-
Here is one */1 * * * * wget -q http://site.com/cleanchatusers.php That takes less than a second to run, should run every minute Another, which runs every 7 mins * 7 * * * wget -q http://site.com/cleanmessages.php
-
For some reason, cron jobs appear to be running multiple times I have one in there which is wget http://site.com (example) Sometimes I can see that running 5 times via process list It also used to do it with a mysqldump I had, which would crash mysql as it was being run 5 times consequatively Any ideas what may be causing that?
-
I could have a random hash in the members table and store that Then, if the cookie is set, and the data inside it = the hash, log them in Correcto?
-
Just a standard setcookie? What should I store in a cookie to verify
-
Whats the best way to remember if a user is logged in I use sessions at the moment, but Ive had to set the session.cookie_lifetime to an obscene number to prevent the cookie from being deleted upon browser close I want to do it the proper way What is the standard?
-
$doit = serialize($thearray) put that in the field, will look like shit then pull it out and do $redoit = unserialize($data[field]) Bang, you got your array back
-
Thats the explain for the query above? No idea what that file sort is..
-
Here id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE friends ref user user 25 const 621 Using where; Using filesort 1 SIMPLE gallery ref user,valid user 27 jaydio_jaydio.friends.friend 2
-
It doesnt really look worth it, its pretty much a supped up version of mysqldump yet never the less a kill when unleashed