• Breaking News

    Monday, March 15, 2021

    I made a chrome extension that lets you copy text directly from Youtube videos learn programming

    I made a chrome extension that lets you copy text directly from Youtube videos learn programming


    I made a chrome extension that lets you copy text directly from Youtube videos

    Posted: 15 Mar 2021 07:40 PM PDT

    I was frustrated having to type out code and links from coding tutorials on Youtube, so I made a chrome extension that lets you copy text directly from the video!

    It uses the Google Cloud Vision API to detect the text, then renders the text as HTML on top of the video.

    Thought it could be useful to some of you, so am sharing it here. It's totally free.

    https://chrome.google.com/webstore/detail/selectext-copy-text-from/gkkdmjjodidppndkbkhhknakbeflbomf?hl=en

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

    What it means to "Know how to Code"

    Posted: 15 Mar 2021 10:43 AM PDT

    I've been working as a professional web developer for over ten years. Occasionally people ask me for advice on how to get started programming, or how to get through being stuck after a tutorial or 2. I wrote up my advice for people learning to code. I thought it might help people on this sub:

    http://writing.andrewritchie.info/tech/coding/2021/03/15/what-it-means-to-learn-to-code.html

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

    C# or Python?

    Posted: 15 Mar 2021 09:42 PM PDT

    I know a little of each but I figure I should pick one and stick with it. I'm doing this as a general hobby; I simply think it's a cool thing to learn and it interests me. Just me being a computer nerd. I don't really have a preference for either one, any suggestions?

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

    [C++] How does this GCD algorithm work?

    Posted: 15 Mar 2021 07:58 PM PDT

    int FractionWG::gcdWG(int n, int d) { int gcdWG = 1; n = (n < 0) ? -n : n; d = (n < 0) ? -d : d; for (int i = 2; i <= n && i <= d; i++) { if (!(n % i) && !(d % i)) { gcdWG = i; } } return (d > 0) ? gcdWG : -gcdWG; } 

    I got this code for an assignment from a friend but I don't want to just copy and paste without understanding it, because then I won't learn. Works great, but wouldn't be able to tell someone the nuts and bolts.

    Here is what I think I understand:

    • take in a numerator, denominator, use ternary operator to make it positive, set gcd to 1 since all real fractions AT LEAST have a gcd of 1.
    • Loop starting at 2 (not 1, we already established it MUST at least be 1 so we can check 2 now), break loop when i is GREATER than both the numerator and denominator... because ya can't have, say, 32 be the gcd of 4/16ths.
    • Now here is the confusing part... how does the if work?? I can see we use !, so "make sure this is NOT" and we check both n and d.
    • Finally, return gcdWG, must do validation that d is greater than 0, if not multiply by -1 since assignment says no negatives in denom allowed.
    submitted by /u/Willy988
    [link] [comments]

    Need help with a 'Slackbot'? Can this be done?

    Posted: 15 Mar 2021 10:37 PM PDT

    So I am hoping someone can help me with this issue or tell me if it's impossible. I am trying to create something like a simple Slackbot listener that auto responds to a certain phrase. HOWEVER, I am trying to respond through my regular user account and not a separate bot. The idea is for the response to seem like it's coming from me and not a bot.

    I would appreciate any help or resources in tackling this problem. Thanks

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

    test cases during coding interview, what does this mean?

    Posted: 15 Mar 2021 06:46 PM PDT

    When someone says write out some test cases during a coding interview, what does this mean? Does this mean to write an actual assert function or does that mean write some sample input and do a dry run through it based on the code I wrote?

    submitted by /u/Maximum-Limit-712
    [link] [comments]

    HumbleBundle Learn You More Code

    Posted: 15 Mar 2021 01:15 PM PDT

    I see HumbleBundle has a new bundle. Curious to see what others think about this group of books. I always liked the No Starch Press books, so these might be pretty decent. Learn You More Code

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

    Is it legal to scrape any News website for personal uses?

    Posted: 15 Mar 2021 08:50 PM PDT

    I solely use it for myself. I therefore only write a program that summarize and list news

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

    I know this might sound stupid, but what's the best way to review pull-requests? Any tip?

    Posted: 15 Mar 2021 01:06 PM PDT

    This is considered this programming?

    Hi guys! Recently I got a promotion at my job and now I have more responsibilities. One of them is help the team with some PR reviews and I think that I'm a mess doing it.

    What's best? Viewing on github or my IDE?

    Any tip so I don't fuck it up?

    I know it's a weird question

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

    What is the absolute simplest start-to-finish project that you (experienced coder/programmer/developer) can recommend to someone like me (soup-for-brains)?

    Posted: 15 Mar 2021 11:31 AM PDT

    I've false-started so many different coding courses (freecodecamp, codeacademy, various coursera/edx courses etc) that I'm starting to think that I have a learning disability.

    I may not be very smart but I've got the desire! I'd like to be a guy who makes things and I'm determined to teach myself how. My short-term goal is to learn how to build interactive websites and I was wondering if you experienced folks could recommend a project with the final outcome being me saying, "hey, look at this tangible thing, I made this!"

    I'm not sure how many of you got frustrated with coding at the very earliest stage but I'm kind of hoping to hear that I'm not the only one. Feel free to share your success stories about your early learning days as well, they'd really give me a boost!

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

    That feeling when an old client calls back years later asking specifically for you.

    Posted: 15 Mar 2021 11:38 PM PDT

    A few years ago a client asked me to help him get more customers(lead gen) via his website. His website was a twisted monstrosity of dependencies and a blackhole for data plans the world over.

    Explaining the state of his website i suggested i just make a new one that's more lightweight, reliable and more conducive to his goals.

    I made a simple one pager using one of many free online templates out in the wild. With some rudimentary adjustments i not only met spec but also provided extra benefits via a lead gen capture form and real time chat so his sales team had more surface area to work on.

    Fast & resilient website, SEO optimized, lead gen focused and at the least not ugly.

    Client was very satisfied as not only was his specs met but it was completed at record time. (something a webdev agency couldn't do for some reason as they couldnt even get mobile responsiveness right)

    Now Im in no way an accomplished programmer, im a marketer by trade. At most i'm almost junior level.

    I just hear people out carefully and deliver solutions based on their needs and goals. I also take care to be upfront about my capabilities and handle expectations accordingly.
    Give me your desired results and guidelines to follow during the markup stage and ill get it done.

    Fast forward to now and this client contacted me again asking me to build another site in the exact same way process wise.

    What can i say

    It feels good ;P

    Never thought my work was worth much due to a lack of deep programming know how.

    Seeing it get complimented and validated with someone willing to throw money my way is sweet.

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

    emu8086 : Initialization of an array

    Posted: 15 Mar 2021 11:32 PM PDT

    I m a beginner can anyone pls help me to solve this, I m programming on windows emu8086

    Initialization of an array T of n unsigned numbers, such that n is entered in input and each number is represented on 2 bytes (the numbers entered must be in decimal). The number of elements n is more than or equal to 100 and less than or equal to 200

    submitted by /u/A-D-Younes
    [link] [comments]

    I asked entrepreneurs from different communities on Reddit, Slack, Facebook, and LinkedIn about the MOST challenging aspect of mobile app development.

    Posted: 15 Mar 2021 11:01 PM PDT

    Your Guide to App Development w/FREE Sprint Plan Template!

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

    The following error originated from your test code, not from Cypress

    Posted: 15 Mar 2021 10:50 PM PDT

    I am facing when I run cypress test this is the error coming from cypress **The following error originated from your test code, not from Cypress.

    Cannot read property 'firstName' of undefined

    When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

    Cypress could not associate this error to any specific test.

    We dynamically generated a new test to display this failure.

    Check your console for the stack trace or click this message to see where it originated from.*\*

    const firstName = faker.name.firstName(); const lastName = faker.name.lastName(); const emailAddress = faker.name.firstName()+"@getnada.com"; const adminEmailAddress = faker.name.firstName()+"admin@getnada.com"; const password = 'Password1!'; const PhoneNumber = faker.phone.phoneNumber(); const PhoneNumberFormat = faker.phone.phoneNumberFormat(); const insurerPhoneNumber = faker.phone.phoneNumberFormat(1); const todaysDate = Cypress.moment().format('l'); const template = faker.name.firstName()+"_Template"; const treatmentTemplate = faker.name.firstName()+"_treatment_Template"; const allergiesName = faker.name.firstName()+"_Allergies"; describe('Create patient from practice', () => { beforeEach(() => { cy.viewport(1600, 757) cy.visit(loginData.Dev_Hub_URL); cy.verifyTitle(loginData.title); // verify practicer login page title cy.enterText(loginPageSelectors.emailField,dispenserData.practiceEmail3); // enter practicer email cy.enterText(loginPageSelectors.passwordField,loginData.password); // enter practicer password cy.clickOnElement(loginPageSelectors.submitButton); //click on the sign-in button }); it('Creating the patient successfully', () => { cy.clickOnElement(practicePageSelectors.addPatientId); // click on add patient button cy.clickOnElementTextWithForce(practiceData.addPatientLink) cy.enterText(practicePageSelectors.firstName,firstName); // enter first name of patient cy.enterText(practicePageSelectors.lastName,lastName); // enter last name of patient cy.enterText(practicePageSelectors.dateOfBirth,'11/07/1992'); // enter date of birth of patient cy.enterText(practicePageSelectors.phoneNumber,faker.phone.phoneNumber()); //enter phone number of patient cy.clickOnElement(practicePageSelectors.buttonId); // click on submit button //cy.verifyAccountVerificationMessage(practiceData.accountCreationMessage); // Verify the account creation message cy.clickOnElementUsingText(dispenserData.closeButton,practiceData.buttonTag); // click on the close button }) })``` yesterday this code running proper but immediate error occurred Please any one help me to solve this error. 
    submitted by /u/Equivalent_Swing4399
    [link] [comments]

    HTML/CSS: Centering Row of Images with Text on the bottom.

    Posted: 15 Mar 2021 10:42 PM PDT

    I am trying to have a row of 5 pictures with text on the bottom that directs them to a different page. I am having issues trying to get them in a row. How would I go about doing that? They keep going under each other and it is not what I want. This is my code:

    https://codepen.io/toro228/pen/vYyMmgM

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

    I cannot solve recurrences for my life. Any advice to make it click?

    Posted: 15 Mar 2021 10:19 PM PDT

    I can use any method I wish. Please help I have a midterm tomorrow

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

    How to make figures and text appear in order in R markdown??

    Posted: 15 Mar 2021 10:08 PM PDT

    I have a project I'm doing in R and it needs to be outputted to a PDF and the figure positions have been driving me absolutely bonkers.

    Basically, I just want my output to appear in the exact order I have it in my markdown file. For some reason R keeps creating some pages with pure text, some with figures and text, and some with figures only and they're not in order. For example, my markdown file will be ordered as Paragraph 1, Figure 1, Paragraph 2. However, my output comes out as Paragraph 1, Paragraph 2, Figure 1. Sometimes it'll even split the paragraph. I wouldn't mind the paragraph splitting except for the fact that it isn't consistent with it... Does anyone know how to fix this?

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

    How do I make the enter key be a default number when you press it?

    Posted: 15 Mar 2021 12:09 PM PDT

    #include<iostream>
    using namespace std;
    int main()
    {
    int Num_of_cookies;
    int Cookies_in_abox;
    int Box_in_container;
    cout<<"Enter the number of cookies per box or press 'Enter' to use the default of 24 per box.: " << endl;
    cin >> Cookies_in_abox;
    cout<<"Enter the number of boxes per container or press 'Enter' to use the default of 75 boxes per container.: "<<endl; cin >> Box_in_container;
    cout<<"Enter the total number of cookies: "<< endl;
    cin >> Num_of_cookies;
    int num_of_boxes;
    num_of_boxes = Num_of_cookies / Cookies_in_abox;
    cout << "The number of cookie boxes needed to hold the cookies: " << num_of_boxes << endl;
    int left_cookies;
    left_cookies=Num_of_cookies%Cookies_in_abox;
    cout << "Leftover cookies: " << left_cookies << endl;
    int num_of_cont;
    num_of_cont = num_of_boxes/Box_in_container;
    cout << "The number of containers needed to store the cookie boxes: "<< num_of_cont<< endl;
    int left_boxes;
    left_boxes = num_of_boxes % Box_in_container;
    cout<< "leftover boxes: " << left_boxes << endl;
    return 0;
    }

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

    Making a MERN stack with user login

    Posted: 15 Mar 2021 09:51 PM PDT

    I'm trying to make a website that can register/login users with express js and passport js for authentication which is not very difficult for me,

    the issue i'm having is the frontend, i can make the website i want with EJS templating, but it feels kinda newbe style, don't get me wrong i'm only 1 year in web development but i want this website to be in my resume and i want it to be impressive so i want to make a react frontend.

    i've worked with react a lot and i'm very familiar with react hooks and all, but i can't comprehend how would i implement login functionality and maintaining a session and having protected routes, i've searched a lot and i've found a few tutorials but they don't use passport js they use JWT and even with JWT it was so difficult to follow along with the tutorials, My main question is, should i just make my website on EJS templates for front end and is using EJS considered a newbe style,

    and if you'd recommend i use react do you have any link tutorial or guide for emplementing the authentication /authorization in react

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

    Convert a string to a list of integers?

    Posted: 15 Mar 2021 09:12 PM PDT

    This is so trivial but I'm having a hard time because of the structure of the string:

    '[813', '282', '214', '366', '166', '945', '763', '603]'

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

    ZyBooks - Java

    Posted: 15 Mar 2021 08:37 PM PDT

    My code works perfectly on my local machine. Yet, it shows random errors when I make submissions. I am restricted to submitting only a few times, making it a whole lot worse. So, I have no room for guess-and-check to see what lines of code are accepted by ZyBooks.

    I am running Java 8 to code on my computer, so I figured that if I use the same version of Java as ZyBooks then I won't run into these stupid errors. So, I just wanted to check if anyone here knows which Java version ZyBooks uses to compile the code.

    submitted by /u/Secure-List
    [link] [comments]

    Why is the GetAverage() giving me the wrong number?

    Posted: 15 Mar 2021 08:30 PM PDT

    IM getting this value: -9.25596e+61 when i display GetAverage(student). I believe my pointers are wrong and i might have to use references but pointers and references still confuse the shit out of me. Im also using structs to pass in information.

    void ShowData(Student* student) { cout << "Student name: " << student->name << endl; cout << "Student ID Number: " << student->idNum << endl; cout << "Average test score: " << GetAverage(student) << endl; //cout << "Grade: " << GetGrade(GetAverage(student)) << endl; } double GetAverage(Student* student) { for (int i = 0; i < NUM_TESTS; i++) { student->average += student->scores[i]; } double average = student->average; return average; } 
    submitted by /u/HousePappas
    [link] [comments]

    Help calculating mathematical model for loops complexity

    Posted: 15 Mar 2021 08:21 PM PDT

    Hi reddit, I'll be completely honest, this is homework, but I'm having a bad time understanding how to do this, I would appreciate if someone could help me out without giving me the answer since I'd rather get to the solution myself <3

    I was tasked with coming up with a mathematical model to calculate how many times a group of for loops will execute, this is one of those problems, I'm getting stuck in the increments parts, for example in a loop like this:

    for(int i = 0; i < n*5; i++){

    print(counter);

    }

    I know the result will be: 5n times, if the increment changes to something like i+=4 I know i just need to divide 5n/4, but I'm having a hard time trying to handle divisions and multiplications in the increment, also i have no idea what to do if there is an if statement involved, like this.

    I know the answer probably involves sums, I'm familiar on how they work but I have no idea how to apply it here, maybe I am missing something since I haven't used them in a long time, probably forgetting something.

    I already programmed all the cycles so i know exactly how many times they will execute, this is for testing the math models i come up with.

    Please i would appreciate any help, thanks in advance!

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

    No comments:

    Post a Comment