text:
    NIP *

        <select id="slc-nip" class="form-control select2-basic" name="id_pegawai">
        </select>
        Pilih Pegawai.
Masukkan NIP sebagai kata kunci untuk melakukan pencarian.

redpajama_set_name: RedPajamaGithub


text:
  Herlies est
      une commune localisée dans le département de Nord en Nord-Pas-de-Calais. On dénombrait 2 065 habitants en 2008.

Le parc d'habitations, à Herlies, était réparti en 2011 en 31 appartements et 757 maisons soit
 un marché plutôt équilibré.

La ville propose de nombreux  équipements, elle dispose, entre autres, de un bassin de natation, un terrain de tennis, deux centres d'équitation et deux terrains de sport.

À Herlies, la valeur moyenne à la vente d'un appartement se situe à 2 744 € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 2 535 € du m². À la location le prix moyen se situe à 11,37 € du m² mensuel.

À proximité de Herlies sont positionnées géographiquement les communes de
Le Maisnil localisée à 4 km, 538 habitants,
Lorgies située à 4 km, 1 471 habitants,
Salomé située à 4 km, 2 993 habitants,
Aubers à 2 km, 1 527 habitants,
Fromelles située à 3 km, 893 habitants,
Wicres localisée à 1 km, 312 habitants,
 entre autres. De plus, Herlies est située à seulement 16 km de Lille.

À Herlies le salaire médian par mois par personne est situé à environ 2 332 €  net. Ceci est au dessus de la moyenne nationale.


text:
const each = require('./each')

/**
 *
 * @param {Function} iteratee
 * @param {List} value
 */
const filter = (iteratee, value) => {
    let rst = []
    each((value, index, list) => {
        if (iteratee(value, index, list)) rst.push(value)
    }, value)
    return rst
}

module.exports = filter


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".Activities.UserProfileActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="300dp"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            android:theme="@style/ThemeOverlay.AppCompat.Dark"
            app:contentScrim="?attr/colorPrimary"
            app:expandedTitleMarginEnd="10dp"
            app:expandedTitleMarginStart="10dp"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

            <ImageView
                android:id="@+id/image"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/primaryColor"
                android:src="@drawable/ic_account_circle_black_48dp"
                android:fitsSystemWindows="true"
                android:scaleType="fitCenter"
                app:layout_collapseMode="parallax" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    android:layout_gravity="bottom"
                    android:background="@drawable/gradient"/>
            </FrameLayout>

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <!-- Para poder colapsar/descolapsar el toolbar -->
    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="center">

            <!-- Content -->
            <include layout="@layout/content_user_profile" />

        </LinearLayout>

    </android.support.v4.widget.NestedScrollView>

    <!-- Se engancha con layout_anchor al toolbar colapsable -->
    <android.support.design.widget.FloatingActionButton
        android:id="@+id/floatingButton"
        app:layout_anchor="@id/appbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_anchorGravity="bottom|right|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@drawable/ic_photo_white_48dp" />

</android.support.design.widget.CoordinatorLayout>


text:
<?php
namespace metastore;

/**
 * Autogenerated by Thrift Compiler (0.14.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
use Thrift\Base\TBase;
use Thrift\Type\TType;
use Thrift\Type\TMessageType;
use Thrift\Exception\TException;
use Thrift\Exception\TProtocolException;
use Thrift\Protocol\TProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;

class ThriftHiveMetastore_refresh_privileges_args
{
    static public $isValidate = false;

    static public $_TSPEC = array(
        1 => array(
            'var' => 'objToRefresh',
            'isRequired' => false,
            'type' => TType::STRUCT,
            'class' => '\metastore\HiveObjectRef',
        ),
        2 => array(
            'var' => 'authorizer',
            'isRequired' => false,
            'type' => TType::STRING,
        ),
        3 => array(
            'var' => 'grantRequest',
            'isRequired' => false,
            'type' => TType::STRUCT,
            'class' => '\metastore\GrantRevokePrivilegeRequest',
        ),
    );

    /**
     * @var \metastore\HiveObjectRef
     */
    public $objToRefresh = null;
    /**
     * @var string
     */
    public $authorizer = null;
    /**
     * @var \metastore\GrantRevokePrivilegeRequest
     */
    public $grantRequest = null;

    public function __construct($vals = null)
    {
        if (is_array($vals)) {
            if (isset($vals['objToRefresh'])) {
                $this->objToRefresh = $vals['objToRefresh'];
            }
            if (isset($vals['authorizer'])) {
                $this->authorizer = $vals['authorizer'];
            }
            if (isset($vals['grantRequest'])) {
                $this->grantRequest = $vals['grantRequest'];
            }
        }
    }

    public function getName()
    {
        return 'ThriftHiveMetastore_refresh_privileges_args';
    }

    public function read($input)
    {
        $xfer = 0;
        $fname = null;
        $ftype = 0;
        $fid = 0;
        $xfer += $input->readStructBegin($fname);
        while (true) {
            $xfer += $input->readFieldBegin($fname, $ftype, $fid);
            if ($ftype == TType::STOP) {
                break;
            }
            switch ($fid) {
                case 1:
                    if ($ftype == TType::STRUCT) {
                        $this->objToRefresh = new \metastore\HiveObjectRef();
                        $xfer += $this->objToRefresh->read($input);
                    } else {
                        $xfer += $input->skip($ftype);
                    }
                    break;
                case 2:
                    if ($ftype == TType::STRING) {
                        $xfer += $input->readString($this->authorizer);
                    } else {
                        $xfer += $input->skip($ftype);
                    }
                    break;
                case 3:
                    if ($ftype == TType::STRUCT) {
                        $this->grantRequest = new \metastore\GrantRevokePrivilegeRequest();
                        $xfer += $this->grantRequest->read($input);
                    } else {
                        $xfer += $input->skip($ftype);
                    }
                    break;
                default:
                    $xfer += $input->skip($ftype);
                    break;
            }
            $xfer += $input->readFieldEnd();
        }
        $xfer += $input->readStructEnd();
        return $xfer;
    }

    public function write($output)
    {
        $xfer = 0;
        $xfer += $output->writeStructBegin('ThriftHiveMetastore_refresh_privileges_args');
        if ($this->objToRefresh !== null) {
            if (!is_object($this->objToRefresh)) {
                throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
            }
            $xfer += $output->writeFieldBegin('objToRefresh', TType::STRUCT, 1);
            $xfer += $this->objToRefresh->write($output);
            $xfer += $output->writeFieldEnd();
        }
        if ($this->authorizer !== null) {
            $xfer += $output->writeFieldBegin('authorizer', TType::STRING, 2);
            $xfer += $output->writeString($this->authorizer);
            $xfer += $output->writeFieldEnd();
        }
        if ($this->grantRequest !== null) {
            if (!is_object($this->grantRequest)) {
                throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
            }
            $xfer += $output->writeFieldBegin('grantRequest', TType::STRUCT, 3);
            $xfer += $this->grantRequest->write($output);
            $xfer += $output->writeFieldEnd();
        }
        $xfer += $output->writeFieldStop();
        $xfer += $output->writeStructEnd();
        return $xfer;
    }
}


text:
require File.dirname(__FILE__) + "/../../../spec_helper"

class TemplateStub
  attr_accessor :block
  def capture(&block)
    @block = block
  end
end

describe Radiant::AdminUI::RegionPartials do
  before :each do
    @template = TemplateStub.new
    @rp = Radiant::AdminUI::RegionPartials.new(@template)
  end

  it "should return a string when the specified partial does not exist" do
    @rp['foo'].should == "<strong>`foo' default partial not found!</strong>"
  end

  it "should expose partials via bracket accessor" do
    block = lambda { "Hello World!" }
    @rp.main(&block)
    @rp['main'].should === block
  end

  it "should capture a block when passed" do
    @rp.edit_extended_metadata do
      "Hello, World!"
    end

    @template.block.should be_kind_of(Proc)
    @template.block.should === @rp.edit_extended_metadata
    @template.block.call.should == "Hello, World!"
  end
end


text:
namespace Alphora.Dataphor.DAE.Language
{
	using System;
	using System.Text;

	public abstract class TextEmitter
	{
		private StringBuilder _text;
		private int _indent;

		protected void IncreaseIndent()
		{
			_indent++;
		}

		protected void DecreaseIndent()
		{
			if (_indent > 0)
				_indent--;
		}

		protected void NewLine()
		{
			_text.Append("\r\n");
		}

		protected void Indent()
		{
			for (int index = 0; index < _indent; index++)
				_text.Append("\t");
		}

		protected void Append(string stringValue)
		{
			_text.Append(stringValue);
		}

		protected void AppendFormat(string stringValue, params object[] paramsValue)
		{
			_text.AppendFormat(stringValue, paramsValue);
		}

		protected void AppendLine(string stringValue)
		{
			Indent();
			Append(stringValue);
			NewLine();
		}

		protected void AppendFormatLine(string stringValue, params object[] paramsValue)
		{
			Indent();
			AppendFormat(stringValue, paramsValue);
			NewLine();
		}

		protected abstract void InternalEmit(Statement statement);

		public string Emit(Statement statement)
		{
			_text = new StringBuilder();
			_indent = 0;
			InternalEmit(statement);
			return _text.ToString();
		}
	}

	public class BasicTextEmitter : TextEmitter
	{
		protected virtual void EmitExpression(Expression expression)
		{
			if (expression is UnaryExpression)
				EmitUnaryExpression((UnaryExpression)expression);
			else if (expression is BinaryExpression)
				EmitBinaryExpression((BinaryExpression)expression);
			else if (expression is CallExpression)
				EmitCallExpression((CallExpression)expression);
			else if (expression is ValueExpression)
				EmitValueExpression((ValueExpression)expression);
			else if (expression is IdentifierExpression)
				EmitIdentifierExpression((IdentifierExpression)expression);
			else if (expression is CaseExpression)
				EmitCaseExpression((CaseExpression)expression);
			else if (expression is BetweenExpression)
				EmitBetweenExpression((BetweenExpression)expression);
			else
				throw new LanguageException(LanguageException.Codes.UnknownExpressionClass, expression == null ? "null" : expression.GetType().Name);
		}

