text:
/*global define*/
///////////////////////////////////////////////////////////////////////////
// Copyright © 2015 Esri. All Rights Reserved.
//
// Licensed under the Apache License Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an 'AS IS' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
///////////////////////////////////////////////////////////////////////////
define({
  "units": {
    "miles": {
      "displayText": "Mijl",
      "acronym": "mi"
    },
    "kilometers": {
      "displayText": "Kilometer",
      "acronym": "km"
    },
    "feet": {
      "displayText": "Voet",
      "acronym": "ft"
    },
    "meters": {
      "displayText": "Meter",
      "acronym": "m"
    }
  },
  "searchSetting": {
    "searchSettingTabTitle": "Zoekinstellingen",
    "defaultBufferDistanceLabel": "Stel de standaard bufferafstand in",
    "maxBufferDistanceLabel": "Stel de maximale bufferafstand in",
    "bufferDistanceUnitLabel": "Bufferafstandseenheden",
    "defaultBufferHintLabel": "Tip: stel de standaardwaarde voor de bufferschuif in",
    "maxBufferHintLabel": "Tip: stel de maximale waarde voor de bufferschuif in",
    "bufferUnitLabel": "Tip: eenheid definiëren voor het creëren van een buffer",
    "selectGraphicLocationSymbol": "Adres of locatiesymbool",
    "graphicLocationSymbolHintText": "Tip: symbool voor gezocht adres of aangeklikte locatie",
    "fontColorLabel": "Selecteer fontkleur voor zoekresultaten",
    "fontColorHintText": "Tip: fontkleur van zoekresultaten",
    "zoomToSelectedFeature": "Zoomen naar het geselecteerde object",
    "zoomToSelectedFeatureHintText": "Tip: zoomen naar het geselecteerde object in plaats van de buffer",
    "intersectSearchLocation": "Kruisende polygo(o)n(en) retourneren",
    "intersectSearchLocationHintText": "Tip: Retourneer polygo(o)n(en) die de gezochte locatie bevatten in plaats van polygonen binnen de buffer",
    "bufferVisibilityLabel": "Stel de zichtbaarheid van de buffer in",
    "bufferVisibilityHintText": "Tip: De buffer wordt weergegeven op de kaart",
    "bufferColorLabel": "Stel het symbool van de buffer in",
    "bufferColorHintText": "Tip: Selecteer de kleur en transparantie van de buffer",
    "searchLayerResultLabel": "Teken alleen geselecteerde laagresultaten",
    "searchLayerResultHint": "Tip: Alleen de geselecteerde laag in de zoekresultaten wordt op de kaart getekend"
  },
  "layerSelector": {
    "selectLayerLabel": "Zoekla(a)g(en) selecteren",
    "layerSelectionHint": "Tip: gebruik de instelknop om la(a)g(en) te selecteren",
    "addLayerButton": "Instellen"
  },
  "routeSetting": {
    "routeSettingTabTitle": "Instellingen routebeschrijving",
    "routeServiceUrl": "Routingservice",
    "buttonSet": "Instellen",
    "routeServiceUrlHintText": "Tip: Klik op 'Set' om te bladeren en selecteer een routingservice",
    "directionLengthUnit": "Lengte-eenheden richting",
    "unitsForRouteHintText": "Tip: gebruikt voor de weergave van eenheden voor route",
    "selectRouteSymbol": "Selecteer symbool om de route weer te geven",
    "routeSymbolHintText": "Tip: gebruikt voor de weergave van lijnsymbool van de route",
    "routingDisabledMsg": "Zorg er om richtingen in te schakelen voor dat de routing is ingeschakeld in het ArcGIS Online item."
  },
  "networkServiceChooser": {
    "arcgislabel": "Toevoegen vanuit ArcGIS Online",
    "serviceURLabel": "Service-URL toevoegen",
    "routeURL": "Route-URL",
    "validateRouteURL": "Valideren",
    "exampleText": "Voorbeeld",
    "hintRouteURL1": "https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/",
    "hintRouteURL2": "https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",
    "invalidRouteServiceURL": "Geef een geldige routeservice op.",
    "rateLimitExceeded": "Tarieflimiet overschreden. Probeer het later nogmaals.",
    "errorInvokingService": "Gebruikersnaam of wachtwoord is onjuist."
  },
  "errorStrings": {
    "bufferErrorString": "Voer een geldige numerieke waarde in.",
    "selectLayerErrorString": "Selecteer la(a)g(en) om te zoeken.",
    "invalidDefaultValue": "Standaard bufferafstand mag niet leeg zijn. Geef de bufferafstand op",
    "invalidMaximumValue": "Maximale bufferafstand mag niet leeg zijn. Geef de bufferafstand op",
    "defaultValueLessThanMax": "Geef de standaardbufferafstand op binnen de bovengrens",
    "defaultBufferValueGreaterThanZero": "Geef de standaardbufferafstand groter dan 0 op",
    "maximumBufferValueGreaterThanZero": "Geef de maximale bufferafstand groter dan 0 op"
  },
  "symbolPickerPreviewText": "Voorbeeld:"
});


text:
package net.sf.jabb.seqtx.azure;

import java.net.URISyntaxException;
import java.security.InvalidKeyException;

import net.sf.jabb.seqtx.SequentialTransactionsCoordinator;
import net.sf.jabb.seqtx.SequentialTransactionsCoordinatorTest;
import net.sf.jabb.seqtx.ex.TransactionStorageInfrastructureException;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;

import com.microsoft.azure.storage.CloudStorageAccount;

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class AzureSequentialTransactionsCoordinatorIntegrationTest extends SequentialTransactionsCoordinatorTest{

	public AzureSequentialTransactionsCoordinatorIntegrationTest(){
		super();
		timeScale = 20;
	}

	static protected AzureSequentialTransactionsCoordinator createAzureCoordinator()  throws InvalidKeyException, URISyntaxException{
		String connectionString = System.getenv("SYSTEM_DEFAULT_AZURE_STORAGE_CONNECTION");
		CloudStorageAccount storageAccount = CloudStorageAccount.parse(connectionString);
		AzureSequentialTransactionsCoordinator tracker = new AzureSequentialTransactionsCoordinator(storageAccount, "TestTable");
		return tracker;

	}

	@Override
	protected SequentialTransactionsCoordinator createCoordinator() throws InvalidKeyException, URISyntaxException {
		return createAzureCoordinator();
	}

	@BeforeClass
	@AfterClass
	static public void clearAll() throws TransactionStorageInfrastructureException, InvalidKeyException, URISyntaxException{
		createAzureCoordinator().clearAll();
	}

}

redpajama_set_name: RedPajamaGithub


