text:
using System;
using System.Collections.Generic;
using System.Text;
using Core.Environment;
using Core.Basic;

namespace Core.Helper
{
    public class SystemParameters : ISystemParameters
    {
        public SystemParameters(IWorkSpace owner)
        {
            m_owner = owner;
        }

        public Core.Basic.Vector1f GetParameter(Vector1Parameter p)
        {
            switch (p)
            {
                case Vector1Parameter.Time: return new Vector1f((float)(DateTime.Now - m_start).TotalSeconds);
            }

            throw new NotImplementedException();
        }

        public Core.Basic.Vector3f GetParameter(Vector3Parameter p)
        {
            switch (p)
            {
                case Vector3Parameter.AmbientColor: return new Vector3f(0, 0, 0);
                case Vector3Parameter.CameraForward: return Vector3f.Normalize(CameraTarget - CameraPosition);
                case Vector3Parameter.CameraPosition: return CameraPosition;
                case Vector3Parameter.CameraRight: return Vector3f.Normalize(Vector3f.Cross(CameraUp, Vector3f.Normalize(CameraTarget - CameraPosition)));
                case Vector3Parameter.CameraUp: return CameraUp;
                case Vector3Parameter.LightAttenuation: return new Vector3f(1, 1, 0);
                case Vector3Parameter.LightColor: return new Vector3f(1, 0, 0);
                case Vector3Parameter.LightForward: return new Vector3f(0, 0, 0);
                case Vector3Parameter.LightPosition: return new Vector3f((float)Math.Sin(Time * LightSpeed) * LightDistance, (float)Math.Cos(Time * LightSpeed) * LightDistance, 0);
            }

            throw new NotImplementedException();
        }

        float Time
        {
            get{return (float)(DateTime.Now - m_start).TotalSeconds;}
        }

        Vector3f CameraPosition = new Vector3f(1, 1, 1);
        Vector3f CameraTarget = new Vector3f(0, 0, 0);
        Vector3f CameraUp = Vector3f.Normalize(new Vector3f(-1, -1, 1));
        float LightSpeed = 0.7f;
        float LightDistance = 4;

        public Core.Basic.Matrix44f GetParameter(Matrix44Parameter p)
        {
            Matrix44f v = Matrix44f.LookAt(CameraPosition, CameraTarget, CameraUp);
            //Matrix44f v = Matrix44f.LookAt(new Vector3f(0, -2, 4), new Vector3f(0, 0, 0), new Vector3f(0, 0, 1));
            Matrix44f px = Matrix44f.Perspective(1.4f, 1, 0.001f, 10.0f);

           /*  SlimDX.Matrix vv = SlimDX.Matrix.LookAtRH(new SlimDX.Vector3(1, 2, 3), new SlimDX.Vector3(0.5f, 0, 0.5f), new SlimDX.Vector3(0.5f, 0.5f, 0));
             SlimDX.Matrix pp = SlimDX.Matrix.PerspectiveFovRH(1.4f, 1, 0.001f, 10.0f);

             //v.Column2.W = -3.4641f;
             //v.Column3 = new Vector4f(0, 0, 0, 1);

             Matrix44f vp = v * px;

             SlimDX.Matrix vvpp = vv * pp;*/

            switch (p)
            {
                case Matrix44Parameter.Model: return Matrix44f.MakeIdentity();
                case Matrix44Parameter.View: return v;
                case Matrix44Parameter.Projection: return px;
            }

            throw new NotImplementedException();
        }

        #region private

        readonly IWorkSpace m_owner;
        readonly DateTime m_start = DateTime.Now;

        #endregion
    }
}


text:
<ion-view class="itemView" view-title="{{data.tavolo.descrizione}} - Selezione ordine" >
    <ion-content overflow-scroll="true">
        <ion-list can-swipe="true" class="list-sagra list-ordini-scelta-tavolo">

                {{ordine.data | date : 'HH:mm'}}

                Coperti: {{ordine.numCoperti}}

                {{ordine.personaOrdine}}

        </ion-list>
  </ion-content>
</ion-view>

redpajama_set_name: RedPajamaGithub


text:
package com.github.st1hy.countthemcalories.core.fragments;

import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

public class FragmentLocation<T extends Fragment> {
    public static final int NO_ID = -1;

    private final Class<T> klass;
    private final String tag;
    private int rootViewId;
    private Injector<T> injector;

    private FragmentLocation(Builder<T> builder) {
        this.klass = builder.klass;
        this.tag = builder.tag;
        this.rootViewId = builder.rootViewId;
        this.injector = builder.injector;
    }

    @NonNull
    public T newFragment() {
        try {
            T t = klass.newInstance();
            maybeInject(t);
            return t;
        } catch (Exception e) {
            throw new IllegalStateException("Could not instantiate fragment", e);
        }
    }

    @NonNull
    public String getTag() {
        return tag;
    }

    public int getRootViewId() {
        return rootViewId;
    }

    @Nullable
    public T maybeInject(@Nullable T t) {
        if (t != null && injector != null) {
            injector.inject(t);
        }
        return t;
    }

    @SuppressWarnings("unchecked")
    @Nullable
    public T findFragmentIn(@NonNull FragmentManager fragmentManager) {
        T t = (T) fragmentManager.findFragmentByTag(tag);
        maybeInject(t);
        return t;
    }

    public static class Builder<T extends Fragment> {
        private final Class<T> klass;
        private final String tag;
        private int rootViewId;
        private Injector<T> injector;

        public Builder(Class<T> klass, String tag) {
            this.klass = klass;
            this.tag = tag;
        }

        public Builder<T> setViewRootId(@IdRes int viewRootId) {
            this.rootViewId = viewRootId;
            return this;
        }

        public Builder<T> setInjector(Injector<T> injector) {
            this.injector = injector;
            return this;
        }

        public FragmentLocation<T> build() {
            return new FragmentLocation<>(this);
        }
    }

    public interface Injector<T extends Fragment> {
        void inject(T t);
    }
}


text:
namespace erebus {

File::File(binVec* file): File(file,"") {

}

File::File(binVec* file,
           std::string path): file_(std::make_unique<binVec>(*file)),path_(path) {

}

File::File(const File &obj): file_(std::make_unique<binVec>(*
	                                   (obj.file_.get()))),path_(obj.path_) {

}

File::~File() {

}

unsigned int File::getFileSize() const {
	return file_->size();
}

byte File::getUnsignedByteAt(unsigned int index) const {
	return file_->at(index);
}

}//namespace erebus


text:
<?hh // strict
namespace HHReactor;
interface CovWrapper<+T> {
	public function get(): T;
}


text:
 <title>Error In Admin Application</title>

    Server Encountered an Error!

  home

   All rights reserved by Apache Software Foundation


text:
'use strict';

var math = require('../../..').Math,
    powerSet = math.powerSet,
    assert = require('assert');

function testArrayEqual(a, b) {
  var arrayEqual = true;
  a.forEach(function (elem, index) {
    if (a[index] !== b[index]) {
      arrayEqual = false;
    }
  });
  return arrayEqual && a.length === b.length;
}

function testArrayInArray(a, b) {
  var arrayInArray = false;
  b.forEach(function (array) {
    if (testArrayEqual(a, array)) {
      arrayInArray = true;
    }
  });
  return arrayInArray;
}

