text:
package com.nahroto.teleportball.huds;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable;

public class ImageButtonGroup
{
    protected com.badlogic.gdx.scenes.scene2d.ui.ImageButton button;
    protected SpriteDrawable drawableUp, drawableDown;

    public ImageButton getButton()
    {
        return button;
    }

    protected void applyFilter()
    {
        drawableUp.getSprite().getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        drawableDown.getSprite().getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
    }

    public void dispose()
    {
        this.drawableUp.getSprite().getTexture().dispose();
        this.drawableDown.getSprite().getTexture().dispose();
    }
}


text:
package com.google.api.ads.adwords.jaxws.v201406.o;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for HtmlDisplayType.HtmlOption.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="HtmlDisplayType.HtmlOption">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="UNKNOWN"/>
 *     <enumeration value="THIRD_PARTY_SERVING"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "HtmlDisplayType.HtmlOption")
@XmlEnum
public enum HtmlDisplayTypeHtmlOption {

    UNKNOWN,

    /**
     *
     *                 Served by a third party.
     *
     *
     */
    THIRD_PARTY_SERVING;

    public String value() {
        return name();
    }

    public static HtmlDisplayTypeHtmlOption fromValue(String v) {
        return valueOf(v);
    }

}

redpajama_set_name: RedPajamaGithub


text:
// [[[[INFO>
// Copyright 2015 Epicycle (http://epicycle.org, https://github.com/open-epicycle)
//
// 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.
//
// For more information check https://github.com/open-epicycle/Epicycle.Math-cs
// ]]]]

using System.Linq;

namespace Epicycle.Math.Geometry
{
    using System;

    public static class Box2Utils
    {
        public static Vector2 Corner(this Box2 @this, Interval.EndType end)
        {
            switch (end)
            {
                case Interval.EndType.Min:
                    return @this.MinCorner;

                case Interval.EndType.Max:
                    return @this.MaxCorner;

                default:
                    throw new ArgumentOutOfRangeException("end", end, "Illegal EndType " + end.ToString());
            }
        }

        public static Interval Range(this Box2 @this, Vector2.Axis axis)
        {
            switch (axis)
            {
                case Vector2.Axis.X:
                    return @this.XRange;

                case Vector2.Axis.Y:
                    return @this.YRange;

                default:
                    throw new ArgumentOutOfRangeException("Invalid 2D axis " + axis.ToString());
            }
        }

        public static bool Contains(this Box2 @this, Box2 that)
        {
            return
                @this.MinX <= that.MinX &&
                @this.MinY <= that.MinY &&
                @this.MaxX >= that.MaxX &&
                @this.MaxY >= that.MaxY;
        }

        public static Vector2 ToBoxCoords(this Vector2 v, Box2 box)
        {
            return new Vector2((v.X - box.MinX) / box.Width, (v.Y - box.MinY) / box.Height);
        }

        public static Vector2 FromBoxCoords(this Vector2 v, Box2 box)
        {
            return new Vector2(box.MinX + box.Width * v.X, box.MinY + box.Height * v.Y);
        }

        public static bool IsOnPositiveSide(this Box2 @this, Line2 line)
        {
            return @this.Vertices.All(v => v.IsOnPositiveSide(line));
        }

        public static bool IsOnNegativeSide(this Box2 @this, Line2 line)
        {
            return @this.Vertices.All(v => !v.IsOnPositiveSide(line));
        }

        public static double DistanceTo(this Vector2 @this, Box2 box)
        {
            return Math.Sqrt(box.Distance2(@this));
        }

        public sealed class YamlSerialization
        {
            public Vector2Utils.YamlSerialization MinCorner { get; set; }
            public Vector2Utils.YamlSerialization Dimensions { get; set; }

            public YamlSerialization() { }

            public YamlSerialization(Box2 box2)
            {
                MinCorner = new Vector2Utils.YamlSerialization(box2.MinCorner);
                Dimensions = new Vector2Utils.YamlSerialization(box2.Dimensions);
            }

            public Box2 Deserialize()
            {
                return new Box2(MinCorner.Deserialize(), Dimensions.Deserialize());
            }
        }
    }
}


text:
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="IDEA" type="Application" factoryName="Application">
    <option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
    <option name="INCLUDE_PROVIDED_SCOPE" value="true" />
    <module name="idea-runner" />
    <option name="PROGRAM_PARAMETERS" value="nosplash" />
    <option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=240m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=$USER_HOME$/.ScalaPluginIC/system -Didea.config.path=$USER_HOME$/.ScalaPluginIC/config -Dapple.laf.useScreenMenuBar=true -Dplugin.path=$PROJECT_DIR$/target/plugin/Scala -Didea.platform.prefix=Idea" />
    <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
    <RunnerSettings RunnerId="Debug">
      <option name="DEBUG_PORT" value="" />
      <option name="TRANSPORT" value="0" />
      <option name="LOCAL" value="true" />
    </RunnerSettings>
    <RunnerSettings RunnerId="JavaRebel">
      <option name="bootstrapPath" />
      <option name="jrebelArgs" value="" />
      <option name="loggingEnabled" value="false" />
      <option name="useBootstrapDefaults" value="true" />
    </RunnerSettings>
    <RunnerSettings RunnerId="JavaRebel Debug">
      <option name="bootstrapPath" />
      <option name="debugPort" value="" />
      <option name="jrebelArgs" value="" />
      <option name="loggingEnabled" value="false" />
      <option name="transport" value="0" />
      <option name="useBootstrapDefaults" value="true" />
      <option name="DEBUG_PORT" value="" />
      <option name="TRANSPORT" value="0" />
      <option name="LOCAL" value="true" />
    </RunnerSettings>
    <RunnerSettings RunnerId="Profile " />
    <RunnerSettings RunnerId="Run" />
    <ConfigurationWrapper RunnerId="Debug" />
    <ConfigurationWrapper RunnerId="Run" />
    <method />
  </configuration>
</component>


text:
namespace MotivateMe.Web.ViewModels.Campaigns
{
    using AutoMapper;
    using MotivateMe.Data.Models;
    using MotivateMe.Web.Infrastructure.Mapping;
    using MotivateMe.Web.ViewModels.Comments;
    using System;
    using System.Collections.Generic;

    public class CampaignDetailsViewModel : IMapFrom<Campaign>, IHaveCustomMappings
    {
        public int Id { get; set; }

        public string AuthorName { get; set; }

        public string Title { get; set; }

        public string Goal { get; set; }

        public string Info { get; set; }

        public virtual ICollection<CommentViewModel> Comments { get; set; }

        public void CreateMappings(IConfiguration configuration)
        {
            configuration.CreateMap<Campaign,CampaignDetailsViewModel>()
                .ForMember(m => m.AuthorName, opt => opt.MapFrom(m=> m.Author.UserName))
                .ReverseMap();
        }
    }
}


text:
"use strict";

/**
 * TouchReceiver is a static class that handles all touch events.
 * It adds touch event handlers and keeps track of what types of objects are being touched/dragged.
 */
function TouchReceiver() {
	const TR = TouchReceiver;   // shorthand
	TR.mouse = DebugOptions.shouldUseMouseMode();   // Use true when debugging on a desktop.
	TR.longTouchInterval = 700;   // The number of ms before a touch is considered a long touch.
	TR.fixScrollingInterval = 100;   // Duration between firing fix scroll timer
	TR.blocksMoving = false;   // No BlockStacks are currently moving.
	TR.targetType = "none";   // Stores the type of object being interacted with.
	TR.touchDown = false;   // Is a finger currently on the screen?
	TR.longTouch = false;   // Has the event already been handled by a long touch event?
	TR.target = null;   // The object being interacted with.
	TR.startX = 0;   // The x coord of the initial touch.
	TR.startY = 0;   // The y coord of the initial touch.
	TR.startX2 = 0;   // The x coord of the second touch.
	TR.startY2 = 0;   // The y coord of the second touch.
	TR.longTouchTimer = null;   // Triggers long touch events.
	TR.timerRunning = false;   // Indicates if the long touch timer is running.
	TR.zooming = false;   // There are not two touches on the screen.
	TR.dragging = false;   // Whether the user is dragging their finger
	TR.moveThreshold = 10;   // The minimum threshold before we consider the user to be dragging the screen
	TR.interactionEnabeled = true;   // Whether touches should be responded to
	TR.interactionTimeOut = null;
	let handlerMove = "touchmove";   // Handlers are different for touchscreens and mice.
	let handlerUp = "touchend";
	let handlerDown = "touchstart";
	if (TR.mouse) {
		handlerMove = "mousemove";
		handlerUp = "mouseup";
		handlerDown = "mousedown";
	}
	TR.handlerMove = handlerMove;
	TR.handlerUp = handlerUp;
	TR.handlerDown = handlerDown;
	// Add event handlers for handlerMove and handlerUp events to the whole document.
	TR.addListeners();
	// TR.test=true;
}
/**
 * Adds event handlers for handlerMove and handlerUp events to the whole document.
 */
TouchReceiver.addListeners = function() {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(document.body, TR.handlerMove, TouchReceiver.handleMove, false);
	TR.addEventListenerSafe(document.body, TR.handlerUp, TouchReceiver.handleUp, false);
	TR.addEventListenerSafe(document.body, TR.handlerDown, TouchReceiver.handleDocumentDown, false);
};

/**
 * Handles movement events and prevents drag gestures from scrolling document.
 * @param {event} event - passed event arguments.
 */
TouchReceiver.handleMove = function(event) {
	TouchReceiver.touchmove(event);   // Deal with movement.
};

/**
 * Handles end of touch events
 * @param {event} event - passed event arguments.
 */
TouchReceiver.handleUp = function(event) {
	TouchReceiver.touchend(event);
};

/**
 * Handles new touch events
 * @param {event} event
 */
