• Breaking News

    Thursday, June 7, 2018

    What music do you code to? Ask Programming

    What music do you code to? Ask Programming


    What music do you code to?

    Posted: 07 Jun 2018 04:04 PM PDT

    Or what music do you generally like? I'm trying to see what other programmers listen to.

    I like to listen to Drake, Coldplay, Fleetwood Mac, and some other 80s rock music

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

    Math Question: How to project plane from 2D into 3D and find intersection with line?

    Posted: 07 Jun 2018 10:57 PM PDT

    First off, I created a little illustration to help show what I'm trying to do, hopefully it is helpful.

    I'm not much of a math person and I am sure there already exists an equation to do what I am trying to do so hopefully someone can help me out with this.

    What I want to do is project a plane from the 2D Y position of the mouse into 3D space along the camera's normal. Then from a known line (the dashed blue line) find the point (point XYZ) where that line intersects the plane (orange) projected from the mouse position. I know the position of the dashed blue line as a XZ position in 3D space, it should always run parallel to the Y axis.

    I know the position of the mouse in 2D and the normal direction/angle of the camera. I am using an orthogonal camera if that makes a difference.

    I can't quite wrap my head around how to take this information and create a 3D plane. I think I understand how to test where a plane and a line intersect but any explanation there would be helpful too! I'm not great at math so keeping it simple would be much appreciated.

    Any help you can offer is great! Thanks!

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

    Advice for a new Associate Software Engineer (.net developer oriented)

    Posted: 07 Jun 2018 04:16 PM PDT

    Hello, I recently joined a company after graduating from an Electronics with Computer Science course from University as an associate software engineer towards .net development and will be starting in a month time.

    I wanted to know what programming languages i need to know beforehand so that i do not end up as a mess on my first day at work since this will be my first experience.

    These are the languages and respective IDE that I have used during my university course and projects :

    Languages Learned:

    • Java [ Netbeans IDE ]
    • C [ Arduino IDE ]
    • C++ [ Codeblocks, Arduino IDE ]
    • SQL [ PostgreSQL ]

    Projects Performed:

    • IoT arduino related ( C and C++ )
    • UDP/TCP File Transfer ( Java )
    • Indoor Positioning Systems using RFID and UDP ( C++ ,SQL and Java )

    I am currently reading and learning C# as it seems to be the common language of .Net programming.

    I looked up on videos on Youtube where I seen tools such as Xamarin, LINQ, Entity Framework, ASP.NET MVC, WPF and Xaml

    Is there any other programming language and toolkits that I should be aware and learn beforehand ?

    If i were to try to code using visual studio which seems to be really large upon download :/ which package do i only need to code normally for examples and learning ?

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

    I dont know what to use to make this kind of program! Please help!

    Posted: 07 Jun 2018 09:39 PM PDT

    Hey guys! I need your help to know what modules, programs should i use to make a program that sends PID data to a physical process through Arduino and receive data from it (to show it in a graph for example) as well.

    The screen should be interactive, and with that i mean switches that can be shown as "on" and "off" for example.

    All my knowledge is on python, django and a bit of JS, HTML5 and thats it. For what i know i should use Java but i know nothing about it, so i wanna know:

    What should i use in case of developing in Java? (processing?)

    What others alternatives do i have?

    Can i use Django with React JS? Is that possible?

    I tried PyQt5 but it seems that i cant create objects (switches, leds) and make them response to a certain function.

    Thanks guys!

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

    Strange packet forwarding behavior

    Posted: 07 Jun 2018 01:06 PM PDT

    I have a packet interface that takes in packets over a socket, processes them, and then send them back over using scapy.

    I have a strange behavior where only ping packets (ICMP) are very variable and cause huge delays. Going from ~140 ms to >1 second. I am processing all packets the same way.

    Any idea what is different about ICMP packets?

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

    Is there a global number updated near continuously, only for proving order of events which works even under pressure of war, cryptocurrencies, etc (which it would always be)? I may have to rely on thermodynamic time (random turing machines salt) if no such system is in wide use

    Posted: 07 Jun 2018 06:34 PM PDT

    A number of course means not a whole blockchain, nor a website controlled by a conflict of interested entity such as one country's few time servers etc (which dont even do the job since you cant hash other data referring to what a website said anonymously but didnt sign)?

    I cant help people organize computers etc if they cant quickly agree on time.

    Control of time is a big conflict, such as stock prices and twitter on a delay.

    Since I am not aware that basic measuring of time is under anyone's authority, I plan to either hook into an existing system which can withstand a blockchain and botnet attacks (both expected on all blockchains etc) or have to build a minimalist blockweb (no central chain) which decays its own data with a greater force of logic than the pressure to put data in and have it be reliable (instead, statistical). Time must decay else a blockchain just sits there without peers continuously querying it for what happened before and after what else.

    I must protest the way time is used today, as a number which is no good to anyone after one person sees it, because instead time should be a thing any number of people can know they are looking at the same reference to a time. Without that, only facebook etc knows what time you did things, and nobody will say things to you at a time without going through facebook because, who would know when it happened, years ago and some advertiser is just sending it to you again? And where would you look for it if not at some time or place it occurred? It should be illegal for a business to display time to you which you cant communicate to others, so then you depend on their clock as an authority over your data, or on a huge blockchain software as an authority over your computer, when all you wanted was the state of the world when a thing happened, which you can mention to others or copy/paste. Instead its in somebody's computer network.

    I dont really care that they're just stuck in their ways of time is just something you say, but the common practice of every business having a different time HAS TO STOP. They each ask the other for their time, like it could be different, to get a copy of it out of their computer, which they cant use anywhere else.

    And the damn blockchains are so slow and complicated, that people dont care to use their names for times and states of the world then. Shit, you've got to download 100s of gigabytes, and then nobody wants anything to do with it. All you need is half a sentence worth of things that uniquely describe when and what was around. Its in those blockchains. They know what its for. So do military networks they've got swarms of automated things that I would be very surprised if trusted a plain number. GPS isnt always reachable. computers have millionth of a second clocks, which I often use for sound timing etc.

    Problem is, who would believe a name for a time that just some guy showed them if other parts of the world werent in on it. And someone might create such a thing before it occurs and just not show it to others until then, so then they did something in the past but supposedly prove they did it later. If someone can prove they predict a thing well, thats a valuable asset, can grow it into more people looking for your predictions which you can then trade or mention other things they might go try. This is why so many want to keep your time records for themself, so only they can make predictions with your help, like taxing you.

    I've tested code for daylight savings equations, got some systems off gregorian primary storage cuz its buggy between an hour at night when things can break... yet, I've heard nothing about basically a url or an id number, for specific times. I know many are using these, but they believe events dont happen in time, events happen under them.

    Earth is big enough that internet lag does happen because light wont go any faster, through optical wires the longest, a little from cell towers. So it is a practical need that one side of the earth vs the other refer to the things around at the "time" instead of waiting for the other side of the earth to feel those events, because your games do lag slightly noticably because of this, on top of having to wait on it to cross that distance, you have to wait for a bad sync because each side computers view it as they're just slow so put the slightly wrong time that locally we recorded it. If we had an agreed on names of times near continuously, we'd only have to wait 20 milliseconds for those right next to us, because whatever is farther away has nothing to do with us yet. They're not lagging. They are a range of times from here, from when we heard them last, and when they will hear us next, both are where they are from here, both directions, and to a lesser extent, any other path such as back and forth many times and get there a week later having mostly turned to echos.

    Its frustrating, because these many businesses etc do it to hold control, this is why we dont use the same time everywhere on earth not to mention the slight lag from being far away. They believe they paid for their clock and you shouldnt be telling other people to go look at their clock who dont have an account with them, especially when it might be a million people bittorrenting a file that says some event. Then you have to pay them for the time information to send to each of those millions of people every 1000 times they automatically try to download it.

    A clock isnt exactly a munition, but it is able to piss off half the world by competing with their local time where your stuff is. People will still use those services, but they'll more often pay us to participate so other people will too, aka social capital, because the clock is part of the internet, and the internet can hold almost any kind of thing.

    I dont believe in this number people keep saying to me, because when I say it to others, they cant use it like they copy/paste urls to facebook etc. Its not a real thing in the world you can point someone to.

    Here's the problem, it seems: 3:00 tomorrow does refer to some time we can mostly agree on, but it doesnt exist yet (or not much), and still its there, so I can just say I did something then, when in fact I did it now, and time is not doing its job of telling us when things happened. Thats clearly not the name of what time will be tomorrow, "that time we did x y z", but if I say "that time we did x y z" in bittorrent to a million people, WTF is that, its not on my clock or in my computer, so must be his local time he should only tell his friends. We dont actually have global time.

    I mean it physically that whats around at the time is part of that time. Thats what things connect to, where we navigate from. If I go somewhere then come right back, I am at the "back" mostly but slightly still in the before I left, as seen from the somewhere which I'm just as far from either direction. This may seem like semantics, but at both of these times you can act on things, limited by they are more stuck the farther behind, and more loose the farther ahead, because there are more possible futures than possible pasts, which anyone speculating about the future knows but says theres only 1 past. How am I supposed to be one continuous path between myself over recent times, so I might through my continuous brain that travelled with me the whole path, decide based on one time to do something another time I'm still slightly at even if mostly stuck? I dont know, but if we had a word for places and times that arent right now, which is the same word they use locally (like before I left, now that I'm back), maybe I'd decided yesterday to when I see that name of a time, to do something or another, and maybe yesterday I also decided to when I see a later name of a time to do a different thing, and that thing is to check how loose or tight events are and if the previous name of time is not entirely stuck yet, then if I am able to make the future more stuck, maybe one thing gets less loose and the other gets more loose. It seems to happen that way sometimes, such as when the way a coin lands (such as in iching) sometimes is slightly influenced by having planned to do one thing or another in the future depending how the coin lands, then while its in the air, slightly change the chance or amount that thing would be done if it lands heads/tails, and that looseness/tightness being therefore depending on that physical coin and when and where I will be soon after it lands, a force happens between where i slightly may tend to be then and the coin is pushed, in rare cases, by that change. If a coin can change the future, I dont see why the future should not change the coin, since its common sense they have some kind of connection, and I dont believe force applies opposite but not equally. The force is damped by there being a tighter more stuck past, and the future being easier to push, but just because you are leaning against something doesnt mean theres nothing behind you existing at all. Like a soliton wave (such as in a whip or some sounds or they occur in space rarely) we exist not just at the middle where we are mostly but slightly behind and slightly ahead like a bellcurve shape mostly.

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

    Python free online course (Advanced) needed !!

    Posted: 07 Jun 2018 05:23 AM PDT

    So i just finished an online course which was Python for absolute beginners, and i liked it , but i'm looking for more, so i was wondering if anyone can recommend a more advanced Python online course (please be free).

    Thanks,

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

    Interesting open source self-hosted web projects to contribute to.

    Posted: 07 Jun 2018 01:09 PM PDT

    Looking for interesting code bases to explore and possibly work on in a similar vein to self-hosted projects like [Rocket.Chat](https://rocket.chat/) and [Gitea](https://gitea.io/en-US/). Any recommendations? I would especially be interested in ones written in Python.

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

    Best way to manipulate docx files

    Posted: 07 Jun 2018 10:39 AM PDT

    I have a bunch of Word documents that I would like to edit specific keywords in. These documents are basically templates that I use to create a final report. I do the same report probably 20 times a week and it takes me almost 3 complete days to do. I am looking to automate this process to some degree. The docs all have these fillers like {date} and {task name} . I want to be able to replace all of these keywords all at once instead of editing every single document manually. I tried to do this with python using python-docx, but I don't believe that this library has support for replacing words, only for broad changes. Is there a different python tool? Is there a completely different language/framework that has this tool? Would it be better to turn these word docs into PDF files and manipulate them from there?

    Thank you for any feedback.

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

    My consultancy is asking me to show fake experience. What should I do?

    Posted: 07 Jun 2018 08:51 AM PDT

    I have about 7 yrs experience in financial services industry. Post this I have a gap of 5 years in my career. Last year I decided to change my industry and got self trained on web development. Last month I joined a consultancy as UI developer on contract. They mentioned that I will be placed at their clients location on contract. Now they are asking me to fill my career gap of 4 years with fake experience in web development and pushing me to attend interview at client's location.

    What should I do in this situation?

    If I the consultancy shows 4 years experience for me and pushes me to the client. Wouldn't the client expectation from me would be that of an experienced developer. I am not sure if i can perform at the same level as an experienced developer.

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

    Help with multiple instances of schema markup on one page.

    Posted: 07 Jun 2018 12:13 PM PDT

    A recent blog post has 3 separate recipes, so I wrote in schema.org/Recipe tags for each recipe and wrapped each recipe in it's own div with it's own unique id… the problem: Pinning recipe #2 or #3 grabs the markup from recipe #1 (assuming because it's the first instance on the page). I'm assuming there's a simple fix for this, but I just can't seem to figure it out. Thanks in advance.

    Example markup for the recipes: https://gist.github.com/hufort/0bf4e28b6bbee69240f7d8cd14967896

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

    Automating a big but simple task, with simple tools - How?

    Posted: 07 Jun 2018 12:05 PM PDT

    Hello,

    I would like to automate a simple task, but I'm not sure how.

    I have a bunch of files, which I would like to sort into 1 or 2 folders.

    • I want to make a list of like 5-10 words, or perhaps a few short phrases.
    • I would like to have this script/program/? be able to look inside of a file, search for any of those words or phrases.
    • If any are found, then move the file to folder 1.
    • If none are found, then move the file to folder 2.
    • Repeat for the next file.

    This would really help to automate a large task. I'm just not sure what language, or program, etc. to do this with.

    The files are made in windows, and read on windows, but I can drop them in notepad. While they have a lot of NULL markers and such, I can see ascii text which do say X words or phrases which I am looking for in each file.

    I just want to be able to automate this and save my sanity.

    If someone could point me to some tools, or better, methods in which this can be accomplished, I would really and sincerely appreciate it.

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

    What would it take for browsers to have a Uint8Array called "myWritePublicReadLiveAlways", of chosen size from a js object, and for other browsers to call read("some way to refer to that browser") so multiple javascripts could, you know, be computers instead of displays.

    Posted: 07 Jun 2018 06:14 PM PDT

    There could be a mode where it cant access other things while doing that, such as websites that consider the browser part of their internal system

    browser is supposedly a sandbox, so why does it matter what happens in it?

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

    Help with unit testing in react

    Posted: 07 Jun 2018 07:33 AM PDT

    I hope this is in the right place. I am trying to find help for a specific use case for unit testing a function inside of a react app. To preface this, I am not terribly great with web development yet. I am sure I am going to sound like I am an idiot but here it goes.

    I work for a company that is utilizing react as part of their tech stack. I can't actually post the code but I can make a pseudo code example that I hope gets my point across.

    https://pastebin.com/0B6Yz0LC

    Lets say "myFunction" highlights text inside of a paragraph tag with an id of "paragraph". I want to create a unit test that tests to make sure that what it is highlighting is actually what the search term "word" is.

    All of the examples I have found online do not seem to allow me to reference the function within the class.

    I don't need any help with any of the logic behind the test, I just need help with how to actually reference this function within the component in a test file. We are using jest and enzyme for testing but I can't find a single working example in the code base of a test involving the testing of a function within a component.

    How would I go about calling this function? I know this isn't clear in my example but the function itself is not referenced as a prop in the render(), it is set as the search type in componentWillMount which is set elsewhere in the codebase.

    Please help if you can! Thanks!

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

    What design patterns are you expected to know in interviews?

    Posted: 06 Jun 2018 11:28 PM PDT

    What are the best design patterns to prepare for interviews ?i recently started focusing on design patterns and feel they are quite useful. However, I realized that there are more than 23 design patterns and it is not possible for me to memorize all of them in the next few weeks. Even when I do memorize some they get mixed and I forget. At the moment I know half of these design patterns but I forget them or sometimes mix them.

    I know that some people say that they will only ask me for singleton or they will only ask me which patterns I knew. But there was a case when someone asked me for the state pattern and I did not remember the implementation.

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

    Job + university

    Posted: 07 Jun 2018 02:59 AM PDT

    I found a job where I could work as Spring developer (part-time), but I am also a student at the university (computer science) and i am affraid I would not get my degree. Should I start working right now (to get experience in software development) or should I rather wait till I finish my degree (2 years) and get better at it? Do you have experience that you work and study successfuly?

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

    A big request

    Posted: 07 Jun 2018 04:43 AM PDT

    Hello! I'm looking for someone that would take me on as their disciple and teach me the programming language C.

    I know this is a big and a pretty unreasonable request but I really want to learn it and I don't have any way to learn it without asking the public since I can't find any way to learn it (Not as a professional matter like a real job).

    I want to learn it from a person that is about my age + - (16+) and will actually be teaching me for the sole purpose of teaching someone.

    I'll gladly thank anyone that even responds to this post.

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

    No comments:

    Post a Comment