import { get } from '../moment/get-set';
import hasOwnProp from '../utils/has-own-prop';
import { addFormatToken } from '../format/format';
import { addUnitAlias } from './aliases';
import { addRegexToken, match1to2, match2, matchWord, regexEscape } from '../parse/regex';
import { addParseToken } from '../parse/token';
import { hooks } from '../utils/hooks';
import { MONTH } from './constants';
import toInt from '../utils/to-int';
import isArray from '../utils/is-array';
import indexOf from '../utils/index-of';
import { createUTC } from '../create/utc';
import getParsingFlags from '../create/parsing-flags';

export function daysInMonth(year, month) {
    return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
}

// FORMATTING

addFormatToken('M', ['MM', 2], 'Mo', function () {
    return this.month() + 1;
});

addFormatToken('MMM', 0, 0, function (format) {
    return this.localeData().monthsShort(this, format);
});

addFormatToken('MMMM', 0, 0, function (format) {
    return this.localeData().months(this, format);
});

// ALIASES

addUnitAlias('month', 'M');

// PARSING

addRegexToken('M',    match1to2);
addRegexToken('MM',   match1to2, match2);
addRegexToken('MMM',  function (isStrict, locale) {
    return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
    return locale.monthsRegex(isStrict);
});

addParseToken(['M', 'MM'], function (input, array) {
    array[MONTH] = toInt(input) - 1;
});

addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
    var month = config._locale.monthsParse(input, token, config._strict);
    // if we didn't find a month name, mark the date as invalid.
    if (month != null) {
        array[MONTH] = month;
    } else {
        getParsingFlags(config).invalidMonth = input;
    }
});

// LOCALES

var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;
export var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
export function localeMonths (m, format) {
    return isArray(this._months) ? this._months[m.month()] :
        this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
}

export var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
export function localeMonthsShort (m, format) {
    return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
        this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
}

function handleStrictParse(monthName, format, strict) {
    var i, ii, mom, llc = monthName.toLocaleLowerCase();
    if (!this._monthsParse) {
        // this is not used
        this._monthsParse = [];
        this._longMonthsParse = [];
        this._shortMonthsParse = [];
        for (i = 0; i < 12; ++i) {
            mom = createUTC([2000, i]);
            this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
            this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
        }
    }

    if (strict) {
        if (format === 'MMM') {
            ii = indexOf.call(this._shortMonthsParse, llc);
            return ii !== -1 ? ii : null;
        } else {
            ii = indexOf.call(this._longMonthsParse, llc);
            return ii !== -1 ? ii : null;
        }
    } else {
        if (format === 'MMM') {
            ii = indexOf.call(this._shortMonthsParse, llc);
            if (ii !== -1) {
                return ii;
            }
            ii = indexOf.call(this._longMonthsParse, llc);
            return ii !== -1 ? ii : null;
        } else {
            ii = indexOf.call(this._longMonthsParse, llc);
            if (ii !== -1) {
                return ii;
            }
            ii = indexOf.call(this._shortMonthsParse, llc);
            return ii !== -1 ? ii : null;
        }
    }
}

export function localeMonthsParse (monthName, format, strict) {
    var i, mom, regex;

    if (this._monthsParseExact) {
        return handleStrictParse.call(this, monthName, format, strict);
    }

    if (!this._monthsParse) {
        this._monthsParse = [];
        this._longMonthsParse = [];
        this._shortMonthsParse = [];
    }

    // TODO: add sorting
    // Sorting makes sure if one month (or abbr) is a prefix of another
    // see sorting in computeMonthsParse
    for (i = 0; i < 12; i++) {
        // make the regex if we don't have it already
        mom = createUTC([2000, i]);
        if (strict && !this._longMonthsParse[i]) {
            this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
            this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
        }
        if (!strict && !this._monthsParse[i]) {
            regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
            this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
        }
        // test the regex
        if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
            return i;
        } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
            return i;
        } else if (!strict && this._monthsParse[i].test(monthName)) {
            return i;
        }
    }
}

// MOMENTS

export function setMonth (mom, value) {
    var dayOfMonth;

    if (!mom.isValid()) {
        // No op
        return mom;
    }

    if (typeof value === 'string') {
        if (/^\d+$/.test(value)) {
            value = toInt(value);
        } else {
            value = mom.localeData().monthsParse(value);
            // TODO: Another silent failure?
            if (typeof value !== 'number') {
                return mom;
            }
        }
    }

    dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
    mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
    return mom;
}

export function getSetMonth (value) {
    if (value != null) {
        setMonth(this, value);
        hooks.updateOffset(this, true);
        return this;
    } else {
        return get(this, 'Month');
    }
}

export function getDaysInMonth () {
    return daysInMonth(this.year(), this.month());
}

export var defaultMonthsShortRegex = matchWord;
export function monthsShortRegex (isStrict) {
    if (this._monthsParseExact) {
        if (!hasOwnProp(this, '_monthsRegex')) {
            computeMonthsParse.call(this);
        }
        if (isStrict) {
            return this._monthsShortStrictRegex;
        } else {
            return this._monthsShortRegex;
        }
    } else {
        return this._monthsShortStrictRegex && isStrict ?
            this._monthsShortStrictRegex : this._monthsShortRegex;
    }
}

export var defaultMonthsRegex = matchWord;
export function monthsRegex (isStrict) {
    if (this._monthsParseExact) {
        if (!hasOwnProp(this, '_monthsRegex')) {
            computeMonthsParse.call(this);
        }
        if (isStrict) {
            return this._monthsStrictRegex;
        } else {
            return this._monthsRegex;
        }
    } else {
        return this._monthsStrictRegex && isStrict ?
            this._monthsStrictRegex : this._monthsRegex;
    }
}

function computeMonthsParse () {
    function cmpLenRev(a, b) {
        return b.length - a.length;
    }

    var shortPieces = [], longPieces = [], mixedPieces = [],
        i, mom;
    for (i = 0; i < 12; i++) {
        // make the regex if we don't have it already
        mom = createUTC([2000, i]);
        shortPieces.push(this.monthsShort(mom, ''));
        longPieces.push(this.months(mom, ''));
        mixedPieces.push(this.months(mom, ''));
        mixedPieces.push(this.monthsShort(mom, ''));
    }
    // Sorting makes sure if one month (or abbr) is a prefix of another it
    // will match the longer piece.
    shortPieces.sort(cmpLenRev);
    longPieces.sort(cmpLenRev);
    mixedPieces.sort(cmpLenRev);
    for (i = 0; i < 12; i++) {
        shortPieces[i] = regexEscape(shortPieces[i]);
        longPieces[i] = regexEscape(longPieces[i]);
        mixedPieces[i] = regexEscape(mixedPieces[i]);
    }

    this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
    this._monthsShortRegex = this._monthsRegex;
    this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
    this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
}

{'repo_name': 'zhoubear/open-paperless', 'stars': '2501', 'repo_language': 'Python', 'file_name': 'development.txt', 'mime_type': 'text/plain', 'hash': -8870268818119636285, 'source_dataset': 'data'}


.. -*- coding: utf-8 -*-
.. URL: https://docs.docker.com/engine/reference/commandline/volume_create/
.. SOURCE: https://github.com/docker/docker/blob/master/docs/reference/commandline/volume_create.md
   doc version: 1.12
      https://github.com/docker/docker/commits/master/docs/reference/commandline/volume_create.md
.. check date: 2016/06/16
.. Commits on Jun 14, 2016 8eca8089fa35f652060e86906166dabc42e556f8
.. -------------------------------------------------------------------

.. volume create

=======================================
volume create
=======================================

.. code-block:: bash

   使い方: docker volume create [オプション]

   ボリュームを作成

     -d, --driver=local    ボリューム・ドライバ名を指定
     --help                使い方の表示
     --label=[]            ボリューム用のメタデータを指定
     --name=               ボリューム名を指定
     -o, --opt=map[]       ドライバ固有のオプションを指定

.. sidebar:: 目次

   .. contents::
       :depth: 3
       :local:

.. Creates a new volume that containers can consume and store data in. If a name is not specified, Docker generates a random name. You create a volume and then configure the container to use it, for example:

コンテナが利用し、データを保管するための新しいボリュームを作成します。名前を指定しなければ、 Docker はランダムな名称を生成します。ボリュームを作成し、コンテナが使えるようにするには、次の例のように実行します。

.. code-block:: bash

   $ docker volume create --name hello
   hello

   $ docker run -d -v hello:/world busybox ls /world

.. The mount is created inside the container’s /world directory. Docker does not support relative paths for mount points inside the container.

これはコンテナ内の ``/world`` ディレクトリにマウントを作成します。Docker はコンテナ内のマウントポイントに、相対パスの指定をサポートしません。

.. Multiple containers can use the same volume in the same time period. This is useful if two containers need access to shared data. For example, if one container writes and the other reads the data.

複数のコンテナが同時に同じボリュームを利用できます。２つのコンテナが共有データにアクセスする場合に便利です。例えば、一方のコンテナがデータを書き込み、もう一方がデータを読み込めます。

.. Volume names must be unique among drivers. This means you cannot use the same volume name with two different drivers. If you attempt this docker returns an error:

ボリューム名はドライバ間でユニークである必要があります。つまり２つの異なったドライバで、同じボリューム名を使うことはできません。実行しようとしても、 ``docker`` はエラーを返します。

.. code-block:: bash

   A volume named  %s  already exists with the %s driver. Choose a different volume name.

.. If you specify a volume name already in use on the current driver, Docker assumes you want to re-use the existing volume and does not return an error.

現在のドライバが既に使用しているボリューム名を指定する場合は、Docker は既存のボリュームを再利用するとみなし、エラーを返しません。

.. Driver specific options

.. _volume-create-driver-specific-options:

ドライバ固有のオプション
==============================

.. Some volume drivers may take options to customize the volume creation. Use the -o or --opt flags to pass driver options:

ボリューム・ドライバによっては、ボリューム作成のカスタマイズのためにオプションが使えます。 ``-o`` か ``--opt`` フラグでドライバにオプションを渡します。

.. code-block:: bash

   $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey

.. These options are passed directly to the volume driver. Options for different volume drivers may do different things (or nothing at all).

これらのオプションは各ボリューム・ドライバに直接渡されます。オプションはボリューム・ドライバごとに別々の動作をします（あるいは何もしないかもしれません）。

.. Note: The built-in local volume driver does not currently accept any options.

.. note::

   内蔵の ``local`` ボリューム・ドライバは、現時点ではオプションを受け付けません。

関連情報
==========

* :doc:`volume_inspect`
* :doc:`volume_ls`
* :doc:`volume_rm`
* :doc:`/engine/userguide/containers/dockervolumes`

.. seealso::

   volume create
      https://docs.docker.com/engine/reference/commandline/volume_create/

{'repo_name': 'zembutsu/docs.docker.jp', 'stars': '212', 'repo_language': 'HTML', 'file_name': 'bitbucket.rst', 'mime_type': 'text/plain', 'hash': 3766405372557636168, 'source_dataset': 'data'}


<?php
/*
 * Copyright 2014 Google Inc.
 *
 * 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.
 */

class Google_Service_AdExchangeBuyer_AddOrderNotesResponse extends Google_Collection
{
  protected $collection_key = 'notes';
  protected $notesType = 'Google_Service_AdExchangeBuyer_MarketplaceNote';
  protected $notesDataType = 'array';

  /**
   * @param Google_Service_AdExchangeBuyer_MarketplaceNote
   */
  public function setNotes($notes)
  {
    $this->notes = $notes;
  }
  /**
   * @return Google_Service_AdExchangeBuyer_MarketplaceNote
   */
  public function getNotes()
  {
    return $this->notes;
  }
}

{'repo_name': 'jbroadway/elefant', 'stars': '179', 'repo_language': 'PHP', 'file_name': 'jquery.js', 'mime_type': 'text/plain', 'hash': 1686279985619807252, 'source_dataset': 'data'}


{'repo_name': 'rfordatascience/tidytuesday', 'stars': '2401', 'repo_language': 'HTML', 'file_name': 'readme.md', 'mime_type': 'text/plain', 'hash': 1409923072433240455, 'source_dataset': 'data'}


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
JacksonXmlRootElement (Jackson-dataformat-XML 2.1.0 API)
</TITLE>

<META NAME="date" CONTENT="2012-10-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: REQUIRED | OPTIONAL

DETAIL: ELEMENT

com.fasterxml.jackson.dataformat.xml.annotation

Annotation Type JacksonXmlRootElement

@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface JacksonXmlRootElement

Annotation that can be used to define name of root element used
 for the root-level object when serialized, which normally uses
 name of the type (class). It is similar to JAXB XmlRootElement.

Optional Element Summary

 String
localName

 String
namespace

namespace

public abstract String namespace

Default:
""

localName

public abstract String localName

Default:
""

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: REQUIRED | OPTIONAL

DETAIL: ELEMENT

Copyright © 2012 FasterXML. All Rights Reserved.

{'repo_name': 'FasterXML/jackson-dataformat-xml', 'stars': '406', 'repo_language': 'Java', 'file_name': 'JacksonXmlModule.html', 'mime_type': 'text/html', 'hash': -8620925623112528639, 'source_dataset': 'data'}


# This file shows how to implement test cases for Rego evaluation.
#
# If you are adding new built-in functions to Rego, you must include test cases in this format.
#
# Each test file contains a set of test 'cases'. Each test case includes a globally unique
# name that identifies the test case ('note'), a policy 'query' to execute, and a set of
# expectations (e.g., 'want_result'). Test cases can also assert on error conditions (e.g.,
# built-in function errors like divide-by-zero).
#
#  * Test cases may include zero or more Rego modules that support the test case.
#  * Test cases may set the value of the base documents loaded under 'data' and 'input'.
#
# The result set is unordered. Each element in the result set specifies variable assignments to
# expect from the query. The example below finds a single assignment of the number '7' to the
# variable 'x'.
#
# If you adding tests for a built-in function, prefix the note with the built-in function name.
# Use snake_case_for_the_note.
#
# Many of the test cases include a large blob of generic JSON data. This is an artifact
# of the source code where those cases were exported from. Do not copy the blob into new
# test cases.
#
# The OPA test suite (which is implemented using Go's standard testing framework) discovers tests
# added under ./topdown/testdata/cases. For example, to run only the tests in this file:
#
#   go test ./topdown -v -run 'TestRego/helloworld'
#
cases:
- note: helloworld/test_case
  query: data.test.p = x
  modules:
  - |
    package test

    p = 7 {
      data.foo == q
    }

    q = input.baz
  data: {"foo": "bar"}
  input: {"baz": "bar"}
  want_result: [{x: 7}]
- note: helloworld/another_test_for_builtin_error
  query: 1 / 0
  want_error_code: eval_builtin_error
  want_error: 'div: divide by zero'

{'repo_name': 'open-policy-agent/opa', 'stars': '3659', 'repo_language': 'Go', 'file_name': 'key.pem', 'mime_type': 'text/plain', 'hash': -2904985112693801949, 'source_dataset': 'data'}


/*
Copyright 2016 The Kubernetes Authors.

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 framework

import (
	"context"
	"fmt"
	"regexp"
	"sync"
	"time"

	v1 "k8s.io/api/core/v1"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/util/sets"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/client-go/kubernetes/scheme"
	v1core "k8s.io/client-go/kubernetes/typed/core/v1"
	podutil "k8s.io/kubernetes/pkg/api/v1/pod"
	"k8s.io/kubernetes/pkg/kubelet/events"
	"k8s.io/kubernetes/pkg/kubelet/sysctl"

	"github.com/onsi/ginkgo"
	"github.com/onsi/gomega"

	// TODO: Remove the following imports (ref: https://github.com/kubernetes/kubernetes/issues/81245)
	e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
)

// DefaultPodDeletionTimeout is the default timeout for deleting pod
const DefaultPodDeletionTimeout = 3 * time.Minute

// ImageWhiteList is the images used in the current test suite. It should be initialized in test suite and
// the images in the white list should be pre-pulled in the test suite.  Currently, this is only used by
// node e2e test.
var ImageWhiteList sets.String

// PodClient is a convenience method for getting a pod client interface in the framework's namespace,
// possibly applying test-suite specific transformations to the pod spec, e.g. for
// node e2e pod scheduling.
func (f *Framework) PodClient() *PodClient {
	return &PodClient{
		f:            f,
		PodInterface: f.ClientSet.CoreV1().Pods(f.Namespace.Name),
	}
}

// PodClientNS is a convenience method for getting a pod client interface in an alternative namespace,
// possibly applying test-suite specific transformations to the pod spec, e.g. for
// node e2e pod scheduling.
func (f *Framework) PodClientNS(namespace string) *PodClient {
	return &PodClient{
		f:            f,
		PodInterface: f.ClientSet.CoreV1().Pods(namespace),
	}
}

// PodClient is a struct for pod client.
type PodClient struct {
	f *Framework
	v1core.PodInterface
}

// Create creates a new pod according to the framework specifications (don't wait for it to start).
func (c *PodClient) Create(pod *v1.Pod) *v1.Pod {
	c.mungeSpec(pod)
	p, err := c.PodInterface.Create(context.TODO(), pod, metav1.CreateOptions{})
	ExpectNoError(err, "Error creating Pod")
	return p
}

// CreateSync creates a new pod according to the framework specifications, and wait for it to start.
func (c *PodClient) CreateSync(pod *v1.Pod) *v1.Pod {
	namespace := c.f.Namespace.Name
	p := c.Create(pod)
	ExpectNoError(e2epod.WaitForPodNameRunningInNamespace(c.f.ClientSet, p.Name, namespace))
	// Get the newest pod after it becomes running, some status may change after pod created, such as pod ip.
	p, err := c.Get(context.TODO(), p.Name, metav1.GetOptions{})
	ExpectNoError(err)
	return p
}

// CreateBatch create a batch of pods. All pods are created before waiting.
func (c *PodClient) CreateBatch(pods []*v1.Pod) []*v1.Pod {
	ps := make([]*v1.Pod, len(pods))
	var wg sync.WaitGroup
	for i, pod := range pods {
		wg.Add(1)
		go func(i int, pod *v1.Pod) {
			defer wg.Done()
			defer ginkgo.GinkgoRecover()
			ps[i] = c.CreateSync(pod)
		}(i, pod)
	}
	wg.Wait()
	return ps
}

// Update updates the pod object. It retries if there is a conflict, throw out error if
// there is any other apierrors. name is the pod name, updateFn is the function updating the
// pod object.
func (c *PodClient) Update(name string, updateFn func(pod *v1.Pod)) {
	ExpectNoError(wait.Poll(time.Millisecond*500, time.Second*30, func() (bool, error) {
		pod, err := c.PodInterface.Get(context.TODO(), name, metav1.GetOptions{})
		if err != nil {
			return false, fmt.Errorf("failed to get pod %q: %v", name, err)
		}
		updateFn(pod)
		_, err = c.PodInterface.Update(context.TODO(), pod, metav1.UpdateOptions{})
		if err == nil {
			Logf("Successfully updated pod %q", name)
			return true, nil
		}
		if apierrors.IsConflict(err) {
			Logf("Conflicting update to pod %q, re-get and re-update: %v", name, err)
			return false, nil
		}
		return false, fmt.Errorf("failed to update pod %q: %v", name, err)
	}))
}

// DeleteSync deletes the pod and wait for the pod to disappear for `timeout`. If the pod doesn't
// disappear before the timeout, it will fail the test.
func (c *PodClient) DeleteSync(name string, options metav1.DeleteOptions, timeout time.Duration) {
	namespace := c.f.Namespace.Name
	err := c.Delete(context.TODO(), name, options)
	if err != nil && !apierrors.IsNotFound(err) {
		Failf("Failed to delete pod %q: %v", name, err)
	}
	gomega.Expect(e2epod.WaitForPodToDisappear(c.f.ClientSet, namespace, name, labels.Everything(),
		2*time.Second, timeout)).To(gomega.Succeed(), "wait for pod %q to disappear", name)
}

// mungeSpec apply test-suite specific transformations to the pod spec.
func (c *PodClient) mungeSpec(pod *v1.Pod) {
	if !TestContext.NodeE2E {
		return
	}

	gomega.Expect(pod.Spec.NodeName).To(gomega.Or(gomega.BeZero(), gomega.Equal(TestContext.NodeName)), "Test misconfigured")
	pod.Spec.NodeName = TestContext.NodeName
	// Node e2e does not support the default DNSClusterFirst policy. Set
	// the policy to DNSDefault, which is configured per node.
	pod.Spec.DNSPolicy = v1.DNSDefault

	// PrepullImages only works for node e2e now. For cluster e2e, image prepull is not enforced,
	// we should not munge ImagePullPolicy for cluster e2e pods.
	if !TestContext.PrepullImages {
		return
	}
	// If prepull is enabled, munge the container spec to make sure the images are not pulled
	// during the test.
	for i := range pod.Spec.Containers {
		c := &pod.Spec.Containers[i]
		if c.ImagePullPolicy == v1.PullAlways {
			// If the image pull policy is PullAlways, the image doesn't need to be in
			// the white list or pre-pulled, because the image is expected to be pulled
			// in the test anyway.
			continue
		}
		// If the image policy is not PullAlways, the image must be in the white list and
		// pre-pulled.
		gomega.Expect(ImageWhiteList.Has(c.Image)).To(gomega.BeTrue(), "Image %q is not in the white list, consider adding it to CommonImageWhiteList in test/e2e/common/util.go or NodeImageWhiteList in test/e2e_node/image_list.go", c.Image)
		// Do not pull images during the tests because the images in white list should have
		// been prepulled.
		c.ImagePullPolicy = v1.PullNever
	}
}

// WaitForSuccess waits for pod to succeed.
// TODO(random-liu): Move pod wait function into this file
func (c *PodClient) WaitForSuccess(name string, timeout time.Duration) {
	f := c.f
	gomega.Expect(e2epod.WaitForPodCondition(f.ClientSet, f.Namespace.Name, name, fmt.Sprintf("%s or %s", v1.PodSucceeded, v1.PodFailed), timeout,
		func(pod *v1.Pod) (bool, error) {
			switch pod.Status.Phase {
			case v1.PodFailed:
				return true, fmt.Errorf("pod %q failed with reason: %q, message: %q", name, pod.Status.Reason, pod.Status.Message)
			case v1.PodSucceeded:
				return true, nil
			default:
				return false, nil
			}
		},
	)).To(gomega.Succeed(), "wait for pod %q to success", name)
}

// WaitForFinish waits for pod to finish running, regardless of success or failure.
func (c *PodClient) WaitForFinish(name string, timeout time.Duration) {
	f := c.f
	gomega.Expect(e2epod.WaitForPodCondition(f.ClientSet, f.Namespace.Name, name, fmt.Sprintf("%s or %s", v1.PodSucceeded, v1.PodFailed), timeout,
		func(pod *v1.Pod) (bool, error) {
			switch pod.Status.Phase {
			case v1.PodFailed:
				return true, nil
			case v1.PodSucceeded:
				return true, nil
			default:
				return false, nil
			}
		},
	)).To(gomega.Succeed(), "wait for pod %q to finish running", name)
}

// WaitForErrorEventOrSuccess waits for pod to succeed or an error event for that pod.
func (c *PodClient) WaitForErrorEventOrSuccess(pod *v1.Pod) (*v1.Event, error) {
	var ev *v1.Event
	err := wait.Poll(Poll, PodStartTimeout, func() (bool, error) {
		evnts, err := c.f.ClientSet.CoreV1().Events(pod.Namespace).Search(scheme.Scheme, pod)
		if err != nil {
			return false, fmt.Errorf("error in listing events: %s", err)
		}
		for _, e := range evnts.Items {
			switch e.Reason {
			case events.KillingContainer, events.FailedToCreateContainer, sysctl.ForbiddenReason:
				ev = &e
				return true, nil
			case events.StartedContainer:
				return true, nil
			default:
				// ignore all other errors
			}
		}
		return false, nil
	})
	return ev, err
}

// MatchContainerOutput gets output of a container and match expected regexp in the output.
func (c *PodClient) MatchContainerOutput(name string, containerName string, expectedRegexp string) error {
	f := c.f
	output, err := e2epod.GetPodLogs(f.ClientSet, f.Namespace.Name, name, containerName)
	if err != nil {
		return fmt.Errorf("failed to get output for container %q of pod %q", containerName, name)
	}
	regex, err := regexp.Compile(expectedRegexp)
	if err != nil {
		return fmt.Errorf("failed to compile regexp %q: %v", expectedRegexp, err)
	}
	if !regex.MatchString(output) {
		return fmt.Errorf("failed to match regexp %q in output %q", expectedRegexp, output)
	}
	return nil
}

// PodIsReady returns true if the specified pod is ready. Otherwise false.
func (c *PodClient) PodIsReady(name string) bool {
	pod, err := c.Get(context.TODO(), name, metav1.GetOptions{})
	ExpectNoError(err)
	return podutil.IsPodReady(pod)
}

{'repo_name': 'ceph/ceph-csi', 'stars': '402', 'repo_language': 'Go', 'file_name': 'shiftjis.go', 'mime_type': 'text/plain', 'hash': 1307301717461172312, 'source_dataset': 'data'}


<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="Property Sheet" module="erp5.portal_type"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_count</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>_mt_index</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>_tree</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>DefaultCredentialQuestion</string> </value>
        </item>
        <item>
            <key> <string>portal_type</string> </key>
            <value> <string>Property Sheet</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="2" aka="AAAAAAAAAAI=">
    <pickle>
      <global name="Length" module="BTrees.Length"/>
    </pickle>
    <pickle> <int>0</int> </pickle>
  </record>
  <record id="3" aka="AAAAAAAAAAM=">
    <pickle>
      <global name="OOBTree" module="BTrees.OOBTree"/>
    </pickle>
    <pickle>
      <none/>
    </pickle>
  </record>
  <record id="4" aka="AAAAAAAAAAQ=">
    <pickle>
      <global name="OOBTree" module="BTrees.OOBTree"/>
    </pickle>
    <pickle>
      <none/>
    </pickle>
  </record>
</ZopeData>

{'repo_name': 'Nexedi/erp5', 'stars': '116', 'repo_language': 'JavaScript', 'file_name': 'base_category_list.xml', 'mime_type': 'text/plain', 'hash': -3311853990525118172, 'source_dataset': 'data'}


R9 390

A video card.

{'repo_name': 'waferbaby/usesthis', 'stars': '498', 'repo_language': 'HTML', 'file_name': 'scan', 'mime_type': 'text/x-ruby', 'hash': 286795701148305815, 'source_dataset': 'data'}


---
# This role installs XSA on top of an existing HANA 2.0 instance
- name: Download HANA Cockpit
  get_url:
    url: "{{ url_cockpit }}"
    dest: /hana/shared/install/SAPHANACOCKPIT07_11-70002299.SAR
    timeout: "{{ url_timeout }}"
  register: result
  until: result is succeeded
  retries: "{{ url_retries_cnt }}"
  delay: "{{ url_retries_delay }}"

- name: Extract HANA Cockpit
  command: ./SAPCAR_LINUX.EXE -manifest SIGNATURE.SMF -xvf SAPHANACOCKPIT07_11-70002299.SAR -R SAP_HANA_COCKPIT
  args:
    chdir: /hana/shared/install
    creates: /hana/shared/install/SAP_HANA_COCKPIT

{'repo_name': 'Azure/sap-hana', 'stars': '110', 'repo_language': 'HCL', 'file_name': 'main.yml', 'mime_type': 'text/plain', 'hash': -6573553850695449831, 'source_dataset': 'data'}


<?php

declare(strict_types=1);

namespace Stancl\Tenancy\Database\Concerns;

use Stancl\Tenancy\Contracts\Tenant;
use Stancl\Tenancy\Resolvers;
use Stancl\Tenancy\Resolvers\Contracts\CachedTenantResolver;

trait InvalidatesResolverCache
{
    public static $resolvers = [
        Resolvers\DomainTenantResolver::class,
        Resolvers\PathTenantResolver::class,
        Resolvers\RequestDataTenantResolver::class,
    ];

    public static function bootInvalidatesResolverCache()
    {
        static::saved(function (Tenant $tenant) {
            foreach (static::$resolvers as $resolver) {
                /** @var CachedTenantResolver $resolver */
                $resolver = app($resolver);

                $resolver->invalidateCache($tenant);
            }
        });
    }
}