TouchReceiver.handleDocumentDown = function(event) {
	if (TouchReceiver.touchstart(event)) {
		Overlay.closeOverlays();   // Close any visible overlays.
	}
};

/**
 * Ignores interaction from the user until enableInteraction is called or the timeout expires
 * @param {number} timeOut
 */
TouchReceiver.disableInteraction = function(timeOut) {
	const TR = TouchReceiver;
	TR.interactionEnabeled = false;
	TR.interactionTimeOut = window.setTimeout(function() {
		TouchReceiver.enableInteraction();
	}, timeOut);
};

/**
 * Re-enables interaction
 */
TouchReceiver.enableInteraction = function() {
	const TR = TouchReceiver;
	TR.interactionEnabeled = true;
	if (TR.interactionTimeOut != null) {
		window.clearTimeout(TR.interactionTimeOut);
		TR.interactionTimeOut = null;
	}
};

/**
 * Returns the touch x coord from the event arguments
 * @param {event} e - passed event arguments.
 * @return {number} - x coord.
 */
TouchReceiver.getX = function(e) {
	if (TouchReceiver.mouse) {   // Depends on if a desktop or touchscreen is being used.
		var x = e.clientX / GuiElements.zoomFactor;
	} else {
		var x = e.touches[0].pageX / GuiElements.zoomFactor;
	}

	//For rtl languages, the interface is flipped along the horizontal axis. This
	// puts the touch coordinate into the correct corrdinate system.
	if (Language.isRTL) { x = GuiElements.width - x; }

	return x;
};

/**
 * Returns the touch y coord from the event arguments
 * @param {event} e - passed event arguments.
 * @return {number} - y coord.
 */
TouchReceiver.getY = function(e) {
	if (TouchReceiver.mouse) {   // Depends on if a desktop or touchscreen is being used.
		return e.clientY / GuiElements.zoomFactor;
	}
	return e.touches[0].pageY / GuiElements.zoomFactor;
};

/**
 * Returns the touch x coord at the specified index
 * @param {event} e
 * @param {number} i
 * @return {number}
 */
TouchReceiver.getTouchX = function(e, i) {
	var x = e.touches[i].pageX / GuiElements.zoomFactor;

	//For rtl languages, the interface is flipped along the horizontal axis. This
	// puts the touch coordinate into the correct corrdinate system.
	if (Language.isRTL) { x = GuiElements.width - x; }

	return x;
};

/**
 * Returns the touch y coord at the specified index
 * @param {event} e
 * @param {number} i
 * @return {number}
 */
TouchReceiver.getTouchY = function(e, i) {
	return e.touches[i].pageY / GuiElements.zoomFactor;
};

/**
 * Handles new touch events.  Does not know which element was touched, the information is filled in by the calling
 * function.  Returns whether the touch is started
 * @param {event} e - passed event arguments.
 * @param {boolean=true} [preventD] - Whether preventDefault should be called. Should not be called on scrollable items
 * @return {boolean} - returns true iff !TR.touchDown
 */
TouchReceiver.touchstart = function(e, preventD) {
	const TR = TouchReceiver;
	if (!TR.interactionEnabeled) {
		e.preventDefault();
		return false;
	}
	if (preventD == null) {
		preventD = true;
	}
	if (preventD) {
		// GuiElements.alert("Prevented 1");
		e.preventDefault();   // Stops 300 ms delay events
	}
	// e.stopPropagation();
	const startTouch = !TR.touchDown;
	if (startTouch) {   // prevents multitouch issues.
		TR.stopLongTouchTimer();
		TR.dragging = false;
		TR.touchDown = true;
		TR.targetType = "none";   // Does not know the target of the touch.
		TR.target = null;
		TR.longTouch = false;
		TR.startX = TR.getX(e);
		TR.startY = TR.getY(e);
	}
	return startTouch;
};

/**
 * Checks if the application should start zooming.  Only called in response to a new touch on the canvas
 * @param {event} e
 */
TouchReceiver.checkStartZoom = function(e) {
	const TR = TouchReceiver;   // shorthand
	if (!TR.zooming && !TR.mouse && e.touches.length >= 2) {
		// There must be 2 touches in touch mode and not already be zooming
		// We know the current touch is on the canvas
		if ((!TR.dragging && TR.targetIsInTabSpace()) || TabManager.scrolling) {
			// If the previous touch started on the canvas and we aren't dragging, we start to zoom.
			// If the tab is scrolling and a new touch is on the canvas, we start scrolling.
			TR.dragging = true;
			if (TabManager.scrolling) {
				TabManager.endScroll();
				// First we stop dragging the canvas
			}
			// Now we get the data to start zooming
			TR.zooming = true;
			TR.startX = TR.getTouchX(e, 0);
			TR.startY = TR.getTouchY(e, 0);
			TR.startX2 = TR.getTouchX(e, 1);
			TR.startY2 = TR.getTouchY(e, 1);
			TabManager.startZooming(TR.startX, TR.startY, TR.startX2, TR.startY2);
		}
	}
};

/**
 * Returns whether the current touch is in the canvas
 * @return {boolean}
 */
TouchReceiver.targetIsInTabSpace = function() {
	const TR = TouchReceiver;
	if (TR.targetType === "tabSpace") {
		return true;
	} else if (TR.targetType === "block") {
		return true;
	} else if (TR.targetType === "slot") {
		// Have to make sure it isn't a slot on the BlockPalette
		return !TR.target.parent.stack.isDisplayStack;
	}
	return false;
};

/**
 * Handles new touch events for Blocks.  Stores the target Block.
 * @param {Block} target - The Block that was touched.
 * @param {event} e - passed event arguments.
 * @fix rename to touchStartBlock.
 */
TouchReceiver.touchStartBlock = function(target, e) {
	const TR = TouchReceiver;
	if (!target.stack.isDisplayStack) {
		TR.checkStartZoom(e);
	}
	if (TR.touchstart(e)) {
		Overlay.closeOverlays();   // Close any visible overlays.
		if (target.stack.isDisplayStack) {   // Determine what type of stack the Block is a member of.
			TR.targetType = "displayStack";
			TR.setLongTouchTimer();
		} else {
			TR.targetType = "block";
			TR.setLongTouchTimer();
		}
		TouchReceiver.target = target;   // Store target Block.
	}
};
/**
 * Handles new touch events for Slots.  Stores the target Slot.
 * @param {Slot} slot - The Slot that was touched.
 * @param {event} e - passed event arguments.
 */
TouchReceiver.touchStartSlot = function(slot, e) {
	const TR = TouchReceiver;
	if (!slot.parent.stack.isDisplayStack) {
		TR.checkStartZoom(e);
	}
	if (TR.touchstart(e)) {
		if (!slot.isEditable() || slot.isEditing() !== true) {
			Overlay.closeOverlays();   // Close any visible overlays.
		}
		TR.targetType = "slot";
		TouchReceiver.target = slot;   // Store target Slot.
		TR.setLongTouchTimer();
	}
};
/**
 * Handles new touch events for CategoryBNs.  Stores the target CategoryBN.
 * @param {Category} target - The Category of the CategoryBN that was touched.
 * @param {event} e - passed event arguments.
 */
TouchReceiver.touchStartCatBN = function(target, e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e)) {
		Overlay.closeOverlays();   // Close any visible overlays.
		TR.targetType = "category";
		target.select();   // Makes the button light up and the category become visible.
		Overlay.closeOverlays();   // Close any visible overlays.
	}
};
/**
 * Handles new touch events for Buttons.  Stores the target Button.
 * @param {Button} target - The Button that was touched.
 * @param {event} e - passed event arguments.
 */
TouchReceiver.touchStartBN = function(target, e) {
	const TR = TouchReceiver;
	const shouldPreventDefault = !target.scrollable && target.menuBnList == null;
	if (!shouldPreventDefault) {
		e.stopPropagation();   // Prevent other calls from preventing default
	}
	if (TR.touchstart(e, shouldPreventDefault)) {
		Overlay.closeOverlaysExcept(target.partOfOverlay);
		TR.setLongTouchTimer();
		TR.targetType = "button";
		TR.target = target;
		target.press();   // Changes the button's appearance and may trigger an action.
	}
};
/**
 * @param {SmoothScrollBox} target
 * @param {event} e - passed event arguments.
 */
TouchReceiver.touchStartScrollBox = function(target, e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e, false)) {
		Overlay.closeOverlaysExcept(target.partOfOverlay);
		TR.targetType = "scrollBox";
		TR.target = target;
		e.stopPropagation();
	}
};
/**
 * @param {event} e
 */
TouchReceiver.touchStartTabSpace = function(e) {
	const TR = TouchReceiver;
	TR.checkStartZoom(e);
	if (TR.touchstart(e)) {
		Overlay.closeOverlays();   // Close any visible overlays.
		TR.targetType = "tabSpace";
		TR.target = null;
	}
};
/**
 * @param {event} e
 */
TouchReceiver.touchStartDisplayBox = function(e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e)) {
		Overlay.closeOverlays();   // Close any visible overlays.
		TR.targetType = "displayBox";
		TR.target = null;
		DisplayBoxManager.hide();   // Close all overlays
		// Avoids a bug where the touchEnd handler is never called if the object the user touched is removed
		TR.touchDown = false;
		e.stopPropagation();
	}
};
/**
 * @param {event} e
 */
TouchReceiver.touchStartOverlayPart = function(e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e)) {

	}
};
/**
 * @param {SmoothMenuBnList} target
 * @param e
 */
TouchReceiver.touchStartSmoothMenuBnList = function(target, e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e, false)) {
		Overlay.closeOverlaysExcept(target.partOfOverlay);
		TR.targetType = "smoothMenuBnList";
		TouchReceiver.target = target;   // Store target.
		e.stopPropagation();
	}
};
/**
 * @param {TabRow} tabRow
 * @param {number} index - The index of the tab that was tapped
 * @param e
 */
