text:
<?php
namespace Sirius\Html;

class Div extends Tag
{
    protected $tag = 'div';

    protected $isSelfClosing = false;
}

class Hr extends Tag
{
    protected $tag = 'hr';

    protected $isSelfClosing = true;
}

class TagTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Div
     */
    protected $element;

    function setUp()
    {
        $this->element = new Div(array(), 'Lorem ipsum...');
    }

    function testAttributeIsSet()
    {
        $this->element->set('name', 'email');
        $this->assertEquals('email', $this->element->get('name'));
    }

    function testAttributeListIsRetrieved()
    {
        $attrs = array(
            'name'  => 'email',
            'value' => 'me@domain.com',
            'id'    => 'form-email'
        );
        $this->element->setProps($attrs);
        $this->assertEquals(array(
            'name'  => 'email',
            'value' => 'me@domain.com'
        ), $this->element->getProps(array(
            'name',
            'value'
        )));
    }

    function testAllAttributesAreRetrieved()
    {
        $attrs = array(
            'name'  => 'email',
            'value' => 'me@domain.com'
        );
        $this->element->setProps($attrs);
        $this->assertEquals($attrs, $this->element->getProps());
    }

    function testAttributeIsUnset()
    {
        $attrs = array(
            'name'  => 'email',
            'value' => 'me@domain.com'
        );
        $this->element->setProps($attrs);
        $this->element->set('value', null);
        $this->assertEquals(array(
            'name' => 'email'
        ), $this->element->getProps());
    }

    function testAttributeNameIsCleaned()
    {
        $this->element->set('@name#', 'name');
        $this->assertEquals(array(
            'name' => 'name'
        ), $this->element->getProps());
    }

    function testAddClass()
    {
        $this->element->addClass('active');
        $this->assertEquals('active', $this->element->get('class'));

        $this->element->addClass('disabled');
        $this->assertEquals('active disabled', $this->element->get('class'));
    }

    function testHasClass()
    {
        $this->element->set('class', 'active disabled even');
        $this->assertTrue($this->element->hasClass('active'));
        $this->assertTrue($this->element->hasClass('disabled'));
        $this->assertTrue($this->element->hasClass('even'));
        $this->assertFalse($this->element->hasClass('xdisabled'));
    }

    function testRemoveClass()
    {
        $this->element->set('class', 'active disabled even');
        $this->element->removeClass('disabled');
        $this->assertFalse($this->element->hasClass('disabled'));
    }

    function testToggleClass()
    {
        $this->assertFalse($this->element->hasClass('active'));
        $this->element->toggleClass('active');
        $this->assertTrue($this->element->hasClass('active'));
        $this->element->toggleClass('active');
        $this->assertFalse($this->element->hasClass('active'));
    }

    function testPreviousContentIsOverwritten()
    {
        $this->element->setContent('cool');
        $this->assertEquals('cool', $this->element->getInnerHtml());
    }

    function testContentArray()
    {
        $this->element->setContent(array(
            'a',
            'b',
            'c'
        ));
        $this->assertEquals('
a' . PHP_EOL . 'b' . PHP_EOL . 'c
', $this->element->render());
    }

    function testRender()
    {
        $this->element->addClass('container');
        $this->assertEquals('
Lorem ipsum...
', (string) $this->element);
        $this->assertEquals('
Lorem ipsum...
', $this->element->render());
    }

    function testWrap()
    {
        $this->element->addClass('container');
        $this->element->after('');
        $this->element->wrap('
', '
');
        $this->assertTrue(strpos($this->element->render(),
                '

Lorem ipsum...
') !== false);
        $this->assertTrue(strpos($this->element->render(), '
') !== false);
    }

    function testAppend()
    {
        $this->element->clearContent();
        $this->element->append('
Article
');
        $this->element->append('Aside');
        $this->assertTrue(strpos($this->element->getInnerHtml(),
                '<article') < strpos($this->element->getInnerHtml(), 'element->clearContent();
        $this->element->prepend('
Article
');
        $this->element->prepend('Aside');
        $this->assertTrue(strpos($this->element->getInnerHtml(),
                '
 strpos($this->element->getInnerHtml(), 'element->set('class', '<weird>"characters"');
        $this->assertEquals('
Lorem ipsum...
',
            (string) $this->element);
    }

    function testEmptyAttribute()
    {
        $this->element->set('class', '');
        $this->assertEquals('
Lorem ipsum...
', (string) $this->element);
    }

    function testNonStringAttribute() {
        $this->element->set('rows', 5);
        $this->assertEquals('
Lorem ipsum...
', (string) $this->element);
    }

    function testSelfClosingTag()
    {
        $this->assertEquals('
', new Hr(array(
            'class' => 'separator'
        )));
    }

    function testFactory()
    {
        $hr = Tag::create('hr/');
        $this->assertEquals('
', $hr->render());

        $h1 = Tag::create('h1', array(), 'Title content');
        $this->assertEquals('
Title content
', $h1->render());
    }
}


text: google-site-verification: google9df0e5c76cf57a56.html

redpajama_set_name: RedPajamaGithub


text:
var getBootstrapColour = function (text) {
    var alphabet = 'abcdefghijklmnopqrstuvwxyz';
    var index = alphabet.indexOf(text.substring(0, 1).toLowerCase());
    if (index < 5) return 'primary';
    if (index < 10) return 'success';
    if (index < 15) return 'info';
    if (index < 20) return 'warning';
    if (index < 26) return 'danger';
};

var getMarkerStyle = function (category) {
    var style = ['red', ''];
    if (category == 'Decorative') style = ['red', 'star'];
    if (category == 'Paving') style = ['darkred', 'road'];
    if (category == 'Figurative') style = ['orange', ''];
    if (category == 'Sculpture') style = ['green', 'object-align-bottom'];
    if (category == 'Abstract') style = ['darkgreen', 'question-sign'];
    if (category == 'Church Art') style = ['blue', 'institution'];
    if (category == 'Painting') style = ['purple', 'picture'];
    if (category == 'Other') style = ['darkpuple', 'flash'];
    if (category == 'Mural') style = ['cadetblue', 'users'];
    if (category == 'Photography') style = ['cadetblue', 'camera'];
    if (category == 'Drawing') style = ['cadetblue', 'pencil'];
    if (category == 'Mosaic') style = ['cadetblue', 'th'];
    if (category == 'Street furniture') style = ['cadetblue', 'road'];
    if (category == 'Surrealist') style = ['cadetblue', 'eye-open'];
    return style;
};

var currentRef = null;

var imagesMoreDetails = function (ref) {
    event.preventDefault ? event.preventDefault() : (event.returnValue = false);
    currentRef = ref;
    // Hide the images modal.
    $('.modal').modal('hide');
    // And show the relevant images modal.
    $('#itemDetails').modal();
    return false;
};

$(function () {

    //////////////////
    // LIGHTBOX setup
    //////////////////
    $(document).delegate('*[data-toggle="lightbox"]', 'click', function (event) {
        event.preventDefault();
        $(this).ekkoLightbox();
    });

    $('#btnModalImages').on('click', function () {
        // Hide the details modal.
        $('#itemDetails').modal('hide');
        // And show the relevant detail.
        $('#btnImg1' + currentRef).ekkoLightbox();

    });

    ///////////////////////////////////////////////////////////
    // Event: Show modal.
    // On clicking the item it should launch the item modal
    // and call the datastore to get the item detail.
    ///////////////////////////////////////////////////////////
    $('#itemDetails').on('show.bs.modal', function (e) {

        // Clear the existing modal
        $('.modal-title').not('.modal-loading').text('');
        $('#divTabContent #details').empty();
        $('#divTabContent #measurements').empty();
        $('#ulArtists').empty();
        $('#divCategories').empty();
        $('#divTabContent div[id^=artist]').remove();
        $('#divTabContent #hLocation').text();

        // Show the loader
        $('.modal-loading').show();
        $('a[href="#details"]').tab('show');

        if (e && e.relatedTarget) {
            var id = $(e.relatedTarget).data('id');
            currentRef = id;
        }

        PublicArt.getItem(currentRef, function () {

            // The artists display
            if (PublicArt.dataset[currentRef].artists) {
                $.each(PublicArt.dataset[currentRef].artists, function (key, val) {
                    $('#ulArtists').append('
' + val.name + '

');
                    $('#divTabContent').append('

' + (val.name ? val.name : '') + (val.startdate ? ' (' + val.startdate + '-' : '') + (val.enddate ? val.enddate + ' )' : '') + '
' + (val.website ? '
' + val.website + '
' : '') + '
' + (val.biography ? val.biography : '') + '

');
                });
            }

            // The title (incl date).
            $('.modal-title').not('.modal-loading').text((PublicArt.dataset[currentRef].date ? PublicArt.dataset[currentRef].date + ' - ' : '') + PublicArt.dataset[currentRef].title);

            // The categories labels
            if (PublicArt.dataset[currentRef].categories) {
                $.each(PublicArt.dataset[currentRef].categories, function (key, cat) {
                    $('#divCategories').append('' + cat + ' ');
                });
            }

            // The main details tab.
            if (PublicArt.dataset[currentRef].description) $('#divTabContent #details').append('
Description

' + PublicArt.dataset[currentRef].description + '
');
            if (PublicArt.dataset[currentRef].history) $('#divTabContent #details').append('
History

' + PublicArt.dataset[currentRef].history + '
');
            if (PublicArt.dataset[currentRef].unveilingyear) $('#divTabContent #details').append('
Unveiling

' + PublicArt.dataset[currentRef].unveilingyear + (PublicArt.dataset[currentRef].unveilingdetails ? ', ' + PublicArt.dataset[currentRef].unveilingdetails : '') + '
');
            if (PublicArt.dataset[currentRef].statement) $('#divTabContent #details').append('
Artist statement

' + PublicArt.dataset[currentRef].statement + '
');

            // The location tab.
            if (PublicArt.dataset[currentRef].address) $('#divTabContent #location #pLocation').text(PublicArt.dataset[currentRef].address);

            // The physical details tab.
            if (PublicArt.dataset[currentRef].inscription) $('#divTabContent #measurements').append('
Inscription

' + PublicArt.dataset[currentRef].inscription + '
');
            if (PublicArt.dataset[currentRef].material) $('#divTabContent #measurements').append('
Material

' + PublicArt.dataset[currentRef].material + '
');

            // The measurements
            var dimensionsTable = '

Height (cm)	Width (cm)	Depth (cm)	Diameter (cm)

' + PublicArt.dataset[currentRef].height + '	' + (PublicArt.dataset[currentRef].width ? PublicArt.dataset[currentRef].width : '') + '	' + (PublicArt.dataset[currentRef].depth ? PublicArt.dataset[currentRef].depth : '') + '	' + (PublicArt.dataset[currentRef].diameter ? PublicArt.dataset[currentRef].diameter : '') + '

';
            $('#divTabContent #measurements').append('
Measurements
' + dimensionsTable);
            // To do: would quite like to do some graphical representation showing the dimensions

            $('.modal-loading').hide();
        });
    });
});


text:
package org.assertj.core.api;

import static org.assertj.core.api.Assertions.assertThat;

import java.net.MalformedURLException;
import java.net.URL;

import org.junit.BeforeClass;
import org.junit.Test;

public class Assertions_assertThat_with_URL_Test {

  private static URL url;

  @BeforeClass
  public static void beforeClass() throws MalformedURLException {
    url = new URL("http://www.helloworld.org:8080/pages");
  }

  @Test
  public void should_create_Assert() {
    AbstractUrlAssert<?> assertions = Assertions.assertThat(url);
    assertThat(assertions).isNotNull();
  }

  @Test
  public void should_pass_actual() {
    AbstractUrlAssert<?> assertions = Assertions.assertThat(url);
    assertThat(assertions.actual).isSameAs(url);
  }

}


text:
package oauth2clientauthextension

import (
	"context"
	"testing"

	"github.com/stretchr/testify/assert"
	"go.opentelemetry.io/collector/component"
	"go.opentelemetry.io/collector/component/componenttest"
	"go.opentelemetry.io/collector/config"
)

func TestCreateDefaultConfig(t *testing.T) {
	// prepare and test
	expected := &Config{
		ExtensionSettings: config.NewExtensionSettings(component.NewID(typeStr)),
	}

	// test
	cfg := createDefaultConfig()

	// verify
	assert.Equal(t, expected, cfg)
	assert.NoError(t, componenttest.CheckConfigStruct(cfg))
}

func TestCreateExtension(t *testing.T) {
	cfg := createDefaultConfig().(*Config)

	tests := []struct {
		name        string
		settings    *Config
		shouldError bool
		expectedErr error
	}{
		{
			name: "valid_settings",
			settings: &Config{
				ClientID:     "testclientid",
				ClientSecret: "testsecret",
				TokenURL:     "https://example.com/v1/token",
				Scopes:       []string{"resource.read"},
			},
			shouldError: false,
		},
		{
			name: "invalid_client_settings_should_error",
			settings: &Config{
				ClientID: "testclientid",
				TokenURL: "https://example.com/v1/token",
				Scopes:   []string{"resource.read"},
			},
			shouldError: true,
		},
	}

	for _, testcase := range tests {
		t.Run(testcase.name, func(t *testing.T) {
			cfg.ClientID = testcase.settings.ClientID
			cfg.ClientSecret = testcase.settings.ClientSecret
			cfg.TokenURL = testcase.settings.TokenURL
			cfg.Scopes = testcase.settings.Scopes
			ext, err := createExtension(context.Background(), componenttest.NewNopExtensionCreateSettings(), cfg)
			if testcase.shouldError {
				assert.Error(t, err)
				assert.Nil(t, ext)
			} else {
				assert.Nil(t, err)
				assert.NotNil(t, ext)
			}
		})
	}
}

func TestNewFactory(t *testing.T) {
	f := NewFactory()
	assert.NotNil(t, f)
}


text:
'use strict';

// Projects controller
angular.module('projects').controller('PagesController', ['$rootScope', '$scope', '$stateParams', '$location', '$http', 'Projects', 'Pages',
	function($rootScope, $scope, $stateParams, $location, $http, Projects, Pages) {

		$scope.get_pageInfo = function(){
			$scope.pageinfos = Pages.get($stateParams);
			$scope.tabledata = {};
  			$scope.listdatas = {};
			};

		$scope.templateUrl = function(ttype) {
    		var url = "/modules/projects/views/subPage-"+ttype+".html";
  			return url;
  			};

  		$scope.data_init = function(subname){
			//$scope.datas = Pages.get({'subname':subname, 'projectId':$stateParams.projectId});

			if(subname=='samples'){
				$scope.tabledata['samples'] = [{'name':'MT01', 'species':'hg19', 'sampleSource':'Mel', 'tags':'Mel'},{'name':'MT02', 'species':'hg19', 'sampleSource':'Mel', 'tags':'Mel'},
								{'name':'MT03', 'species':'hg19', 'sampleSource':'Mel', 'tags':'Mel'},{"name":"", "species":"", "sampleSource":"", "tags":""},
								{"name":"", "species":"", "sampleSource":"", "tags":""},{"name":"", "species":"", "sampleSource":"", "tags":""},{"name":"", "species":"", "sampleSource":"", "tags":""}];
				};
			if(subname=='files'){
				$scope.tabledata['files'] = [{'sample':'MT01','filetag':'fq1','path':'/data/project01/datas/MT01.fq1.gz','method':'HISEQ'},
									{'sample':'MT01','filetag':'fq2','path':'/data/project01/datas/MT01.fq2.gz','method':'HISEQ'},
									{'sample':'MT02','filetag':'fq1','path':'/data/project01/datas/MT02.fq1.gz','method':'HISEQ'},
									{'sample':'MT02','filetag':'fq2','path':'/data/project01/datas/MT02.fq2.gz','method':'HISEQ'},
									{'sample':'MT03','filetag':'fq1','path':'/data/project01/datas/MT03.fq1.gz','method':'HISEQ'},
									{'sample':'MT03','filetag':'fq2','path':'/data/project01/datas/MT03.fq2.gz','method':'HISEQ'}
							]
				};

			$scope.listdatas[subname] = Pages.get({'subname':subname, 'projectId':$stateParams.projectId});
			$scope.listdatas[subname].$promise.then(function (result) {
   				var temp = [];
   				for (var i = 0; i < result[subname].length; i++){
   						if(result[subname][i].name || result[subname][i].sample){
   						temp.push(result[subname][i]);}
   					}
   				$scope.listdatas[subname] = temp;
   				console.log(temp);
				});
			console.log($scope.listdatas);
			};

		$scope.push2array = function(subname){
			var datas = [];
			console.log($scope.tabledata[subname]);
			for (var i = 0; i < $scope.tabledata[subname].length; i++){
				if($scope.tabledata[subname][i].name || $scope.tabledata[subname][i].sample){
					datas.push($scope.tabledata[subname][i]);
				}
			}
			console.log(datas);

			var addinfo = new Pages ({
				'projectId' : $stateParams.projectId,
				'subname' : subname,
				'adddata' : datas
			});

			addinfo.$save(function(response) {
                console.log(response);
            }, function(errorResponse) {
                $scope.error = errorResponse.data.message;
            });

            $scope.listdatas[subname] = Pages.get({'subname':subname, 'projectId':$stateParams.projectId});
			$scope.listdatas[subname].$promise.then(function (result) {
   				var temp = [];
   				for (var i = 0; i < result[subname].length; i++){
   						if(result[subname][i].name || result[subname][i].sample){
   						temp.push(result[subname][i]);}
   					}
   				$scope.listdatas[subname] = temp;
				});
			};

		$scope.tophat = function(){
			console.log('TTTTTTTT');
			$scope.listdatas['tophat'] = [
				{'sample':'MT01','filetag':'tophat','path':'/data/project01/datas/MT01.bam','method':'tophat /data/project01/datas/MT01.fq1.gz /data/project01/datas/MT01.fq2.gz'},
				{'sample':'MT02','filetag':'tophat','path':'/data/project01/datas/MT01.bam','method':'tophat /data/project01/datas/MT02.fq1.gz /data/project01/datas/MT02.fq2.gz'},
				{'sample':'MT03','filetag':'tophat','path':'/data/project01/datas/MT01.bam','method':'tophat /data/project01/datas/MT03.fq1.gz /data/project01/datas/MT03.fq2.gz'}
			];
			$scope.$apply();
			console.log($scope.listdatas['tophat']);
 		};
	}
]).controller('TABLE_ADD_Controller', ['$rootScope', '$scope', '$stateParams', '$location', '$http', 'Projects', 'Pages',
	function($rootScope, $scope, $stateParams, $location, $http, Projects, Pages) {
	}
]);


text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.dataproc.model;

/**
 * A Dataproc job for running Apache SparkR (https://spark.apache.org/docs/latest/sparkr.html)
 * applications on YARN.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Dataproc API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class SparkRJob extends com.google.api.client.json.GenericJson {

  /**
   * Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and
   * tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> archiveUris;

  /**
   * Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that
   * can be set as job properties, since a collision may occur that causes an incorrect job
   * submission.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> args;

  /**
   * Optional. HCFS URIs of files to be copied to the working directory of R drivers and distributed
   * tasks. Useful for naively parallel tasks.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> fileUris;

  /**
   * Optional. The runtime log config for job execution.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LoggingConfig loggingConfig;

  /**
   * Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String mainRFileUri;

  /**
   * Optional. A mapping of property names to values, used to configure SparkR. Properties that
   * conflict with values set by the Dataproc API may be overwritten. Can include properties set in
   * /etc/spark/conf/spark-defaults.conf and classes in user code.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.String> properties;

  /**
   * Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and
   * tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getArchiveUris() {
    return archiveUris;
  }

  /**
   * Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and
   * tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.
   * @param archiveUris archiveUris or {@code null} for none
   */
  public SparkRJob setArchiveUris(java.util.List<java.lang.String> archiveUris) {
    this.archiveUris = archiveUris;
    return this;
  }

  /**
   * Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that
   * can be set as job properties, since a collision may occur that causes an incorrect job
   * submission.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getArgs() {
    return args;
  }

  /**
   * Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that
   * can be set as job properties, since a collision may occur that causes an incorrect job
   * submission.
   * @param args args or {@code null} for none
   */
  public SparkRJob setArgs(java.util.List<java.lang.String> args) {
    this.args = args;
    return this;
  }

  /**
   * Optional. HCFS URIs of files to be copied to the working directory of R drivers and distributed
   * tasks. Useful for naively parallel tasks.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getFileUris() {
    return fileUris;
  }

  /**
   * Optional. HCFS URIs of files to be copied to the working directory of R drivers and distributed
   * tasks. Useful for naively parallel tasks.
   * @param fileUris fileUris or {@code null} for none
   */
  public SparkRJob setFileUris(java.util.List<java.lang.String> fileUris) {
    this.fileUris = fileUris;
    return this;
  }

  /**
   * Optional. The runtime log config for job execution.
   * @return value or {@code null} for none
   */
  public LoggingConfig getLoggingConfig() {
    return loggingConfig;
  }

  /**
   * Optional. The runtime log config for job execution.
   * @param loggingConfig loggingConfig or {@code null} for none
   */
  public SparkRJob setLoggingConfig(LoggingConfig loggingConfig) {
    this.loggingConfig = loggingConfig;
    return this;
  }

  /**
   * Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
   * @return value or {@code null} for none
   */
  public java.lang.String getMainRFileUri() {
    return mainRFileUri;
  }

  /**
   * Required. The HCFS URI of the main R file to use as the driver. Must be a .R file.
   * @param mainRFileUri mainRFileUri or {@code null} for none
   */
  public SparkRJob setMainRFileUri(java.lang.String mainRFileUri) {
    this.mainRFileUri = mainRFileUri;
    return this;
  }

  /**
   * Optional. A mapping of property names to values, used to configure SparkR. Properties that
   * conflict with values set by the Dataproc API may be overwritten. Can include properties set in
   * /etc/spark/conf/spark-defaults.conf and classes in user code.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.String> getProperties() {
    return properties;
  }

  /**
   * Optional. A mapping of property names to values, used to configure SparkR. Properties that
   * conflict with values set by the Dataproc API may be overwritten. Can include properties set in
   * /etc/spark/conf/spark-defaults.conf and classes in user code.
   * @param properties properties or {@code null} for none
   */
  public SparkRJob setProperties(java.util.Map<String, java.lang.String> properties) {
    this.properties = properties;
    return this;
  }

  @Override
  public SparkRJob set(String fieldName, Object value) {
    return (SparkRJob) super.set(fieldName, value);
  }

  @Override
  public SparkRJob clone() {
    return (SparkRJob) super.clone();
  }

}


text:
'use strict';

import app from '../..';
import User from './user.model';
var user;
var genUser = function() {
  user = new User({
    provider: 'local',
    name: 'Fake User',
    email: 'test@example.com',
    password: 'password'
  });
  return user;
};

describe('User Model', function() {
  before(function() {
    // Clear users before testing
    return User.remove();
  });

  beforeEach(function() {
    genUser();
  });

  afterEach(function() {
    return User.remove();
  });

  it('should begin with no users', function() {
    return User.find({}).exec().should
      .eventually.have.length(0);
  });

  it('should fail when saving a duplicate user', function() {
    return user.save()
      .then(function() {
        var userDup = genUser();
        return userDup.save();
      }).should.be.rejected;
  });

  describe('#email', function() {
    it('should fail when saving without an email', function() {
      user.email = '';
      return user.save().should.be.rejected;
    });
  });

  describe('#password', function() {
    beforeEach(function() {
      return user.save();
    });

    it('should authenticate user if valid', function() {
      user.authenticate('password').should.be.true;
    });

    it('should not authenticate user if invalid', function() {
      user.authenticate('blah').should.not.be.true;
    });

    it('should remain the same hash unless the password is updated', function() {
      user.name = 'Test User';
      return user.save()
        .then(function(u) {
          return u.authenticate('password');
        }).should.eventually.be.true;
    });
  });

});


text:
<?php

/**
 * @namespace
 */
namespace ZendTest\Db\Select;

/**
 * @category   Zend
 * @package    Zend_Db
 * @subpackage UnitTests
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @group      Zend_Db
 * @group      Zend_Db_Select
 */
class PdoMssqlTest extends AbstractTest
{

    public function setup()
    {
        $this->markTestSkipped('This suite is skipped until Zend\DB can be refactored.');
    }

    public function testSelectFromQualified()
    {
        $this->markTestIncomplete($this->getDriver() . ' needs more syntax for qualified table names.');
    }

    public function testSelectJoinQualified()
    {
        $this->markTestIncomplete($this->getDriver() . ' needs more syntax for qualified table names.');
    }

    public function getDriver()
    {
        return 'Pdo\Mssql';
    }

}


text:
<roundcube:object name="doctype" value="html5" />

<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />

<roundcube:include file="/includes/header.html" />

<roundcube:include file="/includes/settingstabs.html" />

<roundcube:label name="managesieve.filtersets" />

  <roundcube:object name="filtersetslist" id="filtersetslist" class="listing" cellspacing="0" summary="Filters list" type="list" noheader="true" />

  <roundcube:button command="plugin.managesieve-setadd" type="link" title="managesieve.filtersetadd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtersetmenulink" id="filtersetmenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtersetmenu');return false" innerClass="inner" content="&#9881" />

<roundcube:label name="managesieve.filters" />

  <roundcube:object name="filterslist" id="filterslist" class="listing" cellspacing="0" summary="Filters list" noheader="true" />

  <roundcube:button command="plugin.managesieve-add" type="link" title="managesieve.filteradd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtermenulink" id="filtermenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtermenu');return false" innerClass="inner" content="&#9881" />

  <roundcube:object name="filterframe" id="filter-frame" style="width:100%; height:96%" frameborder="0" src="/watermark.html" />
  <roundcube:object name="message" id="message" class="statusbar" />

<roundcube:button command="plugin.managesieve-setact" label="managesieve.enable" classAct="active" />

<roundcube:button command="plugin.managesieve-setdel" label="delete" classAct="active" />

<roundcube:button command="plugin.managesieve-setget" label="download" classAct="active" />

    <roundcube:container name="filtersetoptions" id="filtersetmenu" />

<roundcube:button command="plugin.managesieve-act" label="managesieve.enable" classAct="active" />

<roundcube:button command="plugin.managesieve-del" label="delete" classAct="active" />

    <roundcube:container name="filteroptions" id="filtermenu" />

<roundcube:include file="/includes/footer.html" />


text:
<!-- Aurelia expects a template for each route.
We don't actuall need a template for logging out,
but we provide an empty one to not get any errors -->
<template></template>


text:
This file is used to list changes made in each version of the motd-tail cookbook.

## Unreleased

## 5.2.3 - *2022-02-08*

- Remove delivery folder

## 5.2.2 - *2021-08-31*

- Standardise files with files in sous-chefs/repo-management

## 5.2.1 - *2021-06-01*

- Standardise files with files in sous-chefs/repo-management

## 5.2.0 - *2021-02-26*

- Sous Chefs Adoption
- Cookstyle fixes

## 5.1.0 (2017-08-09)

- Added template cookbook property, updated readme and spec tests

## 5.0.2 (2017-07-14)

- changed name of update-motd.d script, script is not run with underscore in name on canonical 14.04 and 16.04 default images

## 5.0.1 (2017-04-26)

- Update apache2 license string

## 5.0.0 (2017-02-27)

- Require Chef 12.5+ and remove compat_resource dep

## 4.1.0 (2017-01-18)

- Update chef requirement in the readme
- Show policy group/name when using policyfiles
- Fix deprecation warning
- Remove superfluous converge_by
- Convert to a custom resource
- Support Ubuntu 14.04+

## 4.0.1 (2016-09-08)

- Fix specs and matcher

## 4.0.0 (2016-09-07)

- Resolve rubocop warning
- Testing updates
- Require Chef 12+

## v3.0.0 (2015-10-20)

- Updated .gitignore file
- Removed Cheffile
- Updated Test Kitchen for the new format and modern Linux distros
- Added Chef standard Rubocop config
- Added testing in Travis CI
- Added a Berksfile
- Updated contributing and testing docs
- Added maintainers.md and maintainers.toml files
- Added Travis and cookbook version badges to the readme
- Removed Chef 10 backwards compatibility
- Expanded the requirements section in the readme and clarify the minimum supported Chef release is 11
- Updated Opscode -> Chef Software
- Added a Rakefile for simplified testing
- Added a Chefignore file
- Resolved Rubocop warnings
- Added long_description to the metadata
- Added source_url and issues_url to the metadata
- Added basic Chefspec convergence test

## v2.0.2 (2014-04-09)

- # 7 - Fix wrong cookbook name in template source parameter

## v2.0.0 (2014-03-18)

- Refactored into a library cookbook to allow template replacement

## v1.2.2 (2014-03-18)

- [COOK-4434] - remove timestamp from template to prevent a change every Chef run

## v1.2.0

- [COOK-2089] - Add the ability to add additional text to motd

## v1.1.0

- [COOK-1387] - additional data for MOTD

## v1.0.0

- Initial public release.


text:
'use strict';

describe('myApp', function() {

  /**
   *  User list
   */
  describe('User list view', function() {

    // setup
    beforeEach(function() {
      browser.get('app/index.html');
    });

    // ## test
    it('should filter the user list as user types into the search box', function() {

      var users  = element.all(by.repeater('user in users'));
      var search = element(by.model('search'));

      expect(users.count()).toBe(10);

      search.sendKeys('teddy');
      expect(users.count()).toBe(1);

      search.clear();
      search.sendKeys('abe');
      expect(users.count()).toBe(1);
    });

  });
});


text:
// <auto-generated />
using BackEnd.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using System;

namespace BackEnd.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    [Migration("20170609012038_initial")]
    partial class initial
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
            modelBuilder
                .HasAnnotation("ProductVersion", "2.0.0-preview1-24937")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("BackEnd.Data.Attendee", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("EmailAddress")
                        .HasMaxLength(256);

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.Property<string>("UserName")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.HasKey("ID");

                    b.ToTable("Attendees");
                });

            modelBuilder.Entity("BackEnd.Data.Conference", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.HasKey("ID");

                    b.ToTable("Conferences");
                });

            modelBuilder.Entity("BackEnd.Data.ConferenceAttendee", b =>
                {
                    b.Property<int>("ConferenceID");

                    b.Property<int>("AttendeeID");

                    b.HasKey("ConferenceID", "AttendeeID");

                    b.HasIndex("AttendeeID");

                    b.ToTable("ConferenceAttendee");
                });

            modelBuilder.Entity("BackEnd.Data.Session", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Abstract")
                        .HasMaxLength(4000);

                    b.Property<int?>("AttendeeID");

                    b.Property<int>("ConferenceID");

                    b.Property<DateTimeOffset?>("EndTime");

                    b.Property<DateTimeOffset?>("StartTime");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.Property<int?>("TrackId");

                    b.HasKey("ID");

                    b.HasIndex("AttendeeID");

                    b.HasIndex("ConferenceID");

                    b.HasIndex("TrackId");

                    b.ToTable("Sessions");
                });

            modelBuilder.Entity("BackEnd.Data.SessionSpeaker", b =>
                {
                    b.Property<int>("SessionId");

                    b.Property<int>("SpeakerId");

                    b.HasKey("SessionId", "SpeakerId");

                    b.HasIndex("SpeakerId");

                    b.ToTable("SessionSpeaker");
                });

            modelBuilder.Entity("BackEnd.Data.SessionTag", b =>
                {
                    b.Property<int>("SessionID");

                    b.Property<int>("TagID");

                    b.HasKey("SessionID", "TagID");

                    b.HasIndex("TagID");

                    b.ToTable("SessionTag");
                });

            modelBuilder.Entity("BackEnd.Data.Speaker", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Bio")
                        .HasMaxLength(4000);

                    b.Property<int?>("ConferenceID");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.Property<string>("WebSite")
                        .HasMaxLength(1000);

                    b.HasKey("ID");

                    b.HasIndex("ConferenceID");

                    b.ToTable("Speakers");
                });

            modelBuilder.Entity("BackEnd.Data.Tag", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(32);

                    b.HasKey("ID");

                    b.ToTable("Tags");
                });

            modelBuilder.Entity("BackEnd.Data.Track", b =>
                {
                    b.Property<int>("TrackID")
                        .ValueGeneratedOnAdd();

                    b.Property<int>("ConferenceID");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(200);

                    b.HasKey("TrackID");

                    b.HasIndex("ConferenceID");

                    b.ToTable("Tracks");
                });

            modelBuilder.Entity("BackEnd.Data.ConferenceAttendee", b =>
                {
                    b.HasOne("BackEnd.Data.Attendee", "Attendee")
                        .WithMany("ConferenceAttendees")
                        .HasForeignKey("AttendeeID")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("BackEnd.Data.Conference", "Conference")
                        .WithMany("ConferenceAttendees")
                        .HasForeignKey("ConferenceID")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("BackEnd.Data.Session", b =>
                {
                    b.HasOne("BackEnd.Data.Attendee")
                        .WithMany("Sessions")
                        .HasForeignKey("AttendeeID");

                    b.HasOne("BackEnd.Data.Conference", "Conference")
                        .WithMany("Sessions")
                        .HasForeignKey("ConferenceID")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("BackEnd.Data.Track", "Track")
                        .WithMany("Sessions")
                        .HasForeignKey("TrackId");
                });

            modelBuilder.Entity("BackEnd.Data.SessionSpeaker", b =>
                {
                    b.HasOne("BackEnd.Data.Session", "Session")
                        .WithMany("SessionSpeakers")
                        .HasForeignKey("SessionId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("BackEnd.Data.Speaker", "Speaker")
                        .WithMany("SessionSpeakers")
                        .HasForeignKey("SpeakerId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("BackEnd.Data.SessionTag", b =>
                {
                    b.HasOne("BackEnd.Data.Session", "Session")
                        .WithMany("SessionTags")
                        .HasForeignKey("SessionID")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("BackEnd.Data.Tag", "Tag")
                        .WithMany("SessionTags")
                        .HasForeignKey("TagID")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("BackEnd.Data.Speaker", b =>
                {
                    b.HasOne("BackEnd.Data.Conference")
                        .WithMany("Speakers")
                        .HasForeignKey("ConferenceID");
                });

            modelBuilder.Entity("BackEnd.Data.Track", b =>
                {
                    b.HasOne("BackEnd.Data.Conference", "Conference")
                        .WithMany("Tracks")
                        .HasForeignKey("ConferenceID")
                        .OnDelete(DeleteBehavior.Cascade);
                });
        }
    }
}


text:
package org.openengsb.core.ekb.transformation.wonderland.internal.operation;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.openengsb.core.ekb.api.transformation.TransformationOperationException;

/**
 * The split operation operation maps keys to values. Every value to be mapped is a key in the parameter map and the
 * value to this key defines the mapped value. If there is no mapping defined for the given value, a
 * TransformationOperationException is thrown.
 */
public class MapOperation extends AbstractStandardTransformationOperation {

    public MapOperation(String operationName) {
        super(operationName, MapOperation.class);
    }

    @Override
    public String getOperationDescription() {
        return theOperation().does("maps keys to values. Every key is a key in the parameter map and ")
            .cnt("the value to this key defines the mapped value.").toString();
    }

    @Override
    public Integer getOperationInputCount() {
        return 1;
    }

    @Override
    public Map<String, String> getOperationParameterDescriptions() {
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put("any parameter", "Put a key value pair for every mapping you want in the parameters.");
        return parameters;
    }

    @Override
    public Object performOperation(List<Object> input, Map<String, String> parameters)
        throws TransformationOperationException {
        checkInputSize(input);
        Object value = parameters.get(input.get(0));
        if (value == null) {
            throw new TransformationOperationException("For the given key is no mapping defined");
        }
        return value;
    }
}


text:
@protocol RecipeAddDelegate;
@class Recipe;

@interface RecipeAddViewController : UIViewController <UITextFieldDelegate>

@property(nonatomic, retain) Recipe *recipe;
@property(nonatomic, retain) IBOutlet UITextField *nameTextField;
@property(nonatomic, weak) id <RecipeAddDelegate> delegate;

- (void)save;
- (void)cancel;

@end

@protocol RecipeAddDelegate <NSObject>
// recipe == nil on cancel
- (void)recipeAddViewController:(RecipeAddViewController *)recipeAddViewController didAddRecipe:(Recipe *)recipe;

@end


text:
package com.sinacloud.scs.event;

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

import com.sinacloud.scs.internal.SdkFilterInputStream;

/**
 * Simple InputStream wrapper that occasionally notifies a progress listener
 * about the number of bytes transferred.
 * <p>
 * This class could be used for both Amazon S3 and Amazon Glacier clients. The
 * legacy Amazon Amazon S3
 * com.amazonaws.services.s3.internal.ProgressReportingInputStream has been
 * deprecated in favor of this new class.
 * </p>
 */
public class ProgressReportingInputStream extends SdkFilterInputStream {

    /** The threshold of bytes between notifications. */
    private static final int NOTIFICATION_THRESHOLD = 8 * 1024;

    /** The listener callback executor */
    private final ProgressListenerCallbackExecutor listenerCallbackExecutor;

    /** The number of bytes read that the listener hasn't been notified about yet. */
    private int unnotifiedByteCount;

    /** True if this stream should fire a completed progress event when the stream runs out. */
    private boolean fireCompletedEvent;

    /**
     * Creates a new progress reporting input stream that simply wraps the
     * specified input stream and uses the specified listener callback executor to
     * asynchronously notify the listener about the number of bytes transferred.
     *
     * @param in
     *            The input stream to wrap.
     * @param listenerCallbackExecutor
     *            The listener callback executor that wraps the listener to notify about progress.
     */
    public ProgressReportingInputStream(final InputStream in, final ProgressListenerCallbackExecutor listenerCallbackExecutor) {
        super(in);
        this.listenerCallbackExecutor = listenerCallbackExecutor;
    }

    /**
     * Sets whether this input stream should fire an event with code
     * {@link ProgressEvent#COMPLETED_EVENT_CODE} when this stream runs out of
     * data. By default, completed events are not fired by this stream.
     *
     * @param fireCompletedEvent
     *            Whether this input stream should fire an event to indicate
     *            that the stream has been fully read.
     */
    public void setFireCompletedEvent(boolean fireCompletedEvent) {
        this.fireCompletedEvent = fireCompletedEvent;
    }

    /**
     * Returns whether this input stream should fire an event with code
     * {@link ProgressEvent#COMPLETED_EVENT_CODE} when this stream runs out of
     * data. By default, completed events are not fired by this stream.
     *
     * @return Whether this input stream should fire an event to indicate that
     *         the stream has been fully read.
     */
    public boolean getFireCompletedEvent() {
        return fireCompletedEvent;
    }

    @Override
    public int read() throws IOException {
        int data = super.read();
        if (data == -1) {
            notifyCompleted();
        } else {
            notify(1);
        }
        return data;
    }

    @Override
    public void reset() throws IOException {
        super.reset();
        ProgressEvent event = new ProgressEvent(unnotifiedByteCount);
        event.setEventCode(ProgressEvent.RESET_EVENT_CODE);
        listenerCallbackExecutor.progressChanged(event);
        unnotifiedByteCount = 0;
    }

    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        int bytesRead = super.read(b, off, len);
        if (bytesRead == -1) notifyCompleted();
        if (bytesRead != -1) notify(bytesRead);
        return bytesRead;
    }

    @Override
    public void close() throws IOException {
        if (unnotifiedByteCount > 0) {
            listenerCallbackExecutor.progressChanged(new ProgressEvent(unnotifiedByteCount));
            unnotifiedByteCount = 0;
        }
        super.close();
    }

    private void notifyCompleted() {
        if (fireCompletedEvent == false) return;

        ProgressEvent event = new ProgressEvent(unnotifiedByteCount);
        event.setEventCode(ProgressEvent.COMPLETED_EVENT_CODE);
        unnotifiedByteCount = 0;
        listenerCallbackExecutor.progressChanged(event);
    }

    private void notify(int bytesRead) {
        unnotifiedByteCount += bytesRead;
        if (unnotifiedByteCount >= NOTIFICATION_THRESHOLD) {
            listenerCallbackExecutor.progressChanged(new ProgressEvent(unnotifiedByteCount));
            unnotifiedByteCount = 0;
        }
    }
}


text:
from django.test import TestCase, TransactionTestCase
from . import views
from django.test import Client
from freezegun import freeze_time
from django.utils import timezone
from django.contrib.auth.models import User
from django.urls import resolve
from django.urls import reverse

class LoginViewTest(TestCase):
    """
    Test for authentication
    """

    def setUp(self):
        User.objects.create_user('hiren', 'a@b.com', 'password')
        self.c = Client()

    def test_login_url_resolves_to_login_view(self):
        found = resolve('/')
        self.assertEqual(found.func, views.login)

    def test_auth(self):
        respond = self.c.post('/', {'username': 'hiren', 'password': 'password'})
        self.assertRedirects(respond, reverse('unlock'))

    def test_redirect_for_unauthenticated_user_works(self):
        response = self.c.get(reverse('dashboard'))
        self.assertRedirects(response, '/?next=' + reverse('dashboard'))

    def test_redirect_works_for_bad_auth(self):
        respond = self.c.post('/', {'username': 'hiren', 'password': 'bad pass'})
        self.assertRedirects(respond, '/')

    def test_view_returns_correct_template(self):
        response = self.c.get('/')
        self.assertTemplateUsed(response, 'base/login.html')

    def test_authenticated_user_redirect_to_the_app(self):
        self.c.login(username='hiren', password='password')
        response = self.c.get('/', follow=True)
        self.assertRedirects(response, reverse('unlock'))

class RegisterViewTest(TestCase):

    def setUp(self):
        User.objects.create_user('hiren', 'a@b.com', 'password')
        self.c = Client()

    def test_login_url_resolves_to_login_view(self):
        found = resolve(reverse('register'))
        self.assertEqual(found.func, views.register)

    def test_view_returns_correct_template(self):
        response = self.c.get(reverse('register'))
        self.assertTemplateUsed(response, 'base/sign_up.html')

    def test_redirect_for_authenticated_user_works(self):
        self.c.login(username='hiren', password='password')
        response = self.c.get(reverse('register'), follow=True)
        self.assertRedirects(response, reverse('unlock'))

    def test_registration(self):
        self.c.post(reverse('register'), {'username': 'bunny', 'password': 'pass',
                                          'email': 'meow@meow.com', 'confirm_password': 'pass',
                                          'master_password': '1234567890'})
        self.assertEqual(User.objects.count(), 2)


text:
<?php

namespace Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness;

/**
 * Class RoofingContractor
 * A roofing contractor.
 * @author      AppBels <app.bels@gmail.com>
 * @name        RoofingContractor
 * @namespace   Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness
 * @package     Org\Schema
 * @see         https://schema.org/RoofingContractor
 * Date         08/04/2017
 */
class RoofingContractor extends \Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness
{

	/**
	 * RoofingContractor constructor.
	 * @access  public
	 * @see     \Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness::__construct()
	 */
	public function __construct ()
	{
		parent::__construct();
	}

	/**
	 * RoofingContractor toString.
	 * @access  public
	 * @see     \Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness::__toString()
	 *
	 * @return  string
	 */
	public function __toString ()
	{
		return parent::__toString();
	}

	/**
	 * RoofingContractor destructor.
	 * @access  public
	 * @see     \Org\Schema\Thing\Organization\LocalBusiness\HomeAndConstructionBusiness::__destruct()
	 */
	public function __destruct ()
	{
		parent::__destruct();
	}

}

?>


text:
/*!
 * react-router-active-component 1.0.0 - https://github.com/insin/react-router-active-component
 * MIT Licensed
 */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.createActiveRouteComponent=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';

var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null)
var assign = require('react/lib/Object.assign')
var $__0=   (typeof window !== "undefined" ? window.ReactRouter : typeof global !== "undefined" ? global.ReactRouter : null),Link=$__0.Link,State=$__0.State

function createActiveRouteComponent(component, options) {
  if (!component) {
    throw new Error('createActiveRouteComponent() must be given a wrapper component.')
  }
  options = assign({link: true}, options)

  return React.createClass({
    mixins: [State],

    propTypes: {
      activeClassName: React.PropTypes.string.isRequired,
      link: React.PropTypes.bool,
      to: React.PropTypes.string.isRequired,
      params: React.PropTypes.object,
      query: React.PropTypes.object,
      onClick: React.PropTypes.func
    },

    getDefaultProps:function() {
      return {
        activeClassName: 'active'
      , link: options.link
      }
    },

    getClassName:function() {
      var $__0=      this.props,className=$__0.className,activeClassName=$__0.activeClassName,to=$__0.to,params=$__0.params,query=$__0.query
      var classNames = []
      if (className) {
        classNames.push(className)
      }
      if (this.isActive(to, params, query)) {
        classNames.push(activeClassName)
      }
      return classNames.join(' ')
    },

    render:function() {
      var props = assign({}, this.props, {
        active: this.isActive(this.props.to, this.props.params, this.props.query)
      , className: this.getClassName()
      })
      if (this.props.link) {
        // Only put classNames on the container
        var linkProps = assign({}, this.props, {
          className: ''
        , activeClassName: ''
        })
        return React.createElement(component, props,
          React.createElement(Link, linkProps, this.props.children)
        )
      }
      else {
        return React.createElement(component, props, this.props.children)
      }
    }
  })
}

module.exports = createActiveRouteComponent
},{"react/lib/Object.assign":2}],2:[function(require,module,exports){
/**
 * Copyright 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule Object.assign
 */

// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign

function assign(target, sources) {
  if (target == null) {
    throw new TypeError('Object.assign target cannot be null or undefined');
  }

  var to = Object(target);
  var hasOwnProperty = Object.prototype.hasOwnProperty;

  for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
    var nextSource = arguments[nextIndex];
    if (nextSource == null) {
      continue;
    }

    var from = Object(nextSource);

    // We don't currently support accessors nor proxies. Therefore this
    // copy cannot throw. If we ever supported this then we must handle
    // exceptions and side-effects. We don't support symbols so they won't
    // be transferred.

    for (var key in from) {
      if (hasOwnProperty.call(from, key)) {
        to[key] = from[key];
      }
    }
  }

  return to;
};

module.exports = assign;

},{}]},{},[1])(1)
});


text:
<?php

namespace Elastification\Client\Request\Shared;

use Elastification\Client\Request\RequestMethods;
use Elastification\Client\Serializer\JmsSerializer;
use Elastification\Client\Serializer\SerializerInterface;

/**
 * Class AbstractSearchScollRequest
 *
 * @package Elastification\Client\Request\Shared
 * @author  Daniel Wendlandt
 */
abstract class AbstractSearchScrollRequest extends AbstractBaseRequest
{
    const PARAM_SCROLL = 'scroll';
    const PARAM_SCROLL_ID = 'scroll_id';
    const REQUEST_ACTION = '_search/scroll';

    public function __construct($index, $type, SerializerInterface $serializer, array $serializerParams = array())
    {
        //overwriting index type for this request
        parent::__construct(null, null, $serializer, $serializerParams);
    }

    /**
     * @inheritdoc
     */
    public function getMethod()
    {
        return RequestMethods::GET;
    }

    /**
     * @inheritdoc
     */
    public function getAction()
    {
        return self::REQUEST_ACTION;
    }

    /**
     * @inheritdoc
     */
    public function getBody()
    {
        return null;
    }

    /**
     * @inheritdoc
     */
    public function setBody($body)
    {
        //do nothing
    }

    /**
     * Sets the scroll_id as query parameter for request
     *
     * @param string $scrollId
     * @author Daniel Wendlandt
     */
    public function setScrollId($scrollId)
    {
        $this->setParameter(self::PARAM_SCROLL_ID, $scrollId);
    }

    /**
     * Sets the scroll parameter as query parameter.
     * Parameter is in elastichsearch time unit
     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units
     *
     * @param $scrollTimeUnit
     * @author Daniel Wendlandt
     */
    public function setScroll($scrollTimeUnit)
    {
        $this->setParameter(self::PARAM_SCROLL, $scrollTimeUnit);
    }

}


text:
package io.digdag.server.rs;

import com.google.common.collect.ImmutableMap;
import com.google.inject.Inject;
import io.digdag.core.Version;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import java.util.Map;

@Path("/")
@Produces("application/json")
public class VersionResource
{
    private final Version version;

    @Inject
    public VersionResource(Version version)
    {
        this.version = version;
    }

    @GET
    @Path("/api/version")
    public Map<String, Object> getVersion()
    {
        return ImmutableMap.of("version", version.version());
    }
}


text:
<?php
/**
 * Author: Till Wegmüller
 * Date: 6/2/15
 * Dime
 */

namespace Dime\TimetrackerBundle\DataFixtures\Alice;

use Carbon\Carbon;
use Dime\EmployeeBundle\Entity\Period;
use Dime\TimetrackerBundle\Entity\RateUnitType;
use Money\Money;
use Nelmio\Alice\ProcessorInterface;

class Processor implements ProcessorInterface
{

    /**
     * Processes an object before it is persisted to DB
     *
     * @param object $object instance to process
     */
    public function preProcess($object)
    {
        if (property_exists($object, 'rateValue')) {
            if (!is_null($object->getRateValue()) && !$object->getRateValue() instanceof Money) {
                $object->setRateValue(Money::CHF($object->getRateValue() . '.00'));
            }
        }
        if (property_exists($object, 'total')) {
            if (!is_null($object->getTotal()) && !$object->getTotal() instanceof Money) {
                $object->setTotal(Money::CHF($object->getTotal() . '.00'));
            }
        }
        if (property_exists($object, 'budgetPrice')) {
            if (!is_null($object->getBudgetPrice()) && !$object->getBudgetPrice() instanceof Money) {
                $object->setBudgetPrice(Money::CHF($object->getBudgetPrice() . '.00'));
            }
        }
        if (property_exists($object, 'fixedPrice')) {
            if (!is_null($object->getFixedPrice()) && !$object->getFixedPrice() instanceof Money) {
                $object->setFixedPrice(Money::CHF($object->getFixedPrice() . '.00'));
            }
        }
        if ($object instanceof Period) {
            if ($object->getPensum() && $object->getStart() instanceof Carbon && $object->getEmployee()->getEmployeeholiday() != null) {
                $pensum = ($object->getPensum());
                $holidayEntitlement = $object->getEmployee()->getEmployeeholiday();
                $weekdays = ($object->getStart()->diffInDays($object->getEnd()->addDay()));

                $holidaysInSeconds = (($holidayEntitlement / 365) * $weekdays * $pensum) * RateUnitType::$DayInSeconds;

                $object->setHolidays($holidaysInSeconds);
            }
        }
    }

    /**
     * Processes an object before it is persisted to DB
     *
     * @param object $object instance to process
     */
    public function postProcess($object)
    {
    }
}


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

  <link rel="stylesheet" href="https://muffinman.io/skyblue/css/skyblue.css">
  <link rel="stylesheet" href="/react-plx/docs.css">
  <title>Plx - React parallax component</title>

  <meta name="description" content="Plx - React parallax component. Lightweight, yet powerful.">

  <meta property="og:site_name" content="Plx">
  <meta property="og:title" content="React parallax component">
  <meta property="og:description" content="Plx - React parallax component. Lightweight, yet powerful.">
  <meta property="og:url" content="https://muffinman.io/react-plx/">

  <meta name="twitter:title" content="Plx - React parallax component">
  <meta name="twitter:description" content="Plx - React parallax component. Lightweight, yet powerful.">

  <link rel="icon" href="https://muffinman.io/favicon/red/icon-32.ico" sizes="any" />
  <link rel="icon" href="https://muffinman.io/favicon/red/icon.svg" type="image/svg+xml" />
  <link rel="apple-touch-icon" href="https://muffinman.io/favicon/red/icon-180.png" />
  <link rel="manifest" href="https://muffinman.io/favicon/red/manifest.webmanifest" />

React Plx v2

      Scroll down to get things moving!

      React parallax component, lightweight and powerful.
      Supports animating CSS properties that accept numerical values
      (opacity, transform, height...) and colors.
      It has built-in easing functions or you can provide custom ones.

      Detailed documentation is available on
      GitHub.

Plx v2

React Parallax component

Awesome isn't it?

        My blog
        npm
        GitHub

      <button class="ScrollToTop">Back to top</button>


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#fff" >

    <kankan.wheel.widget.WheelView
        android:id="@+id/cv_numberpicker"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="20dp"
        android:paddingRight="20dp" />

</RelativeLayout>


text:
package com.github.dockerjava.api.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import javax.annotation.CheckForNull;

/**
 * @author Kanstantsin Shautsou
 * @see Container
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ContainerPort {

    @JsonProperty("IP")
    private String ip;

    @JsonProperty("PrivatePort")
    private Integer privatePort;

    @JsonProperty("PublicPort")
    private Integer publicPort;

    @JsonProperty("Type")
    private String type;

    /**
     * @see #ip
     */
    @CheckForNull
    public String getIp() {
        return ip;
    }

    /**
     * @see #ip
     */
    public ContainerPort withIp(String ip) {
        this.ip = ip;
        return this;
    }

    /**
     * @see #privatePort
     */
    @CheckForNull
    public Integer getPrivatePort() {
        return privatePort;
    }

    /**
     * @see #privatePort
     */
    public ContainerPort withPrivatePort(Integer privatePort) {
        this.privatePort = privatePort;
        return this;
    }

    /**
     * @see #publicPort
     */
    @CheckForNull
    public Integer getPublicPort() {
        return publicPort;
    }

    /**
     * @see #publicPort
     */
    public ContainerPort withPublicPort(Integer publicPort) {
        this.publicPort = publicPort;
        return this;
    }

    /**
     * @see #type
     */
    @CheckForNull
    public String getType() {
        return type;
    }

    /**
     * @see #type
     */
    public ContainerPort withType(String type) {
        this.type = type;
        return this;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    @Override
    public boolean equals(Object o) {
        return EqualsBuilder.reflectionEquals(this, o);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }
}


text:
class App {

	constructor(opts = {}) {
		console.log('Hello World!');
	}

};

document.addEventListener("DOMContentLoaded", function(event) {

	// create new App object
	let $bs = new App();
	window.$bs = $bs;

});


text:
require 'mongo'
require 'mongo_ha'
require 'mongo_mapper'
require 'semantic_logger'
require 'rocket_job/version'

module RocketJob
  autoload :CLI,                   'rocket_job/cli'
  autoload :Config,                'rocket_job/config'
  autoload :Heartbeat,             'rocket_job/heartbeat'
  autoload :Job,                   'rocket_job/job'
  autoload :JobException,          'rocket_job/job_exception'
  autoload :SlicedJob,             'rocket_job/sliced_job'
  autoload :Server,                'rocket_job/server'
  autoload :Worker,                'rocket_job/worker'
  module Reader
    autoload :Zip,                 'rocket_job/reader/zip'
  end
  module Utility
    autoload :CSVRow,              'rocket_job/utility/csv_row'
  end
  module Writer
    autoload :Zip,                 'rocket_job/writer/zip'
  end
  module Jobs
    autoload :PerformanceJob,      'rocket_job/jobs/performance_job'
  end
  module Sliced
    autoload :Slice,               'rocket_job/sliced/slice'
    autoload :Slices,              'rocket_job/sliced/slices'
    autoload :Input,               'rocket_job/sliced/input'
    autoload :Output,              'rocket_job/sliced/output'
  end

  UTF8_ENCODING      = Encoding.find("UTF-8").freeze
  BINARY_ENCODING    = Encoding.find("BINARY").freeze
end


text:
class AddTimesSeenToTweets < ActiveRecord::Migration
  def up
    add_column :tweets, :times_seen, :integer, default: 0
    Tweet.reset_column_information
    Tweet.update_all(times_seen: 1)
  end

  def down
    remove_column :tweets, :times_seen
  end
end