• Breaking News

    Thursday, May 3, 2018

    I made this free tool for learning programming (it's like Duolingo for learning to code) learn programming

    I made this free tool for learning programming (it's like Duolingo for learning to code) learn programming


    I made this free tool for learning programming (it's like Duolingo for learning to code)

    Posted: 03 May 2018 06:29 AM PDT

    Here's the link to the main page

    Supports: C#, C++, Java, JavaScript, PHP, Python, Ruby, Swift

    I posted this here a little over a year ago when I first launched Edabit. Back then, the site only supported JavaScript, had about 50 challenges and was brand new with no user base. There are now over 500 challenges, it supports eight coding languages (and eight spoken languages for the UI), and has a pretty active community. So, I think it's worth posting again. If you've got any feedback, thoughts or ideas, I'd love to hear them!

    Enjoy

    EDIT: Thanks for the gold!

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

    I signed my first contract

    Posted: 03 May 2018 05:00 AM PDT

    Decided to be a coder in my late twenties. Three years of education later, today, I signed my first contract as a coder in my early thirties. Guys, gals, ladies, gentlemen, boys, girls: I believe I did it.

    Big thanks to Shenzhen I/O for showing me that I like coding and to CS50 for giving me solid basics in a month.

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

    [SQL][Homework] Why does this query not return all averages less than 20?

    Posted: 03 May 2018 08:01 PM PDT

    Here's the SQL command:

    SELECT publisher.pubid, AVG(books.cost) "Average Book Cost" FROM publisher, books WHERE (publisher.pubid = books.pubid AND (SELECT AVG(cost) from books) < 20) group by publisher.pubid; 

    It returns an empty table. However, if I change the "20" to any number higher than 24, it displays all prices (even those greater than 20).

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

    community college certificate vs coding bootcamp

    Posted: 03 May 2018 06:06 PM PDT

    Hey reddit, my community college offers a website developer certificate and also a software developer certificate. I've been studying to get into Fullstack Academy (coding bootcamp) which is a 3.5 month course. completing one of the cc certificates would take roughly a year and a half and around half of the cost. does anyone of experience with completing a certificate and does it make you more employable? bootcamp? what were your results?

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

    Going to my first Hackathon. What should I prepare?

    Posted: 03 May 2018 04:47 PM PDT

    I'm going to my first Hackathon with a friend. I'm a CS graduate and know Python, C++, and Java. What concepts should I familiarize myself before going? What should I expect? I'm hoping to network with other young devs and hopefully meet some recruiters, but the most important thing is to learn something and have a good time.

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

    How and what can I learn to make at least $100 a month freelancing?

    Posted: 03 May 2018 03:44 PM PDT

    I'm a beginner and am currently almost done with CS50. This may come across as an immature question, but I need to learn how to make this amount as I would be starting college in a few months and as much as $100 a month could significantly help pay off the fees where I live. Also, since I am on a gap year, I have all the time in the world to learn whatever I have to. And please don't suggest I get a job. I have tried and there is no one who'll hire an 18 year old who is about to start college. Plus, freelancing will also help me learn and build my resume Any input would be really helpful.

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

    How do I get list of hot posts on any subreddit

    Posted: 03 May 2018 04:54 PM PDT

    How would I go about getting the list of hot posts subject to some sort of constraint from any subreddit using python?

    I understand how I can make a request using requests and decode it into utf8 and perhaps look for the element tags but I don't know how to extract the useful information.

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

    How exactly do you approach coding an application from start to scratch?

    Posted: 03 May 2018 08:14 PM PDT

    Let's say I have started coding for a new application. There are going to be several classes, several sub-classes, hundreds of methods etc.

    And there's going to be one main class which drives the whole application.

    I am always lost which part of the application code should I start with. Should I write the main class with not yet created classes, move along and then get back to get the IDE create those classes and methods for me? Or should I not rely on the IDE for such tasks at all? And instead first create those classes and methods needed and then start writing the main class.

    For example, let's say I have just started coding for a testing framework, here's how I would start...

    public class MainClass(){ private WebDriver driver; /****/ MainPage mainPage = new MainPage(driver); mainPage.getWebsite("..."); CommercePage cPage = mainPage.loginMethod(); /** **/ } 

    PS: I am a beginner so please ignore silly mistakes I might have made in the quickly written code above.

    In here I have not even created the MainPage or CommercePage classes yet. Let alone the methods inside them. Once I have something ready inside the MainClass, I'd go back into the IDE and use its inbuilt functionalities to create the classes and their methods(ex. getters, setters etc) at specified locations.

    I think I am not following the right way. Maybe I should have written the other classes first? Or maybe start with the methods somewhere?

    Where should the starting point be?

    Is there anywhere I can read on how to write something from start to scratch? I am still a learner and still write very simple programs or create testing frameworks. I love learning by watching things. I can watch hours and hours of someone coding an application. Is there any video out there?

    I know there can never be one single way. But I'd like to know how do you experienced people do it from start to scratch? There's several ways to cook a dish. But the masterchefs have figured out their own perfect way to approach the dish. I'd like to learn more about that.

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

    [Java Swing] Parse jTextField onto Date class

    Posted: 03 May 2018 08:11 PM PDT

    I have a date class that needs 3 variables to instance (day, month and year). I HAVE to use a jTextField as an input for the date, the problem is, I can't turn the string into 3 variables. How can I do it in Java?

    Date constructor:

    public Date(int day, int month, int year) { calendar = new GregorianCalendar(year, month-1, day); } 

    I also have another question, that is more basic. I have an array list and i want to know the ammount of values stored inside of it. When I use the .getSize it returns the following:

    java.awt.Dimension[width=387,height=162]

    Since I'm filling a jList with the values of the ArrayList, I use an aux variable to count the number of values, but I feel there must be a better way. Here is the code:

     int i=0; DefaultListModel listModel = new DefaultListModel(); for (Veiculo percorrer: DadosAplicacao.getInstance().getVeiculos()) { i++; listModel.addElement(percorrer); } veiculos.setModel(listModel); lblTotalVeiculos.setText("" + i); } 

    Thank you for any help you can provide.

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

    Looking to learn python programming from Udemy.com

    Posted: 03 May 2018 04:14 PM PDT

    Hi all!

    I am looking to learn python programming from udemy. There is a sale going on with so many courses with discounted prices. I am looking at complete python masterclass(Tim bechalka et.al) or python bootcamp(Jose Portilla).

    Which of these two do you guys recommend. I have done a diploma in IT so i have some background in programming. I am also looking a possible career that involves python language.

    Thanks!

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

    What’s the best free TDD tutorial (video or article) this sub knows of? Language doesn’t matter.

    Posted: 03 May 2018 04:05 PM PDT

    I have been developing for a career for a while now and would like to produce code that I have more confidence in. I know there is "a right way" to TDD that is independent of the changes in your code and would like to learn that way. What are the best tutorials you guys know of?

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

    Looking for resources for search/sort algorithms

    Posted: 03 May 2018 11:32 PM PDT

    Hey guys, basically the title.

    The last topic we covered in my COSC class was search and sort algorithms and while I conceptually understand them (for the most part), I don't really know how I'd implement them.

    Was wondering and hoping if anyone had any good resources that cover these algorithms.

    Thanks!

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

    Where to go next after CS50?

    Posted: 03 May 2018 11:28 PM PDT

    Hi guys. Im sure there are similar posts to this all over the internet but I was hoping this could be a bit more specific to me. With the myriad of information available online it doesn't make things easier always. In cases like mine I am overwhelmed as to what I do next.

    A little about me, I am a hardware electronics engineer in industry, trying to move into the world of software. I find progression in the vast world of AI very interesting but at this point I don't want to close down many options.

    At uni I did c to a basic level.

    So the first course I decided to do is edx cs50 recommended practically everywhere. I am almost done with that now. It was a good refresher to c, an introduction to python and web programming.

    My question is what next? Do I do a recap on math for later AI courses? Perhaps MIT's open ware course ? Or do I move to another mooc program?

    Should I delve straight into a specialisation? Like udacity AI course? Or another fundamental course before that?

    I am quite interested to learn alot of different things, like full stack web development, some VR programming etc. Is that spreading myself to thin and a bad idea? Should I go straight in the AI world and do various courses around that (machine learning etc)

    Finally? Anything else I should be doing on the side to keep improving?

    Sorry for the length of this post. Feel like I wrote my life story there.

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

    [Project] Confused as in how to this program and how I can improve it and make my own as well.

    Posted: 03 May 2018 11:09 PM PDT

    I am learning java and I decided to work on my first project. I wanted to make a chat application and I immediately was stuck. There are a lot, and I mean a lot of resources for this and I can't help but just copy it all. But is it learning, if I just copy? As of now I somewhat understand what goes into making a Chat application:

    • Sockets
    • Being able to send data back and forth
    • Able to keep the server "multi - thread" so it can handle multiple clients

    • Start and stop connections

    • Being able to send primitive data types? as text through the stream which I thought bufferedreader i think would have been helpful but the tutorial I followed did not use that

    • That is all i can remember at the top of my had

    This is basically what I have gathered from reading a lot of code and I am just pressed to copy their methods and techniques because even tho I somewhat understand the concept, I cannot put it into code. I caved in and I just started following this tutorial:

    https://www.eecs.yorku.ca/course_archive/2011-12/W/3214/j-chat-ltr.pdf

    And what i got the code below, Yet I also do not understand how to run it? I did some research and it seem I have to put into html but it still did not run, if anything that only thing that prints out is that "Connecting" so I don't even know if the code is working

    So how do i even run this program, and besides that, what other way would you recommend me for to build this program and how else could i learn about this? I did plan to make a gui but I still am kinda stuck on the very basics. Thank you very much for any what so ever help and I apologize for any bother

    https://ideone.com/Acn0p3

    https://ideone.com/v3jrkQ

    https://ideone.com/WBfvi3

    https://ideone.com/uMokk1

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

    Looking for project ideas to learn machine learning at scale.

    Posted: 03 May 2018 03:13 PM PDT

    My background: I'm an undergrad job hunting. On the ML side, I'm pretty comfortable with the contents of books like ESL or Deep Learning, and I've done projects with sklearn and tensorflow. On the engineering side I've done small stuff with multi-processor and multi-machine architectures in C and Python, and worked on large webapps at an internship.

    My specific questions: A lot of postings for jobs like "Machine Learning Engineer" want experience implementing machine learning solutions at scale.

    • What exactly does that mean? (Large memory needs/Minimizing compute times/Integrating with large existing codebases)?
    • Are there new concepts to learn, or is it just "learn how to do everything you would with sklearn on SparkML"?
    • Any ideas for a personal project that would demonstrate knowledge in these skills? Is one possible with zero or minimal AWS cost?

    References to scale in the FAQ and previous questions mostly seemed to refer to codebase size which is different than what I'm asking here.

    Thanks!

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

    Localhost 8000 keeps on running the same file

    Posted: 03 May 2018 10:39 PM PDT

    I set up a local test server using the "python -m http.server" command. Before running this command I changed my directory to "~/Documents/Server_Examples". However, each time I try to open my localhost 8000, it automatically runs an HTML file named "index.html" from the directory "~/Documents/Javascript_Tutorial". I then ran "python -m http.server 7800". When I accessed this port, it directed me to a link to all the files in the directory I was currently in ("~/Documents/Server_Examples"). I then picked the HTML file I wanted to run and it worked.

    However, just out of curiosity, I stopped the server, changed the directory to "~/Documents/Javascript_Tutorial" and ran the same 7800 local server. It again automatically ran "index.html". Moreover, when I tried to run the same server in the "~/Documents/Server_Examples" directory, it automatically runs 'index.html', just like the local 8000 server was.

    I've tried some commands to kill the servers but they just run the same file each time.

    What do I do?

    EDIT: Also, each time I run either of the servers and access them in the browser, no GET requests are shown in the terminal. Also, I'm working on a mac.

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

    Best online coding tests

    Posted: 03 May 2018 10:35 PM PDT

    I am looking for a job, I am learning python, mysql etc. Which all are the best online coding tests to attend, so that I can showcase myself in interviews?

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

    Trying to make a flashcard type program to help people study information, could use a little guidance

    Posted: 03 May 2018 10:24 PM PDT

    So I'm trying to make a webpage where the user has 50 different choices to choose from. I'll use pokemon cards as an example. The goal is to click on a pokemon you want to learn about, and then when you click on it an image and some information pops up. There are a few twists I'd like to add.

    So when they click:

    -Name of card and other basic unchanging info about the character pops up

    -1 of 5 Images for that character randomly pops up

    -1 of 5 text descriptions for that character randomly pops up

    -when you click on each pokemon it doesn't load a new page to display the information

    -Bonus would be to make it aesthetically pleasing. I don't mean using normal CSS, but more advanced, where maybe it does a sliding animation or something like that. jQuery best?

    So I guess the twists are the randomness of the image, the randomness of the text descriptions, the visual aesthetics, and no page loading each time you load a new card.

    I know HTML/CSS at intermediate level, and I am ok at JavaScript. I have done a bunch of JavaScript algorithm problems and tutorials, but haven't used it on my own at all.

    I guess I'm looking for some advice on how to implement the bonus features. Should I try and manipulate DOM elements to display the information? Is there a framework that would be perfect for this type of project? How can I add the randomness aspect to it?

    Any input is much appreciated. Even just pointing me to a tutorial that might be helpful would be awesome.

    Thanks a bunch!

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

    C UNIX sockets - why don't I receive my message?

    Posted: 03 May 2018 10:23 PM PDT

    Hello

    I am trying to send myself a message via UNIX sockets, but I can't receive the message I am sending and don't see why. Could somebody tell me why?

    Server: https://paste.ubuntu.com/p/srGBktrP2W/

    Client: https://paste.ubuntu.com/p/d3Rv8HCFmm/

    Thanks

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

    How difficult is OOP with Python and Java and where should I start?

    Posted: 03 May 2018 06:16 PM PDT

    So apparently I learned Python's syntax as well as how to implement it to solve small-scale problems but I completely missed the OOP part of things. Now that I am somewhat familiar with Python how do I go about learning OOP without confusing myself on my prior knowledge. I would like to do the same with Java as I know that's a big OOP programming language as well.

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

    [Homework] Need help with HW based on Concurrency. Two Processes analysis (Operating Systems Class)

    Posted: 03 May 2018 05:27 PM PDT

    Hi everyone. I have an assignment with certain amount of codes that I need to analyze whether they satisfy the three properties of. (Before you tell me to ask the professor, he considers any kind of questions regarding HW to be "cheating cause I give you the answer!")

    Mutual Exclusion: Mutual Exclusion must be enforced. Only one process at a time is allowed into its critical sections, among all processes that have critical sections for the same resource or shared object.

    Liveness: If one or more threads want to go into Critical Section, then within a finite time, some thread will be in CS

    Fairness: For all threads i:j, if I wants to go into critical section then within a finite time, i will go into CS

    Keep in mind that fairness and liveness seem to say the same exact thing imo. I looked at someones elses notes and that's what they have as well. In the book it doesn't name the properties but just states them, the book states which I assume is

    Liveness:When no process is in a critical section, any process that requests entry to its critical section must be permitted to enter without delay

    and Fairness: A process remains inside its critical section for a finite time only

    For each of the following, state whether the properties are satisfied, if yes explain, if not give an appropriate example that proves your answer

    Here is one example:

    GLOBAL CODE:

    boolean flag[i]=false,flag[j]=false; turn=i; 

    PROCESS I

    enter_cs(i)

    flag[i]=true; turn=i; while(turn==i OR flag[j]); 

    exit_cs(i)

    flag[i]=false; 

    PROCESS J

    enter_cs(j)

    flag[j]=true; turn=j; while(turn==j or flag[i]); 

    exit_cs(j)

    flag[j]=false; 

    I'm confused on how I guess you go about analyzing. First I assume turn=i means analyze process i first. My thought process was since the while loop in process i is true, its just stuck there. I assume its stuck in the critical section? Doesn't that mean you don't even go to process j since it's stuck? Even if it does go to process j, that also results in true which violates Mutual Exclusion and either one violates fairness.

    Or another example I have

    GLOBAL CODE:

    boolean flag[i]=false,flag[j]=false; turn=i; 

    PROCESS I

    enter_cs(i)

    flag[i]=true; while(turn==i OR flag[j]); 

    exit_cs(i)

    flag[i]=false; 

    PROCESS J

    enter_cs(j)

    flag[j]=true; while(turn==j or flag[i]); 

    exit_cs(j)

    flag[j]=false; 

    For this one I see process i again has a while true loop, so it never leaves. Do we still analyze process j from that point? If we do, I believe it gets a while(false), since turn is not equal to j, and the flag in the global code is initialized to false, so I think that means it skips out of the critical section and sets flag[j] to false?

    I hope someone can help me, thanks. Also what do you think appropriate example that proves your answer means, I assume it meant show a correct example, like fix the code to correct it?

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

    C++ Why do these c++ programs look so much different than mine?

    Posted: 03 May 2018 10:38 AM PDT

    So for my c++ class I was told to always use #include <iostream> and using namespace std;.

    So I just need to cout << "abc" ;

    But, everywhere online I see people not including using namespace std; and doing std:cout every single time they cout.

    Also when they declare variable they use std: string my_string.

    Just curious why this way is used over just putting the using namespace std at the top?

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

    Trying to locally host simple web page I made using a Node.js server. Can get HTML to work, but not CSS or JavaScript.

    Posted: 03 May 2018 08:43 PM PDT

    I have a simple little web page I made stored in a folder on my laptop. It contains an index.html file, a styles.css file, and a scripts.js file. If I just open the HTML file in a browser directly from the folder, everything works perfectly.

    I wanted to try serving this page on my local network using a Node.js server, mostly just as an academic exercise. So I now also have a file in the same folder called server.js which contains the below code. This was scrabbled together from the beginner Node.js tutorials on W3 Schools. I have only a fuzzy idea of what it actually means...very fuzzy.

    var http = require('http'); var fs = require('fs'); http.createServer(function (req, res) { fs.readFile('index.html', function(err, data) { res.writeHead(200, {'Content-Type': 'text/html'}); res.write(data); res.end(); }) }).listen(8080); 

    When I initiate the server and then navigate my browser to localhost:8080, I can see my HTML rendered, but none of my styles or scripts have been applied. The little bit of Bootstrap that I'm using has been successfully applied though, so I'm guessing it's just an issue with how I'm calling my style and script files? The relevant part of my HTML header looks like...

    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="styles.css"> <script src="scripts.js"></script> 

    I've tried adding ./ in front of styles and scripts, as well as using the full paths, but none of these work. But if I load the page and watch the Network tab in Chrome DevTools, I can see styles.css and scripts.js in the list of files downloaded, and both showing a status code of 200 OK, so I'm a little stumped.

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

    Help learning openCV with android studio

    Posted: 03 May 2018 08:40 PM PDT

    I can't find any good, updated resources that take me through all the steps of getting openCV working with android studio and showing me how to use it and was wondering if anyone could help me find something

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

    No comments:

    Post a Comment