• Breaking News

    Saturday, February 29, 2020

    ELI5:Why use / should I use Docker? Ask Programming

    ELI5:Why use / should I use Docker? Ask Programming


    ELI5:Why use / should I use Docker?

    Posted: 29 Feb 2020 10:51 AM PST

    For programming projects, i've tend to seen a lot of students using docker as container service, where they have like a db container, frontend container etc..

    why would you even do that? instead of installing the dependencies (database) local on your pc.

    one thing that i can come up with is, not using your own local pc storage for database etc

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

    What OS do checkout machines run with / what programming language is best for it?

    Posted: 29 Feb 2020 09:11 PM PST

    Hey guys,

    So I m working on a program that needs part working on one of those checkout machines at shops where the employee scans your items , presses some buttons and prints a receipt. Its supposed to communicate with a database and update some simple data. Now I just cant find out how those things work. Are they just simply running on Linux or a Windows OS? Is it even possible to achieve such a thing? What is my best approach? Is there some sort of source code out there or a library for such tasks? I assume its a C based language running on those things which means could use Cython.

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

    Data structures and Algortihms book or course

    Posted: 29 Feb 2020 06:53 AM PST

    I feel like i am missing a lot while programming especially with data structures and algorithms.

    After failing to answer competitive programming questions, i feel that i need to learn these topics.

    What books or course do you guys recommend to learn these topics?

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

    How is a timer/stopwatch usually implemented in general? How can you measure the passing of real time?

    Posted: 29 Feb 2020 06:50 PM PST

    I'm writing something that involves a timer in Haskell. I'd like to do it without using any dependencies or packages that I don't need to. But I realized I don't think I actually know how you would go about implementing something that measures real time.

    Check for differences between the system clock time and the start time? But the system clock could be changed by the user at any moment.

    So what do you check against? Does it involve just looping forever and seeing how much time has passed? How is something like this actually programmed at a low level?

    submitted by /u/_-Thoth-_
    [link] [comments]

    Resources to learn python or java?

    Posted: 29 Feb 2020 07:57 PM PST

    So, I want to gain a deeper understanding of programming and technics. I have a basic fundamental understanding of java not so much python. I couldn't get a programming class this semester so wanted to learn a bit in my free time. Could you give me a resource to either learn python or Java?

    Thank you very much

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

    Advice on organizing a DB table for different formats of CSV files.

    Posted: 29 Feb 2020 03:19 PM PST

    Hi all, I've a question about the best way to organize a database schema around some data mining I plan to do.

    I'm distilling my situation down as follows: I have close to a terabyte of csv files where small collections of csvs have the same number of columns and identical column names. The only difference is data contained. I'll call this Group A.

    My other groups of csvs have a variable number of columns, several different column names, but share many of the same column names as Group A. I'll call these Group B.

    In an ideal world I would just create a DB table that mirrors the column format and data types of Group A. However, that means I would lose many columns of data when trying to insert the differently formatted data tables of Group B. If I decide to create at db table that has all the columns from Group A and B I would end up with a DB table that is more than 1000 columns, pretty unwieldy.

    My solution was to pivot the data from both Group A and Group B into attribute/value fields, where the attribute is a column name and the value is the underlying data for that column and record in the original csv. But I am worried that queries to a DB table like this will take too long as I put more and more data into the table.

    Do you all think my approach is appropriate or is there a better way to go about this? When I access the data from the DB I would like it to be returned as a table in a similar format to the original csvs except with specific columns I have chosen.

    I am using SQL Server for the DB, a custom C# program which accesses, manipulates and sends the data to my DB, and PowerBi to connect to the DB and process the data.

    Thanks to all in advance who take the time to respond!

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

    How hard is focusing for you?

    Posted: 29 Feb 2020 08:28 AM PST

    (Hope this is the right subreddit)

    I've been programming for about 2.5 years now, and working full time for about 1.5, and in all this time the biggest problem for me was the difficulty it is to focus when doing actual coding/debugging/reading APIs/etc.

    All this time I though that this was just normal, but now I'm starting to think that maybe it isn't, I see other colleagues being able focus on demand, don't really see this mentioned when people talk about being a software developer online, and have asked a few friends about this and they don't really have this problem, and for me that was never the case, It's always a huge struggle to get going and then equally as hard to stay going when I manage to start doing something.

    All of this is greatly exacerbated by having to work in an office, especially the open office type, to the point where I am barely able to do 1-2 hours of work per day even when I'm really trying, it has gotten me to a point where I'm going to quit soon and take a break because I've become completely burnt out in all this period by having to work in an office, but the main problem is still the stress caused by the difficulty of having to focus.

    This is not to say that at home I'm perfectly able to do my job, but at this point the only way I can stay in this career is if I work almost fully remote, because even if it's hard at least I'm able to get some work done in that way and being out of the office helps mitigate some of the stress.

    I noticed that in the days where I don't do any code, and I'm just in meetings I'm so much less stressed and tensed at the end of the day, but when I do mostly focus-heavy work I'm a complete mess and have 0 energy left.

    And before you mention it, I've tried most of the common advice like Pomodoro, headphones, coming in early, taking long walks, .etc and it doesn't really help.

    I'm really frustrated and having doubts about whether this is the right career for me after all, it's not that I don't like it, I really did at first, but now the monumental effort required every work day to do even basic shit for only a few hours at best is not really worth it for me and it's really affecting my mental health.

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

    Is there a way to see contents of JavaScript callback queue?

    Posted: 29 Feb 2020 01:45 PM PST

    Is this the right way to go in creating a geospatial application?

    Posted: 29 Feb 2020 01:38 PM PST

    I'm trying to figure out how to go about creating an application that uses:

    • PostGIS, a geospatial extension of postgresql,
    • a front-facing android application that allows for user-login/account creation, note creation and uses geolocation of a user to interact with postgis/postgresql
    • a possible middle-end software like nodejs that will allow the client side android app to interact with the database
    • a server like Amazon EC2 to allow users of the app to send their geospatial and notes data to the back-end db.

    Is this the right route to go? And is there any tutorials/examples on how to implement a project like this?

    If there's any additional info needed feel free to ask!

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

    IoT - Checking if a device is online

    Posted: 29 Feb 2020 01:22 PM PST

    Hey fellow programmers,

    I'm facing a problem in the IoT world, I've built a great system and it works perfectly, except for one thing, online status. It works, but it feels very bodged. Right now I just have an interval sending out PING commands to every device, and the devices respond with a PONG. If they go offline, well, let's just say that doesn't happen in my backend. I know I should have some sort of timeout mechanism for the PONG to come back.

    What I've down now is simplified it, let the device send out a PING command every 5 seconds. This command gets ingested through MQTT into a queue in RabbitMQ. But I have no clue on how to go on, should I loop over every PING in the queue and like tick off which are there and which devices are not?

    Thanks a lot in advance!

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

    How can I start/load a IddCx class extension driver?

    Posted: 29 Feb 2020 11:32 AM PST

    I am trying to create a virtual display adapter/driver to manage virtual monitors. My goal is to create some sort of C API or abstraction layer that I can use (from any language, or user-space program) to create and destroy virtual monitors that would show up in Windows Display Settings.

    I found this project on GitHub, and it seems promising, but I don't fully understand how it works, or how a user space application could communicate with it. I have managed to compile it and install the driver with the inf file, but nothing showed up in Device Manager.

    Could someone explain how it works, and how I can use the linked driver code to create virtual monitors?

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

    Graphics object returning null pointer

    Posted: 29 Feb 2020 10:55 AM PST

    im trying to create a menu for my game using a graphics object and in its own menu state, i think what i have is logical but it's returning a null pointer. the code in the world-class that renders the menu is

    } else if (state == State.Menu) { Menu menu = new Menu(); menu.renderMenu(g); } 

    the code in the menu class that creates the menu is

    public class Menu { public void renderMenu(Graphics g){ Font font1 = new Font("arial",Font.BOLD,50); g.setFont(font1); g.setColor(Color.white); g.drawString("FYP GAME", 100 , 100 ); } } 
    submitted by /u/greywolf_18
    [link] [comments]

    How would I build...?

    Posted: 29 Feb 2020 04:51 AM PST

    I want to build a website (for personal use) that allows you play a video and allows you to watch synced friend over the internet. I know the regular HTML5 video element has hooks for getting and setting time. I'm thinking you would have to host some server (tomcat?) and have some button use like JSP sync time for all viewers. Does this setup sound logical? I am literally just guessing at this. Thanks in advance!!

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

    Do most software engineer at big companies handle only the algorithim part?

    Posted: 29 Feb 2020 06:07 AM PST

    I mean there are thousands of software eng at google. Do these people create new application or are just improving the products already there?

    On other hand, there are thousands of other regular companies engs. Are they just maintaining or improving products? Even if they are creating new products is it just making things already there but just company specific?like cars company says create new car. So employees create new but no major innovation. Are sen soft eng like head eng of car company while coders junior eng like workers assemblers. I mean coders just create what is ordered? Thanks i am newbie

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

    Easy Cloud SQL Integration

    Posted: 29 Feb 2020 08:40 AM PST

    Hi AskProgramming,

    I've built a web app for which the data is being stored via csvs and pulled to java upon web request. I have a python backend which is pulling that data from another site. I'm familiar with using local SQL but want to move to a cloud-based sql solution. However, in my attempts to use Google's Cloud SQL I've been really discouraged by the difficulty to integrate. Is there any cloud-hosted sql solution that can be querried simply via cURL or Python?

    Thanks for the help!

    submitted by /u/DFTBA-FTW-
    [link] [comments]

    I'm having some troubles in Flutter

    Posted: 29 Feb 2020 07:24 AM PST

    I'm trying to work on a txt file, and when I try to print the content of the file, I get this error

    [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Exception: FormatException: Bad UTF-8 encoding 0x20 (at offset 2)

    The file has this layout -> è stato un artista - Van Gogh#è stato un......

    (in english: He was an artist - Van Gogh#He was a...)

    I think the problem is with these character (è,ò,à,ù,ì...) not supported in UTF-8. So, is there a way to convert the string to another encoder? And which encoder can support these kind of character?

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

    Does anyone know where I can view an artist's list of songs in order of popularity / number of plays?

    Posted: 29 Feb 2020 06:06 AM PST

    I need this data for a programming project I'm doing

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

    Images overflow only on Samsung Internet

    Posted: 29 Feb 2020 03:02 AM PST

    Page open in samsung internet : https://i.stack.imgur.com/ewxnz.jpg

    Page open in android chrome browser : https://i.stack.imgur.com/Ctjs1.jpg

    I'm having an issue where images are overflowing only on the Samsung internet browser I've been trying to find a solution but am unable to, please help.

    Here is the code:

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
    <title>Test</title>
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <style>
    body,html {
    width: 100%;
    height: 100%;
    margin-left: 0px;
    margin-right: 0px;
    background-color: rgb(45, 45, 45);
    }

    .boundaries{
    margin: auto;
    width: 70vw;
    display: grid;
    grid-gap: 20px ;
    grid-template-columns: 1fr 1fr 1fr;
    }
    .grid-elements{
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;

    }
    img{
    width: 100%;
    height: 100%;

    }

    .imga{
    height: 100%;
    border: 7px solid white;
    margin-bottom: 10px;
    }
    .symbs{
    font-size: 1.1vw;
    }

    .view-div{

    background-color: #C0C0C0;
    margin-bottom: 7px;
    padding: 4px 8px;
    color: rgb(45, 45, 45);
    }
    .git-div{
    background-color: black;
    color: white;
    padding: 4px 8px;
    }
    .title-div{
    background-color: #C0C0C0;
    text-align: center;
    margin-bottom: 7px;
    padding: 4px 8px;
    color: black;
    font-size: 30px;
    }

    @ media and (max-width:768px) {
    .boundaries{
    grid-template-columns: 1fr;
    width: 95%;
    }

    .symbs{
    font-size: 5vw;
    }

    .view-div, .git-div, .title-div{
    text-align: center;
    }
    }

    </style>

    </head>
    <body>
    <div class="boundaries">

    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    <div class="grid-elements">
    <div class="title-div">Username Generator</div>
    <a class="imga" href=""><img src="usergenimg.JPG" alt="" ></a>
    <div class="view-div"><i class="far fa-eye view symbs"></i> View</div>
    <div class="git-div"><i class="fab fa-github symbs"></i> GitHub</div>
    </div>
    </div>

    </body>

    </html>

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

    What's the best programming language for video games?

    Posted: 29 Feb 2020 02:24 AM PST

    How to get your first job

    Posted: 29 Feb 2020 12:16 AM PST

    Hi, I'm looking to become a software engineer, but am finding it impossible to break into the industry. I am using online resources to improve my programming skills, build a portfolio, attend industry conferences and recruitment drives etc, but I still haven't been able to secure an interview (or even an internship). I am currently completing a cs/software engineering degree and am hoping to start my masters afterwards. Could you offer some advice of what else I should try as I can't even get an interview? Could the problem be that I am female?

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

    No comments:

    Post a Comment