JTABLE INPUT AND OUTPUT...ALMOST WORKING! PLZ HELP!

Here's my program. Please try it out for yourself first, PLEASE. And do the following when you run it:
1) Click the modify entries button (the table displays perfectly).
3) Click the back button.
4) Click the modify entries button AGAIN.
5) WHY WON'T THE TABLE SHOW UP?
PLEASE HELP MY CPT IS DUE TOMORROW!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.util.*;
import java.io.*;
public class CPT extends JPanel implements ActionListener
    JButton ModifyEntriesButton, ViewEntriesButton, SearchEntriesButton, SaveButton, BackButton, AddRowButton;
    JLabel SplashLabel;
    JTable contentTable;
    String aLine;
    Vector columnNames = new Vector ();
    Vector data = new Vector ();
    DefaultTableModel model = new DefaultTableModel (data, columnNames);
    public void createTable ()
        try
            FileInputStream fileInput = new FileInputStream ("entries.data");
            BufferedReader DBInput = new BufferedReader (new InputStreamReader (fileInput));
            StringTokenizer st1 = new StringTokenizer (DBInput.readLine (), "|");
            while (st1.hasMoreTokens ())
                columnNames.addElement (st1.nextToken ());
            while ((aLine = DBInput.readLine ()) != null)
                StringTokenizer st2 = new StringTokenizer (aLine, "|");
                Vector row = new Vector ();
                while (st2.hasMoreTokens ())
                    row.addElement (st2.nextToken ());
                data.addElement (row);
            DBInput.close ();
        catch (Exception e)
            e.printStackTrace ();
    public CPT ()
        setLayout (null);
        ImageIcon splashimage = createImageIcon ("logo.JPG", "Swisha Computer House");
        SplashLabel = new JLabel ("Image and Text", splashimage, JLabel.CENTER);
        ModifyEntriesButton = new JButton ("Modify Entries");
        ModifyEntriesButton.setVerticalTextPosition (AbstractButton.TOP);
        ModifyEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
        ModifyEntriesButton.setToolTipText ("Click this button to modify database entries.");
        ModifyEntriesButton.setMnemonic (KeyEvent.VK_M);
        ModifyEntriesButton.setActionCommand ("ModifyEntries");
        ModifyEntriesButton.addActionListener (this);
        ViewEntriesButton = new JButton ("View Entries");
        ViewEntriesButton.setVerticalTextPosition (AbstractButton.CENTER);
        ViewEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
        ViewEntriesButton.setToolTipText ("Click this button to add view all database entries.");
        ViewEntriesButton.setMnemonic (KeyEvent.VK_V);
        ViewEntriesButton.setActionCommand ("ViewEntries");
        ViewEntriesButton.addActionListener (this);
        SearchEntriesButton = new JButton ("Search Entries");
        SearchEntriesButton.setVerticalTextPosition (AbstractButton.BOTTOM);
        SearchEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
        SearchEntriesButton.setToolTipText ("Click this button to search through all database entries.");
        SearchEntriesButton.setMnemonic (KeyEvent.VK_S);
        SearchEntriesButton.setActionCommand ("SearchEntries");
        SearchEntriesButton.addActionListener (this);
        SaveButton = new JButton ("Save");
        SaveButton.setVerticalTextPosition (AbstractButton.TOP);
        SaveButton.setHorizontalTextPosition (AbstractButton.RIGHT);
        SaveButton.setToolTipText ("Click this button to save database entries.");
        SaveButton.setMnemonic (KeyEvent.VK_S);
        SaveButton.setActionCommand ("Save");
        SaveButton.addActionListener (this);
        BackButton = new JButton ("Back");
        BackButton.setVerticalTextPosition (AbstractButton.BOTTOM);
        BackButton.setHorizontalTextPosition (AbstractButton.RIGHT);
        BackButton.setToolTipText ("Click this button to return to the main menu.");
        BackButton.setMnemonic (KeyEvent.VK_B);
        BackButton.setActionCommand ("Back");
        BackButton.addActionListener (this);
        AddRowButton = new JButton ("Add Row");
        AddRowButton.setVerticalTextPosition (AbstractButton.BOTTOM);
        AddRowButton.setHorizontalTextPosition (AbstractButton.RIGHT);
        AddRowButton.setToolTipText ("Click this button to add a row.");
        AddRowButton.setMnemonic (KeyEvent.VK_A);
        AddRowButton.setActionCommand ("AddRow");
        AddRowButton.addActionListener (this);
        SplashLabel.setSize (250, 195);
        SplashLabel.setLocation (20, -25);
        add (SplashLabel);
        ModifyEntriesButton.setSize (250, 30);
        ModifyEntriesButton.setLocation (20, 140);
        add (ModifyEntriesButton);
        ViewEntriesButton.setSize (250, 30);
        ViewEntriesButton.setLocation (20, 170);
        add (ViewEntriesButton);
        SearchEntriesButton.setSize (250, 30);
        SearchEntriesButton.setLocation (20, 200);
        add (SearchEntriesButton);
    public void actionPerformed (ActionEvent e)
        if ("ModifyEntries".equals (e.getActionCommand ()))
            removeAll ();
            createTable ();
            JTable modifyTable = new JTable (model);
            JScrollPane tableScroll = new JScrollPane (modifyTable);
            tableScroll.setSize (250, 120);
            tableScroll.setLocation (20, 20);
            add (tableScroll);
            AddRowButton.setSize (250, 30);
            AddRowButton.setLocation (20, 140);
            add (AddRowButton);
            SaveButton.setSize (250, 30);
            SaveButton.setLocation (20, 170);
            add (SaveButton);
            BackButton.setSize (250, 30);
            BackButton.setLocation (20, 200);
            add (BackButton);
            updateUI ();
        if ("ViewEntries".equals (e.getActionCommand ()))
            removeAll ();
            BackButton.setLocation (20, 200);
            add (BackButton);
            updateUI ();
        if ("SearchEntries".equals (e.getActionCommand ()))
            removeAll ();
            BackButton.setLocation (20, 200);
            add (BackButton);
            updateUI ();
        if ("Back".equals (e.getActionCommand ()))
            removeAll ();
            add (ModifyEntriesButton);
            add (ViewEntriesButton);
            add (SearchEntriesButton);
            add (SplashLabel);
            updateUI ();
        if ("AddRow".equals (e.getActionCommand ()))
            model.addRow (new Vector ());
        if ("Save".equals (e.getActionCommand ()))
    // Creates the GUI and shows it.
    // For thread safety, this method should be invoked from the event-dispatching thread.
    private static void createAndShowGUI ()
        //Window decorations.
        JFrame.setDefaultLookAndFeelDecorated (true);
        //Create and set up the window.
        JFrame frame = new JFrame ("Swisha Computer House");
        frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
        frame.setResizable (false);
        //Create and set up the content pane.
        JComponent newContentPane = new CPT ();
        newContentPane.setOpaque (true); //Content panes must be opaque.
        frame.setContentPane (newContentPane);
        //Displays the window.
        frame.pack ();
        frame.setSize (300, 280);
        frame.setVisible (true);
    //Returns either an image icon or null if the path was invalid.
    protected static ImageIcon createImageIcon (String path, String description)
        java.net.URL imgURL = CPT.class.getResource (path);
        if (imgURL != null)
            return new ImageIcon (imgURL, description);
        else
            System.err.println ("Couldn't find file: " + path);
            return null;
    public static void main (String[] args)
        //Schedules a job for the event-dispatching thread.
        //Creates and shows this application's GUI.
        javax.swing.SwingUtilities.invokeLater (new Runnable ()
            public void run ()
                createAndShowGUI ();
}