describe('Power set', function () {
  describe('#iterative()', function () {
    it('should return the right elements of power set', function () {
      var zeroElementTest = powerSet([]);
      assert(zeroElementTest.length === 0);

      var oneElementTest = powerSet([0]);
      assert(testArrayInArray([], oneElementTest));
      assert(testArrayInArray([0], oneElementTest));
      assert(oneElementTest.length === 2);

      var twoElementTest = powerSet([0, 1]);
      assert(testArrayInArray([], twoElementTest));
      assert(testArrayInArray([0], twoElementTest));
      assert(testArrayInArray([1], twoElementTest));
      assert(testArrayInArray([0, 1], twoElementTest));
      assert(twoElementTest.length === 4);

      var threeElementTest = powerSet([0, 1, 2]);
      assert(testArrayInArray([], threeElementTest));
      assert(testArrayInArray([0], threeElementTest));
      assert(testArrayInArray([1], threeElementTest));
      assert(testArrayInArray([2], threeElementTest));
      assert(testArrayInArray([0, 1], threeElementTest));
      assert(testArrayInArray([0, 2], threeElementTest));
      assert(testArrayInArray([1, 2], threeElementTest));
      assert(testArrayInArray([0, 1, 2], threeElementTest));
      assert(testArrayInArray([0, 1], threeElementTest));
      assert(threeElementTest.length === 8);

      var fourElementTest = powerSet([0, 1, 2, 3]);
      assert(testArrayInArray([], fourElementTest));
      assert(testArrayInArray([0], fourElementTest));
      assert(testArrayInArray([1], fourElementTest));
      assert(testArrayInArray([2], fourElementTest));
      assert(testArrayInArray([3], fourElementTest));
      assert(testArrayInArray([0, 1], fourElementTest));
      assert(testArrayInArray([0, 2], fourElementTest));
      assert(testArrayInArray([0, 3], fourElementTest));
      assert(testArrayInArray([1, 2], fourElementTest));
      assert(testArrayInArray([1, 3], fourElementTest));
      assert(testArrayInArray([2, 3], fourElementTest));
      assert(testArrayInArray([0, 1, 2], fourElementTest));
      assert(testArrayInArray([0, 1, 3], fourElementTest));
      assert(testArrayInArray([0, 2, 3], fourElementTest));
      assert(testArrayInArray([1, 2, 3], fourElementTest));
      assert(testArrayInArray([0, 1, 2, 3], fourElementTest));
      assert(fourElementTest.length === 16);

    });
  });

  describe('#recursive()', function () {
    it('should return the right elements of power set', function () {
      var zeroElementTest = powerSet.recursive([]);
      assert(zeroElementTest.length === 0);

      var oneElementTest = powerSet.recursive([0]);
      assert(testArrayInArray([], oneElementTest));
      assert(testArrayInArray([0], oneElementTest));
      assert(oneElementTest.length === 2);

      var twoElementTest = powerSet.recursive([0, 1]);
      assert(testArrayInArray([], twoElementTest));
      assert(testArrayInArray([0], twoElementTest));
      assert(testArrayInArray([1], twoElementTest));
      assert(testArrayInArray([0, 1], twoElementTest));
      assert(twoElementTest.length === 4);

      var threeElementTest = powerSet.recursive([0, 1, 2]);
      assert(testArrayInArray([], threeElementTest));
      assert(testArrayInArray([0], threeElementTest));
      assert(testArrayInArray([1], threeElementTest));
      assert(testArrayInArray([2], threeElementTest));
      assert(testArrayInArray([0, 1], threeElementTest));
      assert(testArrayInArray([0, 2], threeElementTest));
      assert(testArrayInArray([1, 2], threeElementTest));
      assert(testArrayInArray([0, 1, 2], threeElementTest));
      assert(testArrayInArray([0, 1], threeElementTest));
      assert(threeElementTest.length === 8);

      var fourElementTest = powerSet.recursive([0, 1, 2, 3]);
      assert(testArrayInArray([], fourElementTest));
      assert(testArrayInArray([0], fourElementTest));
      assert(testArrayInArray([1], fourElementTest));
      assert(testArrayInArray([2], fourElementTest));
      assert(testArrayInArray([3], fourElementTest));
      assert(testArrayInArray([0, 1], fourElementTest));
      assert(testArrayInArray([0, 2], fourElementTest));
      assert(testArrayInArray([0, 3], fourElementTest));
      assert(testArrayInArray([1, 2], fourElementTest));
      assert(testArrayInArray([1, 3], fourElementTest));
      assert(testArrayInArray([2, 3], fourElementTest));
      assert(testArrayInArray([0, 1, 2], fourElementTest));
      assert(testArrayInArray([0, 1, 3], fourElementTest));
      assert(testArrayInArray([0, 2, 3], fourElementTest));
      assert(testArrayInArray([1, 2, 3], fourElementTest));
      assert(testArrayInArray([0, 1, 2, 3], fourElementTest));
      assert(fourElementTest.length === 16);
    });
  });
});


text:
<!--
  ~ Copyright (C) 2015 The Android Open Source Project
  ~
  ~ 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.
  -->
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">#3F51B5</item>
        <!-- Light Indigo -->
        <item name="colorPrimaryDark">#3949AB</item>
        <!-- Dark Indigo -->
        <item name="colorAccent">#00B0FF</item>
        <!-- Blue -->
    </style>
    <style name="AppTheme" parent="AppTheme.Base"></style>

    <style name="Eventsgreen" parent="AppTheme" >
        <item name="colorPrimary">@color/events_color</item>
        <item name="colorPrimaryDark">@color/events_color</item>
        <item name="colorAccent">@color/events_color</item>
        <item name="android:textColorPrimary">@android:color/white</item>
    </style>

    <style name="Jobsblue" parent="AppTheme" >
        <item name="colorPrimary">@color/jobs_color</item>
        <item name="colorPrimaryDark">@color/jobs_color</item>
        <item name="colorAccent">@color/jobs_color</item>
        <item name="android:textColorPrimary">@android:color/white</item>
    </style>

    <style name="Volunteerred" parent="AppTheme" >
        <item name="colorPrimary">@color/volunteer_color</item>
        <item name="colorPrimaryDark">@color/volunteer_color</item>
        <item name="colorAccent">@color/volunteer_color</item>
        <item name="android:textColorPrimary">@android:color/white</item>
    </style>

    <style name="Pointsgray" parent="AppTheme" >
        <item name="colorPrimary">@color/points_color</item>
        <item name="colorPrimaryDark">@color/points_color</item>
        <item name="colorAccent">@color/points_color</item>
        <item name="android:textColorPrimary">@android:color/white</item>
    </style>

</resources>


text:
using System;
using System.Collections.Generic;

namespace Stripe
{
    public class StripeRefundService : StripeService
    {
        public StripeRefundService(string apiKey = null) : base(apiKey) { }

        public bool ExpandBalanceTransaction { get; set; }

        public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);
            url = this.ApplyAllParameters(createOptions, url, false);

            var response = Requestor.PostString(url, ApiKey);

            return Mapper<StripeRefund>.MapFromJson(response);
        }

        public virtual StripeRefund Get(string chargeId, string refundId)
        {
            var url = string.Format("{0}/{1}/refunds/{2}", Urls.Charges, chargeId, refundId);
            url = this.ApplyAllParameters(null, url, false);

            var response = Requestor.GetString(url, ApiKey);

            return Mapper<StripeRefund>.MapFromJson(response);
        }

        public virtual StripeRefund Update(string chargeId, string refundId, StripeRefundUpdateOptions updateOptions)
        {
            var url = string.Format("{0}/{1}/refunds/{2}", Urls.Charges, chargeId, refundId);
            url = this.ApplyAllParameters(updateOptions, url, false);

            var response = Requestor.PostString(url, ApiKey);

            return Mapper<StripeRefund>.MapFromJson(response);
        }

        public virtual IEnumerable<StripeRefund> List(string chargeId, StripeListOptions listOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);
            url = this.ApplyAllParameters(listOptions, url, true);

            var response = Requestor.GetString(url, ApiKey);

            return Mapper<StripeRefund>.MapCollectionFromJson(response);
        }
    }
}


text:
<?php namespace Palmabit\Catalog\Tests;

use Palmabit\Catalog\Models\CategoryDescription;
use Palmabit\Catalog\Repository\EloquentCategoryRepository;
use Palmabit\Catalog\Models\Category;
use Event;
use Palmabit\Catalog\Tests\Traits\CategoryStubTrait;

class EloquentCategoryRepositoryTest extends DbTestCase
{
    use CategoryStubTrait;

    protected $faker;
    protected $repo;
    protected $category_name;
    protected $category_description_name;

    public function setUp()
    {
        parent::setUp();

        $this->faker = \Faker\Factory::create();
        $this->repo = new CatRepoStubLang();
        $this->category_name = 'Palmabit\Catalog\Models\Category';
        $this->category_description_name = 'Palmabit\Catalog\Models\CategoryDescription';
    }

    /**
     * @test
     */
    public function createCategoryWithBaseData()
    {
        $cat_data = [
                "name"  => "name",
                "order" => 3,
        ];
        $cat = $this->repo->create($cat_data);
        $this->assertTrue($cat instanceof Category);
        $this->assertObjectHasAllAttributes($cat_data, $cat);
    }

    /**
     * @test
     */
    public function updateCategoryBaseData()
    {
        $created_category = $this->make($this->category_name)->first();

        $new_name = "new name";
        $cat = $this->repo->update($created_category->id, ["name" => $new_name]);

        $this->assertEquals($new_name, $cat->name);
    }

    /**
     * @test
     */
    public function findCategoryDescriptionByDescription()
    {
        $created_category = $this->make($this->category_name)->first();

        $created_category_description =
                $this->make($this->category_description_name, $this->getCategoryDescriptionModelStub($created_category))->first();

        $category_description_found = $this->repo->search($created_category_description->description);

        $this->assertObjectHasAllAttributes($created_category_description->toArray(), $category_description_found[0]);
    }

    /**
     * @test
     */
    public function findCategoryDescriptionBySlug()
    {
        list($created_category, $created_category_description) = $this->createCategoryWithDescription();

        $category_description_found = $this->repo->searchBySlug($created_category_description->slug);

        $this->assertObjectHasAllAttributes($created_category_description->toArray(), $category_description_found);
    }

    /**
     * @test
     **/
    public function canAccessCategoryProperties_AsHisProperties()
    {
        list($created_category, $created_category_description) = $this->createCategoryWithDescription();

        $this->assertEquals($created_category_description->name, $created_category->name);
        $this->assertEquals($created_category_description->image, $created_category->image);

        $created_category_description->image = 12345;
        $new_name = "new name";
        $created_category_description->name = $new_name;

        $updated_category = $this->repo->find($created_category->id);
        $this->assertEquals($updated_category->name, $created_category_description->name);
        $this->assertEquals($updated_category->image, $created_category_description->image);
    }

    public function deleteCategory()
    {
        list($created_category, $created_category_description) = $this->createCategoryWithDescription();

        $this->assertTrue($this->repo->delete($created_category->id));

        $this->assertEquals(0, Category::count());
        $this->assertEquals(0, CategoryDescription::count());
    }

