Jump to content

The Little Guy

Members
  • Posts

    6,675
  • Joined

  • Last visited

Everything posted by The Little Guy

  1. Going off that... put the extension in a separate column, that is what i always do when saving the files.
  2. Something like this: select * from appointments order by appointment_time
  3. putting a match in the field list is useless, unless you want to sort by it. SELECT item_keyword_search, (MATCH (item_keyword_search) AGAINST ('d-link* router*' IN BOOLEAN MODE)) as score FROM item_import WHERE MATCH (item_keyword_search) AGAINST ('d-link* router*' IN BOOLEAN MODE) order by score desc
  4. It does't, and from what I have read my two queries above should allow for natural sorting, so I don't think it is the issue. Wanna post the results of this? show create table files; what is the Collation of the column? that is more than likely the problem, as it has to do with sorting (if I am not mistaken)
  5. Give this a try: $query = "SELECT * FROM files WHERE `prod_id` = '$this->curProduct' ORDER BY LENGTH(file_name), file_name asc"; OR: $query = "SELECT * FROM files WHERE `prod_id` = '$this->curProduct' ORDER BY CAST(file_name as unsigned), file_name asc";
  6. That is one of my test pages for the ticker.
  7. Saw this ad in my Twitter: http://www.bingiton.com Basically you do a search and it displays Bing's results on one side and Google's on another side (The side is random for each search), and you have to choose which result set you like better. The bad thing is, their is still a way to cheat.... But basically it is Microsoft trying to prove it is better than Google. After the test Google won for me
  8. The UK one was bad IMO. The only British show I have ever liked was "The IT Crowd".
  9. That was for favorite topic, this was for favorite board
  10. First off, don't save dates as unix timestamps.
  11. To place a board you visit the most at the top of the page, before all other boards, for quick navigation. One problem I just noticed is that, that mod isn't compatible with SMF 2.0.2
  12. Maybe it is just me, but I feel that a favorites board would be awesome! There is even a mod for this! Mod: http://custom.simplemachines.org/mods/index.php?mod=2163
  13. This seems like a fairly close way to calculate it. When I did this the console logged about 15MB/s When I went to speedtest.net and did a speed test, it was pretty close to the same thing. The important parts are between the <script> tags (top and bottom) <!DOCTYPE HTML> <html> <head> <script> <?php echo "var filesize = ".filesize(__FILE__).";\r\n"; ?> var d1 = new Date().getTime(); </script> </head> <body> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> <p>a;dfashdflajhdlkfjhsldkfj</p> </body> <script> var d2 = new Date().getTime(); var millitime = d2 - d1; var diffTimeSeconds = millitime / 1000; var bits = (filesize * ; var kbits = bits / 1024; var connectionSpeed = kbits / (diffTimeSeconds); console.log(connectionSpeed / 1024); </script> </html>
  14. If you are including another php that may have issues. Usually it is good NOT to close your <?php tags, unless there is more non-php (html). If you do close them and have an unknown space, or new line after it, the file including it will see that as output. If you don't close the tag and have many newlines or spaces the PHP file will ignore those lines. <?php require_once "some_file.php"; // This will not throw an error require_once "some_file2.php"; // This will throw an error header("Content-Type: text/plain"); echo $var; some_file.php <?php $var = "some php code"; some_file2.php <?php $var = "some php code"; ?> Hope that makes sense. If that is not the cause are you sure you have valid php?
  15. The comment on there "There is also a difference between NULL === $var and $var === NULL" Annoys me. There is a difference? What is it? If you already figured out that there's a difference, post your work, man! I saw that too, so I had to try.... and... their wasn't a difference.
  16. Here is the source: http://hakre.wordpress.com/2011/03/29/php-is_null-vs-null/ That should also be time in seconds
  17. it is faster to do: if($value === null){ // do something: } over if(is_null($value)){ // do something: } Iterations: 100000 (10 Runs) # | NULL | rel % | is_null() | rel % ----+----------+--------+-----------+-------- 1 | 0.02851 | 5.9 % | 0.48044 | 1685.4% 2 | 0.03086 | 6.5 % | 0.47557 | 1541.2% 3 | 0.02853 | 5.9 % | 0.48534 | 1700.9% 4 | 0.02860 | 6.0 % | 0.47666 | 1666.6% 5 | 0.02854 | 6.0 % | 0.47783 | 1674.3% 6 | 0.02863 | 6.1 % | 0.47144 | 1646.7% 7 | 0.02854 | 6.0 % | 0.47272 | 1656.2% 8 | 0.02855 | 6.0 % | 0.47754 | 1672.6% 9 | 0.02854 | 6.0 % | 0.47301 | 1657.5% 10 | 0.02853 | 6.0 % | 0.47380 | 1660.7%
  18. mysql_query("SELECT COUNT(id) FROM users, players WHERE email = '$email' AND password = '$password'")or die(mysql_error());
  19. I am not sure what your trying to accomplish, but this should get the number of people who are currently viewing the page: /* Requires a unique key on (teacher_id, ip) */ mysql_query("insert into teacher_views (teacher_id, ip, view_time) values ($teacher_id, inet_aton($ip), now()) on duplicate key update view_time = values(view_time)"); $sql = mysql_query("select count(*) from teacher_views where view_time >= date_sub(now(), interval 5 minute)"); $row = mysql_fetch_array($sql); $views = $row[0];
  20. It depends on what you want to do. Java does many things better than php and PHP does many things better than Java.
  21. - It now works in IE7+ (IDK if it works in IE6, I have no way to test that ATM). - I merged the CSS files. - The redirect is fixed
  22. To add to: To make it successful/useful, you need to add elements that you wouldn't find at other sites, such as at addictinggames.com or newgrounds.com. How can you be different to be a better competitor in the game genre? Don't re-invent the wheel make it better.
  23. Actually, I believe his form action is wrong.
×
×
  • 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.