Search Results

Search found 4 results on 1 pages for 'leanne'.

Page 1/1 | 1 

  • Problem with Gregorian Calendar hour of day in java

    - by Leanne C
    hi, I'm using a Gregorian Calendar to set a specific date and time to an application using the set function of the Gregorian Calendar. When i use the getTime() method, it gives me the right output however when i try to access the Hour_Of_Day and Minute it gives a wrong number. Calendar time = new GregorianCalendar(); time.set(2010, Calendar.JANUARY, 1, 7, 20,0); hour = time.HOUR_OF_DAY; minute = time.MINUTE; The hour gives an output of 11 and the minute gives an a value of 12. Any suggestions on how to fix this? Thanks

    Read the article

  • Images in Applet not showing in web page

    - by Leanne C
    I am trying to display a JPEG image and a moving dot on a Java applet which I am using on a web based application. However, when I run the applet it works fine, but when I display the applet from the JSP page, I get the moving dot but not the JPEG image. Is there a specific folder where the JPEG needs to be? These are the 2 methods i use for drawing the picture and the moving dot on the screen. public class mapplet extends Applet implements Runnable { int x_pos = 10; int y_pos = 100; int radius = 20; Image img, img2; Graphics gr; URL base; MediaTracker m; @Override public void init() { mt = new MediaTracker(this); try { //getDocumentbase gets the applet path. base = getCodeBase(); img = getImage(base, "picture.jpg"); m.addImage(img, 1); m.waitForAll(); } catch (InterruptedException ex) { Logger.getLogger(movement.class.getName()).log(Level.SEVERE, null, ex); } public void paint (Graphics g) { g.drawImage(img, 0, 0, this); // set color g.setColor (Color.red); // paint a filled colored circle g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius); } The code one below is the call from the jsp page <applet archive="mapplet.jar" code="myapplets/mapplet.class" width=350 height=200> </applet> The jar file and the picture are in the same folder as the jsp page, and there is also a folder containing the contents of the class and image of the applet in the web section of the application. The applet loads fine however the picture doesn't display. I think it's not the code but the location of the picture that is causing a problem. Thanks

    Read the article

  • Using javascript to limit survey choices to three unique values

    - by leanne
    I'm required to use a limited survey application, and have to adapt the provided code to meet more advanced functionality. I need to create a weighted ranking question, so users can select their top three choices and the data will go into the survey application and be accessible in the survey reports. The application only supports 2 types of questions (text fill & multiple choice) but I can alter the code, as long as it still sends the form data back to the survey application. The code is set up so it will show a drop-down menu of 0-3 for each option. Now I want to limit the user's choices so they can only select one "1" "2" or "3", three choices total. Ideally, if the user already had "2" selected for one option and they tried to select it for another option, it would set the first "2" as "0" or blank. Is this possible to do with javascript? If so, does anyone know of a site that might show code like this, or provide similar enough examples that I could adapt it? Current code here: <html> <head><title>Survey</title></head> <!-- Changes - remove br to put dropdown next to text for each item. Switch text & dropdown order for each item. - add comments to separate each question - removed blue title font - add instructions Goals - limit choices to one 1 one 2 and one 3, three choices total. --> <link href="---" rel="stylesheet" type="text/css"> <body bgcolor="#3c76a3"> <!-- TRANSITIONAL DIALOG BOX --> <table border="0" align="center" cellpadding="0" cellspacing="0" style="background-attachment: scroll; background-color: #3c76a3; background-repeat: no-repeat; background-position: left top;" bgcolor="#3c76a3" topmargin="0" marginwidth="0" marginheight="0" width="100%" height="100%"> <tr> <td> <table border="0" align="center" cellpadding="0" cellspacing="0" id="survey"> <tr> <td><p>&nbsp;</p> <!-- HEADER END --> <!-- FORM START TAG --><form name="survey" action="---" method="POST"> <FONT face="Verdana, Arial, Helvetica, sans-serif"> <b>survey</b><hr> <!-- 1 --> <input type=hidden name="Buy R.J. a DeLorean_multiple_answers" value="one"> <font size=2><select name="Buy R.J. a DeLorean" SIZE=1> <option value=""> <option value="0">0 <option value="1">1 <option value="2">2 <option value="3">3 </select></font> <input type="hidden" name="Buy R.J. a DeLorean_help" value=""> <b><font size=2>Buy R.J. a DeLorean</font></b> <hr size=1> <!-- 2 --> <input type=hidden name="Fill Lisa's office with marshmallows._multiple_answers" value="one"> <font size=2><select name="Fill Lisa's office with marshmallows." SIZE=1> <option value=""> <option value="0">0 <option value="1">1 <option value="2">2 <option value="3">3 </select></font> <input type="hidden" name="Fill Lisa's office with marshmallows._help" value=""> <b><font size=2>Fill Lisa's office with marshmallows.</font></b> <hr size=1> <!-- 3 --> <input type=hidden name="Install a beer fridge in everyone's filing cabinets._multiple_answers" value="one"> <font size=2><select name="Install a beer fridge in everyone's filing cabinets." SIZE=1> <option value=""> <option value="0">0 <option value="1">1 <option value="2">2 <option value="3">3 </select></font> <input type="hidden" name="Install a beer fridge in everyone's filing cabinets._help" value=""> <b><font size=2>Install a beer fridge in everyone's filing cabinets.</font></b> <hr size=1> <!-- 4 --> <input type=hidden name="Buy a company Cessna_multiple_answers" value="one"> <font size=2><select name="Buy a company Cessna" SIZE=1> <option value=""> <option value="0">0 <option value="1">1 <option value="2">2 <option value="3">3 </select></font> <input type="hidden" name="Buy a company Cessna_help" value=""> <b><font size=2>Buy a company Cessna</font></b><br> <hr size=1> <!-- 5 --> <input type=hidden name="Replace Conf2's chairs with miniature ponies._multiple_answers" value="one"> <font size=2><select name="Replace Conf2's chairs with miniature ponies." SIZE=1> <option value=""> <option value="0">0 <option value="1">1 <option value="2">2 <option value="3">3 </select></font> <input type="hidden" name="Replace Conf2's chairs with miniature ponies._help" value=""> <b><font size=2>Replace Conf2's chairs with miniature ponies.</font></b> <hr size=1> <input type="hidden" name="question_names" value="{Buy R.J. a DeLorean} {Fill Lisa's office with marshmallows.} {Install a beer fridge in everyone's filing cabinets.} {Buy a company Cessna} {Replace Conf2's chairs with miniature ponies.}"> <p align="right"><input type="image" BORDER=0 title="Save Changes" alt="Save Changes" src="---" name="button_save_changes"> <input type="hidden" name="showconfirm" value="T"> <input type="hidden" name="showresults" value="F"> <input type="hidden" name="preventdupesmemberid" value="T"> <input type="hidden" name="preventdupesip" value="F"> <input type="hidden" name="numberquestions" value="F"> <input type="hidden" name="destinationurl" value=""> <input type="hidden" name="original_survey_id" value="62"> <!-- FORM END TAG --></form> <!-- FOOTER START --> </td> </tr> </table> </td> </tr> </table> <!-- END HEADER --> </body> </html>

    Read the article

  • Remove/squash entries in a vertical hash

    - by Forkrul Assail
    I have a grid that represents an X, Y matrix, stored as a hash here. Some points on the X Y matrix may have values (as type string), and some may not. A typical grid could look like this: {[9, 5]=>"Alaina", [10, 3]=>"Courtney", [11, 1]=>"Gladys", [8, 7]=>"Alford", [14, 11]=>"Lesley", [17, 2]=>"Lawson", [0, 5]=>"Katrine", [2, 1]=>"Tyra", [3, 3]=>"Fredy", [1, 7]=>"Magnus", [6, 9]=>"Nels", [7, 11]=>"Kylie", [11, 0]=>"Kellen", [10, 2]=>"Johan", [14, 10]=>"Justice", [0, 4]=>"Barton", [2, 0]=>"Charley", [3, 2]=>"Magnolia", [1, 6]=>"Maximo", [7, 10]=>"Olga", [19, 5]=>"Isadore", [16, 3]=>"Delfina", [17, 1]=>"Noe", [20, 11]=>"Francis", [10, 5]=>"Creola", [9, 3]=>"Bulah", [8, 1]=>"Lempi", [11, 7]=>"Raquel", [13, 11]=>"Jace", [1, 5]=>"Garth", [3, 1]=>"Ernest", [2, 3]=>"Malcolm", [0, 7]=>"Alejandrin", [7, 9]=>"Marina", [6, 11]=>"Otilia", [16, 2]=>"Hailey", [20, 10]=>"Brandt", [8, 0]=>"Madeline", [9, 2]=>"Leanne", [13, 10]=>"Jenifer", [1, 4]=>"Humberto", [3, 0]=>"Nicholaus", [2, 2]=>"Nadia", [0, 6]=>"Abigail", [6, 10]=>"Zola", [20, 5]=>"Clementina", [23, 3]=>"Alvah", [19, 11]=>"Wallace", [11, 5]=>"Tracey", [8, 3]=>"Hulda", [9, 1]=>"Jedidiah", [10, 7]=>"Annetta", [12, 11]=>"Nicole", [2, 5]=>"Alison", [0, 1]=>"Wilma", [1, 3]=>"Shana", [3, 7]=>"Judd", [4, 9]=>"Lucio", [5, 11]=>"Hardy", [19, 10]=>"Immanuel", [9, 0]=>"Uriel", [8, 2]=>"Milton", [12, 10]=>"Elody", [5, 10]=>"Alexanne", [1, 2]=>"Lauretta", [0, 0]=>"Louvenia", [2, 4]=>"Adelia", [21, 5]=>"Erling", [18, 11]=>"Corene", [22, 3]=>"Haskell", [11, 11]=>"Leta", [10, 9]=>"Terrence", [14, 1]=>"Giuseppe", [15, 3]=>"Silas", [12, 5]=>"Johnnie", [4, 11]=>"Aurelie", [5, 9]=>"Meggie", [2, 7]=>"Phoebe", [0, 3]=>"Sister", [1, 1]=>"Violet", [3, 5]=>"Lilian", [18, 10]=>"Eusebio", [11, 10]=>"Emma", [15, 2]=>"Theodore", [14, 0]=>"Cassidy", [4, 10]=>"Edmund", [2, 6]=>"Claire", [0, 2]=>"Madisen", [1, 0]=>"Kasey", [3, 4]=>"Elijah", [17, 11]=>"Susana", [20, 1]=>"Nicklaus", [21, 3]=>"Kelsie", [10, 11]=>"Garnett", [11, 9]=>"Emanuel", [15, 1]=>"Louvenia", [14, 3]=>"Otho", [13, 5]=>"Vincenza", [3, 11]=>"Tate", [2, 9]=>"Beau", [5, 7]=>"Jason", [6, 1]=>"Jayde", [7, 3]=>"Lamont", [4, 5]=>"Curt", [17, 10]=>"Mack", [21, 2]=>"Lilyan", [10, 10]=>"Ruthe", [14, 2]=>"Georgianna", [4, 4]=>"Nyasia", [6, 0]=>"Sadie", [16, 11]=>"Emil", [21, 1]=>"Melba", [20, 3]=>"Delia", [3, 10]=>"Rosalee", [2, 8]=>"Myrtle", [7, 2]=>"Rigoberto", [14, 5]=>"Jedidiah", [13, 3]=>"Flavie", [12, 1]=>"Evie", [8, 9]=>"Olaf", [9, 11]=>"Stan", [20, 2]=>"Judge", [5, 5]=>"Cassie", [7, 1]=>"Gracie", [6, 3]=>"Armando", [4, 7]=>"Delia", [3, 9]=>"Marley", [16, 10]=>"Robyn", [2, 11]=>"Richie", [12, 0]=>"Gilberto", [13, 2]=>"Dedrick", [9, 10]=>"Liam", [5, 4]=>"Jabari", [7, 0]=>"Enola", [6, 2]=>"Lela", [3, 8]=>"Jade", [2, 10]=>"Johnson", [15, 5]=>"Willow", [12, 3]=>"Fredrick", [13, 1]=>"Beau", [9, 9]=>"Carlie", [8, 11]=>"Daisha", [6, 5]=>"Declan", [4, 1]=>"Carolina", [5, 3]=>"Cruz", [7, 7]=>"Jaime", [0, 9]=>"Anthony", [1, 11]=>"Esta", [13, 0]=>"Shaina", [12, 2]=>"Alec", [8, 10]=>"Lora", [6, 4]=>"Emely", [4, 0]=>"Rodger", [5, 2]=>"Cedrick", [0, 8]=>"Collin", [1, 10]=>"Armani", [16, 5]=>"Brooks", [19, 3]=>"Eleanora", [18, 1]=>"Alva", [7, 5]=>"Melissa", [5, 1]=>"Tabitha", [4, 3]=>"Aniya", [6, 7]=>"Marc", [1, 9]=>"Marjorie", [0, 11]=>"Arvilla", [19, 2]=>"Adela", [7, 4]=>"Zakary", [5, 0]=>"Emely", [4, 2]=>"Alison", [1, 8]=>"Lorenz", [0, 10]=>"Lisandro", [17, 5]=>"Aylin", [18, 3]=>"Giles", [19, 1]=>"Kyleigh", [8, 5]=>"Mary", [11, 3]=>"Claire", [10, 1]=>"Avis", [9, 7]=>"Manuela", [15, 11]=>"Chesley", [18, 2]=>"Kristopher", [24, 3]=>"Zola", [8, 4]=>"Pietro", [10, 0]=>"Delores", [11, 2]=>"Timmy", [15, 10]=>"Khalil", [18, 5]=>"Trudie", [17, 3]=>"Rafael", [16, 1]=>"Anthony"} What I need to do though, is basically remove all the empty entries. Let's say [17,3] = Raphael does not have an element in front of if (let's say - no [16,3] exists) then [17,3] should become [16,3] etc. So basically all empty items will be popped off the vertical (row) structure of the hash. Are there functions I should have a look at or is there an easy squash-like method that would just remove blanks and adjust and move other items? Thanks in advance for your help.

    Read the article

1