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 How can I design this better using OO and SOLID principles?

    Honestly, the simplest thing to do in my opinion would be to just handle your return types. A circle does have an integer of # of straight sides. That number is 0. A circle has 0 straight sides. This means that your number of sides function *can* actually be used for the circle, but the answer...
  2. Ghost

    Largest and smallest word.

    What seems interesting / what are you thanking him for? He's asking a question... This sounds like a very specific school assignment to be honest lol. Anyways, I do not know C, but here's a resource that claims to find shortest word with C...
  3. Ghost

    PHP Uploaded File not arriving to server folder

    I wrote a function a while back that can check files for errors in the PHP uploading process... Maybe it will help you. You won't be able to copy and paste this and expect it to work for you because there is custom error reporting here. You can use the numbers 1-8 if the...
  4. Ghost

    PHP Ajax on php Website

    I agree with @Alma_99 - Your best bet is to either construct new DOM elements or have them already created (but hidden) to show as the quiz progresses. This way AJAX can save answers in the background without interrupting the user experience. I also highly recommend loading screens in between...
  5. Ghost

    How did you find CodeForum.ORG?

    Pepperidge Farm remembers quite a few early CF group projects. Ah, those days were interesting @Malcolm
  6. Ghost

    Python A simple Python script to organize files on your desktop

    Well, the lower() actually turns their answer into lowercase so that it's always 'yes' or not 'yes'. Even 'Yes' will evaluate as true because 'Yes' with .lower() will be 'yes'. To add to this though, you could use .strip() to make sure there's no spaces before or after so that ' YeS ' would...
  7. Ghost

    How did you find CodeForum.ORG?

    Malcolm created the site, I followed and ended up liking the community! I am not around nearly as much as I would be in my younger days, but I do love a great forum - especially for coding.
  8. Ghost

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

    $html = @file_get_contents("https://codeforum.org/threads/say-hello-in-a-coding-language.915/page-4"); if($html){ if(($position = strpos("hello", $html)) !== false){ echo substr($html, $position, 5); // hello } else { echo "hello"; } else { echo "hello"; } Using PHP to fetch this forum...
  9. Ghost

    How many passwords do you use online?

    well, he pretty much admitted to using any letter lowercase of upper case, any number, and 10 different symbols. That's 62 possible characters... so a 10 character password would have 839,299,365,868,340,224 possible values (I think - because 62^10 for 62 possible choices to the power of 10 for...
  10. Ghost

    PHP Help me club these 2 plugin

    This might be relevant... It's a post from 2019 regarding Vanilla notifications via API: https://open.vanillaforums.com/discussion/37020/how-to-send-vanilla-notifications-via-api I think they have probably made some changes, but this might point you in the right direction... It seems they have...
  11. Ghost

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

    hahaha, I suppose it counts? You can make text bold using 2 asterisks ** or italic with one * asterisk. **hello** *hello* var json = { "welcome": "Hello!", "farewell":"goodbye" } alert(json.welcome) console.log("Don't forget to say " + json.farewell + " before you go!") Some basic json...
  12. Ghost

    Python Need some exercise

    What exercises did you end up doing? I like to challenge myself to make mini projects and goals for each language I learn in the beginning: Connect to a website, return the results Show a GUI on the screen Retrieve JSON, XML, or other data from online CRUD (Create, read, update, delete)...
  13. Ghost

    Calculator Ready codes

    Here's generally how those work... I'm not sure if you can use these on Wix, but here's how you can do it with PHP (backend server) and JavaScript (on the front end view / client side). The PHP (server side) version of this works like such: $sum = 5 + 3; // 8 $multiply = 5 * 3; // 15 $divide =...
  14. Ghost

    PHP Help me club these 2 plugin

    Hi Dilip, I want to help, but there's a fair bit of code to look through. Can you narrow it down for us by sharing what you've tried already? Your best bet is to figure out how to write a function that sends off a built in notification, or another plugin that can be used easily to write custom...
  15. Ghost

    PHP Unsure how to handle a string with mixed quotes

    Hey Dave, as TimB said above, you can use escapes (backslash) so the quotations are ignored and don't interfere. $s = "Based on an image I found. Hopefully it says, \"Backup, I'll cut you!\""; $s2 = 'Based on an image I found. Hopefully it says, "Backup, I\'ll cut you!"'; In my example, you...
  16. Ghost

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

    hello $word = "hello"; echo $word; $words = array("hello", "goodbye"); echo $words[0]; $hello = new Class("hello"){ public function __construct($lang = "english"){ $this->lang = $lang; } public function say(){ $words = array( "english"=>"Hello", "spanish"=>"Hola" ); return...
  17. Ghost

    PHP Can someone help I want to build a forum and don't know where to start

    Hey, I have created a few forum scripts. It's not so hard if you understand the core behind it. For example, PHP and SQL is enough for the backend. You'll need to create some HTML forms to submit information from pages. It's helpful if you know JavaScript so you can use AJAX and other functions...
  18. Ghost

    Python Running a python file inside a python file (ANSWERED)

    Yeah, it is. You can also do something like "from ..folder import filename" I *think*, but it's been a while since I had to
  19. Ghost

    Python Running a python file inside a python file (ANSWERED)

    Just make sure the file (file.py in this case) is in the current directory: in main.py: import importedthingy If it's in a subfolder you will be doing something like this: files: in main.py: fromsubfolder import importedthingy
Back
Top Bottom