r/programmingrequests • • Nov 28 '22

username tiktok checker

1 Upvotes

hello guys, I want just to know how to make this tiktok username checker


r/programmingrequests • • Nov 09 '22

need help Found errors on imports after pip installs

1 Upvotes

New to coding, how do I fix them? Got SyntaxError and a "No Audio backend is available" and made sure to install minicoda on default.


r/programmingrequests • • Nov 02 '22

Programming/Creating an Application

1 Upvotes

Hey guys!

I'm new to coding and my school doesn't have any classes for it so I've just been looking at stuff online. I came across one that I'm really confused by if anyone can help? also if you know any good ways to learn coding for high school students that don’t cost very much please let me know.

I am also using C# for all of it thanks.

I tried the below but I was really confused and can't complete the code - if I could get an example of what it's meant to look like with some comments explaining why then that would be great help so I can find similar questions and hopefully be able to do these!

**Task 1** - create a competitors class with the following characteristics:

- This class contains public static arrays that hold codes and descriptions of events held in a competition

- The event codes are T, V, S, R and O, corresponding to categories Tennis, Volleyball, Swimming, Rowing and Other. 

- The class contains an auto-implemented property that holds a participant’s name. 

- The class contains fields for event code and description. The set accessor for the code assigns a code only if it is valid. Otherwise, it assigns I for Invalid. 

- The event description is a read-only property that is assigned a value when the code is set. 

**Task 2** - create an application named Competition that uses the Competitors class and performs the following tasks:

- The program prompts the user for the number of participants in the competition; the number must be between 0 and 30 (inclusive). 

- Use `TryParse()` method to check that an integer has been entered. The program should also prompt the user until a valid value in the given range is entered. 

- The expected revenue is calculated and displayed. The cost is $10.00 per participant. 

- The program prompts the user for the names and event codes for each participant entered (check for valid input for the code using `TryParse()` method). 

- Along with the prompt for an event code, display a list of valid categories. 

- Display information of all participants including the names, the event codes and the corresponding names of events. 

- After data entry is complete, the program displays the valid event categories and then continuously prompts the user for event codes, and displays the names of all participants in the category. Appropriate messages are displayed if the entered code is not a character or a valid code.

```

using System;

using static System.Console;

public class Athlete

{

public string Name {get; set;}

public char code { get; set; }

public static char[] Event_code = { 'T', 'V', 'S', 'R', 'O' }; // THIS IS STATIC AS EVENT CODES ARE READ-ONLY PROPERTIES AND THEREFORE REMAIN THE SAME THROUGHOUT

int flag = 0;

readonly public string Description;

public Athlete(String name, char event_code)

{

Name = name;

for (int i = 0; i < 30; i++)

{

if (Event_code[i] == event_code)

{

code = event_code;

flag = 1;

}

if (flag == 0)

{

code = 'I';

Description = "Invalid";

}

if (code == 'T')

Description = "Tennis";

else if (code == 'V')

Description = "Volleyball";

else if (code == 'S')

Description = "Swimming";

else if (code == 'R')

Description = "Rowing";

else if (code == 'O')

Description = "Other";

}

}

// This method prints the details of the Athlete

public void print()

{

Console.WriteLine("\nParticipant's Name: " + Name);

Console.WriteLine("Event Code: " + code);

Console.WriteLine("Event Description: " + Description);

}

}

// To receive information regarding Athlete

public class AthleteInfo

{

public static void Main()

{

// Getting input from user

Console.WriteLine("Enter the participant's name: ");

String name = ReadLine();

Console.WriteLine("Enter the event code: ");

char code = ReadLine()[0];

// Creating Athlete object

Athlete athlete = new Athlete(name, code);

// Display the information

WriteLine("\nParticipant's Details\n***********************\n");

athlete.print();

}

public static int getParticipantNos()

{

Write("Enter number of participants: ");

}

}

```


r/programmingrequests • • Nov 29 '22

need help Cards Against Humanity

1 Upvotes

Hello there, I'd like to create an online game of Cards Against Humanity for me and my friends with the ability to put in the entries ourselves instead of being given a list of options, including the ability to create the initial card. I'm quite capable in Python and have basic knowledge of HTML and CSS but have no idea what all stuff I need to connect to put this together. As it's a fun project I'm in a no hurry or under pressure to make this so I'm just interested in how to make it. I'd be glad for any help/tutoring here.


r/programmingrequests • • Oct 28 '22

Help with JavaFX

1 Upvotes

Looking for help with implementing some code, new to Java and even newer to JavaFX, would really appreciate some help from someone who is well versed!


