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

    Pygame Buttons

    Been playing around with creating buttons with pygame and thought I would share. btn_class.py import pygame # Inialize pygame font pygame.font.init() # Create a sprite group btn_sprites = pygame.sprite.Group() class Button(pygame.sprite.Sprite): def __init__(self, x=0, y=0...
  2. menator01

    JavaScript Is this actually JavaScript?

    I do not think that is javascript A basic example var arr = [3,1,5,7,6] arr = arr.reverse() // reverse list console.log(arr.join(', ')) output 6, 7, 5, 1, 3
  3. menator01

    Node.JS Trying to create a process that counts records from a MariaDB and stores the result in another table

    I was playing around with this today and found that something like this may work. Uses UNIX_TIMESTAMP I take the time of script execution - 86400 secounds (24 hours) and pull results in between that. Hope it helps. var mariadb = require('mysql2'); const pool = mariadb.createPool({ host...
  4. menator01

    Python Win Screen Error

    I tried to make sense of your code by indenting where I thought was the proper place but, kept getting errors. The last being player1_rect not defined. If you correct the the indented code, I'll give it a go. I'm usually pretty fair at pygame code. Might even be able to show a easier way. Here...
  5. menator01

    Latest Project - querying steam api

    Latest update - I have not found a way to search by game name yet. Script still needs a lot of optimization and bugs fixed. For the most part works. I've found that steam has a lot of games that do not have any data to retrieve. import tkinter as tk from tkinter import ttk import json from...
  6. menator01

    Latest Project - querying steam api

    Started a python project for game search on steam. It's in no way finished as I still need to finish the detail part, the search bar, and continue working on the bugs I find. Will probably continue on optimizing the code as well. There are parts that can be done better. Just trying to get...
  7. menator01

    Python how do i get numberOfItemsHired to accept only 1-500 items, and if not 1-500 display an error message

    Updated code to use sqlite database. May still have bugs. import tkinter as tk from tkinter.messagebox import showerror from tkinter import ttk import os from PIL import Image, ImageTk import sqlite3 as sq class Data: ''' Data class handles the database queries ''' def __init__(self)...
  8. menator01

    Python how do i get numberOfItemsHired to accept only 1-500 items, and if not 1-500 display an error message

    This was answered in another forum but, I will reply here as well. You should look into learning classes as it will make things easier in the long run. You should not do wildcard imports as they will cause many problems e.g. from tkinter import *. This is bad practice. I'll not post what the...
  9. menator01

    pyqt6 weather app

    Tkinter version of the weather app. Pulls data from google weather import tkinter as tk from datetime import datetime, timedelta from bs4 import BeautifulSoup import requests import urllib import base64 from PIL import Image, ImageTk from io import BytesIO class Data: pass def...
  10. menator01

    Console weather display

    Although there are better ways to do this but, just playing around. :) import asyncio from bs4 import BeautifulSoup import requests from datetime import datetime, timedelta import sys USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)...
  11. menator01

    Kivy Example

    As you can see in the image I get two errors. The first is for the png file, the second is the mp4. The mp4 file plays. I think it's in kivy module somewhere. In the docs I don't even need to add the thumbnail part if the png file is in the same folder as the mp4. I added it to test if it would...
  12. menator01

    Kivy Example

    I think its in kivy itself. I get an error saying the mp4 file can't be found but, it does play the file. Just doesn't download the thumbnail image/overlay. The first is when I call the local image. The second is when I call from the web. As stated the mp4 file plays, just don't get the image.
  13. menator01

    Kivy Example

    My first test kivy project. It's simple. The only thing I can't seem to get to work is the video thumbnail from web. If it's in the local directory it works. You can learn more about kivy from here. test.py from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager...
  14. menator01

    Mariadb: Need help querying multiple WHERE LIKE conditions

    The docs on the mariadb like clause https://mariadb.com/kb/en/like/
  15. menator01

    Im having some issues with Json and PHP on HTML website

    Does your search.php have html in the code? The error appears to be coming from the response.
  16. menator01

    JavaScript JavaScript Presentation issue

    I'm not experienced in javascript but, I got this to work from examples on w3school. If this is something like your wanting <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title>...
  17. menator01

    JavaScript Disable clicking on answers in a quiz after making a choice

    What are you using, radio button or checkbox?
  18. menator01

    JavaScript JavaScript Presentation issue

    Can we see the whole code?
  19. menator01

    Im having some issues with Json and PHP on HTML website

    It's hard to give any advice without seeing any code. Look through your files for where the <br> tags are located and review them.
  20. menator01

    Python variable cant be defined for some reason

    You beat me to it. LOL!
Back
Top Bottom