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

    "Less is More: Your Best Python One-Liner?"

    Estimate π via the Monte Carlo method: import numpy as np; print(4 * np.mean(np.sum(np.random.rand(10**7, 2)**2, axis=1) < 1))
  2. ratwolf

    Console.WriteLine("Hello World");

    Welcome
  3. ratwolf

    C# Binary -> Decimal Converter Outputting large numbers outside of reason...

    You're seeing unexpected results because you're treating the characters in the binary string as their ASCII values, not actual binary digits. Add: // Get the binary digit character and convert it to its integer value (0 or 1) int bit = binary[i - 1] - '0'; using System; public class Program...
  4. ratwolf

    Python Generate a Secure Random Password in One Line!"

    Want to generate a secure, random password in just one line of Python? Here's a quick one-liner using random and string modules: import random, string password = ''.join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=12)) print(password) This creates a random...
  5. ratwolf

    (Nodejs) Trying to read a file but not getting the output I expect

    You should try this: Update fd inside the callback and only start the interval once the file is successfully opened. const path = require('path'); const fs = require('fs'); let mypath = path.join(__dirname, 'files', 'myvoice.raw'); let fd = null; let interval = null; const buffer =...
  6. ratwolf

    Secure PHP User Authentication System

    well documented
  7. ratwolf

    Node.JS Question about a programming exercise

    const dishData = [ { name: "Italian pasta", price: 9.55 }, { name: "Rice with veggies", price: 8.65 }, { name: "Chicken with potatoes", price: 15.55 }, { name: "Vegetarian Pizza", price: 6.45 } ]; const tax = 1.2; // example tax multiplier const taxBoolean = true; // example boolean...
  8. ratwolf

    Trying to add svg arrows to my slider gallery- but they disappear when added

    as you already confirmed with your left arrow png seems to work so it should be related to the svg itself just some ideas: Incorrect SVG file path: Double-check for typos or case sensitivity in "img/background/right-arrow.svg". SVG file is empty or broken: Open the .svg file in a browser—if...
  9. ratwolf

    Trying to add svg arrows to my slider gallery- but they disappear when added

    Can you share a snippet of your code?
  10. ratwolf

    If you could go back, would you code?

    m Programming languages are essentially extensions of human language—but specifically crafted to be unambiguous and precise, something natural language struggles with. Where you can say “Put that there” in English and rely on context, a computer needs crystal-clear instructions like move(item...
  11. ratwolf

    I actually like the temporary theme

    Happy with existing solution
  12. ratwolf

    Review My website Structure and Design

    you need to focus on developing the design of the website yourself. Please take some time to think about what you want in terms of aesthetics, user experience, and functionality. Once you have a clear vision, discuss it directly with your programmer to implement it. This is something that...
  13. ratwolf

    Python Kivy removing a label on the fly

    o.k. good to hear that the solution works well
  14. ratwolf

    Read Me How did you find us?

    I hope you wiil find here what you are looking for
  15. ratwolf

    Hi from 1985 !

    Welcome to the forum
  16. ratwolf

    Python Kivy removing a label on the fly

    from kivy.app import App from kivy.uix.widget import Widget from kivy.core.window import Window from kivy.uix.button import Button from kivy.uix.label import Label # manually setting in script Window.size = (800, 480) class YourWidget(Widget): def __init__(self, **kwargs)...
  17. ratwolf

    CSS Making element same width as height

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Text and Image Layout</title> <style> .parent { width: 100%; /* Full width to adapt */ height: auto; background-color...
  18. ratwolf

    Python The best Pickup Delivery Vehicle Routing Problem

    Looks much better
Back
Top Bottom