Can't figure out block quote line after quote issue

Hi - I'm building a block quote in DW for my site and can't figure out 2 things:
1. How to move up the text after the first line so it's the same throughout
2. How to move the quote author over to the right margin
Below is the CSS and HTML for what I have so far as below that is a snap shot of what I'm seeing:
blockquote {
  background: #F0F7FF;
  border-left: 10px solid #9D9D9D;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
blockquote:before {
  color: #9D9D9D;
  content: open-quote;
  font-size: 8em;
  line-height: 0.9em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
blockquote p {
  display: inline;
  font-family: Times New Roman;
  font-size: 1.8em;
  line-height:  1.8em;
</style>
</head>
<body>
<blockquote><p><em>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo."</em></p>
<br><br>
<p>&mdash; Albert Einstein</p></blockquote>

Probably need to get a bit creative to include the large quote:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style>
body {
font-family: times;
blockquote {
background: #F0F7FF;
border-left: 10px solid #9D9D9D;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: "\201C""\201D""\2018""\2019";
.quote {
position: absolute;
top: 45px;
color: #9D9D9D;
padding: 0 0 0 2%;
font-size: 8em;
letter-spacing: -10px;
blockquote p {
text-indent: 60px;
position: relative;
font-family: Times New Roman;
padding: 0 0 0 3%;
font-size: 1.8em;
line-height:  1.8em;
blockquote .author {
text-align: right;
padding: 0 3% 0 0;
margin: 0;
</style>
</head>
<body>
<blockquote><span class="quote">&lsquo;&lsquo;</span><p><em>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo."</em></p>
<p class="author">&mdash; Albert Einstein</p>
</blockquote>
</body>
</html>

Similar Messages

  • Need help with first applescript@Quicktime- can't figure out a few lines...

    Ok guys I need help, here is what I want to happen. I want the script to just shorten a movie file. It should be so simple!!
    lengthofmovie = film length
    set time range from 0 to (lengthofmovie-1)
    save the movie as a new file
    That is all I want done, I am ripping my hair out of my head trying to do this. Please help me!!
    Here is my code so far:
    with timeout of 86400 seconds
    display dialog "Before beginning batch processing, make sure QuickTime Player is set to the desired export settings, and all videos to be processed are in a folder named ‘Input’ on the desktop." with icon note
    tell application "Finder"
    set the startup_disk to the name of the startup disk
    end tell
    set user to do shell script "whoami"
    set inputfoldername to "Input"
    set input_folder to startup_disk & ":Users:" & user & ":Desktop:" & inputfoldername & ":"
    set user_desktop to startup_disk & ":Users:" & user & ":Desktop:"
    set output_folder to startup_disk & ":Users:" & user & ":Desktop:Output:"
    set file_extension to "_export.mp4"
    try
    tell application "Finder"
    make new folder at user_desktop with properties {name:"Output"}
    end tell
    end try
    try
    set thefolderlist to list folder input_folder without invisibles
    repeat with x from 1 to count of thefolderlist
    set the_file to input_folder & item x of thefolderlist
    set output_file to output_folder & item x of thefolderlist & file_extension
    tell application "QuickTime Player"
    activate
    open the_file
    //change timeline, trim NEED HELP HERE
    export front document to output_file as MPEG4 using most recent settings with replacing
    close front document
    end tell
    end repeat
    on error
    display dialog "This script requires a folder named ‘" & inputfoldername & "‘ located on the desktop." with icon stop
    end try
    beep
    end timeout

    Hi plashd,
    First, I must confess that I don't know much about QuickTime. Nevertheless, while trying to understand your problem, I discovered that the AppleScript dictionaries of QuickTime Player and QuickTime 7 were very different from one another, and was unable to use the “export” command of QuickTime Player. However, I finally was able, with the following script, to use AppleScript to shorten a QuickTime movie and save it under another name:
    *set the_file to POSIX file "/Users/pierre/Desktop/MVI_0503.MOV"*
    *set output_file to "/Users/pierre/Desktop/NewMVI0503.MOV"*
    *tell application "QuickTime Player"*
    activate
    *open the_file*
    *tell front document*
    *trim from 1 to (duration - 5)*
    *save in output_file with replacing*
    *close without saving*
    *end tell*
    *end tell*
    Hope it can help.

  • Can't figure out why colors don't totally change when you select type with curser? It looks like it has by looking at it, but when you highlight the area after the old color is still there. It happens with objects to. Driving me NUTZ. Help!

    Can't figure out why colors don't totally change when you select type with curser? It looks like it has by looking at it, but when you highlight the area after the old color is still there. It happens with objects to. Driving me NUTZ. Help!

    Select the text, and open the Appearance palette (Come on guys, text highlight is irrelevant, it happens to objects too says the OP), and see what's listed there.  For a simple text object, there should only be a line item "Type", followed by "Characters", and when double-clicked the Characters line item expands to tell you the stroke and fill color.  For a basic object, there should be a fill and/or stroke.
    What happens sometimes, is that you end up adding extra strokes/fills to objects or text, and the appearance palette is where that will be noted.  Especially when you are dealing with groups, and/or picking up a color with the eyedropper, you may inadvertently be adding a fill or stroke on top of something.  You can drag those unwanted thingies from the Appearance palette into its own little trash can.

  • I'm trying to connect a BlueTooth headset to my Mac Mini. I can discover it, but soon after discovery it disconnects. Can't figure out how to reconnect. My only option seems to be re-discovery

    I can discover the headset, but soon after discovery it disconnects. Haven't been able to figure out how to try to re-connect. And the help section titled "Use BlueTooth has absolutely no information on how to use it. All I can do is re-discover it. Every time I rediscover it, it disconnects shortly afterward. This headset works well with both my iPhone and iPad and has for quite some time. But it won't stay connected to my Mac.

    Tried with another headset that works fine with iPhone and iPad. An LG HBS700. Same problem. It connects for maybe 10 seconds and then disconnects. So it must be a problem on the Mac. But this Mini is out of warrentee so taking it into an Apple store to get it repaired isn't a good solution. Maybe as a last resort.
    Is there a way to select connect on the Mac? Everything else I've connected a BlueTooth device to has both a command for pairing and a command for connecting or reconnecting. I can't figure out how to select connect on the Mac.

  • I want to transfer an audiobook and a movie from my MacBook Pro to my iPhone 4S, and can't figure out how.  I went to "Help" and it said after connecting the two devices I should "Click Apps," but I can't find anything labeled "Apps" to click.  Help?!!

    I want to transfer an audiobook and a movie from my MacBook Pro to my iPhone 4S, and can't figure out how.  I went to "Help" and it said after connecting the two devices I should "Click Apps," but I can't find anything labeled "Apps" to click.  Help?!!

    If you have iTunes 11 on your Mac then you can enable the left-hand sidebar via option-command-S, that might make it easier to navigate.
    Connect the phone to your Mac and select it on that left-hand sidebar, and on the right-hand side of the screen there should be a series of tabs which you can use to select what to sync to the phone. If it's an audiobook then it should appear on the Books tab for selecting/syncing, and films will be on the Movies tab. When you've got the audiobook on your phone you should get an Audiobooks option in the Music app (you might need to tap the '...' tab at the bottom of the Music app to see it).

  • My MacBook pro mid 2012 doesn't seem to have a "save as" function, so I can't seem to save multiple page pdf's together after moving thumbnails into the sidebar. It only saves the first page. I can't figure out the rename function either. Help?

    My MacBook pro mid 2012 doesn't seem to have a "save as" function, so I can't seem to save multiple page pdf's together after moving thumbnails into the sidebar. It only saves the first page.
    I do have a 2008 version of Microsoft Office installed to save money, but that shouldn't affect things. I can't figure out the "rename" function either. Help?

    Oh, and I also reset my NVRAM, my computer hasn't frozen again yet, so I'm not sure if it has made a difference.

  • After 10.8.4 Update, I receive a series of capital A's in a box in some of the email signatures I receive. I can not figure out how to correct this.

    After 10.8.4 Update, I receive a series of capital A's in a box in some of the email signatures I receive. I can not figure out how to correct this.

    Back up all data.
    Launch the Font Book application and validate all fonts. You must select the fonts in order to validate them. See the built-in help and this support article for instructions. If Font Book finds any issues, resolve them, then boot in safe mode to rebuild the font caches. Boot again as usual and test.
    Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. In that case, ask for instructions.

  • User blocked for some reason...can't figure out ho...

    user blocked for some reason...can't figure out how to unblock!!! using for business. no support phone to get help!!!

    Hi, BHMN..., and welcome to the Community,
    Please do contact Skype Customer Service again to follow up; be sure to reference any support ticket number(s) you may have been provided. 
    Regards,
    Elaine
    http://community.skype.com/t5/Security-Privacy-Tru​st-and/How-to-un-block-a-Skype-account/td-p/799404
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • I would like to set a block feature for Firefox Safe Mode. I can't figure out how to do this on McAffee. Help please.

    I found out that my boys can get into 'safe mode' which bypasses all blocks. I went to my McAfee home page and can't figure out how to block this browser. Can you tell me how??? THANKS!

    Create a contact for yourself either in the phone app or the contacts app. Then go - Settings > General > Siri > My Info > Set your contact.

  • By right clicking on something, I accidentally blocked photos at a website--I want them back but can't figure out how to do it

    By right clicking on something, I accidentally blocked photos at a website-- want them back but can't figure out how to do it
    == This happened ==
    Not sure how often
    == I right clicked on block images at a site or something like that.

    Check the image exceptions: Tools > Options > Content: Load Images: Exceptions - See [[Options window - Content panel]]
    A way to see which images are blocked is to click the favicon (''Site Identification'' icon) on the left side of the location bar and click the "More Information" button.
    This will open the Security tab of the ''Page Info'' window (also accessible via Tools > Page Info).
    Go to the ''Media'' tab of that Page Info window.
    Select the first image and scroll down though the list with the Down arrow.
    If an image in the list is grayed and there is a check-mark in the box ''Block Images from...'' then remove that mark to unblock the images from that domain.
    See also [[Images or animations do not show]] and http://kb.mozillazine.org/Images_or_animations_do_not_load

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • 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 what is wrong with recovery DVDs

    Last year, right after turning my laptop ON, I've created 4 DVDs as such: http://i56.tinypic.com/6i79rn.jpg
    Recovery DVD Disk 1
    Recovery DVD Disk 2
    Recovery DVD Disk 3
    Windows Recovery Environment 64-bit
    My Laptop is Qosmio F60-14R, with Windows 7 Home Premium.
    Now all I want to do is format my laptop and re-install windows 7 Home premium using those 4 DVDs. However I can't figure out why I cannot re-install or get the laptop back to the factory state.
    This have wasted 8 hours straight of my time and frustrated me by great deal. Can you kindly tell me what I have to do? I am lost!

    Here is what I have done so far:
    I inserted 'Windows Recovery Environment (64-bit)' DVD and booted the laptop from it.
    First thing that loads up is a window with two options:
    - Toshiba Recovery Wizard
    - System Recovery Options
    Taking Toshiba Recovery Wizard as choice, clicking Next.
    It asks me: "Please set 1st Recovery Media and press Next to Continue.
    So, I insert Recovery DVD 1 and then click Next. However it ejects the disc drive (seems Recovery DVD 1 is not the correct Disk!).
    So I repeat the same process with Recovery DVD 2 and Recovery DVD 3 and again the Disk Drive ejects the Disks.... As a desperation attempt I even put the Windows Recovery Environment Disk inside but that as well get ejected.
    Okay, so the Toshiba Recovery Wizard is not the right choice 'it seems'.
    So, I restart the laptop and inserted 'Windows Recovery Environment (64-bit)' DVD and booted the laptop from it.
    First thing that loads up is a window with two options: (First choice failed, now trying second choice)
    - --Toshiba Recovery Wizard--
    - System Recovery Options
    So, choosing System Recovery Options this time and clicking Next. I Choose US as Keyboard, then click Next. A small window appears which gives me two further options:
    - Use Recovery tools that can help fix problems starting Windows. Select an Operating System to repair.
    - Restore your computer using a system image that you created earlier.
    So, I already tried the first choice and it takes me to another window with several recovery tools. One of the tools is System Image Recovery but when I click it, it gives a Warning messagebox that says:
    Windows cannot find a system image on this computer. etc.
    But when I insert every disk, still the warning messagebox shows up as if all the four recovery DVDs are irrelevant.
    So, it seems the first choice doesn't lead me anywhere. So, remains the second choice:
    - Restore your computer using a system image that you created earlier.
    Turns out it is exactly the same 'System Image Recovery' from first option mentioned few lines earlier. So, there you have it, checkmate.
    Please guide.

  • 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

  • Master page size conflict? Can't figure out what's wrong...

    Hi community,
    I posted this ticket earlier, but I think I should post it in English, for a larger audience...
    So here's the story :
    I got a really odd issue while moving (or adding) pages...
    Here's a very basic layout :
    Now, lets place page 2 after page 3. Here's the result :
    As you can see, pages don't seem to relate properly to master pages.
    I can't figure out why...
    If I apply masters onto my pages, InDesign says there's a size conflict.
    Assuming I would apply again my master, ID will replace elements at the right place for now, but doesn't solve the problem at all.
    Any idea ??
    Here's a download link for this document :
    http://dl.free.fr/lPfXwwajm
    Please note, I'm working with InDesign CS6 (8.0.2 version)
    Thanks a lot for your help!
    Vincent

    Hi Willy.
    I didn't use the page tool (I never do), but it's a collaborative project, so I can't be sure nobody did.
    As you might have guessed, the attached Indd file is not the real file: I did remove all styles, variants, blocks,... everything from the original project to reduce it to a very basic template...
    If I create a document from scratch, obviously there is no problem. If I don't find the solution, I will recreate the document from scratch, but you'll understand I'd like to avoid spending my time that way...
    So...
    I tried changing the orientation from document setup and crtl-z... didn't do the trick!
    Now, here are more information for a better understanding:
    The original project was landscape orientated (A4).
    I had to adapt it to a portrait orientation version (still A4). Please note I didn't use the page tool. Obviously, something got wrong there and did create the problem...
    Now, if I right-click my page panel and set its view "by variant", the name of the (unique) variant is the same than the original project, even though it has a different orientation.
    The strange thing is that the name is a personalized one (it should have been "A4 H"). Why is that? I dunno... Why (anf who did?) change the name of the "variant" is a mystery... But I guess this could be a clue...
    Well... still stuck on this puzzler...
    Thanks all for your help anyway...

Maybe you are looking for