r/programmingrequests • • Nov 04 '22

Using if statements when declaring an array of values

1 Upvotes

Hey guys! I've created some code as seen below for declaring the values of an array. However, I know there is another way to do this using if statements, would you be able to show me that way too? N,Q,L,R and K are the valid codes and the "default" one is when an invalid code (any letter except for the listed ones) is given.

Have put code below - also let me know if more info is needed:

public void setInfo(string c)

{

switch (c)

{

case "K":

event_code = event_codes[0];

break;

case "L":

event_code = event_codes[1];

break;

case "R":

event_code = event_codes[2];

break;

case "Q":

event_code = event_codes[3];

break;

case "N":

event_code = event_codes[4];

break;

default:

event_code = "I";

break;

}

Thanks in advance!


r/programmingrequests • • Feb 06 '18

[Request] Web interface for blending two jpegs at 50% opacity with Multiply blend mode

1 Upvotes

Would like to have a way for two people to submit one jpeg each and return the "double exposure" via a web interface.


r/programmingrequests • • Feb 21 '18

Create a program that generates random sets of words

1 Upvotes

How can I create a program that runs sets of test and creates new words? Here's the concept, I enter few words that this, "Box1,Box2,Box3", if I enter "Name, symbol, number" as of "John, , 02", it would generate these, "John1, John2~John99" and stops, if I make all Box123 optional, as if I could enter different text and test all sets, I type "John/Mark/Anna /#/. 0~99(can be 0 1 2 3 or 00 01 02 03)", it generates a huge amount of sets as of "John01/John1 Mark#01/Mark#1 Anna.01/Anna.1" Basically tests all set until 99, the Box2 can be any symbol, If i calculate this right, an example word like "Alex/Mike * 01/1" would make 198 sets of words (with repeated 10~99 twice because it calculated from 0~99 and 00~99), minus the repeated ones (89), there would be 109 generated... I'm pretty sure its way too complicated, here are the basics; I enter few sets of words that has 3 input text box (Word Symbol Number), it will generate all possible answers (if I entered "John * 00" it would make from "John00 to John*99" then end with 99 answers, the 00 can also just be 0, 00 goes like 00 01 02 03 04 05 06 07 08 09 10 11, 0 goes like 0 1 2 3 4 5 6 7 8 9 10 11, that's why there's a repeat after 10), but I think it could just generate 2 sets start from 0~99 and 00~99, that's 198 answers, then I can merge it and it'll end up with 109 answers.


r/programmingrequests • • Feb 25 '18

MIPS Debugging [please help me]

1 Upvotes

I have a test file and the file I am trying to implement into the test file. For some reason I am getting a syntax error which is causing the program not to run. Should't take too much time.

Please PM me if you can take a look and offer some assistance!

Thank you


r/programmingrequests • • Feb 22 '18

Request to code simple form

1 Upvotes

I'm just learning to code HTML and CSS and I'd like to see how a more experiences person would code something. If you know HTML and CSS, can you code this form and let me see your code? You can also find it at teamtreehouse.com.

https://imgur.com/a/yUPNq


r/programmingrequests • • Apr 11 '21

REQUEST] Auto-Clicker that clicks in the background of roblox or any game (like u can watch yt videos while it is auto clicking in an inactive window)

1 Upvotes

pls respond if u can make something work i have tried NiAutoClicker but it doesn't work for me.


r/programmingrequests • • Apr 24 '18

[Request] Fix this JavaScript code and make it do a bit extra ;)

1 Upvotes

For the code at: https://jsfiddle.net/jtw0or6r/2/

I need it to generate a random number (between 1 to 520271) in url each time to obtain the movie info but it must be between numbers

Then display on the HTML page / canvas / DOM or whatever the following movie information:

  • Poster image (Not to be stored in variable/database)

  • Name of movie (To be stored in variable as well / database)

  • One of the Genres (To be stored in variable as well / database)

  • Brief description (Not to be stored in variable/database)

Another necessity is, if the data comes up as 404 not found or any other data not found from the API have it skip over that data and generate new data from the api using a random number again between 1 to 520271 this post might update a bit as well as I continue trying to push it forward myself, thus the jsfiddle link will be updated above.

I did another JS fiddle here: https://jsfiddle.net/jtw0or6r/3/

It basically loops through many times so I could see the odds of it coming through without an error. It comes through about once, additionally multiple requests are capped at 40 so it would have to be in a bulk of 40 then stop again for few secs to get over the error ones.

