r/StackoverReddit • • Jul 03 '24

Question can anyone please explain css selectors in depth

3 Upvotes

I am trying to learn webdev but I always get stuck at css selectors


r/StackoverReddit • • Jul 02 '24

Question Tiktoklive interactive plugin help.

3 Upvotes

I am a live streamer that plays horror games. I want to this thing I've seen on tiktok live steams of resident evil 4 remake where the viewers can send gifts to spawn enemies. I have tikfinity as an api to handle the gift integration but I'm not sure how to find the code to spawn certain enemies into the game. Any suggestions?


r/StackoverReddit • • Jul 02 '24

How is my code

3 Upvotes

How is my code, and what further suggestions should I use to improve it?

public class Calculator {
public double  sum(double x, double y) {
      return x + y;
}
public double difference(double x, double y) {
      return x - y;
}
public double product(double x, double y) {
      return x * y;
}
public double quotient(double x, double y) {
      if(y == 0) {
      throw new IllegalArgumentException("You cannot divide by zero");
}
      return x / y;
}
public double exponent(double x, double y) {
      return Math.pow(x, y); 
}
public double squareRoot(double x) {
      if(x < 0) {
      throw new IllegalArgumentException("You cannot square root a negative number");
}
      return Math.sqrt(x);
}
public double modulator(double x , double y) {
      if(y == 0) {
      throw new IllegalArgumentException("You cannot modulate by zero.");
}
      return x % y;
}
}

import java.util.Scanner;
public class CalculatorTest {

      public static void main(String[] args) {
          runCalc();
}
      public static void runCalc() {
        Calculator c = new Calculator();
        Scanner input = new Scanner(System.in);
        while(true) {
            System.out.println("Which operation would you like to do? add, subtract, multiply,       divide, exponent, square root, modulate, or exit");
            String operation = input.nextLine().trim().toLowerCase();
        if(operation.equals("exit")) {
            System.out.println("Bye");
                  break;
}
       double first = 0.0;
       double second = 0.0;

        if (!operation.equals("square root")) {
               System.out.println("Enter First Number: ");
               first = input.nextDouble();
               System.out.println("Enter Second Number: ");
               second = input.nextDouble();
               input.nextLine();
    } 
        else {
              System.out.println("Enter the number to find the square root: ");
              first = input.nextDouble();
              input.nextLine();
    }
        try {
    switch(operation){
    case "add":
      System.out.println("The answer is: " + String.format("%.2f", c.sum(first, second)));
      break;
    case "subtract":
      System.out.println("The answer is: " + String.format("%.2f", c.difference(first, second)));
      break;
    case "multiply":
      System.out.println("The answer is: " + String.format("%.2f", c.product(first, second)));
      break;
    case "divide":
      if(second != 0) {
       System.out.println("The answer is: " + String.format("%.2f", c.quotient(first, second)));
}
     else {
     System.out.println("Division by 0 is not allowed");
}
     break;
   case "exponent":
     System.out.println("The answer is: " + String.format("%.2f", c.exponent(first, second)));
     break;
   case "square root":
     if(first >= 0) {
       System.out.println("The answer is: " + String.format("%.2f", c.squareRoot(first)));
}
    else {
      System.out.println("Square root of a negative number cannot happen");
}
    break;
  case "modulate":
    if(second != 0) {
    System.out.println("The answer is: " + String.format("%.2f", c.modulator(first, second)));
}
   else {
    System.out.println("Modulation by zero is not allowed");
}
   break;
   default:
    System.out.println("This is not a valid operation. Try Again!");
   break;
}
}
     catch (IllegalArgumentException e) {
        System.out.println(e.getMessage());
}

}
               input.close();
}
}

r/StackoverReddit • • Jun 27 '24

Python How do I hide/unhide an selected objects visibility in Maya with Python?

3 Upvotes

Say if I create an object (like a sphere) and select it, how do I make that selected object invisible in Script editor with Python. and how do I make it visible again?


r/StackoverReddit • • Jun 26 '24

ShellLLama: Minimalistic Ollama CLI integrationto generate and execute Python Commands

3 Upvotes

This is my first ever public project it was made with **Simplicity **Extensibility in mind relying only on the Python standard library

Tell me what you guys think of it 😁😁😁

https://github.com/xHand-Eye/ShellLLama


r/StackoverReddit • • Jun 21 '24

Python I've always been fascinated by CGA and VGA graphics. is there a package in Python that allows the creation of these graphics?

3 Upvotes

