r/programminghelp • • Sep 17 '24

C# I don't want to switch from Mac but I might have to

0 Upvotes

Im studying Computing right now and the teacher has told my whole class to download Visual Studio, which isn't available on Mac. I don't want to use the school computers but also don't want to download a different IDE from my class because I don't want to have to solve a issue with my IDE that no one else is experiencing. Will I have to work more independently if I use a different IDE or will I be fine?

We are programming with C#
I have very little knowledge with programming as of now


r/programminghelp • • Jul 17 '20

JavaScript does anyone know how to program a discord bot in Visual Studio Code to reply to messages with randomized emojis?

1 Upvotes

I'm making a discord bot and want it to reply to certain words/phrases with a randomized emoji from my test server. the way ToddBot does.


r/programminghelp • • Apr 14 '26

HTML/CSS Crime App Development

1 Upvotes

Hey folks! I would like to build my own real-time crime updates map similar to Citzens and/or SpotCrime. It's for my own personal use. I liked Citzen when it first came out, but then they put many standard features behind the paywall. Obviously, I was never happy about that.

I also use SpotCrime, but it's very limited. They don't provide near real-time updates and/or many updates at all.

So I'm looking to build my own map instead (preferably using a no-code app). It doesn't require users to sign up or participate. It's simple and it's for my own use.

So the app should feature a visual map of a particular city (or every state of the USA). It will have icons representing the latest crime reported through cops bulletin. It will record each day's results for specific crime (assaults, robbery, murder, burglaries, etc), and I can choose a date to display the crime map for that day.

First, I would like to know, where can I get the datasets for each cities' police bulletin or blotter. Does anybody know?

And then, how would you update the map visually and automatically from the source?

Though I have programming skills, I prefer to create this with a no-code app builder. It's just faster that way.

Thanks! Any suggestions would be appreciated!


r/programminghelp • • Jun 10 '26

Other How do I know what a library does, what functions exist within that library and how to even use them?

0 Upvotes

As a beginner, I can't read the source code that contains complex c++ code, I simply want to know what a library does (for example: openCV deals with computer vision, so images and videos) and I want to know what functions exist within that library and what it does in plain english (example: imshow() displays an image or video feed, you need to arguments, a name for the display tab and what you are actually displaying). I don't want to use AI because I want to know about the process of going about this.


r/programminghelp • • May 29 '25

Project Related my openAI API is screwing up with my code

0 Upvotes

hi, title is a little vague but im doing a project on AI detection software that gauges and reads text messages and gives out a dialogue that says whether or not it's safe or not and if it is, the type of scam.

the issue im facing is with the API reading and giving out analysis that's completely wrong (e.g. an obvious loan scam message being classified as safe)

this is my repository, https://github.com/kevin-Hertz/hackathonsub, please help me review it and point out blatant errors. i won't bother checking AI it's been parroting the same thing for 3 hours. THANK YOU!!!!!!


r/programminghelp • • Jul 10 '26

Python Is there anyone who can help me read pkl file.

0 Upvotes

I Know it is a simple task but I get some version related error.

I have done web search (both gemini and SO and so on). I even understood the proposed solutions but it seems like pkl files were created with an unknown version or at least not the one that is installed in my machine. That's why it gives error

"An error occurred while loading the file: CRS.__init__() missing 1 required positional argument: 'proj4_params'"

anyone who can give me 5 min to sort it out.


r/programminghelp • • Apr 16 '25

Python Just started yesterday, what am I messing up with this code?

0 Upvotes

Hello, started messing around with python yesterday and starting to enjoy it. The issue I'm having is even with incorrect answers it gives the text for the correct one. What am i missing with this? have tried for a solid 10 minutes and looked online

Vito = input("who was greasing the union?")
if Vito == Vito:
    print("Catching, not pitching.")
else:
    print("20 years in the can!")

Gives me "Catching, not pitching" for any answer. This is not a shitpost, ive been binging Sopranos and came up with something on the fly 😭.
Thank you in advance.