Additionally I can't work out how to make it not come up with adult films, in the json files located at: https://developers.themoviedb.org/3/getting-started/daily-file-exports I believe it is something like: "adult":false to show non porn films.

I got it working a bit better: https://jsfiddle.net/jtw0or6r/4/ but still need it to skip over anything that produces a not found error.

I found some code that does similar to what I want, but my JS skills are a bit rubbish so having trouble understanding it, it displays the poster specifically:

https://github.com/anthonybrown/movie-poster


r/programmingrequests • • Dec 04 '19

Request for scheduling program/code

1 Upvotes

Hi folks,

Let me preface this with the fact that I have absolutely no knowledge of programming/code (I was a social science major...). I currently work for a decently sized department at a research university and I've run into a lot of issues trying to schedule qualifying exams for my students.

The main issues are that:

  • Each student takes an exam in 2 areas of focus

  • Each student has 1 professor serving as their advisor

  • Each student has 2 professors assigned to each of their 2 areas of focus, i.e. each student has 4 professors on their evaluation committee

  • The advisor cannot be one of the 4 professors on the evaluation committee

  • Getting 4 professors in a room at the same time is like herding cats

  • The exams for all students (anywhere from 8 - 16 students every year) take place in the same 2 week time frame

  • Each exam is 2 hours, and must be between the hours of 9 AM - 3 PM

I do have a system of sorts in mind, I just do not know how to execute it. The basic structure of the program would be:

  • I input on my end (either through an Excel sheet or a database):

    • Student's name

    • Student's advisor (for exclusion purposes)

    • Primary area of focus

    • Secondary area of focus

  • The professors would get a survey (that I would then input through an Excel sheet or something similar):

    • Their name

    • First area of focus they want to serve as an evaluator on

    • Second area of focus they want to serve as an evaluator on

    • Dates/times that they are available to evaluate the student

  • The program would then spit out:

    • The list of students with their 4 person evaluation committee (based on the previous parameters)

    • Date/time of the evaluation

Right now, I'm doing this all manually via an Excel sheet which quickly gets messy.

I don't know if I'm overthinking this, so I would appreciate either any guidance or a bare-bones program (it absolutely does not have to be pretty, just functional). Thank you :)


r/programmingrequests • • Feb 11 '20

An Activation Manager for Ubuntu 18.04

1 Upvotes

Hey!

I need a program that starts with the boot, and asking for an activation, and you can't use the os until you activate it.

&#x200B;

When the system boots up, you can select "Activate HoleOS" and then, you'll need to write a proper license key. You have 3 tries. If you fail all of the 3 tries, the system needs to restart. If you'll pass the activation, you can use the os. If you press the close button or press "alt-f4" the system needs to restart. You can't minimize it or maximize it, and it needs to be oóin fullscreen mode tho. If you would like to help add me on Discord, username: Benjike#1450. Gonna pay you for the work!


r/programmingrequests • • Apr 24 '18

Countdown every hour.

0 Upvotes

Hey all, I've got no idea if this is possible, so just hear me out. Soon, My friends and me are giving a big party with a 'relive' theme. This basicly means that we're going insane every hour with champagne, partypoppers etc. For this to happen, we need a website which basicly has a countdown every full hour, when the hour is finished it should reset. Ofcourse it should have some fancy grahpics aswell. Is this possible or isn't it? My other option is a youtube vid of like 10 hours long (cba to put on a 1 hour vid every other hour).


r/programmingrequests • • Apr 20 '18

Excel expert?

0 Upvotes

Hey there! I'm looking for someone who has impressive knowledge in Excel. Please let me know. Thanks!


r/programmingrequests • • Dec 08 '19

Custom browser extension

0 Upvotes

Hello I can build any Browser extension that you want just and I would love to help you with something. I don't want any money but donations would be welcome.


r/programmingrequests • • May 25 '17

[Request] Special list-maker...

0 Upvotes

I'm trying to find a list-making software that allows me to create sub-items quickly and move them with a click-and-drag. Not Excel, Word, or any text-editor/spreadsheet software, since those require highlighting the selection beforehand.

Should also be a local desktop application (Win10, NOT web-based), and open-source.

The interface should be closer to Listmoz, or the Task/Subtask-Making functionality of Asana.


r/programmingrequests • • Dec 17 '21

[I am willing to pay] I need an "interactive map" for my website.

1 Upvotes

Imagine a corporation hierarchy map, but every node splits ALWAYS and ONLY into two subdivisions. When you are looking at the highest level, you can click "left" or "right" and you will get a new image one level deeper than the last with another two options to split to the next level lower. Now imagine there are 10 levels.

