/r/CodingHelp

Photograph via //r/CodingHelp

Welcome! Feel free to ask any questions regarding coding you have!

Our Rules

1. FLAIR YOUR POSTS! Don't put tags in post titles!

2. Do not ask us to do all the coding for you unless you have money to spend. (If you have got money to spend, make that clear and the amount in question).

3. Do not post spam and/or misleading titles.

4. Do not be abusive to other coders.

5. Please format code properly, or use a site such as Gist or Pastebin. If possible please provide a live example of your issue.

6. Do not downvote people because you think they asked a dumb question. Just because you think that someone has a dumb question, doesn't mean that it is dumb to them.

7. Do not have a misleading user flair. Keep them sensible, describing your level of coding ability and/or languages you know and/or your profession.

8. Please do not ask unethical questions, such as asking for homework to be written by someone else, or asking someone to copy another project directly.

9. Make sure to follow the Reddit Rules.


How to start coding:

Check our website https://codinghelp.site we have all the information you need there!


Related subreddits:


Suggest a post flair

If you have any suggestions for flairs (programming languages or generic coding topics) that we should add, please use the button below to message the mods with your suggestion.

If approved as a sensible flair for the community to use, it will be added to our bot for automated suggestions and to the flair list for everyone to use!

Anyone who abuses this by spamming mods will be banned.


Current supported flairs

  • HTML
  • CSS
  • Javascript
  • PHP
  • SQL
  • Ruby
  • Java
  • Python
  • C++
  • C#
  • C (Not in Bot)
  • Open Source
  • Other Code
  • Random
  • Meta

Flair colors

  • Green

Web Related Languages (Eg HTML, CSS)

 

  • Blue

