• Breaking News

    Tuesday, June 5, 2018

    Learn Basics of Intro to Data Science this weekend. 4-hour bootcamp course for serious learners learn programming

    Learn Basics of Intro to Data Science this weekend. 4-hour bootcamp course for serious learners learn programming


    Learn Basics of Intro to Data Science this weekend. 4-hour bootcamp course for serious learners

    Posted: 04 Jun 2018 06:58 AM PDT

    Hi folks, two months ago I ran a 4-week into to Python course that over 50 people attended and enjoyed. See here-> https://www.reddit.com/r/learnpython/comments/81ed7v/learning_programming_can_be_like_walking_in_the/

    Based on your feedback, I have created a a 4-hour bootcamo course on data science and I plan to teach it this Sunday.

    Who is this for? Complete beginners who are serious about learning data science using Python.

    Interested to know more? Take a look here: https://docs.google.com/forms/d/e/1FAIpQLSdg2OUwCBMHCuSpbpYPOciuAaxV-AdsfMk4wfUZPMcZKxJqdw/viewform?usp=sf_link

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

    Starting to feel proud of my first decent-sized project and wanted to share with others!

    Posted: 04 Jun 2018 07:33 PM PDT

    Hey all, I have been lurking on this subreddit daily for the last year and have found lots of great resources thanks to you all. I have been working on this project in Python in my free time outside of school and it's really starting to get fun, so I thought I'd share what a few months of practice looks like for me and give myself a little pat on the back for staying disciplined.

    My code is a mess, lacks commenting, and I'm sure I'm not following a lot of rules, but it has been an amazing learning experience for me. Still have a lot of ways to go to land a job or write anything useful, but this is a lot of fun! I'd appreciate feedback or criticism if you have time to look at the code and want to encourage everyone to keep learning! Thanks for the help this last year! Let's keep it going.

    Video: https://youtu.be/A6js0FL_AMo Repository: https://github.com/rckildea/Project-Golf/tree/development

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

    Should I learn how to code?

    Posted: 04 Jun 2018 10:32 PM PDT

    I'm about to finish my army service and have a lot of free time. I want to use my time and not just waste it. I saw an app teaching how to code, and then I realized it actually might be something I can learn by myself at home. The thing is, I don't want to learn coding/programming for professional use, that's not what I want to do in life. I also wasn't good at math or anything, so it's not like it'll be a natural and easier process for me to go through. I just think it might be a nice kind of challenge to take, and might help in the future. After what I've said, do you think I should start? I'd want to learn a language I might use somehow in a future career (that has nothing to do with programming), and not just for "fun". I guess the general direction points towards apps or website creating. Would love to hear your thoughts. Thanks!

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

    What do I do after taking a front-end and back-end course?

    Posted: 04 Jun 2018 06:35 PM PDT

    Background: I've taken FreeCodeCamp's front end development course and learned Ruby/Ruby on Rails through Upskill's free course.

    I am interested in setting up my own personal website, but I am lost to where I go next. What I do know is that I'd like to learn the "workflow" of building the website and get to a point where I actually have a live website deployed. Some questions I'm wondering are

    1. What tools can I use on my local computer to build the website?

    2. How do I actually set up the server through the hosting website I eventually choose? I am thinking about buying hosting through DigitalOcean.

    3. How do I add custom media content to the website (like images, videos, etc)

    I guess what I'm asking for is a guide to the resources that can help me with these questions/advise for what tools to use. If someone could help me guide in the right direction I'd really appreciate it. Thanks!

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

    How much should I learn this summer before I start in the fall for CS?

    Posted: 04 Jun 2018 08:37 PM PDT

    I am switching majors for this next school year, and don't know programming past the tiny bit of c# I learned, and have switched to Python and learned some and written very basic programs. I'm just trying to learn the basics right now because I am unsure of how much I need to know for a Computer Science major.

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

    Python Tkinter

    Posted: 04 Jun 2018 10:29 PM PDT

    How many people here still use the Tkinter module from Python? If you do use it what type of programer are you? Professional or hobbyist?

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

    I Have finished my very first Java program

    Posted: 04 Jun 2018 10:29 PM PDT

    For atleast 3 days I been learning java after a while I decided to write my very first program. My program is a text-based game, its pretty simple but this for me is my first step of becoming of programmer and after finishing my program it motived me to continue learning. It also motivated me to Improve my: Thinking towards problem solving. To make my code more readable and to be systematic. Also I used a video as a guide to make my own text based game I changed the code myself and just used that as a guide. I just want to share this wonderful experience cause its just wonderful.

    Link to the video: https://youtu.be/EpB9u4ItOYU Link to the code I https://drive.google.com/file/d/1W5IGe4x0Wx1zAVAWqW9PS-BfcVxzv3WE/view?usp=drivesdk send me your feedbacks may it be bad or good about the game. In that way ill learn how I can improve it.

    Thanks!!

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

    Humble Book Bundle: Pocket Primers by Mercury

    Posted: 04 Jun 2018 12:42 PM PDT

    Best way to take notes in programming

    Posted: 04 Jun 2018 08:16 PM PDT

    What's up Reddit,

    I am a consultant that is currently learning Python and R to become a data scientist. For note taking, I purchased a paged, hard-backed Moleskene to easily reference my code whenever I need to pull it up.

    In python, I have been studying statistical models and model evaluation code, and they are very expensive. Tonight, I started to get fed up with writing so many lines of code that my wrist started to ache. And then it dawned on me... there must be a better way to save code for later use.

    Could someone give details on how they take notes and save code?

    Also, what tools do you use to save the code? Do you save them locally or save them on a cloud? Or do you save it on GitHub or Jupytir Notebook?

    I know I sound like a noob, which I am, but I need to now do that I can be a more efficient programmer.

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

    [Salesforce API][SFDC][Java] Problem with getting authentication working

    Posted: 04 Jun 2018 05:48 PM PDT

    I am experimenting with integrating to Salesforce API and have been unable to do authentication

    I am looking at the server-side username/password authentication rather than the OAuth redirect authentication because there's no UI for user to work with, just back-end

    Resource: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm

    Here's my code (with some comments to explain what I've tried)

     HttpClient httpclient = new HttpClient(); // I tried using my instance rather than login, same result // PostMethod post = new PostMethod("https://NA41.salesforce.com/services/oauth2/token"); PostMethod post = new PostMethod("https://login.salesforce.com/services/oauth2/token"); post.addParameter("grant_type", "password"); post.addParameter("client_id", "<myclientid>"); post.addParameter("client_secret", "<mysecret>"); post.addParameter("username", "<myusername>"); post.addParameter("password", "<mypassword>" + "<mysecuritytoken>"); try{ httpclient.executeMethod(post); String responseBody = post.getResponseBodyAsString(); System.out.println(responseBody); } catch(Exception e){ System.err.println("Error"); } 

    Problem is in the print out of response body, it always return:

    {"error":"invalid_grant","error_description":"authentication failure"}

    I have tried changing the url to use my instance, no difference.

    What am I doing wrong here?

    The wire debug of the request:

    DEBUG header - >> "Host: login.salesforce.com[\r][\n]" DEBUG header - >> "Content-Length: 241[\r][\n]" DEBUG header - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]" DEBUG header - >> "[\r][\n]" DEBUG content - >> "grant_type=password&client_id=<myclientid>&client_secret=<mysecret>&username=<myusername>&password=<mypassword+mysecuritytoken>" DEBUG EntityEnclosingMethod - Request body sent 

    The response:

    DEBUG header - << "HTTP/1.1 400 Bad Request[\r][\n]" DEBUG header - << "Date: Tue, 05 Jun 2018 01:00:08 GMT[\r][\n]" DEBUG header - << "Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private[\r][\n]" DEBUG header - << "Set-Cookie: BrowserId=<browserid>;Path=/;Domain=.salesforce.com;Expires=Sat, 04-Aug-2018 01:00:08 GMT;Max-Age=5184000[\r][\n]" DEBUG header - << "Expires: Thu, 01 Jan 1970 00:00:00 GMT[\r][\n]" DEBUG header - << "X-ReadOnlyMode: false[\r][\n]" DEBUG header - << "Content-Type: application/json;charset=UTF-8[\r][\n]" DEBUG header - << "Transfer-Encoding: chunked[\r][\n]" DEBUG header - << "[\r][\n]" DEBUG HttpMethodBase - Cookie accepted: "$Version=0; BrowserId=<browserid>; $Path=/; $Domain=.salesforce.com" DEBUG HttpMethodBase - Buffering response body DEBUG content - << "4" DEBUG content - << "6" DEBUG content - << "[\r]" DEBUG content - << "[\n]" DEBUG content - << "{"error":"invalid_grant","error_description":"authentication failure"}" DEBUG content - << "[\r]" DEBUG content - << "[\n]" DEBUG content - << "0" DEBUG content - << "[\r]" DEBUG content - << "[\n]" DEBUG content - << "[\r]" DEBUG content - << "[\n]" DEBUG header - << "[\r][\n]" 
    submitted by /u/apixtual
    [link] [comments]

    discord server to build a real engagement with other programmers.

    Posted: 04 Jun 2018 04:12 PM PDT

    I have created a new discord server I like to share with you. I know there's a plenty other programming discord servers, but this one is gonna focus on keep it limited and small in order to build a real good engagement and friendship with the other programmers, in contrast of the other servers where you are lost among hundreds and maybe thousands of members and end up with nothing.

    Server invitation https://discord.gg/2uje3Ts

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

    Unsure of which programming route to go.

    Posted: 04 Jun 2018 11:23 PM PDT

    Hi! Two months ago i decided that I wanted to learn programming as a hobby to be able to develope it into a full time job in the future. I started out with some basic html5 and css on freecodecamp. I went on to have a discussion with a family member who has been working with a lot of programmers and he told me that was a waste of time and it would be better if I learned a "real" programming language such as C or Java and I do agree with him a little bit because I do not learn programming to be able to make a website. What I want is to be able to write programs and maybe get into back end programming as a job.

    What would my best course of action be? To continue with html, css or start with something new? And in that case what language would be a good start and is attractive in a work space? Would it be better to learn front end before back end?

    If you have any recommendation for a learning resource that goes hand in hand with the language I would be very grateful.

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

    Dynamic QR Code

    Posted: 04 Jun 2018 11:15 PM PDT

    How to create dynamic qr code in php?

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

    VoIP Interactive Voice Response(IVR) Programming

    Posted: 04 Jun 2018 11:04 PM PDT

    Hello guys, I am working on new company in position IT guy for three weeks. I have problem that is scratching my head for days.

    I need to do a Phone IVR system that controls the incoming call number if it is our customer and if he has a warranty for his product that bought from us. If so, he will be able to connect our companies technical service and he would get his support or if he doesnt have any warranty he would be able to buy 3months, 6months service packages. I can do second part like redirecting caller to our service provider. But it has to be from phone and the phone should tell customer "You have no warranty","Press 2 to buy warranty","Press 3 to support"..

    We have VoIP phone and PBX server, but I am lack of technologies, which programming languages usable and research.

    I have a thought about if I get callerid from VoIP Phone that we have, I will be able to check his number from database with c#, vb.net etc. But how? I was programming opensource projects with HTML/CSS/JavaScript, C#, C++ but now I am like what the hell what is protocol, how can we make calls from ip, how can phone links with pc...

    Any help, guides, projects, links I will be appreciate.

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

    Keep program running when computer closed?

    Posted: 04 Jun 2018 07:04 PM PDT

    Hi,

    I am writing a program that does peer to peer data storage. Because the computers on the network need to be constantly available to send data their storing I need the program to run even when someone closes the lid on their laptop. The program will be written in C++ or Golang. How would i go about doing this? Is their something i can do in the programming language to keep the program running when the lid is closed?

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

    Can someone tell me if this if statement is correct.

    Posted: 04 Jun 2018 10:38 PM PDT

    I need to know if this makes sense to python. Whether I can do it all in one if statement and i can make it work just havent written it properly. Or if Im stupid why would somebody do all this in a single if statement.

    Thanks.

    Check = is a list from user input

    characters = is an array of numbers and a decimal point.

    for i in check:

     fix = check.index("0") if check[fix] == "0" and check[fix+1] != "." or "0" and check[fix-1] not in (characters): 
    submitted by /u/HectorLeGoat
    [link] [comments]

    How do I add a value pulled from a JSON API array to my html so I can display it on a webpage?

    Posted: 04 Jun 2018 09:48 PM PDT

    Im trying to get a value from a JSON array to display as text inside a <p> tag. Ive tried a couple things including getElementById and $('.server').html(price); but nothing had worked.

    This is my HTML code:

    <!DOCTYPE html> <html> <head> <title>Stubs</title> <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256- FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script type="text/javascript" src="stubs.js"></script> <link type="text/css" rel="stylesheet" href="style.css" /> </head> <body> <div class="container"> <p class="server"></p> </div> </body> </html> 

    This is the JS code linked in the html head:

    fetch('apiurl') .then(function(response) { return response.json(); }) .then(function(myJson) { getPrice = (listings, name) => { for (let listing of jsonObj.listings) { if (listing.name === name) { return listing.price; } let price = getPrice(myJson.listings, 'Brian'); } // didn't find 'Player', return empty string return ''; } }); 

    This is whats in the JSON API file

    { "page": 1, "total_pages": 10, "listings": [ { "name": "Bob", "occu": "Entry", "team": "Blue", "sec": 3, "days": 16 }, { "name": "Tom", "occu": "Advance", "team": "Main", "sec": 1, "days": 23 }, 

    Basically im trying to pull and display "days" as text on a page IF the "name" is "Tom", for example.

    I have limited knowledge about js so im pulling my hair trying to patch together this project. Its for a local sports team. Any help is appreciated, thanks.

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

    What level could 6 hours of pure programming a day affect one's programming skills?

    Posted: 04 Jun 2018 09:47 PM PDT

    I am now a final-year CS student. I want to pick up the latest techniques as soon as possible before graduation. Pure programming means that finding questions which are relevant to the specific topic like Spring boot on stack overflow and solving them by hand..... Change the category of question tag each week. Would this change improve my programming skills?

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

    Making A Game But Stuck On Calling Functions (Please Help)

    Posted: 04 Jun 2018 08:56 PM PDT

    I am making a text based game where a player moves around from room to room. Each room is a Class with 4 positions in each room. I am using a Function for each position and Functions to take an input on where in the room to go. The problem is I want to Call a position Function then have that Function call an input Function again but because my Functions are all defined above the input Functions it doesn't work. Here is the code from the Class. The input Functions are at the bottom.

    class Room2:

    room = 2 firstAid_location = [] if firstAid_room == room: firstAid_location = firstAid_spawn def starting_position(self): global room2_minion global playerHealth global firstAid_room position_start = 1 minion_hit = random.randrange(1, 3) print('You Are Now In The North Room') if position_start == self.firstAid_location: print('You Found The First Aid Kit') print('Your Health Has Been Increased By 2HP!') playerHealth += 2 firstAid_room += 10 if position_start == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You And Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') room2_minion += 10 elif position_start == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') else: pass def pos1(self): global room2_minion global playerHealth global firstAid_room position1 = 1 minion_hit = random.randrange(1, 3) if position1 == self.firstAid_location: print('You Found The First Aid Kit') print('Your Health Has Been Increased By 2HP!') playerHealth += 2 firstAid_room += 10 if position1 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You And Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') room2_minion += 10 elif position1 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') else: pass def pos2(self): global room2_minion global playerHealth global firstAid_room position2 = 2 minion_hit = random.randrange(1, 3) if position2 == self.firstAid_location: print('You Found The First Aid Kit') print('Your Health Has Been Increased By 2HP!') playerHealth += 2 firstAid_room += 10 if position2 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You And Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') room2_minion += 10 elif position2 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') else: pass def pos3(self): global room2_minion global playerHealth global firstAid_room position3 = 3 minion_hit = random.randrange(1, 3) if position3 == self.firstAid_location: print('You Found The First Aid Kit') print('Your Health Has Been Increased By 2HP!') playerHealth += 2 firstAid_room += 10 if position3 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You And Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') room2_minion += 10 elif position3 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') else: pass def pos4(self): global room2_minion global playerHealth global firstAid_room position4 = 4 minion_hit = random.randrange(1, 3) if position4 == self.firstAid_location: print('You Found The First Aid Kit') print('Your Health Has Been Increased By 2HP!') playerHealth += 2 firstAid_room += 10 if position4 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You And Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') room2_minion += 10 elif position4 == room2_minion: print('A Minion Has Attacked!') if minion_hit == 1: print('The Minion Hit You Then Fainted From Exhaustion') print('You Have Lost 2HP') playerHealth -= 2 room2_minion += 10 if playerHealth <= 0: print('You Have Died') quit() else: print('You Have', playerHealth, 'HP Left') else: print('The Minion Missed The Attack!') else: pass def pos1_input(self): pass def pos2_input(self): pass def pos3_input(self): pass def pos4_input(self): pass 
    submitted by /u/FallOutFighter
    [link] [comments]

    I can create full stack web apps, but that's the extent

    Posted: 04 Jun 2018 12:08 PM PDT

    Over the past 2 years or so I've been learning web dev. So far I work with Node and Postgres/Mongo (I know Java, Python and a bit of C as well) and I can now properly create web apps from start to finish. I've taken on a couple freelance projects in this time where one was to create an online ordering service from scratch, and they've all been happy.

    But that's all I know. I'm still in college and will be finishing in 2 years and I haven't had a job, but from looking around, it seems that almost all positions have some sort of test where they ask you to implement an algorithm.

    I've never done this, I have never really had to. Well I've done some small stuff like this in my A01 cs class but that's about it.

    So over the past week I've been looking over leetcode problems and trying to do them and I find some of them pretty tough or the code looks super long and ugly compared to others. I use Python to solve these since I know Python as well and I feel more comfortable completing algorithms in Python rather than JS. 99% of the time I'm googling or looking through stack overflow and I'm sure I won't have that luxary while doing this in an interview. Currently I'm on the problem where it says to find the length of the longest substring without repeating letters, and I'm having quite a hard time. I got the answer using the brute Force method of doing double for loops but it's very slow.

    So how do I improve? What else should I learn other than just web dev to make myself marketable? Is there a good YouTube series I should watch? I have some pretty cool projects imo in my portfolio which I can explain but that's about it.

    Thank you!

    PS: When you do these interview questions, do you have to actually complete it and be 100% right? Like do you write psudo code to explain how you would tackle it, or do you have to fully write it out everything. And same goes for syntax, sometimes I get things mixed up and for example I forget something simple like how to get the length of something in python because I think its object.length and then I remember that's JS and I have to quickly look it up.

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

    Summertime app conundrum

    Posted: 04 Jun 2018 02:50 PM PDT

    Hello all, I am entering my 3rd year of my 4 year CSE degree and unfortunately I was not able to secure a summer internship.

    Quick Background: I'm now home and my parents want me to get a minimum wage job to pass the time. I instead want to use this time to start a personal project that I can develop and hopefully add to my resume. I find this (in my opinion) to be a much better use of time as I think future employers will find a self-coded personal project much more impressive than busing tables. I hope to use this project to help get a MUCH needed CS internship next year (as a Junior).

    The Problem:

    I don't know where to start.

    I like to think of myself as a pretty component programmer, I go to a solid college and make good grades in my CS classes. I'm familiar with some advanced concepts and can learn languages fairly easy now (which I think is a good sign). I was thinking of maybe making an app, which seems like a classic "go-to" for personal projects. I have a PC, so I can jump through some hoops and download XCode, or develop something for Android, haven't quite decided.

    I just wanted to know what y'all would suggest as far as resources that might help in app development, most of the tutorials I have found are a bit simplistic, and I don't want to spend hours having someone tell me simple things like what the purpose of a function is, or what a for loop does.

    So do y'all know of any good ways to go about a solo personal app project and any good resources that may help in that dev process?

    Also, would y'all agree that a personal project is a better move for someone who is entering Junior year without prior CS job experience or internship than a minimum wage job for 2.5 months (which I did for 3 years in HS)?

    Thank you very much!

    TL;DR: Going to be a Junior, don't have a summer internship. Want to make an app instead (over summer), whats the best way to go about that, and will that help in getting an internship next year?

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

    Html, CSS, Java, C#, Python, Unix, Ruby, Perl, PHP

    Posted: 04 Jun 2018 08:21 PM PDT

    Hey friends, I'm a web designer aspiring to get into web and app development.

    Out of all the great programs just want to know what your favourite programs are and why?

    Thanks in advance.

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

    Help understanding web services.

    Posted: 04 Jun 2018 08:18 PM PDT

    Hello, I am fairly new to programming. I wanted to learn about web services in Java but I am having trouble understanding what they are.

    My understanding is that a web service is an application on the internet, it can serve whatever function. When a client requests something from the web service, the web service sends a wsdl file that can then be interpreted in the same language as the client. The wsdl file tells the client the methods in the web service, then the client can call methods from the web service.

    However, in the tutorial that I am following, the wsdl generates a bunch of .class and .java files, which are then added to the project. Isn't this the same thing as importing a library? As well, if the web service were to be updated, wouldn't that require the user to download a bunch of files again? Would this mean that clients have to be specifically written for specific web services, and that a client can't just call any web service?

    Probably a noob question but I'm just very confused. Also please recommend some good resources for learning about web services.

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

    What's wrong with this code?

    Posted: 04 Jun 2018 08:17 PM PDT

    Question: Create a program that asks for the names and ages of two users. After that the program prints the sum of their ages. My code:

     Scanner input = new Scanner(System.in); System.out.println("Type your name:"); String name1 = input.nextLine(); System.out.println("Type your age:"); int age1 = input.nextInt(); System.out.println("Type your name2:"); String name2 = input.nextLine(); System.out.println("Type your age:"); int age2 = input.nextInt(); input.close(); System.out.println(name1 + " and "+ name2 + " are "+(age1+age2)+" years old in total."); 

    The code stopped working at asking for name2. I don't know where I did wrong? please help redditors! thanks.

    Edit: forgot to mention this is java.

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

    No comments:

    Post a Comment