Some (Probably Easy) Issues I Can't Figure Out...

So I installed my new Arch Linux system today, and I am willing to say I got it 90% done. I chose KDE as my environment but I have the following issues:
1.) I have the desktop set up as a traditional desktop. Whenever I save or delete files to or from my desktop, they are still there until I rightclick the desktop and click "refresh". I had this same problem in Kubuntu (which is where I'm coming from) and the KDE 4.3.2 update fixed it, but it doesn't appear to be fixed in Arch unless I did something wrong.
2.) Whenever I install new programs, they do not show up in my KDE menu until I logout and log in again.
3.) Finally, whenever I go into kmenuedit to edit my menu I get the error "Unable to contact khotkeys. Your changes are saved, but they could not be activated". Everything appears to be working fine. (Note: I haven't actually edited my kmenu yet, when I seen that error I stopped what i was up to).
I hope you guys can help me get rid of those small but irritating problems. I'm new to Arch and I am liking what I see so far!

Hi
Could you post the list of daemons you have set to run automatically at startup? (probably this will be the last line or two of your /etc/rc.conf )

Similar Messages

  • IMac 2010 Graphic issue?  Can't Figure Out

    Okay.... this week we noticed our 24" iMac might be having graphic issues.
    we have re-paired permission, reset P-RAM and trash preferences.... but still having the same issue.
    we are losing some graphic contrast in the background of each finder or itunes.
    in iTunes or Finder, we used to get a seperation between each line via light blue color and white.
    now it's all white.  i can still see the blue lines if I hover another window over it.  the drop shadow from the foreground window will still cast a line.
    it's hard to explain.... here is a picture of our finder window with another window on top of it.
    noticed the blue and white around the drop shadow area?  all of our windows don't have the blue/white anymore.... what could it be?

    that worked, thank goodness, thanks! not sure why I didn't try that

  • I can't figure out how to attach  a picture to a post.

    Some times it would just be easier to answer a question with a screenshot. I've noticed some pictures in posts but can't figure out how to do it.
    Thank you.

    Raidrunner,
    To post an image in  Discussions, create a Screen Shot of the image you wish to post.
    Upload the image to an online storage facility, like one of these linked to below.
    Flickr
    ImageShack
    PhotoBucket
    PICVAULT
    Twango
    Then use HTML formatting, to insert the URL of the location.
    Use this format <img src="Insert URL Here">
    Post the resulting line of text.
    Keep the images small, and unobtrusive, when possible.
    You can also just post a Link/URL, to the image location, using either of these formats:
    <a href="Insert URL Here">Type Title Here</a>
    <img src="Insert URL Here">
    Or use Skitch.
    Quoted from the Sktch website:
    "Skitch.com is a webservice that works hand in hand with our application Skitch to give you 1-click uploading of images for fast and fun image sharing.
    ali b

  • 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

  • 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.

  • Just got an Ipad and am working on setting it up.  the one issue I am having with it is my screen will not rotate no matter what I do to the settings, I can't figure out if the settings are wrong or if there really is something wrong with my Ipad.

    just got an Ipad and am working on setting it up.  the one issue I am having with it is my screen will not rotate no matter what I do to the settings, I can't figure out if I have a setting wrong or if there really is something wrong with my Ipad.  any help would be greatly appreciated.

    Double click the home button (square)  and all the things you did are there.keep sliding the bar that will come up on the bottom to the left till it cant go anymore there should be a icon looking like this.press that and it should work
    Good luck hope it works.

  • How do I add/copy songs from iTunes 11 to my iPod Classic and copy playlist from iTunes 11 to my iPod? It was easy to do in earlier versions of iTunes, but now I can not figure out how to do it.

    How do I add/copy songs from iTunes 11 to my iPod Classic and copy playlist from iTunes 11 to my iPod? It was easy to do in earlier versions of iTunes, but now I can not figure out how to do it.

    How do I add a new playlist to my ipod using iTunes 11? - https://discussions.apple.com/thread/4577843

  • Downloads - I want to open some PDFs/other file types from the internet but not have to save them; I can't figure out how to view them and close them without having to save them first.

    Downloads - I want to open some PDFs/other file types from the internet but not have to save them. I can't figure out how to view them and close them without having to save them first. When I click on a file, the downloads box opens and depending on the setting, it auto saves the file or asks me where to save the file. What if I don't want to save it anywhere, I just want to view it and close it?

    https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox
    https://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox

  • I probably misclicked when I activated the security lock on the iPhone and now I can not figure out what password I entered. Moreover, I have patches and funky looking phone so I can not restore iphine pres itunes. Please advice.

    I probably misclicked when I activated the security lock on the iPhone and now I can not figure out what password I entered. Moreover, I have patches and funky looking phone so I can not restore iphine pres itunes. Please advice.

    Your only recourse is to force it into DFU mode:
    Turn your phone off and connect your cable to the computer, but not the device just yet. Start up iTunes. Now, hold down the home button on your phone and plug it in to the cable - don't let go of the button until iTunes tells you it's detected a phone in recovery mode. Now you can restore to factory settings.

  • 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!

  • How do I check or uncheck multiple songs in my library, was easy to do on my pc, can't figure out on my Mac

    How do I check or uncheck multiple songs in my library, was easy to do on my pc, can't figure out on my Mac

    Same way.
    Command click to check/uncheck all songs.
    Or select songs, right click Check/Uncheck songs.

  • 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>

  • I can't figure out how to change me securtiy questions to down load music. Can i get some tips?

    I can't figure out how to change my securtiy questions to download my music from i tunes. Can someone help?

    http://support.apple.com/kb/ht5312

  • 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 why my zoom into stills shakes

    I have been using keyframes to create zooms and pans over pics, but every once in a while one of the pics shakes while it's moving. I can't figure out why this happens- any ideas? THANKS

    What you might be experiencing is a scaling issue: you're not really zooming into a picture but actually scaling it. Keep in mind DV is a 4:3 ratio. And your photos probably aren't. Scaling an image is shifting the pixels in an image and so if you're making the picture grow or shrink, you're shifting those pixels and that's could be what you are seeing. What size are your pictures? Are they huge, like twice the size of your standard 720 x 480 DV?
    If your photo images are extremely large (like 2838 x 2205, 300 dpi) you might try opening them up in a program like Photoshop and making a smaller version. You can force the results to be 4:3 by using the Crop tool. Be sure to adjust the Crop settings to something like 1440 px x 960 px , 72 dpi (double 720 x 480 so you can still scale) and then Crop the photo. Keep in mind, you might lose some of the photo because it isn't 4:3, so use Crop judiciously. Save the resulting image as something else and try using it instead of the original. Be sure to _render the results in the Timeline_ even though Final Cut may refer to it as a real-time effect.
    Also you should only have four total keyframes: a keyframe for the starting Scale size and a keyframe for the starting Center position. Then you should have a keyframe for the ending point for both Scale and Center where the image in Final Cut's Canvas window is either larger or smaller. That's it. If you have any other keyframes in-between these four, you can have problems-- which show up as the image moving around, hesitation, or some other unwanted movements.
    Good luck!

Maybe you are looking for