r/programminghelp • • Feb 08 '26

Other What's a good language to build desktop applications for Mac?

0 Upvotes

Hello. I didn't see specific advice in the FAQ for desktop apps in Mac, so I'm asking here.

What's a good language to learn to develop desktop apps for Mac? I'm planning to do a very simple app for automating changing the names of some image files that I handle on my job.

I think the only thing the app would do is ask for a folder to scan and a string to append to the file's name, and then modify the name of every JPG file in the folder.

What would be the best language for creating apps with UIs on Mac to do this?


r/programminghelp • • Aug 12 '25

C whats wrong with my unicode??

0 Upvotes

i wanna type 𒀸 but i get ♠ its like theres a different unicode list for different computers.

can someone educate me on how i can learn the unicode list for MY computer?


r/programminghelp • • Apr 11 '24

Other Rust: error about value dropping at a weird place?

0 Upvotes

I am getting a weird error involving the "field.text().await.unwrap_or("".to_string())" for something line giving me this error:
emporary value dropped while borrowed
creates a temporary value which is freed while still in userustcClick for full compiler diagnostic
something.rs(55, 105): temporary value is freed at the end of this statement
something.rs(55, 31): argument requires that borrow lasts for `'static`

pub async fn add_something(mut fields: Multipart) -> Result<String, (StatusCode, String)>{
let mut works = "".to_string();
let mut something = "".to_string();
while let Some(field) = fields.next_field().await.map_err(|err| (StatusCode::BAD_REQUEST, err.to_string())).unwrap() {
    match &name[..] {
        "works" => works = field.text().await.unwrap_or("".to_string()),
        "something" => something = field.text().await.unwrap_or("".to_string()).split(',').collect::<Vec<_>>(),
        _ => print!("nothing")
    }
}

}

Also asked this on r/rust, but there neckbeard mods removed it in .005 seconds. Lovely people lol


r/programminghelp • • Mar 01 '24

C++ Help with a C++ homework assignment, I'm not sure what is going wrong:

0 Upvotes

include <iostream>

include <iomanip>

using namespace std;

int main() {

int numInput;

double inVal;

double highestVal;

int i;

cin >> numInput;

—-----------------------------------------------------------------

for (i = 0; i < numInput; ++i){

  cin >> inVal;

cout << "Value read: " << inVal << endl;

if (highestVal < inVal) {

  highestVal = inVal;

} } cout << "Highest: " << setprecision(5) << highestVal << endl;

—-----------------------------------------------------------------

return 0; }

(Dashed lines show bounds of what I can edit.)

The program is supposed to take a number and a list of numbers. The first number is supposed to be representing the amount of numbers in the list. Each number this then put out following "Value read: ", and the highest of the list is supposed to be output at the end following "Highest: ".

When a list of negative three digit numbers each with a single decimal place is given, it gives an enormous number not on the list as the "Highest". I added the "setprecision" to stop this, and it now outputs 0 as the "Highest" (which is not on the list.)

I need it to output the largest (least negative) number in the list. Any help is appreciated!


r/programminghelp • • Sep 11 '23

Python Is it possible to make a dictionary that can give definitions for each word in it's defintion?

0 Upvotes

Define a dictionary with word definitions

definitions = { "yellow": "bright color", "circle": "edgeless shape.", "bright": "fffff", "color": "visual spectrum", "edgeless": "no edges", "shape": "tangible form"}

Function to look up word definitions for multiple words

def lookup_definitions(): while True: input_text = input("Enter one or more words separated by spaces (or 'exit' to quit): ").lower()

    if input_text == 'exit':
        break

    words = input_text.split()  # Split the input into a list of words

    for word in words:
        if word in definitions:
            print(f"Definition of '{word}': {definitions[word]}")
        else:
            print(f"Definition of '{word}': Word not found in dictionary.")

Call the function to look up definitions for multiple words

lookup_definitions()


I know this sounds weird but it's a necessary task for a class. this code will ask you to give it a word or multiple words for input, then it will provide you with their definition(s)