TouchReceiver.touchStartTabRow = function(tabRow, index, e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e)) {
		Overlay.closeOverlaysExcept(tabRow.partOfOverlay);
		TR.targetType = "tabrow";
		tabRow.selectTab(index);
	}
};
/**
 * @param {CollapsibleItem} collapsibleItem
 * @param e
 */
TouchReceiver.touchStartCollapsibleItem = function(collapsibleItem, e) {
	const TR = TouchReceiver;
	if (TR.touchstart(e, false)) {
		Overlay.closeOverlays();
		TR.targetType = "collapsibleItem";
		TR.target = collapsibleItem;
		e.stopPropagation();
	}
};

TouchReceiver.touchStartDialogBlock = function(e) {
	GuiElements.removeVideos();
	if (SaveManager.fileName == null)  {
		if (OpenDialog.lastOpenFile != null) {
			SaveManager.userOpenFile(OpenDialog.lastOpenFile);
			OpenDialog.lastOpenFile = null;
			RowDialog.currentDialog.closeDialog();
		} else {
			SaveManager.getAvailableName(SaveManager.newProgName, function(availableName, alreadySanitized, alreadyAvailable) {
				SaveManager.newSoft(availableName, RowDialog.currentDialog.closeDialog());
			});
		}
	} else {
		RowDialog.currentDialog.closeDialog();
	}
}

/**
 * Handles touch movement events.  Tells stacks, Blocks, Buttons, etc. how to respond.
 * @param {event} e - passed event arguments.
 */
TouchReceiver.touchmove = function(e) {
	const TR = TouchReceiver;
	let shouldPreventDefault = true;   // Don't prevent default if the target scrolls
	if (!TR.interactionEnabeled) {
		e.preventDefault();
		return;
	}
	// We start dragging when the touch moves outside the threshold
	if (TR.touchDown && (TR.hasMovedOutsideThreshold(e) || TR.dragging)) {
		TR.dragging = true;
		TR.stopLongTouchTimer();
		if (TR.longTouch) {
			Overlay.closeOverlays();
			TR.longTouch = false;
		}
		if (TR.zooming) {
			// If we are currently zooming, we update the zoom.
			if (e.touches.length < 2) {
				TR.touchend(e);
			} else {
				const x1 = TR.getTouchX(e, 0);
				const y1 = TR.getTouchY(e, 0);
				const x2 = TR.getTouchX(e, 1);
				const y2 = TR.getTouchY(e, 1);
				TabManager.updateZooming(x1, y1, x2, y2);
			}
		} else {
			// If the user drags a Slot, the block they are dragging should become the target.
			if (TR.targetType === "slot") {
				TR.target = TR.target.parent;   // Now the user is dragging a block.
				if (TR.target.stack.isDisplayStack) {
					TR.targetType = "displayStack";
				} else {
					TR.targetType = "block";
				}
			}
			/* If the user drags a Block that is in a DisplayStack,
			 the DisplayStack copies to a new BlockStack, which can be dragged. */
			if (TR.targetType === "displayStack") {
	        const x = TR.target.stack.getAbsX();
          const y = TR.target.stack.getAbsY();
          // The first block of the duplicated BlockStack is the new target.
          TR.target = TR.target.stack.duplicate(x, y).firstBlock;
          TR.targetType = "block";
			}
			/* If the user drags a Block that is a member of a BlockStack,
			 then the BlockStack should move. */
			if (TR.targetType === "block") {
				// If the CodeManager has not started the movement, this must be done first.
				let x = TR.getX(e);
				let y = TR.getY(e);
				if (TR.blocksMoving) {
					// The CodeManager handles moving BlockStacks.
					CodeManager.move.update(x, y);
				} else {
					CodeManager.move.start(TR.target, x, y);
					TR.blocksMoving = true;
				}
			}
			// If the user drags the palette, it should scroll.
			if (TR.targetType === "scrollBox") {
				shouldPreventDefault = false;
			}
			// If the user drags the tab space, it should scroll.
			if (TR.targetType === "tabSpace") {
				if (!TabManager.scrolling) {
					TabManager.startScroll(TR.getX(e), TR.getY(e));
				} else {
					TabManager.updateScroll(TR.getX(e), TR.getY(e));
				}
			}
			// If the user drags a button and it has a menuBnList, it should scroll it.
			if (TR.targetType === "button") {
				TR.target.interrupt();
				if (TR.target.scrollable) {
					TR.targetType = "smoothMenuBnList";
					TR.target.interrupt();
					TR.target = null;
				}
			}
			// If the user drags a smoothMenuBnList, it should scroll.
			if (TR.targetType === "smoothMenuBnList") {
				shouldPreventDefault = false;
			}
			// If the user drags a collapsibleItem, it should scroll
			if (TR.targetType === "collapsibleItem") {
				shouldPreventDefault = false;
				TR.targetType = "scrollBox";
				TR.target = null;
			}
		}
	}
	shouldPreventDefault &= TR.targetType !== "smoothMenuBnList";
	shouldPreventDefault &= TR.targetType !== "button" || !TR.target.scrollable;
	shouldPreventDefault &= TR.targetType !== "scrollBox";
	shouldPreventDefault &= TR.targetType !== "collapsibleItem";
	if (shouldPreventDefault) {
		// GuiElements.alert("Prevented 2 t:" + TR.targetType + "!");
		e.preventDefault();
	}
};

/**
 * Returns whether the touch has moved outside the threshold and should be considered a drag
 * @param {event} e
 * @return {boolean}
 */
TouchReceiver.hasMovedOutsideThreshold = function(e) {
	const TR = TouchReceiver;
	if (!TR.touchDown) return false;
	const distX = TR.startX - TR.getX(e);
	const distY = TR.startY - TR.getY(e);
	return (distX * distX + distY * distY >= TR.moveThreshold * TR.moveThreshold);
};

/**
 * Handles touch end events.  Tells stacks, Blocks, Buttons, etc. how to respond.
 * @param {event} e - passed event arguments.
 * @fix DateTime is no longer necessary to prevent repeat events.
 */
TouchReceiver.touchend = function(e) {
	const TR = TouchReceiver;
	let shouldPreventDefault = true;
	if (TR.zooming) {
		if (e.touches.length === 0) {
			TabManager.endZooming();
			TR.zooming = false;
			TR.touchDown = false;
		} else if (e.touches.length === 1) {
			// Switch from zooming to panning
			TabManager.endZooming();
			TR.zooming = false;
			TR.targetType = "tabSpace";
			TR.target = null;
			TabManager.startScroll(TR.getX(e), TR.getY(e));
		} else if (e.touches.length > 1) {
			// No action necessary
		}
	} else if (TR.touchDown && !TR.longTouch) {   // Prevents multitouch problems.
		TR.touchDown = false;
		TR.dragging = false;
		if (TR.targetType === "block") {
			if (TR.blocksMoving) {   // If a stack is moving, tell the CodeManager to end the movement.
				CodeManager.move.end();
				TR.blocksMoving = false;
			} else {   // The stack was tapped, so it should run.
				TR.target.stack.startRun();
			}
		} else if (TR.targetType === "button") {
			TR.target.release();   // Pass message on to button.
		} else if (TR.targetType === "slot") {
			// If a Slot is pressed and released without dragging, it is time to edit its value.
			TR.target.onTap();
		} else if (TR.targetType === "scrollBox") {
			shouldPreventDefault = false;
		} else if (TR.targetType === "tabSpace") {
			TabManager.endScroll();
		} else if (TR.targetType === "smoothMenuBnList") {
			shouldPreventDefault = false;
		} else if (TR.targetType === "collapsibleItem") {
			TR.target.toggle();
		} else if (TR.targetType == "displayStack") {
		    // tapping a block in the display stack runs the block once
        let execStatus = TR.target.updateRun();
				if (!execStatus.isRunning) {
            // start the execution of a block
            TR.target.startAction();
				}

        setTimeout(function(){
            // wait for the response before trying to fetch the response and display the result
						execStatus = TR.target.updateRun();
            TR.target.displayResult(execStatus.getResult());
        }, 100);
		}
	} else {
		TR.touchDown = false;
	}
	if (shouldPreventDefault) {
		// GuiElements.alert("Prevented 3");
		e.preventDefault();
	}
};

/**
 * Called when a user's interaction with the screen should be interrupted due to a dialog, etc.
 * Blocks that are moving should stop moving, but actions should not be triggered.
 */
TouchReceiver.touchInterrupt = function() {
	const TR = TouchReceiver;
	const touchWasDown = TR.touchDown;
	TR.touchDown = false;
	if (touchWasDown && !TR.longTouch) {   // Only interrupt if there is a finger on the screen.
		TR.touchDown = false;
		if (TR.targetType === "block") {
			if (TR.blocksMoving) {   // If a stack is moving, tell the CodeManager to end the movement.
				CodeManager.move.interrupt();
				TR.blocksMoving = false;
			}
		} else if (TR.targetType === "button") {
			TR.target.interrupt();   // Remove the highlight without triggering the action.
		} else if (TR.targetType === "tabSpace") {
			TabManager.endScroll();
		}
	}
};

/**
 * Triggered when the longTouchTimer tics.  Potentially shows a context menu
 */
TouchReceiver.touchLong = function() {
	const TR = TouchReceiver;
	TR.stopLongTouchTimer();
	if (TR.touchDown && !TR.zooming) {
		if (TR.targetType === "slot") {
			TR.target = TR.target.parent;   // Now the user is holding a block.
			if (TR.target.stack.isDisplayStack) {
				TR.targetType = "displayStack";
			} else {
				TR.targetType = "block";
			}
		}
		if (TR.targetType === "displayStack") {
			// Show the menu for variables
			if (TR.target.blockTypeName === "B_Variable" || TR.target.blockTypeName === "B_List") {
				TR.longTouch = true;
				new BlockContextMenu(TR.target, TR.startX, TR.startY);
			}
		}
		if (TR.targetType === "block") {
			TR.longTouch = true;
			new BlockContextMenu(TR.target, TR.startX, TR.startY);
		}
		if (TR.targetType === "button") {
			TR.target.longTouch();
		}
	}
};

