User Inputs Not Stored In External File

I'm using the following code to store marks
if (courseCode.compareToIgnoreCase(cCodeTerminate) != 0)
          System.out.print("Enter your exam marks for " + courseCode + ": ");
          examMarks = Integer.parseInt(in.readLine());
          //Loop to check if marks are within 0 and 100
          while ((examMarks < 0) || (examMarks > 100))
               if ((examMarks < 0) || (examMarks> 100))
                    System.out.println("Your exam marks cannot be less than 0 or more than 100.");
                    System.out.print("Enter your exam marks for " + courseCode + ": ");
                              examMarks = Integer.parseInt(in.readLine());
               else
                    examMarks = Integer.parseInt(in.readLine());
                    toFile.print(examMarks);
                    toFile.print("\t");
          }//End of loopHowever, the marks are not stored in the file. Is there something wrong with my coding?
The courseCode is stored only.

Also how do you plan to break out of this loop?
If the examMarks are less than zero or more than a
hundred you print out a error message and ask for the
marks again, and if they are between zero and a
hundred you print the results... but then the loop
keeps repeating until the marks go below zero or over
a hundred.
Confusing... maybe you should post more of the code?Thanks for the question. I got it working.
The while loop was totally extra and I got so many of the same input (examMarks) in my file.

Similar Messages

  • File opened in external editor not stored with referenced files

    If I open a referenced raw file in an external editor (CS2) and work on the image adding layers etc., the image is not stored where I have all the other referenced files. It gets stored in the Aperture Library. Is there a way around this. I want to keep all my files together. This can be done in Lightroom, but I am trying to make Aperture work for my workflow.
    Thanks,
    gary
    mac book, G5   Mac OS X (10.4.7)  

    Well, here's the feedback I submitted to Apple:
    With the introduction of Aperture 1.5, you offered users the ability to manage their own libraries, and for Aperture to work with 'referenced' images. In fact, because of this very reason, many of us consumers decided to buy Aperture 1.5.
    Most of us photographers also use Adobe Photoshop routinely.
    But there is a huge problem/bug for us users who manage our own library (force Aperture to work with 'referenced' images) AND use Photoshop (or any external editor for that matter). When we open a file in an external editor via Aperture, Aperture creates a new 'master' for editing -- but does so in its own 'managed' library! When we save from Photoshop, the image remains in the 'managed' library! So now we have one 'master' in our own directory, and the externally-edited 'master' in Aperture's 'managed' library! This is very CONFUSING and renders external editing via Aperture USELESS... no one in their right mind would want one version of their image in an organized directory, and an edited version in Aperture's managed library (where it is difficult to find manually)! No, it makes much more sense to create the edited 'master' in the same location as the original 'master'!
    PLEASE fix this bug ASAP! Aperture already has a good method for automatically renaming files by adding (1) or (2) or (3) or so forth when it is relocating files and finds a file with the same file-name. The same logic can be applied when creating a new 'master' for external-editing: that is, it should just create another .tiff (or .psd, or what have you) file with the same name but with a (1) or (2) tagged on. For example, if my master image is \Pictures\Seattle\SpaceNeedle.tiff, then when I open this image in an external editor, Aperture should automatically make the file: \Pictures\Seattle\SpaceNeedle (1).tiff, and open that file in the external editor... rather than create SpaceNeedle.tiff in its own managed library where I can't even find it using Finder or Windows Explorer, etc.
    Many of us have this complaint (just search Apple discussions)... PLEASE rectify this problem ASAP as it is completely messing up our workflows by requiring us to manually save through the external editor and then having to manually remove every 'managed' file that Aperture makes. This is really a pain and seriously makes me want to switch to a different image management program... though I love Aperture thus far and would love to stick to it as I believe it is visionary and shaping the future of how photographers will manage their digital workflows!
    Many thanks in advance for your time!
    Best,
    Rishi

  • Adobe form not saving user-input data into saved pdf file

    Hi forumers,
    I'm a new abap developer and I'm tasked to create an interactive adobe form that will require the user to input data in the form.
    No data is passed and received from PDF, but PDF has to be u2018Fillableu2019. I am able to fill out the form but when I actually save the form, it will be saved as a blank form again. I've seen the relevance of the  LS_DOCPARAMS-FILLABLE = 'X' on this forum and I have incorporated it in my code. But how should I code the abap program to enable to save the user input as well into the form.
    DATA: GV_FMNAME TYPE FPNAME,
          LS_DOCPARAMS    TYPE SFPDOCPARAMS,
          LS_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        I_NAME                     = 'ZSC_ZRUFORREP'
    IMPORTING
       E_FUNCNAME                  = GV_FMNAME
    *   E_INTERFACE_TYPE           =
    *   EV_FUNCNAME_INBOUND        =
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        IE_OUTPUTPARAMS       = LS_OUTPUTPARAMS
    EXCEPTIONS
       CANCEL                = 1
       USAGE_ERROR           = 2
       SYSTEM_ERROR          = 3
       INTERNAL_ERROR        = 4
       OTHERS                = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LS_DOCPARAMS-FILLABLE = 'X'.
    LS_DOCPARAMS-DYNAMIC = 'X'.
    CALL FUNCTION GV_FMNAME
    EXPORTING
       /1BCDWB/DOCPARAMS        = LS_DOCPARAMS
    * IMPORTING
    *   /1BCDWB/FORMOUTPUT       =
    EXCEPTIONS
       USAGE_ERROR              = 1
       SYSTEM_ERROR             = 2
       INTERNAL_ERROR           = 3
       OTHERS                   = 4
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'FP_JOB_CLOSE'
    * IMPORTING
    *   E_RESULT             =
    EXCEPTIONS
       USAGE_ERROR          = 1
       SYSTEM_ERROR         = 2
       INTERNAL_ERROR       = 3
       OTHERS               = 4
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    dgrachee

    Not quite yet, I have to say...
    If you check the domain "FPINTERACTIVE", you'll see these values:
                   Print Form
    X     Interactive Form with Additional Usage Rights
    N     Interactive Form Without Additional Usage Rights
    F                                                                
    So, you are not providing "additional usage rights" (Adobe Form Credentials), meaning there could be a problem when you want to use those forms in a Production environment.

  • Externally edited image not stored with referenced files?

    When I open an image in the external editor, do my work in PS, and then save, the new file is located in the Aperture Library even though the master for the image is a referenced file. Is there any way to change this so the new images will be placed in the same folder as the referenced images? Thanks...gary
    mac book, G5 dual   Mac OS X (10.4.8)  

    I'm afraid for the moment you have to do it manually by selecting the image and going to File/Relocate Master.
    We should have and option in Aperture to allow us to have ALL the images in an external location.

  • User are not able to attach files from sharepoint to Email (they become links)

    Hi,
    We have a couple of users that can't drag and drop the documents in sharepoint to outlook to send the files as attachment. Instead they become links. They are using IE 9 and 8. This happens both in the search module and from a file library. 
    Any ideas what could be wrong? we only have a couple of users that have this issue. It seems to be working for other people. 
    Thanks in advance. 

    Two things for sure.
    In Internet Explorer Options the site must be trusted.
    Select the Security Tab
    Next Select "Local Intranet" and press the "Sites" button
    Add your site to the trusted list.
    Next,
    In the "Security level for this zone"
    Select the "Custom Level button"
    Find "Initialize and script Active X controls not marked as safe for scripting" and enable the setting.
    That should do it.

  • Permission setting - User should not down load the file

    Hi,
    Can you please tell me how to prevent the users from down loading the files from portal.They should only view it.

    Ok lets do it,...
    First you need to identify which layout you are using for the view to end users.
    This can be known from clicking the Rendering Information link on the iview.
    To get Rendering Information , you need to add the admin user id to WDFProxy.
    System Administration - > System Configuration -> Knowledge Management -> Content Administration - >
    Content Management -> User Interface -> (Advanced Settings)Debugging Settings -> WDFProxy
    You need to enable Rendering information and enter the user id of the administrator.
    After identifying the layout, we need to edit the collection renderer of the layout.
    At this point, if you are not using any custom layout set, I would recommend you to do an
    Advanced Copy of the layout and edit the settings.
    System Administration - > System Configuration -> Knowledge Management -> Content Administration - >
    Content Management -> User Interface ->Settings->Layout Set
    Find the layout set and select it.
    Go to Collection Renderer and select the Collection List Renderer attached to it.
    In the Displayed Properties remove the (contentLink) modifier for your displayname property.
    Thats it
    Regards
    BP

  • How to input notes in a binary file used to save continuous DAQ?

    Hello,
    I have a continuous data acquisition vi with trigger. Data is saved in a binary file. I would like to save some comments or notes in this file; I want to be able to read the notes afterwards and the saved data that has to be displayed in charts. I got some examples from NI but they are simple and do not include the continuous data acquisition and reading both the notes and the (dynamic) data.
    Does anyone have examples of binary files with notes and continuous DAQ write and read?
    I've been working on this issue for quite a while and I got stuck...
    Thanks...

    Thank you Emilie.
    I know these examples all right. Now try embedding this into a 'Cont Acq. and Chart - Int. Clk.vi' or any vi that does data acquisition and saves the data in the same file where you wrote the string of comments. And this is not all - how do you read them all back in the right order and right length...
    I have inserted some examples to make you understand better what I am talking about.
    'AcquirePFV_Header.vi' and 'Read_with Header.vi' are only some trials that do not really work correctly.
    Could you or anybody else help me solve this problem?
    Thank you.
    Radu
    Attachments:
    ForNI03.zip ‏1170 KB

  • Firefox 3.6 not compatible with home directories stored on AFP file server

    I just wanted to let everyone know that I have discovered, at least in my situation, that Firefox 3.6 does not work with user home directories stored on AFP file servers.
    My network consists of PPC 10.411 clients and a Mac OS X 10.62 server. User home directories are stored on the server, the user is logged into a "Golden Triangle" LDAP domain, where the Mac clients bind to a OSX Server and the OSX Server is a member of the Active Directory domain.
    Worked perfectly fine on Firefox 3.57, now in 3.6 it will either not launch, will freeze with the beachball or will only show the Firefox window and not the main web browser.
    This has happened before with a 3.0x update from a few months ago. I have posted a bug in the Bugzilla database and have outlined the bug on my personal MacPCSMB blog.
    http://www.macpcsmb.com
    https://bugzilla.mozilla.org/show_bug.cgi?id=542306
    Thanks
    Michael Yockey
    IT Administrator
    Yockey, Yockey and Schliem PC

    There is an update on the FireFox hosted AFP issue that I have uncovered:
    When users are rolled back with Firefox 3.57 (by installing FF 3.57 over 43.6) the following issue occurs:
    You launch Firefox and you get an error that states "XML scripting is not working; Firefox cannot open the window".
    This basically means that the plug-ins for Firefox 3.6 are still in the user's Firefox profile directory. These new plug-ins are not compatible with Firefox 3.57. You will have to manually go into the user's home directory and remove their profile folder and extract a specific file. The issue is that the user will have to be able to have access to their bookmarks. If you delete the profile folder their bookmarks are gone, though that is simpler to do.
    It looks like Mozilla significantly changed the profile folder setup in FF 3.6, so a profile rollback or deletion is necessary.
    If you DO NOT have a good backup:
    To solve this issue do the following. This guide assumes you have the users home directory stored on an AFP server and you have open directory logins:
    1. The Firefox profile is located here according to Mozilla: http://support.mozilla.com/en-US/kb/Profiles . The Mac OS X Directory is located at /~username/library/application support/Firefox.
    2. Find and COPY the places.sqlite file. This is the Firefox bookmarks and history database. This file is very important to back up.
    3. Now take the user's Firefox profile and TRASH it.
    4. Now either have the user launch Firefox with their Open Directory login, or change their password and login yourself. Open Firefox and then after it full loads quit the program. Copy the places.sqlite file back into the Firefox profile folder. You will have to do this manually for every user unless if you make an AppleScript to take care of this.
    5. The program will now work again.
    The second option is to go into Retrospect or Time Machine (or whatever backup solution you use) and restore the user's profile direct to a point in time before Firefox was updated to 3.6 and then subsequently reverted back to 3.57. How to use backup software is way beyond the scope of this blog posting.
    Thanks
    Mike Yockey
    www.MacPCSMB.com

  • When importing a flash animation into captivate flash will not call external files

    Is there a way to import flash into captivate and it still be able to call external files (ie. sound, video xml)? When I import flash into captivate it will not call any external file.

    Hi all
    Wow, I was so hoping fellow Adobe Community Expert Paul Dewhurst would pop in on this thread.
    Why? Well, Paul sent me a way cool gizmo a while back that hacked the Info button. It used an external file for some of the information! So somehow Paul managed to sort what it took to insert a Flash object into Captivate and have that object extract data from an externally located file.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Help with JTree data by user input

    I am trying to read data into a JTree without it being hardcoded.
    An example of the data is:
    String data[] = {"a","b","c",";","b","g","h",";","c","t",";","g","u"};
    The above data is taken from user input and stored in an array and checked for errors.
    I want to somehow read take the above array's data and put it into following format in some kind of loop but I am not sure how.
    Object[] hierarchy = {"a", new Object[]{"b",new Object[]{"g","u"},"h"},new Object[]{"c","t"}};
    This Object is then passed to a function that interpets it and prints out the appropriate JTREE structure. For the values above it would be:
    a
    ..b
    ....g
    ......l
    ......u
    ....h
    ..c
    ....t
    Tha problem is how to take the string array and put that data correctly into the Object array. I have been racking my feeble mind for quite sometime and if any one out there can see it or has a better idea of how to get my data into the JTree please let me know.
    Thanks

    //OutlookClient.java
    //uses also Console class from Bruce Eckel 
    //<applet code=OutlookClient width=500 height=300>
    //</applet>
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import java.util.*;
    import javax.swing.UIManager;
    import javax.swing.SwingUtilities;
    import BruceEckel.*;
    import DynamicTree.*;
    import DynamicTreeNode.*;
    import java.lang.reflect.*;
    /* a class creating a dialog with the version, and other details about the program*/
    class AboutDialog extends JDialog {
         private JButton ok = null;
         private Container cp = null;
         private JTextField tname = null;
            public AboutDialog() {
                   //System.out.println("constructor");
                   ok = new JButton("OK");
                   cp = getContentPane();
                   cp.setLayout(new FlowLayout());
                   JLabel tlab = new JLabel("Outlook - client side");
                   cp.add(tlab);
                   //tname.setMinimumSize(new Dimension(50,10));
                   //tname.setSize(new Dimension(70,10));
                   tlab = new JLabel("Author: Jiri Machotka");
                   cp.add(tlab);
                   tlab = new JLabel("version 1.0 (September 2001)");
                   cp.add(tlab);
                   tlab = new JLabel("----------------------------------------------");
                   cp.add(tlab);
                   ok.addActionListener( new ActionListener() {
                      public void actionPerformed(ActionEvent e) {
                        dispose();
                      }//actionPerformed
                   });//addActionListener
                   cp.add(ok);
                   setSize(200,150);
                   setTitle("About the program");  
                   setModal(true);
         }//constructor
      *      <P>This class more-or-less contains a graphic design object used for interaction with a user.</P>
      *     Apart from all ScrollPanes, Buttons, and MenuItems, it contains also 3 interesting members:
      *     <ol>
      *     <li> <I>protected final DefaultMutableTreeNode topNode</I>, which is initialized with
      * a potent, non-removable object of the class <I>Node</I>
      *     <li> <I>protected final DefaultTreeModel treeModel</I>, which is initialized with the <I>topNode</I>
      *     <li> and finally <I>protected final DynamicTree dyn_tree</I>, which uses the 2 objects above
      *     </ol>
      *     <P> The <I>OutlookClient</I> is an applet, but it can be also processed as an application (thanks to
      *     a library by BruceEckel).</P>
    public class OutlookClient extends JApplet {
    //------------- properties -----------------------------------------
       private Action
            newMail = new AbstractAction ("New Mail", new ImageIcon("images/NewMailIcon.gif")){
              public void actionPerformed(ActionEvent e) {
                         txt.setText("NewMail");
         reply     = new AbstractAction ("Reply", new ImageIcon("images/ReplyIcon.gif")){
              public void actionPerformed(ActionEvent e) {
                         txt.setText("Reply");
       private JButton
         /*b1 = new JButton("Add a Node"),
         b2 = new JButton("Remove the current Node"),*/ //not used now
         tb1 = new JButton (newMail),
         tb2 = new JButton (reply);
       private JTextField
         txt = new JTextField(10);
       private Container
         leftArea = new Container(),
         rightArea = new Container();
       private JScrollPane
            left = new JScrollPane (leftArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS),
            right = new JScrollPane (rightArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
       private JSplitPane
            sp = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, left, right);
       private JToolBar
         toolBar = new JToolBar();
       private JMenuBar
         menuBar = new JMenuBar();
       /*ActionListener al = new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            String name = ( (JButton)e.getSource()).getText();
            txt.setText(name);
       };*/     //not used now - used as an action listener for buttons b1, b2
       private JMenu
         mainOutlookMenu = new JMenu ("Outlook activities"),
         othersMenu      = new JMenu ("Others"),
         mailMenu     = new JMenu ("Mails"),
         chatMenu     = new JMenu ("Chat"),
         look_and_feelMenu = new JMenu ("Look&Feel");
       private JMenuItem
         closeAppItem     = new JMenuItem ("Exit",KeyEvent.VK_F3),
         newMailItem     = new JMenuItem (newMail),
         replyItem     = new JMenuItem (reply);
       private JRadioButtonMenuItem
         windowsLookAndFeelItem;
       protected final DefaultMutableTreeNode topNode = new DefaultMutableTreeNode(new Node ("Outlook", false, true));
       protected final DefaultTreeModel treeModel = new DefaultTreeModel(topNode);
       protected final DynamicTree dyn_tree = new DynamicTree(topNode, treeModel);
    //-------------inner classes----------------------------------------
    /** <P>The class <I>MyRenderer</I> sets the renderer of the tree - by doing that icons can be assigned to
       * the tree's nodes. </P>
       * <P> It sould be probably a standard member of a class <I>DynamicTreeWithIcons</I>.</P>
       * <P> However, it uses the knowledge that the class <B>Node</B>, which is the only object that can be
       * found in the dynamic tree in this application, has a method <I>getIcon()</I>, which returns a
       * reference to the icon object assigned to the node.</P>
       * <P><B>This is the only place, where the class Node, or its methods are called explicitely.</B></P>
       protected class MyRenderer extends DefaultTreeCellRenderer {
         /** The constructor of the class.
           * - sets folders icons (opened, closed folder)
         public MyRenderer() {
                 //setLeafIcon(new ImageIcon("images/middle.gif")); //for leaves' icon, all at once!
              setOpenIcon(new ImageIcon("images/folder_open.gif"));
              setClosedIcon(new ImageIcon("images/folder_close.gif"));
         /** This overridden method gets the user-specified icon for leaf nodes. */
         public Component getTreeCellRendererComponent(
                   JTree tree,
                   Object value,
                   boolean sel,
                   boolean expanded,
                   boolean leaf,
                   int row,
                   boolean hasFocus) {
              super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
              if (leaf) 
              //workaround: test if icon not eq. null
                     ImageIcon ic = getRightIcon(value);
                     if (ic == null) return this;
                     else
                          setIcon(ic);
              return this;
         }//overridden: getTreeCellRendererComponent
         private ImageIcon getRightIcon(Object value) {
           DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
              try{
              Node node_object = (Node)(node.getUserObject());   
                 return (node_object.getIcon());
           catch (Exception e) { return null; }
         }// ImageIcon getRightIcon(Object value)
      }//class MyRenderer
    //-------------OutlookClient methods-----------------------------------------
       private void assignListeners(){
         dyn_tree.addTreeSelectionListener(new TreeSelectionListener() {
             public void valueChanged(TreeSelectionEvent e) {
              DefaultMutableTreeNode node = (DefaultMutableTreeNode)dyn_tree.getLastSelectedPathComponent();
              if (node == null) return;
              if (node.isLeaf()) { txt.setText(node.toString()); }
       }//assignListeners()
       private void createLayout(){
         leftArea.setLayout(new BoxLayout(leftArea,BoxLayout.Y_AXIS));
         rightArea.setLayout(new BoxLayout(rightArea,BoxLayout.Y_AXIS));
         //left.setMinimumSize(new Dimension(120,200));
         right.setMinimumSize(new Dimension(50,50));
         //rightArea.add(b1);
         //rightArea.add(b2);
         rightArea.add(txt);
         //leftArea.add(tree);  ... not nice (why?)
           left = new JScrollPane (dyn_tree, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);       
         left.setMinimumSize(new Dimension(180,200));
         sp.setLeftComponent(left);
       }//createLayout()
       private void createMenu(){
         ButtonGroup group = new ButtonGroup();
            JRadioButtonMenuItem rbMenuItem;
         closeAppItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, ActionEvent.ALT_MASK));
         closeAppItem.getAccessibleContext().setAccessibleDescription("Closes application");
         closeAppItem.addActionListener( new ActionListener() {
              public void actionPerformed(ActionEvent e) {System.exit(0);}
         othersMenu.setMnemonic(KeyEvent.VK_O);
         othersMenu.getAccessibleContext().setAccessibleDescription("System settings&Others");
            rbMenuItem = new JRadioButtonMenuItem("Java");
            rbMenuItem.setSelected(true);
            rbMenuItem.setMnemonic(KeyEvent.VK_J);
            group.add(rbMenuItem);
            rbMenuItem.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {setPLAF(UIManager.getCrossPlatformLookAndFeelClassName( ) );}
            look_and_feelMenu.add(rbMenuItem);
            rbMenuItem = new JRadioButtonMenuItem("Windows");
            rbMenuItem.setMnemonic(KeyEvent.VK_W);
            group.add(rbMenuItem);
            rbMenuItem.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {setPLAF("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");}
            look_and_feelMenu.add(rbMenuItem);
         windowsLookAndFeelItem = rbMenuItem;
         look_and_feelMenu.setMnemonic(KeyEvent.VK_L);
         look_and_feelMenu.getAccessibleContext().setAccessibleDescription("Look&Feel");
         JMenuItem aboutItem = new JMenuItem ("About");
         aboutItem.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                   AboutDialog ad = new AboutDialog();
                   ad.show();
         othersMenu.add(look_and_feelMenu);
         othersMenu.addSeparator();
         othersMenu.add(aboutItem);
         othersMenu.addSeparator();
         othersMenu.add(closeAppItem);
         mainOutlookMenu.setMnemonic(KeyEvent.VK_A);
         mainOutlookMenu.getAccessibleContext().setAccessibleDescription("Outlook activities");
         menuBar.add(mainOutlookMenu);
         menuBar.add(othersMenu);
         mailMenu.setMnemonic(KeyEvent.VK_M);
         mailMenu.getAccessibleContext().setAccessibleDescription("Mail activities");
         chatMenu.setMnemonic(KeyEvent.VK_C);
         chatMenu.getAccessibleContext().setAccessibleDescription("Chat");
         chatMenu.setEnabled(false);
         mainOutlookMenu.add(mailMenu);
         mainOutlookMenu.addSeparator();
         mainOutlookMenu.add(chatMenu);
         //mailMenu.add(newMail);
         //mailMenu.add(reply);     //class Action has problems to catch the accelerator keys
         newMailItem.setMnemonic(KeyEvent.VK_N);
         replyItem.setMnemonic(KeyEvent.VK_R);
         mailMenu.add(newMailItem);
         mailMenu.add(replyItem);
         newMailItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
         replyItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, ActionEvent.ALT_MASK));
         //newMail.putValue(Action.NAME, "New mail");
         //newMail.putValue(Action.SHORT_DESCRIPTION, "New mail");
         //newMail.putValue(Action.LONG_DESCRIPTION, "New mail");
         //newMail.putValue(Action.MNEMONIC_KEY, "N");  //cast an exception. why?
         //newMail.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));     
         setJMenuBar(menuBar);
       }//createMenu()
       private void createToolBar(){
         //toolBar.add(newMail);
         //toolBar.add(reply);    //does not provide texts and mnemonics
         tb1.setMnemonic(KeyEvent.VK_N);
         tb2.setMnemonic(KeyEvent.VK_R);
         toolBar.add(tb1);
         toolBar.add(tb2);
       }//createToolBar()
       private void createNodes(DefaultMutableTreeNode topNode){
         //new for dynamic processing
         DefaultMutableTreeNode
              parentNode = null,
              leaveNode  = null;
         parentNode = dyn_tree.addObject(null,new Node ("MailFolders", false, true));
         dyn_tree.addObject(parentNode,new Node ("Inbox","images/InboxIcon.gif", false, false));
         dyn_tree.addObject(parentNode,new Node ("Outbox","images/OutboxIcon.gif", false, false));
         dyn_tree.addObject(parentNode,new Node ("Sent","images/SentIcon.gif", false, false));
         dyn_tree.addObject(parentNode,new Node ("Deleted","images/DeletedIcon.gif", false, false));
         //leaveNode.setEnabled(false);  //TODO: disable "Chat"node
         dyn_tree.addObject(null,new Node ("Chat", false, false));
       }//createcreateNodes(DefaultMutableTreeNode)
       private void setTreeSettings(){
         //one selection at one time
         dyn_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
         //connect nodes with a thin line - Java style only
         dyn_tree.putClientProperty("JTree.lineStyle","Angled");
         //collapse the root's children first
         //tree.setShowsRootHandles(false);
         //icon adjustment
         MyRenderer MyRen = new MyRenderer();
         dyn_tree.setCellRenderer(MyRen);
         //modifiable tree - by double click - allows modifying of nodes' names
         // but unfortunately also restores original icons
         //tree.setEditable(true);
       }//setTreeSettings()
       private boolean setPLAF(String LookAndFeelName){
          try{
         UIManager.setLookAndFeel(LookAndFeelName);
         SwingUtilities.updateComponentTreeUI(this);
         return true;
          } catch (Exception e) {
         //e.printStackTrace(System.err);
         return false;
       }//setPLAF(String LookAndFeelName)
       private void trytosetLookAndFeel(){
          if (setPLAF("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"))
              windowsLookAndFeelItem.setSelected(true);
       }//trytosetLookAndFeel()
       /** The applet's <I>init()</I>.
         * Calls methods to construct all visible objects.
         * Apart from that it also assigns the renderer to the tree.
       public void init(){
         sp.setOneTouchExpandable(true);
            //sp.setDividerLocation(150); - system puts the value to optimize the left part
         sp.setPreferredSize(new Dimension(450,200));
         Container cp = getContentPane();
         cp.setLayout(new FlowLayout());
            createLayout();     
         createMenu();
         createToolBar();
         createNodes(topNode);
         setTreeSettings();
         //createPopupMenu();
         assignListeners();
         cp.add(toolBar);
         cp.add(sp);
         trytosetLookAndFeel();
       }//init()
       /** If called as an application.
         * The desired Windows Look&Feel is re-set again, when the applet is running. Otherwise, it in an application
         * it tends not to work correctly.
       public static void main(String[] args) {
         OutlookClient theApplet;
         BruceEckel.Console.run(theApplet=new OutlookClient(), 500, 300);
         theApplet.trytosetLookAndFeel();
       }//main(String[])
    }///:~Take a look namely at createNodes
    Hope it helps.

  • Why is input  not copied to output?

    Could some one tell me why my code below is not sllowing me to copy my in text file to my out text file. I know for a fact that I am reading the input file because when System.out.println was used within the catch block, I was able to print all data.
    // User input the name of the file to copy and the file
              // to transfer the data to.          
              Scanner s = new Scanner(System.in);
              System.out.println("What is the name of the input file?");
              String input = s.next();          
              System.out.println("What is the name of the output file?");
              String output = s.next();
              //Create file names.
              File inputFile = new File("c:\\" + input + "." + "txt");
         File outputFile = new File("c:\\" + output + "." + "txt");
         //Creates BufferedReader and BufferedWriter.     
         BufferedReader in = new BufferedReader(new FileReader(inputFile));
         BufferedWriter out = new BufferedWriter(new FileWriter(outputFile));                
         //Enclose in a try ...catch because of possible exception.
         String line = null;
         try
              while((line = in.readLine()) != null)          
    out.write(line);
              out.newLine();
              catch(IOException e)
                   System.out.print("error");
              }

    You aren't closing the output file. But I missed the part of your question which was relevant to the topic of this forum, namely Reflection.

  • Automated vendor block on creation without user inputs

    Hi All,
    I want to block the vendor in creation without user inputs:
    Not in T-code mk01<extras<blocked data, and definiately not after creating the vendor and using t-code MK05.
    How i can change a field in table LFA1 while creating the vendor.
    the field that i want to set is LFA1-SPERM (for all purchasing Org).
    Please suggest if you have any ideas how this can be done.
    Thanks,
    Mamta

    Hi,
    Not sure your issue was solved already.
    However, if not resolved already try this
    create an explicit enhancement in include MF02KFV0
    ENHANCEMENT 3  ZFI_VENDOR_CREATE.  
    IF SY-TCODE = 'MK01''.
    LFA1-SPERM = `X`.
    ENDIF.
    ENDENHANCEMENT.
    Enhancement Spot :ES_MF02KFV0   
    Program: MF02KFV0  
    Enhancement Implementation type: Dynamic Enhancement Point
    Enhancement Implementation POint:  \IC:MF02KFV0\EX:VERBUCHUNGSAUFRUF_02\EI
    Regards
    Raja

  • File upload sendmail not displaying user input

    Hello ive set up the upload example from     http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Images_01.html
    i added a textarea field and a sendmail function.  all is working well but the email does not contain any of the data from the fields on the form that the user submits. its just white space where that data should be.....Could someone please check this code and see what i am doing wrong ...thanks, kevin
    ---------------------------Here is the form page:---------------------------------
    <cfparam name="FORM.image" default="" />
    <cfparam name="FORM.comments" default="" />
    <!--- Create an empty error string --->
    <cfset strError = "">
    <!--- This code creates a form with one field where the user enters the image file to upload. --->
    <cfform action="makeThumbnail.cfm" method="post" enctype="multipart/form-data">
    <p>Please upload an image:
      <cfinput type="file" name="image" required="yes" id="image" value="#Trim(FORM.image)#" message="Please enter an image!">
    </p>
    <p>
      <cftextarea name="Comments" cols="20" rows="4" required="yes" id="Comments" message="Please enter your Comments!" enabled="no" value="#Trim(FORM.comments)#" maxlenght="160" visable="no" />  </p>
    <p>
      <cfinput type="submit" value="Send Image" name="Submit">
    </p>
    <cfif IsDefined( "FORM.image" )>
    <cfif IsDefined( "FORM.comments" )>
    <cfmail
    from="[email protected]"
    to="[email protected]"
    subject="Visitor Email."
    server="outgoing server"
    username="usernam"
    password="pass">
                    File uploaded.
       <cfoutput> image: #Trim(FORM.image)#, comments: #Trim(FORM.comments)#, #Now()#</cfoutput>
    </cfmail>
        </cfif>
      </cfif>
    </cfform>
    -----------this is the makethumbnail.cfm which i made no changes ---------------------
    <cfset thisDir = expandPath(".")>
    <!--- Determine whether the form is uploaded with the image. --->
    <cfif structKeyExists(form,"image") and len(trim(form.image))>
        <!--- Use the cffile tag to upload the image file. --->
        <cffile action="upload" fileField="image" destination="#thisDir#" result="fileUpload"
            nameconflict="overwrite">
        <!--- Determine whether the image file is saved. --->
        <cfif fileUpload.fileWasSaved>
        <!--- Determine whether the saved file is a valid image file. --->
            <cfif IsImageFile("#fileUpload.serverfile#")>
        <!--- Read the image file into a variable called myImage. --->
                <cfimage action="read" source="#fileUpload.serverfile#" name="myImage">
                <!--- Determine whether the image file exceeds the size limits. --->
                <cfif ImageGetHeight(myImage) gt 480 or ImageGetWidth(myImage) gt 360>
                    <!--- If the file is too large, delete it from the server. --->
                    <cffile action="delete"
                        file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                    <cfoutput>
                    <p>
                    The image you uploaded was too large. It must be less than 480 pixels wide
                        and 360 pixels high. Your image was #imageGetWidth(myImage)# pixels wide
                        and #imageGetHeight(myImage)# pixels high.
                    </p>
                    </cfoutput>
                    <!--- If the image is valid and does not exceed the size limits,
                        create a thumbnail image from the source file that is 75-pixels
                        square, while maintaining the aspect ratio of the source image.
                        Use the bilinear interpolation method to improve performance.
                        --->
                <cfelse>
        <cfset ImageScaleToFit(myImage,100,100,"bilinear")>
                    <!--- Specify the new filename as the source filename with
                        "_thumbnail" appended to it. --->
                    <cfset newImageName = fileUpload.serverDirectory & "/" &
                        fileUpload.serverFilename & "_thumbnail." &
                        fileUpload.serverFileExt>
                    <!--- Save the thumbnail image to a file with the new filename. --->
                    <cfimage source="#myImage#" action="write"
                        destination="#newImageName#" overwrite="yes">
                    <cfoutput>
                    <p>
                    Thank you for uploading the image. We have created a thumbnail for
                        your picture.
                    </p>
                    <p>
                    <!--- Display the thumbnail image. --->
                    <img src="#getFileFromPath(newImageName)#">
                    </p>
                    </cfoutput>   
                </cfif>
            <!--- If it is not a valid image file, delete it from the server. --->
            <cfelse>
                <cffile action="delete"
                    file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                <cfoutput>
                <p>
                The file you uploaded, #fileUpload.clientFile#, was not a valid image.
                </p>
                </cfoutput>
            </cfif>
        </cfif>
    </cfif>

    Hello ive set up the upload example from     http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Images_01.html
    i added a textarea field and a sendmail function.  all is working well but the email does not contain any of the data from the fields on the form that the user submits. its just white space where that data should be.....Could someone please check this code and see what i am doing wrong ...thanks, kevin
    ---------------------------Here is the form page:---------------------------------
    <cfparam name="FORM.image" default="" />
    <cfparam name="FORM.comments" default="" />
    <!--- Create an empty error string --->
    <cfset strError = "">
    <!--- This code creates a form with one field where the user enters the image file to upload. --->
    <cfform action="makeThumbnail.cfm" method="post" enctype="multipart/form-data">
    <p>Please upload an image:
      <cfinput type="file" name="image" required="yes" id="image" value="#Trim(FORM.image)#" message="Please enter an image!">
    </p>
    <p>
      <cftextarea name="Comments" cols="20" rows="4" required="yes" id="Comments" message="Please enter your Comments!" enabled="no" value="#Trim(FORM.comments)#" maxlenght="160" visable="no" />  </p>
    <p>
      <cfinput type="submit" value="Send Image" name="Submit">
    </p>
    <cfif IsDefined( "FORM.image" )>
    <cfif IsDefined( "FORM.comments" )>
    <cfmail
    from="[email protected]"
    to="[email protected]"
    subject="Visitor Email."
    server="outgoing server"
    username="usernam"
    password="pass">
                    File uploaded.
       <cfoutput> image: #Trim(FORM.image)#, comments: #Trim(FORM.comments)#, #Now()#</cfoutput>
    </cfmail>
        </cfif>
      </cfif>
    </cfform>
    -----------this is the makethumbnail.cfm which i made no changes ---------------------
    <cfset thisDir = expandPath(".")>
    <!--- Determine whether the form is uploaded with the image. --->
    <cfif structKeyExists(form,"image") and len(trim(form.image))>
        <!--- Use the cffile tag to upload the image file. --->
        <cffile action="upload" fileField="image" destination="#thisDir#" result="fileUpload"
            nameconflict="overwrite">
        <!--- Determine whether the image file is saved. --->
        <cfif fileUpload.fileWasSaved>
        <!--- Determine whether the saved file is a valid image file. --->
            <cfif IsImageFile("#fileUpload.serverfile#")>
        <!--- Read the image file into a variable called myImage. --->
                <cfimage action="read" source="#fileUpload.serverfile#" name="myImage">
                <!--- Determine whether the image file exceeds the size limits. --->
                <cfif ImageGetHeight(myImage) gt 480 or ImageGetWidth(myImage) gt 360>
                    <!--- If the file is too large, delete it from the server. --->
                    <cffile action="delete"
                        file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                    <cfoutput>
                    <p>
                    The image you uploaded was too large. It must be less than 480 pixels wide
                        and 360 pixels high. Your image was #imageGetWidth(myImage)# pixels wide
                        and #imageGetHeight(myImage)# pixels high.
                    </p>
                    </cfoutput>
                    <!--- If the image is valid and does not exceed the size limits,
                        create a thumbnail image from the source file that is 75-pixels
                        square, while maintaining the aspect ratio of the source image.
                        Use the bilinear interpolation method to improve performance.
                        --->
                <cfelse>
        <cfset ImageScaleToFit(myImage,100,100,"bilinear")>
                    <!--- Specify the new filename as the source filename with
                        "_thumbnail" appended to it. --->
                    <cfset newImageName = fileUpload.serverDirectory & "/" &
                        fileUpload.serverFilename & "_thumbnail." &
                        fileUpload.serverFileExt>
                    <!--- Save the thumbnail image to a file with the new filename. --->
                    <cfimage source="#myImage#" action="write"
                        destination="#newImageName#" overwrite="yes">
                    <cfoutput>
                    <p>
                    Thank you for uploading the image. We have created a thumbnail for
                        your picture.
                    </p>
                    <p>
                    <!--- Display the thumbnail image. --->
                    <img src="#getFileFromPath(newImageName)#">
                    </p>
                    </cfoutput>   
                </cfif>
            <!--- If it is not a valid image file, delete it from the server. --->
            <cfelse>
                <cffile action="delete"
                    file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                <cfoutput>
                <p>
                The file you uploaded, #fileUpload.clientFile#, was not a valid image.
                </p>
                </cfoutput>
            </cfif>
        </cfif>
    </cfif>

  • Problem Lync 2013 File Transfer not working with externally connected users

    I've a Single consolidated edge with private IP addresses using NAT in Lync Server 2013 and I'm facing some problem during File Transfer with all users outside my network both federated user or user of my lync infrastructure externally connected.
    I drag and drop a file into the conversation, I press enter then the receiver see only the icon without the "save as" option

    Hi,
    Did you receive any error on FE Server or Edge Server when the issue happen?
    Make sure all Lync Services started on Edge Server (especially for Lync Server Web conferencing Edge).
    Check if CMS status on Edge Server update to the latest status.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Storing data out to external file...?

    I have a question I'd like to put forward to anyone who can
    help me. It's a bit vague, perhaps, but any help would be
    appreciated...
    I need to make a Flash application into which you can INPUT
    data, and then have that data STORED somehow / kept in memory -
    probably in an external file of some format outside of the Flash
    file, so that the next time you launch the Flash file, that same
    EXTERNAL data will be read by the Flash file and will display in
    the interface.
    The key thing here though is that file will NOT be hosted
    online, so it cannot make use of any "online-only" scripting (if
    such a thing exists?).
    I need to host and run the Flash application from my local
    hard drive, and all external files need to be on my local hard
    drive too.
    Is it possible to set up the scenario I've outlined? Where do
    I even begin?
    I fully appreciate that this will be a big project, requiring
    a great deal of learning on my part, but I'm willing to give it a
    go, providing I know where to start...
    What am I looking at here? PHP? CGI? XML? Will those run
    locally? I really don't know...
    Like I said, I really know nothing about any of this, and I'm
    perfectly willing to learn, but I just need to know WHERE to start
    learning, and WHAT to learn...
    Again - any help appreciated.
    Thanks.

    you can use the flash sharedobject to store data from one
    flash session to another.

Maybe you are looking for