Jump to content

Duz

Active Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Duz

  1. Tried And Failed :( :( I did that after I posted here.
  2. Hey I recently made a slide show for my website www.dropdeadcomedians.com and I want it to just center I cant figure it out. Can any one help? CSS/ The call. (I don't know the diff): <script type="text/javascript" src="/STORAGE/js/jquery.js"></script> <script type="text/javascript" src="/STORAGE/js/jquery.innerfade.js"></script> <script type="text/javascript"> $(document).ready( function(){ $('#news').innerfade({ animationtype: 'slide', speed: 250, timeout: 2000, type: 'random', containerheight: '1em' }); $('ul#portfolio').innerfade({ speed: 1000, timeout: 5000, type: 'random_start', containerheight: '220px' }); $('.fade').innerfade({ speed: 1000, timeout: 6000, type: 'random_start', containerheight: '1.5em' }); $('.adi').innerfade({ speed: 'slow', timeout: 5000, type: 'random', containerheight: '150px' }); }); </script> HTML: <p align="center"> <ul id="portfolio"> <li> <a href="http://www.dropdeadcomedians.com/music/2010/5/7/performance-new-single.html#entry7606306"> <img src="/storage/slideimages/Perf.jpg" align="center" alt="Music" /> </a> </li> <li> <a href="http://www.dropdeadcomedians.com/write-game-reviews/2010/5/31/sam-and-max-episode-2-the-tomb-of-sammun-mak-review.html"> <img src="/storage/slideimages/SnM.jpg" align="center" alt="SNM" /> </a> </li> <li> <a href="http://www.dropdeadcomedians.com/write-game-reviews/2010/5/16/alan-wake-review.html#entry7690494"> <img src="/storage/slideimages/wake.jpg" align="center" alt="A.wake" /> </a> </li> <li> <a href=""> <img src="/storage/slideimages/under.jpg" align="center" alt="Con" /> </a> </li> <li> <a href="http://www.dropdeadcomedians.com/geeks/"> <img src="/storage/slideimages/About Us Slide.png" align="center" alt="The GEEKS" /> </a> </li> </ul> </p align="center">
  3. I have the class thats not my problem. Is there a keyboard class thing in the JDK if so how do I use it. I will post the error when I get home.
  4. I cant seem to get this to compile any one see why? or any way to tidy up the code. ///////////////////////////////////////////////////////////////////////////////// // / // Conor Hughes / // / // Group 5 / // / // / // Student Number: B00032375 / // / // / // Java Project; Option 2. Email Sort / // / ///////////////////////////////////////////////////////////////////////////////// class projectmail2{ public static void main (String[]args) { //declare variables int repeat; int a; a=0; int array [][] = new int [5][3]; // Declare and alocate array for(int r = 0; r < array.length; r++) //for loop to fill array { for(int c = 0; c < array[r].length; c++) { array[r][c] = (int)(Math.random()*10000%10 + 1); } } do{ System.out.println("Emails (Unsorted):"); //print to screen System.out.println("--------------------------------------"); //print to screen for aesthetics System.out.print("Date: From: Attachments:\n"); //print to screen displayArray(array); //display array (array) to screen /*__________________________________________________________________________*/ System.out.println("Select sort type:\n"); System.out.println("1.Sort by date.\n"); System.out.println("2.Sort by number of attachments.\n"); System.out.println("3.Sort by name.\n"); a =Keyboard.readInt(); if(a==1){ //if user selects 1 sortdate(array); // Function to sort array displayArray(array); //displays (array) to screen } else if (a==2){ sortattachment(array); //if user selects 2 displayArray(array);} else if (a==3){ sortname(array); //if user selects displayArray(array);} /*__________________________________________________________________________*/ System.out.println("REPEAT? 1= Yes. 2= No."); repeat=Keyboard.readInt(); }while (repeat==1); //while repeat = 1, re-run program } static void displayArray(int array[][]) // Display array function { System.out.println("Emails (Sorted):"); System.out.println("--------------------------------------"); //aesthetics System.out.print("Date: From: Attachments:\n"); for(int r = 0; r < array.length; r++) { System.out.println(); for(int c = 0; c < array[r].length; c++) { if(c == 0) { System.out.print(array[r][c] + " "); } if(c == 1) { System.out.print(getName(array[r][c])); } if(c == 2) { System.out.print(array[r][c] + " "); } } } System.out.print("\n\n\n\n"); } static String getName(int num) // Function to return name { String name = null; switch(num) //switch statement to return name. { case 1: name = "Arnie\t\t";break; case 2: name = "Paul\t\t";break; case 3: name = "Simon\t\t";break; case 4: name = "Robert\t\t";break; case 5: name = "Luke\t\t";break; case 6: name = "John\t\t";break; case 7: name = "Kerry\t\t";break; case 8: name = "Sue\t\t";break; case 9: name = "Pamela\t\t";break; case 10: name = "Sinead\t\t";break; } return (name); } static void sortname(int array [][]) // Function to sort array by name { int n=array.length; int temp[] = new int[3]; for(int pass=1; pass<n; pass ++) { //open for loop for( int i=0; i< n-pass; i++) { //open nested for loop if (array[1] > array[i+1][1] ){ temp[0] = array[0]; temp[1] = array[1]; temp[2] = array[2]; array[0] = array[0]; array[1] = array[1]; array[2] = array[2]; array[0] = temp[0]; array[1] = temp[1]; array[2] = temp[2]; } //close if statement } //close for loop } //close for loop } static void sortdate(int array [][]) // Function to sort array by date { int n=array.length; int temp[] = new int[3]; for(int pass=1; pass<n; pass ++) { for( int i=0; i< n-pass; i++) { if (array[0] > array[i+1][0] ){ temp[0] = array[0]; temp[1] = array[1]; temp[2] = array[2]; array[0] = array[0]; array[1] = array[1]; array[2] = array[2]; array[0] = temp[0]; array[1] = temp[1]; array[2] = temp[2]; } } } } static void sortattachment(int array [][]) // Function to sort array by attachments { int n=array.length; int temp[] = new int[3]; for(int pass=1; pass<n; pass ++) { for( int i=0; i< n-pass; i++) { if (array[2] > array[i+1][2] ){ temp[0] = array[0]; temp[1] = array[1]; temp[2] = array[2]; array[0] = array[0]; array[1] = array[1]; array[2] = array[2]; array[0] = temp[0]; array[1] = temp[1]; array[2] = temp[2]; } } } } } //end of program. Compilation= Success Thanks everyone
  5. Any body Know of a good one that is still being maintained thanks
  6. Thanks to those of you trying to help. Doin my best to fix the problem but if anyone compiles what I uploaded you will see the errors keep goin up Im on like 34 now.
  7. Hi Em I have a project due and its totaly screwed it was workin, but now the file is missing and whats left wont work. Please help me get this done. Project2 Here is the requirements Pro2 descrip Thank you for helping.
×
×
  • Create New...