text:
IB_DESIGNABLE
@interface MNDiscreteSlider : UIControl

    // Basic properties
@property (nonatomic) IBInspectable CGFloat     leftMargin;
@property (nonatomic) IBInspectable CGFloat     rightMargin;
@property (nonatomic) IBInspectable CGFloat     startValue;
@property (nonatomic) IBInspectable CGFloat     endValue;
@property (nonatomic) IBInspectable CGFloat     stepValue;
@property (nonatomic) IBInspectable BOOL        updateContinuously;
@property (nonatomic) IBInspectable BOOL        shouldRecognizeOtherGestures;

    // Slider
@property (nonatomic) IBInspectable CGFloat     sliderWidth;
@property (nonatomic) IBInspectable UIColor     *sliderColor;

    // Thumb
@property (nonatomic) IBInspectable CGFloat     thumbWidth;
@property (nonatomic) IBInspectable UIColor     *thumbColor;
@property (nonatomic) IBInspectable UIImage     *thumbImage;
@property (nonatomic) IBInspectable NSString    *valueUnit;
@property (nonatomic) IBInspectable BOOL        displayUnit;
@property (nonatomic) IBInspectable CGFloat     thumbValueOffset; // to center of thumb
@property (nonatomic) IBInspectable CGFloat     thumbUnitOffset; // to value
@property (nonatomic) IBInspectable UIFont      *thumbValueFont;
@property (nonatomic) IBInspectable UIColor     *thumbValueColor;

    // Step thumb
@property (nonatomic) IBInspectable CGFloat     stepWidth;
@property (nonatomic) IBInspectable UIColor     *stepColor;
@property (nonatomic) IBInspectable UIImage     *stepImage;

    // Tick
@property (nonatomic) IBInspectable CGFloat     tickHeight;
@property (nonatomic) IBInspectable CGFloat     tickMargin;
@property (nonatomic) IBInspectable UIColor     *tickColor;

    // Tick value
@property (nonatomic) IBInspectable NSString    *tickValueTitles; ///< Separated by comma
@property (nonatomic) IBInspectable CGFloat     tickValueMargin;
@property (nonatomic) IBInspectable UIFont      *tickValueFont;
@property (nonatomic) IBInspectable UIColor     *tickValueColor;
@property (nonatomic) IBInspectable BOOL        hideTickValueWhenSelected;

@property (nonatomic, assign) NSUInteger        selectedValueIndex;
@property (nonatomic, assign) NSString          *selectedValue;
@property (nonatomic, strong) NSArray           *valuesArray;

- (NSUInteger)indexOfValue:(NSString *)value;
- (NSString *)valueAtIndex:(NSUInteger)index;

@end


text:
@class SRTabBarButton, SRTabBar;

@protocol SRTabBarDelegate <NSObject>

- (void)tabBarSelectedBtn:(SRTabBar *)tabBar btn:(SRTabBarButton *)btn;

@end

#pragma mark - SRTabBar

@interface SRTabBar : UIView

@property (nonatomic, weak) id<SRTabBarDelegate> delegate;

- (void)addTabBarButtonWithNormalImageName:(NSString *)norName andDisabledImageName:(NSString *)disName;

@end

#pragma mark - SRTabBarButton

@interface SRTabBarButton : UIButton

@end

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/Users/tom/Documents/workspace/release/ftc_sdk/lib/FtcCommon/src/main/res/values-v14/styles.xml -->
    <eat-comment/>
    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
        <!-- API 14 theme customizations can go here. -->
    </style>
</resources>


text:
<?php

namespace krasavchegUa\ChainCommandBundle\DependencyInjection;

use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;

/**
 * Class ChainCommandExtension
 * @package krasavchegUa\ChainCommandBundle\DependencyInjection
 */
class ChainCommandExtension extends Extension
{
    /** Register all services used inside bundle
     *
     * @param array $configs
     * @param ContainerBuilder $container
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');
    }
}


text:
// Copyright 2018 Google Inc. All Rights Reserved.
//
// 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.

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;

namespace TestingHelpers
{
    public static class MsTestExtensions
    {
        public static void IsEmpty(this CollectionAssert that, IEnumerable<object> enumerable) =>
            Assert.IsFalse(enumerable.Any(), "Collection is not empty");

        public static AllAssert All(this CollectionAssert that, IEnumerable<object> enumerable) =>
            new AllAssert(enumerable);

        public class AllAssert
        {
            private readonly IEnumerable<object> _enumerable;

            public AllAssert(IEnumerable<object> enumerable)
            {
                _enumerable = enumerable;
            }

            public void AreEqualTo(object value)
            {
                foreach (object o in _enumerable)
                {
                    Assert.AreEqual(value, o);
                }
            }
        }
    }
}


text:
require 'cases/helper'
require 'models/topic'

class InvalidDateTest < ActiveRecord::TestCase
  def test_assign_valid_dates
    valid_dates = [[2007, 11, 30], [1993, 2, 28], [2008, 2, 29]]

    invalid_dates = [[2007, 11, 31], [1993, 2, 29], [2007, 2, 29]]

    valid_dates.each do |date_src|
      topic = Topic.new("last_read(1i)" => date_src[0].to_s, "last_read(2i)" => date_src[1].to_s, "last_read(3i)" => date_src[2].to_s)
      # Oracle DATE columns are datetime columns and Oracle adapter returns Time value
      if current_adapter?(:OracleAdapter)
        assert_equal(topic.last_read.to_date, Date.new(*date_src))
      else
        assert_equal(topic.last_read, Date.new(*date_src))
      end
    end

    invalid_dates.each do |date_src|
      assert_nothing_raised do
        topic = Topic.new({"last_read(1i)" => date_src[0].to_s, "last_read(2i)" => date_src[1].to_s, "last_read(3i)" => date_src[2].to_s})
        # Oracle DATE columns are datetime columns and Oracle adapter returns Time value
        if current_adapter?(:OracleAdapter)
          assert_equal(topic.last_read.to_date, Time.local(*date_src).to_date, "The date should be modified according to the behavior of the Time object")
        else
          assert_equal(topic.last_read, Time.local(*date_src).to_date, "The date should be modified according to the behavior of the Time object")
        end
      end
    end
  end
end


text:
/**
 * Variable function, so it can be called from other places
 */
var cuztomUI;

/**
 * Function with all UI functions
 * @param  element object Document
 */
(cuztomUI = function(object) {
    var object = $(object);

    // Variables
    var cuztomWysiwyg;

    // Helpers
    (cuztomWysiwyg = function() {
        if(typeof tinymce !== 'undefined') {
            $('.js-cuztom-sortable .js-cuztom-wysiwyg').each(function(){
                var editorId = $(this).attr('id');

                tinymce.execCommand('mceRemoveEditor', true, editorId);
                tinymce.execCommand('mceAddEditor', true, editorId);

                quicktags({id: editorId});
            });
        }
    })(document);

    // Datepicker
    $('.js-cuztom-datepicker', object).each(function(i, item) {
        return $(item).datetimepicker({
            scrollInput: false,
            timepicker: false,
            format: $(item).attr('data-date-format')
        });
    });

    // Timepicker
    $('.js-cuztom-timepicker', object).each(function(i, item) {
        return $(item).datetimepicker({
            scrollInput: false,
            datepicker: false,
            format: $(item).attr('data-time-format')
        });
    });

    // Datetime
    $('.js-cuztom-datetimepicker', object).each(function(i, item) {
        return $(item).datetimepicker({
            scrollInput: false,
            format: $(item).attr('data-date-format') + ' ' + $(item).attr('data-time-format'),
        });
    });

    // Colorpicker
    $('.js-cuztom-colorpicker', object).wpColorPicker();

    // Tabs
    $('.js-cuztom-tabs', object).tabs();

    // Slider
    $('.js-cuztom-slider', object ).slider();

    // Accordion
    $('.js-cuztom-accordion', object).accordion({
        heightStyle: "content"
    });

    // Sortable
    $('.js-cuztom-sortable', object).sortable({
        items: '> li',
        handle: '.js-cuztom-sortable-item-handle',
        stop: function() {
            cuztomWysiwyg();
        }
    });
})(document);


text:
package org.kie.pmml.models.clustering.model;

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

import org.assertj.core.data.Offset;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.kie.pmml.api.utils.EnumUtils.enumByName;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.BINARY_SIMILARITY;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.CHEBYCHEV;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.CITY_BLOCK;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.EUCLIDEAN;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.JACCARD;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.MINKOWSKI;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.SIMPLE_MATCHING;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.SQUARED_EUCLIDEAN;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.TANIMOTO;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.euclidean;
import static org.kie.pmml.models.clustering.model.KiePMMLAggregateFunction.squaredEuclidean;

public class KiePMMLAggregateFunctionTest {

    private static final Offset<Double> DOUBLE_OFFSET = Offset.offset(0.000000001);

    private static final List<KiePMMLClusteringField> TEST_FIELDS = new ArrayList<>(2);
    private static final KiePMMLCompareFunction TEST_COMPARE_FN = KiePMMLCompareFunction.ABS_DIFF;
    private static final Double[] TEST_INPUTS = new Double[2];
    private static final double[] TEST_SEEDS = new double[2];
    private static final double TEST_ADJUST = 1.0;

    static {
        TEST_FIELDS.add(new KiePMMLClusteringField("test1", 1.0, true, null, null));
        TEST_FIELDS.add(new KiePMMLClusteringField("test2", 1.0, true, null, null));
        TEST_INPUTS[0] = 5.0;
        TEST_INPUTS[1] = 3.0;
        TEST_SEEDS[0] = 1.0;
        TEST_SEEDS[1] = 6.0;
    }

