• Breaking News

    Monday, September 16, 2019

    Anyone else learning programming to fill the time at a boring desk job? learn programming

    Anyone else learning programming to fill the time at a boring desk job? learn programming


    Anyone else learning programming to fill the time at a boring desk job?

    Posted: 15 Sep 2019 03:18 AM PDT

    Instead of squandering the hours of downtime at my bs job on mindless Redditing , I'm learning to code. Going great so far, and I get hours of practice every weekday,

    It's like a reverse bootcamp, where I'm being paid to learn development.

    Can't believe I didn't think of this sooner.

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

    Help with C++ homework CONFUSED!

    Posted: 15 Sep 2019 08:25 PM PDT

    Hi, I am having trouble with my C++ programming class that I am taking at my college. This is my first assignment and I am very confused on what to do. I tried reading the textbook required for the course but I find it not very helpful on what or how to do the assignment. This is basically what is required but I am having trouble starting out. I am not a newbie to computers but I am to programming and it is so confusing it is stressing me out! lol :( basically this is what is being asked to do can someone please help me understand this. I would very appreciate it! basically I am stuck on the Pseudocode I have no clue of what to do.

    Assuming the ocean's level is currently rising at about 1.1 inches per year, write
    a program that displays the following calculations (your program calculates this, you do not precalculate this and hard code it):

    • The number of inches higher than the current level that the ocean's level will be in 3 years.
    • The number of inches higher than the current level that the ocean's level will be in 6 years.
    • The number of inches higher than the current level that the ocean's level will be in 11 years.

    To be submitted:

    • Pseudocode of your program design.
    • Flowchart of your program design using draw.io.
    • C++ source code file (.cpp file) of your program.
    submitted by /u/GioG1993
    [link] [comments]

    How do you learn to make things simpler instead of more complicated?

    Posted: 15 Sep 2019 06:56 PM PDT

    A lot of problems I'm working on (like problems in an MOOC) seem to be complex when I know realistically there's probably a fairly simple answer; it's just that my level of understanding requires that I make a more convoluted, yet easier to follow program. i.e. a lot more is happening in the code that I can follow instead of the code being simple yet very intangible.... if that makes sense? How do I get to the point where I can think through a problem in a much simpler way rather than making overly complicated (and probably redundant) code?

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

    Is there a library that can emulate HID input?

    Posted: 15 Sep 2019 09:24 PM PDT

    I am looking to make a program that simulates a gaming wheel's wheel using the angle of a thumbstick on an Xbox One controller. I have already executed that concept but for a thumbstick-angle-controlled combination lock.

    Simply put, if I could handle the HID packets from my controller, map them to different values and show those values to the system as if it was the controller. Sort of like a MITM thing where I alter the HID packets the system sees.

    At this point I am looking for a library in any mainstream language, preferrably C++, that works on Windows, and is able to output custom HID, DirectInput, or Xinput packets into the system as if it was an actual device, like how Steam, and JoyToKey does, and does it with minimum latency.

    Sorry if I am missing something and if the answer turns out to be right under my nose. At any rate, I would like to see your suggestions for libraries or software like that. Thank you in advance!

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

    Android Development

    Posted: 15 Sep 2019 09:03 PM PDT

    I learnt C on my own about a year ago, and it didn't take much time since C is such a small language. Then I became busy with college stuff and couldn't really find time for programming. Now I'm free and I've started learning Java and it's going pretty smoothly since my experience in C is helping me with basic stuff like loops etc. However Java is a much bigger language so I wanna know how much of Java is necessary to learn (I wanna get into Android development). I've already learnt a lot about OOP like inheritance, interfaces, abstract classes etc. But the standard library is way too big and learning about it all would take some considerable amount of time. Also after I've learnt Java, how should I get started in Android development ? Any resources, tutorials etc. will be highly appreciated. I know this post is waayyy too much long LoL but thanks for reading!

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

    Computer science in Chinese, how does it work?

    Posted: 15 Sep 2019 08:05 PM PDT

    How do you do it? Wake up everyday knowing you are fighting a losing battle? This is basically the story of my life. I am a 21 year old foreign student in China. A little back story, i loved computers since my time in high school, and I can't remember wanting to do anything else in my life. I wanted to do cs back in my country but my grades were not good enough so instead i got into math and computer science.After a while I got a scholarship to China and i finally a chance to choose cs as a course.

    I just started my cs major recently after a year of language and another year of doing common courses.

    I started learning python and django during my summer holiday, it was interesting and tough at the same time. But getting some programs to work, that has been the best feeling i've had in my life.

    I knew starting this course was not going to be easy, but i started it anyway. However, the shock i experienced the past few weeks in class, can't be expressed well enough in words. Being in the same class as the chinese who seem to have been programming their entire lives, and who are way smarter than me in every aspect. But the worst part is i can't seem to get anything in any of my classes, all the lectures being in Chinese of course.My chinese is okay but it isn't good enough, i realize that now.

    I've thought of dropping out of school so many times in the past month than i ever thought i would in my life. I don't know what to do, continue going for classes which don't add much value to my life at the moment or start learning by myself. Because i can't figure out how to make both of them work.

    Thinking about all this has been driving me crazy for the longest time and this is why i decided to post this here today. All this makes me think of maybe i'm not cut out for all this, because i end up doubting myself and that is the worst feeling to wake up to everyday. I want to stick with this till the end, but I need some help to figure out how to this.

    So how does it work, studying a major in a foreign language, specifically computer science, how do i do it? I don't want to quit before giving it everything i've got, but at the moment ,it is just not good enough. Thank you for reading this, I'll appreciate all the responses and the time you take to read this.

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

    Math.pow

    Posted: 15 Sep 2019 07:26 PM PDT

    Hi, I'm new to programming, I am taking a class in c# programming and was trying to write my program but I can't figure out the math.pow function. The program is supposed to calculate compound interest but I can't figure out how to use math.pow can someone help me figure it out?

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

    [javascript] How can I automate a particular task thats part of my job? It's so damn repetitive and so simple, there's got to be a way.

    Posted: 15 Sep 2019 08:13 PM PDT

    So basically I work as part of the tech operations team for the local courts.

    Every morning we have to email the judges associate, we have to state the name of the relevant mater, state the location and ask for the names of everyone appearing in that matter. We then need to take that information and put it into the monitoring software.

    I'm happy to send pictures of the whole process if anyone is interested.

    If I can successfully do this I'm guaranteed to save the business money which I know would be a huge milestone for me and my resume!

    Thanks in advance!

    Ps I'm still fairly fresh to programming and only know the basics but am keen to stretch my knowledge further!

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

    Which of these languages is the most useful in the real world?

    Posted: 15 Sep 2019 11:55 PM PDT

    For my maths masters I have the option of using Octave, Matlab, C or C++ for a project on stochastic differential equations. As a relative newbie to coding and not having any experience in the workplace, which of these languages would be the most desirable?

    Thanks in advance.

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

    Where can I find a full HTML&JavaScript template covering these processes.

    Posted: 15 Sep 2019 11:53 PM PDT

    Basic html with input fields and submit buttons.

    Pure JavaScript function with ignition function and data collection and storage in a local array.

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

    nullPointerException

    Posted: 15 Sep 2019 11:51 PM PDT

    At line 14 it show nullPointerException

    package Assignment2;

    import java.util.Scanner;

    public class LinkListAssignment {
    Node start;
    LinkListAssignment(){
    start = null;
    }
    public void insert(int data){
    boolean LINKED = false;
    Node linked = new Node(data);
    if(start == null){
    start.head = linked;
    start.tail = linked;
    LINKED = true;
    }

    if(!LINKED) {
    System.out.println("INSERT - start | end");
    switch (new Scanner(System.in).next()) {
    case "start":
    Node temp = start.head;
    start.head = linked;
    start.head.next = temp;
    break;
    case "end":
    start.tail = linked;
    start.tail.next = null;
    break;
    }
    }
    }
    public void delete(int index){
    Node save = start;
    int count = 0;
    while(start.next != null){
    if(count == index){
    start = start.next;
    }
    start = start.next;
    count++;
    }
    start = save;
    }
    public void display(){
    Node point = start;
    while(point.next != null){
    System.out.println(point.data+"-->");
    point = point.next;
    }
    }

    }

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

    Too many resources confusing me

    Posted: 15 Sep 2019 11:47 PM PDT

    There are just too many resources, courses, tutorials & books MOOCs (edx, Coursera & Udacity) on the same topics eg. Intro to Computer Science (CS50, then there are MIT & Berkeley's intro to computer science courses) which confuses me. There are even 2-3 roadmaps/curriculum like teachyourselfcs and OSSU. Where do I start? If I have to follow single university's online course/moocs which should it be? How does MIT's courses compare to Berkeley's? I am sorry about asking this but I get confused easily and there are tons of resources. If I have to choose only 1 course on each computer science subject of a bachelors degree what should they be?

    What I want:

    1. Roadmap/Curriculum to follow (Berkeley's, OSSU, Teach Yourself CS, Designed my own degree etc. )
    2. Single course on same topic like only 1 from CS50, MIT's 6001x or Berkeley's intro course
    3. How not to get confused and concentrate more on learning CSE & programming

    What I want to learn:

    1. Languages: C, Python, Java & at least 1 functional language.
    2. Computer Science topics like Algorithms, OS, Compilers, etc.

    I am not interested in Web or App development. So basically I am talking about learning Computer Science courses through MOOC's or other free resources and curriculum from single source only.

    I am sorry for grammar, poorly asked question and other mistakes. I just wanted to clear my doubts.

    Edit: Yes I have already read the FAQ

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

    [Homework] Program that takes an input c string, counts vowels and consonants, and allows user to input as many strings as they want. When I attempt to input a second string, it simply keeps asking for another string over and over. Professor has seemingly impossible restrictions.

    Posted: 15 Sep 2019 07:27 PM PDT

    Hey guys, been stuck on this for a while and I could really use some help. This is for a C++ class Im taking, with the worst rated professor at my college.

    Here is my main function. My other functions all work.

    int main() { // variable declarations const int size = 281; // limit of characters that will be allowed for string, 280 is max limit for characters in one tweet + 1 for null char userInput = '0'; // choice selection char, initialized to 0 as place holder char string[size]; // c-string array that will be inputted by user char* ptr;// pointer that will point to string array ptr = string; cout << "Enter a string: "; // asks for user input cin.getline(string, size); // inputs user string. cin.getline works with c-strings, std::getline for C++ string objects do { // presents menu for user options cout << endl; cout << " A) Count the vowels in the string" << endl; cout << " B) Count the consonants in the string" << endl; cout << " C) Count both vowels and consonants" << endl; cout << " D) Enter another string" << endl; cout << " E) Exit this program" << endl; cout << " Enter A, B, C, D, or E. " << endl; cin >> userInput; // user makes menu option selection userInput = tolower(userInput); if (userInput == 'a') { cout << "The string has " << countVowels(ptr) << " vowels." << endl; } else if (userInput == 'b') { cout << "The string has " << countConsonants(ptr) << " consonants." << endl; } else if (userInput == 'c') { cout << "The string has " << countVowels(ptr) << " vowels and " << countConsonants(ptr) << " consonants" << endl; } else if (userInput == 'd') { cout << "Enter a string: " << endl; cin.getline(string, size); } } while (userInput != 'e'); 

    When I choose option D, it will just continue to ask for a new string instead of allowing me to continue to operate on that string.

    Here is my output.

    I realized that in my d loop, it does not ask for a user input again, so I tried to add another cin statement and that did not work either.

    I realize that switch and break statements would work here, but this is where my professors ridiculous restrictions come into place.

    These are the restrictions. Violating any will result in an instant 0, which would drop my grade almost 2 full letter grades.

    Id really appreciate any help, as this is driving me insane.

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

    is this how gcc supposed to work?

    Posted: 15 Sep 2019 10:58 PM PDT

    In visual studio code, when compiling I have to open the terminal, make a directory, compile, then it creates and executable. I have to do all of this in the terminal. I feel like I installed something wrong, shouldn't there be like an arrow to press on the top right corner?

    I have another question: When I create a file in codeblocks it creates bin and obj folders in the code directory. How do i generate there folders with visual studio code?

    submitted by /u/46_75_63_6b_20_6d_65
    [link] [comments]

    C: check if a file is of a certain format?

    Posted: 15 Sep 2019 06:37 PM PDT

    I'm asked to open this binary file and verify that its header is of the right format (elf or Executable and Linkable Format ). The format is in hex, but the file is in binary, so what I'm gonna do is check if the contents of the file match the format it was given. Am I doing this right? I want to make sure because this stuff is so abstract to me.

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

    Does anyone deal with severe interview anxiety? It’s preventing me from getting a job.

    Posted: 15 Sep 2019 11:42 AM PDT

    I'm getting destroyed in technical interviews due to anxiety. Usually all I need is just a bit of space and time to myself to read through code and get a handle on the requirements, and polish my approach. Sometimes I need to diagram things out before I jump into code. I like to talk through things, discard approaches that don't work, challenge my assumptions, ask questions, google details I might be fuzzy on before I ever write a LOC.

    Unfortunately, that's not the way things work.

    The process of having to program in front of someone who is judging and critiquing every decision I make in the moment is extraordinary stressful. Sometimes I have to work on a remote machine or a coworker's computer whose setup is unfamiliar. Other times I'm being watched remotely. Sometimes I'm encouraged to talk through my thought process but then when I speak contemporaneously interviewers take my thoughts too literally.

    All of this doesn't bring out my best work. I trip over my words, I make dumb errors and I blank on basic concepts that I know that I know. I can see the frustration, skepticism, and impatience build in the interviewer, compounding the anxiety.

    What comes across is some who is incompetent and worse, a liar who says he can do things he can't. Please tell me I'm not the only person that deals with this problem. I don't really know how to fix this.

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

    (Python) Creating new list that auto populates from popped indexes?

    Posted: 15 Sep 2019 05:57 PM PDT

    Very new to learning python, was hoping someone could point me in the right direction.

    Im trying to write a list that populates values from indexes popped from another list. Couldn't find anything on Google easily, so hoping someone has done experience with this. Thanks in advance!

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

    How CPU know that, a process is CPU Bound or I/O Bound?

    Posted: 15 Sep 2019 08:46 PM PDT

    How long term scheduler knows or (what mechanism detects that), a process is CPU Bound or I/O Bound?

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

    [C++] - Error: declared void

    Posted: 15 Sep 2019 08:41 PM PDT

    Hello, the full error message is

    error: variable or field 'opt1' declared voidvoid opt1(ifstream &inputFile, RentalCars cars[5]);

    I have no idea what the problem is, i've been staring at my screen for about an hour.

    Prototype:

    void opt1(ifstream &inputFile, RentalCars cars[5], RentalAgency company[3]); 

    Definition:

    void opt1(ifstream &inputFile, RentalCars cars[5], RentalAgency company[3]){ char fileName[25]; cout << "What is the input file? (e.g. fileName.txt): "; cin >> fileName; cout << endl; inputFile.open(fileName); //error check if (inputFile.fail()) { cerr << "Error opening file!" << endl; cerr << "Please restart the program."; } else { cout << "Sucess! Opening your file " << fileName << " and storing data" <<endl; } //read and print file data while(!feof(fileName)) { for (int j = 0; j < 3; i++) { inputFile >> company[j].p_name >> company[j].p_zipcode >> endl; } for (int i = 0; i < 5; i++) { inputFile >> cars[i].year >> cars[i].make >> cars[i].model >> cars[i].price >> cars[i].available; } } cout << "Data has successfully been stored." << endl << endl; } 

    Main Function:

    int main(int argc, char const *argv[]) { int menuInput = 0; RentalAgency company[3]; RentalCars cars[5]; ifstream inputFile; ofstream outputFile; do { switch (menuInput) { displayMenu(); cin >> menuInput; switch(menuInput) { case 1: opt1(inputFile, cars, company); break; // case 2: // opt2(inputFile, cars); // break; // case 3: // opt3(inputFile, cars, outputFile); // break; // case 4: // opt4(inputFile, cars); // break; // case 5: // opt5(inputFile, cars); // break; // case 6: // opt6(inputFile, cars, outputFile); // break; // case 7: // outputFile.close(); // inputFile.close(); // return 0; // break; default: cout << "*Error* Please enter a valid option." << endl; break; } } } while(menuInput != 7); return 0; } 

    Pastebin: https://pastebin.com/jDzRbiRF

    Any help would be greatly appreciated, thank you

    Edit: added pastebin

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

    Start learning to code through Minecraft then expand?

    Posted: 15 Sep 2019 04:33 PM PDT

    I'm a 17 year old in my senior year of High-school. I want to go into computer science or computer engineering. I hear there's a decent amount of coding involved and I have no coding experience what so ever. I was wondering if it was a good idea to do that Minecraft Education thing that teaches how to code. Then from there I could pick up other coding languages. Does that sound like a good idea? Or should I just start a solid coding language?

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

    New to ASM. Please help

    Posted: 15 Sep 2019 08:06 PM PDT

    Hi, I'm working on a x86_64 . I'm having trouble declaring an array of defined integers. I need this array to pass 4 of these integers to conduct arithmetic for example (wx)-(yz). I'm am struggling hard and any help/code examples would help tremendously. Thank you

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

    What Java 3D rendering libraries do you recommend?

    Posted: 15 Sep 2019 07:58 PM PDT

    I'm making an 3D "editor" type program in Java, and I need to have a 3D view where the user can view and manipulate a series of models (not editing the models themselves, but positioning them relative to each other). I would rather not code all the 3D rendering code myself, so I'm looking for a library that has basic polygonal 3D rendering, but doesn't have all the extra bits that a game engine like JMonkeyEngine does. Does anyone have any suggestions?

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

    What's the name for saving web stuff to user browser?

    Posted: 15 Sep 2019 07:53 PM PDT

    I've been looking for the name on how to save current web customization locally to user browser and I don't know the name and technique. Is there a name for it? Thank you.

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

    How do I handle a git commit message when I'm not entirely sure how to say what I did?

    Posted: 15 Sep 2019 07:49 PM PDT

    Sometimes I'm just messing around, and found something cool that works, I just have no clue what exactly I just did. Others I am following a tutorial and only have a vague notion of what is going on. I put nearly all of my code on GitHub mostly because I switch a lot between my laptop and PC, and want a convenient way of grabbing the code and continuing when I don't have my PC with me. So... What exactly do I do when I come to something I don't entirely understand, or have a concise way of putting what it is I did?

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

    No comments:

    Post a Comment