Edit method problem???

Hi,forgive for all the code but i've asked this question before and people asked for more code.The problem is i get an error in publicationmain saying "undefined varible newpublication" so how do i fix this?and is my edit method goin to work?using the get and set method?can u show me how do do this please?feel free to make any other changes.thanxs a reply would be most heplful
public class publication
public int PublicationID;
public String publicationname;
public String publisher;
public String PricePerIssue;
public String pubstatus;
public String publicationtype;
public publication(int NewPublicationID, String Newpublicationname, String Newpublisher, String NewPricePerIssue, String Newpubstatus, String Newpublicationtype)
PublicationID = NewPublicationID;
publicationname = Newpublicationname;
publisher = Newpublisher;
PricePerIssue = NewPricePerIssue;
pubstatus = Newpubstatus;
publicationtype = Newpublicationtype;
public String toString ()
String pubreport = "---------------------------Publication-Information-----------------------------";
pubreport += "Publication ID:" PublicationID"/n";
pubreport += " Publication Title:" publicationname"/n";
pubreport += " publisher: " publisher"/n";
pubreport += " price Per Issue: " PricePerIssue"/n";
pubreport += " publication Status: " pubstatus"/n";
pubreport += " publication Type: " publicationtype"/n";
return pubreport;
public void SetPublicationID(int PubID)
PublicationID = PubID;
public int GetPublicationID()
return PublicationID;
public void Setpublicationname(String pubname)
publicationname = pubname;
public String Getpublicationname()
return publicationname;
public void Setpublisher(String Pub)
publisher = Pub;
public String Getpublisher()
return publisher;
public void SetPricePerIssue(String PPI)
PricePerIssue = PPI;
public String GetPricePerIssue()
return PricePerIssue;
public void Setpubstatus(String Status)
pubstatus = Status;
public String Getpubstatus()
return pubstatus;
public void Setpublicationtype(String Pubtype)
publicationtype = Pubtype;
public String Getpublicationtype()
return publicationtype;
import java.util.*;
import publication;
public class PublicationContainer
LinkedList PubList;
public PublicationContainer()
PubList = new LinkedList();
public int add (publication newpublication)
PubList.addLast(newpublication);
return PubList.size();
private class PubNode
public publication pubrecord;
public PubNode next;
public PubNode (publication thepublicationrecord)
publication p = thepublicationrecord;
next = null;
public String toString()
return PubList.toString();
public void remove(int PubID)
PubList.remove(PubID);
public publication get(int PubID)
return (publication)PubList.get(PubID);
public void set(int PubID,publication newpublication)
PubList.set(PubID, newpublication);
import cs1.Keyboard;
import publication;
import java.util.*;
public class publicationmain
public static void main(String args[])
PublicationContainer pubdatabase = new PublicationContainer();
int userchoice;
boolean flag = false;
while (flag == false)
System.out.println("------------------------------------Publications--------------------------------");
System.out.println();
System.out.println("please Make a Selection");
System.out.println();
System.out.println("1 to add publication");
System.out.println("2 to delete publication");
System.out.println("0 to quit");
System.out.println("3 to View all publications");
System.out.println("4 to Edit a publication");
System.out.println("5 to select view of publication");
System.out.println("6 to produce daily summary");
System.out.println();
userchoice = Keyboard.readInt();
switch (userchoice)     
case 1:
String PubName;
String PricePerIssue;
String Publisher;
String Pubstatus;
String Pubtype;
int PubID;
System.out.println ("Enter Publication ID:");
PubID = Keyboard.readInt();
System.out.println("Enter Publication Name:");
PubName = Keyboard.readString();
System.out.println("Enter Publisher Name");
Publisher = Keyboard.readString();
System.out.println("Enter Price per Issue:");
PricePerIssue = Keyboard.readString();
System.out.println("Enter Publication status");
Pubstatus = Keyboard.readString();
System.out.println("Enter Publication type:");
Pubtype = Keyboard.readString();
pubdatabase.add (new publication(PubID, PubName, Publisher, PricePerIssue, Pubstatus, Pubtype));
break;
case 0:
flag = true;
case 2:
System.out.println ("Enter Publication ID:");
PubID = Keyboard.readInt();
pubdatabase.remove (PubID);
System.out.println ("publication: "+(PubID)+" removed");
System.out.println();
break;
case 3:
System.out.println (pubdatabase);
break;
case 4:
System.out.println ("Enter Publication to be edited by Publication ID: ");
PubID = Keyboard.readInt();
pubdatabase.get(PubID);
pubdatabase.set(PubID, newpublication);
default:
System.out.println("Incorrect Entry");
}

