• Breaking News

    Thursday, July 12, 2018

    Is SHA256 (or other hash functions) guaranteed to hit every possible output, given the right input? Ask Programming

    Is SHA256 (or other hash functions) guaranteed to hit every possible output, given the right input? Ask Programming


    Is SHA256 (or other hash functions) guaranteed to hit every possible output, given the right input?

    Posted: 12 Jul 2018 11:37 AM PDT

    To put it simply: Is there in theory a combination for every value that can be encoded using 256 bits?

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

    DB Server Syncing / Merging data challenge

    Posted: 12 Jul 2018 08:26 PM PDT

    I am currently facing a database / coding challenge at work.

    We are using MSSQL database servers hosted at AWS.

    A part of our database contains data from an external business partner who provides us with that data via an api. We have to call this api constantly to keep the data in our database up-to-date (unfortunately there is currently no better way of doing this part).

    We decided to create a clone of this data / db schema to a separate db server so that our production db won't need to handle those updates directly. The main reason for this is to keep traffic on our production database low. So the api calls to our business partner will update the clone database server.

    I will call our prod database PROD-DB and the other one CLONE-DB from now on for simplicity.

    The database schema for those tables look like this:

    DB Schema

    The main table will contain around 14-15 million rows. 90% of those rows are from our business partner. The main table also contains rows which are not from our business partner. Those rows will have the field iExternalId as null.

    The relationship tables only have corresponding rows to the main table if the iExternalId is not null and is therefore from our business partner.

    Each relationship table contains around 0-10 rows for each row (if iExternalId is not null) in the main table. The main table has 6 relationship tables.

    My challenge is now to keep both database servers in sync and to automate that process. The main issue is that I don't have just one source of truth. The main tables in both databases will get new rows separately. The relationship tables have their source of truth on the CLONE-DB server so I could just replace the relationship table on PROD-DB with the ones on CLONE-DB. But I would still need to merge the main table. And I also would need to sync / merge the main table of the PROD-DB back to the CLONE-DB.

    I was thinking of running a job to sync / merge those database servers every 1-2 weeks over night.

    So my question for you guys would be now what would be the best, cleanest and smartest way of achieving this? Is there maybe already a product out there which could help me? If not which technologies would you use to build a solution?

    I'm sorry for any grammar or spelling mistakes. I'm not a native english speaker.

    I appreciate any help! Thanks.

    Cheers.

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

    I want to write an utterance detection algorithm in Python, what's the best library to use to deal with the audio?

    Posted: 12 Jul 2018 03:03 PM PDT

    I'm guessing I'll need to do some statistics on finding sharp rises in audio level after long pauses to detect when utterances happen? Sorry for being a super noob :(

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

    In programming, the classes are capitalized (usually) and the instances are written in small letters. Why is real life the other way around?

    Posted: 11 Jul 2018 10:45 PM PDT

    Instances in real life (aside from those that we refer to using pronouns) typically have capitalized names. ex.

    • The Eiffel Tower
    • Bill Gates
    • The Lincoln Bible

    However, classes are written in small letters. ex.

    • car
    • pencil
    • person

    So... how did English and programming literally get it completely opposite? All hypotheses and discussions remotely on topic are welcome.

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

    Python: Easier way to activate virtualenv. What happened?

    Posted: 12 Jul 2018 05:13 PM PDT

    I'm late to the party but I just came across this page talking about the downsides to virtualenv's approach to activating a virtual environment (source bin/activate). This is from 2012. There is also an issue on virtualenv discussing this, but reading through the comments maybe I'm missing something. Is there some reason this hasn't been implemented after all this time?

    Best I can tell it's hard to make it work properly on everyone's systems, but is that the reason? Seems like an alternate script could be included for those who want to use it. Just curious if anyone has been following this since I just came across it.

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

    My job has a deal with NYU that allows me to take various programming courses. Which do you think makes the most sense for a beginner? (link in comments)

    Posted: 12 Jul 2018 11:22 AM PDT

    Here are my options.

    I do regular administrative stuff for the school i work at, but i have virtually zero programming/coding knowledge. What would be the pros and cons of learning one coding language over the other, and which would be good for someone looking to potentially transition to this field? Thanks in advance!

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

    Help making a drag and drop form interface

    Posted: 12 Jul 2018 02:00 PM PDT

    I'm building a webapp where are user will have a list of images to choose from. They can drop those images into a new list in whatever order they choose, and then I want them to be able to submit this as a form. Where can I go to learn to do something like this? I have a decent grasp on html5 drag an drop, but don't know how to integrate it into a form like this.

    submitted by /u/sam-barr
    [link] [comments]

    [Java] Help me explain this basic synchronization example

    Posted: 12 Jul 2018 01:26 PM PDT

    The example below is taken from an online tutorial. It says the output of the program should be '2' but it comes out '1'; justifying the need for synchronization.

    I do not see at all why it should be '2'. You created an object, ran the increment method once and now it should be '1' right? Help me understand this pls.

    Thank you!

    // Java program to illustrate need // of Synchronization import java.io.*; class Multithread { private int i = 0; public void increment() { i++; } public int getValue() { return i; } } class GfG { public static void main (String[] args) { Multithread t = new Multithread(); t.increment(); System.out.println(t.getValue()); } } 
    submitted by /u/notyourdaddy
    [link] [comments]

    Creating prototype bot using Microsoft Azure/Luis

    Posted: 12 Jul 2018 11:49 AM PDT

    Hey all,

    My employer is looking to develop a bot for their website which uses MS Sharepoint. They want to first try to develop a basic bot in-house as a test before they present the project for proper funding.

    I only know some Python and very basic Java (more of a PL/SQL guy), but we don't really have any CS developers. The idea is to use Luis to be able to retrieve text information/answers from our website.

    I've been researching Luis and looking through tutorials and I see that the fulfillment part will require heavy coding.

    Are there any tips for this part? Am I on the right track here? Is there a different bot framework that's easier to use that I should look into first? What language will I need specifically to program this bot to fulfill requests?

    I know this will be super tough and I'm underprepared but I want to help get a prototype going so we can perhaps just buy a fully-functioning version one outright.

    Thanks for any help you can offer.

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

    [Question] How good is your memory of details and nuances of language you use? How good it should be to have a job?

    Posted: 12 Jul 2018 11:44 AM PDT

    I've noticed that i forget things about languages and framewroks over time. Especially for the stuff i'm not actively using in work, but had only read or experimented with. So i started to wonder how normal is that? Just to clarify, i was freelancing for the last five years so i have very little experience of the industry in general.

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

    Javascript Selection Guide

    Posted: 12 Jul 2018 07:35 AM PDT

    I'm looking to create a very basic buyers guide kind of like this

    https://plugins.db-dzine.com/woocommerce-buying-guide/demo/

    Where a user answers 3 questions and based on those 3 questions it will tell them what product is best for them.

    How would I get started?

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

    [Help] Arduino simple code not working

    Posted: 12 Jul 2018 07:21 AM PDT

    Hi, I made a post in r/Arduino explaining a problem I've had with a code, the details are in the post. I did get an answer but I don't think it's the right one.

    Can someone help a beginner here?

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

    [Chrome Browser/Notepad] Is there a way to open up just the web page, ideally multiple, by using some kind of script?

    Posted: 11 Jul 2018 10:48 PM PDT

    Sorry if this isnt a programming question, but i believe it has to do with writing a script on notepad and making it an exe file.

    I don't want the url or favorites tab showing, just the webpage. Is there a way to have an executable desktop icon that can open up lets say 4 different borderless pages laid out on my screen in 4 quandrants? This might be asking too much but the ability to change the webpages too either through resetting it to google's search or popping up the url with a hotkey?

    let me know if this is the wrong subreddit, i will delete and repost it there. i feel like this is partially in the right direction

    https://superuser.com/questions/459775/how-can-i-launch-a-browser-with-no-window-frame-or-tabs-address-bar

    thank you

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

    Why i am not being able to reinitialise Datatable? (Warning: Cannot reinitialise DataTable)

    Posted: 12 Jul 2018 04:25 AM PDT

    I have this code:

     var datatable = $("#datatable").DataTable();//get dt datatable.destroy(); //destroy old instance datatable = $("#datatable").DataTable({ "scrollY": "150px", "paging": false }); // here is throwing the error: "Warning: Cannot reinitialise DataTable" 
    submitted by /u/Don-g9
    [link] [comments]

    [HTML] Save the state of a website

    Posted: 11 Jul 2018 10:59 PM PDT

    Hi there,

    I've designed an html interface which allows users to input values and select options from a drop down list. As of now, I am trying to create a method in which the user can save the current state by pressing save, which will write a file. This file can be then retrieved to restore the state of the interface. An example that I know of is this web-based game.

    I'm not very sure where to start with this, so it'd be wonderful if someone could help point me in the right direction, or knows a more efficient way to get this done!

    Thank you!

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

    [PYTHON]Logging when the state changes of a pin in Raspberry.

    Posted: 11 Jul 2018 10:17 PM PDT

    So i have a python script that monitors that input in 8 pins of a RPi for Digital HIgh and Low and Outputs a Digital high. what shoud i do to log these files in RPi.

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

    No comments:

    Post a Comment