    @Test
    public void testNames() {
        assertThat(enumByName(KiePMMLAggregateFunction.class, "euclidean")).isEqualTo(EUCLIDEAN);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "squaredEuclidean")).isEqualTo(SQUARED_EUCLIDEAN);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "chebychev")).isEqualTo(CHEBYCHEV);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "cityBlock")).isEqualTo(CITY_BLOCK);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "minkowski")).isEqualTo(MINKOWSKI);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "simpleMatching")).isEqualTo(SIMPLE_MATCHING);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "jaccard")).isEqualTo(JACCARD);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "tanimoto")).isEqualTo(TANIMOTO);
        assertThat(enumByName(KiePMMLAggregateFunction.class, "binarySimilarity")).isEqualTo(BINARY_SIMILARITY);
    }

    @Test
    public void testApply() {
        assertThat(EUCLIDEAN.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isEqualTo(euclidean(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST), DOUBLE_OFFSET);
        assertThat(SQUARED_EUCLIDEAN.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isEqualTo(squaredEuclidean(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST), DOUBLE_OFFSET);
        assertThatThrownBy(() -> CHEBYCHEV.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> CITY_BLOCK.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> MINKOWSKI.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> SIMPLE_MATCHING.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> JACCARD.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> TANIMOTO.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
        assertThatThrownBy(() -> BINARY_SIMILARITY.apply(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST))
                .isInstanceOf(UnsupportedOperationException.class);
    }

    @Test
    public void testEuclidean() {
        assertThat(euclidean(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST)).isEqualTo(5.0, DOUBLE_OFFSET);
    }

    @Test
    public void testSquaredEuclidean() {
        assertThat(squaredEuclidean(TEST_FIELDS, TEST_COMPARE_FN, TEST_INPUTS, TEST_SEEDS, TEST_ADJUST)).isEqualTo(25.0, DOUBLE_OFFSET);
    }

}


text:
<?php

namespace Magento\Catalog\Api\Data;

/**
 * @api
 */
interface ProductCustomOptionValuesInterface
{
    /**
     * Get option title
     *
     * @return string
     */
    public function getTitle();

    /**
     * Set option title
     *
     * @param string $title
     * @return $this
     */
    public function setTitle($title);

    /**
     * Get sort order
     *
     * @return int
     */
    public function getSortOrder();

    /**
     * Set sort order
     *
     * @param int $sortOrder
     * @return $this
     */
    public function setSortOrder($sortOrder);

    /**
     * Get price
     *
     * @return float
     */
    public function getPrice();

    /**
     * Set price
     *
     * @param float $price
     * @return $this
     */
    public function setPrice($price);

    /**
     * Get price type
     *
     * @return string
     */
    public function getPriceType();

    /**
     * Set price type
     *
     * @param string $priceType
     * @return $this
     */
    public function setPriceType($priceType);

    /**
     * Get Sku
     *
     * @return string|null
     */
    public function getSku();

    /**
     * Set Sku
     *
     * @param string $sku
     * @return $this
     */
    public function setSku($sku);

    /**
     * Get Option type id
     *
     * @return int|null
     */
    public function getOptionTypeId();

    /**
     * Set Option type id
     *
     * @param int $optionTypeId
     * @return int|null
     */
    public function setOptionTypeId($optionTypeId);
}


text:
package monitor

import (
	"errors"
	"fmt"
	"math"
	"sync"
	"sync/atomic"
	"syscall"
	"time"
	"unsafe"
)

var (
	// Global kernel32 DLL
	kernel32DLL = syscall.MustLoadDLL("kernel32")

	// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724400(v=vs.85).aspx
	procGetSystemTimes = kernel32DLL.MustFindProc("GetSystemTimes")
)

type CPU struct {
	User   float64
	Kernel float64
	Idle   float64
}

// Total returns the sum of user and kernel CPU time.
func (c CPU) Total() float64 {
	return c.User + c.Kernel
}

type CPUTime struct {
	previous uint64
	delta    uint64
	load     float64
}

func (c CPUTime) CPU() float64 { return c.load }

type monitorState int32

const (
	stateStopped monitorState = iota
	stateRunning
	stateExited
)

type state struct {
	val monitorState
}

func (s *state) Set(n monitorState) {
	atomic.StoreInt32((*int32)(&s.val), int32(n))
}

func (s *state) Is(n monitorState) bool {
	return atomic.LoadInt32((*int32)(&s.val)) == int32(n)
}

type Monitor struct {
	user   CPUTime
	kernel CPUTime
	idle   CPUTime
	mem    MemStat      // system memory
	tick   *time.Ticker // use tick.Stop() to stop monitoring
	err    error        // system error, if any
	inited bool         // monitor initialized
	mu     sync.RWMutex // pids mutex
	state  state
	cond   *sync.Cond // Optional sync conditional for StatsCollector
}

func New(freq time.Duration) (*Monitor, error) {
	if freq < time.Millisecond*10 {
		freq = time.Millisecond * 500
	}
	m := &Monitor{
		tick:   time.NewTicker(freq),
		inited: true,
	}
	if err := m.monitorLoop(); err != nil {
		return nil, err
	}
	return m, nil
}

// condMonitor, returns a Monitor that broadcasts on cond on each update.
func condMonitor(freq time.Duration, cond *sync.Cond) (*Monitor, error) {
	m := &Monitor{
		tick:   time.NewTicker(freq),
		inited: true,
		cond:   cond,
	}
	m.state.Set(stateRunning)
	if err := m.monitorLoop(); err != nil {
		return nil, err
	}
	return m, nil
}

func (m *Monitor) MemStat() MemStat {
	m.mu.RLock()
	mem := m.mem
	m.mu.RUnlock()
	return mem
}

func (m *Monitor) CPU() (cpu CPU, err error) {
	m.mu.RLock()
	if !m.inited {
		err = errors.New("monitor: not initialized")
	}
	if m.err != nil {
		err = m.err
	}
	cpu = CPU{
		Kernel: m.kernel.load,
		User:   m.user.load,
		Idle:   m.idle.load,
	}
	m.mu.RUnlock()
	return
}

func (m *Monitor) monitorLoop() error {
	m.state.Set(stateRunning)
	if err := m.updateSystemCPU(); err != nil {
		m.err = err
		return m.err
	}
	go func() {
		defer m.state.Set(stateExited)
		for range m.tick.C {
			// Hard error
			if err := m.updateSystemCPU(); err != nil {
				m.err = err
				return
			}
			// TODO: FIX ME
			if !m.state.Is(stateRunning) {
				continue
			}
		}
	}()
	return nil
}

func (m *Monitor) updateSystemCPU() error {
	if m.err != nil {
		return m.err
	}
	var (
		idleTime   filetime
		kernelTime filetime
		userTime   filetime
	)
	r1, _, e1 := syscall.Syscall(procGetSystemTimes.Addr(), 3,
		uintptr(unsafe.Pointer(&idleTime)),
		uintptr(unsafe.Pointer(&kernelTime)),
		uintptr(unsafe.Pointer(&userTime)),
	)
	if err := checkErrno(r1, e1); err != nil {
		m.err = fmt.Errorf("GetSystemTimes: %s", error(e1))
		return m.err
	}

	m.calculateSystemCPU(kernelTime.Uint64(), userTime.Uint64(), idleTime.Uint64())

	return nil
}

func (m *Monitor) calculateSystemCPU(kernelTicks, userTicks, idleTicks uint64) {
	m.mu.Lock()

	kernel := kernelTicks - m.kernel.previous
	user := userTicks - m.user.previous
	idle := idleTicks - m.idle.previous

	total := kernel + user
	if total > 0 {
		m.idle.load = float64(idle) / float64(total)
		m.idle.previous = idleTicks
		m.idle.delta = idle

		m.kernel.load = math.Max(float64(kernel-idle)/float64(total), 0)
		m.kernel.previous = kernelTicks
		m.kernel.delta = kernel

		m.user.load = math.Max(1-m.idle.load-m.kernel.load, 0)
		m.user.previous = userTicks
		m.user.delta = user
	} else {
		m.idle.load = 0
		m.kernel.load = 0
		m.user.load = 0
	}

	m.mu.Unlock()
}

func checkErrno(r1 uintptr, err error) error {
	if r1 == 0 {
		if e, ok := err.(syscall.Errno); ok && e != 0 {
			return err
		}
		return syscall.EINVAL
	}
	return nil
}

// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx
type filetime struct {
	LowDateTime  uint32
	HighDateTime uint32
}

func (f filetime) Uint64() uint64 {
	return uint64(f.HighDateTime)<<32 | uint64(f.LowDateTime)
}


text:
module Krypt::Asn1
  module Encoder
    module Utf8String

      module_function

      def encode_value(object, value)
        if value.encoding.ascii_compatible?
          value.dup.force_encoding(Encoding::UTF_8)
        else
          value.encode(Encoding::UTF_8)
        end
      end

    end
  end
end


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="msapplication-tap-highlight" content="no">
  <title>ChocolateChip-UI Pausing State</title>
  <link rel="stylesheet" href="./dist/css/chui-ios.css">

  <ui-screen id='main' class='current'>

Pausing State

This is an example of pausing state to prevent a bound componet from rendering. Enter a first and last name and tap Add Person. You'll see the component update because its bound to the state. Now check the Pause State checkbox, then add a new first and last name. When you tap Add Person, nothing happens. Add another first and last name and tap Add Person. Nothing happens. Now uncheck the checkbox and tap the Render Component button. You'll see the component update with the new names. The checkbox toggles the paused state of the State object. If it is not paused, the Render Component button executes the State object's "renderComponents" method.

          Pause State: <input type="checkbox" name='toggleState' id='toggleState'>
          <button id='reload'>Render Component</button>

              First Name: <input type="text" id='firstName'>

              Last Name: <input type="text" id='lastName'>

            <button id='addPerson'>Add Person</button>

Array of Objects

  </ui-screen>


text:
<?xml version="1.0"?>
<!--
Copyright (c) 2015 Kendanware

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of onegui, Kendanware nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.kendanware</groupId>
		<artifactId>onegui</artifactId>
		<version>0.0.1-SNAPSHOT</version>
	</parent>
	<artifactId>onegui-core</artifactId>
	<name>onegui-core</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
	</dependencies>
</project>


text:
package org.opencloudb;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.helpers.LogLog;

/**
 * @author mycat
 */
public final class MycatStartup {
    private static final String dateFormat = "yyyy-MM-dd HH:mm:ss";

    public static void main(String[] args) {
        try {
            // init
            MycatServer server = MycatServer.getInstance();
            server.beforeStart(dateFormat);

            // startup
            server.startup();
        } catch (Throwable e) {
            SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
            LogLog.error(sdf.format(new Date()) + " startup error", e);
            System.exit(-1);
        }
    }

}


text:
namespace net {

namespace {

class BasicNetworkDelegate : public NetworkDelegateImpl {
 public:
  BasicNetworkDelegate() {}
  ~BasicNetworkDelegate() override {}

 private:
  int OnBeforeURLRequest(URLRequest* request,
                         const CompletionCallback& callback,
                         GURL* new_url) override {
    return OK;
  }

  int OnBeforeStartTransaction(URLRequest* request,
                               const CompletionCallback& callback,
                               HttpRequestHeaders* headers) override {
    return OK;
  }

  void OnStartTransaction(URLRequest* request,
                          const HttpRequestHeaders& headers) override {}

  int OnHeadersReceived(
      URLRequest* request,
      const CompletionCallback& callback,
      const HttpResponseHeaders* original_response_headers,
      scoped_refptr<HttpResponseHeaders>* override_response_headers,
      GURL* allowed_unsafe_redirect_url) override {
    return OK;
  }

  void OnBeforeRedirect(URLRequest* request,
                        const GURL& new_location) override {}

  void OnResponseStarted(URLRequest* request) override {}

  void OnCompleted(URLRequest* request, bool started) override {}

  void OnURLRequestDestroyed(URLRequest* request) override {}

  void OnPACScriptError(int line_number, const base::string16& error) override {
  }

  NetworkDelegate::AuthRequiredResponse OnAuthRequired(
      URLRequest* request,
      const AuthChallengeInfo& auth_info,
      const AuthCallback& callback,
      AuthCredentials* credentials) override {
    return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
  }

  bool OnCanGetCookies(const URLRequest& request,
                       const CookieList& cookie_list) override {
    return true;
  }

  bool OnCanSetCookie(const URLRequest& request,
                      const std::string& cookie_line,
                      CookieOptions* options) override {
    return true;
  }

  bool OnCanAccessFile(const URLRequest& request,
                       const base::FilePath& path) const override {
    return true;
  }

  DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate);
};

// Define a context class that can self-manage the ownership of its components
// via a UrlRequestContextStorage object.
class ContainerURLRequestContext : public URLRequestContext {
 public:
  explicit ContainerURLRequestContext(
      const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner)
      : file_task_runner_(file_task_runner), storage_(this) {}
  ~ContainerURLRequestContext() override { AssertNoURLRequests(); }

  URLRequestContextStorage* storage() {
    return &storage_;
  }

  scoped_refptr<base::SingleThreadTaskRunner>& GetFileTaskRunner() {
    // Create a new thread to run file tasks, if needed.
    if (!file_task_runner_) {
      DCHECK(!file_thread_);
      file_thread_.reset(new base::Thread("Network File Thread"));
      file_thread_->StartWithOptions(
          base::Thread::Options(base::MessageLoop::TYPE_DEFAULT, 0));
      file_task_runner_ = file_thread_->task_runner();
    }
    return file_task_runner_;
  }

  void set_transport_security_persister(
      std::unique_ptr<TransportSecurityPersister>
          transport_security_persister) {
    transport_security_persister_ = std::move(transport_security_persister);
  }

 private:
  // The thread should be torn down last.
  std::unique_ptr<base::Thread> file_thread_;
  scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;

  URLRequestContextStorage storage_;
  std::unique_ptr<TransportSecurityPersister> transport_security_persister_;

  DISALLOW_COPY_AND_ASSIGN(ContainerURLRequestContext);
};

}  // namespace

URLRequestContextBuilder::HttpCacheParams::HttpCacheParams()
    : type(IN_MEMORY),
      max_size(0) {}
URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {}

URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams()
    : ignore_certificate_errors(false),
      host_mapping_rules(NULL),
      testing_fixed_http_port(0),
      testing_fixed_https_port(0),
      enable_http2(true),
      enable_quic(false),
      quic_max_server_configs_stored_in_properties(0),
      quic_delay_tcp_race(true),
      quic_max_number_of_lossy_connections(0),
      quic_prefer_aes(false),
      quic_packet_loss_threshold(1.0f),
      quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds),
      quic_close_sessions_on_ip_change(false),
      quic_migrate_sessions_on_network_change(false),
      quic_migrate_sessions_early(false),
      quic_disable_bidirectional_streams(false),
      quic_race_cert_verification(false) {}

URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams()
{}

URLRequestContextBuilder::URLRequestContextBuilder()
    : data_enabled_(false),
#if !defined(DISABLE_FILE_SUPPORT)
      file_enabled_(false),
#endif
#if !defined(DISABLE_FTP_SUPPORT)
      ftp_enabled_(false),
#endif
      http_cache_enabled_(true),
      throttling_enabled_(false),
      backoff_enabled_(false),
      sdch_enabled_(false),
      cookie_store_set_by_client_(false),
      net_log_(nullptr),
      socket_performance_watcher_factory_(nullptr) {
}

URLRequestContextBuilder::~URLRequestContextBuilder() {}

void URLRequestContextBuilder::SetHttpNetworkSessionComponents(
    const URLRequestContext* context,
    HttpNetworkSession::Params* params) {
  params->host_resolver = context->host_resolver();
  params->cert_verifier = context->cert_verifier();
  params->transport_security_state = context->transport_security_state();
  params->cert_transparency_verifier = context->cert_transparency_verifier();
  params->ct_policy_enforcer = context->ct_policy_enforcer();
  params->proxy_service = context->proxy_service();
  params->ssl_config_service = context->ssl_config_service();
  params->http_auth_handler_factory = context->http_auth_handler_factory();
  params->http_server_properties = context->http_server_properties();
  params->net_log = context->net_log();
  params->channel_id_service = context->channel_id_service();
}

void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) {
  http_cache_enabled_ = true;
  http_cache_params_ = params;
}

