-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Oh absolutely. When I looked he spent the best of those 10 seconds looking through his iTunes library!? Bit of a rarity though, and not a bad idea to raise money for charity. Of course I didn't donate - there's no UK charities!
-
It switches, to keep it exciting.
-
If you get wet at the crotch watching people code, you'll love this: http://www.humblebundle.com/
-
Who's your favorite artist, musician, band, etc?
Adam replied to livethedead's topic in Miscellaneous
Heard the rap-rock album "Blakroc" that the Black Keys did with some rappers? -
You're passing the ID of your button to the function, which then tries to set the new colour as the value property of the object with that ID (your button), which is undefined. In other words you're trying to set the colour to something undefined. Where is the new colour value stored/input?
-
Who's your favorite artist, musician, band, etc?
Adam replied to livethedead's topic in Miscellaneous
Hell yeah! New Black Keys album is amazing, but it still can't beat their older stuff when it was just Dan and Patrick. Saw them a couple of years ago in a club with about a hundred people there - was a right night! You like Jack White's newest band The Dead Weather? Can't beat the classics either My Ipod is full of Zeppelin, Hendrix, Lynyrd Skynyrd, Rolling Stones, early Aerosmith, etc! -
+1
-
Very late response, but only just spotted this thread. You fix the issue? I suspect Access' rubbish error handling was a red herring, and that the problem is you aren't able to use a sub-query on the same table when inserting into it.
-
Your WHERE condition doesn't make much sense: SELECT posts.*, users.*, countries.countryID, countries.country FROM posts INNER JOIN users ON (users.userID = posts.postUserID) INNER JOIN countries ON (countries.countryID = users.userCountry) WHERE posts.cityID = '".$row_rs_city['cityID']."' AND posts.type = 'sightseeing' OR posts.cityID = '".$row_rs_city['cityID']."' AND posts.type = 'Inner city sightseeing' OR posts.cityID = '".$row_rs_city['cityID']."' AND posts.type = 'Outer city sightseeing' ORDER BY posts.postID DESC What's the logic behind it, in English? That very much dictates where the parentheses should go.
-
What do you mean 'nope'? There's no magic button you can add that will somehow convert the report into a PDF. You need to programme it.
-
What's the name of the variable that's undeclared? 0 and 4 are not valid variable names.
-
There's a number of free PHP PDF libraries out there you can use. I would recommend TCPDF.
-
Where do you substitute "{anum}" for the value in the server-side code? Even if it's a feed, you still need parse the template at some point. I'm guessing the last four digits are sensitive for some reason - otherwise why would you need to hide them? Using JavaScript would mean you're still sending the original, desensitised data to the client (so it would still be visible in the source). There might also be a delay in replacing the text, so the user sees the last four digits for a short amount of time. Also any user with JS disabled would always see the original data. As I said, you need to use server-side code to properly sensitise data like this.
-
This doesn't really sound like a job for JavaScript. If you want the numbers hiding, you should do so at the server level. I'm not sure what template engine you're using, but where ever you assign 'anum' you should do it there.
-
I'm guessing the problems are down to the selectors. IE6/7 have no support for the internal querySelector / querySelectorAll methods, which jQuery utilizes where possible to improve performance. IE8 has support but only in standards mode. I would start there... For example: #box-1, #box-2, #box-3, #box-4, #box-5, #box-6, #box-7, #box-8 This would be better done with a shared class. If you also prefix the class name with the element tag, that would heavily cut down the amount of elements to check. Since you also use it in two binds, you can store the object within a variable and re-use it: var $boxes = $('div.boxes'); $boxes.bind(...); $boxes.bind(...); Also within the event handler, you use $(this) a lot, which again to avoid recreating the jQuery object from this every-time, you can store it within a variable: var $this = $(this); You also use the full #box-1, #box-2 [..] selector a couple of times within the event handler instead of $this.
-
There's nothing more frustrating that a website could do than open a new window as I'm trying to leave. If this is for advertising or a last ditch attempt to keep the user on the site, then steer clear. It will have the opposite effect and just annoy the user. If there's a genuine, helpful reason then you could use the "onunload" event. Be aware though, the "onunload" event is frequently abused and browsers are weary of what you try to do at that point.
-
Yeah that's fine. Unlike with PHP where you have to declare variables inside a function as global, JS automatically has scope of global variables. Adding to what thorpe said, you can also improve the performance of a selector by adding the element tag ("div.myclass" instead of ".myclass" for example), as it reduces the number of elements to check.
-
Me too. I'm quite fond of minimalist designs, but this...
-
Ha: "Hopefully there will be no Internet Explorer 10…"
-
Well.. Facebook is planning to start selling shares soon. They hope to make $5billion on their initial public offering- who knows what will happen once the greedy shared holders start having an influence.
-
FTP is made simple in PHP. You already have your connection to the server, just pass in the variable holding the connection ($ftp_connection) and the directory you wish to search in ($path) to the ftp_nlist function. The return will be an array of files in that directory. From that point on it's standard PHP; just use preg_match to find the files which end in ".ini". Edit: in-fact you can just use strrpos() to check the end of the string is ".ini".
-
glob is only executed on your local file system, not the remote. You need to use the special ftp_* functions. To get a list of files in a directory you can use ftp_nlist, and with the returned array loop through and match against a regular expression.
-
why did the koala fall out of the tree ?? .......
Adam replied to dreamwest's topic in Miscellaneous
Good one. -
David? If some work it shouldn't actually be an input problem. Instead of the var_dump, for a URL that's returning code 0, make another call to curl_getinfo but omit the second "opt" parameter and pass the return to print_r: if ($httpcode == 0) { print_r(curl_getinfo($ch)); exit; } That will output all the information for the request and might hold a clue as to why it's failing. Obviously it's only for debugging purposes, so remove it after.