User Profile
Collapse
-
Create 50 element boolean array, set first 25 elements true, rest false
I don't even know where to start with this or figure out how to get them to display. I need the first 25 to be true and the last 25 to be false.
I need all the trues and falses to display. -
Ok, I'll try that. Thank you! And thanks for the [code] tag tips, I'm fairly new to this site.Leave a comment:
-
How to turn this to mirror BACK to FRONT
This method mirrors FRONT to BACK and now I need it to go BACK to FRONT:
public void mirrorFrontToBa ck()
{
int length = this.getLength( ); //save the length
int mirrorPoint = length / 2; //mirror around this
int value = 0; //hold the current value
//loop from 0 to mirrorPoint
for (int i=0; i < mirrorPoint; i++) {
value = this.getSampleV alueAt(i);
... -
I think I figured it out.
This is what I have now and it works just fine:
Code:public void increaseVolume3() { SoundSample[] sampleArray = this.getSamples(); int value = 0; //loop through all the samples in the array for (SoundSample sample : sampleArray) { value = sample.getValue(); sample.setValue((int) (value * 2));
Leave a comment:
-
I'm not quite sure what you're doing here.
I need it to stay as close to what I have as possible.Leave a comment:
-
How do I turn this for loop into a for each loop?
Code:public void increaseVolume2() { SoundSample[] sampleArray = this.getSamples(); SoundSample sample = null; int value = 0; //loop through all the samples in the array for (int i = 0; i < sampleArray.length; i++) { sample = sampleArray[i]; value = sample.getValue(); sample.setValue((int) (value * 2)); } }
-
Mary Seelye started a topic How to copy an image a few dozen times into the same picture with dif coordinates.in JavaHow to copy an image a few dozen times into the same picture with dif coordinates.
I am trying to draw a town. I have the pic of one house drawn. I need to be able to write a code to copy that picture and multiply it at different coordinates and different sizes. I have the code for the one house written, but I can't figure out how to multiply it. (Pic attached of example) I'm using DrJava.
My code for the house is:Code:public void drawHouse() { //get graphics Graphics graphics = this.getGraphics();
-
Thank you so much again! You are awesome, I really appreciate all the help!Leave a comment:
-
-
How to make images change using next and previous buttons.
This is what I have so far -
I cannot get my next link to work, but my previous link works after you change the pic by clicking on it. I'd like to take the "onclick" out and just use the next and previous links to change the pictures. I have 5 pictures and I can only get two to 'almost' work:
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
Mary Seelye replied to I need to know how to make an image change to other images 5 times with onload.in Javascriptone after the other, every 1 second in place of the first one shown. I tried else if statements, but that only showed the last one and did not change.Leave a comment:
-
Mary Seelye started a topic I need to know how to make an image change to other images 5 times with onload.in JavascriptI need to know how to make an image change to other images 5 times with onload.
this is what I have so far, I can only get it to work with the two pictures, and I need 5:
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Concert Ads</title> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"
No activity results to display
Show More
Leave a comment: