Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
0 Endorsements
Ranked #3K

11 Posted Topics

Member Avatar for michael.james.90475

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 …

0
186
Member Avatar for michael.james.90475

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]; …

Member Avatar for michael.james.90475
0
533
Member Avatar for michael.james.90475

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[] …

Member Avatar for JamesCherrill
0
232
Member Avatar for michael.james.90475

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; // …

0
136
Member Avatar for anupish
Member Avatar for michael.james.90475

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] * …

Member Avatar for michael.james.90475
0
255
Member Avatar for Gl753

Probably a silly question, but why not just use your total as a double also?

Member Avatar for samson.dadson.3_1
0
229
Member Avatar for Markyboy

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 …

Member Avatar for samson.dadson.3_1
0
224
Member Avatar for Ant695
Member Avatar for michael.james.90475
0
236
Member Avatar for amogh.max

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 …

Member Avatar for JamesCherrill
0
418
Member Avatar for michael.james.90475

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); …

Member Avatar for michael.james.90475
0
258

The End.