{'repo_name': 'stancl/tenancy', 'stars': '1060', 'repo_language': 'PHP', 'file_name': '2020_05_11_000001_test_create_users_table.php', 'mime_type': 'text/x-php', 'hash': -8703793283125408953, 'source_dataset': 'data'}


// Copyright 2018-2020 Burak Sezer
//
// 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 protocol

import (
	"bytes"
	"reflect"
	"testing"
	"time"
)

type fakeTCPConn struct {
	*bytes.Buffer
}

func (f *fakeTCPConn) Close() error {
	return nil
}

func newFakeTCPConn(buf []byte) *fakeTCPConn {
	return &fakeTCPConn{
		Buffer: bytes.NewBuffer(buf),
	}
}

func TestDMapMessage_Encode(t *testing.T) {
	buf := new(bytes.Buffer)
	msg := NewDMapMessage(OpPut)
	msg.SetBuffer(buf)
	msg.SetDMap("mydmap")
	msg.SetKey("mykey")
	msg.SetValue([]byte("value"))
	err := msg.Encode()
	if err != nil {
		t.Fatalf("Expected nil. Got: %v", err)
	}
}

func TestDMapMessage_Decode(t *testing.T) {
	buf := new(bytes.Buffer)
	value := []byte("value")

	// Encode first
	msg := NewDMapMessage(OpPut)
	msg.SetBuffer(buf)
	msg.SetDMap("mydmap")
	msg.SetKey("mykey")
	msg.SetValue(value)
	msg.SetExtra(PutExtra{
		Timestamp: time.Now().UnixNano(),
	})

	err := msg.Encode()
	if err != nil {
		t.Fatalf("Expected nil. Got: %v", err)
	}

	conn := newFakeTCPConn(buf.Bytes())
	buf.Reset()
	header, err := ReadMessage(conn, buf)
	if err != nil {
		t.Fatalf("Expected nil. Got: %v", err)
	}
	if header.Magic != MagicDMapReq {
		t.Fatalf("Expected MagicDMapReq (%d). Got: %d", MagicDMapReq, header.Magic)
	}

	// Decode message from the TCP socket
	req := NewDMapMessageFromRequest(buf)
	err = req.Decode()
	if err != nil {
		t.Fatalf("Expected nil. Got: %v", err)
	}

	if req.DMap() != "mydmap" {
		t.Fatalf("Expected mydmap. Got: %v", req.DMap())
	}

	if req.Key() != "mykey" {
		t.Fatalf("Expected mykey. Got: %v", req.Key())
	}

	if !bytes.Equal(req.Value(), value) {
		t.Fatalf("Expected myvalue. Got: %v", string(req.Value()))
	}

	if !reflect.DeepEqual(msg.Extra(), req.Extra()) {
		t.Fatalf("Different extra")
	}
}

func TestDMapMessage_Response(t *testing.T) {
	buf := new(bytes.Buffer)
	msg := NewDMapMessage(OpPut)
	msg.SetBuffer(buf)

	err := msg.Encode()
	if err != nil {
		t.Fatalf("Expected nil. Got: %v", err)
	}

	respBuf := new(bytes.Buffer)
	resp := msg.Response(respBuf)
	if resp.OpCode() != msg.OpCode() {
		t.Fatalf("Expected OpCode: %d. Got: %d", msg.OpCode(), resp.OpCode())
	}

	value := []byte("value")
	resp.SetValue(value)
	if !bytes.Equal(resp.Value(), value) {
		t.Fatalf("response.Value() returned a different value")
	}

	resp.SetStatus(StatusInternalServerError)
	if resp.Status() != StatusInternalServerError {
		t.Fatalf("Expected status code: %d. Got: %d", StatusInternalServerError, resp.Status())
	}
}

{'repo_name': 'buraksezer/olric', 'stars': '654', 'repo_language': 'Go', 'file_name': 'loader.go', 'mime_type': 'text/plain', 'hash': -7881664153625863779, 'source_dataset': 'data'}


-- Tables
CREATE TABLE IF NOT EXISTS "Audit" (
    "Id" uuid NOT NULL,
    "Date" timestamp NOT NULL,
    "UserId" uuid NULL,
    "TaskId" uuid NULL,
    "Content" text NOT NULL,
    "Username" varchar(50) NOT NULL,
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_Audit" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "Priority" (
    "Id" uuid NOT NULL,
    "Name" varchar(100) NOT NULL,
    "Description" varchar(255) NULL,
    "DisplayOrder" int4 NOT NULL DEFAULT (0),
    "IsActive" bool NOT NULL DEFAULT (true),
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_Priority" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "Role" (
    "Id" uuid NOT NULL,
    "Name" varchar(256) NOT NULL,
    "Description" text NULL,
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_Role" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "Status" (
    "Id" uuid NOT NULL,
    "Name" varchar(100) NOT NULL,
    "Description" varchar(255) NULL,
    "DisplayOrder" int4 NOT NULL DEFAULT (0),
    "IsActive" bool NOT NULL DEFAULT (true),
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_Status" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "Task" (
    "Id" uuid NOT NULL,
    "StatusId" uuid NOT NULL,
    "PriorityId" uuid NULL,
    "Title" varchar(255) NOT NULL,
    "Description" text NULL,
    "StartDate" timestamptz NULL,
    "DueDate" timestamptz NULL,
    "CompleteDate" timestamptz NULL,
    "AssignedId" uuid NULL,
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_Task" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "TaskExtended" (
    "TaskId" uuid NOT NULL,
    "UserAgent" text NULL,
    "Browser" varchar(256) NULL,
    "OperatingSystem" varchar(256) NULL,
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_TaskExtended" PRIMARY KEY ("TaskId")
);

CREATE TABLE IF NOT EXISTS "User" (
    "Id" uuid NOT NULL,
    "EmailAddress" varchar(256) NOT NULL,
    "IsEmailAddressConfirmed" bool NOT NULL DEFAULT (false),
    "DisplayName" varchar(256) NOT NULL,
    "PasswordHash" text NULL,
    "ResetHash" text NULL,
    "InviteHash" text NULL,
    "AccessFailedCount" int4 NOT NULL DEFAULT (0),
    "LockoutEnabled" bool NOT NULL DEFAULT (false),
    "LockoutEnd" timestamptz NULL,
    "LastLogin" timestamptz NULL,
    "IsDeleted" bool NOT NULL DEFAULT (false),
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_User" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "UserLogin" (
    "Id" uuid NOT NULL,
    "EmailAddress" varchar(256) NOT NULL,
    "UserId" uuid NULL,
    "UserAgent" text NULL,
    "Browser" varchar(256) NULL,
    "OperatingSystem" varchar(256) NULL,
    "DeviceFamily" varchar(256) NULL,
    "DeviceBrand" varchar(256) NULL,
    "DeviceModel" varchar(256) NULL,
    "IpAddress" varchar(50) NULL,
    "IsSuccessful" bool NOT NULL DEFAULT (false),
    "FailureMessage" varchar(256) NULL,
    "Created" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "CreatedBy" varchar(100) NULL,
    "Updated" timestamptz NOT NULL DEFAULT (now() at time zone 'utc'),
    "UpdatedBy" varchar(100) NULL,
    "RowVersion" bytea NULL,
    CONSTRAINT "PK_UserLogin" PRIMARY KEY ("Id")
);

