text:
package com.amazonaws.services.cloudfront.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *

 * A list of CloudFront functions.
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FunctionList implements Serializable, Cloneable {

    /**
     *

     * If there are more items in the list than are in this response, this element is present. It contains the value
     * that you should use in the Marker field of a subsequent request to continue listing functions where
     * you left off.
     *

     */
    private String nextMarker;
    /**
     *

     * The maximum number of functions requested.
     *

     */
    private Integer maxItems;
    /**
     *

     * The number of functions returned in the response.
     *

     */
    private Integer quantity;
    /**
     *

     * Contains the functions in the list.
     *

     */
    private com.amazonaws.internal.SdkInternalList<FunctionSummary> items;

    /**
     *

     * If there are more items in the list than are in this response, this element is present. It contains the value
     * that you should use in the Marker field of a subsequent request to continue listing functions where
     * you left off.
     *

     *
     * @param nextMarker
     *        If there are more items in the list than are in this response, this element is present. It contains the
     *        value that you should use in the Marker field of a subsequent request to continue listing
     *        functions where you left off.
     */

    public void setNextMarker(String nextMarker) {
        this.nextMarker = nextMarker;
    }

    /**
     *

     * If there are more items in the list than are in this response, this element is present. It contains the value
     * that you should use in the Marker field of a subsequent request to continue listing functions where
     * you left off.
     *

     *
     * @return If there are more items in the list than are in this response, this element is present. It contains the
     *         value that you should use in the Marker field of a subsequent request to continue listing
     *         functions where you left off.
     */

    public String getNextMarker() {
        return this.nextMarker;
    }

    /**
     *

     * If there are more items in the list than are in this response, this element is present. It contains the value
     * that you should use in the Marker field of a subsequent request to continue listing functions where
     * you left off.
     *

     *
     * @param nextMarker
     *        If there are more items in the list than are in this response, this element is present. It contains the
     *        value that you should use in the Marker field of a subsequent request to continue listing
     *        functions where you left off.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FunctionList withNextMarker(String nextMarker) {
        setNextMarker(nextMarker);
        return this;
    }

    /**
     *

     * The maximum number of functions requested.
     *

     *
     * @param maxItems
     *        The maximum number of functions requested.
     */

    public void setMaxItems(Integer maxItems) {
        this.maxItems = maxItems;
    }

    /**
     *

     * The maximum number of functions requested.
     *

     *
     * @return The maximum number of functions requested.
     */

    public Integer getMaxItems() {
        return this.maxItems;
    }

    /**
     *

     * The maximum number of functions requested.
     *

     *
     * @param maxItems
     *        The maximum number of functions requested.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FunctionList withMaxItems(Integer maxItems) {
        setMaxItems(maxItems);
        return this;
    }

    /**
     *

     * The number of functions returned in the response.
     *

     *
     * @param quantity
     *        The number of functions returned in the response.
     */

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    /**
     *

     * The number of functions returned in the response.
     *

     *
     * @return The number of functions returned in the response.
     */

    public Integer getQuantity() {
        return this.quantity;
    }

    /**
     *

     * The number of functions returned in the response.
     *

     *
     * @param quantity
     *        The number of functions returned in the response.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FunctionList withQuantity(Integer quantity) {
        setQuantity(quantity);
        return this;
    }

    /**
     *

     * Contains the functions in the list.
     *

     *
     * @return Contains the functions in the list.
     */

    public java.util.List<FunctionSummary> getItems() {
        if (items == null) {
            items = new com.amazonaws.internal.SdkInternalList<FunctionSummary>();
        }
        return items;
    }

    /**
     *

     * Contains the functions in the list.
     *

     *
     * @param items
     *        Contains the functions in the list.
     */

    public void setItems(java.util.Collection<FunctionSummary> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new com.amazonaws.internal.SdkInternalList<FunctionSummary>(items);
    }

    /**
     *

     * Contains the functions in the list.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setItems(java.util.Collection)} or {@link #withItems(java.util.Collection)} if you want to override the
     * existing values.
     *

     *
     * @param items
     *        Contains the functions in the list.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FunctionList withItems(FunctionSummary... items) {
        if (this.items == null) {
            setItems(new com.amazonaws.internal.SdkInternalList<FunctionSummary>(items.length));
        }
        for (FunctionSummary ele : items) {
            this.items.add(ele);
        }
        return this;
    }

    /**
     *

     * Contains the functions in the list.
     *

     *
     * @param items
     *        Contains the functions in the list.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public FunctionList withItems(java.util.Collection<FunctionSummary> items) {
        setItems(items);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getNextMarker() != null)
            sb.append("NextMarker: ").append(getNextMarker()).append(",");
        if (getMaxItems() != null)
            sb.append("MaxItems: ").append(getMaxItems()).append(",");
        if (getQuantity() != null)
            sb.append("Quantity: ").append(getQuantity()).append(",");
        if (getItems() != null)
            sb.append("Items: ").append(getItems());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof FunctionList == false)
            return false;
        FunctionList other = (FunctionList) obj;
        if (other.getNextMarker() == null ^ this.getNextMarker() == null)
            return false;
        if (other.getNextMarker() != null && other.getNextMarker().equals(this.getNextMarker()) == false)
            return false;
        if (other.getMaxItems() == null ^ this.getMaxItems() == null)
            return false;
        if (other.getMaxItems() != null && other.getMaxItems().equals(this.getMaxItems()) == false)
            return false;
        if (other.getQuantity() == null ^ this.getQuantity() == null)
            return false;
        if (other.getQuantity() != null && other.getQuantity().equals(this.getQuantity()) == false)
            return false;
        if (other.getItems() == null ^ this.getItems() == null)
            return false;
        if (other.getItems() != null && other.getItems().equals(this.getItems()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getNextMarker() == null) ? 0 : getNextMarker().hashCode());
        hashCode = prime * hashCode + ((getMaxItems() == null) ? 0 : getMaxItems().hashCode());
        hashCode = prime * hashCode + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode());
        return hashCode;
    }

    @Override
    public FunctionList clone() {
        try {
            return (FunctionList) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
//     <version>$Revision: 915 $</version>
// </file>

using System;

namespace WorldBankBBS.ICSharpCode.TextEditor.Src.Document
{
	/// <summary>
	/// This delegate is used for document events.
	/// </summary>
	public delegate void DocumentEventHandler(object sender, DocumentEventArgs e);

	/// <summary>
	/// This class contains more information on a document event
	/// </summary>
	public class DocumentEventArgs : EventArgs
	{
		IDocument document;
		int       offset;
		int       length;
		string    text;

		/// <returns>
		/// always a valid Document which is related to the Event.
		/// </returns>
		public IDocument Document {
			get {
				return document;
			}
		}

		/// <returns>
		/// -1 if no offset was specified for this event
		/// </returns>
		public int Offset {
			get {
				return offset;
			}
		}

		/// <returns>
		/// null if no text was specified for this event
		/// </returns>
		public string Text {
			get {
				return text;
			}
		}

		/// <returns>
		/// -1 if no length was specified for this event
		/// </returns>
		public int Length {
			get {
				return length;
			}
		}

		/// <summary>
		/// Creates a new instance off <see cref="DocumentEventArgs"/>
		/// </summary>
		public DocumentEventArgs(IDocument document) : this(document, -1, -1, null)
		{
		}

		/// <summary>
		/// Creates a new instance off <see cref="DocumentEventArgs"/>
		/// </summary>
		public DocumentEventArgs(IDocument document, int offset) : this(document, offset, -1, null)
		{
		}

		/// <summary>
		/// Creates a new instance off <see cref="DocumentEventArgs"/>
		/// </summary>
		public DocumentEventArgs(IDocument document, int offset, int length) : this(document, offset, length, null)
		{
		}

		/// <summary>
		/// Creates a new instance off <see cref="DocumentEventArgs"/>
		/// </summary>
		public DocumentEventArgs(IDocument document, int offset, int length, string text)
		{
			this.document = document;
			this.offset   = offset;
			this.length   = length;
			this.text     = text;
		}
		public override string ToString()
		{
			return String.Format("[DocumentEventArgs: Document = {0}, Offset = {1}, Text = {2}, Length = {3}]",
			                     Document,
			                     Offset,
			                     Text,
			                     Length);
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version='1.0' encoding='UTF-8'?>
<!--
# Copyright 2015 47Lining LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->
<project>
  <actions/>
  <description></description>
  <displayName>Deploy $ApplicationName app to Container</displayName>
  <keepDependencies>false</keepDependencies>
  <properties>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <jp.ikedam.jenkins.plugins.extensible__choice__parameter.ExtensibleChoiceParameterDefinition plugin="extensible-choice-parameter@1.2.2">
          <name>CustomerCage</name>
          <description>The cage for deployment</description>
          <editable>false</editable>
          <choiceListProvider class="jp.ikedam.jenkins.plugins.extensible_choice_parameter.SystemGroovyChoiceListProvider">
            <scriptText>import groovy.io.FileType
def parent_path = "/var/lib/jenkins/nucleator/siteconfig/ansible/roles/siteconfig"
def list = []
def pattern = ~/([a-zA-Z0-9]+)-([a-zA-Z0-9]+).yml/

def dir = new File(parent_path+"/vars")
dir.eachFileRecurse (FileType.FILES) { file ->
  def mat = pattern.matcher(file.name)
  if(mat.matches() && !file.name.startsWith("{")) {
    list << mat[0][1]+":"+mat[0][2]
  }
}
return list</scriptText>
            <usePredefinedVariables>false</usePredefinedVariables>
          </choiceListProvider>
        </jp.ikedam.jenkins.plugins.extensible__choice__parameter.ExtensibleChoiceParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>ContainerName</name>
          <description>The beanstalk container for the application</description>
          <defaultValue></defaultValue>
        </hudson.model.StringParameterDefinition>
        <jp.ikedam.jenkins.plugins.extensible__choice__parameter.ExtensibleChoiceParameterDefinition plugin="extensible-choice-parameter@1.2.2">
          <name>ApplicationLocation</name>
          <description></description>
          <editable>false</editable>
          <choiceListProvider class="jp.ikedam.jenkins.plugins.extensible_choice_parameter.SystemGroovyChoiceListProvider">
            <scriptText>jh = jenkins.getRootDir()
print "JH="+jh.getAbsolutePath()
records = new XmlSlurper().parse(new File(jh.getAbsolutePath()+"/applications/$ApplicationName/$PomPath"))
group = records.groupId.text()
artifact = records.artifactId.text()
url = "$ArtifactoryUrl/artifactory/api/search/gavc?g="+group+"&a="+artifact
def data = new URL(url).getText(requestProperties: ['X-Result-Detail': 'info'])
def slurper = new groovy.json.JsonSlurper()
def a_fact = slurper.parseText(data)
def result = []
def pattern = ~/http:\/\/[a-zA-Z0-9.]*:?[0-9]*\/artifactory\/([a-zA-Z-]+)\/$$group\/$$artifact\/([a-zA-Z0-9.-]+)\/$$artifact-(.*).war/
a_fact.results.each{
  def mat = pattern.matcher(it.downloadUri)
  result.add(it.downloadUri)
}
return result
</scriptText>
            <usePredefinedVariables>true</usePredefinedVariables>
            <project class="project" reference="../../../../../.."/>
          </choiceListProvider>
        </jp.ikedam.jenkins.plugins.extensible__choice__parameter.ExtensibleChoiceParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
  </properties>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>export REPO_HOME=$$JENKINS_HOME/nucleator
# Run the ansible script to publish to the stackset.
echo Deploying artifact to stackset $$CustomerCage
CUST="$$(echo "$$CustomerCage" | cut -d ':' -f 1)"
CAGE="$$(echo "$$CustomerCage" | cut -d ':' -f 2)"
APP_VERSION=$$(python $$REPO_HOME/scripts/parseUrl.py $$ApplicationLocation)
echo About to run nucleator beanstalk deploy --customer "$$CUST" --cage "$$CAGE" --app_name "$$ContainerName" --app_url "$$ApplicationLocation" --app_version "$$APP_VERSION"
ssh -F ~/.ssh/config ec2-user@nucleator << ENDSSH
PYTHONUNBUFFERED=1 nucleator beanstalk deploy --customer "$$CUST" --cage "$$CAGE" --app_name "$$ContainerName" --app_url "$$ApplicationLocation" --app_version "$$APP_VERSION"
ENDSSH</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers/>
  <buildWrappers>
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.4.1">
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
  </buildWrappers>
</project>


text:
<?php

namespace app\modules\sys\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\modules\sys\models\Msg;

/**
 * MsgSearch represents the model behind the search form about `app\modules\sys\models\Msg`.
 */
class MsgSearch extends Msg
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'user_id', 'msg_type', 'res_id', 'tid', 'status', 'created_at', 'updated_at'], 'integer'],
            [['msg', 'msg_time', 'res_name'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Msg::find()->orderBy('id desc');

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'pageSize' => 30,
            ],
        ]);

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'msg_type' => $this->msg_type,
            'msg_time' => $this->msg_time,
            'res_id' => $this->res_id,
            'tid' => $this->tid,
            'status' => $this->status,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'msg', $this->msg])
            ->andFilterWhere(['like', 'res_name', $this->res_name]);

        return $dataProvider;
    }
}