    /**
     * @test
     **/
    public function getAllCategoriesOrderedByDepthAndName()
    {
        $times = 5;
        $this->times($times)->make($this->category_name);

        $all_categories = $this->repo->all();

        $this->assertCount($times, $all_categories);

        $field = "order";
        $this->isOrderedAscBy($field, $all_categories);
    }

    /**
     * @test
     **/
    public function it_gets_only_root_categories()
    {
        $this->times(2)->make($this->category_name, ["depth" => null]);
        $this->times(2)->make($this->category_name, ["depth" => 1]);

        $results = $this->repo->getRootNodes();
        $this->assertEquals(2, count($results));
    }

    /**
     * @test
     */
    public function getSelectArrayWithAllCategoriesAndNames()
    {
        $cat1 = $this->make($this->category_name, ["name" => "1name"])->first();
        $cat2 = $this->make($this->category_name, ["name" => "2name"])->first();

        $expected_data = [
                1  => $cat1->name,
                2  => $cat2->name,
                "" => "Qualsiasi"

        ];
        $this->assertEquals($expected_data, $this->repo->getArrSelectCat());
    }

    /**
     * @test
     **/
    public function it_set_cat_depth()
    {
        $this->make($this->category_name);

        $this->repo->setDepth(1, 1);

        $cat_saved = $this->repo->find(1);
        $this->assertEquals(1, $cat_saved->depth);
    }

    /**
     * @return mixed
     */
    protected function createCategoryWithDescription()
    {
        $created_category = $this->make($this->category_name)->first();

        $created_category_description = $this->make($this->category_description_name, $this->getCategoryDescriptionModelStub($created_category))->first();
        return [$created_category, $created_category_description];
    }

    /**
     * @param $field
     * @param $all_categories
     */
    protected function isOrderedAscBy($field, $all_categories)
    {
        $this->assertTrue($all_categories[0]->$field >= $all_categories[1]->$field);
        $this->assertTrue($all_categories[1]->$field >= $all_categories[2]->$field);
        $this->assertTrue($all_categories[3]->$field >= $all_categories[4]->$field);
    }

    /**
     * @test
     **/
    public function canUpdateCategoryDescription()
    {
        list($created_category, $created_category_description) = $this->createCategoryWithDescription();

        $update_data = [
                "category_id" => $created_category->id,
                "lang" => CatRepoStubLang::$current_lang,
                "slug" => $this->faker->unique()->text(20),
                "description" => "fake desc"
        ];

        $this->repo->updateDescription($update_data);

        $created_category_description = CategoryDescription::first();
        $this->assertObjectHasAllAttributes($update_data, $created_category_description);
    }

    /**
     * @test
     **/
    public function canCreateCategoryDescription()
    {
        $created_category = $this->make($this->category_name)->first();
        $update_data = [
                "category_id" => $created_category->id,
                "lang" => CatRepoStubLang::$current_lang,
                "slug" => "slug",
                "description" => "fake desc"
        ];

        $this->repo->updateDescription($update_data);

        $created_category_description = CategoryDescription::first();
        $this->assertObjectHasAllAttributes($update_data, $created_category_description);
    }

    /**
     * @test
     * @expectedException \Palmabit\Library\Exceptions\NotFoundException
     **/
    public function handleCreationOfCategoryDescriptionWithNoCategoryGiven()
    {
        $update_data = [
                "category_id" => 12345, // fake id
                "lang" => CatRepoStubLang::$current_lang,
                "slug" => "slug",
                "description" => "fake desc"
        ];

        $this->repo->updateDescription($update_data);
    }
}

class CatRepoStubLang extends EloquentCategoryRepository
{
    public static $current_lang = 'it';

    public function getLang()
    {
        return static::$current_lang;
    }

    public static function resetToDefaultLang()
    {
        static::$current_lang = 'it';
    }
}


text:
/* global Vanilla */

"use strict" ;

// Not needed here, except that it should load before anything else,
// so nothing can get a timer function without it being patched
const asyncTryCatch = require( 'async-try-catch' ) ;
asyncTryCatch.substitute() ;

const termkit = require( 'terminal-kit' ) ;
const term = termkit.terminal ;
const string = require( 'string-kit' ) ;
const tree = require( 'tree-kit' ) ;
const Promise = require( 'seventh' ) ;

const cliManager = require( 'utterminal' ).cli ;

const glob = require( 'glob' ) ;
const path = require( 'path' ) ;
const querystring = require( 'querystring' ) ;
const fs = require( 'fs' ) ;
const os = require( 'os' ) ;
const ws = require( 'ws' ) ;

const execFileSync = require( 'child_process' ).execFileSync ;
const exec = require( 'child_process' ).exec ;

const teaTimePackage = require( '../package.json' ) ;

const TeaTime = require( './TeaTime.js' ) ;

function cli() {
	/* eslint-disable indent */
	cliManager.package( teaTimePackage )
		.usage( "[<test files>] [<--option1>] [<--option2>] [...]" )
		.app( "Tea Time!" )
		.noIntro	// that's the reporter job
		.helpOption.logOptions
		.camel
		.description( "A wonderful unit-test framework with battery included!\nIt includes code coverage, BDD-style assertions and more!" )
		.restArgs( 'testFiles' ).arrayOf.string
			.description( "The test files" )
		.opt( [ 'cover' , 'C' ] ).flag
			.description( "Report test's code coverage (node.js only)" )
		.opt( [ 'timeout' , 't' ] , 2000 ).number
			.description( "Set the default timeout for each test in ms" )
		.opt( [ 'slow' , 's' ] , 75 ).number
			.description( "Set the default slow time for each test in ms" )
		.opt( [ 'grep' , 'g' ] ).arrayOf.string
			.description( "Grep: filter in tests/suites by this pattern (can be used multiple times)" )
		.opt( [ 'igrep' , 'G' ] ).arrayOf.string
			.description( "Inverse grep: filter out tests/suites by this pattern (can be used multiple times)" )
		.opt( [ 'bail' , 'b' ] ).flag
			.description( "Bail out after the first test failure" )
		.opt( [ 'skip-optional' , 'O' ] ).flag
			.description( "Skip optional tests" )
		.opt( [ 'reporter' , 'R' ] ).arrayOf.string
			.description( "Set/add the reporter (can be used multiple times)" )
		.opt( [ 'add-reporter' , 'R+' ] ).arrayOf.string
			.description( "Add the reporter without removing default reporters (can be used multiple times)" )
		.opt( 'client-reporter' ).arrayOf.string
			.description( "Set/add the client reporter (see --browser, can be used multiple times)" )
		.opt( [ 'console' , 'c' ] ).flag
			.description( "Allow output from console.log() and friends" )
		.opt( [ 'hunt-console' , 'H' ] ).flag
			.description( "Hunt console.log() and friends: they throw an error" )
		.opt( 'list-opt' ).flag
			.description( "List options available to pass to unit script" )
		.opt( 'opt' ).object
			.description( "Options to pass to the unit test script" )
		.opt( 'list-reporters' ).flag
			.description( "List all available reporters" )
			.exec( () => {
				cli.listReporters() ;
				process.exit() ;
			} )
		.opt( [ 'stack-trace' , 'S' ] ).number
			.description( "Set stack-trace size for Error" )
		.opt( [ 'debugger' , 'D' ] ).boolean
			.description( "Turn Node debugger/inspect-mode on" )
		.opt( 'diff' , true ).flag
			.description( "Enable/disable diff output " )
		.opt( 'html' )
			.description( "Build one HTML file for all input test files, to run the test in browsers" )
		.opt( 'tmp-html' ).flag
			.description( "Like --html but create a temporary file in the OS temp folder" )
		.opt( 'browserify' ).flag
			.description( "In conjunction with --html, call Browserify to build a browser version for each input files" )
		.opt( 'ws' ).flag
			.description( "Start a websocket server, endpoint to the browser websocket client reporter" )
		.opt( [ 'browser' , 'B' ] ).string
			.description( "Open the html with the <exe> browser, need --html <file>, force --ws and the websocket client reporter" )
		.opt( 'token' ).string
			.description( "The token required for server connection" )
		.opt( 'bb' ).string
			.imply( {
				'tmp-html': true , ws: true , browserify: true , browser: cliManager.ARG
			} )
			.remove
			.description( "Shorthand" )
		.details(
			"Reporters: " + cli.getReportersString() + "\n\n" +
			"Cool coverage command: tea-time -C | less -r\n\n" +
			"Do not miss: run browser tests directly from the CLI! So you can script browser tests as well!\n" +
			"Example:\n" +
			"tea-time test/*js --bb firefox\n\n"
		) ;
	/* eslint-enable indent */

	var args = cliManager.run() ;

	var affix = '' ;

	var options = {
		cliManager ,
		// Do not use 'bind' here, because async-try-catch replaces those methods
		onceUncaughtException: fn => process.once( 'uncaughtException' , fn ) ,
		offUncaughtException: fn => process.removeListener( 'uncaughtException' , fn )
	} ;

	if ( args.tmpHtml ) {
		affix =
			Math.floor( Math.random() * 65536 ).toString( 16 ) +
			Math.floor( Math.random() * 65536 ).toString( 16 ) ;

		args.html = os.tmpdir() + '/tea-time-' + affix + '.html' ;
		//console.log( "tmp:" , args.html ) ;
	}

	if ( args.html ) {
		cli.generateHtml(
			args.testFiles ,
			typeof args.html === 'string' ? args.html : null ,
			!! args.browserify ,
			affix
		) ;

		if ( typeof args.html === 'string' && args.browser && ! args.ws ) { args.ws = true ; }

		if ( ! args.ws ) { return ; }
	}

	TeaTime.populateOptionsWithArgs( options , args ) ;

	// Expose the Tea Time instance in the module, so it can be accessed within tests
	var teaTime = global.teaTime = new TeaTime( options ) ;

	teaTime.init() ;

	cli.createReporters( teaTime , options.reporters ) ;
	cli.loadTestFiles( args.testFiles ) ;

	if ( args.listOpt ) {
		term( "Available test options: %N\n" , teaTime.registeredTestOptions ) ;
		return ;
	}

	if ( args.ws ) {
		cli.createWebSocketServer( teaTime , 7357 ) ; // 7357=test

		if ( args.browser && typeof args.html === 'string' ) {
			TeaTime.populateOptionsWithArgs( options , args ) ;
			cli.openBrowser( teaTime , args.browser , args.html , options ) ;
		}

		return ;
	}

	if ( args.stackTrace ) {
		Error.stackTraceLimit = args.stackTrace ;
	}

	if ( args.debugger ) {
		// This allow Node to turn to the inspector from within
		process._debugProcess( process.pid ) ;
		term.brightYellow( "Open Chromium, type "about:inspect" in the bar, then click "Open dedicated DevTools for Node"" )( '\n' ) ;

		// Give some time for the dev-tools to load
		setTimeout( () => {

			teaTime.run().then( () => {
				Promise.asyncExit( teaTime.fail ? 1 : 0 , 5000 ) ;
			} ) ;
		} , 500 ) ;

		return ;
	}

	teaTime.run().then( () => {
		Promise.asyncExit( teaTime.fail ? 1 : 0 , 5000 ) ;
	} ) ;
}

