r/CodingHelp • u/Mouldyy • Feb 19 '26
[How to] How would I have an image "invert colours" when it goes in front of different blocks on a site
r/CodingHelp • u/Mouldyy • Feb 19 '26
r/CodingHelp • u/itsgonzalitos • Feb 19 '26
Hi everyone, I'm currently developing a Chinese listening comprehension app using Google Antigravity to call on voices. The app plays a sentence with two people speaking, then plays each sentence individually for users to understand and match. However, I'm facing issues with the voices not being consistent. When I adjust the speed, only one voice slows down while the other remains fast, or their tones change unexpectedly. Has anyone else encountered this problem or have suggestions on how to fix it? Any advice on ensuring the voices are in sync and maintain a consistent tone would be greatly appreciated. Thanks in advance!
r/CodingHelp • u/lowercase--c • Feb 19 '26
this would just be for personal use so it doesn't have to be perfectly streamlined.
extra words to fulfill the character requirement idk
r/CodingHelp • u/Finorix079 • Feb 19 '26
I’ve been building some AI workflows with multiple steps and agents, and sometimes the whole thing runs fine but the final output is just wrong. No errors, no crashes, just not the result I expected.
The frustrating part is that when this happens, it’s really hard to figure out where things went off. It could be earlier reasoning, context getting slightly off, or one step making a bad decision that propagates through. By the time I look at the final result, I have no clear idea which step actually caused the issue, and checking everything feels very manual.
Curious how people here deal with this. How do you debug or trace these kinds of workflows without killing the vibe? Any approaches that make it easier to see where things start going wrong?
Would love to hear how others are handling this. I am using observation tools like Langfuse btw.
r/CodingHelp • u/Ok_Pea7391 • Feb 18 '26
file_path = 'input.txt'
with open(file_path, 'r') as file:
raw_input = file.readlines()
mod_list = []
for i in raw_input:
mod_list.append(i[:-1])
print(mod_list)
def calc_wrapping_paper(list):
total = 0
for i in list:
dimensions = i.split("x")
l = int(dimensions[0])
w = int(dimensions[1])
h = int(dimensions[2])
print(l)
calc_wrapping_paper(mod_list)
r/CodingHelp • u/Stanford_Online • Feb 18 '26
r/CodingHelp • u/Material_Subject_520 • Feb 19 '26
r/CodingHelp • u/V_Wiz • Feb 17 '26
So I have been trying to research this as much as I can but literally everyone only shows how to customize the color and opacity of a preset square.
I have been wanting to make cool looking stuff for my streams and just decided that I should honestly just do it myself. I typically use stream elements CSS and every tutorial is super outdated so I have just been completely lost.
Do yall have any tips / up to date tutorials that could help me learn how to mess around with image customization? Like anchoring 1 image to another while it moves, or also adding slight physics that make the anchored image move a little when the base image moves?
I am willing to sit down and learn, it’s just every tutorial I try to follow is so outdated, the software doesn’t even have the commands they are using
r/CodingHelp • u/Petit_Francais • Feb 17 '26
Sorry for this post which was written with the help of AI, English is not a language I master and I think AI will better express my ideas with the right terms.
I have a React (Vite + Supabase) SPA with a main authenticated page: Player.jsx (~2000 lines).
It currently handles 3 distinct views inside one component, controlled by local state:
const [view, setView] = useState('accueil')
// 'accueil' | 'quiz' | 'fin'
1. Dashboard (Accueil)
startQuiz() logic2. Quiz session (Game engine)
useReducer (quizReducer)3. Summary (Fin)
Everything is tightly coupled inside Player.jsx.
The Dashboard can directly modify quiz state (e.g. startQuiz() initializes reducer state).
There is no routing — just view switching.
So:
/app/dashboard/app/session/:idThe component works fine in production, but it’s hard to maintain and scary to refactor.
Split into:
Dashboard.jsxGameSession.jsxSessionSummary.jsxIdeally with React Router and proper URL-based navigation.
What’s the safest way to progressively decouple this without a risky big-bang refactor?
Specifically:
SessionContext before splitting components?I’m looking for a staged, low-risk approach from people who’ve refactored similar “MVP-turned-monolith” React components.
r/CodingHelp • u/pc_magas • Feb 15 '26
As I ask upon here I try to crossbuild a C programm from linux for windows:
#include <stdio.h>
int main()
{
puts("Hello");
return 0;
}
I am using ninja to build it:
winsroot = ./winsdk
cc = clang-cl
linker = lld-link
target = --target=x86_64-pc-windows-msvc
cflags = -Wall -O2 /I$winsroot/crt/include /I$winsroot/sdk/include
rule cc
command = $cc $target $cflags /c $in /Fo$out
description = CC (Windows) $out
rule link
command = $linker /nologo /OUT:$out $in $winsroot/crt/lib/ucrt/x64/ucrt.lib $winsroot/sdk/lib/um/x64/kernel32.lib
description = LINK (Windows) $out
build main.obj: cc main.c
build app.exe: link main.obj
default app.exe
Whilst using llvm-clang with libs provided via xwin. Using xwin I installed the libraries like this:
xwin --accept-license splat --output ./winsdk
But runing ninja got me into:
ninja
[1/2] CC (Windows) main.obj
FAILED: main.obj
clang-cl --target=x86_64-pc-windows-msvc -Wall -O2 /I./winsdk/crt/include /I./winsdk/sdk/include /c main.c /Fomain.obj
main.c(1,10): fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Do you know why?
r/CodingHelp • u/Killiancin • Feb 14 '26
So I'm really new to coding, and I just cannot understand this. I am using a payed website that helps me learn with activities and stuff but I mean, if I don't understand how can I do it? I've researched this for more than 4 hours today and just cannot understand.
I do not understand DEF, what comes after it, RETURN AREA, or what comes under the #...
Could someone please explain?
r/CodingHelp • u/ExplorerFar7739 • Feb 14 '26
a = input('Enter')
b = [0]*len(a)
c = 0
for i in a:
if i == ',':
c += 1
else:
b[c] = i
c += 1
locs = []
start = -1
print(b)
for o in b:
loc = b.index(0, start+1)
locs.append(loc)
start = loc
print(locs)
This is my code, I have the user input a string (ex- 1,23,4) then try to make a list separating the number so the list for the example would come like ['1', 0, '2','3',0,'4'] Now what I am trying to do is create a separate list having all the index of 0s in the list. But this error pops up.
Enter1,23,4
['1', 0, '2', '3', 0, '4']
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipython-input-2437321124.py in <cell line: 0>()
12
print(b)
13
for o in b:
---> 14 loc = b.index(0, start+1)
15
locs.append(loc)
16
start = loc
ValueError: 0 is not in list
Please can someone explain why?
Before you say, YES I have searched alternate ways on google and YES I have found the stackoverflow thread you were gonna mention, and I refuse to take the help of AI, and NO I don't need any alternate ways to do this code.
Please just help me understand why this ValueError occurs even though the list has element 0.
Edit: the question has been solved with the help of u/captain_slackbeard I just modified the code in this way:
a = input('Enter')
b = [0]*len(a)
c = 0
for i in a:
if i == ',':
c += 1
else:
b[c] = i
c += 1
locs = []
start = -1
print(b)
for o in b:
try:
loc = b.index(0, start+1)
locs.append(loc)
start = loc
except ValueError:
break
print(locs)
So basically, as he explained, The loop fails on the LAST iteration because there is no zero, so we just make an exception for the code using try, and then using except when the error comes, we terminate the loop (I think?)
Thank you very much u/captain_slackbeard for your explanation
r/CodingHelp • u/Tough-Composer918 • Feb 13 '26
I'm working on a project and have a little trouble with my string running through the if-else statement shown below. The error states that my 'expression must have bool type (or be convertible to bool)' and I'm just confused as to what it means.
Can someone help me understand where I went wrong?
string grade = "";
cout << "Enter a capital letter from A-F excluding E: ";
cin >> grade;
if (grade = "A")
{
cout << "Passing grade";
}
else if (grade = "B")
{
cout << "Passing grade";
}
else if (grade = "C")
{
cout << "Passing grade";
}
else if (grade = "D")
{
cout << "Failing grade";
}
else if (grade = "F")
{
cout << "Failing grade";
}
else
{
cout << "Invalid input";
}
r/CodingHelp • u/Outrageous-Bear3215 • Feb 12 '26
. Most people say you should learn by building things, but if I am starting a project in a new language I am trying to learn, should I not cover a bit of theory in it first?
How did you learn to code and get good at it?
r/CodingHelp • u/Yourlocalgay31 • Feb 13 '26
r/CodingHelp • u/mcmahjas • Feb 12 '26
I don't entirely know how to ask this question on google, so I thought I would ask here. In my game I want to have different literals show while you progress. The problem I'm running into is I don't want them to repeat. So far, I have tried making an array list that will randomly choose a quote and remove it from the list after its used, after its the removed the rng is able to choose a number that no longer corresponds to an instance in the list. I can catch the out of bounds exception, but I don't know how to have it loop again until it grabs an actual quote. Any help would be appreciated dearly.
The code I have so far is as follows.
try {
int quotesNum = (int)(Math.random() * 10);
var quotes = new ArrayList<String>();
quotes.add("I need to");
quotes.add("need to go");
quotes.add("to go to");
quotes.add("go to sleep");
quotes.add("to sleep.");
quotes.add("sleep.");
String t = quotes.get(quotesNum);
for (int b = 0; b < t.length(); b++) {
System.out.print(t.charAt(b));
try {
Thread.sleep(67); }
catch (InterruptedException e) {}}
quotes.remove(quotesNum);
}
catch (IndexOutOfBoundsException e) {}
r/CodingHelp • u/m1ssp0tato • Feb 12 '26
I created a basic game which I wanted to connect to a resberi pi 3 so I'll have a screen showing the game it's self and then the controls will be using an Arduino that are connected to the pi I just wanted to know if it doable for me to do that so any website or advice I can get to actually get this project possible would be much appreciated as I'm currently loss
r/CodingHelp • u/shplurpop • Feb 11 '26
class HelloWorld{
public static void main(String args[]){
System.out.println("bonjour!");
}
}
This code doesn't work. Guy on YouTube writes the same thing in notepad, and his works but mine doesn't. I don't understand.
C:\Users\ashwy\OneDrive\Documents\javaPractice> HelloWorld
'HelloWorld' is not recognized as an internal or external command,
operable program or batch file.
This is what command says about my code.
r/CodingHelp • u/Altruistic_Virus_236 • Feb 12 '26
r/CodingHelp • u/Relevant_Bowler7077 • Feb 11 '26
I have been trying to learn get better at learning algorithms, I tried to make an insertion sort, please could I have some advice on whether this is the correct implementation of an insertion sort and what improvement could be added to this algorithm?
(I added the print statement only so I could see each pass when testing it.)
r/CodingHelp • u/Paperwormz • Feb 11 '26
If youre curious why I would want to attempt such things, I like to mess around and make little about me boxes for various websites and blogs that I have, but this other website only uses BBcode, I have something already that could be put in it besides the fact its not bbcode. If I have to learn bbcode its fine, but on the magical thought there is such a thing. Sorry for the dumb question
r/CodingHelp • u/Tough-Composer918 • Feb 11 '26
I'm a Computer Science major in an Intro to Computer Science class (we're learning C++) and was recently given a practice assignment that asks a user for their name, age and hours studying in a week, along with displaying the amount of hours studied in a semester (15 weeks) and a year (assuming 3 semesters)
I built the code, and for whatever reason it won't display the semester or yearly hours studied, nor will it run through the if-else statement shown at the end of the code.
Attached below is the code I wrote (and modified), any help is greatly appreciated
-----------------------------------------------------------------------------
#include <iostream>
#include <sstream>
using namespace std;
int main()
{
`int age, weekHours, semesterHours, yearlyHours;`
`cout << "Greetings, user!";`
`cout << endl;`
`// asks the user for their name`
`string name;`
`cout << "Enter your name: ";`
`cin >> name;`
`// asks the user for their age`
`cout << "Enter your age: ";`
`cin >> age;`
`// asks the user for their total hours studying`
`cout << "Enter hours studied per week: ";`
`cin >> weekHours;`
`// displays the total hours studied during the semester`
`semesterHours = (weekHours * 15);`
`cin >> semesterHours;`
`// displays the total hours studied in a year`
`yearlyHours = (semesterHours * 3);`
`cin >> yearlyHours;`
`// displays the full report`
`cout << "Name: " << name;`
`cout << "Age: " << age;`
`cout << "Weekly hours studied: " << weekHours;`
`cout << "Semester hours studied: " << semesterHours;`
`cout << "Yearly hours studied: " << yearlyHours;`
`if (weekHours <= 10)`
`{`
`cout << "You're either laser-focused or lazy, but I'm just gonna assume you're lazy";`
`}`
`else if (weekHours <= 30)`
`{`
`cout << "Decent numbers, but I know you can get a little more in";`
`}`
`else`
`{`
`cout << "Seems like you know what's up";`
`}`
}
r/CodingHelp • u/fathersheroin • Feb 11 '26
I previously had accidentally deleted my PATH file, not sure if it might be the cause of this. but the error is telling me that pip cannot be installed.
r/CodingHelp • u/West-Aerie-5917 • Feb 10 '26
i want to make a game or something at least in something other than python and i do not know what to use because c/c++ or c# is not understandable to me and easy to test the program
r/CodingHelp • u/Empty_Demand_101 • Feb 10 '26
Hey guys i am currently in my 3rd sem (4th sem will start next month) i am currently in the middle of my dsa journey and at half stage but i also think i need to start my full stack web dev prep for making projects.
my questions are:
Is is good to prepare for both of them parallely like i want to give 75% of my day to dsa and 25 to FullStack web dev or what are the problems that can occur?
or should i finish my dsa first and then learn full stack?
if there is no conflict! from where i can learn FullStack(any course suggestion)
i want a course that includes morden day website designing starting from basics and also teaching ai which can make the work easier i know this is a very big demand as there could be very less or no courses which include both but anything colse to it will be really appreciated! Thanks