• Breaking News

    Tuesday, January 7, 2020

    I published a working crypto algorithm to github. Am I supposed to tell usa government about it, and how would I do that? Ask Programming

    I published a working crypto algorithm to github. Am I supposed to tell usa government about it, and how would I do that? Ask Programming


    I published a working crypto algorithm to github. Am I supposed to tell usa government about it, and how would I do that?

    Posted: 07 Jan 2020 02:49 PM PST

    https://github.com/benrayfield/hashrotatecrypt/

    EDIT: sha256 is already exported everywhere in the world, and calling it in a loop might not even be considered a separate system.

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

    What is the ELI5 for how RegExp works?

    Posted: 07 Jan 2020 05:30 AM PST

    For me, Regexp feels like magic. It's like you can parse anything with a few short keystrokes. Prior to Regexp, I'd be writing extemely complicated for item of string.split loops, to get the things that I would need.

    I'm pretty curious as to how it works under the hood.

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

    Beginner Organization Help

    Posted: 07 Jan 2020 03:41 PM PST

    I have a college degree but no formal training in programming. I am self-taught and have made programs with GUI's, database interaction, some error handling, etc.

    As a result, in addition to my position that relates to my degree, I have inherited responsibility for maintaining internally developed programs in my area. IT is completely removed from these programs and the only person with knowledge about them is gone. They are essential to operation of my area and repairing them requires understanding them which takes a huge amount of time because they are spaghetti.

    I started to rewrite the programs but I find myself creating a similar mess of a program. What is a good resource for understanding healthy coding habits? How do I plan and structure my code before beginning a large project? What is the proper etiquette for error handling?

    I don't expect anyone to boil down a bachelors degree in a reddit post, but any help is much appreciated.

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

    Automating YouTube content creation

    Posted: 07 Jan 2020 10:25 PM PST

    (Note: this is just curiosity speaking, wouldn't actually do something so cancerous xD) Just wondering what software/applications one would use to achieve the automation of processes such as account creation, downloading of entertainment from the internet,​ uploading etc.

    Cheers!

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

    I`m trying to make an app for accuracy and speed test on typing, but i don`t know how to.

    Posted: 07 Jan 2020 10:19 PM PST

    I need to make a accuracy test on typing for my last output on my thesis, i`m having a hard time looking for a vb.net script for accuracy and speed test on typing can someone help me, i really need your help i`m a complete beginner.

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

    How do games achieve decoupling between game update ticks and graphics refreshing?

    Posted: 07 Jan 2020 04:24 PM PST

    In a modern game, if you change the FPS, it doesn't change the actual game logic.

    A naive game engine would have a single loop that updates game logic then updates the graphics. If you increase the FPS, the game logic would happen faster too (or the dt would have to be smaller, which changes things subtley). Since this doesn't happen, it's obvious that the graphics update thread and the game update thread operate independently, but I find this confusing.

    Since almost every part of game update logic is going to touch things that have graphical implications (like entity positions), it's not clear how you could cleanly parallelize these threads.

    I'm just wondering about the general patterns and logic used to achieve this.

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

    Question about initial session management

    Posted: 07 Jan 2020 01:32 PM PST

    Hi guys. So I am building a SPA customer portal using Vue.js for a front-end and Python for backend. Up to this point, my initial thought process was to create a JWT upon successful login (valid UN /Password), and use that for the subsequent calls to the backend REStful API.

    My boss, however, pointed out that we could try using Redis to store the Authorization Token, with an expiry, etc. That's cool with me, but she mentioned one thing to me that kind of threw me back.

    Her ideal session workflow (and one she claims is the standard of most large sites), is to create a session token with and authorized value of 'false' RIGHT when the page first leads, essentially giving the end-user a session before successful login. Then upon successful login switch that false value to a true, and allowing further protected calls to work while the token is not expired.

    What is the general best practice here? I like the idea, but literally never thought of giving a session token unless necessary (the user is actually a authorized user). Any comments would be greatly appreciated!!

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

    Is Java better than C++?

    Posted: 07 Jan 2020 10:49 PM PST

    I've read a blog on C++ vs Java. They have covered almost everything, but still, I need help to find the exact winner. Please help me.

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

    Need help programming Simplex method in C

    Posted: 07 Jan 2020 05:55 PM PST

    Hello everyone hope you're having a wonderful day,

    Our Operational research professor asked us to program the simplex method in our preferred language, so I chose C, but I don't have even nearly enough knowledge in C to program the simplex method, and he told us give him the program and explain to him how it works, so If anyone can help me find a code in C or C++ or anything really if it's simple to understand it'd would be amazing.

    Thank you for reading and normally I would have took the time to try to program it myself but the deadline is near and i have a ton of exams

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

    [C] Linked Lists, how to check whether two string lists are equal

    Posted: 07 Jan 2020 05:25 PM PST

    https://gyazo.com/57b215c2e0a478513ffaa7b612c6a12a https://gyazo.com/57b215c2e0a478513ffaa7b612c6a12a

    Implement the function bool test_equal_lists (int line, node * list1, node * list2), which checks whether the content of the two lists is the same, that is, whether they have the same elements. The function should return true if and only if that is the case. In addition, it should output the result in the following form (in the picture on top)

    This was my attempt, but somehow it doesnt work, what did i do wrong?

    Also can anyone help me with the output? thanks

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

    Issue with using two different DB Libraries

    Posted: 07 Jan 2020 01:16 PM PST

    I made a mistake with trying to get my app to run when trying to add SeedData to my database. Originally I wanted to use the package name 'Microsoft.EntityFrameworkCore' but to run my initial migrate I was using the library 'System.Data.Entity'. I am not exactly sure what the difference is. Right now however, I cannot seem to get anything to get going such as migrate or even build. I am using .Net Core and entity framework int his app. Here is some of my relevant code: (Project name is Backend)

    EmployeeContext.cs (my database context file)

    using Microsoft.EntityFrameworkCore; //using System.Data.Entity; I originally used this using Backend; namespace Backend.Data { public class EmployeeContext : DbContext { public EmployeeContext (DbContextOptions<EmployeeContext> options) : base(options) { } public DbSet<Employee> Employee { get; set; } } } 

    Migrations/Configuration.cs (this is where the error pops up for me, maybe need to reset this file?)

    namespace Backend.Migrations { using System; using System.Data.Entity; using System.Data.Entity.Migrations; using System.Linq; internal sealed class Configuration : DbMigrationsConfiguration<Backend.Data.EmployeeContext> { public Configuration() { AutomaticMigrationsEnabled = false; } protected override void Seed(Backend.Data.EmployeeContext context) { // This method will be called after migrating to the latest version. // You can use the DbSet<T>.AddOrUpdate() helper extension method // to avoid creating duplicate seed data. } } } 

    The Error on 'Configuration' is :

    Severity Code Description Project File Line Suppression State

    Error CS0311 The type 'Backend.Data.EmployeeContext' cannot be used as type parameter 'TContext' in the generic type or method 'DbMigrationsConfiguration<TContext>'. There is no implicit reference conversion from 'Backend.Data.EmployeeContext' to 'System.Data.Entity.DbContext'. Backend Backend\Backend\Migrations\Configuration.cs 8 Active

    My configure services function in startup.cs

     public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddCors(o => o.AddPolicy("MyPolicy", builder => { builder.WithOrigins("https://localhost:44343") .AllowAnyMethod() .AllowAnyHeader(); })); services.AddDbContext<EmployeeContext>(options => options.UseSqlServer(Configuration.GetConnectionString("EmployeeContext"))); } 

    Any idea what my error is? Anyway to reset back before I did my intial migration and start over?

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

    How do backends handle notifying thousands of users for thousands of different notification possibilities set by a user?

    Posted: 07 Jan 2020 08:38 AM PST

    More specifically the implementation and processes things go through.

    Not how fast computers can run

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

    Rebuilding an app

    Posted: 07 Jan 2020 12:13 PM PST

    okay sorry for format i'm on mobile

    So long story short i am a student in my last year in college. last year i started my own little company for some side cash. So my first client wanted a specific application that should be pretty usefull and i want to make it more generic so other people can use it.

    Ok now on to the question

    The app is written in .netcore 2.1 or 2.2 mvc but it was my first big project so it the code isn't all that it serves it purpose well but isn't scalable well tested,...

    So should i restart from the ground up or should i refactor the existing code base?

    And if i rewrite it should i just use api/angular or stick to mvc?

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

    How to generate identifiers for real-time web apps?

    Posted: 07 Jan 2020 11:36 AM PST

    I am building a real-time web app where users can drag and drop components on to a canvas. I am wondering how to generate unique identifiers for each new component that is added to the canvas. I do not want the client generating IDs as this is a security vulnerability; therefore, I think it is reasonable for the server to generate an ID once a new component is added to the canvas. Then any other interaction with this component can be referenced through this ID. However, I feel like this method has lots of overhead, as the client must first ask the server to generate a new ID before the component can be added to the canvas.

    I am new to developing web apps so any advice/solutions would be really appreciated 😊

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

    project guidance: brewery map with rating filter

    Posted: 07 Jan 2020 11:24 AM PST

    I could use some ideas on how to go about a project. I'd like to make a map of breweries from a list and be able to filter by rating value and number of ratings. I'm imagining a map similar to hotels.com where you can restrict the star-rating of a hotel to 3-stars and up.

    Data source: Beer Advocate has a directory of breweries by state that has addresses, rating value, and number of ratings.
    https://www.beeradvocate.com/place/directory/0/US/

    Those that have experience with a project like this, how would you go about it?

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

    Automatized Tool to combine four greyscales into single RGB+A?

    Posted: 07 Jan 2020 11:14 AM PST

    For game development purposes I need to store four same-size greyscales into a single PNG.

    Most important of all, I have to first ask for help to find a software that just allows me to manually edit the alpha information of a PNG image to test if it's an idea possible to pursue. I can edit RBG channels independently in Photoshop for example but the Alpha Channel is a bit of a mystery since simply erasing disturbs the RGB greyscales information. Maybe this is unavoidable?

    Secondly, at some later date, if it even proves a successful method, I need to look for ways to automate the process of combining greyscales. I guess the general question is just to ask people an opinion or pointers for the viability of it? Lol. Got visual studio, I can make some application that reads folders' content and smash images together? That a thing, yes?

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

    Change the icon of a PNG file?

    Posted: 07 Jan 2020 11:13 AM PST

    I have no idea if this is the right place to post this, if anyone knows anywhere better please let me know.

    I have a PNG file of the card Trap Hole on my computer. I want to send it to my coworker via IM, but I want the icon of the file to be the back of the card so when he opens it I can be like "You've activated my trap card!" Does anyone know how to edit the icon of the file so it shows up like this on both mine and his computer?

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

    instagram name check website, possible?

    Posted: 07 Jan 2020 05:26 AM PST

    Hello, I don't know anything about code. So I realised that changed usernames from instagram can be gained back in between 0-14 days, after that time the username is available for everyone.

    I wanted to create a website where people can check the availability of usernames on instagram and when(exact time) they get available. For example like this website: namemc.com

    My question: Is it possible that a website can be replicated just like namemc.com for instagram names? How to get the data for this?

    Thank you!

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

    Very new to all this; how do I input bar-chart data to an overall pie-chart ? (JS / jQuery)

    Posted: 07 Jan 2020 08:37 AM PST

    I'm stuck in implementing the jQuery of a Highcharts pie-chart. I'm trying to build it with sum-totals taken from three bar-charts. Any help would be massively appreciated or, perhaps, just point me in the right direction.

    Please take a look at the stackoverflow link: https://stackoverflow.com/questions/59632253/how-do-i-input-bar-chart-data-to-an-overall-pie-chart-js-jquery

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

    React.js not updating state

    Posted: 07 Jan 2020 08:35 AM PST

    I am having trouble updating my state in my react code. What I want to do is dynamically create a different number of employees based on the data that comes back over the REST API. I had it working originally with a hard-coded amount using a clone of the original 'this.state.employees'. Here is my code:

    state = { employees: [ { id: 1, Name: "Jeff", badgeId: 123 }, { id: 2, Name: "Dave", badgeId: 135 }, { id: 3, Name: "Sarah", badgeId: 15 }, { id: 4, Name: "Bob", badgeId: 100 }, ] }; componentDidMount() { axios.get('https://localhost:44327/employee') .then(res => { const newEmployees = [] for (var i = 0; i < res.data.length; i++) { newEmployees.push({ "id": i+1, "Name": res.data[i].name, "badgeId": res.data[i].badgeId }) } this.setState({ newEmployees }) }) } 

    I am pulling some data from a REST API and plugging it into the setState. I originally got it to work by cloning the original state using 'const newEmployees = [...this.state.employees]. but I wanted the # of employees to be dynamic. Any idea what I am doing wrong.

    Using console.log on newEmployees and this.state.employees, they look exactly the same besides the data values being different.

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

    Which skills do I need to build a browser based on chromium?

    Posted: 07 Jan 2020 08:20 AM PST

    Hi all

    I would like to build my own browser and would like to know, which skills do I need? What do I have to learn?

    Thanks

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

    Might there be an online compilation of really cool and creative regexps?

    Posted: 07 Jan 2020 07:48 AM PST

    There are lots of basic ones, like "match number", "match word", et cetera. I was hoping to find a list of really creative ones to inspire my own regexp patterns.

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

    Text-to-speech API for long texts?

    Posted: 07 Jan 2020 07:21 AM PST

    I'm looking for an open source library or API for implementing a text-to-speech feature on a blog.

    In other worlds, to transpose the entire articles in an embedded player that a "reader" could just play instead of having to read the entire wall of text.

    There is an older API provided by Google's TTS, but that's limited in character numbers. Haven't been able to find anything else meanwhile...

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

    No comments:

    Post a Comment