void URLRequestContextBuilder::DisableHttpCache() {
  http_cache_enabled_ = false;
  http_cache_params_ = HttpCacheParams();
}

void URLRequestContextBuilder::SetSpdyAndQuicEnabled(bool spdy_enabled,
                                                     bool quic_enabled) {
  http_network_session_params_.enable_http2 = spdy_enabled;
  http_network_session_params_.enable_quic = quic_enabled;
}

void URLRequestContextBuilder::set_ct_verifier(
    std::unique_ptr<CTVerifier> ct_verifier) {
  ct_verifier_ = std::move(ct_verifier);
}

void URLRequestContextBuilder::SetCertVerifier(
    std::unique_ptr<CertVerifier> cert_verifier) {
  cert_verifier_ = std::move(cert_verifier);
}

void URLRequestContextBuilder::SetInterceptors(
    std::vector<std::unique_ptr<URLRequestInterceptor>>
        url_request_interceptors) {
  url_request_interceptors_ = std::move(url_request_interceptors);
}

void URLRequestContextBuilder::SetCookieAndChannelIdStores(
    std::unique_ptr<CookieStore> cookie_store,
    std::unique_ptr<ChannelIDService> channel_id_service) {
  cookie_store_set_by_client_ = true;
  // If |cookie_store| is NULL, |channel_id_service| must be NULL too.
  DCHECK(cookie_store || !channel_id_service);
  cookie_store_ = std::move(cookie_store);
  channel_id_service_ = std::move(channel_id_service);
}

void URLRequestContextBuilder::SetFileTaskRunner(
    const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
  file_task_runner_ = task_runner;
}

void URLRequestContextBuilder::SetProtocolHandler(
    const std::string& scheme,
    std::unique_ptr<URLRequestJobFactory::ProtocolHandler> protocol_handler) {
  DCHECK(protocol_handler);
  protocol_handlers_[scheme] = std::move(protocol_handler);
}

void URLRequestContextBuilder::SetHttpAuthHandlerFactory(
    std::unique_ptr<HttpAuthHandlerFactory> factory) {
  http_auth_handler_factory_ = std::move(factory);
}

void URLRequestContextBuilder::SetHttpServerProperties(
    std::unique_ptr<HttpServerProperties> http_server_properties) {
  http_server_properties_ = std::move(http_server_properties);
}

