Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by Kaworu

  1. Kaworu

    Python I cannot slice Strings in a list

    Hi! I have a list of Strings whose contents begins with 5 characters, always the same, that I do not wanna. I want to get rid of them all for all the list individual contents. My code is something like this: for item in ENG_list: item = item[5:] print(ENG_list) Sadly, ENG_list, as...
  2. Kaworu

    PHP The most basic PHP program is not working correctly

    Okey, I know where the problem appeared from! (xD) I should enter the address of the PHP file using localhost/address/to/the/script.php. Instead, I was just double clicking the script. Oops? I feel like an idiot... But everything is working now! :D
  3. Kaworu

    PHP The most basic PHP program is not working correctly

    Hm.... people on StackOverflow claim that XAMPP should be working "right out of the box"? So are claiming people here. But you know? I think my installation of XAMPP is from 2019 - I will try to reinstall and install a fresh one, maybe then it will fix the issue? Then I can ask you for help if...
  4. Kaworu

    PHP The most basic PHP program is not working correctly

    Yeah, folder, sorry ;-) I still do not know why it is not working, though...? EDIT: Hm... the <p> is necessary, otherwise I have just a blank page.
  5. Kaworu

    PHP The most basic PHP program is not working correctly

    Okay, my current source code is this: <?php echo "<p>My first PHP script!</p>"; ?> I still see the weird ending. It's the same with HTML tags and with BODY tags. I'm starting to suppose something is wrong with my very Apache installation... Is that possible? EDIT: If you are talking...
  6. Kaworu

    PHP The most basic PHP program is not working correctly

    Oh, silly me. The script should be in htdocs file. Still, I have the exact same problem? I still see the ending of my ?> PHP tag. I do not know why.
  7. Kaworu

    PHP The most basic PHP program is not working correctly

    Okay, so: @Antero: I do not know what you mean. Are you talking about <p>? When I tried to just echo "text to print" it was not working at all. Or maybe you mean something else? I'm sorrry, but I do not understand what you are trying to tell me. @cbreemer: The file is in .php format. EDIT: I...
  8. Kaworu

    PHP The most basic PHP program is not working correctly

    Hi! I have written the most basic PHP program and the output is not as it should be :( Can somebody help me? I am using XAMPP v 3.2.4 Source code and the output below: [/SPOILER] I mean, I really do not get why what is printed is printed...? Any help? ;-)
  9. Kaworu

    CSS I cannot center the divs contents.

    Hi. I am working on a website. I have two divs (classes: centered-text and center-div - the first is supposed to center the text, the second pictures) and my CSS code for them is not working as intended. The detailed problem is below, in SPOILER: [/SPOILER] I really cannot guess why...
  10. Kaworu

    Python [Flask] I have error with my database (flask shell runtime error)

    Hi! I am still trying to learn Flask. And I have some problems that I cannot fix myself. Okay, so now I have a code (classes) that define a database. And I would like to generate the database in flash shell. However, I have some fundamental error with my database, yet I do not know why. My...
  11. Kaworu

    Python [OOP] I can't create an object - I got an invalid syntax error.

    Hi. I created a simple script to generate safe passwords. When I tried to rewrite it as OO code, I suddenly have an error. My code is this: The error is in the first line after if __name__ == "__main__". Exactly in the place when there is an equality sign. SyntaxError: invalid syntax Its...
  12. Kaworu

    Python Python tutorial: apparently gamemap: GameMap in entity.py does not work?

    Hi! I am following the Python Roguelike tutorial. I am currently in the 6th part of it. And in my source code there is an error I cannot fix myself. When I am trying to run main.py, the window with the game gets generated. However, when I try to make any move, an error occurs: Traceback (most...
  13. Kaworu

    Python [Flask-Moment] I can’t show the current time

    Okay, so! Before, I had {{ moment.include_moment() }} in separate {{ scripts }} block, and apparently it was not working. So, it seems, the solution was to put {{ moment.include_moment() }} in the head? And, miraciously, it works? ( YAY :D). But just a question - shouldn't we be putting...
  14. Kaworu

    Python [Flask-Moment] I can’t show the current time

    Hi! I am slowly learning Flask framework. When trying to show the current time (and time that had passed since the page got generated) I encountered an error. My app.py looks like this: My index.html in templates folder looks like this: And what I get is this: I dunno what I am doing...
  15. Kaworu

    Python Python gettext – I am afraid I do not know how to use that.

    I had the brief look at the documentation, but it wasn't helpful. When I will find some more time, I am gonna read the whole docs, but so far no success. Also, I think I might have screwed a little bit. Now I am trying do to things like that: cd...
Back
Top Bottom