		public static string InstructionNameToKeyword(string instruction)
		{
			switch (instruction)
			{
				case "iNot": return "not";
				case "iNegate": return "-";
				case "iBitwiseNot": return "~";
				case "iExists": return "exists";
				case "iAddition": return "+";
				case "iSubtraction": return "-";
				case "iMultiplication": return "*";
				case "iDivision": return "/";
				case "iDiv": return "div";
				case "iMod": return "mod";
				case "iPower": return "**";
				case "iEqual": return "=";
				case "iNotEqual": return "<>";
				case "iLess": return "<";
				case "iInclusiveLess": return "<=";
				case "iGreater": return ">";
				case "iInclusiveGreater": return ">=";
				case "iCompare": return "?=";
				case "iAnd": return "and";
				case "iOr": return "or";
				case "iXor": return "xor";
				case "iIn": return "in";
				case "iLike": return "like";
				case "iMatches": return "matches";
				case "iBitwiseAnd": return "&";
				case "iBitwiseOr": return "|";
				case "iBitwiseXor": return "^";
				case "iShiftLeft": return "<<";
				case "iShiftRight": return ">>";
				default: throw new LanguageException(LanguageException.Codes.UnknownInstruction, instruction);
			}
		}

		protected virtual string GetInstructionKeyword(string instruction)
		{
			return InstructionNameToKeyword(instruction);
		}

		protected virtual void EmitUnaryExpression(UnaryExpression expression)
		{
			AppendFormat("{0}{1}", GetInstructionKeyword(Schema.Object.Unqualify(expression.Instruction)), "(");
			EmitExpression(expression.Expression);
			Append(")");
		}

		protected virtual void EmitBinaryExpression(BinaryExpression expression)
		{
			Append("(");
			EmitExpression(expression.LeftExpression);
			AppendFormat(" {0} ", GetInstructionKeyword(Schema.Object.Unqualify(expression.Instruction)));
			EmitExpression(expression.RightExpression);
			Append(")");
		}

		protected virtual void EmitCallExpression(CallExpression expression)
		{
			AppendFormat("{0}{1}", expression.Identifier, "(");
			for (int index = 0; index < expression.Expressions.Count; index++)
			{
				if (index > 0)
					AppendFormat("{0} ", ",");
				EmitExpression(expression.Expressions[index]);
			}
			Append(")");
		}

		protected virtual void EmitBetweenExpression(BetweenExpression expression)
		{
			Append("(");
			EmitExpression(expression.Expression);
			Append(" between ");
			EmitExpression(expression.LowerExpression);
			Append(" and ");
			EmitExpression(expression.UpperExpression);
			Append(")");
		}

		protected virtual void EmitValueExpression(ValueExpression expression)
		{
			switch (expression.Token)
			{
				case TokenType.Nil : Append(D4.Keywords.Nil); break;
				case TokenType.String : Append("'" + ((string)expression.Value).Replace("'", "''") + "'"); break;
				case TokenType.Decimal: Append(String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}d", expression.Value)); break;
				case TokenType.Money : Append(String.Format(System.Globalization.CultureInfo.InvariantCulture, "${0}", expression.Value)); break;
				case TokenType.Boolean : Append(((bool)expression.Value ? "true" : "false")); break;
				case TokenType.Hex: ((long)expression.Value).ToString("X"); break;
				default : Append(String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", expression.Value)); break;
			}
		}

		protected virtual void EmitIdentifierExpression(IdentifierExpression expression)
		{
			Append(expression.Identifier);
		}

		protected virtual void EmitCaseExpression(CaseExpression expression)
		{
			AppendFormat("{0}", "case");

			if (expression.Expression != null)
			{
				Append(" ");
				EmitExpression(expression.Expression);
			}

			for (int index = 0; index < expression.CaseItems.Count; index++)
			{
				AppendFormat(" {0} ", "when");
				EmitExpression(expression.CaseItems[index].WhenExpression);
				AppendFormat(" {0} ", "then");
				EmitExpression(expression.CaseItems[index].ThenExpression);
			}

			if (expression.ElseExpression != null)
			{
				AppendFormat(" {0} ", "else");
				EmitExpression(((CaseElseExpression)expression.ElseExpression).Expression);
			}

			AppendFormat(" {0}", "end");
		}

		protected virtual void EmitStatement(Statement statement)
		{
			throw new LanguageException(LanguageException.Codes.UnknownStatementClass, statement.GetType().Name);
		}

		protected override void InternalEmit(Statement statement)
		{
			if (statement is Expression)
				EmitExpression((Expression)statement);
			else if (statement is EmptyStatement)
			{
				// do nothing;
			}
			else
				EmitStatement(statement);
		}

		protected virtual void EmitListSeparator()
		{
			Append(", ");
		}

		protected virtual void EmitStatementTerminator()
		{
			Append(";");
		}
	}
}


text:
""" deb_1.py
    Usage: Used to test hold object functionality.
    It uses the /demo/echo/echo.py to send commands and wait for them
    using hold object.
"""
from untwisted.network import *
from untwisted.utils.stdio import *
from untwisted.utils.shrug import *

def main():
    for ind in xrange(100):
        sock = socket(AF_INET, SOCK_STREAM)
        spin = Spin(sock)
        Client(spin)
        Stdin(spin)
        Stdout(spin)
        Shrug(spin)
        spin.connect_ex(('', 1234))
        xmap(spin, FOUND, split)
        xmap(spin, CONNECT, on_connect, ind)
        xmap(spin, CONNECT_ERR, on_connect_err, ind)

def split(spin, data):
    spawn(spin, data)

def on_connect(spin, counter):
    spin.dump('cmd_x\r\n')
    print 'Waiting for cmd_x from, ', counter
    event, args = yield hold(spin, 'cmd_x')
    print 'cmd_x arrived from, ', counter
    spin.dump('cmd_y\r\n')
    print 'Waiting for cmd_y from, ', counter
    event, args = yield hold(spin, 'cmd_y')
    print 'cmd_y arrived from, ', counter

def on_connect_err(spin, ind):
    print 'Error connect from, ', ind
    pass

if __name__ == '__main__':
    main()
    core.gear.mainloop()


text:
.class public abstract Ljavax/xml/transform/TransformerFactory;
.super Ljava/lang/Object;
.source "TransformerFactory.java"

# direct methods
.method protected constructor <init>()V
    .locals 0

    .prologue
    .line 40
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static newInstance()Ljavax/xml/transform/TransformerFactory;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerFactoryConfigurationError;
        }
    .end annotation

    .prologue
    .line 76
    const-string v0, "org.apache.xalan.processor.TransformerFactoryImpl"

    .line 78
    .local v0, "className":Ljava/lang/String;
    :try_start_0
    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljavax/xml/transform/TransformerFactory;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object v2

    .line 79
    :catch_0
    move-exception v1

    .line 80
    .local v1, "e":Ljava/lang/Exception;
    new-instance v2, Ljava/lang/NoClassDefFoundError;

    invoke-direct {v2, v0}, Ljava/lang/NoClassDefFoundError;-><init>(Ljava/lang/String;)V

    throw v2
.end method

.method public static newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/transform/TransformerFactory;
    .locals 4
    .param p0, "factoryClassName"    # Ljava/lang/String;
    .param p1, "classLoader"    # Ljava/lang/ClassLoader;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerFactoryConfigurationError;
        }
    .end annotation

    .prologue
    .line 93
    if-nez p0, :cond_0

    .line 94
    new-instance v2, Ljavax/xml/transform/TransformerFactoryConfigurationError;

    const-string v3, "factoryClassName == null"

    invoke-direct {v2, v3}, Ljavax/xml/transform/TransformerFactoryConfigurationError;-><init>(Ljava/lang/String;)V

    throw v2

    .line 96
    :cond_0
    if-nez p1, :cond_1

    .line 97
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Thread;->getContextClassLoader()Ljava/lang/ClassLoader;

    move-result-object p1

    .line 100
    :cond_1
    if-eqz p1, :cond_2

    :try_start_0
    invoke-virtual {p1, p0}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    .line 103
    .local v1, "type":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    :goto_0
    invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljavax/xml/transform/TransformerFactory;

    return-object v2

    .line 100
    .end local v1    # "type":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    :cond_2
    invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
    :try_end_0
    .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2

    move-result-object v1

    goto :goto_0

    .line 104
    :catch_0
    move-exception v0

    .line 105
    .local v0, "e":Ljava/lang/ClassNotFoundException;
    new-instance v2, Ljavax/xml/transform/TransformerFactoryConfigurationError;

    invoke-direct {v2, v0}, Ljavax/xml/transform/TransformerFactoryConfigurationError;-><init>(Ljava/lang/Exception;)V

    throw v2

    .line 106
    .end local v0    # "e":Ljava/lang/ClassNotFoundException;
    :catch_1
    move-exception v0

    .line 107
    .local v0, "e":Ljava/lang/InstantiationException;
    new-instance v2, Ljavax/xml/transform/TransformerFactoryConfigurationError;

    invoke-direct {v2, v0}, Ljavax/xml/transform/TransformerFactoryConfigurationError;-><init>(Ljava/lang/Exception;)V

    throw v2

    .line 108
    .end local v0    # "e":Ljava/lang/InstantiationException;
    :catch_2
    move-exception v0

    .line 109
    .local v0, "e":Ljava/lang/IllegalAccessException;
    new-instance v2, Ljavax/xml/transform/TransformerFactoryConfigurationError;

    invoke-direct {v2, v0}, Ljavax/xml/transform/TransformerFactoryConfigurationError;-><init>(Ljava/lang/Exception;)V

    throw v2
.end method

# virtual methods
.method public abstract getAssociatedStylesheet(Ljavax/xml/transform/Source;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljavax/xml/transform/Source;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerConfigurationException;
        }
    .end annotation
.end method

.method public abstract getAttribute(Ljava/lang/String;)Ljava/lang/Object;
.end method

