Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Ghost

    PHP Need help

    It shouldn't be too difficult, but it will take a little bit of time like anything else. You'll want to do something like this... -> Database table to store font name, description, permalink/UID (like: times-new-roman) so you can auto load the font file like $permalink.$extension where the...
  2. Ghost

    PHP Fopen() unexpected end of file error

    It's because you are using else: { and if($wp == false): { You should not have a colon after the if statement or the else while using the { } squiggly lines. If you want to use the colon syntax then remove the squiggly brackets and add an endif like this: if($wp == false): echo "<p><b>We...
  3. Ghost

    HTML I want to add a gif after the end of countdown timer....

    This isn't the best solution because a different, larger GIF could be bigger than the box. What you really should use is style "max-width:100%;" on the GIF image itself. This will force the GIF to never be larger than 100% width, and then you can have height:auto so that it automatically scales...
  4. Ghost

    Fun activity Say hello... in a coding language!

    I made my own language once v 'hello world' It used 'v' for voice. The way it worked was by using each new line, seeing what it starts with and then seeing what that means... each "command" or function/method/etc started with a letter, or two letters, or three letters to accommodate many...
  5. Ghost

    JavaScript Help with 'Reset' button

    Your best bet is to make sure you use a function to generate or initiate a canvas element so that way you can destroy it and recreate, or clear the canvas and then repaint / render the camera when needed again.
  6. Ghost

    HTML & CSS moving text and embeded video

    As they said, there's multiple ways to do this. Here's one way: transform:translate(-50%,-50%); left:50%; top:50%; position:absolute; It all depends on your current HTML and CSS. While the solution above will work for some, it will not work for others. It can depend on what element the target...
  7. Ghost

    HTML & CSS Can anyone tell me if this form of proposing names drops a cookie?

    Hi, yes, there is a cookie here that tracks visitors. However, there's no way to truly know if they are tracking who submits each proposal or not. They could track by IP, user agent, the cookie, or other things. If you need to submit multiple proposals without worrying about using the same...
  8. Ghost

    HTML & CSS Why these divs are overlapping on mobiles?

    Oh right on! That solution above is something to always remember, for good and bad times. Whenever something is overlapping like this, think of the 'absolute' value for position, and look for any non-dynamic heights, widths, positions like top, left, right, or bottom, and also look for certain...
  9. Ghost

    JavaScript Decrypt the rail fence cipher for beginners

    Okay, so first I am going to change a few things about the source so that it works without needing any other elements (like a button) or any functions. Here's what you have encryption wise, which can be run without relying on your other code: var text = "abcdefgh"; var output = ""; var i = 0...
  10. Ghost

    JavaScript How to alternate values from two variables?

    The answer above me uses Python, not JS. They posted the wrong type of code, but as they said - their answer is very similar to what we can do in JS. Here's a working example: var a = 1234; var b = 5678; a = a.toString(); b = b.toString(); var newstr = ''; for(var x = 0; x < a.length; x++){...
  11. Ghost

    Python A brief look at Python for beginners

    I completely agree. Python is a great language for beginners because it has easier syntax than others. It is a very flexible language. One thing that makes it truly the best for beginners is the high amount of resources you can use. There's libraries, frameworks, and working examples for so many...
  12. Ghost

    Python Python and its salary

    Salary can definitely vary, but Python is useful for so many things. It really comes down to what industry you are in. If you're using Python for AI, big data analytics, etc then you'll be paid more than if you are using Python for web design/development. My cousin for example uses Python at...
  13. Ghost

    HTML & CSS How to improve my account-details form?

    I agree with this completely. You definitely will want to normalize your style. Having something like account-save is nice because you can reuse it for account-delete, account-edit, account-whatever... However, I hate using dashes because I cannot double click the id/attribute. So I prefer to...
  14. Ghost

    Python I have found best python frameworks for beginners

    Is there a specific framework that you like the most? What about one that you think is the best for new coers? I think there are a lot of great ones to choose from. There are so many frameworks, libraries, and modules to choose from when it comes to learning how to apply various teachings to...
  15. Ghost

    HTML & CSS How to improve my account-details form?

    I haven't seen it visually, but the code looks good. Feature wise I would recommend adding a notes function so you can leave notes on accounts. Personally what I do is set up a datatase table like "feature_notes" and then a column would be "item_type" and a column "item_id" which could be...
  16. Ghost

    JavaScript How to randomise a response in discord.js

    I think the issue may be that you are choosing a random reply only once per time the script runs? You would want to make sure that you choose a random message every time the bot needs to send a message. Based on what you said it sounds like it's only choosing a random reply once, and then the...
  17. Ghost

    JavaScript what makes irritable object irritable?

    from w3schools: From Mozilla, on types of 'iterables' in JS: And finally, from StackOverflow, here is how you can check if something is iterable: note: this may fail in Internet Explorer versions that don't use Symbol & will need a polyfill to work properly function isIterable(obj) { //...
  18. Ghost

    PHP mysqli insert

    @Tealk I think you already solved your own problem, but for future Googlers here is an explanation - The error: This is because whatever data this table is "related to" is missing data. For example, I can have a table called "children" that stores a child ID, name, and a parent ID. My other...
  19. Ghost

    PHP Can't pass a value through session

    edit: nevermind, OP fixed it... He was sending GET but checking POST If your session value is saving, but the $_POST is null then you need to see what's being sent by the form. Can you do a print_r($_POST) on 2.php to check the form is sending data? If the form IS sending the correct...
  20. Ghost

    PHP Help with if/else statement for WordPress function

    At the very end before your return you can do this: if($counter === 0 || $showCounter === 0){ $postHTML = "<p>There are no upcoming events at this time...</p>"; } return $postHTML;
Back
Top Bottom