text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2015 GDG Minsk
  ~
  ~ 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.
  -->

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="by.gdgminsk.animationguide.RevealListActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/Theme.AnimationGuide.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:popupTheme="@style/Theme.AnimationGuide.PopupOverlay"
            app:theme="@style/Theme.AnimationGuide.AppBarOverlay"
            android:background="?attr/colorPrimary">

            <TextView
                android:id="@+id/title"
                style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical|start"
                android:text="@string/title_activity_reveal_from_fab"/>
        </android.support.v7.widget.Toolbar>
    </android.support.design.widget.AppBarLayout>

    <ListView
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:listItem="@layout/list_item_simple"/>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab_create"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:transitionName="@string/shared_view_bullet"
        app:backgroundTint="@color/fab_bg_add"
        android:src="@drawable/ic_fab_plus"/>

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


text:
TOP_DIR = ../..
include $(TOP_DIR)/tools/Makefile.common
KB_RUNTIME ?= /kb/runtime
KB_TOP ?= /kb/deployment
JAVA_HOME ?= $(KB_RUNTIME)/java
AWE_WORKER_SCRIPT = $(KB_TOP)/bin/run_inferelator_awe
TARGET ?= $(KB_TOP)
CURR_DIR = $(shell pwd)
TARGET_DIR = $(TARGET)/services/$(SERVICE_NAME)
TARGET_PORT = 7113
THREADPOOL_SIZE = 20
SERVICE_NAME = $(shell basename $(CURR_DIR))
SERVICE_SPEC = ./Inferelator.spec
SERVICE_PORT = $(TARGET_PORT)
SERVICE_DIR = $(TARGET_DIR)
SERVLET_CLASS = us.kbase.inferelator.InferelatorServer
MAIN_AWE_CLASS = us.kbase.inferelator.InferelatorInvoker
SERVICE_PSGI = $(SERVICE_NAME).psgi
TPAGE_ARGS = --define kb_top=$(TARGET) --define kb_runtime=$(KB_RUNTIME) --define kb_service_name=$(SERVICE_NAME) --define kb_service_dir=$(SERVICE_DIR) --define kb_service_port=$(SERVICE_PORT) --define kb_psgi=$(SERVICE_PSGI)
DEPLOY_JAR = $(KB_TOP)/lib/jars/inferelator
JOB_DIR = /var/tmp/inferelator
UJS_SERVICE_URL ?= https://kbase.us/services/userandjobstate
AWE_CLIENT_URL ?= http://bio-data-1.mcs.anl.gov/services/awe/job
ID_SERVICE_URL ?= https://kbase.us/services/idserver
WS_SERVICE_URL ?= https://kbase.us/services/ws

default: compile compile-worker

deploy: distrib deploy-client

deploy-all: distrib deploy-client deploy-worker

deploy-client: deploy-libs deploy-pl-scripts deploy-docs

deploy-libs: build-libs
	rsync --exclude '*.bak*' -arv lib/. $(TARGET)/lib/.

deploy-pl-scripts:
	export KB_TOP=$(TARGET); \
	export KB_RUNTIME=$(KB_RUNTIME); \
	export KB_PERL_PATH=$(TARGET)/lib bash ; \
	for src in $(SRC_PERL) ; do \
		basefile=`basename $$src`; \
		base=`basename $$src .pl`; \
		echo install $$src $$base ; \
		cp $$src $(TARGET)/plbin ; \
		$(WRAP_PERL_SCRIPT) "$(TARGET)/plbin/$$basefile" $(TARGET)/bin/$$base ; \
	done

