Search Results

Search found 3 results on 1 pages for 'glados'.

Page 1/1 | 1 

  • declare decision structure inside of a System.out.println

    - by user2899249
    So I am working on an assignment where I have to have a print method in a constructor that displays a distance. I also have to have three separate get methods depending on what the input is in the demo class. My question is that I am trying to write the print method to contain a decision structure based on which get is used. public void prt() { DecimalFormat formatter = new DecimalFormat("#,##0.00"); System.out.println("The time it takes the sound to travel " + distance + " feet through air is " + if (getSpeedInAir() > 0) { formatter.format(getSpeedInAir()); } else if (getSpeedInWater() > 0) { formatter.format(getSpeedInWater()); } else if (getSpeedInSteel() > 0) { formatter.format(getSpeedInSteel()); } else "error";) } After trying to compile I am getting the following errors. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\GlaDOS\Desktop\JavaStuffj Speed C:\Users\GlaDOS\Desktop\JavaStuffdel *.class C:\Users\GlaDOS\Desktop\JavaStuffjavac Speed.java Speed.java:43: error: illegal start of expression " feet through air is " + if (getSpeedInAir() 0) ^ Speed.java:43: error: ';' expected " feet through air is " + if (getSpeedInAir() 0) ^ Speed.java:43: error: not a statement " feet through air is " + if (getSpeedInAir() 0) ^ Speed.java:43: error: ';' expected " feet through air is " + if (getSpeedInAir() 0) ^ Speed.java:47: error: 'else' without 'if' else if (getSpeedInWater() > 0) ^ Speed.java:56: error: not a statement "error";) ^ Speed.java:56: error: illegal start of expression "error";) ^ 7 errors C:\Users\GlaDOS\Desktop\JavaStuffjava Speed Error: Could not find or load main class Speed Any help on why this is happening would be greatly appreciated.

    Read the article

  • NGINX Document Location

    - by GLaDOS
    I want to be able to access a given url, example.com/str. The problem is that the php file that I want to connect to is in a directory of /str/public/. In my nginx logs, I see that it is trying to connect to /str/public/str/index.php. Is there any way to remove that last 'str' in the document request? Below is my location directive in sites-available/default: location /str { root /usr/share/nginx/html/str/public/; index index.php index.html index.htm; location ~ ^/str/(.+\.php)$ { try_files $uri = 404; root /usr/share/nginx/html/str/public/; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } Thank you all so much in advance.

    Read the article

  • Still Alive…

    - by MOSSLover
    As Glados would say at the end of Portal “I’m still alive…”.  I am around, but I’m just not posting as frequently as I should.  I am trying to get acclimated to my new job, planning SharePoint Saturday New York City and Women in SharePoint plus trying to lead a normal life doing normal chores and hang out with my boyfriend.  What does this mean?  Well I’m trying to cut back to one or two events a month, which will include Heartland Developer Conference, Best Practices Conference, SPS Ozarks, SPS NYC (not speaking, running), and maybe SPS Denver and/or SPS East Bay.  So with the new job acclimation the blog suffers and twitter is getting less loven.  I’m only posting on twitter at night.  I will try to blog when I can as I see more 2010 and 2007 things that I find interesting to share.  I guess when you are a new employee you try to figure out what’s going on the first few months.  It’s really hard to post on SharePoint issue while that happens.  I’m really sorry guys and I will try harder to post at least a couple times a month (and maybe moderate comments  slightly better).  I hope that you all have a good weekend.

    Read the article

1