CREATE TABLE IF NOT EXISTS "UserRole" (
    "UserId" uuid NOT NULL,
    "RoleId" uuid NOT NULL,
    CONSTRAINT "PK_UserRole" PRIMARY KEY ("UserId", "RoleId")
);

-- Foreign Keys
ALTER TABLE IF EXISTS "Task"
    ADD CONSTRAINT "FK_Task_Priority_PriorityId" FOREIGN KEY ("PriorityId") REFERENCES "Priority" ("Id");

ALTER TABLE IF EXISTS "Task"
    ADD CONSTRAINT "FK_Task_Status_StatusId" FOREIGN KEY ("StatusId") REFERENCES "Status" ("Id");

ALTER TABLE IF EXISTS "Task"
    ADD CONSTRAINT "FK_Task_User_AssignedId" FOREIGN KEY ("AssignedId") REFERENCES "User" ("Id");

ALTER TABLE IF EXISTS "TaskExtended"
    ADD CONSTRAINT "FK_TaskExtended_Task_TaskId" FOREIGN KEY ("TaskId") REFERENCES "Task" ("Id");

ALTER TABLE IF EXISTS "UserLogin"
    ADD CONSTRAINT "FK_UserLogin_User_UserId" FOREIGN KEY ("UserId") REFERENCES "User" ("Id");

ALTER TABLE IF EXISTS "UserRole"
    ADD CONSTRAINT "FK_UserRole_Role_RoleId" FOREIGN KEY ("RoleId") REFERENCES "Role" ("Id");

ALTER TABLE IF EXISTS "UserRole"
    ADD CONSTRAINT "FK_UserRole_User_UserId" FOREIGN KEY ("UserId") REFERENCES "User" ("Id");

-- Indexes
CREATE UNIQUE INDEX IF NOT EXISTS "UX_Role_Name"
ON "Role" ("Name");

CREATE INDEX IF NOT EXISTS "IX_Task_AssignedId"
ON "Task" ("AssignedId");

CREATE INDEX IF NOT EXISTS "IX_Task_PriorityId"
ON "Task" ("PriorityId");

CREATE INDEX IF NOT EXISTS "IX_Task_StatusId"
ON "Task" ("StatusId");

CREATE UNIQUE INDEX IF NOT EXISTS "UX_User_EmailAddress"
ON "User" ("EmailAddress");

CREATE INDEX IF NOT EXISTS "IX_UserLogin_EmailAddress"
ON "UserLogin" ("EmailAddress");

CREATE INDEX IF NOT EXISTS "IX_UserLogin_UserId"
ON "UserLogin" ("UserId");

{'repo_name': 'loresoft/EntityFrameworkCore.Generator', 'stars': '127', 'repo_language': 'C#', 'file_name': 'Script001.Tracker.Schema.sql', 'mime_type': 'text/plain', 'hash': 8906404115837569068, 'source_dataset': 'data'}


param($build_env = $PSScriptRoot, $cygwin_mirror = "http://mirrors.kernel.org/sourceware/cygwin/")
pushd $build_env

$ErrorActionPreference = "Stop"
Add-Type -A 'System.IO.Compression.FileSystem'

if ($env:DNS_SERVER) {
  netsh interface ip set dns Ethernet static $env:DNS_SERVER
}

$wc = New-Object System.Net.WebClient

if (!(Test-Path "C:\Gitlab-Runner\gitlab-runner-windows-amd64.exe")) {
  mkdir -Force C:\Gitlab-Runner
  $url = "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe"
  $wc.DownloadFile($url, "C:\Gitlab-Runner\gitlab-runner-windows-amd64.exe")
}

# Install cygwin 32 and 64 bit
mkdir -Force installers
$url = "https://cygwin.com/setup-x86_64.exe"
$wc.DownloadFile($url, "$build_env\installers\cygwin-x86_64.exe")
$ret = Start-Process "installers\cygwin-x86_64.exe" -ArgumentList "--arch","x86_64","--packages","gcc-core,make,wget","--upgrade-also","--root","C:\cygwin64","--site","$cygwin_mirror","--quiet-mode" -Wait -PassThru -RedirectStandardOutput "$build_env\cygwin-x86_64-stdout" -RedirectStandardError "$build_env\cygwin-x86_64-stderr"
if ($ret.ExitCode) {
  throw "Cygwin 64-bit install failed"
}
$ret = Start-Process "installers\cygwin-x86_64.exe" -ArgumentList "--arch","x86","--packages","gcc-core,make,wget","--upgrade-also","--root","C:\cygwin","--site","$cygwin_mirror","--quiet-mode" -Wait -PassThru -RedirectStandardOutput "$build_env\cygwin-x86-stdout" -RedirectStandardError "$build_env\cygwin-x86-stderr"
if ($ret.ExitCode) {
  throw "Cygwin 32-bit install failed"
}

# Install Visual Studio
echo "Beginning Visual Studio install"
$url = "https://aka.ms/vs/15/release/vs_community.exe"
$wc.DownloadFile($url, "$build_env\installers\vs_community.exe")
if (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat") {
  $ret = Start-Process "$build_env\installers\vs_community.exe" -ArgumentList "update","--passive" -Wait -PassThru
} else {
  $ret = Start-Process "$build_env\installers\vs_community.exe" -ArgumentList "--add","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","--add","Microsoft.VisualStudio.Component.VC.CMake.Project","--add","Microsoft.VisualStudio.Component.Git","--passive","--norestart" -Wait -PassThru
}

if ($ret.ExitCode) {
  throw "Visual Studio install failed"
}
echo "Visual Studio install complete"

$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")

certutil -addstore "Root" $build_env\ca.crt
foreach ($url in -split $env:CA_URLS) {
  git config --system http."$url".sslCAinfo $build_env\ca.crt
}

popd

{'repo_name': 'grimm-co/killerbeez', 'stars': '158', 'repo_language': 'C', 'file_name': 'job.xml', 'mime_type': 'text/plain', 'hash': -1634058545381305998, 'source_dataset': 'data'}


/* CSS Document */
	.yui-dt-scrollable {
        width: 40em;
        height: 10em;
    }

    .yui-dt-scrollbody {
        height: 10em;
        * height : auto;
    }

    .yui-dt-scrollable  thead {
        background: #696969;
        color: #fff;
    }

    .yui-dt-scrollable th, .yui-dt-scrollbody td {
        width: 40em;
    }

{'repo_name': 'OpenRock/OpenAM', 'stars': '136', 'repo_language': 'Java', 'file_name': 'FSAccountManager.java', 'mime_type': 'text/x-java', 'hash': -4309757131975992838, 'source_dataset': 'data'}


bin/wfut
include/libwfut-0.2/libwfut/ChannelFileList.h
include/libwfut-0.2/libwfut/ChannelIO.h
include/libwfut-0.2/libwfut/Encoder.h
include/libwfut-0.2/libwfut/FileIO.h
include/libwfut-0.2/libwfut/IO.h
include/libwfut-0.2/libwfut/WFUT.h
include/libwfut-0.2/libwfut/crc32.h
include/libwfut-0.2/libwfut/header.h
include/libwfut-0.2/libwfut/platform.h
include/libwfut-0.2/libwfut/types.h
lib/libwfut-0.2.a
lib/libwfut-0.2.so
lib/libwfut-0.2.so.1
lib/libwfut-0.2.so.1.1.1
libdata/pkgconfig/libwfut-0.2.pc
man/man1/wfut.1.gz

{'repo_name': 'freebsd/freebsd-ports', 'stars': '572', 'repo_language': 'None', 'file_name': 'distinfo', 'mime_type': 'text/plain', 'hash': -855296999909477581, 'source_dataset': 'data'}


#Generated by Maven Integration for Eclipse
#Tue Jun 19 09:17:17 CST 2018
version=1.0
groupId=org.leo.im
m2e.projectName=leo-im-api-provider
m2e.projectLocation=F\:\\Develop\\open-source\\leo-im-server\\leo-im-api-provider
artifactId=leo-im-api-provider

{'repo_name': 'lining90567/leo-im-server', 'stars': '185', 'repo_language': 'Java', 'file_name': 'org.eclipse.core.resources.prefs', 'mime_type': 'text/plain', 'hash': 3676456725816890968, 'source_dataset': 'data'}


## Makefile.am -- Process this file with automake to produce Makefile.in

INCLUDES	= -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/include

noinst_PROGRAMS = test
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/libmkv.la

{'repo_name': 'mean00/avidemux2', 'stars': '216', 'repo_language': 'C', 'file_name': 'deployBuster.sh', 'mime_type': 'text/x-shellscript', 'hash': -3906134711559056872, 'source_dataset': 'data'}


commandlinefu_id: 7616
translator:
  weibo: tgic
command: |-
  find $(echo "$PATH" | tr ':' ' ') -name "*program*"
summary: |-
  随机显示PATH里的一个命令

{'repo_name': 'tg123/commandlinefu.cn', 'stars': '271', 'repo_language': 'C#', 'file_name': 'mkfifo_tmp_fifo_cat_tmp_fifo_nc_l_p_1234_tee_a_to_log_nc_machine_port.yaml', 'mime_type': 'text/plain', 'hash': -1601372073409252249, 'source_dataset': 'data'}


/*************************************************
*      Perl-Compatible Regular Expressions       *
*************************************************/

/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.

                       Written by Philip Hazel
           Copyright (c) 1997-2012 University of Cambridge

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

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

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

    * Neither the name of the University of Cambridge nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/

/* Generate code with 16 bit character support. */
#define COMPILE_PCRE16

#include "pcre_byte_order.c"

/* End of pcre16_byte_order.c */

{'repo_name': 'project-jedi/jcl', 'stars': '438', 'repo_language': 'Pascal', 'file_name': 'howto-jpp.txt', 'mime_type': 'text/plain', 'hash': -3283560007622952990, 'source_dataset': 'data'}


### ModelConverter

---

> When Angel application is complete, any PSModel will be saved in binary format for enhancing speed and saving space. Understanding that some users may need to have the PSModels saved in plaintext format, we created ModelConverter class to parse the PSModel binary file to plaintext.

## Format Before Conversion (Binary)

Before conversion, Angel's binary model file has the following default design:

* Each model has a source file "meta" that holds information of the model parameters and partitions, as well as indexing information for each partition
* There are multiple model files where each file holds data of one or more model partitions

## Format After Conversion (Plaintext)

After conversion, Angel's plaintext model file has the following default design:

* A model is saved in units of partitions, where each output file may contain one or more partitions; the correspondence of the partitions to the output file is the same as to the original binary file
* Format of the converted file is shown below. Mark "rowIndex=xxx" at the beginning of each row, followed by a sequence of key:value pairs, where key and value are the column index and value in the corresponding row. **Please note that a row may be divided to multiple partitions, thus a complete row may be stored as multiple segments in multiple files**

```
rowIndex=0
0:-0.004235138405748639
1:-0.003367253227582031
3:-0.003988846053264014
6:0.001803243020660425
8:1.9413353447408782E-4
```

## Converter

Currently, Angel supports two converter modes: **stand-alone mode** and **distributed mode**.

### 1. Stand-alone Mode

Conversion is done on the machine that runs the script (typically, the gateway machine that is used to submit the Angel job). In general, this mode is easy to use thus is recommended. The submit command is shown below:

```bsh
./bin/angel-model-convert \
--angel.load.model.path ${hdfs_path} \
--angel.save.model.path ${hdfs_path} \
--angel.modelconverts.model.names ${models} \
--angel.modelconverts.serde.class ${SerdeClass}
```