/**
 * Starts the longTouchTimer
 */
TouchReceiver.setLongTouchTimer = function() {
	const TR = TouchReceiver;
	TR.stopLongTouchTimer();
	TR.longTouchTimer = self.setInterval(function() {
		TouchReceiver.touchLong();
	}, TR.longTouchInterval);
	TR.timerRunning = true;
};

/**
 * Stops the longTouchTimer
 */
TouchReceiver.stopLongTouchTimer = function() {
	const TR = TouchReceiver;
	if (TR.timerRunning) {
		TR.longTouchTimer = window.clearInterval(this.longTouchTimer);
		TR.timerRunning = false;
	}
};

/**
 * Adds handlerDown listeners to the parts of a CategoryBN.
 * @param {Element} element - The part of the CategoryBN the listeners are being applied to.
 * @param {Category} category - The category of the CategoryBN.
 */
TouchReceiver.addListenersCat = function(element, category) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver its Category.
		TouchReceiver.touchStartCatBN(category, e);
	}, false);
};
/**
 * Adds handlerDown listeners to the parts of a Block.
 * @param {Element} element - The part of the Block the listeners are being applied to.
 * @param {Block} parent - The Block the SVG element belongs to.
 */
TouchReceiver.addListenersChild = function(element, parent) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver its Block.
		TouchReceiver.touchStartBlock(parent, e);
	}, false);
};
/**
 * Adds handlerDown listeners to the parts of a Slot.
 * @param {Element} element - The part of the Slot the listeners are being applied to.
 * @param {Slot} slot - The Slot the SVG element belongs to.
 */
TouchReceiver.addListenersSlot = function(element, slot) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver its Slot.
		TouchReceiver.touchStartSlot(slot, e);
	}, false);
};
/**
 * Adds handlerDown listeners to the parts of a Button.
 * @param {Element} element - The part of the Button the listeners are being applied to.
 * @param {Button} parent - The Button the SVG element belongs to.
 */
TouchReceiver.addListenersBN = function(element, parent) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver its Button.
		TouchReceiver.touchStartBN(parent, e);
	}, false);
};
/**
 * @param {Element} element
 * @param {SmoothScrollBox} parent
 */
TouchReceiver.addListenersScrollBox = function(element, parent) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver.
		TouchReceiver.touchStartScrollBox(parent, e);
	}, false);
};
/**
 * Adds handlerDown listeners to the background space in the Tab where blocks go. Used for scrolling.
 * @param {Element} element
 */
TouchReceiver.addListenersTabSpace = function(element) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TabManager.
		TouchReceiver.touchStartTabSpace(e);
	}, false);
};
/**
 * Adds handlerDown listeners to the parts of the displayBox.
 * @param {Element} element - The part of the displayBox the listeners are being applied to.
 */
TouchReceiver.addListenersDisplayBox = function(element) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		// When it is touched, the SVG element will tell the TouchReceiver.
		TouchReceiver.touchStartDisplayBox(e);
	}, false);
};
/**
 * @param {Element} element
 * @param {TabRow} tabRow
 * @param {number} index
 */
TouchReceiver.addListenersTabRow = function(element, tabRow, index) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		TouchReceiver.touchStartTabRow(tabRow, index, e);
		TR.touchDown = false;
		e.stopPropagation();
	}, false);
};
/**
 * Adds handlerDown listeners to the parts of any overlay that do not already have handlers.
 * @param {Element} element - The part the listeners are being applied to.
 */
TouchReceiver.addListenersOverlayPart = function(element) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		TouchReceiver.touchStartOverlayPart(e);
	}, false);
};
/**
 * @param {Element} element
 * @param {SmoothMenuBnList} parent
 */
TouchReceiver.addListenersSmoothMenuBnListScrollRect = function(element, parent) {
	const TR = TouchReceiver;
	element.parent = parent;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		TouchReceiver.touchStartSmoothMenuBnList(this.parent, e);
	}, false);
};
/**
 * @param {Element} element
 * @param {CollapsibleItem} item
 */
TouchReceiver.addListenersCollapsibleItem = function(element, item) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerDown, function(e) {
		TouchReceiver.touchStartCollapsibleItem(item, e);
	}, false);
};
/**
 * @param {Element} element
 */
TouchReceiver.addListenersDialogBlock = function(element) {
	const TR = TouchReceiver;
	TR.addEventListenerSafe(element, TR.handlerUp, function(e) {
		TouchReceiver.touchStartDialogBlock(e);
	}, false);
};

/**
 * Makes the element call the function when the right type of listener is triggered.  The function is made safe by
 * DebugOptions so errors can be caught
 * @param {Element} element - The element to add the listeners to
 * @param {string} type - The listener to add
 * @param {function} func - The function to call when the listener is triggered
 */
TouchReceiver.addEventListenerSafe = function(element, type, func) {
	element.addEventListener(type, DebugOptions.safeFunc(func), false);
};

/**
 * Creates a timer that deals with a bug in iOS that occurs if the user tries to scroll an object that is already
 * at its maximum or minimum position.  The timer regularly checks the scroll and moves it 1 pixel if it is at either
 * extreme
 * @param {Element} div - The div to fix
 * @param {object|null} [statusObj] - An object with boolean field .still which is updates to indicate whether
 *                                    the div has stopped scrolling
 * @return {number|null} - The id of the timer or null
 */
TouchReceiver.createScrollFixTimer = function(div, statusObj) {
	// If the timer isn't necessary and there is no status object, there is no reason to make the timer
	if (!GuiElements.isIos && statusObj == null) return null;
	const mem = {};
	// Used to detect scrolling
	mem.lastY = null;
	mem.lastX = null;
	const fixScroll = function() {
		const stillY = mem.lastY == null || mem.lastY === div.scrollTop;
		const stillX = mem.lastX == null || mem.lastX === div.scrollLeft;
		const still = stillX && stillY;

		// Update status object
		if (statusObj != null) statusObj.still = still;
		// Do no more if we don't have to
		if (!GuiElements.isIos) return;

		mem.lastY = div.scrollTop;
		mem.lastX = div.scrollLeft;

		const height = parseInt(window.getComputedStyle(div).getPropertyValue('height'), 10);
		// Don't do the fix until the div stops moving
		if (TouchReceiver.touchDown || !still) return;
		// The div can't move so it doesn't matter
		if (div.scrollHeight === height) return;
		if (div.scrollTop <= 0) {
			// The div is at the top; move it down
			div.scrollTop = 1;
		} else if (div.scrollHeight - height - 1 <= div.scrollTop && div.scrollTop > 2) {
			// The div is at the bottom and is tall enough that moving up won't move it to the top.  Move it up.
			div.scrollTop = div.scrollHeight - height - 2;
		}
	};
	TouchReceiver.setInitialScrollFix(div);
	return self.setInterval(fixScroll, TouchReceiver.fixScrollingInterval);
};

/**
 * Gives the div an initial bump away from the top. If called when the div is created, prevents the div from jumping
 * visually
 * @param {Element} div
 */
TouchReceiver.setInitialScrollFix = function(div) {
	if (!GuiElements.isIos) return;
	if (div.scrollTop <= 0) {
		div.scrollTop = 1;
	}
};


text:
/* globals describe, it, expect */
var Rx = require('../../dist/cjs/Rx');
var Observable = Rx.Observable;

describe('Observable.prototype.distinctUntilChanged()', function () {
  it('should distinguish between values', function (done) {
    var expected = [1, 2, 1];
    Observable
      .of(1, 1, 1, 2, 2, 1)
      .distinctUntilChanged()
      .subscribe(function(x) {
        expect(x).toBe(expected.shift());
      }, null, done);
  });
});


text:
package main

import (
	"fmt"
	"time"
)

// Barista makes coffee
type Barista interface {
	MakeOrder(Order) Order
	String() string
}

type barista struct {
	speed int
	id    int
}

func (b *barista) MakeOrder(order Order) Order {
	time.Sleep(time.Duration(b.id) * time.Second)
	return order
}

func (b *barista) String() string {
	return fmt.Sprintf("Barista %d", b.id)
}

// NewBarista creates a new Barista
func NewBarista(id int) Barista {
	return &barista{id: id, speed: 15}
}

// RandomGroupOfBaristas creates a random group of baristas
func RandomGroupOfBaristas(n int) []Barista {
	baristas := make([]Barista, n)
	for i := 0; i < n; i++ {
		baristas[i] = NewBarista(i + 1)
	}

	return baristas
}


text:
import { IDataChannelMessage, DataChannelReadyState } from '../data';

export class PeerConnectionManager {
    public peerConnections: { [id: string]: RTCPeerConnection } = {};
    public candidates: { [id: string]: RTCIceCandidateInit[] } = {};
    private dataChannels: { [id: string]: RTCDataChannel } = {};

    public createPeerConnectionById(id: string, peerConnectionConfig: RTCConfiguration): RTCPeerConnection {
        const peerConnection = new RTCPeerConnection(peerConnectionConfig);
        this.peerConnections[id] = peerConnection;
        return peerConnection;
    }

    public getPeerConnectionById(id: string): RTCPeerConnection {
        return this.peerConnections[id];
    }

    public removePeerConnection(id: string) {
        const peerConnection = this.getPeerConnectionById(id);
        const dataChannel = this.getDataChannelById(id);

        if (peerConnection) {
            peerConnection.close();
        } else {
            console.warn('handleRemovePeerMessage(): Missing connection Id: %s', id);
        }

        if (dataChannel) {
            dataChannel.close();
        } else {
            console.warn('handleRemovePeerMessage(): Missing data channel Id: %s', id);
        }

        delete this.peerConnections[id];
        delete this.dataChannels[id];
    }