actually, i got around it by doing the following:
try
            PrintWriter out2 = new PrintWriter (new FileWriter ("entries.dat"));
            out2.print ("Item Number|Description|Price|");
            out2.println ();
            for (int j = 0 ; j < rows ; j++)
                for (int k = 0 ; k < columns ; k++)
                    String value = (String) modifyTable.getValueAt (j, k);
                    out2.print (value);
                    out2.print ("|");
                out2.println ();
            out2.close ();
        catch (IOException ee)
            throw new RuntimeException (ee);
        }so...again, i havent found the code to do it? oh camickr.
p.s. hell no im not giving u the honour of basking your name beside mine on a sheet of paper.
the hard part was implementing all this code into the overall program, using my layout which you hate so much for adding and removing components. and i pursued this method because i knew how much youd hate it. yes....heh...yes....
good game. i win.

Similar Messages

  • Hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

    hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

    How and why did you install that?  What steps did you take in that process.  I can then help with some steps to undo them. 

  • Pass these documents a object ID, application and output type..plz help

    Hi frnds,
       To select all the billing documents from from the document flow table i have
    this peice of code----
    SELECT VBELN FROM VBFA INTO CORRESPONDING FIELDS OF TABLE IT_VBFA
             FOR ALL ENTRIES IN ITAB_VBAK WHERE VBELN = ITAB_VBAK-VBELN
                                          AND VBTYP_N = 'C' OR VBTYP_N = 'G'.
    i want to ---Pad two zerou2019s before the document and pass these documents a object ID,
    application and output type.
    Get the object ID, processing status for each billing document number and
    display in the pop up window for the user.
    i hope to use in NAST TABLE.
    how to code this...
    thnx
    daniel
    <LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Aug 18, 2008 1:14 PM

    Use
    declare the field b_vbeln of length u want adding length for 2 '0' also.
    ex:- Vbeln length = 10
           b_vbeln  type i length 12.
    b_vbeln = vbeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = b_vbeln
    IMPORTING
    OUTPUT = b_vbeln.
    U will get b_vbeln with 2 '0' or always the value be of 12 length.

  • Sound input and output not working

    Last night my audio was working fine. I was going to record some stuff in garage band and had a microphone plugged into the input line-in on my macbook. everything was working fine still, turned on the "auto leveling" and then put in my headphones. i then turned on the "monitor" to get the sound to actually come to my headphones. I didnt realize until after it was done but you cant have the auto level and monitor on at the same time. There was a short blast of sound in the headphones and then everything cut out. I couldnt get sound from anything, headphones, built in speakers. No sound going in either.
    I restarted my computer and if I remember correctly (maybe i'm imagining it) there was the start up chime. when I started up garageband again I got an error message reading "selected driver not found. error 10202" still no sound input or output. When trying to adjust the volume all I got was the grayed out volume thing with the little cross thingy at the bottom. I checked the sound settings and there was nothing in the input or output sound.
    I did some searching around and saw people with similar problems (none with an answer).
    This is what I've already tried:
    I reset the permissions
    I reset the PRAM
    I did a hardware check (hold d which restarting) i even did the hour long check and there was no problems.
    I tried putting headphones in an out (there was no red light in the headphone jack)
    I updated all my software (there was an update to OS X to 10.5.8)
    After the update there was no longer a startup chime, and i got no error messages when opening garage band. however there was still no input or output sound. when adjusting the volume on the screen it appears to be normal, but there is still no sound from built in speakers or headphones. I did notice there was a very faint "clicking" noise when i try and adjust the volume... like the speakers are getting power or something... but then nothing comes out. In the sound settings there everything appears to be back to normal.
    I know this is long, but I wanted to be thorough in describing my problem. I'm posting this on several boards as well.

    I'm having the exact same problem. I did install the newest version of Skype the last time my computer was running (with sound)... so not sure if the new Skype had something to do with it.
    Also, when I try to change volume with the keyboard keys, there is a little icon (circle with slash) indicating that the sound has been disabled or not allowed to be changed.
    I can't find any answers on any forums.

  • Different family class used for input  and output when working with sockets

    I have seen more or less everywhere the following code to open a socket and to receive input and send output through it:
    Socket server = new Socket("anyservername", 25):
    OutputStream out = server.getOutputStream();
    PrintWriter pout = new PrintWriter (out, true);
    pout.println("Hello");
    InputStream in = server.getInputStream();
    BufferedReader bin = new BufferedReader (new InputStreamReader(in));
    String response = bin.readLine();
    What I do not understand is:
    Why the BufferedReader needs InputStreamReader as an argument whereas printwriter does not want the OutputStreamReader as an argument but it is OK with just the OutPutStream?
    I would tend to believe that they should be more or less at the same level and use the same arguments?.
    In that sense if I use BufferWriter instead of PrintWriter I bet It should be OK the following code?:
    OutputStream out = server.getOutputStream();
    BufferedWriter bout = new BufferedWriter (out);
    String myOut = bout.writeLine();
    Cheers
    Umbi
    Edited by: Imbu on Jun 2, 2008 2:40 PM

    1. Does it even compile?
    2. While there is a fair amount of symmetry between reader and writer classes, don't assume it's exhaustive. Your best friend is the API:
    [http://java.sun.com/javase/6/docs/api/]
    3. Those were just examples. Code it the way you feel is best. I would specify charsets to make sure the encodings were platform independent. Networking and all that, don't you know...

  • Tiger to Leopard transition- user name and password not working. plz help!

    Hi all. Last year I purchased a MacBook Pro with Tiger OSX. Anyways I wanted to switch to leopard, so I did. Now when I want to install updates, as usual it requires my user name and password. But after I installed leopard, my old user name and password does not work (my login name does not even show up in the box anymore). I can not install any new software on my computer because of this so called "new password." Any assistance would be greatly appreciated because this is very frustrating since I just purchased an iPhone and I can't sync it because I need the new version of itunes.

    can you log in at all as another user? if not activate root and log in as root using [these instructions|http://support.apple.com/kb/TS1278]. then look in the /Users folder at the top level of the hard drive. do you see the home directory with your old username there? post back with what you find.

  • Input and output audio not working and no startup chime

    The audio, both input and output, on my MacBook Pro has stopped working as well as the startup chime. Otherwise the computer starts up and seems to be working normally. Any ideas as to what the problem is and solutions?  

    Hey, my MacBook Pro has been doing the EXACT same thing off and on for a few weeks now.
    I'm just now having time to browse the forums, so I've not even asked about it.
    Yesterday it all started working normally - all sounds.
    I'll follow this discussion for sure.
    There definitely seems to be enough 'Mac-Daddy' Mac Helpers on here to be able to easily resolve this issue.
    i.e.: Andreas!  Just reading her stuff lets me know she REALLY knows what she's talking about & is able to explain the highly advanced info in terms people actually get!
    Thanks for asking that question!
    ~dOiTdiGiTaL~

  • I have a 2007 iMac connected via WiFi. It has been working fine until I turned it on after a recent vacation. Network preferences indicates that it is correctly connected to my WiFI system but the data input and output rate is virtually zero. I know that

    I have a 2007 iMac connected via WiFi. It has been working fine until I turned it on after a recent vacation. Network Preferences indicates that it is correctly connected to my WiFI system but the data input and output rate is virtually zero. I know that the WiFI signal is reaching the iMac since both my iPhone and iPad are working perfectly at that location. I have rebooted the router and the iMac to no avail. Any suggestions would be greatly appreciated. Thank you very much. Geoff

    Hi Geoff,
    Hi, this has worked for a few...
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    10.4 instructions...
    Is that Interface dragged to the top of Network>Show:>Network Port Configurations.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    Click OK.

  • How can I use a different driver for audio input and output?

    I did a search of course, and came up with something about an aggregate. I have no idea what this is, how to do it, or if it would even work for me.
    What I am trying to do is:
    1) Record into Logic Express using my Tascam US-122.
    2) Have playback come out of my computer sound system, not the Tascam.
    If I go over to the Audio setup window, I can only record when the driver is set to Tascam US-122. Likewise, I can only listen to sound when my Built-In Audio is selected. It gets rather annoying going between the two.
    So, would this aggregate thing solve my problem? If so, how do I do it? Thanks for any help!
    -allen

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • How can I make Apple Earphones be the Input and Output for Audio

    I have some older headphones and they aren't compatible with a Mid 2010 (Intel Core i3) 21.5 Inch iMac
    Is there some way to make Apple Earphones be the Input and Output for Audio in the iMac
    This is a problem for me personally as when I am talking to someone on Skype the iMac picks up the In-built Microphone audio, and yes the headphones I'm using do work straight from the iMac as audio output
    Any help is appreciated

    you can connect the headset to something like this
    http://www.ebay.com/itm/NEW-MaelineA-3-5mm-Female-to-2-Male-Gold-Plated-Headphon e-Mic-Audio-Y-Splitter-/381100440348
    and then connect the mic to the input and the headset to the headset port

  • FINALLY INPUTTING and OUTPUTTING Annotations!

    Ok, before everyone thinks that this is a very bad solution, I have to tell that I`m no programmer and my knowledge of PostgreSQL, Ruby or any other language is very poor.
    With useful help from Jamie Hodge, fbm and Nicholas Stokes (mainly)
    I could manage to write a command for inputting and outputting from Final Cut Server Annotations.
    So lets go to the fun part:
    INPUTTING:
    1- Create a Response called "Annotations IN" (or whatever you want):
    a - Reponse Action: "Run an external script or command"
    b - Run Script > *Commnad Path: /Library/Application Support/Final Cut Server/Final Cut Server.bundle/Contents/Resources/sbin/fcsvr_run
    Command Parameters: psql px pxdb -c "COPY pxtcmdvalue FROM '/FCSRV/annotation-in.txt' USING DELIMITERS '|';"
    2 - Create a poll Watcher with name: "Watch for Annotations IN"
    a - Enable: true
    b - Monitor Address: Chooses a Device (create a new one or use a tmp one) and path to where you`ll going to put a txt file with the annotations.
    c - Response List: Choose the Response you created "Annotations IN" in my case.
    d - Event Type Filter: Created, Modified
    e - Poll Watcher > Listing Frequency: 2 (or any number of seconds you feel like it).
    Listing multiple: 2
    Wildcard include Filter: *.txt (or any custom extensions you want)
    3 - Create a txt file and use this as a template:
    {ASSET_ENTITYID}|1527|{TCIN}/(30000,1001)|{TCOUT}/(30000,1001)|{Annotation}|{USE RID}|{DATE}
    Where:
    {ASSET_ENTITYID} = Is the entityid of your asset. You can find what number it is by issuing:
    /Library/Application\ Support/Final\ Cut\ Server/Final\ Cut\ Server.bundle/Contents/Resources/sbin/fcsvr_run psql px pxdb -c "SELECT pxmdvalue.entityid, pxmdvalue.value AS asset_name FROM pxmdvalue INNER JOIN pxentity ON pxentity.entityid = pxmdvalue.entityid WHERE pxmdvalue.fieldid='1543' AND pxentity.address LIKE '/asset/%';"
    This will output ALL your assets, so if you know the name or want to parse the name you can use:
    /Library/Application\ Support/Final\ Cut\ Server/Final\ Cut\ Server.bundle/Contents/Resources/sbin/fcsvr_run psql px pxdb -c "SELECT pxmdvalue.entityid, pxmdvalue.value AS asset_name FROM pxmdvalue INNER JOIN pxentity ON pxentity.entityid = pxmdvalue.entityid WHERE pxmdvalue.fieldid='1543' AND pxmdvalue.value='ASSETNAME' AND pxentity.address LIKE '/asset/%';"
    Where in ASSETNAME you`ll have to put your Asset Name without extension.
    {TCIN} and {TCOUT} is, of course, the TC`s points. In the form of: HH:MM:SS;FF
    {Annotation} is the commentary.
    {USERID} (in my case was 1)
    {DATE}: This one is tricky. My example is 2009-03-15 19:31:15.839795-03
    So is in the form YYYY-MM-DD HH:MM:SS.????? I really don`t know the rest. Could be milliseconds?
    Of course one can write a script to translate everything from a txt file like:
    ASSETNAME | TCIN | TCOUT | ANNOTATIONS | USER
    But as I`ve said I`m no programmer
    Ok.. now the time for the OUTPUT:
    The command-line is:
    /Library/Application\ Support/Final\ Cut\ Server/Final\ Cut\ Server.bundle/Contents/Resources/sbin/fcsvr_run psql px pxdb -c "SELECT pxmdvalue.value AS Asset_NAME, pxtcmdvalue.value, pxtcmdvalue.begintc, pxtcmdvalue.endtc FROM pxmdvalue INNER JOIN pxtcmdvalue ON pxmdvalue.entityid = pxtcmdvalue.entityid WHERE pxmdvalue.value='ASSETNAME';"
    Where ASSETNAME is the Asset name without the extension.
    Or issuing the following to OUTPUT ANNOTATIONS from ALL assets:
    /Library/Application\ Support/Final\ Cut\ Server/Final\ Cut\ Server.bundle/Contents/Resources/sbin/fcsvr_run psql px pxdb -c "select * from pxtcmdvalue;"
    Adding "> /PATHTO_WHERE_IN_WANT/ANNOTATIONSOUTPUT.TXT" at the end will put all output into a txt file.
    It`s possible (in theory) to:
    1- Create a boolean md field in FCSRV called "EXPORT Annotations" (don`t choose lookup)
    2- add or create a md group called "Export Annotations" and add the above md field to it (don`t choose lookup)
    3- Add "Export Annotations" md field to Asset Filter md group
    4- Make a Response for Running external command. Command path: /Library/Application Support/Final Cut Server/Final Cut Server.bundle/Contents/Resources/sbin/fcsvr_run
    Command Parameters: psql px pxdb -c 'SELECT pxmdvalue.value AS Asset_NAME, pxtcmdvalue.value, pxtcmdvalue.begintc, pxtcmdvalue.endtc FROM pxmdvalue INNER JOIN pxtcmdvalue ON pxmdvalue.entityid = pxtcmdvalue.entityid WHERE pxmdvalue.value=[FileName];' > ~/Desktop/ann-out.txt
    (I`m having problem with this, it doesn`t work).
    5- Make a Subscription that if Export Annotations modified = true, trigger if changed and trigger the Response above.
    6- Add exporting annotations md group to Media md set.
    In theory it`s possible to modify the FinalCutServerIntegrationSample get and input annotations instead of adding another "comment" field to md group list.
    Few!
    Ok so please help beautify this out!
    This will be very useful for a lot of people.... We know that it`s only a matter of time to FCSVR have this function built-in... but this "time" could be years.
    So let`s start ourselves!
    Thank you very much!!
    Regards!

    AlphaBlue wrote:
    jverd wrote:
    What were you hoping for? Someone reading your mind for what exactly you need, and handing you a giftwrapped answer, without you doing any work or clearly communicating a specific problem? This site doesn't really work that way.Fair enough. I'm asking for insight into how to input from and output to a StarOffice Spreadsheet into/from a Java program. (Think java.io except with spreadsheet files instead of .txt files.) I already answered that question.
    I need to accomplish this without the use of a community-created library.That's a bizarre requriement. Why?
    >
    Okay, [here you go|http://lmgtfy.com/?q=communication+between+StarOffice+Spreadsheets+and+Java].
    If you don't have any knowledge or experience, on the matter, please refrain from directing me to a google search. I assure you, I have already performed such a task.How would I know that.
    But okay, let's say I know that. Let's say you bothered to point out that you've already done that. Further, let's say I do have knowledge of the subject at hand. Maybe I'm an expert. Maybe I wrote Star Office and an open source library (which wheel for some reason you must reinvent). You are assuming that I also have psychic powers, so that I can read your mind and know exactly what you've read so far and exactly what parts of your very broad and vague question said reading did not answer.
    In short, you have received answers commensurate with your questions.

  • How to temporally match/save Input and Output Channels's data?

    Hello, I have a voltage-input, voltage-output SISO system, and need to indentify its dynamic response (or transfer function) as a reference to a PID control. Without using the system identification toolbox, my goal is to generate/provide a sine sweep input (ranging 1Hz-5kHz for 10sec) to the system and to save the corresponding output response signal as well as the sweep input signal simultaneously.
    I got a sample program online and am trying to modify it as attached, but I really need your advices/comments concerning several problems I am facing with:
    1) With the below setting, the number of the acquired Input channel samples obtained is 5461, which is smaller than expected (i.e., 10000). What would I be missing in setting parameters?
    - H/W: NI-USB-6341 DAQ
    - AO: continuous samples with the waveform timing (1k sampling, 10000 samples => 10 sec, slower sampling just for testing purpose)
    - AI: continuous samples, samples to read: 30k, rate: 1k
    2) I am using flat sequence structure as a way to making the start point of saving AI and AO data same, but wonders if this is a right method or if there is other better approaches. (I had an idea of using an internal clock with "1-sample mode" for sync, but this may not work at the high speed sine sweep like 5kHz, right?)
    3) I just want to provide the sine sweep just once to the system and do not require the "reset" functionality implemented in the original sample program. I failed to remove this "reset" part as I did not fully understand the sample code. If I run the attahed, the generated AO signal is periodically provided to the system. Please give me any advice to modify the program as I want.
    Thanks for your help and valualble time.
    Attachments:
    siso.vi ‏230 KB

    Hi J. Kim,
    To begin, you say you want to synchronize your analog input and output so that they start at the exact same time, yes? To achieve tight synchronization, you need to use DAQmx VIs instead of the DAQ Assistant. There's a good overview of DAQmx VIs  here. There's also a document that deals specifically with synchronization in DAQmx here. Additionally, if you go to Help>>Find Examples in the LabVIEW example finder, you can see many other examples of acquiring data using DAQmx.
    As for your configuration, you have your analog input DAQ assistant wired far before your analog output DAQ assistant in your sequence strucutre, so the dataflow of the program will cause the analog input DAQ Assistant to execute before the output. They cannot be in different sequences if they are executing simoultaneously, and I would not use flat sequences here except to start the two tasks in DAQmx. Where did you find this example?
    Best,
    Dan N
    Applications Engineer
    National Instruments 

  • Multiple inputs and outputs using DAQmx VIs

    Hello,
    I am fairly new with the LabView programming language.  I have a few training books that I have been reading, and I have been following online tutorials and reading the forums.  However, I have come to a problem where I don’t see a clear solution.  I am using LabView 2009 (9.0f3) and DAQmx VIs.
    I am using a NI 9172 chassis PLC, with two 9201 AI cards, 9217 AI RTD card, 9472 DO card, 9263 AO card, and two 9237 AI Bridge cards.
    I am reading eight analog inputs with the 9201 cards, two analog RTD inputs with the 9217 card, three digital outputs with the 9472 card, three analog outputs with the 9263, and eight analog inputs with the 9237 cards.
    I wrote a simple program to test one digital output task, two of the analog output tasks, and a single analog input task.  I put all of them in the same while loop, and it worked perfectly.  However, when I add analog input tasks to the same loop, I get an error 200022.    So I tested each sensor individually by changing the channel before each run.  I searched error 200022 and found that this is because I cannot start another analog input task until the previous one ends.  With this said, I don’t know how to acquire an analog voltage in the same task as an analog RTD voltage.  Both inputs take different constants in the start task DAQmx icon.
    Attached is my test program.  It is titled “Test All”. This is the program I used to test the various sensors.  I tested the input sensors one at a time, and it worked fine.  A few tasks are written just to test functionality, and will be added to later.  The data is only displayed on the screen.  I will add triggers and data write to disk functions later.  This program works now, but if I add more analog inputs, it will generate the 200022 error.
    Can someone show me how to correctly write the code for multiple inputs and outputs using DAQmx?  All training materials and tutorials I can find all show a single input or single output, not multiples of each.  Thanks for looking.
    -Randy
    Attachments:
    TestAll-NI.vi ‏32 KB

    Hi RandyC,
    The Knowledge Base article Using Different Types of DAQmx Global Channels in the Same Task goes into a little more depth of what Bryan is talking about, and it also includes some example code to help show what to do.
    Hope that helps,

  • Simple input and output in a loop

    I'm trying to get some user input in a loop. This is a simplification.
    import java.util.Scanner;
    public class Main {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            for (int i = 0; i < 3; i++) {
                System.out.println("Enter a string:");
                String myString = input.nextLine();
                System.out.println("output: " + myString);
    }In NetBeans, it usually runs fine for a few loops, but eventually (running the program 5 times or so) I get output like this:
    run:
    Enter a string:
    1
    output: 1
    Enter a string:
    output: 2
    Enter a string:
    2
    3
    output: 3
    BUILD SUCCESSFUL (total time: 9 seconds)It starts writing the prompt before the output and gets all jumbled. The problem is worse if I have more input and output statments in the loop. I thought it might just be a timing issue, but it doesn't matter how fast or slow I enter the information. After a few successive runs, the output always gets out of order. How can I keep in line?

    hi!
    why dont you try using printf it will give you a better formating capasities.
    it work like this.
    import java.util.Scanner;
    public class Main {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            for (int i = 0; i < 3; i++) {
                System.out.println("Enter a string:");
                String myString = input.nextLine();
                System.out.printf("output: %s  \n" ,  myString );  // the %s is the place the string will apear
                                                                                       //and the \n is a escape caracter that creates a new line.
    }if you need more help with printf read this:
    http://en.wikipedia.org/wiki/Printf

Maybe you are looking for

  • Too much Data, not enough Time.

    Alright, So I have a problem...Guess thats why I am here. I have a bulk of information after digitizing a few days shoot, the problem is, Its takes so long to transfer the information in HD format and I have multiple transfers I would like set up, ho

  • Header conditions calculated on item level.

    Hello, We are on SRM 4.0 (server 500). I have created a header pricing condition as a copy of 01RH for a surcharge. I created a contract with the condidition that a surcharge of ZAR 65 to be added for all orders below ZAR 1000. When I create a shoppi

  • Can't play .wmv files in QuickTime (Leopard) 10.6.1

    I couldn't open either .wmv or flip4mac - getting the "quicktime player needed to run this app" error message. I try VLC ,DIVX also convert files using DIVX but no sound after converting and no video i don't know what to do any good solution would be

  • Converting files to dng after import

    Hi. Brand-new Lightroom 5 user here. I don't remember the dialog box showing up to ask me at the time of import whether I wanted the pics imported as dng files or not. Now that they're imported, is there a way to tell if they are already dng? I also

  • Bluetooth issues on Mac Pro after Mavericks upgrade

    I have a 2010 Mac Pro and I currently use a Logitech DiNovo for mac keyboard and the Apple Trackpad.  They were both working perfectly fine before upgrading to Mavericks. After the upgrade, I started experiencing latency issues in which both the keyb