std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
  std::unique_ptr<ContainerURLRequestContext> context(
      new ContainerURLRequestContext(file_task_runner_));
  URLRequestContextStorage* storage = context->storage();

  storage->set_http_user_agent_settings(base::WrapUnique(
      new StaticHttpUserAgentSettings(accept_language_, user_agent_)));

  if (!network_delegate_)
    network_delegate_.reset(new BasicNetworkDelegate);
  storage->set_network_delegate(std::move(network_delegate_));

  if (net_log_) {
    // Unlike the other builder parameters, |net_log_| is not owned by the
    // builder or resulting context.
    context->set_net_log(net_log_);
  } else {
    storage->set_net_log(base::WrapUnique(new NetLog));
  }

  if (!host_resolver_) {
    host_resolver_ = HostResolver::CreateDefaultResolver(context->net_log());
  }
  storage->set_host_resolver(std::move(host_resolver_));

  if (!proxy_service_) {
    // TODO(willchan): Switch to using this code when
    // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck.
#if !defined(OS_LINUX) && !defined(OS_ANDROID)
    if (!proxy_config_service_) {
      proxy_config_service_ = ProxyService::CreateSystemProxyConfigService(
          base::ThreadTaskRunnerHandle::Get().get(),
          context->GetFileTaskRunner());
    }
#endif  // !defined(OS_LINUX) && !defined(OS_ANDROID)
    proxy_service_ = ProxyService::CreateUsingSystemProxyResolver(
        std::move(proxy_config_service_),
        0,  // This results in using the default value.
        context->net_log());
  }
  storage->set_proxy_service(std::move(proxy_service_));

  storage->set_ssl_config_service(new SSLConfigServiceDefaults);

  if (!http_auth_handler_factory_) {
    http_auth_handler_factory_ =
        HttpAuthHandlerRegistryFactory::CreateDefault(context->host_resolver());
  }

  storage->set_http_auth_handler_factory(std::move(http_auth_handler_factory_));

  if (cookie_store_set_by_client_) {
    storage->set_cookie_store(std::move(cookie_store_));
    storage->set_channel_id_service(std::move(channel_id_service_));
  } else {
    std::unique_ptr<CookieStore> cookie_store(
        new CookieMonster(nullptr, nullptr));
    // TODO(mmenke):  This always creates a file thread, even when it ends up
    // not being used.  Consider lazily creating the thread.
    std::unique_ptr<ChannelIDService> channel_id_service(new ChannelIDService(
        new DefaultChannelIDStore(NULL), context->GetFileTaskRunner()));
    cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
    storage->set_cookie_store(std::move(cookie_store));
    storage->set_channel_id_service(std::move(channel_id_service));
  }

  if (sdch_enabled_) {
    storage->set_sdch_manager(
        std::unique_ptr<net::SdchManager>(new SdchManager()));
  }

  storage->set_transport_security_state(
      base::WrapUnique(new TransportSecurityState()));
  if (!transport_security_persister_path_.empty()) {
    context->set_transport_security_persister(
        base::WrapUnique<TransportSecurityPersister>(
            new TransportSecurityPersister(context->transport_security_state(),
                                           transport_security_persister_path_,
                                           context->GetFileTaskRunner(),
                                           false)));
  }

  if (http_server_properties_) {
    storage->set_http_server_properties(std::move(http_server_properties_));
  } else {
    storage->set_http_server_properties(
        std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
  }

  if (cert_verifier_) {
    storage->set_cert_verifier(std::move(cert_verifier_));
  } else {
    storage->set_cert_verifier(CertVerifier::CreateDefault());
  }

  if (ct_verifier_) {
    storage->set_cert_transparency_verifier(std::move(ct_verifier_));
  } else {
    std::unique_ptr<MultiLogCTVerifier> ct_verifier =
        base::MakeUnique<MultiLogCTVerifier>();
    ct_verifier->AddLogs(ct::CreateLogVerifiersForKnownLogs());
    storage->set_cert_transparency_verifier(std::move(ct_verifier));
  }
  storage->set_ct_policy_enforcer(base::MakeUnique<CTPolicyEnforcer>());

  if (throttling_enabled_) {
    storage->set_throttler_manager(
        base::WrapUnique(new URLRequestThrottlerManager()));
  }

  if (backoff_enabled_) {
    storage->set_backoff_manager(
        base::WrapUnique(new URLRequestBackoffManager()));
  }

  HttpNetworkSession::Params network_session_params;
  SetHttpNetworkSessionComponents(context.get(), &network_session_params);

  network_session_params.ignore_certificate_errors =
      http_network_session_params_.ignore_certificate_errors;
  network_session_params.host_mapping_rules =
      http_network_session_params_.host_mapping_rules;
  network_session_params.testing_fixed_http_port =
      http_network_session_params_.testing_fixed_http_port;
  network_session_params.testing_fixed_https_port =
      http_network_session_params_.testing_fixed_https_port;
  network_session_params.enable_http2 =
      http_network_session_params_.enable_http2;
  network_session_params.enable_quic = http_network_session_params_.enable_quic;
  network_session_params.quic_max_server_configs_stored_in_properties =
      http_network_session_params_.quic_max_server_configs_stored_in_properties;
  network_session_params.quic_delay_tcp_race =
      http_network_session_params_.quic_delay_tcp_race;
  network_session_params.quic_max_number_of_lossy_connections =
      http_network_session_params_.quic_max_number_of_lossy_connections;
  network_session_params.quic_packet_loss_threshold =
      http_network_session_params_.quic_packet_loss_threshold;
  network_session_params.quic_idle_connection_timeout_seconds =
      http_network_session_params_.quic_idle_connection_timeout_seconds;
  network_session_params.quic_connection_options =
      http_network_session_params_.quic_connection_options;
  network_session_params.quic_host_whitelist =
      http_network_session_params_.quic_host_whitelist;
  network_session_params.quic_close_sessions_on_ip_change =
      http_network_session_params_.quic_close_sessions_on_ip_change;
  network_session_params.quic_migrate_sessions_on_network_change =
      http_network_session_params_.quic_migrate_sessions_on_network_change;
  network_session_params.quic_user_agent_id =
      http_network_session_params_.quic_user_agent_id;
  network_session_params.quic_prefer_aes =
      http_network_session_params_.quic_prefer_aes;
  network_session_params.quic_migrate_sessions_early =
      http_network_session_params_.quic_migrate_sessions_early;
  network_session_params.quic_disable_bidirectional_streams =
      http_network_session_params_.quic_disable_bidirectional_streams;
  network_session_params.quic_race_cert_verification =
      http_network_session_params_.quic_race_cert_verification;
  if (proxy_delegate_) {
    network_session_params.proxy_delegate = proxy_delegate_.get();
    storage->set_proxy_delegate(std::move(proxy_delegate_));
  }
  if (socket_performance_watcher_factory_) {
    network_session_params.socket_performance_watcher_factory =
        socket_performance_watcher_factory_;
  }

  storage->set_http_network_session(
      base::WrapUnique(new HttpNetworkSession(network_session_params)));

  std::unique_ptr<HttpTransactionFactory> http_transaction_factory;
  if (http_cache_enabled_) {
    std::unique_ptr<HttpCache::BackendFactory> http_cache_backend;
    if (http_cache_params_.type != HttpCacheParams::IN_MEMORY) {
      BackendType backend_type =
          http_cache_params_.type == HttpCacheParams::DISK
              ? CACHE_BACKEND_DEFAULT
              : CACHE_BACKEND_SIMPLE;
      http_cache_backend.reset(new HttpCache::DefaultBackend(
          DISK_CACHE, backend_type, http_cache_params_.path,
          http_cache_params_.max_size, context->GetFileTaskRunner()));
    } else {
      http_cache_backend =
          HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
    }

    http_transaction_factory.reset(new HttpCache(
        storage->http_network_session(), std::move(http_cache_backend), true));
  } else {
    http_transaction_factory.reset(
        new HttpNetworkLayer(storage->http_network_session()));
  }
  storage->set_http_transaction_factory(std::move(http_transaction_factory));

  URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl;
  // Adds caller-provided protocol handlers first so that these handlers are
  // used over data/file/ftp handlers below.
  for (auto& scheme_handler : protocol_handlers_) {
    job_factory->SetProtocolHandler(scheme_handler.first,
                                    std::move(scheme_handler.second));
  }
  protocol_handlers_.clear();

  if (data_enabled_)
    job_factory->SetProtocolHandler("data",
                                    base::WrapUnique(new DataProtocolHandler));

#if !defined(DISABLE_FILE_SUPPORT)
  if (file_enabled_) {
    job_factory->SetProtocolHandler(
        "file", base::WrapUnique(
                    new FileProtocolHandler(context->GetFileTaskRunner())));
  }
#endif  // !defined(DISABLE_FILE_SUPPORT)

#if !defined(DISABLE_FTP_SUPPORT)
  if (ftp_enabled_) {
    ftp_transaction_factory_.reset(
        new FtpNetworkLayer(context->host_resolver()));
    job_factory->SetProtocolHandler(
        "ftp", base::WrapUnique(
                   new FtpProtocolHandler(ftp_transaction_factory_.get())));
  }
#endif  // !defined(DISABLE_FTP_SUPPORT)

  std::unique_ptr<net::URLRequestJobFactory> top_job_factory(job_factory);
  if (!url_request_interceptors_.empty()) {
    // Set up interceptors in the reverse order.

    for (auto i = url_request_interceptors_.rbegin();
         i != url_request_interceptors_.rend(); ++i) {
      top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
          std::move(top_job_factory), std::move(*i)));
    }
    url_request_interceptors_.clear();
  }
  storage->set_job_factory(std::move(top_job_factory));
  // TODO(willchan): Support sdch.

  return std::move(context);
}

}  // namespace net


text:
<?xml version="1.0" encoding="UTF-8"?>
<TestPlan>
    <Test>12364/hcftc</Test>
    <Rule>FindDocumentsForMultiplePatients</Rule>
    <TestStep id="object_refs">
        <ExpectedStatus>Success</ExpectedStatus>
        <Rule>
            <Transaction>MPQ</Transaction>
            <SQ>FindDocumentsForMultiplePatients</SQ>
            <Assertion>Select on ClassCode</Assertion>
        </Rule>
        <!-- Test data comes from 12361 -->
        <StoredQueryTransaction>
            <XDSb/>
            <Metadata>
                <query:AdhocQueryRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
                    xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
                    xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
                    <query:ResponseOption returnComposedObjects="true" returnType="ObjectRef"/>
                    <!-- FindDocumentsForMultiplePatients -->
                    <AdhocQuery id="urn:uuid:3d1bdb10-39a2-11de-89c2-2f44d94eaa9f">
                        <Slot name="$XDSDocumentEntryHealthcareFacilityTypeCode">
                            <ValueList>
                                <Value>('MPQ-hcftcode-1^^MPQ Testing')</Value>
                            </ValueList>
                        </Slot>
                        <Slot name="$XDSDocumentEntryStatus">
                            <ValueList>
                                <Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved')</Value>
                            </ValueList>
                        </Slot>
                    </AdhocQuery>
                </query:AdhocQueryRequest>
            </Metadata>
            <ExpectedContents>
                <ObjectRefs count="2"/>
            </ExpectedContents>
        </StoredQueryTransaction>
    </TestStep>
</TestPlan>


text:
<?php
namespace frontend\models;

use common\models\User;
use yii\base\Model;
use Yii;

/**
 * Signup form
 */
class SignupForm extends Model
{
    public $username;
    public $email;
    public $password;

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['username', 'filter', 'filter' => 'trim'],
            ['username', 'required'],
            ['username', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This username has already been taken.'],
            ['username', 'string', 'min' => 2, 'max' => 255],

            ['email', 'filter', 'filter' => 'trim'],
            ['email', 'required'],
            ['email', 'email'],
            ['email', 'string', 'max' => 255],
            ['email', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This email address has already been taken.'],

            ['password', 'required'],
            ['password', 'string', 'min' => 6],
        ];
    }

    /**
     * Signs user up.
     *
     * @return User|null the saved model or null if saving fails
     */
    public function signup()
    {
        if ($this->validate()) {
            $user = new User();
            $user->username = $this->username;
            $user->email = $this->email;
            $user->setPassword($this->password);
            $user->generateAuthKey();
            if ($user->save()) {
                return $user;
            }
        }

        return null;
    }

    public function actionSignup()
    {
        $model = new SignupForm();
        if ($model->load(Yii::$app->request->post())) {
        if ($user = $model->signup()) {
        if (Yii::$app->getUser()->login($user)) {
        return $this->goHome();
        }
        }
        }
        return $this->render('signup', [
        'model' => $model,
        ]);
    }
}


text:
#ifndef kvDatabaseTestCommon_h
#define  kvDatabaseTestCommon_h

/* Parse options for specifying database to tests.  Fill in positional argument vector, setting unused ones to NULL.
 * The positional and numPositionalRet maybe NULL. */
stKVDatabaseConf *kvDatabaseTestParseOptions(int argc, char *const *argv, const char *desc, int minNumPositional, int maxNumPositional,
                                             char **positional, int *numPositionalRet);

#endif


text:
import os
import sys

THIS_DIR = os.path.abspath(os.path.dirname(__file__))
SRC_DIR = os.path.join(THIS_DIR, '..', '..', '..')
CLANG_LIB_PATH = os.path.normpath(os.path.join(
    SRC_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'lib'))

FLAGS = '-Xclang -add-plugin -Xclang blink-gc-plugin'
PREFIX= ' -Xclang -plugin-arg-blink-gc-plugin -Xclang '

warn_raw_pointers = None
for arg in sys.argv[1:]:
  if arg == 'enable-oilpan=1':
    FLAGS += PREFIX + 'enable-oilpan'
    if warn_raw_pointers is None:
      warn_raw_pointers = True
  elif arg == 'dump-graph=1':
    FLAGS += PREFIX + 'dump-graph'
  elif arg == 'warn-raw-ptr=1':
    warn_raw_pointers = True
  elif arg == 'warn-raw-ptr=0':
    warn_raw_pointers = False
  elif arg == 'warn-unneeded-finalizer=1':
    FLAGS += PREFIX + 'warn-unneeded-finalizer'
  elif arg.startswith('custom_clang_lib_path='):
    CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):]

