text:
> JavaScript code coverage split by commit

[![NPM][tested-commits-icon] ][tested-commits-url]

[![Build status][tested-commits-ci-image] ][tested-commits-ci-url]
[![dependencies][tested-commits-dependencies-image] ][tested-commits-dependencies-url]
[![devdependencies][tested-commits-devdependencies-image] ][tested-commits-devdependencies-url]
[![Codacy Badge][tested-commits-codacy-image] ][tested-commits-codacy-url]

[tested-commits-icon]: https://nodei.co/npm/tested-commits.png?downloads=true
[tested-commits-url]: https://npmjs.org/package/tested-commits
[tested-commits-ci-image]: https://travis-ci.org/bahmutov/tested-commits.png?branch=master
[tested-commits-ci-url]: https://travis-ci.org/bahmutov/tested-commits
[tested-commits-dependencies-image]: https://david-dm.org/bahmutov/tested-commits.png
[tested-commits-dependencies-url]: https://david-dm.org/bahmutov/tested-commits
[tested-commits-devdependencies-image]: https://david-dm.org/bahmutov/tested-commits/dev-status.png
[tested-commits-devdependencies-url]: https://david-dm.org/bahmutov/tested-commits#info=devDependencies
[tested-commits-codacy-image]: https://www.codacy.com/project/badge/a5a2347fd20446dfa100b1535e0183b7
[tested-commits-codacy-url]: https://www.codacy.com/public/bahmutov/tested-commits.git

