Need help writing a toString

I have no idea how to go about writing the toString method for this code. I have to print the array that provides the longest sequence. I would appreciate your help.
Here is the code: import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;
class Grid
    private int [ ][ ] mainGrid;
    public Grid( String file ) throws IOException
        FileReader fr = new FileReader( file );
        Scanner scan = new Scanner( fr );
        ArrayList<ArrayList<Integer>> numR = new ArrayList<ArrayList<Integer>>( );
        while( scan.hasNextLine( ) )
            String line = scan.nextLine( );
            StringTokenizer st = new StringTokenizer ( line );
            String number;
            ArrayList<Integer> numC = new ArrayList<Integer>( );
            while( st.hasMoreTokens( ) )
                number = st.nextToken( );
                int num = Integer.parseInt(number);
                numC.add(num);      
            numR.add( numC );
        int height = numR.size();
        int width = numR.get( 0 ).size();
        mainGrid = new int [height][width];
        for(int i = 0; i < height; i++)
            for( int j = 0; j < width; i++)
                mainGrid [ i ][ j ] = numR.get( i ).get( j );
    private class Position
        private int row;
        private int col;
        public Position( int r, int c )
            r = row;
            c = col;
        public List<Position> getAdjacents( )
            int lowRow = row != 0 ? row - 1 : 0;
            int lowCol = col != 0 ? col - 1 : 0;
            int highRow = row != mainGrid.length - 1 ? row + 1 : mainGrid.length - 1;
            int highCol = col != mainGrid[ 0 ].length - 1 ? col + 1 : mainGrid[ 0 ].length - 1;
            List<Position> result = new ArrayList<Position>( );
            for( int r = lowRow; r <= highRow; r++ )
                for( int c = lowCol; c <= highCol; c++ )
                    if( r != row || c != col )
                        result.add( new Position( r, c ) );
            return result;
        public boolean equals( Object other )
            if( ! ( other instanceof Position ) )
                return false;
            Position rhs = (Position) other;
            return row == rhs.row && col == rhs.col;
        public int getValue( )
            return mainGrid [ row ][ col ];
        public String toString( )
            return "(" + row + "," + col + ")";
    public Position newPosition( int r , int c )
        return new Position( r, c );
    // Public driver
    public List<Position> getSequence( )
         List<Position> sequence = new ArrayList<Position>( );
         for( int r = 0; r < mainGrid.length - 1; r++)
              for( int c = 0; c < mainGrid[ 0 ].length - 1; c++)
                   sequence = getSequence( new Position( r, c ));          
         return sequence;
    // Recursive routine
    private List<Position> getSequence( Position pos )
      List<Position> adj = pos.getAdjacents( );
      if( adj.size( ) == 0)
           List<Position> seq = new ArrayList<Position>( );
           seq.add( pos );
           return seq;
      List<Position> maxSeq = null;
      for( Position p: adj)
           List<Position> currentSeq = getSequence( p );
           if( currentSeq.size( ) < maxSeq.size( ))
                maxSeq = currentSeq;
      maxSeq.add( pos );
      return maxSeq;
    public String toString( )
         StringBuffer sb = new StringBuffer( );
          return new String( sb );
class MaxSubsequence
    public static void main( String [ ] args )
        try
             System.out.println( new Grid( "numbergrid1.txt" ));
        catch( IOException e)
             System.err.println( "Error opening file");
}

Call your getSequence method from the toString
method. This gives you a List. Take a look at the
methods of List to see how you can iterate
over the list. Then look at the StringBuffer/Builder
class and see how you can add those elements (plus
any other formatting and words) to the final string.ok, i think i may be getting it a bit more. I don't need to use a loop at all?
I can just call the getSequence method, use a toArray to return the sequence and append the sequence to the new string?

