• Breaking News

    Friday, May 22, 2020

    Potentially off topic, but does anybody know if writers use Git or version control in general for writing novels? Ask Programming

    Potentially off topic, but does anybody know if writers use Git or version control in general for writing novels? Ask Programming


    Potentially off topic, but does anybody know if writers use Git or version control in general for writing novels?

    Posted: 22 May 2020 09:06 AM PDT

    Just a random thought I had. Seems like it would be a great tool for that.

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

    Should I make a game or start a software business.

    Posted: 22 May 2020 07:20 PM PDT

    Hi. I am wondering if I should make a game I proposed (a vaporwave game called VAPORWORLD), or this. I would appreciate your opinion, tysm in advance.

    submitted by /u/8blackears
    [link] [comments]

    Is my approach to building APIs wrong? Need some advice.

    Posted: 22 May 2020 06:49 PM PDT

    Hello /r/AskProgramming -

    tl;dr at bottom

    I have been writing APIs as a Node dev for the last few years but I'm having some trouble writing my first API in Kotlin, and I'd like some advice.

    I've cut my teeth as a Node/TypeScript dev for the last couple of years. For that whole time, I've lived/breathed/everything as a JSON object. Maps everywhere, function parameters as object, NoSQL, you get the idea.

    Now, I've gotten a new job, and the tech stack is mostly Kotlin. No problem, I've done Java in the past, the syntax is easy enough to figure out. What's really nice is I have complete autonomy to build my service, so I'm making a lot of architectural decisions on my own.

    The problem is, I feel like I'm struggling with defining an elegant data structure and i keep crafting what i feel like are hacky workarounds, just in the name of everything being "JSON-friendly".

    Were using Dynamo for the data store, and based on the use case I really do want to store each entry as it's own object, but there is so much Charlie work around transforming it to/from a Kotlin object, by way of the de/serializing with AttributeBuilder, and then Gson requires an entire "adapter" class just to be able to map a basic class to a K/V store.

    To my credit, the main consumer of my service is a JS frontend, so I'm trying to put it in a format they will be able to easily consume. But the deeper down this rabbit hole I go, the more I feel like I'm just wasting time. Not that I'm not getting stuff done, but it feels like what I am doing is wrong. And the company is relatively young so I haven't come across a really good resource for Kotlin on Slack yet.

    tl;dr Is there some Java/Kotlin/industry standard to pass things around services/APIs as anything other than JSON? Talking strictly HTTP requests- I am familiar with e.g message queues but it does not fit the use case

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

    Qt, Xamarin or Flutter? Which is the best tool for cross-platform development?

    Posted: 22 May 2020 12:46 AM PDT

    I have been a Qt developer for quite some time and I love the Qt ecosystem, however I always felt like I haven't really explored the other options in terms of cross-platform development. I hear a lot of buzzword with Xamarin and Flutter, but never really wrote anything significant with them. To those who have experienced Flutter, Xamarin and Qt what has your experience been and why would you choose one over the other?

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

    As I understand, in general each home gets one ipv4 address. Why isn't the ipv4 address space exhausted?

    Posted: 22 May 2020 11:24 AM PDT

    There are only 4 billion ipv4 addresses, and in practice there are far fewer. If each home gets one ip address, how hasn't the address space been exhausted already?

    As a side question, are there estimates of how exhausted the address space currently is?

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

    How do you determine if a former employee has stolen or leaked your source code?

    Posted: 22 May 2020 05:52 AM PDT

    A bit of a random question but my CTO is really paranoid that one of our former employees has leaked our code to a competitor. Besides trying to get a subpoena, are there any other ways of knowing if they've leaked the code? Are there any tools you can use to prevent this?

    submitted by /u/Either-Assist
    [link] [comments]

    What is happening behind the scenes when servers are "undergoing maintenance"?

    Posted: 22 May 2020 04:24 PM PDT

    With regards to online gaming and servers going down

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

    Maven Class Dependency Issue

    Posted: 22 May 2020 03:39 PM PDT

    Has anyone else experienced an issue with classes not being found when executing a .jar file? I had the file executing properly a few days ago, then over the last couple days added some dependencies and now when i try to execute the jar it gives a no class def found error. I used IntelliJ to create the artifact, and it builds properly but gives a warning about Javac 8 being used in the build. I've checked my POM.XML, and the jar XML, Manifest.MF and they all seem to include the libraries and dependencies I need. The issue started once I added the dependencies to Joda Time and h2database. Some help would be great as this is a pretty important project in my class. I'm completely lost as to what to do.

    When i directly run main it works, the issues is coming from the build and the jar dependencies. The only thing i can think of is that the jar xml doesn't have these dependencies as extracted dir. But im not sure how to go about adding them. I could try manually copy and pasting the jar files form the external libraries into the lib, but I feel that there should be a better way than this.

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

    Creating a header file in C

    Posted: 22 May 2020 03:28 PM PDT

    If I'm creating a header file in my project and needed to use (for example) math.h file in it, should I include it in the code of my header file or in the main source code ? what happens if a specific header file is both included in my custom header file and my main source code ?

    submitted by /u/kamel-not-camel
    [link] [comments]

    Best .Net HTML to PDF Rendering Library

    Posted: 22 May 2020 02:38 PM PDT

    I'm trying to find an open-source library that I can use in my Blazor/ASPNetCore project which takes HTML markup (plus CSS) and produces a PDF replica.

    Having used such a library before in PHP (TCPDF), I'm yet to come across something similar in .Net. A lot of available libraries want you to create the PDF programmatically whereas I want the HTML rendering as the PDF.

    The most important aspect is that the library must have good CSS support (which, incidentally TCPDF did not have).

    Does anyone have any suggestions, please?

    Ideally, the HTML would be converted on the server and the resulting PDF would either be downloaded as an attachment or displayed inline (via the content-disposition header).

    Thanks.

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

    I'm learning how to build mobile websites and came across an obstacle

    Posted: 22 May 2020 03:14 AM PDT

    So I changed the "action" of the login form to "https:///youtube.com" like this https://imgur.com/a/Z8278hq . So shouldn't hitting the login button take me to "youtube.com" .This works on the desktop site and the mobile site when I do it with Safari but it doesn't work with Chrome. Why? What am I missing here?

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

    My reasoning is terrible. Do you know how I can improve it? I’m going into CS.

    Posted: 22 May 2020 02:19 PM PDT

    Title. I have really bad reasoning and I need to get good. I'm a senior in high school about to go into CS. I need to improve my logic skills fast, but it's a struggle because I vegged out my brain the past few years on video games. Any help is appreciated.

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

    What language (or what is going on) in this screen? From the movie Office Space.

    Posted: 22 May 2020 01:51 PM PDT

    Is it sensible or just gibberish resembling code? https://imgur.com/0mPCfve

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

    Trying to print to console

    Posted: 22 May 2020 01:18 PM PDT

    I am using cordova to emulate onto a physical android device through visual studio code. My program uses geolocation and such, I have an array that stores the speed values I get from geolocation. I want to be able to print out this array, but when I do console.log nothing is returned. How do I go about this?

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

    Full stack project. Need some guidance.

    Posted: 22 May 2020 01:12 PM PDT

    Hello all,

    I hope you are safe.

    I will be creating a website with a lot of features in a forum kind of style. I will be using ionic and Angular for the frontend, a database (preferably MSSQL) and a web API project(. net webapi in c#) as a gateway between the two. I will be building all three projects myself. I plan to create a frontend to get an idea of how the data flow will be first and then move to the backend.

    Any tips on project planning, database design and best practices in general to build this full stack project the correct way?

    Sorry about my English. It's not my native language.

    Thank you!

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

    Is it fine to demo non-confidential program to people outside of work?

    Posted: 22 May 2020 12:37 PM PDT

    I am new to my developer job (and the field in general, fresh college grad) and no security clearance is involved. I'm doing some pretty cool stuff for work that I'd like to show family (not showing the source code, but if it were a GUI, i'd like to show them the gui and how you can interact with it for example). But I'm worried that I might be breaking rules if I even show them something that's not made "official" yet since it's still in the works, if that makes sense. But as far as I know, the tools I have made so far is not for sale. It's mainly to support my branch and there is no knowing if they even use it. There was also no explicit instruction to keep then exclusively for mine and my team's eyes only. Would that be okay to do? And if not, what determines when you cannot demo your work to outsiders?

    I know the obvious that if it is confidential, you definitely need to keep it secret. But there are also situations quite like mine where it's kind of left in a gray area, and I'm not sure if demonstrating a GUI would be considered a leak of some sort. This might be a silly question and the answer might be obvious for some of you, but I truly find it vague and would like some clarity so I finally know for good and stay out of trouble!

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

    Get object from Task< > return

    Posted: 22 May 2020 12:24 PM PDT

    I have an async function that uses a task<object> return. I want to be able to get the result object out but I am getting errors: here is my code:

    public async Task<User> getResponse(string username, string password) {

    ....

    return user;

    }

    public void callResponse()

    {

    var response = getResponse(uname, pass);

    while(!response.isCompleted);

    User user = response.Result;

    }

    However, it is saying that 'FormatException: Input string was not in correct format.)

    Any idea what I can do?

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

    Looking for advice regarding a job choice

    Posted: 22 May 2020 12:17 PM PDT

    Hi. I'll try to keep this as short as possible. Background: i want to become a programmer and have been trying to do so for a few months, slowly learning new stuff. I started with python and then did some flask and jinja for a project(didnt finish it because finals started and not much free time). Now, starting this summer i want to work and have 3 options but not sure which one is best.

    A data reporting analyst, which would be a full time job and probably pay a decent amount, but i dont think that i'll learn anything there. At no time during the interviews was i asked to write any code or prove any technical abilities. I asked if i could write scripts and work on code, but their response was pretty evasive and mostly revolved around "you'll begin with excel, but we use scripts and code in out team and would be more than happy to see your input". Sounded quite sugar-coated tbh.

    An automation testing engineer, which is a paid internship. They did not say any numbers, but its probably a symbolic amount. I was asked to write some simple code(check if a train can fit in a space given some coordinates), but then the interview switched to what inputs can i give a code written by someone else to check if it has errors. They explained that both manual and automated testing is done, but i will probably do more manual testing from what i could gather. A friend had a job like this and said its mostly just giving inputs to some code and see if it has errors.

    An unpaid internship at a small company that does software development. Compared with the previous 2 jobs(both part of international companies), this one is local and has significantly less employees. They mostly do embedded programming with C and C++ development. I am familiar with both C/C++, but still beginner by all means. Even though it's been a while since i worked with C/C++ it wont take me long to get reacustomed with either. One thing that might be an issue(if some of you work in small companies, please confirm/dismiss this) is that if there's a deadline coming soon or a lot of work, there wont really be anyone free to guide me or help when i encounter an issue. Also, because its unpaid they might not push me to do stuff(i tend to be lazy sometimes too), so even if i dont do much there wont be an issue with them.

    Would like to hear your opinion and thanks for taking the time to read and respond.

    LE: I forgot to mention, but money is not that important right now. I'm still a student and campus accommodation is free for me. I still have one year until i finish school, during which time i dont have to pay anything.

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

    Name of specific UI element

    Posted: 22 May 2020 12:06 PM PDT

    I am new to UI Programming and I stuck at the settings UI.

    What's the name of the UI element, that is used most of the time to select the resolution in games.

    I mean the one to select Items with two buttons left and right from the string.

    [EDIT]

    Somehow my post got duplicated. here is the Other one:

    https://www.reddit.com/r/AskProgramming/comments/gonahd/name_of_specific_ui_element/

    Please comment only on the other one.

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

    Altering JSON in C#

    Posted: 22 May 2020 11:15 AM PDT

    I am pretty new to C#, I am very used to python. So what I am trying to do is hard for me to figure out.

    Basically I am reading a JWT from a server, and I want to put that information from it into an object.

    var handler = new JwtSecurityTokenHandler();
    var token = handler.ReadJwtToken(jwtObj.accessToken);

    I then run it through a serializer function I found:

    var x = JsonConvert.SerializeObject(token.Claims.Select(c => new { c.Type, c.Value }))

    which gives an object like

    [ { "Type": "firstName", "Value": "Jim"}, {"Type": "lastName": "Halpert" } ... ]

    But my object i want has attributes firstName and lastName. This seems very simple, but I cannot for the life of me figure out how to get it in the object. I have tried various methods but just assume that I ended here.

    any idea what I can do?

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

    Altering JSON in C#

    Posted: 22 May 2020 11:12 AM PDT

    I am pretty new to C#, I am very used to python. So what I am trying to do is hard for me to figure out.

    Basically I am reading a JWT from a server, and I want to put that information from it into an object.

    var handler = new JwtSecurityTokenHandler();
    var token = handler.ReadJwtToken(jwtObj.accessToken);

    I then run it through a serializer function I found:

    var x = JsonConvert.SerializeObject(token.Claims.Select(c => new { c.Type, c.Value }))

    which gives an object like

    [ { "Type": "firstName", "Value": "Jim"}, {"Type": "lastName": "Halpert" } ... ]

    But my object i want has attributes firstName and lastName. This seems very simple, but I cannot for the life of me figure out how to get it in the object. I have tried various methods but just assume that I ended here.

    any idea what I can do?

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

    [Semi offtopic] Music for When You Code ?

    Posted: 22 May 2020 10:41 AM PDT

    Hey all !

    Care to share your music for when you code ? I found that: https://youtu.be/GTEZEKocO8w which I believe is the soundtrack of a game on coding. I was wondering if you had other instrumental electronic music of the same kind ? I also listen a lot to vaporwave unironically because of the smooth beat and tone.

    Just share what you listen to for maximum concentration and/or comfort.

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

    Name of specific UI element

    Posted: 22 May 2020 10:09 AM PDT

    I am new to UI Programming and I stuck at the settings UI.

    What's the name of the UI element, that is used most of the time to select the resolution in games.

    I mean the one to select Items with two buttons left and right from the string.

    [EDIT]

    I mean this style:

    https://www.notebookcheck.net/fileadmin/_migrated/pics/settings4_1_02.jpg

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

    Looking for recommendations:

    Posted: 22 May 2020 09:07 AM PDT

    I develop embedded systems for autonomous platforms and my wife is a teacher. One of her colleagues has begun to develop a system for incentivizing students through an rpg based achievement system for her classroom.

    I like this idea and would like to develop a web based solution for her to track student achievement, xp, achievement points that can be spent in a merchant style shop by the students.

    Because most of my work is in embedded systems, I don't often work with website development. I know the fundamentals such as html, css and JavaScript. I was hoping you guys could give me some full stack suggestions for how you would build this kind of thing with the below listed things in mind:

    •there needs to be user accounts with different levels of access (teacher vs student) •it needs to be scalable and able to be adopted by other teachers if it's successful in my wife's friends classroom. •needs to be developed with mobile device use as the primary mode of access by the students but a desktop browser by the teacher.

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

    C++ Help! gamepad simulated input

    Posted: 22 May 2020 09:06 AM PDT

    I am trying to simulate gamepad input for a program I am wrinting. I have gotten keyboard and maouse inputs working using sendinput. is there a similar way to do gamepad buttons and analog inputs?

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

    No comments:

    Post a Comment