• Breaking News

    Wednesday, April 21, 2021

    Disabled programming student ISO single-handed keyboard, advice requested Ask Programming

    Disabled programming student ISO single-handed keyboard, advice requested Ask Programming


    Disabled programming student ISO single-handed keyboard, advice requested

    Posted: 21 Apr 2021 04:57 PM PDT

    I'm a freshman in a CS program and my right hand was permanently damaged a seven months. I'm having a horrible time typing with both hands and am exploring options for a single-handed keyboard (or similar peripheral). I'm currently learning the TAP system but my fingers don't move independently enough for it to interpret movements correctly. I'm thinking about getting a Koolertron programmable keyboard but have no experience with them.

    Is there another option I should explore? Does anyone have any experience with a Koolertron programmable keyboard?

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

    Do you code everyday?

    Posted: 21 Apr 2021 07:15 AM PDT

    Hey guys! Do you code everyday? I'm a bootcamp graduate and I'm trying to get a job and also to improve my skills. But I feel like I'm not doing enough sometimes. I take breaks sometimes and I feel so guilty like I'm not learning enough and I'm not pushing myself as much as i should. I was just wondering if I'm the only one or it's a common thing 😅

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

    What’s the name of the law that says: the more resources are available, the more resources you waste fully use?

    Posted: 21 Apr 2021 02:54 PM PDT

    I remember reading something that said that. I think the context was a distributed build system at Google: since there's so much computing power, they just do heaps of builds and jobs on remote servers rather than locally, and end up using way more compute than they would if they did their builds on local computers.

    Does this ring a bell? Is there a name for this law?

    Thank you.

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

    Why doesn't this auto-indent plugin work?

    Posted: 21 Apr 2021 09:31 PM PDT

    How to replace ‘[‘ and ‘]’ with ‘(‘ and ‘)’ for a certain target in javascript?

    Posted: 21 Apr 2021 07:52 PM PDT

    hey-hey[hey audio][hey video]

    to become

    hey-hey(hey audio)[hey video]

    hey is unknown

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

    What company do you work for, what do you do, and what’s your favorite project you’ve programmed?

    Posted: 21 Apr 2021 07:24 PM PDT

    I'm a high school junior and I wanted to get a feel for what some projects you guys work on to make sure I'm headed into the right direction for college.

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

    What programming language/ software can I use to simplify a very large lagrange polynomial?

    Posted: 21 Apr 2021 07:12 PM PDT

    Hi folk, I'm working on a mathematical exploration and I'm interpolating some polynomials but in order to work with them, I have to simplify them. I used c# in SymPy to simplify a polynomial with 6 terms and it worked alright although it was quite time-consuming, but the next one that I have to simplify has 18 terms and I was wondering if there's a simpler way of doing it that I'm unaware of. I'm not very good at programming so I thought I'd ask for some professional advice. Thank you.

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

    Telemetry Application for gps controlled autonom robot?

    Posted: 21 Apr 2021 06:31 PM PDT

    I need an telemetry application to display robots's battery level, current operation, location, may be video stream etc. I thought using a spring backend to do that. For instance on board raspi sends the data to backend and applicaton fetches the data drom the backend every second or so. I don't have an idea how to do it properly, so i need an advice. What technique should i have to use for this telemetry application?

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

    Is there a full-text search program that's light and fast , that's not a bloated framework like Elastic?

    Posted: 21 Apr 2021 05:32 PM PDT

    I need to run full-text search "engine" to run against large archive of academic papers, think of it like a Google light self-hosted search engine. Everyone just defaults to install Elastic and be done, but Elastic Search is a pretty heavy framework, I don't want or need that complexity? Can anyone recommend something lighter and faster, Thinking some process that creates and updates indexes and provides an easy way to issue search queries...

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

    Advice on Quad Trees?

    Posted: 21 Apr 2021 05:30 PM PDT

    So i have to implement a Quadtree structure for the advanced data structures course. Problem is, i left uni a couple years ago and can't remember anything. I'm re-learning pointers and arithmetic. What are the 'prerequisites' to learn Quadtrees? Thanks

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

    I'm a professional developer. I never code after work. What are some ways or ideas for hobbyist coding projects?

    Posted: 21 Apr 2021 04:59 PM PDT

    Like the title says, I've been a professional developer for a little bit but have only really ever coded at work. I'm interested in gathering some ideas for potential home projects. Does anyone have any interesting ideas to share? I'd love to hear about any hobby projects you're excited about, but if it helps, I enjoy playing instruments, gaming, cooking, exercise, and interior design.

    submitted by /u/Happy-Indication-471
    [link] [comments]

    Noob python user here <3

    Posted: 21 Apr 2021 04:27 PM PDT

    Intro - opening two text files that have a 40 letter code and a title, so I've managed to open both files and can separate the code and the title into two different matrices, but struggling with two parts. I need to add a for or while loop with counter so that can use this on any two sheets that might have more or less rows of data and then need to compare the trymatrix[] and newtrymatrix[] to see if any values are shared. Any help greatly appreciated, new to python and the loops are killing me.

    # open files and name, need to change file path in quotes for line 2
    f1 = open("C:\\Users\\Ben\\Documents\\Old.Sha1.txt", 'r')
    #1 for matrix 2 for counter
    ff2 = f1.read()
    f1Hash = ff2.split("\n")
    lineCounter = 0
    for i in f1Hash:
    if i:
    lineCounter += 1
    #entries in Old Sha stored for loop
    print(lineCounter)

    #below to check reference
    #print(ff1[0])
    f1 = open("C:\\Users\\Ben\\Documents\\Old.Sha1.txt", 'r')
    ff1 = f1.read().splitlines()
    print(ff1)
    #need loop to pull all trys
    #trying to use for loop to get list
    try1=ff1[0]
    try1=try1[0:40]
    try2=ff1[1]
    try2=try2[0:40]
    try3=ff1[2]
    try3 =(try3[0:40])
    trymatrix=[try1, try2, try3]
    print(trymatrix)

    #trying to use while loop to get list
    #try1 = [list(range(0,100,lineCounter))]
    #try2 = [list(range(0,100,lineCounter))]
    #try1=[]
    #try2=[]
    #apple = 0
    #banana = 0
    #try1 = ff1[apple]
    #try2 = ff1[apple]
    #try1[apple] = ff1[apple]
    #try2[banana] = ff1[banana]
    #while apple < lineCounter: apple +=1;
    #try1 = ff1[apple]
    #print(try1[0:40])
    #try1 will be hash number only
    #while banana < lineCounter: banana += 1; print(try2[41:])
    #try2 will be file title
    #print(try1[0:40])
    g1 = open("C:\\Users\\Ben\\Documents\\New.Sha1.txt", 'r')
    #print(f2.read())
    #1 for matrix 2 for counter
    gg2 = g1.read()
    g1Hash = gg2.split("\n")
    #reset counter
    lineCounter = 0
    for i in g1Hash:
    if i:
    lineCounter += 1
    #entries in New Sha stored for loop
    print(lineCounter)

    #below to check reference
    #print(ff1[0])
    g1 = open("C:\\Users\\Ben\\Documents\\New.Sha1.txt", 'r')
    gg1 = g1.read().splitlines()
    print(gg1)
    #need loop to pull all trys
    #trying to use for loop to get list
    newtry1=ff1[0]
    newtry1=try1[0:40]
    newtry2=ff1[1]
    newtry2=try2[0:40]
    newtry3=ff1[2]
    newtry3 =(try3[0:40])
    newtrymatrix=[try1, try2, try3]
    print(newtrymatrix)

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

    ¿What's the weirdest/worst code manners/fixations that you've had to read?

    Posted: 21 Apr 2021 10:08 AM PDT

    I mean Manners as everyone codes differently and have different ways to approach problems, but some doesnt make any sense to me.

    In my case is one co-worker i had that was so insecure about the way he coded, that always used the optional chaining operator ?. on every condition or evaluation he did, All this on different components and useEffects (we used React). I mean something like

    ```

    if (user?.personalData?.age >= 18 && user?.someOtherThing?.moreNestedStuff?.thing !== otherObject?.why?.do?.you?do?.this?.to?.me) { ... }

    ```

    And when i ask him about why would he do this, he just answered 'just so it works and don't throw any undefined errors'... Glad i'm out

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

    How to implement knowledge on programming language?

    Posted: 21 Apr 2021 12:11 PM PDT

    How should I learn programming as fast as possible and implement it on building softwares? Currently, I am learning python.

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

    Is it pointless to try to learn how to create AI?

    Posted: 21 Apr 2021 11:36 AM PDT

    I was hoping to do some independent research and study coding so I could create rudimentary artificial intelligence.

    My intention is to take it on as a hobby rather than a serious endeavor, but I would certainly like to ensure my skills would stably progress.

    Is there any point to trying considering how advanced even open source AI are at this point in time? Should it not be fruitless, what are some resources I should have available to me so I might learn correctly?

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

    I really need some help

    Posted: 21 Apr 2021 03:21 PM PDT

    I have been givcen the assingnment to computes the trajectory of a projectile given its initial velocity and angle relative to the horizontal using C language. Now my problem is not understanding C language, the problem is that I have no kind if Physics background to help me with this problem and i dont know if im asking in the wrong subreddit but can anyone please help me code this program?

    Heres the instructions:

    Write a C program that calculates the trajectory that a projectile will follow. You will prompt the user for the projectile's initial velocity, its initial angle relative to the horizontal, and the number of time increments to display. Here is an example output log from your program: ==============================================================

    This program computes the trajectory of a projectile given its initial velocity and angle relative to the horizontal.

    Enter velocity (m/s): 30

    Enter angle (degrees): 50

    Enter number of steps: 10

    step x y time

    ----------------------------

    0 0.00 0.00 0.00

    1 9.03 9.69 0.47

    2 18.07 17.23 0.94

    3 27.10 22.61 1.41

    4 36.14 25.84 1.87

    5 45.17 26.92 2.34

    6 54.21 25.84 2.81

    7 63.24 22.61 3.28

    8 72.28 17.23 3.75

    9 81.31 9.69 4.22

    10 90.35 0.00 4.69

    Note: You can compute the x and y components of velocity using the cos and sin of the initial angle, respectively. The projectile will be pulled downward by gravity with a force of 9.81 m/s^2. Recall that you can compute the displacement of a body in motion using the following formula: displacement = vt + ½at^2

    The following is a pseudocode description of the process:

    x, y, t = 0.

    for (the given number of steps):

    add time increment to t.

    add x increment to x.

    reset y to y-velocity * t + 0.5 * -9.81 * t * t.

    report step #, x, y, and t.

    You should break down your program into 4 functions, each of which helps solve the overall problem. main() print_table() show_begin_message() compute_displacement()

    - The main() function should call the show_begin_message() function and ask for the three inputs. Finally it should call print_function() - The print_table() function should setup the computation and print the rows of data. Of course it should call compute_displacement() to help with the calculation.

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

    API to find stars and other astronomical objects based on user's coordinates

    Posted: 21 Apr 2021 02:35 PM PDT

    I think the title says everything about my question. Just want to do a cool weekend project and need an API to help me find astronomical objects in the sky, according to my coordinates. Is there any API like that?

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

    Should I learn Swift/kotlin before ReactNative/Flutter?

    Posted: 21 Apr 2021 02:24 PM PDT

    Hello, I've been learning web development and i can now build basic sites with a backend relatively comfortably. I started with Web dev because of school, not because I wanted to, and originally I wanted to make an app. I have an app idea that i want to publish for both IOS and android. Since I'll be developing for both platforms alone, I've decided to use flutter or react native. Would it be a good idea to learn native dev using swift/kotlin before diving into flutter/ react native? My thinking is since I'm new i should learn how to develop natively so i understand the respective ecosystems. Or when i need to implement unique native code along side my hybrid code i'll have the background knowledge. And once i gained this understanding it will be beneficial in the end for my hybrid development. Is this a reasonable line of thinking? Or since my goal is a hybrid app i should skip learning native code and just skip straight to react native or flutter? Sorry if the question doesn't make sense, I'm a complete scrub in the app world.

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

    Freecodecamp "MongoDB and Mongoose" Last Challenge isn't supported by... Well, by challenge itself

    Posted: 21 Apr 2021 02:08 PM PDT

    So this is the last challenge in MongoDB and Mongoose, but I can't pass it. Here's my code. Freecodecamp gives me the following error:

    Chaining query helpers should succeed

    whilest Glitch's own Logs tells me:

    DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.

    I did replace .remove with .deleteMany in myApp.js, but it still gives me that error. I checked server.js and guess what? There are quite a few .remove({}) methods in server.js file. I have literally no idea how to fix this (server.js contains 400 lines of code and dozen .remove() methods, so I can't check entire file, but I did replace every .remove with .deleteMany and it didn't work).

    What should I do?

    node version: v10.23.0 express version: 4.17.1 mongoose version: 5.12.5 
    submitted by /u/OmniKingBoss
    [link] [comments]

    Since UUIDs are universally unique, couldn't you make a database of what all known UUIDs represent?

    Posted: 21 Apr 2021 03:31 AM PDT

    Just a shower thought. Would be genuinely interesting to browse through one, just to see what kind of stuff dominates it.

    Questions are mainly: * Would it be feasible in any way * Would it have any practical use

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

    Does anyone have a working 3D XML viewer for HTML/js?

    Posted: 21 Apr 2021 12:56 PM PDT

    I was trying to follow this- https://www.3ds.com/fileadmin/PRODUCTS-SERVICES/3DVIA/3DXML/dircopy_official/PlrUserMap/plr-t-tu-PlayerEmbed-InWebBrowser.htm

    And despite wrapping in html and body tags, I'm getting Chrome/IE/Edge to say: "Plugin Not Supported"

    Not sure what next steps are, any ideas are appreciated.

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

    Best way to manage/lookup 200 records per second across 250Million records?

    Posted: 21 Apr 2021 12:43 PM PDT

    I have a script that is pulling in hundreds of domain records/data poonts per second from the web. I need to store these records in a database. If the domain is not on he database, it gets added, if it already exist, then the record is read and appended to.

    Have been using redis as a temporary value store however it's not ideal for this -at least I think.

    Total domain count is 250million, with each having between 3-50 data points. Recommendations on what can handle this much data at ~200 lookups per second?

    Mongodb, mysql,???

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

    Has anyone considered a browser addon of some sort or an app that would show people how much biased and/or false material they're being exposed to through browsing/social media use?

    Posted: 21 Apr 2021 12:20 PM PDT

    I'm new to programming within the last year, having come from another field, and this is well outside of the scope of my abilities, but I've been thinking a lot about where my place may be within the CS community. I'm pretty discouraged by the focus of online sources on getting jobs with the tech behemoths. Right now, I'm focused on getting any job for survival (that hopefully isn't too soul-crushing), but ideally, I want to at some point create or work on something that I think will benefit the world.

    I will start by saying I think if we could disconnect from social media, we'd all be better off. I also admit that's much easier said than done, and I understand the irony of posting about this on Reddit, but I feel like it could be a good thing to try to educate people on just how excessive the onslaught of biased and flat-out false material is. "The Social Dilemma" was by no means a perfect documentary, but it did present an idea that I hadn't considered, and that's that in engaging with these platforms, and believing we may be able to stay true to ourselves and resist their social engineering, we're trying to stand alone against an army of programmers and endless computing ability designed to find ways to guide us to act a certain way. The whole point of Facebook is to keep you looking at Facebook at any cost. It's sort of the same with any product, but the nature of social media allows this to be possible at a level never before seen, where every action we take can be used to tweak the product in ways that will give it the edge over us in the future.

    So at the basest level, my idea would be to count and record instances of links and posts from questionable sources (blatantly biased media outlets, and more complexly posts that are likely from bots) and offer that information to the user. I'm sure there are a million more points that could be presented to the user beyond just that information, but the idea is to present it to individuals so they can ultimately make their own decision about social media, which I hope would be to limit their exposure to it or disconnect entirely. Hopefully, if it worked well enough, I could disconnect myself after seeing the data. Haha.

    I realize as I'm writing this, this idea is sort of engaging in social engineering (and I suppose data collection) in its own right, but what I want is to quantify the presence of these things that I think the majority of people would believe to be bad and let people make their decisions from that point. And I realize at some point, I or some amount of other people would have to determine what is considered bad, which has its own ethical considerations. I can say that bots presenting as people are definitely bad. I'd hope when it comes to media, this judgment could be based on independent measures of media bias or something.

    Any thoughts on this? Is this impossible? Unethical? Thanks for reading!

    TL;DR - Any thoughts on some sort of software that records instances of biased media, bots, and posts promoting falsities that are shown to individuals, so that those people can have quantifiable data about what they are experiencing in their bubbles?

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

    Need Help Django, JavaScript. I want

    Posted: 21 Apr 2021 10:52 AM PDT

    console.log('hi this is quiz') const url = window.location.href const quizBox = document.getElementById('quiz-box') const scoreBox = document.getElementById('score-box') const resultBox = document.getElementById('result-box') $.ajax({ type:'GET', url:`${url}data`, success:function(response){ console.log(response) const data = response.data data.forEach(el => { for (const [question,answers] of Object.entries(el)){ quizBox.innerHTML +=` <hr> <div class = "mb-2"> <b>${question}</b> </div>` answers.forEach(answer=> { quizBox.innerHTML += ` <div> <input type = "radio" class="ans" id="${question}-${answer}" name="${question}" value="${answer}"> <label for="${question}">${answer}</label> ` }) } }); }, error:function(error){ console.log(error) } }) const quizForm = document.getElementById('quiz-form') const csrf = document.getElementsByName('csrfmiddlewaretoken') const sendData = () =>{ const elements = [...document.getElementsByClassName('ans')] const data ={} data['csrfmiddlewaretoken'] = csrf[0].value, elements.forEach(el=>{ if (el.checked){ data[el.name]=el.value }else{ if(!data[el.name]){ data[el.name]=null } } } ) $.ajax({ type:'POST', url:`${url}save/`, data:data, success:function(response){ console.log(response) const results = response.results console.log(results) quizForm.classList.add('not-visible') scoreBox.innerHTML = `${response.passed ? 'Congratulations':'Sorry!'} Your result is ${response.score.toFixed(2)}%` results.forEach(res=> { const resDiv = document.createElement("div") for (const[question,resp] of Object.entries(res)){ console.log(question) console.log('*****') resDiv.innerHTML += question const cls = ['container','p-3','text-light','h10'] resDiv.classList.add(...cls) if (resp == 'not answered'){ resDiv.innerHTML+='- Not Answered' resDiv.classList.add('bg-danger') } else{ const answer = resp['answered'] const correct = resp['correct_answer'] console.log(answer,correct) if (answer == correct){ resDiv.classList.add('bg-success') resDiv.innerHTML += ` Answered: ${answer}` }else{ resDiv.classList.add('bg-danger') resDiv.innerHTML += ` | Correct answer: ${correct}` resDiv.innerHTML += `| Answered: ${answer}` } } } // const body = document.getElementsByTagName('BODY')[0] resultBox.append(resDiv) }) }, error:function(error){ console.log(error) } }) } quizForm.addEventListener('submit',e =>{ e.preventDefault() sendData() }) 

    I am getting the data from backend code which is a dictionary containing all the questions of the "quiz " model. The above code prints all the questions and answers on a single page and does all the checking in the end. But I want only one question and its possible answers to be displayed at a time, once answering the question it should check the answer display the result only then it should move to the next question. I don't know what to search in google too.

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

    No comments:

    Post a Comment