Jump to content

Ingolme

Moderator
  • Content count

    13,564
  • Joined

  • Last visited

  • Days Won

    21

Ingolme last won the day on July 4

Ingolme had the most liked content!

Community Reputation

905 Excellent

About Ingolme

  • Rank
    Foxy Mod

Contact Methods

  • Website URL
    http://www.thecodingfox.com/
  • ICQ
    0

Profile Information

  • Gender
    Not Telling
  • Interests
    Web development, drawing, videogames, foxes.

Previous Fields

  • Languages
    Java, PHP, MySQL, Javascript, CSS, HTML

Recent Profile Visitors

174,918 profile views
  1. Ingolme

    html - custom divs structure

    Wrap all the green blocks in a single container, give a left margin to the blue box equal to the width of that container. It's better not to use <div> elements when there are elements that better describe the contents, for example the red area could be a <header> element. The HTML might look something like this: <header class="site-header">Red block</header> <div class="sidebar"> <div>Green block</div> <div>Green block</div> <div>Green block</div> <div>Green block</div> <div>Green block</div> </div> <main> Blue block </main> The CSS to achieve the layout would be this: .sidebar { float: left; width: 30%; } main { margin-left: 30%; } If you want an element below the green and blue boxes, you should give "clear: both" to its CSS to force it below the green area. If the green and blue regions both need to be the same height, you could use a flex-box, but that is a bit more complicated to set up.
  2. Ingolme

    Doubts about this example.....

    By changing the prototype of a data type, you change every single object of that type. In this example, they are changing the prototype of the String object so that all strings have a trim() method. The trim() method removes spaces from the beginning and end of a string. The code you see in the replace() method /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g is called a regular expression, it is used to do complex manipulations with strings. There is a tutorial page about regular expressions here: https://www.w3schools.com/js/js_regexp.asp
  3. Ingolme

    request about a script

    You have the decryption function, it's on the page you linked to earlier. http://www.howtocreate.co.uk/emails/test_RC4B64_js.htm The problem here is that you have two variables to find out. There are three parts of the equation, input, password and output; two of which you don't know. You have only the output and you are trying to determine the password, but in order to determine the password you also need to know the input. If you knew the input, the brute force algorithm would look like this: var Encryption = new Rc4B64Class(); var englishWords = [ /* ... List of all possible English words ... */]; var input = "This is the input message"; var output = "LgYkO2JSfWoA394oOvXrwO4mtuDkusLCzg=="; var password, test; for(var i = 0; i < englishWords.length; i++) { password = englishWords[i]; test = Encryption.Decrypt(output, password); if(test == input) { alert("The password is " + password); break; } } You don't know the input, so this brute force algorithm is not going to work. You also don't have a full list of English words, which would be at least hundreds of thousands of items long. If you want to build a program that reads the list from a file, you're going to have to learn a lot more Javascript, I am not going to explain that complicated process here when there are entire articles written about it all over the internet. If you have to ask how to do things like that, you still have not learned enough Javascript. I am going to reiterate that the task you have set out to do is impossible, if encryption were that easy to break we would have some serious security problems on the internet.
  4. Ingolme

    Dropping a table

    You can't just mix SQL and Python, you have to put the SQL in a string and pass the string into a database method. Try passing the "DROP TABLE" line as a string into the execute() method.
  5. Ingolme

    request about a script

    I actually don't think you can easily brute force an encrypted string. Every attempt to decrypt it gives you an output message that could potentially be valid and you can't know for sure if the message you got is correct. You could do a check on the output to see if the it only contains characters that commonly appear in text, but that code might actually miss out on a valid output that happens to have unusual characters. Another possible way to test the output is to see if it has valid English words in it, but the message might not be in English. The other brute force attempt would test all possible inputs and all possible passwords to see if any of the input-password combinations give you the output message. It's pointless, you cannot brute force it. Don't even try.
  6. Ingolme

    request about a script

    No, it is not possible. If it was, then the encryption would not be doing its job since anybody can decrypt it.
  7. Ingolme

    jquery issue

    The files are not the same, I downloaded and compared them. On one of the sites they got corrupted.
  8. Ingolme

    jquery issue

    The files are corrupted. Download the files from that site that is working, and upload them to the other site.
  9. Ingolme

    jquery issue

    It looks like your copy of jQuery is corrupted. Plugins.js and functions.js both have issues as well. You should contact the person who provided these files and tell them about it.
  10. Ingolme

    Webpage doesn't work on iOS

    It would help to know the exact message it showed.
  11. Ingolme

    Webpage doesn't work on iOS

    What do you mean by "doesn't work"? What is the expected result and what is the result you are actually getting?
  12. Ingolme

    redirect into three different level website from login

    The issue is not related to PDO. The reason your code is not working is that your logic is wrong. This is the structure your code has: $username = $_POST['username']; $password = $_POST['password']; if($username && $password) { } elseif ($username && $password) { } elseif ($username && $password) { } else{ } You're making the exact same comparison three times in a row. If the comparison is true, only the first one will run, if the comparison is false then only the else block will run. The solution to your problem is to do one single query and pull out values from all three fields: Administrator, License, and Scorer. After these values have been pulled out, read these values and make a decision based on them. You are using prepared statements wrong, you should not put variables into the SQL string, put placeholders and then assign values to the placeholders, as shown in the tutorial page: https://www.w3schools.com/php/php_mysql_prepared_statements.asp If you do not fix that, your page is wide open to being hacked, people will be able to log in without knowing the username or password. You are also making the mistake of storing passwords in plain text in your database. This is a bad idea because if anybody manages to reveal the contents of your database, every single user will have had their password revealed which will be used to hack into their accounts on any number of sites. In PHP, you should use password_hash() and password_verify() when managing passwords. If those are not available, you will need another form of cryptographic hashing, such as PHP's crypt() function.
  13. Ingolme

    smooth scrolling and scrollspy doesn't work

    You need a script tag for the scrollspy plugin in addition to the jQuery one.
  14. Ingolme

    How to create a sprite using an image from my computer

    You would not use an animated GIF, you would have to use a static image with all of the animation frames on it, then manually slice pieces of the image based on the amount of time that has passed. Your game needs a loop that runs every fixed amount of time. You can do this using requestAnimationFrame(). MDN has a guide on how to use requestAnimationFrame here: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations. In the loop, the game needs to read inputs, calculate values and then display something on the canvas. For reading inputs, you are going to need one variable for each button in your game. In your current project, UP, DOWN, LEFT and RIGHT. You can add more buttons if you need them. Each of these variables starts off false, gets set to true when the onkeydown event fires and gets set back to false when the onkeyup event fires. During the game loop, if the program sees DOWN set to true, it will add 10 to the yPos variable. To keep things more organized, you should start using objects. You need a Controller object and a Character object. The controller contains information about which buttons are pressed and the character contains position information. The character could also contain information about the sprite, such as a reference to the image and the current animation frame. The following is a potential structure for these objects: var Controller = { UP : false, DOWN : false, LEFT : false, RIGHT : false }; var Character = { x : 0, y : 0, sprite : { image : document.getElementById("character"), width : 40, height : 40, currentFrame : 0 } }; We could go further into object-oriented programming and add methods to update the button values and to calculate the coordinates of the sprite.
  15. Ingolme

    Good IDE for web development with built-in compilers/debuggers?

    What you're asking for does not exist, to my knowledge. You can find a good back-end IDE, you can probably find a decent front-end code editor, but there isn't an IDE that mixes them together because the architectures and environments for front-end and back-end development are very different from each other. The most complete IDEs I can think of for PHP are Netbeans and Eclipse, but both of them were originally built for Java programming, so the PHP support is not perfect. I think Eclipse can integrate with version control, I haven't checked for that in Netbeans. For front end development specifically, a popular editor is Brackets. It is built with code completion for front end languges like HTML, CSS and Javascript and has a browser preview button. I'm not sure of all the features because I don't use it. Nobody has built compilers or debuggers for front end languages that I'm aware of and the reason is pretty clear to me: Browsers are updating all the time, the very best environment to compile and debug front-end languages is the browser itself. It would be a nightmare to maintain an independent front-end compiler/debugger because it would have to be updated every time any browser has an update. Browsers have built in tools for debugging Javascript, monitoring server requests and analyzing HTML elements and the CSS rules that are applied to them.
×