    public setDataChannel(dataChannel: RTCDataChannel, id: string) {
        let oldChannel = this.getDataChannelById(id);
        if (oldChannel) {
            // NOTE(yunsi): Ideally only one side of the RTCPeerConnection should create a data channel, but in case they
            // both create a data channel, we will replace the old channel with the new one.
            console.log(`Replace old dataChannel: ${oldChannel} of id: ${id} with new dataChannel: ${dataChannel}`)
        }

        this.dataChannels[id] = dataChannel;
    }

    public getDataChannelById(id: string): RTCDataChannel {
        return this.dataChannels[id]
    }

    public broadcastMessage(message: IDataChannelMessage) {
        Object.keys(this.dataChannels).forEach((id: string) => {
            this.sendMessageToDataChannel(message, id)
        });
    }

    private sendMessageToDataChannel(message: IDataChannelMessage, id: string) {
        const dataChannel = this.getDataChannelById(id);

        if (!dataChannel) {
            console.log(`Data channel for id ${id} does not exist`);
            return
        }
        if (dataChannel.readyState !== DataChannelReadyState.OPEN) {
            console.log(`Data channel for id ${id} is not ready yet`);
            return
        }

        dataChannel.send(JSON.stringify(message));
    }

    public addCandidate(candidate: RTCIceCandidateInit, id: string) {
        if (this.candidates[id]) {
            this.candidates[id].push(candidate);
        } else {
            this.candidates[id] = [candidate];
        }
    }

    public close() {
        Object.keys(this.peerConnections).forEach((id: string) => {
            // NOTE(yunsi): This will also close all datachannels created on the peerconnection
            this.peerConnections[id].close();
        })
    }
}


text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmJoke
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.btnJoke1 = New System.Windows.Forms.Button
        Me.btnJoke2 = New System.Windows.Forms.Button
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtOutPut = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        '
        'btnJoke1
        '
        Me.btnJoke1.Location = New System.Drawing.Point(54, 179)
        Me.btnJoke1.Name = "btnJoke1"
        Me.btnJoke1.Size = New System.Drawing.Size(75, 23)
        Me.btnJoke1.TabIndex = 0
        Me.btnJoke1.Text = "Joke 1"
        Me.btnJoke1.UseVisualStyleBackColor = True
        '
        'btnJoke2
        '
        Me.btnJoke2.Location = New System.Drawing.Point(291, 179)
        Me.btnJoke2.Name = "btnJoke2"
        Me.btnJoke2.Size = New System.Drawing.Size(75, 23)
        Me.btnJoke2.TabIndex = 1
        Me.btnJoke2.Text = "Joke 2"
        Me.btnJoke2.UseVisualStyleBackColor = True
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(126, 33)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(172, 15)
        Me.Label1.TabIndex = 2
        Me.Label1.Text = "Joke Machine - Kaleb Haslam"
        '
        'txtOutPut
        '
        Me.txtOutPut.Location = New System.Drawing.Point(54, 79)
        Me.txtOutPut.Multiline = True
        Me.txtOutPut.Name = "txtOutPut"
        Me.txtOutPut.ReadOnly = True
        Me.txtOutPut.Size = New System.Drawing.Size(312, 64)
        Me.txtOutPut.TabIndex = 3
        '
        'frmJoke
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(432, 248)
        Me.Controls.Add(Me.txtOutPut)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.btnJoke2)
        Me.Controls.Add(Me.btnJoke1)
        Me.Name = "frmJoke"
        Me.Text = "Joke Machine"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents btnJoke1 As System.Windows.Forms.Button
    Friend WithEvents btnJoke2 As System.Windows.Forms.Button
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents txtOutPut As System.Windows.Forms.TextBox

End Class


text:
if (!process.env.ONI_WEBPACK_LOAD) {
    window.eval = global.eval = () => console.warn("eval is not available")
}

console.timeStamp("browser.domloaded")
var path = "lib/browser/bundle.js"
if (process.env.ONI_WEBPACK_LOAD) {
    path = "scripts/dev_webpack_loader.js"
}
var scriptTag = document.createElement("script")
scriptTag.src = path
document.body.appendChild(scriptTag)


text:
package org.eclipse.jgit.treewalk.filter;

import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectWriter;
import org.eclipse.jgit.lib.RepositoryTestCase;
import org.eclipse.jgit.treewalk.TreeWalk;

public class PathSuffixFilterTestCase extends RepositoryTestCase {

	public void testNonRecursiveFiltering() throws IOException {
		final ObjectWriter ow = new ObjectWriter(db);
		final ObjectId aSth = ow.writeBlob("a.sth".getBytes());
		final ObjectId aTxt = ow.writeBlob("a.txt".getBytes());
		final DirCache dc = DirCache.read(db);
		final DirCacheBuilder builder = dc.builder();
		final DirCacheEntry aSthEntry = new DirCacheEntry("a.sth");
		aSthEntry.setFileMode(FileMode.REGULAR_FILE);
		aSthEntry.setObjectId(aSth);
		final DirCacheEntry aTxtEntry = new DirCacheEntry("a.txt");
		aTxtEntry.setFileMode(FileMode.REGULAR_FILE);
		aTxtEntry.setObjectId(aTxt);
		builder.add(aSthEntry);
		builder.add(aTxtEntry);
		builder.finish();
		final ObjectId treeId = dc.writeTree(ow);

		final TreeWalk tw = new TreeWalk(db);
		tw.setFilter(PathSuffixFilter.create(".txt"));
		tw.addTree(treeId);

		List<String> paths = new LinkedList<String>();
		while (tw.next()) {
			paths.add(tw.getPathString());
		}

		List<String> expected =  new LinkedList<String>();
		expected.add("a.txt");

		assertEquals(expected, paths);
	}

	public void testRecursiveFiltering() throws IOException {
		final ObjectWriter ow = new ObjectWriter(db);
		final ObjectId aSth = ow.writeBlob("a.sth".getBytes());
		final ObjectId aTxt = ow.writeBlob("a.txt".getBytes());
		final ObjectId bSth = ow.writeBlob("b.sth".getBytes());
		final ObjectId bTxt = ow.writeBlob("b.txt".getBytes());
		final DirCache dc = DirCache.read(db);
		final DirCacheBuilder builder = dc.builder();
		final DirCacheEntry aSthEntry = new DirCacheEntry("a.sth");
		aSthEntry.setFileMode(FileMode.REGULAR_FILE);
		aSthEntry.setObjectId(aSth);
		final DirCacheEntry aTxtEntry = new DirCacheEntry("a.txt");
		aTxtEntry.setFileMode(FileMode.REGULAR_FILE);
		aTxtEntry.setObjectId(aTxt);
		builder.add(aSthEntry);
		builder.add(aTxtEntry);
		final DirCacheEntry bSthEntry = new DirCacheEntry("sub/b.sth");
		bSthEntry.setFileMode(FileMode.REGULAR_FILE);
		bSthEntry.setObjectId(bSth);
		final DirCacheEntry bTxtEntry = new DirCacheEntry("sub/b.txt");
		bTxtEntry.setFileMode(FileMode.REGULAR_FILE);
		bTxtEntry.setObjectId(bTxt);
		builder.add(bSthEntry);
		builder.add(bTxtEntry);
		builder.finish();
		final ObjectId treeId = dc.writeTree(ow);

		final TreeWalk tw = new TreeWalk(db);
		tw.setRecursive(true);
		tw.setFilter(PathSuffixFilter.create(".txt"));
		tw.addTree(treeId);

		List<String> paths = new LinkedList<String>();
		while (tw.next()) {
			paths.add(tw.getPathString());
		}

		List<String> expected =  new LinkedList<String>();
		expected.add("a.txt");
		expected.add("sub/b.txt");

		assertEquals(expected, paths);
	}

}


text:
package com.letaohou.zjx.coolweahter;

import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ImageView;

import com.letaohou.zjx.coolweahter.db.Province;
import com.letaohou.zjx.coolweahter.util.HttpUtil;

import org.litepal.crud.DataSupport;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        SharedPreferences sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);
        if (sharedPreferences.getString("weather",null)!=null){
            Intent intent=new Intent(this,WeaherActivity.class);
            startActivity(intent);
            finish();
        }

    }

    }


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="android:Theme.Holo.NoActionBar.TranslucentDecor">
       <!-- <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowBackground">@null</item>
        <item name="metaButtonBarStyle">@style/ButtonBar</item>
        <item name="metaButtonBarButtonStyle">@style/ButtonBarButton</item>-->
    </style>

    <style name="FullscreenTheme" parent="android:Theme.Black.NoTitleBar.Fullscreen">
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowBackground">@null</item>
        <item name="metaButtonBarStyle">@style/ButtonBar</item>
        <item name="metaButtonBarButtonStyle">@style/ButtonBarButton</item>
    </style>

    <style name="ButtonBar">
        <item name="android:paddingLeft">2dp</item>
        <item name="android:paddingTop">5dp</item>
        <item name="android:paddingRight">2dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:background">@android:drawable/bottom_bar</item>
    </style>

    <style name="ButtonBarButton" />

</resources>


text:
This plugin displays a resizable div container that allows the user to drag until the container is the same size as the item being measured. Once the user measures the item as close as possible, clicking the button sets a scaling factor for the div containing jsPsych content. This causes the stimuli that follow to have a known size, independent of monitor resolution.

## Parameters

Parameters with a default value of *undefined* must be specified. Other parameters can be left unspecified if the default value is acceptable.

