• Breaking News

    Monday, July 6, 2020

    Extensive Web Scraping Tutorial in Python, Ruby, Node, R and Java learn programming

    Extensive Web Scraping Tutorial in Python, Ruby, Node, R and Java learn programming


    Extensive Web Scraping Tutorial in Python, Ruby, Node, R and Java

    Posted: 05 Jul 2020 02:44 PM PDT

    Hi everyone, having worked in the web scraping industry for a few years I know how easily troublesome it can be to write, maintain and even begin web scraping.

    One year ago, I wrote a web-scraping guide that was really loved by the community. reddit post, article. It was actually my first and only gilded post here 😊.

    One year forward, I left my job and co-bootstrapped a web scraping API 🤞. During the year we have made some good tutorials for beginners on our blog and I wanted to share it with you.

    We tried our best to make those tutorials complete (20 minutes read time each) and simple. They cover many topics related to web scraping from bottom to top.

    • how to make HTTP requests
    • how to parse HTML
    • how to use Chrome headless

    and much more.

    So far we have written extensive guides for 5 languages:

    Hoping that it can help you with your work or your project.

    Happy to answer web scraping questions if you have any.

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

    Created a video to introduce beginner programmers to what debugging looks like

    Posted: 05 Jul 2020 05:44 AM PDT

    One very big mistake that programming teachers on all platforms make is completely removing debugging from the curriculum of learning how to program.

    This is wrong. Debugging is one of the most powerful tools any beginner can use to learn how to program. It can give you an intimate view of how your code is running and how it is that your computer deals with running your program in real time. Even now as a professional programmer I am surprised by how many junior programmers were never introduced to debugging. As such, I made this video to show everyone what the purpose of debugging is.

    https://youtu.be/SWeZw5_LP2Y

    submitted by /u/Serious-Candidate
    [link] [comments]

    How did you figure out what sector of software development you wanted to work in? (mobile, cloud, AI, dev ops, etc)

    Posted: 05 Jul 2020 08:28 PM PDT

    Hey Reddit, I just wanted to spark a discussion on how you figured out what you wanted to do in the software/programming industry. I'm a college student just starting off my career, and I'm still very unsure on what position at what industry I want to work at. I'm not in a rush yet, but I was genuinely curious on how everybody's journey was like. Any advice would help :) Thanks

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

    How my first week of Programming went

    Posted: 05 Jul 2020 04:03 PM PDT

    So, I decided to try out javascript as my first programming language. It's interesting to say the least, but as I believe all programmers first started out, I had no idea what I was doing, I was confused, it was a huge mess. But after reading from websites like W3Schools it was so much more easy to understand, I even created a Rock Paper Scissors and just now to mark my one week progress, https://github.com/Sham0923/Marketplace a marketplace! It's ugly UI and stuff, I know, but at least it shows I'm learning, I'm just excited because I kind of know what I want to do when I'm older now. The feeling of having an issue and being able to solve it, then learning from it is exhilarating! I hope I learn much more throughout the summer and eventually the school year.

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

    How to get started

    Posted: 06 Jul 2020 12:38 AM PDT

    Hey guys, I would love to start programing but don't know where to start. I'm not looking for classes or anything, but if you guys have any recommendations in terms of books, videos, yt channels that might be useful, please do say. Thanks for your help!

    Ps: I want to learn python and sql

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

    I want to make a specific tool - which language would be the most suited for making it?

    Posted: 06 Jul 2020 12:04 AM PDT

    hi i want to make a little program that compares pixels (or any other form of data, doesn't have to be pixels can be something easier) and finds the differences, you know like the "find the mistakes" pictures you see in magazines, and then calculates the difference in % or whatever.

    What would be the best programming language to learn to make this kind of program?

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

    Books that are dedicated to teaching programming theory to beginners

    Posted: 05 Jul 2020 03:17 PM PDT

    Hello all,

    Im a system administrator looking to strengthen my programming knowledge. In college i had a fairly basic programming course in python. But the few years of not using it has left me without retaining the knowledge. I decided with covid free time I would try to look into books to relearn this skill.

    Upon getting a few books I noticed that a lot of them in the preface say that their not good resources for teaching the basics of programming. Even my copy of the 2nd edition of the C programming language says this.

    I found the books "Introduction to computation and programming using python" & "eloquent JavaScript" to be books closest to this topic.

    Does anyone else have any recommendations? Any programming language will do.

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

    Why is my Switch Statement Not Converting My Variables? (Java)

    Posted: 05 Jul 2020 09:34 PM PDT

    Follow up from previous question - I'm trying to make a program which asks the user for a number in base 16 and converts it to decimal numbers.

    I don't know even know if this is the right method to go about it, but to convert the letters (ABCs) in a base 16 number to decimal numbers, I have made a method which has a switch statement and reassigns the character (which initially has a letter) with a number.

    I then insert this method into a loop. The loop is supposed to run through every character in the string (the base 16 number) and if it finds a letter in there, convert that letter to a number and add it to a another string which will be printed out. If it doesn't match any of the letters then the value is just supposed to run through and not be changed.

    When I try and run this and input the number 123AB for example, I get exactly 123AB in return. It does not convert the A and B.

    What's wrong with my code?

    String num1; String num2 = " "; System.out.println("Please input a number: "); num1 = input.nextLine(); num1 = num1.toUpperCase(); stringLength = num1.length(); for(int x = 0; x<= stringLength-1; x=x+1) { char c = num1.charAt(x); charConverter(c); num2 += " " + c; } System.out.println("Converted number: " + num2); public static char charConverter(char c){ switch (c){ case 'A': c = 10; break; case 'B': c = 11; break; case 'C': c = 12; break; case 'D': c = 13; break; case 'E': c = 14; break; case 'F': c = 15; break; } return c; } 
    submitted by /u/JaguarBolt
    [link] [comments]

    I liked learning to program when I was young and now I started learning python but I just don't like to program anymore, is it because it's hard or it's not my thing?

    Posted: 05 Jul 2020 11:39 PM PDT

    so I am in the IT field, I work as a helpdesk kind of job as well and for the money(increase) reasons I was thinking to transition into AWS/DevOps side but to learn basics I was going to learn python but I just don't feel any spark in it. Did anybody have an experience where they did not like to learn programming language but did and are now reaping the rewards?

    Thank you.

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

    How can I take a user inputted number from outside the main method(Java)

    Posted: 05 Jul 2020 10:02 PM PDT

    Hello all I am taking computer programming at school and I am working on this lab and I'm stuck on a part of my requirements. Essentially I am creating a program that when a user enters a number between 1 and 5, it will display that number back to them. If the number entered is below 1it displays 1, and if the number is above 5 it displays 5. The requirement is to create an outside method with one int parameter.

    My problem is when I call an outside class from my main method:

    TestMax test1 = new TestMax(1, 5);

    test1.inputNum();

    test1.displayNum();

    It calls for an argument to match the outside method parameter so when I enter a number like 0 or 3 the output will always be that parameters number no mater the user input, so how would I be able to take the outside method inputNum() return value to display the correct number. Any assistance would be much appreciated.

    My displayNum looks like this:

    public void displayNum(int x) { if (x <= 1) { System.out.println(Math.min(minNum, maxNum)); } else if (x >= 5) { System.out.println(Math.max(maxNum, minNum)); } else { System.out.println(x); } 
    submitted by /u/yungfreshcut
    [link] [comments]

    Documenting your code is an often-overlooked skill when it comes to programming, so I wrote an article to help make you better at it.

    Posted: 05 Jul 2020 07:57 AM PDT

    https://medium.com/@rory.hellier/death-documentation-and-taxes-how-to-stop-avoiding-essential-documentation-faeebdf7b4e5

    Too often do I come across repositories without complete, or any documentation at all! I honestly believe that documenting your work is a vital opportunity to showcase your skills and your work to the rest of the world and sometimes in the pursuit of our chosen languages we forget the importance of making what we have made shareable.

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

    [CSS] Responsive margins with a "curtain" effect?

    Posted: 05 Jul 2020 09:46 PM PDT

    Hey!

    The title is vague so let me explain. I'm trying to recreate the responsive margins this demo webpage has: link Here's my quick code in JSFiddle: link In my code the body has a margin left and right of 14% and when the screen is reduced to less than 1450px then margins go down to 1% on each side. However, when this transition happens at the breakpoint of 1450px, the margins snap quickly at 1%, while on that demo webpage, the margins get reduced in such a way that it looks like they have a smooth transition animation, they don't snap instantly to 1% (or whatever they used), but rather they keep getting lower proportionally and smoothly.

    Does anyone know how to achieve this? I was thinking of adding a lot of breakpoints sections (max and min width) and reducing the margins by 1% in each section until I get to 1% but to me that doesn't seem how a programmer would do it .

    Thank you very much in advance!

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

    Guide: How to ask questions on StackOverflow

    Posted: 05 Jul 2020 01:27 PM PDT

    So you just ran into an error in your code and searching on Google gives you no answers. Obviously, the next step would be to ask the question yourself, but how? Everybody constantly makes memes about how StackOverflow could be an unfriendly place for beginners and how their questions are closed as off-topic or flagged as a duplicate.

    I made this guide hoping that it would help out a lot of beginners learning to code. So let's begin!

    Step 1 - Actually do your research

    To avoid your question being marked as duplicate, do your research. I can't stress this enough. A lot of people copy-paste their entire crash stack trace to Google and wonder why they get no results. Or a lot of beginners panic when they copy-paste the bare minimum ("what is NullPointerException?") and get confused when the resources deviate from their own code.

    Some good keywords to include in your search:

    • The error keyword (e.g. IOException)
    • The actual error message (e.g. NOT NULL constraint failed)
    • The programming language or framework you are using where this error occurred (e.g. Vue.js)

    These search terms will often lead you to documentation. Yes, read the documentation. Don't worry if it doesn't make sense to you at first. Just take your time and see what you can find in the documentation.

    But what if you still can't find an answer to your problem?

    Step 2 - Word your questions correctly

    On StackOverflow, when writing your question, write it in a clear, concise manner that gives people enough information about your code to help diagnose your problem. What will get your question downvoted to oblivion is simply copy-pasting your code and saying "help, I got an error on line 239." Don't do that. Instead, write out the relevant portion and explain what error you are getting:

    I'm trying to lock thread7 but framework X gives me an error that "thread7 is not lockable in this context". Here is my code: <insert code here>. I've tried calling thread7.lock() in other contexts and they work. What makes thread7 not lock()-able in this context?

    This is good because:

    • readers can understand what the error is from your description
    • they only have to skim through the relevant bit in your code, instead of your entire codebase
    • readers know you have tried to solve the problem (by "calling thread7.lock() in other contexts")

    One more thing to note is that StackOverflow will keep anything you post forever. That means once you post a question, it will probably stick around with your name forever. So do be professional and don't post anything embarrassing you might regret later.

    Step 3 - Give further information if requested

    Sometimes, you will get messages that you didn't post enough information! That's OK. Just edit your post and add more details. For example, on the question example I gave above, somebody might say "hey, we don't know where you are calling the thread7.lock() in. Can you post the name of the parent class?" Edit your question and add more parts to your code so that readers can understand your question better.

    Step 4 - Accepting answers

    If you have received an answer and it works for you, don't just leave it there! Always mark your questions as solved if you have received a good answer.

    Step 5 - Incorrect decisions

    Sometimes, your question may be flagged as a duplicate or off-topic and closed. If you really believe that this isn't the case, then flag it for moderator attention. Explain in detail why you think the decision is wrong. Often more times than not the moderators will understand a mistake occurred and will reverse the decision if your rationale is just.

    I hope this guide helps you on asking better programming questions and StackOverflow posts! If you think this guide could be improved, or if you have any questions, feel free to message me and I will try and help as best as possible.

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

    Please share some resources from where I can learn all about flow charts and algorithms...TIA

    Posted: 06 Jul 2020 01:11 AM PDT

    I want to learn everything about flow charts and algorithms.

    So please share some good resources (video tutorials or websites) from where I can learn about them.

    Content should be in English.

    Pls help...TIA.

    PS - If it isn't the best place to ask then please direct me to the right sub.

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

    Coding in HTML/JavaScript/CSS vs. programming in Python?

    Posted: 06 Jul 2020 01:04 AM PDT

    Hi all,

    I'm a successful physics major who recently realized his federal financial aid runs out at the end of his junior year (in 2021). I've worked and researched for NASA, received awards and accolades, have astronomy course development under my belt, and have a vested, vetted passion for comprehending the mechanics of physical nature. However, without federal help remaining, a $15/hr job PT job at a grocery store, and serious uncertainty as to the likelihood of being able to land more scholarships, I'm looking elsewhere for possibilities. I am going to be straining and stretching my mind to envelop all funding options for physics, which is why I'm here.

    One of the options that occurred to me is to spend the next several months learning HTML, JavaScript, and CSS as deeply as possible, add to a repository on Github, attend Hackathons, do freelance work, and build a lustrous portfolio for a web development job. Thats a big undertaking, and it isn't my main passion, but I'd been drawn to it because it does involve functions and level of symbolism, can pay very well, and is a valuable skill to have in today's tech world.

    I hadn't considered Programming as an option, because I'd assumed CS degrees or other sorts of advanced credentials were required for all programmers. However, I'm hearing that job requirements are frequently inflated beyond an employer's expectations, simply to weed out the less driven, and I just saw some local Python job listings with no mention of a bachelor's degree. A mentor of mine is suggesting to pick up Python instead of web development, as it can parlay my existing skillset in mathematics and physics while being lucrative. He also said that having any sort of machine learning to stamp on my resume will bolster my hireability. Python sounds like something I'd enjoy much more, and so...

    Does this sound reasonable to you? With my growing physics background, would learning Python be a better, more employable skill than learning web dev? Do you have any alternate advice, directions, or opportunities you think I should explore? I'm open to any ideas!

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

    So you learn coding and now what?

    Posted: 06 Jul 2020 01:02 AM PDT

    You go to school, you watch tutorials, do online boot camps and they all say this is perfect if you're trying to do game programming, write apps and websites etc but they never tell you HOW or WHEN to make the transition to the field you want to work in. It's all console coding which I understand they teach you the basics and up but still some proper direction would be nice.

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

    Is this a good C integer-string concatenation function?

    Posted: 05 Jul 2020 09:17 PM PDT

    Hey all, I wrote my own function to concatenate a signed integer onto the end of a string in C, and wanted to know if its implementation is good or not.

    void strcat_int( char **s, int32_t n ) { // Create a char buffer with the number of digits with an // extra character for null terminator. int32_t digits = ( int32_t ) ceil( log10( n ) ) + 1; char * buffer = malloc( ( sizeof( char ) * strlen( *s ) ) + digits ); strncpy( buffer, *s, digits + strlen( *s ) ); char num_buf[MAX_INT_DIGITS]; snprintf( num_buf, digits, "%d", n ); strncat( buffer, num_buf, digits ); *s = buffer; } 

    I pass in a reference to the char pointer so I can modify it after allocating the buffer. Thanks!

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

    Have learned the most basic of basics previously, but never really went anywhere...I always felt like I needed a project, I've wanted to be able to take text in Mandarin or Spanish and be able to create a list of words ranked by frequency, could I do this with Python? If so, how would I get started?

    Posted: 06 Jul 2020 12:58 AM PDT

    I am sure it has been created, but I want to use it as a way to learn and to then use it to get into more projects.

    Would C++ be better than Python? Does it matter?

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

    Indoors Trade Show Floor Plan: How did they do this? (OpenLayers, SVG layers, map tiles)

    Posted: 05 Jul 2020 09:10 PM PDT

    Hi all, I'm curious how the devs behind this achieved this?

    I believe they're starting with some type of export from AutoCAD (dwg, tiff, svg, pdf?) and map tiling it in some way then rendering it with OpenLayers. Would they also be using something like GeoJSON to show the selectable booths or are those just selectable SVG layers?

    Any thoughts on a stack that could replicate something similar to this?

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

    annoying inconsistency with dropdowns

    Posted: 05 Jul 2020 08:55 PM PDT

    Hi guys,

    I am a 17 year old programmer and I have this inconsistency issue with my code. When I paste this code into the w3schools editor, it works flawlessly. However, when I run it through my browser, it gives me an error.

    My desired outcome is simply a dropdown menu followed by another dropdown menu that is dependent on the first one and then another dropdown menu based on that one.

    I use PHP to redirect the data from the form into the sql but that works fine. This normally is not an issue but recently this came up and is not going in. I really need help.

    It even works in jsfiddle like how I want it to but it does not work in my xampp set up.

    http://jsfiddle.net/9mwtf5vb/

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

    Competitive programming VS Web Development

    Posted: 06 Jul 2020 12:28 AM PDT

    I am entering the final year of my B.Tech course and am confused what part should I focus on.I am currently just solving problems on HackerRank but I want to up my skills and start solving GeeksForGeeks atleast.But on the other hand,I don't have any live projects in my resume as my entire time goes into this solving itself. So for a fresher,what will the best strategy be: Solving programming problems and hope of becoming really good at it one day OR to start learning React and other frameworks and have actual projects to help me out through the interviews? Kindly help me out through this...

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

    Missing required request header when doing request with CORS anywhere

    Posted: 06 Jul 2020 12:28 AM PDT

    Hi all,

    I'm getting an error "Missing required request header. Must specify one of origin,x-requested-with".

    At first, I was thinking there was an issue with the variable from the .env.local file but if I console.log it when doing the request I can see it is correct.

    Can anyone address me on what is wrong or what am I doing wrong?

    Here's the code

    ```

    let YELP_API_KEY;

    if (process.env.NODE_ENV !== "production") {

    YELP_API_KEY = process.env.REACT_APP_YELP_API_KEY;

    } else {

    YELP_API_KEY = process.env.YELP_API_KEY;

    }

    const Yelp = {

    // Returns restaurant search resuts

    async searchRestaurants(text) {

    console.log(YELP_API_KEY);

    try {

    let response = await axios.get(

    `https://cors-anywhere.herokuapp.com/[https://api.yelp.com/v3/businesses/search?limit=12&term=${text.what}&location=${text.where}&sort\_by=${text.sortBy}\`](https://api.yelp.com/v3/businesses/search?limit=12&term=${text.what}&location=${text.where}&sort_by=${text.sortBy}`), {

    headers: {

    Authorization: `Bearer ${YELP_API_KEY}`,

    },

    }

    );

    return response.data.businesses;

    } catch (e) {

    console.log(e);

    return "Error";

    }

    },

    }

    ```

    Thanks for your help

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

    Should i quit programming, am i too slow or dumb for it.

    Posted: 05 Jul 2020 06:27 PM PDT

    I started learning web development 3 months ago, now i have a working knowledge of html css javascript and sass. I can build a simple website and nothing too fancy.

    I'm 21 and today i saw a 18 year old's portfolio website which is so much better looking and designed that i can make. He made it using react and also knows node.js as per his portfolio. And currently he's learning gatsby something.

    I think I'm too slow to learn. I can't remember what I've learnt sometimes. And most importantly my designs are not that good.

    I wanted to be a full stack developer but idk if it'll ever happen or i will be good enough to get a job or get hired. I think i should quit but i really want to be a developer.

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

    help with adding a border between CSS grid-gap

    Posted: 05 Jul 2020 08:22 PM PDT

    what I'm trying to do is add a border and centre it in CSS grid as the picture below

    https://i.imgur.com/Q2JaJht.png

    can anyone help?

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

    No comments:

    Post a Comment