text:
(function() {
    'use strict';

    var express = require('express');
    var router = express.Router();
    var userAuth = require('../helpers/authentication');
    var TapRoom = require('../../models/taproom-model');
    var TaproomHistory = require('../../models/taproom-history-model');

    router.get('/user', function(req, res) {
        if (userAuth.userValidated(req, res, true)) {
            TapRoom.get(req.user.id).then(function(taproomEntries) {
                res.json({
                    error: false,
                    data: taproomEntries.toJSON()
                });
            }).catch(function(err) {
                res.json({
                    error: true,
                    message: err
                });
            });
        }
    });

    router.post('/new', function(req, res) {
        if (userAuth.userValidated(req, res, true)) {
            var taproomObj = req.body.entry;

            TapRoom.create(req.user.id, taproomObj)
                .then(function(newEntry) {
                    res.json({
                        error: false,
                        id: newEntry.get('id')
                    });
                })
                .catch(function() {
                    res.status(500).json({
                        error: true,
                        msg: 'There was an error saving your taproom entry'
                    });
                });
        }
    });

    router.post('/kickTap', function(req, res) {
        if (userAuth.userValidated(req, res, true)) {
            var tapId = req.body.tapId;

            TapRoom.kick(req.user.id, tapId)
                .then(function(response) {
                    res.json({
                        error: response ? response.error : false,
                        id: tapId
                    });
                })
                .catch(function() {
                    res.status(500).json({
                        error: true,
                        msg: 'There was an error kicking the tap'
                    });
                });
        }
    });

    router.post('/deleteTap', function(req, res) {
        if (userAuth.userValidated(req, res, true)) {
            var tapId = req.body.tapId;

            TapRoom.delete(req.user.id, tapId)
                .then(function(response) {
                    res.json({
                        error: response ? response.error : false,
                        id: tapId
                    });
                })
                .catch(function() {
                    res.status(500).json({
                        error: true,
                        msg: 'There was an error deleting the tap'
                    });
                });
        }
    });

    router.post('/pourDrink', function(req, res) {
        if (userAuth.userValidated(req, res, true)) {
            var taproomId = req.body.taproomId;
            var volume = req.body.volume;

            //verify that the taproom we are pouring for is owned
            //by the authenticated user!
            TapRoom.get(req.user.id).then(function(taproomEntries) {
                taproomEntries.mapThen(function(entry) {
                    return entry.get('id') === taproomId;
                }).then(function(taprooms) {
                    //at least 1 entry from the collection matches our taproom
                    if (taprooms.indexOf(true) !== -1) {
                        TaproomHistory.logDrink(taproomId, volume)
                            .then(function() {
                                res.json({
                                    error: false,
                                    id: taproomId
                                });
                            })
                            .catch(function(err) {
                                res.json({
                                    error: true,
                                    message: err
                                });
                            });
                    } else {
                        res.json({
                            error: true,
                            message:
                                'Taproom Entry is not owned by the active user'
                        });
                    }
                });
            }).catch(function(err) {
                res.json({
                    error: true,
                    message: err
                });
            });

        }
    });
    module.exports = router;
})();


text:
package com.google.cloud.bigtable.hbase;

import static com.google.cloud.bigtable.hbase.IntegrationTests.COLUMN_FAMILY;
import static com.google.cloud.bigtable.hbase.IntegrationTests.TABLE_NAME;

import org.apache.commons.lang.RandomStringUtils;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.client.BufferedMutator;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;

public class TestPut extends AbstractTest {
  static final int NUM_CELLS = 100;
  static final int NUM_ROWS = 100;

  /**
   * Test inserting a row with multiple cells.
   *
   * @throws IOException
   */
  @Test
  public void testPutMultipleCellsOneRow() throws IOException {
    // Initialize variables
    Table table = getConnection().getTable(TABLE_NAME);
    byte[] rowKey = dataHelper.randomData("testrow-");
    byte[][] quals = dataHelper.randomData("testQualifier-", NUM_CELLS);
    byte[][] values = dataHelper.randomData("testValue-", NUM_CELLS);

    // Construct put with NUM_CELL random qualifier/value combos
    Put put = new Put(rowKey);
    List<QualifierValue> keyValues = new ArrayList<QualifierValue>(100);
    for (int i = 0; i < NUM_CELLS; ++i) {
      put.addColumn(COLUMN_FAMILY, quals[i], values[i]);
      keyValues.add(new QualifierValue(quals[i], values[i]));
    }
    table.put(put);

    // Get
    Get get = new Get(rowKey);
    Result result = table.get(get);
    List<Cell> cells = result.listCells();
    Assert.assertEquals(NUM_CELLS, cells.size());

    // Check results in sort order
    Collections.sort(keyValues);
    for (int i = 0; i < NUM_CELLS; ++i) {
      Assert.assertArrayEquals(keyValues.get(i).qualifier, CellUtil.cloneQualifier(cells.get(i)));
      Assert.assertArrayEquals(keyValues.get(i).value, CellUtil.cloneValue(cells.get(i)));
    }

    // Delete
    Delete delete = new Delete(rowKey);
    table.delete(delete);

    // Confirm gone
    Assert.assertFalse(table.exists(get));
    table.close();
  }

