• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
[QUOTE=SammySung;44327727]JS How can I check that at least one checkbox is ticked in each group of checkboxes on a page?[/QUOTE] you can use jquery validate unless you want it to be pure js
[QUOTE=Ac!dL3ak;44324090]Instead of just PHP, maybe spread out and grasp some other languages? For example, Ruby has [url=http://en.wikipedia.org/wiki/Chef_(software)]Chef[/url] and [url=http://en.wikipedia.org/wiki/Puppet_(software)]Puppet[/url], not to mention Rails. C#, C++, and Java are somewhat known for video games - while C++ and C could be used to make server software. I think limiting yourself to just PHP is a shame - expand your views, and you might even learn a little bit about PHP in the mean time. I wouldn't mind working with you, but unfortunately, I don't write PHP; I'm solely a Ruby/C guy.[/QUOTE] I got contacted by a person and we talked over things. We decided to scrap the project I've been working on and re-write it in Rails. I am very excited as Ruby is a complete new language and I've never tried it out. It will be quite a challenge but I am sure it will be lots of fun aswell. The person I'm working with now is very kind and patient, so that's a good thing. Alot of programmers has contacted me because of this post, and I regret now that I did not simply ask instead of "stalking" from the start. Hopefully we can all work as a team and finish project after project, as I have a ton of them in mind.
[QUOTE=Poo Monst3r;44327662]let me take this underscore and give it some time... i guess im always open to new things...[/QUOTE] Underscore is fucking awesome.
[QUOTE=josm;44325361]Since you're from the UK, do you get any work for Ruby? Just wondering because I hardly see jobs posted for ruby. Around where I live, anyway.[/QUOTE] I'm not from the UK :v it lies! [editline]23rd March 2014[/editline] [QUOTE=Svenskunganka;44328125]I got contacted by a person and we talked over things. We decided to scrap the project I've been working on and re-write it in Rails. I am very excited as Ruby is a complete new language and I've never tried it out. It will be quite a challenge but I am sure it will be lots of fun aswell. The person I'm working with now is very kind and patient, so that's a good thing. Alot of programmers has contacted me because of this post, and I regret now that I did not simply ask instead of "stalking" from the start. Hopefully we can all work as a team and finish project after project, as I have a ton of them in mind.[/QUOTE] I added you on steam, but I hope it all goes well.
Does anyone here that uses Anchor CMS know how I can include the documented functions for pulling articles? From what I've read you're supposed to build the theme around Anchor, but I'd like to avoid doing that and just pull information from it like you can with Wordpress.
Hey, does anyone know of a good link to using meta tags and getting Google to use them? I have this currently: [code] <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Havoc Servers is a small communuity of players. We host a small number of servers and are trying to work are way to become a bigger community"> <meta name="keywords" content="havoc, servers, havoc servers, havocservers, ttt, garrysmod, smithy285, darkrp"> [/code] However, Google does not seem to use them: [IMG]http://puu.sh/7HO59[/IMG] Sorry for asking such a basic question, I am still learning and have only just come across meta tags. Thanks!
[QUOTE=smithy285;44341396]Hey, does anyone know of a good link to using meta tags and getting Google to use them?[/QUOTE] How long have you set them that way? Googlebot takes its time to crawl all pages (unless you force it via Webmaster tools). Apart of that, it shouldn't be failing. I have it set that way too, and it's not giving me any errors.
[QUOTE=Coment;44341441]How long have you set them that way? Googlebot takes its time to crawl all pages (unless you force it via Webmaster tools). Apart of that, it shouldn't be failing. I have it set that way too, and it's not giving me any errors.[/QUOTE] when closing each meta tag, I used /> instead of just >, it had been using /> for around ~4 months, I updated it just now to use just >. I do have a webmaster account setup for my website as well.
IIRC it doesn't matter if you use > or />, I think some XML standard suggests you use /> for tags that have no closing though.
Oh hey, it just started working, I guess removing the / did work! [IMG]http://puu.sh/7HWl6.png[/IMG] EDIT: Ok, judging by the disagrees, maybe that was not the problem aha
[quote][code]content="Havoc Servers is a small communuity of players.[/code][/quote] I wanted to warn you, but saw that it was posted a few hours ago. Well, now you gotta live with that for a small moment.
I'm having a hard time with a stupid LOAD DATA INFILE SQL command for a class assignment. I have privileges to do it as I've checked, but it still keeps saying "#1045 - Access denied for user 'so_and_so'@'localhost'". I've been looking and I don't even know where to try fixing it up. The file it's trying to access is "readable by all".
Is there any way to know if a client is able to view animated: animated gif files? Is there an efficient way to force animation via php (to parse the gif files) and javascript (to serve them) On say a device that doesn't support animated sequences without having JS overload the device?
[QUOTE=Stonecycle;44346910]I'm having a hard time with a stupid LOAD DATA INFILE SQL command for a class assignment. I have privileges to do it as I've checked, but it still keeps saying "#1045 - Access denied for user 'so_and_so'@'localhost'". I've been looking and I don't even know where to try fixing it up. The file it's trying to access is "readable by all".[/QUOTE] Have you checked your permissions to the database/table? MySQL is very uninformative regarding this.
Does anyone here have experience running FFMPEG from PHP on IIS via exec? exec('bin\ffmpeg -ss '.$time.' -i "'.$file.'" -t 1 -s '.$width.'x'.$height.' -f image2 "'.$filepath.'"'); I'm using it to thumbnail some videos, the command works and generates the images correctly but on the next request the php_cgi.exe process closes and gives a 500 error. Permissions are correct and I've tried piping the output to nul. Problem goes away when you switch to regular CGI rather than FastCGI but we need to stick with FastCGI. Happens with both PHP 5.3.10 and 5.5.10. I am able to reproduce it with a very simple installation but I can't find anything on the internet that describes the same problem. [B]Edit[/B] Well, fixed it by putting 'start' in front of the command. No idea why this works but it does. Hopefully this will help people searching for it.
[QUOTE=pdkm931;44348703]Have you checked your permissions to the database/table? MySQL is very uninformative regarding this.[/QUOTE] I checked my permissions which are generally: [code] SHOW GRANTS FOR 'myusername'@'localhost'; Grants for 'myusername'@'localhost': GRANT USAGE ON *.* TO 'myusername'@'localhost' IDENTIFIED BY PASSWORD [I]password[/I] GRANT ALL PRIVILEGES ON `database_im_trying_to_load_infile` .* TO 'myusername'@'localhost' GRANT ALL PRIVILEGES ON `databases\_%`.* TO 'myusername'@'localhost' [/code] I believe this means I have the full permissions. Some other people in the class are having similar troubles on different hosts (Lithium Hosting for me, Freehostia for him, etc.).
[QUOTE=Stonecycle;44351312]I checked my permissions which are generally: [code] SHOW GRANTS FOR 'myusername'@'localhost'; Grants for 'myusername'@'localhost': GRANT USAGE ON *.* TO 'myusername'@'localhost' IDENTIFIED BY PASSWORD [I]password[/I] GRANT ALL PRIVILEGES ON `database_im_trying_to_load_infile` .* TO 'myusername'@'localhost' GRANT ALL PRIVILEGES ON `databases\_%`.* TO 'myusername'@'localhost' [/code] I believe this means I have the full permissions. Some other people in the class are having similar troubles on different hosts (Lithium Hosting for me, Freehostia for him, etc.).[/QUOTE] [URL="http://stackoverflow.com/questions/2221335/access-denied-for-load-data-infile-in-mysql"]This might fix your problem in that case.[/URL] [QUOTE]I just ran into this issue as well. I had to add "LOCAL" to my SQL statement. For example, this gives the permission problem: LOAD DATA INFILE '{$file}' INTO TABLE {$table} Add "LOCAL" to your statement and the permissions issue should go away. Like so: LOAD DATA LOCAL INFILE '{$file}' INTO TABLE {$table}[/QUOTE]
What's the best way to have a div follow as you scroll to it's top? You know - have it statically in a position until you scroll down to it, then it sticks to the top of your view.
Why does phptidy on sublime text 2 always add a newline after my ?> tag. Is there a way to fix it? I removed the newline after the ?> in wp-phptidy.php, and all other files but nothing worked so far.
[QUOTE=01271;44368126]Why does phptidy on sublime text 2 always add a newline after my ?> tag. Is there a way to fix it? I removed the newline after the ?> in wp-phptidy.php, and all other files but nothing worked so far.[/QUOTE] don't use a ?> tag if it's at the end of the file
[QUOTE=alexanderk;44366790]What's the best way to have a div follow as you scroll to it's top? You know - have it statically in a position until you scroll down to it, then it sticks to the top of your view.[/QUOTE] I've not tried this, but I think you can use jQuery to detect when the div is not in view, then set it to position: fixed
Is there a way to load a php array variable over and over from a file without reading the file over and over? I'm asking because I don't want to start passing references to 3 big arrays all the way down my functions...
[QUOTE=01271;44376160]Is there a way to load a php array variable over and over from a file without reading the file over and over? I'm asking because I don't want to start passing references to 3 big arrays all the way down my functions...[/QUOTE] nope! PHP uses pass-by-value, something that (I think) came from C itself - unfortunately, C actually had pointers. The only way I can think of is an object (maybe) or references.
[QUOTE=alexanderk;44366790]What's the best way to have a div follow as you scroll to it's top? You know - have it statically in a position until you scroll down to it, then it sticks to the top of your view.[/QUOTE] Check the current scroll position against the original top position of the div, add/remove a class with "position: fixed" to the div when you scroll past/before the top of the div.
I just got an invite for [URL="https://atom.io/"]https://atom.io/[/URL]. Now I have the honor to give away 3 more invites. Just drop me a message on facepunch (private message) containing your email address (first come first served). I only have 3. I don't know if they are rare or if they throw them around.
Is it possible to add metadata to HABTM relations in rails?
I have a bunch of questions on a page generated by PHP and they're all checkboxes, maybe 4 checkboxes/answers to a question. How can I check using javascript that at least 1 checkbox has been ticked for each question? Each question has a unique ID.
[QUOTE=SammySung;44386548]I have a bunch of questions on a page generated by PHP and they're all checkboxes, maybe 4 checkboxes/answers to a question. How can I check using javascript that at least 1 checkbox has been ticked for each question? Each question has a unique ID.[/QUOTE] [url]http://jsfiddle.net/j6bER/[/url] uses jquery, lmk if that's a problem
[QUOTE=Shadaez;44387128][url]http://jsfiddle.net/j6bER/[/url] uses jquery, lmk if that's a problem[/QUOTE] Can you elaborate a little please?
you can use the :checked selector to grab checked items. if the length is more than 0, then one or more is selected, if all the separate question's have a different class or something you can do $(class/selector of some kind):checked).length >= 1 on all the questions and if all the conditions are satisfied, then submit the form or whatever you'd like to do
Sorry, you need to Log In to post a reply to this thread.