Jump to content

jslowik

Member
  • Posts

    179
  • Joined

  • Last visited

Everything posted by jslowik

  1. This is exciting! Put my vote in for the C# var style. Close second would probably be the var/let style, but in my time with Swift I constantly think I'd rather there just be a var keyword rather than var/let. Thanks for sharing!
  2. I agree with @Toxicable, I'd start at the beginning especially if HTML is all you've done coming into it. Work on outputting data, get user input, string/data manipulation, working with files. That kind of thing. If it's easy to start that's fine. You'll just move quickly through it.
  3. Probably mostly personal preference. Don't worry too much about it as you won't be writing console style applications for very long. Just to explain a little, println adds a line break after the printed line, and print doesn't. Some examples here... System.out.println("This is a line"); System.out.println("This is a new line"); will look like: This is a line This is a new line Where System.out.print("This is a line"); System.out.println(" This isn't a new line"); Will look like: This is a line This isn't a new line
  4. Additionally you're never printing the value from that method. Your print line should be similar to: System.out.println(SecondClassObject.simpleMessage(name)); And just for giggles, writing your second class like the following is a few less keystrokes: public String simpleMessage(String name){ //this is taking the varible sent from the call method name += " Is a god"; return name; }
  5. Add a return statement to your method, then in your main class with the main method don't print the local variable, but the method from the other class. You could just make a public variable, but that's poor design.
  6. I call my system Lydia AMD FX-8150 - not overclocked yet EVGA GTX 960 16gb Corsair Vengeance DDR3 Score: a blistering 3.4 I truly didn't think this system would come close to capable, especially after hearing that less than 10% of systems were ready. Not bad for something I built 4 years ago I guess. No real interest in VR at the moment anyway.
  7. The 25" HP I mentioned is $150. Not ultra-wide. A decent monitor stand won't put you over $200. It's an IPS panel.
  8. I use an HP 25" http://www.amazon.com/HP-Pavilion-25-Inch-LED-Lit-Monitor/dp/B00B3329WA No complaints other than you'll probably want to invest in a monitor stand as well since the base leaves a lot to be desired. The 27" is $240 from Amazon.
  9. There are numerous positive things that make Python a worthwhile language to know. Heck, last I heard it was one of the languages Google used along with C++ and Java. We aren't video game characters only capable of knowing a few things. Learn everything. More on topic, use Python 3. If nothing else having to work out any differences between the book's examples and how to do it the new way will just make you that much better!
  10. Running Windows 10? I had an issue with my SSD bogging down while doing nothing the other day, and just like you a restart fixed it. I have no way to replicate it, so if you're on 10 as well maybe there's just something wonky somewhere? Do you recall if it happens mostly after updates are installed?
  11. Don't know much about liquid cooling, but if I remember my chemistry classes (which I probably don't) they're fairly similar. I wouldn't think there'd be an issue.
  12. Saw someone with a similar issue on another forum. I'll copy their troubleshooting procedure here for you: Reboot and enter BIOS Check all Power Management settings are correct and save any changes Restart Windows Disable Fast Startup Open your Power Plan Settings and click on Change Advanced Power Settings Then go through each device that could be causing your pc to wake and change it accordingly Reboot after each change to find the culprit Sounds like maybe a device accidentally got configured to allow it to start the system. Maybe ethernet? Edit: Here's the link to that forum in case you want to check it out - http://www.tenforums.com/general-support/13635-pc-turning-itself-after-windows-10-upgrade.html
  13. Currently running an FX-8150. No complaints. Haven't felt the need to overclock it yet since I haven't had any problems playing the handful of games I play regularly, but that's on the to-do list in the near future. Wouldn't classify myself as an AMD "fanboy", but this is the first machine I built that wasn't Intel based. I'm not disappointed.
  14. Just swinging by to throw a bit of a curveball. When using the scanner object it's generally not a great idea to use nextInt. You should really use nextLine and convert that string to what you need . That said, I'd write it in the style of #2 myself, but with the modification I mentioned. So I'd decrease lines in one place just to add another one or two somewhere else!
  15. You're getting errors on the return because you're returning something from a method that has no return type. The method signature is also incorrect. You're also lacking getters and setters which means the setColor and setRadius calls in the driver class won't work. Here's a functioning example of what your class should at least resemble. I added some comments in to hopefully help clear up any questions. Though feel free to ask more. public class Circle { private String color; private int radius; /** * Constructor that accepts all values. You aren't using this, but I * included it out of habit * * @param color * @param radius */ public Circle(String color, int radius) { this.color = color; this.radius = radius; } /** * This is the constructor that the CircleDriver class is calling * */ public Circle() { } public String getColor() { return color; } /** * Setter method for color. Required for driver class as written * * @param color */ public void setColor(String color) { this.color = color; } public int getRadius() { return radius; } /** * Setter method for radius. Required for driver class as written * * @param radius */ public void setRadius(int radius) { this.radius = radius; } /** * Your display method. Void return type, handles the print line itself * */ public void display() { System.out.println("I am a circle"); System.out.println("My color is " + color); System.out.println("My radius is " + radius); } /** * Compute area. Returns a double which is output by the driver class * * @return - radius = pi r ^2 */ public double computeArea() { return (Math.PI * Math.pow(radius, 2)); } /** * Compute circumference. Same as area, but different formula * * @return - circumference = 2 pi r */ public double computeCircumference() { return (2 * Math.PI * radius); } }
  16. Any particular reason you aren't using bootstrap to do it? Also when following your instructions I am unable to reproduce the error using Chrome on iOS.
  17. Android uses Java. You could do them concurrently, but if you have no Java experience to begin with I think you'd be best served starting there. That way you only have to learn one thing at at a time, rather than the quirkiness of an Android IDE. If you can get a copy of IntelliJ to write Java you'll be really comfortable moving right into Android. Summary: Start with at least the basic Java fundamentals, then start dabbling with android. That's just my opinion. YMMV of course!
  18. Are you trying to track the dollar sum? If so you have a logic error as well. Currently tracking the sum of units sold. I'm not currently sure what error you're getting, as I'm not seeing it. The code doesn't work at all on my system, but it's not blowing up. I'll try to do better a little later if nobody else comes forward before I get home. Sorry. Edit: Do you have the script tags in this order? With your custom below the jQuery one? I know it was asked, but I get no errors at all. <script src ="https://code.jquery.com/jquery-2.2.0.min.js"></script> <script src="custom.js"></script>
  19. The thing with Android is it seems like a lot of the books that are written essentially sample from the Android Developer site. The problem there is when something changes the book instantly becomes out of date. Starting out with Java would be a solid idea. My personal favorite Java books are Head First Java, or Starting Out with Java: Early Objects. Both are available on Amazon for a good price, and I think they're easy to follow. Once you have a solid understanding of Java (or if you already do, ignore that) check out the android developer site. Good luck!
  20. Assuming that this pool is just a rectangle the formula for volume is length * width * height (depth). V is volume x is length y is width z is depth Give x, y, and z a value then apply the formula. If you're trying to calculate the length, width, and depth of a pool, I'd suggest a tape measure rather than Java
  21. Hey folks! I'm hoping someone can help me out. Our Java classes utilize the Netbeans IDE, and we're currently using it to develop Java web applications. I recently discovered that students can get a free license for IntelliJ and I wanted to give it a shot as I've enjoyed PyCharm CE, and Android Studio. Now to the issue I'm having. Netbeans is wonderful for testing the applications we're building. Simply running the project launches the server (Glassfish in this case), and opens your browser to the application. I've been fiddling around with IntelliJ, but I can't seem to find a simple way to preview changes to the entire application. I've been going through the documentation on the JetBrains site, however that is just furthering my belief that maybe Netbeans is just better suited for my particular needs. This is where I'm hoping someone can help me out. Is there a similar way to launch the full application with IntelliJ like there is in Netbeans? Or is this a situation where I'm better off sticking with Netbeans if that's a functionality I really enjoy? Thanks so much for taking the time! EDIT - Never mind folks, silly old me needs to learn to properly RTFM. Thanks
  22. Just a few quick things. First of all if you're going to use a sentinel value you have to account for it. As written your program will be off by whatever that value is. Also as it's written you're never going to output your sum line. The value required to exit the do-while is a number less than zero, which will set the next variable to a number less than zero. The if logic you have written tests to see if next is greater than or equal to zero, which it will not be in order to exit the first loop. Also (and this may not be the case always) I was always told by an instructor that they used to harass people that added two values by writing int1 = int1 + int2. I don't know why someone would be made fun of, but whatever. Try writing it as int1 += int2. I did a quick couple edits you can take a peek at. The modifications I did will accept negative numbers other than negative one, so you can change that if you wish, but otherwise I think it functions as you intended. Also it's a better idea when using the scanner to grab a nextLine rather than a nextInt. In this program it's not an issue, but it will be problematic later. Grab the nextLine as a string, and parse it to what you need. I've added that in as well. Hope it helps! int sum = 1, next = 0; Scanner keyboard = new Scanner(System.in); System.out.println("Please enter a list of positive intgers and when you have reach the desired amount of intgers enter -1. "); do { String nextString = keyboard.nextLine(); next = Integer.parseInt(nextString); sum += next; } while (next != -1); { System.out.println("The sum is " + sum + "."); } }
  23. Hello! As a fellow programming student I'm hoping I can shed some light onto why the instructor would actually take points off for this. Lately we have been discussing a study (I'm sorry I haven't yet been able to find the link myself, so I cannot offer it yet) that shows that for a majority of "keyboard time" programmers are actually reading code. This could be for debugging reasons, or any other. I believe that using extraneous markup could warrant a point deduction if for no other reason than it could potentially slow someone up who was reading it, and came across an unexpected character. There are also extra keystrokes, but I'm not about to wholeheartedly defend labeling two extra key presses as inefficient. I think the more pressing issue is to try to conform to standards that are widely accepted, if not required by a compiler/interpreter. In the case of Python that means you don't see parenthesis or brackets to the extent you would in a C-style language like Java. We've always had it explained to us that in the perfect world of academia the expectations are sometimes significantly different than the requirements of real world development. In that particular case there is no need for the parenthesis, and since we are dealing with the "perfect world" scenario simply remove them. I believe madknight3 said it more succinctly, so I quoted their post in case mine was too long winded and rambling.
×