- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 15
- Posts with Upvotes
- 12
- Upvoting Members
- 11
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am a freelance IT consultant specializing in PHP, Python, Django application and website programming, and have knowledge of many other frameworks and programming languages. I live in Manchester, England. a
- PC Specs
- AMD Athlon 64 3000+ Ubuntu 9.10
Re: When you remember when "program" was just a wierd American spelling of "programme", and a "programme" was just something you watched on telly. | |
Re: You can't guarantee that robots won't index your site: such things as the robots.txt file, and the meta tags you mentioned, are simply conventions that well-behaved robots will obey. Certainly those methods will stop the reputable engines such as Google, Yahoo et al. Maybe other users have some better ideas? | |
Re: After setting $query, print its value to the screen, so you can see if it is correct. If it looks correct, copy and paste the query into phpmyadmin (or whatever tool you use to manipulate your database - TOAD for Oracle for example), and see what the result is. This … | |
Re: Sounds to me like an HTML problem, if you can see the characters correctly in, say, phpadmin, that would mean that the database is storing and retrieving them correctly. Your HTML code has to tell the browser which character set it is using, a line in the <head> section such … | |
Re: [code] ... DATEDIFF(`PaymentDate`,`OrderDate`)>=14 --- [/code] [url]http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_datediff[/url] | |
Re: I would be curious to see other values returned from the database, that is in the user_login function, before loading up the $_SESSION, do a dump of $user: [code=php] print("<pre>"); var_dump($user); print("</pre>"); [/code] and then maybe something similar in the [icode]case 0:[/icode] block of the second snippet for the $_SESSION … | |
Re: Perhaps if you gave a little bit more information I (or someone else) could help you. A code snippet, maybe, showing what you expected to get, and what you actually got? | |
Re: "Linuxquestions" sends out a periodic (optional!) e-mail containing, among other things, links to "unanswered questions". Sometimes this is a motivation for sporadic users, like myself, to log in and answer a question which seems to be in my sphere of knowledge. Also links to current topics, and such like, about … | |
Re: This is the section of JS code which returns the count: [code] // fieldname, warningname, remainingname, maxchars function CheckFieldLength(fn,wn,rn,mc) { var len = fn.value.length; if (len > mc) { fn.value = fn.value; len = len; } document.getElementById(wn).innerHTML = len; document.getElementById(rn).innerHTML = mc - len; } [/code] Here is some code … | |
Re: If I understand your question correctly you have an array of about 100 values, all of which may (or may not) contain the text string "%address%". This array is called $content. Then you want to replace the text "%address% wherever it may be found in $content, with the text in … | |
Re: AFAIK "Set" is not a php command. I don't think the translator is very good. | |
Re: Not too sure which Sql engine you are using, but the following syntax should work with most of them: [code] sSQL = "Select PS.PoolTeamID, PT.TeamName, Sum(PS.Points) as pts From " _ & " PlayerStats PS, PoolTeams PT Where " _ & " PS.Weeknumber = 10 AND " _ & " … | |
| Re: This should work (I haven't actually tried it yet though) [code] SELECT file_id, sum(if (status = 0,1,0)) sum0, sum(if (status = 1,1,0)) sum1, sum(if (status = 2,1,0)) sum2, FROM pl_statements GROUP BY file_id [/code] You don't say which database you are using, the example above should work in MySql, but … |
Re: [code] $arr = array_fill_keys(range(1,4), "rambow"); $arr[3] = "popcorn"; [/code] | |
Re: I assume that if you can still boot windows, then you will see a list of systems available for booting, probably you will see your original windows system there, and also the list of ubuntu systems. At this point, Grub is asking you to select a system, and you would … | |
Re: You don't say which programming language you are using to compose your sql statement, but as a first shot I would suggest you program something like this:- If the search term contains one word: [code] SELECT * FROM descriptions WHERE desc LIKE '%firstword%' [/code] If the search term contains two … | |
Re: stripslashes is a function which returns a string. It has no effect on the string itself. A statement such as "stripslashes($input)" has no effect on the $input variable as such. You probably intended something like "$input = stripslashes($input)". HTH | |
Re: You are definitely right about the USER_CREATURE_LINK file, this is a classic normalization technique. Seems to me you should use the same technique for the inventories, i.e. an inventory items file (all the possible items and their descriptions), and a USER_INVENTORY_LINK file containing the user id, the inventory id, and … | |
Re: Nice simple solution, Fest3r - just one slight snag, sorry if I'm being a little bit too picky, but this solution will also pick up files whose name contains the text "image". I think it just needs "file -b $2" in the first script. | |
Re: A clearer example might help. How exactly are you filling the array, how are you outputting the result, what result are you expecting, and what result do you get? Example: [CODE] $total = array(); $total[] = 10; $total[] = 15; $total[] = 5; print ("sum is " . array_sum($total) ) … | |
Re: [QUOTE=flipjoebanana;1099724]Basically searching all files in a directory and locating those that contain a certain word within them. For example, I want to know what files contain the word 'apple', if there is just print the filenames that contain 'apple' somewhere in the text. The only thing I really need to … | |
Re: You know you're an old geek, if you used to say "cool" when it wasn't cool to do so (late 70's, 1980's..) | |
Re: If the fortran program compiles into an executable file, and you are running on Unix or Linux or other *nix variant, at a shellprompt type: [ICODE]time fortran-program-command[/ICODE] (of course after time, type in whatever command you would normally have typed to run the program) - note that the "time" command … | |
Re: You need access to a command line shell, via the console application, or telnet or putty if it's a remote machine. Then you will need to do something like: [CODE] cd /home/httpd/vhosts/knowittv.com ls -ld /home/httpd/mason [/CODE] This will show you what permissions are currently set for the directory, you should … |