Read [Code coverage by commit](http://glebbahmutov.com/blog/code-coverage-by-commit/).

```
tested-commits - JavaScript code coverage split by commit
  version: 0.5.5
  author: "Gleb Bahmutov <gleb.bahmutov@gmail.com>"

Options:
  --version, -v  show version and exit                          [default: false]
  --repo         git repo path                                  [default: "."]
  --reset, -r    erase previously collected coverage            [default: false]
  --commits, -c  commit filter, for example pick last two -c 2  [default: 5]
  --update, -u   path to JSON coverage file to update with
  --files, -f    filter input files expression
  --open         open all current HTML reports

```

### Selecting commits

You can pick commits to track coverage for using `--commits` option.

* `--commits <N>` picks last N commits to look at
* `--commits <SHA-1>` picks commit with full SHA id (40 hex characters)
* `--commits <short SHA-1>` picks commit with short SHA id (7 hex characters), usually
displayed when you call `git log --oneline` inside a repo.
* `--commits <part of the commit message>` finds latest commit that contains exact message.

### Selecting coverage

You can update current coverage from a file or url. Just make sure
the coverage JSON was generated using [istanbul](https://www.npmjs.org/package/istanbul).
Some tools that use istanbul are [Karma](https://www.npmjs.org/package/karma),
[gt](https://github.com/bahmutov/gt) and [was-tested](https://github.com/bahmutov/was-tested).

* `--update <path/to/cover.json>` reads file from disk
* `--update <hostname/url/to/coverage>` loads JSON file from given url

After loading the combined coverage information, each commit's data will be updated
and saved again. Multiple updates keep incrementing the counters inside the individual commits.

### Small print

Author: Gleb Bahmutov © 2014

* [@bahmutov](https://twitter.com/bahmutov)
* [glebbahmutov.com](http://glebbahmutov.com)
* [blog](http://glebbahmutov.com/blog/)

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet /
[open issue](https://github.com/bahmutov/tested-commits/issues) on Github

## MIT License

The MIT License (MIT)

Copyright (c) 2014 Gleb Bahmutov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
param(
    [string]$sourceDirectory  = "",
    [string]$destinationDirectory = ""
)

$sourceDirFileCount = $(Get-ChildItem $sourceDirectory | Measure-Object ).Count
Write-Host "Source: "
Write-Host "$sourceDirectory [$sourceDirFileCount files]"
Write-Host "Destination: "
Write-Host $destinationDirectory

$counter = 0
Write-Output "Copying files:"
foreach($file in Get-ChildItem $sourceDirectory)
{
    $counter++
    Write-Host "[$counter/$sourceDirFileCount] $($file.FullName)"
    $filePath = $file.FullName
    $fileName = $file.Name
    $outputFilePath = "$destinationDirectory/$fileName"
    Copy-Item -Force $filePath -Destination $outputFilePath
    $(Get-Item $outputFilePath).lastwritetime=$(Get-Date)

}

redpajama_set_name: RedPajamaGithub


text:
module GitHubApi
	class Organization
    attr_accessor :fq_repo_name, :repo, :client

    def initialize(octokit_org, user)
      @client = user.client
      @name = octokit_org.login
      load_organization_members
		end

    def member?(user)
      begin
        octokit_user = GitHubApi.execute(@client, :user, user)
        return true
      rescue Octokit::NotFound
        return false
      end
      @organization_members.include?(octokit_user.login)
    end

    def get_repository(repo_name)
      @fq_repo_name  = "#{@name}/#{repo_name}"
      octokit_repo   = GitHubApi.execute(@client, :repo, @fq_repo_name)
      @repo = Repo.new(octokit_repo, self)
    end

    private

    def load_organization_members
      @organization_members = Set.new
      octokit_members = GitHubApi.execute(@client, :organization_members, @name)

      octokit_members.collect do |members_hash|
        @organization_members.add(members_hash["login"])
      end
    end
	end
end


text:
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.badlogic.gdx.physics.bullet.collision;

import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;

public class btDbvt extends BulletBase {
	private long swigCPtr;

	protected btDbvt(final String className, long cPtr, boolean cMemoryOwn) {
		super(className, cPtr, cMemoryOwn);
		swigCPtr = cPtr;
	}

	/** Construct a new btDbvt, normally you should not need this constructor it's intended for low-level usage. */
	public btDbvt(long cPtr, boolean cMemoryOwn) {
		this("btDbvt", cPtr, cMemoryOwn);
		construct();
	}

	@Override
	protected void reset(long cPtr, boolean cMemoryOwn) {
		if (!destroyed)
			destroy();
		super.reset(swigCPtr = cPtr, cMemoryOwn);
	}

	public static long getCPtr(btDbvt obj) {
		return (obj == null) ? 0 : obj.swigCPtr;
	}

	@Override
	protected void finalize() throws Throwable {
		if (!destroyed)
			destroy();
		super.finalize();
	}

  @Override protected synchronized void delete() {
		if (swigCPtr != 0) {
			if (swigCMemOwn) {
				swigCMemOwn = false;
				CollisionJNI.delete_btDbvt(swigCPtr);
			}
			swigCPtr = 0;
		}
		super.delete();
	}

  static public class sStkNN extends BulletBase {
  	private long swigCPtr;

  	protected sStkNN(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new sStkNN, normally you should not need this constructor it's intended for low-level usage. */
  	public sStkNN(long cPtr, boolean cMemoryOwn) {
  		this("sStkNN", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(sStkNN obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_sStkNN(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void setA(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkNN_a_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getA() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkNN_a_get(swigCPtr, this), false);
  }

    public void setB(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkNN_b_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getB() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkNN_b_get(swigCPtr, this), false);
  }

    public sStkNN() {
      this(CollisionJNI.new_btDbvt_sStkNN__SWIG_0(), true);
    }

    public sStkNN(btDbvtNode na, btDbvtNode nb) {
      this(CollisionJNI.new_btDbvt_sStkNN__SWIG_1(btDbvtNode.getCPtr(na), na, btDbvtNode.getCPtr(nb), nb), true);
    }

  }

  static public class sStkNP extends BulletBase {
  	private long swigCPtr;

  	protected sStkNP(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new sStkNP, normally you should not need this constructor it's intended for low-level usage. */
  	public sStkNP(long cPtr, boolean cMemoryOwn) {
  		this("sStkNP", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(sStkNP obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_sStkNP(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void setNode(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkNP_node_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getNode() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkNP_node_get(swigCPtr, this), false);
  }

    public void setMask(int value) {
      CollisionJNI.btDbvt_sStkNP_mask_set(swigCPtr, this, value);
    }

    public int getMask() {
      return CollisionJNI.btDbvt_sStkNP_mask_get(swigCPtr, this);
    }

    public sStkNP(btDbvtNode n, long m) {
      this(CollisionJNI.new_btDbvt_sStkNP(btDbvtNode.getCPtr(n), n, m), true);
    }

  }

  static public class sStkNPS extends BulletBase {
  	private long swigCPtr;

  	protected sStkNPS(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new sStkNPS, normally you should not need this constructor it's intended for low-level usage. */
  	public sStkNPS(long cPtr, boolean cMemoryOwn) {
  		this("sStkNPS", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(sStkNPS obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_sStkNPS(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void setNode(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkNPS_node_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getNode() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkNPS_node_get(swigCPtr, this), false);
  }

    public void setMask(int value) {
      CollisionJNI.btDbvt_sStkNPS_mask_set(swigCPtr, this, value);
    }

    public int getMask() {
      return CollisionJNI.btDbvt_sStkNPS_mask_get(swigCPtr, this);
    }

    public void setValue(float value) {
      CollisionJNI.btDbvt_sStkNPS_value_set(swigCPtr, this, value);
    }

    public float getValue() {
      return CollisionJNI.btDbvt_sStkNPS_value_get(swigCPtr, this);
    }

    public sStkNPS() {
      this(CollisionJNI.new_btDbvt_sStkNPS__SWIG_0(), true);
    }

    public sStkNPS(btDbvtNode n, long m, float v) {
      this(CollisionJNI.new_btDbvt_sStkNPS__SWIG_1(btDbvtNode.getCPtr(n), n, m, v), true);
    }

  }

  static public class sStkCLN extends BulletBase {
  	private long swigCPtr;

  	protected sStkCLN(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new sStkCLN, normally you should not need this constructor it's intended for low-level usage. */
  	public sStkCLN(long cPtr, boolean cMemoryOwn) {
  		this("sStkCLN", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(sStkCLN obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_sStkCLN(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void setNode(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkCLN_node_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getNode() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkCLN_node_get(swigCPtr, this), false);
  }

    public void setParent(btDbvtNode value) {
      CollisionJNI.btDbvt_sStkCLN_parent_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
    }

    public btDbvtNode getParent() {
  	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_sStkCLN_parent_get(swigCPtr, this), false);
  }

    public sStkCLN(btDbvtNode n, btDbvtNode p) {
      this(CollisionJNI.new_btDbvt_sStkCLN(btDbvtNode.getCPtr(n), n, btDbvtNode.getCPtr(p), p), true);
    }

  }

  static public class IWriter extends BulletBase {
  	private long swigCPtr;

  	protected IWriter(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new IWriter, normally you should not need this constructor it's intended for low-level usage. */
  	public IWriter(long cPtr, boolean cMemoryOwn) {
  		this("IWriter", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(IWriter obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_IWriter(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void Prepare(btDbvtNode root, int numnodes) {
      CollisionJNI.btDbvt_IWriter_Prepare(swigCPtr, this, btDbvtNode.getCPtr(root), root, numnodes);
    }

    public void WriteNode(btDbvtNode arg0, int index, int parent, int child0, int child1) {
      CollisionJNI.btDbvt_IWriter_WriteNode(swigCPtr, this, btDbvtNode.getCPtr(arg0), arg0, index, parent, child0, child1);
    }

    public void WriteLeaf(btDbvtNode arg0, int index, int parent) {
      CollisionJNI.btDbvt_IWriter_WriteLeaf(swigCPtr, this, btDbvtNode.getCPtr(arg0), arg0, index, parent);
    }

  }

  static public class IClone extends BulletBase {
  	private long swigCPtr;

  	protected IClone(final String className, long cPtr, boolean cMemoryOwn) {
  		super(className, cPtr, cMemoryOwn);
  		swigCPtr = cPtr;
  	}

  	/** Construct a new IClone, normally you should not need this constructor it's intended for low-level usage. */
  	public IClone(long cPtr, boolean cMemoryOwn) {
  		this("IClone", cPtr, cMemoryOwn);
  		construct();
  	}

  	@Override
  	protected void reset(long cPtr, boolean cMemoryOwn) {
  		if (!destroyed)
  			destroy();
  		super.reset(swigCPtr = cPtr, cMemoryOwn);
  	}

  	public static long getCPtr(IClone obj) {
  		return (obj == null) ? 0 : obj.swigCPtr;
  	}

  	@Override
  	protected void finalize() throws Throwable {
  		if (!destroyed)
  			destroy();
  		super.finalize();
  	}

    @Override protected synchronized void delete() {
  		if (swigCPtr != 0) {
  			if (swigCMemOwn) {
  				swigCMemOwn = false;
  				CollisionJNI.delete_btDbvt_IClone(swigCPtr);
  			}
  			swigCPtr = 0;
  		}
  		super.delete();
  	}

    public void CloneLeaf(btDbvtNode arg0) {
      CollisionJNI.btDbvt_IClone_CloneLeaf(swigCPtr, this, btDbvtNode.getCPtr(arg0), arg0);
    }

    public IClone() {
      this(CollisionJNI.new_btDbvt_IClone(), true);
    }

  }

  public void setRoot(btDbvtNode value) {
    CollisionJNI.btDbvt_root_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
  }

  public btDbvtNode getRoot() {
	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_root_get(swigCPtr, this), false);
}

  public void setFree(btDbvtNode value) {
    CollisionJNI.btDbvt_free_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
  }

  public btDbvtNode getFree() {
	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_free_get(swigCPtr, this), false);
}

  public void setLkhd(int value) {
    CollisionJNI.btDbvt_lkhd_set(swigCPtr, this, value);
  }

  public int getLkhd() {
    return CollisionJNI.btDbvt_lkhd_get(swigCPtr, this);
  }

  public void setLeaves(int value) {
    CollisionJNI.btDbvt_leaves_set(swigCPtr, this, value);
  }

  public int getLeaves() {
    return CollisionJNI.btDbvt_leaves_get(swigCPtr, this);
  }

  public void setOpath(long value) {
    CollisionJNI.btDbvt_opath_set(swigCPtr, this, value);
  }

  public long getOpath() {
    return CollisionJNI.btDbvt_opath_get(swigCPtr, this);
  }

  public void setStkStack(SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t value) {
    CollisionJNI.btDbvt_stkStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t.getCPtr(value));
  }

  public SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t getStkStack() {
    long cPtr = CollisionJNI.btDbvt_stkStack_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t(cPtr, false);
  }

  public void setRayTestStack(SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t value) {
    CollisionJNI.btDbvt_rayTestStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(value));
  }

  public SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t getRayTestStack() {
    long cPtr = CollisionJNI.btDbvt_rayTestStack_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t(cPtr, false);
  }

  public btDbvt() {
    this(CollisionJNI.new_btDbvt(), true);
  }

  public void clear() {
    CollisionJNI.btDbvt_clear(swigCPtr, this);
  }

  public boolean empty() {
    return CollisionJNI.btDbvt_empty(swigCPtr, this);
  }

  public void optimizeBottomUp() {
    CollisionJNI.btDbvt_optimizeBottomUp(swigCPtr, this);
  }

  public void optimizeTopDown(int bu_treshold) {
    CollisionJNI.btDbvt_optimizeTopDown__SWIG_0(swigCPtr, this, bu_treshold);
  }

  public void optimizeTopDown() {
    CollisionJNI.btDbvt_optimizeTopDown__SWIG_1(swigCPtr, this);
  }

  public void optimizeIncremental(int passes) {
    CollisionJNI.btDbvt_optimizeIncremental(swigCPtr, this, passes);
  }

  public btDbvtNode insert(btDbvtAabbMm box, long data) {
	return btDbvtNode.internalTemp(CollisionJNI.btDbvt_insert(swigCPtr, this, btDbvtAabbMm.getCPtr(box), box, data), false);
}

  public void update(btDbvtNode leaf, int lookahead) {
    CollisionJNI.btDbvt_update__SWIG_0(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, lookahead);
  }

  public void update(btDbvtNode leaf) {
    CollisionJNI.btDbvt_update__SWIG_1(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
  }

  public void update(btDbvtNode leaf, btDbvtAabbMm volume) {
    CollisionJNI.btDbvt_update__SWIG_2(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume);
  }

  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity, float margin) {
    return CollisionJNI.btDbvt_update__SWIG_3(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, velocity, margin);
  }

  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity) {
    return CollisionJNI.btDbvt_update__SWIG_4(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, velocity);
  }

  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, float margin) {
    return CollisionJNI.btDbvt_update__SWIG_5(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, margin);
  }

  public void remove(btDbvtNode leaf) {
    CollisionJNI.btDbvt_remove(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
  }

  public void write(btDbvt.IWriter iwriter) {
    CollisionJNI.btDbvt_write(swigCPtr, this, btDbvt.IWriter.getCPtr(iwriter), iwriter);
  }

  public void clone(btDbvt dest, btDbvt.IClone iclone) {
    CollisionJNI.btDbvt_clone__SWIG_0(swigCPtr, this, btDbvt.getCPtr(dest), dest, btDbvt.IClone.getCPtr(iclone), iclone);
  }

  public void clone(btDbvt dest) {
    CollisionJNI.btDbvt_clone__SWIG_1(swigCPtr, this, btDbvt.getCPtr(dest), dest);
  }

  public static int maxdepth(btDbvtNode node) {
    return CollisionJNI.btDbvt_maxdepth(btDbvtNode.getCPtr(node), node);
  }

  public static int countLeaves(btDbvtNode node) {
    return CollisionJNI.btDbvt_countLeaves(btDbvtNode.getCPtr(node), node);
  }

  public static void extractLeaves(btDbvtNode node, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t leaves) {
    CollisionJNI.btDbvt_extractLeaves(btDbvtNode.getCPtr(node), node, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(leaves));
  }

  public static void benchmark() {
    CollisionJNI.btDbvt_benchmark();
  }

  public static void enumNodes(btDbvtNode root, ICollide policy) {
    CollisionJNI.btDbvt_enumNodes(btDbvtNode.getCPtr(root), root, ICollide.getCPtr(policy), policy);
  }

  public static void enumLeaves(btDbvtNode root, ICollide policy) {
    CollisionJNI.btDbvt_enumLeaves(btDbvtNode.getCPtr(root), root, ICollide.getCPtr(policy), policy);
  }

  public void collideTT(btDbvtNode root0, btDbvtNode root1, ICollide policy) {
    CollisionJNI.btDbvt_collideTT(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1), root1, ICollide.getCPtr(policy), policy);
  }

  public void collideTTpersistentStack(btDbvtNode root0, btDbvtNode root1, ICollide policy) {
    CollisionJNI.btDbvt_collideTTpersistentStack(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1), root1, ICollide.getCPtr(policy), policy);
  }

  public void collideTV(btDbvtNode root, btDbvtAabbMm volume, ICollide policy) {
    CollisionJNI.btDbvt_collideTV(swigCPtr, this, btDbvtNode.getCPtr(root), root, btDbvtAabbMm.getCPtr(volume), volume, ICollide.getCPtr(policy), policy);
  }

  public void collideTVNoStackAlloc(btDbvtNode root, btDbvtAabbMm volume, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t stack, ICollide policy) {
    CollisionJNI.btDbvt_collideTVNoStackAlloc(swigCPtr, this, btDbvtNode.getCPtr(root), root, btDbvtAabbMm.getCPtr(volume), volume, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(stack), ICollide.getCPtr(policy), policy);
  }

  public static void rayTest(btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, ICollide policy) {
    CollisionJNI.btDbvt_rayTest(btDbvtNode.getCPtr(root), root, rayFrom, rayTo, ICollide.getCPtr(policy), policy);
  }

  public void rayTestInternal(btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, Vector3 rayDirectionInverse, long[] signs, float lambda_max, Vector3 aabbMin, Vector3 aabbMax, ICollide policy) {
    CollisionJNI.btDbvt_rayTestInternal(swigCPtr, this, btDbvtNode.getCPtr(root), root, rayFrom, rayTo, rayDirectionInverse, signs, lambda_max, aabbMin, aabbMax, ICollide.getCPtr(policy), policy);
  }

  public static void collideKDOP(btDbvtNode root, btVector3 normals, java.nio.FloatBuffer offsets, int count, ICollide policy) {
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideKDOP__SWIG_0(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, count, ICollide.getCPtr(policy), policy);
    }
  }

  public static void collideOCL(btDbvtNode root, btVector3 normals, java.nio.FloatBuffer offsets, Vector3 sortaxis, int count, ICollide policy, boolean fullsort) {
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideOCL__SWIG_0(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, sortaxis, count, ICollide.getCPtr(policy), policy, fullsort);
    }
  }

  public static void collideOCL(btDbvtNode root, btVector3 normals, java.nio.FloatBuffer offsets, Vector3 sortaxis, int count, ICollide policy) {
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideOCL__SWIG_1(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, sortaxis, count, ICollide.getCPtr(policy), policy);
    }
  }

  public static void collideTU(btDbvtNode root, ICollide policy) {
    CollisionJNI.btDbvt_collideTU(btDbvtNode.getCPtr(root), root, ICollide.getCPtr(policy), policy);
  }

  public static int nearest(java.nio.IntBuffer i, btDbvt.sStkNPS a, float v, int l, int h) {
    assert i.isDirect() : "Buffer must be allocated direct.";
    {
      return CollisionJNI.btDbvt_nearest(i, btDbvt.sStkNPS.getCPtr(a), a, v, l, h);
    }
  }

  public static int allocate(SWIGTYPE_p_btAlignedObjectArrayT_int_t ifree, SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t stock, btDbvt.sStkNPS value) {
    return CollisionJNI.btDbvt_allocate(SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(ifree), SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t.getCPtr(stock), btDbvt.sStkNPS.getCPtr(value), value);
  }

  public static void collideKDOP(btDbvtNode root, java.nio.FloatBuffer normals, java.nio.FloatBuffer offsets, int count, ICollide policy) {
    assert normals.isDirect() : "Buffer must be allocated direct.";
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideKDOP__SWIG_1(btDbvtNode.getCPtr(root), root, normals, offsets, count, ICollide.getCPtr(policy), policy);
    }
  }

  public static void collideOCL(btDbvtNode root, java.nio.FloatBuffer normals, java.nio.FloatBuffer offsets, Vector3 sortaxis, int count, ICollide policy, boolean fullsort) {
    assert normals.isDirect() : "Buffer must be allocated direct.";
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideOCL__SWIG_2(btDbvtNode.getCPtr(root), root, normals, offsets, sortaxis, count, ICollide.getCPtr(policy), policy, fullsort);
    }
  }

  public static void collideOCL(btDbvtNode root, java.nio.FloatBuffer normals, java.nio.FloatBuffer offsets, Vector3 sortaxis, int count, ICollide policy) {
    assert normals.isDirect() : "Buffer must be allocated direct.";
    assert offsets.isDirect() : "Buffer must be allocated direct.";
    {
      CollisionJNI.btDbvt_collideOCL__SWIG_3(btDbvtNode.getCPtr(root), root, normals, offsets, sortaxis, count, ICollide.getCPtr(policy), policy);
    }
  }

  public final static int SIMPLE_STACKSIZE = 64;
  public final static int DOUBLE_STACKSIZE = SIMPLE_STACKSIZE*2;

}


text:
import {Component} from 'angular2/core';
import {NgFor, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/common';
import {Router} from 'angular2/router';
import {GithubInformationService} from '../../shared/services/github-information.service';

@Component({
  selector: 'sd-home',
  moduleId: module.id,
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css'],
  directives: [NgFor, NgClass, FORM_DIRECTIVES, CORE_DIRECTIVES]
})
export class HomeComponent {
  repos: Array<Object>;
  visible: Boolean;

  constructor(public gh: GithubInformationService, private _router: Router) {
    this.visible = false;
  }

  onSelect(event, repo) {
    this._router.navigate( ['RepoDetail', { repoId: repo.name, ownerId: repo.owner.login }] );
  }

  /*
   * @param name any text as input.
   */
  search(keyCode, name: string): any {
    if(!keyCode || keyCode === 13) {
      this.gh.search(name).subscribe(repos => {
        this.repos = repos.items;
        this.visible = true;
      });
    }
  }
}


text:
from django.core.urlresolvers import reverse

from rest_framework import serializers
from rest_framework.compat import is_authenticated

from friendship.models import Follow

from shmitter.likes.services import get_liked
from shmitter.tweets.models import Tweet
from shmitter.tweets.serializers import TweetSerializer
from .models import User

class UserBasicInfoSerializer(serializers.ModelSerializer):

    class Meta:
        model = User
        fields = (
            'username',
            'full_name',
            'about',
        )

class UserSerializer(serializers.ModelSerializer):
    password = serializers.CharField(
        max_length=128,
        min_length=8,
        write_only=True
    )

    is_follows = serializers.SerializerMethodField()
    tweets = serializers.SerializerMethodField()
    retweets = serializers.SerializerMethodField()
    liked_tweets = serializers.SerializerMethodField()

    api = serializers.SerializerMethodField()

    class Meta:
        model = User
        fields = (
            'username',
            'email',
            'full_name',
            'about',
            'password',
            'is_follows',
            'total_tweets',
            'total_followers',
            'total_following',
            'tweets',
            'retweets',
            'liked_tweets',
            'api',
        )

    def create(self, validated_data):
        return User.objects.create_user(**validated_data)

    def get_is_follows(self, obj) -> bool:
        """
        Check if a `request.user` follows this user (`obj`).
        """
        follower = self.context.get('request').user
        if not is_authenticated(follower):
            return False
        followee = obj
        return Follow.objects.follows(
            follower=follower, followee=followee)

    def get_tweets(self, obj):
        return TweetSerializer(
            obj.tweets.all(),
            many=True,
            context=self.context
        ).data

    def get_retweets(self, obj):
        return TweetSerializer(
            obj.retweets.all(),
            many=True,
            context=self.context
        ).data

    def get_liked_tweets(self, obj):
        return TweetSerializer(
            get_liked(Tweet, obj),
            many=True,
            context=self.context
        ).data

    def get_api(self, obj):
        return {
            'self': reverse(
                'api:user-detail',
                kwargs={
                    'username': obj.username
                }
            ),
            'follow': reverse(
                'api:user-follow',
                kwargs={
                    'username': obj.username
                }
            ),
            'unfollow': reverse(
                'api:user-unfollow',
                kwargs={
                    'username': obj.username
                }
            ),
            'followers': reverse(
                'api:user-followers',
                kwargs={
                    'username': obj.username
                }
            ),
            'following': reverse(
                'api:user-following',
                kwargs={
                    'username': obj.username
                }
            ),
        }


text:
package com.intellij.codeInspection.concurrencyAnnotations;

import com.intellij.codeInsight.daemon.GroupNames;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.*;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;

public class NonFinalFieldInImmutableInspection extends AbstractBaseJavaLocalInspectionTool {

  @Override
  @NotNull
  public String getGroupDisplayName() {
    return GroupNames.CONCURRENCY_ANNOTATION_ISSUES;
  }

  @Override
  @Nls
  @NotNull
  public String getDisplayName() {
    return "Non-final field in @Immutable class";
  }

  @Override
  @NotNull
  public String getShortName() {
    return "NonFinalFieldInImmutable";
  }

  @Override
  @NotNull
  public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
    return new JavaElementVisitor() {
      @Override
      public void visitField(PsiField field) {
        super.visitField(field);
        if (field.hasModifierProperty(PsiModifier.FINAL)) {
          return;
        }
        final PsiClass containingClass = field.getContainingClass();
        if (containingClass != null) {
          if (!JCiPUtil.isImmutable(containingClass)) {
            return;
          }
          holder.registerProblem(field.getNameIdentifier(), "Non-final field <code>#ref</code> in @Immutable class  #loc");
        }
      }
    };
  }
}


text:
#include <pcl/apps/modeler/render_window.h>
#include <pcl/apps/modeler/render_window_item.h>
#include <pcl/apps/modeler/scene_tree.h>
#include <pcl/apps/modeler/dock_widget.h>
#include <pcl/apps/modeler/main_window.h>
#include <vtkProp.h>
#include <vtkRenderer.h>
#include <vtkBoundingBox.h>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <vtkCubeAxesActor.h>
#include <vtkRendererCollection.h>

//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::RenderWindow::RenderWindow(RenderWindowItem* render_window_item, QWidget *parent, Qt::WFlags flags)
  : QVTKWidget(parent, flags),
  axes_(vtkSmartPointer<vtkCubeAxesActor>::New()),
  render_window_item_(render_window_item)
{
  setFocusPolicy(Qt::StrongFocus);
  initRenderer();
  updateAxes();
  setShowAxes(true);
}

//////////////////////////////////////////////////////////////////////////////////////////////
pcl::modeler::RenderWindow::~RenderWindow()
{
  DockWidget* dock_widget = dynamic_cast<DockWidget*>(parent());
  if (dock_widget != NULL)
  {
    MainWindow::getInstance().removeDockWidget(dock_widget);
    dock_widget->deleteLater();
  }

  return;
}

/////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::initRenderer()
{
  vtkSmartPointer<vtkRenderWindow> win = GetRenderWindow();
  vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
  win->AddRenderer(renderer);

  // FPS callback
  //vtkSmartPointer<vtkTextActor> txt = vtkSmartPointer<vtkTextActor>::New ();
  //typedef pcl::visualization::FPSCallback FPSCallback;
  //vtkSmartPointer<FPSCallback> update_fps = vtkSmartPointer<FPSCallback>::New ();
  //update_fps->setTextActor (txt);
  //renderer->AddObserver (vtkCommand::EndEvent, update_fps);
  //renderer->AddActor (txt);

  // Set up render window
  win->AlphaBitPlanesOff ();
  win->PointSmoothingOff ();
  win->LineSmoothingOff ();
  win->PolygonSmoothingOff ();
  win->SwapBuffersOn ();
  win->SetStereoTypeToAnaglyph ();
  win->GetInteractor()->SetDesiredUpdateRate (30.0);

  return;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::focusInEvent(QFocusEvent * event)
{
  dynamic_cast<SceneTree*>(render_window_item_->treeWidget())->selectRenderWindowItem(render_window_item_);

  QVTKWidget::focusInEvent(event);
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::setActive(bool flag)
{
  DockWidget* dock_widget = dynamic_cast<DockWidget*>(parent());
  if (dock_widget != NULL)
    dock_widget->setFocusBasedStyle(flag);

  return;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::setTitle(const QString& title)
{
  DockWidget* dock_widget = dynamic_cast<DockWidget*>(parent());
  if (dock_widget != NULL)
    dock_widget->setWindowTitle(title);

  return;
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::render()
{
  GetRenderWindow()->Render();
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::resetCamera()
{
  double bounds[6];
  GetRenderWindow()->GetRenderers()->GetFirstRenderer()->ComputeVisiblePropBounds(bounds);
  GetRenderWindow()->GetRenderers()->GetFirstRenderer()->ResetCamera(bounds);
  render();
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::getBackground(double& r, double& g, double& b)
{
  GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetBackground(r, g, b);
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::setBackground(double r, double g, double b)
{
  GetRenderWindow()->GetRenderers()->GetFirstRenderer()->SetBackground(r, g, b);
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::updateAxes()
{
  vtkBoundingBox bb;

  vtkActorCollection* actors = GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetActors();

  actors->InitTraversal();
  for (int i = 0, i_end = actors->GetNumberOfItems(); i < i_end; ++ i)
  {
    vtkActor* actor = actors->GetNextActor();
    if (actor == axes_.GetPointer())
      continue;

    double actor_bounds[6];
    actor->GetBounds(actor_bounds);
    bb.AddBounds(actor_bounds);
  }

  double bounds[6];
  bb.GetBounds(bounds);
  axes_->SetBounds(bounds);
  axes_->SetCamera(GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetActiveCamera());
}

//////////////////////////////////////////////////////////////////////////////////////////////
void
pcl::modeler::RenderWindow::setShowAxes(bool flag)
{
  if (flag)
    GetRenderWindow()->GetRenderers()->GetFirstRenderer()->AddActor(axes_);
  else
    GetRenderWindow()->GetRenderers()->GetFirstRenderer()->RemoveActor(axes_);

  return;
}


text:
/***
* Inferno Engine v4 2015-2017
* Written by Tomasz "Rex Dex" Jonarski
*
* [# filter: elements\controls\text #]
***/

#pragma once

#include "ui/toolkit/include/uiElement.h"

#include "base/font/include/fontGlyphBuffer.h"

namespace ui
{

    /// text navigation
    enum class TextNavigation
    {
        DocumentStart,
        LineStart,
        WordStart,
        PrevChar,
        PrevLineChar,
        NextChar,
        NextLineChar,
        WordEnd,
        LineEnd,
        DocumentEnd,
        PrevPage,
        NextPage,
    };

    /// cursor navigation position
    struct CursorNavigation
    {
        Int32 m_char;
        Float m_pixelOffset;

        FORCEINLINE CursorNavigation()
            : m_char(0)
            , m_pixelOffset(0.0f)
        {}

        FORCEINLINE CursorNavigation(const Int32 pos)
            : m_char(pos)
            , m_pixelOffset(0.0f)
        {}

        FORCEINLINE CursorNavigation(const Int32 pos, const Float offset)
            : m_char(pos)
            , m_pixelOffset(offset)
        {}

        FORCEINLINE CursorNavigation(const CursorNavigation& other) = default;
        FORCEINLINE CursorNavigation(CursorNavigation&& other) = default;
        FORCEINLINE CursorNavigation& operator=(const CursorNavigation& other) = default;
        FORCEINLINE CursorNavigation& operator=(CursorNavigation&& other) = default;
    };

    /// bounds of text character
    struct CharacterBounds
    {
        base::math::Vector2 m_boxMin;
        base::math::Vector2 m_boxMax;

        FORCEINLINE CharacterBounds()
            : m_boxMin(0,0)
            , m_boxMax(0,0)
        {}

        FORCEINLINE CharacterBounds(const base::math::Vector2& bmin, const base::math::Vector2& bmax)
            : m_boxMin(bmin)
            , m_boxMax(bmax)
        {}

        FORCEINLINE CharacterBounds(const Float minx, const Float miny, const Float maxx, const Float maxy)
            : m_boxMin(minx, miny)
            , m_boxMax(maxy, maxy)
        {}

        FORCEINLINE CharacterBounds(const CharacterBounds& other) = default;
        FORCEINLINE CharacterBounds(CharacterBounds&& other) = default;
        FORCEINLINE CharacterBounds& operator=(const CharacterBounds& other) = default;
        FORCEINLINE CharacterBounds& operator=(CharacterBounds&& other) = default;
    };

    /// helper class to deal with text editing
    class TextBuffer
    {
    public:
        TextBuffer();
        ~TextBuffer();

        /// get length of the text
        FORCEINLINE const Int32 getLength() const { return m_lastPos; }

        /// get cursor position
        FORCEINLINE const CursorNavigation getCursorPos() const { return m_cursorPos; }

        /// do we have selection ?
        FORCEINLINE const Bool hasSelection() const { return m_selectionEndPos != m_selectionStartPos; }

        /// get first selected position
        FORCEINLINE const Int32 getSelectionStartPos() const { return m_selectionStartPos; }

        /// get last selected position
        FORCEINLINE const Int32 getSelectionEndPos() const { return m_selectionEndPos; }

        /// get first highlighted position
        FORCEINLINE const Int32 getHighlightStartPos() const { return m_selectionStartPos; }

        /// get last highlighted position
        FORCEINLINE const Int32 getHighlightEndPos() const { return m_selectionStartPos; }

        /// is this a multi line text ?
        FORCEINLINE const Bool isMultiLine() const { return m_multiline; }

        /// get the wrapping with for the text presentation
        FORCEINLINE const Uint32 getWrapWidth() const { return m_wrapWidth; }

        /// get size of the all text in the buffer
        FORCEINLINE const Size& getSize() const { return m_totalSize; }

        ///---

        /// reset to contain text content
        void setText(const base::StringBuf& txt);

        /// set the additional text to print AT THE END (usually units)
        /// NOTE: this text is not editable but will be displayed normally
        void setPostfixText(const base::StringBuf& txt);

        /// set the additional text to print BEFORE (usually some form of console prompt)
        /// NOTE: this text is not editable but will be displayed normally
        void setPrefixText(const base::StringBuf& txt);

        /// setup styles
        void setStyle(const ParamTablePtr& params, const Float scale);

        /// enable disable the multi-line text edit mode
        void setMultiLine(const Bool isMultiLine);

        /// set the wrapping width, 0 to disable
        void setWrapWidth(const Uint32 wrapWidth);

        /// update layout information
        void updateLayout();

        //---

        /// find cursor position for given navigation mode
        const CursorNavigation findCursorPosition(const CursorNavigation currentPosition, const TextNavigation mode) const;

        /// find cursor position for given point
        const CursorNavigation findCursorPosition(const Position& pos) const;

        /// get bounds of given character
        const CharacterBounds getCharacterBounds(const Int32 index) const;

        /// reset selection
        void resetSelection();

        /// delete current selection
        void deleteSelection();

        /// set selection
        void setSelection(const Int32 start, const Int32 end);

        /// delete characters at given range
        void deleteCharacters(const Int32 start, const Int32 end);

        /// insert new characters at given position
        void insertCharacters(const Int32 pos, const base::StringBuf& txt);

        /// move cursor to given position
        void moveCursor(const CursorNavigation pos, const Bool extendSelection);

        ///--

        /// reset the highlight region
        void resetHighlight();

        /// set the highlight range for the text
        void setHighlight(const Int32 start, const Int32 end);

        ///--

        /// render text into canvas
        void renderText(const ElementArea& drawArea, CachedGeometryBuilder& builder) const;

        /// render cursor
        void renderCursor(const ElementArea& drawArea, const RenderingContext& ctx, const Float mergedOpacity) const;

        /// render selection area
        void renderSelection(const ElementArea& drawArea, const RenderingContext& ctx, const Float mergedOpacity) const;

        /// render highlight area
        void renderHighlight(const ElementArea& drawArea, const RenderingContext& ctx, const Float mergedOpacity) const;

        ///--

        /// retrieve printable text (UTF8)
        base::StringBuf getText() const;

        /// retrieve printable text for part of the buffer (UTF8)
        base::StringBuf getText(const Int32 startPos, const Int32 endPos) const;

        ///--

        /// invalidate cached geometry
        void invalidateGeometry();

    private:
        struct CharInfo : public base::font::GlyphBufferEntry
        {
            // char code of the text
            Uint32 m_code;

            // logical bounding box of the glyph
            CharacterBounds m_bounds;

            FORCEINLINE CharInfo(const Uint32 code)
                : m_code(code)
            {}
        };

        struct Row
        {
            Float m_minY;
            Float m_maxY;
            Int32 m_start;
            Int32 m_end;

            FORCEINLINE Row(const Float minY, const Float maxY, const Int32 start, const Int32 end)
                : m_minY(minY)
                , m_maxY(maxY)
                , m_start(start)
                , m_end(end)
            {}
        };

        typedef base::Array<CharInfo> TChars;
        TChars m_chars;

        TChars m_prefixChars;
        TChars m_postfixChars;

        typedef base::Array<Row> TRows;
        TRows m_rows;

        base::FontPtr m_font;
        Uint32 m_fontSize;

        Int32 m_lastPos;
        Int32 m_selectionStartPos;
        Int32 m_selectionEndPos;
        Int32 m_highlightStartPos;
        Int32 m_highlightEndPos;

        CursorNavigation m_cursorPos;

        Bool m_multiline;
        Uint32 m_wrapWidth;

        CharInfo m_finalGlyph;

        mutable CachedGeometry m_cachedCursorGeometry;
        mutable CachedGeometry m_cachedSelectionGeometry;
        mutable CachedGeometry m_cachedHighlightGeometry;

        ParamTablePtr m_cachedStyle;
        Float m_cachedScale;

        Size m_totalSize;

        void generateChars(const AnsiChar* txt, TChars& outChars) const;
        void generateLayout();

        void generateRangeBlock(const ElementArea& drawArea, const Int32 start, const Int32 end, const base::canvas::RenderStyle& style, CachedGeometry& outGeometry) const;

        const Bool lookupGlyphs();

        FORCEINLINE const CharInfo& getCharAt(const Int32 index) const
        {
            FATAL_ASSERT(index >= 0 && index <= m_lastPos);
            return (index == m_lastPos) ? m_finalGlyph : m_chars[index];
        }
    };

} // ui


text:
package controllers

import javax.inject.Inject

import data.SchemeClaimOps
import play.api.mvc._
import services.LevyApiService

import scala.concurrent.{ExecutionContext, Future}

class LevyController @Inject()(levyApi: LevyApiService, tokenHelper: AccessTokenHelper, claims: SchemeClaimOps)(implicit ec: ExecutionContext) extends Controller {

  def showEmpref(empref: String) = Action.async { implicit request =>
    claims.forEmpref(empref).flatMap {
      case Some(row) =>
        tokenHelper.freshenPrivilegedAccessToken.flatMap {
          case Some(authToken) =>
            levyApi.declarations(empref, authToken).map {
              case Right(decls) => Ok(views.html.declarations(decls))
              case Left(err) => InternalServerError(err)
            }
          case None => Future.successful(BadRequest("Unable to refresh access token"))
        }

      case None => Future.successful(NotFound)
    }
  }
}


text:
package org.gradle.tooling.events.internal;

import org.gradle.tooling.events.BinaryPluginIdentifier;

import javax.annotation.Nullable;

public class DefaultBinaryPluginIdentifier extends AbstractPluginIdentifier implements BinaryPluginIdentifier {

    private final String className;
    private final String pluginId;

    public DefaultBinaryPluginIdentifier(String displayName, String className, String pluginId) {
        super(displayName);
        this.className = className;
        this.pluginId = pluginId;
    }

    @Override
    public String getClassName() {
        return className;
    }

    @Nullable
    @Override
    public String getPluginId() {
        return pluginId;
    }

}


text:
namespace enterprise_management {
class BrowserReport;
}  // namespace enterprise_management

namespace enterprise_reporting {

// Android implementation of platform-specific info fetching for Enterprise
// browser report generation.
class BrowserReportGeneratorAndroid : public BrowserReportGenerator::Delegate {
 public:
  using ReportCallback = base::OnceCallback<void(
      std::unique_ptr<enterprise_management::BrowserReport>)>;

  BrowserReportGeneratorAndroid();
  BrowserReportGeneratorAndroid(const BrowserReportGeneratorAndroid&) = delete;
  BrowserReportGeneratorAndroid& operator=(
      const BrowserReportGeneratorAndroid&) = delete;
  ~BrowserReportGeneratorAndroid() override;

  // BrowserReportGenerator::Delegate implementation
  std::string GetExecutablePath() override;
  version_info::Channel GetChannel() override;
  std::vector<BrowserReportGenerator::ReportedProfileData> GetReportedProfiles()
      override;
  bool IsExtendedStableChannel() override;
  void GenerateBuildStateInfo(
      enterprise_management::BrowserReport* report) override;
  void GeneratePluginsIfNeeded(
      ReportCallback callback,
      std::unique_ptr<enterprise_management::BrowserReport> report) override;
};

}  // namespace enterprise_reporting

#endif  // CHROME_BROWSER_ENTERPRISE_REPORTING_BROWSER_REPORT_GENERATOR_ANDROID_H_


text:
mac-proxy-1 () {
    TRAPEXIT() {
        mac-proxy-0
    }

    networksetup -setsocksfirewallproxy $argv[1] 127.0.0.1 8123
    networksetup -setsocksfirewallproxystate $argv[1] on
    echo "SOCKS proxy enabled. Tunneling..."
    ssh -D 8123 -C -q -N $argv[2]
}

mac-proxy-0 () {
    networksetup -setsocksfirewallproxystate Wi-Fi off > /dev/null
    networksetup -setsocksfirewallproxystate Ethernet off > /dev/null
    echo "SOCKS proxy disabled."
    pkill -f "ssh -D"
    echo "Tunneling stopped."
}


text:
package org.gradle.model.internal.core;

import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Optional;
import com.google.common.collect.Iterables;
import org.gradle.model.ModelMap;
import org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor;
import org.gradle.model.internal.manage.instance.ManagedInstance;
import org.gradle.model.internal.type.ModelType;
import org.gradle.model.internal.type.ModelTypes;
import org.gradle.util.CollectionUtils;

import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Collections;

import static org.gradle.internal.Cast.uncheckedCast;

public class ModelMapModelProjection<I> implements ModelProjection {
    private static final ModelType<ManagedInstance> MANAGED_INSTANCE_TYPE = ModelType.of(ManagedInstance.class);

    public static <T> ModelProjection unmanaged(ModelType<T> itemType, ChildNodeInitializerStrategyAccessor<? super T> creatorStrategyAccessor) {
        return new ModelMapModelProjection<T>(ModelTypes.modelMap(itemType), itemType, false, creatorStrategyAccessor);
    }

    public static <T> ModelProjection unmanaged(Class<T> itemType, ChildNodeInitializerStrategyAccessor<? super T> creatorStrategyAccessor) {
        return unmanaged(ModelType.of(itemType), creatorStrategyAccessor);
    }

    public static <T> ModelProjection managed(ModelType<?> publicType, ModelType<T> itemType, ChildNodeInitializerStrategyAccessor<? super T> creatorStrategyAccessor) {
        return new ModelMapModelProjection<T>(publicType, itemType, true, creatorStrategyAccessor);
    }

    private final ModelType<?> publicType;
    private final ModelType<I> baseItemModelType;
    private final ChildNodeInitializerStrategyAccessor<? super I> creatorStrategyAccessor;
    private final boolean managed;

    private ModelMapModelProjection(ModelType<?> publicType, ModelType<I> baseItemModelType, boolean managed, ChildNodeInitializerStrategyAccessor<? super I> creatorStrategyAccessor) {
        this.publicType = publicType;
        this.baseItemModelType = baseItemModelType;
        this.managed = managed;
        this.creatorStrategyAccessor = creatorStrategyAccessor;
    }

    private Collection<? extends Class<?>> getCreatableTypes() {
        return Collections.singleton(baseItemModelType.getConcreteClass());
    }

    private String getContainerTypeDescription(Class<?> containerType, Collection<? extends Class<?>> creatableTypes) {
        StringBuilder sb = new StringBuilder(containerType.getName());
        if (creatableTypes.size() == 1) {
            @SuppressWarnings("ConstantConditions")
            String onlyType = Iterables.getFirst(creatableTypes, null).getName();
            sb.append("<").append(onlyType).append(">");
        } else {
            sb.append("<T>; where T is one of [");
            Joiner.on(", ").appendTo(sb, CollectionUtils.sort(Iterables.transform(creatableTypes, new Function<Class<?>, String>() {
                @Override
                public String apply(Class<?> input) {
                    return input.getName();
                }
            })));
            sb.append("]");
        }
        return sb.toString();
    }

    private ModelType<? extends I> itemType(ModelType<?> targetType) {
        Class<?> targetClass = targetType.getRawClass();
        if (targetClass.equals(ModelMap.class)) {
            ModelType<?> targetItemClass = targetType.getTypeVariables().get(0);
            if (targetItemClass.isAssignableFrom(baseItemModelType)) {
                return baseItemModelType;
            }
            if (baseItemModelType.isAssignableFrom(targetItemClass)) {
                return targetItemClass.asSubtype(baseItemModelType);
            }
            return null;
        }
        if (targetClass.isAssignableFrom(ModelMap.class)) {
            return baseItemModelType;
        }
        return null;
    }

    @Override
    public <T> boolean canBeViewedAs(ModelType<T> targetType) {
        return itemType(targetType) != null || targetType.equals(MANAGED_INSTANCE_TYPE);
    }

    @Override
    public <T> ModelView<? extends T> asImmutable(ModelType<T> type, MutableModelNode modelNode, @Nullable ModelRuleDescriptor ruleDescriptor) {
        return doAs(type, modelNode, ruleDescriptor, false);
    }

    @Override
    public <T> ModelView<? extends T> asMutable(ModelType<T> targetType, MutableModelNode node, ModelRuleDescriptor ruleDescriptor) {
        return doAs(targetType, node, ruleDescriptor, true);
    }

    @Nullable
    private <T> ModelView<? extends T> doAs(ModelType<T> targetType, MutableModelNode node, ModelRuleDescriptor ruleDescriptor, boolean mutable) {
        ModelType<? extends I> itemType = itemType(targetType);
        if (itemType != null) {
            return uncheckedCast(toView(targetType, ruleDescriptor, node, itemType, mutable, !managed || !mutable));
        }
        return null;
    }

    private <T, S extends I> ModelView<ModelMap<S>> toView(ModelType<T> targetType, ModelRuleDescriptor sourceDescriptor, MutableModelNode node, ModelType<S> itemType, boolean mutable, boolean canReadChildren) {
        ChildNodeInitializerStrategy<? super I> creatorStrategy = creatorStrategyAccessor.getStrategy(node);
        DefaultModelViewState state = new DefaultModelViewState(node.getPath(), targetType, sourceDescriptor, mutable, canReadChildren);
        NodeBackedModelMap<I> builder = new NodeBackedModelMap<I>(publicType, baseItemModelType, sourceDescriptor, node, state, creatorStrategy);

        return InstanceModelView.of(
            node.getPath(),
            ModelTypes.modelMap(itemType),
            builder.withType(itemType),
            state.closer()
        );
    }

    @Override
    public Iterable<String> getTypeDescriptions(MutableModelNode node) {
        final Collection<? extends Class<?>> creatableTypes = getCreatableTypes();
        return Collections.singleton(getContainerTypeDescription(ModelMap.class, creatableTypes));
    }

    @Override
    public Optional<String> getValueDescription(MutableModelNode modelNodeInternal) {
        return Optional.absent();
    }
}


text:
package koala.dynamicjava.tree;

/**
 * This class represents the statement nodes of the syntax tree
 *
 * @author  Stephane Hillion
 * @version 1.0 - 1999/04/24
 */

public abstract class Statement extends Node {
    /**
     * Initializes the statement
     * @param fn    the filename
     * @param bl    the begin line
     * @param bc    the begin column
     * @param el    the end line
     * @param ec    the end column
     */
    protected Statement(String fn, int bl, int bc, int el, int ec) {
	super(fn, bl, bc, el, ec);
    }
}


text:
package org.openyolo.spi.assetlinks.data;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Used to create a list of {@link AssetStatement}s from a JSON string.
 */
public enum AssetStatementsFactory {
    /**
     * The instance of the factory.
     */
    INSTANCE;

    private static final String TAG = "AssetStatementsFactory";

    /**
     * Parses the provided asset statements JSON into a list of
     * {@link AssetStatement}s.
     *
     * @param json Asset statements JSON
     * @return A list of {@link AssetStatement}s or an empty list
     */
    @NonNull
    public List<AssetStatement> createAssetStatements(@Nullable String json) {
        if (TextUtils.isEmpty(json)) {
            return Collections.emptyList();
        }

        JSONArray assetStatementsArray = parseJson(json);
        if (assetStatementsArray == null) {
            return Collections.emptyList();
        }

        return parseAssetStatements(assetStatementsArray);
    }

    private List<AssetStatement> parseAssetStatements(@NonNull JSONArray assetStatementsArray) {
        List<AssetStatement> assetStatements = new ArrayList<>();
        for (int i = 0; i < assetStatementsArray.length(); i++) {
            final JSONObject assetStatementJson = assetStatementsArray.optJSONObject(i);
            if (assetStatementJson == null) {
                continue;
            }

            final AssetType assetType = getAssetType(assetStatementJson);
            if (assetType == null) {
                Log.e(TAG, "invalid asset statement type found");
                continue;
            }

            switch (assetType) {
                case Android:
                    assetStatements.addAll(createAndroidAssetStatement(assetStatementJson));
                    break;
                case Web:
                    assetStatements.addAll(createWebAssetStatement(assetStatementJson));
                    break;
                case Include:
                    assetStatements.addAll(createIncludeAssetStatement(assetStatementJson));
                    break;
                default:
                    Log.e(TAG, "invalid asset statement type found");
            }
        }
        return assetStatements;
    }

    private Collection<? extends AssetStatement> createIncludeAssetStatement(JSONObject
                assetStatementJson) {
        return new IncludeAssetStatementDeserializer().deserialize(assetStatementJson);
    }

    private Collection<? extends AssetStatement> createWebAssetStatement(JSONObject
                assetStatementJson) {
        return new WebAssetStatementDeserializer().deserialize(assetStatementJson);
    }

    private Collection<? extends AssetStatement> createAndroidAssetStatement(JSONObject
                assetStatementJson) {
        return new AndroidAssetStatementDeserializer().deserialize(assetStatementJson);
    }

    @Nullable
    private AssetType getAssetType(@NonNull JSONObject assetStatementJson) {
        if (assetStatementJson.has("include")) {
            return AssetType.Include;
        } else {
            JSONObject target = assetStatementJson.optJSONObject("target");
            if (target == null) {
                return null;
            }
            String namespace = target.optString("namespace");
            if (TextUtils.isEmpty(namespace)) {
                return null;
            }
            if (NamespaceType.Web.getDescription().equals(namespace)) {
                return AssetType.Web;
            } else if (NamespaceType.AndroidApp.getDescription().equals(namespace)) {
                return AssetType.Android;
            }
            return null;
        }
    }

    @Nullable
    private JSONArray parseJson(String input) {
        try {
            return new JSONArray(input);
        } catch (JSONException e) {
            Log.e(TAG, "", e);
        }
        return null;
    }

    private enum AssetType {
        Include, Android, Web
    }
}


text:
package com.gzlk.android.isp.holder.attachment;

import android.view.View;
import android.widget.LinearLayout;

import com.gzlk.android.isp.R;
import com.gzlk.android.isp.fragment.base.BaseFragment;
import com.gzlk.android.isp.holder.BaseViewHolder;
import com.hlk.hlklib.lib.inject.Click;
import com.hlk.hlklib.lib.inject.ViewId;
import com.hlk.hlklib.lib.inject.ViewUtility;
import com.hlk.hlklib.lib.view.CustomTextView;

/**
 * 功能描述:

 * 创建作者:Hsiang Leekwok

 * 创建时间:2017/05/29 02:07

 * 作者邮箱:xiang.l.g@gmail.com

 * 最新版本:Version: 1.0.0

 * 修改时间:2017/05/29 02:07

 * 修改人员:

 * 修改备注:

 */

public class AttachmentPickerViewHolder extends BaseViewHolder {

    @ViewId(R.id.ui_holder_view_attachment_picker_image)
    private LinearLayout chooseImage;
    @ViewId(R.id.ui_holder_view_attachment_picker_image_icon)
    private CustomTextView imageIcon;
    @ViewId(R.id.ui_holder_view_attachment_picker_other)
    private LinearLayout chooseOther;
    @ViewId(R.id.ui_holder_view_attachment_picker_other_icon)
    private CustomTextView otherIcon;

    public AttachmentPickerViewHolder(View itemView, BaseFragment fragment) {
        super(itemView, fragment);
        ViewUtility.bind(this, itemView);
    }

    private boolean pickImage = true;

    @Click({R.id.ui_holder_view_attachment_picker_image, R.id.ui_holder_view_attachment_picker_other})
    private void elementClick(View view) {
        switch (view.getId()) {
            case R.id.ui_holder_view_attachment_picker_image:
                pickImage = true;
                reset();
                break;
            case R.id.ui_holder_view_attachment_picker_other:
                pickImage = false;
                reset();
                break;
        }
    }

    private void reset() {
        imageIcon.setTextColor(getColor(pickImage ? R.color.colorPrimary : R.color.textColorHintLight));
        otherIcon.setTextColor(getColor(pickImage ? R.color.textColorHintLight : R.color.colorPrimary));
    }
}


text:
<?php

class StanfordUtil {

  const VERSION = '1.0.0';

  /* Error reporting settings */
  const DEBUGGING   = 'debugging';
  const DEVELOPMENT = 'development';
  const PRODUCTION  = 'production';

  /**
    * Gets the version number of the class
    *
    * @return string  The version number
    */

  function get_version() {
    return self::VERSION;
  }

  /**
    * Strips slashes automatically added to form input by magic_quotes
    *
    * @date June 11, 2008
    * @credit http://talks.php.net/show/php-best-practices/26
    *
    */

  function undo_magic_quotes() {
    if (get_magic_quotes_gpc()) {

      $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);

      while (list($k,$v) = each($in)) {
        foreach ($v as $key => $val) {
          if (!is_array($val)) {
            $in[$k][$key] = stripslashes($val);
            continue;
          }
          $in[] =& $in[$k][$key];
        }
      }

      unset($in);
    }
  }

  /**
    * Sets the error reporting settings for production, development, or debugging
    *
    * @author ddonahue
    * @author thanosb
    *
    * @date July 23, 2008
    *
    * @param string mode     The error reporting mode - either production, development, or debugging
    *
    * @return mixed  String representing the error mode set on success, false on failure.
    */

  function set_error_reporting($mode) {

    $mode = strtolower($mode);

    if($mode == self::DEBUGGING) {
      // Report all PHP errors except for notices
      ini_set('error_reporting', E_ALL);

      // Set the display_errors directive to On
      ini_set('display_errors', 1);

      // Do not log errors to the web server's error log
      ini_set('log_errors', 0);
    }

    else if($mode == self::DEVELOPMENT) {
      // Report all PHP errors and notices
      ini_set('error_reporting', E_ALL ^ E_NOTICE);

      // Set the display_errors directive to On
      ini_set('display_errors', 1);

      // Do not log errors to the web server's error log
      ini_set('log_errors', 0);
    }

    else if($mode == self::PRODUCTION) {
      // Report simple running errors
      ini_set('error_reporting', E_ALL ^ E_NOTICE);

      // Set the display_errors directive to Off
      ini_set('display_errors', 0);

      // Log errors to the web server's error log
      ini_set('log_errors', 1);
    }

    else {
      return false;
    }

    return $mode;
  }

}
?>


text:
package com.orhanobut.wasp;

import android.graphics.Bitmap;

import com.orhanobut.wasp.utils.WaspCache;

public class BitmapWaspCache extends WaspCache<String, Bitmap> implements
    InternalImageHandler.ImageCache {

  @Override
  public Bitmap getBitmap(String url) {
    return get(url);
  }

  @Override
  public void putBitmap(String url, Bitmap bitmap) {
    put(url, bitmap);
  }

  @Override
  public void clearCache() {
    clearAll();
  }
}


text:
import * as moment from 'moment';

export class Post {
  Title: string;
  Summary: string;
  Tags: string[] = [];
  Content: Content[] = [];
  IsPublic: boolean;
  DatePublished: string;

  constructor(title: string = undefined, summary: string = undefined, tags: string[] = [], content: Content[] = [], isPublic: boolean = false) {
    this.Title = title;
    this.Summary = summary;
    this.Tags = tags;
    this.Content = content;
    this.IsPublic = isPublic;
  }
}

export class Content {
  Type: ContentType;
  Value: string;
  Ordinal: number;
  ImageName: string;

  constructor(type: ContentType, ordinal: number, value: string = undefined, imageName: string = undefined) {
    this.Type = type;
    this.Ordinal = ordinal;
    this.Value = value;
    this.ImageName = imageName;
  }
}

export enum ContentType {
  Header,
  Paragraph,
  Image
}


text:
require 'mail/smtp_envelope'

module Mail
  # A delivery method implementation which sends via sendmail.
  #
  # To use this, first find out where the sendmail binary is on your computer,
  # if you are on a mac or unix box, it is usually in /usr/sbin/sendmail, this will
  # be your sendmail location.
  #
  #   Mail.defaults do
  #     delivery_method :sendmail
  #   end
  #
  # Or if your sendmail binary is not at '/usr/sbin/sendmail'
  #
  #   Mail.defaults do
  #     delivery_method :sendmail, :location => '/absolute/path/to/your/sendmail'
  #   end
  #
  # Then just deliver the email as normal:
  #
  #   Mail.deliver do
  #     to 'mikel@test.lindsaar.net'
  #     from 'ada@test.lindsaar.net'
  #     subject 'testing sendmail'
  #     body 'testing sendmail'
  #   end
  #
  # Or by calling deliver on a Mail message
  #
  #   mail = Mail.new do
  #     to 'mikel@test.lindsaar.net'
  #     from 'ada@test.lindsaar.net'
  #     subject 'testing sendmail'
  #     body 'testing sendmail'
  #   end
  #
  #   mail.deliver!
  class Sendmail
    DEFAULTS = {
      :location   => '/usr/sbin/sendmail',
      :arguments  => %w[ -i ]
    }

    attr_accessor :settings

    class DeliveryError < StandardError
    end

    def initialize(values)
      self.settings = self.class::DEFAULTS.merge(values)
      raise ArgumentError, ":arguments expected to be an Array of individual string args" if settings[:arguments].is_a?(String)
    end

    def destinations_for(envelope)
      envelope.to
    end

    def deliver!(mail)
      envelope = Mail::SmtpEnvelope.new(mail)

      command = [settings[:location]]
      command.concat Array(settings[:arguments])
      command.concat [ '-f', envelope.from ] if envelope.from

      if destinations = destinations_for(envelope)
        command.push '--'
        command.concat destinations
      end

      popen(command) do |io|
        io.puts ::Mail::Utilities.binary_unsafe_to_lf(envelope.message)
        io.flush
      end
    end

    private
      def popen(command, &block)
        IO.popen(command, 'w+', :err => :out, &block).tap do
          if $?.exitstatus != 0
            raise DeliveryError, "Delivery failed with exitstatus #{$?.exitstatus}: #{command.inspect}"
          end
        end
      end
  end
end


text:
exports.up = async function (db) {
  await db.runSql(`
    CREATE TABLE user_identifier_bans (
      identifier_type smallint NOT NULL,
      identifier_hash bytea NOT NULL,
      time_banned timestamp without time zone NOT NULL,
      banned_until timestamp without time zone NOT NULL,
      first_user_id integer NOT NULL,

      PRIMARY KEY (identifier_type, identifier_hash)
    );
  `)

  // Make banned_by nullable to indicate a system-enacted ban
  await db.runSql(`
    ALTER TABLE user_bans
    ALTER COLUMN banned_by DROP NOT NULL;
  `)
}

exports.down = async function (db) {
  await db.runSql(`DROP TABLE user_identifier_bans`)
  await db.runSql(`
    ALTER TABLE user_bans
    ALTER COLUMN banned_by SET NOT NULL;
  `)
}

exports._meta = {
  version: 1,
}


text:
/* FacebookAuthStrategy.js
 * To be implemented. For it to work, requires registering a valida url domain with facebook
 * and need to provide this url as a route, for the Facebook callback once it authenticates the user.
 * Check documentation here: http://passportjs.org/docs/facebook
 */

const _       = require('lodash'),
      users  = require('../UserModel'),
      LocalStrategy = require('passport-local').Strategy;

/**
module.exports = new FacebookStrategy({
    clientID: FACEBOOK_APP_ID,
    clientSecret: FACEBOOK_APP_SECRET,
    callbackURL: "http://www.example.com/auth/facebook/callback"
  },
  function(accessToken, refreshToken, profile, done) {
    User.findOrCreate(..., function(err, user) {
      if (err) { return done(err); }
      done(null, user);
    });
  }
);
*/


text:
app.view.Viewport = class extends app.toolkit.three.R {

    constructor() {
        super();
    }

    render() {
        let sun = new app.view.milkyway.Sun({ autoInit: true }),
            stars = new app.view.milkyway.Stars({ autoInit: true }),
            orbit = new app.view.milkyway.Orbit({ autoInit: true});
        this.addObject(sun);
        this.addObject(stars);
        this.addObject(orbit);
    }
}


text:
Terminology
==

## EfieBootManager

> This is efibootmgr, a Linux user-space application to modify the Intel Extensible Firmware Interface (EFI) Boot Manager.  This application can create and destroy boot entries, change the boot order, change the next running boot option, and more.

## NW.js

> NW.js (previously known as node-webkit) lets you call all Node.js modules directly from DOM and enables a new way of writing applications with all Web technologies. [Homepage](http://nwjs.io/)


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>AWSS3DeleteObjectsOutput Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">

				AWS Mobile SDK for iOS v2.4.1

				Amazon Web Services, Inc.

Index

Hierarchy

							On This Page

							<select id="jump-to">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<optgroup label="Properties">

		<option value="//api/name/deleted">deleted</option>

		<option value="//api/name/errors">errors</option>

		<option value="//api/name/requestCharged">requestCharged</option>

	</optgroup>

</select>

AWSS3DeleteObjectsOutput Class Reference

	Inherits from
	AWSModel : AWSMTLModel

	Declared in
	AWSS3Model.h
AWSS3Model.m

  deleted

@property (nonatomic, strong) NSArray<AWSS3DeletedObject*> *deleted

Declared In

AWSS3Model.h

  errors

@property (nonatomic, strong) NSArray<AWSS3Error*> *errors

Declared In

AWSS3Model.h

  requestCharged

If present, indicates that the requester was successfully charged for the request.

@property (nonatomic, assign) AWSS3RequestCharged requestCharged

Declared In

AWSS3Model.h

Copyright © 2016 Amazon Web Services, Inc. All rights reserved. Updated: 2016-04-28

Generated by appledoc 2.2.1 (build 1333).


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<link href="../../themes/iphone/iphone-app.css" rel="stylesheet">
		<link href="styles/styles.css" rel="stylesheet">
		<style>
		.lnk {
			font-size: 17px;
			color: cyan;
			text-decoration: none;
		}
		</style>
		<script type="text/javascript" src="../../../../dojo/dojo.js"
				data-dojo-config="parseOnLoad: false, mobileAnim:'slide'"></script>

		<script language="JavaScript" type="text/javascript">
			dojo.require("dojo.io.script");
			dojo.require("dojox.mobile.app");
			dojo.requireIf(!dojo.isWebKit, "dojox.mobile.app.compat");

			var appInfo = {
				id: "org.dojo.imageWidgetApp",
				title: "Mobile App With Image Widgets",
				initialScene: "main"
			};

			dojo.ready(dojox.mobile.app.init);
		</script>
	</head>
	<body>

	</body>
</html>


text:
<?php

namespace triagens\ArangoDb;

require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'init.php';

try {
    $connection        = new Connection($connectionOptions);
    $collectionHandler = new CollectionHandler($connection);
    $documentHandler   = new DocumentHandler($connection);
    $edgeHandler       = new EdgeHandler($connection);

    // set up two document collections
    $collection        = new Collection("employees");
    try {
        $collectionHandler->add($collection);
    }
    catch (\Exception $e) {
        // collection may already exist - ignore this error for now
    }

    $collection        = new Collection("departments");
    try {
        $collectionHandler->add($collection);
    }
    catch (\Exception $e) {
        // collection may already exist - ignore this error for now
    }

    // set up an edge collection to link the two previous collections
    $collection        = new Collection("worksFor");
    $collection->setType(3);

    try {
        $collectionHandler->add($collection);
    }
    catch (\Exception $e) {
        // collection may already exist - ignore this error for now
    }

    // create a new department
    $marketing = Document::createFromArray(array("name" => "Marketing"));
    $documentHandler->save("departments", $marketing);

    // create another department
    $finance = Document::createFromArray(array("name" => "Finance"));
    $documentHandler->save("departments", $finance);

    // create a new employee
    $john = Document::createFromArray(array("name" => "John"));
    $documentHandler->save("employees", $john);

    // create another employee
    $jane = Document::createFromArray(array("name" => "Jane"));
    $documentHandler->save("employees", $jane);

    // now insert a link between Marketing and Jane
    $worksFor = Edge::createFromArray(array("startDate" => "2009-06-23", "endDate" => "2014-11-12"));
    $edgeHandler->saveEdge("worksFor", $marketing->getHandle(), $jane->getHandle(), $worksFor);

    // now insert a link between Finance and Jane
    $worksFor = Edge::createFromArray(array("startDate" => "2014-11-12"));
    $edgeHandler->saveEdge("worksFor", $finance->getHandle(), $jane->getHandle(), $worksFor);

    // now insert a link between Finance and John
    $worksFor = Edge::createFromArray(array("startDate" => "2012-04-01"));
    $edgeHandler->saveEdge("worksFor", $finance->getHandle(), $john->getHandle(), $worksFor);

} catch (ConnectException $e) {
    print $e . PHP_EOL;
} catch (ServerException $e) {
    print $e . PHP_EOL;
} catch (ClientException $e) {
    print $e . PHP_EOL;
}


text:
layout: event
category: event
title: Meetup event
rsvp: https://www.facebook.com/events/459408244231758/
---

To start off Maptime in Durham, let's have the first informal gathering to see who is interested. We can talk about maps we like to create or look at.

* Date: Wednesday 2nd September 2015
* Time: 6pm to 7:45pm, or as late as the conversation goes
* Location: The Library Durham (also known as Varsity), Saddler Street.
* Co-ordinates: 54.7756, -1.5745.
* How to find us: Table 2 at the front, maps on the table!

You could bring a map to get the conversation going. Real or fictional, doodle or professional product. Or in the spirit of Maptime, we might start drawing some maps during the meeting.


text:
package com.google.api.ads.dfp.jaxws.v201408;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             Represents the actions that can be performed on {@link ExchangeRate} objects.
 *
 *
 *
Java class for ExchangeRateAction complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="ExchangeRateAction">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="ExchangeRateAction.Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExchangeRateAction", propOrder = {
    "exchangeRateActionType"
})
@XmlSeeAlso({
    DeleteExchangeRates.class
})
public abstract class ExchangeRateAction {

    @XmlElement(name = "ExchangeRateAction.Type")
    protected String exchangeRateActionType;

    /**
     * Gets the value of the exchangeRateActionType property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getExchangeRateActionType() {
        return exchangeRateActionType;
    }

    /**
     * Sets the value of the exchangeRateActionType property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setExchangeRateActionType(String value) {
        this.exchangeRateActionType = value;
    }

}


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

<title>Uses of Package org.apache.cassandra.db.commitlog (apache-cassandra API)</title>
<meta name="date" content="2016-04-09">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.apache.cassandra.db.commitlog

Packages that use org.apache.cassandra.db.commitlog

Package
Description

org.apache.cassandra.db

org.apache.cassandra.db.commitlog

org.apache.cassandra.db.lifecycle

org.apache.cassandra.io.sstable.format

org.apache.cassandra.io.sstable.metadata

org.apache.cassandra.metrics

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.db

Class and Description

ReplayPosition

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.db.commitlog

Class and Description

CommitLog

CommitLogArchiver

CommitLogDescriptor

CommitLogMBean

CommitLogReplayer

CommitLogReplayer.MutationInitiator

CommitLogSegment

CommitLogSegmentManager

Performs eager-creation of commit log segments in a background thread.

EncryptedFileSegmentInputStream.ChunkProvider

FileDirectSegment

Writes to the backing commit log file only on sync, allowing transformations of the mutations,
 such as compression or encryption, before writing out to disk.

ReplayPosition

ReplayPosition.ReplayPositionSerializer

SegmentReader.SyncSegment

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.db.lifecycle

Class and Description

ReplayPosition

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.io.sstable.format

Class and Description

ReplayPosition

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.io.sstable.metadata

Class and Description

ReplayPosition

Classes in org.apache.cassandra.db.commitlog used by org.apache.cassandra.metrics

Class and Description

AbstractCommitLogService

CommitLogSegmentManager

Performs eager-creation of commit log segments in a background thread.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2016 The Apache Software Foundation


text:
https://www.beecrowd.com.br/judge/en/problems/view/2606

# Categories

When the data were migrated to the database, there was a small
misunderstanding on the DBA.

Your boss needs you to select the ID and the name of the products, whose
categorie name start with 'super'.


text:
extern crate core;

mod block_storage;
mod commit_notifier;
mod consensusdb;
mod epoch_manager;
mod error;
mod experimental;
mod liveness;
mod logging;
mod metrics_safety_rules;
mod network;
#[cfg(test)]
mod network_tests;
mod payload_manager;
mod pending_votes;
mod persistent_liveness_storage;
mod quorum_store;
mod recovery_manager;
mod round_manager;
mod state_computer;
mod state_replication;
#[cfg(any(test, feature = "fuzzing"))]
mod test_utils;
#[cfg(test)]
mod twins;
mod txn_notifier;
mod util;

/// AptosBFT implementation
pub mod consensus_provider;
/// Required by the telemetry service
pub mod counters;
/// AptosNet interface.
pub mod network_interface;

/// Required by the smoke tests
pub use consensusdb::CONSENSUS_DB_NAME;

#[cfg(feature = "fuzzing")]
pub use round_manager::round_manager_fuzzing;

/// Helper function to record metrics for external calls.
/// Include call counts, time, and whether it's inside or not (1 or 0).
/// It assumes a OpMetrics defined as OP_COUNTERS in crate::counters;
#[macro_export]
macro_rules! monitor {
    ( $name:literal, $fn:expr ) => {{
        use $crate::counters::OP_COUNTERS;
        let _timer = OP_COUNTERS.timer($name);
        let gauge = OP_COUNTERS.gauge(concat!($name, "_running"));
        gauge.inc();
        let result = $fn;
        gauge.dec();
        result
    }};
}


text:
package org.samsara.framework.core.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * Samsara Framework
 * Input Stream Source
 *
 * @author sczyh30
 */
public interface InputStreamSource {

    InputStream getInputStream() throws IOException;

}