### 2. Distributed Mode

Even though the stand-alone mode is easy to use, it is subject to the gateway machine's resource and can have poor performance due to the consumption of CPU and network IO, especially when the model is large. The distributed mode is provided to address this issue.

The distributed mode starts an Angel job under the Yarn mode, where conversion is done within the worker, taking advantage of Angel's distributed processing capability. This mode puts only small pressure on the gateway machine and improves speed. The submit command is shown below:

```bsh
./bin/angel-submit \
--angel.app.submit.class com.tencent.angel.ml.toolkits.modelconverter.ModelConverterRunner \
--angel.load.model.path ${hdfs_path} \
--angel.save.model.path ${hdfs_path} \
--angel.modelconverts.model.names ${models} \
--angel.modelconverts.serde.class ${SerdeClass}
```

**Parameters:**

* angel.load.model.path
	* Model input path, i.e. the save path for model in its original binary format (**this path does not need to include the matrix name**)
* angel.save.model.path
	* Save path for converted model in text format
* angel.modelconverts.model.names
	* List of names of models that need to be converted; can specify multiple model names separated by ","
	* **Note**: this parameter is not required; when unspecified, all models under the specified input path will be converted
* angel.modelconverts.serde.class
	* Serialization format of the model output lines
	* **Note**: this parameter is not required; when unspecified, the default line format is "index:value"

