• Breaking News

    Thursday, May 27, 2021

    Anyone else bummed out posting on StackOverflow? Ask Programming

    Anyone else bummed out posting on StackOverflow? Ask Programming


    Anyone else bummed out posting on StackOverflow?

    Posted: 27 May 2021 02:56 PM PDT

    The past few days I have been studying programming. I believe I am understanding code a lot better than I used too compared to myself last year. I am getting comfortable with C++ so I started to make a project that revolves around classes and storing them in vectors. I was so proud of myself till I got stuck. So I had the bright idea to post on StackOverflow. The two times I did post were flagged, downvoted and then locked. Some of the kind people there did answer my question so I did get an answer (happy that I did) but I'm afraid of posting in the future. The second time I made a post I made sure to cut down on the amount of code presented and the result I wanted vs the result I was getting and still got downvoted and locked. I have read the rules and the tips/tricks but to no avail. Has anyone else had this experience? I feel like a moron.

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

    How to Make Front-end Development Faster and Easier?

    Posted: 27 May 2021 09:25 PM PDT

    What packages/frameworks/tips will help me create front-end for websites faster? (I use React : create-react-app)

    I mostly make mobile apps, but I want to take on more web projects. I typically stay away from web dev because front end takes so long using CSS. Making the same page on web takes me 10x+ as long compared to if I made the exact same page on mobile.

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

    Help with building a website as a project for my resume

    Posted: 27 May 2021 04:04 AM PDT

    Hi, I just started self teaching programming about two months ago, so forgive my ignorance. I did a lot of research, but it started to feel like a waste of time so I decided to ask you guys.

    I want to build a website from scratch with html, Python, css, Java.. and then put it on my resume as one of my projects. Can you please tell me: 1. Where should I write my code? What platform should I use on mac, that lets me write, run, and open the website? (Hopefully free) 2. Also, how do I display that on my resume? Just describe the project and paste the link?

    Number 1 is the most important. Please help me, thank you so much

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

    How do I approach this project? Which technologies to use?

    Posted: 27 May 2021 01:02 PM PDT

    Hi everyone,

    my cousin gave me a task with which I think I could help him, but I'm quite confused and am not really sure how to approach it. He's a car reseller, he buys used cars and works on them, and then resells them. He wants me to build a program that would keep refreshing this website and every time there's a new vehicle that matches his criteria (price range mostly), he's notified on his phone with this new vehicle, its basic spec and the phone number to contact the seller. Can anyone give me some rough guidelines how to implement this and which technologies are suitable for this use case?

    Thanks in advance.

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

    Package electron into windows EXE

    Posted: 27 May 2021 05:51 PM PDT

    I have been hitting my head all day over this.

    I have a script that when i run npm run start it runs my express server, vue client and some other script, plus my electron app that is getting the stuff from my vue client.

    "start": "concurrently \"npm run server\" \"npm run client\" \"npm run bot\" \" electron . \"",

    How can I put this in an exe file?

    I tried it all, electron-packager, some other electron-stuff ... When I tried PKG it gives me an electron is undefined because it tries to run my app.js which is:

    // Electron Desktop app
    const electron = require('electron');
    const {app, BrowserWindow} = electron;
    const path = require('path');
    const url = require('url');
    let win;
    function createWindow() {
    win = new BrowserWindow({ icon: __dirname + '/images/brw.PNG', show: false
    });
    win.maximize();
    win.show()

    win.loadURL('http://localhost:8080/');
    win.webContents.openDevTools();
    win.on('closed', () => {
    win = null;
    });
    };

    app.on('ready', createWindow);

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

    Is async await newer than promises but syntactic sugar? when were they both first introduced?

    Posted: 27 May 2021 05:12 PM PDT

    javascript

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

    Recommendations for storing 100KB-50MB JSON documents?

    Posted: 27 May 2021 08:28 PM PDT

    I'm building multiple JSON blobs hourly from some remote services, and need to store it all. Much of the content will be the same from poll to poll, but the document model is pretty complicated, so I don't want to programmatically figure out what's changed. Most of these will be under 1MB, but some will be up to 50MB or more. I'm going to need to keep all of these for historical purposes. Querying will be simple - I'll be fetching based on a couple integers, and never need to query based on the contents of the document. When I fetch it, I'll want the entire document. Any recommendations for a database built for such a purpose? Thanks!

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

    Is it faster for a computer to add numbers or to just find the solution in a 2D arrray

    Posted: 27 May 2021 07:51 PM PDT

    let say that i had to write a program that does a ton of addition and all of these addition problems involve adding up 2 3-digit numbers together. would it be faster for the computer to add up all these numbers or would it be faster if i made a 2D array with the solution to all these numbers?

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

    How do I get better as a programmer? How to develop those core problem solving skills and logical thinking ?

    Posted: 27 May 2021 07:33 PM PDT

    A short story , I've been into coding for 3 years now and I've learned all the new trends and frameworks but I always felt that I'm not really writing good code logically . So I started fresh again , Think of me aa a beginner and tell me how to write better code and how do I get those logical skills I would really appreciate this.

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

    Writing a Structure into a File

    Posted: 27 May 2021 05:12 PM PDT

    Okay, I didn't want to resort to asking for help, but at this point, I don't see any other choice.

    I'm writing a code that requires me to my structure write to a file, BUT instead of the integer being written to the file, it keeps writing a bunch of symbols that I don't understand.

    The function/piece of code is below:

    void updatestock()

    {

    struct shoes

    {

    int size;

    char brand [50];

    char colour [50];

    }shoes;

    int n, i;

    FILE *fp;

    fp = fopen("stock.txt", "w");//opens the file

    if(fp == NULL)

    {

    printf("Error opening file\n");

    exit(1);

    }

    printf("Enter the number of records you want to enter: ");

    scanf("%d", &n);

    for(i = 0; i < n; i++)

    {

    printf("\nEnter details of shoe %d \n", i + 1);

    printf("\nSize: ");

    scanf("%d",&shoes.size);

    printf("\nBrand: ");

    scanf("%s",shoes.brand);

    printf("\nColour: ");

    scanf("%s",shoes.colour);

    fwrite(&shoes,sizeof(struct shoes), 1, fp);

    }

    fclose(fp);

    }

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

    Sappy-5 speech synthesizer for blind people! Request for support!

    Posted: 27 May 2021 12:20 PM PDT

    Hello.

    I'm writing here on behalf of blind people, and I'm blind too. Don't be surprised, and if you ask how I use a computer and other devices, just read these articles:

    https://www.freecodecamp.org/news/a-vision-of-coding/

    https://www.vincit.fi/en/software-development-450-words-per-minute/

    Screen access programs use speech synthesizers for work.

    For most popular languages, there are text to speech synthesizers. But! There are languages for which they are not!

    For example, Uzbek, Tajik.

    Uzbek is in Espeak, but it's very poor quality. Wrong grammar, etc.

    For many years my friends from Uzbekistan wanted to create a synthesizer of the Uzbek language, but no one could help.

    But today we learned about the project Silero Models. Here is a brief description of it:

    Silero Models: pre-trained enterprise-grade STT / TTS models and benchmarks.

    Enterprise-grade STT made refreshingly simple (seriously, see benchmarks). We provide quality comparable to Google's STT (and sometimes even better) and we are not Google.

    As a bonus:

    • No Kaldi;

    • No compilation;

    • No 20-step instructions;

    Also we have published TTS models that satisfy the following criteria:

    • One-line usage;

    • A large library of voices;

    • A fully end-to-end pipeline;

    • Naturally sounding speech;

    • No GPU or training required;

    • Minimalism and lack of dependencies;

    • Faster than real-time on one CPU thread (!!!);

    • Support for 16kHz and 8kHz out of the box;

    Speech-To-Text

    All of the provided models are listed in the models.yml file. Any meta-data and newer versions will be added there.

    You can look it on the link:

    https://github.com/snakers4/silero-models

    It's written on Python, but! It's possible to use from the code only! No applications or integration for SAPPY-5!

    Developers are ready to help us make a TTS model, HERE THEY ASKED ONLY THE CASE OF THE TEXT OR The Book, Which Independently Split on the Case and Audio Records.

    But, unfortunately, my Uzbek friends will not be able to use it, because it's not on SAPPY-5.

    So, could someone help port it for sappy-5? Maybe you, or you know people who could?

    Or maybe you know the best ways?

    Please help blind people from Uzbekistan and many other countries to create new audio books using the speech synthesizers!

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

    Do i need degree if i know how to use most of programing languages?

    Posted: 27 May 2021 03:43 PM PDT

    I started to study programming and im 16, so i have a lot of time to learn a lot of languages i guess. I tried to google this question but i found nothing usefull. If i know most of popular languages how much can i earn in us with high school degree? I really disslike college, it takes to much time of my life, its risky and expensive. I am ready to study 3 hours a day and watch courses in free time as well but i want to know if its gonna be worth or not.

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

    Creating a webpage that gets an updated transaction list from my bank api

    Posted: 27 May 2021 03:20 PM PDT

    I currently run a small business with multiple driver contractors who deliver for me. I sometimes have customers use bank transfer to pay for their delivery. I currently have to check my netbanking app to see if the payment has gone through and then I have to message the driver letting them know.

    My idea to simplify this process is currently to create a webpage connected to my website that my drivers have access to. On this webpage they can click a button that sends a webhook request to Commbank's api that retrieves and displays transaction information on the webpage. I currently use squarespace for my website and plan to use the code injection feature.

    I have some background experience in programming but I currently have no experience using webhooks or API. I'm not sure if this solution is even possible so please excuse my ignorance on the topic.

    If it is possible, could someone please to direct me to some resources where I can learn more about this.

    I have already tried using apps like 'Pocketbooks' that allow you to connect your bank account but these apps do not update transactions in real time.

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

    Can I run a Postgres server locally across two user profiles?

    Posted: 27 May 2021 03:17 PM PDT

    On my MacBook I have two user profiles. One for work and one for personal use. I develop on both and recently I've wanted to start a local Postgres server but I can't seem to do this. When I try to run pg_ctl -D /usr/local/var/postgres

    I get this error:

    pg_ctl: could not open PID file "/usr/local/var/postgres/postmaster.pid": Permission denied

    I also can't run it as a super user as it says: pg_ctl: cannot be run as root

    I think this might be because I installed Postgres on my work user profile and even though I can still access the CLI I can't run the Postgres server as I don't have the right permissions on my personal user profile.

    Apologies in advance if this is a really obvious error, I am new to development 😅

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

    Ok settle a bet, this would take a small fortune right?

    Posted: 27 May 2021 03:14 PM PDT

    This is purely theoretical because the website owner refuses to fix things.

    Picture, if you will, a Neopets rip off that's even less technologically savvy. Basic point and click petsite. Legend has it that it was coded by someone who was a newbie and also extremely cheap.

    The site's code has remained basically unchanged since 2014. The programmer isn't known for being high quality in the slightest. In 2018ish the site owner tried to find someone to fix the programming and 7 people took a look and immediately noped out for the price range (bottom of the barrel $). It is now 2021 and the site is crumbling faster than the ruins of a forgotten strip mall.

    I am of the opinion it would take a pretty chunk of change for someone to fix the site, and I suspect they'd have to scrap all the code and somehow keep the data and build the site up from the ground. Others think we could totally fundraise enough to get a new programmer to rebuild the site.

    If you were to give an estimate for the job, and add in a PITA tax for dealing with all the nonsense that comes with this, what would you estimate?

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

    Which language is good for competitive programming?

    Posted: 27 May 2021 01:44 PM PDT

    I was gonna go with Java for competitive coding but would love to hear your thoughts about java for competitive programming

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

    Cannot read property 'match' of undefined error in React

    Posted: 27 May 2021 12:05 PM PDT

    I'm trying to make a simply submit form. I believe my json in mailformat is correct. Using the json in mailformat, I'm trying to check if the email that has been submitted is valid. However for some reason, react doesn't appear to be recognizing the match() method. I get an error stating "Cannot read property 'match' of undefined." My guess for a fix is something involving asynchronous programming but I am not skilled enough to come up with a fix. I'm using react hooks and state. Let me know if more information is needed, Thank you.

    function Form({submit, setSubmit, text, setText}) { let emailArray = []; //handlers. Need for submit button and input for text const setTextHandler = (e) => { setText(e.target.value); }; const setSubmitHandler = (e) => { let mailformat = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; e.preventDefault(); setSubmit(text); console.log(text) if(text.value.match(mailformat)) { console.log("it works") emailArray.push(text); return true } else if (!text.value.match(mailformat)) { console.log("FAIL"); return false } setText(""); } 
    submitted by /u/Ironic_Gangster
    [link] [comments]

    Tensorflow Error

    Posted: 27 May 2021 07:22 AM PDT

    Hi, I am running python 3.8 and I created an environment using anaconda and pip installed matplotlib, numpy, pandas, and tensorflow. All of the others work perfectly well but when I got to import tensor flow I get the two following messages:

    W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found

    I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

    What is wrong and how can I fix it?

    submitted by /u/Agreeable-Memory-253
    [link] [comments]

    Looking to create a project, would appreciate some advice to start

    Posted: 27 May 2021 11:02 AM PDT

    Hey all, I would really appreciate some advice on a project I want to start. It's a personal project I would like to build to learn some new basics, and hopefully add it to my resume.

    I want to create a very basic database application to store hospital patient records. I would like a very basic interface to input patient information when they visit, as well as being able to search and view records of past visits, along with a list of all their previous prescriptions (maybe even print the records if possible).

    Here is some information about the project that could give you an idea of what I am looking for:

    The application could be run and everything stored locally in set directories to simplify things a bit

    Speed is not the biggest priority, but would be nice. The main goal is to minimize memory usage as much as possible

    Database would consist of a few thousand entries

    Would like a form to create a new patient record, a form to look up and existing patient, and a form to fill a prescription

    I am not terribly experienced, but know Java and Python fairly well, as well as a bit of C++, but I am very open to learning new ones

    Is this project too complicated for me to complete in a couple of months' time? I have tried to simplify things as much as possible, such as the interfaces and forms. Also, what programming languages and libraries should I be using?

    I appreciate any advice you can offer, thank you!

    submitted by /u/jdken-gisbc
    [link] [comments]

    I wanna start programming for Raspberry

    Posted: 27 May 2021 07:08 AM PDT

    Which language should I learn?

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

    I can't seem to fix this null pointer exception error and why am I getting it?

    Posted: 27 May 2021 08:30 AM PDT

    I am getting this Null pointer expression error on this line (77th line):

    holder.status.setText(studentItems.get(position).getStatus(studentItems.get(position).getSid(), calender.getDate()));

    This is the function :

    public String getStatus(long sid, String date) {

    return status;

    }

    This is the error:

    java.lang.NullPointerException: Attempt to invoke virtual method

    'java.lang.String com.ddm.pix.MyCalender.getDate()' on a null object reference

    at com.ddm.pix.StudentAdapter.onBindViewHolder(StudentAdapter.java:77)

    at com.ddm.pix.StudentAdapter.onBindViewHolder(StudentAdapter.java:18)

    And why is this line getting a error(18th line):

    public class StudentAdapter extends RecyclerView.Adapter<StudentAdapter.StudentViewHolder>

    And getDate() function:

    String getDate() {

    return String.valueOf(DateFormat.format("dd.mm.yyyy", calendar));

    }

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

    I want Alexa/Siri/Google on a Raspberry pi

    Posted: 27 May 2021 07:22 AM PDT

    My dream is to have a small raspberry pi in the corner of my room and I can just shout "hey Pi, what is the capital of France", and it will search google and just read out the top result and everyone can work on it open source and improve it to add more functionality into modules and you can just add a pack of modules that do cool things like "Hey Pi, download the youtube video of never gonna give you up" and it will use yt-dl to download that video to your drive/nas/cloud/whatever you setup.

    Just imagine if you could talk to the raspberry pi how much more functionality that would open up.

    How close are we to this? Is it possible to do now? How would you set this up? what pieces are missing?

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

    What does your day-to-day work life look like?

    Posted: 27 May 2021 12:50 AM PDT

    Hei there, Wasn't sure if i could post this to r/programming so i looked around a bit and ended up here.

    I've been looking into programming recently bc my current job is getting quite ... Let's say frustrating.

    So now i'm halfway through codecademy and i wondered:

    What does your daily work routine look like?

    Do you get a big project every x time? Like "we have this customer who want this, that in pink" and you do it? Do you get small tasks everyday?

    I currently have no idea what to expect and i'd appreciate some insight...

    Thanks in advance, hopefully future colleagues

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

    No comments:

    Post a Comment