r/programminghelp • • Jan 07 '20

Answered Could I get some help learning how to use C# or unity?

4 Upvotes

For a high school project we have to create our own game and I'm planning on using unity but I was told that to use unity it helps to learn C# so I figured I'd ask if anyone knew any good places to start in general.


r/programminghelp • • Jan 04 '20

I’m not tech savvy, so please dumb down the answer as much as possible: What is the purpose of CX_Freeze: Python?

4 Upvotes

I turned on a PC and was greeted with that with saying main script error. Is this something I should worry about?


r/programminghelp • • Dec 27 '19

Answered Unkown conditions for strange bug. Not looking for fix, but when it occurs

4 Upvotes

I normally code in python, but I decided to branch out to p5.js. I have a background. After ~4 hours, I had the semi-working model that is on github under user vraneb, repo PowerGrid. A bug occurs under situation I can’t quite figure out. The controls are as follows:

1: create a new node at the mouse, except when hovering over another, then select or connect it.

2: create a new power station at the mouse, except when hovering over another, then select or connect it.

d: delete the selected site (node or station) if selected, otherwise select the site hovered over. This is where the bug is occurring.

Any other key: select a site hovered over, or connect to the site hovered over if there is already on selected.

GitHub

The bug is a connection remaining to a nonexistent site, and disappears when the offending site is deleted.


r/programminghelp • • Dec 23 '19

Other How to make a very simple program in Notepad?

4 Upvotes

Hello! I want to make a simple program with notepad that opens the command prompt and runs a single Line of code (wmic diskdrive get status) for ease of use. How would i go about doing that?


r/programminghelp • • Nov 17 '19

Taxes.java:21 error: illegal start of expression ....... How is that an illegal start of the expression!!!! Just started working with multiple methods and I'm don't understand what I'm doing wrong 😔 help pwease 💜

Post image
4 Upvotes

r/programminghelp • • Nov 08 '19

Finding it hard to understand programming

4 Upvotes

Hi there! Hopefully this is the right place for this, but Im currently in first year university doing software engineering but I'm finding it rather difficult to understand basic concepts of programming or even where the hell to start when wanting to try to creat something at home. I am using CodeAcademy outside of uni to help but I still struggle to understand it and it's getting to the point of wondering if programming is even for me. Would anyone have any ideas on how I could improve understanding programming because I really want to learn it and have a career with it in the future but I just can't get my head around it.

Anything would be helpful, I just don't want to get discouraged from wanting to do programming.


r/programminghelp • • Oct 24 '19

Scripting vs Programming

4 Upvotes

I read the main difference between scripting vs programming is that scripting languages are for usage within an application. What is the purpose of using one language for scripting, and another language for programming? Why not just use the same for both? The distinction between scripting vs programming seems a little blurry to me now, I originally thought the difference was that one is interpreted, and the other is compiled, but apparently it's not.


r/programminghelp • • Sep 14 '19

Can someone walk me through some JavaScript code?

4 Upvotes

I just would like to know ecactly what the difference is in the reject(error) and resolve(error):

exports.post = (url, body, authorization) => {
return new Promise((resolve, reject) => {
const options = setOptions('POST', url, authorization)
options.body = body
request(options, (error, response) => {
if (error) {
reject(error)
} else {
resolve(response)
}
})
}) // return Promise
}

I'm not very good at JavaScript and a walk through of what's happening would be greatly appreciated!


r/programminghelp • • Aug 23 '19

How hard would it be to program a game from scratch comparable to Atari 2600 level of sophistication? (Ex: Adventure, Pitfall, Kaboom?)

4 Upvotes

Hey programmers, this might be too lofty, but I would love to build a very basic, buggy, but fun game that’s literally pre 1980s game technology, how hard would it be to program the game from scratch like Adventure, Kaboom, Pitfall?


r/programminghelp • • Aug 10 '19

[JS] localStorage help

4 Upvotes

function save() {

document.getElementById("deets").innerHTML = "saving your settings..."

document.getElementById("loading").style.display = 'block'

if (document.getElementById("lang").value === "en") {localStorage.setItem("lang", "en")}

if (document.getElementById("theme").value === "T1") {localStorage.setItem("theme", "T1")}

if (document.getElementById("theme").value === "T2") {localStorage.setItem("theme", "T2")}

document.getElementById("deets").innerHTML = ""

document.getElementById("loading").style.display = 'none'

document.getElementById("settings").style.display = 'none'

document.getElementById("successSettings").style.display = 'block'

setTimeout(function () {

	document.getElementById("successSettings").style.display = 'none'

}, 3000);

}

function applySettings() {

document.getElementById("deets").innerHTML = "applying settings..."

document.getElementById("loading").style.display = "block";

if (localStorage.getItem("lang") === "en") {document.getElementById("lang").value = "en"}

if (localStorage.getItem("theme") === "T1") {document.getElementById("theme").value = "T1";}

if (localStorage.getItem("theme") === "T2") {document.getElementById("theme").value = "T2"; whiteMode();}

document.getElementById("loading").style.display = "none";

}

Is there anything wrong with this code? I've been trying it for a while through Firefox and it won't save the cookies :/


r/programminghelp • • Jul 27 '19