deploy-docs: build-docs
	mkdir -p $(TARGET)/services/$(SERVICE_NAME)/webroot/.
	cp docs/*.html $(TARGET)/services/$(SERVICE_NAME)/webroot/.

deploy-worker: deploy-properties distrib-worker
	echo '#!/bin/bash' > $(AWE_WORKER_SCRIPT)
	echo 'export KB_TOP=$(KB_TOP)' >> $(AWE_WORKER_SCRIPT)
	echo 'export KB_RUNTIME=$(KB_RUNTIME)' >> $(AWE_WORKER_SCRIPT)
	echo 'export JAVA_HOME=$(JAVA_HOME)' >> $(AWE_WORKER_SCRIPT)
	echo 'export PATH=$(KB_RUNTIME)/bin:$(KB_TOP)/bin:$(JAVA_HOME)/bin:$$PATH' >> $(AWE_WORKER_SCRIPT)
	echo 'mkdir -p $$2' >> $(AWE_WORKER_SCRIPT)
	echo 'java -jar $$KB_TOP/lib/jars/inferelator/inferelator.jar $$@ 2> $$2/error.log' >> $(AWE_WORKER_SCRIPT)
	echo 'tar cvfz $$2.tgz $$2' >> $(AWE_WORKER_SCRIPT)
	echo 'cp $$2.tgz /var/tmp/inferelator' >> $(AWE_WORKER_SCRIPT)
	echo 'rm -rf $$2' >> $(AWE_WORKER_SCRIPT)
	chmod 775 $(AWE_WORKER_SCRIPT)

deploy-properties:
	echo "inferelator=$(KB_RUNTIME)/cmonkey-python/inferelator/\nujs_url=$(UJS_SERVICE_URL)\nawe_url=$(AWE_CLIENT_URL)\nid_url=$(ID_SERVICE_URL)\nws_url=$(WS_SERVICE_URL)\nawf_config=$(TARGET_DIR)/inferelator.awf" > $(TARGET_DIR)/inferelator.properties

distrib-worker:
	mkdir -p $(JOB_DIR)
	rm -rf $(DEPLOY_JAR)
	mkdir -p $(DEPLOY_JAR)/lib
	cp ./lib/*.jar $(DEPLOY_JAR)/lib
	cp ./dist/inferelator.jar $(DEPLOY_JAR)

distrib: deploy-properties
	@echo "Target folder: $(TARGET_DIR)"
	mkdir -p $(TARGET_DIR)
	mkdir -p $(JOB_DIR)
	cp -f ./dist/service.war $(TARGET_DIR)
	cp -f ./glassfish_start_service.sh $(TARGET_DIR)
	cp -f ./glassfish_stop_service.sh $(TARGET_DIR)
	cp -f ./inferelator.awf $(TARGET_DIR)
	echo "./glassfish_start_service.sh $(TARGET_DIR)/service.war $(TARGET_PORT) $(THREADPOOL_SIZE)" > $(TARGET_DIR)/start_service.sh
	chmod +x $(TARGET_DIR)/start_service.sh
	echo "./glassfish_stop_service.sh $(TARGET_PORT)" > $(TARGET_DIR)/stop_service.sh
	chmod +x $(TARGET_DIR)/stop_service.sh

build-docs: build-libs
	pod2html --infile=lib/Bio/KBase/$(SERVICE_NAME)/Client.pm --outfile=docs/$(SERVICE_NAME).html

build-libs:
	compile_typespec \
		--psgi $(SERVICE_PSGI)  \
		--impl Bio::KBase::$(SERVICE_NAME)::$(SERVICE_NAME)Impl \
		--service Bio::KBase::$(SERVICE_NAME)::Service \
		--client Bio::KBase::$(SERVICE_NAME)::Client \
		--py biokbase/$(SERVICE_NAME)/Client \
		--js javascript/$(SERVICE_NAME)/Client \
		$(SERVICE_SPEC) lib

compile:
	./make_war.sh $(SERVLET_CLASS)

compile-worker:
	./make_jar.sh $(MAIN_AWE_CLASS)

test: test-scripts
	@echo "running script tests"

test-scripts:
	# run each test
	$(KB_RUNTIME)/bin/perl test/script_tests-command-line.t ; \
	if [ $$? -ne 0 ] ; then \
		exit 1 ; \
	fi \

test-worker:
	# run each test
	$(KB_RUNTIME)/bin/perl test/test_inferelator_server_invoker.t ; \
	if [ $$? -ne 0 ] ; then \
		exit 1 ; \
	fi \

clean:
	@echo "nothing to clean"

redpajama_set_name: RedPajamaGithub


text:
azure-datalake-store
====================

.. image:: https://travis-ci.org/Azure/azure-data-lake-store-python.svg?branch=dev
    :target: https://travis-ci.org/Azure/azure-data-lake-store-python
.. image:: https://coveralls.io/repos/github/Azure/azure-data-lake-store-python/badge.svg?branch=master
    :target: https://coveralls.io/github/Azure/azure-data-lake-store-python?branch=master

azure-datalake-store is a file-system management system in python for the
Azure Data-Lake Store.

To install from source instead of pip (for local testing and development):

.. code-block:: bash

    > pip install -r dev_requirements.txt
    > python setup.py develop

To run tests, you are required to set the following environment variables:
azure_tenant_id, azure_username, azure_password, azure_data_lake_store_name

To play with the code, here is a starting point:

.. code-block:: python

    from azure.datalake.store import core, lib, multithread
    token = lib.auth(tenant_id, username, password)
    adl = core.AzureDLFileSystem(token, store_name=store_name)

    # typical operations
    adl.ls('')
    adl.ls('tmp/', detail=True)
    adl.ls('tmp/', detail=True, invalidate_cache=True)
    adl.cat('littlefile')
    adl.head('gdelt20150827.csv')

    # file-like object
    with adl.open('gdelt20150827.csv', blocksize=2**20) as f:
        print(f.readline())
        print(f.readline())
        print(f.readline())
        # could have passed f to any function requiring a file object:
        # pandas.read_csv(f)

    with adl.open('anewfile', 'wb') as f:
        # data is written on flush/close, or when buffer is bigger than
        # blocksize
        f.write(b'important data')

    adl.du('anewfile')

    # recursively download the whole directory tree with 5 threads and
    # 16MB chunks
    multithread.ADLDownloader(adl, "", 'my_temp_dir', 5, 2**24)

Command Line Sample Usage
-------------------------
To interact with the API at a higher-level, you can use the provided
command-line interface in "samples/cli.py". You will need to set
the appropriate environment variables as described above to connect to the
Azure Data Lake Store. Below is a simple sample, with more details beyond.

.. code-block:: bash

    python samples\cli.py ls -l

Execute the program without arguments to access documentation.

To start the CLI in interactive mode, run "python samples/cli.py"
and then type "help" to see all available commands (similiar to Unix utilities):

.. code-block:: bash

    > python samples/cli.py
    azure> help

    Documented commands (type help <topic>):
    ========================================
    cat    chmod  close  du      get   help  ls     mv   quit  rmdir  touch
    chgrp  chown  df     exists  head  info  mkdir  put  rm    tail

    azure>

While still in interactive mode, you can run "ls -l" to list the entries in the
home directory ("help ls" will show the command's usage details). If you're not
familiar with the Unix/Linux "ls" command, the columns represent 1) permissions,
2) file owner, 3) file group, 4) file size, 5-7) file's modification time, and
8) file name.

.. code-block:: bash

    > python samples/cli.py
    azure> ls -l
    drwxrwx--- 0123abcd 0123abcd         0 Aug 02 12:44 azure1
    -rwxrwx--- 0123abcd 0123abcd   1048576 Jul 25 18:33 abc.csv
    -r-xr-xr-x 0123abcd 0123abcd        36 Jul 22 18:32 xyz.csv
    drwxrwx--- 0123abcd 0123abcd         0 Aug 03 13:46 tmp
    azure> ls -l --human-readable
    drwxrwx--- 0123abcd 0123abcd   0B Aug 02 12:44 azure1
    -rwxrwx--- 0123abcd 0123abcd   1M Jul 25 18:33 abc.csv
    -r-xr-xr-x 0123abcd 0123abcd  36B Jul 22 18:32 xyz.csv
    drwxrwx--- 0123abcd 0123abcd   0B Aug 03 13:46 tmp
    azure>

To download a remote file, run "get remote-file [local-file]". The second
argument, "local-file", is optional. If not provided, the local file will be
named after the remote file minus the directory path.

.. code-block:: bash

    > python samples/cli.py
    azure> ls -l
    drwxrwx--- 0123abcd 0123abcd         0 Aug 02 12:44 azure1
    -rwxrwx--- 0123abcd 0123abcd   1048576 Jul 25 18:33 abc.csv
    -r-xr-xr-x 0123abcd 0123abcd        36 Jul 22 18:32 xyz.csv
    drwxrwx--- 0123abcd 0123abcd         0 Aug 03 13:46 tmp
    azure> get xyz.csv
    2016-08-04 18:57:48,603 - ADLFS - DEBUG - Creating empty file xyz.csv
    2016-08-04 18:57:48,604 - ADLFS - DEBUG - Fetch: xyz.csv, 0-36
    2016-08-04 18:57:49,726 - ADLFS - DEBUG - Downloaded to xyz.csv, byte offset 0
    2016-08-04 18:57:49,734 - ADLFS - DEBUG - File downloaded (xyz.csv -> xyz.csv)
    azure>

It is also possible to run in command-line mode, allowing any available command
to be executed separately without remaining in the interpreter.

For example, listing the entries in the home directory:

.. code-block:: bash

    > python samples/cli.py ls -l
    drwxrwx--- 0123abcd 0123abcd         0 Aug 02 12:44 azure1
    -rwxrwx--- 0123abcd 0123abcd   1048576 Jul 25 18:33 abc.csv
    -r-xr-xr-x 0123abcd 0123abcd        36 Jul 22 18:32 xyz.csv
    drwxrwx--- 0123abcd 0123abcd         0 Aug 03 13:46 tmp
    >

Also, downloading a remote file:

.. code-block:: bash

    > python samples/cli.py get xyz.csv
    2016-08-04 18:57:48,603 - ADLFS - DEBUG - Creating empty file xyz.csv
    2016-08-04 18:57:48,604 - ADLFS - DEBUG - Fetch: xyz.csv, 0-36
    2016-08-04 18:57:49,726 - ADLFS - DEBUG - Downloaded to xyz.csv, byte offset 0
    2016-08-04 18:57:49,734 - ADLFS - DEBUG - File downloaded (xyz.csv -> xyz.csv)
    >


text:
<?php
/* @var $this UsersController */
/* @var $model Users */
/* @var $form CActiveForm */
?>

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

		<?php echo $form->label($model,'id'); ?>
		<?php echo $form->textField($model,'id'); ?>

		<?php echo $form->label($model,'username'); ?>
		<?php echo $form->textField($model,'username',array('size'=>60,'maxlength'=>255)); ?>

		<?php echo $form->label($model,'date_created'); ?>
		<?php echo $form->textField($model,'date_created'); ?>

		<?php echo $form->label($model,'last_update'); ?>
		<?php echo $form->textField($model,'last_update'); ?>

		<?php echo $form->label($model,'roles_id'); ?>
		<?php echo $form->textField($model,'roles_id'); ?>

		<?php echo CHtml::submitButton('Search'); ?>

<?php $this->endWidget(); ?>


text:
import styled from "styled-components";

const HiddenCheckableInputStyle = styled.input`
  cursor: pointer;
  opacity: 0;
  margin: 0;
  position: relative;
  z-index: 999;
`;

export default HiddenCheckableInputStyle;


text:
/**
 * @author alteredq / http://alteredqualia.com/
 */

THREE.Clock = function ( autoStart ) {

	this.autoStart = ( autoStart !== undefined ) ? autoStart : true;

	this.startTime = 0;
	this.oldTime = 0;
	this.elapsedTime = 0;

	this.running = false;

};

THREE.Clock.prototype = {

	constructor: THREE.Clock,

	start: function () {

		this.startTime = self.performance !== undefined && self.performance.now !== undefined
					 ? self.performance.now()
					 : Date.now();

		this.oldTime = this.startTime;
		this.running = true;

	},

	stop: function () {

		this.getElapsedTime();
		this.running = false;

	},

	getElapsedTime: function () {

		this.getDelta();
		return this.elapsedTime;

	},

	getDelta: function () {

		var diff = 0;

		if ( this.autoStart && ! this.running ) {

			this.start();

		}

		if ( this.running ) {

			var newTime = self.performance !== undefined && self.performance.now !== undefined
					 ? self.performance.now()
					 : Date.now();

			diff = 0.001 * ( newTime - this.oldTime );
			this.oldTime = newTime;

			this.elapsedTime += diff;

		}

		return diff;

	}

};


text:
.oo-ui-window-head {
  height: 3.35em;
  border-bottom: 1px solid #dddddd;
}

.oo-ui-window-body {
  padding: 2em 3.35em;
}

.oo-ui-window-icon {
  width: 3.35em;
  height: 3.35em;
  background-size: 2em auto;
  border-left: 1px solid #dddddd;
}

.oo-ui-window-title {
  line-height: 3.35em;
}

.oo-ui-buttonedElement.oo-ui-indicatedElement .oo-ui-buttonedElement-button > .oo-ui-indicatedElement-indicator,
.oo-ui-buttonedElement.oo-ui-iconedElement .oo-ui-buttonedElement-button > .oo-ui-iconedElement-icon {
  width: 3.35em;
  height: 3.35em;
  background-size: 2em auto;
}

