text:
//
//  SCRegistrationController.h
//  C2CallPhone
//
//  Created by Michael Knecht on 14.04.13.
//  Copyright 2013 C2Call GmbH. All rights reserved.
//
//

#import <UIKit/UIKit.h>
#import "SCCountrySelectionController.h"
#import "SCAbstractRegistrationController.h"

@class EditCell, C2TapImageView;

/** Presents a Registration Controller to the user to register with the C2Call Service.

 */
@interface SCRegistrationController : SCAbstractRegistrationController<SCCountrySelectionDelegate>

/** @name Actions */
/** Register User Action.
 @param sender - The initiator of the action
 */
-(IBAction) registerUser:(id) sender;

/** Shows Terms Action.
 @param sender - The initiator of the action
 */
-(IBAction) showTerms:(id) sender;

/** Sets FristResponder Action.
 @param sender - The initiator of the action
 */
-(IBAction) setFirstResponder:(id)sender;

/** @name Complete Actions */
/** Sets an Action Block to be called after registration is done.
 @param action - The Action Block
 */
-(void) setRegisterDoneAction:(void (^)())action;

/** Selects User Profile Image Action.
 @param sender - The initiator of the action
 */
-(IBAction) selectPhoto:(id)sender;

@end


text:
package com.duckspot.roadie;

import com.duckspot.util.JsonUtil;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;

/**
 * ToolVersion holds a collection of sources that have the install/remove
 * information for a tool.
 */
public class ToolVersion {

    private String toolName;
    private String version;
    private boolean installed;
    private List<URI> sources = new ArrayList<>(); // set of sources

    public ToolVersion(String toolName, String version) {
        this.toolName = toolName;
        this.version = version;
    }

    public void addSource(URI packageURI) {
        sources.add(packageURI);
    }

    public Package getPackage() {
        for (URI packageSource: sources) {
            try {
                JSONObject jo = JsonUtil.getJSON(packageSource);
                if (toolName.equals(jo.getString("tool")) &&
                        version.equals(jo.getString("version"))) {
                    return new Package(packageSource, jo);
                }
            } catch (IOException ex) {
                // ignore
            }
        }
        throw new Error(String.format("can't find %s: %s",toolName,version));
    }

    public void setInstalled(boolean installed) {
        this.installed = installed;
    }

    public boolean isInstalled() {
        return installed;
    }

    public String getToolName() {
        return toolName;
    }

    public String getVersion() {
        return version;
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

/*
 * This class draws the gui of the path generator window.
 * */
[System.Serializable]
public class PathGeneratorWindow : EditorWindow {

    private RedirectionDataStructure data;

    private float gain = 2;
    private Vector3 jointAPosition = new Vector3(0.55f, 0, -1.25f);
    private Vector3 jointBPosition = new Vector3(0.55f, 0, 1.25f);
    private Vector3 jointCPosition = new Vector3(-1.615f, 0, 0);

    private int intersectionIndex = 0;
    private string[] curveOptions = new string[] { "" };
    private int curveIndex = 0;
    private int joint = 0;

    private bool showCurves = true;
    private bool showJoints = true;
    private bool showPaths = true;
    private bool showIntersections = true;

    private bool hideJointsGui = false;
    private bool generateAutomatically = false;
    private Vector2 scrollPos;
    private float sideLength = 4;
	private float safetyDistance = 0.5f;
	private float walkingZoneRadius = 0.25f;

    [MenuItem("Window/Path Generator")]

    public static void ShowWindow()
    {
        EditorWindow.GetWindow(typeof(PathGeneratorWindow));
    }

    /*
     * Load (or create if it does not exist) the data structure object.
     * Load all the gui specific variables saved to editorprefs.
     * */
    private void OnEnable()
    {
        data = (RedirectionDataStructure)AssetDatabase.LoadAssetAtPath(@"Assets/Resources/data.asset", typeof(RedirectionDataStructure));
        gain = EditorPrefs.GetFloat("gain", gain);
        sideLength = EditorPrefs.GetFloat("sideLength", sideLength);
		safetyDistance = EditorPrefs.GetFloat("safetyDistance", safetyDistance);
		walkingZoneRadius = EditorPrefs.GetFloat("walkingRadius", walkingZoneRadius);
        intersectionIndex = EditorPrefs.GetInt("intersectionIndex", intersectionIndex);
        curveIndex = EditorPrefs.GetInt("curveIndex", curveIndex);
        joint = EditorPrefs.GetInt("joint", joint);
        showCurves = EditorPrefs.GetBool("showCurves", showCurves);
        showJoints = EditorPrefs.GetBool("showJoints", showJoints);
        showPaths = EditorPrefs.GetBool("showPaths", showPaths);
        showIntersections = EditorPrefs.GetBool("showIntersections", showIntersections);
        hideJointsGui = EditorPrefs.GetBool("hideJointsGui", hideJointsGui);
        generateAutomatically = EditorPrefs.GetBool("generateAutomatically", generateAutomatically);

        if (data == null)
        {
            Debug.Log("Created new data resource");
            data = CreateInstance<RedirectionDataStructure>();
            if (!AssetDatabase.IsValidFolder("Assets/Resources"))
                AssetDatabase.CreateFolder("Assets", "Resources");
            AssetDatabase.CreateAsset(data, "Assets/Resources/data.asset");
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();

            gain = 2;
            sideLength = 4;
			safetyDistance = 0.5f;
			walkingZoneRadius = 0.25f;
            intersectionIndex = 0;
            curveIndex = 0;
            joint = 0;
            showCurves = true;
            showJoints = true;
            showPaths = true;
            showIntersections = true;
            hideJointsGui = false;
            generateAutomatically = false;
        }
    }

    /*
     * Save all the gui specific variables to editorprefs.
     * */
    private void OnDisable()
    {
        EditorPrefs.SetFloat("gain", gain);
        EditorPrefs.SetFloat("sideLength", sideLength);
		EditorPrefs.SetFloat("safetyDistance", safetyDistance);
		EditorPrefs.SetFloat("walkingRadius", walkingZoneRadius);
        EditorPrefs.SetInt("intersectionIndex", intersectionIndex);
        EditorPrefs.SetInt("curveIndex", curveIndex);
        EditorPrefs.SetInt("joint", joint);
        EditorPrefs.SetBool("showCurves", showCurves);
        EditorPrefs.SetBool("showJoints", showJoints);
        EditorPrefs.SetBool("showPaths", showPaths);
        EditorPrefs.SetBool("showIntersections", showIntersections);
        EditorPrefs.SetBool("hideJointsGui", hideJointsGui);
        EditorPrefs.SetBool("generateAutomatically", generateAutomatically);
    }

    /*
     * Draws the gui of the editor window.
     * */
    void OnGUI () {
        scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Data Object", EditorStyles.boldLabel);
        GUI.enabled = false;
        data = (RedirectionDataStructure)EditorGUILayout.ObjectField(data, typeof(object), false);
        GUI.enabled = true;

        EditorGUILayout.Space();
        GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(1));
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("General", EditorStyles.boldLabel);
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.BeginVertical();
        bool oldShowCurves = showCurves;
        showCurves = EditorGUILayout.ToggleLeft("Show Curves", showCurves);
        if (oldShowCurves != showCurves)
            SceneView.RepaintAll();
        bool oldShowJoints = showJoints;
        showJoints = EditorGUILayout.ToggleLeft("Show JointPoints", showJoints);
        if (oldShowJoints != showJoints)
            SceneView.RepaintAll();
        EditorGUILayout.EndVertical();
        EditorGUILayout.BeginVertical();
        bool oldShowPaths = showPaths;
        showPaths = EditorGUILayout.ToggleLeft("Show Virtual Paths", showPaths);
        if (oldShowPaths != showPaths)
            SceneView.RepaintAll();
        bool oldShowIntersections = showIntersections;
        showIntersections = EditorGUILayout.ToggleLeft("Show Virtual Intersections", showIntersections);
        if (oldShowIntersections != showIntersections)
            SceneView.RepaintAll();
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.HelpBox("Resetting means removing all joints, curves, intersections, and paths!", MessageType.Warning);

        if (GUILayout.Button("Reset all", GUILayout.Width(100)))
        {
            Debug.Log("Created new data resource");
            AssetDatabase.DeleteAsset("Assets/Resources/data.asset");
            data = CreateInstance<RedirectionDataStructure>();
            if (!AssetDatabase.IsValidFolder("Assets/Resources/"))
                AssetDatabase.CreateFolder("Assets", "Resources");
            AssetDatabase.CreateAsset(data, "Assets/Resources/data.asset");
            intersectionIndex = 0;
            curveIndex = 0;
            hideJointsGui = false;
            jointAPosition = new Vector3(0.55f, 0, -1.25f);
            jointBPosition = new Vector3(0.55f, 0, 1.25f);
            jointCPosition = new Vector3(-1.615f, 0, 0);
            this.saveChanges();
            SceneView.RepaintAll();
        }

        if (hideJointsGui)
            GUI.enabled = false;

        EditorGUILayout.Space();
        GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(1));
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Jointpoints", EditorStyles.boldLabel);

        generateAutomatically = EditorGUILayout.ToggleLeft("Generate jointpoints automatically according to tracking space", generateAutomatically);
        if (!generateAutomatically)
            GUI.enabled = false;
        sideLength = EditorGUILayout.FloatField("Side length", sideLength, GUILayout.Width(200));
		safetyDistance = EditorGUILayout.FloatField("Safety distance", safetyDistance, GUILayout.Width(200));
		walkingZoneRadius = EditorGUILayout.FloatField("Walking zone radius (at joints)", walkingZoneRadius, GUILayout.Width(200));
        GUI.enabled = true;

        if (generateAutomatically)
            GUI.enabled = false;
        jointAPosition = EditorGUILayout.Vector3Field("Joint A", jointAPosition);
        jointBPosition = EditorGUILayout.Vector3Field("Joint B", jointBPosition);
        jointCPosition = EditorGUILayout.Vector3Field("Joint C", jointCPosition);
        GUI.enabled = true;

        if (hideJointsGui)
            GUI.enabled = false;
        if (GUILayout.Button("Create curves", GUILayout.Width(100)))
        {
            hideJointsGui = true;
            if (generateAutomatically)
            {
				calculateJointPositions(sideLength, safetyDistance);
				data.initJointsAndCurves(jointAPosition, jointBPosition, jointCPosition, walkingZoneRadius);
            }
            else
				data.initJointsAndCurves(jointAPosition, jointBPosition, jointCPosition, walkingZoneRadius);
            this.saveChanges();
        }
        GUI.enabled = true;

        if (!hideJointsGui)
            GUI.enabled = false;

        EditorGUILayout.Space();
        GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(1));
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Start Position", EditorStyles.boldLabel);
        EditorGUILayout.HelpBox("Choosing a new start joint, removes all existing intersections and paths!", MessageType.Warning);

