Gold Contributor
  • Content count

  • Joined

  • Last visited


  • check
    Agree 23
  • info_outline
    Informative 17
  • tag_faces
    Funny 12
  • thumb_up
    Thumbs Up 29
  • thumb_up
    Likes (Old) 1343


About Hazy125

  • Title
  • Birthday 1996-03-23


  • CPU
    Intel® core i7 3770K @5.1GHz
  • Motherboard
    Gigabyte G1 Sniper 3
  • RAM
    32GB G.Skill Ripjaws Z
  • GPU
    EVGA 980 Ti SC
  • Case
    NZXT Switch 810
  • Storage
    5TB worth of Seagate Barracuda + 250GB Evo
  • PSU
    1200w Beast from Cougar
  • Display(s)
    HPL1706, Acer V193HQ and BenQ GL2450HM
  • Cooling
    Custom loop, mostly Alphacool
  • Keyboard
    Ducky Zero with Browns
  • Mouse
    Thermaltake Black element
  • Sound
    Sound blaster Z + M50's
  • Operating System
    Win8, because I want Metro to have my babies... *Modern UI

Contact Methods

  • Twitter
  • Google+
  • Facebook
  • Skype
    Not Hazy125. Suck it
  • Razer Comms
  • Origin
    Can't remember... Probably Hazy125
  • Steam
  • Star Citizen
  • Battle.net
  • Xbox Live
    Seriously, there's a trend. 3 guesses...
  • Website URL

Profile Information

  • Gender
  • Location
    Not in Thailand, just saying
  • Interests
    ......Computers..... Why else would I be here
  • Occupation
    I'm a fucking tradie

Recent Profile Visitors

