Programming

How to "fix" a permissions issue caused by sudo?

Learn Programming - Thu, 11/15/2018 - 10:42

I used sudo create-react-app and it created a permissions or ownership issue with my project. I tried using chmod 775 <filename> on both the files and folders to no effect. chown <username> <filename> did allow me to make edits in Phpstorm but when it autosaved it threw another error.

I ended up deleting/reinstalling the project without using sudo and it works fine. Just curious if there was a way to fix a project with the wrong permissions, that I didn't do already.

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

Fruit Store Program using C++

Learn Programming - Thu, 11/15/2018 - 10:41

Hello I need help in creating this program , a little help will do , I'm a freshman and I'm learning this C++ language. Our professor asked us to create a store(randomly assigned) we were assigned to create a fruit store... We need at least 50 items together with the price... we are required to use arrays and looping statements...

The program will show you the list of fruits in a table format with the price list and will ask you to input you orders together with the quantity, after that the program will show you your receipt...\

thank you in adance

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

Where to next?

Learn Programming - Thu, 11/15/2018 - 10:36

So, I learned HTML, as well as HTML5 and I’m pretty comfortable with my abilities in that. So... where do I go next? What else should I learn? And what do I need to run it?

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

Best practices for a voting app?

Learn Programming - Thu, 11/15/2018 - 10:28

I want to make a real-time voting app. Where better to store the voting events? Redis or RethinkDB?

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

I need to do this at work

Learn Programming - Thu, 11/15/2018 - 10:25

I'm sorry if this has been answered before, but I have a very specific problem that somebody with perspective could help me with. I have a job where I have a lot of free time, and I'd like to use it productively by learning to code. I don't want to raise any red flags with IT by downloading anything onto the computer. Is there any non invasive way I can learn to code, practice it, and maybe automate parts of my job (trying to show them legitimate work related need) without bringing hell down upon me from on high?

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

Copy Paste vs Cut Paste - difference on a code level

Learn Programming - Thu, 11/15/2018 - 10:12

I was wondering does anyone know if the underlying code (so to speak) of the cut-paste-process is in some significant way different from the copy-paste-process or is it essentially the same thing but with the additional deletion of the original file at the end. Simply put, does cut paste actually cut something or is it just another copy.

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

Best Practices for Revision Control and Time Management

Learn Programming - Thu, 11/15/2018 - 10:09

Hello,

I am a self-taught developer (technically I was school-taught c++ 10 years ago, didn't use it for 6 years or so and now I code in Python and JS)

One of the places that my knowledge is lacking is in the best practices for Git and Time Management.

How do you guys manage your time? I see a lot of developers opening issues for themselves and then only working on those, I struggle because I will work on whatever whenever I want and it's not really structured.

Also, how do you guys handle Revision Control? I know the basics of Git. I'm asking more along the lines of when do you tag, when do you branch, etc?

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

Need help debugging a html5 canvas programme

Learn Programming - Thu, 11/15/2018 - 10:02

In the code that I'm writing, I need to be able to generate a random triangle who's area is at least 30% of the canvas. I decided to take the approach of generating random triangles till one of them was above that area. I wrote it out and the logic seems fine (at least I think it is) but when I run the code I get an error

Uncaught SyntaxError:Unexpected number

Line:59

.. which is the while line of my do while loop. The condition on this line seems to be irrelevant i.e there's an error on this line no matter what the condition is

Here is the code: https://code.sololearn.com/WGj1Yd6I74LG/?ref=app

Any help would be appreciated

Edit: I think when you run it, it shows up as an error on line 39, but when I open the code from the app it shows up as an error on line 59. I think that's cause they're counting from inside the script tag online but normally in the app. Anyways, I'm sure the error is referring to the while line of the do while loop (although i think the problem is somewhere else)

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

Can I make 64bit apps use 32bit ints and pointers?

Learn Programming - Thu, 11/15/2018 - 09:43

I have a single file app. It takes an input, runs a Deterministic_finite_automaton, puts the results into an array then ends. The file is rather large (60mb, over a million lines) and I have 3 binaries to fool around with.

clang++ -O2 main.cpp
(-arch=x86-64 and -arch=x86 gets me a warning that it's unused, there's no *32 next to the process in task manager so I'm assuming it is indeed 64bits)

dotnet build -c Release -r win-x86

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

C++ and Game Development: SoloLearn then Udemy UE4 course?

Learn Programming - Thu, 11/15/2018 - 09:43

So I was thinking of learning how to code in C++ because I'm planning on going to do a Games Programming course at University. In fact right now I'm doing game development at college and we were given a solo year-long project to do as part of the course, so I chose to learn how to code in C++ and then make a simple 2D Mega Man style platformer.

My plan is at first I would learn via SoloLearn with the public support and comments to help, then use a Udemy course, probably "The Unreal Engine Developer Course - Learn C++ and Make Games" as well as making a 2D platformer in Unreal Engine using blueprints as a side project. Is this a good way to learn and any other tips for learning how to code or any websites you could suggest to learn C++/Game Programming? Thanks in advance!

Also as of now I'm in the middle of Conditionals and Loops for SoloLearn and it's pretty good so far!

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

Help!!

Learn Programming - Thu, 11/15/2018 - 09:37

i,

I recently started learning Python at codecademy, I'm not that far ahead. It's my first time programming and I've heard Python is a good way to start.

In the future, when I have a solid base with Python, I plan on moving to C++. I don't plan on doing this professionally, it's just something I've always wanted to learn and wanna be able to program small basis electronics on my own with platforms like Arduino or Adafruit

My questions are:

People who have learnt Python and then moved to C++, is it worth the time investment? Should I go straight to C++? Does learning Python first help you understand C++ better? Does learning both of these languages even remotely help you with programming arduino and other coding controllers I know it all depends on what I want to do, it might sound very vague, but I just want to learn to make some simple apps, understand game engines and how scripting works.

Thank you.

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

Pages