module.exports = cli ;

cli.listReporters = function() {
	term( "%s\n" , cli.getReportersString( true , '\n' ) ) ;
} ;

cli.getReporterList = function( withAliases ) {
	var reporters = fs.readdirSync( path.join( __dirname , 'reporters' ) ).map( filepath => filepath.slice( 0 , -3 ) ) ;
	if ( withAliases ) { reporters.push( ... Object.keys( TeaTime.reporterAliases ) ) ; }
	return reporters ;
} ;

cli.getReportersString = function( withAliases = true , glue = ', ' ) {
	var reportersObject = {} ;

	cli.getReporterList( false ).forEach( reporter => reportersObject[ reporter ] = [ reporter ] ) ;
	Object.keys( TeaTime.reporterAliases ).forEach( alias => reportersObject[ TeaTime.reporterAliases[ alias ] ].push( alias ) ) ;

	return Object.keys( reportersObject ).map( reporter => {
		var str = reportersObject[ reporter ][ 0 ] ;
		if ( reportersObject[ reporter ].length > 1 ) {
			str += ' (' + reportersObject[ reporter ].slice( 1 ).join( ', ' ) + ')' ;
		}
		return str ;
	} )
		.join( glue ) ;
} ;

function copyFile( sourcePath , targetPath ) {
	var content = fs.readFileSync( sourcePath ) ;
	fs.writeFileSync( targetPath , content ) ;
}

function browserify( sourcePath , targetPath ) {
	execFileSync( __dirname + '/../node_modules/.bin/browserify' , [ sourcePath , '--ignore-missing' , '-o' , targetPath ] ) ;
}

cli.generateHtml = function( testFiles , outputPath , runBrowserify , affix ) {
	var outputDir , testFileName ;

	var teaTimeJs = 'tea-time.min.js' ;
	//var teaTimeJs = 'tea-time.js' ;

	if ( ! Array.isArray( testFiles ) || ! testFiles.length ) { testFiles = cli.testFilesFromPackage() ; }
	else { testFiles = cli.expandTestFiles( testFiles ) ; }

	if ( outputPath ) {
		//outputPath = fs.realpathSync( outputPath ) ;
		outputDir = path.dirname( outputPath ) ;

		try {
			fs.mkdirSync( outputDir + '/.tea-time' , 0o777 ) ;	// jshint ignore:line
		}
		catch ( error ) {
			// The dir already exists, do nothing...
		}

		copyFile(  __dirname + '/../browser/reporters.css' , outputDir + '/.tea-time/reporters.css' ) ;
		copyFile(  __dirname + '/../browser/' + teaTimeJs , outputDir + '/.tea-time/' + teaTimeJs ) ;
	}

	var content =
		'<!DOCTYPE HTML>\n' +
		'\n' +
		'\n' +
		'	<meta charset="utf8" />\n' +
		'	<link rel="stylesheet" href="' +
				( outputPath ? '.tea-time/reporters.css' : fs.realpathSync( __dirname + '/../browser/reporters.css' ) ) +
					'" />\n' +
		'\n' +
		'\n' +
		'	\n' ;

	testFiles.forEach( ( testFile ) => {
		if ( outputPath ) {
			if ( runBrowserify ) {
				testFileName = path.basename( testFile ) ;

				if ( affix ) { testFileName = testFileName.replace( /^(.*?)(\.js)?$/ , '$1-' + affix + '$2' ) ; }

				browserify( testFile , outputDir + '/.tea-time/' + testFileName ) ;
				content += '	\n' ;
			}
			else {
				content += '	\n' ;
			}
		}
		else {
			content += '	\n' ;
		}
	} ) ;

	content +=
		'\n' +
		'\n' ;

	if ( outputPath ) {
		fs.writeFileSync( outputPath , content ) ;
	}
	else {
		console.log( content ) ;
	}
} ;

cli.loadTestFiles = function( testFiles ) {
	var i , iMax ;

	if ( ! Array.isArray( testFiles ) || ! testFiles.length ) { testFiles = cli.testFilesFromPackage() ; }
	else { testFiles = cli.expandTestFiles( testFiles ) ; }

	// Load all test files
	try {
		for ( i = 0 , iMax = testFiles.length ; i < iMax ; i ++ ) {
			require( testFiles[ i ] ) ;
		}
	}
	catch ( error ) {
		cli.exitError( "Error in the test file '" + testFiles[ i ] + "':\n%E\n" , error ) ;
	}
} ;

// Expand using glob on all command line file arguments
cli.expandTestFiles = function( testFiles_ ) {
	var i , iMax , testFiles = [] ;

	for ( i = 0 , iMax = testFiles_.length ; i < iMax ; i ++ ) {
		testFiles = testFiles.concat( glob.sync( process.cwd() + '/' + testFiles_[ i ] ) ) ;
	}

	return testFiles ;
} ;

// Get files using package.json
cli.testFilesFromPackage = function() {
	var package_ ;

	// Require the package.json (mandatory)
	try {
		package_ = require( process.cwd() + '/package.json' ) ;
	}
	catch ( error ) {
		if ( error.code === 'MODULE_NOT_FOUND' ) { cli.exitError( "No package.json found.\n" ) ; }
		else { cli.exitError( "Error in the package.json: %E\n" , error ) ; }
	}

	// Get the bench directory
	if ( ! package_.directories || ! package_.directories.test ) {
		cli.exitError( "The package.json miss a directories.test path, set to the directory containing test files.\n" ) ;
	}

	return glob.sync( process.cwd() + '/' + package_.directories.test + '/*js' ) ;
} ;

cli.createReporters = function( teaTime , reporters ) {
	var i , iMax , reporter ;

	for ( i = 0 , iMax = reporters.length ; i < iMax ; i ++ ) {
		reporter = reporters[ i ] ;

		try {
			if ( reporter.indexOf( '/' ) === -1 && reporter.indexOf( '.' ) === -1 ) {
				// No slash and no dot: this is a built-in reporter
				reporter = './reporters/' + reporter + '.js' ;
			}
			else if ( ! path.isAbsolute( reporter ) ) {
				reporter = process.cwd() + '/' + reporter ;
			}

			require( reporter )( teaTime ) ;
		}
		catch ( error ) {
			// Continue on error, simply skip this reporter
			console.error( "Error loading this reporter:" , reporter , error ) ;
		}
	}
} ;

cli.exitError = function( ... args ) {
	var message = string.format( ... args ) ;
	term.bold.red( message ) ;
	process.exit( 1 ) ;
} ;