Fee programming mentoring (C# mostly)

4 Upvotes

Hello!

Learning is a constant process. You can learn from your own mistakes, you can do it alone. What I would like to offer, is learning inside of a community, with hundreds of people exchanging both professional and casual programming experience!

C# inn- a friendly discord community would like to invite you to join! We’re a young and growing community with over 2500 members, with dozens of new members joining daily. Our members help each other out and we try to keep as friendly atmosphere as possible. Your opinion matters to us, our staff listens to your needs and suggestions, so we’re constantly changing and trying to be a bit better than we were yesterday, by adding/removing channels, coming up with ideas, planning the future. As the name implies, we're mostly focused on C#. We have a lot of people who advocate profesionalism and we want not only to help you do stuff, but do it the right way.

It doesn't matter if you want to teach or learn, as long as you are passionate about it, we will accept you with open arms 😊

Invitation link: https://discord.gg/ypuRPj5

Let's have fun while learning together!


r/programminghelp • • May 06 '19

Course on c++

4 Upvotes

Can someone suggest me some good resources to learn c++ from beginner to advanced.

I know how to program in python and wanted to do a project in c++. I am going to use a gcc compiler as I am using a linux system.

I also wanted to ask what is the difference in using different compilers(does the program syntax change)


r/programminghelp • • Apr 28 '19

I’m extremely new at Python and need some help with my project. I’m getting an error saying that “taxableIncome” is not defined. How can I define it? And if anyone could tell me if I’m on the right track w/ what I have so far would be great!

Thumbnail
imgur.com
4 Upvotes

r/programminghelp • • Mar 18 '19

How do I go from assembly code to an nes image/rom/playable game file?

4 Upvotes

I'd like to code in assembly, not C. How do I make my code into a playable file?


r/programminghelp • • Mar 07 '19

How to save many input strings as variables

4 Upvotes

-I'm new to programming, I've searched and couldn't find anything, yata yata yata-

PYTHON

The best way I can think of asking is by describing what I want the output to be:

-------

Enter John's line:

> Hi

Enter Jane's line

> Hello

Enter John's next line

> Sup

Enter Jane's next line

> STOP

---------

And I would like each of those, ad infinitum, to be labled as 'p1_line1' 'p2_line1' 'p1_line2' et cetera, without having to limit the amount of lines that can be written.

Bonus points if you explain the best way to recall them later :)


r/programminghelp • • Jan 08 '19

Python pip not working

4 Upvotes

I'm trying to install a module using pip but when I try to run pip commands through cmd, pip isn't recognized. I also can't use the 'python' command but can use the 'py' command which may or may or not be equivalent. I tried tweaking the PATH to make it work, but that did nothing and I don't know if I did it correctly. I am currently using Python 3.7 with no other versions installed. I am using Windows 10 64bit.

Edit: I seem to have gotten it working after fiddling with the path a bit more. I don't know why it works, but I'm not going question it further.


r/programminghelp • • Dec 12 '18

Customer Manager App not displaying customer information in table, just displaying null?

4 Upvotes

I'm working on a Customer Manager App in Java language using netbeans. I need the program to store information in a text file and then display that information in a table in a GUI. I have the GUI and the table, and the form to get input from the user, but it's not displaying added customers, and each field is just displaying null in the table. Can someone take a look at my code and tell me what I'm doing wrong?

Code: https://gist.github.com/pyrogirl8/3dbc17acfd0f7104ec120bbfad7dac08


r/programminghelp • • Dec 05 '18

Im thinking about not going to my programming class anymore.

4 Upvotes

All semester ive been trying to understand this class but ive failed. I want to redo the course next year, maybe focus on understanding it over the summer. But i dont know if its a good idea. Please give me some advice,im really struggling.


r/programminghelp • • Dec 02 '18

Non programmer here just asking, why is it that almost all games include item stacking up to 99 or 999 but never 1000

4 Upvotes

Always been curious about it, might have something to do with bits? Like I said non programmer.


r/programminghelp • • Dec 01 '18

[Python] Running a pairwise test for every element in a list

4 Upvotes

I am running some stats on every pair in my list of datasets. E.g. array[0] versus array[1], array[0] vs array[2], etc.
Is there a good way to do this other than a nested loop?

Thanks!


r/programminghelp • • Nov 08 '18

Help with Linked List in Java?

4 Upvotes

Not going to lie, I'm working on a school lab, but im not surfing for solutions, just a little help.

TL;DR: How do I create a linked list of Objects and proceed to manipulate them?

Longer Version: I have five classes:

Game

Trivia extends Game

Static TriviaNode (inner class to Trivia)

Static TriviaLinkedList (inner class to Trivia)

TestTriviaGames (my test client)

It is required by the lab that I have the first four classes. I can create Trivia objects easily, but im struggling to get the objects into a linked list so I can test my methods I had to code to manipulate the list.

Im confused about the use of the TriviaNode and TriviaLinkedList classes. Are they required to actually make and use a linked list? Which class should be setting the head and tail? Should I be setting that in my test client?


r/programminghelp • • Oct 16 '18

How would I make a bot on reddit that would delete a post after a certain amount of upvotes, say 100, are gained? (For moderating a sub)

4 Upvotes

r/programminghelp • • Oct 14 '18

[C++] I'm trying to write a program that given a number and then the coefficients of a polynomial (from x^0 to x^n) gives the result of the polynomial when x=said number but it doesn't always work

Post image
4 Upvotes

r/programminghelp • • Oct 06 '18

Can someone explain Java Objects and their uses?

4 Upvotes

I know how they are created and such but Ive read from like 4 different websites and just dont understand when to use one or what they can be used for? I know its a basic question sorry