• Breaking News

    Saturday, November 17, 2018

    If you could give a 15 year old advice on what programming languages or technologies to learn to get the best paying career possible, what would you suggest? Ask Programming

    If you could give a 15 year old advice on what programming languages or technologies to learn to get the best paying career possible, what would you suggest? Ask Programming


    If you could give a 15 year old advice on what programming languages or technologies to learn to get the best paying career possible, what would you suggest?

    Posted: 17 Nov 2018 10:39 AM PST

    Detecting duplicat files?

    Posted: 17 Nov 2018 07:40 PM PST

    I manage a records system/archive. Has about 25,000 records.

    The files are named: Lastname, Firstname_SSN4

    That's the last four digits of the SSN, but we don't always have that so sometimes use a placeholder 0000

    Every year a new batch of a few hundred records are added.

    I want to come up with a simple program for finding doubles, but just relying on duplicate exact file names isn't enough, because sometimes women especially change their last name, or we have alternate first names, or even alternate SSNs (or have 0000 in one case and the real number in another).

    Obviously we can't catch everything but I have a pretty good manual process right now using excel. I break the full list of old files into three different lists using the comma and underscore as delimiters to seperate out the constituent elements: one list with just first name and SSN, one with just last name and SSN, and one with first and last name. I do the same for the list of names of the new files and then use excel's identify duplicates feature to find any with same first and last name, same first name and same SSN, or same last name and SSN.

    The idea being that if two out of the three elements match in any given case, it's worth looking into further to see if they're the same person (in which cases the files are combined into one). If a woman changed her last name, she'd still be caught by SSN and first name matching. If first name was provided differently in two cases (say Mike vs Michael), at least last name and SSN may be the same, etc. (I discard any where the SSN "match" is just the placeholder 0000, though, since that's not really a match of course.)

    This is doable with excel, but tedious (generating the lists of file names, separating them out, identifying doubles with highlighting and font color, etc) and, what's more, the process is hard to explain to coworkers who may need to do it for me in the future. I'd rather just have a little program that could run comparing "all files in directory A" (the old files) with "all files in folder B" and report any cases where two out of the three elements (first name, last name, SSN) match between one of the old files and one of the new.

    Any suggestions on how to do this? I'm not a programmer.

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

    Udemy vs Codio and Computer Science Degree

    Posted: 17 Nov 2018 06:27 PM PST

    I'm currently in a college bachelors program for computer science and they use Codio as the main system for teaching. I've always used Udemy to learn code on my own and it's been useful to me. Codio is suppose to make things easier but it doesn't require me to use python on my computer. It inputs different values for the variables I'm working with making it really confusing on what I'm suppose to be defining and not. Considering how cheap Udemy is, is the degree really worth it? I've made some simple apps with Swift and worked with Python without a problem so far. Is it normal to struggle this much with Codio? I need to see the bigger picture to learn I get really confused when they hide and control certain values. I feel like just doing Udemy full time to really learn code instead of struggle with college which uses Codio fully as the educational system, which I guess a lot colleges do now.

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

    Getters and Setters

    Posted: 17 Nov 2018 08:39 PM PST

    Do people have some preference for how to lay out their getters and setters or is it just individual choices? Sometimes I just do all my getters then all my setters, and sometimes I do getters and setters for one variable at a time. Is there some industry standard that helps with organization?

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

    A question about whether writing a program is the best thing to do in this situation.

    Posted: 17 Nov 2018 04:48 PM PST

    Hi Programmers

    Firstly, I apologies in advance for the wall of text here.

    I also apologise for the ambiguous title - but I wanted to make it clear that my post is not about a specific program I am writing currently, but whether writing a program as a solution to the following problem is the best way to go about things.

    I will be starting a new job shortly and I am really excited for it. Mostly of all the JD is exactly what I want to be doing and the kind of work I need to be getting experience to set me up for my career. The only part that I don't like about the JD is that there is a small portion of my role which will basically be downloading medium sized excel spreadsheets from a data warehouse and collating the information.

    Let me try and provide you with an example, and my apologies if it makes no sense but i am trying to make the example as broad as possible and not specific to my actual role so that there isn't any industry knowledge needed.

    Basically, say our company has 200 employees that are all selling our companies products, and there are 10 different products. Whenever an employee sells a product, they receive a commission payment. If the client decides they no longer want the product within a set period (usually 3 years), the commission is 'written back' from the employee, effectively balancing out their commission earned on that cancelled product to $0.

    Each product that they sell is registered in a data warehouse and the variables saved are things like - employee who sold the product, what the product is, the amount of commission that the employee makes, etc. Using pre-saved reports in IBM cognos, I can extract spreadsheets in a pinch (based on whatever variables I input into Cognos). The main report I used is just run on employee code, and shows a line-by-line detail of each and every product sold and the related commission.

    In my industry there is a huge annual 'competition', for lack of a better word, across all employees in the industry, and our head office is huge on being the number one company in the world in this competition. It is based on the commission earned by the employees.

    In my role, I will be expected to track and provide updates regarding every employee's sales and commissions earned.

    Now here is my internal quarrel. So much of my time will be spent just exporting each of the 200 employee reports (or one big one of all the employees which will take too long or time out), and then manually manipulating and collating the total amount of commission earned across each product. I know I can just use pivot tables and the like, but I will have to make it 'prettier' for management and will also need the figures updated on a daily basis.

    To me, it seems like it would be much better to spend a week writing a program where I can just export the 200 files and the program will do the collation and output of the totals across each product and slap some nice UI on it so that management are able to just check it themselves on their side whenever they want and have 'within-24-hour' live data (if I just extract the reports each morning).

    My question is, do you think that writing a program is the best solution in this case? I can imagine that doing it without a program would be ridiculously tedious and monotonous and take away so much of my time from the other tasks my role will require. This just seems like a super easy and simple process and task that will be a time hog - or I could just let a program do all the collation and reporting.

    What are you thoughts?

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

    Ideas for how to detect collisions in my program?

    Posted: 17 Nov 2018 07:32 AM PST

    Hi all,

    I am creating a java program that looks at my pool table to help me pot, currently I can find and mark the position of the white, I also detect the cue and display the line of the cue, so far so good. Now I want to detect the point I will hit the object ball (red ball) what do you think would be the best way to do this? Currently I am thinking check every pixel along the cue line to see when that pixel is red and that would be my collision point, seems like a pretty intensive way of doing it though, does anyone have any other ideas?

    Thanks

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

    Placing overload operators for c++ classes, specifically the << operator

    Posted: 17 Nov 2018 12:23 PM PST

    Web scraping vs commercial API/data feeds for creating a price comparison website

    Posted: 17 Nov 2018 02:35 PM PST

    Let me start by saying I don't know how to code much, I'm very new. Anyway I want to build a website that compares prices similar to yroo.com The first part I need is a catalog of products/images/descriptions and then I need to auto update those prices and inventory every hour or so. I'd start with only about 200k products so it's not to heavy on the scraper. I was considering using a commercial service such as priceapi.com

    Any advice on building a price comparison website?

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

    [Stupid Question] Accidentally hid sidebar containing my project's folders in VS code and can't make it reappear, please help

    Posted: 17 Nov 2018 10:10 AM PST

    • title

    I tried creating new window and reopening the project folder, it stays the same

    EDIT:

    It's ctrl+shift+E or View -> Explorer

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

    After following tutorials on how to build a web application, should I edit the tutorial code to build my own app or should I start from scratch?

    Posted: 17 Nov 2018 04:56 PM PST

    MIPS: When is branching appropriate?

    Posted: 17 Nov 2018 04:49 PM PST

    I keep getting points deducted on assignment because " Each routine should be self contained with a label and a jr. " (this is referring to standard practice, not a particular assignment).

    Here is an example of a procedure.

    #Purpose translates a string to lower case and saves each character to the data location #Accepts: $a0 (string to be converted), $a1 (string to hold conversion) #Returns: $v0 (Number of conversions) toLower: lbu $t0, ($a0) #Checks for the NULL terminator beq $t0, $zero, lowerisNull #if both conditions fail, it is an uppercase character blt $t0, 65, lowernext bgt $t0, 90, lowernext addi $t0, $t0, 32 addi $a0, $a0, 1 sb $t0, ($a1) addi $a1, $a1, 1 addi $v0, $v0, 1 b toLower lowernext: addi $a0, $a0, 1 sb $t0, ($a1) addi $a1, $a1, 1 b toLower lowerisNull: sb $t0, ($a1) jr $ra #<<<<<<<<<<<<<<<<<<JUMPS BACK>>>>>>>>>>>>>>>>>>>>>>>>>> 

    I use the jr when the null terminator is reached, but am I suppose to create the procedure in such a way that every single label contains a jr $ra?

    Its gotten to the point where I just indent the shit out of everything and rename them so that it looks like they are self-contained within the procedure. This means that I am completely discounting entirely reusable labels (lowerisNull could be used to return from my toUpper procedure, but I have to name that "upperisNull").

    Anyone who works with assembly language, is this format appropriate? Or is there something I'm doing wrong.

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

    Help with Raptor Flowchart

    Posted: 17 Nov 2018 03:08 PM PST

    In programming logic 1st semester and using Raptor flowchart. We were told to use it to output a pyramid of x's. We can only output 1 space at a time and 1 x at a time. I've come close to rage quitting this assignment as it sounded very easy but I'm just not getting it. Any help is appreciated.

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

    jquery datepicker help

    Posted: 17 Nov 2018 02:27 PM PST

    I have created a to do list and am using datepicker. I need help so that when someone adds a task and date, the number of days to the task will appear below the task and date

    pls help. thx

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

    C - I have already declared these functions, but it is saying there aren't?

    Posted: 17 Nov 2018 01:32 PM PST

    Here's the code: https://repl.it/@dft95/FantasticPinkDownload

    As you can see it thinks a lot of the functions are undefined when they clearly are not. I defined the prototypes right up top. I know the header has no purpose atm, every time I try to move the prototypes there it freaks out. It's not a spelling problem, or capitalizations... I can't figure out why it's doing this.

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

    I need help deciphering some code I’m not familiar with. Image is enclosed. Any information would be incredibly helpful!

    Posted: 17 Nov 2018 01:21 PM PST

    How do you start working on a personal project? Talking about what kind of software methodologies you use, what steps do you take first and what tools you use.

    Posted: 17 Nov 2018 01:25 AM PST

    I am still a colege student and while I have studied about software methodologies, I didn't really use them in any way until recently when I joined an internship and worked in a team with professional software developers. I want to do my personal projects in a more structured way as well like I did on the internship but I am not sure how to.

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

    In addition to python?

    Posted: 17 Nov 2018 01:05 PM PST

    Complete noob here. My understanding is that it is very difficult to get a programming job with knowledge of only one language. I am in the early stages of learning python, what other languages or knowledge should I pursue to supplement python?

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

    How do I extract single pngs from a spritesheet that contains word indexes and lengths?

    Posted: 17 Nov 2018 12:20 PM PST

    I'm working on respriting a childhood game I loved to play and I have managed to get hold of the sprite sheet. The thing is, it won't open in any photo viewer or notepad properly. With the help of some friends I figured out it's a lot of PNGs pasted together, with a word index and length before each .

    See screenshots here: https://imgur.com/a/xK6qATn

    Now I'm asuming it some sort of binary file type because I cant get any encoding to properly work, so I was hoping someone could help me figure out how to get each png separate.

    Here is the file if it helps: https://file.io/Jd1eqZ

    The game code is in java so it doesn't help me as I cant understand it, but from what I gather it iterates through and creates an image table from the file indexes.

    submitted by /u/covi-amento
    [link] [comments]

    Request for a simple autohotkey script

    Posted: 17 Nov 2018 11:30 AM PST

    I have a mouse that has a scroll wheel, which i click to open links in a new tab. The scroll wheel is absurdly sensitive, but only on the first scroll. Pretty much touching it at all scrolls once, but afterwards it functions normally. This is annoying because I'll frequently line up the pointer, but when i touch the scroll wheel to click the link, the page will scroll, i'll miss the link, it'll middle-click in the blank area, make one of these and then i'll get sent to either the top or bottom of the page.

    I'm hoping someone would be willing to write a script that tells the mouse to ignore the first scroll, but then function normally afterwards.

    on a related note, don't buy a microsoft brand mouse. the damn things have a major design flaw.

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

    In your typical web server app, will it help removing .env file after starting process so database credentials etc will not be accessible at all (if server will be compromised)? Talking about node, python, ruby kind web servers.

    Posted: 17 Nov 2018 10:50 AM PST

    Rock, paper, scissors help

    Posted: 17 Nov 2018 08:30 AM PST

    My code doesn't seem to follow my if statements. For example, if I choose rock and the computer chooses paper, it'll say that ive won. Other times itll say ive tied. And sometimes itll say that ive won.

    import java.util.Scanner;

    public class Rps

    {

    public char getRandom() { String str = "rps"; return str.charAt((int)(Math.round(Math.random()\*2))); } public char getOpponentsMove() { return getRandom(); } public String check(char you) { char opponent=getOpponentsMove(); if ((you=='r' && opponent=='s') || (you=='p' && opponent=='r') || (you=='s' && opponent=='p')) return "Win"; else if ((opponent=='r' && you=='s') || (opponent=='p' && you=='r') || (opponent=='s' && you=='p')) return "Lose"; else return "Tie"; } 

    public static void main(String\[\] args) throws InterruptedException { Scanner kboard = new Scanner([System.in](https://System.in)); Rps game = new Rps(); System.out.println("r, p, or s:"); char move = [kboard.next](https://kboard.next)().charAt(0); kboard.close(); System.out.println(" "); 

     System.out.println("Rock..."); 

    Thread.sleep(500);

     System.out.println("Paper..."); 

    Thread.sleep(500);

     System.out.println("Scissors..."); 

    Thread.sleep(500);

     System.out.println("Says..."); 

    Thread.sleep(500);

     System.out.println("Shoot!"); System.out.println(" "); 

     System.out.println("You:" + move); System.out.println("Opponent:" + game.getOpponentsMove()); System.out.println(game.check(move)); 

    } 

    }

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

    Questions about autohotkey

    Posted: 17 Nov 2018 06:08 AM PST

    ///

    (number sign)NoEnv

    SendMode Input

    LControl & RAlt::Send {MButton}

    ///

    Thats the code i use to pretend like my mouse scroll button is my AltGr. This is the unsolved thread of mine:

    /r/techsupport/comments/9wejp1/i_want_altgr_button_on_my_keyboard_to_work_like/

    Here are my questions:

    1 It works but Holding AltGr doesnt work. So i cant hold AltGr and move mouse up and down.

    2 Why LControl makes it work? I dont get the code behind this.

    3 Is it possible to make Laptop touch pads right click button to work instead of AltGr? Or would it prevent right click button of my wireless mouse from working? That would be WAY more practical but i thought it wont be possible and program cant tell the difference between touchpads right click and wireless mouse right click.

    submitted by /u/hello--friend
    [link] [comments]

    What is good about PHP?

    Posted: 17 Nov 2018 05:15 AM PST

    Hi. I am a programmer in info science (data wrangling). I have done a very, very little bit of web stuff, mostly for internal tools when a GUI is needed for some reason (mostly audits). I use Python for web backend because it's the language I'm most comfortable with and the web frameworks for it are fine.

    I've never gotten much further in PHP than setting up Apache with mod-php and doing "hello world" and maybe a few simple things with loops and arrays. What I saw was something that looked like shell scripting, but was a little better, or, alternatively, something that looked like Perl or Tcl, but not quite as expressive — Anyway, one of those $ languages, but in some kind of unholy union with HTML

    Whenever I read about it online, I get the impression the whole language is just a giant kludge, and there are a lot of strange and unpredictable behaviors that experts just learn to work around. My impression is that PHP is pretty close to the most hated language out there.

    However, I also have the impression that PHP must be where it is today for a reason. Tell me what's good about it.

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

    Python Sockets "[Errno 49] Can't assign requested address "

    Posted: 17 Nov 2018 04:39 AM PST

    Hi guys I'm new to Python and Networking in general and I'm having trouble with my socket setup using my laptop and a PYNQ-Z1 board connected to the same wireless router.. this is the code I am running on each device. The weird thing is when I initially ran the code, the packet was sent but now the code will not work even though I had not changed anything.

    Laptop:

    import socket

    address = ('192.168.1.2', 1308)

    msg = 'hello'

    udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

    while True:

    try:

    udp.sendto(msg.encode(), address)

    except KeyboardInterrupt:

    udp.close()

    PYNQ-Z1

    import socket

    import time

    address = ('192.168.1.1', 1308)

    udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

    udp.bind(address)

    while True:

    try:

    rcv_byte = bytes()

    rcv_byte, addr = udp.recvfrom(1024)

    msg = rcv_byte.decode()

    print(msg + ' recieved {} bytes'.format(len(msg)))

    time.sleep(5)

    if msg == 'close':

    print("finished")

    udp.close()

    break

    except KeyboardInterrupt:

    udp.close()

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

    No comments:

    Post a Comment