• Breaking News

    Tuesday, May 19, 2020

    Any disabled programmers out there? Ask Programming

    Any disabled programmers out there? Ask Programming


    Any disabled programmers out there?

    Posted: 19 May 2020 10:43 AM PDT

    Hi all,

    I recently have came down with a condition that doesn't let me type with my hands for very long. I had to quit my job that was very heavy in spreadsheets because I couldn't keep up. I was always interested in programming but now that I'm out of work and have a bunch of time to learn I was wondering if its feasible for a career with all voice to text software like dragon or something. I wanted to see if anyone else was able to pull it off with this set of limitations.

    Thanks for your help.

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

    As a developer, what kind of "daily hacks" do you make use of to make your life/workflow better?

    Posted: 19 May 2020 04:05 PM PDT

    How do voice assistants know when a command is finished?

    Posted: 19 May 2020 07:24 PM PDT

    So I wanted to write a basic voice assistant one day and I got started on CMU Sphinx. Unfortunately, not only is it bad at deciphering what I was trying to say, it also didn't know what to end a command. Sometimes it doesn't ever end. it's ridiculous. I wanted to write my own voice assistant as a programming exercise, but it seems impossible. How exactly would these functions be performed?

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

    In the differences between Angular, Vue and React, are there any features from one you wish the other had?

    Posted: 19 May 2020 07:11 AM PDT

    I'm sure everyone here has their framework of choice but maybe sometimes you see that the grass is a little greener on the other side. If you could, what would you bring over from another framework?

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

    [Concept] Real Life Harry Potter Paintings

    Posted: 19 May 2020 04:39 PM PDT

    If you're not familiar with Harry Potter, in the world of HP, people in paintings move and have the ability to walk from their painting to another painting and interact with another person from their painting. Likewise, these people act just like normal people do, and can even talk to you normally.

    Now with Artificial Intelligence being a thing, it shouldn't be hard to have an Alexa with a User Interface of a women on a Tablet on your wall. We have the technology. We also have the technology, if needed, to add more tablets to the walls so you can add more people and the people in the painting can converse with each other. This is like how external monitors connected to a laptop, you have the power to position each monitor so your cursor can move seamlessly between each monitor.

    So TL;DR, what if we made multiple artificial intelligent people in the form of "paintings" (tablets), and the more tablets there are, the more they can converse with each other and feel just like Harry Potter paintings.

    Please let me know if this concept would work, I don't know a lot about engineering and stuff, I just thought this would work! Thanks!

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

    What is the funniest short programming quote/function you've seen or heard of?

    Posted: 19 May 2020 08:10 PM PDT

    My boyfriend and I are both software developers and I was inspired by a recent reddit post on r/programmerhumor to make him an embroidered funny programming quote or a function for our anniversary. For example, the reddit post I saw had "When the moon hits your eye like a big pizza pie, that's amore. When a file you don't need exceeds 50mb, .gitignore" embroidered on a piece of cloth which I thought was hilariously brilliant but I don't want to copy the person that made it so I need more ideas. I'm completely blanking out and I would appreciate any ideas you guys have. Thanks!

    Edit: or if you can come up with a funny one that doesn't already exist, even better!

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

    Problem with an if statement in R

    Posted: 19 May 2020 01:32 PM PDT

    I have a data set that has three columns which are "subject", "dose" and "time". I am trying to find the average time for each subject that has a dose value of zero. What I've done is loaded the data set then put in:

    `

    if (caff$dose == caff$dose0){

    print(mean(time))

    }

    `

    where `caff` is the name of my data set. The error I am getting is `argument is of length zero` though when looking at the data set I can see at least 9 subjects that have the value of `dose0`. Any advice?

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

    Making a button in XMAL for android app urgent help!!!

    Posted: 19 May 2020 07:29 PM PDT

    Help i need to make an application that displays two or more strings in labels when a button is clicked on visual studios using XMAL for a android emulator this is what i need to do below

    when the first button is clicked it should display a label: "first solve the problem. Then, write the code. (john Johnson)"

    Message 2: When the button is clicked it should display in a label: "Computers are good at following instructions, but not at reading our mind. (Donald Knuth)"

    Message x,: when the button is clicked it should display an option message with "help john","kill john

    pls help

    submitted by /u/Remote-Difficulty
    [link] [comments]

    Programming software to customize user input and control?

    Posted: 19 May 2020 07:28 PM PDT

    What programming tool do you recommend for a platform whereby the members submit, control and update content, score uploaded content and sources as well as other members, connect and build sub-communities within the platform, manage ongoing research, feeds/threads, communications and db development, etc?

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

    What issues are you having with the tech you're using and what tools/libraries would you like to see to address them?

    Posted: 19 May 2020 07:15 PM PDT

    Hey everyone,

    I am currently in a coding bootcamp. For one of our projects, we have 4 weeks to build a dev tool or create a library, and I would like your input on what we could build that would be beneficial for the community. The project will be open source and available for anyone interested in using it, building off of it, or taking it in a new direction. I would love to hear what tech you are working with and what sorts of technical issues, usability issues, or general challenges you have had working with them. Or, if there's a tool or library you're using that you would like revamped or extra features for, we'd love to hear about those too.

    We are working in Javascript with React, Redux, Node, Express, and Postgres, but we are opening to exploring other technologies too and have thought about Websockets and Server Side Rendering.

    Thanks!

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

    Python Help - Getting incorrect values for a numerical solution to a differential equation and a nonlinear equation

    Posted: 19 May 2020 05:19 PM PDT

    I have been trying to create a program to solve Schrodinger's equations for a ONE dimensional harmonic oscillator and create an animation for it. The animation is working however it doesn't look right and and it came down to the fact that my solution for the time-independent part of the Schrodinger equation is wrong. So, one of the things I needed to do is set up a Runge-Kutta (RK) solution for the differential equation which I did. I also needed to way to find the allowed eigenvalues for the energy which ends up being a nonlinear equation which I decided to use the Secant Method to solve. But the problem is, I am getting incorrect values from solving the Schrodinger equation with RK, and for the energies using the Secant Method. The wave function should go out to zero as it approaches plus or minus infinity (which I approximate to be a "large" distance compared to the well, and my eigenvalue for the energy (the 1st solution or ground state) should be between 100 eV and 200 eV. But when I plot it and get the eigenvalues I get something that doesn't look like a wave and an eigenvalue for the energy of around 10,000. When solving it the result must obey certain rules, and in the case of a harmonic oscillator, it decays to zero at infinity (but gets rather close very quickly), and it's smallest allowed energy level should look like a normal distribution centered at x = 0.

    I've tried changing the units I was using (I am working in electron volt and nano-meter units) but I still get ridiculous values that are not close to what the value should be. I tried my program on a simpler problem (an infinite square well), and I was getting correct values. Also when I expand the evaluation range of my wavefunction the energy eigenvalues would increase when they should not increase significantly the more you increase the evaluation range. I also tried the gradient descent method and the relaxation method for finding the eigenvalues but they were still nowhere near to the exact analytic results (off by at least an order of magnitude). I feel something must be wrong with the way I defined my differential equation but I just don't see it. Here is the 1-D Schrodinger Eqn (bottom one is the important one).

    import numpy as np
    import pylab as py

    #constants in ev units
    hbarc = 197.326 #hbar times speed of light
    mc = 0.511 #mass energy of electron
    a = 1e4 #scaling factor of oscillator
    N = 100000 #number of steps
    h = a/N #step size
    V0 = 50e-5 #potential energy scaling factor
    #potential energy function
    def v(x):
    return V0*(x**2)/(a**2)

    #wave function differential equation
    def f(r,x,E):
    psi = r[0]
    phi = r[1]
    fpsi = phi
    fphi = 2*mc/(hbarc**2)*(v(x) - E)*psi
    return np.array([fpsi, fphi], float)

    #Runge-Kutta function
    def RK(E):
    psi = 0 #state of the wave function
    phi = 1
    r = np.array([psi, phi],float)
    for x in np.linspace(-100*a,100*a,N): #Evaluation Range of the wavefunction
    k1 = h*f(r, x, E)
    k2 = h*f(r+ 0.5*k1, x + 0.5*h, E)
    k3 = h*f(r + 0.5*k2, x + 0.5*h, E)
    k4 = h*f(r + k3, x + h, E)
    r += (k1 + 2*k2 + 2*k3 + k4)/6
    return r[0]

    #Defining parameters for finding the eigenenergies in a certain energy range
    E1 = 100 #Energy 1 for finding the eigenvalues
    E2 = 200 #Energy 2 for finding the eigenvalues
    psi2 = RK(E1)
    error = 0.001 #My desired accuracy for the energy
    #Secant method for finding the eigenenergies of the system
    while abs(E1-E2) > error:
    psi1 = psi2
    psi2 = RK(E2)
    E2 = E2 - psi2*(E2 - E1)/(psi2 - psi1)
    E1 = E2
    print("E = ", E2, "ev")

    #Obtain a list for values of Psi for the wavefunction to graph it out
    def RGG(E):
    psi = 0 #wave function at the boundaries, should go to zero at plus or minus infinity, but we will approximate it to a "large" distance
    phi = 1
    r = np.array([psi, phi],float)
    amp = [] #amp is the list for the wavefunction
    for x in np.linspace(-100*a,100*a,N):
    amp.append(r[0])
    k1 = h*f(r, x, E)
    k2 = h*f(r+ 0.5*k1, x + 0.5*h, E)
    k3 = h*f(r + 0.5*k2, x + 0.5*h, E)
    k4 = h*f(r + k3, x + h, E)
    r += (k1 + 2*k2 + 2*k3 + k4)/6
    return amp

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

    JavaFX gridpane problem

    Posted: 19 May 2020 03:42 PM PDT

    Hi all,

    Have a problem that might be easy, but can't seem to wrap my head around it.

    I have a textfield with content "hello" on GridPane 7,8. How would I access the content of the textfield given I only have the row and column value?

    Many thanks in advance, happy to provide more info where needed

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

    Maintaining consistent UI strategy across a variety of products that we do not own? Help? Seriously no idea on any of this.

    Posted: 19 May 2020 09:25 AM PDT

    Okay, so I'm in a unique situation where I've been tasked with documenting and researching something far outside my comfort zone, and I'm looking for input/pointers in the right direction.

    I work at a marine propulsion company, and we sell our own engines/controls and we also have our own MFDs that show engine data.

    However, most boats/vessels have gigantic navigation displays from companies like Garmin/Ray Marine, etc. These displays offer route planning, weather, depth, and all sorts of data, but it's usually completely segmented. This means map on one side of the screen, weather on another side of the screen.

    We also offer a way to integrate our data INTO those displays…. But again, it is completely segmented. Our info will be on one side of the screen, theirs on the other.

    The question is…. In terms of integrating things to present a unified, integrated experience to the user, how can you GIVE UP some control of your systems to other companies, but still maintain a consistent brand experience? An example would be adjusting engine speed or heading, from within their route planning software. The fear is that if we give them direct access to our data, they will just smash it into whatever crude/unintuitive UI they have, and not work with us to maintain our brand image/consistency across our own devices.

    Another complexity is the device hardware itself, I would bring up aftermarket stereos from 2000 til the introduction of CarPlay, in 2014. Most of them seem to be running some fairly basic, archaic system that looks like Windows CE or something. It's not up to automotive standards, so how do you unify brand experience across all the different possibilities? Is coding some sort of compatible app typically falling onto my company? Or do we present the guidelines to the display/nav companies and have them try to implement a solution?

    What strategies are there here? Help! Lol. Thank you for literally any response.

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

    Hi guys, could anyone help me with implementing my model into my SwiftUI project?

    Posted: 19 May 2020 02:56 PM PDT

    Hello! I was wondering if I could privately message someone to help me implement my already made sentiment analysis model into my code. I'm having a lot of trouble displaying the results in SwiftUI, so any help would be greatly appreciated!

    submitted by /u/Millennium-X
    [link] [comments]

    Java or Python?

    Posted: 19 May 2020 02:48 PM PDT

    I have the option of taking either class, and I think I would prefer Java since I am now taking C++, which will prepare me for Java.

    Which class would you take? Which is easier? Thanks.

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

    Python to C#

    Posted: 19 May 2020 02:12 PM PDT

    Hey guys I am currently working with an old python based AR program which i have been tasked to transfer over to C#/Unity program and ideas or suggestions on the best way to do this ( Also any specific YouTube videos or link that do something similar would be very helpful :) ).

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

    Can't get python program to work

    Posted: 19 May 2020 01:46 PM PDT

    Hey guys, so I'm trying to make a program that writes a word anytime you press a letter on your keyboard, but can't get it to work. It will work if you define a certain key to be pressed, but I want to cover all alphabetic keys. The word keeps being typed infinitely and I have to use task manager to close the program otherwise it will never stop typing. I don't understand why the hell it would do this, I'm at a loss.

    My code:

    from pynput.keyboard import Key, Controller, Listener import keyboard kb = Controller() keys = "abcdefghijklmnopqrstuvwxyz" key_list = list(keys) def on_press(key): for i in range(len(key_list)): if key.char == key_list[i]: type_script() def type_script(): keyboard.write("test") def on_release(key): if key == Key.esc: return False with Listener( on_press=on_press, on_release=on_release) as listener: listener.join() 
    submitted by /u/manualspaghetti
    [link] [comments]

    I’m looking to self learn Java from the ground up. How would you recommend I do it?

    Posted: 19 May 2020 10:00 AM PDT

    I've taken AP Comp Sci but bombed the AP test. My Java foundation is weak so that's why I want to relearn it. My critical thinking skills used to be good but I played too many video games and made my mind a vegetable over 4-5 years. My main goal is to get my critical thinking back so I can solve coding problems. How do I get this back too? Title is main question though.

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

    A question about program automation.

    Posted: 19 May 2020 01:22 PM PDT

    Hi all!

    I'm making a python program to automate joining online lectures for attendance (Windows for now but might port it to Mac later). The overly generalized flow of the program is as follows:

    1. Login to the learning platform website and get links for Adobe Connect sessions (Adobe Connect is an online videoconferencing platform which has a desktop client).
    2. At appropriate times, launch Adobe Connect using the obtained links.

    I'm done with the first step, but I'm having problems with automating the second part. From the research that I've done, Adobe Connect doesn't have an API for the client side, neither does it have a command-line interface (but please do correct me if I'm wrong). This leaves me with two options, but each of them has problems that I can't solve.

    Option 1: Browser automation using Selenium.

    Normally, when a user clicks the "join" link from their browser, it redirects them to the Adobe Connect website. From there, the user can either run Connect in browser using Flash (which I'm trying to avoid at all costs), or they can launch Connect from their browser directly. Judging by my very surface knowledge of browser internals, this happens, because the user is redirected to a link that starts with "connectpro:" which is the protocol for Adobe Connect. The browser then finds a locally installed program, which can handle the protocol and prompts the user whether they want to open Connect.

    However, the prompt to open an external program from within chrome is not showing up in Selenium IDE recording. I think this is due to the prompt not being an alert window (such as one that you get by calling "alert()" in JavaScript), but a Chrome subprocess. I don't know how to confirm this dialogue in any other way. How do I overcome this without resorting to GUI automation?

    Option 2: Autopy GUI automation.

    This option seems to be more straightforward. When we open Connect, we insert the link in the appropriate textbox and click "continue".

    We then enter the user login info (which is known to us, because it's the same as learning platform info) and click "enter room".

    The biggest pitfall of this approach is that the screen resolutions and exact element positions are impossible to predict for different computers. Also, I don't know how to confirm whether Connect finished loading before entering user's login info. Putting "time.sleep(5)" seems like a horrible idea. Is there any library that I'm not aware of that can do this for me?

    Screenshots of Adobe Connect (I've blurred out some parts to avoid trouble with the university): https://imgur.com/a/qNQNY5n

    I'd appreciate any help with any of the options above. If you're aware of a better way to do what I'm trying to do, I'd love to hear it! Thank you!

    EDIT:

    Thanks to u/MajesticThrust for pointing out the solution.

    Python has a builtin function "os.startfile()". If I pass in the URI of the meeting, windows handles the URI and opens Connect.

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

    Can I link another profile for a twitter bot account?

    Posted: 19 May 2020 09:14 AM PDT

    I want to create a twitter bot and I got approved from Twitter Developers last week. I thought I would link another profile as the bot account throughout the process, so I actually applied from my personal account. However, now I can not find such an option. Is there a way to assign a profile as the bot account, or should I start the application process all over again? I really don't want to turn my own profile into a twitter bot:D Thanks in advance, stay healthy!

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

    Most beginner friendly way to create a compiler?

    Posted: 19 May 2020 08:57 AM PDT

    Hi everyone! The last 1-2 weeks I've being trying to learn about low level stuff and how compilers work (along with programming in general). The thing is, when it comes to compilers I don't seem to find any beginner friendly way to do it. When saying beginner friendly way I mean something that will explain at least the basic and cover how a compiler works details from start to end. Maybe am I to n00b even for a simple compiler (It would help me if someone told me that so I stop trying lol!), idk..

    Does anyone know a detailed guide about how to get start at least. Something that will have a detailed explanation about the basic stuff. Also does the language I'm using matters? I mean are there programming languages that are better suited for this job and that will make my life easier? I don't want to waste anyone's time so it's fine if I don't get answers. Have a great day everyone! :)

    Edit: Lol! Guys just forget it, I was an idiot even for trying to touch this topic. Thanks everyone for your time!

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

    How could I create a painting program in C++?

    Posted: 19 May 2020 01:58 AM PDT

    I would like to develop a program where I could draw lines and shapes and also edit size and delete those shapes on the screen. I also want those shapes to animate (like fading or flying) as well.

    How should I start with this?

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

    Building a Torrent streaming app

    Posted: 19 May 2020 12:05 PM PDT

    Hey. I'm trying to build an app where i can search for a movie/tv series and it searches for it on the vast torrent sites and plays it.

    I have no experience with coding but I did some digging and found out some github posts that might work. If anyone can help, it would be really great. Any help is appreciated :)

    GITHUBS:

    FOR SEARCHING TORRENTS:

    https://github.com/cyberboysumanjay/Torrent-Searcher

    https://github.com/itdaniher/magnet-tools

    https://github.com/jfierstein/torrent_search

    https://github.com/cyberboysumanjay/Torrent-Searcher

    https://github.com/algoprog/rivr-search

    https://github.com/ajm113/OpenTor-X

    FOR STREAMING TORRENTS:

    https://github.com/butterproject/butter-android

    https://github.com/webtorrent/instant.io

    https://github.com/webtorrent/webtorrent

    https://github.com/mafintosh/torrent-stream

    https://github.com/TorrentStream/TorrentStream-Android

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

    I would like to have an image to reoccur for a linear time until the script is turned off

    Posted: 19 May 2020 11:59 AM PDT

    I am completely new to programming. I have a goal to have an image (a .PNG with a transparent background) flash on my screen for a split second (an option to choose how many splits of a second would be helpful) and have it occur every 5-10 seconds (another option here would be helpful), and loop until the script is turned off.

    Would someone here be able to write something up for me ? I know there are languages like python and C. Honestly I do not want to learn it at this time, and would greatly appreciate if someone write something up for me. :D

    Thanks!

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

    No comments:

    Post a Comment