Java sorting

Hi All,
Thankx in advance for answring this
please gimme a sample code f
how to make this query into java collections sorting as java program
SELECT *
FROM authors
ORDER BY au_lname ASC, au_fname AS, au_mname dsc

senthil_jr wrote:
yes , i need to use that in jTable. which i have a sperate dialog for sorting. it will get the colum heders and as for sort by column 1, then by colunm2, then by coulm 3. here i cant go back to DB query and use order by clause, instead i need to write sort method using the collection and bean. the bean contains columheder1 ,columheder1Sort (1 for asc, 2 desc) like 6 propeties[http://java.sun.com/developer/JDCTechTips/2005/tt1115.html#2]

Similar Messages

  • Types of Java Sorts

    Hello,
    I am new to this site and cannot find the information I am looking for, so I hope you all can help me. I need to know the different types of Java sorts there are. I only know of bubble and selection. I cannot find the rest on this site. If someone can give me a link to the different types, that would be awesome.
    Thanks for the help,
    speedy11309

    i mean different ways to sort things. like if i have
    a bunch of numbers inputted, like 5 7 1 123 12, and i
    want to sort those numbers from high to low, i can
    use the bubble sort technique. i know there are
    different types of algorithms to sort them but i dont
    know what they are or what they are called.Yes, there are different types: bubble, quick, insertion, merge, etc.
    Those sorting algorithms have nothing to do with Java. You can impelement any of them in Java. Some have been implemented as part of certain libraries, as I mentioned. I think the Arrays.sort and List.sort both use quicksort, but I'm not sure.
    If you're looking for some kind of library where you can call bubbleSort(myStuff);
    // OR
    quickSort(myStuff); etc. then you'll have to either roll your own or google for such a thing. If it exists, it's not part of Java, it's just implemented using Java.

  • Java sorting the array of objects

    Hi ,
    I have a question on sorting objects in java.
    I have a java interface some thing like :
    public classmyObj extends Nullable
        private int objId;
        private Datemydate;
        public int getObjID();
        public Date getmyDate();
        public int getISecondD();
      }I need to create the array of the objects of this class that are sorted on the ObjID:
    classmyObj[] collectionObjects
    I need to pass this collectionObjects to another function.
    Now how should I sort these objects based on the ObjID on collection?
    Please help with this!
    Thanks

    neeto wrote:
    Hi ,
    I have a question on sorting objects in java.
    I have a java interface some thing like :You mean class?
    >
    public classmyObj extends Nullable
    private int objId;
    private Datemydate;
    public int getObjID();
    public Date getmyDate();
    public int getISecondD();
    }I need to create the array of the objects of this class that are sorted on the ObjID:
    classmyObj[] collectionObjects
    I need to pass this collectionObjects to another function.
    Now how should I sort these objects based on the ObjID on collection?Create a comparator and use it in a call to Collections.sort (or Arrays.sort if you have an array)

  • JAVA Sort Problem

    PLEASE HELP_
    I have a massive problem, I am trying to sort ASCII Characters in Ascending and Descending order however I have no clue on how to do this.
    I am desperate to get this done as deadlines are looming and would appreciate any help at all!!
    Many Thanks
    Nicholas
    [email protected]

    nickh27 wrote:
    PLEASE HELP_
    I have a massive problem, I am trying to sort ASCII Characters in Ascending and Descending order however I have no clue on how to do this.
    I am desperate to get this done as deadlines are looming and would appreciate any help at all!!
    Many Thanks
    Nicholas
    [email protected]
    Your sorting an array of chars ? An array of String ? An ArrayList with chars/Strings ? Could you be more specific ?

  • Java , sort of tyypewriter

    My question is how can I make java show me a sequence of numbers by drawing them?
    eg:
    "1"  then after n * seconds shw "12" then after n*seconds "123"I tried it with multithreading but i ended up overclocking my computer and no real result!

    Credit to Jos...
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.PrintStream;
    public class DelayOutputStream extends OutputStream {
         private PrintStream sink;
         private long delay;
         public DelayOutputStream(PrintStream sink, long delay) {
              this.sink = sink;
              this.delay = delay;
         @Override
         public void write(int b) throws IOException {
              try {
                   Thread.sleep(delay);
              } catch (InterruptedException e) {
                   /* swallow */
              this.sink.print((char) b);          
         public static void main(String[] args) throws IOException {
              String message = "This is the slow message";
              DelayOutputStream dos = new DelayOutputStream(System.out, 75);
              PrintStream ps = new PrintStream(dos);
              ps.println(message);
    }

  • Sorting the Rows in a JTable Component Based on a Column

    Hi Masters..would like to have your valuable help and suggestion..i am using jdk1.4.i have jtbale and would like to have one column data in sorted way...
    just i am enclosing my code in tha i am using Collections.sort(data, new ColumnSorter(colIndex, ascending)); but that compare of that comparator is not at woring that data is not getting soretd.
    here data is the jtable complete data.
    Main java file:
    package com.ibm.sort;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Vector;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableModel;
    public class SimpleTableDemo extends JPanel {
    private boolean DEBUG = false;
         int colIndex;
              boolean ascending;
         DefaultTableModel model = new DefaultTableModel();
    public SimpleTableDemo() {
    super(new GridLayout(1,0));
    String[] columnNames = {"First Name","Last Name","Sport","# of Years","Vegetarian"};
    Object[][] data = {
    {"Mary", "Campione","Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath","Knitting", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour","Speed reading", new Integer(20), new Boolean(true)},
    {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)}
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(500, 80));
              table.setAutoCreateColumnsFromModel(false);
         JScrollPane scrollPane = new JScrollPane(table);
    add(scrollPane);
              sortAllRowsBy(model, 1, true);
         public void sortAllRowsBy(DefaultTableModel model, int colIndex, boolean ascending) {
                   Vector data = model.getDataVector();
                   System.out.println("SimpleTableDemo.sortAllRowsBy()11111");
                   Collections.sort(data, new ColumnSorter(colIndex, ascending));
              //Collections.sort(data);
                   //Arrays.sort(data, new ColumnSorter(colIndex, ascending));
                   System.out.println("SimpleTableDemo.sortAllRowsBy()2222");
                   model.fireTableStructureChanged();
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("SimpleTableDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    SimpleTableDemo newContentPane = new SimpleTableDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    Second FIle which has sorting :
    * Created on Jun 21, 2008
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.ibm.sort;
    import java.util.Comparator;
    import java.util.Vector;
    // This comparator is used to sort vectors of data
    public class ColumnSorter implements Comparator {
         int colIndex;
         boolean ascending;
         ColumnSorter(int colIndex, boolean ascending) {
              System.out.println("ColumnSorter.ColumnSorter(---colIndex--:"+colIndex+" ,ascending: "+ascending);
              this.colIndex = colIndex;
              this.ascending = ascending;
              System.out.println("ColumnSorter.ColumnSorter()");
         public int compare(Object a, Object b) {
              System.out.println("compare-----:");
              Vector v1 = (Vector)a;
              Vector v2 = (Vector)b;
              Object o1 = v1.get(colIndex);
              Object o2 = v2.get(colIndex);
    System.out.println("ColumnSorter.compare(): -o1- :"+o1+" ,o2: "+o2);
              // Treat empty strains like nulls
              if (o1 instanceof String && ((String)o1).length() == 0) {
                   o1 = null;
              if (o2 instanceof String && ((String)o2).length() == 0) {
                   o2 = null;
              // Sort nulls so they appear last, regardless
              // of sort order
              if (o1 == null && o2 == null) {
                   return 0;
              } else if (o1 == null) {
                   return 1;
              } else if (o2 == null) {
                   return -1;
              } else if (o1 instanceof Comparable) {
                   if (ascending) {
                        System.out.println("ascending-->ColumnSorter.compare()-((Comparable)o1).compareTo(o2): "+(((Comparable)o1).compareTo(o2)));
                        return ((Comparable)o1).compareTo(o2);
                   } else {
                        System.out.println("Desending-->ColumnSorter.compare()-((Comparable)o1).compareTo(o2): "+(((Comparable)o1).compareTo(o2)));
                        return ((Comparable)o2).compareTo(o1);
              } else {
                   if (ascending) {
                        System.out.println("ColumnSorter.compare()---o1.toString().compareTo(o2.toString())---: "+(o1.toString().compareTo(o2.toString())));
                        return o1.toString().compareTo(o2.toString());
                   } else {
                        return o2.toString().compareTo(o1.toString());
    Please help is deadly needed.
    thanks in advance!!!

    Learn to use code tags.
    Learn to use google.
    http://www.google.com/search?q=java+sort+rows+jtable&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

  • Sort order precedence

    Hi
    I am reading data from a table column in html sorted by MS SQL (order by).  I am then using Java (Collections.sort()) to verify that the column is actually sorted correctly.
    My algorithm works fine for a-zA-Z0-9 (I ignore case when I sort), but for these !@#$%^ etc. (some special characters) the Java sort is sorting them in a different order from MS SQL (some appear before the digits, and others appear in a different order).
     I looked at the ASCII/Unicode table and Java is sorting them correctly according to their numerical values (taking into account that I use an ignore case sort).
    MS SQL seems to sort the same way as MS Excel.
    Any idea how I can simulate the SQL sort with java?  I believe they are using the regular order by (with an optional ascending or descending), and the sort field is text.
    Thanks

    Any idea how I can simulate the SQL sort with java?
    You should better ask this in a Java forum then in Sql, because SQL Server sorts the right way.
    And why do you compare the order, makes no sense for me.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Unicode Sorting?

    Is there a sorting sequence in Oracle 9i which would give me unicode sorting?
    Our application needs to provide international support using Oracle as the backend database. Application is written in Java and we are using Data Direct JDBC driver to connect to Oracle. The application sorts data in 2 ways - ORDER BY clause sent to database or result set sorted in JAVA and there are reasons why each one is chosen where it is and it is not desirable to switch to one or another sort methods completely. Java supports unicode sorting. Is there an equivalent collating sequence which will sort similarly for the ORDER BY sorts such that there is consistency between the database sort and java sorting? We expect our database tables to store unicode strings - i.e columns could have data from multiple languages and thus binary sorting would not be adequate. We are using the SQL NCHAR data types to implement Unicode and not relying on the database cahracter set to be used as UTF8.
    Thanks
    Raj

    There is a chapter in the Oracle Globablization Guide http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96529/ch4.htm#1656 on linguistic sorting.
    Off the top of my head, I don't know how Java sorts unicode data, but I'm certain you can achieve the same in Oracle.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Exception handling in sorting arrays

    Hi all, I have a problem with the use of the built in java sort fo arrays. My program works on an array with 4 or 5 entities. When I run it in some folders it works but not in others. I get the following error after compilation, where "ResultData" is the class of array to be sorted:Exception in thread "main" java.lang.NullPointerException
    at ResultData.compareTo(TextEdit.java:1215)
    at java.util.Arrays.mergeSort(Arrays.java:1064)
    at java.util.Arrays.mergeSort(Arrays.java:1071)
    at java.util.Arrays.mergeSort(Arrays.java:1072)
    at java.util.Arrays.mergeSort(Arrays.java:1071)
    at java.util.Arrays.mergeSort(Arrays.java:1071)
    at java.util.Arrays.mergeSort(Arrays.java:1071)
    at java.util.Arrays.sort(Arrays.java:1014)
    at java.util.Collections.sort(Collections.java:78)
    [\code]Can any one give a suggestion?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Here is the code for the class "ResultData"class ResultData implements Comparable
         String file1;
         String file2;
         double var, var1, var2;
         public ResultData(String f1,String f2,double v, double x, double y)
                   file1= f1; file2=f2;
                   var=v; var1=x; var2=y;
         public String getFile1Name()
              return file1;
         public String getFile2Name()
              return file2;
         public double getVar()
              return var;
         public double getVar1()
              return var1;
         public double getVar2()
              return var2;
         public String toString()
              return file1+"          "+file2+"          "+var+"          "+var1+"          "+var2;
           public int compareTo(Object o)
              ResultData r= (ResultData)o;
              double result = this.getVar()- r.getVar();
              if (result < 0.0)         return -1;
              else if(result > 0.0)     return 1;
              else return 0;
    } // ends class ResultData

  • Can anyone tell me the Java Training facilities in Seattle area

    I need to learn Java within a week or so, is there any quick-learn-Java sort of training facilities near Seattle or Bellevue area?

    "Learn Java in a week"?
    What do you mean by "learn"? If you mean be able to write Hello World and understand the bare bones basics of what goes into a simple Java program, maybe.
    If you mean understand the language and API thoroughly enough to produce real, quality software, that's pretty unreasonable.

  • Simpler way to sort 2-d string array?

    I have a long 2d string array, and I would like to sort by the 2nd value. It originates as:
        public static final String names[][] = {
         {"000000", "Black"},
         {"000080", "Navy Blue"},
         {"0000C8", "Dark Blue"},
         {"0000FF", "Blue"},
            {"000741", "Stratos"},
         {"FFFFF0", "Ivory"},
         {"FFFFFF", "White"}
        };As you can see, they are pre-sorted by the hex values. That is useful for part of the app.
    There are 1,567 entries. I would like to alphabetize the color names and place them in a list widget. I need to keep the associated hex color values with the name values. All I can think of to do something like:
    1) make a temporary long 1-d string array
    2) fill it by loop that appends the hex values to the name values: temp[i] = new String (names[1] + names[i][0])
    3) sort temp[] with built in Java sort
    4) make a permanent new string array, hexValues[] for the hex values
    5) copy the last 6 characters of each item to hexValues[]
    6) truncate the last 6 characters of each item in temp[]
    7) build list widget with temp[]
    Is there a more elegant way? What I'd really like to do is build a 1-d array of int's, with the values representing the alphabetized locations of the names. However, I don't see any built-in which would do that kind of indirect sort.
    Second question -- Can the backgrounds of each item in a list widget be a different color? Ideally the list would show the color name in black or white, and the its color value as background. Specifically, I'm trying to build the list accomplished by the Javascript code here:
    * http://chir.ag/projects/name-that-color/
    and add it to my Java interactive color wheel:
    * http://r0k.us/graphics/SIHwheel.html
    BTW, I have converted his name that color Javascript (ntc.js) to a native Java class. It is freely distributable, and I host it here:
    * http://r0k.us/source/ntc.java
    -- Rich
    Edited by: RichF on Oct 7, 2010 7:04 PM
    Silly forum software; I can't see what made it go italic at the word new.

    I am implementing a sort infrastructure along the lines of camickr's working example, above. Part of my problem is that I am new to both lists and collections. I've tried searching, and I cannot figure out why the compiler doesn't like my "new":
    public class colorName implements Comparable<colorName>
        String     name, hex;
        int          hsi;
        static List<colorName> colorNames;
        public colorName(String name, String hex)
         float     hsb[] = {0f, 0f, 0f};
         int     rgb[] = {0, 0, 0};
         int     h, s, b;     // b for brightness, same as i
         this.name = name;
         this.hex  = hex;
         // Now we need to calculate hsi,
         this.hsi = (h << 10) + (s << 6) + b;  //  hhhhhhssssiiiiii
        ***   findColorName() performs 3 functions.  First, it
        *** will auto-initialize itself if necessary.  Second,
        *** it will perform 3 sorts:
        ***   -3) byHSI:  sort by HSI and return first element of sorted list
        ***   -2) byNAME: sort by name and return first element of list
        ***   -1) byHEX:  (re)reads ntc.names, which is already sorted by HEX;
        ***               returns first element of list
        *** Third, on 0 or greater, will return the nth element of list
        *** Note: ntc.init() need not have been called.
        public colorName findColorName(int which)
         if (which < -3)  which = -3;
         if (which >= ntc.names.length)  which = ntc.names.length - 1;
         if (which == -1)  colorNames = null;     // free up for garbage collection
         if (colorNames == null)
         {   // (re)create list
             colorNames = new ArrayList<colorName>(ntc.names.length);
             for (int i = 0; i < ntc.names.length; i++)
                 colorNames.add(new colorName(ntc.names[1], ntc.names[0]));
            if (which == -1)  return(colorNames.get(0));
    }On compilation, I receive:
    D:\progming\java\ntc>javac colorName.java
    colorName.java:117: cannot find symbol
    symbol  : constructor colorName(java.lang.String[],java.lang.String[])
    location: class colorName
                    colorNames.add(new colorName(ntc.names[1], ntc.names[0]));
                                   ^
    1 errorLine 117 is the second-to-last executable line in code block. I know it is finding the ntc.names[][] array the ntc.class file. I had forgotten to compile ntc.java, and there were other errors, such as in line 115 where it couldn't find ntc.names.length. Compare camickr's two lines:
              List<Person> people = new ArrayList<Person>();
              people.add( new Person("Homer", 38) );As far as I can tell, I'm doing exactly the same thing. If you have any other feedback, feel free to make it. The full source may be found at:
    * http://r0k.us/rock/Junk/colorName.java
    PS1: I know I don't need the parenthesis in my return's. It's an old habit, and they look funny to me without them.
    PS2: My original design had the "static List<colorName> colorNames;" line defined within the findColorName() method. The compiler did not like that; it appears to be that one cannot have static variables within methods. Anyway, that's why I don't have separate sorting and getting methods. I'm learning; "static" does not mean, "keep this baby around". Its meaning is, "there is only one of these babies per class".
    -- Rich

  • Destination Sorting Key - not sorting under load

    I have configured a Destination Sorting Key on one of my JMS Queue and it is sorting based on JMSPriority set in the JMS Message Header. The sorting works fine when I test it with a few messages. I am firing messages with priority 9 and 4. When I run a load test with 50-60 messages(both 9&4) , I can see that sorting is happening but its not effective. I still get lower priority messages before the higher priority messages when I read the queue.
    What i understand is that messages will be pushed as FIFO only but the Destination Sorting Key makes sure it changes the order of the messages in the queue itself before I read the messages.
    Is it possible to sort the messages effectively in the Queue?
    Regards,
    Vinay Krishnan

    I need more info in order to even attempt to answer the question.
    Checking for kinds I started using a hashmapYep... That's how I'd do it... build a histogram = new Map<Card.Face,Integer>(); and check it for a pair, two pair, three of kind, flush, four of kind, and whatever else.... remembering the best hand at each stage.
    I presume you're asking about this "weird" statement.
    Sort the histogram by the count backwards (high values first).
    Q: Is there a class that supports key value pairs and is sortable?
    A: http://java.sun.com/javase/6/docs/api/java/util/SortedMap.html
    .... and dude you need to learn how to google. That was the first hit for "java sorted map".
    One hint: Build your HashMap, then get a SortedMap when you're ready to query it in-order... I guess you'll want a "reverse-frequency-table"... i.e. from frequency to value.
    Otherwise, I suppose I could create another object that contains two ArrayLists, one for keys and one for values, which I keep in sync, but that seems ugly.Yep parallel arrays (or ArrayLists) are uglier than [Amanda Vanstones|http://www.theage.com.au/ffximage/2005/08/02/amanda_vanstone_wideweb__430x276.jpg] ugly sister. Having said that they're not too totally horrible once they're "hidden" behind a facade.
    Cheers. Keith.
    Edited by: corlettk on 21/06/2009 23:49 ~~ I didn't see your second post before I posted this... Treat as a confirmation of what you discovered indepenantly... and I'd be interested to see your finished project. Cheers. Keith.

  • For Loop Will Not Execute

    I have been a software engineer for a number of years now, and thus far I have never come across any coding issues that truly merit a post such as this. Someone has almost always run across the issue before, so there is no need to reinvent the wheel, or solution as it were.
    However, a number of times I have run across instances where the JRE simply... does not execute parts of my code, and throws no exceptions.
    The sample code is a simple logging application, watered down to the bare minimum for the purposes of this forum:
    public class Log {
    public static void main(String[] args)    {Log log = new Log();}
    public Log() {Logger.log("Hello World");}
    import java.util.*;*
    import java.io.*;
    import java.text.SimpleDateFormat;
    public abstract class Logger {
    private static final int SIZE = 2;
    private static final SimpleDateFormat DAY = new SimpleDateFormat("EEEE");
    private static final String
      DIR = "logs/",
      EXT = ".log",
      FILTER = ".*log\\z",
      DNE = "DNE";
    private static int i,oldest;
    private static long previous = 0;
    private static FileFilter filter = new LogFilter();
    private static FileWriter out;
    private static File file,directory;
    private static File[] list;
    public synchronized static void log(String param) {
      try {
       directory = new File(DIR);
       file = new File(DIR + getDay() + EXT);
       list = directory.listFiles(filter);
       if (file.createNewFile()) {
        readOnly();
        reconcile();
       write(param);
      catch (Exception exception) {}
    private static void write(String param) throws Exception {
      out = new FileWriter(file, true);
      out.write(param);
      out.close();
    private static void readOnly() throws Exception {
      for (i=0;i<list.length;i++) {list.setReadOnly();}
    private static void reconcile() {
    try {
    previous = list[SIZE].lastModified();
    oldest = SIZE;
    for (i=SIZE;i<=0;i--) {
    if (list[i].lastModified() <= previous) {
    previous = list[i].lastModified();
    oldest = i;
    list[oldest].delete();
    catch (Exception exception) {System.out.println("Skipping reconciliation...");}
    private static String getDay() throws Exception {
    return DAY.format(Calendar.getInstance().getTime());
    private static class LogFilter implements FileFilter {
    public LogFilter() {}
    public boolean accept(File param) {
    try {
    if ((param.getName()).matches(FILTER)) {return true;}
    else {return false;}
    catch (Exception exception) {return false;}
    *The problem*:
    Ok, easy visual, this is the "log/" directory as I run the Log.java application repeatedly and iterate the date on my computer as I do so.
    Thursday
    *log/*
    +Thursday.log+
    Friday
    *log/*
    +Thursday.log+
    +Friday.log+
    Saturday
    *log/*
    +Thursday.log+
    +Friday.log+
    +Saturday.log+
    Sunday
    *log/*
    +Friday.log+
    +Saturday.log+
    +Sunday.log+
    Monday
    *log/*
    +Friday.log+
    +Saturday.log+
    +Monday.log+
    This is the point at which I go ???
    Turns out, the JRE skips the execution of my for loop in the *reconcile()* method when the date rolls over to Monday, and from then on it simply deletes the previous day's log instead of the oldest log.
    Why?  Who knows.
    Things I have tried:
    - Using another variable integer for the *readOnly()* method
    - Removing the synchronized keyword from the *log(String param)* method
    - Second call to *directory.listFiles(filter)* and setting *SIZE* to *3* after the old files have been set to read-only
    - Removing the call to *readOnly()*
    - Verified that the call to *readOnly()* does not alter the +modified+ date on the log files
    - Changed Logger.java from a +static+ class to a +local+ class
    Things I cannot do:
    This log application stores privy information about end-users at locations across the country in the event that there are support issues that need to be resolved, and the agreement is that we store this information no more than three days.  Just wanted to make sure, that the hopefully informed respondants to this issue, know that the obvious solution (storing seven day records), is unfortunately not available to me.
    Edited by: Threadstorm on Jan 8, 2009 8:24 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    HA! Most excellent. The last place I would ever look.
    Yes, seems like Java sorts the files in such a way that everything works fine without the loop until Monday rolls over.
    Now I can have a better appreciation for that second set of eyes.
    I use for loops so frequently that I never look at them (though I did stare at this one myself prior to this post, much to my chagrin now) but the subtracting iteration (which I use once in a blue moon) was necessary for the nature of the code.
    But ok, up and running! (whew) was going to be a long day until now.
    To answer your question though, the Logger is static so I don't have to pass it around to dozens and dozens of other modules but rather just include the package on the fly as I develop new modules that need to log information, and I like to write most mundane things myself if I can, that way I have the freedom to modify them at will.
    Thanks again! I'm now a happy camper once more.
    I'm also thankful that I don't have to chalk up another notch on the wall of cases where the JRE behaves magically and truly ignores code which I have definitely run into before. Something about listCellRenderers and the order of calls made to them, or some such and JRE doesn't read one of the lines. It's been a year or two.
    Edited by: Threadstorm on Jan 8, 2009 8:47 AM

  • Need help with advanced applet

    I need help with designing an applet as follows. Can someone give me a basic layout of code and material so i can fill in the rest or at leats give me some hints so i can get started since i am like no good at applets.
    Design and implement an applet that graphically displays the processing
    of a selection sort. Use bars of various heights to represent
    the values being sorted. Display the set of bars after each swap. Put
    a delay in the processing of the sort to give the human observer a
    chance to see how the order of the values changes.
    heres a website that does something similar
    http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

    elasolova wrote:
    i will not help you this time. but if you buy me a candy maybe i can reconsider the issue. :PI suggest an all-day sucker.

  • Offline installation of Adobe Reader & Flash

    We just spent the weekend at work running Windows update, office update and updating Java, Adobe Flash and Adobe Reader on all machines.
    In the interest of not going insane and doing it again ever, I would like to create an auto update script for everything.
    I am working on WSUS for the windows and office updates and have Java sorted, but I cant find any info on doing offline installs for Reader and Flash?
    Can anyone tell me:
    1) Where can I download an offline installation of both Flash & Reader
    2) Where I can find info for command line installation/uninstallation.
    thanks
    DJMc

    Thank you for reply Pat.
    I did see v.10 of Acrobat in Greek but I really need v. 11 to be consistent. I also checked the MUI version of v.11 and it does not have Greek either.
    Did Acrobat stop to support Greek Language?
    Regards,

Maybe you are looking for

  • HT2845 how can I get the scroll function to work on my magic mouse?

    I got my magic mouse to work perfectly with my macs but I also have a work computer which is a windows vista lenovo.  All functions work with the mouse on my pc but the scroll function when I'm in excel which is a big deal for me because I am an acco

  • VGA not working.

    Hello all I'm using a T-60 with the intel 950 integrated graphics.  My VGA port isn't working, and I can't seem to figure out the problem.  I'm trying to connect it to an external monitor.  It worked one day, and failed to work the next.  The funny t

  • ITunes closed with error (-45054)

    Hey, After a recent upgrade, my iTunes crashed after opening with the error "Unknown Error as occured (-45054)" I have unistalled and re-installed it but still now help! Any ideas?

  • Has anyone had any luck exporting to Flash from FC Server?

    We haven't been able to get it to work with any of the third party encoders (Telestream, On2, Adobe) for Flash. If anyone has it working we would love to know how you did it!

  • Asynch controls not executing in parallel

    Can a control or JPD have more then one thread running thru it at a time? The workshop docs states controls can be asynch but test seem to indicate that asynch controls do not really run in parallel. They seem to be serialized (I think). The only exc