.method public abstract getErrorListener()Ljavax/xml/transform/ErrorListener;
.end method

.method public abstract getFeature(Ljava/lang/String;)Z
.end method

.method public abstract getURIResolver()Ljavax/xml/transform/URIResolver;
.end method

.method public abstract newTemplates(Ljavax/xml/transform/Source;)Ljavax/xml/transform/Templates;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerConfigurationException;
        }
    .end annotation
.end method

.method public abstract newTransformer()Ljavax/xml/transform/Transformer;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerConfigurationException;
        }
    .end annotation
.end method

.method public abstract newTransformer(Ljavax/xml/transform/Source;)Ljavax/xml/transform/Transformer;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerConfigurationException;
        }
    .end annotation
.end method

.method public abstract setAttribute(Ljava/lang/String;Ljava/lang/Object;)V
.end method

.method public abstract setErrorListener(Ljavax/xml/transform/ErrorListener;)V
.end method

.method public abstract setFeature(Ljava/lang/String;Z)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/xml/transform/TransformerConfigurationException;
        }
    .end annotation
.end method

.method public abstract setURIResolver(Ljavax/xml/transform/URIResolver;)V
.end method


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="BottomBar">
        <attr name="bb_tabXmlResource" format="reference" />
        <attr name="bb_tabletMode" format="boolean" />
        <attr name="bb_behavior">
            <flag name="shifting" value="1" />
            <flag name="shy" value="2" />
            <flag name="underNavbar" value="4" />
        </attr>
        <attr name="bb_inActiveTabAlpha" format="float" />
        <attr name="bb_activeTabAlpha" format="float" />
        <attr name="bb_inActiveTabColor" format="color" />
        <attr name="bb_activeTabColor" format="color" />
        <attr name="bb_badgeBackgroundColor" format="color" />
        <attr name="bb_titleTextAppearance" format="reference" />
        <attr name="bb_titleTypeFace" format="string" />
        <attr name="bb_showShadow" format="boolean" />
    </declare-styleable>
</resources>