        joint = EditorGUILayout.Popup("Start Joint", joint, new string[] { "A", "B", "C" }, GUILayout.Width(300));
        if (GUILayout.Button("Set start joint", GUILayout.Width(100)))
        {
            if (joint == 0)
                data.setStartPosition(data.jointPointA);
            if (joint == 1)
                data.setStartPosition(data.jointPointB);
            if (joint == 2)
                data.setStartPosition(data.jointPointC);
            intersectionIndex = 0;
            curveIndex = 0;
            this.saveChanges();
        }

        if (intersectionIndex >= data.intersections.Count)
            intersectionIndex = 0;

        // Show path creation fields only when a start point was chosen
        if (data.intersections.Count > 0 && intersectionIndex < data.intersections.Count)
            GUI.enabled = true;
        else
            GUI.enabled = false;

        EditorGUILayout.Space();
        GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(1));
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Virtual Paths", EditorStyles.boldLabel);

        EditorGUILayout.HelpBox("Active intersection is marked yellow in the scene view.", MessageType.Info);

        string[] intersectionOptions = new string[data.intersections.Count];
        int i = 0;
        foreach (VirtualIntersection intersection in data.intersections)
        {
            intersectionOptions[i] = intersection.getLabel();
            i++;
        }
        int oldIntersectionIndex = intersectionIndex;
        intersectionIndex = EditorGUILayout.Popup("Intersection", intersectionIndex, intersectionOptions, GUILayout.Width(400));
        if (oldIntersectionIndex != intersectionIndex)
        {
            curveIndex = 0;
            SceneView.RepaintAll();
        }

        curveIndex = EditorGUILayout.Popup("Curve", curveIndex, calculateCurveOptions(intersectionIndex), GUILayout.Width(400));
        gain = EditorGUILayout.FloatField("Gain", gain); // TODO: Limit this to detection thresholds!

        if (curveOptions.Length == 0 || curveOptions[curveIndex]  == "")
            GUI.enabled = false;
        if (GUILayout.Button("Create Path", GUILayout.Width(100)))
        {
            data.createPathAndIntersection(data.intersections[intersectionIndex], this.getCurve(curveIndex, intersectionIndex), gain);
            curveIndex = 0;
            this.saveChanges();
            this.Repaint();
        }

        GUI.enabled = true;
        EditorGUILayout.EndScrollView();
    }

    /*
     * Save changes of the data structure object to disk.
     * */
    private void saveChanges()
    {
        EditorUtility.SetDirty(data);
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();
    }

    /*
     * Calculates joint positions according to the given side length.
     * Side length should match the size of the tracking space.
     * Overwrites joint positions from gui field.
     * */
    public void calculateJointPositions(float sideLength, float safetyDistance)
    {
        float smallRadius = (Mathf.Sqrt(3) / (Mathf.Sqrt(3) + 1)) * (sideLength / 2f);
        float largeRadius = 2 * smallRadius;
        float heightOfTriangle = (largeRadius / 2) * Mathf.Sqrt(3);

        jointAPosition = new Vector3((sideLength / 2) - smallRadius - safetyDistance, 0, -smallRadius);
        jointBPosition = new Vector3((sideLength / 2) - smallRadius - safetyDistance, 0, smallRadius);
        jointCPosition = new Vector3((sideLength / 2) - smallRadius - heightOfTriangle - safetyDistance, 0, 0);
    }

    /*
     * Calculates the available curve options based on the chosen intersection and the already existing paths.
     * */
    private string[] calculateCurveOptions(int index)
    {
        if (data.intersections.Count == 0)
        {
            curveIndex = 0;
            return new string[] { "" };
        }

        if (data.intersections[index].getJoint().Equals(data.jointPointA))
        {
            List<string> options = new List<string>();
            if (data.intersections[index].getPath(0) == null)
                options.Add("Curve AB large radius");
            if (data.intersections[index].getPath(1) == null)
                options.Add("Curve AB small radius");
            if (data.intersections[index].getPath(2) == null)
                options.Add("Curve AC small radius");
            if (data.intersections[index].getPath(3) == null)
                options.Add("Curve AC large radius");

            curveOptions = options.ToArray();
            if (data.intersections[index].getPath(0) == null && data.intersections[index].getPath(1) == null && data.intersections[index].getPath(2) == null && data.intersections[index].getPath(3) == null)
                curveOptions = new string[4] { "Curve AB small radius", "Curve AB large radius", "Curve AC small radius", "Curve AC large radius" };
        }
        if (data.intersections[index].getJoint().Equals(data.jointPointB))
        {
            List<string> options = new List<string>();
            if (data.intersections[index].getPath(0) == null)
                options.Add("Curve BC large radius");
            if (data.intersections[index].getPath(1) == null)
                options.Add("Curve BC small radius");
            if (data.intersections[index].getPath(2) == null)
                options.Add("Curve AB small radius");
            if (data.intersections[index].getPath(3) == null)
                options.Add("Curve AB large radius");

            curveOptions = options.ToArray();
            if (data.intersections[index].getPath(0) == null && data.intersections[index].getPath(1) == null && data.intersections[index].getPath(2) == null && data.intersections[index].getPath(3) == null)
                curveOptions = new string[4] { "Curve AB small radius", "Curve AB large radius", "Curve BC small radius", "Curve BC large radius" };
        }
        if (data.intersections[index].getJoint().Equals(data.jointPointC))
        {
            List<string> options = new List<string>();
            if (data.intersections[index].getPath(0) == null)
                options.Add("Curve AC large radius");
            if (data.intersections[index].getPath(1) == null)
                options.Add("Curve AC small radius");
            if (data.intersections[index].getPath(2) == null)
                options.Add("Curve BC small radius");
            if (data.intersections[index].getPath(3) == null)
                options.Add("Curve BC large radius");

            curveOptions = options.ToArray();
            if (data.intersections[index].getPath(0) == null && data.intersections[index].getPath(1) == null && data.intersections[index].getPath(2) == null && data.intersections[index].getPath(3) == null)
                curveOptions = new string[4] { "Curve AC small radius", "Curve AC large radius", "Curve BC small radius", "Curve BC large radius" };
        }

        return curveOptions;
    }

    /*
     * Returns the curve object according to the chosen index.
     * */
    private Curve getCurve(int curveIndex, int intersectionIndex)
    {
        string chosenCurveName = curveOptions[curveIndex];

        if (chosenCurveName == "Curve AB large radius")
            return data.curveABlargeRadius;
        if (chosenCurveName == "Curve AB small radius")
            return data.curveABsmallRadius;
        if (chosenCurveName == "Curve AC large radius")
            return data.curveAClargeRadius;
        if (chosenCurveName == "Curve AC small radius")
            return data.curveACsmallRadius;
        if (chosenCurveName == "Curve BC large radius")
            return data.curveBClargeRadius;
        if (chosenCurveName == "Curve BC small radius")
            return data.curveBCsmallRadius;

        return data.curveABsmallRadius;
    }

    void OnFocus()
    {
        // Remove and re-add the listener to make sure there is always one attached
        SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
        SceneView.onSceneGUIDelegate += this.OnSceneGUI;
    }

    void OnDestroy()
    {
        // Remove the listener to stop drawing
        SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
    }

    /*
     * Draws all joint points, curves, paths, and intersections to the scene view.
     * */
    void OnSceneGUI(SceneView sceneView)
    {
        if (data == null)
            return;
        if (data.jointPointA == null)
            return;
        if (data.jointPointB == null)
            return;
        if (data.jointPointC == null)
            return;

        GUIStyle style = new GUIStyle();
        style.normal.textColor = Color.black;

        // Real world joint points
        if (showJoints)
        {
            Handles.color = Color.red;
            Handles.SphereCap(0, data.jointPointA.getPosition(), Quaternion.identity, 0.2f);
            Handles.Label(data.jointPointA.getPosition(), data.jointPointA.getLabel(), style);
            Handles.SphereCap(0, data.jointPointA.getWalkingStartPosition(0), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointA.getWalkingStartPosition(1), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointA.getWalkingStartPosition(2), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointA.getWalkingStartPosition(3), Quaternion.identity, 0.1f);

            Handles.SphereCap(0, data.jointPointB.getPosition(), Quaternion.identity, 0.2f);
            Handles.Label(data.jointPointB.getPosition(), data.jointPointB.getLabel(), style);
            Handles.SphereCap(0, data.jointPointB.getWalkingStartPosition(0), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointB.getWalkingStartPosition(1), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointB.getWalkingStartPosition(2), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointB.getWalkingStartPosition(3), Quaternion.identity, 0.1f);

            Handles.SphereCap(0, data.jointPointC.getPosition(), Quaternion.identity, 0.2f);
            Handles.Label(data.jointPointC.getPosition(), data.jointPointC.getLabel(), style);
            Handles.SphereCap(0, data.jointPointC.getWalkingStartPosition(0), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointC.getWalkingStartPosition(1), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointC.getWalkingStartPosition(2), Quaternion.identity, 0.1f);
            Handles.SphereCap(0, data.jointPointC.getWalkingStartPosition(3), Quaternion.identity, 0.1f);
        }

        // Real world curves
        if (showCurves)
        {
            Handles.color = Color.red;

			Vector3 directionVector = data.jointPointB.getWalkingStartPosition(2) - data.curveABsmallRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveABsmallRadius.getCircleCenter(), Vector3.up, directionVector, data.curveABsmallRadius.getAngle(), data.curveABsmallRadius.getRadius());

			directionVector = data.jointPointB.getWalkingStartPosition(3) - data.curveABlargeRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveABlargeRadius.getCircleCenter(), Vector3.up, directionVector, data.curveABlargeRadius.getAngle(), data.curveABlargeRadius.getRadius());

			directionVector = data.jointPointC.getWalkingStartPosition(2) - data.curveBCsmallRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveBCsmallRadius.getCircleCenter(), Vector3.up, directionVector, data.curveBCsmallRadius.getAngle(), data.curveBCsmallRadius.getRadius());

			directionVector = data.jointPointC.getWalkingStartPosition(3) - data.curveBClargeRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveBClargeRadius.getCircleCenter(), Vector3.up, directionVector, data.curveBClargeRadius.getAngle(), data.curveBClargeRadius.getRadius());

			directionVector = data.jointPointA.getWalkingStartPosition(2) - data.curveACsmallRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveACsmallRadius.getCircleCenter(), Vector3.up, directionVector, data.curveACsmallRadius.getAngle(), data.curveACsmallRadius.getRadius());

			directionVector = data.jointPointA.getWalkingStartPosition(3) - data.curveAClargeRadius.getCircleCenter();
            Handles.DrawWireArc(data.curveAClargeRadius.getCircleCenter(), Vector3.up, directionVector, data.curveAClargeRadius.getAngle(), data.curveAClargeRadius.getRadius());
        }

        // Virtual world intersections
        if (showIntersections)
        {
            Handles.color = Color.green;
            foreach (VirtualIntersection intersection in data.intersections)
            {
                // Change color for currently chosen intersection
                if (intersection.Equals(data.intersections[intersectionIndex]))
                    Handles.color = Color.yellow;
                else
                    Handles.color = Color.green;

                Handles.SphereCap(0, intersection.getPosition(), Quaternion.identity, 0.2f);
                Handles.Label(intersection.getPosition(), intersection.getLabel(), style);
                Handles.SphereCap(0, intersection.getWalkingStartPosition(0), Quaternion.identity, 0.1f);
                Handles.SphereCap(0, intersection.getWalkingStartPosition(1), Quaternion.identity, 0.1f);
                Handles.SphereCap(0, intersection.getWalkingStartPosition(2), Quaternion.identity, 0.1f);
                Handles.SphereCap(0, intersection.getWalkingStartPosition(3), Quaternion.identity, 0.1f);
            }
        }

        // Virtual world paths
        if (showPaths)
        {
            foreach (VirtualPath path in data.paths)
            {
                int sign = data.getSignOfCurve(path.getEndPoints()[0].getJoint(), path.getEndPoints()[1].getJoint());
                int pathIndex = data.getPathIndex(path.getEndPoints()[0].getJoint(), path.getCurve());

                Handles.color = Color.green;
                Vector3 directionVector = path.getEndPoints()[0].getWalkingStartPosition(pathIndex) - path.getCircleCenter();
                Handles.DrawWireArc(path.getCircleCenter(), Vector3.up, directionVector, sign * path.getAngle(), path.getRadius());
            }
        }

        Handles.BeginGUI();
        // GUI stuff comes here
        Handles.EndGUI();
    }
}


