• Breaking News

    Wednesday, February 17, 2021

    Best programming language for API connections and parsing JSON Ask Programming

    Best programming language for API connections and parsing JSON Ask Programming


    Best programming language for API connections and parsing JSON

    Posted: 17 Feb 2021 04:09 AM PST

    Hello, I will soon need to connect to 4-5 different apis and work with big JSON responses (maybe a million values in each answer) and then making different calculations. I did a small test with Python and it takes 40-50 seconds to do all the tasks. is there any programming language that is better suited for this kind of task? Thank you

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

    How to make sure my git pushes don't mess with other people's stuff?

    Posted: 17 Feb 2021 10:52 AM PST

    Is it enough to just pull right before you commit and push? Or is it somehow not possible to mess with other people's stuff. I forgot to pull before I pushed, if other people have updated their own files in the meantime (since I last pushed), is that going to overwrite their changes?

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

    Need help on how to use this package

    Posted: 17 Feb 2021 08:15 PM PST

    I'm new with this stuff and my teacher is no help at all sadly, I dont understand the syntax. I've also Imported it but it always says that ReferenceError: $ is not defined.

    I'm making a youtube search website and since implementing it to client produces CORS error, I've implemented it on my backend.. I'm so lost.. watching tutorials and reading stuff but it didnt work

    I'm making a MERN project and I want to incorporate this package, I'm aware with the youtube API but I much prefer this APIless approach, if someone knows on how to do this, thanks.

    https://www.npmjs.com/package/usetube

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

    New Mac user coming from Linux looking for general help

    Posted: 17 Feb 2021 08:08 PM PST

    I hope this is an OK sub to ask this. If not, please delete with a clear conscience.

    Short intro: I'm in my 40's, been coding for fun since the mid 90's, professionally since like 2001-ish

    Back in the day I built websites using mostly Windows machines and was the dude who spent weekends fixing everybody's computers for pizza and beer.

    Then ran a business building things for people with PHP, MySql, Jquery, etc.

    Eventually got relevant work at non-tech shops in Win7, Win8, etc, and started doing a lot of Python and other slightly more modern stuff.

    Around this time, the Linux desktop started getting decent, and I gradually switched and soon started distro hopping. Even convinced a manager at the time to get us a server so I wouldn't have to run python and web stuff on Windows. Installed Debian on there.

    As of now, I have only used Linux machines for about the last 7 years. My wife and two teenagers are on Mint because I am not interested in supporting Windows. Personally and professionally, I have recently used Mint, Debian, Ubuntu, Arch, Fedora, and nowadays have settled pretty comfortably on a Manjaro machine.

    Finally, The Question:

    I am starting a new job in a few weeks, and we all work on macbooks. Aside from the occasional iPad to choose songs at a party or something, I have never used an Apple product before.

    Aside from not being familiar with the OS at all, I remember that at a few previous places where some of us used Linux and some of us used Mac, there were always a few occasional "gotchyas" with installing and running CLI stuff, etc.

    At the time, I felt fortunate to be in the larger group of Linux users, noticing the Mac users figure it out amongst themselves and whatever they had to do. Not like it was a big deal most of the time, these folks knew what they were doing.

    unfortunately for myself, I never paid much attention to the details, because why would I?

    OK, Seriously, The Question

    I understand that this is a very broad and general ask, but can any kind soul out there link an old dog to some good resources to learn some new tricks?

    I have been trying to google common tripping points moving to mac from linux, but haven't been finding much helpful stuff.

    Any small tidbits of info that will help me not waste my new teammates' time and not be a senior engineer who doesn't know how to use his computer would be greatly appreciated.

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

    Can you make an android display into a non-rectangular shape?

    Posted: 17 Feb 2021 08:04 PM PST

    For example, could I take my existing android phone and make its display into an oval instead of rectangular? Just have only the inner pixels work and the rest of the screen be black and irrelevant. If so, could you direct me to more resources on how? I'm not very experienced with programming.

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

    [Python] How do I get displays to remain in Pygame?

    Posted: 17 Feb 2021 06:36 PM PST

    The tutorial I was following made a bullet shoot from a ship, and it made the image "persist" by constantly updating its location through a binary(Fire=True) condition that restricted him to one bullet at a time. I had to diverge from that because what I want is a setup that allows me to have multiple of the same image in addition to the images remaining static. I've tried searching, but nowhere have I found how to just make static objects persist after spawning them.

    https://pastebin.com/zEgVNwnH

    Here's the relevant pieces of what's confusing me ^

    I can see it's something to do with the while loop, but I'm not sure what to actually place in there.

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

    Maze generator question

    Posted: 17 Feb 2021 06:09 PM PST

    I'm trying to figure out how to build a maze generator, one thing I'm having a hard time trying to get my head around is how to represent a cell and the walls around it, should it be (north east south west) but that leads to - would I have to change all the cells around that cell to create the wall? Any pointers would be great thanks :)

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

    Which programming language should i learn?

    Posted: 17 Feb 2021 02:00 PM PST

    Hi, i'm new here, but i wanted to ask you something: i'm 17 years old, and i've been studing IT and programming languages for almost 5 years now. I know how to programme in c++, java, arduino, assembly and a little bit of python, and i'd like to learn visual basic, c#, javascript and php, but i have one big concern about these languages: what do i do with them? I love programming, ngl, but i think that everything i learn from them is useless, because i won't ever write a program in c++ or in java which is going to be implemented in a machine or is going to launch on the market or is going to be big. These programs i do are only going to stay there. I'd like to know which language is used to programme microcontrollers like the arduino uno board. Can you please help me? I've always had this big problem, and i'm thinking about it day and night. Thank you so much.

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

    MAC Spoofer: Where to Start?

    Posted: 17 Feb 2021 05:22 PM PST

    I'm a CompSci minor at my university (CogSci major) so I've taken a decent amount of programming classes, but I still don't really know how to build anything. My github portfolio is tragically neglected and I want to build a MAC spoofer but a little unsure how or where to start. I'm really solid on data structures and theory since that's all my classes really cover but uncomfortably clueless on how to actually go about building anything How would I go about building this? How do I learn how to do this?

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

    Why is Spotify website so slow?

    Posted: 17 Feb 2021 01:26 PM PST

    Other websites, (Reddit, for example) load much faster.

    Media on other websites play faster compared to Spotify.

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

    How do I monitor audio output on the raspberry pi?

    Posted: 17 Feb 2021 11:01 AM PST

    I have a raspberry pi hooked up to an LED light strip and I'm trying to have it so that the lights react to the music being played by the pi. Is there a way to monitor the audio output? preferably using Python, because that's what I've been using to control the light so far.

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

    Open courses

    Posted: 17 Feb 2021 03:04 PM PST

    There's an online boot camp name open courses I have some questions about that boot camp. I'm wondering if it is worth any money? Job opportunities?

    submitted by /u/rahli-dati
    [link] [comments]

    How to split the pathname one by one using multiple tokens?

    Posted: 17 Feb 2021 08:35 AM PST

    I am working on monitoring the filesystem project. So I decided to take each pathname and add it to inotify_add_watch one by one to monitor them. But the problem is that whenever I try to split the pathname with the difference of newline "\n", the token1 variable prints all the pathnames. Although it should only print the first pathname and token2 prints the null number of times(depends on the number of pathnames).

    Note: I put the delimiter "\n". You can put space or anything. But none of them gave me the required result.

    char path[PATH_MAX] = ""; char path1[PATH_MAX]; void listdir(void){ DIR *dir; struct dirent *entry; if (!(dir = opendir(path))) { perror ("opendir-path not found"); return; } while ((entry = readdir(dir))) { char *name = entry->d_name; if (entry->d_type == DT_DIR) if (!strcmp(name, ".") || !strcmp(name, "..")) continue; snprintf (path1, 100, "%s/%s\n", path, name); if (entry->d_type == DT_DIR) { char *p; strcat (path, "/"); strcat (path, name); listdir(); if ((p = strrchr (path, '/'))) { if (p != path) *p = 0; } } } char *token1 = strtok(path1, "\n"); char *token2 = strtok(NULL, "\n"); printf("%s\n", token2); closedir (dir); } int main (int argc, char **argv) { if (argc > 1) strcpy (path, argv[1]); else strcpy(path, "/home/runner/TestC1"); listdir(); } 
    submitted by /u/ibilalkayy
    [link] [comments]

    Please help using proxys with python

    Posted: 17 Feb 2021 01:44 PM PST

    So I need to open a website using a proxy however my proxys have a username and password in the url or atleast thats how I understand them, I need to find a python module that'll let me do that and also edit the form on the website I've looked everywhere so anything helps!

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

    Can someone here explain this sega genesis mumbo jumbo in layman terms?

    Posted: 17 Feb 2021 08:45 AM PST

    (it's about why the labyrinth zone crash happens in sonic 1 when you look down after getting past the end of level signpost: https://www.youtube.com/watch?v=bQ_qfd1hUNQ)

    "Pattern Load Cues are a mechanism to spread out decompression of Nemesis-compressed patterns over several frames to keep the game from hanging, because it is a slow process. When a PLC request is queued, some tiles are immediately decompressed, then some values are stored in RAM so that processing can resume later in VBlank at the point where processing was suspended. The race condition occurs because one of these values, f_plc_execute ($FFF6F8), is initialized before the initial decompression is started, whereas the other values are initialized after the initial decompression is complete. If the VBlank interrupt occurs while the initial decompression is still running, the routines in VBlank (specifically, at sub_1642 and sub_165E) will start decompression, because f_plc_execute is not 0, but using uninitialized values. The critical value is v_ptrnemcode ($FFF6E0), which is a pointer to the routine to use to output the decompress data. Its value when no PLCs are suspended is 0, and there is no valid code at address 0, so when the game tries to jump there, it crashes."

    Source: https://info.sonicretro.org/SCHG_How-to:Fix_a_race_condition_with_Pattern_Load_Cues

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

    "Wave Invoicing" clone

    Posted: 17 Feb 2021 06:38 AM PST

    Does anyone know how much it would approximately cost to build an invoicing app like "Wave Invoicing" where a company could send an invoice to a client & they pay it via a credit card right there.. And how hard or easy is it?

    PS I know nothing about app development. I want to hire people who do but first I want to check if its possible or it would cost millions.

    Please refer me to the correct Sub if this is not the correct one

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

    How do I go left one indentation?

    Posted: 17 Feb 2021 10:22 AM PST

    Let's say I'm on the line "//Here". Usually I'd press left once (I set my editor to tabs) then hold up (or down) until I hit the if or a curly brace.

    If I was using spaces like how many editors are configured by default how the heck do I do this? Press left 4/8 times (8 if I want two indentations)? I'm actually clueless why improvement spaces have besides pasting code on the internet which you probably shouldn't be doing (and many have markdown which supports tab)

    for (int i=0; i<10; i++) { if (i>3 && i <8) { //code //code //code //code //Here //code //code } } 
    submitted by /u/TumbleweedStriking56
    [link] [comments]

    How can I be a better project partner

    Posted: 17 Feb 2021 05:40 AM PST

    I'm working on a school project with a fellow student. In the past I've worked with students who had a better understanding of the programming language than I did. This made me feel insecure and I'd rarely ask them to explain how things worked because I didn't want to sound like I was dead weight. This resulted in me not getting any practice during the projects and me not growing as a programmer. Since then I've stepped up my game and have been feeling more confident in my skills.

    But now I'm working with a partner who is exactly like I was and I realized I've not been a good project partner. I've done most of the work so far. When I realized this I had a couple of meetings where I tried to explain everything I'd done so far and to help them get on the way to contributing to the project. I realize it's my fault for working by myself instead of as a group. In the meetings we've had my partner just nods and agrees with everything I've said.

    How can I become a better partner in a project where I'm the one with more experience? I want to explain subjects to this person, but I know they're not going to get a full understanding from it if they don't get any experience with it. I want them to get experience out of this project but since I've done most of the groundwork I'm afraid they won't have a lot of motivation to start working on the project.

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

    Can someone explain how do i use MVC in node js using express mysql ? ELI5

    Posted: 17 Feb 2021 08:57 AM PST

    I want to know to how do we create and connect models with controllers . I am confused as to how we map routes , models , views and controllers to work together . Please explain like I'm 5. Any example code to demonstrate the concept would be helpful . I understand the concept of MVC but i can't seem to implement it .

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

    What type of code can I run to zoom into Twitch streams? Bookmarklets? Tampermonkeys? Found this code for "pop-up" mode ; although, mode no longer exists / works on Twitch afaik.

    Posted: 17 Feb 2021 08:08 AM PST

    The code below claims that pressing + or - keys will zoom && 6,7,8,9 would translate across the screen. Bookmarklets work by saving the code in the url of a "bookmark" and then running the script on the website.

    javascript:try{if(window.location.href.match(/^https?:\/\/www\.twitch\.tv\/[a-z0-9]+\/?$/i)){window.location=window.location.href.replace(/^https?:\/\/www\.twitch\.tv\/([a-z0-9]+)\/?$/i,"https://player.twitch.tv/?volume=1&channel=$1");}else{var v=document.getElementsByClassName('player-video')[0].getElementsByTagName('video')[0];v.id='54zps';v.style='transition:60ms;width:100%!important;height:auto!important';var p=document.getElementById('video-playback');p.style.position='fixed';p.style.left='0';p.style.right='0';p.style.bottom='0';document.getElementsByClassName('js-player-loading')[0].style.display='none';function f_m(t,p,n){var vm=( t=='t'? v.style.marginTop : v.style.marginLeft );var m=( parseInt(vm.replace(/[^\d-\.]/g,'')) || 0 );m=( p=='+'? (m+n) : (m-n) );if(t=='t')v.style.marginTop=m+'%';else v.style.marginLeft=m+'%'}window.onkeydown=function(e){var e=(e || window.event);var k=(e.keyCode || '');var v=document.getElementById('54zps');if(k==104)f_m('t','+',2);if(k==101)f_m('t','-',2);if(k==100)f_m('l','+',2);if(k==102)f_m('l','-',2);if(k==109){var x=( parseInt(v.style.width.replace(/[^\d-\.]/g,'')) || 0);x=(x-2);v.style.width=x.toString()+'%';f_m('t','+',1);f_m('l','+',1);}if(k==107){var x=( parseInt(v.style.width.replace(/[^\d-\.]/g,'')) || 0);x=(x+2);v.style.width=x.toString()+'%';f_m('t','-',1);f_m('l','-',1);}if(k==106){v.style='transition:60ms;width:100%!important;height:auto!important'}}}}catch(e){alert('Error. Please retry in popup mode')}void(0);

    Anywhoo, thanks!

    I haven't found a working solution other than this one that is partially working but the code only just throws an error.

    Edit: tried in vivaldi last night and chrome today :// found this in the console
    parent query string value was not specified

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

    How to create a Java application to implement a method GetMinimumElement(), that retrieves the smallest element in a stack? The method should be O(1)?

    Posted: 17 Feb 2021 08:05 AM PST

    Twitter API possibility questions.

    Posted: 16 Feb 2021 10:01 PM PST

    Would it be possible to automatically delete comments on your Twitter posts containing certain words or GIFs using Twitter's API? For example lets say my address is 5214 Reddit Avenue, would there be a way on Twitter to automatically delete any comments that contain 5114 Reddit Avenue?

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

    Dataset for food items

    Posted: 17 Feb 2021 07:31 AM PST

    I have developed a web application and I need some dummy data for food items , mainly the name and description . I am having trouble finding such data, it would be inserted in a MySQL database in phpMyAdmin. I need more info like price but that's something I can randomly generate.

    Any resources for this?

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

    Guys can help me do this in python

    Posted: 17 Feb 2021 07:03 AM PST

    Write a program that reads the height from a user and prints a triangular pattern of lines with alternate "AA" and "BB",with the specified height. For example, when the user enters a height value of 3, the following pattern is printed:

    AA

    BBAA

    AABBAA

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

    No comments:

    Post a Comment