text:
package com.linkedin.thirdeye.anomaly.database;

import java.util.Set;

import com.linkedin.thirdeye.anomaly.api.ResultProperties;

/**
 *
 */
public class AnomalyTableRow {

  /** Unique id for anomaly */
  int id;

  /** Name of the function table */
  String functionTable;

  /** Id of the function table entry that produced this anomaly */
  int functionId;

  /** Name of the function that produced the anomaly */
  String functionName;

  /** Description of the function table entry that produced this anomaly */
  String functionDescription;

  /** Collection on which the function was run */
  String collection;

  /** The window of time the anomaly occurred at*/
  long timeWindow;

  /** The number of dimensions that are non '*' */
  int nonStarCount;

  /** The dimension key that produced this anomaly as a json string */
  String dimensions;

  /** The estimated proportion that the dimension key contributes to the metric total */
  double dimensionsContribution;

  /** The metrics analyzed by the function */
  Set<String> metrics;

  /** Function defined anomaly score */
  double anomalyScore;

  /** Function defined anomaly volume */
  double anomalyVolume;

  /** FunctionProperties emitted by the AnomalyDetectionFunction */
  ResultProperties properties;

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getFunctionTable() {
    return functionTable;
  }

  public void setFunctionTable(String functionTable) {
    this.functionTable = functionTable;
  }

  public int getFunctionId() {
    return functionId;
  }

  public void setFunctionId(int functionId) {
    this.functionId = functionId;
  }

  public String getFunctionName() {
    return functionName;
  }

  public void setFunctionName(String functionName) {
    this.functionName = functionName;
  }

  public String getFunctionDescription() {
    return functionDescription;
  }

  public void setFunctionDescription(String functionDescription) {
    this.functionDescription = functionDescription;
  }

  public String getCollection() {
    return collection;
  }

  public void setCollection(String collection) {
    this.collection = collection;
  }

  public long getTimeWindow() {
    return timeWindow;
  }

  public void setTimeWindow(long timeWindow) {
    this.timeWindow = timeWindow;
  }

  public int getNonStarCount() {
    return nonStarCount;
  }

  public void setNonStarCount(int nonStarCount) {
    this.nonStarCount = nonStarCount;
  }

  public String getDimensions() {
    return dimensions;
  }

  public void setDimensions(String dimensions) {
    this.dimensions = dimensions;
  }

  public double getAnomalyScore() {
    return anomalyScore;
  }

  public void setAnomalyScore(double anomalyScore) {
    this.anomalyScore = anomalyScore;
  }

  public double getAnomalyVolume() {
    return anomalyVolume;
  }

  public void setAnomalyVolume(double anomalyVolume) {
    this.anomalyVolume = anomalyVolume;
  }

  public ResultProperties getProperties() {
    return properties;
  }

  public void setProperties(ResultProperties properties) {
    this.properties = properties;
  }

  public Set<String> getMetrics() {
    return metrics;
  }

  public void setMetrics(Set<String> metrics) {
    this.metrics = metrics;
  }

  public double getDimensionsContribution() {
    return dimensionsContribution;
  }