if warn_raw_pointers is True:
  FLAGS += PREFIX + 'warn-raw-ptr'

if not sys.platform in ['win32', 'cygwin']:
  LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so'
  FLAGS = ('-Xclang -load -Xclang "%s/libBlinkGCPlugin.%s" ' + FLAGS) % \
           (CLANG_LIB_PATH, LIBSUFFIX)

print FLAGS


text:
package org.jgrades.lic.entities;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "JG_LIC_CUSTOMER")
public class CustomerEntity implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private Long customerId;

    private String name;

    private String address;

    private String phone;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("customerId", customerId)
                .append("name", name)
                .append("address", address)
                .append("phone", phone)
                .toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        if (obj.getClass() != getClass()) {
            return false;
        }
        CustomerEntity rhs = (CustomerEntity) obj;
        return new EqualsBuilder()
                .append(this.customerId, rhs.customerId)
                .append(this.name, rhs.name)
                .append(this.address, rhs.address)
                .append(this.phone, rhs.phone)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder()
                .append(customerId)
                .toHashCode();
    }
}


text:
@interface PermissionsTestViewController ()
@property (strong, nonatomic) IBOutlet UILabel *photoPermissionResultLabel;
@property (strong, nonatomic) IBOutlet UILabel *contactsPermissionResultLabel;
@property (strong, nonatomic) IBOutlet UILabel *locationPermissionResultLabel;

@end

@implementation PermissionsTestViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)onPhotoPermissionsButtonTapped:(id)sender
{
    ClusterPrePermissions *permissions = [ClusterPrePermissions sharedPermissions];
    [permissions showPhotoPermissionsWithTitle:@"Access your photos?"
                                       message:@"Your message here"
                               denyButtonTitle:@"Not Now"
                              grantButtonTitle:@"Give Access"
                             completionHandler:^(BOOL hasPermission,
                                                 ClusterDialogResult userDialogResult,
                                                 ClusterDialogResult systemDialogResult) {
                                 [self updateResultLabel:self.photoPermissionResultLabel
                                          withPermission:hasPermission
                                        userDialogResult:userDialogResult
                                      systemDialogResult:systemDialogResult];
                             }];
}

- (IBAction)onContactsButtonPermissionTapped:(id)sender
{
    ClusterPrePermissions *permissions = [ClusterPrePermissions sharedPermissions];
    [permissions showContactsPermissionsWithTitle:@"Access your contacts?"
                                          message:@"Your message here"
                                  denyButtonTitle:@"Not Now"
                                 grantButtonTitle:@"Give Access"
                                completionHandler:^(BOOL hasPermission,
                                                    ClusterDialogResult userDialogResult,
                                                    ClusterDialogResult systemDialogResult) {
                                    [self updateResultLabel:self.contactsPermissionResultLabel
                                             withPermission:hasPermission
                                           userDialogResult:userDialogResult
                                         systemDialogResult:systemDialogResult];
                                }];
}

- (IBAction)onLocationButtonPermissionTapped:(id)sender
{
    ClusterPrePermissions *permissions = [ClusterPrePermissions sharedPermissions];
    [permissions showLocationPermissionsWithTitle:@"Access your location?"
                                          message:@"Your message here"
                                  denyButtonTitle:@"Not Now"
                                 grantButtonTitle:@"Give Access"
                                completionHandler:^(BOOL hasPermission,
                                                    ClusterDialogResult userDialogResult,
                                                    ClusterDialogResult systemDialogResult) {
                                    [self updateResultLabel:self.locationPermissionResultLabel
                                             withPermission:hasPermission
                                           userDialogResult:userDialogResult
                                         systemDialogResult:systemDialogResult];
                                }];
}

- (void) updateResultLabel:(UILabel *)resultLabel
            withPermission:(BOOL)hasPermission
          userDialogResult:(ClusterDialogResult)userDialogResult
        systemDialogResult:(ClusterDialogResult)systemDialogResult
{
    resultLabel.text = @"haha";
    resultLabel.alpha = 0.0;

    if (hasPermission) {
        resultLabel.textColor = [UIColor colorWithRed:0.1 green:1.0 blue:0.1 alpha:1.0];
    } else {
        resultLabel.textColor = [UIColor colorWithRed:1.0 green:0.1 blue:0.1 alpha:1.0];
    }
    NSString *text = nil;
    if (userDialogResult == ClusterDialogResultNoActionTaken &&
        systemDialogResult == ClusterDialogResultNoActionTaken) {
        NSString *prefix = nil;
        if (hasPermission) {
            prefix = @"Granted.";
        } else if (systemDialogResult == ClusterDialogResultParentallyRestricted) {
            prefix = @"Restricted.";
        } else {
            prefix = @"Denied.";
        }
        text = [NSString stringWithFormat:@"%@ Dialogs not shown, system choice already made.", prefix];
    } else {
        NSString *userResultString = [self stringFromDialogResult:userDialogResult];
        NSString *systemResultString = [self stringFromDialogResult:systemDialogResult];
        text = [NSString stringWithFormat:@"User Action: %@\nSystem Action: %@", userResultString, systemResultString];
    }
    resultLabel.text = text;

    [UIView animateWithDuration:0.35 animations:^{
        resultLabel.alpha = 1.0;
    }];
}

- (NSString *) stringFromDialogResult:(ClusterDialogResult)result
{
    switch (result) {
        case ClusterDialogResultNoActionTaken:
            return @"No Action Taken";
            break;
        case ClusterDialogResultGranted:
            return @"Granted";
            break;
        case ClusterDialogResultDenied:
            return @"Denied";
            break;
        case ClusterDialogResultParentallyRestricted:
            return @"Restricted";
            break;
        default:
            break;
    }
}
@end


text:
using System;
using System.Drawing;
using System.Drawing.Imaging;

namespace TomatoTool
{
	public class Tile8Bit : Tile
	{
		private uint address;
		public override uint ObjectID
		{
			get
			{
				return address;
			}

			set
			{
				address = value;
			}
		}

		private bool saved;
		public override bool Saved
		{
			get
			{
				return saved;
			}

			set
			{
				saved = value;
			}
		}

		public const uint SIZE = TILE_LENGTH_0 * TILE_LENGTH_1;
		public override uint Size
		{
			get
			{
				return SIZE;
			}
		}

		public override uint Alignment
		{
			get
			{
				throw new System.NotImplementedException();
			}
		}

		public byte this[int i, int j]
		{
			get
			{
				return tile[i, j];
			}

			set
			{
				if (value < 16)
				{
					tile[i, j] = value;
				}
				else
				{
					throw new Exception();
				}
			}
		}

		//空のタイル
		public static readonly Tile4Bit NotExistTile;

		private Bitmap bitmap;

		public Bitmap Bitmap
		{
			get
			{
				return bitmap;
			}

			set
			{
				if ((value.Width == WIDTH) && (value.Height == HEIGHT) && (value.PixelFormat == PixelFormat.Format8bppIndexed))
				{
				}
				else
				{
					throw new Exception();
				}
			}
		}

		public const uint TILE_LENGTH_0 = 8;
		public const uint TILE_LENGTH_1 = 8;

		static Tile8Bit()
		{
			NotExistTile = new Tile4Bit(new byte[TILE_LENGTH_0, TILE_LENGTH_1]);
		}

		public Tile8Bit(TomatoAdventure tomatoAdventure, uint address)
		{
			load(tomatoAdventure, address);
		}

		public void load(TomatoAdventure tomatoAdventure, uint address)
		{
			tile = new byte[TILE_LENGTH_0, TILE_LENGTH_1];

			for (uint y = 0; y < tile.GetLength(1); ++y)
			{
				for (uint x = 0; x < tile.GetLength(0); ++x)
				{
					tile[x, y] = tomatoAdventure.read(address + (y * TILE_LENGTH_0) + x);
				}
			}
		}

		public void save(TomatoAdventure tomatoAdventure, uint address)
		{
			for (uint y = 0; y < tile.GetLength(1); ++y)
			{
				for (uint x = 0; x < tile.GetLength(0); ++x)
				{
					tomatoAdventure.write(address + (y * TILE_LENGTH_0) + x, tile[x, y]);
				}
			}
		}

		public override Bitmap toBitmap(Palette palette)
		{
			throw new System.NotImplementedException();
		}

		public override Bitmap toBitmap(Palette palette, bool flipX, bool flipY)
		{
			throw new System.NotImplementedException();
		}
	}
}


text:
<?php

require_once "_autoload.php";

class NormolicaRoundRobinSlaveSelectorTest extends PHPUnit_Framework_TestCase {

    protected function setUp() {
        $slave1 = new Mongo("mongodb://localhost:7000", array('connect' => false));
        $slave2 = new Mongo("mongodb://localhost:7001", array('connect' => false));
        $slave3 = new Mongo("mongodb://localhost:7002", array('connect' => false));
        $slave4 = new Mongo("mongodb://localhost:7003", array('connect' => false));

        $this->slaveNodes = array($slave1, $slave2, $slave3, $slave4);

        $this->slaveSelector = new NormolicaRoundRobinSlaveSelector();
    }

    public function testSlaveNodesAreAccessedInSequence() {
        $this->slaveSelector->setSlaveNodes($this->slaveNodes);
        $current_port = 7000;
        for ($i = 0; $i < count($this->slaveNodes); $i++) {
            $mongo = $this->slaveSelector->getSelectedSlave();
            $expected_conn_str = "[localhost:{$current_port}]";
            $this->assertEquals($expected_conn_str, $mongo->__toString());
            $current_port++;
        }
    }

    public function testSetSlaveNodesWhenEmpty() {
        $this->slaveNodes = array();
        $this->slaveSelector->setSlaveNodes($this->slaveNodes);
        $this->assertNull($this->slaveSelector->getSelectedSlave());
    }
}


text: testing before commit "must"


text:
<ion-header>
    <ion-navbar core-back-button>
        <ion-title><core-format-text [text]="module.name" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
        <ion-buttons end>
            <button ion-button (click)="save()"> {{ 'core.save' | translate }}</button>
        </ion-buttons>
    </ion-navbar>
