Need some help

Learn Programming - Fri, 03/16/2018 - 05:55

Hello fellow redditors. I gotta make a program that my scanning a bar code or a QR code, I get the info from a client. I got the data base on Access and tried doing queries, but I have to reexecute the query everytime I want to scan a new bar code. Any ideas?

And if this isn't the proper subreddit to make this post, could you suggest me some?

submitted by /u/Agente_00Huevo
[link] [comments]

True and false operators in C#

Programming - Fri, 03/16/2018 - 05:52
Categories: Programming

Modern C, by Jens Gustedt [PDF]

Programming - Fri, 03/16/2018 - 05:45
Categories: Programming

Why is it that code sometimes runs twice?

Learn Programming - Fri, 03/16/2018 - 05:41

For example I had a winforms application where I could unregister some users (just updates something in a DB) and the code is behind a button click method.

Whenever that method's called, it will run the code inside twice and open the next form also twice...

Another example is right now I was working on a MVC webapp with Razor etc., I put a breakpoint at the beginning of my page (which has a @using Html.BeginForm statement) and it also runs this code twice (so it creates the webpage, then loads it a second time).

Why does this happen??

submitted by /u/horoblast
[link] [comments]

[C# Windows Forms App] Error in Music Database Program

Learn Programming - Fri, 03/16/2018 - 05:26

Hello everyone, i am making a music database in which the user can add, remove, edit artists+albums+songs and give it a rating. However i am not that far yet.

how the window would look like:

On top it would list all artists, followed by a window that displays the albums of the selected artist and in the future should also show the songs on the selected album by the selected artist. As you can see there are no buttons yet, since i am only trying to populate the artist/album/song fields at this time

this is my code so far:

and this is the error i am getting:

I've asked my teacher about it, but he litteraly said he doesn't know. Currently this is an assignment to get to familiar with SQL (in combination with C# here).

Any advise on my program is very welcome, irregardless if it concerns the error i am getting. However if anyone could even hint me at where to fix my error i would greatly appreciate it.

Thanks in advance

submitted by /u/jsalds
[link] [comments]

[JS] Code review of color clicker game, and how to make multiplayer version

Learn Programming - Fri, 03/16/2018 - 04:42

Hello! My friend recently made a color clicker game, and I wanted to try making it a multiplayer game. So far I've cleaned up the code a bit, but I want to know how I can improve the code's structure.

There are a lot of functions and global variables (which I wrapped in an IIFE). Would it be cleaner to have the functions pass the variables around instead of having them as global?

I'd also like to ask for guidance with making it multiplayer, where two players can play against each other in real time. I plan to use Node JS, express, and socket io for this, but have no concrete plans other than that. Furthermore, how should I separate the logic of the game from the logic of the multiplayer server? Should the game logic be kept in a public/js, or should it be a controller?

Thanks! The code can be found here

submitted by /u/Starnohyoushi
[link] [comments]

Zero coding experience, where do I start?

Learn Programming - Fri, 03/16/2018 - 04:26

I have zero coding experience. I want to learn how to code and then learn React Native, where do I start and how do I proceed ahead? I cannot join a college or tuitions to learn coding, hence I'll need something that's online. TIA.

submitted by /u/zpacc
[link] [comments]

How to reset terminal without losing files?

Learn Programming - Fri, 03/16/2018 - 04:26

Hi! So I've been learning programming over the past few months and I've been running programs through the command line (I use a Mac). I tried to follow online tutorials so I've installed some packages using pip and I think Homebrew. Is there any way I can remove all installed packages even if I don't remember what they all are?

In other words, can I reset back to factory settings without in the process losing all my other files like Word documents and folders etc.? I know I can back up all my files and then do a factory reset but I'm trying to avoid this since I'd have to customise my System Preferences all over again. Any help would be greatly appreciated.

Thank you so much!

submitted by /u/anonymymity
[link] [comments]

Developing a game without PyGame

Learn Programming - Fri, 03/16/2018 - 03:40


I’ve been given a task to develop a game using Python, but without the PyGame library.

After extensive use of Google I haven’t been able to find any tutorials or resources to do this, would you guys be able to recommend some good sites for learning?

Thanks a ton!

submitted by /u/qawsed123456
[link] [comments]