text:
jQuery.fn.dragToSelect = function (conf) {
	var c = typeof(conf) == 'object' ? conf : {};

	// Config
	var config = jQuery.extend({
		className:		'jquery-drag-to-select',
		activeClass:	'active',
		disabledClass:	'disabled',
		selectedClass:	'selected',
		scrollTH:		10,
		percentCovered:	25,
		selectables:	false,
		autoScroll:		false,
		selectOnMove:	true,
		onShow:			function () {return true;},
		onHide:			function () {return true;},
		onRefresh:		function () {return true;}
	}, c);

	var realParent	= jQuery(this);
	var parent		= realParent;

	do {
		if (/auto|scroll|hidden/.test(parent.css('overflow'))) {
			break;
		}
		parent = parent.parent();
	} while (parent[0].parentNode);

	// Does user want to disable dragToSelect
	if (conf == 'disable') {
		parent.addClass(config.disabledClass);
		return this;
	}
	else if (conf == 'enable') {
		parent.removeClass(config.disabledClass);
		return this;
	}

	var parentOffset	= parent.parent().parent().parent().offset();
	var parentDim		= {
		left:	parentOffset.left,
		top:	parentOffset.top,
		width:	parent.width(),
		height:	parent.height()
	};

	// Current origin of select box
	var selectBoxOrigin = {
		left:	0,
		top:	0
	};

	// Create select box
	var selectBox = jQuery('<div/>')
						.appendTo(parent)
						.attr('class', config.className)
						.css('position', 'absolute');

	// Shows the select box
	var showSelectBox = function (e) {
		if (parent.is('.' + config.disabledClass)) {
			return;
		}

		selectBoxOrigin.left	= e.pageX - parentDim.left + parent.parent().parent()[0].scrollLeft;
		selectBoxOrigin.top		= e.pageY - parentDim.top + parent.parent().parent()[0].scrollTop;

		var css = {
			left:		selectBoxOrigin.left + 'px',
			top:		selectBoxOrigin.top + 'px',
			width:		'1px',
			height:		'1px'
		};
		selectBox.addClass(config.activeClass).css(css);

		config.onShow();
	};

	// Refreshes the select box dimensions and possibly position
	var refreshSelectBox = function (e) {
		if (!selectBox.is('.' + config.activeClass) || parent.is('.' + config.disabledClass)) {
			return;
		}

		var left		= e.pageX - parentDim.left + parent[0].scrollLeft;
		var top			= e.pageY - parentDim.top + parent[0].scrollTop;
		var newLeft		= left;
		var newTop		= top;
		var newWidth	= selectBoxOrigin.left - newLeft;
		var newHeight	= selectBoxOrigin.top - newTop;

		if (left > selectBoxOrigin.left) {
			newLeft		= selectBoxOrigin.left;
			newWidth	= left - selectBoxOrigin.left;
		}

		if (top > selectBoxOrigin.top) {
			newTop		= selectBoxOrigin.top;
			newHeight	= top - selectBoxOrigin.top;
		}

		var css = {
			left:	newLeft + 'px',
			top:	newTop + 'px',
			width:	newWidth + 'px',
			height:	newHeight + 'px'
		};
		selectBox.css(css);

		config.onRefresh();
	};

	// Hides the select box
	var hideSelectBox = function (e) {
		if (!selectBox.is('.' + config.activeClass) || parent.is('.' + config.disabledClass)) {
			return;
		}
		if (config.onHide(selectBox) !== false) {
			selectBox.removeClass(config.activeClass);
		}
	};

	// Scrolls parent if needed
	var scrollPerhaps = function (e) {
		if (!selectBox.is('.' + config.activeClass) || parent.is('.' + config.disabledClass)) {
			return;
		}

		// Scroll down
		if ((e.pageY + config.scrollTH) > (parentDim.top + parentDim.height)) {
			parent[0].scrollTop += config.scrollTH;
		}
		// Scroll up
		if ((e.pageY - config.scrollTH) < parentDim.top) {
			parent[0].scrollTop -= config.scrollTH;
		}
		// Scroll right
		if ((e.pageX + config.scrollTH) > (parentDim.left + parentDim.width)) {
			parent[0].scrollLeft += config.scrollTH;
		}
		// Scroll left
		if ((e.pageX - config.scrollTH) < parentDim.left) {
			parent[0].scrollLeft -= config.scrollTH;
		}
	};

	// Selects all the elements in the select box's range
	var selectElementsInRange = function () {
		if (!selectBox.is('.' + config.activeClass) || parent.is('.' + config.disabledClass)) {
			return;
		}

		var selectables		= realParent.find(config.selectables);
		var selectBoxOffset	= selectBox.offset();
		var selectBoxDim	= {
			left:	selectBoxOffset.left,
			top:	selectBoxOffset.top,
			width:	selectBox.width(),
			height:	selectBox.height()
		};

		selectables.each(function (i) {
			var el			= $(this);
			var elOffset	= el.offset();
			var elDim		= {
				left:	elOffset.left,
				top:	elOffset.top,
				width:	el.width(),
				height:	el.height()
			};

			if (percentCovered(selectBoxDim, elDim) > config.percentCovered) {
				el.addClass(config.selectedClass);
			}
			else {
				el.removeClass(config.selectedClass);
			}
		});
	};

	// Returns the amount (in %) that dim1 covers dim2
	var percentCovered = function (dim1, dim2) {
		// The whole thing is covering the whole other thing
		if (
			(dim1.left <= dim2.left) &&
			(dim1.top <= dim2.top) &&
			((dim1.left + dim1.width) >= (dim2.left + dim2.width)) &&
			((dim1.top + dim1.height) > (dim2.top + dim2.height))
		) {
			return 100;
		}
		// Only parts may be covered, calculate percentage
		else {
			dim1.right		= dim1.left + dim1.width;
			dim1.bottom		= dim1.top + dim1.height;
			dim2.right		= dim2.left + dim2.width;
			dim2.bottom		= dim2.top + dim2.height;

			var l = Math.max(dim1.left, dim2.left);
			var r = Math.min(dim1.right, dim2.right);
			var t = Math.max(dim1.top, dim2.top);
			var b = Math.min(dim1.bottom, dim2.bottom);

			if (b >= t && r >= l) {
			/*	$('<div/>').appendTo(document.body).css({
					background:	'red',
					position:	'absolute',
					left:		l + 'px',
					top:		t + 'px',
					width:		(r - l) + 'px',
					height:		(b - t) + 'px',
					zIndex:		100
				}); */

				var percent = (((r - l) * (b - t)) / (dim2.width * dim2.height)) * 100;

			//	alert(percent + '% covered')

				return percent;
			}
		}
		// Nothing covered, return 0
		return 0;
	};

	// Do the right stuff then return this
	selectBox
		.mousemove(function (e) {
			refreshSelectBox(e);

			if (config.selectables && config.selectOnMove) {
				selectElementsInRange();
			}

			if (config.autoScroll) {
				scrollPerhaps(e);
			}

			e.preventDefault();
		})
		.mouseup(function(e) {
			if (config.selectables) {
				selectElementsInRange();
			}

			hideSelectBox(e);

			e.preventDefault();
		});

	if (jQuery.fn.disableTextSelect) {
		parent.disableTextSelect();
	}

	parent
		.mousedown(function (e) {
			// Make sure user isn't clicking scrollbar (or disallow clicks far to the right actually)
			if ((e.pageX + 20) > jQuery(document.body).width()) {
				return;
			}

			showSelectBox(e);

			e.preventDefault();
		})
		.mousemove(function (e) {
			refreshSelectBox(e);

			if (config.selectables && config.selectOnMove) {
				selectElementsInRange();
			}

			if (config.autoScroll) {
				scrollPerhaps(e);
			}

			e.preventDefault();
		})
		.mouseup(function (e) {
			if (config.selectables) {
				selectElementsInRange();
			}

			hideSelectBox(e);

			e.preventDefault();
		});

	// Be nice
	return this;
};


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
E - 索引
</TITLE>