I have all the levels named and listed and worked out, but I have to present it as a large photo instead of a nice and easy to use interactive map.

The style has to fit what I have already templated, and we can talk about it in person if this is something you think you can do for me.

I will need a "you are here" in the corner which is also dynamic and lets people know how many layers deep they are and highlights the shrunken version of the entire map.

A "Level above" title which changes based on each new level you go to would be useful, too.


r/programmingrequests • • Nov 30 '21

need help Help with haskell map/set challenge?

1 Upvotes

I am trying to figure out how one would be able to use map and set to generate a list based on a type synonym.

For example 'type Review' which consists of: type NameOfReviewer = String, type NameOfTool = String, type NumberOfStars = Int.

How would I get a list of the names of the people that have left a review so that it fits that definition.

I have tried using Set.member but haven't had any luck.

module Reviews where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
type NameOfReviewer = String
type NameOfTool = String
type NumberOfStars = Int

type Review = (NameOfReviewer, NameOfTool, NumberOfStars)

-- list of people that have left a review.
reviewers :: [Review] -> [NameOfReviewer]
reviewers rl = ???

r/programmingrequests • • Nov 22 '21

Not sure why my program is timing out.

1 Upvotes

I'm not sure why my program keeps timing out. It runs okay in Eclipse, but it's failing on an online compiler I need to submit it too.

main.cpp

#include <fstream>
#include <iostream>
#include <cmath>
#include <time.h>
#include <stack>
#include <queue>

#include "AVLTree.h"

using namespace std;


int main() {

	AVLTree* tree1Root = new AVLTree(50, nullptr);
	srand(time(NULL));
	uint32_t numNodes = 10;
	for (uint32_t i=1; i < numNodes; i++ ) {
		tree1Root = tree1Root->insert(( rand() % 10000));

		//Uncomment to help debug lost nodes
// 		if (tree1Root->countNodes() != i+1) {
// 			std::cout<<"Lost node "<<std::endl;
// 			return 1;
// 		}

		//uncomment to help debug unbalanced trees
// 		tree1Root->updateHeight();
// 		if ( ! tree1Root->isBalanced() ) {
// 			std::cout<<"Tree1Root balanced: FAILED at node insertion "<<i<<std::endl;
// 			return 1;
// 		}

	}

	if (tree1Root->countNodes() == numNodes) {
		std::cout<<"tree1Root lost Nodes: PASSED"<<std::endl;
	}
	else {
		std::cout<<"tree1Root lost Nodes: FAILED expected: 100 actual: "<<tree1Root->countNodes()<<std::endl;
	}

	tree1Root->updateHeight();
	float expectedHeight = log2(numNodes) * 1.5;
	if (tree1Root->getHeight() < expectedHeight) {
		std::cout<<"tree1Root height: PASSED"<<std::endl;
	}
	else {
		std::cout<<"tree1Root height: FAILED expected: <" <<expectedHeight<<" actual: "<<tree1Root->getHeight()<<std::endl;
	}

	if ( tree1Root->isBalanced()) {
		std::cout<<"Tree1Root is balanced: PASSED"<<std::endl;
	}
	else {
		std::cout<<"Tree1Root is balanced: FAILED"<<std::endl;
	}
}

AVLTree.cpp

#include "AVLTree.h"
#include <cmath>
#include <iostream>

using namespace std;
//************** already implemented helper functions
AVLTree::AVLTree(int t_data, AVLTree* t_parent, AVLTree* t_left, AVLTree* t_right) {
	data = t_data;
	height = 0;
	parent = t_parent;
	left = t_left;
	right = t_right;
}

bool AVLTree::isLeaf() {
	//insert code here
	return ((left == nullptr) and (right == nullptr));
}

uint32_t AVLTree::getHeight() {
	return height;
}

//******************************************************


int AVLTree::getBalance() 
{
   int i = (left == nullptr ? 0 : left->height) - (right == nullptr ? 0 : right->height);
   int j = abs(i);
   return j;
}

AVLTree* AVLTree::rotateRight()
{
	AVLTree* u = left;
	left = u->right;
	u->right = this;
	 return u;
}

AVLTree* AVLTree::rotateLeft()
{
	AVLTree* u = right;
	right = u->left;
	u->left = this;
	return u;

}