.oo-ui-optionWidget {
  padding: 0.8em 1em 0.8em 3.35em;
  font-weight: bold;
  border-bottom: 1px solid #dddddd;
}

.oo-ui-optionWidget.oo-ui-indicatedElement .oo-ui-labeledElement-label {
  padding-right: 1.5em;
}

.oo-ui-optionWidget-level-0 {
  padding-left: 3.5em;
}

.oo-ui-optionWidget-level-0 .oo-ui-iconedElement-icon {
  left: 1em;
}

.oo-ui-optionWidget-level-1 {
  padding-left: 5em;
}

.oo-ui-optionWidget-level-1 .oo-ui-iconedElement-icon {
  left: 2.5em;
}

.oo-ui-optionWidget-level-2 {
  padding-left: 6.5em;
}

.oo-ui-optionWidget-level-2 .oo-ui-iconedElement-icon {
  left: 4em;
}

.oo-ui-buttonOptionWidget {
  padding: 0;
}

.oo-ui-menuItemWidget.oo-ui-optionWidget-selected {
  color: #ffffff;
  background: #347bff;
}

.oo-ui-menuSectionItemWidget {
  font-weight: normal;
  color: #777777;
  border: none;
}

.oo-ui-textInputWidget input,
.oo-ui-textInputWidget textarea {
  padding: .8em 1em;
}


text:
class SeedAndMoveToCertificationTypes < ActiveRecord::Migration[4.2]
  def change
    add_column :certification_types, :roles, :string

    list = [
      {
        name: 'I attended the Main Hearing (1st day of trial)',
        pre_may_2015: false,
        roles: ['agfs']
      },
      {
        name: 'I notified the court, in writing before the PCMH that I was the Instructed Advocate. A copy of the letter is attached.',
        pre_may_2015: true,
        roles: ['agfs']
      },
      {
        name: 'I attended the PCMH (where the client was arraigned) and no other advocate wrote to the court prior to this to advice that they were the Instructed Advocate.',
        pre_may_2015: true,
        roles: ['agfs']
      },
      {
        name: 'I attended the first hearing after the PCMH and no other advocate attended the PCMH or wrote to the court prior to this to advise that they were the Instructed Advocate.',
        pre_may_2015: true,
        roles: ['agfs']
      },
      {
        name: 'The previous Instructed Advocate notified the court in writing that they were no longer acting in this case and I was then instructed.',
        pre_may_2015: true,
        roles: ['agfs']
      },
      {
        name: 'The case was a fixed fee (with a case number beginning with an S or A) and I attended the main hearing.',
        pre_may_2015: true,
        roles: ['agfs']
      }
    ]

    list.each do |data|
      CertificationType.find_or_create_by!(name: data.delete(:name)) do |c|
        c.pre_may_2015 = data[:pre_may_2015]
        c.roles = data[:roles]
      end
    end

    Certification.all.each do |certification|
      certification_type = nil

      [:main_hearing, :notified_court, :attended_pcmh, :attended_first_hearing, :previous_advocate_notified_court, :fixed_fee_case].each do |method|
        if certification.send(method) == true
          certification_type = eval(method.to_s)
        end
      end

      certification.update_column(:certification_type_id, certification_type.id)
    end

    remove_column :certifications, :main_hearing, :boolean
    remove_column :certifications, :notified_court, :boolean
    remove_column :certifications, :attended_pcmh, :boolean
    remove_column :certifications, :attended_first_hearing, :boolean
    remove_column :certifications, :previous_advocate_notified_court, :boolean
    remove_column :certifications, :fixed_fee_case, :boolean
  end
end


text:
import os
import sys
import time
import logging
import simplejson

from twisted.python import filepath
from twisted.internet import inotify
from twisted.internet import reactor

from twisted.internet.protocol import Factory
from twisted.protocols.basic import LineReceiver

class Notifier(object):

    def __init__(self, recipent, path):
        self.recipent = recipent
        self.path = path
        self.set_watch

    @property
    def set_watch(self):
        self.notifier = inotify.INotify()
        self.notifier.startReading()
        try:
            self.notifier.watch(filepath.FilePath(self.path),
                                mask=inotify.IN_WATCH_MASK | inotify.IN_ACCESS,
                                callbacks=[self.inotify_twisted])
        except inotify.INotifyError, e:
            error_message = simplejson.dumps(str(e))
            self.recipent.sendLine(error_message)

    def signal_event(self, event_dict):
        event = simplejson.dumps(event_dict)
        self.recipent.sendLine(event)

    def inotify_twisted(self, ignored, path, mask):
        alpha_event = inotify.humanReadableMask(mask)
        event = {time.time(): {'mask':mask, 'event':alpha_event[0], 'path':self.path}}
        self.signal_event(event)

class ClientHandle(LineReceiver):

    def __init__(self, clients, logger):
        self.clients = clients
        self.logger = logger

    def connectionMade(self):
        self.clients[self] = len(self.clients)
        self.logger.info('Client <%s> joined', self)

    def connectionLost(self, reason):
        del self.clients[self]
        self.logger.info('Client <%s> left', self)

    def lineReceived(self, path):
        self.notify = Notifier(self, path.strip('\r\n'))

class NotifyFactory(Factory):

    def __init__(self):
        basedir = os.environ['HOME'] + '/Bulletin'
        self._format = '%(asctime)s - %(levelname)s - %(message)s'
        self.logger = logging.getLogger('board')
        self.logger.setLevel(logging.DEBUG)
        self.handler = logging.FileHandler(os.path.join(basedir, '.board.log'), 'w')
        self.formatter = logging.Formatter(self._format)
        self.handler.setFormatter(self.formatter)
        self.logger.addHandler(self.handler)
        self.logger.info('twisted board')
        self.limit = 1000
        self.clients = dict()

    def buildProtocol(self, addr):
        if len(self.clients) > self.limit:
            return
        return ClientHandle(self.clients, self.logger)

if __name__ == '__main__':
    try:
        pid = os.fork()
        if pid > 0:
            sys.exit(0)
    except OSError:
        sys.exit(0)
    os.chdir('/')
    os.setsid()
    os.umask(0)
    try:
        pid = os.fork()
        if pid > 0:
            sys.exit(0)
    except OSError:
        sys.exit(1)
    reactor.listenUNIX('/tmp/twisted', NotifyFactory())
    reactor.run()


text:
<!DOCTYPE html>

    <title>Chapter XIV: "Worth and Quorom are Missing" | Canoemates: A Story of the Florida Reef and Everglades | Kirk Munroe | Lit2Go ETC</title>
    <link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/screenless.css" type="text/css" media="screen" title="no title" charset="utf-8">
    <link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/printless.css" type="text/css" media="print" title="no title" charset="utf-8">

          Lit2Go

<form action="http://etc.usf.edu/lit2go/search/"><input type="text" name="q" placeholder="Search" value=""></form>

Authors

Books

Genres

Collections

Readability

      Canoemates: A Story of the Florida Reef and Everglades

      by Kirk Munroe

      Chapter XIV: "Worth and Quorom are Missing"

        Additional Information

            Year Published:
            1892

            Language:
            English

            Country of Origin:
            United States of America

            Source:
            Munroe, K. (1892). Canoemates: A Story of the Florida Reef and Everglades. New York, NY: Harper & Brothers.

            Readability:

                Flesch–Kincaid Level:
                9.5

            Word Count:
            1,515

            Genre:
            Adventure

            ✎ Cite This

  Share
  |

Downloads

          Audio

          Passage PDF

Student Activity

            APA

            MLA

            Chicago

            Munroe, K. (1892). Chapter XIV: "Worth and Quorom are Missing". Canoemates: A Story of the Florida Reef and Everglades (Lit2Go Edition). Retrieved February 15, 2016, from http://etc.usf.edu/lit2go/152/canoemates-a-story-of-the-florida-reef-and-everglades/2680/chapter-xiv-worth-and-quorom-are-missing/

            Munroe, Kirk. "Chapter XIV: "Worth and Quorom are Missing"." Canoemates: A Story of the Florida Reef and Everglades. Lit2Go Edition. 1892. Web. <http://etc.usf.edu/lit2go/152/canoemates-a-story-of-the-florida-reef-and-everglades/2680/chapter-xiv-worth-and-quorom-are-missing/>. February 15, 2016.

            Kirk Munroe, "Chapter XIV: "Worth and Quorom are Missing"," Canoemates: A Story of the Florida Reef and Everglades, Lit2Go Edition, (1892), accessed February 15, 2016, http://etc.usf.edu/lit2go/152/canoemates-a-story-of-the-florida-reef-and-everglades/2680/chapter-xiv-worth-and-quorom-are-missing/.