text:
define(['exports', 'module', './polygon', './ops', './barnes-hut'], function (exports, module, _polygon, _ops, _barnesHut) {
  'use strict';

  var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

  var _Polygon = _interopRequireDefault(_polygon);

  var _bh = _interopRequireDefault(_barnesHut);

  var randomPosition = function randomPosition(w, h) {
    return [Math.random() * w, Math.random() * h];
  };

  var cap = function cap(bound, x) {
    return Math.min(Math.max(x, 0), bound);
  };

  var inside = function inside(w, h) {
    return function (_ref) {
      var _ref2 = _slicedToArray(_ref, 2);

      var x = _ref2[0];
      var y = _ref2[1];
      return [cap(w, x), cap(h, y)];
    };
  };

  var attractiveForces = function attractiveForces(links, positions, attraction) {
    var forces = {};
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
      for (var _iterator = Object.keys(links)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var id = _step.value;
        var _links$id = links[id];
        var start = _links$id.start;
        var end = _links$id.end;
        var weight = _links$id.weight;

        var pos1 = positions[start];
        var pos2 = positions[end];
        var force = (0, _ops.times)(attraction * weight, (0, _ops.minus)(pos1, pos2));
        if (!forces[start]) {
          forces[start] = [0, 0];
        }
        if (!forces[end]) {
          forces[end] = [0, 0];
        }
        forces[start] = (0, _ops.minus)(forces[start], force);
        forces[end] = (0, _ops.plus)(forces[end], force);
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator['return']) {
          _iterator['return']();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }

    return forces;
  };

  module.exports = function (_ref3) {
    var data = _ref3.data;
    var nodeaccessor = _ref3.nodeaccessor;
    var linkaccessor = _ref3.linkaccessor;
    var width = _ref3.width;
    var height = _ref3.height;
    var attraction = _ref3.attraction;
    var repulsion = _ref3.repulsion;
    var threshold = _ref3.threshold;

    var identity = function identity(x) {
      return x;
    };
    if (!nodeaccessor) {
      nodeaccessor = identity;
    }
    if (!linkaccessor) {
      linkaccessor = identity;
    }
    attraction = attraction || 1;
    repulsion = repulsion || 1;
    threshold = threshold || 0.5;
    var bound = inside(width, height);

    var nodes = data.nodes;
    var links = data.links;
    var constraints = data.constraints;

    if (!constraints) {
      constraints = {};
    }
    var nodesPositions = {};
    var nodes_ = {};
    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;

    try {
      for (var _iterator2 = nodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        var node = _step2.value;

        var id = nodeaccessor(node);
        nodesPositions[id] = constraints[id] || randomPosition(width, height);
        nodes_[id] = node;
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion2 && _iterator2['return']) {
          _iterator2['return']();
        }
      } finally {
        if (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }

    var links_ = {};

    var _iteratorNormalCompletion3 = true;
    var _didIteratorError3 = false;
    var _iteratorError3 = undefined;

    try {
      for (var _iterator3 = links[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
        var link = _step3.value;

        var _linkaccessor = linkaccessor(link);

        var start = _linkaccessor.start;
        var end = _linkaccessor.end;
        var weight = _linkaccessor.weight;

        links_[start + '|' + end] = { weight: weight, start: start, end: end, link: link };
      }
    } catch (err) {
      _didIteratorError3 = true;
      _iteratorError3 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion3 && _iterator3['return']) {
          _iterator3['return']();
        }
      } finally {
        if (_didIteratorError3) {
          throw _iteratorError3;
        }
      }
    }

    var tick = function tick() {
      var bodies = _bh['default'].bodies(nodesPositions);
      var root = _bh['default'].root(width, height);
      var tree = _bh['default'].tree(bodies, root);
      var attractions = attractiveForces(links_, nodesPositions, attraction / 1000);
      var repulsions = _bh['default'].forces(tree, repulsion * 1000, threshold);
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;

      try {
        for (var _iterator4 = Object.keys(nodesPositions)[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var id = _step4.value;

          var position = nodesPositions[id];
          if (constraints[id]) {
            nodesPositions[id] = constraints[id];
          } else {
            var f1 = attractions[id] || [0, 0];
            var f2 = repulsions[id] || [0, 0];
            var f = (0, _ops.plus)(f1, f2);
            nodesPositions[id] = bound((0, _ops.plus)(position, f));
          }
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4['return']) {
            _iterator4['return']();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }

      return recompute();
    };

    var constrain = function constrain(id, position) {
      constraints[id] = position;
    };

    var unconstrain = function unconstrain(id) {
      delete constraints[id];
    };

    var graph = { tick: tick, constrain: constrain, unconstrain: unconstrain };

    var recompute = function recompute() {
      var i = -1;
      graph.curves = (0, _ops.mapObject)(links_, function (id, _ref4) {
        var start = _ref4.start;
        var end = _ref4.end;
        var link = _ref4.link;

        i += 1;
        var p = nodesPositions[start];
        var q = nodesPositions[end];

        return {
          link: (0, _Polygon['default'])({ points: [p, q], closed: false }),
          item: link,
          index: i
        };
      });

      graph.nodes = (0, _ops.mapObject)(nodes_, function (id, node) {
        return {
          point: nodesPositions[id],
          item: node
        };
      });

      return graph;
    };

    return recompute();
  };
});


text:
class KblogGenerator < Rails::Generators::Base
	source_root File.expand_path('../templates', __FILE__)

  	def create_initializer_file
		puts "creating file config/initializer/kblog_init.rb - adopt to your needs!"
		copy_file "initializer.rb", "config/initializers/kblog_init.rb"
  	end
end


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Syringa meyeri var. spontanea M.C.Chang

### Remarks
null


text:
require('./00-database')
require('./01-models')
require('./02-relations')


text:
package cmd

import (
	"context"
	"io"
	"os"

	"github.com/spf13/cobra"

	"github.com/pilosa/pilosa/ctl"
)

var GenerateConf *ctl.GenerateConfigCommand

func NewGenerateConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
	GenerateConf = ctl.NewGenerateConfigCommand(os.Stdin, os.Stdout, os.Stderr)
	confCmd := &cobra.Command{
		Use:   "generate-config",
		Short: "Print the default configuration.",
		Long: `generate-config prints the default configuration to stdout
`,
		RunE: func(cmd *cobra.Command, args []string) error {
			if err := GenerateConf.Run(context.Background()); err != nil {
				return err
			}
			return nil
		},
	}

	return confCmd
}

func init() {
	subcommandFns["generate-config"] = NewGenerateConfigCommand
}


text:
package daemon

import (
	"context"
	"encoding/json"
	"net/http"

	"go.uber.org/zap"
	authv1 "k8s.io/api/authentication/v1"
)

const TokenHeaderKey = "Token"

type TokenValidator interface {
	Validate(ctx context.Context, token string) (*authv1.TokenReview, error)
}

type Freezer interface {
	Freeze(ctx context.Context, podName string) error
}

type Thawer interface {
	Thaw(ctx context.Context, podName string) error
}

type FreezeThawer interface {
	Freezer
	Thawer
}

type Handler struct {
	Validator TokenValidator
	Freezer   Freezer
	Thawer    Thawer
	Logger    *zap.SugaredLogger
}

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	token := r.Header.Get(TokenHeaderKey)
	if token == "" {
		h.Logger.Error("No token in header")
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	resp, err := h.Validator.Validate(r.Context(), token)
	if err != nil {
		h.Logger.Error("Validating token failed")
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	if !resp.Status.Authenticated {
		h.Logger.Error("Authenticating via token failed")
		w.WriteHeader(http.StatusForbidden)
		return
	}

	var m messageBody
	if err := json.NewDecoder(r.Body).Decode(&m); err != nil {
		h.Logger.Errorf("Unable to decode message body: %v", err)
		w.WriteHeader(http.StatusBadRequest)
	}

	podUid := resp.Status.User.Extra["authentication.kubernetes.io/pod-uid"][0]
	switch m.Action {
	case "pause":
		h.Logger.Infof("pause request received, freezing pod: %s", podUid)
		if err = h.Freezer.Freeze(r.Context(), podUid); err != nil {
			h.Logger.Errorf("freezing pod %s failed: %v", podUid, err)
		}
	case "resume":
		h.Logger.Infof("resume request received, thawing pod: %s", podUid)
		if err = h.Thawer.Thaw(r.Context(), podUid); err != nil {
			h.Logger.Errorf("thawing pod %s failed: %v", podUid, err)
		}
	default:
		h.Logger.Infof("invalid action specified: %s", m.Action)
		w.WriteHeader(http.StatusNotFound)
	}
}

type messageBody struct {
	Action string `json:"action"`
}

type TokenValidatorFunc func(ctx context.Context, token string) (*authv1.TokenReview, error)

func (fn TokenValidatorFunc) Validate(ctx context.Context, token string) (*authv1.TokenReview, error) {
	return fn(ctx, token)
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar2D" inherits="Reference" category="Core" version="3.2">
	<brief_description>
		AStar class representation that uses 2d-vectors as edges.
	</brief_description>
	<description>
		This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="add_point">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="position" type="Vector2">
			</argument>
			<argument index="2" name="weight_scale" type="float" default="1.0">
			</argument>
			<description>
				Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
				[codeblock]
				var as = AStar2D.new()
				as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
				[/codeblock]
				If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
			</description>
		</method>
		<method name="are_points_connected" qualifiers="const">
			<return type="bool">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="to_id" type="int">
			</argument>
			<description>
				Returns whether there is a connection/segment between the given points.
			</description>
		</method>
		<method name="clear">
			<return type="void">
			</return>
			<description>
				Clears all the points and segments.
			</description>
		</method>
		<method name="connect_points">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="to_id" type="int">
			</argument>
			<argument index="2" name="bidirectional" type="bool" default="true">
			</argument>
			<description>
				Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
				[codeblock]
				var as = AStar2D.new()
				as.add_point(1, Vector2(1, 1))
				as.add_point(2, Vector2(0, 5))
				as.connect_points(1, 2, false)
				[/codeblock]
			</description>
		</method>
		<method name="disconnect_points">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="to_id" type="int">
			</argument>
			<description>
				Deletes the segment between the given points.
			</description>
		</method>
		<method name="get_available_point_id" qualifiers="const">
			<return type="int">
			</return>
			<description>
				Returns the next available point ID with no point associated to it.
			</description>
		</method>
		<method name="get_closest_point" qualifiers="const">
			<return type="int">
			</return>
			<argument index="0" name="to_position" type="Vector2">
			</argument>
			<description>
				Returns the ID of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool.
			</description>
		</method>
		<method name="get_closest_position_in_segment" qualifiers="const">
			<return type="Vector2">
			</return>
			<argument index="0" name="to_position" type="Vector2">
			</argument>
			<description>
				Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
				[codeblock]
				var as = AStar2D.new()
				as.add_point(1, Vector2(0, 0))
				as.add_point(2, Vector2(0, 5))
				as.connect_points(1, 2)
				var res = as.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)
				[/codeblock]
				The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
			</description>
		</method>
		<method name="get_id_path">
			<return type="PoolIntArray">
			</return>
			<argument index="0" name="from_id" type="int">
			</argument>
			<argument index="1" name="to_id" type="int">
			</argument>
			<description>
				Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
				[codeblock]
				var as = AStar2D.new()
				as.add_point(1, Vector2(0, 0))
				as.add_point(2, Vector2(0, 1), 1) # Default weight is 1
				as.add_point(3, Vector2(1, 1))
				as.add_point(4, Vector2(2, 0))

				as.connect_points(1, 2, false)
				as.connect_points(2, 3, false)
				as.connect_points(4, 3, false)
				as.connect_points(1, 4, false)
				as.connect_points(5, 4, false)

				var res = as.get_id_path(1, 3) # Returns [1, 2, 3]
				[/codeblock]
				If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
			</description>
		</method>
		<method name="get_point_connections">
			<return type="PoolIntArray">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Returns an array with the IDs of the points that form the connection with the given point.
				[codeblock]
				var as = AStar2D.new()
				as.add_point(1, Vector2(0, 0))
				as.add_point(2, Vector2(0, 1))
				as.add_point(3, Vector2(1, 1))
				as.add_point(4, Vector2(2, 0))

				as.connect_points(1, 2, true)
				as.connect_points(1, 3, true)

				var neighbors = as.get_point_connections(1) # Returns [2, 3]
				[/codeblock]
			</description>
		</method>
		<method name="get_point_path">
			<return type="PoolVector2Array">
			</return>
			<argument index="0" name="from_id" type="int">
			</argument>
			<argument index="1" name="to_id" type="int">
			</argument>
			<description>
				Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
			</description>
		</method>
		<method name="get_point_position" qualifiers="const">
			<return type="Vector2">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Returns the position of the point associated with the given [code]id[/code].
			</description>
		</method>
		<method name="get_point_weight_scale" qualifiers="const">
			<return type="float">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Returns the weight scale of the point associated with the given [code]id[/code].
			</description>
		</method>
		<method name="get_points">
			<return type="Array">
			</return>
			<description>
				Returns an array of all points.
			</description>
		</method>
		<method name="has_point" qualifiers="const">
			<return type="bool">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Returns whether a point associated with the given [code]id[/code] exists.
			</description>
		</method>
		<method name="is_point_disabled" qualifiers="const">
			<return type="bool">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
			</description>
		</method>
		<method name="remove_point">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<description>
				Removes the point associated with the given [code]id[/code] from the points pool.
			</description>
		</method>
		<method name="set_point_disabled">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="disabled" type="bool" default="true">
			</argument>
			<description>
				Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
			</description>
		</method>
		<method name="set_point_position">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="position" type="Vector2">
			</argument>
			<description>
				Sets the [code]position[/code] for the point with the given [code]id[/code].
			</description>
		</method>
		<method name="set_point_weight_scale">
			<return type="void">
			</return>
			<argument index="0" name="id" type="int">
			</argument>
			<argument index="1" name="weight_scale" type="float">
			</argument>
			<description>
				Sets the [code]weight_scale[/code] for the point with the given [code]id[/code].
			</description>
		</method>
	</methods>
	<constants>
	</constants>
</class>


text:
import sys
import time
import pstats
import cProfile
import timeit

sys.path.insert(0, '.')
import vcfnp

def profile():
    a = vcfnp.calldata(sys.argv[1], count=int(sys.argv[2]))

prof_fn = 'profile/tmp.prof'
cmd = 'profile()'
cProfile.runctx(cmd, globals(), locals(), prof_fn)
s = pstats.Stats(prof_fn)
s.strip_dirs().sort_stats('time').print_stats()
print timeit.repeat(cmd, number=int(sys.argv[3]), repeat=int(sys.argv[4]), setup='from __main__ import profile')


text:
module NewRelic
  class Control
    # Contains subclasses of NewRelic::Control that are used when
    # starting the agent within an application. Framework-specific
    # logic should be included here, as documented within the Control
    # abstract parent class
    module Frameworks
    end
  end
end


text:
package com.google.firebase.quickstart.database.java;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.NavDestination;
import androidx.navigation.Navigation;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.firebase.quickstart.database.R;
import com.google.firebase.quickstart.database.databinding.ActivityMainBinding;

public class  MainActivity extends AppCompatActivity {

    private FloatingActionButton fab;
    private NavController navController;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMainBinding binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setSupportActionBar(binding.toolbar);

        fab = binding.fab;

        navController = Navigation.findNavController(this, R.id.nav_host_fragment);
        navController.setGraph(R.navigation.nav_graph_java);
        navController.addOnDestinationChangedListener(new NavController.OnDestinationChangedListener() {
            @Override
            public void onDestinationChanged(@NonNull NavController controller, @NonNull NavDestination destination, @Nullable Bundle arguments) {
                if (destination.getId() == R.id.MainFragment) {
                    fab.setVisibility(View.VISIBLE);
                    fab.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View view) {
                            navController.navigate(R.id.action_MainFragment_to_NewPostFragment);
                        }
                    });
                } else {
                    fab.setVisibility(View.GONE);
                }
            }
        });
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class Transfer
   | Picturepark.SDK.V1 API </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class Transfer
   | Picturepark.SDK.V1 API ">
    <meta name="generator" content="docfx 2.59.4.0">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

    <meta property="docfx:rel" content="../">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

Search Results for

          Show / Hide Table of Contents

Class Transfer

Represents a transfer.

Inheritance

System.Object

Transfer

TransferDetail

Inherited Members

      System.Object.ToString()

      System.Object.Equals(System.Object)

      System.Object.Equals(System.Object, System.Object)

      System.Object.ReferenceEquals(System.Object, System.Object)

      System.Object.GetHashCode()

      System.Object.GetType()

      System.Object.MemberwiseClone()

Namespace: System.Dynamic.ExpandoObject

Syntax

public class Transfer

Properties

BusinessProcessId

Associated business process ID.

Declaration

public string BusinessProcessId { get; set; }

Property Value

        System.String

CollectionId

ID of collection created from transfer.

Declaration

public string CollectionId { get; set; }

Property Value

        System.String

FileTransferCount

Number of files in transfer.

Declaration

public long FileTransferCount { get; set; }

Property Value

        System.Int64

Id

ID of transfer.

Declaration

public string Id { get; set; }

Property Value

        System.String

Name

Name of transfer.

Declaration

public string Name { get; set; }

Property Value

        System.String

State

State of transfer.

Declaration

public TransferState State { get; set; }

Property Value

        TransferState

TransferType

Type of transfer.

Declaration

public TransferType TransferType { get; set; }

Property Value

        TransferType

Methods

FromJson(String)

Declaration

public static Transfer FromJson(string data)

Parameters

        System.String
        data

Returns

        Transfer

ToJson()

Declaration

public string ToJson()

Returns

        System.String

              Back to top

            Generated by DocFX


text:
var gulp = require('gulp');
var gutil = require('gulp-util');
var shell = require('gulp-shell');
var git = require('gulp-git');
var docco = require('gulp-docco');