  /**
   * Test inserting multiple rows at one time.
   *
   * @throws IOException
   */
  public void testPutGetDeleteMultipleRows() throws IOException {
    // Initialize interface
    Table table = getConnection().getTable(TABLE_NAME);
    byte[][] rowKeys = dataHelper.randomData("testrow-", NUM_ROWS);
    byte[][] qualifiers = dataHelper.randomData("testQualifier-", NUM_ROWS);
    byte[][] values = dataHelper.randomData("testValue-", NUM_ROWS);

    // Do puts
    List<Put> puts = new ArrayList<Put>(NUM_ROWS);
    List<String> keys = new ArrayList<String>(NUM_ROWS);
    Map<String, QualifierValue> insertedKeyValues = new TreeMap<String, QualifierValue>();
    for (int i = 0; i < NUM_ROWS; ++i) {
      Put put = new Put(rowKeys[i]);
      put.addColumn(COLUMN_FAMILY, qualifiers[i], values[i]);
      puts.add(put);

      String key = Bytes.toString(rowKeys[i]);
      keys.add(key);
      insertedKeyValues.put(key, new QualifierValue(qualifiers[i], values[i]));
    }
    table.put(puts);

    // Get
    List<Get> gets = new ArrayList<Get>(NUM_ROWS);
    Collections.shuffle(keys);  // Retrieve in random order
    for (String key : keys) {
      Get get = new Get(Bytes.toBytes(key));
      get.addColumn(COLUMN_FAMILY, insertedKeyValues.get(key).qualifier);
      gets.add(get);
    }
    Result[] result = table.get(gets);
    Assert.assertEquals(NUM_ROWS, result.length);
    for (int i = 0; i < NUM_ROWS; ++i) {
      String rowKey = keys.get(i);
      Assert.assertEquals(rowKey, Bytes.toString(result[i].getRow()));
      QualifierValue entry = insertedKeyValues.get(rowKey);
      String descriptor = "Row " + i + " (" + rowKey + ": ";
      Assert.assertEquals(descriptor, 1, result[i].size());
      Assert.assertTrue(descriptor,
          result[i].containsNonEmptyColumn(COLUMN_FAMILY, entry.qualifier));
      Assert.assertEquals(descriptor, entry.value,
          CellUtil.cloneValue(result[i].getColumnCells(COLUMN_FAMILY, entry.qualifier).get(0))
      );
    }

    // Delete
    List<Delete> deletes = new ArrayList<Delete>(NUM_ROWS);
    for (byte[] rowKey : rowKeys) {
      Delete delete = new Delete(rowKey);
      deletes.add(delete);
    }
    table.delete(deletes);

    // Confirm they are gone
    boolean[] checks = table.existsAll(gets);
    for (Boolean check : checks) {
      Assert.assertFalse(check);
    }
    table.close();
  }

