 getInstance() {
        return Holder.INSTANCE;
    }

    /**
     * This constructor is marked protected for testing
     */
    protected LocalizationServiceImpl() {

    }

    public String getLocalizedMessage(final String key, Object... params) {
        return TfPluginBundle.message(key, params);
    }

    /**
     * Gets the localized exception message
     *
     * @param t
     * @return localized string
     */
    public String getExceptionMessage(Throwable t) {
        // Unwrap a CompletionException:
        if (t instanceof CompletionException) {
            Throwable cause = t.getCause();
            if (cause!= null)
                return getExceptionMessage(cause);
        }

        //get exception message
        String message = t.getLocalizedMessage();

        if (t instanceof LocalizedException) {
            final LocalizedException localizedException = (LocalizedException) t;
            final String key = localizedException.getMessageKey();
            if (keysMap.containsKey(key)) {
                message = getLocalizedMessage(keysMap.get(key), (Object[]) localizedException.getMessageParameters());
            }
        }

        //exception message is not set
        //Use the message on the cause if there is one
        if (StringUtils.isEmpty(message) && t.getCause()!= null) {
            if (t.getCause() instanceof LocalizedException) {
                final LocalizedException localizedException = (LocalizedException) t.getCause();
                final String key = localizedException.getMessageKey();
                if (keysMap.containsKey(key)) {
                    message = getLocalizedMessage(keysMap.get(key), (Object[]) localizedException.getMessageParameters());
                }
            } else {
                message = t.getCause().getLocalizedMessage();
            }
        }

        //No message on the exception and the cause, just use description from toString
        if (StringUtils.isEmpty(message)) {
            message = t.toString();
        }

        return message;
    }

    private static final Map<String, String> keysMap = new HashMap<String, String>() {
        {
            // Exception messages
            put(TeamServicesException.KEY_TFS_UNSUPPORTED_VERSION, "TFS.UnsupportedVersion");
            put(TeamServicesException.KEY_VSO_AUTH_SESSION_EXPIRED, "VSO.Auth.SessionExpired");
            put(TeamServicesException.KEY_VSO_AUTH_FAILED, "VSO.Auth.Failed");
            put(TeamServicesException.KEY_TFS_AUTH_FAILED, "TFS.Auth.Failed");
            put(TeamServicesException.KEY_OPERATION_ERRORS, "Operation.Lookup.Errors");
            put(TeamServicesException.KEY_VSO_NO_PROFILE_ERROR, "VSO.NoProfileError");
            put(TeamServicesException.KEY_TFS_MALFORMED_SERVER_URI, "TFS.MalformedServerUri");
            put(TeamServicesException.KEY_ERROR_UNKNOWN, "Errors.Unknown");
            put(TeamServicesException.KEY_TFS_SERVER_PATH_INVALID, "TFS.ServerPath.Invalid");

            // Tool Exception messages
            put(ToolException.KEY_TF_BAD_EXIT_CODE, "ToolException.TF.BadExitCode");
            put(ToolException.KEY_TF_DOLLAR_IN_PATH, "ToolException.TF.DollarInPath");
            put(ToolException.KEY_TF_HOME_NOT_SET, "ToolException.TF.HomeNotSet");
            put(ToolException.KEY_TF_EXE_NOT_FOUND, "ToolException.TF.ExeNotFound");
            put(ToolException.KEY_TF_PARSE_FAILURE, "ToolException.TF.ParseFailure");
            put(ToolException.KEY_TF_MIN_VERSION_WARNING, "ToolException.TF.MinVersionWarning");
            put(ToolException.KEY_TF_WORKSPACE_COULD_NOT_BE_DETERMINED, "ToolException.TF.WorkspaceCouldNotBeDetermined");
            put(ToolException.KEY_TF_WORKSPACE_EXISTS, "ToolException.TF.WorkspaceExists");
            put(ToolException.KEY_TF_BRANCH_EXISTS, "ToolException.TF.BranchExists");
            put(ToolException.KEY_TF_OOM, "ToolException.TF.OOM");
            put(ToolException.KEY_TF_AUTH_FAIL, "ToolException.TF.Auth.Fail");
            put(ToolException.KEY_TF_VS_MIN_VERSION_WARNING, "ToolException.VS.MinVersionWarning");
        }
    };

}
Summary: Age Range: 5-10 (Grades K-5, with parental supervision). It's National Pet Week! Here is a math website with poems and music videos to teach math. Have a dog-gone good time!
Check out the rest of Mr. R's website where you can find more math poems, music videos, activities, and more!If You Haven’t Seen ‘Sad Affleck’ Yet, You Need To. Immediately.
Just don’t feel sorry for him while you’re watching it.
If you went offline for the weekend, you may have missed one of the greatest viral videos to come out of 2016.
‘Sad Affleck’, which is literally a one minute vid of actor Ben Affleck sadly staring down at the floor to the musical track of Simon & Garfunkel’s Sound Of Silence after being asked if the bad reviews of his latest movie, Batman v Superman: Dawn Of Justice have affected him, has already pulled in more than 17 million views on YouTube.
It’s amazing what a bit of video editing can do. In this case, replacing the original sound with a gloomy song while zooming in on the devastated looking Affleck was enough to entertain the whole world, but it also sparked a variety of articles defending the actor, with many arguing why we shouldn’t make fun of him.
When I watched the video, I laughed a lot and I didn’t – and still don’t – feel sorry for Ben Affleck whatsoever. Now before you call me a heartless bitch, consider this: Ben Affleck is one of the most successful actors of the 21st century. He has played leading roles in 27 of the 44 movies in which he’s starred. He won his first Oscar in 1998 for his screenplay of Good Will Hunting, and his second Oscar in 2013 for his movie Argo, which he directed. He earns up to $15 million for each blockbuster he plays a part in and is currently signed for six movies, all to be released over the next three years.
But the most important reason I don’t feel bad for ‘Sad Ben Affleck’ is that Batman v Superman, regardless of any negative reviews, brought in $420 million on its opening weekend, making it the largest domestic opening for a Warner Bros flick. In other words, Ben Affleck doesn’t have any reason to feel sad, except for maybe the recent downfall of his 10-year marriage to Jennifer Garner. Now that’s a topic I wouldn’t laugh about.
For all I know, Affleck’s heartbroken look in the viral video might not even have had anything to do with what the reporter asked. This might have been his 25th interview that day and he may have simply zoned out for a while and remembered he forgot to record a football game.
Images and video via youtube.com and giphy.com.
Comment: Have you seen Batman v Superman? Is it really as bad as everybody is saying it is?
in development
E! Developing a Scripted Art Gallery Show
For those still mourning the end of Gallery Girls (a.k.a. everyone), excitohorrific news today: E! is developing an hour-long scripted series about an ambitious art gallery employee. It's almost the same! According to Deadline, Gallerina is about a young woman trying to make a name for herself in the L.A. art world, despite her womanizing boss and famous mother. You had us at "Gallerina."Now here’s one that I probably wouldn’t have tried, let alone bought, if it hadn’t been part of a bundle. Faerie Solitaire is apparently a fantasy-themed variant (and near-homophone) of the golf-themed Fairway Solitaire, a game I know almost nothing about. But now that it’s flounced its way onto the Stack, scattering glitter all over the place, I might as well give it a whirl.
It’s basically a get-rid-of-all-the-cards game, and feels quite a lot like that thing with the Mah Jongg tiles that there seemed to be a hundred different indie casual implementations of a few years ago. You have a bunch of cards on the table in stacks, and you have a “foundation” card. You can remove cards from the top of the stacks and place them on the foundation, but only if