I've never been good with C but have Thonny set up. Is there a package with the required architecture or maybe a version of Dos premade in python?

thanks


r/StackoverReddit • • Jun 19 '24

Question i am trying to integrate cloudflare turnstile in my flutter mobile app

3 Upvotes

hey, i am developing an app where i want to integrate turnstile in login process so that automated users cannot be created and login, i build this application in flutter and after researching on internet i didn't get any good resources or documentation from which i can get help in integrating turnstile to my system. (i don't have any web frontend for the product, it is just mobile app) can anyone help me with it?
one of my biggest doubt is what should we enter in the domain field in cloudflare turnstile to create sitekey.


r/StackoverReddit • • Jun 16 '24

Solved linux/llvm - what is the point of "/usr/bin/count-14"

3 Upvotes

I just did tab-completion for cou and it gave me a result count-14

$ which count-14
/usr/bin/count-14
$ file /usr/bin/count-14
/usr/bin/count-14: symbolic link to ../lib/llvm-14/bin/count

And that's where my track ends - there's no man count, and the llvm docs don't seem to mention the library (or I don't know how to look.)

So... what is it?


r/StackoverReddit • • Jun 16 '24

Question

3 Upvotes

Hello everyone I want to create custom ai softwares for businesses for that how many programming languages do I need to learn


r/StackoverReddit • • Jun 14 '24

Having trouble creating GMOD addon

3 Upvotes

I recently decided that I wanted to create a SWEP (gun) addon. This is because what I plan on making is something that I cannot find in the workshop. However, I am having trouble creating basic things. I create a hello world program, but I cannot get it to work (file not found/does not exist error). And the most to-date tutorial(s) are nothing like how my files look.

Question: Could any of you kind people of reddit help me figure this out before I go insane?

Note: I do not use Lua very often, but I kinda know it.


r/StackoverReddit • • Jun 14 '24

Question Icefaces menuPopup help (for work), thank you!

3 Upvotes

(Solved)

For work, I have to use ICEfaces. I have an ice:tree with multiple 1000s of tree nodes and they all need an ice:menuPopup.

The problem is that it significantly slows down the application due to the fact that every single menuPopup is being rendered for each tree node.

Any suggestions or advice on how to make the menuPopup render only when the user right clicks on the tree node?

Unfortunately, using something better than icefases is not an option. We are using icefaces 3.2.0 and upgrading beyond this is not an option. I am allowed to use other forms of JSF, like PrimeFaces, but I can't change the tree to PrimeFaces (at least in the amount of time I have left before our deployment).

I've tried using javascript to set the rendered flag on the menuPopup and when it is set to false the div's don't appear in the dom, which improves speed, but when I right click it does set the rendered flag to true but it doesn't make the menu appear... I also suspect that it won't work long term either as the menu has to do specific things depending on what the node represents... unfortunately, as well Icefaces documents at this version I cannot find anymore.

Thank you!


r/StackoverReddit • • Jun 14 '24

IFit Vue project

Thumbnail self.codinghelp
3 Upvotes

r/StackoverReddit • • Jun 11 '24

I would like to debug an external application, please help! Obscure exception "0x80000004: Single step"

Thumbnail self.askprogramming
3 Upvotes

r/StackoverReddit • • Jun 09 '24

Blitz Search

3 Upvotes

Sure Ill bite. I am developing a new file searching tool. Would love to have more early feedback to guide its success.

Home page https://natestah.com/ Also r/blitzsearch


r/StackoverReddit • • Jun 09 '24

I need help

Post image
3 Upvotes

Is this course enough for me to become a Web developer


r/StackoverReddit • • Dec 04 '25

Question Why did Stack Overflow block my account for 7 days after I posted an answer with a blog link? 😑

Thumbnail
reddit.com
2 Upvotes

r/StackoverReddit • • Sep 11 '24

CSS Can anyone help me with css selectors

2 Upvotes

r/StackoverReddit • • Aug 03 '24

Python Value error (pls help)

2 Upvotes

I am coding for a document with multiple graphs on it, so lots of coding for x and y axis's, I don't know why but I am getting an error, 'x and y must have same first dimension, but have shapes (539,) and (544,)', now I know this is something to do with the number of x's matching the number of y's but I don't know how to resolve this issue, any help would be greatly appreciated.


r/StackoverReddit • • Aug 02 '24

Question Hey! Advice needed (automation of document reviews)

2 Upvotes