Back

Next

                  <audio controls style="width:99%;">
            <source src="http://etc.usf.edu/lit2go/audio/mp3/canoemates-a-story-of-the-florida-reef-and-everglades-014-chapter-xiv-worth-and-quorom-are-missing.2680.mp3" type="audio/mpeg" />
                          <source src="http://etc.usf.edu/lit2go/audio/ogg/canoemates-a-story-of-the-florida-reef-and-everglades-014-chapter-xiv-worth-and-quorom-are-missing.2680.ogg" type="audio/ogg" />
                        The embedded audio player requires a modern internet browser. You should visit Browse Happy and update your internet browser today!
          </audio>

	As Sumner was anxious to reach Lignum Vitae by the shortest possible route, the Transit was headed in through the channel between Lower Metacumba and Long keys. Both tide and wind being with her, the nimble-footed sharpie seemed to fly past the low reefs and sandspits on either side. Now she skimmed by the feeding grounds of flocks of gray pelicans, whose wise expressions and bald heads gave them the appearance of groups of old men, and then passed an old sponge crawl, or the worm eaten hull of some ancient wreck, both of which were covered with countless numbers of cormorants, gannets, and gulls. Waiting, with outstretched necks and pinions half spread, until the schooner was within a stone’s throw, these would fly with discordant cries of anger, wheel in great circles, and return to the places from which they had been driven the moment the threatened danger had passed.

	Even after the sharpie was well inside the bay, and the island they sought was in sight, they could not lay a direct course towards it on account of a reef several miles in length that presented an effectual barrier to anything larger than a canoe. But one narrow channel cut through it, and this was away to the northward, close under a tiny mangrove key. Towards this then they steered, with Sumner at the tiller, for he was the only one on board familiar with the intricate navigation of those waters.

	“You are certain that you are right, Sumner?” inquired Lieutenant Carey, anxiously, as they seemed about to drive headlong on the bar, and an ominous wake of muddy water showed that they were dragging bottom.

	“Certain,” answered the boy, quietly.

	“All right, then; I’ve nothing to say.”

	Inch by inch the great centerboard rose in its trunk, and the slack of its pennant was taken in, as the water rapidly shoaled. Now she dragged so heavily that it seemed as though she were about to stop. Again the lieutenant looked at Sumner, and then cast a significant glance at the man stationed by the foresheet. But the boy never hesitated nor betrayed the least nervousness. An instant later the tiller was jammed hard over, there was a sharp order of “Trim in!” and, flying almost into the teeth of the wind, the light vessel shot through an Opening so narrow that she scraped bottom on both sides, and in another moment was dashing through deep water on the opposite side of the bar.

	From here the run to Lignum Vitae was a long and short leg beat, with numerous shoals to be avoided. In spite of being kept busy with these, Sumner found time to note and wonder at a great column of smoke that rose from the island. What could Worth and Quorum be about? It looked as though they had managed to set the forest on fire. Filled with an uneasy apprehension, he jumped into a boat the moment the Transit’s anchor was dropped in the well-remembered cove, and sculled himself ashore. To his amazement he heard the sound of many voices, and discovered a dozen or so of men hard at work apparently cutting down the forest and burning it.

	As he stepped ashore, and looked in vain for the familiar figures of his friends, a pleasant-faced young man advanced from where the laborers were at work to meet him.

	“Can you tell me, sir, what has become of a boy named Worth Manton and an old colored man whom I left here the day before yesterday?” Sumner inquired, anxiously.

	“If you mean the two whom I found camped here, and helping themselves to my provisions, I think I can,” answered the young man, with a smile. “They went over to Indian Key last evening on the boat that brought me here yesterday. They were very anxious concerning the fate of a friend who left them the evening before, and went over there on a raft, I believe they said. Can it be that you are the person they are seeking?”

	“Yes, sir, I am.”

	“Then you are Sumner Rankin, and I am very happy to meet you. My name is Haines. I have bought this key, and am clearing it, preparatory to having it planted with coconuts. The provisions and camp outfit that appeared here so mysteriously to you and your companions belong to me, and were left here by the mail schooner on her way up the reef. I expected to arrive, with my men, about the same time, but was detained. I am very glad, however, that they came in time to relieve your distress. I am also much obliged to you for affording them a shelter from the rain, without which some of the things would have been injured. Now will you pardon my curiosity if I ask how you happen to arrive here in a schooner from that direction when your friends said you had gone the other way, and were confident of finding you on Indian Key?”

	When Sumner had given a brief outline of his recent adventure, Mr. Haines said: “You certainly have had a most remarkable experience, and I am glad your friends did not know of it, for young Manton was worried enough about you as it was. However, you will soon rejoin them, and when you have recovered your canoes, if you feel so inclined, I should be pleased to have you return here as my guests for as long as you choose to stay.”

	Sumner thanked him, and said he should be happy to stop there on his return from the mainland. Then, begging to be excused, as he was impatient to go in search of his comrades, he jumped into his boat and returned to the Transit.

	Lieutenant Carey was perfectly willing to proceed at once to Indian Key, but the tide was still running flood, and the breeze, which was each moment becoming lighter, was dead ahead for a run out through the channel. Under the circumstances, it would be useless to lift the anchor, and the impatient boy was forced to wait for the tide to turn. When it finally began to run ebb, the breeze had died out so entirely that there was not even the faintest ripple on the water, and another season of waiting was unavoidable.

	By the lieutenant’s invitation Mr. Haines came off and dined with them. He proved a most charming companion, and laughed heartily at Sumner’s description of the amazement with which he, Worth, and Quorum had discovered the mysterious godsend of provisions. Mr. Haines declared that it was one of the best jokes he had ever known; though he was in doubt as to whether it was on him or on them. He appreciated Sumner’s impatience to be off, and when, late in the afternoon, a fair breeze sprang up, he made haste to take his leave that their departure might not be delayed.

	It was nearly sunset when the Transit approached Indian Key so closely that objects the size of a man could be distinguished on it. Sumner was again at the helm, and he tried not to neglect his steering; but he could not keep his eyes from scanning anxiously every discernible foot of its surface. To his great disappointment not a soul appeared.

	“They may be on the other side, keeping a lookout for passing vessels,” suggested Lieutenant Carey.

	Hoping that this might be the case, but still heavy-hearted and anxious, Sumner went ashore, accompanied by the lieutenant. For an hour they searched over every foot of the key, and through its deserted buildings, shouting as they went, but their search was in vain. Nothing was seen of the lost ones, nor had they left a trace to show that they had ever been on the island.

	“It’s no use,” said Sumner at length; “they evidently are not here, and must have gone on in the boat that brought them when they failed to find me. Now, I don’t know of anything to do but to go out to the lighthouse after the canoes, and then come back here and wait. If Worth has gone on up the reef, he must pass here on his way back, while if he has gone the other way, he will hear of me at Key West and come back here again. I’m awfully sorry that I can’t go with you to the mainland, but I don’t see how I possibly can under the circumstances.”

	Although the boy tried to speak cheerfully, and to take the brightest possible view of the disappearance of his young comrade, he was filled with anxiety, and it was with a heavy heart that he turned into his berth on board the schooner Transit that night.

Back

Next

            This collection of children's literature is a part of the Educational Technology Clearinghouse and is funded by various grants.

            Copyright © 2006—2016 by the Florida Center for Instructional Technology, College of Education, University of South Florida.

License

Credits

FAQ

Giving

This document was downloaded from Lit2Go, a free online collection of stories and poems in Mp3 (audiobook) format published by the Florida Center for Instructional Technology. For more information, including classroom activities, readability data, and original sources, please visit http://etc.usf.edu/lit2go/152/canoemates-a-story-of-the-florida-reef-and-everglades/2680/chapter-xiv-worth-and-quorom-are-missing/.

Lit2Go: Canoemates: A Story of the Florida Reef and Everglades

Chapter XIV: "Worth and Quorom are Missing"


text:
StyleCop
--------

Requirement: NuGet package StyleCop.MSBuild.

