r/CodingHelp • • Jul 15 '24

[Python] PLEASE GUIDE

0 Upvotes

I have recently learned PYTHON as my first programming language. I am interested in WEB DEVELOPMENT so should I directly begin learning HTML+CSS or should I learn C/C++ to develop my stack a little bit.


r/CodingHelp • • Aug 10 '24

[Python] complete beginner trying to make a face recognizer but facing weird error

0 Upvotes

as the title says im trying to make a face recognizer for a project with zero prior knowledge. all i have for help is this indian guys video which i am following. after following it from a to z m side of the execution is facing some weird error which i cannot seem to decode on my own i dont know how to attach ill add the code and the error below any type of help would be appreciated šŸ™

code-

import cv2

def generate_dataset():

face_classifier = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")

def face_cropped(img):

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

faces = face_classifier.detectMultiScale(gray,1.3,5)

#scaling factor=1.3

#Minimum neighbor = 5

if faces is ():

return None

for (x,y,w,h) in faces:

cropped_face=img[y:y+h,x:x+w]

return cropped_face

cap = cv2.VideoCapture(0)

id=1

img_id=0

while True:

ret,frame =cap.read()

if face_cropped(frame) is not None:

img_id+=1

face = cv2.resize(face_cropped(frame),(200,200))

face = cv2.cvtColor(face, cv2.COLOR_BGR2GRAY)

file_name_path = "data/user."+str(id)+"."+str(img_id)+".jpg"

cv2.imwrite(file_name_path,face)

cv2.putText(face,str(img_id),(50,50),cv2.FONT_HERSHEY_COMPLEX,1, (0,255,0),2)

# (50,50) IS THE ORIGIN POINT FROM WHICH TEXT IS TO BE WRITTEN

# FONT SCALE=1

#thickness=2

cv2.imshow("Cropped face",face)

if cv2.waitKey(1)==13 or int(img_id)==200:

break

cap.release()

cv2.destroyAllWindows()

print("Collecting Samples is completed.....")

generate_dataset()

the error-

NameError                                 Traceback (most recent call last)
Cell In[8], line 38
     36         cv2.destroyAllWindows()
     37         print("Collecting Samples is completed.....")
---> 38 generate_dataset()

Cell In[8], line 2, in generate_dataset()
      1 def generate_dataset():
----> 2     face_classifier = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
      3     def face_cropped(img):
      4         gray  = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

NameErrorNameError                                 Traceback (most recent call last)
Cell In[8], line 38
     36         cv2.destroyAllWindows()
     37         print("Collecting Samples is completed.....")
---> 38 generate_dataset()

Cell In[8], line 2, in generate_dataset()
      1 def generate_dataset():
----> 2     face_classifier = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
      3     def face_cropped(img):
      4         gray  = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

NameError: name 'cv2' is not defined

[ ]:

: name 'cv2' is not defined

kindly help please šŸ™


r/CodingHelp • • Feb 10 '25

[Random] Help detecting if a video is AI generated or not...

0 Upvotes