Parameter | Type | Default Value | Description
----------|------|---------------|------------
item_height | numeric | 1 | The height of the item to be measured. Any units can be used as long as you are consistent with using the same units for all parameters.
item_width | numeric | 1 | The width of the item to be measured.
pixels_per_unit | numeric | 100 | After the scaling factor is applied, this many pixels will equal one unit of measurement.
prompt | string | `''` | HTML content to display below the resizable box, and above the button.
button_label | string | 'Continue' | Label to display on the button to complete calibration.
starting_size | numeric | 100 | The initial size of the box, in pixels, along the largest dimension. The aspect ratio will be set automatically to match the item width and height.

## Data Generated

In addition to the [default data collected by all plugins](overview#data-collected-by-plugins), this plugin collects the following data for each trial.

Name | Type | Value
-----|------|------
final_width_px | numeric | Final width of the resizable div container, in pixels.
scale_factor | numeric | Scaling factor that will be applied to the div containing jsPsych content.

## Examples

#### Measuring a credit card and resizing the display to have 150 pixels equal an inch.

```javascript
var inputs = {
  type: 'resize',
  item_width: 3 + 3/8,
  item_height: 2 + 1/8,
  prompt: "<p>Click and drag the lower right corner of the box until the box is the same size as a credit card held up to the screen.</p>",
  pixels_per_unit: 150
};
```


text:
package engine.actions;

import authoring.model.collections.GameObjectsCollection;
import engine.gameObject.GameObject;
import engine.gameObject.Identifier;
import engine.gameObject.components.PhysicsBody;

public class MakeNewObjectFromLocationAction extends MakeNewObjectAction{

	private Double myX;
	private Double myY;

	public MakeNewObjectFromLocationAction(String type, Double x, Double y) {
		super(type);
		myX = x;
		myY = y;

	}

	@Override
	public void execute() {
		for (GameObject object: myMasterList){
		    //System.out.println(object.getIdentifier().getHash());
			//TODO: will be template list
			if (object.getIdentifier().getType().equals(myType)){
				GameObject newObject = new GameObject(object, myX, myY, myType);
				newObject.setIdentifier(new Identifier(object.getIdentifier()));
				newObject.setPhysicsBody(new PhysicsBody(object.getPhysicsBody()));
				myRenderer.createAndAssignRenderedNode(newObject);
				myCurrentLevel.getGameObjectsCollection().add(newObject);
			}
		}
	}

}


text:
module WOW::Capture::Packets::SMSG
  class AttackStop < WOW::Capture::Packets::Base
    structure do
      build 19033 do
        guid128   :attacker_guid,       packed: true
        guid128   :victim_guid,         packed: true

        bit       :attacker_dead
      end

      build 0...15595 do
        guid64    :attacker_guid,       packed: true
        guid64    :victim_guid,         packed: true

        int32     :attacker_dead
      end
    end

    def attacker_dead?
      record.attacker_dead == true || record.attacker_dead == 1
    end

    def track_references!
      if record.attacker_guid.creature?
        add_reference!('Attacker', :attacker, :creature, record.attacker_guid.entry_id)
      end

      if record.victim_guid.creature?
        add_reference!('Victim', :victim, :creature, record.victim_guid.entry_id)
      end
    end

    def update_state!
      attacker_object = parser.objects.find_or_create(record.attacker_guid)
      victim_object = parser.objects.find_or_create(record.victim_guid)

      attacker_object.died!(self) if attacker_dead?

      attacker_object.attack_stop!(self)
    end
  end
end


text:
.. _refguide:

Reference Guide
###############

This document provides the complete API reference for Bokeh. It is
auto-generated from the docstrings in the code. The bulk of the content is
under :ref:`bokeh.models` in the sidebar menu to the left.


text:
import {Injectable} from '@angular/core';
import {Http, Headers, Response} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import 'rxjs/Rx';
import 'rxjs/add/operator/toPromise';
import {Common, Coordinate, Resort} from "../common/common";

@Injectable()
export class ServerService {
    constructor(private http: Http) {}

    private Server = {
        GETRandomNumber: '/get-random-number',
        GETResortProximity: '/resort-proximity'
    };

    getRandomNumber(): Observable<number> {
        return this.http.get(this.Server.GETRandomNumber)
            .map(res => <number> res.json())
            .catch(error => Observable.throw(error.json().error || 'Server error'))
    }

    private extractData(res: Response) {
      let body = res.json();
      return body || { };
    }

    getProximityResorts(position: Position): Observable<Resort[]> {
        return this.http.get(this.Server.GETResortProximity
                + '?lat=' + position.coords.latitude +'&lon=' + position.coords.longitude + '&unit=10&distance=100')
                  .map(this.extractData)
                  .catch(this.handleError);
    }

    private handleError (error: Response | any) {
     let errMsg: string;
      if (error instanceof Response) {
        const body = error.json() || '';
        const err = body.error || JSON.stringify(body);
        errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
      } else {
        errMsg = error.message ? error.message : error.toString();
      }
      console.error(errMsg);
      return Observable.throw(errMsg);
    }

}


text:
using namespace irr;
using namespace asset;

// todo NEED DOCS
IAssetLoader::IAssetLoaderOverride::IAssetLoaderOverride(IAssetManager* _manager) : m_manager(_manager), m_filesystem(m_manager->getFileSystem())
{
}

SAssetBundle IAssetLoader::IAssetLoaderOverride::findCachedAsset(const std::string& inSearchKey, const IAsset::E_TYPE* inAssetTypes, const SAssetLoadContext& ctx, const uint32_t& hierarchyLevel)
{
    auto levelFlag = ctx.params.cacheFlags >> (uint64_t(hierarchyLevel) * 2ull);
    if ((levelFlag & ECF_DUPLICATE_TOP_LEVEL) == ECF_DUPLICATE_TOP_LEVEL)
        return {};

    core::vector<SAssetBundle> found = m_manager->findAssets(inSearchKey, inAssetTypes);
    if (!found.size())
        return handleSearchFail(inSearchKey, ctx, hierarchyLevel);
    return chooseRelevantFromFound(found, ctx, hierarchyLevel);
}

void IAssetLoader::IAssetLoaderOverride::insertAssetIntoCache(SAssetBundle& asset, const std::string& supposedKey, const SAssetLoadContext& ctx, const uint32_t& hierarchyLevel)
{
    m_manager->changeAssetKey(asset, supposedKey);

    auto levelFlag = ctx.params.cacheFlags >> (uint64_t(hierarchyLevel) * 2ull);
    if (!(levelFlag&ECF_DONT_CACHE_TOP_LEVEL))
        m_manager->insertAssetIntoCache(asset);
}

SAssetBundle IAssetLoader::interm_getAssetInHierarchy(IAssetManager* _mgr, io::IReadFile* _file, const std::string& _supposedFilename, const IAssetLoader::SAssetLoadParams& _params, uint32_t _hierarchyLevel, IAssetLoader::IAssetLoaderOverride* _override)
{
    return _mgr->getAssetInHierarchy(_file, _supposedFilename, _params, _hierarchyLevel, _override);
}

SAssetBundle IAssetLoader::interm_getAssetInHierarchy(IAssetManager* _mgr, const std::string& _filename, const IAssetLoader::SAssetLoadParams& _params, uint32_t _hierarchyLevel, IAssetLoader::IAssetLoaderOverride* _override)
{
    return _mgr->getAssetInHierarchy(_filename, _params, _hierarchyLevel, _override);
}

SAssetBundle IAssetLoader::interm_getAssetInHierarchy(IAssetManager* _mgr, io::IReadFile* _file, const std::string& _supposedFilename, const IAssetLoader::SAssetLoadParams& _params, uint32_t _hierarchyLevel)
{
    return _mgr->getAssetInHierarchy(_file, _supposedFilename, _params, _hierarchyLevel);
}

SAssetBundle IAssetLoader::interm_getAssetInHierarchy(IAssetManager* _mgr, const std::string& _filename, const IAssetLoader::SAssetLoadParams& _params, uint32_t _hierarchyLevel)
{
    return _mgr->getAssetInHierarchy(_filename, _params, _hierarchyLevel);
}


text:
"use strict";

const _ = require("iotdb-helpers");

const assert = require("assert");

const AWS = require("aws-sdk");

/**
 *  Accepts:
 *  Produces:
 */
const invoke = (_self, done) => {
    const self = _.d.clone.shallow(_self);
    const method = "lambda.invoke";

    assert.ok(self.lambda, `${method}: self.lambda is required`);
    assert.ok(_.is.String(self.function_name), `${method}: self.function_name must be a String`);

    self.lambda.invoke({
        FunctionName: self.function_name,
        // ...
    }, (error, data) => {
        if (error) {
            return done(error);
        }

        self.queue_url = data.QueueUrl;

        return done(null, self);
    });
}

/**
 *  API
 */
exports.invoke = _.promise.denodeify(invoke);


text:
IB_DESIGNABLE
@interface HPImageView : UIImageView

@property (nonatomic, retain) UIInternalProxy *internalProxy;

#pragma mark Border
@property (nonatomic, assign) IBInspectable UIColor *borderColor;
@property (nonatomic, assign) IBInspectable CGFloat borderWidth;

#pragma mark Corner
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
@property (nonatomic, assign) IBInspectable BOOL    topLeftRounded;
@property (nonatomic, assign) IBInspectable BOOL    topRightRounded;
@property (nonatomic, assign) IBInspectable BOOL    bottomLeftRounded;
@property (nonatomic, assign) IBInspectable BOOL    bottomRightRounded;

@end


text:
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title><?php wp_title('|', true, 'right'); ?></title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link href='http://fonts.googleapis.com/css?family=Jockey+One&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
  <link rel="stylesheet/less" type="text/css" href="<?php echo get_template_directory_uri() ?>/assets/css/melonstudio.less" />
  <link rel="shortcut icon" href="http://tworczyzakatek.com/media/fv.ico" type="image/x-icon" />
  <?php wp_head(); ?>

  <link rel="alternate" type="application/rss+xml" title="<?php echo get_bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/">
</head>


text:
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"strings"
	"time"
)

