Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

CreepyPro

Member
  • Content Count

    222
  • Joined

  • Last visited

Awards

This user doesn't have any awards

About CreepyPro

  • Title
    Member
  • Birthday Aug 18, 2001

Contact Methods

  • Steam
    Dash3r_
  • PlayStation Network
    TheRealDash3r_
  • Twitter
    @LaWeaQueFlota

Profile Information

  • Location
    Weston, Florida
  • Gender
    Male

System

  • CPU
    Ryzen 5 1600x
  • Motherboard
    MSI B350 TOMAHAWK ARTIC
  • RAM
    16GB 3000MGHz G.SKILL Trident Z RGB
  • GPU
    GTX 1060 6GB
  • Case
    NZXT S340 Elite
  • Keyboard
    Corsair Strafe RGB
  • Mouse
    Razer Deathadder Elite

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ohhhh, thanks for your help now it works
  2. I'm trying to make a toString methodthat returns a string made out of the elements of an arraylist with a for each loop but I'm getting an IndexOutOfBounds and I can't figure out why. Heres and example of what I want to achieve: String a = "{"; for(int i=0;i<list.size();i++) { a = a + list.get(i); if(i!=list.size()-1) a = a + ","; } return a+"}"; And heres my for-each loop: String s = "{"; for(int a: list) { s = s + list.get(a); if(a!=list.size()) s = s + ","; } return s+"}";
  3. I'm trying to write down the tab for one of my favourite songs since I haven't been able to find it online. The song is Where The Whitetails Go by Mo Lowda & the Humble. Problem is I have only been playing for a few months and my ear isn't really good so any help would be apreciatted.
  4. I'm looking for a laptop that I would be able to code and do some light gaming (things as Hollow Knight, Dead Cells, Ori) and that is lightweight. Last time I bought a laptop it became useless after a year so I decided to ask for help this time before buying something stupid again.
  5. The method is supposed to draw a square on a 10x10 grid using the length and x,y coordinate an user inputs and adjust the length in case the square doesn't fit. I'm having trouble figuring out the math for adjusting the length to fit the grid. For example, if the user inputs (x-7, y-2, length-4) my square goes out of the grid by 1. public static void drawSquare(int x, int y, int len) { if(x+len>10) len = Math.max(x, len)-Math.min(x, len); if(y+len>10) len = Math.max(y, len)-Math.min(y, len); System.out.println("side length =
  6. I'm thinking about changing my GPU because it has been failing me lately (GTX 1060 6GB) and I'm looking for something around the $500-$600 range. I found some 1080 TI's on ebay that are around that range and I was wondering if it was worth the buy considering that I have a R5 1600x and that I'm going to be playing mostly at 1920x1080.
  7. Thanks for your help. I can't believe I've missed that, I've been looking at this thing for almost an hour lol
  8. I've made a program that's suppose to create greeting cards with the user name but if I print out the card from the array (using a for or for each loop) each card prints out with the name of the last card instead of the custom one for each. For example if I try to do: GreetingCard[] cards = {new BirthdayCard("Mom"), new ChristmasCard("Harry"), new ChristmasCard("Noel"), new BirthdayCard("Judd Nelson")}; for(GreetingCard c:cards) System.out.println(c+"\n"); I get Dear Judd Nelson, Happy Birthday Judd Nelson!!! Hope you have a great year! Dear Judd Nelson, Merr
  9. Thanks for the explanation, everything works as it should now. Have a nice day
  10. I'm trying to loop through an Array of ints(using a for-each loop) and checking if there's a number bigger than 0 at that index but I'm getting ArrayIndexOutOfBounds: 5 almost every time. But if I use a normal for loop the method works fine. public boolean hallIsClear() { int c=0; /* for(int toys : hall) c += hall[toys]; */ for(int i=0;i<hall.length;i++) c += hall[i]; return c == 0; }
  11. So I'm writing a class that creates a clock and I'm trying to add a method that advances the clock x amount of minutes. The method works fine except for when the starting hour is 12. When this happens I always get AM and never PM. I'm pretty sure the problem is in the if(hour==12) statement but I can't seem to figure out why. Any help is appreciated. FYI: this is HW for my CS class and I have to do it in a website which doesn't allow me to use the java built in timeclass. public void advance(int a){ int m =a%60; //Minutes to add int h =a/60; //Hours to add minute
  12. public void advance(int a){ int m =a%60; //Minutes to add int h =a/60; //Hours to add minute = minute + m; //Add minutes to m while(minute>60) { //Divides minutes by 60 to get the amount of hours in case the input is bigger than 60 minute = minute - 60; hour++; } hour = hour + h; //Adds the amount of hours that the while loop form line 5 got while(hour>12) { //Expected to change AM to PM if neccesary and change the amount of hours if it happens to be bigger than 12. if(getAmPm()=="AM") { amPm = "PM"; } else
  13. I need to write a method for the Clock class that advances time. The problem is that I'm not passing all my test cases and I can't figure out why, so if someone could explain to me what I'm doing wrong that would be great. I do not need the answer for the exercise, just to know why my code doesn't work. Clock class + exercise: https://codestepbystep.com/problemset/view/1348 My code: public void advance(int a){ int m =a%60; //Minutes to add int h =a/60; //Hours to add minute = minute + m; while(minute>60) { minute = minute - 60;
  14. Write a method named collapsePairs that accepts an array of integers as a parameter and modifies the array so that each of its pairs of neighboring integers (such as the pair at indexes 0-1, and the pair at indexes 2-3, etc.) are combined into a single sum of that pair. The sum will be stored at the even index (0,2,4, etc.) if the sum is even and at the odd index (1,3,5, etc.) if the sum is odd. The other index of the pair will change to 0. I can't figure out why I'm not getting the right outpout. For example: test #1:collapsePairs({7, 2, 8, 9, 4, 22, 7, 1, 9, 10}); exp.
  15. Write a method named collapse that accepts an array of integers as a parameter and returns a new array where each pair of integers from the original array has been replaced by the sum of that pair. I have this so far, can someone explain me how to fix the error? public static int collapse(int a[]){ int a2[] = new int[a.length/2]; if (a.length%2==0) for (int i=0; i<a2.length;i=i+2) a2[i] = a[i] + a[i+1]; else { for (int i=0; i<a2.length-1;i=i+2) a2[i] = a[i] + a[i+1]; a2[a.length/2] = a[a.length]; } re
×