App Related Languages (Eg Python, C#)

 

  • Red

Generic Coding Topics (Eg Open Source)

 

  • Yellow

Other Flairs (Eg Random, Meta)


/r/CodingHelp

80,850 Subscribers

0

Help me take a look at video game exploit code

If you have experience with Lua and Luna please let me know.

Thanks.

0 Comments
2024/12/02
11:32 UTC

0

Need help with specific code!

For both CSS, Javascript and if not, even HTML

Can anyone help me with the code / logic behind an animation only occurring if a conditional statement is executed?

I'm making a small arg, and basically there's a number pad on a tv, and when the correct code is typed in, I need the TV to show text (typewriter animation)

I know how to do the number pad and typewriter animation but, connecting the conditional statement in Javascript to the animation in css is something I can't wrap my head around.

0 Comments
2024/12/02
10:26 UTC

3

Need help to learn coding

I want to start to learn to code/program but I have no clue of where and how to. I only know 1 course CS50 but I am not sure how to start give me some advice pls

2 Comments
2024/12/02
08:09 UTC

1

Shed customization software

I’m interested in setting up what tesla has but for sheds. Was curious if anyone could advise to how I can approach this project, I tried using threejs and the shed just looks too low quality. So I’m thinking about having images and somehow being able to adjust the color of the shed using code. This way I only need X premade images and code handles the variations.

Open to questions and feedback!

2 Comments
2024/12/02
02:40 UTC

1

Learning coding

Is coding worth learning when AI is threatening to completely change the landscape ?

Thoughts on self -taught Python?

4 Comments
2024/12/02
01:08 UTC

1

Not understanding code sequence/execution order with global variables

This is from the Codecademy training project "Training Days".

The finished code had two mistakes that I didn't catch but was still running without any errors. This resulted in overwritten global variables that caused two separate function calls to have the same output, when they should have been random. The issue was that the const logEvent() function was missing a second parameter (name, event), and the const logTime() function was also missing a second parameter (name, days).

I understand what the problem and fix was, but I don't understand why. Thinking sequentially, I was expecting the code to run line by line, which would call the two functions and log the two functions (lines 33-38), then call the two functions again, overwriting the global variables, and log the two functions again (lines 40-45). Instead, the global variables are overwritten before the logging occurs, so both have the same event/day values logged, and I'm not understanding why.

Here is the full code, with the parameters missing, causing the logging duplication. Let me know if I can clarify my misunderstanding, hopefully I made it clear enough via text. Thanks!

const getRandEvent = () => {
  const random = Math.floor(Math.random() * 3);
  if (random === 0) {
	return 'Marathon';
  } else if (random === 1) {
	return 'Triathlon';
  } else if (random === 2) {
	return 'Pentathlon';
  }
};

const getTrainingDays = event => {
  let days;
  if (event === 'Marathon') {
	days = 50;
  } else if (event === 'Triathlon') {
	days = 100;
  } else if (event === 'Pentathlon') {
	days = 200;
  }

  return days;
};

const logEvent = (name) => {
  console.log(`${name}'s event is: ${event}`);
};

const logTime = (name) => {
  console.log(`${name}'s time to train is: ${days} days`);
};

const name = 'Nala';
const event = getRandEvent();
const days = getTrainingDays(event);

logEvent(name, event);
logTime(name, days);

const name2 = 'Warren';
const event2 = getRandEvent();
const days2 = getTrainingDays(event2);

logEvent(name2, event2);
logTime(name2, days2);
7 Comments
2024/12/02
01:05 UTC

3

I wanna know what I should do for coding

I just had this dream and I thought it’d be a cool game idea the thing is iv never coded before closest thing iv come to doing it is the lil mini games on scratch otherwise idk what to do or how to start. I also don’t know if this belongs in this thing im just confused and want to know what to do.

4 Comments
2024/12/01
20:53 UTC

3

is it worth learning python? (if i want to go in fields like ai/ml,or data science)

basically i think python should be my main coding language as i am only interested in it , but at the same time c++ is also there which is taught in uni .... but if i learn python from scratch , will there be project opportunities or i can go in ai , ml , data science feilds too? ( i am learning from https://programming-24.mooc.fi/ )

9 Comments
2024/12/01
12:18 UTC

6

Wtf should I do know

Just quit learning C decided to go for something easier. I know the options are really just python and java script but I can’t decide. Im not doing this for a futu career just for fun and problem solvin. I think web development is some im more into than analytics but Im not sure if its worth learning html and css in addition to js. If I continue to enjoy coding I’ll probably end up learning both bht what should I do?

4 Comments
2024/12/01
10:56 UTC

1

Hover and line values dont match Lightweight Charts library

I'm using Lightweight Charts with vanilla JS html and css for price/time charts. The chart line for the 1day chart doesn't match the hover value, though the data passed is correct. the same setup works fine on same page, same data, but on 1month, 1year charts.the only thing that might be different from the other two could be the number of points. Any suggestion would be appreciated Thanks!

What i've tried: 1.Setting autoscale to true seem to change anything in the representation 2. Checked the data passed to the drawLine function and it seems to be correct 3. The chart has 2 main lines, tried calling the draw chart line for each of them separately to check if one line affects the other (doesnt seem like it)

0 Comments
2024/12/01
09:03 UTC

1

Looking for advice: Technologies to build workflows

Hey all,

I am thinking about building an app, and really just looking for advice or technologies to investigate which might be best suited to some tasks.

A component of what I want to build will involve requests and approval flows. Ideally, I’d want to be able to build a “workflow editor” type of tool, which allows a user to visually build a workflow. Then later, that workflow gets invoked and goes through a series of steps, for example, sending emails, awaiting approval, performing an action based on the result of the approval.

I’m trying to figure out what’s the best path to follow or technology to use that fits this use case.

Any guidance would be appreciated!

0 Comments
2024/12/01
08:41 UTC

1

Lip Sync

In python, if i had images of different mouth movements, how can I import text and have pyttsx3 say it while the images lip sync to it?

0 Comments
2024/12/01
02:21 UTC

2

What is wroth it 2024?

Should I learn html, c++, JavaScript or should I learn programming like python?

4 Comments
2024/11/30
17:48 UTC

1

Proxies

Yo so i was wondering like if i would be able to make something like if i clicked a link to steal my ip and info. It would i stead show people like 10 different proxies instead. And if could how would i do it. I want to stay safe and also learn about cyber security. Please help!!

1 Comment
2024/11/30
15:12 UTC

1

Marie.js disassembly

Anyone who knows how to disassemble Marie.js assembly language codes from its memory? Need help

3 Comments
2024/11/30
13:42 UTC

1

I want to learn a coding language but don't know what one to learn

This is my first coding language. I want to try making indie games or websites. Maybe some other miscellaneous things too. I've heard c++ is very versatile but is hard to learn. I've also heard good things about python. Another thing I might want to do is minecraft nodding, so should I learn Javascript?

6 Comments
2024/11/29
23:04 UTC

1

Counting Sort 2D Array confusion

I just did a counting sort and I'm really confused at how the buckets get sorted. I feel like I'm having some really dumb oversight. Basically I find the max, build an array of 2D arrays based off max, replace the strings (first half of them), and than build a final array with all the buckets (2D arrays) and join the string part of them. I had help from chat GPT for the part after the initial for loop to replace the strings as I created and sorted a 1D integer array but then didn't know how to reference the strings, which is what I'm trying to output.

For context the arr input array is a 2D array made up of arrays with one integer (arr[x][0]) and string (arr[x][1])

def countSort(arr):
    arrmax = max(int(i[0]) for i in arr)
    buckets = [[] for _ in range(arrmax + 1)]
    for x in range(len(arr)):
        if x < len(arr) // 2:
            buckets[int(arr[x][0])].append("-")
        else:
            buckets[int(arr[x][0])].append(arr[x][1])
    
    finalarr = []
    for bucket in buckets:
        finalarr.extend(bucket)

    print(" ".join(finalarr))
    return finalarr
1 Comment
2024/11/29
22:06 UTC

0

what the sigma please help

mind you i am no expert in coding im kind of tech savvy but im no expert. once upon a time i was roaming the internet when i found a website that spoke about how there is some sort of output text code language that appears when a computer cannot read something. its name originated in japan and it started with an o i believe. the language looked like some sort of glitch font you’d find on a font generator website. Z̀͠a̙͉̎l̂g̼o͌ Le͇v̴͖͌e̷ͪ͘l On̰e̞͚ kinda like that but not exactly. i just need to know what the hell im thinking of

7 Comments
2024/11/29
21:09 UTC

1

I have no idea where my css went

Before I pushed to git, all my styles were perfect. I pushed to github from VSCode and it was like, mate this is actually different. But it wasn't and I hate everything because it took my like 2 days to write a function.

Please look at my github page and/or repository history to find a problem

kyroneff.github.io/Waiting-Idle

0 Comments
2024/11/29
18:53 UTC

1

Raising matrices to large powers

I have an assignment that deals with linear algebra in python. I am to take an adjective matrix and take powers of it until a certain element of interest becomes non-zero. I can use the matrix multiplication function in numpy, but this will not be effective when the matrices are 100x100+ and I want to raise the matrix to a power of 100+. So I've played around with diagonalization and tried that, but there are so many accumulated rounding errors that it doesn't work either. I've also tried implementing tolerance levels and such but still get results that deviate greatly from the expected results. What should I do?

0 Comments
2024/11/29
18:23 UTC

2

Can't connect to websocket

I have already posted a question on stackoverflow, and here it is
https://stackoverflow.com/questions/79237759/connect-in-websocket-using-vps-and-nginx
I have hosted in my VPS and can connect but only using http, I want to use HTTPS and connect to my websocket at the same time, I have already a subdomain supposedly for my websocket and it has an SSL already but I still can't connect to it

2 Comments
2024/11/29
16:48 UTC

1

What will be your reaction on this issue

You have a large software in php with many tables , the app has a module to add user and configure some settings for the user , when the tester tried to add user it does not add and freeze , so he came to me and first thing i check is console where when adding user it sql error readystate 4 that column 'active_at' column not found. I just write a query to insert the column and gave to server guy , my manager started asking me why is the code not working ( for another feature where we use active_at column was tested perfectly) so i said the only reason the error could have occured is either column was never added or else it got removed, in db when server guy checks the table existed there so when i debugged i found that issue was one api was trying to insert active_at in a different table where active_at was not present so i removed the part of active_at insertion. For a good developer what should be my first reaction on this situation i think my assumption that column was removed was very wrong

0 Comments
2024/11/29
16:40 UTC

1

cant run VISUAL CODE

so i have been trying to code in my laptop, but i cant for some reasons.

i have downloaded mingw and added its been path too.

its showing an error

> cd "c:\Users\moham\Desktop\coding\first program.c\" ; if ($?) { gcc first -o first program } ; if ($?) { .\first program }

gcc.exe: error: program: No such file or directory

i have been trying to solve it from a while.

how am i resolve it?

3 Comments
2024/11/29
16:14 UTC

9

what coding language is best for beginning?

Currently I'm taking a college course that's more involved with networking. but I intend to move onto coding. I'd like to eventually reach a position where I can code AI algorithms and such, but I'd also like to go into ethical hacking and cyber security, maybe even combine the two.

Ofcourse that's the end goal. what coding language do you recommend beginning to learn? How would I go about learning it and any resource recommendations?

Also what coding has worked best for you in certain areas? I know some things work for others and some don't but I think having a point of reference while learning would help.

19 Comments
2024/11/29
10:19 UTC

2

LLM Proxies.

Can someone help me understand how to set up an LLM proxy and explain how it works? I was going to use OpenRouter but I cannot find any information online, not even on their site. I can’t even figure out if the LLM utilizes your hardware or not.

0 Comments
2024/11/29
10:02 UTC

1

I need help

i need help migrating online shopping website template from visual studio code to visual studio 2022 asp(.)net core web app mvc with database SSMS

1 Comment
2024/11/29
09:17 UTC

1

Proxy says, "Cannot connect to the Internet"

I already have a question posted on stackoverflow, since the code is too long and I can't paste everything here. Here's the link; https://stackoverflow.com/questions/79234774/why-is-my-proxy-displaying-you-are-not-connected-to-the-internet

8 Comments
2024/11/28
17:03 UTC

1

Assembly

What would be the best way to learn assembly with completely no knowledge of it?

3 Comments
2024/11/28
15:30 UTC

1

Python Interview for a SDET role

Hello everyone, I need some help/advice. I have an interview next week as a final interview for a SDET role focusing on Python. I have no experience using Python and the interview is supposed to be a technical interview with 2 LeetCode questions. The first interview was more of a behavioral interview. What can I do to pass this interview?

2 Comments
2024/11/27
21:21 UTC

1

Class and _init_ trouble

I am writing some code for a python homework assignment and whenever I go to turn it in I get an error that says that I am missing the constructor. Am I incorrectly using the method? For reference, I have to create a class and a constructor that accepts the parameter stock_file(str).

class Store:
 
    
    def __init__(self,stock_file:str): 
        self.stock = {}
        with open(stock_file,'r') as file:
                     for line in file:
                         Item_name,Quantity_in_stock,Price_per_unit=line.strip().split(',')
                         Quantity_in_stock = int(Quantity_in_stock)
                         Price_per_unit = float(Price_per_unit)
                         self.stock[Item_name] = [Quantity_in_stock, Price_per_unit]
1 Comment
2024/11/27
19:27 UTC

Back To Top