cli.createWebSocketServer = function( teaTime , port ) {
	var server = new ws.Server( { port: port } ) ;

	server.on( 'connection' , ( websocket , upgradeReq ) => {

		//console.log( 'client connected:' , string.inspect( { depth: 4 , style: 'color' } , websocket ) ) ;
		var ok = 0 , fail = 0 , skip = 0 ;
		var token = upgradeReq.url.slice( 1 ) ;

		//console.log( 'Client connected:' , token ) ;

		if ( teaTime.acceptTokens ) {
			if ( ! teaTime.acceptTokens[ token ] ) {
				//console.log( 'Client rejected: token not authorized' ) ;
				websocket.close() ;
				return ;
			}

			delete teaTime.acceptTokens[ token ] ;
		}

		websocket.on( 'message' , ( message ) => {

			//console.log('received: %s', message ) ;

			try {
				message = JSON.parse( message ) ;
				cli.restorePrototype( message.args ) ;
			}
			catch ( error ) {
				console.error( 'Parse error (client data): ' + error ) ;
				return ;
			}

			//console.log( [ message.event ].concat( message.args ) ) ;

			if ( message.event === 'exit' ) {
				//console.log( 'exit event!!!' ) ;
				teaTime.emit( 'exit' , () => {
					//console.log( 'wsClientExit event!!!' ) ;
					teaTime.emit( 'wsClientExit' , ok , fail , skip ) ;
				} ) ;
			}
			if ( message.event === 'report' ) {
				// Catch ok/fail/skip values
				ok = message.args[ 0 ] ;
				fail = message.args[ 1 ] ;
				skip = message.args[ 2 ] ;
				teaTime.emit( ... [ message.event ].concat( message.args ) ) ;
			}
			else {
				teaTime.emit( ... [ message.event ].concat( message.args ) ) ;
			}
		} ) ;
	} ) ;
} ;

cli.openBrowser = function( teaTime , exePath , htmlPath , options ) {
	var token , qs , url , execOptions = {} ;

	token = path.basename( exePath.split( ' ' )[ 0 ] ) + Math.floor( Math.random() * 1000000 ) ;

	if ( ! teaTime.acceptTokens ) { teaTime.acceptTokens = {} ; }

	teaTime.acceptTokens[ token ] = true ;

	if ( options.clientReporters.indexOf( 'websocket' ) === -1 ) {
		// Force the websocket reporter for the client, it is this reporter that connect back to the CLI
		options.clientReporters.push( 'websocket' ) ;
	}

	qs = tree.extend( {} , {} , options , {
		reporter: options.clientReporters ,
		grep: options.sourceGrep ,
		igrep: options.sourceIGrep ,
		token: token
	} ) ;

	delete qs.onceUncaughtException ;
	delete qs.offUncaughtException ;
	delete qs.reporters ;
	delete qs.clientReporters ;
	delete qs.sourceGrep ;
	delete qs.sourceIGrep ;

	qs = '?' + querystring.stringify( qs ) ;
	url = 'file://' + htmlPath + qs ;

	exec( exePath + ' ' + string.escape.shellArg( url ) , execOptions , ( error , stdout , stderr ) => {

		if ( error ) {
			console.error( "Browser ERROR:" , error ) ;
			process.exit( 1 ) ;
		}
		//console.log( "Browser STDOUT:" , stdout ) ;
		//console.log( "Browser STDERR:" , stderr ) ;
	} ) ;

	teaTime.on( 'wsClientExit' , ( ok , fail , skip ) => {
		process.exit( fail ? 1 : 0 ) ;
	} ) ;
} ;

cli.restorePrototype = function( object ) {
	var i , iMax , keys ;

	if ( ! object || typeof object !== 'object' ) { return ; }

	if ( Array.isArray( object ) ) {
		for ( i = 0 , iMax = object.length ; i < iMax ; i ++ ) {
			cli.restorePrototype( object[ i ] ) ;
		}

		return ;
	}

	if ( object.__prototype ) {
		// Hacky, but well...
		// Data are transmited using JSON, so we lost the actual prototype
		// in the serialization/unserialization process.
		object.__proto__ = global[ object.__prototype ].prototype ;
	}

	keys = Object.keys( object ) ;

	for ( i = 0 , iMax = keys.length ; i < iMax ; i ++ ) {
		cli.restorePrototype( object[ keys[ i ] ] ) ;
	}
} ;


text:
<?php

namespace tests\codeception\common\_support;

use tests\codeception\common\fixtures\PostFixture;
use tests\codeception\common\fixtures\UserFixture;
use Codeception\Module;
use yii\test\FixtureTrait;

/**
 * This helper is used to populate database with needed fixtures before any tests should be run.
 * For example - populate database with demo login user that should be used in acceptance and functional tests.
 * All fixtures will be loaded before suite will be starded and unloaded after it.
 */
class FixtureHelper extends Module
{

    /**
     * Redeclare visibility because codeception includes all public methods that not starts from "_"
     * and not excluded by module settings, in actor class.
     */
    use FixtureTrait {
        loadFixtures as protected;
        fixtures as protected;
        globalFixtures as protected;
        unloadFixtures as protected;
        getFixtures as protected;
        getFixture as protected;
    }

    /**
     * Method called before any suite tests run. Loads User fixture login user
     * to use in acceptance and functional tests.
     * @param array $settings
     */
    public function _beforeSuite($settings = [])
    {
        $this->loadFixtures();
    }

    /**
     * Method is called after all suite tests run
     */
    public function _afterSuite()
    {
        $this->unloadFixtures();
    }

    /**
     * @inheritdoc
     */
    public function fixtures()
    {
        return [
            'user' => [
                'class' => UserFixture::className(),
                'dataFile' => '@tests/codeception/common/fixtures/data/init_login.php',
            ],
            'post' => [
                'class' => PostFixture::className(),
            ],
        ];
    }
}


text:
@interface YahooWeatherRequestCenter : TCHTTPRequestCenter

- (id<TCHTTPRequest>)fetchWeatherForWOEID:(NSString *)woeiID beforeRun:(void(^)(id<TCHTTPRequest> request))beforeRun;

@end


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package app.models;

import app.App;
import app.susport.contact.Component;
import app.susport.contact.IModel;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author gami
 */
public class Offer implements IModel ,Component{

    /**
     * empty offer object
     */
    public Offer() {
    }

    public Offer(int id, int discount_price) {
        this.ID = id;
        this.discount_price = discount_price;
    }
    /**
     * Create object and fetch his other attribute form database
     * @param id
     * @throws SQLException
     */
    public Offer(int id) throws SQLException {
        ArrayList<HashMap<String, Object>> rows = App.select(this.getTable(), this.getAttributes(), " ID = " + id, null, null, 1);
        if (!rows.isEmpty()) {
            this.HashMapLoad(rows.get(0));
        }
    }
    /**
     * Make offer by offermap key/value
     * @param offerMap
     */
    public Offer(HashMap<String, Object> offerMap) {
        this.HashMapLoad(offerMap);
    }

    /**
     * Get Offers
     *
     * @param condition
     * @param orderby
     * @param order
     * @param limit
     * @return
     * @throws SQLException
     */
    public static ArrayList<Offer> get(String condition, String orderby, String order, int limit) throws SQLException {
        ArrayList<HashMap<String, Object>> rows = App.select("offers", null, condition, orderby, order, limit);
        if (rows == null || rows.isEmpty()) {
            return new ArrayList<>();
        }
        ArrayList<Offer> resultOffers = new ArrayList<>();
        for (int index = 0; index < rows.size(); index++) {
            resultOffers.add(new Offer(rows.get(index)));
        }
        return resultOffers;
    }

    /**
     *
     * @param condition
     * @param orderby
     * @param order
     * @return
     * @throws SQLException
     */
    public static ArrayList<Offer> get(String condition, String orderby, String order) throws SQLException {
        return Offer.get(condition, orderby, order, 30);
    }

    /**
     *
     * @param condition
     * @param orderby
     * @return
     * @throws SQLException
     */
    public static ArrayList<Offer> get(String condition, String orderby) throws SQLException {
        return Offer.get(condition, orderby, "ASC", 30);
    }

    /**
     *
     * @param condition
     * @return
     * @throws SQLException
     */
    public static ArrayList<Offer> get(String condition) throws SQLException {
        return Offer.get(condition, null, null, 30);
    }

    /**
     *
     * @return  table name
     */
    @Override
    public String getTable() {
        return "offers";
    }

    /**
     *
     * @return get fetch column name
     */
    @Override
    public ArrayList getAttributes() {
        ArrayList attributes = new ArrayList();
        attributes.add("ID");
        attributes.add("created_at");
        attributes.add("discount_price");
        attributes.add("user_id");
        return attributes;
    }

    /**
     * @return offerDiscount
     */
     @Override
    public double cost() {
       return 0-this.discount_price;
    }
    /**
     * Load Attribute
     *
     * @param
     */
    private void HashMapLoad(HashMap<String, Object> userMap) {
        if (userMap == null || userMap.isEmpty()) {
            return;
        }
        if (userMap.containsKey("ID")) {
            this.ID = (int) userMap.get("ID");
        }
        if (userMap.containsKey("created_at")) {
            this.created_at = (Timestamp.valueOf(userMap.get("created_at").toString()));
        }
        if (userMap.containsKey("user_id")) {
            if (userMap.get("user_id") == null) {
                this.user_id = 0;
            } else {
                this.user_id = Integer.parseInt(userMap.get("user_id").toString());
            }
        }

        if (userMap.containsKey("discount_price")) {
            if (userMap.get("discount_price") == null) {
                this.discount_price = 0;
            } else {
                this.discount_price = Integer.parseInt(userMap.get("discount_price").toString());
            }
        }

    }

    public ArrayList att() {
        ArrayList attributes = new ArrayList();

        attributes.add("name");
        attributes.add("discount_price");
        attributes.add("user_id");
        return attributes;
    }

