• Breaking News

    Monday, April 22, 2019

    A brief intro to git - for absolute beginners learn programming

    A brief intro to git - for absolute beginners learn programming


    A brief intro to git - for absolute beginners

    Posted: 21 Apr 2019 06:24 AM PDT

    I wrote an article on git because it was one of the tools I didn't bother to learn for far too long, mostly because every time I tried, I found the resources were highly technical, not written for beginners, and as such, did a poor job of explaining the very basic function that git serves - saving stuff.

    I came to the (wrong) conclusion that it was yet another tool in the endless list of crap that I had to learn to be a developer. It turns out, however, that it's one of the most important ones.

    If you don't know git or have been struggling to understand it, I hope this intro lets you get over that initial hurdle - https://webtuu.com/blog/04/a-laymans-introduction-to-git

    Feedback/comments on improvements or otherwise welcome!

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

    Open Source for Advanced Beginners

    Posted: 21 Apr 2019 09:03 AM PDT

    People learning programming are often advised to "work on open source" and "read other people's code". But whose code? Which projects? You're on github.com, what are you meant to click on next?

    To help you get over this hump, I'm writing a blog post series called "Open Source for Advanced Beginners". For the first project, I've cloned an accessible but non-trivial Python open source library called bashplotlib, and written 7 feature requests for it. Your task is to add them. You get a lot of guidance, but not too much, and all the difficult bits are left up to you.

    I've beta-tested the project with a few people on this sub, and have received a lot of useful constructive and positive feedback. The project is an extension of another series I'm working on, "Programming Projects for Advanced Beginners", which is linked to from the FAQ of this sub. Thanks, and please do get in touch if you have any questions.

    Links:

    Project: https://robertheaton.com/2019/04/14/open-source-for-advanced-beginners-1-bashplotlib/

    More detailed intro: https://robertheaton.com/2019/04/13/open-source-for-advanced-beginners/

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

    How do I "learn" linux

    Posted: 21 Apr 2019 10:48 PM PDT

    I'm a college student starting the whole interview process and I see alot of CS jobs list Linux as a skill. What exactly is meant by that? Most things I find through google and YouTube are simple command line tutorials about ls and cd. I use Linux and can navigate my file system, but what are some resources that can prepare me for Linux interview questions?

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

    How did you understand pointers in C?

    Posted: 21 Apr 2019 07:49 PM PDT

    I'm super confused on pointers. How did you understand them? I'm especially confused about the * and & operators regarding pointers. Any resources you recommend to learn them better?

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

    HackerRank help (Java)

    Posted: 21 Apr 2019 11:57 PM PDT

    This is the New Year Chaos question from HackerRank.

    Question: Any person in the queue can bribe the person directly in front of them to swap positions. If two people swap positions, they still wear the same sticker denoting their original places in line. One person can bribe at most two others. You must know the minimum number of bribes that took place to get the queue into its current state. If any person has bribed more than twice the print out "Too chaotic".

    Input: 1 2 5 3 7 8 6 4

    Expected output: 7

    My output: 6

    Can you point out what I did wrong in this code?

     static void minimumBribes(int[] q) { boolean flag = false; int bribes = 0; int math = 0; for (int i = 0; i < q.length; i++){ //check if person has bribed more than twice //if so, flag and exit the loop if (q[i] - (i + 1) > 2 ){ flag = true; break; } //check if person is bribed by determining if they are less than the index value //if so, add by absolute value of the difference else if (q[i] < (i+1)) { bribes += Math.abs((i+1) - q[i]); } } if (flag == true) System.out.println("Too chaotic"); else System.out.println(bribes); } 
    submitted by /u/WTFparrot
    [link] [comments]

    [C++] Why is the last output of this code "14 15 -1"? Shouldn't it be "-1 15 -1"?

    Posted: 21 Apr 2019 10:13 PM PDT

    Because the void func3 makes a = b - c.

    So shouldn't a = 15 - (-1) = 16? What's going on?

    https://imgur.com/a/gcGjPp6

    Output:

    0 0 0

    12 14 0

    14 15 -1

    14 15 -1

    Think it might have to do with the usage of reference variables, but I just learned about them and am not too sure on how all that works.

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

    Programming Languages to Learn for Unity? (Question)

    Posted: 21 Apr 2019 10:12 PM PDT

    Sorry for the formatting/grammar, my English isn't very good.

    I am extremely new to coding and computer programming, but have watched a lot of videos about the best languages to start learning. But I have an idea in mind where I would need to learn C# but not sure if it's the best first language to learn. My question is: What is the best programming language to learn first, if coding in Unity (C#) is in the long run? (languages similar to C#?)

    I know the FAQ helps with the languages you might want to learn first, but I would like to learn a language before learning C# that I could use for tasks other than game development (web design perhaps?) that can still help in relation to learning C#.

    Any responses would be very helpful! Thanks!

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

    What do systems like Airtable, Google Drive and other real time collab software run on?

    Posted: 21 Apr 2019 07:58 PM PDT

    I understand this will be a best guess, but my assumptions would be something like this:

    1. A central database holds a master config file for any document. Not exactly sure how it would handle formatting, but that would be stored in a central DB.
    2. Each client that access and modifies will update the database.
    3. Some sort of push event will trigger any open client with the change. Is this likely to be sockets, like socket.io? How detailed are these changes most likely? Would it be "delete character #1245" "add A"?

    I'm trying to gauge how these real time applications might work and so far, all Google searches have just been trying to sell me the software, not teach me what's under the hood! Any ideas would be really appreciated!

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

    Why does UART loopback not work?

    Posted: 22 Apr 2019 12:42 AM PDT

    Hello

    I have a system running linux, connected the rx to the tx (loopback) and executed this code:

    #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <unistd.h> int main(void) { int iFd = open("/dev/ttyTHS0", O_RDWR); if (iFd < 0) { fprintf(stdout, "Error when opening file.\n"); return -1; } while(1) { if (write(iFd, "A", strlen("A")) == -1) { fprintf(stdout, "Failed to write\n"); return -1; } char buff[10] = {0}; if(read(iFd, buff, sizeof(buff)) <0) { fprintf(stdout, "Failed to read.\n"); return -1; } fprintf(stdout, "read: %s\n", buff); } close(iFd); return 0; } 

    Thing is it doesn't seem to receive any data. I can see the data being transmitted on the tx line when looking at it with an oscilloscope, but the rx doesn't receive anything.

    Any idea's?

    Thanks

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

    [Jquery] How do I fix the problem of overlapping images with Isotope.js/masonry.js when lazy loading is implemented?

    Posted: 22 Apr 2019 12:38 AM PDT

    If you take a look at the services section of my landing page you'll see a bunch of images overlapping over each other.

    http://tk101global.com/renew/index.html

    This only happens when i implemented lazy loading.

    Looking into the culprit , i find that its something to do with the isotope.js plug in im using.

    On first loading the page the images overlap each other but when i resize the window, the images "fix" themselves into the correct layout.

    Looking at isotope.js FAQ

    https://isotope.metafizzy.co/faq.html

    There seems to be 2 solutions from the faq https://isotope.metafizzy.co/layout.html#imagesloaded

    1) Initialize Isotope, then trigger layout after each image loads.

    or

    2) initialize Isotope after all images have been loaded.

    There is accompanying code in the FAQ pages, what am i supposed to do with it?

    Ive tried adding the code as scripts to both isotope.js and the html file.

    Ive also tried looking for code in isotope & the html file to see if there are values i can edit. I cant seem to find it with control-f

    Ive isolated the problem further as thus

    Problem = Lazyloading throw off Isotope layouts and cause item elements to overlap

    Possible solutions

    A) Images loaded https://isotope.metafizzy.co/layout.html

    B) github thread https://github.com/desandro/masonry/issues/1042

    Solution A seems to be the easiest fix but my lack of experience in Javascript has caught on with me.

    I was wondering if i could ask how I could apply the code sample.

    Is it a matter of adding it as is to isotope.js? or is code im going to have to fill out "between the lines" ala draw the rest of the owl?

    refering to this

    // init Isotope

    var $grid = $('.grid').isotope({

    // options...

    });

    // layout Isotope after each image loads

    $grid.imagesLoaded().progress( function() {

    $grid.isotope('layout');

    });

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

    First Time building a JAVA application and using an API (from NASA)

    Posted: 21 Apr 2019 05:05 PM PDT

    Hey everyone, I'm currently working on a small project for the semester – this will be my first time developing an app and I need some help going about using an API to retrieve and print data. I'm currently working with JAVA swing app builder in Eclipse Photon (2019). The API contains a url with a key, and I used Scanner to read the url. However, went it prints on the console its all over the place lol. Any suggestions how I can retrieve data from the url based on specific content? (ex. Name of exoplanet, size, etc). Any help will be greatly appreciated!

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

    My first time ever posting a problem I have with my code :) (First post on reddit tbh)

    Posted: 21 Apr 2019 06:35 PM PDT

    So this is the first time I've ever posted an issue I have with my coding. I usually just lurk reddit Always a feeling a bit nervous to post problems I ever have. I usually try to exhaust the search throughout the internet first. However I thought now would be a good time to get myself involved with the community. So If I ask stupid questions...Please forgive my lack of knowledge.

    So I've just started programming with my first course on Udemy & halfway through I decided to start creating simple based gallery sites and stuff like that to get some actual hands on experience other than just following a video & coding along. I don't learn much that way. Gotta throw myself in the deep end.

    I've been studying HTML/CSS the basics & have now encountered my first problem which I can't solve. Maybe it's pretty simple but I just can't see it lol. What I want to understand is how do I put all <p> on the same line? has it got something to do with the margins or padding? & if so is this the right subreddit to post this issue on> or is there another site/page I should posting problems such as these? My codepen is down below. I would really appreciate any help I can get.

    Don't mind the Geeky Endgame barely a website. It looks terrible I know I'm just using it as a front to learn the basics.. It was the first thing that came to mind. + I'm just super excited to go see it this Wednesday.

    My Codepen below! Any tips will help to make it look better btw!

    https://codeshare.io/5X0608

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

    Getting my feet wet over the summer before Sophomore year?

    Posted: 21 Apr 2019 06:11 PM PDT

    Hey everybody! I'm a current freshman at a U.S. University. I'm heavily considering CS as my major. This semester I've taken Intro to Java and enjoyed it. However, I'd like to really get my feet wet/get some more experience before entirely committing to this major. Is there anything I can do over the summer to more fully explore CS? Thanks!

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

    I've learned how to implement a binary search tree... Now what?

    Posted: 21 Apr 2019 07:33 PM PDT

    Hello, I'm trying to teach myself data structures and algorithms! It's very exciting stuff. I just learned how to implement a binary search tree and some of its methods. Insert,Size, FindMin, FindMax, Contains, DFS in-order, pre-order, post-order, BFS in-order... etc.

    My question is, what next? How can I practice this information outside of just writing a bst and its methods over and over again? Or is that the way to practice? Or, is it time to move on to Hash Maps, linked-lists and other data structures? I'm just not sure how deep I should go learning Binary Trees.

    Thanks!

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

    Best online course to learn about parallelism and concurrency?

    Posted: 21 Apr 2019 09:51 PM PDT

    So I have interest in learning about this subjects, I haven't found a course I particularly liked. I searched for one in coursera called Heterogenous Parallel Programming, but it seems to be gone. Found some other courses in there but they were in Java, and I would prefer C or if possible Rust.

    Also found this Udacity course, but I'm not sure how good it is. Any reviews on it?

    https://www.udacity.com/course/high-performance-computing--ud281

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

    I've published my ASP.Net Core/React application using free Azure hosting, but now it's not updating. I can see in network history that the POST and GET methods were executed. But the graph is not updating.

    Posted: 21 Apr 2019 09:50 PM PDT

    I was wondering if anyone had any thoughts on this. I'm trying to publish a web app and successfully published it at azurewebsites. It works just fine in Visual Studio, but once I published it here, on the published version it calls the GET and POST methods but never updates the graph. It just has the blank graph from when it started. My application isn't the most efficient because it's more experimental; it makes 20 GET calls per button press and that may have something to do with it....I looked in "Network" and all my GET/fetch functions are happening. But nothing ever updates from the C# side.

    Any thoughts?

    ETA: When I look at inspect element -> Network and compare it between my localhost/lost run and the published web app, both run the GET methods just fine. However only the localhost app actually shows the updated graph. When I search for files in inspect element, I get all my JS and CSS files but funnily enough my C# file is missing.

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

    What's a "framework"?

    Posted: 21 Apr 2019 01:00 AM PDT

    I'm a high schooler who's just getting into CS. I heard talk about ".NET Frameworks" and stuff. What exactly are they? Are they libraries that you can import? Are they languages? Are they a compiler like Netbeans, IntelliJ, or Eclipse? I figure you guys can give a more comprehensive answer than wikipedia, which is just generically unhelpful. Please use simple terms as well, I'm not completely familiar with CS lingo just yet.

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

    [C++] Can anyone help explain why this function declares "double" multiple times?

    Posted: 21 Apr 2019 05:43 PM PDT

    https://imgur.com/a/s4IZKI0

    I'm not sure why getBasePay has a double. Then hoursWorked has a double.

    then below that, basePay has its own double.

    seems like we're declaring double too much and it's redundant. why can't i just say getBasePay (double hoursWorked)?

    What's going on?

    Newbie programmer

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

    Storing Data as Coordinates in Java

    Posted: 21 Apr 2019 09:12 PM PDT

    Hi all,

    So I have been trying to write a program to store coordinates which are given by the user and inject points between the mentioned coordinates. I am having trouble storing the data I receive as coordinates to be processed later for multiplication by a vector. (x1, y1), (x2,y2), and (x3, y3) are all coordinates. However I cannot process those coordinates and I cannot find a way to implement the Point2D library into the code. I also need to multiple a point by a vector but I don't know how that is possible since I need to convert those values to points first. I also want to know if it is possible for the injectPoints() method to make in the put dynamic so it could be adaptable to the number of points I input. My code is also really messy so it would be very helpful if anyone could help me out. Any help is greatly appreciated.

    Thank you so much.

    Here is the code: https://repl.it/@AdityaMangalamp/SizzlingTallMeasurements

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

    javascript match 3 game help

    Posted: 21 Apr 2019 09:11 PM PDT

    I'm making a match 3 game in javascript and I'm currently struggling with assigning a number value to each of the buttons through a loop.

    I feel like I'm totally blanking out but basically I was trying to assign a number to each of the buttons, like for example button1 would be assigned 1, (I didn't make this through an array) and then add 8 or subtract 8 for up and down and then +1/-1 for side to side to check if there are matches.

    I've tried several ways to take just the ID value from the button, which is button1, button2 and so on, but it just adds to the last value of the ID, so it'll say button18 instead button9.

    I really feel like I'm blanking out and any advice would be super helpful.

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

    Help with Tkinter: Setting width and height as float values

    Posted: 21 Apr 2019 09:04 PM PDT

    So I've started using Tkinter, and I've been finding it a little bit difficult. I've been wanting to set a width of a widget to a float number, and am wondering how to do so. Can anyone help? This is the code I've got so far, but when I enter a float value, it doesn't seem to understand because it expects an integer value for width and height. Help would be appreciated!

    # elements (bottom_frame) 

    calculation_input = Entry(bottom_frame, width=45) enter_command = Button(bottom_frame, text="Enter", height=1)

    enter_command.grid(row=0, column=1) calculation_input.grid(row=0, column=0) root.mainloop()

    submitted by /u/1MightBeAPenguin
    [link] [comments]

    Making the raspberry pi wireless

    Posted: 21 Apr 2019 02:48 PM PDT

    I have a raspberry pi 3b and I was wondering if it would be possible to make it wireless and to code with it only using my laptop and no external peripheral devices. Would that be possible? If so , how do I go about it?

    submitted by /u/travthe-great
    [link] [comments]

    Thinking of finally taking the first steps this summer! How can I know if I'm suited for this, before going all in?

    Posted: 21 Apr 2019 04:53 PM PDT

    Hi all!

    Just want to preface this by apologizing if this topic is brought up often in this sub, or if this shouldn't be asked here (I read the sticky, but still unsure).

    I'm graduating University in the coming weeks in a completely unrelated field, with little long term prospects. Programming is something I've developed a lot of interest in over the past couple of years, and to be honest, if I could go back to the beginning of my degree I most probably would have pursued it. I just wish I would have learnt about it in my high-school years, so I could have oriented myself towards it. I have a couple of friends who are graduating with CS degrees who have told me that programming is something I would probably be good at (I have no idea what this means exactly, because I still haven't actually seen anything related to how this entire thing works) but kind of always brushed it off.

    My university if offering an intensive bootcamp that lasts over a period of 12 weeks over the summer that ends with a certification and the reviews I have seen about it all seem to be positive. It's extremely expensive, and I would have to forgo a full time-summer gig as well as job searching in my field, but I could manage. My logic is that even I don't pursue programming as a career, it's probably the most useful skill to have any way with the way the world is headed, so my time and money wouldn't be wasted.

    My question to you all is before I decide to go all in and pursue this full time, is what should I expect going into this uncharted territory? Moreover, what kind of resources can I look at to see if programming is right for me? It's easy to trust what your friends tell you, but I'd rather be sure of it myself.

    Thank you for taking the time to read this and I welcome all advice :)

    TL;DR: Graduating in a crap field. Been told I would take to programming; how can I be sure? What can I expect?

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

    Java GUI Help?

    Posted: 21 Apr 2019 04:48 PM PDT

    Every video I've watched, even ones from the same person, use different ways of setting up and putting components into a GUI window. I don't understand how to position a text field to a specific spot on a gui window with a set size.

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

    No comments:

    Post a Comment