{'repo_name': 'Angel-ML/angel', 'stars': '5907', 'repo_language': 'Java', 'file_name': 'a9a_123d_train.libsvm', 'mime_type': 'text/plain', 'hash': 303446625565758850, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<language namespace="mbeddr.tutorial.layers" uuid="8cb5ab9f-a2c3-418b-a67c-c5690ef7361b" languageVersion="0" moduleVersion="0">
  <models>
    <modelRoot contentPath="${module}" type="default">
      <sourceRoot location="languageModels" />
    </modelRoot>
  </models>
  <facets>
    <facet type="java">
      <classes generated="true" path="${module}/classes_gen" />
    </facet>
  </facets>
  <accessoryModels />
  <generators>
    <generator namespace="mbeddr.tutorial.layers#6255755692623247936" uuid="4e7ff455-32e2-4980-9f07-d7007f01d4e5">
      <models>
        <modelRoot contentPath="${module}" type="default">
          <sourceRoot location="generator/template" />
        </modelRoot>
      </models>
      <facets>
        <facet type="java">
          <classes generated="true" path="${module}/generator/classes_gen" />
        </facet>
      </facets>
      <external-templates />
      <languageVersions>
        <language slang="l:d4280a54-f6df-4383-aa41-d1b2bffa7eb1:com.mbeddr.core.base" version="5" />
        <language slang="l:223dd778-c44f-4ef3-9535-7aa7d12244a6:com.mbeddr.core.debug" version="0" />
        <language slang="l:61c69711-ed61-4850-81d9-7714ff227fb0:com.mbeddr.core.expressions" version="5" />
        <language slang="l:6d11763d-483d-4b2b-8efc-09336c1b0001:com.mbeddr.core.modules" version="5" />
        <language slang="l:3bf5377a-e904-4ded-9754-5a516023bfaa:com.mbeddr.core.pointers" version="0" />
        <language slang="l:a9d69647-0840-491e-bf39-2eb0805d2011:com.mbeddr.core.statements" version="2" />
        <language slang="l:efda956e-491e-4f00-ba14-36af2f213ecf:com.mbeddr.core.udt" version="2" />
        <language slang="l:97d24244-51db-4e2e-97fc-7bd73b1f5f40:com.mbeddr.ext.components" version="2" />
        <language slang="l:63e0e566-5131-447e-90e3-12ea330e1a00:com.mbeddr.mpsutil.blutil" version="1" />
        <language slang="l:a482b416-d0c9-473f-8f67-725ed642b3f3:com.mbeddr.mpsutil.breadcrumb" version="0" />
        <language slang="l:d3a0fd26-445a-466c-900e-10444ddfed52:com.mbeddr.mpsutil.filepicker" version="0" />
        <language slang="l:d09a16fb-1d68-4a92-a5a4-20b4b2f86a62:com.mbeddr.mpsutil.jung" version="0" />
        <language slang="l:b4d28e19-7d2d-47e9-943e-3a41f97a0e52:com.mbeddr.mpsutil.plantuml.node" version="0" />
        <language slang="l:c1c2a88a-323c-4605-a37d-9ab77a2ccbd2:com.mbeddr.mpsutil.suppresswarning" version="0" />
        <language slang="l:92d2ea16-5a42-4fdf-a676-c7604efe3504:de.slisson.mps.richtext" version="0" />
        <language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="9" />
        <language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
        <language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
        <language slang="l:ceab5195-25ea-4f22-9b92-103b95ca8c0c:jetbrains.mps.lang.core" version="2" />
        <language slang="l:b401a680-8325-4110-8fd3-84331ff25bef:jetbrains.mps.lang.generator" version="3" />
        <language slang="l:446c26eb-2b7b-4bf0-9b35-f83fa582753e:jetbrains.mps.lang.modelapi" version="0" />
        <language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="17" />
        <language slang="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" version="9" />
        <language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
        <language slang="l:7a5dda62-9140-4668-ab76-d5ed1746f2b2:jetbrains.mps.lang.typesystem" version="5" />
        <language slang="l:8cb5ab9f-a2c3-418b-a67c-c5690ef7361b:mbeddr.tutorial.layers" version="0" />
      </languageVersions>
      <dependencyVersions>
        <module reference="3f233e7f-b8a6-46d2-a57f-795d56775243(Annotations)" version="0" />
        <module reference="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" version="0" />
        <module reference="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" version="0" />
        <module reference="1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)" version="0" />
        <module reference="498d89d2-c2e9-11e2-ad49-6cf049e62fe5(MPS.IDEA)" version="0" />
        <module reference="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" version="0" />
        <module reference="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)" version="0" />
        <module reference="d4280a54-f6df-4383-aa41-d1b2bffa7eb1(com.mbeddr.core.base)" version="3" />
        <module reference="223dd778-c44f-4ef3-9535-7aa7d12244a6(com.mbeddr.core.debug)" version="0" />
        <module reference="61c69711-ed61-4850-81d9-7714ff227fb0(com.mbeddr.core.expressions)" version="0" />
        <module reference="984f0332-8a86-4f5c-9184-03eae96b5d16(com.mbeddr.core.expressions.runtime)" version="0" />
        <module reference="6d11763d-483d-4b2b-8efc-09336c1b0001(com.mbeddr.core.modules)" version="0" />
        <module reference="3bf5377a-e904-4ded-9754-5a516023bfaa(com.mbeddr.core.pointers)" version="0" />
        <module reference="a9d69647-0840-491e-bf39-2eb0805d2011(com.mbeddr.core.statements)" version="0" />
        <module reference="efda956e-491e-4f00-ba14-36af2f213ecf(com.mbeddr.core.udt)" version="1" />
        <module reference="97d24244-51db-4e2e-97fc-7bd73b1f5f40(com.mbeddr.ext.components)" version="0" />
        <module reference="63e0e566-5131-447e-90e3-12ea330e1a00(com.mbeddr.mpsutil.blutil)" version="0" />
        <module reference="a482b416-d0c9-473f-8f67-725ed642b3f3(com.mbeddr.mpsutil.breadcrumb)" version="0" />
        <module reference="d3a0fd26-445a-466c-900e-10444ddfed52(com.mbeddr.mpsutil.filepicker)" version="0" />
        <module reference="d09a16fb-1d68-4a92-a5a4-20b4b2f86a62(com.mbeddr.mpsutil.jung)" version="0" />
        <module reference="b4d28e19-7d2d-47e9-943e-3a41f97a0e52(com.mbeddr.mpsutil.plantuml.node)" version="0" />
        <module reference="c1c2a88a-323c-4605-a37d-9ab77a2ccbd2(com.mbeddr.mpsutil.suppresswarning)" version="0" />
        <module reference="848ef45d-e560-4e35-853c-f35a64cc135c(de.itemis.mps.editor.celllayout.runtime)" version="0" />
        <module reference="24c96a96-b7a1-4f30-82da-0f8e279a2661(de.itemis.mps.editor.celllayout.styles)" version="0" />
        <module reference="cce85e64-7b37-4ad5-b0e6-9d18324cdfb3(de.itemis.mps.selection.runtime)" version="0" />
        <module reference="dc038ceb-b7ea-4fea-ac12-55f7400e97ba(de.slisson.mps.editor.multiline.runtime)" version="0" />
        <module reference="f0fff802-6d26-4d2e-b89d-391357265626(de.slisson.mps.hacks.editor)" version="0" />
        <module reference="92d2ea16-5a42-4fdf-a676-c7604efe3504(de.slisson.mps.richtext)" version="0" />
        <module reference="f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)" version="0" />
        <module reference="fd392034-7849-419d-9071-12563d152375(jetbrains.mps.baseLanguage.closures)" version="0" />
        <module reference="83888646-71ce-4f1c-9c53-c54016f6ad4f(jetbrains.mps.baseLanguage.collections)" version="0" />
        <module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
        <module reference="fdaaf35f-8ee3-4c37-b09d-9efaeaaa7a41(jetbrains.mps.core.tool.environment)" version="0" />
        <module reference="23865718-e2ed-41b5-a132-0da1d04e266d(jetbrains.mps.ide.httpsupport.manager)" version="0" />
        <module reference="ae6d8005-36be-4cb6-945b-8c8cfc033c51(jetbrains.mps.ide.httpsupport.runtime)" version="0" />
        <module reference="8d29d73f-ed99-4652-ae0a-083cdfe53c34(jetbrains.mps.ide.platform)" version="0" />
        <module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
        <module reference="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" version="0" />
        <module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
        <module reference="9e98f4e2-decf-4e97-bf80-9109e8b759aa(jetbrains.mps.lang.feedback.context)" version="0" />
        <module reference="446c26eb-2b7b-4bf0-9b35-f83fa582753e(jetbrains.mps.lang.modelapi)" version="0" />
        <module reference="d7eb0a2a-bd50-4576-beae-e4a89db35f20(jetbrains.mps.lang.scopes.runtime)" version="0" />
        <module reference="7866978e-a0f0-4cc7-81bc-4d213d9375e1(jetbrains.mps.lang.smodel)" version="1" />
        <module reference="c72da2b9-7cce-4447-8389-f407dc1158b7(jetbrains.mps.lang.structure)" version="0" />
        <module reference="9ded098b-ad6a-4657-bfd9-48636cfe8bc3(jetbrains.mps.lang.traceable)" version="0" />
        <module reference="7a5dda62-9140-4668-ab76-d5ed1746f2b2(jetbrains.mps.lang.typesystem)" version="0" />
        <module reference="5187f5c9-b8a8-4309-90b3-14f9919bd2d8(jetbrains.mps.refactoring)" version="0" />
        <module reference="8fe4c62a-2020-4ff4-8eda-f322a55bdc9f(jetbrains.mps.refactoring.runtime)" version="0" />
        <module reference="8cb5ab9f-a2c3-418b-a67c-c5690ef7361b(mbeddr.tutorial.layers)" version="0" />
        <module reference="4e7ff455-32e2-4980-9f07-d7007f01d4e5(mbeddr.tutorial.layers#6255755692623247936)" version="0" />
      </dependencyVersions>
      <mapping-priorities />
    </generator>
  </generators>
  <sourcePath />
  <languageVersions>
    <language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="9" />
    <language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
    <language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
    <language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
    <language slang="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" version="2" />
    <language slang="l:c7d5b9dd-a05f-4be2-bc73-f2e16994cc67:jetbrains.mps.baseLanguage.lightweightdsl" version="1" />
    <language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
    <language slang="l:a247e09e-2435-45ba-b8d2-07e93feba96a:jetbrains.mps.baseLanguage.tuples" version="0" />
    <language slang="l:aee9cad2-acd4-4608-aef2-0004f6a1cdbd:jetbrains.mps.lang.actions" version="4" />
    <language slang="l:af65afd8-f0dd-4942-87d9-63a55f2a9db1:jetbrains.mps.lang.behavior" version="2" />
    <language slang="l:fe9d76d7-5809-45c9-ae28-a40915b4d6ff:jetbrains.mps.lang.checkedName" version="1" />
    <language slang="l:3f4bc5f5-c6c1-4a28-8b10-c83066ffa4a1:jetbrains.mps.lang.constraints" version="6" />
    <language slang="l:e51810c5-7308-4642-bcb6-469e61b5dd18:jetbrains.mps.lang.constraints.msg.specification" version="0" />
    <language slang="l:47257bf3-78d3-470b-89d9-8c3261a61d15:jetbrains.mps.lang.constraints.rules" version="0" />
    <language slang="l:5dae8159-ab99-46bb-a40d-0cee30ee7018:jetbrains.mps.lang.constraints.rules.kinds" version="0" />
    <language slang="l:134c38d4-e3af-4d9e-b069-1c7df0a4005d:jetbrains.mps.lang.constraints.rules.skeleton" version="0" />
    <language slang="l:3ad5badc-1d9c-461c-b7b1-fa2fcd0a0ae7:jetbrains.mps.lang.context" version="0" />
    <language slang="l:ea3159bf-f48e-4720-bde2-86dba75f0d34:jetbrains.mps.lang.context.defs" version="0" />
    <language slang="l:ceab5195-25ea-4f22-9b92-103b95ca8c0c:jetbrains.mps.lang.core" version="2" />
    <language slang="l:f4ad079d-bc71-4ffb-9600-9328705cf998:jetbrains.mps.lang.descriptor" version="0" />
    <language slang="l:18bc6592-03a6-4e29-a83a-7ff23bde13ba:jetbrains.mps.lang.editor" version="13" />
    <language slang="l:d7a92d38-f7db-40d0-8431-763b0c3c9f20:jetbrains.mps.lang.intentions" version="1" />
    <language slang="l:ad93155d-79b2-4759-b10c-55123e763903:jetbrains.mps.lang.messages" version="0" />
    <language slang="l:446c26eb-2b7b-4bf0-9b35-f83fa582753e:jetbrains.mps.lang.modelapi" version="0" />
    <language slang="l:d4615e3b-d671-4ba9-af01-2b78369b0ba7:jetbrains.mps.lang.pattern" version="2" />
    <language slang="l:3a13115c-633c-4c5c-bbcc-75c4219e9555:jetbrains.mps.lang.quotation" version="4" />
    <language slang="l:982eb8df-2c96-4bd7-9963-11712ea622e5:jetbrains.mps.lang.resources" version="2" />
    <language slang="l:b3551702-269c-4f05-ba61-58060cef4292:jetbrains.mps.lang.rulesAndMessages" version="0" />
    <language slang="l:d8f591ec-4d86-4af2-9f92-a9e93c803ffa:jetbrains.mps.lang.scopes" version="0" />
    <language slang="l:13744753-c81f-424a-9c1b-cf8943bf4e86:jetbrains.mps.lang.sharedConcepts" version="0" />
    <language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="17" />
    <language slang="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" version="9" />
    <language slang="l:c7fb639f-be78-4307-89b0-b5959c3fa8c8:jetbrains.mps.lang.text" version="0" />
    <language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
    <language slang="l:7a5dda62-9140-4668-ab76-d5ed1746f2b2:jetbrains.mps.lang.typesystem" version="5" />
  </languageVersions>
  <dependencyVersions>
    <module reference="3f233e7f-b8a6-46d2-a57f-795d56775243(Annotations)" version="0" />
    <module reference="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" version="0" />
    <module reference="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" version="0" />
    <module reference="1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)" version="0" />
    <module reference="498d89d2-c2e9-11e2-ad49-6cf049e62fe5(MPS.IDEA)" version="0" />
    <module reference="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" version="0" />
    <module reference="742f6602-5a2f-4313-aa6e-ae1cd4ffdc61(MPS.Platform)" version="0" />
    <module reference="d4280a54-f6df-4383-aa41-d1b2bffa7eb1(com.mbeddr.core.base)" version="3" />
    <module reference="223dd778-c44f-4ef3-9535-7aa7d12244a6(com.mbeddr.core.debug)" version="0" />
    <module reference="61c69711-ed61-4850-81d9-7714ff227fb0(com.mbeddr.core.expressions)" version="0" />
    <module reference="984f0332-8a86-4f5c-9184-03eae96b5d16(com.mbeddr.core.expressions.runtime)" version="0" />
    <module reference="6d11763d-483d-4b2b-8efc-09336c1b0001(com.mbeddr.core.modules)" version="0" />
    <module reference="3bf5377a-e904-4ded-9754-5a516023bfaa(com.mbeddr.core.pointers)" version="0" />
    <module reference="a9d69647-0840-491e-bf39-2eb0805d2011(com.mbeddr.core.statements)" version="0" />
    <module reference="efda956e-491e-4f00-ba14-36af2f213ecf(com.mbeddr.core.udt)" version="1" />
    <module reference="97d24244-51db-4e2e-97fc-7bd73b1f5f40(com.mbeddr.ext.components)" version="0" />
    <module reference="63e0e566-5131-447e-90e3-12ea330e1a00(com.mbeddr.mpsutil.blutil)" version="0" />
    <module reference="a482b416-d0c9-473f-8f67-725ed642b3f3(com.mbeddr.mpsutil.breadcrumb)" version="0" />
    <module reference="d3a0fd26-445a-466c-900e-10444ddfed52(com.mbeddr.mpsutil.filepicker)" version="0" />
    <module reference="d09a16fb-1d68-4a92-a5a4-20b4b2f86a62(com.mbeddr.mpsutil.jung)" version="0" />
    <module reference="b4d28e19-7d2d-47e9-943e-3a41f97a0e52(com.mbeddr.mpsutil.plantuml.node)" version="0" />
    <module reference="c1c2a88a-323c-4605-a37d-9ab77a2ccbd2(com.mbeddr.mpsutil.suppresswarning)" version="0" />
    <module reference="848ef45d-e560-4e35-853c-f35a64cc135c(de.itemis.mps.editor.celllayout.runtime)" version="0" />
    <module reference="24c96a96-b7a1-4f30-82da-0f8e279a2661(de.itemis.mps.editor.celllayout.styles)" version="0" />
    <module reference="cce85e64-7b37-4ad5-b0e6-9d18324cdfb3(de.itemis.mps.selection.runtime)" version="0" />
    <module reference="dc038ceb-b7ea-4fea-ac12-55f7400e97ba(de.slisson.mps.editor.multiline.runtime)" version="0" />
    <module reference="f0fff802-6d26-4d2e-b89d-391357265626(de.slisson.mps.hacks.editor)" version="0" />
    <module reference="92d2ea16-5a42-4fdf-a676-c7604efe3504(de.slisson.mps.richtext)" version="0" />
    <module reference="f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)" version="0" />
    <module reference="fd392034-7849-419d-9071-12563d152375(jetbrains.mps.baseLanguage.closures)" version="0" />
    <module reference="83888646-71ce-4f1c-9c53-c54016f6ad4f(jetbrains.mps.baseLanguage.collections)" version="0" />
    <module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
    <module reference="fdaaf35f-8ee3-4c37-b09d-9efaeaaa7a41(jetbrains.mps.core.tool.environment)" version="0" />
    <module reference="23865718-e2ed-41b5-a132-0da1d04e266d(jetbrains.mps.ide.httpsupport.manager)" version="0" />
    <module reference="ae6d8005-36be-4cb6-945b-8c8cfc033c51(jetbrains.mps.ide.httpsupport.runtime)" version="0" />
    <module reference="8d29d73f-ed99-4652-ae0a-083cdfe53c34(jetbrains.mps.ide.platform)" version="0" />
    <module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
    <module reference="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" version="0" />
    <module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
    <module reference="a9e4c532-c5f5-4bb7-99ef-42abb73bbb70(jetbrains.mps.lang.descriptor.aspects)" version="0" />
    <module reference="9e98f4e2-decf-4e97-bf80-9109e8b759aa(jetbrains.mps.lang.feedback.context)" version="0" />
    <module reference="446c26eb-2b7b-4bf0-9b35-f83fa582753e(jetbrains.mps.lang.modelapi)" version="0" />
    <module reference="d7eb0a2a-bd50-4576-beae-e4a89db35f20(jetbrains.mps.lang.scopes.runtime)" version="0" />
    <module reference="7866978e-a0f0-4cc7-81bc-4d213d9375e1(jetbrains.mps.lang.smodel)" version="1" />
    <module reference="c72da2b9-7cce-4447-8389-f407dc1158b7(jetbrains.mps.lang.structure)" version="0" />
    <module reference="9ded098b-ad6a-4657-bfd9-48636cfe8bc3(jetbrains.mps.lang.traceable)" version="0" />
    <module reference="7a5dda62-9140-4668-ab76-d5ed1746f2b2(jetbrains.mps.lang.typesystem)" version="0" />
    <module reference="5187f5c9-b8a8-4309-90b3-14f9919bd2d8(jetbrains.mps.refactoring)" version="0" />
    <module reference="8fe4c62a-2020-4ff4-8eda-f322a55bdc9f(jetbrains.mps.refactoring.runtime)" version="0" />
    <module reference="8cb5ab9f-a2c3-418b-a67c-c5690ef7361b(mbeddr.tutorial.layers)" version="0" />
  </dependencyVersions>
  <extendedLanguages>
    <extendedLanguage>6d11763d-483d-4b2b-8efc-09336c1b0001(com.mbeddr.core.modules)</extendedLanguage>
    <extendedLanguage>97d24244-51db-4e2e-97fc-7bd73b1f5f40(com.mbeddr.ext.components)</extendedLanguage>
  </extendedLanguages>
</language>

{'repo_name': 'mbeddr/mbeddr.core', 'stars': '171', 'repo_language': 'Java', 'file_name': 'vecmath_license.txt', 'mime_type': 'text/plain', 'hash': 988416441206318329, 'source_dataset': 'data'}


using System;
using System.Linq;
using Comet.iOS.Handlers;

namespace Comet.iOS
{
	public class TabViewHandler : AbstractHandler<TabView, CUITabView>
	{
		public override bool IgnoreSafeArea => VirtualView?.GetIgnoreSafeArea(true) ?? true;
		public override void SetView(View view)
		{
			base.SetView(view);
			TypedNativeView?.Setup(VirtualView?.ToList());
			SubscribeEvent();

		}
		void SubscribeEvent()
		{
			if (VirtualView == null)
				return;
			VirtualView.ChildrenChanged += VirtualView_ChildrenChanged;
			VirtualView.ChildrenAdded += VirtualView_ChildrenChanged;
			VirtualView.ChildrenRemoved += VirtualView_ChildrenChanged;
		}

		private void VirtualView_ChildrenChanged(object sender, LayoutEventArgs e)
		{
			TypedNativeView?.Setup(VirtualView?.ToList());
		}

		void UnsubscribeEvents()
		{
			if (VirtualView == null)
				return;
			VirtualView.ChildrenChanged -= VirtualView_ChildrenChanged;
			VirtualView.ChildrenAdded -= VirtualView_ChildrenChanged;
			VirtualView.ChildrenRemoved -= VirtualView_ChildrenChanged;
		}

		public override void Remove(View view)
		{
			UnsubscribeEvents();
			base.Remove(view);
		}
		protected override CUITabView CreateView()
			=> NativeView as CUITabView ?? new CUITabView();
	}
}

{'repo_name': 'Clancey/Comet', 'stars': '417', 'repo_language': 'C#', 'file_name': 'SkiaSample1.cs', 'mime_type': 'text/plain', 'hash': 317732260967302005, 'source_dataset': 'data'}


/*
 *  This file is part of the optimized implementation of the Picnic signature scheme.
 *  See the accompanying documentation for complete details.
 *
 *  The code is provided under the MIT license, see LICENSE for
 *  more details.
 *  SPDX-License-Identifier: MIT
 */

#include "lowmc_fns_undef.h"

#define ADDMUL mzd_addmul_v_s128_256
#define MUL mzd_mul_v_s128_256
#define XOR mzd_xor_s128_256
#define COPY mzd_copy_s128_256
#define MPC_MUL mpc_matrix_mul_s128_256

#if defined(WITH_LOWMC_255_255_4)
#define LOWMC_INSTANCE lowmc_255_255_4
#define LOWMC_N LOWMC_255_255_4_N
#define LOWMC_R LOWMC_255_255_4_R
#define LOWMC_M LOWMC_255_255_4_M
#endif

{'repo_name': 'open-quantum-safe/liboqs', 'stars': '657', 'repo_language': 'C', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -3134236934226601812, 'source_dataset': 'data'}


CONTRIBUTORS
------------

Many thanks to all the people who have volunteered their time to help keep
PyTube.org going!

(Alphabetical Order)

- Andy Dirnberger
- Dean Silfen
- Jon Banafato
- Paul Logtson
- Sarah Guido

{'repo_name': 'pyvideo/pyvideo', 'stars': '210', 'repo_language': 'Python', 'file_name': 'drop_no_publish.py', 'mime_type': 'text/x-python', 'hash': -4021890204949408569, 'source_dataset': 'data'}


//
//     Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//

#import <objc/NSObject.h>

__attribute__((visibility("hidden")))
@interface Stopwatch : NSObject
{
    double startTime;
    double finishTime;
}

- (double)runTime;
- (void)finish;
- (void)start;

@end

{'repo_name': 'LeoNatan/Apple-Runtime-Headers', 'stars': '131', 'repo_language': 'None', 'file_name': 'CDStructures.h', 'mime_type': 'text/x-c', 'hash': -2379178024916921702, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8" ?>
<ldml>
	<identity>
		<version number="$Revision: 1.10 $"/>
		<generation date="$Date: 2009/05/05 23:06:40 $"/>
		<language type="sr"/>
		<territory type="RS"/>
	</identity>
	<alias source="sr_Cyrl_RS" path="//ldml"/>
</ldml>

{'repo_name': 'mnapoli/phpBeanstalkdAdmin', 'stars': '136', 'repo_language': 'PHP', 'file_name': 'messagebox.js', 'mime_type': 'text/plain', 'hash': 7848150413545026134, 'source_dataset': 'data'}


# Copyright 2016 Google Inc.
#
# 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.

from __future__ import print_function
from future import standard_library
standard_library.install_aliases()

import argparse
import contextlib
import inspect
import logging
import os
import sys

from mobly import base_test
from mobly import config_parser
from mobly import logger
from mobly import records
from mobly import signals
from mobly import utils

class Error(Exception):
    pass

def main(argv=None):
    """Execute the test class in a test module.

    This is the default entry point for running a test script file directly.
    In this case, only one test class in a test script is allowed.

    To make your test script executable, add the following to your file:

    .. code-block:: python

        from mobly import test_runner
        ...
        if __name__ == '__main__':
            test_runner.main()

    If you want to implement your own cli entry point, you could use function
    execute_one_test_class(test_class, test_config, test_identifier)

    Args:
        argv: A list that is then parsed as cli args. If None, defaults to cli
            input.
    """
    args = parse_mobly_cli_args(argv)
    # Find the test class in the test script.
    test_class = _find_test_class()
    if args.list_tests:
        _print_test_names(test_class)
        sys.exit(0)
    # Load test config file.
    test_configs = config_parser.load_test_config_file(args.config,
                                                       args.test_bed)
    # Parse test specifiers if exist.
    tests = None
    if args.tests:
        tests = args.tests
    # Execute the test class with configs.
    ok = True
    for config in test_configs:
        runner = TestRunner(log_dir=config.log_path,
                            testbed_name=config.testbed_name)
        with runner.mobly_logger():
            runner.add_test_class(config, test_class, tests)
            try:
                runner.run()
                ok = runner.results.is_all_pass and ok
            except signals.TestAbortAll:
                pass
            except:
                logging.exception('Exception when executing %s.',
                                  config.testbed_name)
                ok = False
    if not ok:
        sys.exit(1)

def parse_mobly_cli_args(argv):
    """Parses cli args that are consumed by Mobly.

    This is the arg parsing logic for the default test_runner.main entry point.

    Multiple arg parsers can be applied to the same set of cli input. So you
    can use this logic in addition to any other args you want to parse. This
    function ignores the args that don't apply to default `test_runner.main`.

    Args:
        argv: A list that is then parsed as cli args. If None, defaults to cli
            input.

    Returns:
        Namespace containing the parsed args.
    """
    parser = argparse.ArgumentParser(description='Mobly Test Executable.')
    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument('-c',
                       '--config',
                       type=str,
                       metavar='<PATH>',
                       help='Path to the test configuration file.')
    group.add_argument(
        '-l',
        '--list_tests',
        action='store_true',
        help='Print the names of the tests defined in a script without '
        'executing them.')
    parser.add_argument('--tests',
                        '--test_case',
                        nargs='+',
                        type=str,
                        metavar='[test_a test_b...]',
                        help='A list of tests in the test class to execute.')
    parser.add_argument('-tb',
                        '--test_bed',
                        nargs='+',
                        type=str,
                        metavar='[<TEST BED NAME1> <TEST BED NAME2> ...]',
                        help='Specify which test beds to run tests on.')
    if not argv:
        argv = sys.argv[1:]
    return parser.parse_known_args(argv)[0]

def _find_test_class():
    """Finds the test class in a test script.

    Walk through module members and find the subclass of BaseTestClass. Only
    one subclass is allowed in a test script.

    Returns:
        The test class in the test module.

    Raises:
      SystemExit: Raised if the number of test classes is not exactly one.
    """
    try:
        return utils.find_subclass_in_module(base_test.BaseTestClass,
                                             sys.modules['__main__'])
    except ValueError:
        logging.exception('Exactly one subclass of `base_test.BaseTestClass`'
                          ' should be in the main file.')
        sys.exit(1)

def _print_test_names(test_class):
    """Prints the names of all the tests in a test module.

    If the module has generated tests defined based on controller info, this
    may not be able to print the generated tests.

    Args:
        test_class: module, the test module to print names from.
    """
    cls = test_class(config_parser.TestRunConfig())
    try:
        cls.setup_generated_tests()
    except:
        logging.exception('Failed to retrieve generated tests.')
    print('==========> %s <==========' % cls.TAG)
    for name in cls.get_existing_test_names():
        print(name)

class TestRunner(object):
    """The class that instantiates test classes, executes tests, and
    report results.

    One TestRunner instance is associated with one specific output folder and
    testbed. TestRunner.run() will generate a single set of output files and
    results for all tests that have been added to this runner.

    Attributes:
        self.results: The test result object used to record the results of
            this test run.
    """

    class _TestRunInfo(object):
        """Identifies one test class to run, which tests to run, and config to
        run it with.
        """

        def __init__(self,
                     config,
                     test_class,
                     tests=None,
                     test_class_name_suffix=None):
            self.config = config
            self.test_class = test_class
            self.test_class_name_suffix = test_class_name_suffix
            self.tests = tests

    def __init__(self, log_dir, testbed_name):
        """Constructor for TestRunner.

        Args:
            log_dir: string, root folder where to write logs
            testbed_name: string, name of the testbed to run tests on
        """
        self._log_dir = log_dir
        self._testbed_name = testbed_name

        self.results = records.TestResult()
        self._test_run_infos = []

        # Set default logging values. Necessary if `run` is used outside of the
        # `mobly_logger` context.
        self._update_log_path()

    def _update_log_path(self):
        """Updates the logging values with the current timestamp."""
        self._start_time = logger.get_log_file_timestamp()
        self._root_output_path = os.path.join(self._log_dir,
                                              self._testbed_name,
                                              self._start_time)

    @contextlib.contextmanager
    def mobly_logger(self, alias='latest'):
        """Starts and stops a logging context for a Mobly test run.

        Args:
          alias: optional string, the name of the latest log alias directory to
              create. If a falsy value is specified, then the directory will not
              be created.

        Yields:
            The host file path where the logs for the test run are stored.
        """
        self._update_log_path()
        logger.setup_test_logger(self._root_output_path,
                                 self._testbed_name,
                                 alias=alias)
        try:
            yield self._root_output_path
        finally:
            logger.kill_test_logger(logging.getLogger())

    def add_test_class(self, config, test_class, tests=None, name_suffix=None):
        """Adds tests to the execution plan of this TestRunner.

        Args:
            config: config_parser.TestRunConfig, configuration to execute this
                test class with.
            test_class: class, test class to execute.
            tests: list of strings, optional list of test names within the
                class to execute.
            name_suffix: string, suffix to append to the class name for
                reporting. This is used for differentiating the same class
                executed with different parameters in a suite.

        Raises:
            Error: if the provided config has a log_path or testbed_name which
                differs from the arguments provided to this TestRunner's
                constructor.
        """
        if self._log_dir != config.log_path:
            raise Error(
                'TestRunner\'s log folder is "%s", but a test config with a '
                'different log folder ("%s") was added.' %
                (self._log_dir, config.log_path))
        if self._testbed_name != config.testbed_name:
            raise Error(
                'TestRunner\'s test bed is "%s", but a test config with a '
                'different test bed ("%s") was added.' %
                (self._testbed_name, config.testbed_name))
        self._test_run_infos.append(
            TestRunner._TestRunInfo(config=config,
                                    test_class=test_class,
                                    tests=tests,
                                    test_class_name_suffix=name_suffix))

    def _run_test_class(self, config, test_class, tests=None):
        """Instantiates and executes a test class.

        If tests is None, the tests listed in self.tests will be executed
        instead. If self.tests is empty as well, every test in this test class
        will be executed.

        Args:
            config: A config_parser.TestRunConfig object.
            test_class: class, test class to execute.
            tests: Optional list of test names within the class to execute.
        """
        test_instance = test_class(config)
        logging.debug('Executing test class "%s" with config: %s',
                      test_class.__name__, config)
        try:
            cls_result = test_instance.run(tests)
            self.results += cls_result
        except signals.TestAbortAll as e:
            self.results += e.results
            raise e

    def run(self):
        """Executes tests.

        This will instantiate controller and test classes, execute tests, and
        print a summary.

        Raises:
            Error: if no tests have previously been added to this runner using
                add_test_class(...).
        """
        if not self._test_run_infos:
            raise Error('No tests to execute.')

        # Ensure the log path exists. Necessary if `run` is used outside of the
        # `mobly_logger` context.
        utils.create_dir(self._root_output_path)

        summary_writer = records.TestSummaryWriter(
            os.path.join(self._root_output_path, records.OUTPUT_FILE_SUMMARY))
        try:
            for test_run_info in self._test_run_infos:
                # Set up the test-specific config
                test_config = test_run_info.config.copy()
                test_config.log_path = self._root_output_path
                test_config.summary_writer = summary_writer
                test_config.test_class_name_suffix = test_run_info.test_class_name_suffix
                try:
                    self._run_test_class(config=test_config,
                                         test_class=test_run_info.test_class,
                                         tests=test_run_info.tests)
                except signals.TestAbortAll as e:
                    logging.warning(
                        'Abort all subsequent test classes. Reason: %s', e)
                    raise
        finally:
            summary_writer.dump(self.results.summary_dict(),
                                records.TestSummaryEntryType.SUMMARY)
            # Stop and show summary.
            msg = '\nSummary for test run %s@%s: %s\n' % (
                self._testbed_name, self._start_time,
                self.results.summary_str())
            logging.info(msg.strip())

{'repo_name': 'google/mobly', 'stars': '376', 'repo_language': 'Python', 'file_name': 'logcat_test.py', 'mime_type': 'text/x-python', 'hash': 125571052667338086, 'source_dataset': 'data'}


# Node题目汇总

- [React SSR实现过程？原理是什么？有什么注意事项？](#react-ssr实现过程原理是什么有什么注意事项)
- [Node性能如何进监控以及优化？](#node性能如何进监控以及优化)
- [说一下事件循环机制(node、浏览器)](#说一下事件循环机制node浏览器)
- [如何封装 node 中间件](#如何封装-node-中间件)
- [node 中间层怎样做的请求合并转发](#node-中间层怎样做的请求合并转发)
- [是否熟悉 Node，主要做过哪些业务，平时用过什么包？](#是否熟悉-node主要做过哪些业务平时用过什么包)
- [手动实现一个 Promisify 函数](#手动实现一个-promisify-函数)
- [介绍一下 node 核心模块（主要是 stream）](#介绍一下-node-核心模块主要是-stream)
- [node 如何做错误监控（运行时与其他）如何生成日志，日志等级](#node-如何做错误监控运行时与其他如何生成日志日志等级)
- [Node 的适用场景以及优缺点是什么？](#node-的适用场景以及优缺点是什么)
- [koa2 和 express 区别](#koa2-和-express-区别)
- [上传文件的 Content_Type 什么，node 如何拿到上传的文件内容(不适用第三方插件)？文件内容是一次行传输过去的么](#上传文件的-content_type-什么node-如何拿到上传的文件内容不适用第三方插件文件内容是一次行传输过去的么)
- [介绍下 pm2，pm2 依据什么重启服务](#介绍下-pm2pm2-依据什么重启服务)
- [什么是微服务，微服务跟单体应用的区别是啥，用微服务有啥好处？](#什么是微服务微服务跟单体应用的区别是啥用微服务有啥好处)
- [使用过的 koa2 中间件，中间价的原理是什么](#使用过的-koa2-中间件中间价的原理是什么)
- [koa-body 原理](#koa-body-原理)
- [有没有写过中间件，介绍下自己写过的中间件](#有没有写过中间件介绍下自己写过的中间件)
- [有没有涉及到 Cluster，说一下你的理解](#有没有涉及到-cluster说一下你的理解)
- [master 挂了的话 pm2 怎么处理](#master-挂了的话-pm2-怎么处理)
- [Node 如何和 MySQL 进行通信](#node-如何和-mysql-进行通信)
- [服务端渲染 SSR](#服务端渲染-ssr)
- [koa 中 response.send、response.rounded、response.json 发生了什么事，浏览器为什么能识别到它是一个 json 结构或是 html](#koa-中-responsesendresponseroundedresponsejson-发生了什么事浏览器为什么能识别到它是一个-json-结构或是-html)
- [koa-bodyparser 如何解析 request](#koa-bodyparser-如何解析-request)
- [pm2 怎么做进程管理，进程挂掉怎么处理](#pm2-怎么做进程管理进程挂掉怎么处理)
- [不用 pm2 怎么做进程管理](#不用-pm2-怎么做进程管理)
- [jsonp 方案需要服务端怎么配合](#jsonp-方案需要服务端怎么配合)
- [node 接口转发有无做什么优化？node 起服务如何保证稳定性，平缓降级，重启等](#node-接口转发有无做什么优化node-起服务如何保证稳定性平缓降级重启等)
- [介绍 node 文件查找优先级](#介绍-node-文件查找优先级)
- [npm2 和 npm3 有什么区别](#npm2-和-npm3有什么区别)
- [Node 不支持哪些 ES6 语法](#node-不支持哪些-es6-语法)
- [node 如何进行跨域通信](#node-如何进行跨域通信)
- [介绍 koa2，原理是什么？](#介绍-koa2原理是什么)
- [如何对相对路径引用进行优化](#如何对相对路径引用进行优化)

### React SSR实现过程？原理是什么？有什么注意事项？

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/870)

### Node性能如何进监控以及优化？

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/869)

### 说一下事件循环机制(node、浏览器)

公司：滴滴、伴鱼、高德、自如、虎扑、58

分类：Node、JavaScript

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/26)

### 如何封装 node 中间件

公司：滴滴、酷狗

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/27)

### node 中间层怎样做的请求合并转发

公司：易车

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/28)

### 是否熟悉 Node，主要做过哪些业务，平时用过什么包？

公司：快手

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/209)

### 手动实现一个 Promisify 函数

公司：高德

分类：Node、编程题

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/306)

### 介绍一下 node 核心模块（主要是 stream）

公司：自如、菜鸟网络

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/266)

### node 如何做错误监控（运行时与其他）如何生成日志，日志等级

公司：自如

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/261)

### Node 的适用场景以及优缺点是什么？

公司：道一云

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/260)

### koa2 和 express 区别

公司：菜鸟网络、海风教育

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/393)

### 上传文件的 Content_Type 什么，node 如何拿到上传的文件内容(不适用第三方插件)？文件内容是一次行传输过去的么

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/591)

### 介绍下 pm2，pm2 依据什么重启服务

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/565)

### 什么是微服务，微服务跟单体应用的区别是啥，用微服务有啥好处？

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/564)

### 使用过的 koa2 中间件，中间价的原理是什么

公司：阿里、宝宝树

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/559)

### koa-body 原理

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/558)

### 有没有写过中间件，介绍下自己写过的中间件

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/557)

### 有没有涉及到 Cluster，说一下你的理解

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/556)

### master 挂了的话 pm2 怎么处理

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/555)

### Node 如何和 MySQL 进行通信

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/554)

### 服务端渲染 SSR

公司：阿里

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/552)

### koa 中 response.send、response.rounded、response.json 发生了什么事，浏览器为什么能识别到它是一个 json 结构或是 html

公司：滴滴

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/505)

### koa-bodyparser 如何解析 request

公司：滴滴

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/504)

### pm2 怎么做进程管理，进程挂掉怎么处理

公司：挖财

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/465)

### 不用 pm2 怎么做进程管理

公司：挖财

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/464)

### jsonp 方案需要服务端怎么配合

公司：沪江

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/463)

### node 接口转发有无做什么优化？node 起服务如何保证稳定性，平缓降级，重启等

公司：微医

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/597)

### 介绍 node 文件查找优先级

公司：宝宝树

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/772)

### npm2 和 npm3+有什么区别

公司：宝宝树

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/771)

### Node 不支持哪些 ES6 语法

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/702)

### node 如何进行跨域通信

公司：高思教育

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/828)

### 介绍 koa2，原理是什么？

公司：兑吧、海风教育

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/419)

### 如何对相对路径引用进行优化

公司：宝宝树

分类：Node

[答案&解析](https://github.com/lgwebdream/FE-Interview/issues/773)

{'repo_name': 'lgwebdream/FE-Interview', 'stars': '561', 'repo_language': 'JavaScript', 'file_name': 'data.js', 'mime_type': 'text/plain', 'hash': 678172069163338516, 'source_dataset': 'data'}


// CAROUSEL
// --------

.carousel {
  position: relative;
  margin-bottom: @baseLineHeight;
  line-height: 1;
}

.carousel-inner {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.carousel {

  .item {
    display: none;
    position: relative;
    .transition(.6s ease-in-out left);
  }

  // Account for jankitude on images
  .item > img {
    display: block;
    line-height: 1;
  }

  .active,
  .next,
  .prev { display: block; }

  .active {
    left: 0;
  }

  .next,
  .prev {
    position: absolute;
    top: 0;
    width: 100%;
  }

  .next {
    left: 100%;
  }
  .prev {
    left: -100%;
  }
  .next.left,
  .prev.right {
    left: 0;
  }

  .active.left {
    left: -100%;
  }
  .active.right {
    left: 100%;
  }

}

// Left/right controls for nav
// ---------------------------

.carousel-control {
  position: absolute;
  top: 40%;
  left: 15px;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  font-size: 60px;
  font-weight: 100;
  line-height: 30px;
  color: @white;
  text-align: center;
  background: @grayDarker;
  border: 3px solid @white;
  .border-radius(23px);
  .opacity(50);

  // we can't have this transition here
  // because webkit cancels the carousel
  // animation if you trip this while
  // in the middle of another animation
  // ;_;
  // .transition(opacity .2s linear);

  // Reposition the right one
  &.right {
    left: auto;
    right: 15px;
  }

  // Hover state
  &:hover {
    color: @white;
    text-decoration: none;
    .opacity(90);
  }
}

// Caption for text below images
// -----------------------------

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 15px 5px;
  background: @grayDark;
  background: rgba(0,0,0,.75);
}
.carousel-caption h4,
.carousel-caption p {
  color: @white;
}

{'repo_name': 'xiow/portnine-free-bootstrap-theme', 'stars': '107', 'repo_language': 'CSS', 'file_name': 'elements.css', 'mime_type': 'text/plain', 'hash': -371646254338452779, 'source_dataset': 'data'}


FROM balenalib/aarch64-fedora:31-run
LABEL io.balena.device-type="kitra710"

RUN dnf install -y \
		less \
		nano \
		net-tools \
		usbutils \
		gnupg \
		i2c-tools \
	&& dnf clean all

RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Fedora 31 \nVariant: run variant \nDefault variable(s): UDEV=off \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature  (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info

RUN echo $'#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
	&& chmod +x /bin/sh-shim \
	&& cp /bin/sh /bin/sh.real \
	&& mv /bin/sh-shim /bin/sh

{'repo_name': 'balena-io-library/base-images', 'stars': '162', 'repo_language': 'Dockerfile', 'file_name': 'Dockerfile', 'mime_type': 'text/plain', 'hash': -6737706996015235452, 'source_dataset': 'data'}


<?php

require_once dirname(__FILE__).'/Math.php';

class MM1_MathTest extends \PHPUnit\Framework\TestCase
{

    /**
     * @group PHPUnitRunnerTesting
     */
    public function testAdds()
    {
        $math = new \Phpunit_MM1_Math;
        $this->assertEquals(4, $math->add(2, 2));
    }
}

{'repo_name': 'humbug/humbug', 'stars': '1156', 'repo_language': 'PHP', 'file_name': 'ApplicationTest.php', 'mime_type': 'text/x-php', 'hash': 2650625692204424007, 'source_dataset': 'data'}


All input types of builders that perform operations on one or multiple sub-builders.

{'repo_name': 'angular/angular-cli', 'stars': '23587', 'repo_language': 'TypeScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -7389611374629672381, 'source_dataset': 'data'}


"use strict";

/*
Test summary :
We want to test that the pool handles chained transactions correctly.
We should't be able to send A => B and B => C at the same time if B is cold wallet.
B should first have received the A => B transaction (forged in a block) before being able to spend it.

Workflow :
- step 0 : we just pick from genesis wallet what we need for our test, sending it to a new wallet
- step 1 : we send A => B and B => C to node 1
- step 2 : we check if A => B have been forged and not B => C
- step 3 : we send again B => C to node 1
- step 4 : we check if A => B and B => C have been forged
*/

module.exports = {
    events: {
        newBlock: {
            5: ["0.transfer-new-wallet.action"],
            7: ["1.create-transactions.action"],
            9: ["2.check-AtoB-forged.test"],
            10: ["3.resend-BtoC.action"],
            14: ["4.check-BtoC-forged.test"],
        },
    },
};

{'repo_name': 'ArkEcosystem/core', 'stars': '267', 'repo_language': 'TypeScript', 'file_name': 'setup.ts', 'mime_type': 'text/x-java', 'hash': -7559608329340716252, 'source_dataset': 'data'}