Hey all, wanna say thanks in advance for the read. CONTEXT: There is an internship project I am working on, that basically consists of checking translated documents. The documents provided for translation, are the original language doc, and the english doc. I was also given multiple documents - regulatory docs, a "check-list" , a glossary for industry-specific words/ abbreviations. - Essentially, the docs I should look at when reviewing the translated document (while also comparing it to the original language doc) MAIN QUESTION: Is there a way to automate this process of reviewing the translation? One document has up to 120 pages, and its just not effective, time-wise. Im perfectly fine with the process being sped up, if not automated to the full extent. Thank you for any and all feedback.


r/StackoverReddit • • Jul 30 '24

Python where and how do i change the two needed directory paths for this project I'm following.

2 Upvotes

Sorry about the very dumb question and please feel free to call me dumb because i feel it right now. I wanted to try this project out and cant figure out what lines to change to point to my folders of pictures.

I think its lines 31 and 32 but when i change it doesn't work.

haystackPaths = list(paths.list_images(args["haystack"]))

this is what ive tried.

haystackPaths = list(paths.list_images(args["/path/to/folder"]))

haystackPaths = list(paths.list_images(args[/path/to/folder]))

any help would be great thank you


r/StackoverReddit • • Jul 30 '24

Microsoft Saml making me crazy

Thumbnail self.dotnet
2 Upvotes

r/StackoverReddit • • Jul 25 '24

Question How to stop from printing multiple times?

2 Upvotes
Alright, so im teaching myself to code, and to do so im working on building out a small text based game following along with tutorials and other resources to learn things as i go. That being said i learn best by doing but that obviously comes with it's own issues. Ive run myself into a problem. Below is my code for my main menu, everything seems to be working, i can type in one of the three options, (Tho they go no where yet, i havnt got that far lol.) and VSC isn't giving me any errors of anykind, when i run the code i don't get any kind of error either. The issue im having is that its returning the main menu 3 times instead of just a single time.

Example: 

What i want

***********************
*   Welcome To The    *
*  World of Caldera   *
***********************

***********************
*      <~Play~>       *
*      <~Help~>       *
*      <~Quit~>       *
***********************
*   Copyright 2024    *
*  KrystalAlchemist   *
***********************

What im getting

***********************
*   Welcome To The    *
*  World of Caldera   *
***********************

***********************
*      <~Play~>       *
*      <~Help~>       *
*      <~Quit~>       *
***********************
*   Copyright 2024    *
*  KrystalAlchemist   *
***********************
***********************
*   Welcome To The    *
*  World of Caldera   *
***********************

***********************
*      <~Play~>       *
*      <~Help~>       *
*      <~Quit~>       *
***********************
*   Copyright 2024    *
*  KrystalAlchemist   *
***********************
***********************
*   Welcome To The    *
*  World of Caldera   *
***********************

***********************
*      <~Play~>       *
*      <~Help~>       *
*      <~Quit~>       *
***********************
*   Copyright 2024    *
*  KrystalAlchemist   *
***********************

Code below for refrence:

def
 displaymainmenu():
   print('Legends of Caldera')
   for option in MAIN_MENU_OPTIONS:
        print()
        print('***********************')
        print('*   Welcome To The    *')
        print('*  World of Caldera   *')
        print('***********************')
        print('')
        print('***********************')
        print('*      <~Play~>       *')
        print('*      <~Help~>       *')
        print('*      <~Quit~>       *')
        print('***********************')
        print('*   Copyright 2024    *')
        print('*  KrystalAlchemist   *')
        print('***********************')

    # print()
    # print("Main menu\n")
    # print("Play")
    # print("Quit")
    

def
 getinput():
    playerInput = input("> ").upper()

    return playerInput

def
 Clearscreen():
    print(
os
.name)
    print(
sys
.platform)

    if 
sys
.platform == "win32":
        
os
.system('cls')


if __name__ == "__main__":
    GAME_OVER = False
    MAIN_MENU_OPTIONS = ['PLAY', 'QUIT', 'HELP']
    Clearscreen()
    while GAME_OVER is False:
        displaymainmenu()
        mainmenuoptionselected = getinput()

        if mainmenuoptionselected in MAIN_MENU_OPTIONS:
            break
        
        else:
            print("Sorry, invalid option.")

    Clearscreen

r/StackoverReddit • • Jul 25 '24

Python PyGame "failed loading libjpeg-9.dll"

2 Upvotes

I tried loading doing:

BackgroundImage = pygame.image.load("main.png").convert_alpha()

And I got this error and nothing else:

Failed loading libjpeg-9.dll