• Breaking News

    Wednesday, March 11, 2020

    After a year and a half of programming, I just learned about double clicking to highlight a whole word and triple clicking to select a whole line and quadtruple clicking to select all. NEVER AGAIN. What are some must have tricks and shortcuts for programming. learn programming

    After a year and a half of programming, I just learned about double clicking to highlight a whole word and triple clicking to select a whole line and quadtruple clicking to select all. NEVER AGAIN. What are some must have tricks and shortcuts for programming. learn programming


    After a year and a half of programming, I just learned about double clicking to highlight a whole word and triple clicking to select a whole line and quadtruple clicking to select all. NEVER AGAIN. What are some must have tricks and shortcuts for programming.

    Posted: 10 Mar 2020 11:14 AM PDT

    Oh god, knowing these shortcuts would have saved me so much time.

    On the other hand, this is a real life powerup.

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

    Following tutorials usually ends up having to debug before you can actually start

    Posted: 10 Mar 2020 04:57 AM PDT

    It's somewhat of a rant but everytime I try something new like Spring boot or Spring MVC I end up googling a whole bunch of errors because the tutorial forgot to talk about important things.

    It happens. Every. Single. Time.

    Trying to learn spring MVC for the first time? "install tomcat"

    Localhost:8080 already in use.

    --> Google it.

    --> ah I can lookup the process using netstat and kill the pid. OK good to know.

    Port - 1 out of range.

    --> Google it

    --> oh I shouldve specified the shutdown port properly.

    --> change server.xml file

    Oh I've followed this tutorial on spring boot but using eclipse? Let me try using intelliJ.

    --> the whole syntax is different

    --> all tutorials are written in eclipse

    So usually, when I have like a few hours of my time the majority is spent first by debugging before it all actually works. And it's frustrating.

    I always find a solution but it's frustrating.

    EDIT:

    Since I might've phrased my rant wrong. I'm talking about important parts on how to get your Spring MVC/Spring Boot/Whatever to work. Not when someone writes out code and it doesn't seem to work.

    I'm talking about how to install TomCat properly, how to configure the framework properly so that it works. Not talking about a tutorial how to write a Spring MVC application and that the example they gave is not what I wanted the tutorial to talk about.

    That's why I gave the examples of the localhost even failing to start because of tomcat not being configured properly and/or Spring MVC to be configured improperly.

    Or that you follow the their steps exactly as they've shown and for some reason YOU are experiencing bugs and they are not. When you know you've followed it to the letter.

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

    Does A CS Degree Teach You about Computers Or Computation?

    Posted: 10 Mar 2020 08:19 PM PDT

    I'm thinking about majoring in Computer Science because I love coding, but I'm afraid I won't learn what I want to learn.

    My question is... in a CS degree, do you learn about how computers work + how to program them, or do you dive into the science of computation and how computation takes place in the brain, the abacus, Mathematics, Quantum particle, ext?

    (I want to get a MS or PHD in a field that will land me into the space of Quantum Computing, but I'm afraid that CS won't do it?)

    Other Majors im considering: Computational and Mathematical engineering Applied Mathematics Maybe Electrical engineering or Physics

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

    Print tree level wise(java)

    Posted: 10 Mar 2020 09:16 PM PDT

    public static void printLevelWise(treeNode<Integer> root){ Queue<treeNode<Integer>> q = new LinkedList<>(); q.add(root); System.out.println(root.data); while(!q.isEmpty()){ treeNode<Integer> a = q.remove(); for(int i=0;i<a.children.size();i++) { q.add(a.children.get(i)); System.out.print(a.children.get(i).data + " "); } } } 

    this is a function which would take root of a tree and print it level wise...my code prints everything in one line..any suggestions please.

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

    Looking for a solution to storing complex Pyhonobjects on a flask server hosted on Heroku

    Posted: 10 Mar 2020 06:57 PM PDT

    Basically I have a flask application that I've deployed to Heroku, and it works locally, but when hosted, I run into issues with different instances of global variables.

    I'm not very knowledgeable on this subject, but I believe it has to do with the fact that gunicorn forks the processes, so global variables become out of sync.

    I have tried to solve this issue by attaching a Rediscloud add-on and serializing the variables which are dictionaries (Dict[str, VeryComplexObjects]) to store on redis, but I learned that weakref objects cannot be seralized so this approach does not work.

    I'm pretty lost at this point and any advice would be appreciated

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

    Alternatives to CS50 by Harvard?

    Posted: 10 Mar 2020 10:02 PM PDT

    Any good alternatives to learning computer science fundamentals aside from CS50? Im at week 3 and i feel its too complicated for my level. I just need a course/book that is concise to learn the basics/fundamentals of Computer science.

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

    Is a diploma in programming worth it for getting my first programming job?

    Posted: 10 Mar 2020 11:18 PM PDT

    So I'm looking to get a 2 year diploma in programming because I can't afford a 4 year uni degree. How will my employment prospects be with that?

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

    Pathway

    Posted: 10 Mar 2020 10:08 PM PDT

    Hi guys ! I'm new to programming so i want to ask you guy should i learn programming as fullstack or just focus on only 1 field like Front-end or Back-end ? And if it's fullstack, do i need to be good at all programming language ? Thank you 😁

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

    What are the best ways to learn how to code?

    Posted: 10 Mar 2020 09:59 PM PDT

    I am currently doing code academy but people say that it doesnt teach you how to solve problems in coding so i am looking for alternatives like edX and maybe Team Treehouse (its very expensive tho)

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

    Free Programming Books (Huge list)

    Posted: 10 Mar 2020 09:58 PM PDT

    Hey,

    I have these books so I thought I'd share. Heres a link to download them: https://www.dropbox.com/sh/9ebv8dyrjvuja6u/AACc5Pfml9KyMDS9W6tINAaea?dl=0

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

    Programming: Is Trial & Error Good Practice or No?

    Posted: 10 Mar 2020 11:37 AM PDT

    So I'm learning C++ right now at a community college and my Professor always tells us that to be a good programmer, you have to know how to write it by hand (basically program without the compiler). I know this is true to some extent but do most people program by using the trial and error method?

    I have a background in basic web development (HTML and CSS) and I would always use the trial and error method until I got it to look/work how I wanted to. And now that I'm learning a programming language I'm simply asking if it is bad or not to do the trial and error method until it works.

    For example I was writing a program on letting the user input an interval between two integers and printing all the prime numbers within the two integers onto a .txt file. When I first did the for loop for finding the prime numbers, it was for (int count = 2; count < sqrt(low_number); count++). That kept printing all the prime numbers along with a few numbers that weren't prime, so I was looking through my code and decided to change my for loop to for (int count = 2; count < low_number; count++) and it worked without printing the extra numbers that aren't prime numbers.

    This might sound confusing, if it does please let me know so I can try to rephrase it. Thanks.

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

    Functions trouble

    Posted: 10 Mar 2020 09:44 PM PDT

    We recently started function in my first-year computer science class and I thought I would attempt to do it by myself before looking at my notes. I got to this point and don't see why the program isn't working. My only assumption would be where I have the function in Main but i don't know.

    #include <iostream> using namespace std; int tuitionselection(int); int main() { //variables int tuition, option; // prompt user cout<< " Enter the code for your program of study: "<< endl; cout<< " 1. Management " << endl; cout<< " 2. Education " << endl; cout<< " 3. Health Sciences "<< endl; cout<< " 4. Fine Arts "<<endl; cout<< " 5. Arts & Scienes "<<endl; cin>> option; //Determine tuition tuition = tuitionselection(int); //display tuition cout<< " You will pay $"<< tuition << endl; //done return 0; } //Function tuitionselection int tuitionselection(int) { int option, tuition; switch(option) { case 1: tuition = 2200; break; case 2: tuition = 2250; break; case 3: tuition = 2200; break; case 4: tuition = 2250; break; case 5: tuition = 2000; break; default: tuition = -1; return option; } } 
    submitted by /u/rodman247
    [link] [comments]

    Help with ti-basic

    Posted: 10 Mar 2020 06:58 PM PDT

    I want to do multiple lines of code after an if statement, like :If M=69 :X->str1 :Y->str2 But the two running from the same if statement, so it runs both if M=69 Would it be an "if" I need? Or something else. Please help me out

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

    I have £230/$300 to spend on courses/learning materials. What should i get.

    Posted: 10 Mar 2020 05:19 PM PDT

    As the title says my job has allocated me the above sum to use for professional development courses and i wanted to continue learning to programme. I have already completed the first chapter on HTML and CSS but wanted to see if a paid service can offer more.

    This could be anything from a monthly/yearly subscription or books/courses.

    Ideally i would be looking at web development. The company uses PHP and Javascript.

    Does anyone have any recommendations on what i should spend it on?

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

    Should I make a single repository for all my small projects?

    Posted: 10 Mar 2020 08:54 PM PDT

    Hey Reddit!

    I am a beginner programmer, and I want to make a Github portfolio for all of my codes and softwares. As of now, I have a few small one-day programs that I've made, such as a tuition calculator and a basic Discord bot. I want to know if I should make a single repository for all my small projects and make single repos for bigger projects, or if I should give all projects their own repo, regardless of how basic/small it was. Leave your opinions below, thanks in advance!

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

    Looking for Course Recommendations on Computational Thinking

    Posted: 11 Mar 2020 12:01 AM PDT

    Hey folks! I am a self-taught programmer.
    What I've realised is that my primary struggle with Data Structures and Algorithms (and even writing down simple code for that matter) is due to my inability to think like a computer.
    I am looking for course recommendations (MIT OCW, edX, coursera etc.) that'll teach me how to translate problems into computational problems.

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

    I need a review of my current portfolio repo

    Posted: 10 Mar 2020 08:13 PM PDT

    Tl;Dr sorry for the rant

    https://github.com/wesley-ruede/Android

    Please, I beg you, please take some time and review my current repo. I have poured so many hours into it and I really want to just have enough confidence to get a job in software. Im at the point I'm build apps with specific architecture so my code is more clean and concise.

    I just need some answers and some confidence... That or the brutal truth that my code is trash. I really hate it because I really have imposter syndrome and it sucks. Like i even have a YouTube channel where I teach people Python and it goes well enough. People learn from me. I've finally found a place in real life (I live in a VERY rural area so there is that and there are almost no software gigs around here at all) where I can volunteer and teach people to program with Python. Im very excited and its what I want to be doing.

    In the meantime I've been cranking out Android app after app. I love android and I really want to be a an Android developer/engineer. Any advice would make a world of difference. I have lots of readmes so you won't have to tell me that. I'll link to the github and YouTube so you can see this thing is way beyond passion.

    Also as a way tp understand how I feel, I was up at 4 am reading Android source code and tore through the first hundred pages of a book I picked up, designed a relative layout (I learned how to use check boxes in the book so that is cool), and still got to my meeting for 10 am.

    I'm entering the reply coding challenge with a team I have built over time because I want a community. it's all kinda depressing because I know how much I love to program and I just want to do it for a long time as a living for as long as I can see.

    Background on me: I'll keep it simple. I started with Python and then moved to Java about 6 months in because you can't build apps with Python. Finally I found The framework I love! The first network i hacked was at like 20 or so. It was script kiddy shit though. Nothing serious. I was rooting Android phones then too. I tried some coding around that time but it was mostly just playing around. I've been on Linux for like 5 years now. Back at the end of 2018 I lost my job and basically I sacked the next year of wages to learn programming for real and travelling . That is where my YouTube came from because I had so much knowledge in my head that I couldn't keep it all inside. Now I'm 27 and I know what I want to do. Where i want to be. I feel like I'm finally at the right age to make a serious career move in my life and sit still for a while. I know how much I love the grind. I'm in love with it. It's my favorite thing over anything. It would just be nice to get some solid feedback from those who are smarter and more experienced.

    Also i am very adaptable. I am able to move through languages relatively easily as long as I have a reason. Not just programming languges but in general people generally like me. I was thinking about doing web dev but, it's just not me. I know this and I can accept it. Android is what suits me. Clearly my only path is forward.

    Finally, if this sounds like a desperate cry for help, that is because it is. I need help. I don't beg often but, this time I will becauee any other time it hasn't helped... hopefully someone checks out this thread and responds even just to tell me to add a readmes or some shit or that my shit is bad. Sorry I'm often more positive about my stuff its just that the tech people especially on Reddit and StackOverFlow have kinda left a bad taste in my mouth so I mostly just lurk and read. In real life most people aren't bad at all from my experience with meetups and the one interview I had.

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

    How do smart contracts bet on real life events?

    Posted: 10 Mar 2020 11:41 PM PDT

    I see some dApps that utilize smart contracts that bet on twitch users to see if they win the match (fortnite, apexlegends). How do they include those events into a smart contract?

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

    [JAVA SWING] Where to put an if else statement?

    Posted: 10 Mar 2020 11:39 PM PDT

    First sorry for the tittle but I really can't explain or I don't have a proper question so I'm just gonna explain here what I wanted to happen.

    So I have this food ordering system and when you ordered a product you will increase its quantity by clicking a JSpinner and its maximum number is set to 10, so its like the product have only 10 stocks like that.

    What I want to happen is if the person reached the number 10 on the JSpinner it will show a message dialog wherein its saying that "Stocks are empty" <-- just an example message, but that's want I want to happen and I think and If else condition is the proper method to use but I don't know where to insert that if else statement in my code

    so here is my code to the whole like cart of mine

    void addIt(JTabbedPane tabbedPane, String text) throws IOException {

    JPanel panel = new JPanel(new GridLayout(3, 2, 5, 100)); //rows , columns , hori, veri

    panel.setBorder(BorderFactory.createEmptyBorder(50, 25, 50, 25)); // top ,left, bottom, right

    gbc = new GridBagConstraints();// getting constraints for the specified component

    gbc.insets = new Insets(10, 0, 0, 0);

    mealImage = new JLabel[ELEMENTS];

    mealLabel = new JLabel[ELEMENTS];

    numSpinner = new JSpinner[ELEMENTS];

    file = new String[ELEMENTS];

    price = new Double[ELEMENTS];

    file[0] = new String("/rice1.png");

    file[1] = new String("/rice2.png");

    file[2] = new String("/rice3.png");

    file[3] = new String("/rice5.png");

    file[4] = new String("/rice7.png");

    file[5] = new String("/rice8.png");

    mealLabel[0] = new JLabel("2-pc Chicken w/ Rice");

    mealLabel[1] = new JLabel("Tonkatsu w/ Rice");

    mealLabel[2] = new JLabel("1-pc Chicken w/ Rice");

    mealLabel[3] = new JLabel("1-pc Chicken w/ Egg & Fried Rice");

    mealLabel[4] = new JLabel("1-pc Burger Steak w/ Lumpia & Rice");

    mealLabel[5] = new JLabel("2-pc Sausage w/ Egg & Fried Rice");

    price[0] = 190.00;

    price[1] = 79.00;

    price[2] = 110.00;

    price[3] = 133.00;

    price[4] = 145.00;

    price[5] = 155.00;

    for (int i = 0; i < ELEMENTS; i++) {

    Image image = ImageIO.read(this.getClass().getResource(file[i]));

    Image imageScaled = image.getScaledInstance(80, 80, Image.SCALE_SMOOTH);

    ImageIcon imageIcon = new ImageIcon(imageScaled);

    This part of the code is about the JSpinner

    //value,minimum,maximum,stepSize

    SpinnerNumberModel spnummodel = new SpinnerNumberModel(0, 0, 10, 1);

    numSpinner[i] = new JSpinner(spnummodel);

    numSpinner[i].addChangeListener(listener);

    mealImage[i] = new JLabel(imageIcon);

    }

    code continuation

    gbc.gridx = 0; // gridx 0 represent the most left

    for (int i = 0; i < ELEMENTS; i++) {

    if (i % 3 == 0) {

    gbc.gridy += 2;

    gbc.gridx = 0;

    }

    panel.add(mealImage[i], gbc);

    gbc.gridy++; // gridy---> add one row,for foodLabel

    panel.add(mealLabel[i], gbc);

    gbc.gridy--; // remove the row

    gbc.gridx++; // move to next column

    panel.add(numSpinner[i], gbc);

    gbc.gridx++; // move to next column

    tabbedPane.addTab(text, panel);

    }

    }

    I am using Eclipse as my IDE and this is Java Swing. Thank you

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

    [Python] Question about zip function

    Posted: 10 Mar 2020 11:34 PM PDT

    Hi! Suppose that we have a list a = [1, 2, 3, 4, 5, 6]. I've learned that to make pairs of tuples from this list, the easiest way is to

    it = iter(a) b = list(zip(it, it)) b = [(1, 2), (3, 4), (5,6)] 

    Now, does the zipping work because during each call we exhaust the same iterator? It seems logical, but I couldn't find a confirmation with a quick search. Does this also mean that zip uses pass by reference argument instead of pass by value argument? Is the pass by reference standard in Python?

    Thanks!

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

    C# console app

    Posted: 10 Mar 2020 07:44 PM PDT

    How do i make a yes or no question in C#?

    (when ever i look it up on youtube or google it shows you how to make a messagebox)

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

    Online Degree

    Posted: 10 Mar 2020 11:17 PM PDT

    Hello!

    I hope this is the right place for this. If it belongs in r/AskComputerScience please let me know.

    I have been wanting to start on a bachelors in CS but cannot take the time right now to dedicate in person. Has anyone completed a CS degree 100% online? If so, what school and how did you like it?

    I appreciate your time and input.

    Thanks!

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

    Creating Script to engrave 3D STL file with Filename and apply dxf of datums engraved

    Posted: 10 Mar 2020 07:20 PM PDT

    Hi, how hard would it be to write a script for autodesk inventor,netfabb,fusion 360, or materalise magics to import a batch of .stl files and rotate them so their bottom side is on the front plane, then extrude cut text of the file name and place a dxf file(datums) on a specific/general area on a model. It would be anywhere from 4-80 .stl files a batch and after the modification if possible have the updated version saved as a .stl

    example:

    https://gyazo.com/5d185c01214efc1080cd0fc5eaee6db6

    the two circles are a .dxf file and anywhere in that general location would be alright,

    it would need to grab the file name in this example it would be 20-2345 U5.stl and apply the string to that general area

    the 20-2345 U5 and the circles would need to be engraved a specific distance (standard)

    and preferably it would rotate the model so the backside that is flat to be against the front plane( like a n shape)

    after which it exports the updated marked model as a .stl into a specified folder

    if anyone could help me or even take a crack at writing it themselves, id be happy to pay a little coin their way for the trouble

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

    What is the name the Java library that removes makeup from pictures?

    Posted: 10 Mar 2020 07:12 PM PDT

    I want to know the makeup removal library, google isn't brining up anything. is there a Java library or Swift?

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

    Is there anyone who regret taking programming as your main thing in university/college?

    Posted: 10 Mar 2020 03:36 AM PDT

    Say the reasons you regret/dont regret , im just curious , thanks :)

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

    No comments:

    Post a Comment