text:
<!doctype html>

        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="keywords" content="">
        <meta name="description" content="">
        <title>2018 Guild Awards  Nomination Process has ended</title>

        <link rel="alternate" type="application/rss+xml" title="RSS" href="/blog/feeds/rss/">
        <link rel="alternate" type="application/atom+xml" title="Atom" href="/blog/feeds/atom/">

        <link href="http://members.local706.org/static/css/bootstrap.2.3.0.css" rel="stylesheet">
        <link href="http://members.local706.org/static/css/bootstrap-responsive.2.3.0.css" rel="stylesheet">
        <link href="http://members.local706.org/static/css/font-awesome.min.css" rel="stylesheet">
        <link href="http://members.local706.org/static/css/prettyPhoto.css" rel="stylesheet">
        <link href="http://members.local706.org/static/css/base.css" rel="stylesheet">
        <link href="http://members.local706.org/static/css/custom.css" rel="stylesheet">
		<link href="http://members.local706.org/static/css/jquery-ui.css" rel="stylesheet">

        <link href="http://members.local706.org/static/css/scheme-dark-orange.css" title="scheme-dark-orange" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-gradients-grey.css" title="scheme-gradients-grey" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-green.css" title="scheme-green" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-navy.css" title="scheme-navy" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-red.css" title="scheme-red" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-purple.css" title="scheme-purple" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-yellow.css" title="scheme-yellow" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-cyan.css" title="scheme-cyan" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-black.css" title="scheme-black" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-pink.css" title="scheme-pink" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-wood.css" title="scheme-wood" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-dark.css" title="scheme-dark" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-noisy-blue.css" title="scheme-noisy-blue" rel="alternate stylesheet">
        <link href="http://members.local706.org/static/css/scheme-orange.css" title="scheme-orange" rel="alternate stylesheet">

        <link href='//fonts.googleapis.com/css?family=Titillium+Web:400,200,200italic,300,300italic,400italic,600,600italic,700,700italic,900|Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>

        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://members.local706.org/static/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://members.local706.org/static/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://members.local706.org/static/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="http://members.local706.org/static/ico/apple-touch-icon-57-precomposed.png">
        <link rel="shortcut icon" href="http://members.local706.org/static/ico/favicon.png">

   Make-Up Artists & Hair Stylists Guild Local 706

Local 706 Guild Award Submission are not open yet.

	Submissions open  Monday, October 15, 2018  9:00 AM  PST

2019 Guild Award Submission Open in

Days

Hours

Minutes

Seconds

Sincerely,

Guild Award Committee


text:
The Dockerfile contained in this repository may be used to create a container that provides a vim/tmux based development environment. It uses GitHub to retrieve public keys to facilitate ssh connections.

