INPUT ARTICLE: Article: You can train in your home in the kitchen or living room. A backyard or a quiet outdoor space where there are no distractions also works. Your puppy can be on or off his leash to start. Dogs have short attention spans. For this reason, it is best to plan more frequent, shorter training sessions. Plan five minute training sessions with three to five "name calls" during different times of the day. Practice over the course of a few days. Use your puppy's name one time per exercise (e.g. Come, Molly!). If you repeat the name continually before the dog comes, he will tune the name out. Use the puppy's name with positive commands. Consider running away from your puppy while you call his name. Dogs love to chase things and might be more likely to follow you. Use the Name Game to practice name recognition. In the training area, keep him on a ten-foot leash. Give him five feet to wander. When he is not looking, call the puppy with an excited voice. Make sure he comes to you. If he does not come, pull him gently towards you. When he gets to you, praise him and give him a treat. Repeat the exercise until your puppy consistently returns to you when you call his name. Do not use the puppy's name in conjunction with negative commands or words (no and stay). Do not scold the puppy if he takes a while to come to you. Avoid nicknames that might confuse your dog, like "Come!" and "Stop!" These might sound funny, but they'll only lead to distress. Say, "yes!" when he comes. Give him verbal praise and/or a treat. Overall, act very excited and pleased about his behavior. You also could give your dog a belly rub. You can alternate what rewards you give the puppy. The goal is to associate puppy's obedience with a positive response from you.

SUMMARY: Find a place to begin training. Plan training sessions. Call your puppy's name in a happy, clear voice. Reward your puppy if he responds to his name.

INPUT ARTICLE: Article: Splitting a string in Java means to split a string by a certain delimiter into an array of substrings. For example, if I split the string "red,blue,green,yellow,pink" with a comma as the delimiter, I would get the array { "red", "blue", "green", "yellow", "pink" }. Here are three different ways to split a string. Import java.util.StringTokenizer. Then create a new instance of a StringTokenizer with the string to tokenize and the delimiter as parameters. If you do not enter the delimiter as a parameter, the delimiter will automatically default to white space. After you have the StringTokenizer, you can use the nextToken() method to get each token. import java.util.Arrays; import java.util.StringTokenizer; public class StringManipulation { public static void main(String[] args) { String str = "red,green,blue,yellow,pink"; StringTokenizer tokenizer = new StringTokenizer(str, ","); int numberOfTokens = tokenizer.countTokens(); String[] splitArr = new String[numberOfTokens]; for (int i = 0; i < numberOfTokens; i++) { splitArr[i] = tokenizer.nextToken(); } System.out.println("
Original String: " + str); System.out.println("Split Array: " + Arrays.toString(splitArr) + "
"); } } Before Java 1.4, the StringTokenizer class was used to split strings in Java. But now, the use of StringTokenizer is discouraged and the use of the split() method in the String class or the use of the java.util.regex package is encouraged. The split() method will take in the delimiter as a param and return an array of sub-strings that are the same as the tokens from the StringTokenizer. import java.util.Arrays; public class StringManipulation { public static void main(String[] args) { String str = "red,green,blue,yellow,pink"; String[] splitArr = str.split(","); System.out.println("
Original String: " + str); System.out.println("Split Array: " + Arrays.toString(splitArr) + "
"); } } Import java.util.regex.Pattern. Use the compile() method of the Pattern class to set the delimiter and then give the split() method the string that you want to split. The Pattern will return an array of substrings. import java.util.Arrays; import java.util.regex.Pattern; public class StringManipulation { public static void main(String[] args) { String str = "red,green,blue,yellow,pink"; String[] splitArr = Pattern.compile(",").split(str); System.out.println("
Original String: " + str); System.out.println("Split Array: " + Arrays.toString(splitArr) + "
"); } } Here is the output that results from any one of these methods for splitting strings.

SUMMARY: Understand what it means to split a string. Use StringTokenizer to tokenize the string. Use the String class's split() method. Use regular expressions to split the string. Review your output.

INPUT ARTICLE: Article: As your dog ages, it might have more trouble digesting food. Try feeding your dog a food that is specially formulated for seniors. These age-appropriate formulations are generally higher in fiber, which will improve gastrointestinal health. This can help improve your dog's appetite. Switch to the new food gradually over five days, with a mixture of 20% new food and 80% old food on the first day. Feed your dog 40% new food and 60% old food on the second day, and 60% new food with 40% old food on the third day. On the fourth day, feed your dog 80% new food and 20% old food. By day five, you should be feeding your dog 100% new food. One way to get a senior dog to eat more is to add something tasty to your dog's food. For example, you might try pouring a little chicken broth on top of dry dog food. You can also try adding a small amount of canned dog food to the dry food. Cooking a meal for your dog occasionally can entice it to eat. The smell of food cooking in the kitchen can improve a senior dog's appetite. Try giving your dog a home-cooked meal of boiled chicken breast and rice. You can also feed your senior dog a homemade meal of boiled lamb and barley. Avoid cooking for your pet more than once a week, as home-cooked food is not nutritionally complete for a senior dog.

SUMMARY:
Try a senior dog food. Make your dog's food more appealing. Cook dinner for your dog.