  @Test
  public void testDefaultTimestamp() throws IOException {
    long now = System.currentTimeMillis();
    long oneMinute = 60 * 1000;
    long fifteenMinutes = 15 * 60 * 1000;

    Table table = getConnection().getTable(TABLE_NAME);
    byte[] rowKey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qualifier = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    Put put = new Put(rowKey);
    put.addColumn(COLUMN_FAMILY, qualifier, value);
    table.put(put);
    Get get = new Get(rowKey);
    get.addColumn(COLUMN_FAMILY, qualifier);
    Result result = table.get(get);
    long timestamp1 = result.getColumnLatestCell(COLUMN_FAMILY, qualifier).getTimestamp();
    System.out.println(String.format("Timestamp of latest cell: %s now = %s", timestamp1, now));
    Assert.assertTrue(
        "Latest timestamp is off by > 15 minutes",
        Math.abs(timestamp1 - now) < fifteenMinutes);

    try {
      TimeUnit.MILLISECONDS.sleep(10);  // Make sure the clock has a chance to move
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
    table.put(put);
    get.addColumn(COLUMN_FAMILY, qualifier);
    result = table.get(get);
    long timestamp2 = result.getColumnLatestCell(COLUMN_FAMILY, qualifier).getTimestamp();
    Assert.assertTrue("Time increases strictly", timestamp2 > timestamp1);
    Assert.assertTrue("Time doesn't move too fast", (timestamp2 - timestamp1) < oneMinute);
    table.close();
  }

  @Test(expected = RetriesExhaustedWithDetailsException.class)
  @Category(KnownGap.class)
  public void testIOExceptionOnFailedPut() throws Exception {
    Table table = getConnection().getTable(TABLE_NAME);
    byte[] rowKey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] badfamily = Bytes.toBytes("badcolumnfamily-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qualifier = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    Put put = new Put(rowKey);
    put.addColumn(badfamily, qualifier, value);
    table.put(put);
  }

  @Test
  @Category(KnownGap.class)
  public void testAtomicPut() throws Exception {
    Table table = getConnection().getTable(TABLE_NAME);
    byte[] rowKey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] goodQual = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] goodValue = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] badQual = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] badValue = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] badfamily = Bytes.toBytes("badcolumnfamily-" + RandomStringUtils.randomAlphanumeric(8));
    Put put = new Put(rowKey);
    put.addColumn(COLUMN_FAMILY, goodQual, goodValue);
    put.addColumn(badfamily, badQual, badValue);
    RetriesExhaustedWithDetailsException thrownException = null;
    try {
      table.put(put);
    } catch (RetriesExhaustedWithDetailsException e) {
      thrownException = e;
    }
    Assert.assertNotNull("Exception should have been thrown", thrownException);
    Assert.assertEquals("Expecting one exception", 1, thrownException.getNumExceptions());
    Assert.assertArrayEquals("Row key", rowKey, thrownException.getRow(0).getRow());
    Assert.assertTrue("Cause: NoSuchColumnFamilyException",
        thrownException.getCause(0) instanceof NoSuchColumnFamilyException);

    Get get = new Get(rowKey);
    Result result = table.get(get);
    Assert.assertEquals("Atomic behavior means there should be nothing here", 0, result.size());
    table.close();
  }

  /**
   * This tests particularly odd behavior, where if an error happens on the client-side validation
   * of a list of puts, the commits after the bad put fail.  (This is unlike a server-side error
   * where all the good puts are committed.)
   */
  @Test
  @Category(KnownGap.class)
  public void testClientSideValidationError() throws Exception {
    BufferedMutator mutator = getConnection().getBufferedMutator(TABLE_NAME);
    Table table = getConnection().getTable(TABLE_NAME);
    byte[] rowKey1 = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qual1 = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value1 = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] rowKey2 = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    // No column.  This will cause an error during client-side validation.
    byte[] rowKey3 = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qual3 = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value3 = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));

    List<Put> puts = new ArrayList<>();
    Put put1 = new Put(rowKey1);
    put1.addColumn(COLUMN_FAMILY, qual1, value1);
    puts.add(put1);
    Put put2 = new Put(rowKey2);
    puts.add(put2);
    Put put3 = new Put(rowKey3);
    put3.addColumn(COLUMN_FAMILY, qual3, value3);
    puts.add(put3);
    boolean exceptionThrown = false;
    try {
      mutator.mutate(puts);
    } catch (IllegalArgumentException e) {
      exceptionThrown = true;
    }
    Assert.assertTrue("Exception should have been thrown", exceptionThrown);
    Get get1 = new Get(rowKey1);
    Assert.assertFalse("Row 1 should not exist yet", table.exists(get1));
    mutator.flush();

    Assert.assertTrue("Row 1 should exist", table.exists(get1));
    Get get2 = new Get(rowKey2);
    Assert.assertFalse("Row 2 should not exist", table.exists(get2));
    Get get3 = new Get(rowKey3);
    Assert.assertFalse("Row 3 should not exist", table.exists(get3));

    table.close();
    mutator.close();
  }

  @Test
  public void testPutSameTimestamp() throws Exception {
    byte[] rowKey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qualifier = Bytes.toBytes("testqual-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value1 = Bytes.toBytes("testvalue-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value2 = Bytes.toBytes("testvalue-" + RandomStringUtils.randomAlphanumeric(8));
    long timestamp = System.currentTimeMillis();
    Table table = getConnection().getTable(TABLE_NAME);
    Put put = new Put(rowKey);
    put.addColumn(COLUMN_FAMILY, qualifier, timestamp, value1);
    table.put(put);
    put = new Put(rowKey);
    put.addColumn(COLUMN_FAMILY, qualifier, timestamp, value2);
    table.put(put);
    Get get = new Get(rowKey);
    get.addColumn(COLUMN_FAMILY, qualifier);
    get.setMaxVersions(5);
    Result result = table.get(get);
    Assert.assertEquals(1, result.size());
    Assert.assertTrue(result.containsColumn(COLUMN_FAMILY, qualifier));
    Assert.assertEquals(timestamp,
      result.getColumnLatestCell(COLUMN_FAMILY, qualifier).getTimestamp());
    Assert.assertArrayEquals(value2,
      CellUtil.cloneValue(result.getColumnLatestCell(COLUMN_FAMILY, qualifier)));
    table.close();
  }

  @Test
  @Category(KnownGap.class)
  public void testMultiplePutsOneBadSameRow() throws Exception {
    final int numberOfGoodPuts = 100;
    byte[] rowKey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[][] goodkeys = new byte[numberOfGoodPuts][];
    for (int i = 0; i < numberOfGoodPuts; ++i) {
      goodkeys[i] = rowKey;
    }
    multiplePutsOneBad(numberOfGoodPuts, goodkeys, rowKey);
    Get get = new Get(rowKey);
    Table table = getConnection().getTable(TABLE_NAME);
    Result whatsLeft = table.get(get);
    Assert.assertEquals("Same row, all other puts accepted", numberOfGoodPuts, whatsLeft.size());
    table.close();
  }

  @Test
  @Category(KnownGap.class)
  public void testMultiplePutsOneBadDiffRows() throws Exception {
    final int numberOfGoodPuts = 100;
    byte[] badkey = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
    byte[][] goodkeys = new byte[numberOfGoodPuts][];
    for (int i = 0; i < numberOfGoodPuts; ++i) {
      goodkeys[i] = Bytes.toBytes("testrow-" + RandomStringUtils.randomAlphanumeric(8));
      assert !Arrays.equals(badkey, goodkeys[i]);
    }
    multiplePutsOneBad(numberOfGoodPuts, goodkeys, badkey);

    List<Get> gets = new ArrayList<Get>();
    for (int i = 0; i < numberOfGoodPuts; ++i) {
      Get get = new Get(goodkeys[i]);
      gets.add(get);
    }
    Table table = getConnection().getTable(TABLE_NAME);
    Result[] whatsLeft = table.get(gets);
    int cellCount = 0;
    for (Result result : whatsLeft) {
      cellCount += result.size();
    }
    Assert.assertEquals("Different row, all other puts accepted", numberOfGoodPuts, cellCount);
    table.close();
  }

  private void multiplePutsOneBad(int numberOfGoodPuts, byte[][] goodkeys, byte[] badkey)
      throws IOException {
    Table table = getConnection().getTable(TABLE_NAME);
    List<Put> puts = new ArrayList<Put>();
    for (int i = 0; i < numberOfGoodPuts; ++i) {
      byte[] qualifier = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
      byte[] value = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
      Put put = new Put(goodkeys[i]);
      put.addColumn(COLUMN_FAMILY, qualifier, value);
      puts.add(put);
    }

    // Insert a bad put in the middle
    byte[] badfamily = Bytes.toBytes("badcolumnfamily-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] qualifier = Bytes.toBytes("testQualifier-" + RandomStringUtils.randomAlphanumeric(8));
    byte[] value = Bytes.toBytes("testValue-" + RandomStringUtils.randomAlphanumeric(8));
    Put put = new Put(badkey);
    put.addColumn(badfamily, qualifier, value);
    puts.add(numberOfGoodPuts / 2, put);
    RetriesExhaustedWithDetailsException thrownException = null;
    try {
      table.put(puts);
    } catch (RetriesExhaustedWithDetailsException e) {
      thrownException = e;
    }
    Assert.assertNotNull("Exception should have been thrown", thrownException);
    Assert.assertEquals("Expecting one exception", 1, thrownException.getNumExceptions());
    Assert.assertArrayEquals("Row key", badkey, thrownException.getRow(0).getRow());
    Assert.assertTrue("Cause: NoSuchColumnFamilyException",
        thrownException.getCause(0) instanceof NoSuchColumnFamilyException);
    table.close();
  }
}


text:
import logging

import re

from django.core import urlresolvers
from django.template.defaultfilters import linebreaksbr
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _

from horizon import tables

from neutron_lbaas_dashboard import api

LOG = logging.getLogger(__name__)

class TerminateLoadBalancer(tables.BatchAction):
    name = "terminate"
    action_present = _("Terminate")
    action_past = _("Scheduled termination of")
    data_type_singular = _("Load Balancer")
    data_type_plural = _("Load Balancers")
    classes = ('btn-danger', 'btn-terminate')

    def allowed(self, request, loadbalancer=None):
        return True

    def action(self, request, obj_id):
        api.lbaasv2.vip_delete(request, obj_id)

class EnableLoadBalancer(tables.BatchAction):
    name = "enable"
    action_present = _("Enable")
    action_past = _("Enabled LB")
    data_type_singular = _("Load Balancer")
    data_type_plural = _("Load Balancers")
    classes = ('btn-enable', "btn-action-required")
    action_failure = "error enable"

    def allowed(self, request, loadbalancer=None):
        if loadbalancer.admin_state_up:
            return False
        return True

    def action(self, request, obj_id):
        api.lbaasv2.vip_set_status(request, obj_id, True)

class DisableLoadBalancer(tables.BatchAction):
    name = "disable"
    action_present = _("Disable")
    action_past = _("Disabled LB")
    data_type_singular = _("Load Balancer")
    data_type_plural = _("Load Balancers")
    classes = ("btn-confirm", 'btn-disable',)
    action_failure = "error disable"

    def allowed(self, request, loadbalancer=None):
        if loadbalancer.admin_state_up:
            return True
        return False

    def action(self, request, obj_id):
        api.lbaasv2.vip_set_status(request, obj_id, False)

class LaunchLink(tables.LinkAction):
    name = "launch"
    verbose_name = _("Launch Load Balancer")
    url = "horizon:project:loadbalancersv2:launch"
    classes = ("btn-launch", "ajax-modal")

    def allowed(self, request, datum):
        return True

class EditLoadBalancer(tables.LinkAction):
    name = "edit"
    verbose_name = _("Edit Load Balancer")
    url = "horizon:project:loadbalancersv2:update"
    classes = ("ajax-modal", "btn-edit")

    def get_link_url(self, project):
        return self._get_link_url(project, 'loadbalancer_info')

    def _get_link_url(self, project, step_slug):
        base_url = urlresolvers.reverse(self.url, args=[project.id])
        param = urlencode({"step": step_slug})
        return "?".join([base_url, param])

    def allowed(self, request, loadbalancer):
        # return not is_deleting(loadbalancer) when async is implemented
        return True

class UpdateRow(tables.Row):
    ajax = True

    def get_data(self, request, loadbalancer_id):
        loadbalancer = api.lbaasv2.vip_update(request, loadbalancer_id)
        return loadbalancer

def convert_title(value):
    return re.sub("([A-Z])", " \g<0>", value)

def convert_camel(value):
    if not value:
        return value
    if value.isupper() or value.islower():
        return value.title()
    else:
        value = value.replace(' ', '')
        return re.sub("([A-Z])", " \g<0>", value)

def upper_case(value):
    return value.upper()

def convert_status(value):
    return "Enabled" if value else "Disabled"

def get_lb_method(value):
    return value.pool['lb_algorithm']

def get_protocol(value):
    return value.listener['protocol']

def get_monitor(value):
    return value['pool']['monitors']['type']

def get_lb(instance):
    if hasattr(instance, "vip_address"):
        return "%s:%s" % (instance.vip_address,
                          instance.listener['protocol_port'])
    return _("Not available")

class LoadBalancersTable(tables.DataTable):
    vip = tables.Column(get_lb,
                        link=("horizon:project:loadbalancersv2:detail"),
                        verbose_name=_("Load Balancer"))
    name = tables.Column("name",
                         link=("horizon:project:loadbalancersv2:detail"),
                         verbose_name=_("Name"))
    lb_method = tables.Column(get_lb_method,
                              filters=(upper_case,),
                              verbose_name=_("Method"))
    protocol = tables.Column(get_protocol,
                             filters=(upper_case,),
                             verbose_name=_("Protocol"))
    monitor = tables.Column(get_monitor,
                            filters=(upper_case,),
                            verbose_name=_("Monitor"))
    status = tables.Column("provisioning_status",
                           filters=(convert_camel, linebreaksbr),
                           verbose_name=_("Provisioning Status"))
    operating_status = tables.Column("operating_status",
                                     filters=(convert_camel, linebreaksbr),
                                     verbose_name=_("Operating Status"))
    enabled = tables.Column("admin_state_up",
                            filters=(convert_status,),
                            verbose_name=_("Admin Status"))

    class Meta(object):
        name = "loadbalancersv2"
        verbose_name = _("Load Balancers")
        row_class = UpdateRow
        table_actions = (LaunchLink, TerminateLoadBalancer)
        row_actions = (EditLoadBalancer, TerminateLoadBalancer,
                       EnableLoadBalancer, DisableLoadBalancer)


text:
import numpy

from nearpy.hashes import LSHash, RandomBinaryProjections, PCABinaryProjections, RandomBinaryProjectionTree

class HashPermutationMapper(LSHash):
    """
    This meta-hash performs permutations on binary bucket keys
    and keeps a dictionary for this mapping.

    You use this just like every other LSHash implementation and
    add the actual binary hashes you want to use via the add_child_hash
    method. Each child hash will be used separatly.

    So to use this you have to do the following steps:

    1. Create HashPermutationMapper instance and use it in the Engine constructor
    2. Add your binary hashes as child hashes by calling add_child_hash()
    3. Store your vectors using the Engine
    4. Now when you query the bucket key map is used
    """

    def __init__(self, hash_name):
        """ Just keeps the name. """
        super(HashPermutationMapper, self).__init__(hash_name)
        self.child_hashes = []
        self.dim = None
        self.bucket_key_map = {}

    def reset(self, dim):
        """ Resets / Initializes the hash for the specified dimension. """
        self.dim = dim
        self.bucket_key_map = {}
        # Reset all child hashes
        for child_hash in self.child_hashes:
            child_hash.reset(dim)

    def permuted_keys(self, key):
        result = []
        for j in range(len(key)):
            bits = list(key)
            bits[j] = '1' if key[j]=='0' else '0'
            result.append(''.join(bits))
        return result

    def hash_vector(self, v, querying=False):
        """
        Hashes the vector and returns the bucket key as string.
        """

        bucket_keys = []

        if querying:
            # If we are querying, use the bucket key map
            for lshash in self.child_hashes:
                # Get regular bucket keys from hash
                for bucket_key in lshash.hash_vector(v, querying):
                    prefixed_key = lshash.hash_name+'_'+bucket_key
                    # Get entries from map (bucket keys with hamming distance of 1)
                    if prefixed_key in self.bucket_key_map:
                        bucket_keys.extend(self.bucket_key_map[prefixed_key].keys())
        else:
            # If we are indexing (storing) just use child hashes without permuted index
            for lshash in self.child_hashes:
                # Get regular bucket keys from hash
                for bucket_key in lshash.hash_vector(v, querying):
                    # Get permuted keys
                    perm_keys = self.permuted_keys(bucket_key)
                    # Put extact hit key into list
                    perm_keys.append(bucket_key)

                    # Append key for storage (not the permutations)
                    bucket_keys.append(lshash.hash_name+'_'+bucket_key)

                    # For every permutation register all the variants
                    for perm_key in perm_keys:
                        prefixed_key = lshash.hash_name+'_'+perm_key

                        # Make sure dictionary exists
                        if not prefixed_key in self.bucket_key_map:
                            self.bucket_key_map[prefixed_key] = {}

                        for variant in perm_keys:
                            prefixed_variant = lshash.hash_name+'_'+variant
                            self.bucket_key_map[prefixed_key][prefixed_variant] = 1

        # Return all the bucket keys
        return bucket_keys

    def get_config(self):
        """
        Returns pickle-serializable configuration struct for storage.
        """
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'bucket_key_map': self.bucket_key_map
        }

    def apply_config(self, config):
        """
        Applies config
        """
        self.hash_name = config['hash_name']
        self.dim = config['dim']
        self.bucket_key_map = config['bucket_key_map']

    def add_child_hash(self, child_hash):
        """
        Adds specified child hash.

        The hash must be one of the binary types.
        """

        # Hash must generate binary keys
        if not (isinstance(child_hash,PCABinaryProjections) or isinstance(child_hash,RandomBinaryProjections) or isinstance(child_hash,RandomBinaryProjectionTree)):
            raise ValueError('Child hashes must generate binary keys')

        # Add both hash and config to array of child hashes. Also we are going to
        # accumulate used bucket keys for every hash in order to build the permuted index
        self.child_hashes.append(child_hash)