func SingleResourceAlgo(ReqClass, ReqType, ReqCategory, SessionId string, ResourceIds []string) string {
	var result = SingleHandling(ReqClass, ReqType, ReqCategory, SessionId, ResourceIds)
	return result

}

func GetResourceCSlotUrl() string {
	var resourceUrl string
	file, _ := os.Open("conf.json")
	decoder := json.NewDecoder(file)
	configuration := Configuration{}
	err := decoder.Decode(&configuration)
	if err != nil {
		fmt.Println("error:", err)
		resourceUrl = "http://localhost:2225/resource/cs/update"
	} else {
		resourceUrl = configuration.ResourceCSlotUrl
	}
	return resourceUrl
}

func ReserveSlot(slotInfo CSlotInfo) bool {
	url := GetResourceCSlotUrl()
	fmt.Println("URL:>", url)

	slotInfoJson, _ := json.Marshal(slotInfo)
	var jsonStr = []byte(slotInfoJson)
	req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		//panic(err)
		return false
	}
	defer resp.Body.Close()

	fmt.Println("response Status:", resp.Status)
	fmt.Println("response Headers:", resp.Header)
	body, _ := ioutil.ReadAll(resp.Body)
	result := string(body)
	fmt.Println("response Body:", result)
	if result == "OK" {
		fmt.Println("Return true")
		return true
	}

	fmt.Println("Return false")
	return false
}

func ClearSlotOnMaxRecerved(reqClass, reqType, reqCategory, sessionId string, resObj Resource, metaData ReqMetaData) {
	var tagArray = make([]string, 8)

	tagArray[0] = fmt.Sprintf("company_%d", resObj.Company)
	tagArray[1] = fmt.Sprintf("tenant_%d", resObj.Tenant)
	tagArray[2] = fmt.Sprintf("class_%s", reqClass)
	tagArray[3] = fmt.Sprintf("type_%s", reqType)
	tagArray[4] = fmt.Sprintf("category_%s", reqCategory)
	tagArray[5] = fmt.Sprintf("state_%s", "Reserved")
	tagArray[6] = fmt.Sprintf("resourceid_%s", resObj.ResourceId)
	tagArray[7] = fmt.Sprintf("objtype_%s", "CSlotInfo")

	tags := fmt.Sprintf("tag:*%s*", strings.Join(tagArray, "*"))
	fmt.Println(tags)
	reservedSlots := RedisSearchKeys(tags)

	for _, tagKey := range reservedSlots {
		strslotKey := RedisGet(tagKey)
		fmt.Println(strslotKey)

		strslotObj := RedisGet(strslotKey)
		fmt.Println(strslotObj)

		var slotObj CSlotInfo
		json.Unmarshal([]byte(strslotObj), &slotObj)

		fmt.Println("Datetime Info" + slotObj.LastReservedTime)
		t, _ := time.Parse(layout, slotObj.LastReservedTime)
		t1 := int(time.Now().Sub(t).Seconds())
		t2 := metaData.MaxReservedTime
		fmt.Println(fmt.Sprintf("Time Info T1: %d", t1))
		fmt.Println(fmt.Sprintf("Time Info T2: %d", t2))
		if t1 > t2 {
			slotObj.State = "Available"
			slotObj.OtherInfo = "ClearReserved"

			ReserveSlot(slotObj)
		}
	}
}

func GetReqMetaData(_company, _tenent int, _class, _type, _category string) ReqMetaData {
	key := fmt.Sprintf("ReqMETA:%d:%d:%s:%s:%s", _company, _tenent, _class, _type, _category)
	fmt.Println(key)
	strMetaObj := RedisGet(key)
	fmt.Println(strMetaObj)

	var metaObj ReqMetaData
	json.Unmarshal([]byte(strMetaObj), &metaObj)

	return metaObj
}

func GetResourceState(_company, _tenant int, _resId string) string {
	key := fmt.Sprintf("ResourceState:%d:%d:%s", _company, _tenant, _resId)
	fmt.Println(key)
	strResStateObj := RedisGet(key)
	fmt.Println(strResStateObj)

	return strResStateObj
}


text:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>io.debezium</groupId>
        <artifactId>debezium-build-parent</artifactId>
        <version>1.7.0-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>debezium-server-bom</artifactId>
    <name>Debezium Server BOM</name>
    <packaging>jar</packaging>

    <properties>
        <version.kinesis>2.13.13</version.kinesis>
        <version.pubsub>5.1.0</version.pubsub>
        <version.pulsar>2.5.2</version.pulsar>
        <version.eventhubs>5.1.1</version.eventhubs>
        <version.jedis>3.5.2</version.jedis>
        <version.pravega>0.9.1</version.pravega>
        <version.nats>2.8.0</version.nats>
        <version.stan>2.2.3</version.stan>

        <version.commons.logging>1.2</version.commons.logging>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Aligning versions/fixing scopes -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${version.commons.logging}</version>
                <scope>runtime</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${version.kafka}</version>
            </dependency>

            <!-- Quarkus dependencies -->
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bom</artifactId>
                <version>${quarkus.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Debezium dependencies -->
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-kinesis</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-pubsub</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-pulsar</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-eventhubs</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-redis</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-kafka</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-pravega</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-nats-streaming</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-server-core</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>

            <!-- Target systems -->
            <dependency>
                <groupId>software.amazon.awssdk</groupId>
                <artifactId>kinesis</artifactId>
                <version>${version.kinesis}</version>
            </dependency>
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>libraries-bom</artifactId>
                <version>${version.pubsub}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.pulsar</groupId>
                <artifactId>pulsar-client</artifactId>
                <version>${version.pulsar}</version>
            </dependency>
            <dependency>
                <groupId>com.azure</groupId>
                <artifactId>azure-messaging-eventhubs</artifactId>
                <version>${version.eventhubs}</version>
            </dependency>
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${version.jedis}</version>
            </dependency>
            <dependency>
                <groupId>io.nats</groupId>
                <artifactId>jnats</artifactId>
                <version>${version.nats}</version>
            </dependency>
            <dependency>
                <groupId>io.nats</groupId>
                <artifactId>java-nats-streaming</artifactId>
                <version>${version.stan}</version>
            </dependency>
            <dependency>
                <groupId>io.debezium</groupId>
                <artifactId>debezium-testing-testcontainers</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.pravega</groupId>
                <artifactId>pravega-client</artifactId>
                <version>${version.pravega}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>


text:
var mongoose = require('mongoose');

// define our country model
// module.exports allows us to pass this to other files when it is called
module.exports = mongoose.model('Country', {
    index: Number,
    name: String,
    gdi_value: Number,
    gdi_group: Number,
    hdi_f: Number,
    hdi_m: Number,
    le_f: Number,
    le_m: Number,
    eys_f: Number,
    eys_m: Number,
    mys_f: Number,
    mys_m: Number,
    gni_f: Number,
    gni_m: Number,
    hd_level: String
});


text:
class PracticeInvitation < ActiveRecord::Base
 belongs_to :practice
end


text: <md-content class="schema-form-section {{::form.htmlClass}}" sf-layout></md-content>


text:
/******************************************************************************
  This source file is part of the Avogadro project.
  This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/

#ifndef AVOGADRO_QTPLUGINS_INSERTFRAGMENT_H
#define AVOGADRO_QTPLUGINS_INSERTFRAGMENT_H

#include <avogadro/qtgui/extensionplugin.h>

#include <QtCore/QMap>

#include <string>

namespace Avogadro {
namespace Io {
class FileFormat;
}
namespace QtPlugins {
class InsertFragmentDialog;
}

namespace QtPlugins {

/**
 * @brief Load single-line molecule descriptors through an input dialog.
 */
class InsertFragment : public QtGui::ExtensionPlugin
{
  Q_OBJECT
public:
  explicit InsertFragment(QObject* parent_ = nullptr);
  ~InsertFragment() override;

  QString name() const override { return tr("InsertFragment"); }
  QString description() const override;
  QList<QAction*> actions() const override;
  QStringList menuPath(QAction*) const override;

public slots:
  void setMolecule(QtGui::Molecule*) override;

private slots:
  void showDialog();
  void performInsert(const QString &fileName, bool crystal);

private:
  QList<QAction*> m_actions;
  InsertFragmentDialog* m_moleculeDialog;
  InsertFragmentDialog* m_crystalDialog;
  /// Maps identifier to extension:
  QMap<QString, std::string> m_formats;

  QtGui::Molecule* m_molecule;
  Io::FileFormat* m_reader;
};

inline QString InsertFragment::description() const
{
  return tr("Insert molecular fragments for building larger molecules.");
}

} // namespace QtPlugins
} // namespace Avogadro

#endif // AVOGADRO_QTPLUGINS_INSERTFRAGMENT_H


text:
package lib

/*--------------------------------------------------------------------------------------------------
 */

/*
ModelConfig - Holds configuration options for a transform model.
*/
type ModelConfig struct {
	MaxDocumentSize    uint64 `json:"max_document_size" yaml:"max_document_size"`
	MaxTransformLength uint64 `json:"max_transform_length" yaml:"max_transform_length"`
}

/*
DefaultModelConfig - Returns a default ModelConfig.
*/
func DefaultModelConfig() ModelConfig {
	return ModelConfig{
		MaxDocumentSize:    50000000, // ~50MB
		MaxTransformLength: 50000,    // ~50KB
	}
}

/*
Model - an interface that represents an internal operation transform model of a particular type.
Initially text is the only supported transform model, however, the plan will eventually be to have
different models for various types of document that should all be supported by our binder.
*/
type Model interface {
	/* PushTransform - Push a single transform to our model, and if successful, return the updated
	 * transform along with the new version of the document.
	 */
	PushTransform(ot OTransform) (OTransform, int, error)

	/* FlushTransforms - apply all unapplied transforms to content, and delete old applied
	 * in accordance with our retention period. Returns a bool indicating whether any changes
	 * were applied, and an error in case a fatal problem was encountered.
	 */
	FlushTransforms(content *string, secondsRetention int64) (bool, error)

	/* GetVersion - returns the current version of the document.
	 */
	GetVersion() int
}