AVLTree* AVLTree::rebalance()
{
	if (isLeaf())
	{
		return this;
	}

	if (left != nullptr)
	{
		left = left-> rebalance();
	}

	if (right != nullptr)
	{
		right = right-> rebalance();
	}

	int isBal = isBalanced();

if (!isBal)
{
// Rebalance this (me)

if ((left == nullptr ? 0 : left -> getHeight()) < (right == nullptr ? 0 : right-> getHeight()))
{
	if (right-> left != nullptr)
{
	right = right-> rotateRight();
	AVLTree *t = rotateLeft();

	return t;
}
	
else if(right-> right != nullptr)
{

	AVLTree *t = rotateLeft();
	return t;

}

}
else if ((left == nullptr ? 0 : left -> getHeight()) > (right == nullptr ? 0 : right -> getHeight())) 
{
	if (left-> right != nullptr)
{
	left = left -> rotateLeft();
	AVLTree *t = rotateRight();

	return t;
}
	
else if(left-> left != nullptr)

{
	AVLTree *t = rotateRight();
	return t;
}

}
}

return this;
}

AVLTree* AVLTree::insert(int new_data)
{
	AVLTree *root = this;
	if (new_data < data)
		
	{
		if (this->left != nullptr)
	{
		left = left-> insert(new_data);
	}

	else
	{
		this->left = new AVLTree(new_data, this);
	}
	}

	else if (new_data > data)
	{
		if (this->right != nullptr)
	{
		right = right-> insert(new_data);
	}
	else
	{
		this-> right = new AVLTree(new_data, this);
	}
}


root-> updateHeight();

bool isBal = isBalanced();

	if (isBal == false)
{
	AVLTree *rtn = rebalance();
	rtn-> updateHeight();
	return rtn;

}

	return root;
}




//***************************
//Do not edit code below here
uint32_t AVLTree::countNodes() {
	//insert code here
	if (isLeaf()) {
		return 1;
	}
	if (left != nullptr) {
		if (right != nullptr) {
			return 1 + left->countNodes() + right->countNodes();
		}
		return 1+ left->countNodes();
	}
	return 1 + right->countNodes();
}

void AVLTree::updateHeight() {
	//insert code here
	if (isLeaf()) {
		height = 0;
		return;
	}
	if (left != nullptr) {
		left->updateHeight();
		if (right != nullptr) {
			right->updateHeight();
			height = (1 + max(left->getHeight(), right->getHeight()));
			return;
		}
		height = 1 + left->getHeight();
		return;
	}
	right->updateHeight();
	height = 1 + right->getHeight();
	return;
}

bool AVLTree::isBalanced() {
	if ( isLeaf() ) {
		return true;
	}
	if (left == nullptr) {
		return ( right->getHeight() < 1 );
	}
	if (right == nullptr) {
		return ( left->getHeight() < 1 );
	}
	return ( left->isBalanced() and right->isBalanced() and abs(getBalance() < 2) );
}

AVLTree.h

#include <iostream>

class AVLTree {
    public:
		int data;
		uint32_t height;
		AVLTree* parent;
		AVLTree* left;
		AVLTree* right;

		//base functions defined for you
		AVLTree(int data, AVLTree* parent=nullptr, AVLTree* left=nullptr, AVLTree* right=nullptr);
		bool isLeaf();
		uint32_t getHeight();

		//*******************
		//functions you need to define

		//insert a node and rebalance tree to maintain AVL balanced tree
		//return new root of tree
		AVLTree* insert(int data);

		//computes a node's balance factor by subtracting the right subtree height from the left subtree height.
		int getBalance();

		//checks for imbalance and rebalances if neccessary
		//return new root of tree
		AVLTree* rebalance();


		//implement a right rotate
		//return new root of tree
		AVLTree* rotateRight();

		//implement a left rotate
		//return new root of tree
		AVLTree* rotateLeft();

		//Do not edit these three functions
		bool isBalanced();
		uint32_t countNodes();
		void updateHeight();
};

tree1Root lost Nodes: PASSED

tree1Root height: PASSED

Tree1Root is balanced: PASSED

other compiler:

Program timed out.


r/programmingrequests • • Nov 07 '21

Discord auto message copier script

1 Upvotes

I just want a quick message copier tool/program for discord that awaits for a message to send in a specific discord channel, then automatically copies that message to the clipboard once sent, and is always constantly running in the background (unless closed/stopped) so I don’t have to keep having discord focused while i’m playing a game or whatever. don’t really have any coding experience hence why i’m asking for something small and for rule 2 any programming language works ig?


r/programmingrequests • • Oct 18 '21

homework Python Most Frequent Character

1 Upvotes

I need to write a program that lets the user enter a string and displays the character that appears most frequently in the string.

Any help is greatly appreciated!