- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 2
11 Posted Topics
I want to resize my caroseul on click of a button. Below is the code that needs to be changed. Width: 100% needs to be changed to width 50%. I am using JQuery maybe there's a way using that but nothing works so far other than changing the CSS itself … | |
import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.text.DecimalFormat; public class Client { static double difference=0; static int totalTransferred=0; static StartTime timer; static double previousTimeElapsed=0; static int sizeDifference=0; static int previousSize=0; public static void main(String args[]) throws Exception { final int lossRate = Integer.parseInt(args[0]); final String hostName = args[1]; … | |
double fileSizeKB = (fileByteArray.length) / 1024; double transferTime = timer.getTimeElapsed() / 1000; double fileSizeMB = fileSizeKB/1000; double throughput = fileSizeMB/transferTime; System.out.println("The size of the File was "+fileSizeMB+ " MegaBytes"); System.out.println("Time for transfer was " +timer.getTimeElapsed()/1000+ " Seconds"); System.out.printf("Throughput was %.2f MB Per Second\n",+throughput); System.out.println("Number of retransmissions: " + retransmissionCounter); byte[] … | |
import java.awt.Frame; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import javax.media.opengl.glu.*; import com.sun.opengl.util.Animator; import com.sun.opengl.util.FPSAnimator; public class Object3D implements GLEventListener, KeyListener { GLProfile glp; GLCapabilities caps; GLCanvas canvas; GLU glu; float rotX = 0.0f; // Rotate screen on x axis float rotY = 0.0f; // … | |
Re: CSS that is in your html code rather than a seperate file. ![]() | |
public void rotate(double theta) { // this is the matrix to multiply by.. //x*cos(theta) , y* sin(theta) // x* -sin(theta) //y * cos(theta) vertices[0][0]= vertices[0][0]* Math.cos(theta)+ Math.sin(theta)*vertices[0][1]; vertices[0][1]= vertices[0][0] * (-Math.sin(theta)) + Math.cos(theta)*vertices[0][1]; vertices[1][0]= vertices[1][0]* Math.cos(theta)+ Math.sin(theta)*vertices[1][1]; vertices[1][1]= vertices[1][0] * (-Math.sin(theta)) + Math.cos(theta)*vertices[1][1]; vertices[2][0]= vertices[2][0]* Math.cos(theta)+ Math.sin(theta)*vertices[2][1]; vertices[2][1]= vertices[2][0] * … | |
Re: Probably a silly question, but why not just use your total as a double also? | |
Re: public void calcTemp (int tempM, int tempT, int tempW, int tempR, int tempF) { double averageTemp; averageTemp = (tempM + tempT + tempW + tempR + tempF)/5.0; return averageTemp; if (averageTemp >= 100); System.out.println("Too hot!"); if (averageTemp <= 0); System.out.println("Too cold!"); } } **I don't see why you need to … | |
Re: System.out.print ("there are "+weeks+"in "+month+"and "+days+"days"); | |
![]() | Re: Agree with James, read the data and add to a JTable dynamically, in terms of it updating dynaimcally while in use I guess you may need to set a timer or something, maybe a thread, and update at regular intervals so that even while the table is on screen it … |
public void log (){ if(start==null) System.out.println("List is empty.."); else{ Node temp=start; System.out.print("->"); //get rid of each user with a similar method but with a random user removed.... while(temp.next!=start ) { int r = rand.nextInt(2) ; if(r==0) { deleteAt(counter); System.out.println("Is Logged Off "+temp.data); } else if(r==1) { System.out.println("Is Logged on "+temp.data); … |
The End.