</ion-header>
<ion-content>
    <core-loading [hideUntil]="loaded">
        <form ion-list #editFormEl>
            <ion-item>
                <ion-label stacked>{{ 'addon.mod_glossary.concept' | translate }}</ion-label>
                <ion-input type="text" [placeholder]="'addon.mod_glossary.concept' | translate" [(ngModel)]="entry.concept" name="concept"></ion-input>
            </ion-item>
            <ion-item>
                <ion-label stacked>{{ 'addon.mod_glossary.definition' | translate }}</ion-label>
                <core-rich-text-editor item-content [control]="definitionControl" (contentChanged)="onDefinitionChange($event)" [placeholder]="'addon.mod_glossary.definition' | translate" name="addon_mod_glossary_edit" [component]="component" [componentId]="glossary.cmid" [autoSave]="true" contextLevel="module" [contextInstanceId]="module.id" elementId="definition_editor" [draftExtraParams]="editorExtraParams"></core-rich-text-editor>
            </ion-item>
            <ion-item *ngIf="categories.length > 0">
                <ion-label stacked id="addon-mod-glossary-categories-label">{{ 'addon.mod_glossary.categories' | translate }}</ion-label>
                <ion-select [(ngModel)]="options.categories" multiple="true" aria-labelledby="addon-mod-glossary-categories-label" interface="action-sheet" [placeholder]="'addon.mod_glossary.categories' | translate" name="categories">
                    <ion-option *ngFor="let category of categories" [value]="category.id">{{ category.name }}</ion-option>
                </ion-select>
            </ion-item>
            <ion-item>
                <ion-label stacked id="addon-mod-glossary-aliases-label">{{ 'addon.mod_glossary.aliases' | translate }}</ion-label>
                <ion-textarea [(ngModel)]="options.aliases" rows="1" core-auto-rows aria-labelledby="addon-mod-glossary-aliases-label" name="aliases"></ion-textarea>
            </ion-item>
            <ion-item-divider>{{ 'addon.mod_glossary.attachment' | translate }}</ion-item-divider>
            <core-attachments [files]="attachments" [component]="component" [componentId]="glossary.cmid" [allowOffline]="true"></core-attachments>
            <ng-container *ngIf="glossary.usedynalink">
                <ion-item-divider>{{ 'addon.mod_glossary.linking' | translate }}</ion-item-divider>
                <ion-item text-wrap>
                    <ion-label>{{ 'addon.mod_glossary.entryusedynalink' | translate }}</ion-label>
                    <ion-toggle [(ngModel)]="options.usedynalink" name="usedynalink"></ion-toggle>
                </ion-item>
                <ion-item text-wrap>
                    <ion-label>{{ 'addon.mod_glossary.casesensitive' | translate }}</ion-label>
                    <ion-toggle [disabled]="!options.usedynalink" [(ngModel)]="options.casesensitive" name="casesensitive"></ion-toggle>
                </ion-item>
                <ion-item text-wrap>
                    <ion-label>{{ 'addon.mod_glossary.fullmatch' | translate }}</ion-label>
                    <ion-toggle [disabled]="!options.usedynalink" [(ngModel)]="options.fullmatch" name="fullmatch"></ion-toggle>
                </ion-item>
            </ng-container>
        </form>
    </core-loading>
</ion-content>


text:
var indexCtrl = function($scope){

    console.log('index init');

    $scope.input = 'test';
};

angular
    .module('clientApp', [])
    .controller('indexCtrl', indexCtrl);


text:
    var parserHasNativeTemplate = function() {
      var div = document.createElement('div');
      div.innerHTML = '<table><template>';
      return div.firstChild.firstChild &&
             div.firstChild.firstChild.tagName == 'TEMPLATE';
    }();

    var forceCollectObservers = true;
    var exposeGetExpression = true;


text:
#include "absl/status/status.h"
#include "asylo/util/logging.h"
#include "asylo/test/util/enclave_test_application.h"
#include "asylo/util/posix_errors.h"
#include "asylo/util/status.h"

namespace asylo {

constexpr char kErrorString[] = "Secret error message";

// Test enclave that returns various errors over the enclave boundary.
class ErrorPropagationEnclave : public EnclaveTestCase {
 public:
  ErrorPropagationEnclave() = default;

  Status Initialize(const EnclaveConfig &config) final {
    return absl::OkStatus();
  }

  Status Run(const EnclaveInput &input, EnclaveOutput *output) final {
    std::string test_name = GetEnclaveInputTestString(input);

    if (test_name == "OK") {
      return absl::OkStatus();
    } else if (test_name == "absl::StatusCode::kUnauthenticated") {
      return absl::UnauthenticatedError(kErrorString);
    } else if (test_name == "EINVAL") {
      return PosixError(EINVAL, kErrorString);
    }

    LOG(ERROR) << "Unexpected test name: '" << test_name << "'";
    return absl::InternalError("Unknown test");
  }

  Status Finalize(const EnclaveFinal &final_input) final {
    return absl::OkStatus();
  }
};

TrustedApplication *BuildTrustedApplication() {
  return new ErrorPropagationEnclave();
}

}  // namespace asylo


text:
package org.apache.drill.exec.compile.bytecode;

import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.analysis.BasicValue;
import org.objectweb.asm.tree.analysis.Frame;

public class TrackingInstructionList extends InsnList {
//  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TrackingInstructionList.class);

  Frame<BasicValue> currentFrame;
  Frame<BasicValue> nextFrame;
  AbstractInsnNode currentInsn;
  private int index = 0;
  private final Frame<BasicValue>[] frames;
  private final InsnList inner;

  public TrackingInstructionList(final Frame<BasicValue>[] frames, final InsnList inner) {
    this.frames = frames;
    this.inner = inner;
  }

  @Override
  public void accept(final MethodVisitor mv) {
    currentInsn = inner.getFirst();
    while (currentInsn != null) {
        currentFrame = frames[index];
        nextFrame = index + 1 < frames.length ? frames[index + 1] : null;
        currentInsn.accept(mv);

        currentInsn = currentInsn.getNext();
        index++;
    }
  }

  @Override
  public int size() {
    return inner.size();
  }
}


text:
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Shields.DataStructures.Async.Tests
{
    [TestClass]
    public class AsyncBoundedQueueTests
    {
        [TestMethod]
        public void Capacity_must_be_nonnegative()
        {
            Assert.ThrowsException<ArgumentOutOfRangeException>(() => new AsyncBoundedQueue<string>(-1));
        }

        [TestMethod]
        public void Capacity_may_be_zero()
        {
            new AsyncBoundedQueue<string>(0);
        }

        [TestMethod]
        public void Count_zero_capacity()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            Assert.AreEqual(0, queue.Count);
        }

        [TestMethod]
        public void Count_empty()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            Assert.AreEqual(0, queue.Count);
        }

        [TestMethod]
        public async Task Count_nonempty()
        {
            var queue = new AsyncBoundedQueue<string>(4);
            await queue.EnqueueAsync("A").Timeout();
            await queue.EnqueueAsync("B").Timeout();
            await queue.EnqueueAsync("C").Timeout();
            await queue.EnqueueAsync("D").Timeout();
            await queue.DequeueAsync().Timeout();
            Assert.AreEqual(3, queue.Count);
        }

        [TestMethod]
        public async Task DequeueAsync_empty_canceled()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            using (var cts = new CancellationTokenSource())
            {
                var task = queue.DequeueAsync(cts.Token);
                cts.Cancel();
                await queue.EnqueueAsync("A").Timeout();
                await task.AssertCanceledAsync();
            }
        }

        [TestMethod]
        public async Task DequeueAsync_already_canceled()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            await queue.EnqueueAsync("A").Timeout();
            await queue.DequeueAsync(new CancellationToken(true)).AssertCanceledAsync();
        }

        [TestMethod]
        public async Task DequeueAsync_canceled_after_completion()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            await queue.EnqueueAsync("A");
            using (var cts = new CancellationTokenSource())
            {
                var task = queue.DequeueAsync(cts.Token);
                cts.Cancel();
                Assert.AreEqual("A", await task.Timeout());
            }
        }

        [TestMethod]
        public async Task EnqueueAsync_full_canceled()
        {
            var queue = new AsyncBoundedQueue<string>(2);
            await queue.EnqueueAsync("A");
            await queue.EnqueueAsync("B");
            using (var cts = new CancellationTokenSource())
            {
                var task = queue.EnqueueAsync("C", cts.Token);
                cts.Cancel();
                await task.AssertCanceledAsync();
            }
        }

        [TestMethod]
        public async Task EnqueueAsync_not_full_canceled()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            await queue.EnqueueAsync("A").Timeout();
            await queue.EnqueueAsync("B").Timeout();
            using (var cts = new CancellationTokenSource())
            {
                var task = queue.EnqueueAsync("C", cts.Token);
                cts.Cancel();
                await task.Timeout();
            }
        }

        [TestMethod]
        public async Task EnqueueAsync_already_canceled()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            await queue.EnqueueAsync("A", new CancellationToken(true)).AssertCanceledAsync();
        }

        [TestMethod]
        public async Task EnqueueAsync_canceled_after_completion()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            using (var cts = new CancellationTokenSource())
            {
                var task = queue.EnqueueAsync("A", cts.Token);
                cts.Cancel();
                await task.Timeout();
            }
        }

        [TestMethod]
        public void TryDequeue_before_Enqueue()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            Assert.IsFalse(queue.TryDequeue());
        }

        [TestMethod]
        public async Task DequeueAsync_before_Enqueue()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var task = queue.DequeueAsync();
            await queue.EnqueueAsync("A").Timeout();
            Assert.AreEqual("A", await task.Timeout());
        }

        [TestMethod]
        public async Task DequeueAsync_handled_in_order_of_caller()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var values = new List<string> { "A", "B", "C" };
            var tasks = values.Select(_ => queue.DequeueAsync()).ToList();
            for (int i = 0; i < values.Count; i++)
            {
                tasks[i].AssertNotCompleted();
                await queue.EnqueueAsync(values[i]).Timeout();
                Assert.AreEqual(values[i], await tasks[i].Timeout());
            }
        }

        [TestMethod]
        public async Task First_in_first_out()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var values = new List<string> { "A", "B", "C" };
            for (int i = 0; i < values.Count; i++)
            {
                await queue.EnqueueAsync(values[i]).Timeout();
            }
            for (int i = 0; i < values.Count; i++)
            {
                Assert.AreEqual(values[i], await queue.DequeueAsync().Timeout());
            }
        }

        [TestMethod]
        public async Task First_in_first_out_exceeding_capacity()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var values = new List<string> { "A", "B", "C", "D", "E", "F" };
            var enqueueTasks = values.Select(queue.EnqueueAsync).ToList();
            for (int i = 0; i < values.Count; i++)
            {
                if (i < queue.Capacity)
                {
                    await enqueueTasks[i].Timeout();
                }
                else
                {
                    enqueueTasks[i].AssertNotCompleted();
                }
            }
            for (int i = 0; i < values.Count; i++)
            {
                Assert.AreEqual(values[i], await queue.DequeueAsync().Timeout());
                if (i + queue.Capacity < values.Count)
                {
                    await enqueueTasks[i + queue.Capacity].Timeout();
                }
            }
        }

        [TestMethod]
        public async Task Capacity_zero_DequeueAsync_then_TryEnqueue()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var dequeueTask = queue.DequeueAsync();
            dequeueTask.AssertNotCompleted();
            Assert.IsTrue(queue.TryEnqueue("A"));
            Assert.AreEqual("A", await dequeueTask.Timeout());
        }

        [TestMethod]
        public async Task Capacity_zero_DequeueAsync_then_EnqueueAsync()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var dequeueTask = queue.DequeueAsync();
            dequeueTask.AssertNotCompleted();
            await queue.EnqueueAsync("A").Timeout();
            Assert.AreEqual("A", await dequeueTask.Timeout());
        }

        [TestMethod]
        public async Task Capacity_zero_EnqueueAsync_then_TryDequeue()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var enqueueTask = queue.EnqueueAsync("A");
            enqueueTask.AssertNotCompleted();
            Assert.IsTrue(queue.TryDequeue(out var value));
            Assert.AreEqual("A", value);
            await enqueueTask.Timeout();
        }

        [TestMethod]
        public async Task Capacity_zero_EnqueueAsync_then_DequeueAsync()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var enqueueTask = queue.EnqueueAsync("A");
            enqueueTask.AssertNotCompleted();
            Assert.AreEqual("A", await queue.DequeueAsync().Timeout());
            await enqueueTask.Timeout();
        }

        [TestMethod]
        public async Task CompleteAllDequeue()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var tasks = Enumerable.Range(0, 3).Select(_ => queue.DequeueAsync()).ToList();
            queue.CompleteAllDequeue("X");
            foreach (var task in tasks)
            {
                Assert.AreEqual("X", await task.Timeout());
            }
        }

        [TestMethod]
        public async Task CancelAllDequeue()
        {
            var queue = new AsyncBoundedQueue<string>(3);
            var tasks = Enumerable.Range(0, 3).Select(_ => queue.DequeueAsync()).ToList();
            queue.CancelAllDequeue(CancellationToken.None);
            foreach (var task in tasks)
            {
                await task.AssertCanceledAsync();
            }
        }

        [TestMethod]
        public async Task CompleteAllEnqueue()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var tasks = Enumerable.Range(0, 3).Select(_ => queue.EnqueueAsync("A")).ToList();
            queue.CompleteAllEnqueue();
            foreach (var task in tasks)
            {
                await task.Timeout();
            }
        }

        [TestMethod]
        public async Task CancelAllEnqueue()
        {
            var queue = new AsyncBoundedQueue<string>(0);
            var tasks = Enumerable.Range(0, 3).Select(_ => queue.EnqueueAsync("A")).ToList();
            queue.CancelAllEnqueue(CancellationToken.None);
            foreach (var task in tasks)
            {
                await task.AssertCanceledAsync().Timeout();
            }
        }
    }
}