var cache = require('gulp-cached');
var remember = require('gulp-remember');

var jshint = require('gulp-jshint');
var inkblot = require('gulp-inkblot');
var mocha = require('gulp-mocha');

// Testing Task
// ============

gulp.task('lint', function () {
	return gulp.src(['./bin/**/*.js'])
		.pipe(jshint())
		.pipe(jshint.reporter('default'));
});

gulp.task('inkblot', function () {
	return gulp.src(['./bin/**/*.js'])
		.pipe(inkblot())
		.on('error', gutil.log);
});

gulp.task('test', function () {
	return gulp.src(['./test/**/*.spec.js'])
		.pipe(mocha())
		.on('error', gutil.log);
});

gulp.task('watch', function () {
	gulp.watch(['./bin/**/*.js'], ['lint', 'inkblot', 'test']);
	gulp.watch(['./test/**/*.spec.js'], ['test']);
});

gulp.task('default', ['lint', 'inkblot', 'test', 'watch']);

// Docs Task
// =========
// The `docs` task builds docco files, switches to the gh-pages
// branch, commits the docs, and switches back to the
// development branch.
//
// Usage: `gulp docs`
//

gulp.task('checkout-master', shell.task(['git checkout master']));

gulp.task('docs-make', ['checkout-master'], function() {
	return gulp.src('./lib/**/*.js')
		.pipe(docco())
		.pipe(cache('docs'))
		.pipe(gulp.dest('./docs/'))
		.on('error', gutil.log);
});

gulp.task('docs-commit', ['docs-make'], shell.task([
	'git checkout gh-pages',
	'git add ./docs',
	'git commit -a -m \"update docs\"',
	'git checkout development'
]));

gulp.task('docs', ['docs-commit'], function() {
	git.push('origin', 'gh-pages');
});


text:
To Run locally on OS X
==============
Make sure you have git installed - http://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Mac

Start Apache:
`sudo apachectl start`

Clone the repository into your Apache webroot (`/Library/WebServer/Documents`)
`git clone https://github.com/jasonblanchard/imperfect-tense.git /Library/WebServer/Documents`

Open a Web browser and visit http://localhost/imperfect_tense/.

You can edit the files in `/Library/WebServer/Documents/imperfect-tense`. Most of the HTML is in `index.html`.


text:
var _ = require('lodash');
var types = require('./primitives');

types.many_to_one = require('./many_to_one');
types.one_to_many = require('./one_to_many');
types.many_to_many = require('./many_to_many');
types.one_to_one = require('./one_to_one');

types.option_value = require('./option_value');
types.option_values = require('./option_values');

require('./macros')(types);

module.exports = function(options) {
  return _.extend(types, options.types);
};


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Lentinus tenuipes Sacc. & Paol., 1888

### Remarks
null