    public void makeOffer(String name, double discount_price, int user_id) {
        ArrayList values = new ArrayList();
        values.add(name);
        values.add(discount_price);
        values.add(user_id);

        //App.getConnectDatabase();
        try {
            App.AddRow(this.getTable(), this.att(), values);
        } catch (SQLException ex) {
            Logger.getLogger(Offer.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

    public ArrayList showOffer() throws SQLException {
        ArrayList attribute = new ArrayList();
        attribute.add("ID");
        attribute.add("discount_price");

        ArrayList offers = App.select(this.getTable(), attribute, null);
        return offers;

    }
    public int getID() {
        return ID;
    }

    public int getUser_id() {
        return user_id;
    }

    public int getDiscount_price() {
        return discount_price;
    }

    public Timestamp getCreated_at() {
        return created_at;
    }

    private int discount_price;

    private Timestamp created_at;

    public void setID(int ID) {
        this.ID = ID;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public void setDiscount_price(int discount_price) {
        this.discount_price = discount_price;
    }

    public void setCreated_at(Timestamp created_at) {
        this.created_at = created_at;
    }
    private int ID;
    private int user_id;

}


text:
Reference API
=============

.. toctree::
   :maxdepth: 1

   analysis
   backend
   interface
   ipc
   plotting
   utils


text:
package com.yc.temp;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.cn.yc.utils.GsonUtils;
import com.cn.yc.utils.JsonUtils;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebResponse;

public class aa {

	public static void main(String[] args) {
		WebClient client = new WebClient();
		Page page;
		String skuId = "2341892";
		try {
			page = client.getPage("http://p.3.cn/prices/mgets?skuIds=J_"+skuId+"%2C");
			WebResponse response = page.getWebResponse();
			if (response.getContentType().equals("application/json")) {
			 String json = response.getContentAsString();
			 //System.out.println(json);//json.getClass().getName()
			 List list =  GsonUtils.parseDataToList(json);
			 for(int i = 0 ; i < list.size() ; i++){
				 if(list.get(i) instanceof Map){
					 Map m = (Map) list.get(i);
					 System.out.println(m.get("p"));
				 }
			 }
			}
		} catch (FailingHttpStatusCodeException | IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}


text:
Group chats
---------------------------------------------------------------------------
Team chat for when you have a certain job.
e.g. with the default police group chat, police officers, chiefs and mayors can
talk to one another through /g or team chat.

HOW TO MAKE A GROUP CHAT:
Simple method:
GAMEMODE:AddGroupChat(List of team variables separated by comma)

Advanced method:
GAMEMODE:AddGroupChat(a function with ply as argument that returns whether a random player is in one chat group)
This is for people who know how to script Lua.

---------------------------------------------------------------------------]]
-- Example: GAMEMODE:AddGroupChat(TEAM_MOB, TEAM_GANG)
-- Example: GAMEMODE:AddGroupChat(function(ply) return ply:isCP() end)


text:
package com.opengamma.engine.function;

/**
 * Special case of function implementation that is never executed by the graph executor but is used to source market data. It will not be considered directly during graph construction; the singleton
 * instance is associated with DependencyNode objects to act as a marker on the node.
 * <p>
 * This should never be present in a function repository as it should never be selected for execution.
 */
public final class MarketDataSourcingFunction extends IntrinsicFunction {

  /**
   * Singleton instance.
   */
  public static final MarketDataSourcingFunction INSTANCE = new MarketDataSourcingFunction();

  /**
   * Function unique ID.
   */
  public static final String UNIQUE_ID = "MarketDataSourcingFunction";

  private MarketDataSourcingFunction() {
    super(UNIQUE_ID);
  }

}


text:
from __future__ import unicode_literals, division, absolute_import
from builtins import *  # noqa pylint: disable=unused-import, redefined-builtin

import logging
from datetime import datetime, timedelta

from flexget import db_schema, plugin
from flexget.event import event
from flexget.manager import Session
from flexget.utils.database import entry_synonym
from sqlalchemy import Column, String, Unicode, Boolean, Integer, DateTime

log = logging.getLogger('pending_approval')
Base = db_schema.versioned_base('pending_approval', 0)

class PendingEntry(Base):
    __tablename__ = 'pending_entries'

    id = Column(Integer, primary_key=True, autoincrement=True, nullable=False)
    task_name = Column(Unicode)
    title = Column(Unicode)
    url = Column(String)
    approved = Column(Boolean)
    _json = Column('json', Unicode)
    entry = entry_synonym('_json')
    added = Column(DateTime, default=datetime.now)

    def __init__(self, task_name, entry):
        self.task_name = task_name
        self.title = entry['title']
        self.url = entry['url']
        self.approved = False
        self.entry = entry

    def __repr__(self):
        return '<PendingEntry(task_name={},title={},url={},approved={})>' \
            .format(self.task_name, self.title, self.url, self.approved)

    def to_dict(self):
        return {
            'id': self.id,
            'task_name': self.task_name,
            'title': self.title,
            'url': self.url,
            'approved': self.approved,
            'added': self.added
        }

class PendingApproval(object):
    schema = {'type': 'boolean',
              'deprecated': 'pending_approval is deprecated, switch to using pending_list'}

    @staticmethod
    def _item_query(entry, task, session):
        return session.query(PendingEntry) \
            .filter(PendingEntry.task_name == task.name) \
            .filter(PendingEntry.title == entry['title']) \
            .filter(PendingEntry.url == entry['url']) \
            .first()

    def on_task_input(self, task, config):
        if not config:
            return

        approved_entries = []
        with Session() as session:
            for approved_entry in session.query(PendingEntry) \
                    .filter(PendingEntry.task_name == task.name) \
                    .filter(PendingEntry.approved == True) \
                    .all():
                e = approved_entry.entry
                e['approved'] = True
                e['immortal'] = True
                approved_entries.append(e)

        return approved_entries

    # Run after all other filters
    @plugin.priority(-255)
    def on_task_filter(self, task, config):
        if not config:
            return

        with Session() as session:
            for entry in task.entries:
                # Cache all new task entries
                if entry.get('approved'):
                    entry.accept('entry is marked as approved')
                elif not self._item_query(entry, task, session):
                    log.verbose('creating new pending entry %s', entry)
                    session.add(PendingEntry(task_name=task.name, entry=entry))
                    entry.reject('new unapproved entry, caching and waiting for approval')

    def on_task_learn(self, task, config):
        if not config:
            return
        with Session() as session:
            # Delete all accepted entries that have passed the pending phase
            for entry in task.accepted:
                if entry.get('approved'):
                    db_entry = self._item_query(entry, task, session)
                    if db_entry and db_entry.approved:
                        log.debug('deleting approved entry %s', db_entry)
                        session.delete(db_entry)

@event('manager.db_cleanup')
def db_cleanup(manager, session):
    # Clean unapproved entries older than 1 year
    deleted = session.query(PendingEntry).filter(PendingEntry.added < datetime.now() - timedelta(days=365)).delete()
    if deleted:
        log.info('Purged %i pending entries older than 1 year', deleted)

def list_pending_entries(session, task_name=None, approved=None, start=None, stop=None, sort_by='added',
                         descending=True):
    log.debug('querying pending entries')
    query = session.query(PendingEntry)
    if task_name:
        query = query.filter(PendingEntry.task_name == task_name)
    if approved is not None:
        query = query.filter(PendingEntry.approved == approved)
    if descending:
        query = query.order_by(getattr(PendingEntry, sort_by).desc())
    else:
        query = query.order_by(getattr(PendingEntry, sort_by))
    return query.slice(start, stop).all()

def get_entry_by_id(session, entry_id):
    return session.query(PendingEntry).filter(PendingEntry.id == entry_id).one()

@event('plugin.register')
def register_plugin():
    plugin.register(PendingApproval, 'pending_approval', api_ver=2)


text:
package org.kodejava.example.util;

import java.util.ArrayList;
import java.util.List;

public class ArrayListContainsExample {
    private List<String> list = new ArrayList<>();

    public ArrayListContainsExample() {
        list.add("Item 1");
        list.add("Item 2");
        list.add("Item 3");
        list.add("Item 4");
    }

    public static void main(String[] args) {
        ArrayListContainsExample demo = new ArrayListContainsExample();

        // Check to see if the list contains "Item 1".
        String itemToFind = "Item 1";
        demo.findItemInTheList(itemToFind);

        // Check to see if the list contains "Item 20".
        itemToFind = "Item 20";
        demo.findItemInTheList(itemToFind);
    }

    private void findItemInTheList(String itemToFind) {
        if (list.contains(itemToFind)) {
            System.out.println(itemToFind + " was found in the list");
        } else {
            System.out.println(itemToFind + " was not found in the list");
        }
    }
}


text:
require 'formula'

class Md5deep < Formula
  homepage 'http://md5deep.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/md5deep/md5deep/md5deep-4.3/md5deep-4.3.tar.gz'
  sha1 'b9dd6444f07c9fc344ebef201baebdf71bda337f'

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make install"
  end

  test do
    system bin/"md5deep", "-h"
    system bin/"hashdeep", "-h"
  end
end


text:
"""Support for MQTT discovery."""
import asyncio
from collections import deque
import functools
import json
import logging
import re
import time

from homeassistant.const import CONF_DEVICE, CONF_PLATFORM
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import RESULT_TYPE_ABORT
from homeassistant.helpers.dispatcher import (
    async_dispatcher_connect,
    async_dispatcher_send,
)
from homeassistant.loader import async_get_mqtt

from .. import mqtt
from .abbreviations import ABBREVIATIONS, DEVICE_ABBREVIATIONS
from .const import (
    ATTR_DISCOVERY_HASH,
    ATTR_DISCOVERY_PAYLOAD,
    ATTR_DISCOVERY_TOPIC,
    DOMAIN,
)

_LOGGER = logging.getLogger(__name__)

TOPIC_MATCHER = re.compile(
    r"(?P<component>\w+)/(?:(?P<node_id>[a-zA-Z0-9_-]+)/)"
    r"?(?P<object_id>[a-zA-Z0-9_-]+)/config"
)

SUPPORTED_COMPONENTS = [
    "alarm_control_panel",
    "binary_sensor",
    "camera",
    "climate",
    "cover",
    "device_automation",
    "device_tracker",
    "fan",
    "humidifier",
    "light",
    "lock",
    "number",
    "scene",
    "select",
    "sensor",
    "switch",
    "tag",
    "vacuum",
]

ALREADY_DISCOVERED = "mqtt_discovered_components"
PENDING_DISCOVERED = "mqtt_pending_components"
CONFIG_ENTRY_IS_SETUP = "mqtt_config_entry_is_setup"
DATA_CONFIG_ENTRY_LOCK = "mqtt_config_entry_lock"
DATA_CONFIG_FLOW_LOCK = "mqtt_discovery_config_flow_lock"
DISCOVERY_UNSUBSCRIBE = "mqtt_discovery_unsubscribe"
INTEGRATION_UNSUBSCRIBE = "mqtt_integration_discovery_unsubscribe"
MQTT_DISCOVERY_UPDATED = "mqtt_discovery_updated_{}"
MQTT_DISCOVERY_NEW = "mqtt_discovery_new_{}_{}"
MQTT_DISCOVERY_DONE = "mqtt_discovery_done_{}"
LAST_DISCOVERY = "mqtt_last_discovery"

TOPIC_BASE = "~"

def clear_discovery_hash(hass, discovery_hash):
    """Clear entry in ALREADY_DISCOVERED list."""
    del hass.data[ALREADY_DISCOVERED][discovery_hash]

def set_discovery_hash(hass, discovery_hash):
    """Clear entry in ALREADY_DISCOVERED list."""
    hass.data[ALREADY_DISCOVERED][discovery_hash] = {}

class MQTTConfig(dict):
    """Dummy class to allow adding attributes."""

async def async_start(  # noqa: C901
    hass: HomeAssistant, discovery_topic, config_entry=None
) -> None:
    """Start MQTT Discovery."""
    mqtt_integrations = {}

    async def async_discovery_message_received(msg):
        """Process the received message."""
        hass.data[LAST_DISCOVERY] = time.time()
        payload = msg.payload
        topic = msg.topic
        topic_trimmed = topic.replace(f"{discovery_topic}/", "", 1)
        match = TOPIC_MATCHER.match(topic_trimmed)

        if not match:
            if topic_trimmed.endswith("config"):
                _LOGGER.warning(
                    "Received message on illegal discovery topic '%s'", topic
                )
            return

        component, node_id, object_id = match.groups()

        if component not in SUPPORTED_COMPONENTS:
            _LOGGER.warning("Integration %s is not supported", component)
            return

        if payload:
            try:
                payload = json.loads(payload)
            except ValueError:
                _LOGGER.warning("Unable to parse JSON %s: '%s'", object_id, payload)
                return

        payload = MQTTConfig(payload)

        for key in list(payload):
            abbreviated_key = key
            key = ABBREVIATIONS.get(key, key)
            payload[key] = payload.pop(abbreviated_key)

        if CONF_DEVICE in payload:
            device = payload[CONF_DEVICE]
            for key in list(device):
                abbreviated_key = key
                key = DEVICE_ABBREVIATIONS.get(key, key)
                device[key] = device.pop(abbreviated_key)

        if TOPIC_BASE in payload:
            base = payload.pop(TOPIC_BASE)
            for key, value in payload.items():
                if isinstance(value, str) and value:
                    if value[0] == TOPIC_BASE and key.endswith("topic"):
                        payload[key] = f"{base}{value[1:]}"
                    if value[-1] == TOPIC_BASE and key.endswith("topic"):
                        payload[key] = f"{value[:-1]}{base}"

        # If present, the node_id will be included in the discovered object id
        discovery_id = " ".join((node_id, object_id)) if node_id else object_id
        discovery_hash = (component, discovery_id)

        if payload:
            # Attach MQTT topic to the payload, used for debug prints
            setattr(payload, "__configuration_source__", f"MQTT (topic: '{topic}')")
            discovery_data = {
                ATTR_DISCOVERY_HASH: discovery_hash,
                ATTR_DISCOVERY_PAYLOAD: payload,
                ATTR_DISCOVERY_TOPIC: topic,
            }
            setattr(payload, "discovery_data", discovery_data)

            payload[CONF_PLATFORM] = "mqtt"

        if discovery_hash in hass.data[PENDING_DISCOVERED]:
            pending = hass.data[PENDING_DISCOVERED][discovery_hash]["pending"]
            pending.appendleft(payload)
            _LOGGER.info(
                "Component has already been discovered: %s %s, queuing update",
                component,
                discovery_id,
            )
            return

        await async_process_discovery_payload(component, discovery_id, payload)

    async def async_process_discovery_payload(component, discovery_id, payload):

        _LOGGER.debug("Process discovery payload %s", payload)
        discovery_hash = (component, discovery_id)
        if discovery_hash in hass.data[ALREADY_DISCOVERED] or payload:

            async def discovery_done(_):
                pending = hass.data[PENDING_DISCOVERED][discovery_hash]["pending"]
                _LOGGER.debug("Pending discovery for %s: %s", discovery_hash, pending)
                if not pending:
                    hass.data[PENDING_DISCOVERED][discovery_hash]["unsub"]()
                    hass.data[PENDING_DISCOVERED].pop(discovery_hash)
                else:
                    payload = pending.pop()
                    await async_process_discovery_payload(
                        component, discovery_id, payload
                    )

            if discovery_hash not in hass.data[PENDING_DISCOVERED]:
                hass.data[PENDING_DISCOVERED][discovery_hash] = {
                    "unsub": async_dispatcher_connect(
                        hass,
                        MQTT_DISCOVERY_DONE.format(discovery_hash),
                        discovery_done,
                    ),
                    "pending": deque([]),
                }

        if discovery_hash in hass.data[ALREADY_DISCOVERED]:
            # Dispatch update
            _LOGGER.info(
                "Component has already been discovered: %s %s, sending update",
                component,
                discovery_id,
            )
            async_dispatcher_send(
                hass, MQTT_DISCOVERY_UPDATED.format(discovery_hash), payload
            )
        elif payload:
            # Add component
            _LOGGER.info("Found new component: %s %s", component, discovery_id)
            hass.data[ALREADY_DISCOVERED][discovery_hash] = None

            config_entries_key = f"{component}.mqtt"
            async with hass.data[DATA_CONFIG_ENTRY_LOCK]:
                if config_entries_key not in hass.data[CONFIG_ENTRY_IS_SETUP]:
                    if component == "device_automation":
                        # Local import to avoid circular dependencies
                        # pylint: disable=import-outside-toplevel
                        from . import device_automation

                        await device_automation.async_setup_entry(hass, config_entry)
                    elif component == "tag":
                        # Local import to avoid circular dependencies
                        # pylint: disable=import-outside-toplevel
                        from . import tag

                        await tag.async_setup_entry(hass, config_entry)
                    else:
                        await hass.config_entries.async_forward_entry_setup(
                            config_entry, component
                        )
                    hass.data[CONFIG_ENTRY_IS_SETUP].add(config_entries_key)

            async_dispatcher_send(
                hass, MQTT_DISCOVERY_NEW.format(component, "mqtt"), payload
            )
        else:
            # Unhandled discovery message
            async_dispatcher_send(
                hass, MQTT_DISCOVERY_DONE.format(discovery_hash), None
            )

    hass.data[DATA_CONFIG_ENTRY_LOCK] = asyncio.Lock()
    hass.data[DATA_CONFIG_FLOW_LOCK] = asyncio.Lock()
    hass.data[CONFIG_ENTRY_IS_SETUP] = set()

    hass.data[ALREADY_DISCOVERED] = {}
    hass.data[PENDING_DISCOVERED] = {}

    discovery_topics = [
        f"{discovery_topic}/+/+/config",
        f"{discovery_topic}/+/+/+/config",
    ]
    hass.data[DISCOVERY_UNSUBSCRIBE] = await asyncio.gather(
        *(
            mqtt.async_subscribe(hass, topic, async_discovery_message_received, 0)
            for topic in discovery_topics
        )
    )

    hass.data[LAST_DISCOVERY] = time.time()
    mqtt_integrations = await async_get_mqtt(hass)

    hass.data[INTEGRATION_UNSUBSCRIBE] = {}

    for (integration, topics) in mqtt_integrations.items():

        async def async_integration_message_received(integration, msg):
            """Process the received message."""
            key = f"{integration}_{msg.subscribed_topic}"

            # Lock to prevent initiating many parallel config flows.
            # Note: The lock is not intended to prevent a race, only for performance
            async with hass.data[DATA_CONFIG_FLOW_LOCK]:
                # Already unsubscribed
                if key not in hass.data[INTEGRATION_UNSUBSCRIBE]:
                    return

                data = {
                    "topic": msg.topic,
                    "payload": msg.payload,
                    "qos": msg.qos,
                    "retain": msg.retain,
                    "subscribed_topic": msg.subscribed_topic,
                    "timestamp": msg.timestamp,
                }
                result = await hass.config_entries.flow.async_init(
                    integration, context={"source": DOMAIN}, data=data
                )
                if (
                    result
                    and result["type"] == RESULT_TYPE_ABORT
                    and result["reason"]
                    in ("already_configured", "single_instance_allowed")
                ):
                    unsub = hass.data[INTEGRATION_UNSUBSCRIBE].pop(key, None)
                    if unsub is None:
                        return
                    unsub()

        for topic in topics:
            key = f"{integration}_{topic}"
            hass.data[INTEGRATION_UNSUBSCRIBE][key] = await mqtt.async_subscribe(
                hass,
                topic,
                functools.partial(async_integration_message_received, integration),
                0,
            )

async def async_stop(hass: HomeAssistant) -> None:
    """Stop MQTT Discovery."""
    if DISCOVERY_UNSUBSCRIBE in hass.data:
        for unsub in hass.data[DISCOVERY_UNSUBSCRIBE]:
            unsub()
        hass.data[DISCOVERY_UNSUBSCRIBE] = []
    if INTEGRATION_UNSUBSCRIBE in hass.data:
        for key, unsub in list(hass.data[INTEGRATION_UNSUBSCRIBE].items()):
            unsub()
            hass.data[INTEGRATION_UNSUBSCRIBE].pop(key)


text:
from floppy.node import Node, Input, Output, Tag, abstractNode
from floppy.FloppyTypes import StructureInfo, Atom
import time
import random
import subprocess

class AMyNode(Node):
    Input('Inta', int)
    Input('Intb', int)
    Input('Int1', int, select=[1,2,3,4])
    Input('Int3', int, select=[1,2,3,4])
    Output('Int2', int)

    def run(self):
        self._Int1
        self._Int2(self._Int1 + 1)

class FakeWorkNode(Node):
    Input('inp', object)
    Output('out', object)

    def run(self):
        print('Working @ {}'.format(str(self._inp)))
        time.sleep(random.randrange(1,5))
        print('Done')
        # self._return('Test Return Value')

class IncrementNode(Node):
    Output('Integer', int)

    def setup(self):
        self.i = 0

    def run(self):
        self._Integer(self.i)
        self.i += 1

class RandomFloat(Node):
    Output('Float', float)

    def run(self):
        self._Float(random.random())

class RunProgram(Node):
    """
    Node for calling an external program of given name and given command line arguments.
    Returns the program's return value and its stdout output.
    """
    Input('ProgramName', str)
    Input('Arguments', str)
    Output('ReturnValue', int)
    Output('StdOut', str)

    def run(self):
        programName = self._ProgramName
        args = [programName] + self._Arguments.split()
        r = 0
        try:
            out = subprocess.check_output(args, shell=True)
        except subprocess.CalledProcessError as e:
            out = ''
            r = e[-1]
        self._ReturnValue(r)
        self._StdOut(out)

class Range(Node):
    Input('EndValue', int)
    Output('ValueList', int, list=True)
    def run(self):
        self._ValueList(list(range(self._EndValue)))

class Int2Str(Node):
    Input('Int', int)
    Output('Str', str)
    def run(self):
        self._Str(str(self._Int))

class PlotNode2(Node):
    Input('XX', str)
    Output('YY', str)

    def __init__(self, *args, **kwargs):
        super(PlotNode2, self).__init__(*args, **kwargs)
        self.time = time.time()
        self.points = []
        self.counts = 0

    def check(self):
        t = time.time()
        if t - self.time > 3:
            self.time = t
            return True

    def run(self):
        super(PlotNode2, self).run()
        self.counts += 1
        self.points.append(
            (self.counts, (random.randint(5, 20), random.randint(5, 20), random.randint(5, 20), random.randint(5, 20))))

    def report(self):
        r = super(PlotNode2, self).report()
        r['template'] = 'PlotTemplate'
        r['points'] = self.points[:]
        r['keep'] = 'points'
        self.points = []
        return r


text:
package com.detox.example.detoxexample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    private TextView mTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        Button helloButton = (Button) findViewById(R.id.helloButton);
        Button worldButton = (Button) findViewById(R.id.worldButton);
        mTextView = (TextView) findViewById(R.id.textView);

        setOnClickListener(helloButton, getString(R.string.hello));
        setOnClickListener(worldButton, getString(R.string.world));
    }

    private void setOnClickListener(final Button button, final String text) {
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mTextView.setText(text);
            }
        });
    }
}