text:
function varargout = stack2param(X, decodeInfo)
% i think this is from Richard Socher or the UFLDL tutorial
assert(length(decodeInfo)==nargout,'this should output as many variables as you gave to get X with param2stack!')

index=0;
for i=1:length(decodeInfo)
    if iscell(decodeInfo{i})
        for c = 1:length(decodeInfo{i})
            matSize = decodeInfo{i}{c};
            cellOut{c} = reshape(X(index+1:index+(matSize(1))*matSize(2)),matSize(1),matSize(2));
            index = index+(matSize(1))*matSize(2);
        end
        varargout{i}=cellOut;
    else
        matSize = decodeInfo{i};
        varargout{i} = reshape(X(index+1:index+(matSize(1))*matSize(2)),matSize(1),matSize(2));
        index = index+(matSize(1))*matSize(2);
    end
end


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import {DragWrapper} from 'chrome://resources/js/cr/ui/drag_wrapper.js';
import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';

import {getCardSlider} from './new_tab.js';
import {getCurrentlyDraggingTile} from './tile_page.js';

/**
 * @fileoverview Page switcher
 * This is the class for the left and right navigation arrows that switch
 * between pages.
 */

/**
 * @constructor
 * @extends {HTMLButtonElement}
 */
export function PageSwitcher() {}

PageSwitcher.prototype = {
  __proto__: HTMLButtonElement.prototype,

  /**
   * Activate the switcher (go to the next card).
   * @private
   */
  activate_() {
    getCardSlider().selectCard(this.nextCardIndex_(), true);
  },

  /**
   * Calculate the index of the card that this button will switch to.
   * @private
   */
  nextCardIndex_() {
    const cardSlider = getCardSlider();
    const index = cardSlider.currentCard + this.direction_;
    const numCards = cardSlider.cardCount - 1;
    return Math.max(0, Math.min(index, numCards));
  },

  /**
   * Update the accessible label attribute of this button, based on the
   * current position in the card slider and the names of the cards.
   * @param {NodeList} dots The dot elements which display the names of the
   *     cards.
   */
  updateButtonAccessibleLabel(dots) {
    const currentIndex = getCardSlider().currentCard;
    const nextCardIndex = this.nextCardIndex_();
    if (nextCardIndex === currentIndex) {
      this.setAttribute('aria-label', '');  // No next card.
      return;
    }

    const currentDot = dots[currentIndex];
    const nextDot = dots[nextCardIndex];
    if (!currentDot || !nextDot) {
      this.setAttribute('aria-label', '');  // Dots not initialised yet.
      return;
    }

    const currentPageTitle = currentDot.displayTitle;
    const nextPageTitle = nextDot.displayTitle;
    const msgName = (currentPageTitle === nextPageTitle) ?
        'page_switcher_same_title' :
        'page_switcher_change_title';
    const ariaLabel = loadTimeData.getStringF(msgName, nextPageTitle);
    this.setAttribute('aria-label', ariaLabel);
  },

  shouldAcceptDrag(e) {
    // Only allow page switching when a drop could happen on the page being
    // switched to.
    const nextPage = getCardSlider().getCardAtIndex(this.nextCardIndex_());
    return nextPage.shouldAcceptDrag(e);
  },

  doDragEnter(e) {
    this.scheduleDelayedSwitch_(e);
    this.doDragOver(e);
  },

  doDragLeave(e) {
    this.cancelDelayedSwitch_();
  },

  doDragOver(e) {
    e.preventDefault();
    const targetPage = getCardSlider().currentCardValue;
    if (targetPage.shouldAcceptDrag(e)) {
      targetPage.setDropEffect(e.dataTransfer);
    }
  },

  doDrop(e) {
    e.stopPropagation();
    this.cancelDelayedSwitch_();

    const tile = getCurrentlyDraggingTile();
    if (!tile) {
      return;
    }

    const sourcePage = tile.tilePage;
    const targetPage = getCardSlider().currentCardValue;
    if (targetPage === sourcePage || !targetPage.shouldAcceptDrag(e)) {
      return;
    }

    targetPage.appendDraggingTile();
  },

  /**
   * Starts a timer to activate the switcher. The timer repeats until
   * cancelled by cancelDelayedSwitch_.
   * @private
   */
  scheduleDelayedSwitch_(e) {
    // Stop switching when the next page can't be dropped onto.
    const nextPage = getCardSlider().getCardAtIndex(this.nextCardIndex_());
    if (!nextPage.shouldAcceptDrag(e)) {
      return;
    }

    const self = this;
    function navPageClearTimeout() {
      self.activate_();
      self.dragNavTimeout_ = null;
      self.scheduleDelayedSwitch_(e);
    }
    this.dragNavTimeout_ = window.setTimeout(navPageClearTimeout, 500);
  },

  /**
   * Cancels the timer that activates the switcher while dragging.
   * @private
   */
  cancelDelayedSwitch_() {
    if (this.dragNavTimeout_) {
      window.clearTimeout(this.dragNavTimeout_);
      this.dragNavTimeout_ = null;
    }
  },

};

export function initializePageSwitcher(el) {
  el.__proto__ = PageSwitcher.prototype;

  el.addEventListener('click', el.activate_);

  el.direction_ = el.id === 'page-switcher-start' ? -1 : 1;

  el.dragWrapper_ = new DragWrapper(el, el);
}


text:
from zaifbot.rules.rule import Rule
from zaifbot.exchange.action import Action
from zaifbot.exchange.currency_pairs import CurrencyPair

