• Breaking News

    Tuesday, February 20, 2018

    I made a python program to scrape my attendance/test-report data from my college's website and send it to me via Telegram. I also use the data to calculate how much attendance I'll lose if I bunk certain lectures & other stuff. learn programming

    I made a python program to scrape my attendance/test-report data from my college's website and send it to me via Telegram. I also use the data to calculate how much attendance I'll lose if I bunk certain lectures & other stuff. learn programming


    I made a python program to scrape my attendance/test-report data from my college's website and send it to me via Telegram. I also use the data to calculate how much attendance I'll lose if I bunk certain lectures & other stuff.

    Posted: 20 Feb 2018 09:25 AM PST

    Some background:

    I got into my first year of engineering last year. My college is very strict about attendance (I know right?) and they periodically put out a list of students with insufficient attendance and bust their balls. I do not wish to have my name up their so I worked out a solution. Also, I'm very lazy and hate logging into their site all the time to check attendance, so this program helps.

    Here's the link.

    Features include:

    • Attendance report: fetches screenshot of attendance report and saves the value of total conducted and attended lectures in database for use by other functions

    • Test report: fetches screenshot of test results.

      This feature quickly made the bot popular in my college since the webpage which shows test reports exists but there is no link to it on the website's page, which lead to many students not even knowing of its existence until I made the feature.

    • Bunk Calculator: Calculates the drop/rise in attendance in your overall percentage if you wish to bunk x lectures out of y total lectures.

    • Until80: So my college is very strict in regards to attendance. If attendance falls below 80, you get your name in defaulter's list, and if it's below 75, you also have to call your parents.

      This function gives me the total number of lectures I must consecutively attend so that my attendance is above 80%

      It saved me last sem as my attendance was 80.62% due to this function.

    It's available for every student who studies in my college (not just limited to my field) and right now some 20 odd students including me are using it.

    I'd love to have your inputs!

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

    6 tiny project ideas to go from "I know the basics!" to "I can build real things now!"

    Posted: 20 Feb 2018 10:44 AM PST

    Hey everyone,

    I started learning JavaScript 2 months ago now. After going through the basics, I was basically told to "Just start building!" & "Build things you want to build!"

    Of course, that never works.

    I got out of the tutorial phase pretty quickly because I had some people in my corner who actually understood how newbies think and could lead me in the right direction. But I see people who are just perpetually stuck in that tutorial phase all the time on this sub. So, I hope this will help!

    I wrote this for JavaScript because that's the language I'm learning, but the core ideas can be adapted to whichever language you're learning.


    Project Ideas to Bridge The Gap Between Knowing the Basics and Building Cool Websites

    If you're struggling to apply the JavaScript you already know, the solution is simple: Build the smallest possible thing you can think of.

    Then, make the next app a tiny bit bigger. Then make another, and another, continuing to scale up the difficulty.

    Before you know it, you'll start building websites that you can show off to friends & family.

    So, this is a progression of project ideas that will get you from absolutely nothing to building your first todo list.

    Here's an album with pictures of all of the projects: https://imgur.com/a/hQPGr

    Project #1: Hello Name!

    Create a small app that takes an input from a user and prints it back to them.

    Requirements:

    1. It should ask the user what their name is with an input element.
    2. There should be a button that triggers the output.
    3. The output should say "Hello NAME!"

    Project #2: Phone Price Calculator

    This project is from the exercise in You Don't Know JS: Up & Going.

    You Don't Know JS is a free book series that's highly recommended on this sub. Read the first chapter and complete the exercise at the end.

    The extra challenge is to take it out of the console. Make it an app that responds to user inputs and buttons.

    Project #3: Luck-Based Game

    Create a tiny game that will determine the winner based on whether they flipped heads or tails. These results should be random each time!

    Requirements:

    1. It should have a button to flip the coin.
    2. It should compare the results of the flip to the results of the computer's flip.
    3. It should display a "YOU WON!" or "YOU LOST!"
    4. The color of the text should change depending on whether the user won or lost.

    Project #4: Carousel/Slideshow

    Create a manual carousel that changes the image displayed on each button press. Similar to this.

    Requirements:

    1. There should be a left & right button that cycles through existing pictures.
    2. It should display the corresponding picture depending on which buttons are pressed.
    3. Left & right buttons should adapt dynamically to a minimum of 4 pictures.

    Project #5: Countdown Timer

    Create a countdown timer that counts down to your next birthday. Similar to this.

    Requirements:

    1. Set an end date.
    2. Calculate time between now & then.
    3. Display the clock.
    4. Stop the clock & display a message once it reaches 0.

    Project #6: To-Do List

    Go crazy! You've made it past the tiny apps. You're now ready to create your own projects.

    Create a simple to-do list and make it work however you want it to.

    Whether you want a thousand buttons or just one, this is YOUR to-do list.


    FAQ/Tips On Building These!

    1. What if I don't want to build these?

    This list only exists as a guideline. There's no rules about what the "correct" thing to build is. Build whatever you want!

    There's a hundred alternatives out there. You can make accordions, quizzes, or just whatever you can think up.

    The goal is just to build enough confidence and get enough practice to move onto bigger and better projects.

    2. Should I be worried about styling?

    No. Your only goal is to learn how to make JavaScript work with HTML/CSS.

    Don't worry about making any of these apps pretty until you're working on the to-do list.

    3. What if I don't know how the DOM works?

    If you like videos, I recommend The Web Developer Bootcamp. It's usually on sale for $12–$15.

    If you prefer articles, here's an article that can get you started.

    4. When I see the blank editor, I freak out!

    If you've never seen how a project is built before, it can be difficult to think of what you're supposed to do.

    I highly recommend going through Watch & Code. It's a free course that walks you through building a to-do list. Gordon really understands how newbies think.

    5. What do I do if I get stuck?

    Google is your friend!

    The most trusted resource for JavaScript is the Mozilla Development Network.

    You can also check StackOverflow & reddit to see if someone has encountered the same issue before.

    Conclusion

    I hope this helped! If you have any questions, leave a comment below.

    By the way, I'm an aspiring self-taught JavaScript developer. If you want to learn more about me, my website is here.

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

    Harvard has a great introductory playlist of lectures on Javascript and Node.JS.

    Posted: 20 Feb 2018 12:14 PM PST

    Recently started C++ in Engineering class I require help.

    Posted: 20 Feb 2018 10:46 PM PST

    Recently started doing Coding C++ in my Engineering class and I need to create a calculator that can find the mean, median, and mode of 7 numbers. I can do mean and median but can someone please help me create a code to find the mode?

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

    What are the best youtube channels for learning discrete structures/discrete math? What are the best youtube channels for learning discrete structures/discrete math?

    Posted: 20 Feb 2018 07:00 PM PST

    I am taking discrete math now at school. I don't understand the way my professor teaches. He goes over things way too fast.

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

    [Web Design] Colt Steele's Udemy Course or Andrei Neagoie's Udemy Course?

    Posted: 20 Feb 2018 10:02 PM PST

    I think I am going to buy a Udemy course to help my learning on web design and I can not decide between getting Colt Steele's The Web Developer Bootcamp course or Andrei Neagoie's The Complete Web Developer in 2018: Zero to Mastery course. Both of these courses have extremely high reviews and they both seem fantastic, so I would appreciate all of the suggestions I can find.

    I already know a fair bit of CSS and HTML, I primarily want to further my knowledge by advancing my CSS and learning other languages. I hope to take this knowledge by building helping to build a pretty professional website [end goal]. I appreciate all of your help.

    EDIT: I also already know Python, that just has nothing to do with web design (or very little).

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

    I just deployed my portfolio website

    Posted: 20 Feb 2018 07:34 AM PST

    The original mark-up is not mine, I got it from Traversy Media on one of his tutorials, but I made changes to fit my needs, which are very minor changes, anyways, I just wanted to share it here because it was here that my programming journey started, I made and remade this website many times and I decided remove all of my original content because I didn't think it was worth showing to people hiring, either way, this deploy is basically a first test to see people's opinions, mostly on responsiveness, and I'll be adding my own content on it very soon, hopefully.

    All kinds of critics are welcome :)

    https://dalzeny.herokuapp.com/

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

    Placing things in a database from a comma separated file? (SQL/Python)

    Posted: 20 Feb 2018 11:39 PM PST

    I have a text file that I created for another purpose, and want to use it in a new project. The first word before the comma is in Chinese. The second is in English. I don't know how to tell SQL which encoding to use. I know how to split the commas off the text, but I don't know how to add two separate words two separate columns in SQL.

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

    Does anyone know how to display formatted code on the mobile reddit app (if it's possible)?

    Posted: 20 Feb 2018 11:38 PM PST

    Like this stuff:

    hello i'm code bye 
    submitted by /u/whatsanameimtired
    [link] [comments]

    Local database vs online database -- need some basic direction for my use case.

    Posted: 20 Feb 2018 11:21 PM PST

    Hi, I'm learning python at a low level (scripting) to be able to automate some web tasks. At some point I may just hand the task of running the scripts to someone else (a human is still needed for parts of said tasks). In these cases using an online database like firebase seems ideal. I don't like how everything seems to be a key value pair though; maybe I need to spend more time learning about databases and whether this is a good thing or not.

    Local databases are another option. I wanted to ask you guys if they are more flexible in that they can store lists, dictionaries etc. If so, is there any way to make them easily usable by people on different computers (not in the same building)? Or should I stick to learning firebase

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

    So I have some big ideas for websites, social medias and etc. but I am very lost when it comes to coding.

    Posted: 20 Feb 2018 11:11 PM PST

    I think i would like to learn python. What is the best way to start from scratch and to make a social media website and make my ideas into code?

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

    Whats your favorite easy-to-use IDE for python?

    Posted: 20 Feb 2018 11:08 PM PST

    I've been using IDLE because I can easily access it from my Dock (Mac), it looks nice and clean, and it's decent. It's also very basic, so I'm looking for an upgrade. I find Jupyter painful to use / annoying to access - any other suggestions?

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

    [Java/Android] How to deal with handling dynamic JSON objects with Retrofit?

    Posted: 20 Feb 2018 10:52 PM PST

    I'm using Retrofit to make several API requests to a server and have a bunch of POJO classes/models to handle my first request, however the next lot of requests I need to make have dynamically named objects nested within it and i'm not sure how to go about accessing the data inside them.

    This is the JSON result i'm getting back,

    { "Response": {` "characters": { "data": { "2305843009266323421": { "membershipId": "4611686018439307322", "membershipType": 2, "characterId": "2305843009266323421", "dateLastPlayed": "2017-10-18T08:05:30Z", "minutesPlayedThisSession": "3", "minutesPlayedTotal": "4590", "light": 301, "stats": {...}, "raceHash": 898834093, "genderHash": 3111576190, "classHash": 3655393761, "raceType": 2, "classType": 0, "genderType": 0, "emblemPath": "/imageURLhere", "emblemBackgroundPath": "/imageURLhere", "emblemHash": 3373303017, "emblemColor": {...}, "levelProgression": {...}, "baseCharacterLevel": 20, "percentToNextLevel": 0.0 }, "2305843009266323422": {...}, "2305843009266323423": {...} }, "privacy": 1 }, "itemComponents": {} }, "ErrorCode": 1, "ThrottleSeconds": 0, "ErrorStatus": "Success", "Message": "Ok", "MessageData": {} } 

    where the 3 objects under 'data' are dynamic characterId's for the player i'm searching for, and everything inside each character object are it's attributes (which I am trying to access).

    I came across this article about handling/deserialising dynamic JSON but in the example the keys are dynamic, where as my JSON the object is dynamically named, so i'm confused as to how to handle these 3 objects and then access the attributes inside of each of them?

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

    CS fresher, where do i start

    Posted: 20 Feb 2018 10:35 PM PST

    i am a complete noob and just starting my CS program this fall.

    have intermittently followed cs 50 by david malan, think i completed problem set 3 or something (this was a few months back) so that's all the programming exp i have.

    i was doing a bit of research and i have udacity (python 101?), FCC and odin project in my to do list before uni starts.

    where do you reckon i start off and what would be your advice for someone like me.

    i do understand that the CS program will be a bit theoretical so want to get my practical/real world knowledge to a certain standard by the time i finish my program (~>3 years?) and yep, if there is any other resource that i have not listed above,please do chime in.

    much appreciated.

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

    Debugging help please! I am struggling.

    Posted: 20 Feb 2018 10:14 PM PST

    I keep getting errors while running my code. I've been fighting with it for several hours now. I've double checked for braces and semi-colons.

    code

     package conversionprogram; import java.util.Scanner; import java.lang.Math; import java.util.Scanner; /** * * */ public class ConversionProgram { //8. conversion program Write a program that //asks the user to enter a distance in meters. public static void main(String[] args) { double meters; public static int option = 0; //The program will then present the following menu of selections //1. Convert to kilometers //2. Convert to inches //3. Convert to feet //4. Quit the program Scanner keyboard = new Scanner(System.in); System.out.println("Enter a distance in meters."); meters = keyboard.nextDouble(); //The program will convert the distance to kilometers, inches //, or feet, depending on the user's selection //Here are the specific requirements: //• Write a void method named showKilometers, which accepts the number of meters as an argument //The method should display the argument converted to kilometers.Convert the meters to kilometers using the following formula: //kilometers = meters * 0.001 public static void showKilometers(double meters) { double kilometers; kilometers = meters * 0.001; System.out.println(meters + " meters is " + kilometers + " kilometers"); } //• Write a void method named showInches, which accepts the number of meters as an argument //The method should display the argument converted to inches. //Convert the meters to inches using the following formula: //inches = meters * 39.37 public static void showInches(double meters) { double inches; inches = meters * 39.37; System.out.println(meters + " meters is " + inches + " inches"); } //• Write a void method named showFeet, which accepts the number of meters as an argument //The method should display the argument converted to feet. //Convert the meters to feet using the following formula: //feet = meters * 3.281 public static void showFeet(double meters) { double feet; feet = meters * 3.281; System.out.println(meters + " meters is " + feet + " feet"); } //• Write a void method named menu that displays the menu of selections //This method should not accept any arguments. private static void menu() { System.out.println("Enter your choice:" + "1. Convert to kilometers" + "2. Convert to inches" + "3. Convert to feet" + "4. Quit the program"); } do { menu(); do { option = keyboard.nextInt(); } while (option != 1 && option != 2 && option != 3 && option != 4); if (option == 1) { showKilometers(); } if (option == 2) { showInches(); } if (option == 3) { showFeet(); } } while (option != 4); } } //• The program should continue to display the menu until the user enters 4 to quit the program //• The program should not accept negative numbers for the distance in meters. //• If the user selects an invalid choice from the menu, the program should display an error message //Here is an example session with the program, using console input //The user's input is shown in bold //Enter a distance in meters: //500[enter] //1. Convert to kilometers //2. Convert to inches //3. Convert to feet //4. Quit the program //Enter your choice: 1 [enter] 500 meters is 0.5 kilometers. //1. Convert to kilometers //2. Convert to inches //3. Convert to feet //4. Quit the program 

    errors exit status 1 Main.java:43: error: illegal start of expression public static void showKilometers(double meters) { ^ Main.java:43: error: illegal start of expression public static void showKilometers(double meters) { ^ Main.java:43: error: ';' expected public static void showKilometers(double meters) { ^ Main.java:43: error: '.class' expected public static void showKilometers(double meters) { ^ Main.java:43: error: ';' expected public static void showKilometers(double meters) { ^ Main.java:54: error: illegal start of expression public static void showInches(double meters) { ^ Main.java:54: error: illegal start of expression public static void showInches(double meters) { ^ Main.java:54: error: ';' expected public static void showInches(double meters) { ^ Main.java:54: error: '.class' expected public static void showInches(double meters) { ^ Main.java:54: error: ';' expected public static void showInches(double meters) { ^ Main.java:65: error: illegal start of expression public static void showFeet(double meters) { ^ Main.java:65: error: illegal start of expression public static void showFeet(double meters) { ^ Main.java:65: error: ';' expected public static void showFeet(double meters) { ^ Main.java:65: error: '.class' expected public static void showFeet(double meters) { ^ Main.java:65: error: ';' expected public static void showFeet(double meters) { ^ Main.java:74: error: illegal start of expression private static void menu() { ^ Main.java:74: error: illegal start of expression private static void menu() { ^ Main.java:74: error: ';' expected private static void menu() { ^ Main.java:74: error: ';' expected private static void menu() { ^ 19 errors

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

    Edit data coming through router

    Posted: 20 Feb 2018 09:58 PM PST

    I'm learning about networking currently, and I thought of this question. Is there a way for me to set something up on my router so that it changes a certain response from a certaim website (say, replacing the data that goes into a page)?

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

    Java help, JList and vector

    Posted: 20 Feb 2018 09:19 PM PST

    So I am trying to solve this problem where I have two tabs on an applet and on the first tab I add objects of type Dog to an animalList in the form of a vector. In the second tab I have a JList that has all the Dog's added from the first tab then two JButtons "add" and "remove". Below the buttons is a second JList.

    When I click on the "add" button the listener gets the index from the first JList then does selectedAnimalList.add(animalList.get(i)); When I click on the "remove" button it takes the selected index and removes it from the bottom JList. This part is less important but maybe relevant I don't know.

    I have an updateUI() for both the JLists; however, when I go back to the first tab add another object of Dog and go back to the second tab the JLists go blank. I need help making it not go blank.

    Edit: specify what I need help with

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

    I am starting a blog series where I assign out projects for you to do to motivate you to code something and to build REAL WORLD experience in software development.

    Posted: 20 Feb 2018 08:09 AM PST

    Programming is incredibly fun, if you can find something to code. So I present to you:

    Lesson 1 - API Crazy

    Using this list of public APIs, choose two APIs and build an interface around them.

    Examples

    1. Use the weather API to get the weather, and then use a music API to find music related to the current weather. If its raining find songs with "rain" in the title.
    2. Build a graph that compares stocks to crypto currency prices.
    3. Allow searching of recipes and nutrients

    Details

    You must use at least 3 endpoints from each API, the APIs do not have to correlate or use data between each other (example 3). Your GUI can be a web interface, a WPF app (modern windows desktop app) or a console app. Points are awarded respectively. For example, higher points are awarded for a web interface than a console app.

    Languages

    I know C# or Javascript,, so I can help and offer advice and recommendations for these but you can do this project in any modern language like Python, PHP, Golang, and more.

    Bonus Points

    • APIs that require auth.
    • Using a modern Javascript framework such as Angular 5, React, or Vue

    Tips

    • Try NOT to generators, templates or scaffolding. Not just because its "cheating" but because 95% of the time they contain tons of stuff you don't want or need and they have outdated or very opinionated practices.

    • Try to reach for popular libraries first. For example, if you are using C# and APIs this library is incredibly helpful https://github.com/canton7/RestEase

    • GO CRAZY. If you found this too easy, add a data persistence layer! If you use JS only, toss it all in local storage, for C# LocalDb, or Sqlite.

    I will try to create a lesson a month if there is valid interest, I will also try find time to quickly review your code and offer tips or tricks.

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

    C++ or C# Next?

    Posted: 20 Feb 2018 08:27 PM PST

    Hi,

    I've been programming in Python for about a year now and I feel pretty confident in it. Although I plan to continue with Python to learn pandas, numpy, scikit-learn etc. I want to grab another language. Ive built SFTP-File transfer servers, i built an app that grabs current location, time of day, and weather and sets wallpaper accordingly, and i made a youtube video web scraper, and more.

    I was wondering, what would be best for me to pursue, C++ or C#? I enjoy programming for finance, game development, learning about netsec, music related stuff (I want to learn how music quality is read) etc.

    I also work in the finance and insurance industry and was wondering which would be best for me.

    Thank you,

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

    HAIL HYDRA!!!

    Posted: 20 Feb 2018 08:08 PM PST

    I've had this thought recently, and thought maybe someone here would appreciate it.

    Learning programming is like fighting a hydra. Each new thing you learn only teaches you about 5 more things you need to know. The more I seem to know about programming, the more I seem to know I don't know.

    It can feel exhausting at times.

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

    What IDE breakpoints feature you think the best for debugging your code?

    Posted: 20 Feb 2018 08:00 PM PST

    For me. I only use simple breakpoint. I am curious about any advanced features of it

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

    Web developers, does anyone use CODA iPad app? If so how is it?

    Posted: 20 Feb 2018 07:45 PM PST

    Is coda a good iPad Pro app?

    Who here uses it

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

    Error during compilation in java

    Posted: 20 Feb 2018 03:44 PM PST

    public enum Month{ january(31), february(29), march(31), april(30), may(31), june(30), july(31), august(31), september(30), october(31), novemebr(30), decemeber(31);

    private final int nbDays; private Month(int nbDays){ this.nbDays = nbDays; } public int getNbDays(int year){ if (this!=Month.february){ return this.nbDays(); //line 29 }else{ if (this.isBissextile(year)){ return this.getNbDays; }else return this.nbDays()-1; } } } 

    Hello, i get this error : Month.java:29: error: cannot find symbol return this.nbDays();

    Can someone explain me why please...? Thanks

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

    Tribute to the entrepreneurial spirit.

    Posted: 20 Feb 2018 07:28 PM PST

    Tribute to the entrepreneurial spirit. I want to learn programming. And the two best ways I've seen or heard about learning something is to read, or ask someone who knows. So, does anyone know of any decent tutorials, books, or articles that describe how to start off and learn the basics? Or if there's anyone who has dealt with c or c++ in their careers and is willing, how did you start out? Would you be willing to teach a few things?

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

    No comments:

    Post a Comment