  public void setDimensionsContribution(double dimensionsContribution) {
    this.dimensionsContribution = dimensionsContribution;
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Laboulbenia loxandri Thaxt.

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
<resources>

    <dimen name="padding_top_bottom">16dp</dimen>
    <dimen name="padding_top_bottom_date">8dp</dimen>
    <dimen name="padding_left_right">24dp</dimen>

</resources>


text:
package shadertools_test

import (
	"testing"

	"github.com/google/gapid/core/assert"
	"github.com/google/gapid/core/log"
	"github.com/google/gapid/gapis/shadertools"
)

func TestConvertGlsl(t *testing.T) {
	for _, test := range []struct {
		desc     string
		opts     shadertools.Options
		src      string
		expected string
	}{
		{
			"Test shadertools propagates early_fragment_tests",
			shadertools.Options{
				ShaderType:        shadertools.TypeFragment,
				CheckAfterChanges: true,
			},
			`#version 310 es
layout(early_fragment_tests) in;
out highp vec4 color;
void main() { color = vec4(1., 1., 1., 1.); }`,
			`#version 330
#ifdef GL_ARB_shading_language_420pack
#extension GL_ARB_shading_language_420pack : require
#endif
#extension GL_ARB_shader_image_load_store : require
layout(early_fragment_tests) in;

out vec4 color;

void main()
{
    color = vec4(1.0);
}

`}, {
			"Test shadertools strips early_fragment_tests",
			shadertools.Options{
				ShaderType:         shadertools.TypeFragment,
				CheckAfterChanges:  true,
				StripOptimizations: true,
			},
			`#version 310 es
layout(early_fragment_tests) in;
out highp vec4 color;
void main() { color = vec4(1., 1., 1., 1.); }`,
			`#version 330
#ifdef GL_ARB_shading_language_420pack
#extension GL_ARB_shading_language_420pack : require
#endif

out vec4 color;

void main()
{
    color = vec4(1.0);
}

`},
	} {
		t.Run(test.desc, func(t *testing.T) {
			ctx := log.Testing(t)
			out, err := shadertools.ConvertGlsl(test.src, &test.opts)
			if assert.For(ctx, "err").ThatError(err).Succeeded() {
				assert.For(ctx, "src").ThatString(out.SourceCode).Equals(test.expected)
			}
		})
	}
}


text:
package jsclassloader.dependency;

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class ClassNode implements Comparable<ClassNode> {
	private Map<String, ClassNode> runtimeDependencies;
	private Map<String, ClassNode> staticDependencies;
	private Set<ClassNode> reverseDependencies;

	private ClassNode() {
		runtimeDependencies = new HashMap<String, ClassNode>();
		staticDependencies = new HashMap<String, ClassNode>();
		reverseDependencies = new HashSet<ClassNode>();
	}

	private String value;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	private boolean processed;

	public boolean isProcessed() {
		return processed;
	}

	public void setProcessed(boolean processed) {
		this.processed = processed;
	}

	public ClassNode(String value) {
		this();
		this.value = value;
	}

	public Collection<ClassNode> getRunTimeDependencies() {
		return runtimeDependencies.values();
	}

	public Collection<ClassNode> getStaticDependencies() {
		return staticDependencies.values();
	}

	public void addDependency(ClassNode classNode, boolean isStatic) {

		String className = classNode.getValue();

		if (isStatic) {
			if (this.staticDependencies.get(className) == null) {
				// if it was a static but is now a runtime dep, move it from
				// runtime to static.
				if (this.runtimeDependencies.get(className) != null) {
					this.staticDependencies.put(className, this.runtimeDependencies.get(className));
					this.runtimeDependencies.remove(className);
				} else {
					addStaticDependency(classNode);
				}
			}
		} else {
			if (this.runtimeDependencies.get(className) == null && this.staticDependencies.get(className) == null) {
				addRuntimeDependency(classNode);
			}
		}
	}

	public void addStaticDependency(ClassNode classNode) {
		staticDependencies.put(classNode.getValue(), classNode);
		classNode.addReverseDependency(this);
	}

	public void addRuntimeDependency(ClassNode classNode) {
		runtimeDependencies.put(classNode.getValue(), classNode);
		classNode.addReverseDependency(this);
	}

	public void addReverseDependency(ClassNode classNode) {
		reverseDependencies.add(classNode);
	}

	public void removeDependency(ClassNode classNode) {
		String className = classNode.getValue();
		boolean found = false;
		if (this.staticDependencies.get(className) != null) {
			this.staticDependencies.remove(className);
			found = true;
		} else if (this.runtimeDependencies.get(className) != null) {
			this.runtimeDependencies.remove(className);
			found = true;
		}
		if (found == false) {
			throw new RuntimeException("Can't remove dependency that doesn't exist: Trying to remove dependency: "
					+ "[" + className + "] from: [" + this.getValue() + "]");
		}
	}

	public void destroy() {
		for (ClassNode node : this.reverseDependencies) {
			node.removeDependency(this);
		}
	}

	public boolean hasRuntimeDependency(String className) {
		return runtimeDependencies.containsKey(className);
	}

	public boolean hasStaticDependency(String className) {
		return staticDependencies.containsKey(className);
	}

	public boolean hasDependency(String value) {
		if (hasStaticDependency(value)) {
			return true;
		}
		return hasRuntimeDependency(value);
	}

	@Override
	public boolean equals(Object obj) {
		if (((ClassNode) obj).getValue().equals(getValue())) {
			return true;
		}
		return false;
	}

	@Override
	public int compareTo(ClassNode o) {
		return value.compareTo(o.value);
	}
}


text:
<!DOCTYPE html>

        <meta charset=utf-8 />
        <link rel="shortcut icon" href="/favicon.ico" />
        <title>Heroku + Docker + Haskell = ?</title>

Heroku + Docker + Haskell = ?

Try /api/echo/hello

Check GitHub repository for more info.

Reddit discussion

Working Heroku deployment (might be sleeping)


text:
/**
 * @file test data
 * @author r2space@hotmail.com
 * @module /test/lib/datarider/data.js
 */

"use strict";

var test = light.framework.test
  , should = test.should
  , mock = test.mock
  , async = test.async
  , data = require(__core + "/lib/model/datarider/data")
  ;

describe("/lib/mongo/model", function () {

  var domain = "Test"
    , code = "lotus"
    , current = new Date()
    , _id = undefined;

  /** *************************************** **/
  describe("exports.join", function () {

    var handler = mock.handler();
    handler.domain = domain;
    handler.code = code;

    it("join user collection - single", function (done) {

      var value = {column1: mock.dummyUID, column2: 1, column3: current};
      data.join(handler, value, "column1", "user", null, ["id", "name"], function (err) {
        should.not.exist(err);
        value.options.user.should.have.property(mock.dummyUID);
        done();
      });
    });

    it("join user collection - array", function (done) {

      var value = [
        {column1: mock.dummyUID, column2: 1, column3: current},
        {column1: mock.dummyUID, column2: 2, column3: current}
      ];
      data.join(handler, value, "column1", "user", "_id", ["id", "name"], function (err) {
        should.not.exist(err);
        value.options.user.should.have.property(mock.dummyUID);
        done();
      });
    });

    it("not find user data", function (done) {

      var value = {column1: "none", column2: 1, column3: current};
      data.join(handler, value, "column1", "user", "_id", ["id", "name"], function (err) {
        should.not.exist(err);
        should.not.exist(value.options.user);
        done();
      });
    });

    it("not content column", function (done) {

      var value = {column2: 1, column3: current};
      data.join(handler, value, "column1", "user", "_id", ["id", "name"], function (err) {
        should.not.exist(err);
        should.not.exist(value.options.user);
        done();
      });
    });

    it("no link kye", function (done) {

      var value = {column1: "none", column2: 1, column3: current};
      data.join(handler, value, "column1", "user", null, ["id", "name"], function (err) {
        should.not.exist(err);
        should.not.exist(value.options.user);
        done();
      });
    });

    it("select is empty", function (done) {

      var value = {column1: "none", column2: 1, column3: current};
      data.join(handler, value, "column1", "user", null, null, function (err) {
        should.not.exist(err);
        should.not.exist(value.options);
        done();
      });
    });
  });

  /** *************************************** **/
  describe("exports.reject", function () {

    it("reject column", function () {

      var board = {
          selects: [
            {key: "column1", format: "formated: %s", alias: "column4", select: true},
            {key: "column2", format: "", alias: "", select: false},
            {key: "column3", format: "YYYY/MM/DD", select: true}
          ]
        }
        , value = {column1: "string", column2: 10, column3: current};

      var result = data.reject(value, board);
      result.column4.should.be.equal("formated: string");
      should.not.exist(result.column2);
      result.column3.should.be.a.Date;
      result.column3.should.be.a.String;
    });

    it("reject sub object column", function () {

      var board = {
          selects: [
            {key: "column1.sub1", format: "formated: %s", alias: "column5", select: true},
            {key: "column2", format: "", alias: "", select: false},
            {key: "column3.sub1", select: true},
            {key: "column4.sub1", select: true}
          ]
        }
        , value = {
          column1: {sub1: "string", sub2: "string2"},
          column2: 10,
          column3: {sub1: current},
          column4: ""
        };

      var result = data.reject(value, board);
      should.not.exist(result.column2);
      should.not.exist(result.column3.sub2);
      result.column3.sub1.should.be.a.Date;
      result.column5.should.be.equal("formated: string");
    });

    it("reject sub object column", function () {

      var board = {
          selects: [
            {key: "column1.sub1", format: "formated: %s", alias: "column5", select: true},
            {key: "column2", select: false},
            {key: "column3.sub1", select: true},
            {key: "column4.sub1", select: true}
          ]
        }
        , value = {
          column1: [{sub1: "string", sub2: "string2"}, {sub1: "string", sub2: "string2"}, {sub3: "string3"}],
          column2: 10,
          column3: [{sub1: current, sub2: current}],
          column4: ""
        };

      var result = data.reject(value, board);
      should.not.exist(result.column2);
      should.not.exist(result.column3.sub2);
      result.column3[0].sub1.should.be.a.Date;
      result.column1.should.have.length(3);
      result.column1[0].column5.should.be.equal("formated: string");
      should.not.exist(result.column1[0].column5.sub2);
    });

    it("empty data", function () {

      var result = data.reject(undefined, {});
      result.should.be.empty;
    });
  });

  /** *************************************** **/
  describe("exports.order", function () {

    it("fix or dynamic sort", function () {

      var handler = mock.handler({sort: {c: "c", d: "d", e: "e"}});
      var result = data.order(handler,
        {
          sorts: [
            {index: 1, key: "a", dynamic: "fix", order: "asc"},
            {index: 2, key: "b", dynamic: "fix", order: "desc"},
            {index: 3, key: "c", dynamic: "dynamic", order: "asc"},
            {index: 4, key: "d", dynamic: "dynamic", order: "desc"},
            {index: 0, key: "e", dynamic: "dynamic", order: "desc"}
          ]
        });

      result.should.have.length(5);
      result[0][0].should.be.equal("e");
      result[0][1].should.be.equal(-1);
      result[1][1].should.be.equal(1);
    });

    it("use order", function () {

      var handler = mock.handler({order: {a: "a"}});
      var result = data.order(handler, {
        sorts: [
          {index: 1, key: "a", dynamic: "dynamic", order: "asc"}
        ]
      });

      result.should.have.length(1);
    });

  });

  /** *************************************** **/
  describe("exports.filter", function () {

    it("free filter", function () {
      var handler = mock.handler({free: {a1: 1, b1: {b11: 2}}});
      var result = data.filter(handler, {});
      result.should.have.property("a1");
    });

    it("use default, reserved", function () {

      var handler = mock.handler({
          condition: {uid: mock.dummyUID}
        })
        , board = {
          filters: [{
            key: "default",
            operator: "$eq",
            parameter: "",
            default: "10",
            group: "1"
          }, {
            key: "reserved",
            operator: "$eq",
            parameter: "",
            default: "$uid",
            group: "1"
          }, {
            key: "nodata",
            operator: "$eq",
            parameter: "nodata",
            default: "10",
            group: "1"
          }, {
            key: "parameter",
            operator: "$eq",
            parameter: "uid",
            default: "",
            group: "1"
          }]
        };
      var result = data.filter(handler, board);
      result.default.$eq.should.be.equal("10");
      result.reserved.$eq.should.be.equal(mock.dummyUID);
      result.parameter.$eq.should.be.equal(mock.dummyUID);
      result.nodata.$eq.should.be.equal("10");
    });

    it("compare parameter", function () {

      var handler = mock.handler({
          condition: {
            uid: mock.dummyUID,
            in: [1, 1, 1],
            nin: [2, 2, 2],
            regex: /^.*/,
            exists: true
          }
        })
        , board = {
          filters: [{
            key: "ne",
            operator: "$ne",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "gt",
            operator: "$gt",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "gte",
            operator: "$gte",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "lt",
            operator: "$lt",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "lte",
            operator: "$lte",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "in",
            operator: "$in",
            parameter: "in",
            default: "",
            group: "1"
          }, {
            key: "nin",
            operator: "$nin",
            parameter: "nin",
            default: "",
            group: "1"
          }, {
            key: "regex",
            operator: "$regex",
            parameter: "regex",
            default: "",
            group: "1"
          }, {
            key: "exists",
            operator: "$exists",
            parameter: "exists",
            default: "",
            group: "1"
          }]
        };
      var result = data.filter(handler, board);
      result.ne.should.have.property("$ne");
      result.gt.should.have.property("$gt");
      result.gte.should.have.property("$gte");
      result.lt.should.have.property("$lt");
      result.lte.should.have.property("$lte");
      result.in.should.have.property("$in");
      result.nin.should.have.property("$nin");
      result.regex.should.have.property("$regex");
      result.exists.should.have.property("$exists");
    });

    it("multi parameter", function () {

      var handler = mock.handler({
          condition: {gt: 1, lt: 10}
        })
        , board = {
          filters: [{
            key: "same",
            operator: "$gt",
            parameter: "gt",
            default: "",
            group: "1"
          }, {
            key: "same",
            operator: "$lt",
            parameter: "lt",
            default: "",
            group: "1"
          }]
        };
      var result = data.filter(handler, board);
      result.same.$gt.should.be.equal(1);
      result.same.$lt.should.be.equal(10);
    });

    it("empty parameter value", function () {

      var handler = mock.handler({
          filter: {}
        })
        , board = {
          filters: [{
            key: "same",
            operator: "$gt",
            parameter: "gt",
            default: "",
            group: "1"
          }]
        };
      var result = data.filter(handler, board);
      result.should.be.empty;
    });

    it("empty board filters value", function () {

      var handler = mock.handler({filter: {}})
        , board = {filters: []};
      var result = data.filter(handler, board);
      result.should.be.empty;
    });

    it("or condition", function () {

      var handler = mock.handler({
          filter: {uid: mock.dummyUID}
        })
        , board = {
          filters: [{
            key: "same",
            operator: "$eq",
            parameter: "uid",
            default: "",
            group: "1"
          }, {
            key: "same",
            operator: "$eq",
            parameter: "uid",
            default: "",
            group: "2"
          }]
        };
      var result = data.filter(handler, board);
      result.$or.should.have.length(2);
    });
  });

  /** *************************************** **/
  describe("exports.add", function () {

    var __api = {
      schema: "test",
      api: "/api/test/add",
      selects: [
        {key: "_id", select: true},
        {key: "valid", select: false},
        {key: "createAt", select: false},
        {key: "createBy", select: false},
        {key: "updateAt", select: true},
        {key: "updateBy", select: true, format: "", alias: "", option: "user", fields: ["id", "name"]},
        {key: "column1", select: true},
        {key: "column2", select: false},
        {key: "column3", select: false},
        {key: "column4", select: false},
        {key: "column5", select: false},
        {key: "column6.sub1", select: false},
        {key: "column6.sub2", select: false},
        {key: "column7.sub1", select: false},
        {key: "column7.sub2", select: false}
      ]
    };

    it("add empty object", function (done) {

      var handler = mock.handler({__api: __api});
      handler.domain = domain;
      handler.code = code;

      data.add(handler, function (err, result) {
        should.not.exist(err);
        should.not.exist(result.createAt);
        should.not.exist(result.createBy);
        result.options.should.have.property("user");

        done();
      });
    });

    it("add an object", function (done) {

      var handler = mock.handler({__api: __api});
      handler.domain = domain;
      handler.code = code;
      handler.addParams("data", {
        column1: "string",
        column2: "10",
        column3: "2015/01/01",
        column4: "true",
        column5: "000000000000000000000000",
        column6: [{sub1: "string", sub2: "20"}, {sub1: "string", sub2: "30"}],
        column7: {sub1: [1, 2, 3], sub2: {child1: "string"}}
      });

      data.add(handler, function (err, result) {
        should.not.exist(err);
        should.not.exist(result.createAt);
        should.not.exist(result.createBy);
        result.options.should.have.property("user");

        _id = result._id; // 后续测试用
        done();
      });
    });
  });

  /** *************************************** **/
  describe("exports.list", function () {

    var __api = {
      schema: "test",
      api: "/api/test/list",
      selects: [
        {key: "_id", select: true},
        {key: "valid", select: false},
        {key: "createAt", select: false},
        {key: "createBy", select: false},
        {key: "updateAt", select: true},
        {key: "updateBy", select: true, format: "", alias: "", option: "user", fields: ["id", "name"]},
        {key: "column1", select: true},
        {key: "column2", select: false},
        {key: "column3", select: false},
        {key: "column4", select: false},
        {key: "column5", select: false},
        {key: "column6.sub1", select: false},
        {key: "column6.sub2", select: false},
        {key: "column7.sub1", select: false},
        {key: "column7.sub2", select: false}
      ],
      filters: [{
        default: "",
        key: "column1",
        operator: "$eq",
        parameter: "column1",
        group: "0000"
      }, {
        default: "",
        key: "column2",
        operator: "$eq",
        parameter: "column2",
        group: "21c1"
      }],
      sorts: [{
        dynamic: "fix",
        key: "updateAt",
        order: "desc",
        index: 0
      }]
    };

    var handler = mock.handler({__api: __api});
    handler.domain = domain;
    handler.code = code;

    it("get user list, no filter", function (done) {

      data.list(handler, function (err, result) {

        should.not.exist(err);
        result.totalItems.should.be.above(0);
        result.items.should.be.exist;

        done();
      });
    });

    it("get user list by condition", function (done) {

      handler.addParams("condition", {column1: "string"});
      data.list(handler, function (err, result) {

        should.not.exist(err);
        result.totalItems.should.be.above(0);
        result.items.should.be.exist;

        done();
      });
    });

  });

  /** *************************************** **/
  describe("exports.get", function () {

    var __api = {
      schema: "test",
      api: "/api/test/get",
      selects: [
        {key: "_id", select: true},
        {key: "valid", select: false},
        {key: "createAt", select: false},
        {key: "createBy", select: false},
        {key: "updateAt", select: true},
        {key: "updateBy", select: true, format: "", alias: "", option: "user", fields: ["id", "name"]},
        {key: "column1", select: true},
        {key: "column2", select: false}
      ],
      filters: [{
        default: "",
        key: "column1",
        operator: "$eq",
        parameter: "column1",
        group: "0000"
      }]
    };

    var handler = mock.handler({__api: __api});
    handler.domain = domain;
    handler.code = code;

    it("get user by id", function (done) {

      handler.params.id = _id;
      data.get(handler, function (err, result) {
        should.not.exist(err);
        result._id.should.be.exist;

        done();
      });
    });

    it("get user by condition", function (done) {

      handler.params.condition = {column1: "string"};
      data.get(handler, function (err, result) {
        should.not.exist(err);
        result._id.should.be.exist;

        done();
      });
    });

  });

  /** *************************************** **/
  describe("exports.count", function () {

    var __api = {
      schema: "test"
    };

    var handler = mock.handler({__api: __api});
    handler.domain = domain;
    handler.code = code;

    it("get data count", function (done) {

      data.count(handler, function (err, result) {
        should.not.exist(err);
        result.should.be.a.Number;

        done();
      });
    });

  });

  /** *************************************** **/
  describe("exports.update", function () {

    var __api = {
      schema: "test",
      api: "/api/test/update",
      selects: [
        {key: "_id", select: true},
        {key: "valid", select: false},
        {key: "createAt", select: false},
        {key: "createBy", select: false},
        {key: "updateAt", select: true},
        {key: "updateBy", select: true, format: "", alias: "", option: "user", fields: ["id", "name"]},
        {key: "column1", select: true},
        {key: "column2", select: false}
      ]
    };

    it("update by id", function (done) {

      var handler = mock.handler({__api: __api});
      handler.domain = domain;
      handler.code = code;
      handler.params.id = _id;
      handler.params.data = {column1: "update value"};
      data.update(handler, function (err, result) {
        should.not.exist(err);
        should.not.exist(result.createAt);
        should.exist(result.updateAt);
        result.options.should.have.property("user");

        done();
      });
    });

    it("update by condition", function (done) {

      var handler = mock.handler({__api: __api});
      handler.domain = domain;
      handler.code = code;
      handler.params.condition = {column2: "0"};
      handler.params.data = {column3: "2015/01/01"};
      data.update(handler, function (err, result) {
        should.not.exist(err);
        result.should.be.above(0);

        done();
      });
    });
  });

  /** *************************************** **/
  describe("exports.upsert", function () {

    var __api = {
      schema: "test",
      api: "/api/test/upsert",
      selects: [
        {key: "_id", select: true},
        {key: "valid", select: false},
        {key: "createAt", select: false},
        {key: "createBy", select: false},
        {key: "updateAt", select: true},
        {key: "updateBy", select: true},
        {key: "column1", select: true},
        {key: "column2", select: false}
      ]
    };

    it("update by condition", function (done) {

      var handler = mock.handler({__api: __api});
      handler.domain = domain;
      handler.code = code;
      handler.params.condition = {column1: "NoData"};
      handler.params.data = {column1: "upsert value"};
      data.upsert(handler, function (err, result) {
        should.not.exist(err);
        done();
      });
    });
  });

  /** *************************************** **/
  describe("exports.remove", function () {

    var __api = {
      schema: "test"
    };

    var handler = mock.handler({__api: __api});
    handler.domain = domain;
    handler.code = code;

    it("remove by condition", function (done) {

      handler.params.condition = {column1: "string"};
      data.remove(handler, function (err, result) {
        should.not.exist(err);
        result.should.be.above(0);

        done();
      });
    });

    it("remove by id", function (done) {

      handler.params.id = _id;
      data.remove(handler, function (err, result) {
        should.not.exist(err);
        result.should.be.above(0);

        done();
      });
    });
  });

});


text:
@interface FoldLayer()<CALayerDelegate>
{
    NSInteger _foldCount;
    QuickAnimationFoldDirection _foldDirection;
    UIImage* _sourceImage;

}
@property (weak,nonatomic)   CALayer* targetLayer;
@property (strong,nonatomic) NSMutableArray<CALayer*>* foldLayers;

@end

@implementation FoldLayer

+ (instancetype)layer{
    return nil;
}
- (instancetype)init{
    return nil;
}
- (instancetype)initWithLayer:(id)layer{
    return nil;
}
- (nullable instancetype)presentationLayer{
    return nil;
}
- (instancetype)modelLayer{
    return nil;
}
- (instancetype)initWithLayer:(id)layer
                   foldNumber:(NSInteger)foldCount
                foldDirection:(QuickAnimationFoldDirection)direction{
    if (self = [super init]){

        _targetLayer = layer;
        _foldCount = MAX(2, foldCount);
        _foldDirection = direction;

        [self commonInit];
    }
    return self;
}

- (void)commonInit{

    self.hidden = YES;
    self.frame = _targetLayer.frame;
    [_targetLayer.superlayer addSublayer:self];
    self.foldLayers = [NSMutableArray array];
    _sourceImage = [self layerShot:_targetLayer];

    [self createFoldLayersFromTarget];
    [self createFoldAnimation];

    CATransform3D t = CATransform3DIdentity;
    t.m34 = -1 / 500.f;
    [self setSublayerTransform:t];

}

- (void)createFoldLayersFromTarget{

    if (_foldLayers.count != 0 || _targetLayer == nil)
        return;

    switch (_foldDirection) {

        case QuickAnimationFoldLeftToRight:
        case QuickAnimationFoldRightToLeft:
        case QuickAnimationFoldHorizentalFromMiddle:
        {

            CGFloat scale = [UIScreen mainScreen].scale;
            CGFloat clipWidth = _sourceImage.size.width / _foldCount;
            CGFloat clipHeight = _sourceImage.size.height;

            CGFloat width = _targetLayer.frame.size.width / _foldCount;
            CGFloat height = _targetLayer.frame.size.height;

            for (int i=0;i<_foldCount;i++){

                //add clip layer
                CGImageRef clipImage = CGImageCreateWithImageInRect(_sourceImage.CGImage, CGRectMake(clipWidth*i*scale , 0, clipWidth*scale, clipHeight*scale));

                CALayer* clipLayer = [CALayer layer];
                clipLayer.contents = (__bridge id)clipImage;
                clipLayer.frame = CGRectMake(width*i, 0, width, height);
                clipLayer.anchorPoint = CGPointMake(i % 2, 0.5);

                int symbol = i % 2 == 0 ? 0 : 1;
                clipLayer.position = CGPointMake(width*(i+symbol), height/2);

                [self addSublayer:clipLayer];
                [_foldLayers addObject:clipLayer];

                //add shadow
                CAGradientLayer* gradientLayer = [CAGradientLayer layer];
                if (i%2 == 0){
                    gradientLayer.colors = @[
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.05].CGColor,
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.6].CGColor
                                             ];
                }else{

                    gradientLayer.colors = @[
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.9].CGColor,
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.55].CGColor
                                             ];
                }

                gradientLayer.startPoint = CGPointMake(0, 0);
                gradientLayer.endPoint = CGPointMake(1, 0);
                gradientLayer.frame = clipLayer.bounds;
                [clipLayer addSublayer:gradientLayer];

                if (clipImage)
                    CFRelease(clipImage);
            }
        }
            break;
        case QuickAnimationFoldTopToBottom:
        case QuickAnimationFoldBottomToTop:
        case QuickAnimationFoldVerticalFromMiddle:
        {
            CGFloat scale = [UIScreen mainScreen].scale;
            CGFloat clipWidth = _sourceImage.size.width;
            CGFloat clipHeight = _sourceImage.size.height / _foldCount;
            CGFloat width = _targetLayer.frame.size.width;
            CGFloat height = _targetLayer.frame.size.height / _foldCount;

            for (int i=0;i<_foldCount;i++){

                //add clip layer
                CGImageRef clipImage = CGImageCreateWithImageInRect(_sourceImage.CGImage, CGRectMake(0 , clipHeight*i*scale, clipWidth*scale, clipHeight*scale));
                CALayer* clipLayer = [CALayer layer];
                clipLayer.contents = (__bridge id)clipImage;
                clipLayer.frame = CGRectMake(0, height*i, width, height);
                clipLayer.anchorPoint = CGPointMake(0.5, i % 2);
                int symbol = i % 2 == 0 ? 0 : 1;
                clipLayer.position = CGPointMake(width/2, height*(i+symbol));

                [self addSublayer:clipLayer];
                [_foldLayers addObject:clipLayer];

                //add shadow layer
                CAGradientLayer* gradientLayer = [CAGradientLayer layer];
                if (i%2 == 0){
                    gradientLayer.colors = @[
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.05].CGColor,
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.6].CGColor
                                             ];
                }else{

                    gradientLayer.colors = @[
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.9].CGColor,
                                             (__bridge id)[UIColor colorWithWhite:0 alpha:0.55].CGColor
                                             ];
                }

                gradientLayer.startPoint = CGPointMake(0, 0);
                gradientLayer.endPoint = CGPointMake(0, 1);
                gradientLayer.frame = clipLayer.bounds;
                [clipLayer addSublayer:gradientLayer];

                if (clipImage)
                    CFRelease(clipImage);

            }
        }
            break;
        default:
            break;
    }

}