Unless specified otherwise, a project inherits its StyleCop settings from a
common settings file:
- for libraries, tests and tools, `StyleCop.Settings` link back to `Loosy.SourceAnalysis`:
```xml
<StyleCopSettings Version="105">
  <GlobalSettings>
    <StringProperty Name="LinkedSettingsFile">.\etc\Loosy.SourceAnalysis</StringProperty>
    <StringProperty Name="MergeSettingsFiles">Linked</StringProperty>
  </GlobalSettings>
</StyleCopSettings>
```
- for samples, `StyleCop.Settings` link back to `Empty.SourceAnalysis`:
```xml
<StyleCopSettings Version="105">
  <GlobalSettings>
    <StringProperty Name="LinkedSettingsFile">..\etc\Empty.SourceAnalysis</StringProperty>
    <StringProperty Name="MergeSettingsFiles">Linked</StringProperty>
  </GlobalSettings>
</StyleCopSettings>
```

This settings mirror what is done in the shared (MSBuild) property file.

There are three ways to run StyleCop:
- Inside VS from the menu, using the inherited settings from `StyleCop.Settings`.
- Inside VS, for Release builds, using the settings defined in the shared property file.
- From CI builds when `SourceAnalysisEnabled` is `true`, using the settings defined
  in the shared property file.

Remarks:
- `Loosy.SourceAnalysis` includes all rules except the documentation ones.
- `Empty.SourceAnalysis` disables all rules.
- `Strict.SourceAnalysis` enables all rules.
- When documentation is completed, override the project properties as follows:
```xml
<PropertyGroup>
    <SourceAnalysisOverrideSettingsFile>$(RepositorySettingsDir)Strict.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
</PropertyGroup>
```
  but we do not override the settings file `Settings.StyleCop` which implies that it
  does not affect StyleCop when called from the menu.

Library Narvalo.StyleCop
========================

- After a succesful build, the dll is copied to `tools\lib\StyleCop`.
  This operation might fail if Source Analysis has been performed before (it locks the dll).
- The assembly is called Narvalo.StyleCop but the default namespace is Narvalo.

When displaying warnings, the default behaviour of StyleCop is to use the part
after StyleCop in the namespace if any and to remove the "Rules" from the name of the
analyzer type. For instance:
- `Narvalo.StyleCop.CSharp.NamingRules` -> `CSharp.NamingRules`
- `Narvalo.StyleCop.NamingRules` -> `Naming`
- `Narvalo.NamingRules` -> `Narvalo.`
- `Narvalo.Rules` -> `Narvalo.Rules`

We use: `Narvalo.CSharpRules` -> `Narvalo.CSharp`


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package isima.solver.pso.decoders.blockops;

import isima.solver.pso.PSOConstants;

/**
 *
 * @author onio
 */
public class BlockOpFactory {

    public static final int N_OPS = 1;

    private static BlockOpFactory instance = null;

    private BlockOp[]   ops = new BlockOp[N_OPS];

    public static BlockOpFactory getInstance()
    {
        if (instance == null)
            instance = new BlockOpFactory();

        return (instance);
    }

    private BlockOpFactory()
    {
        /*
        ops[0] = new BlockOpMutat();
        ops[1] = new BlockOpNot();
        ops[2] = new BlockOpRol();
        ops[3] = new BlockOpXor();
        ops[4] = new BlockOpAnd();
        ops[5] = new BlockOpOr();
        ops[6] = new BlockOpRor();
        */

        /*
        ops[0] = new BlockOpXor();
        ops[1] = new BlockOpRol();
        ops[2] = new BlockOpAnd();
        ops[3] = new BlockOpOr();
        */

        /*
        ops[0] = new BlockOpOr();
        ops[1] = new BlockOpAnd();
        */
        ops[0] = new BlockOpMutat();
    }

    public BlockOp  getOp(double inArg)
    {
        int index = (int)Math.floor(inArg * (N_OPS / (PSOConstants.POS_MAX - PSOConstants.POS_MIN)));

        if (index >= N_OPS)
            index = N_OPS - 1;

        return ops[index];
    }
}


text:
using Org.Apache.Reef.Tang.Annotations;
using Org.Apache.Reef.Tang.Formats;
using Org.Apache.Reef.Tang.Interface;

namespace Org.Apache.Reef.Tang.Formats
{
    [DefaultImplementation(typeof(AvroConfigurationSerializer), "default")]
    public interface IConfigurationSerializer
    {
        void ToFileStream(IConfiguration c, string fileName);

        void ToFile(IConfiguration c, string fileName);

        byte[] ToByteArray(IConfiguration c);

        string ToBase64String(IConfiguration c);

        string ToString(IConfiguration c);

        IConfiguration FromFileStream(string fileName);

        IConfiguration FromFile(string fileName);

        IConfiguration FromByteArray(byte[] bytes);

        IConfiguration FromBase64String(string serializedConfig);

        IConfiguration FromString(string josonString);
    }
}


text:
package smartag

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// AddSnatEntry invokes the smartag.AddSnatEntry API synchronously
func (client *Client) AddSnatEntry(request *AddSnatEntryRequest) (response *AddSnatEntryResponse, err error) {
	response = CreateAddSnatEntryResponse()
	err = client.DoAction(request, response)
	return
}