class Entry(Rule):
    def __init__(self, currency_pair, amount, action='bid', name=None):
        self.currency_pair = CurrencyPair(currency_pair)
        self.amount = amount
        self.action = Action(action)
        self.name = name or self.__class__.__name__

    def can_entry(self, *args, **kwargs):
        raise NotImplementedError

    def entry(self, trade):
        trade.entry(currency_pair=self.currency_pair,
                    amount=self.amount,
                    action=self.action)

        return trade


text:
/*
 * grunt-component-io
 *
 * License: MIT
 */

'use strict';

/*
 * Module dependencies
 */

var Queue = require('../lib/queue');

/*
 * component path
 */

var COMPONENT_CLI_PATH = __dirname + '/../node_modules/.bin/component';

/*
 * Helper methods
 */

var queue = new Queue();

var addComponentTask = function(grunt, args) {
  queue.add(function(next){
    grunt.util.spawn({
      cmd: COMPONENT_CLI_PATH,
      args: args
    }, function(err, res, code){
      next(err);
    });
  });
}

var getTemplatePath = function(filepath) {
  return filepath.split('.html')[0] + '.js';
}

/*
 * task
 */

module.exports = function(grunt) {

  grunt.registerMultiTask('component', 'builds component io', function() {

    var done = this.async();

    var options = this.options({
      autoload: ['scripts', 'styles', 'files'],
      convertTemplates: true,
      standalone: null
      /* out: 'tmp/' */
    });

    if (!options.out) {
      grunt.log.error('"out" should be present', options.out);
      return false;
    }

    var component = JSON.parse(grunt.file.read('component.json'));

    // reset component maps
    options.autoload.forEach(function(ns){
      component[ns] = [];
    });

    // create files if needed
    if (!component.files) {
      component.files = [];
    }

    // templates to cleanup
    var convertedTemplates = [];

    this.files.forEach(function(f){
      f.src
        .filter(function(filepath){
          return grunt.file.isFile(filepath)
        })
        .map(function(filepath){
          return {
            path: filepath,
            ext: filepath.split('.').pop()
          }
        })
        .forEach(function(file){
          switch(file.ext) {
          case 'js':
            if (~options.autoload.indexOf('scripts')) {
              component['scripts'].push(file.path);
            }
            break;
          case 'css':
            if (~options.autoload.indexOf('styles')) {
              component['styles'].push(file.path);
            }
            break;
          case 'html':
            var tmpl = getTemplatePath(file.path);
            if (options.convertTemplates) {
              addComponentTask(grunt, ['convert', file.path]);
              convertedTemplates.push(tmpl);
              if (~options.autoload.indexOf('scripts')) {
                component['scripts'].push(tmpl);
              }
            }
            break;
          default:
            if (~options.autoload.indexOf('files')) {
              component['files'].push(file.path);
            }
            break;
          }
        });
    });

    // update component.json
    grunt.file.write('component.json', JSON.stringify(component, null, 2));

    // component install
    addComponentTask(grunt, ['install']);

    // component build -o tmp/ -s supermodule
    if (options.standalone) {
      addComponentTask(grunt, ['build', '-o', options.out, '-s', options.standalone]);
    } else {
      addComponentTask(grunt, ['build', '-o', options.out]);
    }

    // delete all temp template.js
    queue.add(function(next){
      convertedTemplates.forEach(function(filepath){
        grunt.file.delete(filepath);
      });
      next();
    });

    // start processing queue tasks
    queue.start(function(){
      grunt.log.writeln('Component build succeeded.');
      done();
    }, function(error){
      grunt.log.error(error);
      done(false);
    });

  });
};


text:
package org.search.nibrs.model.codes;

import java.util.HashSet;
import java.util.Set;

public enum TypeOfVictimCode {

	B("B","Business"),
	F("F","Financial Institution"),
	G("G","Government"),
	I("I","Individual"),
	L("L","Law Enforcement Officer"),
	O("O","Other"),
	R("R","Religious Organization"),
	S("S","Society/Public"),
	U("U","Unknown");

	public String code;

	public String description;

	private TypeOfVictimCode(String code, String description){

		this.code = code;

		this.description = description;
	}

	public static Set<String> codeSet(){

		Set<String> rCodeSet = new HashSet<String>();

		for(TypeOfVictimCode iVictimCodeType : values()){

			rCodeSet.add(iVictimCodeType.code);
		}
		return rCodeSet;
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Practices.Win32.Kernel32
{
    [StructLayout(LayoutKind.Explicit)]
    public struct _PROCESSOR_INFO_UNION
    {
        [FieldOffset(0)]
        internal uint dwOemId;
        [FieldOffset(0)]
        internal ushort wProcessorArchitecture;
        [FieldOffset(2)]
        internal ushort wReserved;
    }
}


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>RaspberryPiDotNet</name>
    </assembly>
    <members>
        <member name="P:RaspberryPiDotNet.DS1620.Temperature">
            <summary>
            The current temperature
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.DS1620.SendCommand(System.Int32)">
            <summary>
            Sends 8 bit command to the DS1620
            </summary>
            <param name="command">The command</param>
        </member>
        <member name="M:RaspberryPiDotNet.DS1620.ReadData">
            <summary>
            Read 8 bit data from the DS1620
            </summary>
            <returns>The temperature in half degree increments</returns>
        </member>
        <member name="M:RaspberryPiDotNet.DS1620.GetTemperature">
            <summary>
            Send the commands to retrieve the temperature
            </summary>
            <returns>The temperature with a half degree granularity</returns>
        </member>
        <member name="T:RaspberryPiDotNet.GPIO">
            <summary>
            Abstract class for the GPIO connector on the Pi (P1) (as found next to the yellow RCA video socket on the Rpi circuit board)
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIO._exportedPins">
            <summary>
            Dictionary that stores created (exported) pins that where not disposed.
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIO._pin">
            <summary>
            The currently assigned GPIO pin. Used for class methods.
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIO._disposed">
            <summary>
            Variable to track the disposed state
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIO._direction">
            <summary>
            Direction of the GPIO pin
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIO._resistor">
            <summary>
            GPIO pull up-down resistor
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIO.Pin">
            <summary>
            Gets the pin that this GPIO instance represents
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIO.Mask">
            <summary>
            Gets the bit mask of this pin.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIO.PinDirection">
            <summary>
            Gets or sets the communication direction for this pin
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIO.Resistor">
            <summary>
            Gets or sets the internal resistor value for the pin
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIO.IsDisposed">
            <summary>
            Gets the disposal state of this GPIO instance
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection,System.Boolean)">
            <summary>
            Access to the specified GPIO setup with the specified direction with the specified initial value
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
            <param name="initialValue">Initial Value</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Finalize">
            <summary>
            Finalizer to make sure we cleanup after ourselves.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Write(RaspberryPiDotNet.GPIOPins,System.Boolean)">
            <summary>
            Sets a pin to output the give value.

            Creates (exports) the pin if needed, and sets it to Out direction.
            </summary>
            <param name="pin">The pin who's value to set</param>
            <param name="value">The value to set</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Read(RaspberryPiDotNet.GPIOPins)">
            <summary>
            Gets the value of a given pin.