text:
  OOP for NodeJS with magic. Inspired by [Classified](https://github.com/cblanquera/classified)

[![Build Status](https://api.travis-ci.org/cblanquera/classified-magic.png)](https://travis-ci.org/cblanquera/classified-magic/)

[![NPM](https://badge.fury.io/js/classified-magic.svg)](https://www.npmjs.org/package/classified-magic)

### Installation

```bash
$ npm install classified-magic
```

## Quick Start

```
var classified = require('classified-magic');

//root definition
var RootClass = classified(function() {
	//sample constants
	this.SOME_CONSTANT = 'foo';

	//sample public properties
	this.data = {};

	this.sampleProperty = 4.5;

	this.sampleDeepProperty = {
		sample1: 'Hello',
		sample2: [4, 5, 6, 7],
		sample3: {
			bool	: true,
			regex	: /^abc/,
			date	: new Date(),
			string	: String
		}
	};

	//sample protected properties
	this._sampleProperty = 5.5;

	this._sampleDeepProperty = {
		sample1: '_Hello',
		sample2: [8, 9, 0, 1]
	};

	//sample private properties
	this.__sampleProperty = 6.5;

	this.__sampleDeepProperty = {
		sample1: '__Hello',
		sample2: [12, 13, 14, 15]
	};

	//sample constructor
	this.___construct = function() {
		this.constructCalled = true;
	};

	//sample public method
	this.sampleMethod = function() {
		return this._sampleMethod();
	};

	//sample protected method
	this._sampleMethod = function() {
		return this.__sampleMethod();
	};

	//sample private method
	this.__sampleMethod = function() {
		return this.SOME_CONSTANT + this._sampleProperty;
	};

	this.sampleAccessMethod = function() {
		return this.sampleMethod()
		+ this._sampleMethod()
		+ this.__sampleMethod();
	};

	//sample magic methods
	this.___get = function(name) {
		return this.data[name];
	};

	this.___set = function(name, value) {
		this.data[name] = value;
	};

	this.___enum = function() {
		return Object.keys(this.data);
	};

	this.___has = function(name, value) {
		return this.data.hasOwnProperty(name);
	};

	this.___delete = function(name) {
		delete this.data[name];
	};
});

//sample child definition
//you can use object or function as the definition
var ChildClass = RootClass.extend(function() {
	//sample constants
	this.SOME_CONSTANT_2 = 'bar';

	//sample protected properties
	this._sampleProperty = 7.5;

	//sample public methods
	this.sampleMethod = function() {
		return this._sampleMethod();
	};

	//sample protected methods
	this._sampleMethod = function() {
		return this.___parent._sampleMethod();
	};
});

//instantiate child
var child = ChildClass.load();

//test it
console.log(child.sampleMethod()); //--> foo7.5

try {
	child._sampleMethod();
} catch(e) {
	console.log('Protected call did not work');
}

//test magic
child.foo = 4;

console.log(child.data.foo);
```

### Features

  * Public, Private, Protected
  * Constants
  * Inheritance
  * Works on server or client
  * Magic methods - get, set and iterators

### Methods

  * define(object|function) - Defines the class
  * extend(object|function) - Adds a parent to be combined with the definition
  * definition() - Returns the entire definition including the protected and private properties
  * parents() - Returns direct parents of this definition
  * get() - Returns the publically accessable class definition function
  * load() - Returns class defined instantiation
  * register(string) - saves a state of the definition which can be recalled in trait
  * trait(string|function|object) - will setup the provided as a parent, if string will recall from registry

### What's up with the underscores?

  * _ - protected properties and methods
  * __ - private properties and methods
  * ___ - Magic placeholder


text:
![](https://raw.githubusercontent.com/Deadarius/confeta/master/images/confeta-large.png)

# Usage:

```js
import { Confeta, types } from 'confeta'
import ConfetaEnv from 'confeta-env'
import ConfetaArgv from 'confeta-argv'
import ConfetaFile from 'confeta-file'
import changeCase from 'change-case'

let config = Confeta({
  mongoUrl: {
    type: types.string,
    description: 'Mongo Url',
    default: 'mongo://localhost:27017'
  },
  timeout: {
    type: types.integer
  },
  host: {
    type: {  // nested object
      domain: {
        type: types.string,
        description: 'Domain name',
        required: true
      },
      port: {
        type: types.integer,
        description: 'Port',
        required: true
      }
    }
  }
})
.addSource(ConfetaEnv({prefix: 'MYAPP__', separator: '__'}), changeCase.constantCase)
.addSource(ConfetaArgv())
.addSource(ConfetaFile({parseFn: JSON.parse, path: 'config.json'}))
.build()
```

Full example can be seen in ```./example```

# Why? We already have nconf...

I got tired of nconf inability to handle different naming conventions between different sources (e.g. CONSTANT_CASE in process.env vs camelCase in json file). So I created a new, more customisable library where you can specify schema for your configuration and map schema names to different sources. With schema you can specify exactly what type do you expect and avoid annoying situation when you have to parse value manually after getting it from config. Also some simple validation I think is nice.

# Separate packages?

Yes, core ```confeta``` package has no sources in it. You have to either install a separate package with source you need for your app or implement your own one (which is very simple btw)

Officially supported sources:
* confeta-env
* confeta-args
* confeta-file (Customisable to read from any format you want, given you provide parse function, reads JSON by default)

# Api

## Confeta(schema, options)

options:
* strict - (boolean) when true throw errors if types from config source don't match specified in config, when false just tries to parse them (default: false)

## .addSource(source, mapKeyFn)

* source - object that used to fetch settings from specific source
* mapKeyFn - function that is used to map schema key to source key (e.g. if you want to turn pascalCase name of schema into CONSTANT_CASE name from environment)

## .build()

Returns object containting all settings fetched from sources

# Custom sources

It's very simple, all you have to do is provide object which exposes ```.get(segments)``` function. It will be called every time Confeta tries to fetch value and ```segments``` will be an array of strings which represents a path to value in a schema tree.

# License

MIT


text:
=====================
sphinxcontrib-openapi
=====================

**sphinxcontrib-openapi** is a `Sphinx`_ extension to generate APIs docs from
`OpenAPI`_ (fka Swagger) spec. It depends on `sphinxcontrib-httpdomain`_ that
provides an HTTP domain for describing RESTful HTTP APIs, so we don't need to
reinvent the wheel.

.. code:: bash

   $ python3 -m pip install sphinxcontrib-openapi

Usage
=====

Pass ``sphinxcontrib-openapi`` to ``extensions`` list in  Sphinx's ``conf.py``

.. code:: python

   extensions = [
      ...
      'sphinxcontrib.openapi',
   ]

and feel free to use the ``openapi`` directive to render OpenAPI specs

.. code:: restructuredtext

   .. openapi:: path/to/openapi.yml

Links
=====

* Documentation: https://sphinxcontrib-openapi.readthedocs.org/
* Source: https://github.com/sphinx-contrib/openapi
* Bugs: https://github.com/sphinx-contrib/openapi/issues

.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _OpenAPI: https://github.com/OAI/OpenAPI-Specification
.. _sphinxcontrib-httpdomain: https://sphinxcontrib-httpdomain.readthedocs.io/


text:
stead.wroom_enter = function(self, ...)
	local w = self.where
	if stead.type(w) ~= 'table' then
		w = stead.call(self, 'where')
	end
	local r, v = stead.walk(w);
	if v ~= false then
		self._toggle = true
	end
	return r, v
end

stead.wroom_save = function(self, name, h, need)
	if need then
		local a = stead.tostring(self.oldname);
		local b = stead.tostring(self.newname);
		local c = stead.tostring(self.where);

		if a == nil or b == nil or c == nil then
			error ("Can not save wroom "..name.."\nFunctions can not be saved, use code [[ ]]");
		end
		local t = stead.string.format("%s = wroom(%s, %s, %s);\n",
			name, a, b, c);
		h:write(t);
	end
	stead.savemembers(h, self, name, false);
end

function wroom(a, b, c)
	local v = room { vroom_type = true, nam = a, where = c, enter = stead.wroom_enter, save = stead.wroom_save };
	v.newname = b;
	v.oldname = a;
	v._toggle = false
	if c == nil then -- only two parameters
		v.newname = nil
		v.where = b
	end
	v.nam = function(s)
		if s._toggle and s.newname then
			return stead.call(s, 'newname')
		else
			return stead.call(s, 'oldname');
		end
	end
	return v
end


text:
Orleans StorageProvider for RavenDB
===============================

This is a StorageProvider for RavenDB for the Microsoft Research Project Orleans. The storage provider allows to persist stateful grains into RavenDB. The provider offers the following options:

* Server Mode
* Embedded Mode
* InMemory

In order to use the provider you need to add the following provider to your configuration:

````
<Provider Type="Orleans.StorageProvider.RavenDB.RavenDBStorageProvider" Name="RavenDBStore" ConnectionStringName="RavenDB"/>
````
and this line to any grain that uses it
````
[StorageProvider(ProviderName = "RavenDBStore")]
````
In addition you need an application configuration file (app.config) with a connection string named after the ConnectionStringName in the provider configuration entry.
````
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="RavenDB" connectionString="YOUR CONNECTION STRING HERE"/>
  </connectionStrings>
</configuration>
````
All connection string officially supported by RavenDB are also supported by the provider. The mode (Server, Embedded, InMemory) is chosen based on the connection string according to the following strategy:

* When the connection string is empty the InMemory mode is used
* When the connection string is an Url the Server mode is used
* When the connection string is a DataDir the Embedded mode is used

Here are examples of such connection strings:

````
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="RavenDB" connectionString="Url = http://localhost:8080;Database=RavenDBStorageProviderTests"/>  <!-- Server Mode -->
    <add name="RavenDBLocal" connectionString="DataDir = ~\Data"/> <!-- Embedded Mode -->
  </connectionStrings>
</configuration>

<Provider Type="Orleans.StorageProvider.RavenDB.RavenDBStorageProvider" Name="RavenDBStore" ConnectionStringName=""/> <!-- InMemory Mode -->

````


text:
package net.genesishub.gFeatures.Feature.GenesisEconomy;

import java.io.IOException;
import java.sql.SQLException;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Event;
import org.bukkit.event.player.PlayerJoinEvent;

import com.earth2me.essentials.api.UserDoesNotExistException;

import net.genesishub.gFeatures.Retrieval;
import net.genesishub.gFeatures.gFeature;

public class GenesisEconomy extends gFeature{

	net.genesishub.gFeatures.Feature.GenesisEconomy.Listeners listeners = new net.genesishub.gFeatures.Feature.GenesisEconomy.Listeners();

	public GenesisEconomy(String featurename, String d) {
		super(featurename, d);
	}
	@Override
	public void enable(){
		try {
			listeners.onEnable();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	@Override
	public void disable(){
		listeners.onDisable();
	}
	@Override
	public void eventTrigger(Event event) {
		if(event.getEventName().equalsIgnoreCase("playerjoinevent")){
			listeners.onPlayerJoin((PlayerJoinEvent)event);
		}
	}
	@Retrieval
	public void onPlayerJoin(){}
	@Override
	public void commandTrigger(CommandSender sender, Command cmd, String label, String[] args) {
			try {
				listeners.onCommand(sender, cmd, label, args);
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalStateException e) {
				e.printStackTrace();
			} catch (UserDoesNotExistException e) {
				e.printStackTrace();
			}
	}
}


text: require "pushcar/channel/in_memory"


text:
This module lets you string together key combinations in awesome triggered by pressing a leader key. It should roughly emulate vim's behavior here. Count arguments before combinations are also supported.

Note: This version needs the latest awesome-git

## Instructions

```
local leader = require "awesome-leader"

local tab_keys = leader.bind_actions({
    {"t",
     function(args)
       awful.tag.add("new", {index=args.count})
     end,
     "New tag!"
    },
})

local rec_leader =
  leader.wrap(
    leader.repeat_count,
    leader.bind({
        {"t", tab_keys, "Tags"},
  }))

local root_leader = leader.leader(rec_leader)

awful.key({ modkey }, "z", root_leader)
```

Use `bind_actions` to bind a list of simple Lua functions, keys and
descriptions. To build up more complicated bindings (in this example, to put
`tab_keys` behind the `t` key) use `bind`.

With this config, we can press combinations like `<modkey-z>2t2` to add 2 new tabs at index 2.
We also get nifty popups at each stage telling us what keys are available.

The `wrap` and second `bind` call are just examples, we can leave them out and directly call
`leader.leader(tab_keys)`.


text:
<?php

namespace Xibo\OAuth2\Client\Entity;

use Xibo\OAuth2\Client\Exception\XiboApiException;

class XiboWebpage extends XiboWidget
{

    /** @var int The Widget ID */
    public $widgetId;

    /** @var int The Playlist ID */
    public $playlistId;

    /** @var int The Owner ID */
    public $ownerId;

    /** @var string The Widget Type */
    public $type;

    /** @var int The Widget Duration */
    public $duration;

    /** @var int The Display Order of the Widget */
    public $displayOrder;

    /** @var int Flag indicating whether to use custom duration */
    public $useDuration;

    /** @var string Optional widget name */
    public $name;

    /** @var int Flag should the HTML be shown with a transparent background? */
    public $transparency;

    /** @var string String containing the location (URL) of the web page */
    public $uri;

    /** @var int For Manual position the percentage to scale the Web page (0-100) */
    public $scaling;

    /** @var int For Manual position, the starting point from the left in pixels */
    public $offsetLeft;

    /** @var int For Manual position, the starting point from the Top in pixels */
    public $offsetTop;

    /** @var int For Manual Position and Best Fit, The width of the page - if empty it will use region width */
    public $pageWidth;

    /** @var int For Manual Position and Best Fit, The height of the page - if empty it will use region height */
    public $pageHeight;

    /** @var int The mode option for Web page, 1- Open Natively, 2- Manual Position, 3- Best Ft */
    public $modeId;

    /**
     * Create new Webpage Widget.
     *
     * @param string $name Optional Widget
     * @param int $duration The Widget Duration
     * @param int $useDuration Flag indicating whether to use custom duration
     * @param int $transparency Flag should the HTML be shown with a transparent background?
     * @param string $uri String containing the location (URL) of the web page
     * @param int $scaling For Manual position the percentage to scale the Web page (0-100)
     * @param int $offsetLeft For Manual position, the starting point from the left in pixels
     * @param int $offsetTop For Manual position, the starting point from the Top in pixels
     * @param int $pageWidth For Manual Position and Best Fit, The width of the page - if empty it will use region width
     * @param int $pageHeight For Manual Position and Best Fit, The height of the page - if empty it will use region height
     * @param int $modeId The mode option for Web page, 1- Open Natively, 2- Manual Position, 3- Best Ft
     * @param int $playlistId The Playlist ID
     * @return XiboWebpage
     */
    public function create($name, $duration, $useDuration, $transparency, $uri, $scaling, $offsetLeft, $offsetTop, $pageWidth, $pageHeight, $modeId, $playlistId)
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->name = $name;
        $this->duration = $duration;
        $this->useDuration = $useDuration;
        $this->transparency = $transparency;
        $this->uri = $uri;
        $this->scaling = $scaling;
        $this->offsetLeft = $offsetLeft;
        $this->offsetTop = $offsetTop;
        $this->pageWidth = $pageWidth;
        $this->pageHeight = $pageHeight;
        $this->modeId = $modeId;
        $this->playlistId = $playlistId;
        $this->getLogger()->info('Creating a new Webpage widget in playlist ID ' .$playlistId);
        $response = $this->doPost('/playlist/widget/webpage/' . $playlistId , $this->toArray());

        return $this->hydrate($response);
    }

    /**
     * Edit existing Webpage Widget.
     *
     * @param string $name Optional Widget
     * @param int $duration The Widget Duration
     * @param int $useDuration Flag indicating whether to use custom duration
     * @param int $transparency Flag should the HTML be shown with a transparent background?
     * @param string $uri String containing the location (URL) of the web page
     * @param int $scaling For Manual position the percentage to scale the Web page (0-100)
     * @param int $offsetLeft For Manual position, the starting point from the left in pixels
     * @param int $offsetTop For Manual position, the starting point from the Top in pixels
     * @param int $pageWidth For Manual Position and Best Fit, The width of the page - if empty it will use region width
     * @param int $pageHeight For Manual Position and Best Fit, The height of the page - if empty it will use region height
     * @param int $modeId The mode option for Web page, 1- Open Natively, 2- Manual Position, 3- Best Ft
     * @param int $widgetId The Widget ID
     * @return XiboWebpage
     */
    public function edit($name, $duration, $useDuration, $transparency, $uri, $scaling, $offsetLeft, $offsetTop, $pageWidth, $pageHeight, $modeId, $widgetId)
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->name = $name;
        $this->duration = $duration;
        $this->useDuration = $useDuration;
        $this->transparency = $transparency;
        $this->uri = $uri;
        $this->scaling = $scaling;
        $this->offsetLeft = $offsetLeft;
        $this->offsetTop = $offsetTop;
        $this->pageWidth = $pageWidth;
        $this->pageHeight = $pageHeight;
        $this->modeId = $modeId;
        $this->widgetId = $widgetId;
        $this->getLogger()->info('Editing widget ID ' . $widgetId);
        $response = $this->doPut('/playlist/widget/' . $widgetId , $this->toArray());

        return $this->hydrate($response);
    }

    /**
    * Delete the widget.
     *
     * @return boolean
    */
    public function delete()
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->getLogger()->info('Deleting widget ID ' . $this->widgetId);
        $this->doDelete('/playlist/widget/' . $this->widgetId , $this->toArray());

        return true;
    }
}


text:
package gov.nasa.worldwind.util;

import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.*;
import gov.nasa.worldwind.render.DrawContext;

/**
 * A collection of useful math methods, all static.
 *
 * @author tag
 * @version $Id: WWMath.java 12802 2009-11-17 23:51:59Z dcollins $
 */
public class WWMath
{
    public static final double SECOND_TO_MILLIS = 1000.0;
    public static final double MINUTE_TO_MILLIS = 60000.0;
    public static final double HOUR_TO_MILLIS = 3600000.0;

    public static final double METERS_TO_KILOMETERS = 1e-3;
    public static final double METERS_TO_MILES = 0.000621371192;
    public static final double METERS_TO_NAUTICAL_MILES = 0.000539956803;
    public static final double METERS_TO_YARDS = 1.0936133;
    public static final double METERS_TO_FEET = 3.280839895;

    public static final double SQUARE_METERS_TO_SQUARE_KILOMETERS = 1e-6;
    public static final double SQUARE_METERS_TO_SQUARE_MILES = 3.86102159e-7;
    public static final double SQUARE_METERS_TO_SQUARE_YARDS = 1.19599005;
    public static final double SQUARE_METERS_TO_SQUARE_FEET = 10.7639104;
    public static final double SQUARE_METERS_TO_HECTARES = 1e-4;
    public static final double SQUARE_METERS_TO_ACRES = 0.000247105381;

    /**
     * Convenience method to compute the log base 2 of a value.
     *
     * @param value the value to take the log of.
     *
     * @return the log base 2 of the specified value.
     */
    public static double logBase2(double value)
    {
        return Math.log(value) / Math.log(2d);
    }

    /**
     * Convenience method for testing whether a value is a power of two.
     *
     * @param value the value to test for power of 2
     *
     * @return true if power of 2, else false
     */
    public static boolean isPowerOfTwo(int value)
    {
        return (value == powerOfTwoCeiling(value));
    }

    /**
     * Returns the value that is the nearest power of 2 greater than or equal to the given value.
     *
     * @param reference the reference value. The power of 2 returned is greater than or equal to this value.
     *
     * @return the value that is the nearest power of 2 greater than or equal to the reference value
     */
    public static int powerOfTwoCeiling(int reference)
    {
        int power = (int) Math.ceil(Math.log(reference) / Math.log(2d));
        return (int) Math.pow(2d, power);
    }

    /**
     * Returns the value that is the nearest power of 2 less than or equal to the given value.
     *
     * @param reference the reference value. The power of 2 returned is less than or equal to this value.
     *
     * @return the value that is the nearest power of 2 less than or equal to the reference value
     */
    public static int powerOfTwoFloor(int reference)
    {
        int power = (int) Math.floor(Math.log(reference) / Math.log(2d));
        return (int) Math.pow(2d, power);
    }

    /**
     * Clamps a value to a given range.
     *
     * @param v   the value to clamp.
     * @param min the floor.
     * @param max the ceiling
     *
     * @return the nearest value such that min <= v <= max.
     */
    public static double clamp(double v, double min, double max)
    {
        return v < min ? min : v > max ? max : v;
    }

    /**
     * Returns the interpolation factor for v given the specified range [x, y]. The
     * interpolation factor is a number between 0 and 1 (inclusive), representing the value's relative position between
     * x and y. For example, 0 corresponds to x, 1 corresponds to y,
     * and anything in between corresponds to a linear combination of x and y.
     *
     * @param v the value to compute the interpolation factor for.
     * @param x the first value.
     * @param y the second value.
     *
     * @return the interpolation factor for v given the specified range [x, y]
     */
    public static double computeInterpolationFactor(double v, double x, double y)
    {
        return clamp((v - x) / (y - x), 0d, 1d);
    }

    /**
     * Returns the linear interpolation of x and y according to the function: (1 - a) *
     * x + a * y. The interpolation factor a defines the weight given to each value, and is clamped
     * to the range [0, 1]. If a is 0 or less, this returns x. If a is 1 or more, this returns
     * y. Otherwise, this returns the linear interpolation of x and y. For
     * example, when a is 0.5 this returns (x + y)/2.
     *
     * @param a the interpolation factor.
     * @param x the first value.
     * @param y the second value.
     *
     * @return the linear interpolation of x and y.
     */
    public static double mix(double a, double x, double y)
    {
        double t = clamp(a, 0d, 1d);
        return x + t * (y - x);
    }

    /**
     * Returns the smooth hermite interpolation of x and y according to the function: (1
     * - t) * x + t * y, where t = a * a * (3 - 2 * a). The interpolation factor a
     * defines the weight given to each value, and is clamped to the range [0, 1]. If a is 0 or less, this
     * returns x. If a is 1 or more, this returns y. Otherwise, this returns the
     * smooth hermite interpolation of x and y. Like the linear function {@link #mix(double,
     * double, double)}, when a is 0.5 this returns (x + y)/2. But unlike the
     * linear function, the hermite function's slope gradually increases when a is near 0, then gradually
     * decreases when a is near 1. This is a useful property where a more gradual transition from
     * x to y is desired.
     *
     * @param a the interpolation factor.
     * @param x the first value.
     * @param y the second value.
     *
     * @return the smooth hermite interpolation of x and y.
     */
    public static double mixSmooth(double a, double x, double y)
    {
        double t = clamp(a, 0d, 1d);
        t = t * t * (3d - 2d * t);
        return x + t * (y - x);
    }

    /**
     * converts meters to feet.
     *
     * @param meters the value in meters.
     *
     * @return the value converted to feet.
     */
    public static double convertMetersToFeet(double meters)
    {
        return (meters * METERS_TO_FEET);
    }

    /**
     * converts meters to miles.
     *
     * @param meters the value in meters.
     *
     * @return the value converted to miles.
     */
    public static double convertMetersToMiles(double meters)
    {
        return (meters * METERS_TO_MILES);
    }

    /**
     * Converts time in seconds to time in milliseconds.
     *
     * @param seconds time in seconds.
     *
     * @return time in milliseconds.
     */
    public static double convertSecondsToMillis(double seconds)
    {
        return (seconds * SECOND_TO_MILLIS);
    }

    /**
     * Converts time in milliseconds to time in seconds.
     *
     * @param millis time in milliseconds.
     *
     * @return time in seconds.
     */
    public static double convertMillisToSeconds(double millis)
    {
        return millis / SECOND_TO_MILLIS;
    }

    /**
     * Converts time in minutes to time in milliseconds.
     *
     * @param minutes time in minutes.
     *
     * @return time in milliseconds.
     */
    public static double convertMinutesToMillis(double minutes)
    {
        return (minutes * MINUTE_TO_MILLIS);
    }

    /**
     * Converts time in milliseconds to time in minutes.
     *
     * @param millis time in milliseconds.
     *
     * @return time in minutes.
     */
    public static double convertMillisToMinutes(double millis)
    {
        return millis / MINUTE_TO_MILLIS;
    }

    /**
     * Converts time in hours to time in milliseconds.
     *
     * @param hours time in hours.
     *
     * @return time in milliseconds.
     */
    public static double convertHoursToMillis(double hours)
    {
        return (hours * HOUR_TO_MILLIS);
    }

    /**
     * Converts time in milliseconds to time in hours.
     *
     * @param mills time in milliseconds.
     *
     * @return time in hours.
     */
    public static double convertMillisToHours(double mills)
    {
        return mills / HOUR_TO_MILLIS;
    }

    /**
     * Returns the distance in model coordinates from the {@link gov.nasa.worldwind.View} eye point to the specified
     * {@link gov.nasa.worldwind.geom.Extent}. If the View eye point is inside the extent, this returns 0.
     *
     * @param dc     the {@link gov.nasa.worldwind.render.DrawContext} which the View eye point is obtained from.
     * @param extent the extent to compute the distance from.
     *
     * @return the distance from the View eye point to the extent, in model coordinates.
     *
     * @throws IllegalArgumentException if either the DrawContext or the extent is null.
     */
    public static double computeDistanceFromEye(DrawContext dc, Extent extent)
    {
        if (dc == null)
        {
            String message = Logging.getMessage("nullValue.DrawContextIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        if (extent == null)
        {
            String message = Logging.getMessage("nullValue.ExtentIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        double distance = dc.getView().getEyePoint().distanceTo3(extent.getCenter()) - extent.getRadius();
        return (distance < 0d) ? 0d : distance;
    }

    /**
     * Returns the size in window coordinates of the specified {@link gov.nasa.worldwind.geom.Extent} from the current
     * {@link gov.nasa.worldwind.View}. The returned size is an estimate of the Extent's diameter in window
     * coordinates.
     *
     * @param dc     the current draw context, from which the View is obtained from.
     * @param extent the extent to compute the window size for.
     *
     * @return size of the specified Extent from the specified View, in window coordinates (screen pixels).
     *
     * @throws IllegalArgumentException if either the DrawContext or the extent is null.
     */
    public static double computeSizeInWindowCoordinates(DrawContext dc, Extent extent)
    {
        if (dc == null)
        {
            String message = Logging.getMessage("nullValue.DrawContextIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        if (extent == null)
        {
            String message = Logging.getMessage("nullValue.ExtentIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        // Estimate the size in window coordinates W from as follows. Given
        // R, the extent radius in meters
        // D, the distance from eye point to extent center, in meters
        //
        // compute S, the size of screen pixel at D, in meters/pixels. S is an estimate based on the viewport
        // size, the view projection, and D.
        //
        // Finally, estimate W, the extent's diameter in window coordinates (screen pixels).
        //
        // W : 2R * 1/S = (2R meters / S meters) * 1 pixels = 2R/S pixels

        double distance = dc.getView().getEyePoint().distanceTo3(extent.getCenter());
        double pixelSize = dc.getView().computePixelSizeAtDistance(distance);
        return 2d * extent.getRadius() / pixelSize;
    }

    /**
     * Returns the normal vector corresponding to the triangle defined by three vertices (a, b, c).
     *
     * @param a the triangle's first vertex.
     * @param b the triangle's second vertex.
     * @param c the triangle's third vertex.
     *
     * @return the triangle's normal vector.
     *
     * @throws IllegalArgumentException if any of the specified vertices are null.
     */
    public static Vec4 computeTriangleNormal(Vec4 a, Vec4 b, Vec4 c)
    {
        if (a == null || b == null || c == null)
        {
            String message = Logging.getMessage("nullValue.Vec4IsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        double x = ((b.y - a.y) * (c.z - a.z)) - ((b.z - a.z) * (c.y - a.y));
        double y = ((b.z - a.z) * (c.x - a.x)) - ((b.x - a.x) * (c.z - a.z));
        double z = ((b.x - a.x) * (c.y - a.y)) - ((b.y - a.y) * (c.x - a.x));

        double length = (x * x) + (y * y) + (z * z);
        if (length == 0d)
            return new Vec4(x, y, z);

        length = Math.sqrt(length);
        return new Vec4(x / length, y / length, z / length);
    }

    /**
     * Returns the area enclosed by the specified locations, in angular degrees. If the specified locations do not
     * define a closed loop, then the loop is automatically closed by appending the first location to the last
     * location.
     *
     * @param locations the locations which define the geographic polygon.
     *
     * @return the area enclosed by the specified coordinates.
     *
     * @throws IllegalArgumentException if locations is null.
     */
    public static double computePolygonArea(Iterable<? extends LatLon> locations)
    {
        if (locations == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        java.util.Iterator<? extends LatLon> iter = locations.iterator();
        if (!iter.hasNext())
        {
            return 0;
        }

        double area = 0;
        LatLon firstLocation = iter.next();
        LatLon location = firstLocation;

        while (iter.hasNext())
        {
            LatLon nextLocation = iter.next();

            area += location.getLongitude().degrees * nextLocation.getLatitude().degrees;
            area -= nextLocation.getLongitude().degrees * location.getLatitude().degrees;

            location = nextLocation;
        }

        // Include the area connecting the last point to the first point, if they're not already equal.
        if (!location.equals(firstLocation))
        {
            area += location.getLongitude().degrees * firstLocation.getLatitude().degrees;
            area -= firstLocation.getLongitude().degrees * location.getLatitude().degrees;
        }

        area /= 2.0;
        return area;
    }

    /**
     * Returns the area enclosed by the specified (x, y) points (the z and w coordinates are ignored). If the specified
     * points do not define a closed loop, then the loop is automatically closed by simulating appending the first point
     * to the last point.
     *
     * @param points the (x, y) points which define the 2D polygon.
     *
     * @return the area enclosed by the specified coordinates.
     *
     * @throws IllegalArgumentException if points is null.
     */
    public static double computePolygonArea2(Iterable<? extends Vec4> points)
    {
        if (points == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        java.util.Iterator<? extends Vec4> iter = points.iterator();
        if (!iter.hasNext())
        {
            return 0;
        }

        double area = 0;
        Vec4 firstPoint = iter.next();
        Vec4 point = firstPoint;

        while (iter.hasNext())
        {
            Vec4 nextLocation = iter.next();

            area += point.x * nextLocation.y;
            area -= nextLocation.x * point.y;

            point = nextLocation;
        }

        // Include the area connecting the last point to the first point, if they're not already equal.
        if (!point.equals(firstPoint))
        {
            area += point.x * firstPoint.y;
            area -= firstPoint.x * point.y;
        }

        area /= 2.0;
        return area;
    }

    /**
     * Returns the winding order of the polygon described by the specified locations, with respect an axis perpendicular
     * to the (lat, lon) coordinates, and pointing in the direction of "positive elevation".
     *
     * @param locations the locations which define the geographic polygon.
     *
     * @return {@link AVKey#CLOCKWISE} if the polygon has clockwise winding order about the positive z axis, and {@link
     *         AVKey#COUNTER_CLOCKWISE} otherwise.
     */
    public static String computePolygonWindingOrder(Iterable<? extends LatLon> locations)
    {
        if (locations == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        double area = computePolygonArea(locations);

        return (area < 0) ? AVKey.CLOCKWISE : AVKey.COUNTER_CLOCKWISE;
    }

    /**
     * Returns the winding order of the 2D polygon described by the specified (x, y) points (z and w coordinates are
     * ignored), with respect to the positive z axis.
     *
     * @param points the (x, y) points which define the 2D polygon.
     *
     * @return AVKey.CLOCKWISE if the polygon has clockwise winding order about the positive z axis, and
     *         AVKey.COUNTER_CLOCKWISE otherwise.
     */
    public static String computePolygonWindingOrder2(Iterable<? extends Vec4> points)
    {
        if (points == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        double area = computePolygonArea2(points);

        return (area < 0) ? AVKey.CLOCKWISE : AVKey.COUNTER_CLOCKWISE;
    }

    /**
     * Returns whether the geographic polygon described by the specified locations defines a closed loop. If the
     * iterable holds fewer than two points, this always returns false. Therefore a polygon consisting of a single point
     * and the empty polygon are not considered closed loops.
     *
     * @param locations the locations which define the geographic polygon.
     *
     * @return true if the polygon defines a closed loop, and false otherwise.
     *
     * @throws IllegalArgumentException if the locations are null.
     */
    public static boolean isPolygonClosed(Iterable<? extends LatLon> locations)
    {
        if (locations == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        java.util.Iterator<? extends LatLon> iter = locations.iterator();
        if (!iter.hasNext())
        {
            return false;
        }

        LatLon firstLocation = iter.next();
        LatLon lastLocation = null;

        while (iter.hasNext())
        {
            lastLocation = iter.next();
        }

        return (lastLocation != null) && lastLocation.equals(firstLocation);
    }

    /**
     * Returns whether the 2D polygon described by the specified (x, y) points defines a closed loop (z and w
     * coordinates are ignored). If the iterable holds fewer than two points, this always returns false. Therefore a
     * polygon consisting of a single point and the empty polygon are not considered closed loops.
     *
     * @param points the (x, y) points which define the 2D polygon.
     *
     * @return true if the polygon defines a closed loop, and false otherwise.
     *
     * @throws IllegalArgumentException if the points are null.
     */
    public static boolean isPolygonClosed2(Iterable<? extends Vec4> points)
    {
        if (points == null)
        {
            String message = Logging.getMessage("nullValue.IterableIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        java.util.Iterator<? extends Vec4> iter = points.iterator();
        if (!iter.hasNext())
        {
            return false;
        }

        Vec4 firstPoint = iter.next();
        Vec4 lastPoint = null;

        while (iter.hasNext())
        {
            lastPoint = iter.next();
        }

        return (lastPoint != null) && (lastPoint.x == firstPoint.x) && (lastPoint.y == firstPoint.y);
    }

    // TODO: this is only valid for linear path type
    /**
     * Determines whether a {@link LatLon} location is located inside a given polygon.
     *
     * @param location  the location
     * @param locations the list of positions describing the polygon. Last one should be the same as the first one.
     *
     * @return true if the location is inside the polygon.
     */
    public static boolean isLocationInside(LatLon location, Iterable<? extends LatLon> locations)
    {
        if (location == null)
        {
            String message = Logging.getMessage("nullValue.LatLonIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        java.util.Iterator<? extends LatLon> iter = locations.iterator();
        if (!iter.hasNext())
        {
            return false;
        }

        // Test for even/odd number of intersections with a constant latitude line going through the given location.
        boolean result = false;
        LatLon p1 = iter.next();
        while (iter.hasNext())
        {
            LatLon p2 = iter.next();

// Developped for clarity
//            double lat = location.getLatitude().degrees;
//            double lon = location.getLongitude().degrees;
//            double lat1 = p1.getLatitude().degrees;
//            double lon1 = p1.getLongitude().degrees;
//            double lat2 = p2.getLatitude().degrees;
//            double lon2 = p2.getLongitude().degrees;
//            if ( ((lat2 <= lat && lat < lat1) || (lat1 <= lat && lat < lat2))
//                    && (lon < (lon1 - lon2) * (lat - lat2) / (lat1 - lat2) + lon2) )
//                result = !result;

            if (((p2.getLatitude().degrees <= location.getLatitude().degrees
                && location.getLatitude().degrees < p1.getLatitude().degrees) ||
                (p1.getLatitude().degrees <= location.getLatitude().degrees
                    && location.getLatitude().degrees < p2.getLatitude().degrees))
                && (location.getLongitude().degrees < (p1.getLongitude().degrees - p2.getLongitude().degrees)
                * (location.getLatitude().degrees - p2.getLatitude().degrees)
                / (p1.getLatitude().degrees - p2.getLatitude().degrees) + p2.getLongitude().degrees))
                result = !result;

            p1 = p2;
        }
        return result;
    }
}


text:
'use strict';

var chalk = require('chalk');
var table = require('text-table');
var common = require('./common');

function listPost(){
  /* jshint validthis: true */
  var Post = this.model('Post');

  var data = Post.sort({published: -1, date: 1}).map(function(post){
    var date = post.published ? post.date.format('YYYY-MM-DD') : 'Draft';
    var tags = post.tags.map(function(tag) {
        return tag.name;
    });
    var categories = post.categories.findOne({}).name;
    return [chalk.gray(date), post.title, chalk.magenta(post.source), categories, tags.join(', ')];
  });

  // Table header
  var header = ['Date', 'Title', 'Path', 'Category', 'Tags'].map(function(str){
    return chalk.underline(str);
  });

  data.unshift(header);

  var t = table(data, {
    stringLength: common.stringLength
  });

  console.log(t);
  if (data.length === 1) console.log('No posts.');
}

module.exports = listPost;