text:
<mbean name="dcm4chee.archive:service=DeviceService">
<attribute name="State"/>
</mbean>


text:
from CIM15.CDPSM.Asset.IEC61970.Core.IdentifiedObject import IdentifiedObject

class PerLengthPhaseImpedance(IdentifiedObject):
    """Impedance and admittance parameters per unit length for n-wire unbalanced lines, in matrix form.
    """

    def __init__(self, LineSegments=None, *args, **kw_args):
        """Initialises a new 'PerLengthPhaseImpedance' instance.

        @param LineSegments: All line segments described by this phase impedance.
        """
        self._LineSegments = []
        self.LineSegments = [] if LineSegments is None else LineSegments

        super(PerLengthPhaseImpedance, self).__init__(*args, **kw_args)

    _attrs = []
    _attr_types = {}
    _defaults = {}
    _enums = {}
    _refs = ["LineSegments"]
    _many_refs = ["LineSegments"]

    def getLineSegments(self):
        """All line segments described by this phase impedance.
        """
        return self._LineSegments

    def setLineSegments(self, value):
        for x in self._LineSegments:
            x.PhaseImpedance = None
        for y in value:
            y._PhaseImpedance = self
        self._LineSegments = value

    LineSegments = property(getLineSegments, setLineSegments)

    def addLineSegments(self, *LineSegments):
        for obj in LineSegments:
            obj.PhaseImpedance = self

    def removeLineSegments(self, *LineSegments):
        for obj in LineSegments:
            obj.PhaseImpedance = None


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no,target-densitydpi=device-dpi" />

    <title>城市列表</title>

    <link rel="stylesheet" type="text/css" href="static/style.css">

        <input fromTagetID="" placeholder="输入城市名,拼音或首字母查询">

你所在的地区

                <span class="city" addressid="<?php echo $now_city['id'];?>"><?php echo $now_city['name'];?>

境内热门目的地

                <?php foreach($hot_city as $hot){ ?>
                <span class="city" addressid="<?php echo $hot['id'];?>"><?php echo $hot['name'];?>
                <?php } ?>

            <?php foreach($lists as $k=>$list){ ?>
            <div class="cate <?php echo $k;?>"><?php echo $k;?>

                <?php foreach($list as $v){ ?>
                <span class="city" addressid="<?php echo $v['id'];?>"><?php echo $v['name'];?>
                <?php } ?>

            <?php } ?>

            当前
            热门
            <?php foreach($indexs as $index){ ?>
            <span classid="<?php echo $index;?>"><?php echo $index;?>
            <?php } ?>


text:
/**
 * (created at 2011-7-20)
 */
package com.alibaba.cobar.parser.util;

import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * @author QIU Shuo
 */
public interface BinaryOperandCalculator {

    Number calculate(Integer integer1, Integer integer2);

    Number calculate(Long long1, Long long2);

    Number calculate(BigInteger bigint1, BigInteger bigint2);

    Number calculate(BigDecimal bigDecimal1, BigDecimal bigDecimal2);
}


text:
require('shelljs/global');

echo('Shell script : Packager App');
echo(" ");

// require electron-packer
echo(" ");
echo('Checks if required module(s) is/are present ');
if (!which('electron-packager')) {
    echo('Sorry, this script requires electron-packager');
    exit(1);
}

// tests if previously folder exists
if (test('-d', 'client_for_package')) {

    // remove previously packaged app
    echo(" ");
    echo("Remove previously packaged app ");
    rm('-rf', 'client_for_package');

    if (error()) {
        echo(" ");
        echo("can't remove current client_for_package folder");
        exit(1);
    }

}

// create folder for packaged app
echo(" ");
echo("Create folder for packaged app");
mkdir('-p', 'client_for_package/src/client');

if (error()) {
    echo(" ");
    echo("can't create client_for_package folder");
    exit(1);
}

// copy files for packaged app
echo(" ");
echo("Copy files for packaged app");
cp('-R', 'src/client', 'client_for_package/src/');

// check
if ( error() ) {
    echo(" ");
    echo("can't copy src/client folder");
    exit(1);
}

// get a list of another required files
let anotherFile = [ "app.js", "events.js" , "properties.json" ,  "properties-loader.js"];

// copy another files for packaged app

anotherFile.forEach( function(element) {

    cp("src/" + element, "client_for_package/src/" + element);

    // check
    if ( error() ) {
        echo(" ");
        echo("can't copy client/src/" + element + "file");
        exit(1);
    }
});

// copy package.json
echo(" ");
echo("Copy package.json");
cp("package.json", "client_for_package/");

if ( error() ) {
    echo("can't copy package.json file");
    exit(1);
}

// go to client_for_package folder
echo(" ");
cd('client_for_package/');
echo("Running install --production");

if (exec('npm install --production').code !== 0) {
    echo("can't npm install --production");
    exit(1);
}

echo(" ");
echo("Running electron-packager");

// Run external tool synchronously
if (exec('electron-packager . P4ng --platform=win32 --arch=x64').code !== 0) {
    echo('Error: electron-packager failed');
    exit(1);
}

echo(" ");
echo("JOB COMPLETED : Enjoy our P4ng game");
echo("You can find the executable inside : " + pwd() + "\\P4ng-win32-x64" );

exit(0);


text:
function mwgenericvideoimaq
%MWGENERICVIDEOIMAQ Stub placeholder for finding adaptor location.

% Copyright 2014 The MathWorks, Inc.


text:
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _

from horizon import exceptions
from horizon import forms
from horizon import tables

from openstack_dashboard import api

from openstack_dashboard.dashboards.admin.volume_types.extras \
    import forms as project_forms
from openstack_dashboard.dashboards.admin.volume_types.extras \
    import tables as project_tables

class ExtraSpecMixin(object):
    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        try:
            context['vol_type'] = api.cinder.volume_type_get(
                self.request, self.kwargs['type_id'])
        except Exception:
            exceptions.handle(self.request,
                              _("Unable to retrieve volume type details."))
        if 'key' in self.kwargs:
            context['key'] = self.kwargs['key']
        return context

class IndexView(ExtraSpecMixin, forms.ModalFormMixin, tables.DataTableView):
    table_class = project_tables.ExtraSpecsTable
    template_name = 'admin/volume_types/extras/index.html'

    def get_data(self):
        try:
            type_id = self.kwargs['type_id']
            extras_list = api.cinder.volume_type_extra_get(self.request,
                                                           type_id)
            extras_list.sort(key=lambda es: (es.key,))
        except Exception:
            extras_list = []
            exceptions.handle(self.request,
                              _('Unable to retrieve extra spec list.'))
        return extras_list

class CreateView(ExtraSpecMixin, forms.ModalFormView):
    form_class = project_forms.CreateExtraSpec
    form_id = "extra_spec_create_form"
    page_title = _("Create Volume Type Extra Spec")
    modal_id = "extra_spec_create_modal"
    submit_label = _("Create")
    submit_url = "horizon:admin:volume_types:extras:create"
    template_name = 'admin/volume_types/extras/create.html'
    success_url = 'horizon:admin:volume_types:extras:index'
    cancel_url = reverse_lazy('horizon:admin:volume_types:index')

    def get_initial(self):
        return {'type_id': self.kwargs['type_id']}

    def get_success_url(self):
        return reverse(self.success_url,
                       args=(self.kwargs['type_id'],))

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        args = (self.kwargs['type_id'],)
        context['submit_url'] = reverse(self.submit_url, args=args)
        return context