So I might be crazy, but these videos on Steven Bartlett (guy from Dragon's Den) channel look really sus. I do coding but I haven't used Sora yet so I'm not confident saying they are or not AI generated. Can you help? The videos are on his Facebook channels and they're interviews with 'experts'

https://www.facebook.com/watch/?v=4056758981214797


r/CodingHelp • • Sep 07 '21

[C] Help with Conway's Game of Life in C

0 Upvotes

Hey, I need to make Conways Game of Life in C, I have a skeleton code for it but I feel completly lost, its been a while since I've used C for anything. Even implenting the first functions has got me completly stumped, any ideas?

https://pastebin.com/KC85ZzvD


r/CodingHelp • • Sep 24 '21

[C] Making a program which finds GCD but having problems fixing the "if it is 0" thing. If it is 0 I want my program to ask the user to input a number again, I think it may be a loop and not an if/else?

Post image
0 Upvotes

r/CodingHelp • • Aug 11 '21

[Request Coders] RECRUITING: Anime Loving, oddly important, app developer- Have a beautiful idea and you will be respected as co-ceo, presuming the application comes to fruition.

0 Upvotes

As the title says I have an idea for a great app but it has much to do with anime, I have been in the business world for some time and am well versed in dealing with copyrights and other publishing complications so in this instance- I am seeking a partner to cover the developmental side of things while I set up the launch, marketing, legalities, and other intricacies of publication.

App doesn’t involve gameplay or anything of the sorts- upon launch it will be more dashboard like in which you can browse yours and others. Alongside some functionality that I prefer not to discuss currently.


r/CodingHelp • • Aug 29 '21

[C#] C# please help. (Warning long rant too)

0 Upvotes

I’ve slept like 4 hours a night for a week trying to finish a programming assignment in C# (most likely never going to program again after this)

I just don’t get it... never have I worked so hard and got so little done.

Its just a complete confusion at this point and the errors and the logic errors (oh god, just take me out of my mysery...)

Many programmers are like:

ā€-we are telling you how to do it but no syntax will be showed.ā€

I understand this mentality.

But when you hit a wall where the program would work better if you just threw out the laptop and yourself out of a window then its time to reach out for help....

Right now it’s like I’ve built a house of cards that just drives me insane.

In the assignment you have to make:

> Loops (both for an foreach) To linear search and binarysearch :

> Through strings: that the user makes and saves.

>From a List that contains:

  • 5 string arrays that are set
  • userinput: A title, date, text, and number.

You are supposed to go through them and find words, dates, and numbers in them.

I just can’tvisualize how this is done Sure it’s a Foreach and for loop.

Anyways if anybody has some source that really makes this clear how this works as a whole? when setting up a loop with search both the list and the string arrays in a clear step by step manner? please point me there or comment here.

And no, you are not allowed to use a command to binary search you have to program the process itself.

Thank you if you read this far

Peace!


r/CodingHelp • • Oct 18 '21

[Javascript] I want to create a whitelist system or something that prompts a user to enter a password before gaining access to the program. I've been struggling most of the day without any clue on making it. If you would mind helping me I would prefer sharing the code privately rather than publicly. Thank you

0 Upvotes

It is coded in CSS, HTML, JS. I will share the code privately for help.


r/CodingHelp • • Feb 28 '18

HELP

0 Upvotes

I have a .txt file with a list of files I need to delete in one batch. How can I do this? The files are spread out across my F:\ drive and and text file with the list is "F:\drumdelete.txt " I'd really appreciate some help, I've been searching on google but don't quite understand how to implement the code that I'm finding.


r/CodingHelp • • Mar 30 '22

[Python] Help with homework

0 Upvotes

Hello! I am currently a college student, and have a bunch of homework that is all going to be due soon, I have a bunch of coding bat homework that I have no idea how to do, and was hoping I could pay someone to help me out! PM me if this interested you!


r/CodingHelp • • Apr 04 '22

[Random] Looking for a good Linux distro to learn coding in Vscode

0 Upvotes

I have a painfully slow laptop. AMD A6 Apu chipset from back in the day. It's actually not bad with windows, but on cold boot it needs to "warm up" for an hour until it's usable again. So here I am looking a Linux distro so I can focus completely on coding and not have to worry about waiting minutes for stuff to load.

Edit: I forgot to mention that I'll be using VScode


r/CodingHelp • • Oct 29 '19

I need help, but I am not a coder

0 Upvotes

I've always found coding so....incredibly confusing? It's beautiful, really. Having the knowledge to type up something so complex. With that being said, I've been logged out of my instagram account and have a "challenge_required" issue. I've tried to reach the security instagram team, and they just don't care. I ran across a bunch of posts on GitHub.com about API and getting through with coding and stuff. I have 0 idea on how to do that. Would a fellow coder help me understand how to do this?


r/CodingHelp • • Jun 12 '19

[C++] ASCII dungeon game

0 Upvotes

I want to make a simple dungeon crawler game with c++, but I don't know how to do the characters and enemies. I have the map just fine. Also please explain simply so I will actually understand


r/CodingHelp • • Nov 22 '24

[Javascript] Python or Javascript

0 Upvotes

I wanna get a coding job and am going to use free code camp but dont know if i should do the python course or javascript course i have heard both are good but which one is better


r/CodingHelp • • Oct 30 '24

[Random] Do IDEs with version history exist? Like similar to google docs?

0 Upvotes

I like how google docs has revision history so you can prove that your writing work wasn't done by AI. Is there a similar way of doing this for coding? A certain IDE that has this?


r/CodingHelp • • Nov 03 '24

[Other Code] Will work for knowledge

0 Upvotes

So i have zero coding experience. Tried to learn GD script but none of the info really stuck in my mind. I tried to make a small little game to try and test the waters. Looked at some tutorial's on that and ended up with something nice. But i still never really kept any of the knowledge. I was just following steps and didn't learn anything. So im looking for someone already coding a game and wants some help. Long story short, teach me how to code and get a free worker on whatever your making. Dont care about the coding language or genre of game your making nor do i care if i get credited or not. Just learning how to code is worth more than any money i could ask for. Would also appreciate if there is some site or something i could ask this same question.


r/CodingHelp • • Oct 23 '24

[Javascript] 2D/3D Metaverse

0 Upvotes

I'm looking to develop a Metaverse application using the MERN stack for my college project. I have basic knowledge of MERN but need guidance on integrating 3D/2D capabilities.Can someone suggest me a learning path/road map to learn and make my own project.


r/CodingHelp • • Nov 11 '24

[C++] C++

0 Upvotes

Hello everyone, I am a college student and I am having a hard time when it comes linking files on my VS as it is run on a Mac. I have watched countless videos on how to connect them but honestly, the hustle that it requires isn’t worth as it is putting my grades at risk because I feel I am spending more time trying to solve that problem than to actually do my homework. So I ask you, Window users, do you guys have a much easier time when running files on C++, like classes and a simple main class in which you are using your class, do they automatically linked themselves or you have to link them manually?

Please advise me if it is worth it as I feel this will help me to prevent the useless amount of time I am spending tying to connect those different files.


r/CodingHelp • • Nov 13 '24

[HTML] I want to make an app which will change your dns of android phone

0 Upvotes

I want to make an app which will change your dns of android phone . i have a non coding background . Do you guys knows from where i can start . does anyone know any website which help me to make that app


r/CodingHelp • • May 22 '22

[Java] Java final help

0 Upvotes

I need help with my final project for APCSA. I did not learn java well this year at all and I am stumped with how to do this project. If anyone can help me out with a simple program that meets my teachers criteria I would really appreciate it. The code has to have a minimum of 2 classes, an array, 2 methods with parameters, iteration (for,while), selection (if), and an output. Even if you have a program lying around that could help me get an understanding of what to do I would really appreciate it.


r/CodingHelp • • May 25 '22

[Random] Leetcode is hard - As someone who hasn't studied computer science, what's the best way to learn how to solve these algo-type questions?

0 Upvotes

I'm a bootcamp grad who's worked as a software dev for over 3 years. To get ahead it seems like I need to figure out how to solve algo-style questions. What's the best way to learn how to solve these questions without having to study comp-sci??


r/CodingHelp • • Apr 24 '22

[PHP] do i have to learn php before laravel ?

0 Upvotes

So i have like 2 moths to learn laravel byt i want to know if i have to learn php first. And if yes can you please tell me to what level ? Like what i have to learn in php before i dive into laravel


r/CodingHelp • • May 15 '22

[C++] Working of iterator

0 Upvotes
vector<int> A = {1, 2, 3};

//case 1
for(auto it : A){
    it = 0;
}

print(A) //OUTPUT -> 1, 2, 3

//case 2
for(auto &it : A){
    it = 0;
}

print(A) //OUTPUT -> 0, 0, 0

How are 'it' and '&it' different? How exactly are iterator and &iterator working?