text:
aodh
====

Aodh is the alarming service for OpenStack.

-------------
Documentation
-------------

Documentation for the project can be found at:
  https://docs.openstack.org/aodh/latest/

Release notes can be read online at:
  https://docs.openstack.org/aodh/latest/contributor/releasenotes/index.html

Code Repository
---------------

- Server: https://opendev.org/openstack/aodh/

Bug Tracking
------------

Bugs and feature requests are tracked on Launchpad at:
  https://bugs.launchpad.net/aodh/

IRC
---

IRC Channel: #openstack-telemetry on `OFTC`_.

.. _OFTC: https://oftc.net/


text:
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <property name="jnlp.title"    value="JST JustifiedLabel" />
  <property name="jnlp.Name"     value="JustifiedLabel" />
  <property name="jnlp.name"     value="justifiedlabel" />
  <property name="jnlp.codebase" value="https://ateraimemo.com/swing/justifiedlabel/" />
  <property name="jnlp.homepage" value="https://ateraimemo.com/Swing/JustifiedLabel.html" />
</project>


text:
/* See license.txt for terms of usage */

@import url("tabView.css");
@import url("infoTip.css");
@import url("popupMenu.css");
@import url("toolbar.css");

@import url("pageList.css");
@import url("requestList.css");
@import url("requestBody.css");