Similar Messages

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • I need help writing a script that finds the first instance of a paragraph style and then changes it

    I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style.  I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thanks!

    Hi,
    Do you mean first instance of the paragraph style
    - in a chosen story;
    - on some chosen page in every text frames, looking from its top to the bottom;
    - in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
    If story...
    You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
    Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
    so:
    Story.findText()[0].appliedParagraphStyle = Style_1;
    //==> this will change a paraStyle of 1st occurence of story to "Style_1".
    If other cases...
    You would need to be more accurate.
    rgds

  • Need help writing small program!

    Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
    Directions:
    Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.

    class CerealCompare {
        public static void main(String[] args) {
            // your code goes here
    }Hope that helps.
    P.S. Java does not have an if-then-else statement.

  • Need Help Writing Server side to submit form via API

    Hey
    I need help writing a serverside application to submit
    information via API to a separate server.
    I have a client that uses constant contact for email
    campaigns. We want to add to her website a form taht submits the
    information needed to subscribe to her email list, to constant
    contact via API.
    FORM.asp :: (i got this one under control)
    name
    email
    and submits to serverside.asp
    SERVERSIDE.ASP
    In serverside.asp i need to have
    the API URL
    (https://api.constantcontact.com/0.1/API_AddSiteVisitor.jsp)
    username (of the constant contact account)
    password (of the constant contact account)
    name (submited from form.asp)
    email (submitted from form.asp)
    redirect URL (confirm.asp)
    Can anyone help get me going in the right direction?
    i have tried several things i found on the net and just cant
    get anyone to work correctly.
    One main issue i keep having is that if i get it to submit to
    the API url correctly - i get a success code, it doesnt redirect to
    the page i am trying to redirect to.
    ASP or ASP.NET code would be find.
    THANKS
    sam

    > This does require server side programming.
    > if you dont know what that is, then you dont know the
    answer to my question. I
    > know what i need to do - i just dont know HOW to do it.
    If you are submitting a form to a script on a remote server,
    and letting
    that script load content to the browser, YOU have no control
    over what it
    loads UNLESS there is some command you can send it that it
    will understand.
    No amount of ASP on your server is going to change what the
    remote script
    does.
    http://www.constantcontact.com/services/api/index.jsp
    they only allow their customers to see the instructions for
    the API so i
    can't search to see IF there is a redirect you can send with
    the form info.
    But posts on their support board say that there is.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Need help writing a query for following scenario

    Hi all, I need some help writing a query for the following case:
    One Table : My_Table
    Row Count: App 5000
    Columns of Interest: AA and BB
    Scenario: AA contains some names of which BB contains the corresponding ID. Some
    names are appearing more than once with different IDs. For example,
    AA BB
    Dummy 10
    Me 20
    Me 30
    Me 40
    You 70
    Me 50
    Output needed: I need to write a query that will display only all the repeating names with their corresponding IDs excluding all other records.
    I would appreciate any input. Thanks

    Is it possible to have a records with the same values for AA and BB? Are you interested in these rows or do you only care about rows with the same value of AA and different BB?
    With a slight modification of a previous posting you can only select those rows that have distinct values of BB for the same value of AA
    WITH t AS (
    SELECT 'me' aa, 10 bb FROM dual
    UNION ALL
    SELECT 'me' aa, 20 bb FROM dual
    UNION ALL
    SELECT 'you' aa, 30 bb FROM dual
    UNION ALL
    SELECT 'you' aa, 30 bb FROM dual
    SELECT DISTINCT aa, bb
      FROM (SELECT aa, bb, COUNT(DISTINCT bb) OVER(PARTITION BY aa) cnt FROM t)
    WHERE cnt > 1;

  • Need help writing Labview Program!!!!!

    I have a labview project that needs to be finished. I was not the original creator of the program and the guy who created no longer is involved with the project and I am left to finish it. Could you make the final adjustment so I can turn this into my professor and get the final grade. Thanks! Willing to pay! Negeotiable price!!!!!!!!

    Need help completing assignment! Could anyone assist me in this project!
    Attachments:
    dial tone detection.zip ‏1253 KB

  • Need help writing a script

    I am trying to convert my prcess from DTS to SSIS. I am running this report out of SAP and then using Monarch to put into the correct form, then I am using the DTS to put it into the database on the SQL server.  I am able to get all the other info to
    move out having so much trouble here to get the plant number. The issuse is that it is on top on the page and it will change when a new plant is needed.
    Thanks for any help
    I need help wrting a script that will put that 7010 into a cloumn nnamed plant number.

    To convert from DTS packages to SSIS you can just open the DTS package in a new SSIS project (depends on target SSIS version by using SSDT or BIDS).
    The rest is mechanics how the iteration with SAP is done and may be beyond the scope of this forum.
    Arthur
    MyBlog
    Twitter

  • Need help writing a Java rule in PDF Forms

    I have created an invoice for my contractors via "forms", and in turn made each cell either a drop down list or "read only" field so they cannot change the rate of pay, etc.  Here is my issue...My first drop down cell is titled "Job Description".  When the contractor selects one of the 8 dropdown options within the Job Description field, I would like it to automatically fill in the hourly rate that is associated with that particular job description (or skill).  I currently have my "rate" cell as a drop down, and I want to make that a read only, and when you select the A1 position from Job Description, it will populate the "rate" field with the appropriate amount for that A1 rate.  I believe this can be done with writing some Java script, but I have never played with Java and I don't really have the time to teach myself.  If anyone can help with me a quick tutorial, or even the formula I should use, so that I can just plug and play, that would be super helpful.  If this is a time consuming issue, I would be interested in paying someone to do it for me. Thank you!

    Hi George,
    I was able to copy my data over to a fresh document, and now it works just fine....thank you so much for your insight and help!
    I have another question if you have a moment. 
    I am trying to do a simple calculation of start time and end time for my employees.  Do I need to do this via a javascript, and if so, what area in properties of the result field should I copy it to?  for the purpose of the script, the fields are as follows:
    DataField1 = start time
    DataField2 = end time
    DataField3 = total time
    I would like to use the h:MM tt format for my time fields if possible.
    I've attached a link to the file through my dropbox account, and you'll notice that I created three new fields at the top of the invoice just to test the time calculations before i mock up the whole document.
    Dropbox - Contractor Invoice Template (1).pdf
    Any help you can give me would awesome! 
    Thank you!!

  • Need help writing non-gui JMF program

    I need to write a program that will convert a WAV file from a ULAW format to a GSM WAV file format. I first tried this with the Java Sound API and the WAV file format of GSM was not supported so I stumbled across JMF.
    I can use the JMStudio and Export GUI programs that come with JMF to convert the wav file as needed. But now I'm trying to write a batch program (non-gui) to convert the file on the fly.
    First, is this possible. Second, does anyone have any code samples of a batch java program using JMF in batch.
    Thanks,
    Scott

    Not exactly what I was looking for. After 2 days of beating my head against the wall this is what I got to work. Include the jmf.jar in my project. Here is my code.
    import java.io.IOException;
    import javax.media.DataSink;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSourceException;
    import javax.media.Processor;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.FileTypeDescriptor;
    import jmapps.util.StateHelper;
    public class TestAudio5 {
         public static void main(String[] args) {
              try {
                   Processor p = null;
                   StateHelper sh = null;
                   DataSource inSource = Manager.createDataSource(
                             new MediaLocator("file:c:\\ASSURANCE_THREE_MINUTE.wav"));
                   p = Manager.createProcessor(inSource);
                   sh = new StateHelper(p);
    //               Configure the processor
                   if (!sh.configure(10000)) {
                             System.out.println("can't configure");
                        System.exit(-1);
                   p.setContentDescriptor(new
                                       FileTypeDescriptor(FileTypeDescriptor.WAVE));
                   //AudioFormat(java.lang.String encoding, double sampleRate, int sampleSizeInBits, int channels)
                   //AudioFormat(
                   //          java.lang.String encoding,
                   //          double sampleRate,
                   //          int sampleSizeInBits,
                   //          int channels,
                   //          int endian,
                   //          int signed,
                   //          int frameSizeInBits,
                   //          double frameRate,
                   //          java.lang.Class dataType)
                   AudioFormat outputFormat = new javax.media.format.AudioFormat(
                                            AudioFormat.GSM_MS,
                                            8000.0,
                                            0,
                                            1,
                                            0,
                                            1,
                                            520,
                                            1625.0,
                                            null);
                   System.out.println("outputFormat: " + outputFormat.toString());
                   TrackControl tc[] = p.getTrackControls();
                   for ( int i = 0; i < tc.length; i++ ) {
                        tc.setEnabled(true);
                        System.out.println("before format: " + tc[i].getFormat().toString());
                        tc[i].setFormat(outputFormat);
                        System.out.println("after format: " + tc[i].getFormat().toString());
                   if (!sh.realize(10000)) {
                                       System.out.println("can't realize");
                                       System.exit(-1);
                   // get the output of the processor
                   DataSource source = p.getDataOutput();
                   // create a File protocol MediaLocator with the location
                   // of the file to which bits are to be written
                   MediaLocator dest = new MediaLocator("file://c:\\test.wav");
                   // create a datasink to do the file writing & open the
                   // sink to make sure we can write to it.
                   DataSink filewriter = null;
                   filewriter = Manager.createDataSink(source, dest);
                   filewriter.open();
                   // now start the filewriter and processor
                   filewriter.start();
                   sh.playToEndOfMedia(5000);
                   sh.close();
                   filewriter.close();
              } catch (NoDataSourceException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              catch (Exception e) {
                             // TODO Auto-generated catch block
                   e.printStackTrace();
              System.out.println("done!");
              System.exit(-1);

  • Need help writing formula to count checked boxes

    This is probably a no brainer for you experts but I am making a spreadsheet for scoring a test and I have put in check boxes. Beside in the adjacent cells to the cells with check boxes I have placed the values that correspond to those check boxes. I want to be able to format a cell to do several things.
    First I need to link the adjacent values to the check box cell that it corresponds to.
    Then I need to format a cell to
    1. Count the number of boxes that have been checked.
    2. Display the values that are linked to cells if the total is 10 or under
    3. Display text that relates to the values that are linked to the cells.
    Your help is greatly appreciated.
    Shane

    The Pickler wrote:
    In answer to your first question. Each question is multiple choice and my layout is chosen to mimick the test itself for easy scoring.
    So I take this to mean that it is only valid to have one check per row.
    Second, if there are more than 10 I want it left blank.
    Right now, it is simpler to have this behave the the other way, in that it eliminates a complicating special case.
    So here's a screen shot of what I have on this:
    !http://img227.imageshack.us/img227/6263/questionairesummarywo1.png!
    Let me discuss this and explain some of the changes I made to your initial attempt.
    (1) Since I presumed one check per row, you can see in the "Responses" table I switched over to this type of data entry. This has several advantages and, most importantly, was key in clarifying my thoughts downstream. It does not permit the invalid multi-check per row and can be more readily entered via keyboard. The use of A,B,C,D for the choices is arbitrary; they could be 1,2,3,4 or any other distinct set of 4. If you ever want to simultaneously evaluate several questionnaires this can be accommodated better by adding additional columns to this table.
    (2) The references associated with each question's choices are encoded in the "Key" table. This table can be squirreled away on another sheet dedicated to questionnaire configuration and remain out of harm's way while entering response data. The column headings must correspond with the answer designations used in the "Responses" table.
    (3) The "Tally" table is purely for the computation of the "Summary". It allows both the number of each type of reference to be computed and the listing of the references. Since it is purely computational, it should be hidden away on another sheet.
    (4) The "Descriptions" table is where the association of references and the statements is expressed. Since, like the "Key" table, it is likely edited infrequently, this too should be squirreled away on the questionnaire configuration sheet.
    (5) Finally, the "Summary" table display the counts of each reference type and zero to ten of the references and associated statements. Currently, this shows as many as the first 10 because, as stated above, it avoids a complicating special case and is displayed elegantly via this filtered table (which avoid displaying the unused reference rows). The count is always the total count, even if it is exceeds ten.
    Third, since I don't know the first thing about writing formula's I guess I need to have you hold my hand through this process or teach me some basics. Please.....if your kind and willing enough to do so.
    As there are more than a couple of formulas here, the least time consuming way to explain them is simply to upload this Numbers document to a place you (or anyone else who is interested) can download it. Explore it for yourself and feel free to ask any questions you have about it or how to modify it to better suite your needs.
    You will find that the file contains three sheets. What is presented here resides solely on the third sheet. The first two sheets can safely be ignored/deleted, but I have left them in as they represent two earlier attempts (the first only partial, the second, more complete) at a solution. Some may find them interesting, perhaps containing good techniques for other problems.
    [Questionnaire Summary Numbers Document|http://www.mediafire.com/?1125t9nm9xm|Click to download a zip archive]
    This will take you to a page that will allow you to download the file directly (I apologize for any of this free hosting site's advertisements that you might find offensive). Click on the link in the yellow region on the mid-left part of the page. If all goes well, the zip will download and automatically unarchive into the Numbers document "QuestionnaireSummary.numbers". Let me know if you have trouble.

  • Need help writing to file

    I have an ArrayList of XML strings. I am trying to write the XML strings in the arraylist to a text file. However, the only XML string that I see in the file is the first string repeated over and over. It is the only one getting to the file for some reason. I have tried the code below:
        public void writeToLogFile(String logFile, String msg) {
                try{   
                    FileWriter WriteFile = new FileWriter(logFile, true);  
                    BufferedWriter WriteBuff = new BufferedWriter(WriteFile); 
                    WriteBuff.write(msg+"\r\n");
                    WriteBuff.close(); 
                    WriteFile.close(); 
                }catch(IOException e) {
                    System.out.println("Error writing to file.");
    //        try {
    //            FileWriter fw = new FileWriter(logFile,true);
    //            PrintWriter pw = new PrintWriter(fw);
    //            pw.println(msg);
    //            pw.close();
    //        }catch(IOException ioExc) {
    //            System.out.println("error writing file");
        }  I tried the commented out code also. I've also tried using PrintStream. They all seem to give me the same result. My first thought was maybe I'm sending the same string to the method over and over but I'm not. If I loop through my arraylist of XML strings and do a System.out.println() instead of writing to file, I see that I am sending in different XML strings.
    Here's how I'm looping through the arraylist of XML strings call "al":
                for(int i=0; i<FileValues.length; i++) {
                    al = adapter.executeQuery(FileValues[0]);
    System.out.println("Writing to output file...");
    for(int x=0; x<=al.size()-1; x++) {
    //System.out.println(al.get(x).toString());
    test.writeToLogFile("c:/temp/a/limAdapterOutput", al.get(i).toString());
    System.out.println("Finished writing to output file.");
    What I'm doing is reading an arraylist (FileValues) of query parameters. For each parameter, I am querying a database based on the parameter and returning an arraylist of XML strings containing the query result. For each paramter, I'm returning about 1200 XML strings in the arraylist. Then I try to loop through the arraylist and write the XML strings to a file. However, this is when I run into my problem.
    Any ideas what's going on and how I can correct the problem? Thanks.

    for(int i=0; i<FileValues.length; i++) {
    al =
    al =
    al = adapter.executeQuery(FileValues[0]);
    System.out.println("Writing to output
    iting to output file...");
    for(int x=0; x<=al.size()-1; x++) {
    //System.out.println(al.get(x).toString());
    test.writeToLogFile("c:/temp/a/limAdapterOutput",
    ut", al.get(i).toString());
    System.out.println("Finished writing
    inished writing to output file.");
    When you write to the log file in the inner loop, it sounds like you want to use the x loop counter, not the i counter from the outer loop.  You comment out the print to System.out, which uses the x loop counter.  Why don't you do the same thing in the uncommented code?  Hard to follow exactly what you're doing, but maybe that will fix it.

  • Need help writing Performance Management Report

    Hi Experts
    I need some help retrieving specific Performance Management data for a report.
    I have the employee pernr.
    1. From this I need to determine which teams the employee belonged to for the period 1 Oct - 31 Sept.
    2. What was the total performance score for the TEAM for that same period.
    Can someone please help me out. The table data seems to be quite complex.
    Thannks in advance
    Anton Kruse
    Moderator Message: Specs-dumping is not allowed. Please get back if you have a specific question
    Edited by: kishan P on Mar 7, 2012 5:10 PM

    Hi Arnold,
    I think the solution provided by Vadim is the only way and it's working.
    Shrikant

  • Need help writing client for WSE 1.0 Web Service

    Hello all,
    I am attempting to write Java clients against a .Net service that uses WSE 1.0. I can't seem to get any of toolkits I have tried to work with this service. Unfounately, I do not own the service, so I cannot upgrade it to WSE 2.0. The problem seems to be that the WSE 1.0 expects namespaces from the July 2002 version of WS-Security, while all the libraries I have tried (JWSDP, Oracle Web Service Wizard, etc) use the oasis namepsace from January 2004.
    Can he one suggest an alternative? Is there a way to set the namespace sent in XWS-Security? I think this might solve the problem...
    Thanks,
    KS

    Hi,
    firstly JWSDP 1.5 is pretty old, the latest release of JWSDP is JWSDP 2.0 that happened late last year.
    The problem is most likely happening due to a bug in JWSDP 1.5. If you dump the Message that is going over the wire you will probably see
    SOAPAction : ""
    SOAPAction : "<the correct action value>"
    And this is the reason for the failure. I believe you are using SOAP 1.1 messages right ?
    What you will need to do is upgrade to
    JWSDP 2.0 and more important also upgrade your SAAJ jars in the JWSDP installation to SAAJ 1.3
    https://saaj.dev.java.net/files/documents/52/32730/saaj1.3.zip
    Alternatively, you can use Sun's Project Tango (Sun's Next Generation WebServices Interoperability Technology Offering) which has been tested to interoperate with Microsoft WCF.
    http://java.sun.com/developer/technicalArticles/glassfish/ProjectTango/
    You can download Project Tango by visiting the following page :
    https://wsit.dev.java.net/
    Look at the Try It section for instructions on how to use it.
    Using the Netbeans Plugin you can develop a java client which can securely communicate with the .Net WebService. All you need to do for that is use Netbeans to create a Java WebService Client by pointing it to the WSDL of the .Net Service.
    Let us know if this helped.
    Thanks...
    Message was edited by:
    kumar_at_sun

  • Need help writing a script to delete a folder to run at startup

    I have no experience with this and need full assistance to set this up.
    I am hoping to write a script which can be run at startup on a single client machine which is giving me font trouble. Our client machines are network controlled by our server and have multiple users all in the Server user database.
    The fonts are behaving badly until we trash this folder HD>Library>Caches>com.apple.ATS
    On restart the fonts behave as expected.
    Can someone help me write a script or give me a command I can insert in a crontab with Cronnix to delete this folder at startup?
    Thanks

    They both work fine (read that as: it can be added into either place) While that message in crontab seems to intimate that Apple will do something drastic like disable or make it hard to run cron I cannot see how, cron has been in all *nix's since the beginning so to remove it would anger quite a few people...
    Having said that, If you want to make a launchd item you would put the below into /Library/LaunchDaemons/ create a file (call it someting memorable like 'Delete_com.apple.ATS') put this into it:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>Delete com.apple.ATS</string>
    <key>ProgramArguments</key>
    <array>
    <string>rm</string>
    <string>-rf</string>
    <string>/Library/Caches/com.apple.ATS</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
    and finally load it...
    PowerMac G5 DP 2.5Ghz   Mac OS X (10.4.3)  

Maybe you are looking for

  • Nervous setting up my new PB (Am I doing something wrong HELP)

    Sigh....I've been a mac user for a long time so I know I shouldn't be panicking but it's been a while since I've had to set up a computer from scratch. (This ol' mac lasted me 8 years!) Plugged in my spankin' new pb and saw the step up assistant and

  • Documents in XML DB and Text

    Hi I want to use XML DB to store files(documents) and no XML. Is there a way to use Oracle Text with it? Regards, Learco

  • Restrict GRR if order acknowldgment in the PO is blank

    Dear All, In our case we do not use confirmation control key but using Order acknowldgment key for the sake of vendor order confirmation. We would like to restrict the GRR ( MIGO ) if there is no order confirmation recd by the vendor.... I can not us

  • Flat file missing in datasource

    Hello iam loading the flatfile record into the infocube in this process while iam creating datasource after naming the data source i need to select flat file option for source file field  but flat file option is missing.how to solve this problem.i th

  • (Sysdate-1) in filename using scheduler and ftp

    Hello, I'm having a little problem with BI Publisher. What i am trying to do is use the sysdate-1 in the filename when using the scheduler in BIP. I found out that for using the regular date there are functions like %d %m %y, so obviously the first t