Welcome!

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. 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

    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? ;-)
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. Kaworu

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

    Hi! I found this tutorial for using gettext with Python. I am in this step: $ pygettext.py -d base -o locales/base.pot src/main.py My locales are located in a folder like that: C:\Users\DELL\Desktop\gettext-learning\locales [The folder gettext-learning also contain main.py file, which is...
  9. Kaworu

    Python Exception is always raised + my function is not working

    Hi. I have made a really simple Python program that calculates values in Celcius, Fahrenheit and Kelvin degrees. Sadly, I have two problems with it: 1. There is a check if the value of degrees (string, C or K or F) is correct (if not, then there is an exception being raised). Sadly, the code...
  10. Kaworu

    HTML & CSS I cannot center horizontally and display: table is not 100%

    Hi! :-) I am working on an element of a bigger page. I believe what's below is the complete minimal code of a solution, but it is not working. Basically, I have created a table in CSS (display: table) and I want for this whole table to be 100% of the width. I also wanna for elements withing...
  11. Kaworu

    CSS CSS code for styling scrollbar is not working

    Hi :) I have tried for the first time ever to change the scrollbar to my liking. Sadly, it is not working. The shape, color etc. of the scrollbar is the same as always, just like if I haven't written the CSS code. I am using Chrome. <!DOCTYPE html> <html lang="en"> <head>...
  12. Kaworu

    HTML & CSS How to automatically add space in CSS after buttons?

    Hi. I am making a very simple website. It consists mostly of buttons which are links to other pages on the net. The buttons are top-down oriented. I want to code is CSS in a way that will automatically add space after each button. Sadly, I have completely no idea how to do it other than putting...
  13. Kaworu

    My char gets changed for apparently no reason

    Hi! I'm trying to learn pure C. I made a simple program with definitions of various variables there can be. Everything seems okay, but my char definied as "W" shows in the program as "h". I do not know why it is like that. Any help would be greatly appreciated. The program: My execution of...
  14. Kaworu

    PHP I can’t read a file in a browser

    Hi! I have a problem with my PHP code. The other PHP file I have takes info from some data (about orders in a web-shop) and writes it in a text file – this is working fine. What I wanna achieve with this code is to read it in my browser window, so people who will visit this site can have an...
  15. Kaworu

    PHP Fopen() unexpected end of file error

    My problem Hello! I am learning how to code in PHP. I created a simple page that is simulating a car parts store. I encountered some error after opening a file and checking if it is working. What surprises me most is the fact, that PHP is telling me of some kind of “unexpected end of file...
  16. Kaworu

    HTML & CSS Why these divs are overlapping on mobiles?

    Hi! I have a problem with mobile version of a website I am working on currently. It’s my first post here, I hope I did everything right… :-) On a big screen, I have two columns next to each other and a copyright note in footer below them. The normal version has nothing to change. When I make...
Back
Top Bottom