_Disclaimer: This Dockerfile and referenced [configuration files](https://github.com/chasdev/config-files) represent my own development environment, which continues to evolve. Use at your own risk._

#####Background

Don Petersen's 'dev-container-base' (link below) was a primary source, and much credit and appreciation goes to him. _(Note he uses different vim plugins as well as additional tools such as [homesick](https://github.com/technicalpickles/homesick) and [direnv](http://direnv.net), some of which I may adopt in the future.)_ Following are links to his write-up and repository:

* [Cloud Coding: Remote Pairing using Docker](http://www.centurylinklabs.com/cloud-coding-docker-remote-pairing/)
* [Don Petersen's 'dev-container-base' container](https://github.com/dpetersen/dev-container-base)

In addition, the following references were also helpful:

* [How to use docker on OS X: the missing guide](http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide)
* [boot2docker-fwd](https://gist.github.com/deinspanjer/9215467)
* [Docker blurs the line between SAAS and selfhosted apps](http://jeffknupp.com/blog/2014/06/30/docker-blurs-the-line-between-saas-and-selfhosted-apps/)
* [Build a zen command-line environment with git tmux oh-my-zsh and docker](http://www.theodo.fr/blog/2014/01/build-a-zen-command-line-environment-with-git-tmux-oh-my-zsh-mosh-and-docker/)

## Using boot2docker on OS X

[Docker](https://www.docker.com) requires linux so to use on OS X or Windows a (lightweight) linux VM must be used.  When running on OS X or windows, you may use either [Vagrant](https://www.vagrantup.com) or '[boot2docker](https://github.com/boot2docker/boot2docker)'. I currently use boot2docker, so the following is specific to using boot2docker on OS X.

boot2docker may be installed using a [package installer](https://github.com/boot2docker/osx-installer/releases) or brew.  The package installer will install Docker, the boot2docker ISO, the boot2docker manage tool, and VirtualBox. This will also handle creating an ssh key pair (which may need to be done manually if installing via brew).

If using brew:

```
$ brew tap phinze/homebrew-cask
$ brew install brew-cask
$ brew cask install virtualbox
$ brew install docker
$ brew install boot2docker
$ boot2docker init
```

To start the VM:

```
$ boot2docker up
```

The above will indicate the DOCKER_HOST environment variable must be set if you haven't done this previously.  (If you already use the chasdev/config-files repository to manage your dot-files, this will be set already.)

```
export DOCKER_HOST=tcp://192.168.59.103:2376
```

```
$ git clone git@github.com:chasdev/dev-env.git
$ cd dev-env
```

#####Building the image and running a container

To build the image:

```
$ docker build -t chasdev/dev-env .
```

Next we'll start the container. The following mounts '~/working' as '/working' within the container, as I keep all of my code under this directory. This container allows multiple users who are identified in the comma-deliminated environment variable set below. These users must be GitHub users, and their public keys will be retrieved and added to the container. _(This uses a [ssh_key_adder.rb](https://github.com/dpetersen/dev-container-base/blob/master/ssh_key_adder.rb) ruby script developed by Don Petersen.)_

```
docker run \
-d -e AUTHORIZED_GH_USERS="chasdev" \
-p 0.0.0.0:12345:22 \
-v /Users/chas/working:/working \
chasdev/dev-env:latest
```

Since this container is used as a 'development environment', it uses ssh (which is not a best practice for 'service' containers). Most of your containers should use 'nsenter' in lieu of ssh.

To facilitate connecting to a running container over ssh, we'll set an alias by adding the following to '~/.ssh/config' file. (If using boot2docker, the 'IP or hostname' is that of the vm and not the host. You can determine this IP by using: 'boot2docker ip').

```
Host devbox
  HostName <YOUR IP OR HOSTNAME>
  Port <YOUR MAPPED SSH PORT FROM ABOVE>
  User root
  ForwardAgent true
  StrictHostKeyChecking no
  UserKnownHostsFile=/dev/null
```
Now we can connect using:

```
ssh devbox
```

[Vundle](https://github.com/gmarik/Vundle.vim) is used to install all vim plugins listed in the .vimrc file (from 'https://github.com/chasdev/config-files'), and the Dockerfile includes steps to build the necessary native libraries for these plugins. Unlike previous versions of this container, no manual configuration is necessary to use vim, tmux, or wemux.

The container should be usable, providing a command-line centric development environment comprised of bash, vim, tmux, and git. This container may be extended to provide a complete development environment with language-specific support (e.g., node.js, golang, Java/groovy, Scala, etc.).  My [dev-env-node](https://github.com/chasdev/dev-env-nodejs) container is an example.

redpajama_set_name: RedPajamaGithub


text:
use strict;
use warnings;
package MongoDB::Op::_InsertOne;

# Encapsulate a single-document insert operation; returns a
# MongoDB::InsertOneResult

use version;
our $VERSION = 'v2.2.3';

use Moo;

use MongoDB::Error;
use MongoDB::InsertOneResult;
use MongoDB::_Protocol;

use namespace::clean;

has document => (
    is       => 'ro',
    required => 1,
);

# this starts undef and gets initialized during processing
has _doc_id => (
    is       => 'ro',
    init_arg => undef,
    writer   => '_set_doc_id',
);

with $_ for qw(
  MongoDB::Role::_PrivateConstructor
  MongoDB::Role::_CollectionOp
  MongoDB::Role::_SingleBatchDocWrite
  MongoDB::Role::_InsertPreEncoder
  MongoDB::Role::_BypassValidation
);

sub execute {
    my ( $self,     $link )       = @_;
    my ( $orig_doc, $insert_doc ) = ( $self->document );

    ( $insert_doc = $self->_pre_encode_insert( $link->max_bson_object_size, $orig_doc, '.' ) ),
      ( $self->_set_doc_id( $insert_doc->{metadata}{_id} ) );

    return $self->_send_legacy_op_noreply( $link,
        MongoDB::_Protocol::write_insert( $self->full_name, $insert_doc->{bson} ),
        $orig_doc, "MongoDB::UnacknowledgedResult", "insert" )
      if ! $self->_should_use_acknowledged_write;

    return $self->_send_write_command(
        $link,
        $self->_maybe_bypass(
            $link->supports_document_validation,
            [
                insert    => $self->coll_name,
                documents => [$insert_doc],
                @{ $self->write_concern->as_args },
            ]
        ),
        $orig_doc,
        "MongoDB::InsertOneResult"
      )->assert
      if $link->supports_write_commands;

    return $self->_send_legacy_op_with_gle( $link,
        MongoDB::_Protocol::write_insert( $self->full_name, $insert_doc->{bson} ),
        $orig_doc, "MongoDB::InsertOneResult", "insert" )->assert;
}

sub _parse_cmd {
    my ( $self, $res ) = @_;
    return ( $res->{ok} ? ( inserted_id => $self->_doc_id ) : () );
}

BEGIN {
    no warnings 'once';
    *_parse_gle = \&_parse_cmd;
}

1;


text:
float PI = 3.14159;

float degreesToRadians(float d){
	return d * (PI/180);
}
float radiansToDegrees(float r){
	return r * (180/PI);
}
float vectorToRadians(CGPoint vector){
	if(vector.y == 0){ vector.y = 0.000001f; }
	float baseRadians = atan(vector.x/vector.y);
	if(vector.y < 0){ baseRadians += PI; }	//Adjust for -Y
	return baseRadians;
}
CGPoint radiansToVector(float radians){
	return ccp(sin(radians-PI/2), cos(radians-PI/2));
}
float distanceBetweenPoints(CGPoint p1, CGPoint p2){
	return sqrt( pow( (p1.x-p2.x) ,2) + pow( (p1.y-p2.y) ,2) );
}
bool pointIsInRect(CGPoint p, CGRect r){
	bool isInRect = false;
	if( p.x < r.origin.x + r.size.width &&
	   p.x > r.origin.x &&
	   p.y < r.origin.y + r.size.height &&
	   p.y > r.origin.y )
	{
		isInRect = true;
	}
	return isInRect;
}
bool pointIsInCircle(CGPoint p, CGPoint origin, float radius){
	bool isInCircle = false;
	if(distanceBetweenPoints(p, origin) <= radius){
		isInCircle = true;
	}
	return isInCircle;
}
float angleDifference(float angleA, float angleB){
	float diff = fabs(angleA-angleB);
	if(fabs((angleA+360)-angleB) < diff){
		diff = fabs((angleA+360)-angleB);
	}
	if(fabs((angleA-360)-angleB) < diff){
		diff = fabs((angleA-360)-angleB);
	}
	if(fabs(angleA-(angleB+360)) < diff){
		diff = fabs(angleA-(angleB+360));
	}
	if(fabs(angleA-(angleB-360)) < diff){
		diff = fabs(angleA-(angleB-360));
	}
	return diff;
}
float absoluteValue(float num){
	if(num < 0){
		num = num * -1;
	}
	return num;
}
float convertPositionX(CGPoint areaSize, float x){
	return x - (areaSize.x/2);
}
float convertPositionY(CGPoint areaSize, float y){
	return y - (areaSize.y/2);
}
CGPoint midPoint(CGPoint p1, CGPoint p2){
	return ccp( (p1.x+p2.x)/2 , (p1.y+p2.y)/2 );
}
float map(float value, float istart, float istop, float ostart, float ostop) {
    return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
}


text:
<!DOCTYPE html>

    <title>PGP Signature Browser</title>
    <link rel='stylesheet' href='static/css/vis.css' />

			Name:
			<input id="query_email" type="text">
			<button id="search_email">Search by email address</button>
			(sqlite string query, i.e. "%" to match any string)

			Key ID:
			<input id="query_key" type="text">
			<button id="search_key">Search by key id</button>

	<button id="clear">Clear graph and search result</button>
	<button id="undo">Undo last operation</button>


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".activities.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay"
        app:elevation="0dp">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="enterAlways"
            app:popupTheme="@style/AppTheme.PopupOverlay">

        </android.support.v7.widget.Toolbar>

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/colorPrimary"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/activity_search_title"
            android:layout_gravity="center"
            android:layout_marginTop="@dimen/activity_search_title_margin_top"
            android:textSize="@dimen/activity_search_title_text_size"
            android:textColor="@color/activity_search_title_text_color"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/activity_search_description"
            android:layout_gravity="center"
            android:layout_marginTop="@dimen/activity_search_description_margin_top"
            android:layout_marginBottom="@dimen/activity_search_description_margin_bottom"
            android:textSize="@dimen/activity_search_description_text_size"
            android:textAlignment="center"
            android:textColor="@color/activity_search_description_text_color" />

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center">

            <ProgressBar
                android:id="@+id/progress_rotating"
                android:layout_width="@dimen/activity_search_progressbar_width"
                android:layout_height="@dimen/activity_search_progressbar_height"
                android:background="@drawable/circular_progress_bar_shape"
                android:indeterminateDrawable="@drawable/circular_progress_bar"
                android:layout_gravity="center"
                style="?android:attr/progressBarStyleLarge"
                android:visibility="visible"/>

            <ProgressBar
                android:id="@+id/progress_not_rotating"
                android:layout_width="@dimen/activity_search_progressbar_width"
                android:layout_height="@dimen/activity_search_progressbar_height"
                android:background="@drawable/circular_progress_bar_shape"
                android:layout_gravity="center"
                style="?android:attr/progressBarStyleLarge"
                android:indeterminate="false"
                android:visibility="gone"/>

            <ImageView
                android:layout_width="@dimen/activity_search_imageview_width"
                android:layout_height="@dimen/activity_search_imageview_height"
                android:id="@+id/icon"
                android:src="@drawable/ic_search"
                android:layout_centerInParent="true" />
        </RelativeLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/activity_search_button_text_continue"
            android:id="@+id/button"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="@dimen/activity_search_button_margin_top"
            android:visibility="gone"
            android:textColor="@color/activity_search_button_text_color"
            android:textSize="@dimen/activity_search_button_text_size"/>

        <!-- Rimosso per test (Causa bug di rendering su android studio ma FUNZIONA)-->
        <!--android:indeterminateDrawable="@drawable/circular_progress_bar"-->

    </LinearLayout>

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


text:
CKEDITOR.lang.et = {
			dir: 'ltr',
			editorTitle: 'Rich text editor, %1, press ALT 0 for help.',
			toolbar: 'Toolbar',
			editor: 'Rich Text Editor',
			source: 'Lähtekood',
			newPage: 'Uus leht',
			save: 'Salvesta',
			preview: 'Eelvaade',
			cut: 'Lõika',
			copy: 'Kopeeri',
			paste: 'Kleebi',
			print: 'Prindi',
			underline: 'Allajoonitud',
			bold: 'Paks',
			italic: 'Kursiiv',
			selectAll: 'Vali kõik',
			removeFormat: 'Eemalda vorming',
			strike: 'Läbijoonitud',
			subscript: 'Allindeks',
			superscript: 'Ülaindeks',
			horizontalrule: 'Sisesta horisontaaljoon',
			pagebreak: 'Sisesta lehevahetuskoht',
			pagebreakAlt: 'Page Break',
			unlink: 'Eemalda link',
			undo: 'Võta tagasi',
			redo: 'Korda toimingut',
			common: {
				browseServer: 'Sirvi serverit',
				url: 'URL',
				protocol: 'Protokoll',
				upload: 'Lae üles',
				uploadSubmit: 'Saada serverissee',
				image: 'Pilt',
				flash: 'Flash',
				form: 'Vorm',
				checkbox: 'Märkeruut',
				radio: 'Raadionupp',
				textField: 'Tekstilahter',
				textarea: 'Tekstiala',
				hiddenField: 'Varjatud lahter',
				button: 'Nupp',
				select: 'Valiklahter',
				imageButton: 'Piltnupp',
				notSet: '<määramata>',
				id: 'Id',
				name: 'Nimi',
				langDir: 'Keele suund',
				langDirLtr: 'Vasakult paremale (LTR)',
				langDirRtl: 'Paremalt vasakule (RTL)',
				langCode: 'Keele kood',
				longDescr: 'Pikk kirjeldus URL',
				cssClass: 'Stiilistiku klassid',
				advisoryTitle: 'Juhendav tiitel',
				cssStyle: 'Laad',
				ok: 'OK',
				cancel: 'Loobu',
				close: 'Close',
				preview: 'Preview',
				generalTab: 'General',
				advancedTab: 'Täpsemalt',
				validateNumberFailed: 'This value is not a number.',
				confirmNewPage: 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',
				confirmCancel: 'Some of the options have been changed. Are you sure to close the dialog?',
				options: 'Options',
				target: 'Target',
				targetNew: 'New Window (_blank)',
				targetTop: 'Topmost Window (_top)',
				targetSelf: 'Same Window (_self)',
				targetParent: 'Parent Window (_parent)',
				langDirLTR: 'Left to Right (LTR)',
				langDirRTL: 'Right to Left (RTL)',
				styles: 'Style',
				cssClasses: 'Stylesheet Classes',
				width: 'Laius',
				height: 'Kõrgus',
				align: 'Joondus',
				alignLeft: 'Vasak',
				alignRight: 'Paremale',
				alignCenter: 'Kesk',
				alignTop: 'Üles',
				alignMiddle: 'Keskele',
				alignBottom: 'Alla',
				invalidHeight: 'Height must be a number.',
				invalidWidth: 'Width must be a number.',
				unavailable: '%1, unavailable'
			},
			contextmenu: {options: 'Context Menu Options'},
			specialChar: {toolbar: 'Sisesta erimärk', title: 'Vali erimärk', options: 'Special Character Options'},
			link: {
				toolbar: 'Sisesta link / Muuda linki',
				other: '<muu>',
				menu: 'Muuda linki',
				title: 'Link',
				info: 'Lingi info',
				target: 'Sihtkoht',
				upload: 'Lae üles',
				advanced: 'Täpsemalt',
				type: 'Lingi tüüp',
				toUrl: 'URL',
				toAnchor: 'Ankur sellel lehel',
				toEmail: 'E-post',
				targetFrame: '<raam>',
				targetPopup: '<hüpikaken>',
				targetFrameName: 'Sihtmärk raami nimi',
				targetPopupName: 'Hüpikakna nimi',
				popupFeatures: 'Hüpikakna omadused',
				popupResizable: 'Resizable',
				popupStatusBar: 'Olekuriba',
				popupLocationBar: 'Aadressiriba',
				popupToolbar: 'Tööriistariba',
				popupMenuBar: 'Menüüriba',
				popupFullScreen: 'Täisekraan (IE)',
				popupScrollBars: 'Kerimisribad',
				popupDependent: 'Sõltuv (Netscape)',
				popupLeft: 'Vasak asukoht',
				popupTop: 'Ülemine asukoht',
				id: 'Id',
				langDir: 'Keele suund',
				langDirLTR: 'Vasakult paremale (LTR)',
				langDirRTL: 'Paremalt vasakule (RTL)',
				acccessKey: 'Juurdepääsu võti',
				name: 'Nimi',
				langCode: 'Keele suund',
				tabIndex: 'Tab indeks',
				advisoryTitle: 'Juhendav tiitel',
				advisoryContentType: 'Juhendava sisu tüüp',
				cssClasses: 'Stiilistiku klassid',
				charset: 'Lingitud ressurssi märgistik',
				styles: 'Laad',
				selectAnchor: 'Vali ankur',
				anchorName: 'Ankru nime järgi',
				anchorId: 'Elemendi id järgi',
				emailAddress: 'E-posti aadress',
				emailSubject: 'Sõnumi teema',
				emailBody: 'Sõnumi tekst',
				noAnchors: '(Selles dokumendis ei ole ankruid)',
				noUrl: 'Palun kirjuta lingi URL',
				noEmail: 'Palun kirjuta E-Posti aadress'
			},
			anchor: {
				toolbar: 'Sisesta ankur / Muuda ankrut',
				menu: 'Ankru omadused',
				title: 'Ankru omadused',
				name: 'Ankru nimi',
				errorName: 'Palun sisest ankru nimi'
			},
			list: {
				numberedTitle: 'Numbered List Properties',
				bulletedTitle: 'Bulleted List Properties',
				type: 'Type',
				start: 'Start',
				validateStartNumber: 'List start number must be a whole number.',
				circle: 'Circle',
				disc: 'Disc',
				square: 'Square',
				none: 'None',
				notset: '<not set>',
				armenian: 'Armenian numbering',
				georgian: 'Georgian numbering (an, ban, gan, etc.)',
				lowerRoman: 'Lower Roman (i, ii, iii, iv, v, etc.)',
				upperRoman: 'Upper Roman (I, II, III, IV, V, etc.)',
				lowerAlpha: 'Lower Alpha (a, b, c, d, e, etc.)',
				upperAlpha: 'Upper Alpha (A, B, C, D, E, etc.)',
				lowerGreek: 'Lower Greek (alpha, beta, gamma, etc.)',
				decimal: 'Decimal (1, 2, 3, etc.)',
				decimalLeadingZero: 'Decimal leading zero (01, 02, 03, etc.)'
			},
			findAndReplace: {
				title: 'Otsi ja asenda',
				find: 'Otsi',
				replace: 'Asenda',
				findWhat: 'Leia mida:',
				replaceWith: 'Asenda millega:',
				notFoundMsg: 'Valitud teksti ei leitud.',
				matchCase: 'Erista suur- ja väiketähti',
				matchWord: 'Otsi terviklike sõnu',
				matchCyclic: 'Match cyclic',
				replaceAll: 'Asenda kõik',
				replaceSuccessMsg: '%1 occurrence(s) replaced.'
			},
			table: {
				toolbar: 'Tabel',
				title: 'Tabeli atribuudid',
				menu: 'Tabeli atribuudid',
				deleteTable: 'Kustuta tabel',
				rows: 'Read',
				columns: 'Veerud',
				border: 'Joone suurus',
				widthPx: 'pikslit',
				widthPc: 'protsenti',
				widthUnit: 'width unit',
				cellSpace: 'Lahtri vahe',
				cellPad: 'Lahtri täidis',
				caption: 'Tabeli tiitel',
				summary: 'Kokkuvõte',
				headers: 'Headers',
				headersNone: 'None',
				headersColumn: 'First column',
				headersRow: 'First Row',
				headersBoth: 'Both',
				invalidRows: 'Number of rows must be a number greater than 0.',
				invalidCols: 'Number of columns must be a number greater than 0.',
				invalidBorder: 'Border size must be a number.',
				invalidWidth: 'Table width must be a number.',
				invalidHeight: 'Table height must be a number.',
				invalidCellSpacing: 'Cell spacing must be a number.',
				invalidCellPadding: 'Cell padding must be a number.',
				cell: {
					menu: 'Lahter',
					insertBefore: 'Sisesta lahter enne',
					insertAfter: 'Sisesta lahter peale',
					deleteCell: 'Eemalda lahtrid',
					merge: 'Ühenda lahtrid',
					mergeRight: 'Ühenda paremale',
					mergeDown: 'Ühenda alla',
					splitHorizontal: 'Poolita lahter horisontaalselt',
					splitVertical: 'Poolita lahter vertikaalselt',
					title: 'Cell Properties',
					cellType: 'Cell Type',
					rowSpan: 'Rows Span',
					colSpan: 'Columns Span',
					wordWrap: 'Word Wrap',
					hAlign: 'Horizontal Alignment',
					vAlign: 'Vertical Alignment',
					alignBaseline: 'Baseline',
					bgColor: 'Background Color',
					borderColor: 'Border Color',
					data: 'Data',
					header: 'Header',
					yes: 'Yes',
					no: 'No',
					invalidWidth: 'Cell width must be a number.',
					invalidHeight: 'Cell height must be a number.',
					invalidRowSpan: 'Rows span must be a whole number.',
					invalidColSpan: 'Columns span must be a whole number.',
					chooseColor: 'Choose'
				},
				row: {
					menu: 'Rida',
					insertBefore: 'Sisesta rida enne',
					insertAfter: 'Sisesta rida peale',
					deleteRow: 'Eemalda read'
				},
				column: {
					menu: 'Veerg',
					insertBefore: 'Sisesta veerg enne',
					insertAfter: 'Sisesta veerg peale',
					deleteColumn: 'Eemalda veerud'
				}
			},
			button: {
				title: 'Nupu omadused',
				text: 'Tekst (väärtus)',
				type: 'Tüüp',
				typeBtn: 'Nupp',
				typeSbm: 'Saada',
				typeRst: 'Lähtesta'
			},
			checkboxAndRadio: {
				checkboxTitle: 'Märkeruudu omadused',
				radioTitle: 'Raadionupu omadused',
				value: 'Väärtus',
				selected: 'Valitud'
			},
			form: {title: 'Vormi omadused', menu: 'Vormi omadused', action: 'Toiming', method: 'Meetod', encoding: 'Encoding'},
			select: {
				title: 'Valiklahtri omadused',
				selectInfo: 'Info',
				opAvail: 'Võimalikud valikud',
				value: 'Väärtus',
				size: 'Suurus',
				lines: 'ridu',
				chkMulti: 'Võimalda mitu valikut',
				opText: 'Tekst',
				opValue: 'Väärtus',
				btnAdd: 'Lisa',
				btnModify: 'Muuda',
				btnUp: 'Üles',
				btnDown: 'Alla',
				btnSetValue: 'Sea valitud olekuna',
				btnDelete: 'Kustuta'
			},
			textarea: {title: 'Tekstiala omadused', cols: 'Veerge', rows: 'Ridu'},
			textfield: {
				title: 'Tekstilahtri omadused',
				name: 'Nimi',
				value: 'Väärtus',
				charWidth: 'Laius (tähemärkides)',
				maxChars: 'Maksimaalselt tähemärke',
				type: 'Tüüp',
				typeText: 'Tekst',
				typePass: 'Parool'
			},
			hidden: {title: 'Varjatud lahtri omadused', name: 'Nimi', value: 'Väärtus'},
			image: {
				title: 'Pildi atribuudid',
				titleButton: 'Piltnupu omadused',
				menu: 'Pildi atribuudid',
				infoTab: 'Pildi info',
				btnUpload: 'Saada serverissee',
				upload: 'Lae üles',
				alt: 'Alternatiivne tekst',
				lockRatio: 'Lukusta kuvasuhe',
				unlockRatio: 'Unlock Ratio',
				resetSize: 'Lähtesta suurus',
				border: 'Joon',
				hSpace: 'H. vaheruum',
				vSpace: 'V. vaheruum',
				alertUrl: 'Palun kirjuta pildi URL',
				linkTab: 'Link',
				button2Img: 'Do you want to transform the selected image button on a simple image?',
				img2Button: 'Do you want to transform the selected image on a image button?',
				urlMissing: 'Image source URL is missing.',
				validateBorder: 'Border must be a whole number.',
				validateHSpace: 'HSpace must be a whole number.',
				validateVSpace: 'VSpace must be a whole number.'
			},
			flash: {
				properties: 'Flash omadused',
				propertiesTab: 'Properties',
				title: 'Flash omadused',
				chkPlay: 'Automaatne start ',
				chkLoop: 'Korduv',
				chkMenu: 'Võimalda flash menüü',
				chkFull: 'Allow Fullscreen',
				scale: 'Mastaap',
				scaleAll: 'Näita kõike',
				scaleNoBorder: 'Äärist ei ole',
				scaleFit: 'Täpne sobivus',
				access: 'Script Access',
				accessAlways: 'Always',
				accessSameDomain: 'Same domain',
				accessNever: 'Never',
				alignAbsBottom: 'Abs alla',
				alignAbsMiddle: 'Abs keskele',
				alignBaseline: 'Baasjoonele',
				alignTextTop: 'Tekstit üles',
				quality: 'Quality',
				qualityBest: 'Best',
				qualityHigh: 'High',
				qualityAutoHigh: 'Auto High',
				qualityMedium: 'Medium',
				qualityAutoLow: 'Auto Low',
				qualityLow: 'Low',
				windowModeWindow: 'Window',
				windowModeOpaque: 'Opaque',
				windowModeTransparent: 'Transparent',
				windowMode: 'Window mode',
				flashvars: 'Variables for Flash',
				bgcolor: 'Tausta värv',
				hSpace: 'H. vaheruum',
				vSpace: 'V. vaheruum',
				validateSrc: 'Palun kirjuta lingi URL',
				validateHSpace: 'HSpace must be a number.',
				validateVSpace: 'VSpace must be a number.'
			},
			spellCheck: {
				toolbar: 'Kontrolli õigekirja',
				title: 'Spell Check',
				notAvailable: 'Sorry, but service is unavailable now.',
				errorLoading: 'Error loading application service host: %s.',
				notInDic: 'Puudub sõnastikust',
				changeTo: 'Muuda',
				btnIgnore: 'Ignoreeri',
				btnIgnoreAll: 'Ignoreeri kõiki',
				btnReplace: 'Asenda',
				btnReplaceAll: 'Asenda kõik',
				btnUndo: 'Võta tagasi',
				noSuggestions: '- Soovitused puuduvad -',
				progress: 'Toimub õigekirja kontroll...',
				noMispell: 'Õigekirja kontroll sooritatud: õigekirjuvigu ei leitud',
				noChanges: 'Õigekirja kontroll sooritatud: ühtegi sõna ei muudetud',
				oneChange: 'Õigekirja kontroll sooritatud: üks sõna muudeti',
				manyChanges: 'Õigekirja kontroll sooritatud: %1 sõna muudetud',
				ieSpellDownload: 'Õigekirja kontrollija ei ole installeeritud. Soovid sa selle alla laadida?'
			},
			smiley: {toolbar: 'Emotikon', title: 'Sisesta emotikon', options: 'Smiley Options'},
			elementsPath: {eleLabel: 'Elements path', eleTitle: '%1 element'},
			numberedlist: 'Nummerdatud loetelu',
			bulletedlist: 'Punktiseeritud loetelu',
			indent: 'Suurenda taanet',
			outdent: 'Vähenda taanet',
			justify: {left: 'Vasakjoondus', center: 'Keskjoondus', right: 'Paremjoondus', block: 'Rööpjoondus'},
			blockquote: 'Blokktsitaat',
			clipboard: {
				title: 'Kleebi',
				cutError: 'Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt lõigata. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+X).',
				copyError: 'Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt kopeerida. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+C).',
				pasteMsg: 'Palun kleebi järgnevasse kasti kasutades klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+V) ja vajuta seejärel OK.',
				securityMsg: 'Sinu veebisirvija turvaseadete tõttu, ei oma redaktor otsest ligipääsu lõikelaua andmetele. Sa pead kleepima need uuesti siia aknasse.',
				pasteArea: 'Paste Area'
			},
			pastefromword: {
				confirmCleanup: 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?',
				toolbar: 'Kleebi Wordist',
				title: 'Kleebi Wordist',
				error: 'It was not possible to clean up the pasted data due to an internal error'
			},
			pasteText: {button: 'Kleebi tavalise tekstina', title: 'Kleebi tavalise tekstina'},
			templates: {
				button: 'Šabloon',
				title: 'Sisu šabloonid',
				options: 'Template Options',
				insertOption: 'Asenda tegelik sisu',
				selectPromptMsg: 'Palun vali šabloon, et avada see redaktoris
(praegune sisu läheb kaotsi):',
				emptyListMsg: '(Ühtegi šablooni ei ole defineeritud)'
			},
			showBlocks: 'Näita blokke',
			stylesCombo: {
				label: 'Laad',
				panelTitle: 'Formatting Styles',
				panelTitle1: 'Block Styles',
				panelTitle2: 'Inline Styles',
				panelTitle3: 'Object Styles'
			},
			format: {
				label: 'Vorming',
				panelTitle: 'Vorming',
				tag_p: 'Tavaline',
				tag_pre: 'Vormindatud',
				tag_address: 'Aadress',
				tag_h1: 'Pealkiri 1',
				tag_h2: 'Pealkiri 2',
				tag_h3: 'Pealkiri 3',
				tag_h4: 'Pealkiri 4',
				tag_h5: 'Pealkiri 5',
				tag_h6: 'Pealkiri 6',
				tag_div: 'Tavaline (DIV)'
			},
			div: {
				title: 'Create Div Container',
				toolbar: 'Create Div Container',
				cssClassInputLabel: 'Stylesheet Classes',
				styleSelectLabel: 'Style',
				IdInputLabel: 'Id',
				languageCodeInputLabel: ' Language Code',
				inlineStyleInputLabel: 'Inline Style',
				advisoryTitleInputLabel: 'Advisory Title',
				langDirLabel: 'Language Direction',
				langDirLTRLabel: 'Left to Right (LTR)',
				langDirRTLLabel: 'Right to Left (RTL)',
				edit: 'Edit Div',
				remove: 'Remove Div'
			},
			iframe: {
				title: 'iFrame Properties',
				toolbar: 'iFrame',
				noUrl: 'Please type the iFrame URL',
				scrolling: 'Enable scrollbars',
				border: 'Show frame border'
			},
			font: {label: 'Kiri', voiceLabel: 'Font', panelTitle: 'Kiri'},
			fontSize: {label: 'Suurus', voiceLabel: 'Font Size', panelTitle: 'Suurus'},
			colorButton: {
				textColorTitle: 'Teksti värv',
				bgColorTitle: 'Tausta värv',
				panelTitle: 'Colors',
				auto: 'Automaatne',
				more: 'Rohkem värve...'
			},
			colors: {
				'000': 'Black',
				800000: 'Maroon',
				'8B4513': 'Saddle Brown',
				'2F4F4F': 'Dark Slate Gray',
				'008080': 'Teal',
				'000080': 'Navy',
				'4B0082': 'Indigo',
				696969: 'Dark Gray',
				B22222: 'Fire Brick',
				A52A2A: 'Brown',
				DAA520: 'Golden Rod',
				'006400': 'Dark Green',
				'40E0D0': 'Turquoise',
				'0000CD': 'Medium Blue',
				800080: 'Purple',
				808080: 'Gray',
				F00: 'Red',
				FF8C00: 'Dark Orange',
				FFD700: 'Gold',
				'008000': 'Green',
				'0FF': 'Cyan',
				'00F': 'Blue',
				EE82EE: 'Violet',
				A9A9A9: 'Dim Gray',
				FFA07A: 'Light Salmon',
				FFA500: 'Orange',
				FFFF00: 'Yellow',
				'00FF00': 'Lime',
				AFEEEE: 'Pale Turquoise',
				ADD8E6: 'Light Blue',
				DDA0DD: 'Plum',
				D3D3D3: 'Light Grey',
				FFF0F5: 'Lavender Blush',
				FAEBD7: 'Antique White',
				FFFFE0: 'Light Yellow',
				F0FFF0: 'Honeydew',
				F0FFFF: 'Azure',
				F0F8FF: 'Alice Blue',
				E6E6FA: 'Lavender',
				FFF: 'White'
			},
			scayt: {
				title: 'Spell Check As You Type',
				opera_title: 'Not supported by Opera',
				enable: 'Enable SCAYT',
				disable: 'Disable SCAYT',
				about: 'About SCAYT',
				toggle: 'Toggle SCAYT',
				options: 'Options',
				langs: 'Languages',
				moreSuggestions: 'More suggestions',
				ignore: 'Ignore',
				ignoreAll: 'Ignore All',
				addWord: 'Add Word',
				emptyDic: 'Dictionary name should not be empty.',
				optionsTab: 'Options',
				allCaps: 'Ignore All-Caps Words',
				ignoreDomainNames: 'Ignore Domain Names',
				mixedCase: 'Ignore Words with Mixed Case',
				mixedWithDigits: 'Ignore Words with Numbers',
				languagesTab: 'Languages',
				dictionariesTab: 'Dictionaries',
				dic_field_name: 'Dictionary name',
				dic_create: 'Create',
				dic_restore: 'Restore',
				dic_delete: 'Delete',
				dic_rename: 'Rename',
				dic_info: 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.',
				aboutTab: 'About'
			},
			about: {
				title: 'About CKEditor',
				dlgTitle: 'About CKEditor',
				moreInfo: 'For licensing information please visit our web site:',
				copy: 'Copyright © $1. All rights reserved.'
			},
			maximize: 'Maximize',
			minimize: 'Minimize',
			fakeobjects: {
				anchor: 'Anchor',
				flash: 'Flash Animation',
				iframe: 'iFrame',
				hiddenfield: 'Hidden Field',
				unknown: 'Unknown Object'
			},
			resize: 'Drag to resize',
			colordialog: {
				title: 'Select color',
				options: 'Color Options',
				highlight: 'Highlight',
				selected: 'Selected Color',
				clear: 'Clear'
			},
			toolbarCollapse: 'Collapse Toolbar',
			toolbarExpand: 'Expand Toolbar',
			bidi: {ltr: 'Text direction from left to right', rtl: 'Text direction from right to left'}
		};


text:
angular.module('starterApp', []);

// add a controller to the app module
angular.module('starterApp')
.controller('testController', function($scope, $http) {

	$scope.test = 'Welcome to Angular!';
	$http.get('app/patients.json')
	.success(function(data){
		$scope.results = data.results;
		console.log(data);
	})
	.error(function(err){
		console.log(err);
	});
});


text:
[assembly: SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline", Scope = "member", Target = "~M:Waf.InformationManager.Common.Presentation.Controls.SearchBox.#cctor")]
[assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "~P:Waf.InformationManager.Common.Presentation.Log.Default")]


text:
package com.bytegriffin.datatunnel.meta;

import com.bytegriffin.datatunnel.conf.OperatorDefine;
import com.bytegriffin.datatunnel.core.Globals;
import com.bytegriffin.datatunnel.sql.SqlMapper;
import com.google.common.base.Strings;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientOptions;
import com.mongodb.MongoClientOptions.Builder;
import com.mongodb.MongoClientURI;
import com.mongodb.ReadPreference;
import com.mongodb.client.MongoDatabase;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bson.Document;

import java.util.List;

public class MongoDBContext implements Initializer {

    private static final Logger logger = LogManager.getLogger(MongoDBContext.class);

    @Override
    public void init(OperatorDefine operator) {
        try {//带用户名/密码的mongodb://user1:pwd1@host1/?authSource=db1&ssl=true
            String address = operator.getAddress();
            MongoClientURI mc = new MongoClientURI(address, getConfigBuilder());
            @SuppressWarnings("resource")
            MongoClient mongoClient = new MongoClient(mc);
            String databaseName = address.substring(address.lastIndexOf("/") + 1, address.indexOf("?") == -1 ? address.length() : address.indexOf("?"));
            MongoDatabase database = mongoClient.getDatabase(databaseName);
            Globals.setMongoDatabase(operator.getKey(), database);
            logger.info("任务[{}]加载组件MongoDBContext[{}]的初始化完成。", operator.getName(), operator.getId());
        } catch (RuntimeException re) {
            logger.error("任务[{}]加载组件MongoDBContext[{}]没有连接成功。", operator.getName(), operator.getId(), re);
        }
    }

    private Builder getConfigBuilder() {
        return new MongoClientOptions.Builder()
                .connectTimeout(5000) // 链接超时时间
                .socketTimeout(5000) // read数据超时时间
                .readPreference(ReadPreference.primary()) // 最近优先策略
                .connectionsPerHost(30) // 每个地址最大请求数
                .maxWaitTime(1000 * 60 * 2) // 长链接的最大等待时间
                .threadsAllowedToBlockForConnectionMultiplier(50); // 一个socket最大的等待请求数
    }

    /**
     * 根据where条件设置多个查询条件
     *
     * @param sqlMapper
     */
    public static Document setQueryFilters(SqlMapper sqlMapper) {
        Document searchQuery = new Document();
        if (Strings.isNullOrEmpty(sqlMapper.getWhere()) || sqlMapper.getWhere().replaceAll(" ", "").equals("1=1")) {
            return searchQuery;
        }
        List<String> ands = sqlMapper.getAndCondition(sqlMapper.getWhere());
        List<String> ors = sqlMapper.getOrCondition(sqlMapper.getWhere());
        if (ands != null) {//用and连接的查询条件
            ands.forEach(con -> setQueryFilter(con, searchQuery));
        } else if (ors != null) {//用or连接的查询条件
            ors.forEach(con -> setQueryFilter(con, searchQuery));
        } else {//只存在一个查询条件
            setQueryFilter(sqlMapper.getWhere(), searchQuery);
        }
        return searchQuery;
    }

    /**
     * 根据where条件设置单个查询条件
     *
     * @param condition
     * @param searchQuery
     */
    private static void setQueryFilter(String condition, Document searchQuery) {
        //获取类似 name = zhangsan 单个where条件 ,暂时不支持like查询
        SqlMapper.getWhereFields(condition).forEach(field -> {
            searchQuery.append(field.getFieldName(), field.getFieldValue());
        });
    }

}


text:
import { ParameterDeclaration, Symbol } from 'typescript';
import { nodeToString } from '../services/TsParser/nodeToString';
import { BaseApiDoc } from './ApiDoc';
import { ParameterContainer } from './ParameterContainer';

/**
 * This represents a call parameter of an exported function or of a method of a class or interface.
 * You can find them on the `FunctionExportDoc.parameters` or `MethodMemberDoc.parameters` properties.
 * They are generated by the call to `getParameters` service.
 */
export class ParameterDoc extends BaseApiDoc {
  docType = 'parameter';
  type = this.getTypeString(this.declaration);
  isOptional = !!(this.declaration.questionToken);
  isRestParam = !!(this.declaration.dotDotDotToken);
  defaultValue = this.declaration.initializer && nodeToString(this.declaration.initializer);
  paramText = this.getParamText();
  description = this.content;

  constructor(public container: ParameterContainer,
              public symbol: Symbol,
              public declaration: ParameterDeclaration) {
    super(container.host, container.moduleDoc, symbol, declaration);

    this.id = `${this.container.id}~${this.name}`;
    this.aliases = (this.container.aliases || []).map(alias => `${alias}~${this.name}`);
  }

  getParamText() {
    let paramText = '';
    if (this.isRestParam) paramText += '...';
    paramText += this.name;
    if (this.isOptional) paramText += '?';
    if (this.type) paramText += ': ' + this.type;
    if (this.defaultValue) paramText += ' = ' + this.defaultValue;
    return paramText.trim();
  }
}


text:
import * as ts from 'typescript/lib/tsserverlibrary';
import * as pluginApi from '../tsc_wrapped/plugin_api';
import {Checker} from './checker';
import {registerRules} from './runner';

// Installs the Tsetse language server plugin, which checks Tsetse rules in your
// editor and shows issues as semantic errors (red squiggly underline).

function init() {
  return {
    create(info: ts.server.PluginCreateInfo) {
      const oldService = info.languageService;
      const proxy = pluginApi.createProxy(oldService);
      proxy.getSemanticDiagnostics = (fileName: string) => {
        const program = oldService.getProgram();
        if (!program) {
          throw new Error(
              'Failed to initialize tsetse language_service_plugin: program is undefined');
        }

        const checker = new Checker(program);

        // Add disabledRules to tsconfig to disable specific rules
        // "plugins": [
        //   {"name": "...", "disabledRules": ["equals-nan"]}
        // ]
        registerRules(checker, info.config.disabledRules || []);
        const result = [...oldService.getSemanticDiagnostics(fileName)];
        // Note that this ignores suggested fixes.
        result.push(...checker.execute(program.getSourceFile(fileName)!)
                        .map(failure => failure.toDiagnostic()));
        return result;
      };
      return proxy;
    }
  };
}

export = init;


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.flowable.dmn.xml;

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

import org.flowable.dmn.model.DmnDefinition;
import org.flowable.dmn.model.DmnElementReference;
import org.flowable.dmn.model.ItemDefinition;
import org.junit.jupiter.api.Test;

public class Chapter11SingleDiagramTest extends AbstractConverterTest {

    @Test
    public void convertXMLToModel() throws Exception {
        DmnDefinition definition = readXMLFile();
        validateModel(definition);
    }

    @Test
    public void convertModelToXML() throws Exception {
        DmnDefinition dmnModel = readXMLFile();
        DmnDefinition parsedModel = exportAndReadXMLFile(dmnModel);
        validateModel(parsedModel);
    }

    @Override
    protected String getResource() {
        return "chapter11singleDiagram.dmn";
    }

    private void validateModel(DmnDefinition model) {
        // assert that all root item definitions are present
        assertThat(model.getItemDefinitions()).as("item definitions")
            .hasSize(8);

        // assert that nested item components are present
        assertThat(model.getItemDefinitions()).as("item components")
            .filteredOn(id -> id.getItemComponents().size() > 0)
            .flatExtracting(ItemDefinition::getItemComponents)
            .filteredOn(ic -> ic.getItemComponents().size() > 0)
            .flatExtracting(ItemDefinition::getItemComponents)
            .extracting(ItemDefinition::getName)
            .containsExactly("Income", "Repayments", "Expenses");

        assertThat(model.getDecisions()).as("decisions")
            .filteredOn(dec -> dec.getVariable() != null)
            .extracting(dec -> dec.getVariable().getName())
            .containsExactly("Adjudication", "Bureau call type", "Strategy", "Eligibility", "Routing", "Pre-bureau affordability", "Post-bureau affordability",
                "Post-bureau risk category", "Pre-bureau risk category", "Application risk score", "Required monthly installment");

        assertThat(model.getDecisionServices()).as("decision services")
            .extracting(decService -> decService.getName())
            .containsExactly("Bureau Strategy Decision Service", "Routing Decision Service");

        assertThat(model.getDecisionServiceById("_7befd964-eefa-4d8f-908d-8f6ad8d22c67")
            .getOutputDecisions()).as("Decision Service - Output Decisions")
                .hasSize(2)
                .extracting(DmnElementReference::getHref)
                .containsExactly("#_8b838f06-968a-4c66-875e-f5412fd692cf", "#_5b8356f3-2cf2-40e8-8f80-324937e8b276");

        assertThat(model.getDecisionServiceById("_7befd964-eefa-4d8f-908d-8f6ad8d22c67")
            .getEncapsulatedDecisions()).as("Decision Service - Encapsulated Decisions")
                .hasSize(5)
                .extracting(DmnElementReference::getHref)
                .containsExactly("#_ed60265c-25e2-400f-a99f-fafd3b489838", "#_9997fcfd-0f50-4933-939e-88a235b5e2a0", "#_e905f02c-c5d9-4f2a-ba57-7912ff523b46",
                    "#_3c8cee68-99dd-418c-847d-0b54697354f2", "#_b5e759df-f662-44cd-94f5-55c3c81f0ee3");

        assertThat(model.getDecisionServiceById("_7befd964-eefa-4d8f-908d-8f6ad8d22c67")
            .getInputData()).as("Decision Service - Input Data")
            .hasSize(2)
            .extracting(DmnElementReference::getHref)
            .containsExactly("#_d14df033-f4a2-47e3-9590-84e9ff04db4e", "#_fe938494-ee59-425e-8728-2347ea703563");

        model.getDecisions().forEach(decision -> assertThat(model.getGraphicInfo(decision.getId())).isNotNull());

        model.getDecisions().stream()
            .forEach(decision -> decision.getRequiredDecisions().stream()
                .forEach(informationRequirement ->
                    assertThat(model.getFlowLocationGraphicInfo(informationRequirement.getId())).isNotNull()
                )
            );

        model.getDecisions().stream()
            .forEach(decision -> decision.getAuthorityRequirements().stream()
                .forEach(authorityRequirement ->
                    assertThat(model.getFlowLocationGraphicInfo(authorityRequirement.getId())).isNotNull()
                )
            );

        model.getDecisions().stream()
            .forEach(decision -> decision.getRequiredInputs().stream()
                .forEach(informationRequirement ->
                    assertThat(model.getFlowLocationGraphicInfo(informationRequirement.getId())).isNotNull()
                )
            );
    }
}


text:
<?php

namespace rabadan731\images\assets;

use yii\web\AssetBundle;

/**
 * Class CommentAsset
 * @package rabadan731\comments
 */
class UploadifiveAsset extends AssetBundle
{
    /**
     * @inheritdoc
     */
    public $sourcePath = '@common/components/images/assets';

    /**
     * @inheritdoc
     */
    public $js = [
        'js/jquery.uploadifive.min.js'
    ];

    /**
     * @inheritdoc
     */
    public $css = [
        'css/uploadifive.css'
    ];

    /**
     * @inheritdoc
     */
    public $depends = [
        'yii\web\JqueryAsset',
        'yii\web\YiiAsset'
    ];
}


text:
package goakit

import (
	"strings"
	"testing"

	"goa.design/goa/v3/codegen"
	"goa.design/goa/v3/expr"
	httpcodegen "goa.design/goa/v3/http/codegen"
	"goa.design/plugins/v3/goakit/testdata"
)

func TestServerEncodeDecode(t *testing.T) {
	cases := map[string]struct {
		DSL    func()
		Code   map[string][]string
		Import string
	}{
		"simple-service": {
			DSL: testdata.SimpleServiceDSL,
			Code: map[string][]string{
				"goakit-response-encoder": {testdata.SimpleMethodGoakitResponseEncoderCode},
				"goakit-request-decoder":  {},
				"goakit-error-encoder":    {},
			},
			Import: "/http/simple_service/server",
		},
		"with-payload": {
			DSL: testdata.WithPayloadDSL,
			Code: map[string][]string{
				"goakit-response-encoder": {testdata.WithPayloadMethodGoakitResponseEncoderCode},
				"goakit-request-decoder":  {testdata.WithPayloadMethodGoakitRequestDecoderCode},
				"goakit-error-encoder":    {},
			},
			Import: "/http/with_payload_service/server",
		},
		"with-error": {
			DSL: testdata.WithErrorDSL,
			Code: map[string][]string{
				"goakit-response-encoder": {testdata.WithErrorMethodGoakitResponseEncoderCode},
				"goakit-request-decoder":  {},
				"goakit-error-encoder":    {testdata.WithErrorMethodGoakitErrorEncoderCode},
			},
			Import: "/http/with_error_service/server",
		},
		"multi-endpoints": {
			DSL: testdata.MultiEndpointDSL,
			Code: map[string][]string{
				"goakit-response-encoder": {testdata.Endpoint1GoakitResponseEncoderCode, testdata.Endpoint2GoakitResponseEncoderCode},
				"goakit-request-decoder":  {testdata.Endpoint1GoakitRequestDecoderCode},
				"goakit-error-encoder":    {testdata.Endpoint1GoakitErrorEncoderCode, testdata.Endpoint2GoakitErrorEncoderCode},
			},
			Import: "/http/multi_endpoint_service/server",
		},
		"goifyable-service": {
			DSL: testdata.GoifyableServiceDSL,
			Code: map[string][]string{
				"goakit-response-encoder": {testdata.GoifyableMethodGoakitResponseEncoderCode},
				"goakit-request-decoder":  {},
				"goakit-error-encoder":    {},
			},
			Import: "/http/goifyable_service/server",
		},
	}
	for name, c := range cases {
		t.Run(name, func(t *testing.T) {
			httpcodegen.RunHTTPDSL(t, c.DSL)
			fs := EncodeDecodeFiles("", expr.Root)
			if len(fs) != 2 {
				t.Fatalf("got %d files, expected 2", len(fs))
			}
			var found bool
			for _, f := range fs {
				if strings.Contains(f.Path, "kitserver") {
					found = true
					for sec, secCode := range c.Code {
						testCode(t, f, sec, secCode)
					}
					requireImport(t, f, c.Import)
				}
			}
			if !found {
				t.Fatalf("kitserver encode_decode.go file not found")
			}
		})
	}
}

func TestClientEncodeDecode(t *testing.T) {
	cases := map[string]struct {
		DSL    func()
		Code   map[string][]string
		Import string
	}{
		"simple-service": {
			DSL: testdata.SimpleServiceDSL,
			Code: map[string][]string{
				"goakit-response-decoder": {testdata.SimpleMethodGoakitResponseDecoderCode},
				"goakit-request-encoder":  {},
			},
			Import: "/http/simple_service/client",
		},
		"with-payload": {
			DSL: testdata.WithPayloadDSL,
			Code: map[string][]string{
				"goakit-response-decoder": {testdata.WithPayloadMethodGoakitResponseDecoderCode},
				"goakit-request-encoder":  {testdata.WithPayloadMethodGoakitRequestEncoderCode},
			},
			Import: "/http/with_payload_service/client",
		},
		"with-error": {
			DSL: testdata.WithErrorDSL,
			Code: map[string][]string{
				"goakit-response-decoder": {testdata.WithErrorMethodGoakitResponseDecoderCode},
				"goakit-request-encoder":  {},
			},
			Import: "/http/with_error_service/client",
		},
		"multi-endpoints": {
			DSL: testdata.MultiEndpointDSL,
			Code: map[string][]string{
				"goakit-response-decoder": {testdata.Endpoint1GoakitResponseDecoderCode, testdata.Endpoint2GoakitResponseDecoderCode},
				"goakit-request-encoder":  {testdata.Endpoint1GoakitRequestEncoderCode},
			},
			Import: "/http/multi_endpoint_service/client",
		},
	}
	for name, c := range cases {
		t.Run(name, func(t *testing.T) {
			httpcodegen.RunHTTPDSL(t, c.DSL)
			fs := EncodeDecodeFiles("", expr.Root)
			if len(fs) != 2 {
				t.Fatalf("got %d files, expected 2", len(fs))
			}
			var found bool
			for _, f := range fs {
				if strings.Contains(f.Path, "kitclient") {
					found = true
					for sec, secCode := range c.Code {
						testCode(t, f, sec, secCode)
					}
					requireImport(t, f, c.Import)
				}
			}
			if !found {
				t.Fatalf("kitserver encode_decode.go file not found")
			}
		})
	}
}

func testCode(t *testing.T, file *codegen.File, section string, expCode []string) {
	sections := file.Section(section)
	if len(sections) != len(expCode) {
		t.Fatalf("%s: got %d sections, expected %d", section, len(sections), len(expCode))
	}
	for i, c := range expCode {
		code := codegen.SectionCode(t, sections[i])
		if code != c {
			t.Errorf("invalid code, got:\n%s\ngot vs. expected:\n%s", code, codegen.Diff(t, code, c))
		}
	}
}


text:
package metadata

import (
	"fmt"
	"strings"

	"bosun.org/_third_party/github.com/StackExchange/wmi"
	"bosun.org/opentsdb"
	"bosun.org/slog"
)

func init() {
	metafuncs = append(metafuncs, metaWindowsVersion, metaWindowsIfaces)
}

func metaWindowsVersion() {
	var dst []Win32_OperatingSystem
	q := wmi.CreateQuery(&dst, "")
	err := wmi.Query(q, &dst)
	if err != nil {
		slog.Error(err)
		return
	}

	var dstComputer []Win32_ComputerSystem
	q = wmi.CreateQuery(&dstComputer, "")
	err = wmi.Query(q, &dstComputer)
	if err != nil {
		slog.Error(err)
		return
	}

	var dstBIOS []Win32_BIOS
	q = wmi.CreateQuery(&dstBIOS, "")
	err = wmi.Query(q, &dstBIOS)
	if err != nil {
		slog.Error(err)
		return
	}

	for _, v := range dst {
		AddMeta("", nil, "version", v.Version, true)
		AddMeta("", nil, "versionCaption", v.Caption, true)
	}

	for _, v := range dstComputer {
		AddMeta("", nil, "manufacturer", v.Manufacturer, true)
		AddMeta("", nil, "model", v.Model, true)
		AddMeta("", nil, "memoryTotal", v.TotalPhysicalMemory, true)
	}

	for _, v := range dstBIOS {
		AddMeta("", nil, "serialNumber", v.SerialNumber, true)
	}
}

type Win32_OperatingSystem struct {
	Caption string
	Version string
}

type Win32_ComputerSystem struct {
	Manufacturer        string
	Model               string
	TotalPhysicalMemory uint64
}

type Win32_BIOS struct {
	SerialNumber string
}

func metaWindowsIfaces() {
	var dstConfigs []Win32_NetworkAdapterConfiguration
	q := wmi.CreateQuery(&dstConfigs, "WHERE MACAddress != null")
	err := wmi.Query(q, &dstConfigs)
	if err != nil {
		slog.Error(err)
		return
	}

	mNicConfigs := make(map[uint32]*Win32_NetworkAdapterConfiguration)
	for i, nic := range dstConfigs {
		mNicConfigs[nic.InterfaceIndex] = &dstConfigs[i]
	}

	mNicTeamIDtoSpeed := make(map[string]uint64)
	mNicTeamIDtoMaster := make(map[string]string)
	var dstTeamMembers []MSFT_NetLbfoTeamMember
	q = wmi.CreateQuery(&dstTeamMembers, "")
	err = wmi.QueryNamespace(q, &dstTeamMembers, "root\\StandardCimv2")
	if err == nil {
		for _, teamMember := range dstTeamMembers {
			mNicTeamIDtoSpeed[teamMember.InstanceID] = teamMember.ReceiveLinkSpeed
			mNicTeamIDtoMaster[teamMember.InstanceID] = teamMember.Team
		}
	}

	var dstAdapters []Win32_NetworkAdapter
	q = wmi.CreateQuery(&dstAdapters, "WHERE PhysicalAdapter=True and MACAddress <> null and NetConnectionStatus = 2") //Only adapters with MAC addresses and status="Connected"
	err = wmi.Query(q, &dstAdapters)
	if err != nil {
		slog.Error(err)
		return
	}

	for _, v := range dstAdapters {
		tag := opentsdb.TagSet{"iface": fmt.Sprint("Interface", v.InterfaceIndex)}
		AddMeta("", tag, "description", v.Description, true)
		AddMeta("", tag, "name", v.NetConnectionID, true)
		AddMeta("", tag, "mac", strings.Replace(v.MACAddress, ":", "", -1), true)
		if v.Speed != nil && *v.Speed != 0 {
			AddMeta("", tag, "speed", v.Speed, true)
		} else {
			nicSpeed := mNicTeamIDtoSpeed[v.GUID]
			AddMeta("", tag, "speed", nicSpeed, true)
		}

		nicMaster := mNicTeamIDtoMaster[v.GUID]
		if nicMaster != "" {
			AddMeta("", tag, "master", nicMaster, true)
		}

		nicConfig := mNicConfigs[v.InterfaceIndex]
		if nicConfig != nil {
			for _, ip := range *nicConfig.IPAddress {
				AddMeta("", tag, "addr", ip, true) // blocked by array support in WMI See https://github.com/StackExchange/wmi/issues/5
			}
		}
	}
}

type Win32_NetworkAdapter struct {
	NetConnectionID string  //NY-WEB09-PRI-NIC-A
	Speed           *uint64 //Bits per Second
	Description     string  //Intel(R) Gigabit ET Quad Port Server Adapter #2
	InterfaceIndex  uint32
	MACAddress      string //00:1B:21:93:00:00
	GUID            string
}

type Win32_NetworkAdapterConfiguration struct {
	IPAddress      *[]string //Both IPv4 and IPv6
	InterfaceIndex uint32
}
type MSFT_NetLbfoTeamMember struct {
	Name             string
	ReceiveLinkSpeed uint64
	Team             string
	InstanceID       string
}


text:
import smtplib

class GmailNotifier(object):
    def __init__(self, username, password):
        super().__init__()
        self.username = username
        self.password = password

    def __send_email(self, message):
        server = smtplib.SMTP('smtp.gmail.com', 587)
        server.ehlo()
        server.starttls()
        server.login(self.username, self.password)
        server.sendmail(self.username, [self.username], message)
        server.close()

    def __format_email(self, subject):
        return """From: %s\nTo: %s\nSubject: %s\n\n%s""" % \
               (self.username, ", ".join([self.username]), subject, "")

    def send_notification(self):
        subject = "Sump Overflow Notification"
        message = self.__format_email(subject)
        self.__send_email(message)

    def send_all_clear(self):
        subject = "Sump Level Normal"
        message = self.__format_email(subject)
        self.__send_email(message)


text:
+++ ./base/file_util_posix.cc	2014-03-07 14:10:31.000000000 +0100
@@ -673,7 +673,7 @@
 #endif  // defined(OS_ANDROID)
   results->is_directory = S_ISDIR(file_info.st_mode);
   results->size = file_info.st_size;
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || (defined(OS_FREEBSD) && __FreeBSD_version < 900000)
   results->last_modified = Time::FromTimeSpec(file_info.st_mtimespec);
   results->last_accessed = Time::FromTimeSpec(file_info.st_atimespec);
   results->creation_time = Time::FromTimeSpec(file_info.st_ctimespec);


text:
require "rubygems"
require "bunny"

puts "=> Demonstrating exchange-to-exchange bindings"
puts

conn = Bunny.new
conn.start

ch   = conn.create_channel
x1   = ch.fanout("bunny.examples.e2e.exchange1", :auto_delete => true, :durable => false)
x2   = ch.fanout("bunny.examples.e2e.exchange2", :auto_delete => true, :durable => false)
# x1 will be the source
x2.bind(x1)

q    = ch.queue("", :exclusive => true)
q.bind(x2)

x1.publish("")

sleep 0.2
puts "Queue #{q.name} now has #{q.message_count} message in it"

sleep 0.7
puts "Disconnecting..."
conn.close


text:
Python script which will count occurances of words within a text and output these to a sorted file
##usage
python wordCount.py -i <inputfile> -o <outputfile>


text:
// Copyright 2017 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.

using NodaTime.Utility;
using System;

namespace NodaTime.Calendars
{
    /// <summary>
    /// See <see cref="CalendarSystem.Badi" /> for details about the Badíʿ calendar.
    /// </summary>
    internal sealed class BadiYearMonthDayCalculator : YearMonthDayCalculator
    {
        // named constants to avoid use of raw numbers in the code
        private const int AverageDaysPer10Years = 3652; // Ideally 365.2425 per year...
        private const int DaysInAyyamiHaInLeapYear = 5;
        private const int DaysInAyyamiHaInNormalYear = 4;

        internal const int DaysInMonth = 19;
        private const int FirstYearOfStandardizedCalendar = 172;
        private const int GregorianYearOfFirstBadiYear = 1844;

        /// <remarks>
        /// There are 19 months in a year. Between the 18th and 19th month are the "days of Ha" (Ayyam-i-Ha).
        /// In order to make everything else in Noda Time work appropriately, Ayyam-i-Ha are counted as
        /// extra days at the end of month 18.
        /// </remarks>
        internal const int Month18 = 18;
        private const int Month19 = 19;
        private const int MonthsInYear = 19;

        private const int UnixEpochDayAtStartOfYear1 = -45941;
        private const int BadiMaxYear = 1000; // current lookup tables are pre-calculated for a thousand years
        private const int BadiMinYear = 1;

        /// <summary>
        /// This is the base64 representation of information for years 172 to 1000.
        /// NazRuzDate falls on March 19, 20, 21, or 22.
        /// DaysInAyymiHa can be 4,5.
        /// For each year, the value in the array is (NawRuzDate - 19) + 10 * (DaysInAyyamiHa - 4)
        /// </summary>
        static byte[] YearInfoRaw = Convert.FromBase64String(
            "AgELAgIBCwICAQsCAgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAgEBCwIBAQELAQEBCwEBAQsBAQELAQEB" +
            "CwEBAQsBAQELAQEBCwEBAQEKAQEBCgEBAQsCAgILAgICCwICAgsCAgILAgICCwICAgELAgIBCwICAQsC" +
            "AgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAgEBCwIBAQELAQEB" +
            "CwEBAQsCAgIMAgICDAICAgwCAgIMAgICDAICAgILAgICCwICAgsCAgILAgICCwICAgsCAgILAgICCwIC" +
            "AgELAgIBCwICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAgIMAwICDAMCAgwDAgIM" +
            "AwICDAMCAgIMAgICDAICAgwCAgIMAgICDAICAgwCAgIMAgICDAICAgILAgICCwICAgsCAgILAgICCwIC" +
            "AgsCAgILAgICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQELAgEBCwIBAQsCAQEL" +
            "AgEBCwIBAQsCAQELAgEBCwIBAQELAQEBCwEBAQsBAQELAQEBCwEBAQsBAQELAQEBCwEBAQEKAQEBCgEB" +
            "AQoBAQELAgICCwICAgsCAgILAgICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQsCAgELAgIBAQsCAQEL" +
            "AgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAgEBAQsBAQELAQEBCwEBAQsBAQELAgICDAICAgwCAgIMAgIC" +
            "AgsCAgILAgICCwICAgsCAgILAgICCwICAgsCAgILAgICAQsCAgELAgIBCwICAQsCAgELAgIBCwICAQsC" +
            "AgELAgIBAQsCAQELAgEBCwIBAQsCAQELAgICDAMCAgwDAgIMAwICAgwCAgIMAgICDAICAgwCAgIMAgIC" +
            "DAICAgwCAgIMAgICAgsCAgILAgICCwICAgsCAgILAgICCwICAgsCAgILAgICAQsCAgELAgIBCwICAQsC" +
            "AgELAgIBCwICAQsCAgELAgIBAQsCAQELAgEBCwIBAQsCAQELAgEBCwIBAQsCAQELAg==");

        static BadiYearMonthDayCalculator()
        {
            Preconditions.DebugCheckState(
                FirstYearOfStandardizedCalendar + YearInfoRaw.Length == BadiMaxYear + 1,
                "Invalid compressed data. Length: " + YearInfoRaw.Length);
        }

        internal BadiYearMonthDayCalculator()
            : base(BadiMinYear,
                BadiMaxYear - 1,
                AverageDaysPer10Years,
                UnixEpochDayAtStartOfYear1)
        {
        }

        internal static int GetDaysInAyyamiHa(int year)
        {
            Preconditions.CheckArgumentRange(nameof(year), year, BadiMinYear, BadiMaxYear);
            if (year < FirstYearOfStandardizedCalendar)
            {
                return CalendarSystem.Iso.YearMonthDayCalculator.IsLeapYear(year + GregorianYearOfFirstBadiYear)
                    ? DaysInAyyamiHaInLeapYear : DaysInAyyamiHaInNormalYear;
            }
            int num = YearInfoRaw[year - FirstYearOfStandardizedCalendar];
            return num > 10 ? DaysInAyyamiHaInLeapYear : DaysInAyyamiHaInNormalYear;
        }

        private static int GetNawRuzDayInMarch(int year)
        {
            Preconditions.CheckArgumentRange(nameof(year), year, BadiMinYear, BadiMaxYear);
            if (year < FirstYearOfStandardizedCalendar)
            {
                return 21;
            }
            const int dayInMarchForOffsetToNawRuz = 19;
            int num = YearInfoRaw[year - FirstYearOfStandardizedCalendar];
            return dayInMarchForOffsetToNawRuz + (num % 10);
        }

        protected override int CalculateStartOfYearDays(int year)
        {
            Preconditions.CheckArgumentRange(nameof(year), year, BadiMinYear, BadiMaxYear);

            // The epoch is the same regardless of calendar system, so if we work out when the
            // start of the Badíʿ year is in terms of the Gregorian year, we can just use that
            // date's days-since-epoch value.
            var gregorianYear = year + GregorianYearOfFirstBadiYear - 1;
            var nawRuz = new LocalDate(gregorianYear, 3, GetNawRuzDayInMarch(year));
            return nawRuz.DaysSinceEpoch;
        }

        protected override int GetDaysFromStartOfYearToStartOfMonth(int year, int month)
        {
            var daysFromStartOfYearToStartOfMonth = DaysInMonth * (month - 1);

            if (month == Month19)
            {
                daysFromStartOfYearToStartOfMonth += GetDaysInAyyamiHa(year);
            }

            return daysFromStartOfYearToStartOfMonth;
        }

        internal override YearMonthDay AddMonths(YearMonthDay start, int months)
        {
            if (months == 0)
            {
                return start;
            }

            var movingBackwards = months < 0;

            var thisMonth = start.Month;
            var thisYear = start.Year;
            var thisDay = start.Day;

            var nextDay = thisDay;

            // TODO: It's not clear that this is correct. If we add 19 months,
            // it's probably okay to stay in Ayyam-i-Ha.
            if (IsInAyyamiHa(start))
            {
                nextDay = thisDay - DaysInMonth;

                if (movingBackwards)
                {
                    thisMonth++;
                }
            }

            var nextYear = thisYear;
            var nextMonthNum = thisMonth + months;

            if (nextMonthNum > MonthsInYear)
            {
                nextYear = thisYear + nextMonthNum / MonthsInYear;
                nextMonthNum = nextMonthNum % MonthsInYear;
            }
            else if (nextMonthNum < 1)
            {
                nextMonthNum = MonthsInYear - nextMonthNum;
                nextYear = thisYear - nextMonthNum / MonthsInYear;
                nextMonthNum = MonthsInYear - nextMonthNum % MonthsInYear;
            }

            if (nextYear < MinYear || nextYear > MaxYear)
            {
                throw new OverflowException("Date computation would overflow calendar bounds.");
            }

            var result = new YearMonthDay(nextYear, nextMonthNum, nextDay);

            return result;
        }

        internal override int GetDaysInMonth(int year, int month)
        {
            Preconditions.CheckArgumentRange(nameof(year), year, BadiMinYear, BadiMaxYear);
            return month == Month18 ? DaysInMonth + GetDaysInAyyamiHa(year) : DaysInMonth;
        }

        internal override int GetDaysInYear(int year) => 361 + GetDaysInAyyamiHa(year);

        internal override int GetDaysSinceEpoch(YearMonthDay target)
        {
            var month = target.Month;
            var year = target.Year;

            var firstDay0OfYear = CalculateStartOfYearDays(year) - 1;

            var daysSinceEpoch = firstDay0OfYear
                 + (month - 1) * DaysInMonth
                 + target.Day;

            if (month == Month19)
            {
                daysSinceEpoch += GetDaysInAyyamiHa(year);
            }

            return daysSinceEpoch;
        }

        internal override int GetMonthsInYear(int year) => MonthsInYear;

        internal override YearMonthDay GetYearMonthDay(int year, int dayOfYear)
        {
            Preconditions.CheckArgumentRange(nameof(dayOfYear), dayOfYear, 1, GetDaysInYear(year));

            var firstOfLoftiness = 1 + DaysInMonth * Month18 + GetDaysInAyyamiHa(year);

            if (dayOfYear >= firstOfLoftiness)
            {
                return new YearMonthDay(year, Month19, dayOfYear - firstOfLoftiness + 1);
            }

            var month = Math.Min(1 + (dayOfYear - 1) / DaysInMonth, Month18);
            var day = dayOfYear - (month - 1) * DaysInMonth;

            return new YearMonthDay(year, month, day);
        }

        internal bool IsInAyyamiHa(YearMonthDay ymd) => ymd.Month == Month18 && ymd.Day > DaysInMonth;

        internal override bool IsLeapYear(int year) => GetDaysInAyyamiHa(year) != DaysInAyyamiHaInNormalYear;

        internal override int MonthsBetween(YearMonthDay start, YearMonthDay end)
        {
            int startMonth = start.Month;
            int startYear = start.Year;

            int endMonth = end.Month;
            int endYear = end.Year;

            int diff = (endYear - startYear) * MonthsInYear + endMonth - startMonth;

            // If we just add the difference in months to start, what do we get?
            YearMonthDay simpleAddition = AddMonths(start, diff);

            // Note: this relies on naive comparison of year/month/date values.
            if (start <= end)
            {
                // Moving forward: if the result of the simple addition is before or equal to the end,
                // we're done. Otherwise, rewind a month because we've overshot.
                return simpleAddition <= end ? diff : diff - 1;
            }
            else
            {
                // Moving backward: if the result of the simple addition (of a non-positive number)
                // is after or equal to the end, we're done. Otherwise, increment by a month because
                // we've overshot backwards.
                return simpleAddition >= end ? diff : diff + 1;
            }
        }

        internal override YearMonthDay SetYear(YearMonthDay start, int newYear)
        {
            Preconditions.CheckArgumentRange(nameof(newYear), newYear, BadiMinYear, BadiMaxYear);

            var month = start.Month;
            var day = start.Day;

            if (IsInAyyamiHa(start))
            {
                // Moving a year while within Ayyam-i-Ha is not well defined.
                // In this implementation, if starting on day 5, end on day 4 (stay in Ayyam-i-Ha)
                var daysInThisAyyamiHa = GetDaysInAyyamiHa(newYear);
                return new YearMonthDay(newYear, month, Math.Min(day, DaysInMonth + daysInThisAyyamiHa));
            }

            return new YearMonthDay(newYear, month, day);
        }

        internal override void ValidateYearMonthDay(int year, int month, int day)
        {
            Preconditions.CheckArgumentRange(nameof(year), year, BadiMinYear, BadiMaxYear);
            Preconditions.CheckArgumentRange(nameof(month), month, 1, MonthsInYear);

            int daysInMonth = month == Month18 ? DaysInMonth + GetDaysInAyyamiHa(year) : DaysInMonth;
            Preconditions.CheckArgumentRange(nameof(day), day, 1, daysInMonth);
        }
    }
}


text:
class CreateCities < ActiveRecord::Migration
  def change
    create_table :cities do |t|
      t.string         :name        # 城市中文名称
      t.integer        :city_id
      t.belongs_to     :province
    end

    add_index :cities, :province_id
  end
end


text:
namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
    // [START contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async_flattened]
    using Google.Cloud.ContactCenterInsights.V1;
    using System.Threading.Tasks;

    public sealed partial class GeneratedContactCenterInsightsClientSnippets
    {
        /// <summary>Snippet for CalculateIssueModelStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateIssueModelStatsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();
            // Initialize request argument(s)
            string issueModel = "projects/[PROJECT]/locations/[LOCATION]/issueModels/[ISSUE_MODEL]";
            // Make the request
            CalculateIssueModelStatsResponse response = await contactCenterInsightsClient.CalculateIssueModelStatsAsync(issueModel);
        }
    }
    // [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async_flattened]
}


text:
package com.hazelcast.client.map;

import com.hazelcast.aggregation.Aggregators;
import com.hazelcast.client.test.TestHazelcastFactory;
import com.hazelcast.config.Config;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import com.hazelcast.map.AbstractEntryProcessor;
import com.hazelcast.projection.Projection;
import com.hazelcast.query.PagingPredicate;
import com.hazelcast.query.PartitionPredicate;
import com.hazelcast.query.Predicate;
import com.hazelcast.query.Predicates;
import com.hazelcast.query.TruePredicate;
import com.hazelcast.spi.properties.GroupProperty;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import java.util.Collection;
import java.util.Map;

import static org.junit.Assert.assertEquals;

@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelTest.class})
public class ClientPartitionPredicateTest extends HazelcastTestSupport {

    private static final int PARTITIONS = 10;
    private static final int ITEMS_PER_PARTITION = 20;

    private final TestHazelcastFactory hazelcastFactory = new TestHazelcastFactory();

    private HazelcastInstance server;
    private HazelcastInstance client;
    private IMap<String, Integer> map;

    private String partitionKey;
    private int partitionId;

    private Predicate<String, Integer> predicate;

    @Before
    public void setUp() {
        Config config = getConfig().setProperty(GroupProperty.PARTITION_COUNT.getName(), "" + PARTITIONS);

        server = hazelcastFactory.newHazelcastInstance(config);
        HazelcastInstance remote = hazelcastFactory.newHazelcastInstance(config);
        warmUpPartitions(server, remote);

        client = hazelcastFactory.newHazelcastClient();

        String mapName = randomString();
        map = client.getMap(mapName);

        for (int p = 0; p < PARTITIONS; p++) {
            for (int k = 0; k < ITEMS_PER_PARTITION; k++) {
                map.put(generateKeyForPartition(server, p), p);
            }
        }
        partitionKey = randomString();
        partitionId = server.getPartitionService().getPartition(partitionKey).getPartitionId();
        predicate = new PartitionPredicate<String, Integer>(partitionKey, TruePredicate.INSTANCE);
    }

    @After
    public void tearDown() {
        hazelcastFactory.terminateAll();
    }

    @Test
    public void values_withPagingPredicate() {
        PagingPredicate<String, Integer> pagingPredicate = new PagingPredicate<String, Integer>(Predicates.alwaysTrue(), 1);
        predicate = new PartitionPredicate<String, Integer>(randomString(), pagingPredicate);

        for (int i = 0; i < ITEMS_PER_PARTITION; i++) {
            int size = map.values(predicate).size();
            assertEquals(1, size);
            pagingPredicate.nextPage();
        }
        int size = map.values(predicate).size();
        assertEquals(0, size);
    }

    @Test
    public void keys_withPagingPredicate() {
        PagingPredicate<String, Integer> pagingPredicate = new PagingPredicate<String, Integer>(Predicates.alwaysTrue(), 1);
        predicate = new PartitionPredicate<String, Integer>(randomString(), pagingPredicate);

        for (int i = 0; i < ITEMS_PER_PARTITION; i++) {
            int size = map.keySet(predicate).size();
            assertEquals(1, size);
            pagingPredicate.nextPage();
        }
        int size = map.keySet(predicate).size();
        assertEquals(0, size);
    }

    @Test
    public void entries_withPagingPredicate() {
        PagingPredicate<String, Integer> pagingPredicate = new PagingPredicate<String, Integer>(Predicates.alwaysTrue(), 1);
        predicate = new PartitionPredicate<String, Integer>(randomString(), pagingPredicate);

        for (int i = 0; i < ITEMS_PER_PARTITION; i++) {
            int size = map.entrySet(predicate).size();
            assertEquals(1, size);
            pagingPredicate.nextPage();
        }
        int size = map.entrySet(predicate).size();
        assertEquals(0, size);
    }

    @Test
    public void values() {
        Collection<Integer> values = map.values(predicate);

        assertEquals(ITEMS_PER_PARTITION, values.size());
        for (Integer value : values) {
            assertEquals(partitionId, value.intValue());
        }
    }

    @Test
    public void keySet() {
        Collection<String> keys = map.keySet(predicate);

        assertEquals(ITEMS_PER_PARTITION, keys.size());
        for (String key : keys) {
            assertEquals(partitionId, server.getPartitionService().getPartition(key).getPartitionId());
        }
    }

    @Test
    public void entries() {
        Collection<Map.Entry<String, Integer>> entries = map.entrySet(predicate);

        assertEquals(ITEMS_PER_PARTITION, entries.size());
        for (Map.Entry<String, Integer> entry : entries) {
            assertEquals(partitionId, server.getPartitionService().getPartition(entry.getKey()).getPartitionId());
            assertEquals(partitionId, entry.getValue().intValue());
        }
    }

    @Test
    public void aggregate() throws Exception {
        int partitionId = 2;
        String keyForPartition = generateKeyForPartition(server, partitionId);
        Predicate partitionPredicate = new PartitionPredicate<String, Integer>(keyForPartition, TruePredicate.INSTANCE);
        Long aggregate = map.aggregate(Aggregators.<Map.Entry<String, Integer>>integerSum(), partitionPredicate);
        Long sum = (long) (partitionId * ITEMS_PER_PARTITION);
        assertEquals(sum, aggregate);
    }

    @Test
    public void executeOnEntries() throws Exception {
        int partitionId = 2;
        String keyForPartition = generateKeyForPartition(server, partitionId);
        Predicate partitionPredicate = new PartitionPredicate<String, Integer>(keyForPartition, TruePredicate.INSTANCE);
        Map<String, Object> entries = map.executeOnEntries(new MyProcessor(), partitionPredicate);
        assertEquals(ITEMS_PER_PARTITION, entries.size());

    }

    static class MyProcessor extends AbstractEntryProcessor<String, Integer> {

        public MyProcessor() {
        }

        @Override
        public Object process(Map.Entry<String, Integer> entry) {
            Integer in = entry.getValue();
            entry.setValue(in * 10);
            return entry;
        }
    }

    @Test
    public void project() throws Exception {
        Predicate partitionPredicate = new PartitionPredicate<String, Integer>(1, TruePredicate.INSTANCE);
        Collection<Integer> collection = map.project(new PrimitiveValueIncrementingProjection(), partitionPredicate);
        assertEquals(ITEMS_PER_PARTITION, collection.size());
    }

    public static class PrimitiveValueIncrementingProjection extends Projection<Map.Entry<String, Integer>, Integer> {
        @Override
        public Integer transform(Map.Entry<String, Integer> input) {
            return input.getValue() + 1;
        }
    }

}


text:
<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "estado_tratamiento".
 *
 * @property integer $id
 * @property string $nombre
 *
 * @property Tratamiento[] $tratamientos
 */
class EstadoTratamiento extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'estado_tratamiento';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['nombre'], 'required'],
            [['nombre'], 'string', 'max' => 45],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'nombre' => 'Nombre',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getTratamientos()
    {
        return $this->hasMany(Tratamiento::className(), ['estado_tratamiento_id' => 'id']);
    }
}


text:
'''
Created by auto_sdk on 2014-12-17 17:22:51
'''
from top.api.base import RestApi
class CategoryrecommendItemsGetRequest(RestApi):
	def __init__(self,domain='gw.api.taobao.com',port=80):
		RestApi.__init__(self,domain, port)
		self.category_id = None
		self.count = None
		self.ext = None
		self.recommend_type = None

	def getapiname(self):
		return 'taobao.categoryrecommend.items.get'


text:
from integration_tests.tests.test_cases import BaseTestCase
from integration_tests.framework import riemann
from integration_tests.tests.utils import do_retries
from integration_tests.tests.utils import get_resource as resource

class PoliciesTestsBase(BaseTestCase):
    NUM_OF_INITIAL_WORKFLOWS = 2

    def tearDown(self):
        super(PoliciesTestsBase, self).tearDown()
        riemann.reset_data_and_restart()

    def launch_deployment(self, yaml_file, expected_num_of_node_instances=1):
        deployment, _ = self.deploy_application(resource(yaml_file))
        self.deployment = deployment
        self.node_instances = self.client.node_instances.list(deployment.id)
        self.assertEqual(
                expected_num_of_node_instances,
                len(self.node_instances)
        )
        self.wait_for_executions(self.NUM_OF_INITIAL_WORKFLOWS,
                                 expect_exact_count=False)

    def get_node_instance_by_name(self, name):
        for nodeInstance in self.node_instances:
            if nodeInstance.node_id == name:
                return nodeInstance

    def wait_for_executions(self, expected_count, expect_exact_count=True):
        def assertion():
            executions = self.client.executions.list(
                    deployment_id=self.deployment.id)
            if expect_exact_count:
                self.assertEqual(len(executions), expected_count)
            else:
                self.assertGreaterEqual(len(executions), expected_count)
        self.do_assertions(assertion)

    def wait_for_invocations(self, deployment_id, expected_count):
        def assertion():
            invocations = self.get_plugin_data(
                    plugin_name='testmockoperations',
                    deployment_id=deployment_id
            )['mock_operation_invocation']
            self.assertEqual(expected_count, len(invocations))
            return invocations
        return do_retries(assertion)

    def publish(self, metric, ttl=60, node_name='node',
                service='service', node_id=''):
        if node_id == '':
            node_id = self.get_node_instance_by_name(node_name).id
        deployment_id = self.deployment.id
        self.publish_riemann_event(
                deployment_id,
                node_name=node_name,
                node_id=node_id,
                metric=metric,
                service='{}.{}.{}.{}'.format(
                        deployment_id,
                        service,
                        node_name,
                        node_id
                ),
                ttl=ttl
        )


text:
 package com.cats.ui.tooltip;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Polygon;
import java.awt.RenderingHints;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Area;
import java.awt.geom.RoundRectangle2D;
import java.util.StringTokenizer;

import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

import com.cats.utils.Utils;

/**
 * @author xblia
 * 2015-11-29
 * Power by xblia, All right reserved.
 * Mail:worldandyou@163.com
 */
class BubbleToolTip extends JPanel implements MouseListener
{
	public enum TooltipFont
	{
		YAHEI(new Font("Microsoft YaHei", Font.PLAIN, 13)),
		SEGOE_UI(new Font("Segoe UI", Font.PLAIN, 13));
		private Font font;

		private TooltipFont(Font font)
		{
			this.font = font;
		}

		public Font getFont()
		{
			return this.font;
		}
	}

	private static final long serialVersionUID = 1L;
	private static final int CORNER_ANGLE = 12;

	private Font font = TooltipFont.SEGOE_UI.getFont();
	private Color backGroundCol = new Color(0xFDFDFD);
	private Color foregroundColorCol = new Color(0x000000);
	private Color borderCol = new Color(0x000000);

	private int remainTooltipWidth = 0;
	private String content = null;
	private JFrame frame = null;
	private boolean alignTop = true;

	public BubbleToolTip(String tooltipContent, Font textFont, Color backGroundColor,
	        Color foregroundColor, Color borderColor, JFrame frame)
	{
		this.content = tooltipContent;
		this.font = textFont;
		this.backGroundCol = backGroundColor;
		this.foregroundColorCol = foregroundColor;
		this.borderCol = borderColor;
		this.frame = frame;
		this.initView();
	}

	public BubbleToolTip(String tooltipContent, JFrame frame)
	{
		this.content = tooltipContent;
		this.frame = frame;
		this.initView();
	}

	public BubbleToolTip(Font font, String content, JFrame frame)
	{
		super();
		this.font = font;
		this.content = content;
		this.frame = frame;
		this.initView();
	}

	private void initView()
	{
		String maxCharactorsLine = getMaxCharactorsLine();

		this.setSize(SwingUtilities.computeStringWidth(this.getFontMetrics(font), maxCharactorsLine) + 20,
		        new StringTokenizer(content, Utils.LINE).countTokens() * 20 + 20);
		this.setOpaque(false);
		this.setVisible(false);

		frame.getLayeredPane().add(this, JLayeredPane.POPUP_LAYER);
	}

	private String getMaxCharactorsLine()
	{
		String[] lines = content.split(Utils.LINE);
		String maxCharactorsLine = "";
		if(null != lines && lines.length > 0)
		{
			for (String line : lines)
			{
				if(line.length() > maxCharactorsLine.length())
				{
					maxCharactorsLine = line;
				}
			}
		}

		if(maxCharactorsLine.length() != 0)
		{
			return maxCharactorsLine;
		}else
		{
			return content;
		}
	}

	@Override
	protected void paintComponent(Graphics g)
	{
		Graphics2D g2d = (Graphics2D) g;
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
		        RenderingHints.VALUE_ANTIALIAS_ON);
		g2d.setColor(backGroundCol);
		/* AlphaComposite.
		 * AlphaComposite composite = AlphaComposite
		        .getInstance(AlphaComposite.SRC_OVER, 90 / 100.0F);
		g2d.setComposite(composite);
		*/
		g2d.fill(getArea());
		g2d.setColor(foregroundColorCol);

		/*
		 * Draw Text
		 */
		StringTokenizer contentTokenizer = new StringTokenizer(content, Utils.LINE);
		int contentStartY = alignTop ? 20:30;
		g2d.setFont(font);
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
		g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
		while (contentTokenizer.hasMoreElements())
		{
			g2d.drawString(contentTokenizer.nextToken(), 10, contentStartY);
			contentStartY = contentStartY + 20;
		}
	}

	@Override
	protected void paintBorder(Graphics g)
	{
		super.paintBorder(g);
		Graphics2D g2d = (Graphics2D) g;
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
		        RenderingHints.VALUE_ANTIALIAS_ON);
		g2d.setColor(borderCol);
		g2d.draw(getArea());
	}

	private Area getArea()
	{
		if(alignTop)
		{
			return getAreaOfTop();
		}
		else
		{
			return getAreaOfBottom();
		}
	}

	private Area getAreaOfTop()
	{
		Area area = new Area(new RoundRectangle2D.Float(0, 0,
		        this.getWidth() - 1, this.getHeight() - 10, CORNER_ANGLE, CORNER_ANGLE));
		Polygon polygon = new Polygon();
		polygon.addPoint(10 + remainTooltipWidth, this.getHeight() - 10);
		polygon.addPoint(0 + remainTooltipWidth, this.getHeight());
		polygon.addPoint(25 + remainTooltipWidth, this.getHeight() - 10);
		area.add(new Area(polygon));

		return area;
	}

	private Area getAreaOfBottom()
	{
		Area area = new Area(new RoundRectangle2D.Float(0, 10,
		        this.getWidth() - 1, this.getHeight()-1-10, CORNER_ANGLE, CORNER_ANGLE));
		Polygon polygon = new Polygon();
		polygon.addPoint(10 + remainTooltipWidth, 10);
		polygon.addPoint(0 + remainTooltipWidth, 0);
		polygon.addPoint(25 + remainTooltipWidth, 10);
		area.add(new Area(polygon));

		return area;
	}

	@Override
	public void mouseEntered(MouseEvent e)
	{
		Component sourceComponent = e.getComponent();
		Point srcPoint = new Point();
		srcPoint.x = sourceComponent.getWidth();
		srcPoint.y = 0;
		Point realPoint = SwingUtilities.convertPoint(
				sourceComponent, srcPoint, this.frame.getContentPane());

		//Calculate remainTooltipWidth
		remainTooltipWidth = frame.getWidth() - ((int)realPoint.getX() + this.getWidth()+20);
		if(remainTooltipWidth < 0)
		{
			remainTooltipWidth *= -1;
		}else{
			remainTooltipWidth = 0;
		}
		//Calculate align top or bottom.
		alignTop = realPoint.getY()-this.getHeight() -10 > 0;

		Point locationPoint = null;
		if(alignTop)
		{
			locationPoint = new Point(realPoint.x-remainTooltipWidth, realPoint.y - this.getHeight());
		}
		else
		{
			locationPoint = new Point(realPoint.x-remainTooltipWidth, realPoint.y + sourceComponent.getHeight());
		}
		this.setLocation(locationPoint);
		this.setVisible(true);
	}

	@Override
	public void mouseExited(MouseEvent e)
	{
		this.setVisible(false);
	}

	@Override
	public void mouseClicked(MouseEvent e)
	{
	}

	@Override
	public void mousePressed(MouseEvent e)
	{
	}

	@Override
	public void mouseReleased(MouseEvent e)
	{
	}
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Mammillaria microthele Muhlenpf. & Tiegel

### Remarks
null


text:
export default {
	test({ assert, component }) {
		assert.equal(component.count, 0);

		component.arr = ['2'];

		assert.equal(component.count, 1);

		component.arr = ['1', '2'];

		assert.equal(component.count, 2);

		component.arr = ['2', '1'];

		assert.equal(component.count, 2);

		component.arr = [];

		assert.equal(component.count, 0);
	}
};


text:
API Breaking Changes
====

# Version 1.1.0

### Removed VisualBasicCommandLineParser.ctor
During a toolset update we noticed the constructor on `VisualBasicCommandLineParser` was `public`.  This in turn made many of the `protected` members of `CommandLineParser` a part of the API surface as it gave external customers an inheritance path.

It was never the intent for these members to be a part of the supported API surface.  Creation of the parsers is meant to be done via the `Default` singleton properties.  There seems to be little risk that we broke any customers here and hence we decided to remove this API.

PR: https://github.com/dotnet/roslyn/pull/4169

### Changed Simplifier methods to throw ArgumentNullExceptions
Changed Simplifier.ReduceAsync, Simplifier.ExpandAsync, and Simplifier.Expand methods to throw ArgumentNullExceptions if any non-optional, nullable arguments are passed in.  Previously the user would get a NullReferenceException for synchronous methods and an AggregateException containing a NullReferenceException for asynchronous methods.

PR: https://github.com/dotnet/roslyn/pull/5144

# Version 1.3.0

### Treat a method marked with both public and private flags as private

The scenario is loading an assembly where some methods, fields or nested types have accessibility flags set to 7 (all three bits set), which mean public AND private.
After the fix, such flags are loaded to mean private.
The compat change is we're trading a compile-time success and runtime failure (native compiler) against a compile-time error (restoring the behavior of v1.2).

Details below:

- The native compiler successfully compiles the method and field case (those only yield runtime error System.TypeLoadException: Invalid Field Access Flags) and reported an accessibility error on the nested type.
- The 1.2 compiler generated errors:
```
error BC30390: 'C.Private Overloads Sub M()' is not accessible in this context because it is 'Private'.
error BC30389: 'C.F' is not accessible in this context because it is 'Private'.
error BC30389: 'C.C2' is not accessible in this context because it is 'Protected Friend'.
error BC30390: 'C2.Private Overloads Sub M2()' is not accessible in this context because it is 'Private'.
```
- The 1.3 compiler crashes.
- After fix, the same errors as 1.2 are generated again.

PR: https://github.com/dotnet/roslyn/pull/11547

### Don't emit bad DateTimeConstant, and load bad BadTimeConstant as default value instead

The change affects compatibility in two ways:

- When loading an invalid DateTimeConstant(-1), the compiler will use default(DateTime) instead, whereas the native compiler would produce code that fails to execute.
- DateTimeConstant(-1) will still count when we check that you don't specify two default values. The compiler will produce an error, instead of succeeding (and producing IL with two attributes).

PR: https://github.com/dotnet/roslyn/pull/11536

# Version 4.1.0

### Can no longer inherit from CompletionService and CompletionServiceWithProviders

The constructors of Microsoft.CodeAnalysis.Completion and Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders are now internal.
Roslyn does not support implementing completion for arbitrary languages.


text:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--  This has been written by hand. (c) 2010 Andreas Rumpf -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nimrod JavaScript Generator Test</title>
<style type="text/css">
span.DecNumber {color: blue}
</style>
<script src="nimcache/js.js" type="text/javascript"></script>
</head>
<body onload="OnLoad()">
<form name="form1" action="js.html">
  <input type="text" name="input1" size="10" />
  <input type="button" value="Calculate square" onclick="OnButtonClick()" />
</form>

</body>
</html>


text:
class PictureSerializer < ActiveModel::Serializer
  attributes :large, :medium, :thumb

  def large
    object.large_size
  end

  def medium
    object.medium_size
  end

  def thumb
    object.thumb_size
  end
end