<META NAME="date" CONTENT="2013-11-20">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      概述
      软件包
      类
      使用
      树
      已过时
    索引
      帮助

 上一个字母
 下一个字母

  框架
 无框架

  所有类

A C D E G I J M O P R S T V W

E

evaluate(Object) -
类 org.fl.modules.excel.rule.ImportValidatePredicate 中的方法

单元格验证规则定义

evaluate(String, Rule, ImportValidateRule) -
类 org.fl.modules.excel.rule.ImportValidatePredicate 中的方法

ExcelReturn - org.fl.modules.excel 中的 类
项目名称:qy-modules-excel
 类名称:ExcelReturn
 类描述:
 创建人:David.Yang
 创建时间:2013-11-13 上午09:33:27
 修改人:David.Yang
 修改时间:2013-11-13 上午09:33:27
 修改备注:
ExcelReturn() -
类 org.fl.modules.excel.ExcelReturn 的构造方法

excute(int, ISXSSFWorkBook, List) -
类 org.fl.modules.excel.poi.exportExcel.multi.SXSSFWorkBookOperation 中的方法

执行excel操作主要模板方法

excute(ISXSSFWorkBook, List) -
类 org.fl.modules.excel.poi.exportExcel.multi.SXSSFWorkBookOperation 中的方法

ExportExcelMultiSupport - org.fl.modules.excel.poi.exportExcel.multi 中的 类
项目名称:david-modules-excel
 类名称:ExportExcelMultiSupport
 类描述:
 创建人:David.Yang
 创建时间:2013-11-20 上午09:30:41
 修改人:David.Yang
 修改时间:2013-11-20 上午09:30:41
 修改备注:
ExportExcelMultiSupport() -
类 org.fl.modules.excel.poi.exportExcel.multi.ExportExcelMultiSupport 的构造方法

创建一个新的实例 ExportExcelMultiSupport.

      概述
      软件包
      类
      使用
      树
      已过时
    索引
      帮助

 上一个字母
 下一个字母

  框架
 无框架

  所有类

A C D E G I J M O P R S T V W


text:
<img src="images/darkmoon_tophat.png" style="float:right;"/>

Track appearances as they unlock, inspect another's wardrobe appearances & current mount...
What else is in his hat?

Know when you unlock *any* transmogrification appearance, not just the epic ones, and tell your friends.
Take the hassle out of inspecting someone's **transmog**!
Quickly know (and clone) what **mount** someone is using!
*Go Go Inspector Gadgetzan!*

## Overview

With Inspector Gadgetzan, when you inspect another player you get a new tab along the bottom: IG.  Viewing this tab will show you all the appearances that person is using for their current look.  From here you can control-click the items to see how it would look on you, you can look at their tooltips to get extra information (typically from other addons), and you can click its name to view that appearance in the wardrobe collection.

Additionally if the person you are inspecting is mounted, it will show you the name of their current mount, and give you a button to see that mount in the mount journal. ![IG Screenshot](images/IG-Screenshot-1.jpg)

New in v7.0.3.4 is the **"MogLog"**.  Have you unlocked an epic item and seen the message appear and wonder why that doesn't happen for every appearance?  Well the Inspector was on the case and now it does!  In addition, it will share with your guildies and party members who also have the addon.  Celebrate those unique drops, and keep hunting for additional sources of the same look to complete your collection.
![Mog Log Screenshot](images/MogLog-1.png)![Mog Log Screenshot](images/MogLog-3.jpg)

To get the most out of the MogLog atm, create a new Chat Window (right click on "General" -> New Chat Window) and name it "Inspector Gadgetzan".  That way, all your collections will be in one spot, and not mixed up with all the other stuff happening.  I also choose settings of the new tab and turn off the other chat fields.  This configuration may change in a future release.

New in v7.0.3.6 is the 'Toast' for the MogLog.  New Appearances will pop-up like other important events in game.
![New Appearances Toast animated gif](images/new-appearance-toast.gif)

Be sure you have your guildies to get the addon as well so they'll see your unlocks and you can see theirs.

## Slash commands & LDB commands

Inspector Gadgetzan gives you a few slash commands to use as well to help with your macros etc. and these functions are available via the minimap icon, and an LDB interface

* `/ig mount`  - this will report to you the current target's mount both in chat and pop the mount journal for that mount
* `/ig mount clone` - this is a fun quick gadget that lets you mount the same mount as your target (if you have it of course)
* `/ig inspect` - inspect the target and jump to the Inspector Gadgetzan tab directly
* `/ig options` - opens the interface options screen

## Optional Dependencies

