Is it possible through labview to set and read window¿s based file properties​?

Any file in XP operating system has file properties associated with it, such as, size, location, when the file was created, modified and last accessed. I know that Labview has the ability to access the size and modified property. Other file types such as image format types jpg, bmp and tif have additional associated properties such as: title, subject, author, and comments. Is it possible through labview to read and set these properties programmatically?

Hpopenoe wrote:
> Any file in XP operating system has file properties associated with
> it, such as, size, location, when the file was created, modified and
> last accessed. I know that Labview has the ability to access the size
> and modified property. Other file types such as image format types
> jpg, bmp and tif have additional associated properties such as: title,
> subject, author, and comments. Is it possible through labview to read
> and set these properties programmatically?
Well, you can most probably do that by calling Windows API functions.
Note however that the properties you mention are not generic Windows
file properties but file specific internal attributes. Explorer does at
least in XP handle some of those properties and shows them to the user
but does so with internal file type handlers to extract the properties
from the file.
I'm not sure those file type handlers are actually available for other
applications than Explorer without quite some work. If they are
available they are certainly not part of the standard Win32 API but most
probably part of the Windows shell component and I would guess not just
through normal API function calls, but through the shell namespace
enumeration, which is built on COM interfaces, something you only can
call from standard programming languages, most of them are done in C++
(and if you are a little more persistant in standard C).
So you are likely to need to either write your own DLL doing the nitty
gritty work of calling the shell interface and using that DLL in LabVIEW
or find an Active X component which does the work for you. No doubt
there is such an Active X component somewhere but how good and expensive
is always a big question.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • TS1389 I restored my computer to factory setting, and then restored all my files. Now some of my songs are not authorized on this computer in iTunes.

    I restored my computer to factory setting, and then restored all my files. Now some of my songs are not authorized on this computer in iTunes.

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • I have a friend who I was helping out with his iPhone. He has since lost it. I believe I backed it up to my machine but have no idea where to find it. Is it possible to find it and read the back-up file without the original device being connected?

    I have a friend who I was helping out with his iPhone. He has since lost it. I believe I backed it up to my machine but have no idea where to find it. Is it possible to find it and read the back-up file without the original device being connected?

    If he gets another device - you should be able to restore it from your computer to the point where you backed it up
    Otherwise that file cannot be read

  • Problem with ArrayLists and writing and reading from a .dat file (I think)

    I'm brand new to this forum, but I'm sure hoping someone can help me with a problem I'm having with ArrayLists. This program was originally created with an array of objects that were displayed on a GUI with jtextFields, then cycling thru them via jButtons: First, Next, Previous, Last. Now I need to add the ability to modify, delete and add records. Both iterations of this program needed to write to and read from a .dat file.
    It worked just like it was suppose to when I used just the array, but now I need to use a "dynamic array" that will grow or shrink as needed: i.e. an ArrayList.
    When I aded the ArrayList I had the ArrayList use toArray() to fill my original array so I could continue to use all the methods I'd created for using with my array. Now I'm getting a nullPointerException every time I try to run my program, which means somewhere I'm NOT filling my array ???? But, I'm writing just fine to my .dat file, which is confusing me to no end!
    It's a long program, and I apologize for the length, but here it is. There are also 2 class files, a parent and 1 child below Inventory6. This was written in NetBeans IDE 5.5.1.
    Thank you in advance for any help anyone can give me!
    LabyBC
    package my.Inventory6;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.DecimalFormat;
    import javax.swing.JOptionPane;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import java.io.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.lang.IllegalStateException;
    import java.util.NoSuchElementException;
    import java.util.ArrayList;
    import java.text.NumberFormat;
    // Class Inventory6
    public class Inventory6 extends javax.swing.JFrame {
    private static InventoryPlusColor[] inventory;
    private static ArrayList inList;
    // create a tool that insure the specified format for a double number, when displayed
    private DecimalFormat doubleFormat = new DecimalFormat( "0.00" );
    private DecimalFormat singleFormat = new DecimalFormat( "0");
    // the index within the array of products of the current displayed product
    private int currentProductIndex;
    /** Creates new form Inventory6 */
    public Inventory6() {
    initComponents();
    currentProductIndex = 0;
    } // end Inventory6()
    private static InventoryPlusColor[] getInventory() {
    ArrayList<InventoryPlusColor> inList = new ArrayList<InventoryPlusColor>();
    inList.add(new InventoryPlusColor(1, "Couch", 3, 1250.00, "Blue"));
    inList.add(new InventoryPlusColor(2, "Recliner", 10, 525.00, "Green"));
    inList.add(new InventoryPlusColor(3, "Chair", 6, 125.00, "Mahogany"));
    inList.add(new InventoryPlusColor(4, "Pedestal Table", 2, 4598.00, "Oak"));
    inList.add(new InventoryPlusColor(5, "Sleeper Sofa", 4, 850.00, "Yellow"));
    inList.add(new InventoryPlusColor(6, "Rocking Chair", 2, 459.00, "Tweed"));
    inList.add(new InventoryPlusColor(7, "Couch", 4, 990.00, "Red"));
    inList.add(new InventoryPlusColor(8, "Chair", 12, 54.00, "Pine"));
    inList.add(new InventoryPlusColor(9, "Ottoman", 3, 110.00, "Black"));
    inList.add(new InventoryPlusColor(10, "Chest of Drawers", 5, 598.00, "White"));
    for (int j = 0; j < inList.size(); j++)
    System.out.println(inList);
    InventoryPlusColor[] inventory = (InventoryPlusColor[]) inList.toArray
    (new InventoryPlusColor[inList.size()]);
    return inventory;
    } // end getInventory() method
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    IDNumberLbl = new javax.swing.JLabel();
    IDNumberField = new javax.swing.JTextField();
    prodNameLbl = new javax.swing.JLabel();
    prodNameField = new javax.swing.JTextField();
    colorLbl = new javax.swing.JLabel();
    colorField = new javax.swing.JTextField();
    unitsInStockLbl = new javax.swing.JLabel();
    unitsInStockField = new javax.swing.JTextField();
    unitPriceLbl = new javax.swing.JLabel();
    unitPriceField = new javax.swing.JTextField();
    invenValueLbl = new javax.swing.JLabel();
    invenValueField = new javax.swing.JTextField();
    restockingFeeLbl = new javax.swing.JLabel();
    restockingFeeField = new javax.swing.JTextField();
    jbtFirst = new javax.swing.JButton();
    jbtNext = new javax.swing.JButton();
    jbtPrevious = new javax.swing.JButton();
    jbtLast = new javax.swing.JButton();
    jbtAdd = new javax.swing.JButton();
    jbtDelete = new javax.swing.JButton();
    jbtModify = new javax.swing.JButton();
    jbtSave = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    searchIDNumLbl = new javax.swing.JLabel();
    searchIDNumbField = new javax.swing.JTextField();
    jbtSearch = new javax.swing.JButton();
    searchResults = new javax.swing.JLabel();
    jbtExit = new javax.swing.JButton();
    jbtExitwoSave = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Inventory Program"));
    IDNumberLbl.setText("ID Number");
    IDNumberField.setEditable(false);
    prodNameLbl.setText("Product Name");
    prodNameField.setEditable(false);
    colorLbl.setText("Product Color");
    colorField.setEditable(false);
    colorField.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    colorFieldActionPerformed(evt);
    unitsInStockLbl.setText("Units In Stock");
    unitsInStockField.setEditable(false);
    unitPriceLbl.setText("Unit Price $");
    unitPriceField.setEditable(false);
    invenValueLbl.setText("Inventory Value $");
    invenValueField.setEditable(false);
    restockingFeeLbl.setText("5% Restocking Fee $");
    restockingFeeField.setEditable(false);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(unitPriceLbl)
    .addComponent(unitsInStockLbl)
    .addComponent(colorLbl)
    .addComponent(prodNameLbl)
    .addComponent(IDNumberLbl)
    .addComponent(restockingFeeLbl)
    .addComponent(invenValueLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(IDNumberField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(prodNameField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(colorField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(unitsInStockField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(unitPriceField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(restockingFeeField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(invenValueField, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(IDNumberLbl)
    .addComponent(IDNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(prodNameLbl)
    .addComponent(prodNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(colorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(colorLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(unitsInStockField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(unitsInStockLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(unitPriceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(unitPriceLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(restockingFeeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(restockingFeeLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(invenValueField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(invenValueLbl))
    .addContainerGap())
    jbtFirst.setText("First");
    jbtFirst.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtFirstActionPerformed(evt);
    jbtNext.setText("Next");
    jbtNext.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtNextActionPerformed(evt);
    jbtPrevious.setText("Previous");
    jbtPrevious.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtPreviousActionPerformed(evt);
    jbtLast.setText("Last");
    jbtLast.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtLastActionPerformed(evt);
    jbtAdd.setText("Add");
    jbtAdd.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtAddActionPerformed(evt);
    jbtDelete.setText("Delete");
    jbtModify.setText("Modify");
    jbtModify.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtModifyActionPerformed(evt);
    jbtSave.setText("Save");
    jbtSave.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtSaveActionPerformed(evt);
    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Search by:"));
    searchIDNumLbl.setText("Item Number:");
    jbtSearch.setText("Search");
    searchResults.setFont(new java.awt.Font("Tahoma", 1, 12));
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(searchIDNumLbl)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(259, 259, 259)
    .addComponent(searchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jbtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(searchIDNumbField, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(searchIDNumLbl)
    .addComponent(searchIDNumbField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(32, 32, 32)
    .addComponent(searchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtSearch)))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jbtExit.setText("Save and Exit");
    jbtExit.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtExitActionPerformed(evt);
    jbtExitwoSave.setText("Exit");
    jbtExitwoSave.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtExitwoSaveActionPerformed(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jbtExitwoSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jbtExit)))
    .addGroup(layout.createSequentialGroup()
    .addComponent(jbtFirst)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtNext)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtPrevious)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtLast))
    .addGroup(layout.createSequentialGroup()
    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(12, 12, 12)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jbtAdd)
    .addComponent(jbtDelete)
    .addComponent(jbtModify)
    .addComponent(jbtSave))))
    .addContainerGap())
    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jbtFirst, jbtLast, jbtNext, jbtPrevious});
    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jbtAdd, jbtDelete, jbtModify, jbtSave});
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(21, 21, 21)
    .addComponent(jbtAdd)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtDelete)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtModify)
    .addGap(39, 39, 39)
    .addComponent(jbtSave))
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jbtFirst)
    .addComponent(jbtNext)
    .addComponent(jbtPrevious)
    .addComponent(jbtLast))
    .addGap(15, 15, 15)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGroup(layout.createSequentialGroup()
    .addComponent(jbtExit)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtExitwoSave)))
    .addContainerGap())
    pack();
    }// </editor-fold>
    private void jbtExitwoSaveActionPerformed(java.awt.event.ActionEvent evt) {                                             
    System.exit(0);
    private void jbtSaveActionPerformed(java.awt.event.ActionEvent evt) {                                       
    String prodNameMod, colorMod;
    double unitsInStockMod, unitPriceMod;
    int idNumMod;
    idNumMod = Integer.parseInt(IDNumberField.getText());
    prodNameMod = prodNameField.getText();
    unitsInStockMod = Double.parseDouble(unitsInStockField.getText());
    unitPriceMod = Double.parseDouble(unitPriceField.getText());
    colorMod = colorField.getText();
    if(currentProductIndex == inventory.length) {
    inList.add(new InventoryPlusColor(idNumMod, prodNameMod,
    unitsInStockMod, unitPriceMod, colorMod));
    InventoryPlusColor[] inventory = (InventoryPlusColor[]) inList.toArray
    (new InventoryPlusColor[inList.size()]);
    } else {
    inventory[currentProductIndex].setIDNumber(idNumMod);
    inventory[currentProductIndex].setProdName(prodNameMod);
    inventory[currentProductIndex].setUnitsInStock(unitsInStockMod);
    inventory[currentProductIndex].setUnitPrice(unitPriceMod);
    inventory[currentProductIndex].setColor(colorMod);
    displayProduct(inventory[currentProductIndex]);
    private static void writeInventory(InventoryPlusColor i,
    DataOutputStream out) {
    try {
    out.writeInt(i.getIDNumber());
    out.writeUTF(i.getProdName());
    out.writeDouble(i.getUnitsInStock());
    out.writeDouble(i.getUnitPrice());
    out.writeUTF(i.getColor());
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception writing data",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } //end writeInventory()
    private static DataOutputStream openOutputStream(String name) {
    DataOutputStream out = null;
    try {
    File file = new File(name);
    out =
    new DataOutputStream(
    new BufferedOutputStream(
    new FileOutputStream(file)));
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Error", "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    return out;
    } // end openOutputStream()
    private static void closeFile(DataOutputStream out) {
    try {
    out.close();
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception closing file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } // end closeFile()
    private static DataInputStream getStream(String name) {
    DataInputStream in = null;
    try {
    File file = new File(name);
    in = new DataInputStream(
    new BufferedInputStream(
    new FileInputStream(file)));
    } catch (FileNotFoundException e) {
    JOptionPane.showMessageDialog(null, "The file doesn't exist",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Error creating file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    return in;
    private static void closeInputFile(DataInputStream in) {
    try {
    in.close();
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception closing file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } // end closeInputFile()
    private double entireInventory() {
    // a temporary double variable that the method will return ...
    // after each product's inventory is added to it
    double entireInventory = 0;
    // loop to control number of products
    for (int index = 0; index < inventory.length; index++) {
    // add each inventory to the entire inventory
    entireInventory += inventory[index].setInventoryValue();
    } // end loop to control number of products
    return entireInventory;
    } // end method entireInventory
    private void jbtLastActionPerformed(java.awt.event.ActionEvent evt) {                                       
    currentProductIndex = inventory.length-1; // move to the last product
    // display the information for the last product
    displayProduct(inventory[currentProductIndex]);
    private void jbtPreviousActionPerformed(java.awt.event.ActionEvent evt) {                                           
    if (currentProductIndex != 0) // it's not the first product displayed
    currentProductIndex -- ; // move to the previous product (decrement the current index)
    } else // the first product is displayed
    currentProductIndex = inventory.length-1; // move to the last product
    // after the current product index is set, display the information for that product
    displayProduct(inventory[currentProductIndex]);
    private void jbtNextActionPerformed(java.awt.event.ActionEvent evt) {                                       
    if (currentProductIndex != inventory.length-1) // it's not the last product displayed
    currentProductIndex ++ ; // move to the next product (increment the current index)
    } else // the last product is displayed
    currentProductIndex = 0; // move to the first product
    // after the current product index is set, display the information for that product
    displayProduct(inventory[currentProductIndex]);
    private void jbtFirstActionPerformed(java.awt.event.ActionEvent evt) {                                        
    currentProductIndex = 0;
    // display the information for the first product
    displayProduct(inventory[currentProductIndex]);
    private void colorFieldActionPerformed(java.awt.event.ActionEvent evt) {                                          
    // TODO add your handling code here:
    private void jbtModifyActionPerformed(java.awt.event.ActionEvent evt) {                                         
    prodNameField.setEditable(true);
    prodNameField.setFocusable(true);
    unitsInStockField.setEditable(true);
    unitPriceField.setEditable(true);
    private void jbtAddActionPerformed(java.awt.event.ActionEvent evt) {                                      
    IDNumberField.setText("");
    IDNumberField.setEditable(true);
    prodNameField.setText("");
    prodNameField.setEditable(true);
    colorField.setText("");
    colorField.setEditable(true);
    unitsInStockField.setText("");
    unitsInStockField.setEditable(true);
    unitPriceField.setText("");
    unitPriceField.setEditable(true);
    restockingFeeField.setText("");
    invenValueField.setText("");
    currentProductIndex = inventory.length;
    private void jbtExitActionPerformed(java.awt.event.ActionEvent evt) {                                       
    DataOutputStream out = openOutputStream("inventory.dat");
    for (InventoryPlusColor i : inventory)
    writeInventory(i, out);
    closeFile(out);
    System.exit(0);
    private static InventoryPlusColor readProduct(DataInputStream in) {
    int idNum = 0;
    String prodName = "";
    double inStock = 0.0;
    double pric

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

  • Find and Read the Target Spreadsheet File from Target Folder

    I'm trying to find and read the target spreadsheet file from the target folder. Please help. Thanks.
    Solved!
    Go to Solution.

    If you know the folder, you could do a List Folder Contents to get a list of files in that folder.  You can then just use Array Index to get the file you want.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • What tool is used to open and read UCS tech support files

    Hello,
    Due to internal Infosec policies, I need to open and read UCS tech supoort files that I generate prior to sending them to Cisco TAC. Can someone tell me what tool I can use to accomplish this task? Thanks.

    Good to hear.
    Are you intending to blank out all the proprietary info?  IPs, Hostnames etc? 
    Suggest an advanced editor such as ultraEdit which can find and replace any private information.
    Robert

  • Is it possible to resize the log and capture window?

    Hi,
    Using Final cut pro, I would like to make my capture window a bit bigger while capturing. I am capturing footage via my Blackmagic Infinity card and get the input through an HDMI cable. I'm capturing in Apple Pro ress on 720p, 59,59 fps.
    For a good overview of what I'm capturing at the moment, I would love to have a bigger capture window. For all I know, FC pro doesn't support the resizing of the log and capture window. Anyone an idea on how to solve this?
    Thank you.

    In my case, the capture window is adjustable if I am capturing SD (DVCAM) video. I can also use the scopes in this case. (Good if you are recording to disk, or using a laptop for monitoring.)
    However, both features (adjustable capture window and scopes) are not available if capturing HD (HDV in my case) video.
    Message was edited by: amarasme

  • How to set and read pixels?  AffineTransform?

    I understand how the AffineTransform class works but I don't see a way to set the color of and read the color of individual pixels in my JPanel. Any help will be apppreciated.

    you can't do that with AffineTransform. AffineTransform let's you translate/rotate/shear/scale before rendering, but you don't have access to pixel values.
    Try instead creating an empty bufferedimage, draw into it whatever you want and then you have access to the pixel values via bufferedImage.getRGB()/setRGB().
    or you get more basic and manipulate the WriteableRaster of your image directly.

  • How to keep the page-setting and the extension of a file uploaded to a form

    Hi,
    I created a form based on table witch contain a blob.
    If i upload into it an HTML file, when i load it in a report it look fine. But, if i upload a MSword or PDF file
    it display binary characters.
    Please help.
    Thanks.

    Hi Scafandri ,
      LEAD SELECTION IS A PROPERTY OF A NODE.  YOU CAN CHECK AND UNCHECK THAT PROPERTY UNDER NODE PROPERTIES.
    OR IF YOU WANT TO SET SELECTED ROW AS LEAD SELECTION THEN USE THE BELOW LINK IT WOULD BE HELPFUL
    retreiving the selected row index value
    In onclick  event of alv table,
    first get the index value of selected row  using r_param->get_index( ).
    Then using this value  set lead selection  like below
    lo_nd_itab->set_lead_selection_by_index ( above index value ).
    Then selected row will become the leadselection.
    Regards
    Srinivas

  • Que about setting and reading bitsssss

    Respected Sirs And Madams....
    Could any body tell me :
    " What is need of setting and getting bits ,,, y they are used????  and how can any one able to use it  ???? "
    Warm Regards,
    Nirav Parekh

    Do a search on Core Center on the Overclockers and Modding forum and you'll find a concensus of opinion.
    Some people use it. I don't like it. Most other people don't like it. I'd advise not using it and using BIOS.
    Your FSB is quad-pumped (4x) to get your CPU frequency base frequency, hence the FSB 200 for a 800 MHz base frequency. Your memory is DDR (dual data rate - 2x) so for 200 FSB you get a memory frequency of 400 MHz.
    Things to try:-
    In BIOS
    Frequency/Voltage Control
    Dynamic Overclocking: Disabled
    Performance Mode: Slow
    CPU Ratio Selection: Locked
    DRAM Frequency: Auto
    Spread Spectrum: Disabled
    Adjust CPU Bus Clock (Mhz): 200
    DDR Clock(Mhz): 333 (Greyed out)
    Adjust AGP/PCI Clock(Mhz): 66.66/33.33
    CPU Vcore Adjust: No
    CPU Vcore: 1.5250V (Greyed Out)
    DDR Power Voltage: 2.70V
    AGP Power Voltage: 1.55V
    If you had to change Performance Mode to Slow, you will have to Save and Exit and then re-enter BIOS for all the following options to be available. If it was already Slow move straight to
    Advanced Chipset Features
    DRAM Timing Setting
    Configure DRAM Timing by SPD: Disabled
    CAS Latency: 3 Clocks
    RAS Precharge: 4 Clocks
    RAS to CAS Delay: 8 Clocks
    Burst Length: 4 Clocks
    Integrity Mode: Disabled
    With these settings we can start to overclock your system. SLOWLY increase the FSB (CPU Bus Clock) in increments of 5. Save and Exit. Test memory with MemTest. Boot into Windows and stress test (prime95). Once you start to get errors, back off 2 or 3 MHz.
    ALL OVERCLOCKING CARRIES A RISK OF COMPONENT DAMAGE OR FAILURE!!!
    IF YOU CAN'T AFFORD TO LOSE IT, DON'T DO IT.
    Your memory is likely to be the holding factor here, as it is only rated to 400 MHz!!!
    If you do decide to try it, let us know how far you get, we can advise on further optimisation.
    Hope this helps a little. Good Luck.

  • How to set and read cookies in adobe edge animate

    Hi all,
    I need help in writing and reading cookies using adobe edge, is there is a way to do it I serached the internet but I did not find something simlliar?
    thanks in advance

    To test with this plugin in a simple HTML page, you'll need to also include jQuery itself.
    For example:
    <script src="/path/to/jquery.js"></script>
    <script src="/path/to/jquery.cookie.js"></script>
    </head>
    There are a few different ways that you could load the jQuery.cookie plugin into your composition. Regardless of the method, I recommend loading it at the compositionReady trigger. This is the trigger that fires after the composition is ready to play.
    This blog post shows one way to load in external .js files:
    http://chrisgannon.wordpress.com/2012/09/01/loading-external-javascript-in-adobe-edge-anim ate-the-easy-way/
    Here's how you would be applying this method for the jQuery.cookie plugin:
    Then enter in code similar to this:
    yepnope(
        nope:[
          '/path/to/jquery.cookie.js'
      complete: init
    function init() {
    //create your cookie's initial values here
    That would load in the jQuery.cookie plugin.
    It would then be up to you to create/manipulate the cookie's data as needed for your purpose. Most likely, you would scroll to a point in the timeline where you want data to be changed and/or read, add a trigger, then insert the necessary code.

  • HOW TO WRITE AND READ FROM A TEXT FILE???

    How can I read from a text file and then display the contents in a JTextArea??????
    Also how can I write the contents of a JTextArea to a text file.
    Extra Question::::::: Is it possible to write records to a text file. If you have not idea what I am talking about then ignore it.
    Manny thanks,
    your help is much appreciated though you don't know it!

    Do 3 things.
    -- Look through the API at the java.io package.
    -- Search previous posts for "read write from text file"
    -- Search java.sun.com for information on the java.io package.
    That should clear just about everything up. If you have more specific problems, feel free to come back and post them.

  • Adobe Reader 8.2 - setting of Reader-Window

    Hello,
    I use Adobe Reader 8.2, Windwos XP + SP2, IE 6.0 + SP2.
    If I start the Reader application with a other application (maybe about Internet Explorer) then the setting of the Reader-Window willn't be maintained. This is only after the Security Update from Adobe Reader 8.14 to 8.2.
    Someone now why that so or can help me to stop this.
    Regards
    Erdem

    Hello Malik,
    the problem is as follows:
    The windows size, position of windows on the desktop, the display setting from PDF document.
    When I diectly start the Adobe Reader 8.2 and then adjust the display position, size of the Reader window, display of the PDF document an finish the Reader application. Later reopening the Reader is  everything (position, size, setting of PDF document) all right. But if I started Reader about a third application (maybe IE) then the desktop position was in the middle of the desktop, size was a other and the PDF document display is 167%.
    Regards
    Erdem

  • Set and read page parameter using a java portlet

    I created a portlet that takes a parameter. I wantt his parameter to be set by the admin in the page parameter section. The portlet that I crated has a parameter. In the providers it has the following:
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>param</name>
    <displayName>displayParam</displayName>
    </inputParameter>
    However, when I go to the page propertie/parameter, I can "bind" a parameter. How can I do that?
    Thanks,
    Marcelo

    Marcelo,
    This was what I've given you above...
    From 7.1.3 Passing Parameters and Submitting Events jump to Section 2.12, "Public Portlet Parameters Support".
    Public portlet parameters:
    You can use a public portlet parameter to pass a value to a portlet. Using portlet parameters, the information that is displayed in a portlet can be specific to a particular page or a user. Portlet parameters are created by the portlet developer and are exposed to the page designer, through the user interface. After adding a portlet to a page, page designers can assign values to the public portlet parameters to make the information displayed in the portlet specific to the page.
    Page designers can assign values to public portlet parameters by providing a specific value (constant), a system variable (for example, the portal user name), or a page parameter. At run time, the portlet receives the values from the sources specified. In this way, page designers have complete control over the source of the parameter, whereas you have complete control over how the data is used after it is transmitted to the portlet.
    ...and in 7.1.3 Passing Parameters and Submitting Events as assumption is "You have followed through and understood Section 6.3.2, "Building PDK-Java Portlets".
    This why I've said to read it carefully... I hope this helps you further...
    Cheers,
    Pedro.

  • Hp4145a GPIB through LabView write but no read

    Hi, using the NI LabView HP4145B driver, I can connect to and write to
    my 4145A, however, when I try to read from the device using the HP 4145
    Graphics plot.vi it gives me the error: HP 4145 Receive Message.
    I have noticed other people have also experienced this, but there seems
    to be no known solution besides the stated problem of needing a delay
    before reading from the device.
    Any help would be appreciated. Thanks.

    By doing the following procedure, I have been able to successfully all
    of the data in the buffer from the 4145A:
    1) press the print button on the 4145A or send the "PR" command
    2) read from the device using the LabView communicate with instrument
    explorer (sample read/write program).
    I can then take the data and import it into excel for later processing.
    GYU wrote:
    > Thanx Brian,
    > &nbsp;
    > I've gotten the 4145A to make measurements and FINALLY able to RECEIVE data.&nbsp; Unfortunately, when I'm expecting 101 data points, I only received about 73.&nbsp; It just plugs "0"s into the rest to fill up the array.&nbsp; I was adjusting to allocate enough memory bytes during receive as well as delay time during the loop of the receiving.&nbsp; I'm still not getting the full 100 data points.
    > &nbsp;
    > Does anyone also knows how to pull 2 parameters out at the same time?&nbsp; When you list "LI" with two parameters "LI 'XX', 'YY';" (I'm using only 1) , how can you pull out BOTH parameter data at the same time? Right now, I'm only listing 1 parameter, send in the DO 'XX' cmd, the 'DR1' cmd...thus, I'm receiving only 1 set of data at a time.&nbsp; When I list 2 parameters and try to read it, it'll just crash because it cannot distinguish between data XX or data YY.
    > &nbsp;
    > &nbsp;
    > &nbsp;
    > &nbsp;

Maybe you are looking for

  • Crystal Report Query design

    Hello, I am very new to Crystal Reports and for some reason the online content for CR is abysmally low and not lucid enough in most cases. I am designing a simple Invoice type report in CR and am using an Access database with .accdb extension.I have

  • Photoshop CS4 web gallery template in Lightroom?

    Hi, I have a custom web gallery template set up in Photoshop CS4. I would like to use it in Lightroom, but it appears the Lightroom web gallery templates are in a different format (and not so customisable). Is there a way I can use my CS template in

  • Enterprise Service Bus and ESA

    Hi , I like to know, how to realize Enterprise Service Bus in the  Enterpise Servise Architecture? Thanks in advance. Regards Lemin.

  • Controlling Specific Posting Key Access by Security Roles

    I am currently implementing Z-Option GLSU which is an excel based general ledger posting tool.  The way it operates is that it runs FB01 and FBV1 as an SM35 batch job but basically allows a user to post to SAP without having to directly go into the S

  • Segment field IDOC_INPUT_DELVRY

    what is the segment update the picking quantity and PGI in Inbound function module IDOC_INPUT_DELVRY. I'm using message type SHPCON and Basic Type DELVRY03. Thanks