I gave defintions for each word in the definitions (bright, fff, etc please ignore how silly it sounds)

now I need it to not just provide the definition for sun, yellow but also the defintions of the defintions too (bright, color etc) I guess this is possible by making it loop the defintions as input from the user but I'm not sure how to do that

please keep it very simple I'm a noob


r/programminghelp • • Jul 04 '15

Help with a basic C++ program not working?

0 Upvotes

Keep in mind I'm using Code::blocks. This program runs without errors, but it just outputs a blank line when I try to run it. I sent my friend the code and he pasted it in to his Code::blocks, and it worked fine. The only difference between us is that I'm using windows and he's using Linux. All my other programs work.

//A program that outputs all characters with their ASCII codes.

#include <iostream>

#include <string>

using namespace std;

int main()

{

    int i;

    while(i<=127){

        cout<<char(i)<<" = "<<i<<endl;

        i++;

    }

}

r/programminghelp • • Dec 26 '18

NODE.JS Problem with accessing images

0 Upvotes

So in my project I have folder /Pictures and everything else is all over the project folder. My problem is that I can access all the CSS , JS, HTML, but it doesn't let me get this image folder as a source of the web app.

If anyone has any suggestions to this please help. I don't even know what to write (new to node.js) so if you have a ready code -- I'll appreciate it.


r/programminghelp • • Sep 12 '18

Anyone know why i only get returned 0s from my function back to main if the decimal entered is any higher than 1 float?

Post image
0 Upvotes

r/programminghelp • • Oct 05 '18

In c. How can i save the this data into 3 different structs based on the starting letter. Eg, first array of structs would be of size 4 all starting with P? ‽?. Is there a way to declare that i only want it to scanf if the stuct is of size 5?

Post image
0 Upvotes

r/programminghelp • • Mar 29 '22

JavaScript does somebody have the head first javascript book in a pdf file

0 Upvotes

?


r/programminghelp • • Jul 18 '23

Project Related What should I do to start a website?

0 Upvotes

Hello!
For years now I've wanted to start a portfolio website where I can show off pictures and text. It doesn't have to be too professional. I only have pretty basic knowledge in Python, Javascript, HTML5 and CSS. But what should I use for backend stuff? I don't know much about programming and making websites in general, so any help would be greatly appreciated!


r/programminghelp • • Jul 17 '23

C++ How would you set up a program where multiple people can edit at the same time whenever and it is always perfectly synced (like Replit) but in an actual IDE

0 Upvotes

Me and 2 other friends are making a game in C++ for a school project and we plan on using SFML, a C++ library to make the game only problem is 1, repl.it is too slow, 2, it doesn't support OpenGL natively or at least SFML so any large game would be unreasonable for replit. Does anyone know a way you can use an IDE like visual studio for this I think visual studio has live share, the only problem with that is that it ends when you go offline so the host has to be online. I wouldn't mind spending a small amount of money if it's the only way but can anybody help with this.


r/programminghelp • • Sep 03 '20

C# anyone know how to do windows key and r at the same time in c#

0 Upvotes

what the title says really I am trying out new things in c# :D


r/programminghelp • • Jul 24 '22

C# My code is ugly ass hell and without comments, I know, but I just want it to work

0 Upvotes

Also, around 50% of the time, it works every time, so I would like to get some input as to what is going on if you can even tell what it is. Basically, the code is supposed to randomly select an outcome based on manual input. Both between the different names and the probability of them. My solution to this was that the probability was simply a number. All the probabilities are then added. The first outcome is decided by if a random number between 1 and the total of the probabilities is over 1, but lesser than the first probability number. The second is if the random number is between the first probability number and the total of the first and second probability. This goes on to a maximum of 15 possible outputs. The problem is: that sometimes the output is just numbers without any text that I put in. Any insight?

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace Randonizer_2

