• Breaking News

    Tuesday, November 21, 2017

    How long do you think it would take to be a good enough programmer to make $70,000 a year doing it? Ask Programming

    How long do you think it would take to be a good enough programmer to make $70,000 a year doing it? Ask Programming


    How long do you think it would take to be a good enough programmer to make $70,000 a year doing it?

    Posted: 21 Nov 2017 07:04 PM PST

    If I bust my ass off and study and do this shit every day for 5 hours for an entire year so you think I could be good enough to get a job offering that much money?

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

    If the FCC removes net neutrality rules would cloud providers like AWS or Azure be able to provide services that give their users equal footing?

    Posted: 21 Nov 2017 06:57 PM PST

    The FCC votes on a measure to slash net neutrality rules on December 14th. If that were to go through (which it hopefully doesn't, but honestly I'm skeptical that they will favor the view of the citizens over the corporate interests) I'm wondering if cloud providers like AWS and Azure would be able to use their bargaining power, as huge corporations, to give requests from their virtual server instances a higher level of priority. What are your thoughts?

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

    Programming with ADD/ADHD

    Posted: 21 Nov 2017 09:14 PM PST

    I wanted to get anyone with experience's thoughts/tips on programming with ADD/ADHD. I am an adult and love programming and think I'm pretty good at it but have not completed any major projects over the past 10 years because I always get sidetracked and start a new project.

    The trap I always fall into when starting up a new project is to begin really gung-ho, then as soon as the project starts to come to life I get bored with it. Or not necessarily bored but I'll start learning some new technology for the project and think "that's really interesting" and want to learn more about that. I'll order a bunch of books, get halfway through one and find something else interesting. And I'll keep going down this rabbit hole until I wind up wanting to be Alan Turing himself, realize that's not possible, and start all over again with a new project.

    Does this happen to anyone else and do you have any advice for me that has helped you stay focused on projects to completion? I have never taken any meds but am considering seeing a doctor about some. So any experiences in that realm are also welcome.

    Thanks in advance!

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

    Can't quite get my code in a way that will make it work. It's close though. c

    Posted: 21 Nov 2017 09:09 PM PST

    I'm working on making a timer using signals. I'm currently focused on the "timer_create" and "timer_settime" APIs. All I need is to put the timerspec and mysignalEvent information in a struct inside of the function. Can't figure it out...

    https://pastebin.com/2yqPHq7m

    You have no idea how long this has gotten me stumped ...

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

    How would I malloc a special amount of memory (148 bytes) for a typedef structure.

    Posted: 21 Nov 2017 06:54 PM PST

    typedef struct threadinfo{

    } ThreadArgs;

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

    How do most online forums work?

    Posted: 21 Nov 2017 07:29 AM PST

    I'm laying out the framework for starting a web project, and I think that it shares a great deal of common genes with web forums. I'd like for it to store group text conversations accessible by account; certain threads won't show up for people not involved.

    Does anyone have any resources for learning about how something like that typically works, from a front-end/back-end perspective?

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

    Trying to pass a struct into a thread, then the thread passes that struct into a function. c

    Posted: 21 Nov 2017 06:00 PM PST

    Not sure why this is telling me it's the first time seeing the "thread info" struct.

    https://pastebin.com/F0bpvq8L

    thanks

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

    How do programs generate fake followers, likes, etc. on social media?

    Posted: 21 Nov 2017 05:53 PM PST

    I often see programs for fake followers, likes, listens, etc. advertised. I am aware that, although they may not actually be beneficial to the account, they do generate the desired (and paid for) services. How do they do this, where do they get the accounts? I can't find an article related to the question. Thanks.

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

    Operating Systems Help: Disk Allocation Methods

    Posted: 21 Nov 2017 05:12 PM PST

    I don't know how to do this project. The description is below:

    This project will simulate disk allocation methods.

    The project will allow the user to choose an allocation method from among the three presented in the textbook. It will allow the user to perform disk operations on a simulated disk.

    The disk will consist of 256 blocks of 512 bytes each. The first block is for the file allocation table. The second block is a bitmap for free space management. The remaining blocks hold data for the files.

    Storage for the disk should be kept in an array. The disk should be its own object with a set of public methods to use it. A disk only knows how to read and write blocks by block number.

    File names should be allowed up to at least 8 characters. The maximum file size should be 10 blocks. Files are assumed to be at the root level, and subdirectories are not supported.

    A user interface should be written to interact with the disk object and to support the menu options shown below. It is the interface that implements most of the processing, the disk is just a storage device.

    The simulation should allow the user to choose the allocation method to use when the simulation begins, either through a menu or as a command line argument. For the chained and indexed allocations, a free block should be randomly chosen. For a contiguous allocation, choose the first contiguous set of blocks large enough for the request.

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

    Need help adding and reducing fractions

    Posted: 21 Nov 2017 05:02 PM PST

    include"hw3functions.hpp"

    include<iostream>

    include<string>

    include<cstdlib>

    using namespace std;

    int main() { char pick = ' ';//variable that determines user choice for addition or subtraction char keepGoing;//variable that determines to continue or quit do { while (pick != 'Q') { system("cls");//clear console showMenu(pick);//to menu switch (toupper(pick))//reinitializes value in upper case { case 'A': add(); break; case 'S': subtract(); break; case 'Q': system("pause"); return 0; break; default: break; } }

     cout << "\nDo you want to do more addtions? (Y/N): "; cin >> keepGoing;//used to determines if user wants to continue with program keepGoing = toupper(keepGoing);//reinitializes value in upper case } while (keepGoing == 'Y'); system("pause"); return 0; 

    }

    *****FUNCTIONS*******

    include<iostream>

    include<string>

    include<cstdlib>

    using namespace std;

    //Prototypes void GetRational(int& num, int& den); void AddRational(int& anum, int& aden, int num1, int den1, int num2, int den2); void SubtractRational(int& anum, int& aden, int num1, int den1, int num2, int den2); void reduce(int& num, int& den); void DisplayRational(int num, int den);

    //Displays Menu void showMenu(char& pick) { cout << "Rational numbers calculator\n"; cout << "\n(A)ddition\n"; cout << "(S)ubtraction\n"; cout << "(Q)uit\n"; cout << "\nEnter your option: "; cin >> pick;//stores user's pick

    return; 

    }

    //Used when user picks Addition void add() { int num1, den1, num2, den2, anum, aden;//variables used char goingAdd;//variable used to continue addition

    do { system("cls");//clear console cout << "Addition of rational numbers\n";//title GetRational(num1, den1);//calls function to get 1st fraction GetRational(num2, den2);//calls function to get 2nd fraction AddRational(anum, aden, num1, den1, num2, den2);//calls function to process addition cout << "\nThe result of " << num1 << "/" << den1 << " + " << num2 << "/" << den2 << " = "; DisplayRational(anum, aden);//displays result cout << "\nDo you want to do more additions? (Y/N): "; cin >> goingAdd;//stores user's choice goingAdd = toupper(goingAdd);//makes choice uppercase } while (goingAdd == 'Y'); return; 

    }

    //Used when user picks Subtraction void subtract() { int num1, den1, num2, den2, anum, aden;//varibales used char goingAdd;//variable used to continue subtraction

    do { system("cls");//clears console cout << "Subtraction of rational numbers\n";//title GetRational(num1, den1);//calls function to get 1st fraction GetRational(num2, den2);//calls function to get 2nd fraction SubtractRational(anum, aden, num1, den1, num2, den2);//calls function to process subtraction cout << "\nThe result of " << num1 << "/" << den1 << " - " << num2 << "/" << den2 << " = "; DisplayRational(anum, aden);//display result cout << "\nDo you want to do more subtractions? (Y/N): "; cin >> goingAdd;//stores user's choice goingAdd = toupper(goingAdd);//makes choice uppercase } while (goingAdd == 'Y'); return; 

    }

    // This function shows the prompt Please enter a fraction (n/d): , gets the values // from the keyboard and returns them to the caller. Since the division operator (/) // is read in along with the numbers the function must read and discard it. // This function must reject a denominator equal to zero. void GetRational(int& num, int& den) { string top, bot;//used to hold numerator and denominator

    cout << "\nPlease enter a fraction (n/d): "; getline(cin, top, '/');//used to store everything before '/' or everything in line, cin >> bot;//used to store info after '/' num = stoi(top);//string to integer and stores in variable num den = stoi(bot);//string to integer and stores in variable den while (den == 0)//determines if zero in denominator and asks again for fraction { cout << "\nSorry, division by zero is not allowed!\n\n"; system("pause"); cout << "\nPlease enter a fraction (n/d): "; getline(cin, top, '/'); cin >> bot; den = stoi(bot); } return; 

    }

    // num1, den1, num2, and den2 are provided by the caller. // anum and aden are calculated using the formula shown above and returned to the // caller after they are reduced. To reduce the fraction this function must call // the function reduce(anum, aden). void AddRational(int& anum, int& aden, int num1, int den1, int num2, int den2) { anum = (num1 * den2) + (num2 * den1);//used to get 1st and 2nd fraction sum aden = (den1 * den2);

    reduce(anum, aden);//calls function to reduce sum of 1st and 2nd fraction return; 

    }

    // num1, den1, num2, and den2 are provided by the caller. // anum and aden are calculated using the formula shown above and returned to the // caller after they are reduced. To reduce the fraction this function must call // the function reduce(anum, aden). void SubtractRational(int& anum, int& aden, int num1, int den1, int num2, int den2) { anum = (num1 * den2) - (num2 * den1);//used to get 1st and 2nd fraction difference aden = (den1 * den2);

    reduce(anum, aden);// calls function to reduce difference of 1st and 2nd fraction return; 

    }

    // num and den are provided by the caller. // num and den are reduced according to the algorithm explained below and returned to // the caller. void reduce(int& num, int& den) { // num and den are provided by the caller. // num and den are reduced according to the algorithm explained below and returned to // the caller. int remain; int gcd; remain = num%den; while(remain != 0) { num = den; den = remain; remain = num%den; } gcd = den; num /= gcd; den /= gcd;

    }

    // num and den are provided by the caller. // The numbers are shown in the form num/den unless den is equal to 1, in this case // only the numerator should be displayed. void DisplayRational(int num, int den) {

    if (den == 1)//catches if den is equal to 1 { cout << num << endl; } else if (num == 0)//displays 0 if num equals 0 { cout << num << endl; } else { cout << num << "/" << den << endl;//if above exceptions are not found program displays } return; 

    }

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

    Standalone layout viewer / editor for Android?

    Posted: 21 Nov 2017 02:58 PM PST

    Hey!

    So, I currently do most of my java programming in Vim w/ heavy use of plugins. I have used IDEs in the past (idea & android studio), but they're SUCH a memory hog I just can't fit it into my workflow - with just idea + firefox open + maybe a server I'm at 100mb memory left:(

    My vim setup currently works great for normal java, but for android I seriously miss being able to 'preview' the layout from XML.

    Is there any way to have this preview functionality, without the hilarious baggage you get with a more traditional IDE? (i.e. I want to be able to write some layout XML, then see what the result looks like)

    Thanks!

    P.S.

    To be clear, I don't care about visual EDITING of the layout, I just want to see what some XML produces.

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

    Self-learning Future Programmer Looking For The Right Career Path For a "Certain" Job (I Was Chosen For a Google Frontend Scholarship)

    Posted: 21 Nov 2017 08:45 AM PST

    Hi, everyone.

    I am a Nordic BBA graduate but my degree didn't land me a job so I thought I'll self-learn myself into the programming field. I know HTML and CSS pretty well and about to start JavaScript. I got a Google Scholarship that I am planning to finish https://www.udacity.com/google-scholarships. I have lived around the world so freelancing interests me (but I prefer an office job in the long run) and working in Asia, Europe and North America.

    My interests are in:

    • Web development (front- and backend)

    • Mobile app developement

    • Other software development also

    • Not limited to above (I try to avoid raw math because that is not one of my interest)

    My priority is to study a skillset asap that leads to a job. After that I can learn more languages and switch to something else if I want to. Now I want to get an income.

    What career paths and languages would you guys recommend and how long would it take for me to land my first job/freelance gig? A "certain" job that is fast to self-learn. I hope my question isn't too naive.

    Tl;dr What jobs + what languages + how long time = "certain job"

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

    Can't write a u_char to a file descriptor in C, invalid argument

    Posted: 21 Nov 2017 02:43 PM PST

    I have two things which straight up don't work. Quite over my head in C though I'm very familiar in much higher level languages.

    If I call write(tun_fd,"AAAA",4) everything works fine, I see it on the other end.

    If I do (not the same data, but that's not the point):

     char p[] = {0x11,0x22,0x00}; if (write(tun_fd,p,3) != 0) { perror("write"); } 

    I get an invalid argument error at run time.

    I don't know why this doesn't work since write is defined as write(int fd, const void *buf, size_t count);. My understanding is that p really is just a pointer (to a datatype of char) and so this should work just fine.

    In essence my question is this: how do I take a type of const u_char * and write it?

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

    Programming Gift Ideas for a Kid

    Posted: 21 Nov 2017 04:24 AM PST

    Yesterday I asked my sister what her three boys want for Christmas. This is what she sent me in regards to her oldest who is 7. "He wants math workbooks believe it or not lol. He is also getting into coding and loves it so if you find anything for his age like that, that would be cool."

    What are some good gift ideas for a 7 (soon to be 8) year old? If you ask my nephew what he wants to be when he grows up, he'll tell you something to do with cars or math. The desire to learn is there, and I want to encourage him. I know they make kits and toys for kids, but I want to stay away from them because he is still a 7 year old and he'll lose or break it. Plus his 4 year old brother is in that phase where he has to have and do the exact same thing as his older brother, or he'll get mad.

    I've found a ton of books online, but I don't know what's good and what's not. Any suggestions would be appreciated. Thank you.

    TLDR My 7 year old nephew wants math workbooks and things about programming for Christmas. What get?

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

    Could we have an IRC, Matrix, slack or something similar to chat on?

    Posted: 21 Nov 2017 01:01 AM PST

    It'd be nice to have some real-time responses in case some people are willing. I for one wouldn't mind devoting some of my offtime. Maybe others have the same sentiment.

    That could be plastered onto the sidebar.

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

    Can someone explain what a threads "mask" is and what is its function? c

    Posted: 21 Nov 2017 12:18 PM PST

    I am working on an assignment that involves linux signals and multithreading in c. This is a key component but I can't quite grasp it. Here is exactly what he said in the assignment PDF for further clarification:

    Every thread has a mask defining which Signals it wishes to block. A thread inherits this mask from its parent but can change its mask at any time by calling "pthread_sigmask" (For non-multithreaded applications, use "sigprocmask"). Blocking a Signal, just means that the Signal will not be delivered to the thread that has blocked it. It does not stop a sender from sending the Signal. A signal that is generated but not delivered is said to be in the "Pending" state.

    Might be obvious to some, but I am totally lost.

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

    If one wants to learn programming as a hobby, and MAY need to use it professionally in the future in regards to data analysis, which one should I learn of these 4 languags? Python, C#, Java, C++.

    Posted: 21 Nov 2017 05:41 AM PST

    Me:

    1) I want to learn a programming language, primarily as a hobby, 2) but I may also need to use it in the future due to some data analysis (I'm studying economics, with some interest in statistics and finance....) 3) I have some previous experience scripting in R and SAS, so I am somewhat experienced with programming logic. 4) I don't intend to learn more than one programming language (unless I get seriously hooked), so please don't give answers such as "learn X then Y".

    Which one should I learn of the following 4? What are the pros, and cons?

    Python C++ C# Java

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

    Where to learn Machine Learning?

    Posted: 21 Nov 2017 07:15 AM PST

    I've been programming for a few years. I don't do anything specifically, I just make whatever I am interested in at that time.

    Recently I've wanted to start getting into AI and machine learning. I've looked at example code and the code itself isn't too complicated for me. However, I am having troubles finding a place that teaches how to write code for AI and/or Machine Learning.

    Does anyone know of a good website, YouTube video, book, and so on, that would help me learn?

    Thanks!

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

    What's a good book that teaches introductory programming using Python to other academics?

    Posted: 21 Nov 2017 07:00 AM PST

    What's a good book that teaches introductory programming using Python, aimed at other academics?

    By introductory, I mean the book should not assume that the reader is an established experienced programmer who's just looking to pick up the syntax of another language. It should be largely self-contained.

    By programming using Python, I mean that while teaching Python and its syntax and programming style, the key focus of the book should be on teaching advanced programming concepts, such that, after having finished the book, the reader is capable of more than just using Python as a glorified calculator.

    By aimed at other academics, I mean that the book should not be aimed at laypeople who have zero experience with coding and the logic that underlies it. For example, a mathematician is well aware what a function is, or how logic works. Those concepts do not need to be spelled out. The book should not be light on theory and complicated concepts. It shouldn't be a "popular science"-type book. Introductory, yes, but still formal, to-the-point, and highly educative for the ambitious reader.

    Is there such a book for Python?

    If not, are there several books, which, if read in some order, or simultaneously, which are suitable for my needs?

    My goal is to become a proficient multi-purpose programmer in Python, with a primary focus on machine learning and data mining.

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

    Encryption

    Posted: 21 Nov 2017 06:35 AM PST

    Hello everyone!

    • What do you think about encrypting informations into photo through image processing?

    Here is my repo of Image Cipher written in Java: https://github.com/SKocur/Image-Cipher

    • Do you have any ideas what I can improve or add to this software?

    Regards

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

    Help with Java and Text Input

    Posted: 21 Nov 2017 09:54 AM PST

    Hello, I'm new to programming and I need some help with some college activities. My problem is: I have an input .txt file like this:

    "ABC
    2
    DEF
    5
    GHI
    3
    ...
    " and I need to generate a html file like: "
    POS 1: DEF 5
    POS 2: GHI 3
    POS 3: ABC 1

    " That's it. Thanks for your attention.

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

    DB entry -> REST API call and back

    Posted: 21 Nov 2017 01:21 AM PST

    Hello Folks,

    I wonder if you could point me in right direction how I should go about solving this problem:

    I get a few hundred database entries every day and I would like to make a REST API call with every single entries' data. This should run indepently on a server. Then I would also like to make a REST API call every few hours and copy newly generated data from another existing system over into my database.

    I tried Zapier, but their new pricing tiers are to expensive, as every single transformation step in the data (like caps) is counted towards your accounts quota.

    Thanks for any ideas how to set up (platform, helpful libraries,...) such a system!

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

    Hoping for guidance with Nodejs/electron

    Posted: 21 Nov 2017 05:04 AM PST

    A friend and I are building an app for work in our spare time, and are using electron to try to keep things simpler. The question I have, and have been very unsuccessful with googling, is how would we create a renderer process without the associated window. a couple things indicated that the window and the process were separate, and one actually mentioned doing it but no explanation of how. Am I just overthinking it, and you just add a hidden window? That just feels a bit... hacky.

    Thanks in advance for any insight, or other suggestions for things that might help in general.

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

    What keylogger should I use to take input for an omnipresent command system similar to system key then typing a search, like any time I push 2 spaces or the right-alt key?

    Posted: 21 Nov 2017 03:31 AM PST

    If necessary it could simply send ALL key presses to the local port, but would be better to check for a certain constant.

    Any time I push 2 spaces, I want it to send a byte to a local port of my custom command interpreter which then grabs focus.

    I might also want to capture all key presses after the 2 spaces until the next enter key (a line) but send to the local port at each key press during that.

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

    No comments:

    Post a Comment