            Creates (exports) the pin if needed, and sets it to In direction.
            </summary>
            <param name="pin">The pin who's value to get</param>
            <returns>The value of the pin</returns>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.CreatePin(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection)">
            <summary>
            Creates a pin if it has not already been created (exported), creates a GPIOMem if possible, otherwise falls back to GPIOFile.
            </summary>
            <param name="pin">The pin to create or export</param>
            <param name="dir">The direction the pin is to have</param>
            <returns>The GPIO instance representing the pin</returns>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Write(System.Boolean)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="value">The value to write to the pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Read">
            <summary>
            Read a value from the pin
            </summary>
            <returns>The value read from the pin</returns>
        </member>
        <member name="M:RaspberryPiDotNet.GPIO.Dispose">
            <summary>
            Dispose of the GPIO pin
            </summary>
        </member>
        <member name="T:RaspberryPiDotNet.GPIODebug">
            <summary>
            Raspberry Pi GPIO debug class.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIODebug.#ctor(RaspberryPiDotNet.GPIOPins)">
            <summary>
            Access to the specified GPIO setup as an output port with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIODebug.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection)">
            <summary>
            Access to the specified GPIO setup with the specified direction with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIODebug.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection,System.Boolean)">
            <summary>
            Access to the specified GPIO setup with the specified direction with the specified initial value
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
            <param name="initialValue">Initial Value</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIODebug.Write(System.Boolean)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="value">The value to write to the pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIODebug.Read">
            <summary>
            Read a value from the pin
            </summary>
            <returns>The value read from the pin</returns>
        </member>
        <member name="T:RaspberryPiDotNet.GPIODirection">
            <summary>
            Specifies the direction of the GPIO port
            </summary>
        </member>
        <member name="T:RaspberryPiDotNet.GPIOFile">
            <summary>
            Raspberry Pi GPIO using the file-based access method.
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.GPIOFile.GPIO_PATH">
            <summary>
            The path on the Raspberry Pi for the GPIO interface
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.#ctor(RaspberryPiDotNet.GPIOPins)">
            <summary>
            Access to the specified GPIO setup as an output port with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection)">
            <summary>
            Access to the specified GPIO setup with the specified direction with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection,System.Boolean)">
            <summary>
            Access to the specified GPIO setup with the specified direction with the specified initial value
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
            <param name="initialValue">Initial Value</param>
        </member>
        <member name="P:RaspberryPiDotNet.GPIOFile.PinDirection">
            <summary>
            Gets or sets the communication direction for this pin
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.Write(System.Boolean)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="value">The value to write to the pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.Write(RaspberryPiDotNet.PinState)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="value">The value to write to the pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.Read">
            <summary>
            Read a value from the pin
            </summary>
            <returns>The value read from the pin</returns>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOFile.Dispose">
            <summary>
            Dispose of the GPIO pin
            </summary>
        </member>
        <member name="T:RaspberryPiDotNet.GPIOMem">
            <summary>
            Raspberry Pi GPIO using the direct memory access method.
            This requires the bcm2835 GPIO library provided by
            Mike McCauley (mikem@open.com.au) at http://www.open.com.au/mikem/bcm2835/index.html.

            To create the shared object, download the source code from the link above. The standard Makefile compiles a
            statically linked library. To build a shared object, do:
               tar -zxf bcm2835-1.3.tar.gz
               cd bcm2835-1.3/src
               make libbcm2835.a
               cc -shared bcm2835.o -o libbcm2835.so
            Place the shared object in the same directory as the executable and other assemblies.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.#ctor(RaspberryPiDotNet.GPIOPins)">
            <summary>
            Access to the specified GPIO setup as an output port with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection)">
            <summary>
            Access to the specified GPIO setup with the specified direction with an initial value of false (0)
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.#ctor(RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIODirection,System.Boolean)">
            <summary>
            Access to the specified GPIO setup with the specified direction with the specified initial value
            </summary>
            <param name="pin">The GPIO pin</param>
            <param name="direction">Direction</param>
            <param name="initialValue">Initial Value</param>
        </member>
        <member name="P:RaspberryPiDotNet.GPIOMem.PinDirection">
            <summary>
            Gets or sets the communication direction for this pin
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.GPIOMem.Resistor">
            <summary>
            Gets or sets the internal resistor value for the pin
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.Write(System.Boolean)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="value">The value to write to the pin</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.Write(RaspberryPiDotNet.PinState)">
            <summary>
            Write a value to the pin
            </summary>
            <param name="pinState"></param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.Read">
            <summary>
            Read a value from the pin
            </summary>
            <returns>The value read from the pin</returns>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.SetMulti(RaspberryPiDotNet.GPIOPinMask)">
            <summary>
            Sets any of the first 32 GPIO output pins specified in the mask to HIGH.
            </summary>
            <param name="mask">Mask of pins to affect. Use eg: (GPIOPinMask.GPIO_00) | GPIOPinMask.GPIO_01)</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.ClearMulti(RaspberryPiDotNet.GPIOPinMask)">
            <summary>
            Sets any of the first 32 GPIO output pins specified in the mask to LOW.
            </summary>
            <param name="mask">Mask of pins to affect. Use eg: (GPIOPinMask.GPIO_00) | GPIOPinMask.GPIO_01)</param>
        </member>
        <member name="M:RaspberryPiDotNet.GPIOMem.WriteMulti(RaspberryPiDotNet.GPIOPinMask,System.Boolean)">
            <summary>
            Sets any of the first 32 GPIO output pins specified in the mask to value.
            </summary>
            <param name="mask">Mask of pins to affect. Use eg: (GPIOPinMask.GPIO_00) | GPIOPinMask.GPIO_01)</param>
        </member>
        <member name="T:RaspberryPiDotNet.GPIOPins">
            <remarks>
            Refer to http://elinux.org/Rpi_Low-level_peripherals for diagram.
            P1-01 = bottom left, P1-02 = top left
            pi connector P1 pin    = GPIOnum
                             P1-03 = GPIO0
                             P1-05 = GPIO1
                             P1-07 = GPIO4
                             P1-08 = GPIO14 - alt function (UART0_TXD) on boot-up
                             P1-10 = GPIO15 - alt function (UART0_TXD) on boot-up
                             P1-11 = GPIO17
                             P1-12 = GPIO18
                             P1-13 = GPIO21
                             P1-15 = GPIO22
                             P1-16 = GPIO23
                             P1-18 = GPIO24
                             P1-19 = GPIO10
                             P1-21 = GPIO9
                             P1-22 = GPIO25
                             P1-23 = GPIO11
                             P1-24 = GPIO8
                             P1-26 = GPIO7

                             P5-03 = GPI28
                             P5-04 = GPI29
                             P5-05 = GPI30
                             P5-06 = GPI31

            So to turn on Pin7 on the GPIO connector, pass in enumGPIOPIN.gpio4 as the pin parameter
            </remarks>
        </member>
        <member name="M:RaspberryPiDotNet.MAX72XX.LedDisplay.Rect(System.Int32,System.Int32,System.Int32,System.Int32)">
            <summary>
            Draw a simple rectangle
            </summary>
            <param name="x1"></param>
            <param name="y1"></param>
            <param name="x2"></param>
            <param name="y2"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MAX72XX.LedDisplay.Rect(System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
            <summary>
            Draws a dashed rectangle
            </summary>
            <param name="x1"></param>
            <param name="y1"></param>
            <param name="x2"></param>
            <param name="y2"></param>
            <param name="even"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MAX72XX.LedDisplay.Bitmap(System.Int32,System.Int32,System.String[])">
            <summary>
            A simple method to draw bitmap data
            </summary>
            <param name="xPos"></param>
            <param name="yPos"></param>
            <param name="data"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MAX72XX.LedDisplay.ScrollPrint(System.String,System.Int32)">
            <summary>
            A higher level function to scrolls text right to left
            </summary>
            <param name="text"></param>
            <returns>The number of remaining calls to ScrollPrint to complete the animation</returns>
        </member>
        <member name="M:RaspberryPiDotNet.MAX72XX.LedDisplay.Print(System.String,System.Int32,System.Int32)">
            <summary>
            Draw pixel font
            </summary>
            <param name="text"></param>
            <param name="xPos"></param>
            <param name="yPos"></param>
            <returns>the pixel width of the text</returns>
        </member>
        <member name="T:RaspberryPiDotNet.MCP3008">
            <summary>
            Raspberry Pi using MCP3008 A/D Converters with SPI Serial Interface
            <seealso cref="!:http://ww1.microchip.com/downloads/en/DeviceDoc/21295d.pdf"/>
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MCP3008.#ctor(System.Int32,RaspberryPiDotNet.GPIO,RaspberryPiDotNet.GPIO,RaspberryPiDotNet.GPIO,RaspberryPiDotNet.GPIO)">
            <summary>
            Connect MCP3008 with clock, Serial Peripheral Interface(SPI) and channel
            </summary>
            <param name="adc_channel">MCP3008 channel number 0-7 (pin 1-8 on chip).</param>
            <param name="SPICLK">Clock pin</param>
            <param name="SPIMOSI">SPI Master Output, Slave Input (MOSI)</param>
            <param name="SPIMISO">SPI Master Input, Slave Output (MISO)</param>
            <param name="SPICS">SPI Chip Select</param>
        </member>
        <member name="P:RaspberryPiDotNet.MCP3008.AnalogToDigital">
            <summary>
            Analog to digital conversion
            </summary>
        </member>
        <member name="T:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOFileLcdTransferProvider">
            <summary>
            Raspberry Pi GPIO provider for the Micro Liquid Crystal Library.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOFileLcdTransferProvider.#ctor(System.Boolean,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins)">
            <summary>
            Creates a variable of type LiquidCrystal. The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines unconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; if so, omit it from this function's parameters.
            </summary>
            <param name="fourBitMode"></param>
            <param name="rs">The number of the CPU pin that is connected to the RS (register select) pin on the LCD.</param>
            <param name="rw">The number of the CPU pin that is connected to the RW (Read/Write) pin on the LCD (optional).</param>
            <param name="enable">the number of the CPU pin that is connected to the enable pin on the LCD.</param>
            <param name="d0"></param>
            <param name="d1"></param>
            <param name="d2"></param>
            <param name="d3"></param>
            <param name="d4"></param>
            <param name="d5"></param>
            <param name="d6"></param>
            <param name="d7"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOFileLcdTransferProvider.Send(System.Byte,System.Boolean,System.Boolean)">
            <summary>
            Write either command or data, with automatic 4/8-bit selection
            </summary>
            <param name="value">value to write</param>
            <param name="mode">Mode for RS (register select) pin.</param>
            <param name="backlight">Backlight state.</param>
        </member>
        <member name="T:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOMemLcdTransferProvider">
            <summary>
            Raspberry Pi GPIO provider for the Micro Liquid Crystal Library.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOMemLcdTransferProvider.#ctor(System.Boolean,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins,RaspberryPiDotNet.GPIOPins)">
            <summary>
            Creates a variable of type LiquidCrystal. The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines unconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; if so, omit it from this function's parameters.
            </summary>
            <param name="fourBitMode"></param>
            <param name="rs">The number of the CPU pin that is connected to the RS (register select) pin on the LCD.</param>
            <param name="rw">The number of the CPU pin that is connected to the RW (Read/Write) pin on the LCD (optional).</param>
            <param name="enable">the number of the CPU pin that is connected to the enable pin on the LCD.</param>
            <param name="d0"></param>
            <param name="d1"></param>
            <param name="d2"></param>
            <param name="d3"></param>
            <param name="d4"></param>
            <param name="d5"></param>
            <param name="d6"></param>
            <param name="d7"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.RaspPiGPIOMemLcdTransferProvider.Send(System.Byte,System.Boolean,System.Boolean)">
            <summary>
            Write either command or data, with automatic 4/8-bit selection
            </summary>
            <param name="value">value to write</param>
            <param name="mode">Mode for RS (register select) pin.</param>
            <param name="backlight">Backlight state.</param>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.ILcdTransferProvider.FourBitMode">
            <summary>
            Specify if the provider works in 4-bit mode; 8-bit mode is used otherwise.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.ShowCursor">
            <summary>
            Display or hide the LCD cursor: an underscore (line) at the position to which the next character will be written.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.BlinkCursor">
            <summary>
            Display or hide the blinking block cursor at the position to which the next character will be written.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Visible">
            <summary>
            Turns the LCD display on or off. This will restore the text (and cursor) that was on the display.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Backlight">
            <summary>
            Turns the LCD backlight on or off.
            </summary>
        </member>
        <member name="P:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Encoding">
            <summary>
            Get or set the encoding used to map the string into bytes codes that are sent LCD.
            UTF8 is used by default.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Begin(System.Byte,System.Byte)">
            <summary>
            Use this method to initialize the LCD. Specifies the dimensions (width and height) of the display.
            </summary>
            <param name="columns">The number of columns that the display has.</param>
            <param name="lines">The number of rows that the display has.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Clear">
            <summary>
            Clears the LCD screen and positions the cursor in the upper-left corner.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Home">
            <summary>
            Positions the cursor in the upper-left of the LCD.
            That is, use that location in outputting subsequent text to the display.
            To also clear the display, use the <see cref="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Clear"/> method instead.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.SetCursorPosition(System.Int32,System.Int32)">
            <summary>
            Position the LCD cursor; that is, set the location at which subsequent text written to the LCD will be displayed
            </summary>
            <param name="column"></param>
            <param name="row"></param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.ScrollDisplayLeft">
            <summary>
            Scrolls the contents of the display (text and cursor) one space to the left.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.ScrollDisplayRight">
            <summary>
            Scrolls the contents of the display (text and cursor) one space to the right.
            </summary>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.MoveCursor(System.Boolean)">
            <summary>
            Moves cursor left or right.
            </summary>
            <param name="right">true to move cursor right.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Write(System.String)">
            <summary>
            Writes a text to the LCD.
            </summary>
            <param name="text">The string to write.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.Write(System.Byte[],System.Int32,System.Int32)">
            <summary>
            Writes a specified number of bytes to the LCD using data from a buffer.
            </summary>
            <param name="buffer">The byte array that contains data to write to display.</param>
            <param name="offset">The zero-based byte offset in the buffer parameter at which to begin copying bytes to display.</param>
            <param name="count">The number of bytes to write.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.WriteByte(System.Byte)">
            <summary>
            Sends one data byte to the display.
            </summary>
            <param name="data">The data byte to send.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.SendCommand(System.Byte)">
            <summary>
            Sends HD44780 lcd interface command.
            </summary>
            <param name="data">The byte command to send.</param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.CreateChar(System.Int32,System.Byte[],System.Int32)">
            <summary>
            Create a custom character (gylph) for use on the LCD.
            </summary>
            <remarks>
            Up to eight characters of 5x8 pixels are supported (numbered 0 to 7).
            The appearance of each custom character is specified by an array of eight bytes, one for each row.
            The five least significant bits of each byte determine the pixels in that row.
            To display a custom character on the screen, call WriteByte() and pass its number.
            </remarks>
            <param name="location">Which character to create (0 to 7) </param>
            <param name="charmap">The character's pixel data </param>
            <param name="offset">Offset in the charmap wher character data is found </param>
        </member>
        <member name="M:RaspberryPiDotNet.MicroLiquidCrystal.Lcd.UpdateDisplayControl">
            <summary>
            Method is called when any of the display control properties are changed.
            </summary>
        </member>
        <member name="T:RaspberryPiDotNet.PinState">
            <summary>
            This is a cleaner way to write the Pin Status
            </summary>
        </member>
        <member name="F:RaspberryPiDotNet.TM16XX.TM16XX.charMap">
            <summary>
            The character map for the seven segment displays.
            The bits are displayed by mapping bellow
             -- 0 --
            |       |
            5       1
             -- 6 --
            4       2
            |       |
             -- 3 --  .7
            </summary>
        </member>
    </members>
</doc>


text:
<TITLE>Review for Mission: Impossible II (2000)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Mission: Impossible II (2000)

reviewed by
Chad Polenz

Mission: Impossible 2

Tom Cruise is back as super secret agent Ethan Hunt who must save the world -
not from nuclear war or
terrorists - but from a lethal man-made virus. An original idea to be sure,
but the execution of the story is
not. Instead of being too confusing like the last time, this time it's almost
too simple and certain key plot
points and sequences are waaaaaay over the top and unbelievable. Action
filmmaker John Woo certainly
puts a lot more energy into this film than Brian De Palma did in 1996. We can
really buy Cruise as a genuine
action performer (the long, drawn-out fight scene at the end is proof of
this).

Whatever you're expecting this film to be will, it WILL be, so enjoy the
ride.

GRADE: B

Chad'z Movie Page is back!
New reviews of the latest movies in easy-to-swallow capsule form with the
trendy, Entertainment Weekly-style of letter grades instead of the old star
system. Have I sold out? Visit my page and decide for yourself ;-)

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
using DjvuNet.DataChunks.Enums;