The addon [CanIMogIt](https://mods.curse.com/addons/wow/can-i-mog-it) is a great tool, and if you have it installed, your wardrobe appearances tab will be greatly benefit from it.  The colors and 'try on' buttons will work much better.

## Development
### Where to find the AddOn

* [https://github.com/ChrisNolan/InspectorGadgetzan](https://github.com/ChrisNolan/InspectorGadgetzan) - Main development site
* [https://mods.curse.com/addons/wow/inspectorgadgetzan](https://mods.curse.com/addons/wow/inspectorgadgetzan)
* [http://www.wowinterface.com/downloads/info24082-InspectorGadgetzan.html](http://www.wowinterface.com/downloads/info24082-InspectorGadgetzan.html)

### Known Issues

* no localization yet
* ElvUI notifications seem to go off the top of the screen, rather than going down.
* CanIMogIt update has broken some of the 'try on' functionality... need to sort through the different response codes/messages again

A gadget to improve access to information about players you encounter in World of Warcraft; such as what they are wearing, or which mount they are on written by Hiketeia of Emerald Dream-US.

### Contributors

* VincentSDSH - 2016-07 initial LDB&Minimap code + first fan!


text:
using UnityEngine;
using System.Collections;

public class Logger : MonoBehaviour {

	private static Logger _instance = null;
	public static Logger GetInstance()
	{
		return _instance;
	}

	void Start ()
	{
		if (_instance == null)
		{
			_instance = this;
		}
		else
		{
			Destroy(gameObject);
		}
	}

	public void Log(string message)
	{
		Debug.Log(message);
	}
}


text:
package cloud.orbit.actors.test.reminders;

import cloud.orbit.actors.Actor;
import cloud.orbit.actors.Remindable;
import cloud.orbit.actors.Stage;
import cloud.orbit.actors.runtime.AbstractActor;
import cloud.orbit.actors.runtime.ReminderControllerActor;
import cloud.orbit.actors.runtime.ShardedReminderController;
import cloud.orbit.actors.runtime.TickStatus;
import cloud.orbit.actors.test.ActorBaseTest;
import cloud.orbit.concurrent.Task;

import org.junit.Test;

import java.util.List;
import java.util.UUID;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

import static junit.framework.TestCase.assertNull;
import static org.junit.Assert.assertEquals;

@SuppressWarnings("unused")
public class ReminderTests extends ActorBaseTest
{
    // At the moment the clock injected to the stage is not used by the timer subsystem.

    public static interface ReminderTest extends Actor, Remindable
    {

        Task<?> addReminder(String name, long start, long period, TimeUnit unit);

        Task<?> removeReminder(String name);

    }

    private static BlockingQueue<String> remindersReceived = new LinkedBlockingQueue<>();

    @SuppressWarnings("rawtypes")
    public static class ReminderTestActor extends AbstractActor implements ReminderTest
    {

        @Override
        public Task<?> receiveReminder(String reminderName, TickStatus status)
        {
            remindersReceived.add(reminderName);
            return Task.done();
        }

        @Override
        public Task<?> addReminder(String name, long start, long period, TimeUnit unit)
        {
            return registerReminder(name, start, period, unit);
        }

        @Override
        public Task<?> removeReminder(String name)
        {
            return unregisterReminder(name);
        }

    }

    @Test
    public void timerTest() throws ExecutionException, InterruptedException
    {
        Stage stage1 = createStage();
        Stage frontend = createClient();

        ReminderTest actor = Actor.getReference(ReminderTest.class, "1");
        actor.addReminder("bla", 0, 50, TimeUnit.MILLISECONDS).join();
        assertEquals("bla", remindersReceived.poll(5, TimeUnit.SECONDS));
        assertEquals("bla", remindersReceived.poll(5, TimeUnit.SECONDS));
    }

    @Test
    public void persistedTimerTest() throws ExecutionException, InterruptedException
    {
        loggerExtension.enableDebugFor(ReminderControllerActor.class);
        Stage stage1 = createStage();
        Stage frontend = createClient();

        ReminderTest actor = Actor.getReference(ReminderTest.class, "1");
        frontend.bind();
        actor.addReminder("bla", 0, 20, TimeUnit.MILLISECONDS).join();
        assertEquals("bla", remindersReceived.poll(5, TimeUnit.SECONDS));

        stage1.stop().join();
        remindersReceived.clear();
        assertNull(remindersReceived.poll(5, TimeUnit.MILLISECONDS));
        Stage stage2 = createStage();
        //actor.addReminder("bla", 0, 20, TimeUnit.MILLISECONDS).join();

        assertEquals("bla", remindersReceived.poll(100, TimeUnit.SECONDS));
        stage2.stop().join();
    }

    @Test
    public void shardTest()
    {
        final Stage stage = createStage(builder -> builder.numReminderControllers(2));
        final String reminderName = UUID.randomUUID().toString();

        final String reminderControllerIdentity = stage.getReminderControllerIdentity(reminderName);
        final ShardedReminderController reminderController = Actor.getReference(ShardedReminderController.class, reminderControllerIdentity);

        final List<String> remindersBeforeAdd = reminderController.getReminders().join();
        assertEquals(0, remindersBeforeAdd.size());

        final ReminderTest testActor = Actor.getReference(ReminderTest.class, reminderName);
        testActor.addReminder(reminderName, 1L, 1L, TimeUnit.DAYS).join();

        final List<String> remindersAfterAdd = reminderController.getReminders().join();
        assertEquals(1, remindersAfterAdd.size());
        assertEquals(reminderName, remindersAfterAdd.get(0));

        testActor.removeReminder(reminderName).join();

        final List<String> remindersAfterRemove = reminderController.getReminders().join();
        assertEquals(0, remindersAfterRemove.size());

    }

}


text:
package core

import "github.com/hyperledger/fabric/common/flogging"

// See fabric/core/peer/config.go for comments on the configuration caching
// methodology.

var coreLogger = flogging.MustGetLogger("core")

var configurationCached bool
var securityEnabled bool

// CacheConfiguration caches configuration settings so that reading the yaml
// file can be avoided on future requests
func CacheConfiguration() error {
	securityEnabled = true
	configurationCached = true
	return nil
}

func cacheConfiguration() {
	if err := CacheConfiguration(); err != nil {
		coreLogger.Errorf("Execution continues after CacheConfiguration() failure : %s", err)
	}
}

// SecurityEnabled returns true if security is enabled
func SecurityEnabled() bool {
	if !configurationCached {
		cacheConfiguration()
	}
	return securityEnabled
}


text:
This is an example application that utilizes the [bitter-irc](https://github.com/jpiontek/bitter-irc) library to build a small "bot".

## Running

To run execute the following command in the repository root after cloning to your local machine.

```
go run main.go -oauth=token -clientid=id -username=user -channels=example,channels
```

As you can see you need to pass in a few flags:

* oauth
* clientid
* usrename
* channels

These are pretty self-explanatory. "oauth" is your oauth token. "channels" is a comma separated list of values to join multiple channels.

## Explanation

The application will connect to multiple Twitch IRC channels and start pumping the messages to stdout via the [logger digester](https://github.com/jpiontek/bitter-irc-example/blob/master/main.go#L94-L98).
It also has a [pingHandler digester](https://github.com/jpiontek/bitter-irc-example/blob/master/main.go#L101-L105) that will respond to a user that executes the !ping command in a channel.

When running you'll see log messages in your terminal that look something like this:

> 2017-01-10 12:32:10 [user] Kappa

And an example of the pingHandler :

> 2017-01-10 12:32:10 [user] !ping
> 2017-01-10 12:32:10 [bot] pong @user

## Notes

All digesters **must** be threadsafe. They will be called from multiple go routines as new messages come in. Keep this in mind
if you create a digester that interacts with any type of unsafe struct.


text:
/*
$Revision: 1.9 $
$Date: 2007-12-04 20:10:30 $

*/

package org.rti.webgenome.service.plot;

import java.awt.Color;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.rti.webgenome.domain.Experiment;
import org.rti.webgenome.domain.GenomeInterval;
import org.rti.webgenome.domain.QuantitationType;
import org.rti.webgenome.graphics.PlotBoundaries;
import org.rti.webgenome.graphics.event.EventHandlerGraphicBoundaries;
import org.rti.webgenome.graphics.event.MouseOverStripes;
import org.rti.webgenome.graphics.io.ClickBoxes;
import org.rti.webgenome.graphics.widget.Axis;
import org.rti.webgenome.graphics.widget.Background;
import org.rti.webgenome.graphics.widget.Caption;
import org.rti.webgenome.graphics.widget.Grid;
import org.rti.webgenome.graphics.widget.Legend;
import org.rti.webgenome.graphics.widget.PlotPanel;
import org.rti.webgenome.graphics.widget.ScatterPlot;
import org.rti.webgenome.service.util.ChromosomeArrayDataGetter;
import org.rti.webgenome.units.BpUnits;
import org.rti.webgenome.units.HorizontalAlignment;
import org.rti.webgenome.units.Location;
import org.rti.webgenome.units.Orientation;
import org.rti.webgenome.units.VerticalAlignment;

/**
 * Manages the painting scatter plots by getting
 * data and assembling plot widgets.
 * @author dhall
 *
 */
public class ScatterPlotPainter extends PlotPainter {

	// ===========================
	//       Constants
	// ===========================

	/** Grid color. */
	private static final Color GRID_COLOR = Color.WHITE;

	/** Background color. */
	private static final Color BG_COLOR = new Color(235, 235, 235);

	// ===============================
	//    Constructors
	// ===============================

	/**
	 * Constructor.
	 * @param chromosomeArrayDataGetter Chromosome array data getter
	 */
	public ScatterPlotPainter(
			final ChromosomeArrayDataGetter chromosomeArrayDataGetter) {
		super(chromosomeArrayDataGetter);
	}

	// =========================
	//    Business methods
	// =========================

    /**
     * Paints a plot on the given plot panel.
     * @param panel Plot panel to add the scatter plot to
     * @param experiments Experiments to plot
     * @param params Plotting parameters specified
     * by user
     * @return Boundaries of event handler regions.
     */
    public final EventHandlerGraphicBoundaries paintPlot(
    		final PlotPanel panel,
    		final Collection<Experiment> experiments,
    		final ScatterPlotParameters params) {

        // Check args
        if (experiments == null || panel == null) {
            throw new IllegalArgumentException(
                    "Experiments and panel cannot be null");
        }
        if (params.getGenomeIntervals() == null
        		|| params.getGenomeIntervals().size() < 1) {
        	throw new IllegalArgumentException(
        			"No genome intervals specified");
        }

        RowAdder rowAdder = new RowAdder(experiments, params,
        		this.getChromosomeArrayDataGetter());
        int rowCount = 1;
        while (rowAdder.hasMore()) {
        	PlotPanel row = panel.newChildPlotPanel();
        	rowAdder.addRow(row);
        	VerticalAlignment va = null;
        	if (rowCount++ == 1) {
				va = VerticalAlignment.TOP_JUSTIFIED;
			} else {
				va = VerticalAlignment.BELOW;
			}
			panel.add(row, HorizontalAlignment.LEFT_JUSTIFIED, va);
        }

		// Legend
        Legend legend = new Legend(experiments, params.getWidth());
        panel.add(legend, HorizontalAlignment.CENTERED,
                VerticalAlignment.BELOW);

        // Gather up click boxes and mouseover stripes
        Set<ClickBoxes> boxes = new HashSet<ClickBoxes>();
        Set<MouseOverStripes> stripes =
        	new HashSet<MouseOverStripes>();
        for (ScatterPlot plot : rowAdder.getPlotsCreated()) {
        	boxes.add(plot.getClickBoxes());
        	stripes.add(plot.getMouseOverStripes());
        }
        return new EventHandlerGraphicBoundaries(stripes, boxes);
    }

    /**
     * Helper class that adds a new row to the overall plot.
     * @author dhall
     */
    static final class RowAdder {

    	//
    	//  A T T R I B U T E S
    	//

    	/** Experiments containing data to plot. */
    	private Collection<Experiment> experiments =
    		new ArrayList<Experiment>();

    	/** Index variable that points to next genome interval to plot. */
    	private int idx = 0;

    	/** Plots created since object instantiated. */
    	private Collection<ScatterPlot> plots =
    		new ArrayList<ScatterPlot>();

    	/** Plotting parameters. */
    	private ScatterPlotParameters params = null;;

    	/** Genome intervals to plot. */
    	private List<GenomeInterval> genomeIntervals =
    		new ArrayList<GenomeInterval>();

    	/**
    	 * Quantitation type of left Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.
    	 */
    	private QuantitationType leftYAxisQuantitationType = null;

    	/**
    	 * Quantitation type of right Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.  This will remain null
    	 * unless the plot is co-visualization.
    	 */
    	private QuantitationType rightYAxisQuantitationType = null;

    	/**
    	 * Minimum value on left Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.
    	 */
    	private double leftYAxisMinValue = Double.NaN;

    	/**
    	 * Maximum value on left Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.
    	 */
    	private double leftYAxisMaxValue = Double.NaN;

    	/**
    	 * Minimum value on right Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.  This will remain
    	 * NaN unless plot is co-visualization.
    	 */
    	private double rightYAxisMinValue;

    	/**
    	 * Maximum value on right Y-axis.  Two Y-axes
    	 * are needed for co-visualization (i.e. copy number
    	 * and expression data) plots.  This will remain
    	 * NaN unless plot is co-visualization.
    	 */
    	private double rightYAxisMaxValue;

    	/** Sizes individual genome interval scatter plots. */
    	private ScatterPlotSizer sizer;

    	/** Getter for data. */
    	private ChromosomeArrayDataGetter chromosomeArrayDataGetter;

    	//
    	//  C O N S T R U C T O R S
    	//

    	/**
    	 * Constructor.
    	 * @param experiments Experiments to plot.
    	 * @param params Plotting parameters
    	 * @param chromosomeArrayDataGetter Data getter
    	 */
    	private RowAdder(final Collection<Experiment> experiments,
    			final ScatterPlotParameters params,
    			final ChromosomeArrayDataGetter chromosomeArrayDataGetter) {
    		this.experiments.addAll(experiments);
    		this.params = params;
    		this.genomeIntervals.addAll(params.getGenomeIntervals());
    		Collections.sort(this.genomeIntervals);
    		QuantitationType copyNumberQT =
    			Experiment.getCopyNumberQuantitationType(experiments);
    		if (copyNumberQT != null) {
    			this.leftYAxisQuantitationType = copyNumberQT;
    			this.leftYAxisMaxValue = params.getCopyNumberMaxY();
    			this.leftYAxisMinValue = params.getCopyNumberMinY();
    		}
    		QuantitationType expressionQT =
    			Experiment.getExpressionQuantitationType(experiments);
    		if (expressionQT != null) {
    			if (this.leftYAxisQuantitationType == null) {
    				this.leftYAxisQuantitationType = expressionQT;
    				this.leftYAxisMaxValue = params.getExpressionMaxY();
    				this.leftYAxisMinValue = params.getExpressionMinY();
    			} else {
    				this.rightYAxisQuantitationType = expressionQT;
    				this.rightYAxisMaxValue = params.getExpressionMaxY();
    				this.rightYAxisMinValue = params.getExpressionMinY();
    			}
    		}
    		if (copyNumberQT != null && expressionQT != null) {
    			this.mergeAxesRanges();
    		}
    		this.sizer = new ScatterPlotSizer(params);
    		this.chromosomeArrayDataGetter = chromosomeArrayDataGetter;
    	}

    	/**
    	 * For co-visualization of copy number/LOH and expression data,
    	 * both Y-axes should have the same range.  This method merges
    	 * those ranges.
    	 */
    	private void mergeAxesRanges() {
    		double maxY = Double.NaN;
    		double minY = Double.NaN;
    		if (this.leftYAxisMaxValue > this.rightYAxisMaxValue) {
    			maxY = this.leftYAxisMaxValue;
    		} else {
    			maxY = this.rightYAxisMaxValue;
    		}
    		if (this.leftYAxisMinValue < this.rightYAxisMinValue) {
    			minY = this.leftYAxisMinValue;
    		} else {
    			minY = this.rightYAxisMinValue;
    		}
    		this.leftYAxisMaxValue = maxY;
    		this.rightYAxisMaxValue = maxY;
    		this.leftYAxisMinValue = minY;
    		this.rightYAxisMinValue = minY;
    	}

    	//
    	//  B U S I N E S S  M E T H O D S
    	//

    	/**
    	 * Add new "row" to given panel.  The row will consist
    	 * of a number of widgets layed out on the given panel
    	 * that show one or more scatter plots to different
    	 * genome intervals.
    	 * @param row Panel on which to draw row.
    	 */
    	private void addRow(final PlotPanel row) {
    		if (this.idx < this.genomeIntervals.size()) {
    			Axis yAxis = new Axis(this.leftYAxisMinValue,
    	                this.leftYAxisMaxValue, this.sizer.height(),
    	                Orientation.VERTICAL, Location.LEFT_OF,
    	                row.getDrawingCanvas());
    			int endIdx = this.idx + this.params.getNumPlotsPerRow();
    			if (endIdx > this.genomeIntervals.size()) {
    				endIdx = this.genomeIntervals.size();
    			}
    			for (int i = this.idx; i < endIdx; i++) {
    				this.addGenomeIntervalPlot(row, this.genomeIntervals.get(i),
    						yAxis, i == this.idx);
    			}
    			this.addLeftYAxis(row, yAxis);
    			if (this.rightYAxisQuantitationType != null) {
    				this.addRightYAxis(row);
    			}
    			this.idx = endIdx;
    		}
    	}

    	/**
    	 * Add left Y-axis to row.
    	 * @param row Panel to draw axis on
    	 * @param yAxis Axis to add
    	 */
    	private void addLeftYAxis(final PlotPanel row, final Axis yAxis) {
	        Caption yCaption = new Caption(
	        		leftYAxisQuantitationType.getName(),
	                Orientation.HORIZONTAL, true, row.getDrawingCanvas());
	        row.add(yAxis, HorizontalAlignment.LEFT_JUSTIFIED,
	                VerticalAlignment.BOTTOM_JUSTIFIED);
	        row.add(yCaption, HorizontalAlignment.LEFT_OF,
	                VerticalAlignment.CENTERED);
    	}

    	/**
    	 * Co-visualization plots require two Y-axes.  This
    	 * method adds a second Y-axis to the right of the
    	 * given row of plots.
    	 * @param row Panel containing row of plots
    	 */
    	private void addRightYAxis(final PlotPanel row) {
    		Axis yAxis = new Axis(this.rightYAxisMinValue,
	                this.rightYAxisMaxValue, this.sizer.height(),
	                Orientation.VERTICAL, Location.RIGHT_OF,
	                row.getDrawingCanvas());
	        Caption yCaption = new Caption(
	        		rightYAxisQuantitationType.getName(),
	                Orientation.HORIZONTAL, true, row.getDrawingCanvas());
	        row.add(yAxis, HorizontalAlignment.RIGHT_JUSTIFIED,
	                VerticalAlignment.BOTTOM_JUSTIFIED);
	        row.add(yCaption, HorizontalAlignment.RIGHT_OF,
	                VerticalAlignment.CENTERED);
    	}

    	/**
    	 * Add plot of a single genome interval to the given row panel.
    	 * @param row Row panel
    	 * @param gi Genome interval to graph
    	 * @param referenceYAxis Reference Y-axis, which will always
    	 * be the left Y-axis
    	 * @param leftJustify Should plot be left justified related
    	 * to other widgets?  This is typically done if the plot
    	 * is the first on a row.
    	 */
    	private void addGenomeIntervalPlot(final PlotPanel row,
    			final GenomeInterval gi, final Axis referenceYAxis,
    			final boolean leftJustify) {
            PlotPanel col = row.newChildPlotPanel();
            BpUnits units = this.params.getUnits();
            long start = units.fromBp(gi.getStartLocation());
            long end = units.fromBp(gi.getEndLocation());
            Axis xAxis = new Axis(start,
                    end, this.sizer.width(gi),
                    Orientation.HORIZONTAL, Location.BELOW,
                    col.getDrawingCanvas());

            // Background
            Background bg = new Background(this.sizer.width(gi),
            		this.sizer.height(), BG_COLOR);
            col.add(bg, true);

            // Grid lines
            if (this.params.isDrawVertGridLines()) {
            	Grid vertGrid = xAxis.newGrid(this.sizer.width(gi),
            			this.sizer.height(), GRID_COLOR, col);
            	col.add(vertGrid, HorizontalAlignment.LEFT_JUSTIFIED,
            			VerticalAlignment.TOP_JUSTIFIED);
            }
            if (this.params.isDrawHorizGridLines()) {
            	Grid horizGrid = referenceYAxis.newGrid(this.sizer.width(gi),
            			this.sizer.height(), GRID_COLOR, col);
            	col.add(horizGrid,  HorizontalAlignment.LEFT_JUSTIFIED,
            			VerticalAlignment.TOP_JUSTIFIED);
            }

            // Add scatter plot
            ScatterPlot scatterPlot = this.newScatterPlot(gi);
            col.add(scatterPlot, HorizontalAlignment.LEFT_JUSTIFIED,
            		VerticalAlignment.TOP_JUSTIFIED);

            // X-axis stuff
            String captionText = "Chromosome " + gi.getChromosome()
                + " (" + this.params.getUnits().getName() + ")";
            Caption xCaption = new Caption(captionText,
                    Orientation.HORIZONTAL, false, row.getDrawingCanvas());
            col.add(xAxis, HorizontalAlignment.LEFT_JUSTIFIED,
            		VerticalAlignment.BOTTOM_JUSTIFIED);
            col.add(xCaption, HorizontalAlignment.CENTERED,
                    VerticalAlignment.BELOW);

            // Add all widgets to row
            HorizontalAlignment ha = null;
            if (leftJustify) {
            	ha = HorizontalAlignment.LEFT_JUSTIFIED;
            } else {
            	ha = HorizontalAlignment.RIGHT_OF;
            }
            row.add(col, ha,
            		VerticalAlignment.BOTTOM_JUSTIFIED);

            this.plots.add(scatterPlot);
    	}

    	/**
    	 * Are there more rows to plot?
    	 * @return T/F
    	 */
    	private boolean hasMore() {
    		return this.idx < this.genomeIntervals.size();
    	}

    	/**
    	 * Get all individual scatter plots created since this
    	 * object was instantiated.
    	 * @return Plot created
    	 */
    	private Collection<ScatterPlot> getPlotsCreated() {
    		return this.plots;
    	}

    	/**
    	 * Instantiate new scatter plot of given genome interval.
    	 * @param gi Interval to plot
    	 * @return New scatter plot
    	 */
    	private ScatterPlot newScatterPlot(final GenomeInterval gi) {

    		// Create plot boundaries
    		PlotBoundaries expressionPlotBoundaries = null;
            PlotBoundaries copyNumberPlotBoundaries = null;
            if (Experiment.getExpressionQuantitationType(this.experiments)
            		!= null) {
            	expressionPlotBoundaries = new PlotBoundaries(
            			gi.getStartLocation(), this.params.getExpressionMinY(),
            			gi.getEndLocation(), this.params.getExpressionMaxY());
            }
            if (Experiment.getCopyNumberQuantitationType(experiments) != null) {
            	copyNumberPlotBoundaries = new PlotBoundaries(
            			gi.getStartLocation(), this.params.getCopyNumberMinY(),
            			gi.getEndLocation(), this.params.getCopyNumberMaxY());
            }

            // If co-visualizing copy number/LOH and expression data,
            // union boundaries together so plotting space same
            if (expressionPlotBoundaries != null
            		&& copyNumberPlotBoundaries != null) {
            	expressionPlotBoundaries.union(copyNumberPlotBoundaries);
            	copyNumberPlotBoundaries.union(expressionPlotBoundaries);
            }

            // Create and configure plot
            ScatterPlot scatterPlot = new ScatterPlot(this.experiments,
            		gi.getChromosome(), this.chromosomeArrayDataGetter,
            		this.sizer.width(gi), this.sizer.height,
            		expressionPlotBoundaries, copyNumberPlotBoundaries);
            scatterPlot.setDrawErrorBars(this.params.isDrawErrorBars());
            scatterPlot.setInterpolationType(
            		this.params.getInterpolationType());
            scatterPlot.setDrawPoints(this.params.isDrawPoints());
            scatterPlot.setDrawRawLohProbabilities(
            		this.params.isDrawRawLohProbabilities());
            scatterPlot.setInterpolateLohEndpoints(
            		this.params.isInterpolateLohEndpoints());
            scatterPlot.setLohThreshold(this.params.getLohThreshold());
            scatterPlot.setShowAnnotation(this.params.isShowAnnotation());
            scatterPlot.setShowGenes(this.params.isShowGenes());
            scatterPlot.setShowReporterNames(
            		this.params.isShowReporterNames());
            scatterPlot.setShowStem(this.params.isDrawStems());
            return scatterPlot;
        }
    }

    /**
     * Class that is responsible for calculating
     * the width and height of scatter plot widgets.
     * When there is only a single
     * genome interval to plot, the dimensions of the
     * single scatter plot widget are equal to the width
     * and height passed in through the scatter plot parameters
     * web form.
     * For multiple genome intervals, the sum of widths and
     * heights of the individual scatter plot widgets
     * for the widest row of plots is
     * less than or equal to these parameters, respectively.
     */
    private static final class ScatterPlotSizer {

    	/** Scale of native units to pixels. */
    	private final double scale;

    	/** Height of all plots in pixels. */
    	private final int height;

    	/**
    	 * Constructor.
    	 * @param params Plot parameters
    	 */
    	private ScatterPlotSizer(final ScatterPlotParameters params) {
    		List<GenomeInterval> intervals =
    			new ArrayList<GenomeInterval>(params.getGenomeIntervals());
    		int numRows = (int) Math.ceil((double) intervals.size()
    				/ (double) params.getNumPlotsPerRow());
    		this.height = params.getHeight() / numRows;
    		long longestInterval = 0;
    		int p = 0;
    		while (p < intervals.size()) {
    			int q = p + params.getNumPlotsPerRow();
    			if (q > intervals.size()) {
    				q = intervals.size();
    			}
    			long candidateLongest = 0;
    			for (int i = p; i < q; i++) {
    				candidateLongest += intervals.get(i).length();
    			}
    			if (candidateLongest > longestInterval) {
    				longestInterval = candidateLongest;
    			}
    			p = q;
    		}
    		this.scale = (double) params.getWidth() / (double) longestInterval;
    	}

    	/**
    	 * Get width for plot.
    	 * @param interval Genome interval
    	 * @return Width in pixels
    	 */
    	private int width(final GenomeInterval interval) {
    		return (int) (this.scale * (interval.getEndLocation()
    				- interval.getStartLocation()));
    	}

    	/**
    	 * Get height for plot.
    	 * @return Height in pixels.
    	 */
    	private int height() {
    		return this.height;
    	}
    }
}


text: /* by Adamenko Igor - pro100kvashina.kz*/


text:
package root.gast.playground.location;

import android.content.Context;
import android.location.Location;
import android.util.Log;

/**
 * Broadcast receiver that will receive a location and store it in a database.
 *
 * @author Adam Stroud <adam.stroud@gmail.com>
 */
public class TrackLocationBroadcastReceiver extends FilteringLocationBroadcastReceiver
{
    private static final String TAG = "TrackLocationBroadcastReceiver";

    @Override
    public void onFilteredLocationChanged(Context context, Location location)
    {
        Log.d(TAG, "Received Location -> " + location);

        if (location != null)
        {
            if (PointDatabaseManager.getInstance(context).insertPoint(location) == -1)
            {
                Log.e(TAG, "Unable to save point");
            }
        }
    }
}


text:
double compute_mfpt(const TRANSITION_MATRIX transition_matrix, const KLP_PARAMS klp_params, const MFPT_PARAMS parameters) {
  int i, j, x, y, start_pointer;
  double mfpt_from_start;
  TRANSITION_MATRIX inversion_matrix;
  double* mfpt;

  if (klp_params.start_state < 0 || klp_params.end_state < 0) {
    if (klp_params.start_state < 0) {
#ifdef DEBUG
      fprintf(stderr, "We can not find any position in the energy grid correspondent to the starting state.\n");
#endif
      return -1;
    }

    if (klp_params.end_state < 0) {
#ifdef DEBUG
      fprintf(stderr, "We can not find any position in the energy grid correspondent to the stopping state.\n");
#endif
      return -2;
    }
  }

  // If start_index > end_index, we need to shift to the left by one because the end_index row / column is being removed.
  start_pointer    = klp_params.start_state - (klp_params.start_state > klp_params.end_state ? 1 : 0);
  inversion_matrix = init_transition_matrix(transition_matrix.row_length - 1, transition_matrix.type);
  mfpt             = calloc(inversion_matrix.row_length, sizeof(double));

  for (i = 0; i < transition_matrix.row_length; ++i) {
    for (j = 0; j < transition_matrix.row_length; ++j) {
      if (i != klp_params.end_state && j != klp_params.end_state) {
        x = (i > klp_params.end_state ? i - 1 : i);
        y = (j > klp_params.end_state ? j - 1 : j);
        // Be VERY careful changing anything here. We throw out anything at base pair distance 0 (end_index) from the second structure (the target of the MFPT calculation) and maximally distant from the first structure. Because of this, there's a chunk of indices that need to get shifted to the left by one, to keep the array tight (this is what x, y are doing). Hence, x and y are used for indexing into inversion_matrix and i, j are used for indexing into transition_matrix.
        T_ROW_ORDER(inversion_matrix, x, y) = \
                                              (i == j ? 1 - T_ROW_ORDER(transition_matrix, i, j) : -T_ROW_ORDER(transition_matrix, i, j));
      }
    }
  }

  inversion_matrix = inverse(inversion_matrix);

  for (i = 0; i < inversion_matrix.row_length; ++i) {
    for (j = 0; j < inversion_matrix.row_length; ++j) {
      mfpt[i] += T_ROW_ORDER(inversion_matrix, i, j);
    }

    if (parameters.all_mfpt) {
      // The business with this i < end_index stuff is inorder to ensure that the output MFPT indices are representative of the input data, since we reduce the dimension of the matrix by 1.
      printf("%d\t%+.8f\n", i < klp_params.end_state ? i : i + 1, mfpt[i]);
    }
  }

  mfpt_from_start = mfpt[start_pointer];

  free(mfpt);
  free_transition_matrix(inversion_matrix);
  return mfpt_from_start;
}


text:
package cz.seznam.euphoria.core.client.util;

import cz.seznam.euphoria.core.annotation.audience.Audience;
import javax.annotation.Nullable;

import static java.util.Objects.requireNonNull;

/**
 * Either LEFT or RIGHT element.
 */
@Audience(Audience.Type.INTERNAL)
public final class Either<LEFT, RIGHT> {

  @Nullable
  final LEFT left;
  @Nullable
  final RIGHT right;

  public static <LEFT, RIGHT> Either<LEFT, RIGHT> left(LEFT left) {
    requireNonNull(left);
    return new Either<>(left, (RIGHT) null);
  }

  public static <LEFT, RIGHT> Either<LEFT, RIGHT> right(RIGHT right) {
    requireNonNull(right);
    return new Either<>((LEFT) null, right);
  }

  private Either(@Nullable LEFT left, @Nullable RIGHT right) {
    this.left = left;
    this.right = right;
  }

  public boolean isLeft() {
    return left != null;
  }

  public boolean isRight() {
    return right != null;
  }

  public LEFT left() {
    return left;
  }

  public RIGHT right() {
    return right;
  }

  @Override
  public String toString() {
    return "Either{" +
        "left=" + left +
        ", right=" + right +
        '}';
  }
}


text:
Imports System.Windows.Forms
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices

Namespace Modules
    Public Module Extensions

        <Extension> _
        Public Sub CueText(control As Control, text As [String])
            NativeMethods.SendMessageW(If(TypeOf control Is ComboBox, control.GetComboBoxInfo().hwndItem, control.Handle), NativeMethods.EmSetCueBanner, CType(0, IntPtr), text)
        End Sub

        <Extension> _
        Friend Function GetComboBoxInfo(control As IWin32Window) As NativeMethods.ComboboxInfo
            Dim info = New NativeMethods.ComboboxInfo()
            info.cbSize = Marshal.SizeOf(info)
            NativeMethods.GetComboBoxInfo(control.Handle, info)
            Return info
        End Function
    End Module
End Namespace


text:
<?php
/* @var $this WeightController */
/* @var $model Weight */

$this->breadcrumbs=array(
	Yii::t('database','Weights')=>array('admin'),
	$model->id_weight=>array('view','id'=>$model->id_weight),
	Yii::t('actions','Update'),
);

$this->menu=array(
	array('label'=>Yii::t('actions','List')." ". Yii::t('database','Weight'), 'url'=>array('index')),
	array('label'=>Yii::t('actions','Create')." ". Yii::t('database','Weight'), 'url'=>array('create')),
	array('label'=>Yii::t('actions','View')." ". Yii::t('database','Weight'), 'url'=>array('view', 'id'=>$model->id_weight)),
	array('label'=>Yii::t('actions','Manage')." ". Yii::t('database','Weight'), 'url'=>array('admin')),
);
?>

<h1> <?php echo Yii::t('actions','Update')?> <?php echo Yii::t('database','Weight')?> <?php echo $model->id_weight; ?></h1>

<?php $this->renderPartial('_form', array('model'=>$model)); ?>


text:
SolrClient::ping() - Ping Solr Server
--SKIPIF--
<?php require_once 'skip.if.server_not_configured.inc'; ?>
--FILE--
<?php

require_once "bootstrap.inc";

$options = array
(
    'hostname' => SOLR_SERVER_HOSTNAME,
    'login'    => SOLR_SERVER_USERNAME,
    'password' => SOLR_SERVER_PASSWORD,
    'port'     => SOLR_SERVER_PORT,
    'path'	   => SOLR_SERVER_PATH
);

$client = new SolrClient($options);

$pingResponse = $client->ping();

echo $pingResponse->getRawResponse();
?>
--EXPECT--
HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
Content-Length: 0


text:
<!--
 Copyright 2005-2014 The Kuali Foundation

 Licensed under the Educational Community License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.osedu.org/licenses/ECL-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns:p="http://www.springframework.org/schema/p"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
		                   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

	<bean id="ProtocolReviewNotRequiredBean" parent="ProtocolReviewNotRequiredBean-parentBean" />
	<bean id="ProtocolReviewNotRequiredBean-parentBean" abstract="true" parent="BusinessObjectEntry">
		<property name="businessObjectClass" value="org.kuali.kra.irb.actions.noreview.ProtocolReviewNotRequiredBean" />
		<property name="objectLabel" value="Protocol Review Not Required Bean" />
		<property name="titleAttribute" value="ProtocolReviewNotRequiredBean-reason" />
		<property name="attributes" >
			<list>
			    <ref bean="ProtocolReviewNotRequiredBean-decisionDate" />
			    <ref bean="ProtocolReviewNotRequiredBean-comments" />
				<ref bean="ProtocolReviewNotRequiredBean-actionDate" />
			</list>
		</property>
	</bean>

	<!-- Attribute Definitions -->

	<bean id="ProtocolReviewNotRequiredBean-decisionDate" parent="ProtocolReviewNotRequiredBean-decisionDate-parentBean"/>
	<bean id="ProtocolReviewNotRequiredBean-decisionDate-parentBean" abstract="true" parent="KraAttributeReferenceDummy-genericDate">
	    <property name="name" value="decisionDate"/>
	    <property name="label" value="Decision Date"/>
	    <property name="shortLabel" value="Decision Date"/>
	    <property name="required" value="true"/>
	    <property name="summary" value="Decision Date"/>
	    <property name="description" value="Decision Date"/>
	</bean>

	<bean id="ProtocolReviewNotRequiredBean-comments" parent="ProtocolReviewNotRequiredBean-comments-parentBean" />
	<bean id="ProtocolReviewNotRequiredBean-comments-parentBean" abstract="true" parent="ProtocolGenericActionBean-comments" />

    <bean id="ProtocolReviewNotRequiredBean-actionDate" parent="ProtocolGenericActionBean-actionDate-parentBean"/>
    <bean id="ProtocolReviewNotRequiredBean-actionDate-parentBean" abstract="true" parent="ProtocolGenericActionBean-actionDate" />

</beans>


text:
<?php

/**
 * @package Avro
 */

/**
 * Avro library for protocols
 * @package Avro
 */
class AvroProtocol
{
  public $name;
  public $namespace;
  public $schemata;

  /**
   * @param $json
   * @return AvroProtocol
   * @throws AvroProtocolParseException
   */
  public static function parse($json)
  {
    if (is_null($json))
      throw new AvroProtocolParseException( "Protocol can't be null");

    $protocol = new AvroProtocol();
    $protocol->real_parse(json_decode($json, true));
    return $protocol;
  }

  /**
   * @param $avro
   * @throws AvroSchemaParseException
   */
  function real_parse($avro) {
    $this->protocol = $avro["protocol"];
    $this->namespace = $avro["namespace"];
    $this->schemata = new AvroNamedSchemata();
    $this->name = $avro["protocol"];

    if (!is_null($avro["types"])) {
        $types = AvroSchema::real_parse($avro["types"], $this->namespace, $this->schemata);
    }

    if (!is_null($avro["messages"])) {
      foreach ($avro["messages"] as $messageName => $messageAvro) {
        $message = new AvroProtocolMessage($messageName, $messageAvro, $this);
        $this->messages[$messageName] = $message;
      }
    }
  }
}

/**
 * Class AvroProtocolMessage
 */
class AvroProtocolMessage
{
  /**
   * @var AvroRecordSchema $request
   */

  public $request;

  public $response;

  /**
   * AvroProtocolMessage constructor.
   * @param $name
   * @param $avro
   * @param $protocol
   */
  public function __construct($name, $avro, $protocol)
  {
    $this->name = $name;
    $this->request = new AvroRecordSchema(new AvroName($name, null, $protocol->namespace), null, $avro['request'], $protocol->schemata, AvroSchema::REQUEST_SCHEMA);

    if (array_key_exists('response', $avro)) {
      $this->response = $protocol->schemata->schema_by_name(new AvroName($avro['response'], $protocol->namespace, $protocol->namespace));
      if ($this->response == null)
        $this->response = new AvroPrimitiveSchema($avro['response']);
    }
  }
}

/**
 * Class AvroProtocolParseException
 */
class AvroProtocolParseException extends AvroException {};