• Breaking News

    Thursday, June 13, 2019

    Write python without downloading it ? learn programming

    Write python without downloading it ? learn programming


    Write python without downloading it ?

    Posted: 13 Jun 2019 11:57 AM PDT

    So i am at work and i want to learn to write python because i have so much downtime and i dont want to waste this time , so ive picked up some books on coding and now i am restricted at work to download programs and these books require you to download python onto the computer , what i am wondering is if there is a website which works like the python application where i can write code into it and itll show me what it does, so i can follow my book.

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

    Practical Python Tutorial for Beginners

    Posted: 13 Jun 2019 03:17 PM PDT

    Hey guys, so I'm making a tutorial series called "Practical Python." It's aimed at beginner coders that are learning Python, and the point is to walk through building a useful, practical program with the Python language.

    I decided to make this series because I know it can be difficult for beginners to know how to use their language in a real, practical way. Each episode gives a small example of what you can do with Python.

    In this episode, I walked through the creation of a handy todo list program, exposing the viewer to concepts such as JSON, file reading/writing, and some other language features. Hopefully someone finds this helpful!

    Here's the link: https://www.youtube.com/watch?v=2tuTMqHGPEo

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

    Javascript: Learning to Manipulate Arrays with the most common and useful Array Methods, a Free Video Course.

    Posted: 13 Jun 2019 05:36 PM PDT

    What's up Reddit! As a Programmer, whether you are working on a project or say solving a question for Leetcode / Job Interview, you will frequently work with Arrays for storing your data. While there are many different ways of manipulating arrays for your needs, I often find myself coming back to a set of 7 Array Methods.

    I created a series of video tutorials detailing how to use these 7 Array Methods, and structured it as if you are taking an online course. You can check it out here.

    If you enjoy the content, you can check out my full Youtube Channel, where I plan on releasing a free Algorithms and Data Structure Course within the next 6 months, and my Udemy.

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

    I wrote a PHP Object-Oriented Programming Tutorial for Beginners

    Posted: 13 Jun 2019 11:00 PM PDT

    Hello Guys,

    When I was learning PHP, there wasn't a complete tutorial to learn OOP in PHP. So, I decided to write one.

    PHP Object-Oriented Programming Tutorial

    In this tutorial, I have covered most of the concepts in OOP. I'm planning to cover the topics, Type hinting and PSRs very soon.

    I'm very interested to hear your feedback. Thanks!

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

    Traversy Media vs. Freecodecamp

    Posted: 13 Jun 2019 01:39 PM PDT

    Hey guys! I've been going through FCC's curriculum which I've learned a lot from thus far. I'm currently done with two web projects, and with this comes more questions! I found traversy Media on YouTube and it's probably been the most helpful.

    He has some udemy courses for $10 each (21 hours) that I'm debating getting.

    Has anyone gone through these? How are they? How do they compare to FCC?

    Thanks ahead of time!

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

    How do you all comment your code

    Posted: 13 Jun 2019 08:59 AM PDT

    Hi, first post here i think. I left tutorial hell and I am working on an actual project finally. I have been commenting my code like the good little programmer I am and was curious how everyone else does their commenting. An online course i fiddled with once said that I should comment every method with REQUIRES, MODIFIES, EFFECTS but I'm fairly certain that isn't some industry standard. Thanks

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

    Looking for a gentle introduction to network programming (java/c++)

    Posted: 13 Jun 2019 12:37 PM PDT

    I am going through the book Kotlin for Android Development where the author is developing an app that pulls information from the USDA website in Json format. He is using retrofit and okhttp and he's talking about http requests and query parameters. I guess this is what you would consider REST APIs although I'm not sure about that. The thing is I don't know any of this.

    Basically I would like to write an Android app that reads the posts from r/buildapcsales and notifies me should a certain word appears in the post title. If anyone could recommend some books or put me on a learning path of what I'd need to know, it would be greatly appreciated.

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

    Python: EOL while scanning string literal

    Posted: 13 Jun 2019 10:19 PM PDT

    Hello everyone!

    I'm trying to debug my script. Currently, I try to run this python script but keep getting an "EOL while scanning string literal" error.

    I've gone over it and fixed a few syntax errors like missing commas or misspelled variable. Still not working.

    Can anyone tell me what is wrong with this script?

    #! python 3

    # randomQuizGenerator.py - Creates quizzes with questions and answers in

    # random order, along with the answer key

    import random

    # The quiz data. Keys are states and values are their capitals.

    capitals = {'Alabama': 'Montgomery', 'Alaska': 'Juneau', 'Arizona': 'Phoenix',

     `'Arkansas': 'Little Rock', 'California': 'Sacremento', 'Colorado': 'Denver',` `'Connecticut': 'Hartford', 'Delaware': 'Dover', 'Flordia': 'Tallahassee',` `'Georgia': 'Atlanta', 'Hawaii': 'Honolulu', 'Idaho': 'Boise', 'Illinois':` `'Springfield', 'Indiana': 'Indianapolis', 'Iowa': 'Des Moines', 'Kansas':` `'Topeka', 'Kentucky': 'Frankfort', 'Louisiana': 'Baton Rouge', 'Maine':` `'Augusta', 'Maryland': 'Annapolis', 'Massachusetts': 'Boston', 'Michigan':` `'Lansing', "Minnesota': 'Saint Paul', 'Mississippi': 'Jackson', 'Missouri': 'Jefferson City', 'Montana': 'Helena', 'Nebraska': 'Lincoln', 'Nevada':` `'Carson City', 'New Hampshire': 'Concord', 'New Jersey': 'Trenton', 'New Mexico': 'Santa Fe', 'New York': 'Albany', 'North Carolina': 'Raleigh',` `'North Dakota': 'Bismark', 'Ohio': 'Colombus', 'Oklahoma': 'Oklahoma City',` `'Oregon': 'Salem', 'Pennsylvania': 'Harrisburg', 'Rhode Island': 'Providence',` `'South Carolina': 'Columbia', 'South Dakota': 'Pierre', 'Tennessee':` `'Nashville', 'Texas': 'Austin', 'Utah': 'Salt Lake City','Vermont':` `'Montpelier', 'Virginia': 'Richmond', 'Washington': 'Olympia', 'West Virginia': 'Charleston', 'Wisconsin': 'Madison', 'Wyoming': 'Cheyenne'}` 

    # Generate 35 quiz files

    for quizNum in range(35):

     `# Create the quiz and answer key files.` `quizFile = open('capitalsquiz%s.txt' % (quizNum + 1), 'w')` `answerKeyFile = open('capitalsquiz_answers%s.txt' % (quizNum + 1), 'w')` `# Write out the header for the quiz.` `quizFile.write('Name:\n\nDate:\n\nPeriod:\n\n')` `quizFile.write((' ' * 20) + 'State Capitals Quiz (Form %s)'; % (quizNum + 1))` `quizFile.write('\n\n')` `# Shuffle the order of the states.` `states = list(capitals.keys())` `random.shuffle(states)` `# Loop through all 50 states, making a question for each` `for questionNum in range(50):` 

    # Get right and wrong answers.

    correctAnswer = capitals[states[questionNum]]

    wrongAnswers = list(capitals.values())

    del wrongAnswers[wrongAnswers.index(correctAnswer)]

    wrongAnswers = random.sample(wrongAnswers, 3)

    answerOptions = wrongAnswers + [correctAnswer]

    random.shuffle(answerOptions)

    # Write the question and answer option to the quiz file.

    quizFile.write('%s. What is the capital of %s?\n' % (questionNum + 1,

    states[questionNum]))

    for i in range(4):

    quizFile.write(' %s. %s\n' % ('ABCD'[i], answerOptions[i]))

    quizFile.write('\n')

    # Write the answer key to a file.

    answerKeyFile.write('%s. %s\n' % (questionNum + 1, 'ABCD'[answerOptions.index(correctAnswer)]))

    quizFile.close()

    answerKeyFile.close()

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

    I Built A Simple Matching Game With JavaScript

    Posted: 13 Jun 2019 07:28 PM PDT

    https://mitchum.blog/i-built-a-simple-matching-game-with-javascript/

    I built a simple matching game using basic front-end web technology, and then wrote about how it is put together. I thought it could be helpful to somebody just learning how the web works. I hope this isn't too much self-promotion. Just trying to improve my own skills while helping other folks out too :)

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

    What advise would you give me for my first professional project with a client?

    Posted: 13 Jun 2019 05:36 PM PDT

    Hi. After a while of learning how to program and familiarizing myself with a few programming languages, I finally got my first client.

    He wants his website (made with Wordpress) to be modified and possibly modernized. As I have never worked with a client before I am a bit lost on how to treat this situation, anyways, I said yes to the opportunity because I needed to learn somehow. However, as someone who has worked with clients like this before, which advise would you give to someone just starting out?

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

    How effective are code bootcamps

    Posted: 13 Jun 2019 09:17 PM PDT

    I'm a college student looking to just accelerate my learning and get some experience under my belt. Are the camps actually effective for finding decent work? It seems odd that they sent more popular considering they advertise "work for 6+ months and find a job". Is it just an elaborate scam?

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

    Making Interactive Webpage/Database off a SQL-based program

    Posted: 13 Jun 2019 08:29 PM PDT

    Hi there, I am somewhat inexperienced working with multiple languages, but currently I am working on a project using MolSoft, essentially a software that stores information about molecules in databases. I believe MolSoft uses/is based off/incorporates SQL (not really sure the correct terminology since I just learned about how to use SQL yesterday.)

    What I need to do is to incorporate this database into a web interface, and map each cell to its respective component (each column has a specific function/thing that should pop up, for example cells in the column "ligand" should have a picture of the ligand appear ,if the cell is clicked).

    My thought process so far was to scrape the database from MolSoft somehow, and use Python or PHP to incorporate the database into an HTML file (into a table), and use JavaScript to add click functionality (i.e. clicking the cell will direct the user to a hyperlink or an image). I have a few specific questions, but in general I am very confused as to the optimal combination of languages I need to use, and ESPECIALLY how I am to combine them (for example, how do I take an SQL database and put it in an HTML table). I am using a Mac, if that helps.

    My questions.

    1. The MolSoft database can be exported as a .csv or an excel file. Is there a way to write a script for this so that if any changes are made in the database, the web interface can be changed in real time?
    2. I am converting the .csv / excel file into an SQL file (again not sure about terminology). Is there a way to directly convert the database into an SQL file? If not, I am also wondering how to write a program to convert the files for me, as currently I am using MySQL from the command line, but I don't really know how to integrate this.
    3. After I get an SQL version of the database, how can I incorporate it into a web interface such that the code will be scalable (changes to the original database will instantly be updated in the web interface?)

    Thanks so much!

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

    What is Qt (seems to be more than just a GUI library) and why does it reimplement many features already found std?

    Posted: 13 Jun 2019 08:27 AM PDT

    At first I thought Qt was just a GUI library with a create slot-signal mechanism, but I'm starting to discover that it's so much more. It defines many things that are already in the standard library, like QString and QMap and such, often they're almost identical or better (in terms of convenience and intuitiveness, not sure if they're better performance wise though).

    So what exactly is Qt? Is it common for large C++ libraries to just have their own versions of basic features (I'm new to C++ so maybe this is normal and I just don't know it)? And what is the purpose of having their own versions of things instead of just integrating the standard library?

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

    Best way to learn C#?

    Posted: 13 Jun 2019 04:01 PM PDT

    What are some free programs that can help teach me to learn C#? Any other advice?

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

    Finding open source projects with things that need doing

    Posted: 13 Jun 2019 11:30 AM PDT

    Hey all,

    I'm looking for an open sourced project that has items that actually need doing (e.g clearly defined tasks/tickets that need working on).

    I can easily find open source projects, but I'm struggling to find ones that have clear tasks of what I could work on to help them.

    Are there any resources to find these, or is it a case of wading through loads and finding one that does?

    I'm also not sure where it would show the tickets/tasks to be worked on, would you expect it to be i t he README?

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

    What do i do

    Posted: 13 Jun 2019 11:18 PM PDT

    When i try to run my new c# program i get this massage: the application to execute does not exist. What do i do i just starder programming.

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

    How could I use a genetic algorithm to sort objects into buckets?

    Posted: 13 Jun 2019 03:36 PM PDT

    I've read through a few examples of genetic algorithms and feel that I get the gist of them, but perhaps don't fully understand them.

    I have a Python program that creates badminton doubles match-ups. It does this by running a cost function (I guess it'd also be the "fitness function") on all unique combinations of players across all courts. (It takes into account factors including the ability difference between players on a court). It works fairly well, but it'd be much slower if I tried to scale it up, so I'd like to try a genetic algorithm.


    Let's say I've got 18 players and three courts of four players each (and a bench of the remaining players). Let's represent these players as integers between 0 and 17. Two candidate solutions might be represented as:

    [(0, 1), (2, 3)], [(4, 5), (6, 7)], [(8, 9), (10, 11)], {[12, 13, 14 ,15 ,16 ,17]}
    and
    [(3, 9), (6, 16)], [(7, 14), (12, 4)], [(2, 0), (1, 13)], {[5, 8, 10, 11, 15, 17]}

    (Given that the order of the courts and players don't matter (except for which player has what opponents), it might be best to represent the courts as a set of frozensets of frozensets, but that might overcomplicate the problem to begin with).


    A mutation seems fairly straightforward. I suppose it would involve randomly selecting two places and swapping the players between them, then calling the fitness function on the new candidate solution.

    What I'm a bit stumped by is how I'd usefully employ a crossover. My understanding is that I'd need some kind of "ordered crossover", where I pick consecutive chromosomes from one parent, and then fill in the rest of the chromosome from the other parent in the order they appear. But a possible problem is that doing so would often radically change the value of the fitness function (although maybe this is a feature, not a bug?), as splitting players across courts can drastically change the fitness of a game. It seems like it might have trouble converging.


    For instance, one way of creating a child of the above two candidates might be:
    [(0, 1), (2, 3)], [(9, 6), (16, 7)], [(14, 12),(4, 13)], {[5, 8, 10, 11, 15, 17]}

    ... in which Court 1 is copied from the first parent, and the rest of the courts and bench are filled out from the second parent in order.

    The issue is that the court [(9, 6), (16, 7)] is "inherited" from the second parent's first five players (with 3 already represented), but this game might have a much lower fitness than [(3, 9), (6, 16)], the second parent's first court, as the order of the players and who is in the game can make a big difference.

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

    Development Environment for C similar to BlueJ

    Posted: 13 Jun 2019 10:45 PM PDT

    Hello! I am currently trying to learn C, but it has been very time consuming and frustrating to have to compile my code manually using the command console several times before I can even see if my program is functional. I have some experience learning Java, and during that time I was using BlueJ as my IDE of choice because of its simplicity and ease of use. Also, it was very easy to be able to compile my code with the click of a button. That is what I'm looking for right now, Something similar to BlueJ in the sense that it will tell me right away if my program will not compile because of a syntax error. Can anyone suggest anything? Thanks!

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

    [Java] Recursive decimal to binary. Struggling with core concepts.

    Posted: 13 Jun 2019 10:03 PM PDT

    Howdy,

    I hate saying I have a CS degree and yet I have to ask this question (kinda fell out of the industry).

    Have a recursive method to convert a decimal value to a binary equivalent.

    static int find(int decimal_number) { if (decimal_number == 0) return 0; else return (decimal_number % 2 + 10 * find(decimal_number / 2)); } sysout( find (44) ); 

    Output is as expected: 101100

    Now, I have a few problems with this.

    • Why is my output in this binary format when the method is of type int? - is println() resolving one method call at a time?

    • I'm not understanding how this value is being obtained - I may be struggling with precedence here and forgetting how recursive functions zip.

    To expand on point two:

    Each time the function is called and the base case is not met, we call:

    decimal_number % 2 + 10 * find ( decimal_number / 2 ) 

    Overall, I'm thinking this would look like:

    44 % 2 + 10 * 22 % 2 + 10 * 11 % 2 + 10 * 5 % 2 + 10 * 2 % 2 + 10 * 1 % 2 + 10 * 0 % 2 + 10 * 0 <- base case 

    Resolving upwards I get:

     0 + 10 * 0 + 10 * 1 + 10 * 1 + 10 * 0 + 10 * 1 + 10 * 0 <- base case 

    So how am I getting from ^ that to my actual answer?

    If it's vague, I'm sorry. Will work on formatting.

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

    Having a question about how this code works. [C]

    Posted: 13 Jun 2019 09:46 PM PDT

    the code sets 2 integers, a and b, creates a buffer for charachters. then assigns the integers 2 values, the first is 4 a's the second is 4 b's.

    Then there is a code block:

    if (write(STDOUT_FILENO, [SOMETHING] ); 

    which is written to the console.

    and the next

    if (read(STDIN_FILENO, &buffer, 0xC) < 0 [SOMETHING] );); 

    Then it appears to read the integers and compare them. If the integers equal certain values, then you get different output.

    I'm not understanding if this file is looking for input when the file is run (i.e. ./filename values)

    or if i'm supposed to run the file, wait for it to prompt me for input (which it does) and then input the data.

    Also is this expecting sting input or file input?

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

    Is Swift good to learn?

    Posted: 13 Jun 2019 09:37 PM PDT

    I have a very basic knowledge of Javascript and Python, very very very very basic, and basic working knowledge with CSS and HTML. I only say this to say I recognize some stuff, but on a basic level. After seeing the most recent WWDC and seeing the changes Apple is making to Swift it made me want to check it out. So my question is, is Swift worth diving into? Ultimately, in learning something I'd like it to be practical obviously. Would Swift be good to try? If so, anyone have any good, preferably free to start, resources?

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

    Looking to learn c++

    Posted: 13 Jun 2019 09:03 PM PDT

    Hey all, I've been wanting to learn how to program for a while. I learned a decent amount of python but I want to move to c++. The problem is I'm 14 and have the attention span of something with a really short attention span. Do any of you know any very engaging ways to learn c++. (Feel free to answer for any language) Thanks, and I hope this helps out anyone with a similar problem.

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

    The Blue Table - Group Projects

    Posted: 13 Jun 2019 02:56 PM PDT

    Hey everyone,

    I have spent so much time trying to learn code alone but I realized that learning with others is not only easier, it's important for landing a job. I have created a discord for collaboration on projects, first meeting is Saturday at 12pm CST. Join us!

    https://discord.gg/kRmGMqW

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

    I used to really enjoy programming but now it's more of a pain then a joy

    Posted: 13 Jun 2019 08:39 PM PDT

    I started learning programming back when I was 14 (I'm 20 currently) and I was kinda hooked on it for awhile. I really enjoyed programming for games and was the reason I learnt in the first place. I enjoyed programming a game and seeing the result. It was such a thrill to see something working by the power of my keyboard and was something I thought of pursuing. I did in the end and have spent most of my life going into a career as a games programmer. I did computing at College and now I've just finished my second year at University doing a games programming course.

    Everything was pretty much fine until after my first year of Uni where I seriously started to slack off. Programming to be honest just wasn't as enjoyable as it used to be, and this second year has really confirmed that. I may just be burnt out from all the assignments I got but I seriously can't see myself doing programming as a career. This year was SO technical to levels that I really am not even comfortable with. Like it doesn't seem right for me. I don't want to read through pages and pages of documentation, I don't want to know how to program a binary tree or how to program a sorting algorithm... I just want to make games and have fun. Everyone in this year of Uni was so atop of the work. So many people enjoy the technical side and actually solving problems while I never have. Actually figuring stuff out was the worst part. I only kept doing it cause the result was awesome when I got it working.

    It just seems to be an industry that is far more technical and "logical" then I'm really comfortable with. You may ask why am I so conflicted by all this when the answer is clear but the thing is... I've spent most of my life doing programming and pursuing a career in programming! It seems almost.. wrong to just suddenly change careers like this. Like I'm more interested in music now which is in a COMPLETELY different direction. I've always been known as the computer guy, the one really into programming and the one who used to actually be quite serious about it. I guess life has changed and I've sorta of lost interest in that.. technical side of things. I used to really like being logical and understanding the ins and outs of programs but nowadays I've really lost interest in all that.

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

    No comments:

    Post a Comment