namespace DjvuNet.DataChunks
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class InclChunk : IFFChunk
    {
        #region Public Properties

        #region ChunkType

        public override ChunkTypes ChunkType
        {
            get { return ChunkTypes.Incl; }
        }

        #endregion ChunkType

        #region IncludeID

        private string _includeID;

        /// <summary>
        /// Gets the ID of the element to include
        /// </summary>
        public string IncludeID
        {
            get { return _includeID; }

            private set
            {
                if (IncludeID != value)
                {
                    _includeID = value;
                }
            }
        }

        #endregion IncludeID

        #endregion Public Properties

        #region Constructors

        public InclChunk(DjvuReader reader, IFFChunk parent, DjvuDocument document)
            : base(reader, parent, document)
        {
        }

        #endregion Constructors

        #region Protected Methods

        protected override void ReadChunkData(DjvuReader reader)
        {
            _includeID = reader.ReadUTF8String(Length);
        }

        #endregion Protected Methods
    }
}


text:
.. File generated by /opt/cloudscheduler/utilities/schema_doc - DO NOT EDIT
..
.. To modify the contents of this file:
..   1. edit the template file ".../cloudscheduler/docs/schema_doc/tables/csv2_cloud_metadata.yaml"
..   2. run the utility ".../cloudscheduler/utilities/schema_doc"
..

Database Table: csv2_cloud_metadata
===================================

In order for a Virtual Machine (VM) running on a cloud to
be useful in the distributed cloud computing environment, it must be "contextualized".
At a minumum, it must register with a condor central manager to
receive jobs to execute. This contextualization is achieved through metadata which is
passed to **cloud-init** (see https://cloudinit.readthedocs.io/en/latest/). The metadata to be used is saved
as files within the database. Metadata can be defined at the group
level (applies to all clouds within the group) or specific to each
cloud. All enabled metadata, both group and cloud level metadata, is collated
in priority order and passed to cloud-init.

This table maintains cloud specific metadata.

Keys:
^^^^^

* **group_name** (String(32)):

      Is the name of the group owning the cloud and the metadata
      file.

* **cloud_name** (String(32)):

      Is the name of the specific cloud to which this metadata file
      applies.

* **metadata_name** (String(64)):

      Is the arbitrary unique name, within the group/cloud specific metadata files, of
      this metadata file.

Columns:
^^^^^^^^

* **enabled** (Boolean):

      If set to 0, the metadata file is disabled and will not
      be used. If set to 1, the metadata file is enabled and
      will be passed to cloud-init in priority order.

* **priority** (Integer):

      An integer (including negative integers) indicating the metadata file priority. Lower numbers
      have highter priority and will be included earlier in the collation order.

* **metadata** (String):

      Is the metadata. It's format is dependent on the application that consumes
      it (see "mime_type" below).

* **mime_type** (String(128)):

      Is a valid mime type determining the way in which CSV2 handles
      this file. Examples of mime_type are:

      o cloud-config - yaml files passed to cloud-init.

      o ucernvm-config - a CernVM parameter file (see CernVM documentation).

      For a complete list refer to the content of the CSV2 table
      csv2_mime_types.