Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. I would imagine that you would have to have a pre-existing worldwide trademark on the brand name and the website would have to be considered an infringement on that trademark. Though i'm lawyer, so i could be wrong. Alternatively, hire a load of heavys
  2. Nope. Just make sure they actually ship you a disk. Normally PCs with pre-installed OS have some sort of recovery disk/partition. If you kick up enough fuss, you should be able to get them to send you an OEM copy of XP. You did buy it (as part of the computer) afterall.
  3. Felt that i wouldn't post in the accouncement topic, as i hope that will be more for general comments and, dare i say, criticisms of the new site. Also hate to be the first to point out the bug, but nevermind. I 'spect it's an IE7 issue -- which we all love. Or something. Anyways, the problem is that if you set the option to hide the right stats bar on the blog/news/tutorial posts then the content starts a little way down the page with a large chunk of white at the top.
  4. Looks very nice daniel. Don't have time to take a proper look right now, but first impressions are that it looks great. I'm sure i wont be the first to say well done and thank you to everyone who put in the work. I could be wrong, but as i understand it, you did the majority of the work so congratulations!
  5. In what way does a session not set a cookie? It doesn't really matter what it stores; it's still a cookie. http://uk2.php.net/manual/en/session.idpassing.php
  6. Personally i think quoting someone and adding bold tags to show emphasis which wasn't there is a touch unfair. But anyway... I dont think it would be possible to select many judges who weren't from the staff. There are certain things you would have to guarantee about the judges, which would otherwise be difficult to do so. For example, you would have to know that the judges will be around regularly to do the judging. Also, given that quality of code was (and should remain) a factor in the scoring, a judge would have to have sufficient expertise to be able to to judge quality of code. Now im not saying that the only people who are skilled enough to do this are staff, but it would be difficult to guarantee this from other members. Lastly, there's no chance that these competitions could be totally user-run. They involve prizes and decisions. As you yourself alluded to, without someone/a panel to have the final say, a decision as to the nature of the competition wouldn't even be reached. Complete democracy is an idealistic impossibility im afraid.
  7. You see, I can't think of too many particularly complex problems which wouldn't already fit into one of the categories -- be it maths based, OOP or Application Design. I also disagree that as people stay around the forum they tend to put stuff in the right place. Sure some people do. But quite a lot don't. Even with really blatant divides, such as the MySQL board, loads of questions get put in the wrong place. How often do you see a question which is entirely MySQL stuck in the PHP board? And, to a lesser extent, vise versa? Personally I think CV hit it right on the head -- the vast majority of posts which drop off without being solved are because they have not been asked properly. Apart from that, there are also cases of more complex posts, which would require more time and effort on the part of the helper. Now, I dont know about anyone else, but there are only two occassions when I will make an effort to solve a more complex problem: 1.) I have free time and the problem is an interesting one/i'm not sure how I would sove it, or 2.) The question has been posted by someone i recognise as having contributed a lot of the community. On a side note regarding moved-to links: it's a shame there's no option where the links are only displayed to people who have posted in/started a particular topic.
  8. I just dont believe splitting really works. Even with the current divide, far too many topics end up in the wrong place. Apart from anything else, the splitting of the forums requires the user with a problem to be able to partially diagnose the problem -- if they could do that, then they would probably be able to fix the problem.
  9. No, you're correct -- ereg is being dropped altogether i believe in PHP 6. I wouldn't say the syntax for preg_match is any harder, you just have more options. And no, there's no real difference between the patterns. Mine just cut out the repetition. The | character is being used as a delimiter. With PCRE, you need to give a start and end character between which the pattern is contained. It's up to you what you choose, but the character cannot appear inside the pattern unless it is escaped. You can then add modifiers after the closing delimiter, such as i which makes the pattern case insensitive.
  10. Well that is quite clearly not the code which contains the query with two criteria in your WHERE clause -- we need to see that code. I assume you're sure that there are actually matching rows? Have you tried echoing the query inself to check exactly what is being executed, to check that variables are set etc?
  11. Looks ok, but i'd tidy it up to checking for 1-3 digits followed by a period 3 times, followed by 1-3 digits: <?php $ip = '10.0.0.1'; if(preg_match('|^([0-9]{1,3}\.){3}[0-9]$|',$ip)){ echo 'valid'; }else{ echo 'not valid'; } ?>
  12. Any chance you could define 'doesn't work' ? What happens? Do you get an error? What code are you using? Do you have an or die statement on your query? What's the output? What's the expected output.
  13. As long as you keep the letters the same case, then you shouldn't have any troubles with a simple if statement: <?php $one = 'b'; $two = 'a'; if($one > $two){ echo $one.' is bigger than '.$two; }else{ echo $one.' is NOT bigger than '.$two; } ?> I suspect PHP handles this by converting to an ASCII value or similar, hence why you may not get the requried results if the letters are of different cases.
  14. Glad you like it I've yet to stumble across a better forum either.
  15. When you retrieve the id from the url, grab the corresponding minimum level and the user's level. If the user's level is less than the minimum, give an error.
  16. Yep, thats about the size of it. Well how do you display which cities a user has access to? You basically have to repeat the check.
  17. Forgetting your semi-colons from the end of your lines? <html> <head> <title>Diagonal Line Length Calculator</title> </head> <body> <form> X1:<input type="text" name="x1"><br> X2:<input type="text" name="x2"><br> Y1:<input type="text" name="y1"><br> Y2:<input type="text" name="y2"><br> <input type="submit" value="Go!"><br> </form> <br> <?php $length = pow(sqrt($_REQUEST['x2'] - $_REQUEST['x1']), 2) + pow(sqrt($_REQUEST['72'] - $_REQUEST['y1']), 2); echo 'The length of that line is ' . $length; ?> </form> </body> </html> Next time try telling us what the problem is too
  18. Interesting. I think it would be nice if it were true, though im afraid I have no idea what the origins of Boxing Day are. You'd think i'd bother to find out, celebrating it every year! Out of interest, apart from the UK, which countries celebrate Boxing Day?
  19. All of your upload appears to be handled by your createThumbnail() function. We'd need to see that.
  20. What did you mean by that? Have we now narrowed the error down to the upload of the files?
  21. Use the modulus operator: if($num_in % 5 == 0){ echo 'Multiple of 5'; }else{ echo 'Not a multiple of 5'; }
  22. That does of course assume that you're wanting to check all your posted values. Even if that's the case, you'd need to exclude the submit button from the check: <?php foreach($_POST as $field_name => $field_value) { if((empty($_POST[$field_name]) || !is_numeric($_POST[$field_name])) && $_POST[$field_name] != 'Submit')//or whatever you called it { $error[$field_name] = 'error message here' } } if(isset($error) && is_array($error)) { // display error here } ?> If it's not all of them, then either exclude others or set an array with a list of fields you do want to check --whichever is easiest.
  23. I think it would be easier to store your data properly than persue a very awkward way of doing it.
  24. Well, the original error is generated here: header("Content-length: " . filesize($filePath)); It would seem the file contained in $filePath does not exist. Have you checked the relevant folder? The other errors are caused by the same problem. On a side note, you'll be sending an incorrect MIME type by the looks of things. A image's extension is not necessarily the same as it's MIME type. A .jpg should have the type image/jpeg. Not that's a major thing, i 'spect most browsers wouldn't have a problem
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.