• Breaking News

    Sunday, August 9, 2020

    I want to (re)learn math before I learn how to code. Is pre-calculus a good start? Ask Programming

    I want to (re)learn math before I learn how to code. Is pre-calculus a good start? Ask Programming


    I want to (re)learn math before I learn how to code. Is pre-calculus a good start?

    Posted: 09 Aug 2020 03:20 PM PDT

    Hi all,

    I want to learn to code, but first I want to learn how to be proficient in math. Is pre-calculus a good place to start? Should I also learn physics?

    Thank you for reading!

    Edit: Thanks for all the replies so far! I've been asked "what my goal is" and to be honest I'm not sure. I would like to work on PC applications, rather than web development or apps. I think? I'm simply wanting to learn to code for better job prospects one day.

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

    Is integrating Webpack into an existing complex Django app a fool's errand?

    Posted: 09 Aug 2020 12:30 PM PDT

    Hi all!

    I just started a new job, and our codebase is a 10+ years old and built in Django/( ES5 + Knockout.js ).

    Most of team is open to moving to newer FE frameworks, as long as we can move slowly and integrate seamlessly enough.

    To me, this starts with a Webpack integration. This will likely be a single-developer task (me), and before I start doc diving I want to ask people who have potentially 'been there.'

    I'm not looking for a deep dive or how-to or anything, I'm happy to do my own research. I'd just like to know the broad-strokes of what this will look like and how much developer effort it will take. Is it a fool's errand to assume a single developer could do this in an appreciable amount of time?

    .

    TL;DR: Is it possible to integrate Webpack into an existing complex Django/Knockout codebase, and essentially have nothing change for the end-user? Would this involve heavy template or component re-writing, or can we just drop webpack anchors into templates and have everything 'just work' for the most part with some webpack config magic?

    EDIT:

    Is it possible to essentially have our current application as it is now, but bundled with webpack? Can it be done with minor editing to the .js/.htm/.html/.css files as they are now ( eg dropping webpack anchors into templates ), and some webpack-config-fanciness , or is this more in the magnitude of completely re-writing templates or components to get everything playing nicely?

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

    Senior programmers, What do you do when total years of experience jeopardize the job opportunities ?

    Posted: 08 Aug 2020 11:32 PM PDT

    I am senior software programmer who has 10 years of experience. But the technology I am working mostly nowadays is only 4 years old. This technology is hot in job market. But I cannot move to a new job with same technology, as my total years of experience not only adds any value but also its stopping me from getting those jobs. Companies can just hire people with less number of experience who can do the job for less salary. I am the kind of person who doesn't want to become some kind of manager and keep working as a programmer. But as years passing its really getting hard for me. Does any body faced same problem like me ? How did you overcome that problem ?

    submitted by /u/instant-sherlock
    [link] [comments]

    [C#] Build, compile, CLR, CIL, CLI

    Posted: 09 Aug 2020 07:21 PM PDT

    I just want to make sure I understand it correctly.

    1. When they say "build" it actually means compiling?

    2. C# compiler compiles C# code into IL, intermediate language

    3. When we run the program, CLR's VES - which is based on CLI specs - executes the program by converting it into the machine code.

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

    Searching for python library

    Posted: 09 Aug 2020 10:10 AM PDT

    Hey,

    I'm trying to find a library that lets the user interactively through a GUI in a django project (html->javascript->Python)...

    • create and label nodes and edges between them (e.g. per mouse click)

    • define clusters over nodes

    • define edges between clusters

    It also has to let me / the admin...

    • read user input i.e. iterate over nodes and clusters and read the labels

    So for example, if the user "draws" a graph "( A -> B) -> C", I want to get this information from the html interface to a python backend.

    Hope someone can help!

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

    Help with Python Code

    Posted: 09 Aug 2020 04:53 PM PDT

    I am programming on the Raspberry Pi 4 in Thonny (Python) and I am building a door alarm. I have an RFID, fingerprint, and passcode unit with a built-in relay, a magnetic reed switch, a keyed on-off switch, a remotely-controlled relay, a 20x4 character LCD, and a 12-volt alarm. I have everything somewhat working so that if the key is on and the remote relay is on, the system checks the RFID unit, and if that is okay, then the magnetic reed switch. If the reed switch closes (door opens), it will trigger another relay that will turn the 12-volt alarm on.

    I also have buttons connected that will control how long the alarm will keep going after the door is shut. One button needs to make the alarm turn off as soon as the door shuts, and another needs to keep the alarm going until the RFID unit is triggered. I had it working so that one button will shut off the alarm as soon as the door closed and the other button would shut off the alarm after the door has been closed for 6 seconds.

    I want that 6-second button to be something like 10000 seconds so that the only way to turn the alarm off after the magnetic reed is by triggering the RFID unit. Any help?

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

    Moving to Windows from Mac. How do I get Windows Terminal Preview to duplicate the current path in new panes and tabs, like iTerm2 does?

    Posted: 09 Aug 2020 12:51 PM PDT

    I'm coming from using iTerm2 on the Mac, so I'm pretty new to Windows, let alone programming on it. iTerm2 was very convenient in that it opened up new panes / tabs on the same path that I was in. For example, if I were in the path $HOME/projects and opened a new pane or tab, it'd open in the same path (i.e. $HOME/projects).

    But, if I were in $HOME/projects in Windows Terminal Preview, and I opened up a new pane or tab, rather than opening up in the current path $HOME/projects, it'd open up in Users/joshd. I can't find any sources that point to a way to edit the configs to make new panes and tabs open up in the same path as the current path I'm on. I'd really appreciate some help on this! My current keybindings are below, for reference.

    "keybindings": [ { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "paste", "keys": "ctrl+v" }, { "command": "find", "keys": "ctrl+f" }, { "command": { "action": "splitPane", "split": "vertical", "splitMode": "duplicate" }, "keys": "ctrl+d" }, { "command": "closePane", "keys": "ctrl+w" }, { "command": "closeTab", "keys": "ctrl+shift+w" }, { "command": { "action": "newTab", "index": 1 }, "keys": "ctrl+t" } ] 
    submitted by /u/Mofumoku
    [link] [comments]

    A problem with C++

    Posted: 09 Aug 2020 03:09 PM PDT

    Hi.

    I'm learning C++ but I don't know what to do knowing this language. I know I can create programs but I also hear that it's posible to create games for CMD.

    The problem is this, I'm learning from this videos (in spanish because I'm spanish). This videos aren't enfoced to create games. And my question is, after learning C++ from this videos I could be able to create CMD games or I should learn more but then about the creation of games?

    And before some saying: "Better learn C# and use Unity." I need to explain that my computer does not support any game engine.

    Thank you and sorry if my English isn't very good -_-

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

    Would a linked list work for a queue or should you just use a different data structure entirely?

    Posted: 09 Aug 2020 03:01 PM PDT

    A linked list seems to be perfect for a stack as whatever headPtr is pointing to represents the top of the stack - But since a queue is FIFO you would have to traverse the entire list to get to the first one to take out which seems unnecessary.

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

    Compile C source into DLL with CLI

    Posted: 09 Aug 2020 02:36 PM PDT

    So this has been a piece of shit to figure out for no apparent reason. I want to compile a c source file into a DLL to be used by the CFFI in Python(it's important it's compiled beforehand, hence DLL seemed like a logical option on windows systems).

    I know there is a tutorial on creating a C++ DLL in the official Microsoft tools documentation, but this is not what I want. I don't want to use an IDE because it obscures what I'm doing behind an annoying GUI. It also creates a lot of bloat in the form of a "project" I really don't care about. I think Visual studio uses the g++ compiler.

    How would I go about building a DLL from a source file and a header? What steps are involved? I've looked everywhere but all forums just point towards the Visual studio C++ tutorial I explicitly don't want to use.

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

    How feasible is it to learn how to program a USB microcontroller?

    Posted: 09 Aug 2020 03:07 AM PDT

    I am in need of a ton of keyboard shortcuts for my work. For example, I have a logitech g600 mouse and a Tarturus gaming keypad that I fully use. I can't use the gaming keypad as well as I would like because it doesn't have on-board memory and my work computer is extremely locked down. Putting the software for the keypad on my work controller would be a definite no. I would love to program a controller that I could plug my keypad into that would take the default inputs and then send a selected output to my work pc via USB. I have the time to wade into this but if its a huge project I should probably just be happy with what I have. Additionally, I have to use a proprietary microphone - if I could sniff the signals it sends and add those to my microcontroller outputs I would be in heaven. I have an old laptop I could use for this but wouldn't mind buying a rasberry pi or anything else.

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

    Having trouble with Pymongo for a web project using PyCharm compiler.

    Posted: 09 Aug 2020 02:01 PM PDT

    I am currently trying to learn python through some video lectures. The current project is build a blog like website on the local host. A feature of the website that I am supposed to be making is a login and register function with the user information being stored using pymongo. Both the login page and register page load and seem to work but I am not logged in or appear to register the info I just submitted. I believe the problem has something to do with how the pymongo/ pymongoDB Compass are set up. I know that I have it downloaded and its running because I have to open the shell through the command prompt. I don't know if the issue is with how the data is stored and it can't retrieve it or if the data isn't being stored to being with. The video lectures I use the professor uses IOS and not windows so there are differences in how they set it up compared to what I'm doing so I'm not sure if I made it so that the compiler is sending the information to the right area. If anyone knows how to make it so that pymongo and pycharm are sharing and storing data correctly that would be helpful or if you know of any good tutorial videos that can help me navigate how to set up the connection it would be appreciated.

    submitted by /u/Wiseman-no
    [link] [comments]

    any idea how do i get the uBlock Extension strict blocking page to stop showing up but still doing it's functionality in the background?

    Posted: 09 Aug 2020 01:49 PM PDT

    i am using a page that asks for turning the ad block off and even if i bypassed that the page doesn't function properly so i don't have any option than turning it off so i did ... but the problem is that it shows pop up ads and the ublock blocks them using strict blocking which makes it annoying as the real pop up.
    https://i.stack.imgur.com/Z3MHs.png

    any idea how do i get it to stop showing that page without turning the feature off for any site ?

    maybe using tamper monkey or something ?

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

    What kind of tests do you write for tools that create files from templates?

    Posted: 09 Aug 2020 01:39 PM PDT

    It's a tool for my company to write configuration files and documents in general, boilerplate. The API looks like:

    ./tool1 create-document -type LICENSE -title TITLE -body BODY -header HEADER -footer FOOTER DOC.TXT ./tool2 create-config -validate TRUE -lint TRUE -file FILE.CFG 

    My co-worker wrote tests that are like a mirror of the validation the tools already have.

    Any tool that you know that does the same thing and have high quality tests?

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

    Is my logic correct in determining what time this timer should end at?

    Posted: 09 Aug 2020 01:36 PM PDT

    We have a timer that we want to only count in working hours, that counts down from 4 hours. The working hours are 08:30:00 until 17:00:00.

    Logically to me that would mean given a time of 16:23:17 we should get:

    4 - 00:26:43 = 3:33:17 remaining on timer at end of first day

    then we would say:

    08:30:00 + 3:33:17 = 12:03:17

    However, the current code does this:

    16:23:17 + 4 = 20:23:17

    3:23:17 of that is after 17:00:00

    so 8:30:00 + 3:23:17 = 11:53:17

    The first question being which would be correct in terms of the end time for the timer and the second being why does either method produce such a different response. Maybe my tired brain is blind to this simple issue.

    submitted by /u/Anything-Educational
    [link] [comments]

    Which methods would you recommend when analyzing people's tastes in media?

    Posted: 09 Aug 2020 01:21 PM PDT

    How can I make a GUI to access a font's cmap?

    Posted: 09 Aug 2020 01:17 PM PDT

    Ok, so to begin with, how do I find the cmap in the font's file? Nothing makes any sense to me that I've found from searching...

    Does anyone have any actual experience with fonts that they can share?

    submitted by /u/-14k-
    [link] [comments]

    What exactly does a browser that blocks trackers?

    Posted: 09 Aug 2020 08:36 AM PDT

    What exactly does a browser that blocks trackers?

    When a browser claims to be blocking trackers what is exactly it doing?

    Blocking a javascript code from a blacklisted domain? blocking a cookie? what more?

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

    Why use 'this' on setters but not getters?

    Posted: 09 Aug 2020 11:58 AM PDT

    Why is 'this' used only on the setter and not the getter in this code example?

    public class Flight {
    private int passengers;
    private int seats;

    public int getSeats() {
    return seats;

    }

    public int setSeats(int seats) {
    this.seats = seats;

    }

    }

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

    Is my understanding of continuous integration correct?

    Posted: 09 Aug 2020 05:28 AM PDT

    I'm not talking about CI tools but just the term CI itself. So after googling I was very surprised that CI is about integrating stuff into master quickly - even when the feature is not complete. In fact the rule of thumb is to integrate daily. This is opposed to the strategy called "feature branching" which is when you integrate when the ticket is completed.

    "CI developers integrate all their work into trunk (also known as mainline or master) on a regular basis (at least daily)."

    https://techbeacon.com/devops/are-you-really-doing-continuous-integration-heres-how-tell

    Continuous Integration applies a different trigger for integration - you integrate whenever you've made a hunk of progress on the feature and your branch is still healthy. There's no expectation that the feature be complete, just that there's been a worthwhile amount of changes to the codebase. The rule of thumb is that "everyone commits to the mainline every day", or more precisely: you should never have more than a day's work sitting unintegrated in your local repository. In practice, most practitioners of Continuous Integration integrate many times a day, happy to integrate an hour's worth of work or less.

    https://martinfowler.com/articles/branching-patterns.html

    Martin Fowler also talks about feature toggling too. So if you have a feature that is not finished you toggle it off in code. This basically pollutes your code with unnecessary if statements that wouldn't otherwise exist.

    At my work we were doing "feature branching" (i.e. only merging when the feature was fully done). I think this strategy is fine and you can just allocate tasks in a way that we are working on seperate parts of the product so that there are less risk of merge conflicts.

    I hope my understanding of CI is correct because I'm sure it's going to come up in a job interview.

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

    I'm trying to get used to variables, list and input commands in python, can you critique my code?

    Posted: 09 Aug 2020 11:17 AM PDT

    1 adjective1 = input("An adjective: ") 2 adjective2 = input("Another adjective: ") 3 bird = input("A type of bird: ") 4 room = input("A room in a house: ") 5 past_verb = input("Verb in past tense: ") 6 help_verb = input("A Verb in present tense: ") 7 family_name = input("Name of someone in a family eg. uncle, brother etc: ") 8 noun = input("a noun: ") 9 liquid = input("a liquid: ") 10 ing_verb = input("a verb that ends wth -ing: ") 11 body_part = input("a body part(plural): ") 12 plural_noun = input("a plural noun: ") 13 ing_verb2 = input("another verb that ends wth -ing: ") 14 noun2 = input("a noun: ") 15 Adjectives = [adjective1, adjective2] 16 Verbs = [past_verb, help_verb, ing_verb, ing_verb2] 17 Nouns = [bird, room, family_name, noun, liquid, body_part, plural_noun, noun2] 18 input("Finally, here is your story: ") 19 print("It was a cold " + Adjectives[0] + ", November day") 20 print("I woke up to the " + Adjectives[1] + " smell of " + Nouns[0] + " roasting in the " + Nouns[1] + " downstairs.") 21 print("I " + Verbs[0] + " down the stairs to see if I could help " + Verbs[1] + " the dinner.") 22 print("My mom said to see if " + Nouns[2] + " needs a fresh " + Nouns[3] + ".") 23 print("So I carried a tray of glasses full of " + Nouns[4] + " downstairs to the " + Verbs[2] + " room.") 24 print("When I got there, I couldn't believe my " + Nouns[5] + "!") 25 print("There were " + Nouns[6] + " " + Verbs[3] + " on the " + Nouns[7]) 26 
    submitted by /u/jaysuchak33
    [link] [comments]

    Time series Forecasting by Tensorflow

    Posted: 09 Aug 2020 09:42 AM PDT

    I'm new in deep learning and I've to do college project on this dataset(https://raw.githubusercontent.com/hungry-hands/Time-forecasting/master/Timeseries.csv). I've seen many blogs and videos and honestly I got errors everytime when I code myself. I've gone through TensorFlow tutorial on time series(https://www.tensorflow.org/tutorials/structured_data/time_series). Still my model is not great. If anyone can help me with this, you're a lifesaver. Thank you

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

    Question about c++ classes

    Posted: 09 Aug 2020 09:27 AM PDT

    (I dont know how to get a properly formatted code so I'll post imgur code screenshots)

    Hello guys,

    I'm learning c++ and I'm struggling on something that is, I'm sure, very simple. I made a simple triangle class and I need this class to be able to return each component (vertex 0, 1 and 2) individually, and I'm not getting what I want.
    I'm making a simple raytracer and when I use my triangle class to return each vtx position it's not working correctly ( triangle1.P0 or triangle1.get0() ), but when I feed each vertex to my intersect function it works; so I guess there's a problem with my triangle class.

    The code is here for both triangle class and intersect functions : https://imgur.com/a/qH0ikhp

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

    Whats the most efficient way in python to do strict ieee754 plus and multiply of float32 and float64 (like strictfp in java)?

    Posted: 09 Aug 2020 05:03 AM PDT

    https://en.wikipedia.org/wiki/IEEE_754

    Existence proof: It can be done on 2 strings of 64 '1' vs '0', very slowly, to return another string.

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

    No comments:

    Post a Comment