- (UIImage*)layerShot:(CALayer*)layer{

    if (layer){
        UIGraphicsBeginImageContext(self.targetLayer.bounds.size);
        UIGraphicsBeginImageContextWithOptions(self.targetLayer.bounds.size,YES,0.0);
        [layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        return resultingImage;
    }
    return nil;
}

- (id<QuickAnimation>)openFold{

    _foldAnimation.isReverse = YES;

    return _foldAnimation;
}

- (id<QuickAnimation>)closeFold{

    _foldAnimation.isReverse = NO;

    return _foldAnimation;
}

- (void)createFoldAnimation{

    //NSArray<CALayer*>* layers = _foldLayers;

    QuickAnimationFoldDirection direction = _foldDirection;
    NSMutableArray<NSValue*>* oldPostion = [NSMutableArray array];

    for (CALayer* l in _foldLayers){
        [oldPostion addObject:[NSValue valueWithCGPoint:l.position]];
    }

    __weak typeof(self) weakSelf = self;

    _foldAnimation = [[QuickAnimationTween alloc]initWithAnimationBlock:^(float current, float duration, float valueProgress) {

        __strong FoldLayer* strongSelf = weakSelf;

        CGFloat w = 0;
        CGFloat h = 0;

        for (int i=0;i<strongSelf.foldLayers.count;i++){

            CALayer* subLayer = strongSelf.foldLayers[i];

            //shadow opacity
            CALayer* shadow = subLayer.sublayers.lastObject;
            if ([shadow isKindOfClass:[CALayer class]]){
                shadow.opacity =  [NSValue floatWithFrom:0 to:1 progress:valueProgress];
            }
            if (i == 0){
                w = subLayer.bounds.size.width;
                h = subLayer.bounds.size.height;
            }
            CATransform3D nTransform = CATransform3DIdentity;

            CGFloat degree = M_PI / 2 * (i % 2 == 0 ? -1 : 1);

            switch (direction) {
                case QuickAnimationFoldTopToBottom:
                case QuickAnimationFoldBottomToTop:
                case QuickAnimationFoldVerticalFromMiddle:

                    nTransform = CATransform3DRotate(nTransform,
                                                     degree*valueProgress,
                                                     1, 0, 0);

                    break;
                case QuickAnimationFoldRightToLeft:
                case QuickAnimationFoldLeftToRight:
                case QuickAnimationFoldHorizentalFromMiddle:

                    nTransform = CATransform3DRotate(nTransform,
                                                     -degree*valueProgress,
                                                     0, 1, 0);

                    break;

                default:
                    break;
            }

            subLayer.transform = nTransform;

        }
        // set position
        {
            switch (direction) {
                case QuickAnimationFoldTopToBottom:
                case QuickAnimationFoldBottomToTop:
                case QuickAnimationFoldVerticalFromMiddle:
                {
                    //position
                    CGFloat eachWidth = cos(M_PI*valueProgress/2) * h;
                    CGFloat totalWidth = strongSelf.foldLayers.count * eachWidth;
                    CGFloat start = 0;
                    if (direction == QuickAnimationFoldBottomToTop){
                        start = strongSelf.foldLayers.count * h - totalWidth;
                    }else if (direction == QuickAnimationFoldVerticalFromMiddle){
                        start = (strongSelf.foldLayers.count * h - totalWidth) / 2;
                    }
                    for (int i = 0;i<strongSelf.foldLayers.count;i++){
                        CGPoint desPoint = CGPointMake(w/2, start + eachWidth * (i + i%2));
                        strongSelf.foldLayers[i].position = desPoint;
                    }
                    break;
                }

                case QuickAnimationFoldRightToLeft:
                case QuickAnimationFoldLeftToRight:
                case QuickAnimationFoldHorizentalFromMiddle:
                {
                    CGFloat eachWidth = cos(M_PI*valueProgress/2) * w;
                    CGFloat totalWidth = strongSelf.foldLayers.count * eachWidth;

                    CGFloat start = 0;
                    if (direction == QuickAnimationFoldRightToLeft){
                        start = strongSelf.foldLayers.count * w - totalWidth;
                    }else if (direction == QuickAnimationFoldHorizentalFromMiddle){
                        start = (strongSelf.foldLayers.count * w - totalWidth) / 2;
                    }
                    for (int i = 0;i<strongSelf.foldLayers.count;i++){
                        CGPoint desPoint = CGPointMake(start + eachWidth * (i + i%2), h/2 );
                        strongSelf.foldLayers[i].position = desPoint;
                    }

                    break;
                }
                default:
                    break;
            }

        }

        //hidden or not
        {

            strongSelf.targetLayer.hidden = (valueProgress != 0);
            strongSelf.hidden = (valueProgress == 0 || valueProgress >= 0.99);
        }
    }];
}

@end


text:
#include "../../includes/async_redis/parser/base_resp_parser.h"

#include "../../includes/async_redis/parser/number_parser.h"
#include "../../includes/async_redis/parser/bulk_string_parser.h"
#include "../../includes/async_redis/parser/array_parser.h"
#include "../../includes/async_redis/parser/error_parser.h"
#include "../../includes/async_redis/parser/simple_string_parser.h"

#include <iostream>

namespace async_redis {
namespace parser {

int
base_resp_parser::append_chunk(base_resp_parser::parser& data, const char* chunk, ssize_t length, bool &is_finished)
{
  if (data)
    goto handle;

  switch(static_cast<RespType>(chunk[0]))
  {
  case RespType::Err:
    data = std::make_shared<error_parser>();
    break;

  case RespType::Arr:
    data = std::make_shared<array_parser>();
    break;

  case RespType::Num:
    data = std::make_shared<number_parser>();
    break;

  case RespType::Str:
    data = std::make_shared<simple_string_parser>();
    break;

  case RespType::BulkStr:
    data = std::make_shared<bulk_string_parser>();
    break;

  default:
    /* std::cerr << "Parsed not initialized! MUST NOT Happen!" << std::endl; */
    //Todo: Exception!
    return 0;
  }

 handle:
  return data->parse_append(chunk, length, is_finished);
}

bool
base_resp_parser::is_array() const
{
  this->type() == RespType::Arr;
}

bool
base_resp_parser::is_number() const
{
  this->type() == RespType::Num;
}

bool
base_resp_parser::is_error() const
{
  this->type() == RespType::Err;
}

bool
base_resp_parser::is_string() const
{
  this->type() == RespType::BulkStr;
}

bool
base_resp_parser::is_enum() const
{
  this->type() == RespType::Str;
}

void
base_resp_parser::print()
{
  string type;
  switch(this->type()) {
  case RespType::BulkStr:
    type = "bulkstr";
    break;
  case RespType::Arr:
    type = "array";
    break;
  case RespType::Str:
    type = "str";
    break;
  case RespType::Num:
    type = "num";
    break;
  default:
    type = "err";
    break;
  }
  std::cout << "Type: " << type << " Value: " << to_string() << std::endl;
}

void
base_resp_parser::map(const base_resp_parser::caller_t &fn)
{
  fn(*this);
}

}}


text:
namespace TMC {

class SceneException : public std::exception {
public:
    SceneException(Vec3i problemPos);
    virtual ~SceneException() = default;

    virtual const char *what() const noexcept override;

protected:
    Vec3i m_pos;
};

}

#endif // SCENEEXCEPTION_H


text:
import { NativeModules } from 'react-native';

const { RNConfig } = NativeModules;

export default RNConfig;


text:
using System;

namespace Integration.Net6;

public class DateProvider : IDateProvider
{
    public DateTimeOffset GetDate() => DateTimeOffset.UtcNow;
}


text:
<?php

namespace ZfTable\Params;

use ZfTable\AbstractCommon;
use ZfTable\Config;

abstract class AbstractAdapter extends AbstractCommon
{

    /**
     * Get configuration of table
     *
     * @return \ZfTable\Options\ModuleOptions
     */
    public function getOptions()
    {
        return $this->getTable()->getOptions();
    }
}


text:
<?php

/**
 * Generates a PHPUnit test file for unit tests.
 *
 * @package    sfPHPUnit2Plugin
 * @subpackage task
 *
 * @author     Frank Stelzer <dev@frankstelzer.de>
 */
class sfPHPUnitGenerateUnitTestTask extends sfPHPUnitGenerateBaseTask
{
  /**
   * @see sfTask
   */
  protected function configure()
  {
    $this->addArguments(array(
      new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The unit test file name'),
    ));

    $this->addOptions(array(
      new sfCommandOption('overwrite', null, sfCommandOption::PARAMETER_NONE, 'Forces the task to overwrite any existing files'),
      new sfCommandOption('dir', null, sfCommandOption::PARAMETER_REQUIRED, 'A subfolder name, where the unit test should be saved to'),
    ));

    $this->namespace        = 'phpunit';
    $this->name             = 'generate-unit';
    $this->briefDescription = 'Generates a test case for unit tests';
    $this->detailedDescription = <<<EOF
The [phpunit:generate-unit|INFO] generates a test case for unit tests, which is lateron
executable with PHPUnit.

Call it with:

  [php symfony phpunit:generate-unit|INFO]
EOF;
  }

   /**
   * @see sfTask
   */
  protected function execute($arguments = array(), $options = array())
  {
    $this->createBootstrap();

    $template = $this->getTemplate('unit/unit_test.tpl');

    $filename = $arguments['name'] . 'Test.php';
    $replacePairs = array(
    '{test_class}' => $arguments['name'],
    '{dir}' => $options['dir']? '/../..' : '/..',
    );

    $rendered = $this->renderTemplate($template, $replacePairs);
    $this->saveFile($rendered, 'unit/'.($options['dir']? $options['dir'].'/' : '').$filename, $options);

    $optionsStr = '';
    if ($options['dir'])
    {
      $optionsStr .='--dir="'.$options['dir'].'" ';
    }

    $this->logSection('help', 'run this test with: ./symfony phpunit:test-unit '.$optionsStr.$arguments['name']);
  }
}


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<channels>
	<channel id="yt_bvb" type="youtube" label="Borussia Dortmund" value="bvb"/>
	<channel id="yt_sportlive" type="youtube" label="Sport LiveDortmund" value="SportLiveDortmund"/>
</channels>


text:
package org.apache.cassandra.repair.messages;

import java.io.IOException;

import org.apache.cassandra.db.TypeSizes;
import org.apache.cassandra.io.util.DataInputPlus;
import org.apache.cassandra.io.util.DataOutputPlus;
import org.apache.cassandra.repair.RepairJobDesc;
import org.apache.cassandra.utils.MerkleTree;

/**
 * ValidationComplete message is sent when validation compaction completed successfully.
 *
 * @since 2.0
 */
public class ValidationComplete extends RepairMessage
{
    public static MessageSerializer serializer = new ValidationCompleteSerializer();

    /** true if validation success, false otherwise */
    public final boolean success;
    /** Merkle hash tree response. Null if validation failed. */
    public final MerkleTree tree;

    public ValidationComplete(RepairJobDesc desc)
    {
        super(Type.VALIDATION_COMPLETE, desc);
        this.success = false;
        this.tree = null;
    }

    public ValidationComplete(RepairJobDesc desc, MerkleTree tree)
    {
        super(Type.VALIDATION_COMPLETE, desc);
        assert tree != null;
        this.success = true;
        this.tree = tree;
    }

    private static class ValidationCompleteSerializer implements MessageSerializer<ValidationComplete>
    {
        public void serialize(ValidationComplete message, DataOutputPlus out, int version) throws IOException
        {
            RepairJobDesc.serializer.serialize(message.desc, out, version);
            out.writeBoolean(message.success);
            if (message.success)
                MerkleTree.serializer.serialize(message.tree, out, version);
        }

        public ValidationComplete deserialize(DataInputPlus in, int version) throws IOException
        {
            RepairJobDesc desc = RepairJobDesc.serializer.deserialize(in, version);
            if (in.readBoolean())
            {
                MerkleTree tree = MerkleTree.serializer.deserialize(in, version);
                return new ValidationComplete(desc, tree);
            }
            else
            {
                return new ValidationComplete(desc);
            }
        }

        public long serializedSize(ValidationComplete message, int version)
        {
            long size = RepairJobDesc.serializer.serializedSize(message.desc, version);
            size += TypeSizes.sizeof(message.success);
            if (message.success)
                size += MerkleTree.serializer.serializedSize(message.tree, version);
            return size;
        }
    }
}


text:
<eveapi version="2">
    <currentTime>2015-05-22 20:28:34</currentTime>
    <result>
        <rowset name="types" key="typeID" columns="typeID,typeName">
            <row typeID="1" typeName="Unknown Type"/>
            <row typeID="2" typeName="Corporation"/>
            <row typeID="3" typeName="Region"/>
            <row typeID="4" typeName="Constellation"/>
        </rowset>
    </result>
    <cachedUntil>2015-05-22 21:28:34</cachedUntil>
</eveapi>


text:
title: What Should a Christian's Life Look Like?
testament: New
pastor: Jamie Mason
book: Matthew 5:1-12
audio: http://www.mecgoodnews.org/audio/160220202.mp3
service: Evening
---


text:
<?php

namespace Calam\Dbal\Tests;

use PHPUnit\Framework\TestCase;

/**
 * @author Benjamin Michalski <benjamin.michalski@gmail.com>
 */
abstract class BaseTest extends TestCase
{
    protected function setUp()
    {
        parent::setUp();
    }
}


text:
local Observable = require 'observable'

--- Returns an Observable that produces a single value representing the sum of the values produced
-- by the original.
-- @returns {Observable}
function Observable:sum()
  return self:reduce(function(x, y) return x + y end, 0)
end


text:
==================
Installation Guide
==================

Tuskar source code should be pulled directly from git::

    git clone https://github.com/tuskar/tuskar.git

Setting up a local environment for development can be done with tox::

    cd <your_src_dir>/tuskar

    # install prerequisites
    * Ubuntu/Debian:
    sudo apt-get install python-dev swig libssl-dev python-pip libmysqlclient-dev libxml2-dev libxslt-dev
    * Fedora/RHEL:
    sudo yum install python-devel swig openssl-devel python-pip mysql-devel libxml2-devel libxslt-devel
    # Note that as of Fedora 19, you need to use the community
      upstream for mysql, called mariadb-devel

    sudo easy_install nose
    sudo pip install virtualenv setuptools-git flake8 tox
    # With the exception of flake8, all of the above are also
      available for fedora via yum

    # create virtualenv
    tox -evenv -- echo 'done'

    # activate the virtualenv
    source .tox/venv/bin/activate

    # run testr init
    testr init

    # run pep8/flake8 checks
    flake8

    # run unit tests
    testr run

    # deactivate the virtualenv
    deactivate

For additional developer information, take a look at
`CONTRIBUTING.rst <https://github.com/tuskar/tuskar/blob/master/CONTRIBUTING.rst>`_
and the
`Tuskar website <https://github.com/tuskar/tuskar/blob/master/docs/index.rst>`_.


text:
namespace ui {

class SlideAnimationTest: public testing::Test {
 private:
  MessageLoopForUI message_loop_;
};

// Tests that delegate is not notified when animation is running and is deleted.
// (Such a scenario would cause problems for BoundsAnimator).
TEST_F(SlideAnimationTest, DontNotifyOnDelete) {
  TestAnimationDelegate delegate;
  scoped_ptr<SlideAnimation> animation(new SlideAnimation(&delegate));

  // Start the animation.
  animation->Show();

  // Delete the animation.
  animation.reset();

  // Make sure the delegate wasn't notified.
  EXPECT_FALSE(delegate.finished());
  EXPECT_FALSE(delegate.canceled());
}

}  // namespace ui


text:
require 'yaml'
require 'json'
require 'erb'

module Configulator
  class ConfStruct < Struct
    def get_binding
      binding
    end
  end

  class ConfigTemplate
    def initialize(conf, environment = nil)
      if environment.nil?
        @binding = make_binding conf
      else
        raise "No such environment: #{environment}" unless conf.has_key? environment
        env = conf[environment]
        env = conf['default'].merge(env) if conf.has_key? 'default'
        env['environment_name'] = environment
        @binding = make_binding env
      end
    end

    def convert_file(infile)
      ERB.new(File.read(infile)).result(@binding)
    end

    def get(name)
      eval name.to_s, @binding
    end

    def method_missing(name, *args, &block)
      get name
    end

    private
    def collapse(json, prefix=nil)
      prefix ||= []
      results = []
      json.each do |key, value|
        keys = prefix + [key.gsub('-', '_')]
        if value.is_a?(Hash)
          results += collapse(value, keys)
        else
          results << [keys.join('_'), value]
        end
      end
      results
    end

    def make_binding(env)
      # first, collapse if there is a heirarchy
      env = collapse(env).each_with_object({}) do |kv,h|
        h[kv.first] = kv.last
      end

      klass = ConfStruct.new *env.keys.map(&:intern)
      k = klass.new *env.values
      # support up to 5 levels of embedding
      5.times do
        values = env.values.map do |v|
          v.is_a?(String) ? ERB.new(v).result(k.get_binding) : v
        end
        k = klass.new *values
      end
      k.get_binding
    end
  end

  class JSONConfigTemplate < ConfigTemplate
    def initialize(config, environment = nil)
      super JSON.parse(config), environment
    end
  end

  class YAMLConfigTemplate < ConfigTemplate
    def initialize(config, environment = nil)
      super YAML.load(config), environment
    end
  end
end


text:
using System;
using MasterInstaller.Components.Controls;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace MasterInstaller.Components.InstallableComponents.DirectX
{
    public class DirectXComponent : InstallableComponentBase
    {
        protected override BasePage CreateControl()
        {
            throw new NotImplementedException();
        }

        public DirectXComponent()
        {
            //var control = new DefaultInstallControl {InstallName = Name, InstallDescription = Description};

            //Control = control;
        }

        public override string Key
        {
            get { return "DirectX"; }
        }

        public override sealed string Name
        {
            get { return "DirectX"; }
        }

        public override sealed string Description
        {
            get { return "The latest version of DirectX is needed for some of FRBDK's tools."; }
        }

        public override bool IsTypical
        {
            get { return true; }
        }

        public override async Task<int> Install()
        {
            const string ExecutableName =
       "DXSETUP.exe";

            List<string> dependencies = new List<string>();
            dependencies.Add("APR2007_d3dx9_33_x86.cab");
            dependencies.Add("APR2007_xinput_x86.cab");
            dependencies.Add("DSETUP.dll");
            dependencies.Add("dsetup32.dll");

            dependencies.Add("dxupdate.cab");
            dependencies.Add("Feb2010_X3DAudio_x86.cab");
            dependencies.Add("Feb2010_xact_x86.cab");
            dependencies.Add("Feb2010_XAudio_x86.cab");
            dependencies.Add("Mar2009_d3dx9_41_x86.cab");

            var details =
                new ExecutableDetails
                {
                    ExecutableName = ExecutableName,
                    AdditionalFiles = dependencies
                };

            var result = await Install(details);

            return result;
        }

        //public override void MovedToComponent()
        //{
        //    base.MovedToComponent();

        //    switch (ComponentStorage.GetValue<SetupTypeComponent.SetupType>(SetupTypeComponent.SetupTypeName))
        //    {
        //        case SetupTypeComponent.SetupType.Typical:
        //            if (IsTypical)
        //            {
        //                Install(new ExecutableDetails { ExecutableName = ExecutableName, Parameters = new [] { "/Q" } });
        //            }
        //            break;
        //        case SetupTypeComponent.SetupType.Complete:
        //            Install(new ExecutableDetails { ExecutableName = ExecutableName, Parameters = new[] { "/Q" } });
        //            break;
        //        case SetupTypeComponent.SetupType.Custom:
        //            if (ComponentStorage.GetValue<bool>(Key))
        //            {
        //                Install(new ExecutableDetails { ExecutableName = ExecutableName, Parameters = new[] { "/Q" } });
        //            }
        //            break;
        //        default:
        //            throw new NotImplementedException();
        //    }

        //    OnMoveToNext();
        //}
    }
}


text:
package net.runelite.client.plugins.menuentryswapper;

import java.util.function.Predicate;
import java.util.function.Supplier;
import lombok.Value;

@Value
class Swap
{
	private Predicate<String> optionPredicate;
	private Predicate<String> targetPredicate;
	private String swappedOption;
	private Supplier<Boolean> enabled;
	private boolean strict;
}


text:
package com.ve.test.core;

/**
 * Created by boma on 01/11/2016.
 */
public interface iPassword {
    public String returnPassWord(String userId);
    public boolean verifyPassword(String userId,String passwordToBeCheck);
    public iAlgorithm algorithmGenerator(String algorithmClassName);
    public boolean passwordExpired(Long timeToCheck,int expiredTime);
}