@import url("previewMenu.css");
@import url("validationError.css");

/* Syntax Highlighter */
@import url("SyntaxHighlighter.css");


text:
<?php

declare(strict_types=1);

namespace MarcusJaschen\Collmex\Type;

/**
 * Collmex Customer Type.
 *
 * @author   Lenard Kratky <l.kratky@lakdev.de>
 *
 * @property $type_identifier
 * @property $supplier_id
 * @property $client_id
 * @property $salutation
 * @property $title
 * @property $firstname
 * @property $lastname
 * @property $company
 * @property $department
 * @property $street
 * @property $zipcode
 * @property $city
 * @property $annotation
 * @property $inactive
 * @property $country
 * @property $phone
 * @property $fax
 * @property $email
 * @property $bank_account
 * @property $bank_code
 * @property $iban
 * @property $bic
 * @property $bank_name
 * @property $tax_id
 * @property $vat_id
 * @property $terms_of_payment
 * @property $delivery_conditions
 * @property $delivery_conditions_additional
 * @property $output_medium
 * @property $bank_account_owner
 * @property $address_group_id
 * @property $supplier_customer_number
 * @property $currency
 * @property $phone_2
 * @property $output_language
 * @property $expense_account
 * @property $input_tax
 * @property $receipt_text
 * @property $cost_center
 * @property $private_person
 * @property $url
 */
class Supplier extends AbstractType implements TypeInterface
{
    public const INACTIVE_STATE_ACTIVE = 0;
    public const INACTIVE_STATE_INACTIVE = 1;
    public const INACTIVE_STATE_DELETE = 2;
    public const INACTIVE_STATE_DELETE_IF_UNUSED = 3;

    public const LANGUAGE_GERMAN = 0;
    public const LANGUAGE_ENGLISH = 1;

    /**
     * Type data template.
     *
     * @var array
     */
    protected $template = [
        'type_identifier' => 'CMXLIF',
        'supplier_id' => null,
        'client_id' => null,
        'salutation' => null,
        // 5
        'title' => null,
        'firstname' => null,
        'lastname' => null,
        'company' => null,
        'department' => null,
        // 10
        'street' => null,
        'zipcode' => null,
        'city' => null,
        'annotation' => null,
        'inactive' => null,
        // 15
        'country' => null,
        'phone' => null,
        'fax' => null,
        'email' => null,
        'bank_account' => null,
        // 20
        'bank_code' => null,
        'iban' => null,
        'bic' => null,
        'bank_name' => null,
        'tax_id' => null,
        // 25
        'vat_id' => null,
        'terms_of_payment' => null,
        'delivery_conditions' => null,
        'delivery_conditions_additional' => null,
        'output_medium' => null,
        // 30
        'bank_account_owner' => null,
        'address_group_id' => null,
        'supplier_customer_number' => null,
        'currency' => null,
        'phone_2' => null,
        // 35
        'output_language' => null,
        'expense_account' => null,
        'input_tax' => null,
        'receipt_text' => null,
        'cost_center' => null,
        // 40
        'private_person' => null,
        'url' => null,
    ];

    /**
     * Formally validates the type data in $data attribute.
     *
     * @return bool Validation success
     */
    public function validate(): bool
    {
        return true;
    }
}