"Simple" Project - Can't figure out Square Pixels, Codecs, etc.

Just bought FCE thinking that making an iPhone demo video would be easier and have spent hours so far unable to get past the first (basic?) step.
I would like to make a quicktime video for the web at 600x400 pixels (aspect ratio of 1.5). Have recorded a .mov video at 320x460 that I want to display at full-resolution in that 600x400 window when zooming/scaling from within a background that (I thought) would initially be 1500x1000 (1.5) pixels with a 320x460 inset. That's all, and all with square pixels.
The trouble is, I cannot seem to find the right combination of how to size and design my background graphic (with Photoshop CS3, trying all combinations of pixel ratios) so it will fill up the canvas precisely, and I cannot find the right permutation that will let me fit my 320x460 video precisely. I have found combinations (sizing in Photoshop with pixel ratios, changing the size of the artwork, change pixel properties of the sequence in the browser, etc.) that work for the background and the inset video but nothing where they both work together.
So, what's the secret to just making web videos using videos and background images together? This would seem to be a simple matter and I must be missing something. Thanks.

My issues are not so much with functionality and learning such functionality (I think it's all there if you can find it) but with the User Interface.
I expect when I select a clip in the Sequence timeline that the clip will appear in the Viewer since that is what I indicated I would be working on. The windows (viewer, timeline, canvas) are all literally disconnected. You think you're working on one thing, but you're not.
I expected that when I added a motion keyframe in the Canvas, that the keyframes would be instantly marked in the timeline and in the viewer for all items (to coordinate concurrent scaling/effects).
When you look at properties, the drop downs don't even show the currently selected property but just show the top one in the list (bad, bad programming and UI)
The wireframe being called wireframe instead of 'handles' is bad.
When scaling a clip or picture with a wireframe in Canvas, using the Shift key usually constrains the scaling to proportional sizes in EVERY graphics program I have ever used, except for FCE where using the shift key while dragging lets you distort the graphic/clip. No attention to common standards for object manipulation. Bad.
The lack of the ability to specify precise adjustments (like to the pixel) in the Canvas (or anywhere) is bad. When I was scaling a clip in the canvas, I could not see behind the colored wireframe and had to rely on trial and error so see if my scaled clip fit perfectly. You could not even zoom to anything but the presets. Terrible.
I'll stop.
Video pros should be using FC Studio with huge learning curves, but at $199, FCE will of course be used by folks who want a step up from iMovie. The focus on "video" instead of web "movies" with pizazz is an huge oversight in the documentation.

Similar Messages

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

  • Can't figure out why my navbar gets all pixelated online?

    Hi Everyone,
    I'm designing a floating site.  My workflow is PS=====>Fireworks====>Dreamweaver.  I made a navbar in FW with a transparent background and exported html to dreamweaver.  I inserted the fireworks htm, put it online and it looks terrible.  You can see it here:
    http://www.njtraininggrounds.com/thirddaydesign.com/identity.html
    Don't worry about the portfolio button, I know what's going on there.  But I can't figure out why there is "stairstepping" on the logo and on all the navbar buttons.  This is the first time I've ever created a floating site.  I just put a jpeg for repeat using the dreamweaver css, and then inserted the rest in a table. 
    Could anyone give me an idea of what I'm doing wrong?  Thanks so much.
    Wil

    There's no problem with using PNG8, PNG24, or PNG32, other than the huge
    weight of the latter two.  But there's no need to go PNG here.
    Personnaly I see only advantages in using PNG. The good thing about using PNG for graphics like this is that it does not tie you to a background with a certain color. like a GIF with a colored matte does. Should you wish to change your background color later you can keep on using your menu buttons. There is no need to prepare new graphics for the menu just because you change a background color or image.
    As for the "huge" weight of the PNG file, I'd say that depends on your definition of "huge"
    If you compare the filesizes of a simple graphic like that, I see no big improvement by using GIF.
    see screenshot:

  • Am getting message from MacPro that my start up disc is full - but I can't find it and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files. help?

    I am getting message from MacPro that my start up disc is full - but I can't find this "start up disc" and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files and material that I should toss in the trash, but it is not clear to me  what items I can toss and which items I can't toss. Can you help? Using the imovie "help" support the system showed me under the menu item "go" where the "start up disc" should be - but that wasn't actually available on my menu!  Thanks for your help!

    Disk Utility 
    Get Info on the icon on Desktop
    Try to move this to the MacBook Pro forum
    Your boot drive should be 30% free to really perform properly. 10% minimum
    Backup, clone, use TimeMachine, use another drive for your projects and movies, replace and upgrade the internal drive even.

  • Can't figure out how to add songs to my iphone with itunes 11.

    I can't figure out how to add songs from my itunes library to my iphone.  I used to just drag the songs from the library to my phone, but now that won't work. It's probably something really simple that I'm missing, but it's frustrating me. Can anyone help? My phone is the iphone 4 if that matters.

    Yes, thank you also. I was racking my brains out how to do a simple thing like adding songs to my ipod.
    But it's option+command+s to show or hide the side bar. 

  • HT3235 My second monitor is working but I can't figure out how to use it! I can't get anything to drag. I know how to adjust extended desktops on PCs but I can't figure this one out.

    I am used to working on duel monitors. I bought a new MacBook Pro 15' yesterday, the adapter for my monitor, and the monitor is on with the generic background but I can't drag any windows over to it. I can do it on PCs but can't figure out on the Mac. Can someone please help the noob out?
    Thanks
    Nikki

    The blue blocks in that screen are Icons for your actual screens. Their sizes are proprtional to the number of pixels in each screen. They can be dragged to new locations relative to each other -- as long as they are touching at some point.  You are expected to drag them so that they correspond with the actual screen location on your bench, so that the movement from one scrren to the other is intuitive.
    The white stripe represents the menuBar. It can also be dragged to any screen, and that screen will then be the one with the MenuBar. It will also become the screen with the Startup icons on it.

  • I have an iPOD mini library and now have a IPhone 4S.  I updated my library and synced my phone to the library but can not figure out how to get the music library to download to my  iphone

    I have an iPod mini library which I have update. I now have an iPhone 4S which I have synced to the library using a MS XP computer. I can not figure out how to get the library to download to my iPhone?

    Thanks,  This caused me to go back and try again since the solution seemed so simple.  What I did was when it started downloading, it started with the iphones apps to my computer.  I did not want the apps downloaded on my computer so I stopped it.  If I would have waited, the music was uploaded right after the apps were downloaded.

  • Can't figure out how to send photos to outside lab

    Hello, I am new to Apple products and have had my iMac desktop for one week.   I am not very computer savy to start with and it is so different from my old pc.   I also have a new camera - Nikon D7100 - so I am attempting to learn TWO new things.  At least my camera came with a user's manual.  With my iMac I am stumbling through trial and error and taking up way too much time.   I tried using iPhoto but ended up losing my photo library I started (somehow it just disappeared after a series of error messages saying it was attempting to repair the library).  I ended up buying the Aperture app beause I want to be able to do more with photos for my art business. Now I am thinking iPhoto wasn't so bad, all except loosing my library, of course.  It was very simple to use.  But once I learn more I think I will appreciate  Aperture and at least through Aperture I was able to have my photo library restored.   I do not have a good printer yet, however, so I am attempting to have an outside print lab download my pictures to have the prints mailed to me.  (Note: I used to use Snapfish but didn't like my last batch of pics.  Someone suggested Walgreen's Photo Lab.   Maybe someone has a better suggestion.)
    However, I cannot download my pictures to any outside site because they said they must be in jpeg format.  My camera is set to take ONLY jpeg photos right now - I need to master this before even attempting raw - so the problem must be on the software use end.  When I transfer pics from my camera to my computer, Aperature (or is it thru iPhoto to Aperature I don't know) it gives them a name without a suffix attached.  I see that they identify the photo as JPEG at the top of the Info screen and I can go in and change the name and make it SAY .jpeg but even then I cannot download it to an outside photo lab for the same reason - "must be in jpeg format."    Plus to change the name to include the suffix .jpeg I am having to do that one picture at a time - there must be an easier way.  How do I make them all be .jpeg photos that can be recognized by outside photo labs?
    I would be open to sending my pics to the Apple photo print lab but I can only figure out how to send ONE at a time and that seems very impractical so I am obviously doing something wrong there.  How does the Apple photo lab compare to others?   How do I send a batch of photos at one time?  
    One other question not related to photos - With my p.c. I had a mouse that would let me right-click and move, copy or delete highlighted areas.  I cannot find that function at all with my iMac.  Is there a "right click" type of function on this computer?   I have this cool touch-pad.  No more mouse.   Sorry to be do dense.  I need users manuals I guess.  More hours.   I would appreciate any help so I can spend more time outside in my garden instead of hunched over my computer in frustration.   Thank you! 
    Oh, one more thing.  I cannot figure out my operating system.   My iMac box says "Preinstalled OS X and iLife4"    How can I find what version I have? That would be helpful.

    Try this to learn about using keys:
    http://www.apple.com/support/macbasics/
    You can also use your PC mouse.
    As for iPhoto, it sounds like you were trying to move files around in the library. That is a bib no-no in Aperture or iPhoto.

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • Help!  Can't figure out how to store the same photo in different events

    I know that this is just a user error problem, but I can't figure out how to store multiple versions of the same photo in different events. For example, I use Aperture as my main photo library, so I have a big folder set-up by year and then by events within those years to organize and maintain my library. I'm currently working on a project where I would like to pull out certain pictures for other uses. I tried creating new events and then moving the pictures to those events (like I would have in iPhoto) expecting for a new version of the picture to be deposited in the new event. That didn't work - it moved the picture out of my "main library" folder and as far as I can see it now only exists in the new event. Next, I tried creating "new versions" of the pictures I wanted to move and then just selecting those and moving them. In one folder I selected three photos, clicked "New Versions", then in the browser display I could see two of each picture (for a total of six), I selected ONE of each photo and moved those three to the new event. At which point all six disappear from the "main library" and end up in my new event. I don't understand why that happens. Currently the only way I've been able to do what I need to do is by using the flag field, but as far as I can tell there is only one of those - it's on or off that is really not serving my purpose. What do I need to do???

    Like Jim said, you most likely want Albums for what you describe. Albums simply consist of "pointers" to a single compilation of image data. Albums can be created and deleted at will, because they are just pointers; an important concept.
    Also learn to use Keywords - and unlearn "folder" organization, which is not the way digital asset management works. The power of Albums and Keywords is huge once we lose the film-think of folders organization.
    HTH
    -Allen Wicks

  • Can't figure out where NullPointerException is coming from

    I will attach the code I have below. It is almost entirely done but i am getting a NullPointerException that is driving me nuts, and I can't figure out were it is coming from.
    Help is greatly appreciated.
    First code:
    import java.util.Scanner;
    import java.io.*;
    import java.util.Random;
    import java.util.Collection;
    public class DistributionPlagiarist
         public static void main(String[] args) throws IOException
              Scanner keyboard = new Scanner(System.in);
              int keyLength=0, phraseLength=0, numberOfPhrases=0;
              String inputFileName="", keepReadingFromFile="", theFile="";
              FrequencyLibrary text = new DenseFrequencyLibrary();
              if(args.length != 4)
                   System.out.println("The command line arguments you entered do not match what is needed.  Please try again.");
                   System.exit(0);
              for(int count=0; count<args.length; count++)
                   keyLength = Integer.parseInt(args[0]);
                   phraseLength = Integer.parseInt(args[1]);
                   numberOfPhrases = Integer.parseInt(args[2]);
                   inputFileName = args[3];
              if(keyLength < 0)
                   while(keyLength < 0)
                        System.out.print("The length of the key (" + keyLength + ")" + " you entered is less than zero.\nPlease enter another key length: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              if(phraseLength < 0)
                   while(phraseLength < 0)
                        System.out.print("The desired length of the phrase (" + phraseLength + ")" + " you entered is less than zero.\nPlease enter another phrase length: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              if(numberOfPhrases <= 0)
                   while(numberOfPhrases <= 0)
                        System.out.print("The desired number of phrases (" + keyLength + ")" + " you entered is not applicable.\nPlease choose another number: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              File file=new File(inputFileName);
              boolean exists = file.exists();
              if (exists == false)
                   while(exists == false)
                        System.out.println("The file you are searching for does not exist.  Please place it in this programs directory.");
                        System.out.print("Please re-enter the file name: ");
                        inputFileName = keyboard.nextLine();
                        file=new File(inputFileName);
                        exists = file.exists();
              int count=keyLength, start=0, stop=0;
              FileReader freader = new FileReader(inputFileName);
              BufferedReader inputFile = new BufferedReader(freader);
              while(keepReadingFromFile != null)
                   keepReadingFromFile = inputFile.readLine();
                   if(keepReadingFromFile == null)
                        break;
                   else
                        theFile = theFile + keepReadingFromFile;
              while(count < theFile.length())
                   String name = theFile.substring(start, keyLength+stop);
                   char singleCharacter = theFile.charAt(count);
                   text.add(name, singleCharacter);
                   start++;
                   stop++;
                   count++;
              int countNumberOfPhrases=0;
              while(numberOfPhrases > 0)
                   countNumberOfPhrases++;
                   String phrase = randomphrase(text, phraseLength, keyLength);
                   System.out.println("Phrase " + countNumberOfPhrases + ":\n" + phrase);
                   numberOfPhrases--;
         private static String randomphrase(FrequencyLibrary textLibrary, int phraseLengthToMake, int startLength)
              String startString="";
              char characterToAdd=' ';
              startLength++;
              Random generator = new Random();
              int sizeOfLibrary=textLibrary.size()/2, randomInt = generator.nextInt(sizeOfLibrary+1), value=0;
              Collection<String> stringNames = textLibrary.makeStringCollection();
              for(String stringFromCollection : stringNames)
                   if(randomInt == value)
                        startString = stringFromCollection;
                   value++;
              String thePhrase = new String(startString);
              System.out.println("INITIAL START:" + startString + "TTTT");
              int substringStart=1;
              while(startLength < phraseLengthToMake)
                   characterToAdd = textLibrary.randomUniformChoose(startString);
                   thePhrase = thePhrase + characterToAdd;
                   System.out.println("CHARACTER:" + characterToAdd + "TTTT");
                   System.out.println("PHRASE:" + thePhrase + "TTTT");
                   startString = thePhrase.substring(substringStart, thePhrase.length());
                   boolean answer = textLibrary.contains(startString);
                   System.out.println(answer);
                   System.out.println("NEW STRING:" + startString + "TTTT");
                   startLength++;
                   substringStart++;
              return thePhrase;
    }Second code:
    import java.util.Collection;
    import java.util.HashMap;
    public class DenseFrequencyLibrary implements FrequencyLibrary
         private HashMap<String, MultiSetOfChar> bookTitleAndCharacterAndIntegerHashMap = new HashMap<String, MultiSetOfChar>();
         private MultiSetOfChar keyAndValuePairs = new DenseMultiSetOfChar();
          * Creates a new DenseFrequencyLibrary with all the essential things clear;
         DenseFrequencyLibrary()
              bookTitleAndCharacterAndIntegerHashMap.clear();
          * Input the value from the creation of the DensneMultiSetOfChar into a HashMap.  If the key
          * already exists then the value associated with it is updated by one.
          * @param character a char to be used in forming the HashMap
          * @return characterMap
         private HashMap<String, MultiSetOfChar> inputIntoMap(String name, char character)
              if(!bookTitleAndCharacterAndIntegerHashMap.containsKey(name))
                   keyAndValuePairs = new DenseMultiSetOfChar(character);
              else
                   keyAndValuePairs.add(character);
              this.bookTitleAndCharacterAndIntegerHashMap.put(name, keyAndValuePairs); //input character and value
              return bookTitleAndCharacterAndIntegerHashMap; //return the new HashMap
          * Returns the number of books in the library.
          * @return |b|, ie the number of books in b
        public int size()
             int numberOfBooks=bookTitleAndCharacterAndIntegerHashMap.size();
             return numberOfBooks;
         * Searches the library for an occurrence of a given book
         * @param target the name of a book to be searched for in the library
         * @return true if and only if the argument is already a book title in the library.
        public boolean contains(String target)
             boolean bookIsInLibrary=false;
             if(bookTitleAndCharacterAndIntegerHashMap.containsKey(target))
                  bookIsInLibrary = true;
             return bookIsInLibrary;
         * Returns the MultiSetOfChar that represents the occurrences of the individual characters
         * in the text of the book indicated by the argument.
         * @param target
         * @return MultiSetOfChar
        public MultiSetOfChar getFrequencies(String target)
             MultiSetOfChar frequencyMultiSetOfChar = bookTitleAndCharacterAndIntegerHashMap.get(target);
             return frequencyMultiSetOfChar;
         * Modifies the character occurrences associated with name to include one more occurrence of element.
         * @param name string of the name of the book
         * @param element character to add to the specified book
        public void add(String name, char element)
             bookTitleAndCharacterAndIntegerHashMap = inputIntoMap(name, element);
         * Modifies the character occurrences associated with name to include one less occurrence of element.
         * @param name string of the name of the book
         * @param element character to be removed from the specified book
         * @return true if and only if the book is modified.
        public boolean remove(String name, char element)
             boolean characterWasRemovedFromBook=false;
             //if the target character is in the map then remove it
              if(bookTitleAndCharacterAndIntegerHashMap.containsKey(name))
                   MultiSetOfChar keyAndValuePairs = bookTitleAndCharacterAndIntegerHashMap.get(name);
                   keyAndValuePairs.remove(element);
                   characterWasRemovedFromBook = true; //set answer to true because the HashMap was changed
              else //target does not exist in the HashMap
                   characterWasRemovedFromBook = false; //set answer to false because the HashMap was not changed
             return characterWasRemovedFromBook;
         * Returns a random character, chosen from the same distribution as the characters appear in the book.
         * For example, if 5% of the characters in "Alice in Wonderland" are an 'A', then this method should
         * return an 'A' about 5% of the time.
         * @param name string of the name of the book to search through and remove a character
         * @return true if and only if the argument is already a book title in the library.
         public char randomUniformChoose(String name)
            MultiSetOfChar keyAndValuePairs = bookTitleAndCharacterAndIntegerHashMap.get(name);
            char randomCharacter = keyAndValuePairs.randomUniformChoose();
              return randomCharacter; //return the random character pulled out
         public Collection<String> makeStringCollection()
              Collection<String> stringCollection = bookTitleAndCharacterAndIntegerHashMap.keySet();
              return stringCollection;
    }Third code:
    import java.util.HashMap;
    import java.util.Set;
    import java.util.Collection;
    import java.util.Random;
    * DenseMultiSetOfChar implements MultiSetOfChar.
    * @mathmodel b is a finite multiset
    * @mathdef
    *  |b| is the cardinality of b
    *  ||c,b|| is the number of occurrences of element c in b
    * @author Kyle Hiltner
    public class DenseMultiSetOfChar implements MultiSetOfChar
         private char characterInput=' ';
         private HashMap<Character, Integer> characterMap = new HashMap<Character, Integer>();
          * Create a new DenseMultiSetOfChar with zero argument
         DenseMultiSetOfChar()
              characterMap.clear(); //clear static HashMap
          * Create a new DenseMultiSetOfChar with the passed in value.
          * @param newChar character input to be added to the HashMap
         DenseMultiSetOfChar(char newChar)
              this.characterInput = newChar; //set characterInput to the value passed in
              characterMap = inputIntoMap(this.characterInput); //call private procedure to add characterInput to HashMap
          * Input the value from the creation of the DensneMultiSetOfChar into a HashMap.  If the key
          * already exists then the value associated with it is updated by one.
          * @param character a char to be used in forming the HashMap
          * @return characterMap
         private HashMap<Character, Integer> inputIntoMap(char character)
              //if the character is not in the HashMap then add it with the starting value of 1
              if(!characterMap.containsKey(character))
                   characterMap.put(character, 1); //input character and value
              else //character does exist
                   int value = characterMap.get(character); //get the value for the specified key
                   value++; //increase the value so as to show that another character was added
                   characterMap.put(character, value); //place the character and new value in the HashMap
              return characterMap; //return the new HashMap
          * Returns the number of elements in this multiset (ie its cardinality).
          * Note that since multisets can include duplicates, the cardinality may be
          * larger than the number of distinct elements. Also, the total number of
          * items in the multiset is bounded above by Integer.MAX_VALUE.
          * @return |b|, ie the cardinality of b
         public int getCardinality()
              int totalElementsInMap=0;
              Collection<Integer> integerCollection = characterMap.values(); //create a collection for easy iteration
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap
              for(Integer valueFromCollection : integerCollection)
                   totalElementsInMap = totalElementsInMap + valueFromCollection; //compute new value of total values
              return totalElementsInMap; //return the final total value
          * Returns the number of occurrences of a given element in the multiset. A
          * simple identity relating getElementCount and getCardinality is that the
          * sum of getElementCount for each char is equal to the cardinality of the
          * set.
          * @param target
          *            char to be counted in the multiset
          * @return ||target,b||, ie the number of occurrences of target in b
         public int getElementCount(char target)
              int numberOfGivenCharacters=0; //set initial value
              //if the HashMap contains the target character then numberOfGivenCharacters is set to the value
              if(characterMap.containsKey(target))
                   numberOfGivenCharacters = characterMap.get(target); //set numberOfGivenCharacters to the value assigned to the target character
              return numberOfGivenCharacters; //return the value for the target character
          * Returns a set such that every element in the multiset is in the set (but
          * no duplicates). The cardinality of the returned set must be less than or
          * equal to |b|. The cardinality of the two are equal if and only if b
          * contains no duplicate elements.
          * @return a set of Character, s, such that: <br />
          *         (for all (Character)i in s : (char)i in b) and <br />
          *         (for all (char)i in b : (Character)i in s)
         public Set<Character> getElementSet()
              Set<Character> characterSet = characterMap.keySet(); //create a Set from the keys of characters in the HashMap     
              return characterSet; //return the character Set
          * Adds a single element to the multiset. This operation always increases
          * the cardinality of the multiset by 1, assuming that the maximum capacity
          * of Integer.MAX_VALUE has not been reached.
          * @param item
          *            the char to be added to b
          * @requires |b| < Integer.MAX_VALUE
          * @alters b
          * @ensures b = #b union {item}
         public void add(char item)
              characterMap = inputIntoMap(item); //call the private method to add new character (item) to the HashMap
          * Removes the target, if it is present in the multiset. The method returns
          * true if and only if it changes the multiset.
          * @param target
          *            the char to be removed
          * @alters b
          * @ensures (target not in #b) ==> (b = #b) <br />
          *          (target in #b) ==> (b union {target} = #b)
          * @return target in #b
         public boolean remove(char target)
              boolean answer=false; //set initial value to false
              //if the target character is in the map then remove it
              if(characterMap.containsKey(target))
                   int value = characterMap.get(target); //find the value associated with the target character
                   //if the value is 1 call remove from the HashMap and remove key and value
                   if(value == 1)
                        characterMap.remove(target); //remove key and value from the HashMap
                   else //value is greater than 1
                        value--; //decrease value to show removal
                        characterMap.put(target, value); //replace target character with new value back into the HashMap
                   answer = true; //set answer to true because the HashMap was changed
              else //target does not exist in the HashMap
                   answer = false; //set answer to false because the HashMap was not changed
              return answer; //return answer
          * Returns a char chosen randomly based on the contents of the multiset.
          * This operation does not remove the char from the multiset or change the
          * multiset in any way. In particular, the cardinality of the multiset is
          * the same before and after this method.
          * <p>
          * Characters should be returned with a random distribution equal to the
          * distribution of characters in the multiset. That is, for a character that
          * appears N times in a multiset of cardinality M, the probability of that
          * character being returned is N / M. For example, a multiset that contains
          * only the character 'a', possibly many times, would always result in an
          * 'a' being generated. On the other hand, a multiset with an equal number
          * of 'a' and 'b' elements would return an 'a' approximately half the time
          * and a 'b' the other half.
          * @requires |b| >= 1
          * @return char c with probability p, where: <br />
          *         p = ||c,b|| / |b|
         public char randomUniformChoose()
              char randomCharacter=' ';
              Random generator = new Random();
              int totalElementsInMap=0;
              Collection<Integer> integerCollection = characterMap.values(); //create a collection for easy iteration
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap. 
              //Do this in case a remove call was made
              for(Integer valueFromCollection : integerCollection)
                   totalElementsInMap = totalElementsInMap + valueFromCollection; //compute new value of total values
              int randomInt = generator.nextInt(totalElementsInMap+1), lowerValue=0, upperValue=0;
              Collection<Character> keyCollection = characterMap.keySet();
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap
              for(Character keyFromCollection : keyCollection)
                 upperValue = upperValue + characterMap.get(keyFromCollection);
                 if(randomInt == upperValue)
                      randomCharacter = keyFromCollection;
                 if(randomInt >= lowerValue && randomInt <= upperValue)
                      randomCharacter = keyFromCollection;
                 lowerValue = upperValue + 1;
              return randomCharacter; //return the random character pulled out
    }The Error:
    Exception in thread "main" java.lang.NullPointerException
         at DenseFrequencyLibrary.randomUniformChoose(DenseFrequencyLibrary.java:137)
         at DistributionPlagiarist.randomphrase(DistributionPlagiarist.java:146)
         at DistributionPlagiarist.main(DistributionPlagiarist.java:112)I will attempt to explain what this does in as few words as possible. For a breakdown of the lab go urlhttp://www.cse.ohio-state.edu/~paolo/teaching/494MJ/labs/lab8.shtml{url}. If you don't feel like reading that: THe program reads in some command line arguments. From there it reads from the file provided in the command line and creates "keys" from the specified length. From there I need to create a phrase of the specified length. If i am supposed to create more then one then i do. That is pretty much it. I can't figure out where (really why) the NullPointerException error is coming from.
    Help is appreciated!!

    Post the actual error text (copy and paste, don't "interpret" it) here.
    It should include a stack trace which references a line number of the program -
    unless you suppressed the trace, in which case change your error handling
    so that the trace is produced.
    Identify which program line in your post the error is pointing to so that we can match
    the error with your program, since your post doesn't have line numbers..
    Edited by: ChuckBing on Nov 16, 2007 7:19 PM
    Also - posting large amounts of code (as you did) will reduce the chance of anyone helping

  • Can't figure out syncing contacts with Windows 7 mail

    I've only been using Windows 7 for about a month and can't figure out why the contacts from my iPhone won't sync to the Windows Live mail of Windows 7. I want my phone contacts to override my mail contacts, not the other way around.
    In the INFO tab of the iPhone sync section I have the box checked to sync contacts. It gives me three choices: Google Contacts, Yahoo Contacts, Windows Contacts. I have Windows Contacts selected.
    If anyone can help me sync my phone contacts down to the Windows mail contacts it would be greatly appreciated.

    Thank you very much for trying to help but unfortunately I'm even more lost. I followed those instructions but to no avail. I can't begin to figure out why a simple thing like syncing my iPhone contacts down to Windows Live mail is such a big ordeal.
    There are a ton of my contacts showing up in the contact list of my mail but it's not even close to being the most updated list. I honestly don't know where Windows Live got them from but there's just a whole weird mix of people, many of which aren't even my contacts but just email addresses of strangers that I may have dealt with one time in the past. The whole **** thing is a mess and I don't know where to go from here.

  • Can't figure out how to create an update form in a cfwindow tag

    I finally was able to figure out how to do an add form inside
    of a cfwindow tag yesterday. But I want this form to be
    multipurpose, and allow edits as well. But for the life of me, I
    can't figure out how to pass a row of data to the form inside a
    cfwindow. Normally, I'd pass the primary key via the URL but if I
    try to do that here, it basically reloads the page and closes out
    the cfwindow since I have the window set to not show by default.
    My page has a list of departments. My page is called
    departments.cfm. For each row in the department list, there is a
    link called edit. When the user clicks this link, I want the
    cfwindow to open with the cfform populated with the data from the
    department list for the row selected. Sounds simple enough, except
    how do I pass the department_id to the form? If my link is <a
    href="departments.cfm?id=#department_id#>Edit</a>, the
    cfwindow tag displays and I can see the data in it, but then closes
    right away. I finally figured out that it was calling the page
    again and the cfwindow is closing because I have it set to not
    display by default. I'm about ready to drop this cfwindow and just
    do real popup windows via javascript. And I'm normally not in favor
    of doing popup windows, but the application I'm working on doesn't
    have enough real estate on the screen to do a hidden form, so a
    separate window containing the form is my best solution.
    Anyone have any suggestions?

    Well, this is kind of a tough one for me, but it sounds like
    the best way will be to launch a JavaScript function everytime the
    user clicks the link, like this:
    <cfoutput query="getDepartments">
    <a href="javascript:showWin(#yourID#)">show
    window</a>
    <br>
    </cfoutput>
    the showWin function will both create the window and launch
    it, passing in the user chosen var:
    function showWin(id) {
    var URL = 'editDeptPage.cfm?dept_id=' + id;
    var winName = 'deptWin' + id;
    ColdFusion.Window.create(winName, 'Edit the Department',
    URL,
    {x:100,y:100,height:300,width:400,modal:false,closable:true,
    draggable:true,resizable:true,center:true,initshow:true,
    minheight:200,minwidth:200 })
    The following line of code is supposedly to make sure that
    the window refreshes each time it is launched, by naming it
    something new each time:
    var winName = 'deptWin' + id;
    However, if it doesn't work, I think there's a Window refresh
    function in the Ext library but I'm not sure.
    Also, in the showWin function, after the Window is created,
    you might need this but I'm not sure:
    ColdFusion.Window.show(winName)
    Talk to you later,
    Peter

  • New user - switched from PC to Mac and can't figure out some mail issues

    I looked at the software discussions and they didn't have one for something as simple as mail! I've also checked mail help and the online support and Switch 101 and Mac 101. All of them tell me I can do something but not how in very simple steps.
    In the Apple store they were using all this fancy stationery for e-mail. Even my e-mail program looks different from the one in Mac 101.
    I want to do 2 things. Use stationery and write those little "to-do" notes and I can't figure out how. On Mac 101 it shows a message and right below the address lines is a box with stationery menus, like birthdays, invitations etc. I don't have that box. I have the address lines and then jut the place where you write the e-mail. No stationery, no notes.
    Thanks,
    Susan

    I am on a new message. There is no photo browser (I'd do a screen shot if I knew how but I only know how to do that on a PC).
    On a new mail message (I went to file and clicked new message) I have the 3 dots in the left corner (to close, minimize, etc) and under that some icons (send, chat, attach, address colors, save as draft). The the To: line, the CC: line, the Subject: line and account line (next to the account line i have a drop down box to customize) Then the body of the e-mail that I type in. Thats it, no stationary, no photo browser.
    Again my mail program is 2.1.1 and from my serching it seems that 3.0 is the latest mail program. I clicked the little apple in the left upper corner of my mail program and had it search for updates but it said there were none.
    This is so frustrating to buy a new computer with old software. I'm guessing I have leopard but I have no idea how to see what version of the OS I have. Again I bought this thing on Friday, 3 days ago.
    Susan

Maybe you are looking for