{

public partial class Form1 : Form

{

Random rng = new Random();

public Form1()

{

InitializeComponent();

}

private void button2_Click(object sender, EventArgs e)

{

}

private void button3_Click(object sender, EventArgs e)

{

}

private void Btn_Mortuis_Click(object sender, EventArgs e)

{

Txt_Choice1.Text = "Nolmas";

Txt_Choice1_Prob.Text = "1000";

if (Txt_Choice1.Text == "")

{

Txt_Choice1.Hide();

}

else

{

Txt_Choice1.Show();

}

if (Txt_Choice1_Prob.Text == "")

{

Txt_Choice1_Prob.Hide();

}

else

{

Txt_Choice1_Prob.Show();

}

Txt_Choice2.Text = "Nathux";

Txt_Choice2_Prob.Text = "130";

if (Txt_Choice2.Text == "")

{

Txt_Choice2.Hide();

}

else

{

Txt_Choice2.Show();

}

if (Txt_Choice2_Prob.Text == "")

{

Txt_Choice2_Prob.Hide();

}

else

{

Txt_Choice2_Prob.Show();

}

Txt_Choice3.Text = "Osmaden";

Txt_Choice3_Prob.Text = "700";

if (Txt_Choice3.Text == "")

{

Txt_Choice3.Hide();

}

else

{

Txt_Choice3.Show();

}

if (Txt_Choice3_Prob.Text == "")

{

Txt_Choice3_Prob.Hide();

}

else

{

Txt_Choice3_Prob.Show();

}

Txt_Choice4.Text = "Asmoth";

Txt_Choice4_Prob.Text = "50";

if (Txt_Choice4.Text == "")

{

Txt_Choice4.Hide();

}

else

{

Txt_Choice4.Show();

}

if (Txt_Choice4_Prob.Text == "")

{

Txt_Choice4_Prob.Hide();

}

else

{

Txt_Choice4_Prob.Show();

}

Txt_Choice5.Text = "Dusur";

Txt_Choice5_Prob.Text = "10";

if (Txt_Choice5.Text == "")

{

Txt_Choice5.Hide();

}

else

{

Txt_Choice5.Show();

}

if (Txt_Choice5_Prob.Text == "")

{

Txt_Choice5_Prob.Hide();

}

else

{

Txt_Choice5_Prob.Show();

}

Txt_Choice6.Text = "Gocfell";

Txt_Choice6_Prob.Text = "2";

if (Txt_Choice6.Text == "")

{

Txt_Choice6.Hide();

}

else

{

Txt_Choice6.Show();

}

if (Txt_Choice6_Prob.Text == "")

{

Txt_Choice6_Prob.Hide();

}

else

{

Txt_Choice6_Prob.Show();

}

Txt_Choice7.Text = "Godbane";

Txt_Choice7_Prob.Text = "500";

if (Txt_Choice7.Text == "")

{

Txt_Choice7.Hide();

}

else

{

Txt_Choice7.Show();

}

if (Txt_Choice7_Prob.Text == "")

{

Txt_Choice7_Prob.Hide();

}

else

{

Txt_Choice7_Prob.Show();

}

Txt_Choice8.Text = "Greater North";

Txt_Choice8_Prob.Text = "300";

if (Txt_Choice8.Text == "")

{

Txt_Choice8.Hide();

}

else

{

Txt_Choice8.Show();

}

if (Txt_Choice8_Prob.Text == "")

{

Txt_Choice8_Prob.Hide();

}

else

{

Txt_Choice8_Prob.Show();

}

Txt_Choice9.Text = "Ulchir";

Txt_Choice9_Prob.Text = "400";

if (Txt_Choice9.Text == "")

{

Txt_Choice9.Hide();

}

else

{

Txt_Choice9.Show();

}

if (Txt_Choice9_Prob.Text == "")

{

Txt_Choice9_Prob.Hide();

}

else

{

Txt_Choice9_Prob.Show();

}

Txt_Choice10.Text = "";

Txt_Choice10_Prob.Text = "";

if (Txt_Choice10.Text == "")

{

Txt_Choice10.Hide();

}

else

{

Txt_Choice10.Show();

}

if (Txt_Choice10_Prob.Text == "")

{

Txt_Choice10_Prob.Hide();

}

else

{

Txt_Choice10_Prob.Show();

}

Txt_Choice11.Text = "";

Txt_Choice11_Prob.Text = "";

if (Txt_Choice11.Text == "")

{

Txt_Choice11.Hide();

}

else

{

Txt_Choice11.Show();

}

if (Txt_Choice11_Prob.Text == "")

{

Txt_Choice11_Prob.Hide();

}

else

{

Txt_Choice11_Prob.Show();

}

Txt_Choice12.Text = "";

Txt_Choice12_Prob.Text = "";

if (Txt_Choice12.Text == "")

{

Txt_Choice12.Hide();

}

else

{

Txt_Choice12.Show();

}

if (Txt_Choice12_Prob.Text == "")

{

Txt_Choice12_Prob.Hide();

}

else

{

Txt_Choice12_Prob.Show();

}

Txt_Choice13.Text = "";

Txt_Choice13_Prob.Text = "";

if (Txt_Choice13.Text == "")

{

Txt_Choice13.Hide();

}

else

{

Txt_Choice13.Show();

}

if (Txt_Choice13_Prob.Text == "")

{

Txt_Choice13_Prob.Hide();

}

else

{

Txt_Choice13_Prob.Show();

}

Txt_Choice14.Text = "";

Txt_Choice14_Prob.Text = "";

if (Txt_Choice14.Text == "")

{

Txt_Choice14.Hide();

}

else

{

Txt_Choice14.Show();

}

if (Txt_Choice14_Prob.Text == "")

{

Txt_Choice14_Prob.Hide();

}

else

{

Txt_Choice14_Prob.Show();

}

Txt_Choice15.Text = "";

Txt_Choice15_Prob.Text = "";

if (Txt_Choice15.Text == "")

{

Txt_Choice15.Hide();

}

else

{

Txt_Choice15.Show();

}

if (Txt_Choice15_Prob.Text == "")

{

Txt_Choice15_Prob.Hide();

}

else

{

Txt_Choice15_Prob.Show();

}

}

private void Btn_Own_Click(object sender, EventArgs e)

{

}

private void Btn_Settings_Click(object sender, EventArgs e)

{

if(Btn_Settings.Text == "Settings")

{

Pnl_Settings.Show();

Btn_Settings.Text = "Close Settings";

}

else if (Btn_Settings.Text == "Close Settings")

{

Pnl_Settings.Hide();

Btn_Settings.Text = "Settings";

}

}

private void button1_Click(object sender, EventArgs e)

{

if (Txt_Choice1_Prob.Text == "")

{

Txt_Choice1_Prob.Text = "0";

}

if (Txt_Choice2_Prob.Text == "")

{

Txt_Choice2_Prob.Text = "0";

}

if (Txt_Choice3_Prob.Text == "")

{

Txt_Choice3_Prob.Text = "0";

}

if (Txt_Choice4_Prob.Text == "")

{

Txt_Choice4_Prob.Text = "0";

}

if (Txt_Choice5_Prob.Text == "")

{

Txt_Choice5_Prob.Text = "0";

}

if (Txt_Choice6_Prob.Text == "")

{

Txt_Choice6_Prob.Text = "0";

}

if (Txt_Choice7_Prob.Text == "")

{

Txt_Choice7_Prob.Text = "0";

}

if (Txt_Choice8_Prob.Text == "")

{

Txt_Choice8_Prob.Text = "0";

}

if (Txt_Choice9_Prob.Text == "")

{

Txt_Choice9_Prob.Text = "0";

}

if (Txt_Choice10_Prob.Text == "")

{

Txt_Choice10_Prob.Text = "0";

}

if (Txt_Choice11_Prob.Text == "")

{

Txt_Choice11_Prob.Text = "0";

}

if (Txt_Choice12_Prob.Text == "")

{

Txt_Choice12_Prob.Text = "0";

}

if (Txt_Choice13_Prob.Text == "")

{

Txt_Choice13_Prob.Text = "0";

}

if (Txt_Choice14_Prob.Text == "")

{

Txt_Choice14_Prob.Text = "0";

}

if (Txt_Choice15_Prob.Text == "")

{

Txt_Choice15_Prob.Text = "0";

}

int Prob1 = Convert.ToInt32(Txt_Choice1_Prob.Text);

int Prob2 = Convert.ToInt32(Txt_Choice2_Prob.Text);

int Prob3 = Convert.ToInt32(Txt_Choice3_Prob.Text);

int Prob4 = Convert.ToInt32(Txt_Choice4_Prob.Text);

int Prob5 = Convert.ToInt32(Txt_Choice5_Prob.Text);

int Prob6 = Convert.ToInt32(Txt_Choice6_Prob.Text);

int Prob7 = Convert.ToInt32(Txt_Choice7_Prob.Text);

int Prob8 = Convert.ToInt32(Txt_Choice8_Prob.Text);

int Prob9 = Convert.ToInt32(Txt_Choice9_Prob.Text);

int Prob10 = Convert.ToInt32(Txt_Choice10_Prob.Text);

int Prob11 = Convert.ToInt32(Txt_Choice11_Prob.Text);

int Prob12 = Convert.ToInt32(Txt_Choice12_Prob.Text);

int Prob13 = Convert.ToInt32(Txt_Choice13_Prob.Text);

int Prob14 = Convert.ToInt32(Txt_Choice14_Prob.Text);

int Prob15 = Convert.ToInt32(Txt_Choice15_Prob.Text);

int SumProb = Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13 + Prob14 + Prob15;

int RandNum = rng.Next(SumProb);

RandNum++;

Lbl_Spin.Text = "" + RandNum;

if (1 < RandNum && RandNum < Prob1)

{

Lbl_Spin.Text = Txt_Choice1.Text;

}

else if(Prob1 < RandNum && RandNum < Prob1 + Prob2)

{

Lbl_Spin.Text = Txt_Choice2.Text;

}

else if (Prob1 + Prob2 < RandNum && RandNum < Prob1 + Prob2 + Prob3)

{

Lbl_Spin.Text = Txt_Choice3.Text;

}

else if (Prob1 + Prob2 + Prob3 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4)

{

Lbl_Spin.Text = Txt_Choice4.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5)

{

Lbl_Spin.Text = Txt_Choice5.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6)

{

Lbl_Spin.Text = Txt_Choice6.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7)

{

Lbl_Spin.Text = Txt_Choice7.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8)

{

Lbl_Spin.Text = Txt_Choice8.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9)

{

Lbl_Spin.Text = Txt_Choice9.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10)

{

Lbl_Spin.Text = Txt_Choice10.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11)

{

Lbl_Spin.Text = Txt_Choice11.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12)

{

Lbl_Spin.Text = Txt_Choice12.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13)

{

Lbl_Spin.Text = Txt_Choice13.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13 + Prob14)

{

Lbl_Spin.Text = Txt_Choice14.Text;

}

else if (Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13 + Prob14 < RandNum && RandNum < Prob1 + Prob2 + Prob3 + Prob4 + Prob5 + Prob6 + Prob7 + Prob8 + Prob9 + Prob10 + Prob11 + Prob12 + Prob13 + Prob14 + Prob15)

{

Lbl_Spin.Text = Txt_Choice15.Text;

}

}

private void Form1_Load(object sender, EventArgs e)

{

Pnl_Settings.Hide();

Txt_Choice1.Hide();

Txt_Choice1_Prob.Hide();

Txt_Choice1_Prob.Text = "0";

Txt_Choice2.Hide();

Txt_Choice2_Prob.Hide();

Txt_Choice2_Prob.Text = "0";

Txt_Choice3.Hide();

Txt_Choice3_Prob.Hide();

Txt_Choice3_Prob.Text = "0";

Txt_Choice4.Hide();

Txt_Choice4_Prob.Hide();

Txt_Choice4_Prob.Text = "0";

Txt_Choice5.Hide();

Txt_Choice5_Prob.Hide();

Txt_Choice6_Prob.Text = "0";

Txt_Choice6.Hide();

Txt_Choice6_Prob.Hide();

Txt_Choice7_Prob.Text = "0";

Txt_Choice7.Hide();

Txt_Choice7_Prob.Hide();

Txt_Choice8_Prob.Text = "0";

Txt_Choice8.Hide();

Txt_Choice8_Prob.Hide();

Txt_Choice8_Prob.Text = "0";

Txt_Choice9.Hide();

Txt_Choice9_Prob.Hide();

Txt_Choice9_Prob.Text = "0";

Txt_Choice10.Hide();

Txt_Choice10_Prob.Hide();

Txt_Choice10_Prob.Text = "0";

Txt_Choice11.Hide();

Txt_Choice11_Prob.Hide();

Txt_Choice11_Prob.Text = "0";

Txt_Choice12.Hide();

Txt_Choice12_Prob.Hide();

Txt_Choice12_Prob.Text = "0";

Txt_Choice13.Hide();

Txt_Choice13_Prob.Hide();

Txt_Choice13_Prob.Text = "0";

Txt_Choice14.Hide();

Txt_Choice14_Prob.Hide();

Txt_Choice14_Prob.Text = "0";

Txt_Choice15.Hide();

Txt_Choice15_Prob.Hide();

Txt_Choice15_Prob.Text = "0";

}

}

}


