Hi, after a little help editing this lettering.

Hi all, I've currently got some standard lettering opened in adobe illustrator in font 'copper'
I'm looking to cut this out on my plotter and have tried this (length of vinyl is around 10cm.
When weeding the material, it's pretty difficult and some lettering lifts up with the vinyl so what I'm looking to do is add block line at the bottom 10th of the lettering.
This line will hold all the letters together.
I know I could simply add a rectangle but I'll need the bottom 10th of the lettering removed so it is not cut on the plotter.
Please help with what I can do
Thanks,

If I understand correctly, and I appologize if I don't, I think the following process will work.
I'm assuming the vinyl cutter follows the paths of the font, and if you draw a rectangle over the font to "connect" the letters, the path of the font is still active, so the cutter still follows that path and defeats the purpose of adding the "connecting" rectangle.
I would:
1. Outline the text.
2. Draw the rectangle "connecter" over the outlined text.
3. Select the rectangle and text and use the Unite function in the Pathfiner menu.
4. This will, well, unite the shapes so the paths around the text that crosses over the rectangle will be eliminated.
Hope this is on the right track and is of assistance.

Similar Messages

  • Who wants a Small Ottoman Rug or Turkish candy as A Gift after a littler help? :)

    Hi Masters;
    Well,the headline,was little seductive,but when i tell my story,you ll understand me.I am a young entrepreneur from Turkey as i mentioned,studying architecture,and i have a dream about generate my own worldwide decoration brand,i have the idea,and i know that i need firstly a prestige website for it,and as a student,its hard to find money for a professional website.
    Well,i found a really appropriate free customizable flash template on internet,design is ok but,it has little bit less pages for me.I must add 4 new pages,i do not know Adobe Flash much, as an Architecture student.This job maybe must be paided i know,but i am a student as i mentioned,but my offer at headline is valid and not a lie,if somebody has free time to do this for me,i ll send him-her a small ottoman rug as gift if post expense would be expensive,the gift eveluate to turkish delight,if give detailed adress. : ) But,im completely real at this offer
    Anybody willing,can text me on facebook;This is my profile
    http://www.facebook.com/people/Eser-G%C3%BCng%C3%B6r/534145745
    So What i want? In the template,menu bar only has three pages whiich are;
    HOME
    GALLERY
    CONTACT
    But i need 4 more pages on that menu which is like this;
    HOME (Same as template)
    INTERIOR PRODUCTS (Its gonna be ok like gallery page)
    RUG&CARPET (Its gonna be ok like another gallery page)
    ARCHITECTURE (Its gonna be ok like another gallery page)
    COMPETETIONS (Customizable blank Page)
    PRESS (Customizable blank Page)
    CONTACT (Same as with template)
    Here is the download link of this free customizable template;
    http://www.jonnyyorke.com/?p=591
    Well,if somebody interested in this warm request Please get in touch Thank you for your attention Think this as a scholarship for willing student

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions. Please keep all correspondence regarding your issue in the private support portal.

  • Clip masked image moves after save- little help please?

    Hi, All. I've been working at a printing company for the last 3 years and have seen the issue I'm about to describe only a handful of times. I'd like to understand it more and know if there is a fix that can be utilized before saving the file for production.
    So, here's my dilemma.... I've saved Illustrator EPS files that have multiple images that are placed and embedded into the document. All of the images are "cropped" using clipping masks. They have been every common type of image extension (jpg, tif, eps). The issue that I'm seeing is that one or two of the images "jump" from their original placement but we've only caught it during the rip or even after it has been printed (which makes for wasted material). The jump isn't by centimeters either. They always end up off the artboard entirely so the clipping mask shape is the only thing left in place.
    So, what's the deal? I've seen this happen in CS3 and CS4. Does anyone have a solution or an inkling of any possible reasoning behind this? I'd appreciate any and all feedback!
    Thanks!

    The majority of the files we receive are from outside sources. We have in-house preflighting as a courtesy to our clients before we print since our displays range from the very small to the very large. I haven't seen it happen with PSD files but we're too big to convert all the images we receive to PSD files. Who knows if that would even be a fix.
    I'm re-enacting the issue for you so you have a visual.
    This image is during preflight/before the file has been saved:
    This is where the image ends up after saving, closing and reopening:

  • Need a little help with this factory pattern thing..

    Evening all,
    I have an assignment to do over easter, before i start i will say i dont want any code or anything so this isnt 'cheating' or whatever..
    This was the brief:
    A vending machine dispenses tea and coffee, to which may be added milk, and 0, 1 or 2 doses of sugar. When the machine is loaded it initially contains 100 doses of tea, 100 doses of coffee 50 doses of milk and 70 doses of sugar. After it has been in use for a while it may run out one or more items. For example, it may run out of sugar, in which case it would continue to vend tea, coffee, tea with milk, and coffee with milk. Periodically, an attendant recharges the machine to full capacity with doses of coffee, tea, milk and sugar. A user selects the required beverage, selects the required amount of sugar, and selects milk if required. The machine responds with a message telling the user the cost of the drink (coffee is 30P, tea 20P, milk 10P, and sugar 5P per dose). The user inserts coins (the machine accepts 10P and 5P coins), and when the required sum or more has been inserted, the machine dispenses the beverage, and possibly some change.
    You are to write a program that simulates the above vending machine. Your solution must use the class factory pattern, and make use of the code templates provided. The user interface should be constructed with a Swing JFrame object.
    We were suppled with code for all of the classes required except for the JFrame.. They are as follows:
    public abstract class Beverage
      int sugar;
      boolean milk;
      public String getMessage()
        String name = this.getClass().getName();
        String sugarMessage = "";
        if (sugar == 1) sugarMessage = "one sugar";
        if (sugar == 2) sugarMessage = "two sugars";
        if (sugar == 0) sugarMessage = "";
        return  "Vended 1 " + name  +  (milk ? " with milk " : "") + (sugar==1 || sugar == 2 ? (milk ? "and " + sugarMessage : " with " + sugarMessage) : "");
    public class Coffee extends Beverage
      public Coffee( int sugar, boolean milk)
        this.sugar = sugar;
        this.milk = milk;
    public class Tea extends Beverage
      public Tea(int sugar, boolean milk)
        this.sugar = sugar;
        this.milk = milk;
    public class SugarButtonsGroup
      private JRadioButton jRadioButton0Sugar = new JRadioButton();
      private JRadioButton jRadioButton1Sugar = new JRadioButton();
      private JRadioButton jRadioButton2Sugar = new JRadioButton();
      private ButtonGroup sugarButtons = new ButtonGroup();
      public SugarButtonsGroup()
        jRadioButton0Sugar.setText("No sugar");
        jRadioButton1Sugar.setText("1 sugar");
        jRadioButton2Sugar.setText("2 sugars");
        sugarButtons.add(this.jRadioButton0Sugar);
        sugarButtons.add(this.jRadioButton1Sugar);
        sugarButtons.add(this.jRadioButton2Sugar);
      public int numberOfSugars()
        if (this.jRadioButton1Sugar.isSelected()) return 1;
        if (this.jRadioButton2Sugar.isSelected()) return 2;
        return 0;
      public ButtonGroup getButtonGroup()
        return sugarButtons;
      public JRadioButton getJRadioButton0Sugar()
        return jRadioButton0Sugar;
      public JRadioButton getJRadioButton1Sugar()
        return jRadioButton1Sugar;
      public JRadioButton getJRadioButton2Sugar()
        return jRadioButton2Sugar;
    public class BeverageButtonsGroup
      private JRadioButton jRadioButtonTea = new JRadioButton();
      private JRadioButton jRadioButtonCoffee = new JRadioButton();
      private ButtonGroup buttonGroup = new ButtonGroup();
      public BeverageButtonsGroup()
        buttonGroup.add(jRadioButtonTea);
        buttonGroup.add(jRadioButtonCoffee);
        jRadioButtonTea.setText("Tea");
        jRadioButtonCoffee.setText("Coffee");
        jRadioButtonCoffee.setSelected(true);
      public String getBeverageName()
        if (jRadioButtonTea.isSelected()) return "tea";
        if (jRadioButtonCoffee.isSelected()) return "coffee";
        return "";
      public ButtonGroup getBeverageButtonGroup()
        return buttonGroup;
      public JRadioButton getJRadioButtonTea()
        return jRadioButtonTea;
       public JRadioButton getJRadioButtonCoffee()
        return jRadioButtonCoffee;
    public class MilkCheck
      private JCheckBox jCheckBoxMilk = new JCheckBox();
      public MilkCheck()
        this.jCheckBoxMilk.setText("Milk");
      public JCheckBox getJCheckBoxMilk()
        return jCheckBoxMilk;
      public boolean withMilk()
        return this.jCheckBoxMilk.isSelected();
    public class CoinMechanism
      private JButton jButton5P = new JButton();
      private JButton jButton10P = new JButton();
      private JTextField jTextFieldTotal = new JTextField();
      private BeverageFactory b;
      public CoinMechanism (BeverageFactory b)
        this.b = b;
        reset();
        jTextFieldTotal.setEditable(false);
        jButton5P.setText("Insert 5 pence");
        jButton5P.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
              jButton5P_actionPerformed(e);
        jButton10P.setText("Insert 10 pence");
        jButton10P.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
              jButton10P_actionPerformed(e);
      private void jButton5P_actionPerformed(ActionEvent e)
        // to be completed
      private void jButton10P_actionPerformed(ActionEvent e)
        // to be completed
      private void notifyVend()
        b.getCoinCurrentTotal(jTextFieldTotal.getText());
      public void reset()
         this.jTextFieldTotal.setText("0");
      public JButton getJButton5P()
        return this.jButton5P;
      public JButton getJButton10P()
        return this.jButton10P;
      public JTextField getJTextFieldTotal()
        return this.jTextFieldTotal;
    public class BeverageFactory
      private int coffees;
      private int teas;
      private int milks;
      private int sugars;
      public BeverageButtonsGroup beverageButtons = new BeverageButtonsGroup();
      public SugarButtonsGroup sugarButtons = new SugarButtonsGroup();
      public MilkCheck milkCheck = new MilkCheck();
      public CoinMechanism slots = new CoinMechanism(this);
      public void setUIState()
        // sets the states of the widgets on the frame accoording to the
        // quantities of supplies in the machine
        // to be finished
      public void getCoinCurrentTotal (String o)
        // this is should be executed whenever a user puts a coin into the machine
        int foo = Integer.parseInt(o);
        // to be finished
      private int cost()
        // returns the cost of the currently selected beverage
        // to be finished
      public BeverageFactory( int coffees, int teas, int milks, int sugars)
        this.coffees = coffees;
        this.teas = teas;
        this.milks = milks;
        this.sugars = sugars;
      public void refill(int coffees, int teas, int milks, int sugars)
        // to be completed
      public Beverage makeBeverage(String name, boolean milk, int sugar)
        if (name.compareTo("coffee") == 0)
          coffees--;
          if (milk) milks--;
          sugars = sugars - sugar;
          return new Coffee(sugar,milk);
        if (name.compareTo("tea") == 0)
          teas--;
          if (milk) milks--;
          sugars = sugars - sugar;
          return new Tea(sugar, milk);
        return null;
    }Okay, well if you read through all that, blimey thanks a lot!.
    My question relates to this method in the BeverageFactory class:
    public void getCoinCurrentTotal (String o)
        // this is should be executed whenever a user puts a coin into the machine
        int foo = Integer.parseInt(o);
        // to be finished
      }I don't understand what the heck its supposed to be for..
    I can obtain the current amount of coins inserted from the textbox in the CoinMechanism class. The only thing i could think of, would be for this to enable the 'Vend' button, but it doesnt have access anyway..
    Any suggestions would be hugely appreciated, I have tried to contact the lecturer but he isnt around over easter i guess..
    Many thanks.

    I'm not going to read all that, and I don't do GUIs, so this is just a guess, but it looks like the CoinMechanism class is intended to be just a dumb processor to accept coins and determine what each coin's value is, but no to keep a running total.
    That in itself is an arguably acceptable design--one class, one job and all that. But I don't know that it makes sense to have the BeverageFactory keep the running total.
    Overall, I gotta say, I'm not impressed with your instructor's framework. Maybe it's just because I didn't look at it closely enough, or maybe it's more of a naming problem than a design problem, but it seems to me he's mixing up GUI code with business logic.
    Good luck.

  • I need a little help with this MS-6380E

    Hi my name is AttA.  Im trying to help out a friend get hism PC back up and running.  He is a new user type and has generaly screwd his pc up just being a newbie.  He asked me to Format his PC And reinstall his OS, and now here i am wonering what the heck is going on.  
    I first tried to install Win XP pro on his PC with all the hardware in it, just like it came to him when he got it.
    When the XP pro setup gets to the Copying files section it locks up.  There is no specific file it locks on up, sometimes it will do it at 3% sometimes at 17%.  It has never made it through coping the files.  At this point i decided to return the PC to minimum spec and try it out.  Ive removed all of the expansion cards, replaced the AGP GEforce TI 4600 with an old 8 meg PCI card, removed the front USB from the board, ive taken out all but 1 stick of RAM that i know to be good.  Ive also loaded Bios Defaults.
    At this point the Specs on the PC are as follows.
    Athalon 1150 CPU  (As reported by the Bios)
    MSI MS-6380E  (although the pic of the board contained in the instruction manual looks nothing like the real thing,)
    IBM Deskstar 40 Gb
    Floppy Drive
    1 Yamaha CD-RW 20/10/40  (yes ive tried other known working non writing drives.)
    1 stick DDR 2700 256mb
    Keyboard and mouse ive tried 4 sets both USB and PS/2
    Alliedc Pwr Supply  300W
    I have scanned for Viri as well as tried the drive on both busses.
    Im hoping some1 can give me a clue as to what is happening.
    Thanx for your help in advance.
    AttA
    PS pls excuse typos my keyboard at work is not the natural im used too.

    Ok so ive done more.  mabey this will help.
    Ive tried changing the RAM.  
    Ive tried A CMOS reset.
    Ive tried A new CD-ROM as CS on the secondary and slave to the HDD on the primary
    Here is the one i dont get.  Ive tried installing Win98.  and it worked.  the disk my frind has is near pristine one scratch and not nearly enough to account for multiple lockups while dealing with random files.  i suppose is possible, so im gonna try XP with a different disk if i can find one.
    I even thought well mabey its got some kind of strange super virus and its surving the format fdisk and fdisk /mbr.  So i put the HDD in a G4, knowing that a mac would erase the complete drive with out any care for boot records or any other PC crap.  nothing still locked up, although that time i copied 56% of the files before it locked up.  thats the best run yet ;(
    Thank you for the reply Mrplow that is one thing i definatly did not try that one.  Ill make sure to do that tomorrow and see what happens.  When your FSB reverts to 100, do you have problems like this?
    AttA

  • Help edit this code

    Hi I got this code of the net which displays a calendar and when a date
    is selected from the calendar it is displayed in the textfield.
    At the moment if nothing is selected from the calendar it displays the first of the month in the textField.
    I want the calendar to work in such a way that if nothing is selected from the calendar then no changes are made to the textfield.
    Can someone help me out?
    Thanks alot
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.Date;
    import java.util.Calendar;
    * dialog to allow user to select a date and return
    * a java.util.Date object
    * Creation date: (2/5/00 10:57:04 AM)
    public class DateChooser extends JDialog implements ActionListener {
         //TODO: submit to resource bundle for internationalization
         private String[] months = {"Jan","Feb", "Mar","Apr", "May","June","July","Aug","Sept","Oct","Nov","Dec"};
         private JButton[] days = null;
         private JLabel monthLabel = null;
         private Calendar calendar = null;
         private JPanel mainPanel = null;
    * DateChooser constructor comment.
    public DateChooser() {
         super();
         this.setModal(true);
         initialize();
    * deal with all the buttons that may be pressed
    * Creation date: (2/5/00 11:36:11 AM)
    * @param e java.awt.event.ActionEvent
    public void actionPerformed(ActionEvent e) {
         String text;
         if (e.getActionCommand().equals("D")){
              //return a date
              text = ((JButton) e.getSource()).getText();
              if (text.length() > 0){
                   this.returnDate(text);
              } else {
                   Toolkit.getDefaultToolkit().beep();
         } else {
              this.roll(e.getActionCommand());
    * repaint the window with the supplied calendar date
    * Creation date: (2/5/00 11:04:03 AM)
    * @param d java.util.Date
    private void caption() {
         Calendar cal = this.getCalendar();
         int startPos;
         int currentMonth = cal.get(Calendar.MONTH);
         //for painting ease, quick display
         mainPanel.setVisible(false);
         //set month
         monthLabel.setText(months[cal.get(Calendar.MONTH)] + " " + cal.get(Calendar.YEAR));
         //set to first day
         cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1);
         //now work the day labels
         startPos = cal.get(Calendar.DAY_OF_WEEK);
         for (int i = startPos - 1; i < days.length; i++) {
              days.setText(String.valueOf(cal.get(Calendar.DATE)));
              cal.roll(Calendar.DATE, true);
              if (cal.get(Calendar.DATE) == 1) {
                   //clear remaining labels going forward
                   for (int j = i + 1; j < days.length; j++) {
                        days[j].setText("");
                   break;
         //work first week
         for (int h = 0; h < startPos - 1; h++) {
              if (cal.get(Calendar.DATE) > 25 ) {
                   days[h].setText(String.valueOf(cal.get(Calendar.DATE)));
                   cal.roll(Calendar.DATE, true);
              } else {
                   days[h].setText("");
         this.setCalendar(cal);
         mainPanel.setVisible(true);
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @return java.util.Calendar
    public java.util.Calendar getCalendar() {
         if (this.calendar == null){
              calendar = Calendar.getInstance();
         return calendar;
    * set up the layout and look of the dialog
    * but don't do any data yet.
    * Creation date: (2/5/00 11:02:37 AM)
    private void initialize() {
         JButton jb;
         /* layout:
         North panel: month + year display
         Center Panel: buttons for the days, 5 by 7 grid
         South Panel: navigation buttons */
         mainPanel = new JPanel();
         JPanel northPanel = new JPanel();
         JPanel centerPanel = new JPanel();
         JPanel southPanel = new JPanel();
         //widgets
         //NORTH
         monthLabel = new JLabel(months[9] + " 1953");
         northPanel.setLayout(new FlowLayout());
         northPanel.add(monthLabel);
         //CENTER
         centerPanel.setLayout(new GridLayout(5,7));
         days = new JButton[35];
         for (int i = 0; i <35; i++){
              jb = new JButton(String.valueOf(i));
              jb.setSize(25,25);
              jb.setBorder(new EmptyBorder(1,1,1,1));
              jb.setFocusPainted(false);
              jb.setActionCommand("D");
              jb.addActionListener(this);
              days[i] = jb;
              centerPanel.add(jb);
         //SOUTH
         southPanel.setLayout(new FlowLayout());
         southPanel.add(this.makeButton("<<"));
         southPanel.add(this.makeButton("<"));
         southPanel.add(this.makeButton(">"));
         southPanel.add(this.makeButton(">>"));
         mainPanel.setLayout(new BorderLayout());
         mainPanel.add(northPanel, "North");
         mainPanel.add(centerPanel,"Center");
         mainPanel.add(southPanel, "South");
         this.getContentPane().add(mainPanel);
         this.setSize(150,150);
         caption();
    * for testing only.
    * Creation date: (2/5/00 11:19:35 AM)
    * @param args java.lang.String[]
    public static void main(String[] args) {
         try{
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         } catch (Exception e){}
         final DateChooser dc = new DateChooser();
         JFrame jf = new JFrame();
         jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
         JPanel jp = new JPanel();
         final JTextField jff = new JTextField("The date field will hold the result.");
         JButton jb = new JButton("...");
         jb.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                   dc.show();
    java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
    System.out.println(df.format(new java.util.Date()));
                   jff.setText("" + df.format(dc.getCalendar().getTime()));
         jp.add(jff);
         jp.add(jb);
         jf.getContentPane().add(jp);
         jf.setSize(300,300);
         jf.show();
         //set up location of the dialog
         dc.setLocationRelativeTo(jb);
    * return a button to the control Panel
    * Creation date: (2/5/00 10:57:59 AM)
    * @return java.lang.String
    private JButton makeButton(String caption) {
         JButton jb = new JButton(caption);
         jb.setSize(25,25);
         jb.setBorder(new EmptyBorder(1,4,1,4));
         jb.setFocusPainted(false);
         jb.setActionCommand(caption);
         jb.addActionListener(this);
         return jb;
    * roll the calendar to the day
    * then hide the dialog
    * Creation date: (2/5/00 11:40:31 AM)
    * @param day java.lang.String
    private void returnDate(String day) {
         this.getCalendar().set(this.getCalendar().get(Calendar.YEAR),this.getCalendar().get(Calendar.MONTH),Integer.parseInt(day));
         this.setVisible(false);
    * which way to roll the calendar
    * Creation date: (2/5/00 11:46:42 AM)
    * @param direction java.lang.String
    private void roll(String direction) {
         int field;
         if (direction.equals(">>")) calendar.roll(Calendar.YEAR,true);
         if (direction.equals(">")) calendar.roll(Calendar.MONTH,true);
         if (direction.equals("<<")) calendar.roll(Calendar.YEAR,false);
         if (direction.equals("<")) calendar.roll(Calendar.MONTH,false);
         caption();
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @param newCalendar java.util.Calendar
    public void setCalendar(java.util.Calendar newCalendar) {
         calendar = newCalendar;

    I don't give a stuff bout your prob... the formatting just pissed me off, thats all!
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.Date;
    import java.util.Calendar;
    * dialog to allow user to select a date and return
    * a java.util.Date object
    * Creation date: (2/5/00 10:57:04 AM)
    public class DateChooser extends JDialog implements ActionListener {
    //TODO: submit to resource bundle for internationalization
    private String[] months = {"Jan","Feb", "Mar","Apr", "May","June","July","Aug","Sept","Oct","Nov","Dec"};
    private JButton[] days = null;
    private JLabel monthLabel = null;
    private Calendar calendar = null;
    private JPanel mainPanel = null;
    * DateChooser constructor comment.
    public DateChooser() {
    super();
    this.setModal(true);
    initialize();
    * deal with all the buttons that may be pressed
    * Creation date: (2/5/00 11:36:11 AM)
    * @param e java.awt.event.ActionEvent
    public void actionPerformed(ActionEvent e) {
    String text;
    if (e.getActionCommand().equals("D")){
    //return a date
    text = ((JButton) e.getSource()).getText();
    if (text.length() > 0){
    this.returnDate(text);
    } else {
    Toolkit.getDefaultToolkit().beep();
    } else {
    this.roll(e.getActionCommand());
    * repaint the window with the supplied calendar date
    * Creation date: (2/5/00 11:04:03 AM)
    * @param d java.util.Date
    private void caption() {
    Calendar cal = this.getCalendar();
    int startPos;
    int currentMonth = cal.get(Calendar.MONTH);
    //for painting ease, quick display
    mainPanel.setVisible(false);
    //set month
    monthLabel.setText(months[cal.get(Calendar.MONTH)] + " " + cal.get(Calendar.YEAR));
    //set to first day
    cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1);
    //now work the day labels
    startPos = cal.get(Calendar.DAY_OF_WEEK);
    for (int i = startPos - 1; i < days.length; i++) {
    days.setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    if (cal.get(Calendar.DATE) == 1) {
    //clear remaining labels going forward
    for (int j = i + 1; j < days.length; j++) {
    days[j].setText("");
    break;
    //work first week
    for (int h = 0; h < startPos - 1; h++) {
    if (cal.get(Calendar.DATE) > 25 ) {
    days[h].setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    } else {
    days[h].setText("");
    this.setCalendar(cal);
    mainPanel.setVisible(true);
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @return java.util.Calendar
    public java.util.Calendar getCalendar() {
    if (this.calendar == null){
    calendar = Calendar.getInstance();
    return calendar;
    * set up the layout and look of the dialog
    * but don't do any data yet.
    * Creation date: (2/5/00 11:02:37 AM)
    private void initialize() {
    JButton jb;
    /* layout:
    North panel: month + year display
    Center Panel: buttons for the days, 5 by 7 grid
    South Panel: navigation buttons */
    mainPanel = new JPanel();
    JPanel northPanel = new JPanel();
    JPanel centerPanel = new JPanel();
    JPanel southPanel = new JPanel();
    //widgets
    //NORTH
    monthLabel = new JLabel(months[9] + " 1953");
    northPanel.setLayout(new FlowLayout());
    northPanel.add(monthLabel);
    //CENTER
    centerPanel.setLayout(new GridLayout(5,7));
    days = new JButton[35];
    for (int i = 0; i <35; i++){
    jb = new JButton(String.valueOf(i));
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,1,1,1));
    jb.setFocusPainted(false);
    jb.setActionCommand("D");
    jb.addActionListener(this);
    days = jb;
    centerPanel.add(jb);
    //SOUTH
    southPanel.setLayout(new FlowLayout());
    southPanel.add(this.makeButton("<<"));
    southPanel.add(this.makeButton("<"));
    southPanel.add(this.makeButton(">"));
    southPanel.add(this.makeButton(">>"));
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(northPanel, "North");
    mainPanel.add(centerPanel,"Center");
    mainPanel.add(southPanel, "South");
    this.getContentPane().add(mainPanel);
    this.setSize(150,150);
    caption();
    * for testing only.
    * Creation date: (2/5/00 11:19:35 AM)
    * @param args java.lang.String[]
    public static void main(String[] args) {
    try{
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e){}
    final DateChooser dc = new DateChooser();
    JFrame jf = new JFrame();
    jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    JPanel jp = new JPanel();
    final JTextField jff = new JTextField("The date field will hold the result.");
    JButton jb = new JButton("...");
    jb.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    dc.show();
    java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
    System.out.println(df.format(new java.util.Date()));
    jff.setText("" + df.format(dc.getCalendar().getTime()));
    jp.add(jff);
    jp.add(jb);
    jf.getContentPane().add(jp);
    jf.setSize(300,300);
    jf.show();
    //set up location of the dialog
    dc.setLocationRelativeTo(jb);
    * return a button to the control Panel
    * Creation date: (2/5/00 10:57:59 AM)
    * @return java.lang.String
    private JButton makeButton(String caption) {
    JButton jb = new JButton(caption);
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,4,1,4));
    jb.setFocusPainted(false);
    jb.setActionCommand(caption);
    jb.addActionListener(this);
    return jb;
    * roll the calendar to the day
    * then hide the dialog
    * Creation date: (2/5/00 11:40:31 AM)
    * @param day java.lang.String
    private void returnDate(String day) {
    this.getCalendar().set(this.getCalendar().get(Calendar.YEAR),this.getCalendar().get(Calendar.MONTH),Integer.parseInt(day));
    this.setVisible(false);
    * which way to roll the calendar
    * Creation date: (2/5/00 11:46:42 AM)
    * @param direction java.lang.String
    private void roll(String direction) {
    int field;
    if (direction.equals(">>")) calendar.roll(Calendar.YEAR,true);
    if (direction.equals(">")) calendar.roll(Calendar.MONTH,true);
    if (direction.equals("<<")) calendar.roll(Calendar.YEAR,false);
    if (direction.equals("<")) calendar.roll(Calendar.MONTH,false);
    caption();
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @param newCalendar java.util.Calendar
    public void setCalendar(java.util.Calendar newCalendar) {
    calendar = newCalendar;
    }

  • Help edit this code pliz

    Hi I got this code of the net which displays a calendar and when a date
    is selected from the calendar it is displayed in the textfield.
    At the moment if nothing is selected from the calendar it displays the first of the month in the textField.
    I want the calendar to work in such a way that if nothing is selected from the calendar then no changes are made to the textfield.
    Can someone help me out?
    Well the thing to look at is the main method.
    the main method:
    jb.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                   dc.show();
                   jff.setText("" + dc.getCalendar().getTime());     
    The component works by exposing a Calendar object,
    which has been initialized to the first of the month.
    I think to change this, you would need to wrap the Calendar in
    a new method of Datechooser, like getDateText(). It
    would have code like
    return this.dateTextString;
    The DateChooser's actionPerformed method would need to
    update the dateTextString variable that this new
    method would expose...
    I don't have time to do this... can someone do this for me....pliz
    Thanks alot
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.Date;
    import java.util.Calendar;
    * dialog to allow user to select a date and return
    * a java.util.Date object
    * Creation date: (2/5/00 10:57:04 AM)
    public class DateChooser extends JDialog implements ActionListener {
    //TODO: submit to resource bundle for internationalization
    private String[] months = {"Jan","Feb", "Mar","Apr", "May","June","July","Aug","Sept","Oct","Nov","Dec"};
    private JButton[] days = null;
    private JLabel monthLabel = null;
    private Calendar calendar = null;
    private JPanel mainPanel = null;
    * DateChooser constructor comment.
    public DateChooser() {
    super();
    this.setModal(true);
    initialize();
    * deal with all the buttons that may be pressed
    * Creation date: (2/5/00 11:36:11 AM)
    * @param e java.awt.event.ActionEvent
    public void actionPerformed(ActionEvent e) {
    String text;
    if (e.getActionCommand().equals("D")){
    //return a date
    text = ((JButton) e.getSource()).getText();
    if (text.length() > 0){
    this.returnDate(text);
    } else {
    Toolkit.getDefaultToolkit().beep();
    } else {
    this.roll(e.getActionCommand());
    * repaint the window with the supplied calendar date
    * Creation date: (2/5/00 11:04:03 AM)
    * @param d java.util.Date
    private void caption() {
    Calendar cal = this.getCalendar();
    int startPos;
    int currentMonth = cal.get(Calendar.MONTH);
    //for painting ease, quick display
    mainPanel.setVisible(false);
    //set month
    monthLabel.setText(months[cal.get(Calendar.MONTH)] + " " + cal.get(Calendar.YEAR));
    //set to first day
    cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1);
    //now work the day labels
    startPos = cal.get(Calendar.DAY_OF_WEEK);
    for (int i = startPos - 1; i < days.length; i++) {
    days.setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    if (cal.get(Calendar.DATE) == 1) {
    //clear remaining labels going forward
    for (int j = i + 1; j < days.length; j++) {
    days[j].setText("");
    break;
    //work first week
    for (int h = 0; h < startPos - 1; h++) {
    if (cal.get(Calendar.DATE) > 25 ) {
    days[h].setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    } else {
    days[h].setText("");
    this.setCalendar(cal);
    mainPanel.setVisible(true);
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @return java.util.Calendar
    public java.util.Calendar getCalendar() {
    if (this.calendar == null){
    calendar = Calendar.getInstance();
    return calendar;
    * set up the layout and look of the dialog
    * but don't do any data yet.
    * Creation date: (2/5/00 11:02:37 AM)
    private void initialize() {
    JButton jb;
    /* layout:
    North panel: month + year display
    Center Panel: buttons for the days, 5 by 7 grid
    South Panel: navigation buttons */
    mainPanel = new JPanel();
    JPanel northPanel = new JPanel();
    JPanel centerPanel = new JPanel();
    JPanel southPanel = new JPanel();
    //widgets
    //NORTH
    monthLabel = new JLabel(months[9] + " 1953");
    northPanel.setLayout(new FlowLayout());
    northPanel.add(monthLabel);
    //CENTER
    centerPanel.setLayout(new GridLayout(5,7));
    days = new JButton[35];
    for (int i = 0; i <35; i++){
    jb = new JButton(String.valueOf(i));
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,1,1,1));
    jb.setFocusPainted(false);
    jb.setActionCommand("D");
    jb.addActionListener(this);
    days = jb;
    centerPanel.add(jb);
    //SOUTH
    southPanel.setLayout(new FlowLayout());
    southPanel.add(this.makeButton("<<"));
    southPanel.add(this.makeButton("<"));
    southPanel.add(this.makeButton(">"));
    southPanel.add(this.makeButton(">>"));
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(northPanel, "North");
    mainPanel.add(centerPanel,"Center");
    mainPanel.add(southPanel, "South");
    this.getContentPane().add(mainPanel);
    this.setSize(150,150);
    caption();
    * for testing only.
    * Creation date: (2/5/00 11:19:35 AM)
    * @param args java.lang.String[]
    public static void main(String[] args) {
    try{
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e){}
    final DateChooser dc = new DateChooser();
    JFrame jf = new JFrame();
    jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    JPanel jp = new JPanel();
    final JTextField jff = new JTextField("The date field will hold the result.");
    JButton jb = new JButton("...");
    jb.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    dc.show();
    java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
    System.out.println(df.format(new java.util.Date()));
    jff.setText("" + df.format(dc.getCalendar().getTime()));
    jp.add(jff);
    jp.add(jb);
    jf.getContentPane().add(jp);
    jf.setSize(300,300);
    jf.show();
    //set up location of the dialog
    dc.setLocationRelativeTo(jb);
    * return a button to the control Panel
    * Creation date: (2/5/00 10:57:59 AM)
    * @return java.lang.String
    private JButton makeButton(String caption) {
    JButton jb = new JButton(caption);
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,4,1,4));
    jb.setFocusPainted(false);
    jb.setActionCommand(caption);
    jb.addActionListener(this);
    return jb;
    * roll the calendar to the day
    * then hide the dialog
    * Creation date: (2/5/00 11:40:31 AM)
    * @param day java.lang.String
    private void returnDate(String day) {
    this.getCalendar().set(this.getCalendar().get(Calendar.YEAR),this.getCalendar().get(Calendar.MONTH),Integer.parseInt(day));
    this.setVisible(false);
    * which way to roll the calendar
    * Creation date: (2/5/00 11:46:42 AM)
    * @param direction java.lang.String
    private void roll(String direction) {
    int field;
    if (direction.equals(">>")) calendar.roll(Calendar.YEAR,true);
    if (direction.equals(">")) calendar.roll(Calendar.MONTH,true);
    if (direction.equals("<<")) calendar.roll(Calendar.YEAR,false);
    if (direction.equals("<")) calendar.roll(Calendar.MONTH,false);
    caption();
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @param newCalendar java.util.Calendar
    public void setCalendar(java.util.Calendar newCalendar) {
    calendar = newCalendar;

    there are 2 errors in ur code which i removed and run the application.I dont understand really what is ur task??the text filed shows this text "The date field will hold the result." if calender is not selected.here is ur code.now withour errors
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.Date;
    import java.util.Calendar;
    * dialog to allow user to select a date and return
    * a java.util.Date object
    * Creation date: (2/5/00 10:57:04 AM)
    public class DateChooser extends JDialog implements ActionListener {
    //TODO: submit to resource bundle for internationalization
    private String[] months = {"Jan","Feb", "Mar","Apr", "May","June","July","Aug","Sept","Oct","Nov","Dec"};
    private JButton[] days = null;
    private JLabel monthLabel = null;
    private Calendar calendar = null;
    private JPanel mainPanel = null;
    * DateChooser constructor comment.
    public DateChooser() {
    super();
    this.setModal(true);
    initialize();
    * deal with all the buttons that may be pressed
    * Creation date: (2/5/00 11:36:11 AM)
    * @param e java.awt.event.ActionEvent
    public void actionPerformed(ActionEvent e) {
    String text;
    if (e.getActionCommand().equals("D")){
    //return a date
    text = ((JButton) e.getSource()).getText();
    if (text.length() > 0){
    this.returnDate(text);
    } else {
    Toolkit.getDefaultToolkit().beep();
    } else {
    this.roll(e.getActionCommand());
    * repaint the window with the supplied calendar date
    * Creation date: (2/5/00 11:04:03 AM)
    * @param d java.util.Date
    private void caption() {
    Calendar cal = this.getCalendar();
    int startPos;
    int currentMonth = cal.get(Calendar.MONTH);
    //for painting ease, quick display
    mainPanel.setVisible(false);
    //set month
    monthLabel.setText(months[cal.get(Calendar.MONTH)] + " " + cal.get(Calendar.YEAR));
    //set to first day
    cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1);
    //now work the day labels
    startPos = cal.get(Calendar.DAY_OF_WEEK);
    for (int i = startPos - 1; i < days.length; i++) {
    days.setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    if (cal.get(Calendar.DATE) == 1) {
    //clear remaining labels going forward
    for (int j = i + 1; j < days.length; j++) {
    days[j].setText("");
    break;
    //work first week
    for (int h = 0; h < startPos - 1; h++) {
    if (cal.get(Calendar.DATE) > 25 ) {
    days[h].setText(String.valueOf(cal.get(Calendar.DATE)));
    cal.roll(Calendar.DATE, true);
    } else {
    days[h].setText("");
    this.setCalendar(cal);
    mainPanel.setVisible(true);
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @return java.util.Calendar
    public java.util.Calendar getCalendar() {
    if (this.calendar == null){
    calendar = Calendar.getInstance();
    return calendar;
    * set up the layout and look of the dialog
    * but don't do any data yet.
    * Creation date: (2/5/00 11:02:37 AM)
    private void initialize() {
    JButton jb;
    /* layout:
    North panel: month + year display
    Center Panel: buttons for the days, 5 by 7 grid
    South Panel: navigation buttons */
    mainPanel = new JPanel();
    JPanel northPanel = new JPanel();
    JPanel centerPanel = new JPanel();
    JPanel southPanel = new JPanel();
    //widgets
    //NORTH
    monthLabel = new JLabel(months[9] + " 1953");
    northPanel.setLayout(new FlowLayout());
    northPanel.add(monthLabel);
    //CENTER
    centerPanel.setLayout(new GridLayout(5,7));
    days = new JButton[35];
    for (int i = 0; i <35; i++){
    jb = new JButton(String.valueOf(i));
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,1,1,1));
    jb.setFocusPainted(false);
    jb.setActionCommand("D");
    jb.addActionListener(this);
    days[i] = jb;
    centerPanel.add(jb);
    //SOUTH
    southPanel.setLayout(new FlowLayout());
    southPanel.add(this.makeButton("<<"));
    southPanel.add(this.makeButton("<"));
    southPanel.add(this.makeButton(">"));
    southPanel.add(this.makeButton(">>"));
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(northPanel, "North");
    mainPanel.add(centerPanel,"Center");
    mainPanel.add(southPanel, "South");
    this.getContentPane().add(mainPanel);
    this.setSize(150,150);
    caption();
    * for testing only.
    * Creation date: (2/5/00 11:19:35 AM)
    * @param args java.lang.String[]
    public static void main(String[] args) {
    try{
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e){}
    final DateChooser dc = new DateChooser();
    JFrame jf = new JFrame();
    jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    JPanel jp = new JPanel();
    final JTextField jff = new JTextField("The date field will hold the result.");
    JButton jb = new JButton("...");
    jb.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    dc.show();
    java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
    System.out.println(df.format(new java.util.Date()));
    jff.setText("" + df.format(dc.getCalendar().getTime()));
    jp.add(jff);
    jp.add(jb);
    jf.getContentPane().add(jp);
    jf.setSize(300,300);
    jf.show();
    //set up location of the dialog
    dc.setLocationRelativeTo(jb);
    * return a button to the control Panel
    * Creation date: (2/5/00 10:57:59 AM)
    * @return java.lang.String
    private JButton makeButton(String caption) {
    JButton jb = new JButton(caption);
    jb.setSize(25,25);
    jb.setBorder(new EmptyBorder(1,4,1,4));
    jb.setFocusPainted(false);
    jb.setActionCommand(caption);
    jb.addActionListener(this);
    return jb;
    * roll the calendar to the day
    * then hide the dialog
    * Creation date: (2/5/00 11:40:31 AM)
    * @param day java.lang.String
    private void returnDate(String day) {
    this.getCalendar().set(this.getCalendar().get(Calendar.YEAR),this.getCalendar().get(Calendar.MONTH),Integer.parseInt(day));
    this.setVisible(false);
    * which way to roll the calendar
    * Creation date: (2/5/00 11:46:42 AM)
    * @param direction java.lang.String
    private void roll(String direction) {
    int field;
    if (direction.equals(">>")) calendar.roll(Calendar.YEAR,true);
    if (direction.equals(">")) calendar.roll(Calendar.MONTH,true);
    if (direction.equals("<<")) calendar.roll(Calendar.YEAR,false);
    if (direction.equals("<")) calendar.roll(Calendar.MONTH,false);
    caption();
    * Insert the method's description here.
    * Creation date: (2/5/00 1:12:24 PM)
    * @param newCalendar java.util.Calendar
    public void setCalendar(java.util.Calendar newCalendar) {
    calendar = newCalendar;

  • Need a little help with this code

    Hi,
    right now I'm going through the xmlmenu tutorial, which I've
    found at kirupa.com. It's pretty much clear to me. Then I decided
    to try to import a blur filter. And as soon as I wright the import
    flash.filter line, I get a syntax error. Where is the problem? How
    do I get button's blurx/y = 0 onRollover? I was thinking to apply
    the filter to menuitem mc (see the code)
    Here's the code

    yes, you are right - flash.filters. Another "syntax error"
    ;-). I did manage to get it work (the import line part). My next
    question is to which MC must I apply the blur filter to get next
    result:
    by default the buttons are blured. OnRollOver the button gets
    cleared of blur. Here's my blur code:
    var myBlur = new flash.filters.BlurFilter(20,20,2);
    var myTempFilters:Array = _root.mainmenu_mc.filters;
    ->which MC must be here to get the wanted result??????
    myTempFilters.push(myBlur);
    _root.mainmenu_mc.filters = myTempFilters;
    curr_item.onRollOut = function() {
    myBlur.blurX = 20;
    myBlur.blurY = 20;
    this.filters = new Array(myBlur);
    curr_item.onRollOver = function() {
    myBlur.blurX = 0;
    myBlur.blurY = 0;
    this.filters = new Array(myBlur);
    THX for your help

  • Little help with this regular expression ?

    Greetings all,
    My string is like "P: A104, P105, K106" and I tried to split it using following regular expression ,but seems even though it returns 'true' as matched, it does not split the string.
    Finally what I want is String is array like {"P:","A104","P105","K106"}
    What seems to be the problem with my regular expression?
           String PAT1="[a-zA-Z]:\\s([a-zA-Z]\\d{1,}([,]\\s)?)*";
         String inp="P: A104, P105, K106";
         Pattern p=Pattern.compile(PAT1);
         System.out.println(p.matcher(inp).matches());
         String strs[]=inp.split(PAT1);
         for(String s:strs){
              System.out.println("part  "+s);
         }

    pankajjaiswal10 wrote:
    You can also use split(":|,")No, that will remove the colon and leave the whitespace intact. My understanding is that the OP wants to keep the colon and remove the commas and whitespace. I would use this: String[] strs = inp.split(",?\\s+");

  • A little help with this code?

    I have a script that reads email in Outlook for Web, generates the folder structure by parsing the subject line, then downloads the file into the folder it just created.C#foreach (Item myItem in findResults.Items) { if (myItem is EmailMessage) { Console.WriteLine((myItem as EmailMessage).Subject); string strSubject = (myItem as EmailMessage).Subject; string[] strDelimiters = { " - ", " - " }; string []strTemp; string []strFolders; string strFileUrl; strTemp = strSubject.Split(strDelimiters, StringSplitOptions.None); strDelimiters[0] = " "; strDelimiters[1] = " "; strFolders = strTemp[1].Split(strDelimiters, 2, StringSplitOptions.None); strFolders[1] = strFolders[1].Replace('', '_'); //strFolderPath = preDownload(strFolders[0], strFolders[1]); // get message body PropertySet psPropset = new PropertySet(); psPropset.RequestedBodyType = ...
    This topic first appeared in the Spiceworks Community

    I have a script that reads email in Outlook for Web, generates the folder structure by parsing the subject line, then downloads the file into the folder it just created.C#foreach (Item myItem in findResults.Items) { if (myItem is EmailMessage) { Console.WriteLine((myItem as EmailMessage).Subject); string strSubject = (myItem as EmailMessage).Subject; string[] strDelimiters = { " - ", " - " }; string []strTemp; string []strFolders; string strFileUrl; strTemp = strSubject.Split(strDelimiters, StringSplitOptions.None); strDelimiters[0] = " "; strDelimiters[1] = " "; strFolders = strTemp[1].Split(strDelimiters, 2, StringSplitOptions.None); strFolders[1] = strFolders[1].Replace('', '_'); //strFolderPath = preDownload(strFolders[0], strFolders[1]); // get message body PropertySet psPropset = new PropertySet(); psPropset.RequestedBodyType = ...
    This topic first appeared in the Spiceworks Community

  • Hello, need a little help with this program

    i have this program and i cant see whats wrong with it. but when i run it the error "Exception in thread 'main' java.lang.NoSuchMethodError: main"
    anyone know what wrong?
    class Assignment2
       public final
       void main( String[] argv )
           Script sc = new Script ("Assignment2.txt");
           KeyboardReader kb = new KeyboardReader();
         System.out.println( "Enter Time In 24hr Mode (use -999 to quit) : " );
         int time = kb.getInt();
         if (time == -999) {     System.out.println( "EXIT" );}
         System.out.println( "" );
         System.out.println( "Enter The Distance Of The Call (use -999 to quit) : " );
         int distance = kb.getInt();
         if (distance == -999) {     System.out.println( "EXIT" );}
           System.out.println( "" );
         System.out.println( "Enter Length Of Call In Minutes (use -999 to quit) : " );
         double length = kb.getDouble();
         if (length == -999) {System.out.println( "EXIT" );}     
           System.out.println( "" );
           Calculation (time, distance, length);
       }// end main
    public void Calculation (int time, int distance, double length)
              while (time != -999 || distance != -999 || length != -999)
                   if (700 <= time && time <= 1900 && distance <= 100)
                          System.out.println( "Cost of call is $0.60 per minute" );
                          double cost = 0.60 * length;
                          System.out.println( "That call will cost $ " + cost );
                     if  (700 <= time && time <= 1900 && distance > 100)
                          System.out.println( "Cost of call is $1.10 per minute" );
                          double cost = 1.10 * length;
                          System.out.println( "That call will cost $ " + cost );
                     if  (700 <= time && time <= 1900 && distance > 100)
                          System.out.println( "Cost of call is $1.10 per minute" );
                          double cost = 1.10 * length;
                          System.out.println( "That call will cost $ " + cost );
                System.out.println( "EXIT" );            
      }//end calculation
    }//end class
    //----------------------------------------------------------------------------------------------------

    i have this program and i cant see whats wrong with
    it. but when i run it the error "Exception in thread
    'main' java.lang.NoSuchMethodError: main"
    anyone know what wrong?When you get exceptions you also get a stack trace pointing you at the exact line where the exception occured in your code.

  • Need a little help with this method

    this is what i need to do:
    Add a static method Account consolidate(Account acct1, Account acct2) to your Account class that creates a new
    account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should
    be returned. Two important rules of consolidation:
    ? Only accounts with the same name can be consolidated. The new account gets the name on the old accounts but a
    new account number (a random number).
    ? Two accounts with the same number cannot be consolidated. Otherwise this would be an easy way to double your
    money!
    right now i have this code but im not too positive i did it right (and i know its not done, but i just need some tips on what to do)
         public static Account AccountConsolidate(Account acct1, Account acct2)
              String name1 = acct1.getName();
              String name2 = acct2.getName();
              if(name1.equals(name2));
              newAccount = acct1.getBalance() + acct2.getBalance();
              newAccount = newAccount.getAcctNum();
              close acct2;
              return newAccount;
         }

    1. "close" is not a Java keyword.
    2. "newAccount" is being assigned twice.
    Not that there's anything wrong with that but what's
    the first assignment doing?
    3. "newAccount" seems to be an int but your
    method signature says to return an Account
    object.this is my entire code, and i made some changes in the consolidateAccount method
    // Account.java
    // A bank account class with methods to deposit to, withdraw from,
    // change the name on, and get a String representation
    // of the account.
    public class Account
         private double balance;
         private String name;
         private long acctNum;
         private static int numAccounts;
         private double newAccount;
    //Constructor -- initializes balance, owner, and account number
         public Account(double initBal, String owner, long number)
              balance = initBal;
              name = owner;
              acctNum = number;
              numAccounts++;
    // Checks to see if balance is sufficient for withdrawal.
    // If so, decrements balance by amount; if not, prints message.
         public void withdraw(double amount)
              if (balance >= amount)
              balance -= amount;
              else
              System.out.println("Insufficient funds");
    // Adds deposit amount to balance.
         public void deposit(double amount)
              balance += amount;
    // Returns balance.
         public double getBalance()
              return balance;
    //Returns number of accounts created
         public static int getNumAccounts()
              return numAccounts;
    // Returns name on the account
         public String getName()
              return name;
    // Returns account number
         public long getAcctNum()
              return acctNum;
    // Close the current account.
         public void close()
              if (balance == 0)
              numAccounts--;
              System.out.println("CLOSED");
    // Consolidates two accounts into one account.
         public static Account AccountConsolidate(Account acct1, Account acct2)
              String name1 = acct1.getName();
              String name2 = acct2.getName();
              if(name1.equals(name2));
              newAccount = acct1.getBalance() + acct2.getBalance();
              newAccount = newAccount.getAcctNum();
              Account consolidated = new Account(balance, name, newNumber);
              return consolidated;
    // Returns a string containing the name, account number, and balance.
         public String toString()
              return "Name:" + name +
              "\nAccount Number: " + acctNum +
              "\nBalance: " + balance;
         

  • P2 Editors - Little help - Is this a Known Issue?

    Does PPro crash with large P2 files?
    Just upgraded our systems to cs5.5 - They all crash when playing P2 AVCIntra 100mbs files larger than 4gb. Tested on three different PC's and any P2 file that is larger than the base 4gb crashes PPro 5.5 while scrubbing through timeline - but the same files work fine on those same PC's while in PPro 5.0. 
    Its been many days since i last spoke with Adobe tech support (no surprise there - they were going to get right back to us while raising the case to tier 2 support) - and seemingly wasted 14 hours over three days with them prior to that.
    Also, understanding the P2 file structure, do your video files within PPro show the full amount of all the files within a clip? or should it just show as 4gb?? -- when, in this case, most are 20 -30gb.  Both our 5.0 and 5.5 systems show 4gb even if they are more.
    Thanks for any input or quick testing anyone might do on this?

    Thank you for the replys guys!
    Jim, I am not sure what you mean but I believe that I understand the P2 file structure and the 4gb limits of fat32 - and the spanning.
    Heres whats happening:
    Direct copy and paste via laptop from P2 card (recorded by HPX370) to PC hard drive.
    AVCIntra 100mbs files imported through media browser
    Clips play fine in the preview monitor- no crash from preview monitor. (i understand that the preview monitor is a totally different animal than the timeline playback)
    PPro crashes while scrubbing through the totality of these long clips on timeline - Sometimes it takes 40 or 50 secs but eventually it always crashes when moving the cti around that long clip.
    If i am careful, i can keep it from crashing by not being aggressive with scrubbing. I assume that if I manage to stay in any one 4gb chunk its ok with that but once I start going from one end of the clip to the other quickly it crashes. No blue screen just PPro stops working.
    Note: Any clip that is shorter than the 4gb has no issue. And I have duplicated this same issue on three very different rigs - I know that sound nuts, I am baffled as well.
    To be clear on the file size - All the project panel information is complete and correct- timecode, duration etc.  But, any clip which is longer and larger than 4gb only shows as 4gb when right click to properties. - thats actually technically correct, but its been a topic of discussion  as to whether or not it should show the size for that file - OR the size of all spanned clips???  I have been working with P2 for four years and have never seen it read larger than 4gb - I bet if you checked you might find it the same?  All that said, I dont know that that is an issue or even related to my real problem of crashing while scrubbing on the timeline.
    Might one of you be able to test a large clip and let me know what the properties of the file in the project panel show as? - It'd be great if I could rule that out.
    Thank You!

  • A little help fixing this design for IE please

    In FF all fine but in IE 7 (using vista havent got multiple
    IEz installed) the very top of the page is a mess.
    Other parts are also out of shape but im confident i can fix
    em but the very top part with the text enlarge and contrast buttons
    please give me a hand if you have a spare moment.
    many thanks

    SORRY
    LINK
    http://www.healthhokkaido.com/article/counsel_main.cfm

  • Help editing 720p video On Sony FW21m Laptop

    Hi I wonder if you can help me? I would like to edit 720p at 60 frames per second but my laptop is a little under spec so I am wondering if you can make any suggestions without replacing the mahine. Heres what im running:
    Windows 7 64 bit
    Adobe CS3 64 bit
    4GB kit (2GBx2)  DDR2 PC2-6400 • CL=6 • Unbuffered
    320gb Hard drive 7200 rpm with Serial ATA-300, 16 MB,
    Processor is Intel Core 2 duo P8600 2.4ghz (3M Cache, 2.40 GHz, 1066 MHz FSB)
    The graphics card is Graphics Controller: ATI Mobility Radeon HD 3470 - 256 MB
    The computer has a firewire port and usb 2.0
    I have an external 1000GB 5400rpm drive
    and a 500GB 7200rpm 16mb cache Internal drive which I have a usb external enclosure for But I could get a firewire enclosure if that would help
    I want to be able to edit fotage from a Canon EOS 550D at frame rates 1280 x 720 at 60 frames per second the files are .MOV with h.264 encoding
    It would also be helpful if I could occassionally use 1920 1080 at 30 frames. But this is not essential
    Is there any way I can edit these files using Adobe Premiere - any version? or are there any pther packages that may help?
    What improvements can I make? Would it help to set up an external firewire drive to output to. Additionally an external USB 7200rpm to source the clips from? And how does this set up work?
    Any suggestions would be really appreciated
    Simon
    Im not sure what additional modifications I can make to help edit this footage. I have looked at upgrading the processor to an I5 but im not sure if it is possible or would help.
    Alternatively if this is a lost cause can anyone refer me to a cheap laptop that is capale of editing 720p 60 frame files from a Canon DSLR

    I once worked in a film crew where i made a steadycam from a brick, a hinge
    and an elastic band!
    Im not giving up that easily.
    How about if I replace my HD with a 128GB SSD to run the 64bit applications
    Any SSD 2.5 Recommendations?
    Then look at what I can achieve with my ExpressCard slot.
    This is depednent on whether the Expresscard module is connected to a USB
    slot on the board or a PCI controller. Check out the speed differences:
    ExpressCard <http://en.wikipedia.org/wiki/ExpressCard> 1.2
    USB<http://en.wikipedia.org/wiki/Universal_Serial_Bus> 2.0
    mode480 Mbit/s60 MB/sPC Card 32-bit (CardBus) Word mode533 Mbit/s
    66.66 MB/sPC Card 32-bit (CardBus) DWord mode1,067 Mbit/s133.33 MB/s
    ExpressCard <http://en.wikipedia.org/wiki/ExpressCard> 1.2 PCI
    Express<http://en.wikipedia.org/wiki/PCI_Express>
    mode2,500 Mbit/s250 MB/sExpressCard<http://en.wikipedia.org/wiki/ExpressCard>
    2.0 USB <http://en.wikipedia.org/wiki/Universal_Serial_Bus> 3.0 mode*
    4,800 Mbit/s*600 MB/sExpressCard <http://en.wikipedia.org/wiki/ExpressCard>
    2.0 PCI Express <http://en.wikipedia.org/wiki/PCI_Express> mode*
    5,000 Mbit/s*625 MB/sIf im running Expresscard 1.2 on a PCI slot that gives
    me 250 MB/s
    Thats enough to run 2 FW800 drives at the same time from Express slot.
    Although I'm tempted to go for an esata dual port ExpressCard which will use
    the maximum bandwith or the slot
    One question, If your sourcing from one drive and outputting to another what
    sort of speeds do you get from each? Im presuming the write speed of a drive
    is 300MB/s or limited to 250MB/s if thats all the slot can manage. I just
    want to add in the calculation of the speed reading the source dive that I
    will have to account into the equation.
    Im considering dual port:
    FireWire <http://en.wikipedia.org/wiki/FireWire> (IEEE 1394b)
    1600[45]<http://en.wikipedia.org/wiki/List_of_device_bit_rates#cite_note-firewireb-44>
    1,573 Mbit/s196.6 MB/s
    or
    single port
    eSATA <http://en.wikipedia.org/wiki/ESATA> (SATA 300)2,400 Mbit/s300 MB/s
    2004
    Baring in mind I want to run 2 Hard drives through the slot and my limit is
    (if it is)
    ExpressCard <http://en.wikipedia.org/wiki/ExpressCard> 1.2 PCI
    Express<http://en.wikipedia.org/wiki/PCI_Express>
    mode2,500 Mbit/s250 MB/s
    That would only really accommodate 1 esata drive running at max speed
    Any suggestions folks?
    And dont say buy a new laptop..
    Thanks
    Simon

Maybe you are looking for