Datasheet pasting - how can I figure out where the errors are?

For example, I am trying to paste a fairly large chunk of data into the Datashet view to use in a list.  (about 30 columns by 9000 rows, so 270,000 cells.) When I try to page, it tells me that about 800 could not be pasted, but does not tell me WHICH
cells, or even which COLUMNS.   I am sure that if I could just figure out which cells were not being pasted, I could easily figure out WHY there is an error.  Can anybody give me any useful tips to help me pinpoint which columns/cells are having
the problem? Thanks!

Hi,
According to your post, my understanding is that to paste 270,000 cells data into the Datashet view to use in a list.
Please make sure the view have sufficient columns, otherwise the paste operation will fail.
A paste operation will also fail in the following situations:
Some or all of the destination cells are read-only
Pasting the contents into the selected cells will make them fail the validation rules
Attempting to paste data that does not match the data type of the destination cells
Attempting to paste data into a calculated column
More information:
Bulk copy and paste into a SharePoint List:
http://clintoncherry.wordpress.com/2008/02/27/bulk-copy-and-paste-into-a-sharepoint-list/
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • How can I figure out where are the heaviest volumes in order to get rid of the useless stuff?.

    How can I figure out where are the heaviest volumes in order to get rid of the useless stuff?.

    How about a few specific NOUNs to replace the vague references you have made. A little context.
    Volumes of WHAT ?
    What sort of STUFF are you trying to eliminate ?

  • HT201472 If my ipod was stolen, how can I figure out if the find my ipod app is activated

    If my ipod was stolen, how can I figure outg if the find my ipod app is activated.

    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                         
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • 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 can I find out where the Library files currently used by iTunes are located?

    I have had a bit of a nightmare sorting out my iTunes files so I have various versions of Library files all over the place. How can I tell where the Library file that iTunes is currently using is located? In Preferences I can see the Library "Name", but I don't think that is much help. Preferences also shows where my i-Tunes media folder is but not where the Library files are.
    Any help greatly appreciated.
    J

    Ah, I was assuming you would search in Finder and display some details. All alternative approach is to Option start iTunes and click the Choose option. It should show a file selection box targeted at the folder of the currently active library.
    tt2

  • How can I find out where certain prompts are used in a BI application?

    I have 2 questions...
    How do I identify all the dashboards where a specific object from my catalog is used in a BI application?
    Similiarly, how can I determine all the reports and prompts that use a specific field from my subject area?
    Thanks,
    Darcy

    Open catalog manager and create a report. That report can include column formula(field), table, catalog name and etc and will create a report that you can download to an excel dump giving all the reports and report paths that use those selected attributes.
    Open catalog manager--> go to tools--> create report and select all you need
    Hope it helps
    thanks
    prash

  • HELP!Can't figure out where the extra memory is coming from!

    I deleted everything off my ipod except the games so I could have a lot of memory for music and my pictures and as you know the this 2nd generation ipod nano has 892.5MB well I've only used 476.3MB for music 442.4MB photo's 33.9MB can't understand where the 245.2MB for the other is coming from unless its the games if so how do I get the games off I don't play them I just listen to the music and show my pics to family & friends I want enough memory left to put audio books on there tho.Can anyone tell me how to delete the games?

    The games that come pre-installed on the iPod can't be deleted.
    The storage space taken up by "Other" can be made up of, notes or files of any kind you've added to the iPod whilst using it as a hard disk or album artwork. Or sometimes when the iPod data base has become corrupt.
    There will always be a few MBs of used space under "other" but if it's more than that it often happens when the iPod data base becomes corrupt.
    If the iPod is enabled for disk use, you can look at the folders on the iPod through Explorer or Finder and delete anything you don't want.
    If it's a corruption it will probably need to be restored, see how to restore the iPod to factory settings which will erase the iPods contents and reclaim the used space.
    Then reload the music from iTunes.

  • Can't figure out why syntax errors are coming up

    Here is a simple Binary search type program, but instead of cutting the array in half, it uses interpolation to search the array. Here is the code, but I am getting syntax errors, I will post them below the code:
    public class BinIntSearch {
         private int interlope;
         private int low;
         private int high;
         private int[10] array1 = {6,500,600,700,800,900,1000,2000,3000,4000};
         public BinIntSearch() {//Start of Constructor
    interlope = 0;
         low = 0;
    high = 0;
    public int Search(int[] values, int target) {
    low = 0;
    high = 9;
    while(low < high)
    if(array1[low] == target)
         return low;
         else
    if(array1[high] == target)
    return high;
         interlope = (target - array1[low])/(array1[high] - array1[low]);
         interlope = low + (high - low) * interlope;
         if(interlope <= low)
         high--;
         else
         low = interlope;
    }//end of while loop
    System.out.println("Target not found");
    return -1;
    }//end of method
    public static void main(String args[])
    BinIntSearch binSearch = new BinIntSearch();
    binSearch.Search(array1,600);     
    }//end of class     
    here is the errors:
    C:\BinIntSearch\BinIntSearch.java:6: ']' expected
         private int[10] array1 = {6,500,600,700,800,900,1000,2000,3000,4000};
    ^
    C:\BinIntSearch\BinIntSearch.java:6: <identifier> expected
         private int[10] array1 = {6,500,600,700,800,900,1000,2000,3000,4000};
    ^
    C:\BinIntSearch\BinIntSearch.java:27: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
    if(array1[low] == target)
    ^
    C:\BinIntSearch\BinIntSearch.java:30: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
    if(array1[high] == target)
    ^
    C:\BinIntSearch\BinIntSearch.java:33: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
         interlope = (target - array1[low])/(array1[high] - array1[low]);
    ^
    C:\BinIntSearch\BinIntSearch.java:33: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
         interlope = (target - array1[low])/(array1[high] - array1[low]);
    ^
    C:\BinIntSearch\BinIntSearch.java:33: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
         interlope = (target - array1[low])/(array1[high] - array1[low]);
    ^
    C:\BinIntSearch\BinIntSearch.java:49: cannot resolve symbol
    symbol : variable array1
    location: class BinIntSearch
    binSearch.Search(array1,600);     
    ^
    8 errors
    Process completed.

    Thanks you guys, I made the change and learned something new and it worked. I made a refinement to the program, so i can initialize an array with consecutive numbers instead of typing in 10 I can have like 1000 or 1000000, I am getting 1 error. I can't figure this one out also. Also what is the meanding of static?
    here is the code and below it is the one error
    public class BinIntSearch {
    private int interlope;
    private int low;
    private int high;
    private int i;
    private int array1[10000];
    public BinIntSearch() {//Start of Constructor
    for(i = 0; i < 10000; i++)
    array1[i] = i;
    interlope = 0;
    low = 0;
    high = 0;
    Search(array1,500);
    public int Search(int[] values, int target) {
    low = 0;
    high = 9;
    while(low < high)
    if(array1[low] == target)
         System.out.println("Target Found");
    return low;
    if(array1[high] == target)
    System.out.println("Target Found");
    return high;
    interlope = (target - array1[low])/(array1[high] - array1[low]);
    interlope = low + (high - low) * interlope;
    if(interlope <= low)
    high--;
    else
    low = interlope;
    }//end of while loop
    System.out.println("Target not found");
    return -1;
    }//end of method
    public static void main(String args[])
    BinIntSearch binSearch = new BinIntSearch();
    }//end of class
    C:\BinIntSearch\BinIntSearch.java:8: ']' expected
    private int array1[10000];
    ^
    1 error
    Process completed.

  • I have 2008 microsoft office with three license keys. i bought my daughter a new make and wiped her older mac. question is when i did this it says there are too many users for program  how can i figure out where product key is

    I have microsoft officemac w 3 licenses. I have one key on one computer and the second key on another. Problem I bought daughter new mac (3rd computer) and put on key on her new computer. With her old computer we wiped it to back to factory etc. Then I added a product key for officemac on old
    est computer. Now when I use my wiped computer it comes up saying that all product keys are taken. How do I check to see if she has the same key number as the old one I have? I have paid for three but her computer and my old one must have the same key number. I need help in checking key numbers so I can set it right. Thanks 

    Office 2008 for Mac error: "Microsoft Office 2008 ... - Microsoft Support

  • I am unable to download a newer version of Firefox because it says that I have one that is open. I can't figure out where the open one is???

    I have the firefox icon on the tool bar at the bottom. When I click on it, another one appears so now there are 2. I wanted to update my firefox but, when I try to run the install I get a box that says that I need to close firefox in order to install and it is not open. I need to get this corrected. What do I do?

    Do a clean reinstall and delete the Firefox program folder before reinstalling a fresh copy of Firefox.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 19.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you will also lose your personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other profile data are stored in the Firefox Profile Folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • HT2693 unable to restore contacts from backup in iTunes.. how do i find out where the contacts are when it took the backup the first time?

    Please help me restore my contacts from the backup in my laptop. When i took the backup  the first time, i dont know where it took the backup. After that i tried restoring the contacts back  to my iPhone, but was unable to. What can i do to findout where did the contacts go in my laptop? Please help asap.

    Unfortunately, you have posted in the wrong community. However, I am not quite sure which community you should be posting in. Do you use iCloud for your contacts.

  • I lost my pictures on my phone when I did the back up procedure wrong with my computer.  How can I find out if the pictures are on ICloud or on my sims card?

    How do I find pictures that are no longer on my phone?  I am not sure if they are in ICloud or on my sims card.

    If your phone is off, there is no way to locate it other than physically looking for it. It cannot be remotely turned on. Even if it were on, you would have had to have Find My Phone setup/activated/turned on BEFORE you lost your phone to have any hope of finding it.

  • 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

  • Newbie for the life of me can't figure out where in contact.php you tell it where to send form?

    Thx for any help.
    I know it's got to be so obbvious.
    Why would you send in php vs html?
    <?php
    if(!$_POST) exit;
    $email = $_POST['email'];
    //$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
    if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
    $error.="Invalid email address entered";
    $errors=1;
    if($errors==1) echo $error;
    else{
    $values = array ('name','email','message');
    $required = array('name','email','message');
    $your_email = "[email protected]";
    $email_subject = "New Message: ".$_POST['subject'];
    $email_content = "new message:\n";
    foreach($values as $key => $value){
       if(in_array($value,$required)){
      if ($key != 'subject' && $key != 'company') {
        if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
      $email_content .= $value.': '.$_POST[$value]."\n";
    if(@mail($your_email,$email_subject,$email_content)) {
      echo 'Message sent!';
    } else {
      echo 'ERROR!';
    ?>

    Thanks. I'm working with different hosts and I guess thats where the confusion for me is coming in. In bluehost, I simply submit my form through form action to http://www.bluehost/bluemail. With the php form construction it 's form action is contact.php. Does this mean that the server I'm working with will uinderstand how to process contact.php and where to send it based on paramaters previously submitted? Or do I instruct the server via the php form? Thanks again
    Date: Wed, 8 Feb 2012 13:50:11 -0700
    From: [email protected]
    To: [email protected]
    Subject: Newbie for the life of me can't figure out where in contact.php you tell it where to send form?
        Re: Newbie for the life of me can't figure out where in contact.php you tell it where to send form?
        created by mhollis55 in Dreamweaver - View the full discussion
    The reason why this is done in php is because php is server-side scripting. It's telling your server to do stuff. HTML doesn't tell your server anything, it tells the client (the web browser loading it) to do things. Only your server can send an email.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4194407#4194407
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4194407#4194407. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • TS1702 I can not figure out where to go to report this but every since my last facebook update, facebook crashes everytime I open it (withing 30 sec) - using ITouch 4th Gen.

    I am not sure if this is where I go to report this, but I can't figure out where else to go. Ever since I downloaded the last App update for facebook, facebook crashes within 30 sec of opening - EVERY TIME!

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

Maybe you are looking for

  • Problem with Epson Printer and Time Capsule

    I have a new Time Capsule, already gone through first backup etc... I tried to connect my 2 month old Epson RX 680 to the TC via USB. I have tried everything and still cannot print wirelessly. I have uninstalled, reinstalled, rebooted both TC and pri

  • Yoga 2 Pro Protected Video

    I just bought a Yoga 2 Pro a few days ago and Am pretty happy with it, however I am having an incredibily annoying time with it when it comes to video. Any windows 8 app that plays protected video does not work. It sends and error message similar to

  • "Gutter jump" for photos across 2-page spreads

    I am new to InDesign and cannot find a clue on how to set up a two-page spread in a multi-page publication that is destined for CMYK process printing so that a photograph running across the "gutter" between the pages will print properly in the final

  • Dag and drop in table

    I would like move an entire row from one table to another with drag and drop components. i´ve tried put the dragsource to the first table but i get error: <af:table..> <af:column....> </af:column> <af:dragSource actions="COPY" discriminant="fileModel

  • Assign cost element to a line ID in the assignment in KKA2

    Hello all, While executing the KKA2 for particular WBS element getting error "Assign cost element 9221EF to a line ID in the assignment". Analysis: In OKGB the particular cost element is added and masked with cost center and activity  type still in K