r/programminghelp • • Jul 03 '20

Other How to create my own game store/launcher?

0 Upvotes

How to create my own game launcher like Origin, Blizzard Store, EGS?
I made about 100 games and looking to launch my own store.
How to code it? Which tools to use?


r/programminghelp • • Nov 12 '24

PHP [PHP, HTML, JS] Help with an interesting (and, at first, useless-sounding project)

0 Upvotes

I thought of an interesting project. It is simply a webpage that prompts the user for a title (which is made into the title of the webpage), the URL of an icon (which is made into the icon of the webpage), and the URL of an external website which is loaded into my webpage. This might get confusing, so for now on, "my webpage" is the page I plan on coding, and "the external website" is the external website which is loaded into my webpage.

Here's what I want it to do:

  • Immediately prompt the user for the title, icon URL, and external website URL

  • Load the external website in its entirety, including any CSS, JS, pictures, and other files requested from the web server of either the external website or any other website entirely with PHP (no JS for this part)

  • Display the fully complete external website in my webpage

But why? To access sites that have been blocked by an employer's network (or any similar situation). Since your computer isn't loading anything from any blocked websites (my web server is), there would hopefully be no problems. Of course, they could just block my website too, but I will figure that out later.

My first idea was to just use an iframe, but then of course I ran into CSP and CORS protection issues, and the external web servers refused to connect. I probably wouldn't have been able to get the JS, CSS, and whatnot of the external webpage with an iframe anyway, but I am not sure.

However this is made, it is probably going to be complicated and take a long time. I haven't started making this with PHP yet, and I don't know how I will get the external website to request any files it needs from its own web server before everything gets passed to my webpage.

Any ideas or help?


r/programminghelp • • Jul 13 '21

C Can someone please help me with this Yacc code

0 Upvotes

I have a presentation in a few hours. We have to prepare for a YACC program. I don't know anything because our teacher hasn't taught us anything about that. So please explain the code I'm posting below. YACC CODE

ALPHA [A-Za-z] DIGIT [0-9] %%

[ \t\n] if                return IF; then                return THEN; {DIGIT}+            return NUM; {ALPHA}({ALPHA}|{DIGIT})*         return ID; "<="                return LE; ">="                return GE; "=="                return EQ; "!="                return NE; "||"                return OR; "&&"                return AND; "printf"(".*")  return PR; .                return yytext[0]; %%

P.s Really sorry for the bad alignment, I don't know how to align it in Reddit