8,368 profile views
  1. Possible. Of course. Anything is possible in programming. There are literally hundreds of programs that grab text and content from PDF's. Then you just have to sort through the data. Even if it's an image it's possible. Instagram has nipple recognition. And text is much easier than nipples
  2. Man. You are just getting wrecked this thread...
  3. I used to underestimate the power of a to-do list. I get so much more done now that I use one
  4. Just guessing but clipboard contents contain metadata- More prominently visible when you copy the actual image rather than a link. But it's entirely possible that they're just analysing the clipboard contents source or some such
  5. A neural network type program in Node that can tell if the picture of a chair you supplied it is finished with wood, mesh, cloth, leather or suede
  6. "Moderator"
  7. Why is the Windows Store version of any app just so much worse than any other version

  8. Ok, I think I accidentally confused you with my post. The option I gave you was slightly different to momo's. Your form element doesn't have an 'id' attribute, but it has a name attribute. So I gave you the getElementsByTagName method to use. This method returns a list of all elements with a 'name' of whatever you choose, which is why you have to specify the number in these brackets [ ]. If you want to use id, it is much easier, no need to worry about the number thing you just need to change your input and script as follows <script> var inputJavascript = document.getElementById("htmlInput").value; </script> <input type="number" name="htmlInput" id"htmlInput"> Second. In my previous post I mentioned that JavaScript counted from 0. So you would have needed to have it like this anyway var inputJavascript = document.getElementsByTagName("htmlInput")[].value; Instead of the number 1. Since you only have one with a tag name of htmlInput, it would put that tag at the start of the list it makes. So the first item in that list is item 0..... Sorry, I think that little explanation didn't help all that much Third, your script doesn't work quite the was you imagine it would. JavaScript needs triggers to function. You have no triggers. And as I'm writing this @vorticalbox has provided you with a solution for the trigger problem. Basically, in his solution any text in your text box gets put into the next table item when you click that button. This works fine, but if you want it to happen as you're typing or don't want the button you can just change your input to the following <input type="number" id="htmlInput" onKeyPress="myFunction()"> Instead of having the button in vorticalbox's example
  9. Adding to momo's answer. If you only have the one form element with the name htmlInput, then a more precise example would be var input = document.getElementsByTagName("htmlInput")[0].value; If you have more than one input called htmlInput you can just do the following var input = document.getElementsByTagName("htmlInput")[0].value; var input2 = document.getElementsByTagName("htmlInput")[1].value; var input3 = document.getElementsByTagName("htmlInput")[2].value; Note that when counting with JavaScript you start counting from 0, not 1
  10. Just popping back to add some numbers as I was asked for proof. Test case 870 items, 1 user. RAID 0 SSD w/ 6800k. <?php //Scandir with mt_rand as the random operator $start = microtime(true); $val = scandir('D:\Downloads'); $limit = count($val); $returnNum = mt_rand(0, $limit); echo $val[$returnNum]; $time_elapsed_secs = microtime(true) - $start; echo '<br>Elapsed Time: ' . $time_elapsed_secs; echo '<br><br><br>'; $nstart = microtime(true); $servername = "localhost"; $username = ""; $password = ""; $dbname = "test"; //MySQL with RAND() query (By the way, easily improved upon) $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("rip"); } $sql = "SELECT * FROM `forum` ORDER BY rand() LIMIT 1"; $res = $conn->query($sql); if ($res->num_rows > 0) { while($row = $res->fetch_assoc()) { echo $row['file']; } } $conn->close(); $ntime_elapsed_secs = microtime(true) - $nstart; echo '<br>Elapsed Time: ' . $ntime_elapsed_secs; echo '<br><br><br>'; //Scandir with other users suggest random operator of rand() $n2start = microtime(true); $val = scandir('D:\Downloads'); $limit = count($val); $returnNum = rand(0, $limit); echo $val[$returnNum]; $n2time_elapsed_secs = microtime(true) - $n2start; echo '<br>Elapsed Time: ' . $n2time_elapsed_secs; ?> The script I used to test numbers. Results: As you can see, database is faster than both rand and mt_rand. Not a huge difference but hey, 1 user. In my first response I immediately suggest mt_rand() over rand() as it is common knowledge that it's just quicker and more random by default -source https://en.code-bude.net/2013/01/06/php-rand-vs-mt_rand-what-is-more-accurate-what-is-faster/ http://stackoverflow.com/questions/28760650/difference-between-mt-rand-and-rand and in fact in the last version of PHP they just got rid of the old rand() function and made it behave the same way as mt_rand() In reality the difference isn't huge, but whatever option you go for, using rand() over mt_rand is pointless
  11. You wouldn't want to add images to the database exactly. That would take up a lot of space. Your images are stored in the images directory. You would just add a string to your database referencing that. Example, just 'img1.gif'. Then when you select that from the database just send the user the source of that image. WAMP stands for Windows, Apache, MySQL, PHP. MySQL is already installed. I don't remember if PHPMyAdmin(Database management software is installed by default in WAMP because I use XAMPP) but even if it's not you can still create and manage databases from the command line or your PHP script. EDIT: Even though I mentioned the other answer in my first response but still recommended a database approach is because the alternative does not scale at all. You have 300 images and 20 people browsing at once and your whole site is broken
  12. Easiest and cleanest way is to add the list of images to a database and select * order rand to return a random image. If you really don't want to for whatever reason you can get a list of all images in that folder, add them to an array. Get the number of elements in that array and mt_rand() a random one which you can send to the user
  13. There aren't many developers that aren't web or C based on this forum. And fewer still who follow the programming sub forum to see topics consistently. In relation to your last thread, the easiest way is to just create a test app and write all values to the screen. Then just play with your device and watch the values. Then again, I'm a web dev. IOS isn't my thing at all
  14. You can technically just use notepad. The standard text editor that comes with widows. It works. But other editors come with some handy extras that can be useful. Notepad++ https://notepad-plus-plus.org/ - It's open source. Very popular. Has plenty of things added in such as syntax highlighting. I don't really like their plugin system, but if you're just starting out you probably won't be using plugins much anyway Sublime Text 3 https://www.sublimetext.com/3 - Unlimited free trial. Also popular. Much improved UI over notepad++. Extensive plugin system with almost anything you could ever want available. This is one of the editors I use. Atom https://atom.io/ - Relatively new editor created by Github, so it ships with git support which is a plus for many people. Similar UI to sublime. Plugins are very easy to create so even while it's somewhat new, it has good plugin support. I'm trying to move from sublime to atom
  15. Also onsubmit="return c()"