/*--------------------------------------------------------------------------------------------------
 */


text:
namespace blink {
namespace {

using CanonicalLayerMap =
    HeapHashMap<Member<const CascadeLayer>, Member<const CascadeLayer>>;

using LayerOrderMap = HeapHashMap<Member<const CascadeLayer>, unsigned>;

void AddLayers(CascadeLayer* canonical_layer,
               const CascadeLayer& layer_from_sheet,
               CanonicalLayerMap& canonical_layer_map) {
  DCHECK_EQ(canonical_layer->GetName(), layer_from_sheet.GetName());
  canonical_layer_map.insert(&layer_from_sheet, canonical_layer);
  for (const auto& sub_layer_from_sheet :
       layer_from_sheet.GetDirectSubLayers()) {
    StyleRuleBase::LayerName sub_layer_name({sub_layer_from_sheet->GetName()});
    CascadeLayer* canonical_sub_layer =
        canonical_layer->GetOrAddSubLayer(sub_layer_name);
    AddLayers(canonical_sub_layer, *sub_layer_from_sheet, canonical_layer_map);
  }
}

void ComputeLayerOrder(CascadeLayer& layer, unsigned& next) {
  for (const auto& sub_layer : layer.GetDirectSubLayers())
    ComputeLayerOrder(*sub_layer, next);
  layer.SetOrder(next++);
}

}  // namespace

CascadeLayerMap::CascadeLayerMap(const ActiveStyleSheetVector& sheets) {
  CascadeLayer* canonical_root_layer = MakeGarbageCollected<CascadeLayer>();

  CanonicalLayerMap canonical_layer_map;
  for (const auto& sheet : sheets) {
    const RuleSet* rule_set = sheet.second;
    if (rule_set && rule_set->HasCascadeLayers()) {
      AddLayers(canonical_root_layer, rule_set->CascadeLayers(),
                canonical_layer_map);
    }
  }

  unsigned next = 0;
  ComputeLayerOrder(*canonical_root_layer, next);

  canonical_root_layer->SetOrder(kImplicitOuterLayerOrder);
  canonical_root_layer_ = canonical_root_layer;

  for (const auto& iter : canonical_layer_map) {
    const CascadeLayer* layer_from_sheet = iter.key;
    const CascadeLayer* canonical_layer = iter.value;
    unsigned layer_order = canonical_layer->GetOrder().value();
    layer_order_map_.insert(layer_from_sheet, layer_order);

#if DCHECK_IS_ON()
    // The implicit outer layer is placed above all explicit layers.
    if (canonical_layer != canonical_root_layer_)
      DCHECK_LT(layer_order, kImplicitOuterLayerOrder);
#endif
  }
}

int CascadeLayerMap::CompareLayerOrder(const CascadeLayer* lhs,
                                       const CascadeLayer* rhs) const {
  unsigned lhs_order = lhs ? GetLayerOrder(*lhs) : kImplicitOuterLayerOrder;
  unsigned rhs_order = rhs ? GetLayerOrder(*rhs) : kImplicitOuterLayerOrder;
  return lhs_order < rhs_order ? -1 : (lhs_order > rhs_order ? 1 : 0);
}

const CascadeLayer* CascadeLayerMap::GetRootLayer() const {
  return canonical_root_layer_;
}

void CascadeLayerMap::Trace(blink::Visitor* visitor) const {
  visitor->Trace(layer_order_map_);
  visitor->Trace(canonical_root_layer_);
}

}  // namespace blink


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

<<<<<<< HEAD

<title>com.nlstn.jarvis.exceptions</title>
<meta name="date" content="2017-08-23">
=======

<title>com.nlstn.jarvis.exceptions</title>
<meta name="date" content="2017-07-16">
>>>>>>> parent of 881573c... v0.2! Documentation Logging
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package com.nlstn.jarvis.exceptions

Exception Summary

Exception
Description

CommandNameAlreadyUsedException

This Exception will indicate that a Command was registered in the CommandBuilder,

 but the name is already being used by another command.

<<<<<<< HEAD

PacketTooLargeException

The standard Jarvis packet has a predefined size, if a packet exceeds this limit, this Exception will be thrown.

SettingNotFoundException

Thrown if a requested setting was not found.

UnknownPacketTypeException

The Packet Type of an incoming packet could not be determined.

=======
>>>>>>> parent of 881573c... v0.2! Documentation Logging

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes


text:
package sobolan.projecteuler.problems;

/**
 * @author Radu Murzea
 *
 * @problemstatement
 * Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
 * 1634 = 1^4 + 6^4 + 3^4 + 4^4
 * 8208 = 8^4 + 2^4 + 0^4 + 8^4
 * 9474 = 9^4 + 4^4 + 7^4 + 4^4
 * As 1 = 1^4 is not a sum it is not included.
 * The sum of these numbers is 1634 + 8208 + 9474 = 19316.
 * Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.
 */
public class ProjectEuler030 extends AbstractExecutableProblem
{
    @Override
    public String getResult()
    {
        /**
         * The biggest part of the sum is 9^5 = 59,049 because 9 is the biggest digit.
         * For 6-digit numbers it still proportional, but not for 7-digit ones.
         * This is because 7 x (9^5) = 413,343, which an order of magnitude smaller than 9,999,999.
         * This means the biggest numbers we check are 6-digit ones, more specifically 6 x (9^5) = 354,294.
         */
        int sum = 0;
        for (int i = 2; i < 354294; i++) {
            if (i == this.getFifthPowerSumOfDigits(i)) {
                sum += i;
            }
        }

        return Integer.toString(sum);
    }

    private int getFifthPowerSumOfDigits(int number)
    {
        int result = 0;

        while (number > 0) {
            int digit = number % 10;

            result += (digit * digit * digit * digit * digit);

            number /= 10;
        }

        return result;
    }
}


text:
/*
 * The SessionManager is a singleton object that manages
 * the sessions in memory (stored in app.locals)
 *
 *
 *
 */

var cardsSession = require('./../models/session.js');

var SessionManager = function() {}

SessionManager.init = function(app) {
	this.app = app;
}

/*
 * Handle a card move message from a client, updating the card
 * position in memory.
 *
 * If the session isn't present, we just drop messages and do
 * a session reload on the move_end message
 *
 * TODO: Can't we just put data.card straight into card?  Why do we need to read every
 * var and copy?
 */
SessionManager.handleCardMove = function(data) {
	// TODO: Validate websocket data.  We should do this everywhere
	var session_id = data.session_id;
	var session = this.getSession(session_id);
	if (!session) {
		console.log("ERROR: SessionManager.handleCardMove(): session not in memory");
		return;
	} else {
		var card_id = data.card._id;
		var card = session.findCard(card_id);

		card.x = data.card.x;
		card.y = data.card.y;
		card.z = data.card.z;
		card.text = data.card.text;
		session.max_z = data.max_z;
	}
}

/*
 * Load the session into global memory (cardssessions)
 *
 */
SessionManager.loadSession = function(session_id) {

	var sess_mgr = this;

	console.log("INFO: SessionManager.loadSession: Loading session from DB: " + session_id);
	return new Promise(function(resolve, reject) {
		cardsSession.getSession(session_id).then(function(session) {
			sess_mgr.app.locals.cardssessions[session_id] = {};
			sess_mgr.app.locals.cardssessions[session_id].session = session;
			sess_mgr.app.locals.cardssessions[session_id].connected_users = {};
			console.log("INFO: SessionManager.loadSession: Loaded session (" + session_id + ") from DB");
			resolve(session);
		})
			.catch(function(err) {
				console.log(err);
				reject(Error("ERROR: SessionManager.loadSession() - Could not load session from DB"));
			});
	})

}

/*
 * Return the session as it is in memory (cardssessions)
 *
 */
SessionManager.getSession = function(session_id) {
	if (typeof this.app.locals.cardssessions[session_id] != 'undefined') {
		return this.app.locals.cardssessions[session_id].session;
	} else {
		return null;
	}
}

// TODO: Does this need protecting?
SessionManager.getConnectedUsers = function(session_id) {
	return this.app.locals.cardssessions[session_id].connected_users;
}

/*
 * TODO: Can't we just return the promise from save()?
 */
SessionManager.saveSession = function(session_id) {
	var session = this.getSession(session_id);
	if (!session) {
		return new Promise(function(resolve, reject) {
			SessionManager.loadSession(session_id).then(function(session) {
				session.save().then(function() {
					resolve(0);
				}, function(err) {
					reject(1);
				});
			})
				.catch(function(err) {
					console.log(err);
				});
		});
	}

	return new Promise(function(resolve, reject) {
		session.save().then(function() {
			resolve(0);
		}, function(err) {
			reject(1);
		});
	});
}

/*
 * Loads the session if it doesn't exist and approves the participant.  Todo:
 * should this be pushed down to the session itself?
 *
 * No, because the sessionManager looks after all the in-memory sessions
 * and the Mongoose model doesn't know about this.
 *
 */
SessionManager.handleApproveParticipant = function(user_id, session_id) {
	return this.loadSession(session_id).then(function(session) {
		console.log("SessionRoutes.handleApproveParticipant: Loaded session");
		var approval_outcome = session.approveParticipant(user_id);
		return approval_outcome;
	}).catch(function() {
		return Error("Could not approve");
	});
}

// TODO: Push down to the session model?
//
// The sessionManager should only be responsible for managing
// cardssessions.  The session model itself should have all the
// other functions on.  If a websocket command needs to update a session
// then it can use the session manager to retrieve the session object
SessionManager.deleteCard = function(session_id) {

}

module.exports = SessionManager;