• Breaking News

    Sunday, June 17, 2018

    Verifying identity in server-to-server communication? Ask Programming

    Verifying identity in server-to-server communication? Ask Programming


    Verifying identity in server-to-server communication?

    Posted: 17 Jun 2018 04:47 PM PDT

    Hey!

    So, I have a couple servers that can talk to eachother. There is one 'master' server, and a couple other servers that need to connect to this master server and exchange data.

    What's the standard way to make sure only these servers are 'authorised' for the master server, and make the master server reject all traffic on a given port from othr locations?

    I mean, I can think of a couple ways, i.e. use a secret, verify by IP, etc.. but a secret may be compromised, IPs might be spoofed (?), and I don't know if I'd want 1 secret for all the nodes or 1 secret per node...

    In general how do people solve this in industry?

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

    When writing a version number, should it be a lowercase or capital v? ex. v3 vs V3.

    Posted: 17 Jun 2018 04:53 PM PDT

    vs community tells myy my 30 days trial is over

    Posted: 17 Jun 2018 07:03 AM PDT

    but its community, it supposed to be free, isnt it? solved: had to log in

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

    Does anyone know of an open-source zooming program?

    Posted: 17 Jun 2018 01:30 PM PDT

    I have been scouring the internet for days, trying to find a way of zooming the screen when I hit a button (for a program I'm working on) so I was curious, are there any open source programs that I could take segments from? Thanks.

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

    Python: How do I send a random email using a generator?

    Posted: 17 Jun 2018 11:15 AM PDT

    I'm trying to send several randomly generated messages to myself.

    Here's my code:

    from random import choice import smtplib mssges = "Hello",\ "Hi",\ "Hey",\ email_user = 'my_email' email_send = 'another_email' server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login(email_user, 'password') server.sendmail(email_user, email_send, mssges) server.quit() 

    When I run the code, I get "TypeError: expected string or bytes-like object."

    I understand that my message needs to be in the form of a string, but how can I do that and send several messages?

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

    Class Scheduling Program

    Posted: 17 Jun 2018 06:56 AM PDT

    Hey all! Long time lurker on this sub, first time poster, I'm hoping you can help me out with a programming problem I've been working on.

    Around a year ago as a university project, I create a program in C# that used an arraylist of objects (Rooms) and an arraylist of objects (Courses), then performed a bunch of checks and assignments, eventually ending with a error free output.. I don't want to drag through all the details, but while the program did work just fine, looking back I absolutely brute forced the fuck out of this thing. There's a sequence of 4 for loops nested at one point, which is just ridiculous.

    So I have a list of questions compiled below in reference to this project that I hope will help me write cleaner, better code.

    (1) One of the first things that happens in this program is that each course is assigned a priority value from 1 - 6 based off subject area, course level, whether or not its a lab, and if specialized equipment is required. Because of all the matching that goes on to make sure that each class and all its required material is available in its assigned room, there is a lot of checking between arrays, hence the nested for loops. My current thought it to use a hashtable to check references. However, using smaller data sets, I've noticed that hashtables have a much smaller lookup time than arrays and arraylists, and it's worth mentioning that the largest array contained in my program would be an arraylist of about 600 objects. Is it worth it to implement a hashtable for scalability at the trade off of a slower run time when data sets are small?

    (2) I do have the ability to do a sort on all courses after assigning priority. This would allow me to skip out on checking priority, since I would be going through from the most important to least important after sorting. Again, in a small data set, I'm not sure this would be worth the run time, but it would definitely be much cleaner and easier read code. What do you think?

    (3) Overall, I just have a mess of for loops and I want to get rid of them as much as I can. Obviously I will have some doubles, but I would like to avoid triples and higher. Any suggestions you might have for writing clean code in this type of program are great, but I am leaving my personal code out of this intentionally, as I want to see ideas, but I am working on this to learn more. I need to be implementing and catching problems myself. So if you have any thoughts about the structure of this program, please, post away.

    I'm planning to use this project for an upcoming interview to demonstrate (1) a fully functional project, (2) that I care about how my code looks, and (3) that I want to learn to be a better programmer. Because I really do.

    Sorry about the text wall, and huge thank you to anyone that replies!

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

    Practice object oriented programming

    Posted: 17 Jun 2018 02:46 AM PDT

    Are there any good project follow along tutorial to Learn oop. Or any other practical approach. I prefer JavaScript, java or php.

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

    [TDD - Harry Potter Kata] How to properly TDD this Kata applying OO Design?

    Posted: 17 Jun 2018 04:07 AM PDT

    Hi folks, this is all about the Harry Potter Kata. If you haven't heard of it please take a look here first.

    I would like to start a constructive discussion on how to approach "complex" logic problems using TDD and OOD principles.

    I tried the Kata myself trying to practice my TDD skills.
    I started with a couple of behaviour tests but I ended up completing the logic without following TDD. I also think that my approach is procedural and not OO.

    My approach is here (Any constructive comments are more than welcome)

    What do you think? Have you tried this one? Any thoughts or screen casts on a TDD approach would be very much appreciated.

    Thanks

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

    How to let users upload files to my google drive?

    Posted: 17 Jun 2018 07:47 AM PDT

    Have website. Have Users. Have Google Drive. Don't have connection between website and google drive.

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

    Question about WebSub or SubPubHubbub?

    Posted: 17 Jun 2018 03:22 AM PDT

    What is going on with this standard? Why nobody is using it? Has there been a better alternative?

    I was looking for Youtube and Medium API and they are both using this standard... but most of the libraries in https://github.com/pubsubhubbub/ are outdated.

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

    Launch Menu for Steam?

    Posted: 17 Jun 2018 01:02 AM PDT

    I play a lot of games on steam, sometimes needing multiple versions. I was wondering if it was possible to code in an option similar to some games asking you if you want to play in safe mode at launch where I could have multiple versions of the game installed at once.

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

    Java Jackson2 infinite recursion

    Posted: 16 Jun 2018 11:22 PM PDT

    So I have a Spring MVC application that uses Jackson2 to fetch data from my Repository and have some fields that are self referencing. Posted the question on Stackoverflow and also tried to fine the answer. If anyone more experience could shed some light on this matter, that be great!

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

    No comments:

    Post a Comment