text:
CKEDITOR.dialog.add("checkbox", function (d) {
    return{title: d.lang.forms.checkboxAndRadio.checkboxTitle, minWidth: 350, minHeight: 140, onShow: function () {
        delete this.checkbox;
        var a = this.getParentEditor().getSelection().getSelectedElement();
        a && "checkbox" == a.getAttribute("type") && (this.checkbox = a, this.setupContent(a))
    }, onOk: function () {
        var a, b = this.checkbox;
        b || (a = this.getParentEditor(), b = a.document.createElement("input"), b.setAttribute("type", "checkbox"), a.insertElement(b));
        this.commitContent({element: b})
    }, contents: [
        {id: "info",
            label: d.lang.forms.checkboxAndRadio.checkboxTitle, title: d.lang.forms.checkboxAndRadio.checkboxTitle, startupFocus: "txtName", elements: [
            {id: "txtName", type: "text", label: d.lang.common.name, "default": "", accessKey: "N", setup: function (a) {
                this.setValue(a.data("cke-saved-name") || a.getAttribute("name") || "")
            }, commit: function (a) {
                a = a.element;
                this.getValue() ? a.data("cke-saved-name", this.getValue()) : (a.data("cke-saved-name", !1), a.removeAttribute("name"))
            }},
            {id: "txtValue", type: "text", label: d.lang.forms.checkboxAndRadio.value,
                "default": "", accessKey: "V", setup: function (a) {
                a = a.getAttribute("value");
                this.setValue(CKEDITOR.env.ie && "on" == a ? "" : a)
            }, commit: function (a) {
                var b = a.element, c = this.getValue();
                c && !(CKEDITOR.env.ie && "on" == c) ? b.setAttribute("value", c) : CKEDITOR.env.ie ? (c = new CKEDITOR.dom.element("input", b.getDocument()), b.copyAttributes(c, {value: 1}), c.replace(b), d.getSelection().selectElement(c), a.element = c) : b.removeAttribute("value")
            }},
            {id: "cmbSelected", type: "checkbox", label: d.lang.forms.checkboxAndRadio.selected, "default": "",
                accessKey: "S", value: "checked", setup: function (a) {
                this.setValue(a.getAttribute("checked"))
            }, commit: function (a) {
                var b = a.element;
                if (CKEDITOR.env.ie) {
                    var c = !!b.getAttribute("checked"), e = !!this.getValue();
                    c != e && (c = CKEDITOR.dom.element.createFromHtml('<input type="checkbox"' + (e ? ' checked="checked"' : "") + "/>", d.document), b.copyAttributes(c, {type: 1, checked: 1}), c.replace(b), d.getSelection().selectElement(c), a.element = c)
                } else this.getValue() ? b.setAttribute("checked", "checked") : b.removeAttribute("checked")
            }}
        ]}
    ]}
});


text:
package org.apache.hadoop.hbase;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.Iterator;
import java.util.Optional;
import org.apache.hadoop.hbase.util.ByteBufferUtils;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.ClassSize;
import org.apache.yetus.audience.InterfaceAudience;

/**
 * This is a key only Cell implementation which is identical to {@link KeyValue.KeyOnlyKeyValue}
 * with respect to key serialization but have its data in the form of Byte buffer
 * (onheap and offheap).
 */
@InterfaceAudience.Private
public class ByteBufferKeyOnlyKeyValue extends ByteBufferExtendedCell {
  public static final int FIXED_OVERHEAD = ClassSize.OBJECT + ClassSize.REFERENCE
      + (2 * Bytes.SIZEOF_INT) + Bytes.SIZEOF_SHORT;
  private ByteBuffer buf;
  private int offset = 0; // offset into buffer where key starts at
  private int length = 0; // length of this.
  private short rowLen;

  /**
   * Used in cases where we want to avoid lot of garbage by allocating new objects with different
   * keys. Use the emtpy construtor and set the keys using {@link #setKey(ByteBuffer, int, int)}
   */
  public ByteBufferKeyOnlyKeyValue() {
  }

  public ByteBufferKeyOnlyKeyValue(ByteBuffer buf, int offset, int length) {
    setKey(buf, offset, length);
  }

  /**
   * A setter that helps to avoid object creation every time and whenever
   * there is a need to create new OffheapKeyOnlyKeyValue.
   * @param key
   * @param offset
   * @param length
   */
  public void setKey(ByteBuffer key, int offset, int length) {
    this.buf = key;
    this.offset = offset;
    this.length = length;
    this.rowLen = ByteBufferUtils.toShort(this.buf, this.offset);
  }

  @Override
  public byte[] getRowArray() {
    if (this.buf.hasArray()) {
      return this.buf.array();
    }
    return CellUtil.cloneRow(this);
  }

  @Override
  public int getRowOffset() {
    if (this.buf.hasArray()) {
      return getRowPosition() + this.buf.arrayOffset();
    }
    return 0;
  }

  @Override
  public short getRowLength() {
    return this.rowLen;
  }

  @Override
  public byte[] getFamilyArray() {
    if (this.buf.hasArray()) {
      return this.buf.array();
    }
    return CellUtil.cloneFamily(this);
  }

  @Override
  public int getFamilyOffset() {
    if (this.buf.hasArray()) {
      return getFamilyPosition() + this.buf.arrayOffset();
    }
    return 0;
  }

  @Override
  public byte getFamilyLength() {
    return getFamilyLength(getFamilyLengthPosition());
  }

  private byte getFamilyLength(int famLenPos) {
    return ByteBufferUtils.toByte(this.buf, famLenPos);
  }

  @Override
  public byte[] getQualifierArray() {
    if (this.buf.hasArray()) {
      return this.buf.array();
    }
    return CellUtil.cloneQualifier(this);
  }

  @Override
  public int getQualifierOffset() {
    if (this.buf.hasArray()) {
      return getQualifierPosition() + this.buf.arrayOffset();
    }
    return 0;
  }

  @Override
  public int getQualifierLength() {
    return getQualifierLength(getRowLength(), getFamilyLength());
  }

  private int getQualifierLength(int rlength, int flength) {
    return this.length - (int) KeyValue.getKeyDataStructureSize(rlength, flength, 0);
  }