Whoops! Anyone spot the mistake?
I (blush) forgot to re-instate the serial key for the publications after reading them in from disk.
Works now ;)
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.DefaultListModel;
import javax.swing.JPanel;
import javax.swing.JOptionPane;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.Dimension;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Serializable;
class Publication
     implements Serializable
     private static final String sFileName= "Publications.ser";
     public static final byte UNKNOWN=     0;
     public static final byte HARDBACK=    1;
     public static final byte PAPERBACK=   2;
     public static final byte AUDIO=       3;
     public static final byte BRAIL=       4;
     public static final byte LARGE_PRINT= 5;
     public static final byte INSTOCK=      1;
     public static final byte BACK_ORDER=   2;
     public static final byte OUT_OF_PRINT= 3;
     private static final String[] sTypeNames=
          { "Unknown", "Hardback", "Paperback", "Audio", "Brail", "Large Print" };
     private static final String[] sStatusNames=
          { "Unknown", "In Stock", "Back Order", "Out of Print" };
     private int mId;
     private String mTitle;
     private String mAuthor;
     private String mPublisher;
     private float mPrice;
     private byte mStatus;
     private byte mType;
     private static Object sIdLock= new Object();
     static int sId;
     public Publication(
          String title, String author, String publisher,
          float price, byte status, byte type)
          setTitle(title);
          setPublisher(publisher);
          setAuthor(author);
          setPrice(price);
          setStatus(status);
          setType(type);
          synchronized (sIdLock) {
               mId= ++sId;
     public int getId() { return mId; }
     public void setTitle(String title) { mTitle= title; }
     public String getTitle() { return mTitle; }
     public void setAuthor(String author) { mAuthor= author; }
     public String getAuthor() { return mAuthor; }
     public void setPublisher(String publisher) { mPublisher= publisher; }
     public String getPublisher() { return mPublisher; }
     public void setPrice(float price) { mPrice= price; }
     public float getPrice() { return mPrice; }
     public void setStatus(byte status)
          if (status >= INSTOCK && status <= OUT_OF_PRINT)
               mStatus= status;
          else
               mStatus= UNKNOWN;
     public byte getStatus() { return mStatus; }
     public String getStatusName() { return sStatusNames[mStatus]; }
     public void setType(byte type)
          if (type >= HARDBACK && type <= LARGE_PRINT)
               mType= type;
          else
               mType= UNKNOWN;
     public byte getType() { return mType; }
     public String getTypeName() { return sTypeNames[mType]; }
     public String toString ()
          return
               " id= " +getId() +
               ", title= " +getTitle() +
               ", author= " +getAuthor() +
               ", publisher= " +getPublisher() +
               ", price= " +getPrice() +
               ", status= " +getStatus() +
               " (" +getStatusName() +")" +
               ", type= " +getType() +
               " (" +getTypeName() +")";
     private static void addPublication(DefaultListModel listModel) {
          editPublication(listModel, null);
     private static void editPublication(
          DefaultListModel listModel, Publication publication)
          JPanel panel= new JPanel(new BorderLayout());
          JPanel titlePanel= new JPanel(new GridLayout(0,1));
          JPanel fieldPanel= new JPanel(new GridLayout(0,1));
          JTextField fTitle= new JTextField(20);
          JTextField fAuthor= new JTextField();
          JTextField fPublisher= new JTextField();
          JTextField fPrice= new JTextField();
          JComboBox cbStatus= new JComboBox(sStatusNames);
          JComboBox cbType= new JComboBox(sTypeNames);
          fieldPanel.add(fTitle);
          fieldPanel.add(fAuthor);
          fieldPanel.add(fPublisher);
          fieldPanel.add(fPrice);
          fieldPanel.add(cbStatus);
          fieldPanel.add(cbType);
          titlePanel.add(new JLabel("Title:"));
          titlePanel.add(new JLabel("Author:"));
          titlePanel.add(new JLabel("Publisher: "));
          titlePanel.add(new JLabel("Price:"));
          titlePanel.add(new JLabel("Status:"));
          titlePanel.add(new JLabel("Type:"));
          panel.add(titlePanel, BorderLayout.WEST);
          panel.add(fieldPanel, BorderLayout.EAST);
          if (publication != null) {
               fTitle.setText(publication.getTitle());
               fTitle.setEditable(false);
               fAuthor.setText(publication.getAuthor());
               fPublisher.setText(publication.getPublisher());
               fPrice.setText("" +publication.getPrice());
               cbStatus.setSelectedIndex((int) publication.getStatus());
               cbType.setSelectedIndex((int) publication.getType());
          int option= JOptionPane.showOptionDialog(
               null, panel, "New Publication",
               JOptionPane.OK_CANCEL_OPTION,
               JOptionPane.PLAIN_MESSAGE,
               null, null, null
          if (option != JOptionPane.OK_OPTION)
               return;
          String title=
               fTitle.getText().length() < 1 ? "Unknown" : fTitle.getText();
          String author=
               fAuthor.getText().length() < 1 ? "Unknown" : fAuthor.getText();
          String publisher=
               fPublisher.getText().length() < 1 ? "Unknown" : fPublisher.getText();
          float price= 0.0f;
          try { price= Float.parseFloat(fPrice.getText()); }
          catch (NumberFormatException nfe) { }
          byte status= (byte) cbStatus.getSelectedIndex();
          byte type= (byte) cbType.getSelectedIndex();
          if (publication != null) {
               publication.setAuthor(author);
               publication.setPublisher(publisher);
               publication.setPrice(price);
               publication.setStatus(status);
               publication.setType(type);
          else {
               listModel.addElement(
                    new Publication(title, author, publisher, price, status, type));
     private static void deletePublications(JList list, DefaultListModel listModel)
          if (list.getSelectedIndex() >= 0) {
               Object[] values= list.getSelectedValues();
               for (int i= 0; i< values.length; i++)
                    listModel.removeElement(values);
     private static DefaultListModel getListModel()
          DefaultListModel listModel;
          try {
               ObjectInputStream is=
                    new ObjectInputStream(new FileInputStream(sFileName));
               listModel= (DefaultListModel) is.readObject();
               is.close();
               if (listModel.getSize() > 0) {
                    Publication.sId=
                         ((Publication)
                              listModel.get(listModel.getSize() -1)).getId();
          catch (Exception e) {
               JOptionPane.showMessageDialog(
                    null, "Could not find saved Publications, creating new list.",
                    "Error", JOptionPane.ERROR_MESSAGE);
               listModel= new DefaultListModel();
               // add a known book to the list (I'm pretty sure this one exists ;)
               listModel.addElement(
                    new Publication("The Bible", "Various", "God", 12.95f,
                         Publication.INSTOCK, Publication.HARDBACK));
          // add a shutdown hook to save the list model to disk when we exit
          final DefaultListModel model= listModel;
          Runtime.getRuntime().addShutdownHook(new Thread() {
               public void run() {
                    saveListModel(model);
          return listModel;
     private static void saveListModel(DefaultListModel listModel)
          try {
               ObjectOutputStream os=
                    new ObjectOutputStream(new FileOutputStream(sFileName));
               os.writeObject(listModel);
               os.close();
          catch (IOException ioe) {
               System.err.println("Failed to save Publications!");
               ioe.printStackTrace();
     public static void main(String args[])
          // store all the publications in a list model which drives the JList
          // the user will see - we save it on exit, so see if there's one on disk.
          final DefaultListModel listModel= getListModel();
          final JList list= new JList(listModel);
          // two panels, the main one for the dialog and one for buttons
          JPanel panel= new JPanel(new BorderLayout());
          JPanel btnPanel= new JPanel(new GridLayout(1,0));
          // an add button, when pressed brings up a dialog where the user can
          // enter details of a new publication
          JButton btnAdd= new JButton("Add");
          btnAdd.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent e) {
                    addPublication(listModel);
          btnPanel.add(btnAdd);
          // a delete button, when pressed it will delete all the selected list
          // items (if any) and then disable itself
          final JButton btnDelete= new JButton("Delete");
          btnDelete.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent e) {
                    deletePublications(list, listModel);
          btnDelete.setEnabled(false);
          btnPanel.add(btnDelete);
          // hook into the list selection model so we can de-activate the delete
          // button if no list items are selected.
          list.getSelectionModel().addListSelectionListener(
               new ListSelectionListener() {
                    public void valueChanged(ListSelectionEvent e) {
                         if (list.getSelectedIndices().length > 0)
                              btnDelete.setEnabled(true);
                         else
                              btnDelete.setEnabled(false);
          // Watch out for double clicks in the list and edit the document
          // selected
          list.addMouseListener(new MouseListener() {
               public void mouseClicked(MouseEvent e) {
                    if (e.getClickCount() == 2) {
                         editPublication(
                              listModel, (Publication) list.getSelectedValue());
               public void mousePressed(MouseEvent e) { }
               public void mouseReleased(MouseEvent e) { }
               public void mouseEntered(MouseEvent e) { }
               public void mouseExited(MouseEvent e) { }
          // Now keep an eye out for the user hitting return (will edit the selected
          // publication) or delete (will delete it)
          // Note: we have do the ugly "pressed" flag because JOptionPane closes
          // on keyPressed and we end up getting keyReleased. Can't use keyTypes
          // because it does not contain the virtual key code 8(
          list.addKeyListener(new KeyListener() {
               boolean pressed= false;
               public void keyTyped(KeyEvent e) { }
               public void keyPressed(KeyEvent e) {
                    pressed= true;
               public void keyReleased(KeyEvent e) {
                    if (pressed && e.getKeyCode() == e.VK_ENTER) {
                         editPublication(
                              listModel, (Publication) list.getSelectedValue());
                    else if (pressed && e.getKeyCode() == e.VK_DELETE)
                         deletePublications(list, listModel);
                    pressed= false;
          // Put the list in a scroll pane so we can see it all. Make it resonably
          // wide so we don't have top scroll horizonatly to see most publications
          JScrollPane listScrollPane= new JScrollPane(list);
          listScrollPane.setPreferredSize(new Dimension(640, 300));
          // layout the list and button panel
          panel.add(listScrollPane, BorderLayout.CENTER);
          panel.add(btnPanel, BorderLayout.SOUTH);
          // ok, ready to rumble, lets show the user what we've got
          JOptionPane.showOptionDialog(
               null, panel, "Publications",
               JOptionPane.DEFAULT_OPTION,
               JOptionPane.PLAIN_MESSAGE,
               null, new String[0], null
          // leg it
          System.exit(0);

Similar Messages

  • How can I trash a large number of Emails quickly from my iPod touch rather than using the one-at-a-time Edit method?

    How can I trash a large number of Emails quickly from my iPod touch rather than using the one-at-a-time Edit method?

    Once you tap on edit, you can select multiple emails, the tap archive.

  • Lightroom edit in problem in photoshop

    In Lightroom 5.7 CC, I experience "edit in" problem when I open a file (PSD, TIF or JPEG) to Photoshop CC.
    The following message is displayed:
    "Some of the application components are missing from the Application directory, Please reinstall the application."
    Both ACR have the same verso (8.7).
    Both Photoshop CC and Lightroom CC are up to date
    Any idea what is the problem ?
    JP

    When I define a second external editor into the Lightroom preference, pointing to the same Photoshop.app, everything work fine. It looks like Lightroom cannot set automatically the existing Photoshop CC as the primary external editor during the installation process.

  • BufferedReader's readLine() method problem (REPOST)

    Hello,
    If anyone can help me out I would not have to struggle :)
    Here is the thing. I have a file like this:
    1 srjetnuaazcebsqfbzerhxfbdfcbxyvihswlygzsfvjleengcftwvxcjriwdohjisnzppipiwpnniui yjpeppaezftgjfviwxunu
    2 ekjghqflatrcdteurofahxoiyvrwhvaxjgcuvkkpondsqhedxylxyjizflfbgusoizogbffgwnswohe njixwufcdlbjlkoqevqdy
    3 stfhcbslgcrywwrgbsqdkcxfbizvniyookceonscwugixgrxvvkxiqezltsiwhhepqusjdlkhadvkzg iefgarenbxnxtxnqdqpfh
    4 dcuefkdrkoovjwdrqbpgoirruutphuiobqweknxhboyktxzcczgekrlbfsbfuygjpheydiwaasxifph tldawxsfepotkgqqsivur
    5 fpfrspbuhangkeugfuwexsgivetovkoyloddgofdcajwwlrocgjrhonsrfrfxozvgohwoytycfjoycr xdhnhxyitkeqynedrbroh
    6 hgzqqsfgnotfepywbpccrosxborslqtkanyffrwknjapnzjnesjlkbbsckbyvgrxujqyocpcpctsqyz apcinhjyysxsdwfjugndr
    7 pltzealtrklzrugxdcskndqyvsrzncitqvjcnndeqossyrifzvbqovtdzsixjlizsbxwutgqipuxfid xyoktwupsuqbqgnxdfbze
    8 avpxfjgwpxnzfsfosgsryhpyaezigrqsxsgdvwdbwovhcchrijbitvbcvltrgvadogokaennwpjjpku uttidlnqftdnzqpqafels
    9 oyvztgletdwdtibshpzeuqryvulnubrqtgxwizfsdzqlgxvsebhslnovphgehfigbjyyqsirqcwflbn bnrflotpqytqzbgnkeyrk
    10 unvryrnlqucuydrasyzyiclnjvospzdoviqchdhasxzffblwsewikzbznyegrqtjvxfxfjenvrboofb xfsynlxhyuvqprqbvoruk
    and my java programs is like this:
    public String searchForAString(String fileName, int lineNumber)
    File fileObject = new File(fileName);
    String finalString ="";
    String record = "";
    int line;
    try
    FileInputStream fileInputStreamObject = new FileInputStream(fileObject);
    BufferedInputStream bufferedInputStreamObject = new BufferedInputStream(fileInputStreamObject);
    //DataInputStream dataInputStreamObject = new DataInputStream(bufferedInputStreamObject);
    BufferedReader bufferedReaderObject = new BufferedReader(new InputStreamReader(bufferedInputStreamObject));
    //System.out.println(bufferedReaderObject.readLine());
    //System.out.println("_____________________");
    while((bufferedReaderObject.readLine()) != null)
    System.out.println(bufferedReaderObject.readLine());
    Last System.out.println statement only displays second, forth, sixth, eigth, tenth and null lines. Why not every line? Any ideas? Thanks!
    Re: BufferedReader's readLine() method problem.
    Author: EagleEye101 Feb 18, 2005 8:48 PM (reply 1 of 1)
    You do relize that when you call the in.readLine() in your loop conditional and in your loop body it reads in diffrent lines. Try this:
    public String searchForAString(String fileName, int lineNumber)
    File fileObject = new File(fileName);
    String finalString ="";
    String record = "";
    int line;
    try
    FileInputStream fileInputStreamObject = new FileInputStream(fileObject);
    BufferedInputStream bufferedInputStreamObject = new BufferedInputStream(fileInputStreamObject);
    //DataInputStream dataInputStreamObject = new DataInputStream(bufferedInputStreamObject);
    BufferedReader bufferedReaderObject = new BufferedReader(new InputStreamReader(bufferedInputStreamObject));
    //System.out.println(bufferedReaderObject.readLine());
    //System.out.println("_____________________");
    String s = bufferedReaderObject.readLine();
    while(s != null)
    System.out.println(bufferedReaderObject.readLine());
    s = bufferedReaderObject.readLine();
    Every time you call the readLine method, it does read a diffrent line. Java does not know you want to read the same line twice.
    Tried it, did not work. I need to go through each line of the file I have. Any ideas?

    solution should be in your other thread.
    Please do not repeat threads--it really bugs the people here, just some 'nettiquite' --I don't mean to be a grouch.
    --later.  : )                                                                                                                                                                                                                                                                                                                                                       

  • Using Calendar.set() method problem

    Hi all,
    First of all sorry to bother with such a trivial(?) matter but I cannot solve it by myself.
    I have a piece of code which I simply want to handle the current date with the GregorianCalendar object so that the date would be set to the Calendar.SUNDAY (of the current week). Simple enough?
    Code as follows:
    import java.util.*;
    import java.text.*;
    public class Foo
    public static void main(String[] args)
         Foo foo = new Foo();
         Date newdate = foo.bar();
    public Date bar()
         GregorianCalendar m_calendar = new GregorianCalendar(new Locale("fi","FI"));
         m_calendar.setFirstDayOfWeek(Calendar.MONDAY);
         Date newDate = null;
         try
              m_calendar.setTime(new Date());
              System.out.println("Calendar='" + m_calendar.toString() + "'");
              m_calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
              SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
              StringBuffer sb = new StringBuffer();
              sdf.format(m_calendar.getTime(), sb, new FieldPosition(0));
              System.out.println("Date in format (" + sdf.toPattern()          + ") = '" + sb.toString() + "'");
         catch(Exception e)
              e.printStackTrace();
         return m_calendar.getTime();
    This should work at least accoring to my understanding of the SDK documentation as follows with
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
    Calendar='java.util.GregorianCalendar[time=1054636838494,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Helsinki",offset=7200000,dstSavings=3600000,useDaylight=true,transitions=118,lastRule=java.util.SimpleTimeZone[id=Europe/Helsinki,offset=7200000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2003,MONTH=5,WEEK_OF_YEAR=23,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=154,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=1,HOUR=1,HOUR_OF_DAY=13,MINUTE=40,SECOND=38,MILLISECOND=494,ZONE_OFFSET=7200000,DST_OFFSET=3600000]'
    Date in format (yyyy.MM.dd) = '2003.06.08'
    Which is the sunday of this week. But as I run the same code with:
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.06-020625-14:20)
    Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.06-JPSE_1.3.1.06_20020625 PA2.0, mixed mode)
    Calendar='java.util.GregorianCalendar[time=1054636630703,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=java.util.SimpleTimeZone[id=Europe/Helsinki,offset=7200000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2003,MONTH=5,WEEK_OF_YEAR=23,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=154,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=1,HOUR=1,HOUR_OF_DAY=13,MINUTE=37,SECOND=10,MILLISECOND=703,ZONE_OFFSET=7200000,DST_OFFSET=3600000]'
    Date in format (yyyy.MM.dd) = '2003.06.01'
    Which is sunday of the previous week and incorrect in my opinion. The latter result is run on HP-UX B.11.11 U 9000/800 and first on NT.
    Any ideas why this is happening? Thanks in advance!
    Greets, Janne

    Thanks for your answer!
    The problem is that I have to work with this older SDK version. :) But I got it solved by using the roll method with the following syntax:
    int delta = [dayToSet] - m_calendar.get(Calendar.DAY_OF_WEEK);
    in which the delta is of course the difference (negative or positive to the current day of the week)
    and then using the roll call:
    m_calendar.roll(Calendar.DAY_OF_WEEK, delta);
    which doesn't alter the current week. So this works if someone else has a similar problem with the version 1.3.1
    Greets, Janne

  • Enhance Method Problem

    I try to enhance a Method like described in this Thread...
    Re: Sending Email using the Outlook Client
    What I did so far...
    1) In Transaction "bsp_WD_CMPWB"  I choosed Component "BP_ADDR" and created a copy in our "Z_CRM" EnhancementSet
    2) I used the right Mousebutton to Enhance the "BP_ADDR/StandardAddress" View
    Two things had been automatically generated/created...
    - Table Contents BSPWD_CMP_C_REPL
    - Object ZL_BP_ADDR_STANDARDADDRES_CTXT
    3) I doubleclick on the enhanced View "BP_ADDR/StandardAddress"
        (-> In the "View Layout" node the StandardAddress.html is still using the Super Classes / Implementation Class CL_BP_ADDR_STANDARDADDRES_CN01 )
    4) If I go to Implemetation Class CL_BP_ADDR_STANDARDADDRESS_CN01
    5) Select method "GET_P_E_MAILSMT" (and look into the coding)
       The enhancement Functions there are not working for meu2026
       I tried the Button with the (Sprial / helix)
       and the Menu "Edit"-> "Enhancement Operations"
    Where is my error?! (I think I have to create a ZClass for the CL_BP_ADDR_STANDARDADDRES_CN01?!?!? But how to???)
    I will give all possible points for good answers
    Thanks for helpingu2026

    hi,
    Some times I also faced problems to create Zclass for standard ones. But you can do one trick to create Zclass.
    Try to create one dummy attribute in your context node, then it will creates  automatically Zclass for that node. Later you can delete that attribute.
    If you get any problems to create P-getter method, then copy the IF_BSP_WD_MODEL_SETTER_GETTER~_GET_P_XYZ template method and rename to GET_P_E_MAILSMT.
    regards
    Ismail

  • DataServices calling a SOAP method - problem occurs

    Hello,
    I am calling a SOAP method when an ETL problem occurs, to warn a supervision application.
    This is done by a function on which the WSDL url is given. Then it is the WSDL that gives the method parameters and also the url of the method.
    My problem is that I get this error:
    <!-- BusinessObjects Data Services generated XML -->
    <!-- 2010-09-28.10:45:57(422,412)[1] -->
    <test>
    <AL_ERROR_NUM>3</AL_ERROR_NUM>
    <AL_ERROR_MSG>
    <soap:Fault><faultcode>soap:Server</faultcode><faultstring>Could not find route for exchange: InOut[
      id: ID:10.0.10.30-12b43d06903-4:6030
      status: Active
      role: provider
      interface: {http://eventsender.esb.company.com}IEventSender
      servic
    </AL_ERROR_MSG>
    </test>
    And I don't know were the error occurs.
    The WSDL has also a 'localhost' reference, and not the IP address of the SOAP server. It seems the WSDL can't be parameterized with an IP address. Can this be a problem?:
    <wsdl:service name="EventSender">
        <wsdl:port binding="company:EventSenderSOAP" name="EventSenderSOAP">
          <soap:address location="http://localhost:8181/Esb/services/SoapEventSender"></soap:address>
        </wsdl:port>
      </wsdl:service>
    I don't know if focusing on the address or url problem is right. Any hint will be appreciated.
    Regards,
    Frédéric
    Edited by: Frederic PROVOT on Sep 28, 2010 11:14 AM

    Problem was outside of BO

  • Pbworks editing tables problem

    A problem in Firefox 6 beta 7 that was not in beta6 is that editing of tables in a wiki hosted on pbworks.com is impossible. FFox4b7 indents each column causing me to use Chrome on this site.

    Tables always exist inside a text frame. Even if it looks like a stand alone table, it's within a kissfit frame.
    In order to edit a table, you have to check out its parent frame first.
    Click inside one of the table cells. Look at the assignments panel, where all the editable stories (text frames) are listed. Is one highlighted? That will be the frame that the table belongs to. Click the Check Out button at the bottom to check out the selected story, or use any method you like to check it out.
    If you can select text inside a table but there is no story highlighted in the Assignments panel, then the designer forgot to export that text frame to InCopy format. It's read-only and uneditable by you in InCopy. Ask them to export the text frame. Then you can File > Update Design (or just close and open the file) in InCopy and you'll be able to check it out and edit it.
    AM
    incopysecrets.com

  • FP Get Image Invoke Method Problem

    I am having trouble with the Invoke Method FP Get Image (I discovered the problem by trying to use the Report Generation Toolkit -> Append Front Panel Image to Report.vi).  I am trying take an image of the entire Front Panel (not just visible) and write it to a word report.  I have software that did this beautifully in LV 8.2.1, but I recently upgraded it to 8.5.1 and it no longer works correctly.  I have attached an image to illustrate the problem.  You can see that most of the front panel exists in the image, but I have an array of XY graphs that only exists as seen on the visible front panel.  I have tried explicitly setting the option to image the entire front panel with the same results.  I dont understand how the other parts of the front panel (the numbers for each graph exist as a table of strings and are overlayed ontop of the graph, there is also a summary graph on the bottom left as well as some text on the bottom right; all of this shows up even though it is not on the visible front panel).  If anyone has seen this or something similar I would love to hear how you handled it.
    Thanks!
    Message Edited by jmcbee on 06-20-2008 12:32 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Word Report Page.PNG ‏85 KB

    Hello.  I have built a simplified version of the software that shows the problem I am having.  Please feel free to take a look and make suggestions for either a fix or workaround.  I have been in touch with an AE via phone support so NI knows about and is working on this problem.
    Thanks!
    I apologize for the double post, having some internet issues at work and I didnt think the previous post had been sent.
    Message Edited by jmcbee on 06-23-2008 09:56 AM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    FP Get Image Invoke Method Bug1.vi ‏56 KB

  • Oracle 10g Express Edition, Installation Problem

    After run
    # /etc/init.d/oracle-xe configure
    Oracle Database 10g Express Edition Configuration-------------------------------------------------This will configure on-boot properties of Oracle Database 10g ExpressEdition. The following questions will determine whether the database shouldbe starting upon system boot, the ports it will use, and the passwords thatwill be used for database accounts. Press <Enter> to accept the defaults.Ctrl-C will abort.
    Specify the HTTP port that will be used for HTML DB [8080]:8080
    Specify a port that will be used for the database listener [1521]:1521
    Specify a password to be used for database accounts. Note that the samepassword will be used for SYS, SYSTEM and FLOWS_020100. Oracle recommendsthe use of different passwords for each database account. This can be doneafter initial configuration:Confirm the password:
    Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y
    Configuring Database...Starting Oracle Net Listener.Starting Oracle Net Listener.Starting Oracle Database 10g Express Edition Instance.
    //error msg gos here
    Failed to start Oracle
    Net Listener using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr and Oracle Express Database using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus.
    in the orcale-xe service, some message shows:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl: relocation error: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/../lib/libclntsh.so.10.1: symbol semtimedop, version GLIBC_2.3.3 not defined in file libc.so.6 with link time reference
    OS: Linux RH9
    is that glibc version's problem? mine is glibc_2.3.2
    how to make it?
    thank u .

    Hello,
    I have the same problem on RH9.
    [root@phpsrv init.d]# ./oracle-xe start
    Starting Oracle Net Listener.
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl: relocation error: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/../lib/libclntsh.so.10.1: symbol semtimedop, version GLIBC_2.3.3 not defined in file libc.so.6 with link time reference
    Starting Oracle Database 10g Express Edition Instance.
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus: relocation error: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/../lib/libclntsh.so.10.1: symbol semtimedop, version GLIBC_2.3.3 not defined in file libc.so.6 with link time reference
    Failed to start Oracle Net Listener using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr and Oracle Express Database using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus.
    Regards,
    Pavel Kucera

  • Oracle 10g Express Edition installation problem in windowsXP

    while installing the Oracle 10g Express Edition in windows XP ,
    it is showing an error like this ,
    the cabinet file 'Data1.cab' required for this installation is corrupt and cannot be used. This could indicate a network error.
    If anybody knows solution to this problem plz mail me to this email id
    [email protected]

    I think you should probably download the file again, it might be corrupt.
    ~Jer

  • Bridge CS4 edit history problem with OS change from XP to 7

    I've changed my OS from XP to 7.  After reinstalling software, Bridge CS4 no longer keeps my editing steps in the "edit history" metadata.  The only steps recorded are that I've  saved a file.  I have the edit history box marked in preferences in both Bridge and PS, and have tried changing the metadata section in Preferences to session only, concise, and detailed.  None of those choices make a difference.  Any suggestions on how to get my edit history steps back in the metadata of Bridge?  I use the edit history frequently!  Thanks in advance!

    Work through all of the steps (ideas) listed at http://ppro.wikia.com/wiki/Troubleshooting
    If your problem isn't fixed after you follow all of the steps, report back with ALL OF THE DETAILS asked for in the FINALLY section, the questions at the end of the troubleshooting link... most especially the codec used... see Question 1
    Read Harm on drive setup http://forums.adobe.com/thread/662972?tstart=0
    - click the embedded picture in Harm's message to enlarge to reading size

  • Multiple Payment Methods problem in F110 - Parameters

    <b>Prob : Wehn I enter more than one payment method in Parameters in F110 only the 1st Payment method entered is saved. The other payment method gets deleted automatically.</b>
    Following is already done :
    1. All the payment methods entered in F110 Parameters is already maintained in
    the vendor master.
    2. In FBZP - Payment Method for Country & Payment Method for Company Code
    is configured for all the payment methods.
    3. Also Invoices in FI (FB60) are posted for all the payment methods without any
    errors.
    4. Ranking order is maintained for each payment method & for the house bank
    used.
    5. Account determination is also maintained for all the payment methods for the
    respective house bank.
    6. The maximum amount is also maintained for all the payment methods under "Payment Methods for Comapany Code".
    Pl help to resolve this problem.

    hi,
    My problem is in the parameter stage 1st Screen.
    Also you cannot assign more than one Payment Method in the Print Variant.
    Also this variant is used only for printing. Its not called at the stage when I am entering the Payment Method in the 1st screen in the Parameter.
    I have somewhat found out what the problem is.
    I guess there is some change done in the standard SAP program, becuase if i type more than one payment method in the Parameter 1st screen and try to save it, it returns with a warning message "Only one Payment Method can be entered". This is a unique msg which has been written through a Z Program.
    Thanks.
    Bye.

  • Batch editing ratings problems (Beatunes related)

    Is there a windows script that would enable to batch edit ratings in both the iTunes library, and within each mp3?
    Secondly, is there a way to enable half star ratings in the latest 64bit version of iTunes (running on 64bit Windows 8.1 Enterprise)?
    I've never used half star ratings on my iTunes library, and upon reading, am not certain if this is possible anymore.
    For the last few months, I've been using Beatunes to organize my large sized iTunes library, but seem to have hit some glitches related to ratings.
    In short, when I access my Itunes library via Beatunes, about 5000 songs appear to have "1/2" in the rating field.
    Itunes library seems to see these songs as having no rating.
    Beatunes does not allow ratings to be edited, and since the 1/2 is not seen in iTunes, I would select all those songs and use an empty tag (such as "Show") and designate the value as "Half". In iTunes, I would then select the "Show" column, and highlight all the songs with "Half" in the "Show" column, right click, and change the rating value for all songs. For testing purposes, I changed all songs to have 2 stars. When I sync the Beatunes database to the iTunes database, eventually the Beatuens ratings change to 2 stars (sometimes, it takes a few syncs).
    I would then go back to iTunes, right click on all selected songs, and change rating value to "None". Most ratings change to empty values, while some decide to take on hollow star values, which is really really annoying.
    I then used Steve MacGuire's ClearTrackAutoRating script on those selected tracks:
    http://samsoft.org.uk/iTunes/scripts.asp
    When I sync the Beatunes database with the iTunes database, the songs I had rated 2 stars go back to "1/2" rating, and not an empty field.
    I can't figure out what is triggering this.
    I've started a thread in Beatunes forum (http://help.beatunes.com/discussions/problems/40759-half-star-ratings-problems), but figured I would start one here to ask for advice, or see if there are any other scripts I should consider trying. At this time, I have not heard back from the developer, as I just posted it a few hours ago.
    One of the things I just tried doing was enabling iTunes to use half star ratings (so i could see the 1/2 rated songs would then show), but I have not been able to figure out how to do this. The most common way of altering iTunesPrefs.xml did not do anything for me:
    http://blog.beatunes.com/2011/08/showing-half-star-ratings-in-itunes.html
    http://www.instructables.com/id/How-To-Enable-Half-Stars-In-Itunes/
    Hence why I was wondering if this hack still works on 64bit version of iTunes (running on 64bit Windows 8.1 Enterprise).
    I also came across this:
    http://www.nextofwindows.com/interesting-tip-how-to-enable-half-star-rating-in-i tunes-in-windows/
    They suggest adding:<key>storefront</key> <string>143441-1,12</string> at the end of iTunesPrefs.xml
    This is confusing, because my prefs already contain the following at the end:
    <key>storefront</key> <string>143455-6,17</string>
    Am I supposed to keep my existent, and just add after, or do I replace what is there?
    Any help/advice would be very much appreciated.

    Hi there...
    I've had a quick check and the iTunesPrefs.xml hack works for me to enable half-ratings. Tested on iTunes 11.1.5 running on Windows 7 32-bit, but no reason to expect platform differences. This build displays ½ rather than a half-star. Once enabled you can set half-ratings via the iTunes interface. I haven't set back yet but presumably they will disappear if I do.
    The album and track ratin properties take a value from 0% to 100%. If 0% iTunes will offer a track-auto rating based on any manual album rating and an album auto-rating based upon manual track ratings. My scripts set a manual rating of 1% which iTunes treats as less than ½ and so displays as no rating, but it suppresses any auto-rating. Presumably Beatunes is treating anything from 1%-10% as ½ star, 11%-20% as 1 star, and so on. For iTunes from 0%-9% is no stars, 10%-19% is ½ star, 20%-29% is 1 star, etc., with bigger ranges when half-ratings are not enabled.
    My scripts page already has ResetAlbumAutoRating and ResetTrackAutoRating scripts if you need to remove those 1% values, or you can simply set a new rating and then remove it.
    What additional batch rating task do you have in mind?
    tt2

  • Edit locally problem

    Hello,
    I have a problem with the edit locally command. I always get the error message <i>If your application does not start, your local settings may be preventing you from editing locally.</i>when trying to edit a file locally. The settings for local editing are
    ActiveX Version Check: true 
    Active Component: ActiveX
    Java Runtime Version: 1.3
    Does anybody know help?
    Kind regards,
    Domink

    Hi Dominik,
    if you have restricted administrator permissions on you client PC the edit localy ActiveX can not be installed as mentioned in this <a href="https://forums.sdn.sap.com/thread.jspa?threadID=112607">thread</a>.
    Check the information there, or better the updated SAP Note pasted there by Michael with the number: <a href="https://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=755581&_NLANG=E">755581</a>.
    Hope it helps,
    Robert

Maybe you are looking for

  • SharePoint 2013 Office Web App issue

    We met an issue on Office Web App with SharePoint 2013. Error message on the page: Sorry, there was a problem and we can't open this document. If this happens again, try opening the Microsoft Word. There is no related log in Windows Event viewer. In

  • View 2 Processes at same time with Lookout 6.1 Web Player

    In IE7 I am trying to view two process files at the same time. I have a tab for one process and a tab for the other, but I can only view one at a time. If I am looking at the process file that is on "tab 1" then all I get is a white screen on "tab 2"

  • Downloaded podcast files not moved to recycle bin when deleted.

    I have iTunes running on two computers (home and work) both running Windows XP SP2. On my work computer, of which I am an administrator, when I right click on a downloaded podcast and select "Clear", I get a prompt asking me about moving the file to

  • See the latest blog posted today. Some questions answered.

    It seems as if some of our questions have been answered. See the new blog with new links. http://forums.verizon.com/t5/Verizon-at-Home/Partner-View-Ingersoll-Rand-on-the-Connected-Home/ba-p/... Home Monitoring and Control https://shop.verizon.com/buy

  • IPod and FM Radio

    Good day all! As the iPod evolve with time, I think it would be nice in the new firware revision to include a nice feature that would complement the iPod. As a owner of the Apple FM Tuner addon on my iPod 80Gb, it is sometime ackward to browse the FM