class EditView(ExtraSpecMixin, forms.ModalFormView):
    form_class = project_forms.EditExtraSpec
    form_id = "extra_spec_edit_form"
    page_title = _('Edit Extra Spec Value: %s')
    modal_id = "extra_spec_edit_modal"
    submit_label = _("Save")
    submit_url = "horizon:admin:volume_types:extras:edit"
    template_name = 'admin/volume_types/extras/edit.html'
    success_url = 'horizon:admin:volume_types:extras:index'
    cancel_url = reverse_lazy('horizon:admin:volume_types:index')

    def get_success_url(self):
        return reverse(self.success_url,
                       args=(self.kwargs['type_id'],))

    def get_initial(self):
        type_id = self.kwargs['type_id']
        key = self.kwargs['key']
        try:
            extra_specs = api.cinder.volume_type_extra_get(self.request,
                                                           type_id,
                                                           raw=True)
        except Exception:
            extra_specs = {}
            exceptions.handle(self.request,
                              _('Unable to retrieve volume type extra spec '
                                'details.'))
        return {'type_id': type_id,
                'key': key,
                'value': extra_specs.get(key, '')}

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        args = (self.kwargs['type_id'], self.kwargs['key'],)
        context['submit_url'] = reverse(self.submit_url, args=args)
        context['page_title'] = self.page_title % self.kwargs['key']
        return context

    def form_invalid(self, form):
        context = super().get_context_data()
        context = self._populate_context(context)
        context['form'] = form
        context['page_title'] = self.page_title % self.kwargs['key']
        return self.render_to_response(context)


text:
namespace FluentACS
{
    public class AcsNamespaceDescription
    {
        public AcsNamespaceDescription(string acsNamespace, string userName, string password)
        {
            Guard.NotNullOrEmpty(() => acsNamespace, acsNamespace);
            Guard.NotNullOrEmpty(() => userName, userName);
            Guard.NotNullOrEmpty(() => password, password);

            this.Namespace = acsNamespace;
            this.UserName = userName;
            this.Password = password;
        }

        public string Namespace { get; private set; }

        public string UserName { get; private set; }

        public string Password { get; private set; }
    }
}


text:
module OwaspZap
    class Attack
        def initialize(params = {})
            # TODO
            # handle it
            @base = params[:base]
            @target = params[:target]
            @api_key = params[:api_key]
        end

        def start
            set_query "#{@base}/JSON/ascan/action/scan/?apikey=#{@api_key}"
        end

        def scan_as_user(context_id, user_id)
            set_query "#{@base}/JSON/ascan/action/scanAsUser/", contextId: context_id, userId: user_id
        end

        def status
            url = Addressable::URI.parse("#{@base}/JSON/ascan/view/status/")
            url.query_values = {:zapapiformat=>"JSON",:apikey=>@api_key}
            ret = JSON.parse(RestClient::get url.normalize.to_s)
            if ret.has_key? "status"
                ret["status"].to_i
            else
                100 # it means no running
            end
        end

        def running?
            self.status != 100
        end

        private

        def set_query(addr, params={})
            default_params = {:zapapiformat=>"JSON",:url=>@target, :apikey=>@api_key}
            url = Addressable::URI.parse addr
            url.query_values = default_params.merge params
            RestClient::get url.normalize.to_str
        end

    end
end


text:
/*
 * (C) 2013, Ramon Lopez Viana
 *
 */
package net.rlviana.pricegrabber.model.search.entity.core;

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

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Order;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

import net.rlviana.pricegrabber.model.entity.core.Site;
import net.rlviana.pricegrabber.model.entity.core.Site_;
import net.rlviana.pricegrabber.model.search.AbstractSearchCriteria;

/**
 * Search criteria for Site entites
 *
 * @author ramon
 */
public class SiteSearchCriteria extends AbstractSearchCriteria<Site, Long> {

  private String name = null;
  private String nameLike = null;
  private String country;
  private Boolean promotionsActive;
  private Date promotionDate;

  @Override
  public Class<Site> getEntityClass() {
    return Site.class;
  }

  @Override
  protected List<Expression<Site>> getGrouping(final CriteriaBuilder builder, final Root<Site> root) {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  protected List<Predicate> getHaving(final CriteriaBuilder builder, final Root<Site> root) {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  protected List<Predicate> getRestrictions(final CriteriaBuilder builder, final Root<Site> root) {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  protected List<Order> getOrdering(final CriteriaBuilder builder, final Root<Site> root) {
    List<Order> orderBy = new ArrayList<Order>();
    orderBy.add(builder.desc(root.get(Site_.id)));
    return orderBy;
  }

  /**
   * @return the name
   */
  public final String getName() {
    return name;
  }

  /**
   * @return the nameLike
   */
  public final String getNameLike() {
    return nameLike;
  }

  /**
   * @param name the name to set
   */
  public final void setName(final String name) {
    this.name = name;
  }

  /**
   * @param nameLike the nameLike to set
   */
  public final void setNameLike(final String nameLike) {
    this.nameLike = nameLike;
  }

  /**
   * @return the country
   */
  public String getCountry() {
    return country;
  }

  /**
   * @param country the country to set
   */
  public void setCountry(final String country) {
    this.country = country;
  }

  /**
   * @return the promotionDate
   */
  public Date getPromotionDate() {
    return promotionDate;
  }

  /**
   * @param promotionDate the promotionDate to set
   */
  public void setPromotionDate(final Date promotionDate) {
    this.promotionDate = promotionDate;
  }

  /**
   * @return the promotionsActive value
   */
  public Boolean getActivePromotions() {
    return promotionsActive;
  }

  /**
   * @param promotionsActive the activePromotions to set
   */
  public void setPromotionsActive(final Boolean promotionsActive) {
    this.promotionsActive = promotionsActive;
  }

}


text:
/**
 * This class is used to create buttons. You can create them directly or through the Factory.
 *
 * @example
 * // Create and render a button to the body element
 * tinymce.ui.Factory.create({
 *     type: 'button',
 *     text: 'My button'
 * }).renderTo(document.body);
 *
 * @-x-less Button.less
 * @class tinymce.ui.Button
 * @extends tinymce.ui.Widget
 */
define(
  'tinymce.ui.Button',
  [
    'global!document',
    'global!window',
    'tinymce.ui.Widget'
  ],
  function (document, window, Widget) {
    "use strict";

    return Widget.extend({
      Defaults: {
        classes: "widget btn",
        role: "button"
      },

      /**
       * Constructs a new button instance with the specified settings.
       *
       * @constructor
       * @param {Object} settings Name/value object with settings.
       * @setting {String} size Size of the button small|medium|large.
       * @setting {String} image Image to use for icon.
       * @setting {String} icon Icon to use for button.
       */
      init: function (settings) {
        var self = this, size;

        self._super(settings);
        settings = self.settings;

        size = self.settings.size;

        self.on('click mousedown', function (e) {
          e.preventDefault();
        });

        self.on('touchstart', function (e) {
          self.fire('click', e);
          e.preventDefault();
        });

        if (settings.subtype) {
          self.classes.add(settings.subtype);
        }

        if (size) {
          self.classes.add('btn-' + size);
        }

        if (settings.icon) {
          self.icon(settings.icon);
        }
      },

      /**
       * Sets/gets the current button icon.
       *
       * @method icon
       * @param {String} [icon] New icon identifier.
       * @return {String|tinymce.ui.MenuButton} Current icon or current MenuButton instance.
       */
      icon: function (icon) {
        if (!arguments.length) {
          return this.state.get('icon');
        }

        this.state.set('icon', icon);

        return this;
      },

      /**
       * Repaints the button for example after it's been resizes by a layout engine.
       *
       * @method repaint
       */
      repaint: function () {
        var btnElm = this.getEl().firstChild,
          btnStyle;

        if (btnElm) {
          btnStyle = btnElm.style;
          btnStyle.width = btnStyle.height = "100%";
        }

        this._super();
      },

      /**
       * Renders the control as a HTML string.
       *
       * @method renderHtml
       * @return {String} HTML representing the control.
       */
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        var icon = self.state.get('icon'), image, text = self.state.get('text'), textHtml = '';

        image = self.settings.image;
        if (image) {
          icon = 'none';

          // Support for [high dpi, low dpi] image sources
          if (typeof image != "string") {
            image = window.getSelection ? image[0] : image[1];
          }

          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }

        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '' + self.encode(text) + '';
        }

        icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';

        return (
          '
' +
          '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' +
          (icon ? '' : '') +
          textHtml +
          '</button>' +
          '
'
        );
      },

      bindStates: function () {
        var self = this, $ = self.$, textCls = self.classPrefix + 'txt';

        function setButtonText(text) {
          var $span = $('span.' + textCls, self.getEl());

          if (text) {
            if (!$span[0]) {
              $('button:first', self.getEl()).append('');
              $span = $('span.' + textCls, self.getEl());
            }

            $span.html(self.encode(text));
          } else {
            $span.remove();
          }

          self.classes.toggle('btn-has-text', !!text);
        }

        self.state.on('change:text', function (e) {
          setButtonText(e.value);
        });

        self.state.on('change:icon', function (e) {
          var icon = e.value, prefix = self.classPrefix;

          self.settings.icon = icon;
          icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';

          var btnElm = self.getEl().firstChild, iconElm = btnElm.getElementsByTagName('i')[0];

          if (icon) {
            if (!iconElm || iconElm != btnElm.firstChild) {
              iconElm = document.createElement('i');
              btnElm.insertBefore(iconElm, btnElm.firstChild);
            }

            iconElm.className = icon;
          } else if (iconElm) {
            btnElm.removeChild(iconElm);
          }

          setButtonText(self.state.get('text'));
        });

        return self._super();
      }
    });
  }
);


text:
//===-- MipsTargetInfo.cpp - Mips Target Implementation -------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "Mips.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/TargetRegistry.h"
using namespace llvm;

Target llvm::TheMipsTarget, llvm::TheMipselTarget;
Target llvm::TheMips64Target, llvm::TheMips64elTarget;

extern "C" void LLVMInitializeMipsTargetInfo() {
  RegisterTarget<Triple::mips,
        /*HasJIT=*/true> X(TheMipsTarget, "mips", "Mips");

  RegisterTarget<Triple::mipsel,
        /*HasJIT=*/true> Y(TheMipselTarget, "mipsel", "Mipsel");

  RegisterTarget<Triple::mips64,
        /*HasJIT=*/true> A(TheMips64Target, "mips64", "Mips64 [experimental]");

  RegisterTarget<Triple::mips64el,
        /*HasJIT=*/true> B(TheMips64elTarget,
                            "mips64el", "Mips64el [experimental]");
}


text:
package org.learn.javafx.single.common.util;

import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;

public class StringUtil {
	public static final Logger logger = Logger.getLogger(StringUtil.class);

	public static boolean isBlank(String str) {
		return StringUtils.isBlank(str);
	}

	public static boolean isEmpty(String str) {
		return StringUtils.isEmpty(str);
	}

}