Posted by & filed under Categorized.

Surprisingly helpful snippet of code …

public function printf(mask As String, ParamArray tokens()) as String
    dim i as Long
    for i = 0 To ubound(tokens)
        mask = replace$(mask, "{" & i & "}", tokens(i))
    next
    printf = mask
end Function

Add it to a VBA module.

=printf("Some text '{0}', more text: '{1}'", A1, A2)

source

Posted by & filed under Categorized.

Annie, the Dark Child

Abilities:

Incinerate14579
Disintegrate28101214
Summon Tibbers61116
Molten Shield313151718

Summoner Spells:

Runes:

9x
Greater Glyph of Magic Penetration
9x
Greater Mark of Ability Power
9x
Greater Seal of Health
3x
Greater Quintessence of Ability Power

Items:

...
...

Masteries:

  • (4/4) Sorcery [Offensive]
  • (1/1) Summoner's Wrath [Offensive]
  • (4/4) Blast [Offensive]
  • (3/3) Havoc [Offensive]
  • (1/1) Arcane Knowledge [Offensive]
  • (3/3) Mental Force [Offensive]
  • (4/4) Archmage [Offensive]
  • (1/1) Executioner [Offensive]
  • (3/4) Durability [Defensive]
  • (2/3) Perseverance [Defensive]
  • (1/1) Summoner's Insight [Utility]
  • (3/3) Meditation [Utility]



Posted by & filed under Categorized.

Somehow my breakpoints were not getting hit but the debugger seemed to be getting a response, it turned out that the mapping that I previously made with a Virtualbox VM was no longer working but I couldn’t figure out why. Until my testing code hit an error and showed the following output:

Debug Error: Call to undefined function screwyouimgoinghome() in /mnt/hgfs/-data-www-someproject-1.0/public/phpinfo.php on line 7

So the old “Absolute path on the server” changed from “/data/www/someproject/1.0″ to “/mnt/hgfs/-data-www-someproject-1.0″, happy days!

Posted by & filed under Categorized.

Client client = node.client();
        SearchRequestBuilder builder = client.prepareSearch('yourindexhere');
        builder.setSearchType(SearchType.QUERY_THEN_FETCH);
        String queryString = IOUtils.toString(YourClassHere.class.getResourceAsStream("/search.json"));

    /*
    builder.setQuery(QueryBuilders.matchAllQuery());
    */

    builder.setSource(queryString);
    ListenableActionFuture<SearchResponse> response = builder.execute();
    SearchResponse s = response.actionGet();

    System.out.println(s.getHits().totalHits());
    for (SearchHit hit : s.getHits()) {
        String source = hit.getSourceAsString();
        System.out.println(hit.getScore());
    }