Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. or random...how is that random? Just a thought, but instead of randomizing the order of the list, read a random line from the list. Make all the lines the same length (take the longest line and add blankspace or another delimiter buffers to the shorter ones). Then use fseek randomizing the offset argument (and rounding up or down to the nearest newline mark).
  2. except that a negative char class is safer than a lazy quantifier...
  3. you're also missing a subject...
  4. uh...yeah...I'm kinda wondering how you managed to reverse a SATA cable... and why were you touching that in the first place? graphics card don't have nothin' to do with your HDD...
  5. well then explain what exactly you are having issues with, what you've tried, etc... because all I see is "please fill in the blanks for my homework assignment".
  6. How can you rightfully judge whether something is too much to ask unless you know how to do it already and are just being lazy? Seriously dude, computer classes are not required courses. If you're just gonna have someone else do your work, why signup for it in the first place? We are here to help people learn. You don't learn by having others do stuff for you.
  7. Sure, but how would it know the difference between 01-04-2010 & 04-01-2010. Wouldn't it just choose the first format and make do with it, I'll use the YYYY-MM-DD format though. Would be nice for a bit of explaining. I don't think PHP.net mentions anything about it. In short, it can't parse everything, due to some formats being ambiguous. See the link Dan provided for details.
  8. or changing content based on kwds (which btw will hurt your serp ranking if google finds out, unless you can demonstrate you are performing legit a/b or mv tests)
  9. Your WMP is different if you need to first read and then type then when you just have to type what comes to your mind. Someone may score average on such a typing test but may have to buy 3 keyboard's a year because of his coding speed. Well, yeah... that's the reason why I did the test multiple times and even memorized the text... your wpm significantly increases if you know what you're typing ahead of time vs. having to read it, process it, and spit it back out. My testing and posted results were intended to show that distinction.
  10. is MM_swapImage() and MM_swapImgRestore() php functions or javascript functions? edit: and are you actually echoing out $MobileImage somewhere?
  11. well what are you ultimately putting into your database, a timestamp of the date the user enters in? Sure, you can use mktime but if you already have the fields separated and know which values are for what, you can use strtotime just the same..., since you control the format being handed to it... edit: strtime attempts to parse the string, and it recognizes a lot of formats, but if you are unsure how to format it, yyyy-mm-dd works.
  12. $HTTP_REFERER is deprecated. Use $_SERVER['HTTP_REFERER'], but note that it is set by the agent making the request (like the browser) and is very easily spoofed, so basically it's not really trustworthy unless your site's average user is not inclined to know such things.
  13. can you be more specific than "it fails" ?
  14. the easiest way to do it is to not let someone enter in whatever date format they want in some generic one-field-for-everything form. Create separate dropdowns for day, month and year.
  15. // database query stuff here echo "<tr>"; while ($row = mysql_fetch_array($results)) { extract($row); $images = $ImageThumb . $image_id . ".jpg"; echo "<td><a href =\"".$ImageDir . $image_id . ".jpg\" target='top'>"; echo "<img src=\"".$images . "\"></a></td>"; echo ($x % 7 == 0)? "</tr><tr>" : ""; $x++; } echo "</tr>";
  16. might have to benchmark it and it certainly depends on how big the subject is (and in the end of the day diff might be too small to care...) but in general if you are just wanting to check a string within a string (not looking to match a pattern) the built-in string search functions are faster. strpos, stripos, strstr or stristr, etc...
  17. I did 10 tests with 100% accuracy: High: 96 Low: 84 Average: 88 But fyi if you fix your typos during the test, it doesn't count it as an error, though it obviously hurts your wpm (other tests I've taken count the error regardless of whether you fix it or not; dunno which method is really more accurate :/). So if I roughly accounted for that, my wpm would be slightly higher but with errors knocking it back down (which I guess more or less evens out to just counting 100% accuracy runs, but idk...) Also for shits and grins I more or less memorized the paragraph and went balls to the wall and got 136 -> 122.
  18. slightly related, up at the top left where it says "Hello <your name>" (see screenshot) under that is a link that gives you a listing of all threads you've posted in that have unread replies. [attachment deleted by admin]
  19. .josh

    Education

    lol QFT
  20. .josh

    Education

    A lot of "small town" places still have smoking sections but more and more larger cities are banning smoking indoors - even in your own residency.
  21. "protection against social engineering malware" - does that mean they are leaders in not allowing people to create addons/mods for their browser?
  22. .josh

    Education

    that's because we can't be bothered with stupid things like "time". Foolish Mortals.
  23. FYI you do not need to know all of those, or even most of those, to be a successful web developer.
  24. Is someone who is asking what topics he should cover, even qualified to be a teacher?
  25. there is nothing wrong with type casting if that's all it takes to validate data format. For instance, with pagination. You are already gonna have condition to make sure number is within range 1-X, so that's covered. As for the rest of it, forcing the value to int nicely covers everything else: making sure it's a whole number. Right tool for the right job, sort of thing.
×
×
  • 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.