// AddSnatEntryWithChan invokes the smartag.AddSnatEntry API asynchronously
func (client *Client) AddSnatEntryWithChan(request *AddSnatEntryRequest) (<-chan *AddSnatEntryResponse, <-chan error) {
	responseChan := make(chan *AddSnatEntryResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.AddSnatEntry(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// AddSnatEntryWithCallback invokes the smartag.AddSnatEntry API asynchronously
func (client *Client) AddSnatEntryWithCallback(request *AddSnatEntryRequest, callback func(response *AddSnatEntryResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *AddSnatEntryResponse
		var err error
		defer close(result)
		response, err = client.AddSnatEntry(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// AddSnatEntryRequest is the request struct for api AddSnatEntry
type AddSnatEntryRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
	SnatIp               string           `position:"Query" name:"SnatIp"`
	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
	CidrBlock            string           `position:"Query" name:"CidrBlock"`
	SmartAGId            string           `position:"Query" name:"SmartAGId"`
}

// AddSnatEntryResponse is the response struct for api AddSnatEntry
type AddSnatEntryResponse struct {
	*responses.BaseResponse
	RequestId  string `json:"RequestId" xml:"RequestId"`
	InstanceId string `json:"InstanceId" xml:"InstanceId"`
}

// CreateAddSnatEntryRequest creates a request to invoke AddSnatEntry API
func CreateAddSnatEntryRequest() (request *AddSnatEntryRequest) {
	request = &AddSnatEntryRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("Smartag", "2018-03-13", "AddSnatEntry", "smartag", "openAPI")
	request.Method = requests.POST
	return
}

// CreateAddSnatEntryResponse creates a response to parse from AddSnatEntry response
func CreateAddSnatEntryResponse() (response *AddSnatEntryResponse) {
	response = &AddSnatEntryResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
[![Build Status](https://travis-ci.org/aerogear/aerogear-unifiedpush-java-client.png)](https://travis-ci.org/aerogear/aerogear-unifiedpush-java-client)
[![Maven Central](https://img.shields.io/maven-central/v/org.jboss.aerogear/unifiedpush-java-client.svg)](https://search.maven.org/artifact/org.jboss.aerogear/unifiedpush-java-client/)
[![Javadocs](http://www.javadoc.io/badge/org.jboss.aerogear/unifiedpush-java-client.svg?color=blue)](http://www.javadoc.io/doc/org.jboss.aerogear/unifiedpush-java-client)
[![License](https://img.shields.io/badge/-Apache%202.0-blue.svg)](https://opensource.org/s/Apache-2.0)

A Java API for sending Push Notifications to the [AeroGear UnifiedPush Server](https://github.com/aerogear/aerogear-unifiedpush-server).

|                          | Project Info                                            |
| ------------------------ | ------------------------------------------------------- |
| License:                 | Apache License, Version 2.0                             |
| Build:                   | Maven                                                   |
| End User Documentation:  | https://docs.aerogear.org                               |
| Community Documentation: | https://aerogear.org                                    |
| Issue tracker:           | https://issues.jboss.org/browse/AEROGEAR                |
| Mailing lists:           | https://groups.google.com/forum/#!forum/aerogear        |

## Getting started

Add the following dependencies to your ```pom.xml``` file:

```xml
<dependency>
    <groupId>org.jboss.aerogear</groupId>
    <artifactId>unifiedpush-java-client</artifactId>
    <version>1.1.0.Final</version>
</dependency>
```

## Usage

Create a ```JavaSender```:

```java
PushSender defaultPushSender = DefaultPushSender
    .withRootServerURL("<pushServerURL e.g http(s)//host:port/context>")
    .pushApplicationId("<pushApplicationId e.g. 1234456-234320>")
    .masterSecret("<masterSecret e.g. 1234456-234320>")
    .build();
```

You can also use an external config file:

_pushConfig.json_

```json
{
    "serverUrl": "<pushServerURL e.g http(s)//host:port/context>",
    "pushApplicationId": "<pushApplicationId e.g. 1234456-234320>",
    "masterSecret": "<masterSecret e.g. 1234456-234320>"
}
```

And then :

```java
PushSender defaultPushSender = DefaultPushSender
    .withConfig("pushConfig.json")
    .build();
```

To connect via proxy:

```java
PushSender defaultPushSender = DefaultPushSender
    .withConfig("pushConfig.json")
    .proxy("proxy.example.com", 8080)
    .proxyUser("proxyuser")
    .proxyPassword("password")
    .proxyType(Proxy.Type.HTTP)
    .build();

```

To use a custom TrustStore:

```java
PushSender defaultPushSender = DefaultPushSender
    .withConfig("pushConfig.json")
    .customTrustStore("setup/aerogear.truststore", "jks", "aerogear")
    .build();
```

### Send a message

Construct a ```UnifiedMessage``` using the ```Builder``` :

```java
UnifiedMessage unifiedMessage = UnifiedMessage.withCriteria()
    .aliases("john", "maria")
    .message()
        .alert("Hello from Java Sender API!")
        .sound("default")
        // iOS specific
        .badge("1")
        // optional specific to your app
        .userData("some_key", "some_value")
        // optional cordova Android specific attribute (default is appName)
        .userData("title", "Cool Title")
    .build();
```

Create a callback

```java
MessageResponseCallback callback = new MessageResponseCallback() {
    @Override
    public void onComplete() {
        //do cool stuff
    }
};
```

Send the message

```java
defaultPushSender.send(unifiedMessage, callback);
```

You can also omit the callback

```java
defaultPushSender.send(unifiedMessage);
```

## Known issues

On Java7 you might see a ```SSLProtocolException: handshake alert: unrecognized_name``` expection when the UnifiedPush server is running on https. There are a few workarounds:

* JBoss' ```standalone.xml``` configuration file:

```xml
...
</extensions>

<system-properties>
    <property name="jsse.enableSNIExtension" value="false"/>
</system-properties>
```

* in the Java app, that is _using_ the Java Client SDK: ```System.setProperty("jsse.enableSNIExtension", "false");```
* Or via commandline argument: ```-Djsse.enableSNIExtension=false```

## License

 See [LICENSE file](./LICENSE.txt)

## Questions?

Join our [user mailing list](https://groups.google.com/forum/#!forum/aerogear) for any questions or help! We really hope you enjoy app development with AeroGear.

## Found a bug?

If you found a bug please create a ticket for us on [Jira](https://issues.jboss.org/browse/AEROGEAR) with some steps to reproduce it.


text:
package com.github.rvesse.airline.annotations.restrictions;

import static java.lang.annotation.ElementType.FIELD;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * Annotation that marks that an options value must be a valid path to a
 * file/directory
 *
 */
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Target({ FIELD })
public @interface Path {

    /**
     * Gets/Sets whether the given file must exist
     *
     * @return True if it must exist, false otherwise
     */
    public boolean mustExist() default false;

    /**
     * Gets/Sets whether the given file must be writable
     *
     * @return True if must be writable, false otherwise
     */
    public boolean writable() default true;

    /**
     * Gets/Sets whether the given file must be readable
     *
     * @return True if must be readable, false otherwise
     */
    public boolean readable() default true;

    /**
     * Gets/Sets whether the given file must be executable
     *
     * @return True if must be executable, false otherwise
     */
    public boolean executable() default false;

    /**
     * Gets/Sets the kind of file that is expected
     *
     * @return Expected file kind
     */
    public PathKind kind() default PathKind.ANY;
}


text:
from io import BytesIO
import logging

try:
    import requests
    HAVE_REQUESTS = True
except ImportError:
    HAVE_REQUESTS = False

from viper.common.out import bold
from viper.common.abstracts import Module
from viper.core.session import __sessions__
from viper.core.config import __config__

log = logging.getLogger('viper')

cfg = __config__

class Image(Module):
    cmd = 'image'
    description = 'Perform analysis on images'
    authors = ['nex']

    def __init__(self):
        super(Image, self).__init__()
        self.parser.add_argument('-g', '--ghiro', action='store_true', help='Upload the file to imageforensic.org and retrieve report')

    def ghiro(self):
        if not HAVE_REQUESTS:
            self.log('error', "Missing dependency, install requests (`pip install requests`)")
            return

        payload = dict(private='true', json='true')
        files = dict(image=BytesIO(__sessions__.current.file.data))

        response = requests.post('http://www.imageforensic.org/api/submit/', data=payload, files=files,
                                 proxies=cfg.http_client.proxies, verify=cfg.http_client.verify, cert=cfg.http_client.cert)
        results = response.json()

        if results['success']:
            report = results['report']

            if len(report['signatures']) > 0:
                self.log('', bold("Signatures:"))

                for signature in report['signatures']:
                    self.log('item', signature['description'])
            for k, v in report.items():
                if k == 'signatures':
                    continue
                if isinstance(v, dict):
                    for k1, v1 in v.items():
                        self.log('info', '{}: {}'.format(k1, v1))
                else:
                    self.log('info', '{}: {}'.format(k, v))

        else:
            self.log('error', "The analysis failed")

    def run(self):
        super(Image, self).run()
        if self.args is None:
            return

        if not __sessions__.is_set():
            self.log('error', "No open session")
            return

        if self.args.ghiro:
            self.ghiro()
        else:
            self.log('error', 'At least one of the parameters is required')
            self.usage()


text:
<?php namespace Exchange\EWSType; use Exchange\EWSType;
/**
 * Contains EWSType_CalendarItemCreateOrDeleteOperationType.
 */

/**
 * Describes how meeting requests are handled after they are created.
 *
 * @package php-ews\Enumerations
 */
class EWSType_CalendarItemCreateOrDeleteOperationType extends EWSType
{
    /**
     * The meeting request is sent to all attendees but is not saved in the Sent
     * Items folder.
     *
     * @since Exchange 2007
     *
     * @var string
     */
    const SEND_ONLY_TO_ALL = 'SendOnlyToAll';

    /**
     * The meeting request is sent to all attendees and a copy is saved in the
     * folder that is identified by the SavedItemFolderId element.
     *
     * @since Exchange 2007
     *
     * @var string
     */
    const SEND_TO_ALL_AND_SAVE_COPY = 'SendToAllAndSaveCopy';

    /**
     * If the item is a meeting request, it is saved as a calendar item but not
     * sent.
     *
     * @since Exchange 2007
     *
     * @var string
     */
    const SEND_TO_NONE = 'SendToNone';

    /**
     * Element value.
     *
     * @var string
     */
    public $_;

    /**
     * Returns the value of this object as a string.
     *
     * @return string
     */
    public function __toString()
    {
        return $this->_;
    }
}


text:
namespace Albums.Models
{
    using System.ComponentModel.DataAnnotations;

    public class Song
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [MinLength(1)]
        [MaxLength(20)]
        public string Title { get; set; }

        [MinLength(4)]
        [MaxLength(4)]
        public string Year { get; set; }

        [Required]
        [MinLength(3)]
        [MaxLength(20)]
        public string Genre { get; set; }

        public int ArtistId { get; set; }

        public virtual Artist Artist { get; set; }

        public int AlbumId { get; set; }

        public virtual Album Album { get; set; }
    }
}


text:
These are fuzzers designed for use with `libFuzzer` or `afl`. They can
be used to run on Google's OSS-Fuzz (https://github.com/google/oss-fuzz/).

The convention used here is that the initial values for each parser fuzzer
are taken from the $NAME.in directory.

Crash reproducers from OSS-Fuzz are put into $NAME.repro directory for
regression testing with top dir 'make check' or 'make check-valgrind'.

The ./configure runs below are for libidn2.
To test libicu replace 'libidn2' with 'libicu', to test with
libidn replace 'libidn2' by 'libidn'.

# Running a fuzzer using clang

Use the following commands on top dir:
```
export CC=clang-5.0
export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp"
./configure --enable-static --disable-gtk-doc --enable-runtime=libidn2 --enable-builtin=libidn2
make clean
make -j$(nproc)
cd fuzz

# build and run libpsl_fuzzer
./run-clang.sh libpsl_fuzzer
```

# Running a fuzzer using AFL

Use the following commands on top dir:

```
$ CC=afl-clang-fast ./configure --disable-gtk-doc --enable-runtime=libidn2 --enable-builtin=libidn2
$ make -j$(nproc) clean all
$ cd fuzz
$ ./run-afl.sh libpsl_fuzzer
```

# Fuzz code coverage using the corpus directories *.in/

Code coverage reports currently work best with gcc+lcov+genhtml.

In the top directory:
```
CC=gcc CFLAGS="-O0 -g" ./configure --disable-gtk-doc --enable-runtime=libidn2 --enable-builtin=libidn2
make fuzz-coverage
xdg-open lcov/index.html
```

Each fuzzer target has it's own functions to cover, e.g.
`libpsl_fuzzer` covers psl_is_public_suffix.

To work on corpora for better coverage, `cd fuzz` and use e.g.
`./view-coverage.sh libpsl_fuzzer`.

# Enhancing the testsuite for issues found

Each reproducer file should be dropped into the appropriate *.repro/
directory.

# Clang CFI instrumentation
```
CC=clang-5.0 CFLAGS="-B/usr/bin/gold -O0 -fsanitize=cfi -flto -fvisibility=default -fno-sanitize-trap=all" ./configure
make clean
make
make check
```


text:
define(function (require) {
    var $ = require('zepto');
    var customElem = require('customElement').create();

    function init(surla, surlb) {
        if ($('#basic-addon').length > 0) {
            $('#basic-addon').click(function (e) {
                e.stopPropagation();
                e.preventDefault();
                var keyword = $('#keyword').val();
                if (keyword === '') {
                    alert('请输入搜索词');
                    return false;
                }

                window.open(surla + keyword + surlb);
            });
            //
            document.onkeydown = function (e) {
                var ev = document.all ? window.event : e;
                if (ev.keyCode === 13) {
                    $('#basic-addon').click();
                    return false;
                }

            };
        }
    }
    //
    customElem.prototype.firstInviewCallback = function () {
        var element = this.element;
        var surla = $(element).attr('surla');
        var surlb = $(element).attr('surlb');
        init(surla, surlb);
    };
    return customElem;
});


text:
import Link from 'next/link'
import Avatar from '../components/avatar'
import DateComponent from '../components/date'
import CoverImage from '../components/cover-image'

export default function HeroPost({
  title,
  coverImage,
  date,
  excerpt,
  author,
  slug,
}) {
  return (

        <CoverImage title={title} slug={slug} url={coverImage} />

            <Link href={`/posts/${slug}`}>
              {title}
            </Link>

            <DateComponent dateString={date} />

{excerpt}

          {author && <Avatar name={author.name} picture={author.image} />}

  )
}


text:
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Primitives;

namespace Microsoft.AspNetCore.Mvc.Cors;

public class CorsHttpMethodActionConstraintTest
{
    public static TheoryData AcceptCaseInsensitiveData =
        new TheoryData<IEnumerable<string>, string>
        {
                { new string[] { "get", "Get", "GET", "GEt"}, "gEt" },
                { new string[] { "POST", "PoSt", "GEt"}, "GET" },
                { new string[] { "get" }, "get" },
                { new string[] { "post" }, "POST" },
                { new string[] { "gEt" }, "get" },
                { new string[] { "get", "PoST" }, "pOSt" }
        };

    [Theory]
    [MemberData(nameof(AcceptCaseInsensitiveData))]
    public void HttpMethodActionConstraint_Accept_Preflight_CaseInsensitive(IEnumerable<string> httpMethods, string accessControlMethod)
    {
        // Arrange
        var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint;
        var context = CreateActionConstraintContext(constraint);
        context.RouteContext = CreateRouteContext("oPtIoNs", accessControlMethod);

        // Act
        var result = constraint.Accept(context);

        // Assert
        Assert.True(result, "Request should have been accepted.");
    }

    [Fact]
    public void HttpMethodActionConstraint_RejectsOptionsRequest_WithoutAccessControlMethod()
    {
        // Arrange
        var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(new[] { "GET", "Post" })) as IActionConstraint;
        var context = CreateActionConstraintContext(constraint);
        context.RouteContext = CreateRouteContext("oPtIoNs", accessControlMethod: "");

        // Act
        var result = constraint.Accept(context);

        // Assert
        Assert.False(result, "Request should have been rejected.");
    }

    [Theory]
    [MemberData(nameof(AcceptCaseInsensitiveData))]
    public void HttpMethodActionConstraint_Accept_CaseInsensitive(IEnumerable<string> httpMethods, string expectedMethod)
    {
        // Arrange
        var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint;
        var context = CreateActionConstraintContext(constraint);
        context.RouteContext = CreateRouteContext(expectedMethod);

        // Act
        var result = constraint.Accept(context);

        // Assert
        Assert.True(result, "Request should have been accepted.");
    }

    private static ActionConstraintContext CreateActionConstraintContext(IActionConstraint constraint)
    {
        var context = new ActionConstraintContext();

        var actionSelectorCandidate = new ActionSelectorCandidate(new ActionDescriptor(), new List<IActionConstraint> { constraint });

        context.Candidates = new List<ActionSelectorCandidate> { actionSelectorCandidate };
        context.CurrentCandidate = context.Candidates[0];

        return context;
    }

    private static RouteContext CreateRouteContext(string requestedMethod, string accessControlMethod = null)
    {
        var httpContext = new DefaultHttpContext();

        httpContext.Request.Method = requestedMethod;

        if (accessControlMethod != null)
        {
            httpContext.Request.Headers.Add("Origin", StringValues.Empty);
            if (accessControlMethod != string.Empty)
            {
                httpContext.Request.Headers.Add("Access-Control-Request-Method", accessControlMethod);
            }
        }

        var routeContext = new RouteContext(httpContext);
        routeContext.RouteData = new RouteData();

        return routeContext;
    }
}


text:
import jsep from 'jsep/dist/jsep.js';

class ExpressionUtil {
  cachedExprs = {};

  constructor() {
    jsep.addBinaryOp('or',  1);
    jsep.addBinaryOp('and', 2);
  }

  eval(context, expr) {
    if (context == undefined || context == null) {
      return context;
    } else if (context.fd == null || context.fd == undefined) {
      context.fd = this.fd;
    } else if (typeof context.fd != 'function') {
      alert('Dev error - FD is not a function');
      return;
    }

    return new Function('return ' + this.parse(expr)).call(context);
  }

  parse(expr) {
    let parsed = this.cachedExprs[expr];
    if (!parsed) {
      parsed = this.cachedExprs[expr] = this.decorate(jsep(expr));
    }

    return parsed;
  }

  decorate(exprTree) {
    if (exprTree.type == 'BinaryExpression') {
      let left  = this.decorate(exprTree.left);
      let right = this.decorate(exprTree.right);
      let op    = exprTree.operator;
      if (op == 'and') {
        op = '&&';
      } else if (op == 'or') {
        op = '||';
      }

      return '(' + left + ') ' + op + ' (' + right + ')';
    } else if (exprTree.type == 'UnaryExpression') {
      let arg = this.decorate(exprTree.argument);
      if (exprTree.prefix) {
        return exprTree.operator + arg;
      } else {
        return arg + exprTree.operator;
      }
    } else if (exprTree.type == 'MemberExpression') {
      let objectExpr = exprTree.property.name;
      let object = exprTree.object;
      while (object) {
        if (object.type == 'MemberExpression') {
          objectExpr += '.' + object.property.name;
        } else if (object.type == 'Identifier') {
          objectExpr += '.' + object.name;
        }

        object = object.object;
      }

      return 'this.fd(\'' + objectExpr.split('.').reverse().join('.') + '\')';
    } else if (exprTree.type == 'Identifier') {
      return 'this.fd(\'' + exprTree.name + '\')';
    } else if (exprTree.type == 'Literal') {
      return exprTree.raw;
    } else {
      console.log(exprTree);
      console.log('Could not identify the expression type: ' + exprTree.type + ', ' + JSON.stringify(exprTree));
      return JSON.stringify(exprTree);
    }
  }

  fd(name) {
    let object = this;
    if (!name) {
      return object;
    }

    let props = name.split('.');
    for (let i = 0; i < props.length; ++i) {
      if (!object) {
        return undefined;
      }
      object = object[props[i]];
    }

    return object;
  }

  getValue(object, name) {
    if (!name) {
      return object;
    }

    let props = name.split('.');
    for (let i = 0; i < props.length; ++i) {
      if (!object) {
        return undefined;
      }
      object = object[props[i]];
    }

    return object;
  }

  setValue(object, name, value) {
    if (!object || !name) {
      return;
    }

    let props = name.split('.');
    for (let i = 0; i < props.length - 1; ++i) {
      object = object[props[i]] = object[props[i]] || {};
    }

    object[props[props.length - 1]] = value;
  }
}

export default new ExpressionUtil();


text:
using System;
using System.Text;

namespace PasswordRegEx
{
    public class RegExBuilder
    {
        /// <summary>
        /// RegEx that matches strings that have lowercase, uppercase and numeric components.
        /// </summary>
        public const string RegExComponentThreeLowerUpperNumeric = "(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])";
        /// <summary>
        /// RegEx that matches strings that have lowercase, special and numeric components.
        /// </summary>
        public const string RegExComponentThreeLowerNumericSpecial = "(?=.*[a-z])(?=.*[0-9])(?=.*[^a-zA-Z0-9])";
        /// <summary>
        /// RegEx that matches strings that have uppercase, special and numeric components.
        /// </summary>
        public const string RegExComponentThreeUpperNumericSpecial = "(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9])";
        /// <summary>
        /// RegEx that matches strings that have uppercase, lowercase and numeric components.
        /// </summary>
        public const string RegExComponentThreeLowerUpperSpecial = "(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])";
        /// <summary>
        /// RegEx that matches strings that have three-digit consecutive numeric runs.
        /// </summary>
        public const string RegExComponentConsecutiveNumerics = "(012|123|234|345|456|567|678|789|890|098|987|876|765|654|543|432|321|210)";
        /// <summary>
        /// RegEx that matches strings that have three-digit "numberpad" horizontal or vertical runs not already listed in the list of consecutive numerics.
        /// </summary>
        public const string RegExComponentKeypadNumerics = "(147|741|369|963|025|520)";
        /// <summary>
        /// RegEx that contains restricted words.  (Used to build case- and symbol-insensitive RegExComponentRestrictedWords.)
        /// </summary>
        private const string RegExComponentRestrictedWordsRaw = "(admin|nurs)";

        /// <summary>
        /// Returns a RegEx that combines length, complexity and restricted word limitations
        /// </summary>
        public static string RegExCombined(string regExLength, string regExComplexity, string regExRestrictedWords, string regExRepeatedChars)
        {
            //return "(" + "(?=" + RegExLength + ")" + RegExComplexity + ")";
            return
                regExRepeatedChars +
                "(" +
                    "(?=" + regExLength + ")" +
                    regExComplexity +
                    "(^(?!.*" + regExRestrictedWords + "))" +
                ")";
        }

        /// <summary>
        /// Returns a RegEx that combines both case/symbol-insensitive restricted words and restricted numerics.
        /// </summary>
        public static string RegExRestrictedWordsAndNumerics
        {
            get
            {
                // We basically want to "crack off" the paranthesis on the clauses and slam them together
                return "(" +
                    StripParentheses(RegExComponentConsecutiveNumerics) + "|" +
                    StripParentheses(RegExComponentKeypadNumerics) + "|" +
                    StripParentheses(RegExComponentRestrictedWords) +
                    ")";

            }
        }

        /// <summary>
        /// Strips off the leading and trailing parenthesis of a phrase
        /// </summary>
        /// <param name="stringToStrip">A string with leading and trailing paranthesis.</param>
        /// <returns>Stripped string or blank string if it is not in the correct format.</returns>
        public static string StripParentheses(string stringToStrip)
        {
            if (stringToStrip.StartsWith("(") && stringToStrip.EndsWith(")"))
            {
                return stringToStrip.Substring(1, stringToStrip.Length - 2);
            }
            return "";
        }

        /// <summary>
        /// Returns a RegEx that only matches strings with X or fewer of the same character in a row.
        /// </summary>
        /// <param name="repeat">Maximum number of same characters to allow in a row.</param>
        /// <returns>RegEx that only matches strings with [repeat] or fewer of the same character in a row.</returns>
        public static string RexExComponentMaximumCharacterRepeat(int repeat)
        {
            // (?=^(?!.*(.)\1{2}))
            return "(?=^(?!.*(.)\\1{" + repeat + "}))";
        }

        /// <summary>
        /// Returns a RegEx that matches strings of a minimum length.
        /// </summary>
        /// <param name="length">Minimum length to match.</param>
        /// <returns>RegEx that matches strings of a minimum length.</returns>
        public static string RegExComponentMinimumLength(int length)
        {
            if (length < 1 | length > 512)
            {
                throw new ArgumentException("Keep the length between 1 and 512!");
            }
            return ".{" + length + "}";
        }

        /// <summary>
        /// Returns a RegEx that matches three of four complexity rules: lowercase, uppercase, numeric and symbol.
        /// </summary>
        public static string RegExComponentAnyThreeOfFourComplexity
        {
            get
            {
                return "(" +
                    RegExComponentThreeLowerUpperNumeric + "|" +
                       RegExComponentThreeLowerNumericSpecial + "|" +
                       RegExComponentThreeUpperNumericSpecial + "|" +
                       RegExComponentThreeLowerUpperSpecial +
                       ")";
            }
        }

        /// <summary>
        /// Returns a RegEx that matches a list of restricted words.
        /// (This is a case- and symbol-insensitive version of RegExComponentRestrictedWordsRaw.)
        /// </summary>
        public static string RegExComponentRestrictedWords
        {
            get
            {
                var finalregex = new StringBuilder();
                const string alphabet = "abcdefghijklmnopqrstuvwxyz";
                for (int i = 0; i < RegExComponentRestrictedWordsRaw.Length; i++)
                {
                    string oneChar = RegExComponentRestrictedWordsRaw.Substring(i, 1);
                    if (alphabet.Contains(oneChar))
                    {
                        finalregex.Append("[" + oneChar.ToLower() + oneChar.ToUpper());
                        // Map in common numeric and special character replacements
                        switch (oneChar)
                        {
                            case "a":
                                finalregex.Append("@");
                                break;
                            case "i":
                                finalregex.Append("1!");
                                break;
                            case "l":
                                finalregex.Append("17");
                                break;
                            case "o":
                                finalregex.Append("0");
                                break;
                            case "e":
                                finalregex.Append("3");
                                break;
                            case "s":
                                finalregex.Append("5$");
                                break;
                            case "z":
                                finalregex.Append("2");
                                break;
                            case "b":
                                finalregex.Append("8");
                                break;
                        }
                        finalregex.Append("]");

                    }
                    else
                    {
                        finalregex.Append(oneChar);
                    }

                }
                return finalregex.ToString();
            }
        }

    }
}


text:
package org.elasticsearch.search.aggregations.bucket.nested;

import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilderException;

import java.io.IOException;

/**
 *
 */
public class NestedBuilder extends AggregationBuilder<NestedBuilder> {

    private String path;

    public NestedBuilder(String name) {
        super(name, InternalNested.TYPE.name());
    }

    public NestedBuilder path(String path) {
        this.path = path;
        return this;
    }

    @Override
    protected XContentBuilder internalXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        if (path == null) {
            throw new SearchSourceBuilderException("nested path must be set on nested aggregation [" + name + "]");
        }
        builder.field("path", path);
        return builder.endObject();
    }
}


text: RedLibrary is a program written to help musical organizations manage their sheet music libraries.


text:
	/*
  	Flaticon icon font: Flaticon
  	Creation date: 19/08/2017 00:12
  	*/

@font-face {
  font-family: "Flaticon";
  src: url("./Flaticon.eot");
  src: url("./Flaticon.eot?#iefix") format("embedded-opentype"),
       url("./Flaticon.woff") format("woff"),
       url("./Flaticon.ttf") format("truetype"),
       url("./Flaticon.svg#Flaticon") format("svg");
  font-weight: normal;
  font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
  @font-face {
    font-family: "Flaticon";
    src: url("./Flaticon.svg#Flaticon") format("svg");
  }
}

[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {
  font-family: Flaticon;
        font-size: 5;
font-style: normal;
}

.flaticon-sql-file-format-symbol-1:before { content: "\f100"; }
.flaticon-sql-file-format-symbol:before { content: "\f101"; }
.flaticon-github:before { content: "\f102"; }
.flaticon-github-sign:before { content: "\f103"; }
.flaticon-linkedin-logo:before { content: "\f104"; }
.flaticon-technology:before { content: "\f105"; }
.flaticon-microsoft-excel-logo:before { content: "\f106"; }
.flaticon-css-logo:before { content: "\f107"; }