  @Override
  public long getTimestamp() {
    return ByteBufferUtils.toLong(this.buf, getTimestampOffset());
  }

  private int getTimestampOffset() {
    return this.offset + this.length - KeyValue.TIMESTAMP_TYPE_SIZE;
  }

  @Override
  public byte getTypeByte() {
    return ByteBufferUtils.toByte(this.buf, this.offset + this.length - 1);
  }

  @Override
  public void setSequenceId(long seqId) throws IOException {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public void setTimestamp(long ts) throws IOException {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public void setTimestamp(byte[] ts) throws IOException {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public long getSequenceId() {
    return 0;
  }

  @Override
  public byte[] getValueArray() {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public int getValueOffset() {
    return 0;
  }

  @Override
  public int getValueLength() {
    return 0;
  }

  @Override
  public byte[] getTagsArray() {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public int getTagsOffset() {
    return 0;
  }

  @Override
  public int getTagsLength() {
    return 0;
  }

  @Override
  public ByteBuffer getRowByteBuffer() {
    return this.buf;
  }

  @Override
  public int getRowPosition() {
    return this.offset + Bytes.SIZEOF_SHORT;
  }

  @Override
  public ByteBuffer getFamilyByteBuffer() {
    return this.buf;
  }

  @Override
  public int getFamilyPosition() {
    return getFamilyLengthPosition() + Bytes.SIZEOF_BYTE;
  }

  // The position in BB where the family length is added.
  private int getFamilyLengthPosition() {
    return this.offset + Bytes.SIZEOF_SHORT + getRowLength();
  }

  @Override
  public ByteBuffer getQualifierByteBuffer() {
    return this.buf;
  }

  @Override
  public int getQualifierPosition() {
    int famLenPos = getFamilyLengthPosition();
    return famLenPos + Bytes.SIZEOF_BYTE + getFamilyLength(famLenPos);
  }

  @Override
  public ByteBuffer getValueByteBuffer() {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public int getValuePosition() {
    return 0;
  }

  @Override
  public ByteBuffer getTagsByteBuffer() {
    throw new IllegalArgumentException("This is a key only Cell");
  }

  @Override
  public int getTagsPosition() {
    return 0;
  }

  @Override
  public String toString() {
    return CellUtil.toString(this, false);
  }

  @Override
  public Iterator<Tag> getTags() {
    return Collections.emptyIterator();
  }

  @Override
  public Optional<Tag> getTag(byte type) {
    return Optional.empty();
  }

  @Override
  public long heapSize() {
    if (this.buf.hasArray()) {
      return ClassSize.align(FIXED_OVERHEAD + length);
    }
    return ClassSize.align(FIXED_OVERHEAD);
  }
}


text:
var express = require("express");
var nodemailer = require("nodemailer");
var settings = require("./settings");
var util = require("util");

var app = express.createServer(express.logger());

var smtp_transport = nodemailer.createTransport("SMTP", {
  service: "Gmail",
  auth: {
    user: settings.smtp_user,
    pass: settings.smtp_pass
  }
});

function check_commit(req, res) {
  var forced;
  var payload;
  var mail_opts = {
    from: settings.smtp_user,
    to: settings.recipients
  };

  res.send("Cool story, bro.");

  if (!req.body || !req.body.payload) {
    console.log("No request payload.");
    return;
  }

  payload = JSON.parse(req.body.payload);
  console.log(payload);

  if (!payload) {
    console.log("No payload or error parsing it.");
    return;
  }
  if (!payload.forced) {
    console.log("Push wasn't forced.");
    return;
  }
  if (settings.watch_refs.indexOf(payload.ref) === -1) {
    console.log("Push was forced, but ref", payload.ref, "isn't on the list.");
    return;
  }

  console.log(payload.pusher.name, "forced a push to", payload.ref);

  mail_opts.subject = util.format("%s: %s forced a push to %s",
    payload.repository.name, payload.pusher.name, payload.ref
  );
  mail_opts.text = util.format(
    "User %s forced a push to ref %s in repo %s.\nHead is now at %s from %s.\nCompare %s",
    payload.pusher.name, payload.ref, payload.repository.name, payload.head_commit.url,
    payload.head_commit.timestamp, payload.compare
  );

  smtp_transport.sendMail(mail_opts, function(error, response) {
    if (error) {
      console.log(error);
    }
    else{
      console.log("Message sent:", response.message);
    }
  });
}

app.use(express.bodyParser());
app.post("/", check_commit);

console.log("Listening on port", settings.port);
app.listen(settings.port);


text:
{% extends "base.html" %}

{% block content %}

Novo usuário

Agora o novo usuário deve concluir o cadastro através do link abaixo. Envie este link pra ele!

            {{ host }}{{ registration_token.url }}

            Voltar ao menu principal

{% endblock %}


text:
<?php

namespace dokuwiki\Input;

/**
 * Encapsulates access to the $_REQUEST array, making sure used parameters are initialized and
 * have the correct type.
 *
 * All function access the $_REQUEST array by default, if you want to access $_POST or $_GET
 * explicitly use the $post and $get members.
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
class Input
{

    /** @var Post Access $_POST parameters */
    public $post;
    /** @var Get Access $_GET parameters */
    public $get;
    /** @var Server Access $_SERVER parameters */
    public $server;

    protected $access;

    /**
     * @var Callable
     */
    protected $filter;

    /**
     * Intilizes the dokuwiki\Input\Input class and it subcomponents
     */
    public function __construct()
    {
        $this->access = &$_REQUEST;
        $this->post = new Post();
        $this->get = new Get();
        $this->server = new Server();
    }

    /**
     * Apply the set filter to the given value
     *
     * @param string $data
     * @return string
     */
    protected function applyfilter($data)
    {
        if (!$this->filter) return $data;
        return call_user_func($this->filter, $data);
    }

    /**
     * Return a filtered copy of the input object
     *
     * Expects a callable that accepts one string parameter and returns a filtered string
     *
     * @param Callable|string $filter
     * @return Input
     */
    public function filter($filter = 'stripctl')
    {
        $this->filter = $filter;
        $clone = clone $this;
        $this->filter = '';
        return $clone;
    }

    /**
     * Check if a parameter was set
     *
     * Basically a wrapper around isset. When called on the $post and $get subclasses,
     * the parameter is set to $_POST or $_GET and to $_REQUEST
     *
     * @see isset
     * @param string $name Parameter name
     * @return bool
     */
    public function has($name)
    {
        return isset($this->access[$name]);
    }

    /**
     * Remove a parameter from the superglobals
     *
     * Basically a wrapper around unset. When NOT called on the $post and $get subclasses,
     * the parameter will also be removed from $_POST or $_GET
     *
     * @see isset
     * @param string $name Parameter name
     */
    public function remove($name)
    {
        if (isset($this->access[$name])) {
            unset($this->access[$name]);
        }
        // also remove from sub classes
        if (isset($this->post) && isset($_POST[$name])) {
            unset($_POST[$name]);
        }
        if (isset($this->get) && isset($_GET[$name])) {
            unset($_GET[$name]);
        }
    }

    /**
     * Access a request parameter without any type conversion
     *
     * @param string $name Parameter name
     * @param mixed $default Default to return if parameter isn't set
     * @param bool $nonempty Return $default if parameter is set but empty()
     * @return mixed
     */
    public function param($name, $default = null, $nonempty = false)
    {
        if (!isset($this->access[$name])) return $default;
        $value = $this->applyfilter($this->access[$name]);
        if ($nonempty && empty($value)) return $default;
        return $value;
    }

    /**
     * Sets a parameter
     *
     * @param string $name Parameter name
     * @param mixed $value Value to set
     */
    public function set($name, $value)
    {
        $this->access[$name] = $value;
    }

    /**
     * Get a reference to a request parameter
     *
     * This avoids copying data in memory, when the parameter is not set it will be created
     * and intialized with the given $default value before a reference is returned
     *
     * @param string $name Parameter name
     * @param mixed $default If parameter is not set, initialize with this value
     * @param bool $nonempty Init with $default if parameter is set but empty()
     * @return mixed (reference)
     */
    public function &ref($name, $default = '', $nonempty = false)
    {
        if (!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) {
            $this->set($name, $default);
        }

        return $this->access[$name];
    }

    /**
     * Access a request parameter as int
     *
     * @param string $name Parameter name
     * @param int $default Default to return if parameter isn't set or is an array
     * @param bool $nonempty Return $default if parameter is set but empty()
     * @return int
     */
    public function int($name, $default = 0, $nonempty = false)
    {
        if (!isset($this->access[$name])) return $default;
        if (is_array($this->access[$name])) return $default;
        $value = $this->applyfilter($this->access[$name]);
        if ($value === '') return $default;
        if ($nonempty && empty($value)) return $default;

        return (int)$value;
    }

    /**
     * Access a request parameter as string
     *
     * @param string $name Parameter name
     * @param string $default Default to return if parameter isn't set or is an array
     * @param bool $nonempty Return $default if parameter is set but empty()
     * @return string
     */
    public function str($name, $default = '', $nonempty = false)
    {
        if (!isset($this->access[$name])) return $default;
        if (is_array($this->access[$name])) return $default;
        $value = $this->applyfilter($this->access[$name]);
        if ($nonempty && empty($value)) return $default;

        return (string)$value;
    }

    /**
     * Access a request parameter and make sure it is has a valid value
     *
     * Please note that comparisons to the valid values are not done typesafe (request vars
     * are always strings) however the function will return the correct type from the $valids
     * array when an match was found.
     *
     * @param string $name Parameter name
     * @param array $valids Array of valid values
     * @param mixed $default Default to return if parameter isn't set or not valid
     * @return null|mixed
     */
    public function valid($name, $valids, $default = null)
    {
        if (!isset($this->access[$name])) return $default;
        if (is_array($this->access[$name])) return $default; // we don't allow arrays
        $value = $this->applyfilter($this->access[$name]);
        $found = array_search($value, $valids);
        if ($found !== false) return $valids[$found]; // return the valid value for type safety
        return $default;
    }

    /**
     * Access a request parameter as bool
     *
     * Note: $nonempty is here for interface consistency and makes not much sense for booleans
     *
     * @param string $name Parameter name
     * @param mixed $default Default to return if parameter isn't set
     * @param bool $nonempty Return $default if parameter is set but empty()
     * @return bool
     */
    public function bool($name, $default = false, $nonempty = false)
    {
        if (!isset($this->access[$name])) return $default;
        if (is_array($this->access[$name])) return $default;
        $value = $this->applyfilter($this->access[$name]);
        if ($value === '') return $default;
        if ($nonempty && empty($value)) return $default;

        return (bool)$value;
    }

    /**
     * Access a request parameter as array
     *
     * @param string $name Parameter name
     * @param mixed $default Default to return if parameter isn't set
     * @param bool $nonempty Return $default if parameter is set but empty()
     * @return array
     */
    public function arr($name, $default = array(), $nonempty = false)
    {
        if (!isset($this->access[$name])) return $default;
        if (!is_array($this->access[$name])) return $default;
        if ($nonempty && empty($this->access[$name])) return $default;

        return (array)$this->access[$name];
    }

    /**
     * Create a simple key from an array key
     *
     * This is useful to access keys where the information is given as an array key or as a single array value.
     * For example when the information was submitted as the name of a submit button.
     *
     * This function directly changes the access array.
     *
     * Eg. $_REQUEST['do']['save']='Speichern' becomes $_REQUEST['do'] = 'save'
     *
     * This function returns the $INPUT object itself for easy chaining
     *
     * @param string $name
     * @return Input
     */
    public function extract($name)
    {
        if (!isset($this->access[$name])) return $this;
        if (!is_array($this->access[$name])) return $this;
        $keys = array_keys($this->access[$name]);
        if (!$keys) {
            // this was an empty array
            $this->remove($name);
            return $this;
        }
        // get the first key
        $value = array_shift($keys);
        if ($value === 0) {
            // we had a numeric array, assume the value is not in the key
            $value = array_shift($this->access[$name]);
        }

        $this->set($name, $value);
        return $this;
    }
}


text:
layout: page
title: "Ashley Meghan Chrzanowski"
comments: true
description: "blanks"
keywords: "Ashley Meghan Chrzanowski,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: School of Education

**Classes taught**: EDUC 5595

#### EDUC 5595: Practicum in Linguistically Different: English as a Second Language

**Terms taught**: Spring 2016

**Instructor rating**: 5.4

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.78

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 5.8

**Standard deviation in workload** (raw): 0.0


text:
'use strict'

const path = require('path')
const {S3} = require('aws-sdk')
const multer = require('multer')
const fs = require('fs-extra')
const s3 = new S3()
const upload = multer({dest: `${__dirname}/../temp-assets`})

module.exports = (fieldName) => (req, res, next) => {

  upload.single(fieldName)(req, res, (err) => {
    if(err) {
      return next(err)
    }
    if(!req.file)
      return next()
    s3.upload({
      ACL: 'public-read',
      Bucket: process.env.AWS_BUCKET,
      Key: `${req.file.filename}${path.extname(req.file.originalname)}`,
      Body: fs.createReadStream(req.file.path),
    })
      .promise()
      .then(s3Data => {
        req.s3Data = s3Data
        return fs.remove(req.file.path)
      })
      .then(() => next())
      .catch(next)
  })
}


text:
<?php

namespace MusicBrainz\Relation\Type\Label\Url\OnlineData\SocialNetwork;

use MusicBrainz\Relation\Type\Label\Url\OnlineData\SocialNetwork;
use MusicBrainz\Value\Name;

/**
 * This relationship type links a label to its Myspace page.
 *
 * @see  https://myspace.com
 * @link https://musicbrainz.org/relationship/240ba9dc-9898-4505-9bf7-32a53a695612
 */
class Myspace extends SocialNetwork
{
    /**
     * Returns the name of the relation.
     *
     * @return Name
     */
    public static function getRelationName(): Name
    {
        return new Name('myspace');
    }
}


text:
static NSString *VCRURLSessionErrorCodeKey = @"code";
static NSString *VCRURLSessionErrorDomainKey = @"domain";
static NSString *VCRURLSessionErrorUserInfoKey = @"userInfo";

@implementation NSError (VCRURLSession)

- (instancetype)VCRURLSession_initWithDictionary:(NSDictionary *)dictionary
{
    NSDictionary *userInfo;
    if (dictionary[VCRURLSessionErrorUserInfoKey]) {
        NSData *userInfoData = [[NSData alloc] initWithBase64EncodedString:dictionary[VCRURLSessionErrorUserInfoKey] options:0];
        userInfo = [NSKeyedUnarchiver unarchiveObjectWithData:userInfoData];
    }
    return [NSError errorWithDomain:dictionary[VCRURLSessionErrorDomainKey] code:[dictionary[VCRURLSessionErrorCodeKey] integerValue] userInfo:userInfo];
}

- (NSDictionary *)VCRURLSession_dictionaryValue
{
    return @{
        VCRURLSessionErrorCodeKey : @(self.code),
        VCRURLSessionErrorDomainKey : self.domain,
        VCRURLSessionErrorUserInfoKey : [[NSKeyedArchiver archivedDataWithRootObject:self.userInfo] base64EncodedStringWithOptions:0],
    };
}

@end

#endif


text:
<?php
/**
 * Loop Add to Cart
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.1.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $product;

echo apply_filters( 'woocommerce_loop_add_to_cart_link',
	sprintf( '%s',
		esc_url( $product->add_to_cart_url() ),
		esc_attr( $product->id ),
		esc_attr( $product->get_sku() ),
		$product->is_purchasable() ? 'add_to_cart_button' : '',
		esc_attr( $product->product_type ),
		esc_html( $product->add_to_cart_text() )
	),
$product );


text:
lib = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)

require 'config'
require 'active_model'
require 'active_support/core_ext/string/access'
require 'mass_assignment_with_multiple_roles'
require 'active_model/mass_assignment_security/permission_set'
require 'active_model/mass_assignment_security/sanitizer'

# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true

require 'test/unit'


text:
package org.teavm.flavour.expr.type;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

public final class TypeUtils {
    public static final GenericClass BOOLEAN_CLASS = new GenericClass("java.lang.Boolean");
    public static final GenericClass CHARACTER_CLASS = new GenericClass("java.lang.Character");
    public static final GenericClass BYTE_CLASS = new GenericClass("java.lang.Byte");
    public static final GenericClass SHORT_CLASS = new GenericClass("java.lang.Short");
    public static final GenericClass INTEGER_CLASS = new GenericClass("java.lang.Integer");
    public static final GenericClass LONG_CLASS = new GenericClass("java.lang.Long");
    public static final GenericClass FLOAT_CLASS = new GenericClass("java.lang.Float");
    public static final GenericClass DOUBLE_CLASS = new GenericClass("java.lang.Double");
    public static final GenericClass STRING_CLASS = new GenericClass("java.lang.String");

    static final Map<Primitive, GenericClass> primitivesToWrappers = new HashMap<>();
    static final Map<GenericClass, Primitive> wrappersToPrimitives = new HashMap<>();

    private TypeUtils() {
    }

    static {
        primitiveAndWrapper(Primitive.BOOLEAN, BOOLEAN_CLASS);
        primitiveAndWrapper(Primitive.CHAR, CHARACTER_CLASS);
        primitiveAndWrapper(Primitive.BYTE, BYTE_CLASS);
        primitiveAndWrapper(Primitive.SHORT, SHORT_CLASS);
        primitiveAndWrapper(Primitive.INT, INTEGER_CLASS);
        primitiveAndWrapper(Primitive.LONG, LONG_CLASS);
        primitiveAndWrapper(Primitive.FLOAT, FLOAT_CLASS);
        primitiveAndWrapper(Primitive.DOUBLE, DOUBLE_CLASS);
    }

    private static void primitiveAndWrapper(Primitive primitive, GenericClass wrapper) {
        primitivesToWrappers.put(primitive, wrapper);
        wrappersToPrimitives.put(wrapper, primitive);
    }

    public static ValueType tryUnbox(GenericType type) {
        if (type instanceof GenericReference) {
            TypeVar v = ((GenericReference) type).getVar();
            return v.getLowerBound().stream()
                    .map(wrappersToPrimitives::get)
                    .filter(Objects::nonNull)
                    .findFirst()
                    .orElse(null);
        }
        return wrappersToPrimitives.get(type);
    }

    public static Primitive unbox(GenericType type) {
        ValueType result = tryUnbox(type);
        return result instanceof Primitive ? (Primitive) result : null;
    }

    public static ValueType tryBox(ValueType type) {
        GenericClass wrapper = primitivesToWrappers.get(type);
        if (wrapper == null) {
            return type;
        }
        return wrapper;
    }

    public static GenericClass box(ValueType type) {
        ValueType result = tryBox(type);
        return result != type ? (GenericClass) result : null;
    }

    public static boolean isPrimitiveSubType(Primitive subtype, Primitive supertype) {
        if (subtype == supertype) {
            return true;
        }
        switch (supertype.getKind()) {
            case DOUBLE:
                switch (subtype.getKind()) {
                    case FLOAT:
                    case LONG:
                    case INT:
                    case CHAR:
                    case SHORT:
                    case BYTE:
                        return true;
                    default:
                        return false;
                }
            case FLOAT:
                switch (subtype.getKind()) {
                    case LONG:
                    case INT:
                    case CHAR:
                    case SHORT:
                    case BYTE:
                        return true;
                    default:
                        return false;
                }
            case LONG:
                switch (subtype.getKind()) {
                    case INT:
                    case CHAR:
                    case SHORT:
                    case BYTE:
                        return true;
                    default:
                        return false;
                }
            case INT:
                switch (subtype.getKind()) {
                    case CHAR:
                    case SHORT:
                    case BYTE:
                        return true;
                    default:
                        return false;
                }
            case SHORT:
                return subtype.getKind() == PrimitiveKind.BYTE;
            default:
                return false;
        }
    }

    public static MethodWithFreshTypeVars withFreshTypeVars(GenericMethod method, TypeInference inference) {
        TypeVar[] params = method.getDescriber().getTypeVariables();
        if (params.length == 0) {
            return new MethodWithFreshTypeVars(method, params);
        }

        Map<TypeVar, GenericType> substitutionMap = new HashMap<>();
        TypeVar[] freshVars = new TypeVar[params.length];
        for (int i = 0; i < params.length; ++i) {
            TypeVar freshVar = new TypeVar(params[i].getName());
            substitutionMap.put(params[i], new GenericReference(freshVar));
            freshVars[i] = freshVar;
        }
        Substitutions substitution = new MapSubstitutions(substitutionMap);

        method = method.substitute(substitution);

        for (int i = 0; i < params.length; ++i) {
            TypeVar param = params[i];
            TypeVar freshVar = freshVars[i];
            if (!param.getLowerBound().isEmpty()) {
                freshVar.withLowerBound(param.getLowerBound().stream()
                        .map(bound -> bound.substitute(substitution))
                        .toArray(GenericType[]::new));
            } else {
                freshVar.withUpperBound(param.getUpperBound().stream()
                        .map(bound -> bound.substitute(substitution))
                        .toArray(GenericType[]::new));
            }
        }

        if (!inference.addVariables(Arrays.asList(freshVars))) {
            return null;
        }

        return new MethodWithFreshTypeVars(method, freshVars);
    }
}


text:
package voyager.nove.model.utente.competenze;

/**
 * @name AbstractCompetenza
 *
 * @project Voyager
 *
 * @package voyager.nove.model.utente.competenze
 *
 * @author Giacomo Marciani, Jesus Cevallos, Ilyas Aboki, Ludovic William
 *
 */
public abstract class AbstractCompetenza implements Competenza {

	private static final long serialVersionUID = 1L;

	private int ID;
	private String STRING = new String();
	private String COMPACT_STRING = new String();

	protected AbstractCompetenza(int id, String string) {
		this.ID = id;
		this.STRING = string;
		this.COMPACT_STRING = string.replaceAll("\\s","");
	}

	@Override
	public int getId() {
		return ID;
	}

	@Override
	public String asString() {
		return STRING;
	}

	@Override
	public String asCompactString() {
		return COMPACT_STRING;
	}

}


text:
using content::BrowserThread;

namespace gdata {

GDataContactsServiceStub::GDataContactsServiceStub()
    : download_should_succeed_(true) {
}

GDataContactsServiceStub::~GDataContactsServiceStub() {
}

void GDataContactsServiceStub::SetContacts(
    const contacts::ContactPointers& contacts,
    const base::Time& expected_min_update_time) {
  contacts::test::CopyContacts(contacts, &contacts_);
  expected_min_update_time_ = expected_min_update_time;
}

void GDataContactsServiceStub::Initialize() {
}

void GDataContactsServiceStub::DownloadContacts(
    SuccessCallback success_callback,
    FailureCallback failure_callback,
    const base::Time& min_update_time) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  if (!download_should_succeed_) {
    failure_callback.Run();
    return;
  }

  if (min_update_time != expected_min_update_time_) {
    LOG(ERROR) << "Actual minimum update time ("
               << util::FormatTimeAsString(min_update_time) << ") "
               << "differed from expected ("
               << util::FormatTimeAsString(expected_min_update_time_)
               << "); not returning any contacts";
    failure_callback.Run();
    return;
  }

  scoped_ptr<ScopedVector<contacts::Contact> > contacts(
      new ScopedVector<contacts::Contact>());
  contacts::test::CopyContacts(contacts_, contacts.get());
  success_callback.Run(contacts.Pass());
}

}  // namespace contacts


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.
/*
* Sams code V1;
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.can.CANTimeoutException;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends IterativeRobot {

    private CANJaguar frontLeftJag;
    private CANJaguar backLeftJag;
    private CANJaguar frontRightJag;
    private CANJaguar backRightJag;
    private RobotDrive myDrive;

    private Joystick driveStick;

    public void robotInit() {
        try {
            frontLeftJag = new CANJaguar(1);
            backLeftJag = new CANJaguar(2);
            frontRightJag = new CANJaguar(3);
            backRightJag = new CANJaguar(4);

        } catch (CANTimeoutException ex) {
            ex.printStackTrace();

        }
        driveStick = new Joystick(1);
       myDrive = new RobotDrive(frontLeftJag,backLeftJag,frontRightJag,backRightJag);

    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
       drive();
    }
    // Drive and Joystick section *****************************
    private void drive()
    {
        double magnitude = applyMagnitudeSquared(applyMagnitudeDeadband(driveStick.getMagnitude()));
        double direction = driveStick.getDirectionDegrees();
        double rotation = applyRotationalDeadband(driveStick.getTwist());

        myDrive.mecanumDrive_Polar(magnitude, direction, rotation);
    }
    // squares driveStick magnitude

      private double applyMagnitudeSquared(double magnitude) {
        return magnitude * magnitude;
    }

    // joystick Deadbands*****************************

    double applyMagnitudeDeadband(double magnitude)
    {
        double newMagnitude = magnitude;
        if (newMagnitude > .05)
        {
            newMagnitude = newMagnitude -.05;
        }
        else if(newMagnitude > 1)
        {
           newMagnitude = 1;
        }
        return newMagnitude;
    }

    double applyRotationalDeadband(double Twist)
    {
       double newTwist = Twist;

       if (newTwist > .1)
       {
         newTwist = newTwist -.1;
       }
       else if ( newTwist < -.1)
       {
           newTwist = newTwist + .1;
       }
       return newTwist;
    }

    //*************************************************

     /* This function is called periodically during test mode
     */
    public void testPeriodic() {

    }

}


text:
package org.elasticsearch.xpack.core.ilm;

import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.ToXContentObject;
import org.elasticsearch.index.Index;

/**
 * A step which will be called periodically, waiting for some condition to become true.
 * Called asynchronously, as the condition may take time to check.
 * <p>
 * If checking something based on the current cluster state which does not take time to check, use {@link ClusterStateWaitStep}.
 */
public abstract class AsyncWaitStep extends Step {

    private Client client;

    public AsyncWaitStep(StepKey key, StepKey nextStepKey, Client client) {
        super(key, nextStepKey);
        this.client = client;
    }

    protected Client getClient() {
        return client;
    }

    public abstract void evaluateCondition(Metadata metadata, Index index, Listener listener, TimeValue masterTimeout);

    public interface Listener {

        void onResponse(boolean conditionMet, ToXContentObject informationContext);

        void onFailure(Exception e);
    }
}


text:
require 'azure_mgmt_mixedreality'

module Azure::MixedReality::Profiles::Latest
  module Mgmt
    RemoteRenderingAccounts = Azure::MixedReality::Mgmt::V2020_04_06_preview::RemoteRenderingAccounts
    Operations = Azure::MixedReality::Mgmt::V2020_05_01::Operations
    SpatialAnchorsAccounts = Azure::MixedReality::Mgmt::V2020_05_01::SpatialAnchorsAccounts

    module Models
      Plan = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Plan
      RemoteRenderingAccountPage = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage
      Identity = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Identity
      ResourceModelWithAllowedPropertySet = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySet
      Sku = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Sku
      RemoteRenderingAccountIdentity = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountIdentity
      RemoteRenderingAccount = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount
      ResourceModelWithAllowedPropertySetIdentity = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetIdentity
      ResourceModelWithAllowedPropertySetSku = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetSku
      ResourceModelWithAllowedPropertySetPlan = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetPlan
      SkuTier = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::SkuTier
      ResourceIdentityType = Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceIdentityType
      CheckNameAvailabilityResponse = Azure::MixedReality::Mgmt::V2020_05_01::Models::CheckNameAvailabilityResponse
      AccountKeyRegenerateRequest = Azure::MixedReality::Mgmt::V2020_05_01::Models::AccountKeyRegenerateRequest
      Operation = Azure::MixedReality::Mgmt::V2020_05_01::Models::Operation
      SpatialAnchorsAccountPage = Azure::MixedReality::Mgmt::V2020_05_01::Models::SpatialAnchorsAccountPage
      CheckNameAvailabilityRequest = Azure::MixedReality::Mgmt::V2020_05_01::Models::CheckNameAvailabilityRequest
      AccountKeys = Azure::MixedReality::Mgmt::V2020_05_01::Models::AccountKeys
      OperationPage = Azure::MixedReality::Mgmt::V2020_05_01::Models::OperationPage
      OperationDisplay = Azure::MixedReality::Mgmt::V2020_05_01::Models::OperationDisplay
      Resource = Azure::MixedReality::Mgmt::V2020_05_01::Models::Resource
      TrackedResource = Azure::MixedReality::Mgmt::V2020_05_01::Models::TrackedResource
      SpatialAnchorsAccount = Azure::MixedReality::Mgmt::V2020_05_01::Models::SpatialAnchorsAccount
      ProxyResource = Azure::MixedReality::Mgmt::V2020_05_01::Models::ProxyResource
      AzureEntityResource = Azure::MixedReality::Mgmt::V2020_05_01::Models::AzureEntityResource
      NameAvailability = Azure::MixedReality::Mgmt::V2020_05_01::Models::NameAvailability
      NameUnavailableReason = Azure::MixedReality::Mgmt::V2020_05_01::Models::NameUnavailableReason
    end

    #
    # MixedRealityManagementClass
    #
    class MixedRealityManagementClass
      attr_reader :remote_rendering_accounts, :operations, :spatial_anchors_accounts, :configurable, :base_url, :options, :model_classes

      def initialize(options = {})
        if options.is_a?(Hash) && options.length == 0
          @options = setup_default_options
        else
          @options = options
        end

        reset!(options)

        @configurable = self
        @base_url = options[:base_url].nil? ? nil:options[:base_url]
        @options = options[:options].nil? ? nil:options[:options]

        @client_0 = Azure::MixedReality::Mgmt::V2020_04_06_preview::MixedRealityClient.new(configurable.credentials, base_url, options)
        if(@client_0.respond_to?(:subscription_id))
          @client_0.subscription_id = configurable.subscription_id
        end
        add_telemetry(@client_0)
        @remote_rendering_accounts = @client_0.remote_rendering_accounts

        @client_1 = Azure::MixedReality::Mgmt::V2020_05_01::MixedRealityClient.new(configurable.credentials, base_url, options)
        if(@client_1.respond_to?(:subscription_id))
          @client_1.subscription_id = configurable.subscription_id
        end
        add_telemetry(@client_1)
        @operations = @client_1.operations
        @spatial_anchors_accounts = @client_1.spatial_anchors_accounts

        @model_classes = ModelClasses.new
      end

      def add_telemetry(client)
        profile_information = 'Profiles/Latest/MixedReality/Mgmt'
        client.add_user_agent_information(profile_information)
      end

      def method_missing(method, *args)
        if @client_1.respond_to?method
          @client_1.send(method, *args)
        elsif @client_0.respond_to?method
          @client_0.send(method, *args)
        else
          super
        end
      end

    end

    class ModelClasses
      def plan
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Plan
      end
      def remote_rendering_account_page
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountPage
      end
      def identity
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Identity
      end
      def resource_model_with_allowed_property_set
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySet
      end
      def sku
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::Sku
      end
      def remote_rendering_account_identity
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccountIdentity
      end
      def remote_rendering_account
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::RemoteRenderingAccount
      end
      def resource_model_with_allowed_property_set_identity
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetIdentity
      end
      def resource_model_with_allowed_property_set_sku
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetSku
      end
      def resource_model_with_allowed_property_set_plan
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceModelWithAllowedPropertySetPlan
      end
      def sku_tier
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::SkuTier
      end
      def resource_identity_type
        Azure::MixedReality::Mgmt::V2020_04_06_preview::Models::ResourceIdentityType
      end
      def check_name_availability_response
        Azure::MixedReality::Mgmt::V2020_05_01::Models::CheckNameAvailabilityResponse
      end
      def account_key_regenerate_request
        Azure::MixedReality::Mgmt::V2020_05_01::Models::AccountKeyRegenerateRequest
      end
      def operation
        Azure::MixedReality::Mgmt::V2020_05_01::Models::Operation
      end
      def spatial_anchors_account_page
        Azure::MixedReality::Mgmt::V2020_05_01::Models::SpatialAnchorsAccountPage
      end
      def check_name_availability_request
        Azure::MixedReality::Mgmt::V2020_05_01::Models::CheckNameAvailabilityRequest
      end
      def account_keys
        Azure::MixedReality::Mgmt::V2020_05_01::Models::AccountKeys
      end
      def operation_page
        Azure::MixedReality::Mgmt::V2020_05_01::Models::OperationPage
      end
      def operation_display
        Azure::MixedReality::Mgmt::V2020_05_01::Models::OperationDisplay
      end
      def resource
        Azure::MixedReality::Mgmt::V2020_05_01::Models::Resource
      end
      def tracked_resource
        Azure::MixedReality::Mgmt::V2020_05_01::Models::TrackedResource
      end
      def spatial_anchors_account
        Azure::MixedReality::Mgmt::V2020_05_01::Models::SpatialAnchorsAccount
      end
      def proxy_resource
        Azure::MixedReality::Mgmt::V2020_05_01::Models::ProxyResource
      end
      def azure_entity_resource
        Azure::MixedReality::Mgmt::V2020_05_01::Models::AzureEntityResource
      end
      def name_availability
        Azure::MixedReality::Mgmt::V2020_05_01::Models::NameAvailability
      end
      def name_unavailable_reason
        Azure::MixedReality::Mgmt::V2020_05_01::Models::NameUnavailableReason
      end
    end
  end
end


text:
package org.pentaho.di.core.jdbc;

import java.util.List;

import org.pentaho.di.core.Const;

/**
 * This class is no longer used
 *
 * Data Service client code is now available in the pdi-dataservice-plugin project
 *
 */
@Deprecated
public class FieldVariableMapping {

  public enum MappingType {
    FIELDMAP, // Helper mapping to map output fields to SQL columns
      SQL_WHERE, // generates the where clause condition into a SQL condition.
      JSON_QUERY; // generates the JSON query (MongoDB mainly)

    public static MappingType getMappingType( String typeString ) {
      try {
        return valueOf( typeString );
      } catch ( Exception e ) {
        return FIELDMAP;
      }
    }
  }

  private String fieldName;
  private String targetName;
  private String variableName;
  private MappingType mappingType;

  public FieldVariableMapping() {
    mappingType = MappingType.FIELDMAP;
  }

  /**
   * @param fieldName
   * @param variableName
   * @param mappingType
   */
  public FieldVariableMapping( String fieldName, String targetName, String variableName, MappingType mappingType ) {
    this.fieldName = fieldName;
    this.targetName = targetName;
    this.variableName = variableName;
    this.mappingType = mappingType;
  }

  /**
   * Find a field-variable mapping by field name, perform case insensitive comparison.
   *
   * @param mappings
   *          The list of mappings
   * @param fieldName
   *          the name of the field to look for.
   * @return the field-variable mapping or null if nothing could be found.
   */
  public static FieldVariableMapping findFieldVariableMappingByFieldName( List<FieldVariableMapping> mappings,
    String fieldName ) {
    for ( FieldVariableMapping mapping : mappings ) {
      if ( !Const.isEmpty( mapping.getFieldName() ) && mapping.getFieldName().equalsIgnoreCase( fieldName ) ) {
        return mapping;
      }
    }
    return null;
  }

  /**
   * @return the fieldName
   */
  public String getFieldName() {
    return fieldName;
  }

  /**
   * @param fieldName
   *          the fieldName to set
   */
  public void setFieldName( String fieldName ) {
    this.fieldName = fieldName;
  }

  /**
   * @return the variableName
   */
  public String getVariableName() {
    return variableName;
  }

  /**
   * @param variableName
   *          the variableName to set
   */
  public void setVariableName( String variableName ) {
    this.variableName = variableName;
  }

  /**
   * @return the mappingType
   */
  public MappingType getMappingType() {
    return mappingType;
  }

  /**
   * @param mappingType
   *          the mappingType to set
   */
  public void setMappingType( MappingType mappingType ) {
    this.mappingType = mappingType;
  }

  /**
   * @return the targetName
   */
  public String getTargetName() {
    return targetName;
  }

  /**
   * @param targetName
   *          the targetName to set
   */
  public void setTargetName( String targetName ) {
    this.targetName = targetName;
  }

}


text:
<?php

class RenderHelper {

	public static function generarSelect(array $elementos, $idSelect = null, $campoValor = 'valor', $campoId = 'id', $idChecked = null){
		$id = (is_null($idSelect) & strlen($idSelect)>0)?'':"name=$idSelect id=$idSelect";
		$salida = "<select $id>\n%s</select>";
		$opciones = '';
		foreach($elementos as $e){
			$key = $e[$campoId];
			$valor = $e[$campoValor];
			$checked = $idChecked==$key?'checked ':'';
			$opciones .= "<option value=$key $checked>$valor</option>\n";
		}

		return sprintf($salida, $opciones);
	}

}


text:
package uk.gov.hmrc.ct.ct600e.v2

import uk.gov.hmrc.ct.box._
import uk.gov.hmrc.ct.ct600e.v2.retriever.CT600EBoxRetriever
import uk.gov.hmrc.ct.ct600e.validations.ValidateDeclarationNameOrStatus

case class E1030(value: Option[String]) extends CtBoxIdentifier("Claimer's name") with CtOptionalString with Input
  with ValidatableBox[CT600EBoxRetriever] with ValidateDeclarationNameOrStatus[CT600EBoxRetriever] {
  override def validate(boxRetriever: CT600EBoxRetriever): Set[CtValidation] = validateDeclarationNameOrStatus("E1030", this)
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>ChangSha - Work Group</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link href="./assets/css/bootstrap.css" rel="stylesheet">
    <link href="./assets/css/flexslider.css" rel="stylesheet">
    <link href="./assets/css/style.css" rel="stylesheet">
    <link href="./assets/css/responsive.css" rel="stylesheet">
    <link href="./assets/css/style_switcher.css" rel="stylesheet">
    <link href="./assets/css/dropkick.css" rel="stylesheet">
    <link href="./assets/css/jquery.fancybox.css" rel="stylesheet">

    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="../assets/ico/favicon.png">

HOME

                        ORDER

REQUEST

MY ORDER

DEMO

                        BLOG

BLOG LIST

BLOG SINGLE

                        CHANGSHA

ABOUT

OUR TEAM

CONTACT

COMPARE OUR AWESOME PACKAGES

CREATE A POWERFUL SOLUTION NOW

                GET STARTED

Home /

request

                ORDER

                                        #
                                        ORDER NAME
                                        START DATE
                                        STATUS
                                        ACTION

                                        1
                                        Mark
                                        2016-10-26
                                        DONE

                                                <button type="button" class="btn btn-danger btn-small">CANCEL</button>
                                                <button type="button" class="btn btn-info btn-small">MODIFY</button>

                                        2
                                        Mark
                                        2016-10-26
                                        DONE

                                                <button type="button" class="btn btn-danger btn-small">CANCEL</button>
                                                <button type="button" class="btn btn-info btn-small">MODIFY</button>

                                        3
                                        Larry the Bird
                                        2016-10-26
                                        IN PROGRESS

                                                <button type="button" class="btn btn-danger btn-small">CANCEL</button>
                                                <button type="button" class="btn btn-info btn-small">MODIFY</button>

«

1

2

3

4

5

»

GET IN TOUCH NOW

                    CONTACT US

ABOUT US

                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore

                    54 Awesome street

                    Awesome Road

                    Awesome City

                    (123) 456 - 789

LATEST TWEETS

                    @Jaynesh Just submitted another great item on #themeforest

                    about 3 hours ago

                    @Jaynesh Working on an awesome theme for #themeforest

                    about 3 weeks ago

LATEST POSTS

                    Lorem ipsum dolor sit amet, consect
                    sed do eiusmod tempor incididunt
                    ut labore et dolore magna sed do eiusmod tempor
                    consectetur adipisicing elit, sed do

                <input placeholder="Your Name" type="text" name="name" id="name">
                <input placeholder="Your Email" type="text" name="email" id="email">
                <textarea placeholder="Message" rows="3" cols="50" name="message" id="message"></textarea>
                <button id="submit" class="btn btn-black btn-full">Submit</button>

COPYRIGHT 2003-2012.More Templates - Collect from


text:
<?php

namespace Payum\Payex\Api;

class RecurringApi extends BaseApi
{
    public const PERIODTYPE_HOURS = 1;

    public const PERIODTYPE_DAILY = 2;

    public const PERIODTYPE_WEEKLY = 3;

    public const PERIODTYPE_MONTHLY = 4;

    public const PERIODTYPE_QUARTERLY = 5;

    public const PERIODTYPE_YEARLY = 6;

    public const RECURRINGSTATUS_RECURRING = 1;

    public const RECURRINGSTATUS_STOPPEDBYMERCHANT = 2;

    public const RECURRINGSTATUS_STOPPEDBYADMIN = 3;

    public const RECURRINGSTATUS_STOPPEDBYCLIENT = 4;

    public const RECURRINGSTATUS_STOPPEDBYSYSTEM = 5;

    public const RECURRINGSTATUS_FAILED = 6;

    /**
     * @link http://www.payexpim.com/technical-reference/pxrecurring/pxrecurring-start/
     *
     * @return array
     */
    public function start(array $parameters)
    {
        $parameters['accountNumber'] = $this->options['account_number'];

        if (isset($parameters['orderId'])) {
            $parameters['orderID'] = $parameters['orderId'];
            unset($parameters['orderId']);
        }

        //Deprecated, set to blank.
        $parameters['notifyUrl'] = '';

        $parameters['hash'] = $this->calculateHash($parameters, [
            'accountNumber',
            'agreementRef',
            'startDate',
            'periodType',
            'period',
            'alertPeriod',
            'price',
            'productNumber',
            'orderID',
            'description',
            'notifyUrl',
        ]);

        return $this->call('Start', $parameters, $this->getPxRecurringWsdl());
    }

    /**
     * @link http://www.payexpim.com/technical-reference/pxrecurring/pxrecurring-stop/
     *
     * @return array
     */
    public function stop(array $parameters)
    {
        $parameters['accountNumber'] = $this->options['account_number'];

        $parameters['hash'] = $this->calculateHash($parameters, [
            'accountNumber',
            'agreementRef',
        ]);

        return $this->call('Stop', $parameters, $this->getPxRecurringWsdl());
    }

    /**
     * @link http://www.payexpim.com/technical-reference/pxrecurring/pxrecurring-stop/
     *
     * @return array
     */
    public function check(array $parameters)
    {
        $parameters['accountNumber'] = $this->options['account_number'];

        $parameters['hash'] = $this->calculateHash($parameters, [
            'accountNumber',
            'agreementRef',
        ]);

        return $this->call('Check', $parameters, $this->getPxRecurringWsdl());
    }

    protected function getPxRecurringWsdl()
    {
        return $this->options['sandbox'] ?
            'https://test-external.payex.com/pxagreement/pxrecurring.asmx?wsdl' :
            'https://external.payex.com/pxagreement/pxrecurring.asmx?wsdl'
        ;
    }
}


text:
/* global _, window */

angular.module('hack4sweden').controller("StartCtrl", function($scope, $rootScope, $log, JobResource, settings) {
  $scope.state = {
    searchTerm: "",
    countyCode: 1,
    data: [],
    currentPage: 0,
    fetchingJobs: false,
    allJobsFetched: false
  };

  $scope.counties = settings.countyCodes;

  $scope.search = function() {
    $scope.state.data = [];
    $scope.state.currentPage = 0;
    $scope.state.allJobsFetched = false;
    window.scrollTo(0,0);

    $scope.state.searched = true;
    $rootScope.showLoading(true);
    $scope.getNextJobs();
  };

  $scope.getNextJobs = function() {
    if ($scope.state.fetchingJobs) {
      $log.debug('Will not fetch more jobs, still fetching jobs');
      return;
    }
    if ($scope.state.allJobsFetched) {
      $log.debug('Will not loading more, loaded all jobs');
      return;
    }
    $scope.state.fetchingJobs = true;
    $scope.state.currentPage++;
    $log.debug('Fetching jobs page ' + $scope.state.currentPage);
    JobResource.getList($scope.state.searchTerm, $scope.state.countyCode, $scope.state.currentPage).then(function(response) {
      $scope.state.data = $scope.state.data.concat(response.data.matchningslista.matchningdata);
      if (response.data.matchningslista.antal_sidor === $scope.state.currentPage) {
        $scope.state.allJobsFetched = true;
      }
      $rootScope.showLoading(false);
      $scope.state.fetchingJobs = false;
    });
  };

  window.scope = $scope;
});


text:
package cn.wwah.common.net.strategy;

import cn.wwah.common.net.core.ApiCache;
import cn.wwah.common.net.mode.CacheResult;
import rx.Observable;
import rx.functions.Func1;

/**
 * @Description: 缓存策略--缓存和网络
 * @author: jeasinlee
 * @date: 16/12/31 14:33.
 */
public class CacheAndRemoteStrategy<T> extends CacheStrategy<T> {
    @Override
    public <T> Observable<CacheResult<T>> execute(ApiCache apiCache, String cacheKey, Observable<T> source, final Class<T> clazz) {
        Observable<CacheResult<T>> cache = loadCache(apiCache, cacheKey, clazz);
        final Observable<CacheResult<T>> remote = loadRemote(apiCache, cacheKey, source);
        return Observable.concat(cache, remote).filter(new Func1<CacheResult<T>, Boolean>() {
            @Override
            public Boolean call(CacheResult<T> result) {
                return result.getCacheData() != null;
            }
        });
    }
}


text:
var db = require("../config/db"),
assert = require("assert");

function fetchTodos(callback) {
    var collection = db.get().collection('todos');
    var cursor = collection.find();
    var result = [];

    cursor.forEach(function(document, err) {
        assert.equal(null, err);
        result.push(document);
    }, function() {
        callback(result);
    });
}

function addTodo(item) {
    var collection = db.get().collection('todos');

    collection.insertOne(item, function(err, result) {
        assert.equal(null, err);
        console.log("Item has inserted!");
        //db.close();
    });
}

module.exports = {
    fetchTodos: fetchTodos,
    addTodo: addTodo
};


text:
using UnityEngine;
using System.Collections;

public class ParticleDestroyer : MonoBehaviour {

	private ParticleSystem _particleSystem;

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {
		if (audio.isPlaying == false && particleSystem.IsAlive() == false)
			Destroy(gameObject);
	}
}


text:
module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Array < Type::Value # :nodoc:
          include Type::Helpers::Mutable

          attr_reader :subtype, :delimiter
          delegate :type, :user_input_in_time_zone, :limit, to: :subtype

          def initialize(subtype, delimiter = ",")
            @subtype = subtype
            @delimiter = delimiter

            @pg_encoder = PG::TextEncoder::Array.new name: "#{type}[]", delimiter: delimiter
            @pg_decoder = PG::TextDecoder::Array.new name: "#{type}[]", delimiter: delimiter
          end

          def deserialize(value)
            if value.is_a?(::String)
              type_cast_array(@pg_decoder.decode(value), :deserialize)
            else
              super
            end
          end

          def cast(value)
            if value.is_a?(::String)
              value = @pg_decoder.decode(value)
            end
            type_cast_array(value, :cast)
          end

          def serialize(value)
            if value.is_a?(::Array)
              result = @pg_encoder.encode(type_cast_array(value, :serialize))
              if encoding = determine_encoding_of_strings(value)
                result.encode!(encoding)
              end
              result
            else
              super
            end
          end

          def ==(other)
            other.is_a?(Array) &&
              subtype == other.subtype &&
              delimiter == other.delimiter
          end

          def type_cast_for_schema(value)
            return super unless value.is_a?(::Array)
            "[" + value.map { |v| subtype.type_cast_for_schema(v) }.join(", ") + "]"
          end

          def map(value, &block)
            value.map(&block)
          end

          private

            def type_cast_array(value, method)
              if value.is_a?(::Array)
                value.map { |item| type_cast_array(item, method) }
              else
                @subtype.public_send(method, value)
              end
            end

            def determine_encoding_of_strings(value)
              case value
              when ::Array then determine_encoding_of_strings(value.first)
              when ::String then value.encoding
              end
            end
        end
      end
    end
  end
end


text:
package io.freefair.gradle.plugins.github.internal;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Data
public class Manifest {

    /**
     * The name of the manifest.
     */
    private String name;

    private File file;

    private Map<String, Dependency> resolved = new LinkedHashMap<>();

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class File {
        /**
         * The path of the manifest file relative to the root of the Git repository.
         */
        private String source_location;
    }

    @Data
    public static class Dependency {
        private final String package_url;

        private String relationship;

        private String scope;

        private List<String> dependencies;
    }

}