• Breaking News

    Monday, June 3, 2019

    Has anyone seen intentionally "evil" code in production? Ask Programming

    Has anyone seen intentionally "evil" code in production? Ask Programming


    Has anyone seen intentionally "evil" code in production?

    Posted: 03 Jun 2019 03:32 PM PDT

    Has anyone seen code that was meant to do something misleading, against the law, morally corrupt, or simply to take advantage of the situation? For example, I think back to Bill Gates and how he programmed himself to be in the classes with the girls he found most attractive.

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

    Open-source projects in need of good documentation?

    Posted: 03 Jun 2019 05:20 PM PDT

    I'd like to move into technical writing and would like both practice and a portfolio by creating excellent documentation for open-source repos that need it. If you know of a really worthwhile project that is being hampered by poor documentation (could be your own) please let me know.

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

    How do you navigate the language barrier?

    Posted: 03 Jun 2019 03:10 PM PDT

    I recently started my first programming job and many (~50%) of my coworkers are Indian. Some overseas, some here. They are great coworkers but a large number of them do not speak English as their first language and/or have very thick accents. What is the best way to make our interactions more productive without offending anyone??? I feel bad when I can't understand them and ask them to repeat themselves more than once.

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

    Burnt out, lost my desire and afraid that I am sabotaging myself out of the industry

    Posted: 03 Jun 2019 12:21 AM PDT

    Listen, I can clearly see that this sub is for general programming questions, but I've got a different kind of question.

    I am burnt out. I feel like my skills are deteriorating and I have no desire to program at all. It used to be my number 1 goal and I would spend 8-10 hours programming, designing and architecting. I had a couple jobs go to shit and the allure of the industry is gone. I am tired of being lied to by recruiters and clients, tired of being pushed too hard and tired of sitting in front of a screen for 8 hours of my day. Nothing interests me anymore, I couldn't give a shit about the framework or library of the day. The only thing that remotely interests me anymore is systems programming and old C bullshit and hacks. I don't have a degree so I don't have the background to do that anyways. I've been in the industry for 7 years and it seems like the breaking point is now. I am sick of this industry and all of the shit it brings and the corporate nonsense and the never ending fetishizing of big N. I tried to go on my own but the clients I unfortunately found myself wrapped up in turned out to be another huge crock of bullshit. I've had interviews with the ol' Big N and failed miserably, couldn't even understand what the guy was saying (guy had the heaviest accent I've ever heard). When I still cared the pressure was so much I started abusing drugs. Thankfully I stopped.

    So to my question, is it over for me? Is there anything still here or should I do something else to make money? I absolutely detest web and app development. If you have felt like me, is there a light at the end of the tunnel? I'm pretty sure at this point I just want to take my ball and go home...just seems like such a waste of my life to learn all this for nothing. Are there any recommendations to get the spark back? I feel like I need to find an old IBM PC just to fuck around with and see if I can get into loving controlling the machine again...anyways apologies for the question and wall of text before hand.

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

    I need help with some code on Java (noob question)

    Posted: 03 Jun 2019 06:15 PM PDT

    I am new to the programming world and as my first project I want to build a calculator. The issue is that when I want to use the if function it doesn't work well for some reason. Can you help me?

    Some expressions are in spanish because it's easier for me to write it like that but the meanings are:

    numerouno= numberone

    numerodos= numbertwo

    operacion= operation

    suma= plus

    resta= minus

    import java.util.Scanner; public class Prueba2 { public static void main (String [] args) { Scanner keyboard= new Scanner (System.in); double numerouno, numerodos; System.out.println("Ingresar primer numero"); numerouno= keyboard.nextDouble(); System.out.println("Ingresar segundo numero"); numerodos= keyboard.nextDouble(); System.out.println("Ingresar tipo de operacion"); String operacion = keyboard.next(); String suma = null; String resta= null; if (operacion == suma) { System.out.println(numerouno + numerodos); } if (operacion == resta); { System.out.println(numerouno - numerodos); } keyboard.close(); } } 

    Thanks for your help!

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

    Clarification of how HTTPS Certificates work.

    Posted: 03 Jun 2019 12:55 PM PDT

    I'm working with embedded systems and am communicating via a cellular modem to various HTTP API endpoints. I have never implemented TLS/SSL for HTTPS before, just HTTP.

    What I am confused by, is the role of certificates. My modem (SIM7600) allows for certificates to be loaded onto it. But the examples for making HTTPS POSTs mention nothing about actually using the certificates. As if they aren't needed? Is this possible?

    What is the exchange that is actually going on between the devices? When I buy a brand new computer, with a fresh OS install, how does it get its initial certificate? Thanks!

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

    Time Travel (Breadth First Search)

    Posted: 03 Jun 2019 04:30 PM PDT

    Hi.

    I have a problem. Stewie wants to travel from 2019 to 1889 but has only 3 options to travel time.

    He can either take the current year and add 7, multiply the current year 2 by to or if the current year is divisible by 3 he can divide the current year by 3. I have to find the shortest amout of time jumps possible to get to 1889 by using BFS.

    I am stuck with making a program and would like to ask you for any tips you can give me.

    Thank you very much

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

    Simple question about displaying user input in React

    Posted: 03 Jun 2019 03:17 PM PDT

    I'm new to programming altogether and just started learning about React last week, so I wanted to try converting a simple JS app. It seemed easy in JS, I'm not sure how to do this in React.

    I have a simple form with two inputs, one for text and one for a number(x). I want the user's text input to be interpolated in a greeting and displayed on the screen x amount of times.

    Is there a simple way of saving the message as a variable and then displaying the message back to the screen after an onSubmit event?

    Thanks for any help or advice!

    codesandbox

    Here's my code:

    class App extends Component { constructor(props) { super(props); this.state = { name: "", numOfTimes: "" }; this.onChange = this.onChange.bind(this); } onChange(event) { this.setState({ [event.target.name]: event.target.value }); } render() { return ( <div> <form> <label> Word: <input type="text" name="name" value={this.state.name} placeholder="Enter a Name" onChange={this.onChange}/> </label> </form> <form> <label> Repeat: <input type="number" name="numOfTimes" value={this.state.numOfTimes} placeholder="" onChange={this.onChange}/> </label> </form> <form> <input type="submit" value="Display Hello!" onClick={this.onChange}/> <input type="reset" value="Reset" onClick={this.onChange}/> </form> <div> Hello {this.state.name}</div> </div> ); } } 
    submitted by /u/justfIuff
    [link] [comments]

    Need to create a sum count while RETAINING all fields

    Posted: 03 Jun 2019 03:00 PM PDT

    I have the following data frame (in R):

    Ticker Date rec_count

    A 1/1/2019 1

    A 2/1/2019 1

    A 3/1/2019 1

    B 1/1/2019 1

    B 2/1/2019 1

    B 3/1/2019 1

    B 4/1/2019 1

    And I want to create a sum count of records by date and RETAIN all records, so it looks like this...

    Ticker Date rec_count sum_recs

    A 1/1/2019 1 3

    A 2/1/2019 1 3

    A 3/1/2019 1 3

    B 1/1/2019 1 4

    B 2/1/2019 1 4

    B 3/1/2019 1 4

    B 4/1/2019 1 4

    I am a new user and have scoured the internet and all my books looking for an answer. I apologize if this is an elementary question to some of you.

    Thanks.

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

    Equivalent program in your favorite programming language, code golfers welcome.

    Posted: 03 Jun 2019 10:47 AM PDT

    program simple; uses crt; begin while true do begin write('.'); if KeyPressed and (readkey = ^C) then Halt; end; end. 
    submitted by /u/HeWhoWritesCode
    [link] [comments]

    Finding a letter in a word

    Posted: 03 Jun 2019 01:40 PM PDT

    Hello, I need some help with a hangman program I am coding in actionscript.

    So basically what I'm trying to do is make a function that searches a string (currentWord) and returns whether or not a specific letter that the user inputs (chosenLetter) is in the word.

    Also, it should be able to tell me how many times that letter is in the specified word. I am new to flash and I really can't figure this one out.

    Thanks in advance! :)

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

    API Consumer Best Practices

    Posted: 03 Jun 2019 10:59 AM PDT

    Hi There,

    What are some design patterns that help designing connection to multiple API endpoints, most of the posts here I see are how to design an API.

    Can you please share your thoughts on how to architect a maintainable large project that connects to mutlople sources?

    Thanks

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

    Returning Sound Level in C++

    Posted: 03 Jun 2019 09:39 AM PDT

    I am looking to write a small program that listens for sounds coming from a specified application. I do not want to record or listen to any sound waves, just the sound level of the sound being played. Is there a function for returning the noise level of a sound coming from the computer?

    For example, I would like to have a youtube video playing and have the program write to a log if the volume of the video gets higher than a certain level.

    Sorry if this isn't worded well, if there is any additional information that will help let me know and I will add it.

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

    How would you change/build your org’s dev-team structure and procedures?

    Posted: 03 Jun 2019 06:13 AM PDT

    If you could change your team's structure (org chart, reporting, etc) and processes/cycles (agile/Kanban, git, Jira, points systems, etc), how would you do it?

    i.e. what really irks you about it and how would you resolve it?

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

    Recursively access elements in an ordered STL vector of data to build a balanced binary search tree

    Posted: 03 Jun 2019 05:40 AM PDT

    Hi,

    Say Ive got a vector that is 100 elements long, Im trying to figure out how to get the middle element first followed by the middle element in the range 0-middle, followed by element at the middle of middle-end etc etc until all of the elements of the vector are inserted into the bst, but I cant quite figure it out. Can anyone point me in the right direction please?

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

    I need to provide a URL to a content provider to consume a webhook. Are there any off the shelf solutions for this, so I don't need to sort it out all myself?

    Posted: 03 Jun 2019 05:17 AM PDT

    I know of one soluton- zapier- unfortunately it takes them 15 mins to respond to incoming hooks. I need something that is instant.

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

    Passing authentication parameters to power-bi report service on a server

    Posted: 03 Jun 2019 04:32 AM PDT

    Hi, I'm having a server with 'power-bi' reporting service installed and configured on it, and from my front-end that hosts the application, I've got 'angular 7' with proper 'power-bi' components installed.

    Since the report is on the server and it needs authentication to login, i get a user and password fill-in prompt in my website whenever i tries to access this report, and after logging in, i can see the data of my report.

    My question is how can i set-up that username and password to login automatically without asking the user to enter them every time. any help would be much appreciated.

    P.S: i don't want to use 'Kerberos' to solve the issue.

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

    Do UDP packets arrive in order in a single switch network?

    Posted: 02 Jun 2019 10:04 PM PDT

    According to the web, UDP packets aren't guaranteed to arrive in the order they were sent. I could imagine that being true when packets travel through multiple switches/routers and therefore there are multiple alternate paths between the sender and receiver.

    Is that still true for simple networks, such as you would find in your home with a single switch that coordinates the traffic between a bunch of devices? What would cause packets to arrive out of order?

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

    No comments:

    Post a Comment