Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Hazy125

Member
  • Content Count

    3,303
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Hazy125 got a reaction from jonrosalia in Unigine Valley Benchmark Scores Thread + SUPERPOSITION ***Over 1000 Submissions!***   
    Ok.... This is me running everything on my computer at 100% already, and doing complicated equations on both in the form of folding and 3D modelling...
    Also, I swear I don't have 70 tabs more than Linus at any given time

  2. Like
    Hazy125 got a reaction from Nup in Problem ending processes in task manager   
    There are solutions involving using cmd commands, the icacls command to be more exact. Or you could also look at a registry hack called takeownership, it adds a option to your right click menu that allows you to use things at system level rather than admin level. Then you would right click on your.exe and take ownership, then you won't get access denied errors
  3. Informative
    Hazy125 got a reaction from warlinty in File hosting website help?   
    The easiest way is to just put the file in a zip file and link to the zip the same way you would link to anything(<a href="file.zip">Text</a>). Zip files are automatically downloaded. You could also use some simple PHP code to force downloading of other file types outside of zip if you would prefer
  4. Informative
    Hazy125 got a reaction from AllHokage in File hosting website help?   
    The easiest way is to just put the file in a zip file and link to the zip the same way you would link to anything(<a href="file.zip">Text</a>). Zip files are automatically downloaded. You could also use some simple PHP code to force downloading of other file types outside of zip if you would prefer
  5. Informative
    Hazy125 got a reaction from Joveice in frontend get hyperlink on whole table row   
    Give all the table cells a class. Add an event listener for that class for click. In the event listener check if keycode 17 is being pressed for control click
  6. Agree
    Hazy125 got a reaction from Limecat86 in Run server script from PHP (Linux) (Safe)   
    Well, your server is probably already set up so that PHP and apache are basically already running as root. So you could just run exec('YourCommand'); and that would work perfectly fine.
    Pros;
    -Easy AF
    -Extends PHP functionality beyond standard web use
     
    Cons;
    -Disabled in safe mode
    -Someone who finds a security flaw in your PHP script may be able to completely destroy your server
     
    So yeah, possible, but you have to be pretty damn sure your exec stuff is well protected
  7. Informative
    Hazy125 got a reaction from kirashi in CSS/HTML HELP   
    You need a style tag in your head tag so something like 
    <head> <style> ///Your css </style> </head> Now, the good news is you're technically already using css for most things. They way you're doing it is called inline styles. So it's pretty easy to transfer it to a style tag.
     
    First, you need to create selectors. You need a way to tell the css what it's being applied to. You CAN use the tag (for example the body tag) as the selector, but you want to try and avoid this. It's ok for the body tag, but you want to avoid it on other tags. The two main ways to add a selector is through an 'id' or a 'class' and the syntax is as follows
    <div class="redDivs"></div> <div class="redDivs"></div> <div class="redDivs"></div> <div id="blueDiv"></div> In my example I show how you would use a class and an id. If you only want to apply the style to one tag, you use an id. In my example, there is only one div that I want to make blue. Class is for applying the css to multiple tags. So every one of the redDiv's will be red.
     
    Now that you have selectors you can apply css using the selectors using the following syntax
    <style> #blueDiv {// Use the # symbol to target an id background-color: blue;//The semicolon is required } .redDivs {// Use the . symbol to target a class background-color: red; } </style>  
    So in your code you have bgcolor, width, valign, color and all that thing. That is your css. So you want to do something like
    <head> <style> body {//To select a tag you can simply write the tag name (Sorry forgot to mention that in above examples) backgournd-color: #96C2E5; //bgcolor is represented as background-color in css and hex colours are written in the above format } #tableCell { background-color: #0c457c; width: 20%; } #whiteHeading { color: #ffffff; } </style> </head> <body> <table> <tr> <td id="tableCell"> <h2 class="whiteHeading">Text</h2> </td> </tr> </table> </body>  
    That's the basic part of it, hope the examples made it clear enough for you
  8. Informative
    Hazy125 got a reaction from Joveice in PHP sql query not working   
    prepare > bind > execute > bind_result > fetch
  9. Informative
    Hazy125 got a reaction from babadoctor in Twitch API problems   
    The only thing I can see wrong with that is where you're sending your request (if you're using the right oAuth token). The twitch API endpoint is at api.twitch.tv/kraken not api.twitch.tv/api. So to get the info about the channel you would use https://api.twitch.tv/kraken/channels/<channel ID> where channel id is represented as the new numerical id rather than the username. To do this you can query the users endpoint using the username, and that will return the numerical client id
  10. Like
    Hazy125 got a reaction from bomberblyat in CSS/HTML HELP   
    You need a style tag in your head tag so something like 
    <head> <style> ///Your css </style> </head> Now, the good news is you're technically already using css for most things. They way you're doing it is called inline styles. So it's pretty easy to transfer it to a style tag.
     
    First, you need to create selectors. You need a way to tell the css what it's being applied to. You CAN use the tag (for example the body tag) as the selector, but you want to try and avoid this. It's ok for the body tag, but you want to avoid it on other tags. The two main ways to add a selector is through an 'id' or a 'class' and the syntax is as follows
    <div class="redDivs"></div> <div class="redDivs"></div> <div class="redDivs"></div> <div id="blueDiv"></div> In my example I show how you would use a class and an id. If you only want to apply the style to one tag, you use an id. In my example, there is only one div that I want to make blue. Class is for applying the css to multiple tags. So every one of the redDiv's will be red.
     
    Now that you have selectors you can apply css using the selectors using the following syntax
    <style> #blueDiv {// Use the # symbol to target an id background-color: blue;//The semicolon is required } .redDivs {// Use the . symbol to target a class background-color: red; } </style>  
    So in your code you have bgcolor, width, valign, color and all that thing. That is your css. So you want to do something like
    <head> <style> body {//To select a tag you can simply write the tag name (Sorry forgot to mention that in above examples) backgournd-color: #96C2E5; //bgcolor is represented as background-color in css and hex colours are written in the above format } #tableCell { background-color: #0c457c; width: 20%; } #whiteHeading { color: #ffffff; } </style> </head> <body> <table> <tr> <td id="tableCell"> <h2 class="whiteHeading">Text</h2> </td> </tr> </table> </body>  
    That's the basic part of it, hope the examples made it clear enough for you
  11. Like
    Hazy125 reacted to vorticalbox in HTML error   
    This so so unbelievably wrong, you link relative to where the current file it so if you have a folder layout like this
    index.html /pictures image.png You would link to the picture with 
    <img src="/pictures/image.png">  
  12. Agree
    Hazy125 got a reaction from yXea in Post Linus Memes Here! << -Original thread has returned   
    Welcome to the forum @Grim coder, there's a lot of people on here these days, but we mostly don't bite too much
  13. Informative
    Hazy125 got a reaction from Factory OC in How to locally test Html and CSS?   
    Save your file as whatever.html then open the file in your web browser. Just double click it and it'll probably open automatically 
     
  14. Like
    Hazy125 reacted to vorticalbox in How to locally test Html and CSS?   
    remember that you want relative links so if the css is in a folder called style then link to style/style.css and not c:/users/user/documents/style/style.css
  15. Informative
    Hazy125 got a reaction from mrchow19910319 in How to keep viewport size and window size identical?   
    The meta tage, like br and input tags are self closing or void tags. If you're using HTML5 which you should be it's the current spec, it doesn't matter if you have the tag like this <br> or like this <br />. Both are valid. But if you want to use earlier than HTML5 or XHTML, the spec for that version required the slash. So having the slash is always valid no matter what standards you're coding to and what browsers people are using to view your site(there are plenty of older browsers that have never heard of HTML5)... So yeah, I try and always make sure I close void tags that way when I can
  16. Like
    Hazy125 got a reaction from cazetofamo in List Some Programming Ideas... What Should I Create?   
    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 
  17. Informative
    Hazy125 got a reaction from CookieMaster in Is it possible?   
    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
  18. Agree
    Hazy125 got a reaction from fpo in Motivation   
    I used to underestimate the power of a to-do list. I get so much more done now that I use one
  19. Agree
    Hazy125 got a reaction from burnttoastnice in Motivation   
    I used to underestimate the power of a to-do list. I get so much more done now that I use one
  20. Like
    Hazy125 got a reaction from kirashi in List Some Programming Ideas... What Should I Create?   
    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 
  21. Like
    Hazy125 got a reaction from Beskamir in Motivation   
    I used to underestimate the power of a to-do list. I get so much more done now that I use one
  22. Agree
    Hazy125 got a reaction from Mira Yurizaki in HTML and CSS   
    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
  23. Like
    Hazy125 got a reaction from Yali in (HTML) Form Input to JS-Variable   
    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
  24. Like
    Hazy125 got a reaction from Yali in (HTML) Form Input to JS-Variable   
    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
  25. Like
    Hazy125 got a reaction from davidna2002 in Random Pictures PHP (Complete noob(   
    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
×