# Flexbox Grid

Grid system built on top of [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex).
Heavily influenced by [Bootstrap](http://getbootstrap.com/css/#grid).

Perfect partner for [Topcoat](http://topcoat.io/) but it can be used with or without any framework you want.

## Example

Check out the [live demo](http://codepen.io/anon/pen/aBtyr) or take a look at the [example folder](https://github.com/zeMirco/flexbox-grid/tree/master/example).

## How to use

Flexbox grid uses classes like Bootstrap so you don't have to learn anything new.

```html
<div class="row">
  <div class="col-xs-1">
    col-xs-1
  </div>
</div>

<div class="row">
  <div class="col-xs-6">
    col-xs-6
  </div>
</div>

<div class="row">
  <div class="col-xs-2 col-xs-offset-6">
    col-xs-2 col-xs-offset-6
  </div>
</div>
```

There are also classes that fill the available space automatically.

```html
<div class="row">
  <div class="col-auto">
    col-auto
  </div>
  <div class="col-auto">
    col-auto
  </div>
  <div class="col-auto">
    col-auto
  </div>
</div>
```

## Inspiration

 - [ptb2.me/flexgrid](http://ptb2.me/flexgrid/)
 - [codepen.io/marcolago/pen/lqGFb](http://codepen.io/marcolago/pen/lqGFb)
 - [philipwalton.github.io/solved-by-flexbox/demos/grids](http://philipwalton.github.io/solved-by-flexbox/demos/grids/)
 - [davidwalsh.name/stylus-grid](http://davidwalsh.name/stylus-grid)

## Development

Make your changes in `flexbox-grid.styl` and run `grunt` to compile `flexbox-grid.css` and `flexbox-grid.min.css`

## Changelog

##### v1.0.0 - 28/10/2013

 - renamend `col-*` classes to responsive `xs`, `sm`, `md`, `lg` classes
 - made final CSS more readable by [extending placeholder selectors](http://learnboost.github.io/stylus/docs/extend.html)
 - added `.container` class as wrapper for `.row` - fixes horizontal overflow

##### v0.0.1 - 21/10/2013

 - initial release

## License

Copyright (C) 2013 [Mirco Zeiss](mailto: mirco.zeiss@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{'repo_name': 'zemirco/flexbox-grid', 'stars': '124', 'repo_language': 'CSS', 'file_name': 'style.css', 'mime_type': 'text/plain', 'hash': -2500345734112018834, 'source_dataset': 'data'}


#ifndef BLOOM_FUNCTIONS_H
#define BLOOM_FUNCTIONS_H

/////////////////////////////  GPL LICENSE NOTICE  /////////////////////////////

//  crt-royale: A full-featured CRT shader, with cheese.
//  Copyright (C) 2014 TroggleMonkey <trogglemonkey@gmx.com>
//
//  This program is free software; you can redistribute it and/or modify it
//  under the terms of the GNU General Public License as published by the Free
//  Software Foundation; either version 2 of the License, or any later version.
//
//  This program is distributed in the hope that it will be useful, but WITHOUT
//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
//  more details.
//
//  You should have received a copy of the GNU General Public License along with
//  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
//  Place, Suite 330, Boston, MA 02111-1307 USA

/////////////////////////////////  DESCRIPTION  ////////////////////////////////

//  These utility functions and constants help several passes determine the
//  size and center texel weight of the phosphor bloom in a uniform manner.

//////////////////////////////////  INCLUDES  //////////////////////////////////

//  We need to calculate the correct blur sigma using some .cgp constants:
#include "../user-settings.h"
#include "derived-settings-and-constants.h"
#include "../../../../include/blur-functions.h"

///////////////////////////////  BLOOM CONSTANTS  //////////////////////////////

//  Compute constants with manual inlines of the functions below:
static const float bloom_diff_thresh = 1.0/256.0;

///////////////////////////////////  HELPERS  //////////////////////////////////

inline float get_min_sigma_to_blur_triad(const float triad_size,
    const float thresh)
{
    //  Requires:   1.) triad_size is the final phosphor triad size in pixels
    //              2.) thresh is the max desired pixel difference in the
    //                  blurred triad (e.g. 1.0/256.0).
    //  Returns:    Return the minimum sigma that will fully blur a phosphor
    //              triad on the screen to an even color, within thresh.
    //              This closed-form function was found by curve-fitting data.
    //  Estimate: max error = ~0.086036, mean sq. error = ~0.0013387:
    return -0.05168 + 0.6113*triad_size -
        1.122*triad_size*sqrt(0.000416 + thresh);
    //  Estimate: max error = ~0.16486, mean sq. error = ~0.0041041:
    //return 0.5985*triad_size - triad_size*sqrt(thresh)
}

inline float get_absolute_scale_blur_sigma(const float thresh)
{
    //  Requires:   1.) min_expected_triads must be a global float.  The number
    //                  of horizontal phosphor triads in the final image must be
    //                  >= min_allowed_viewport_triads.x for realistic results.
    //              2.) bloom_approx_scale_x must be a global float equal to the
    //                  absolute horizontal scale of BLOOM_APPROX.
    //              3.) bloom_approx_scale_x/min_allowed_viewport_triads.x
    //                  should be <= 1.1658025090 to keep the final result <
    //                  0.62666015625 (the largest sigma ensuring the largest
    //                  unused texel weight stays < 1.0/256.0 for a 3x3 blur).
    //              4.) thresh is the max desired pixel difference in the
    //                  blurred triad (e.g. 1.0/256.0).
    //  Returns:    Return the minimum Gaussian sigma that will blur the pass
    //              output as much as it would have taken to blur away
    //              bloom_approx_scale_x horizontal phosphor triads.
    //  Description:
    //  BLOOM_APPROX should look like a downscaled phosphor blur.  Ideally, we'd
    //  use the same blur sigma as the actual phosphor bloom and scale it down
    //  to the current resolution with (bloom_approx_scale_x/viewport_size_x), but
    //  we don't know the viewport size in this pass.  Instead, we'll blur as
    //  much as it would take to blur away min_allowed_viewport_triads.x.  This
    //  will blur "more than necessary" if the user actually uses more triads,
    //  but that's not terrible either, because blurring a constant fraction of
    //  the viewport may better resemble a true optical bloom anyway (since the
    //  viewport will generally be about the same fraction of each player's
    //  field of view, regardless of screen size and resolution).
    //  Assume an extremely large viewport size for asymptotic results.
    return bloom_approx_scale_x/max_viewport_size_x *
        get_min_sigma_to_blur_triad(
            max_viewport_size_x/min_allowed_viewport_triads.x, thresh);
}

inline float get_center_weight(const float sigma)
{
    //  Given a Gaussian blur sigma, get the blur weight for the center texel.
    #ifdef RUNTIME_PHOSPHOR_BLOOM_SIGMA
        return get_fast_gaussian_weight_sum_inv(sigma);
    #else
        const float denom_inv = 0.5/(sigma*sigma);
        const float w0 = 1.0;
        const float w1 = exp(-1.0 * denom_inv);
        const float w2 = exp(-4.0 * denom_inv);
        const float w3 = exp(-9.0 * denom_inv);
        const float w4 = exp(-16.0 * denom_inv);
        const float w5 = exp(-25.0 * denom_inv);
        const float w6 = exp(-36.0 * denom_inv);
        const float w7 = exp(-49.0 * denom_inv);
        const float w8 = exp(-64.0 * denom_inv);
        const float w9 = exp(-81.0 * denom_inv);
        const float w10 = exp(-100.0 * denom_inv);
        const float w11 = exp(-121.0 * denom_inv);
        const float w12 = exp(-144.0 * denom_inv);
        const float w13 = exp(-169.0 * denom_inv);
        const float w14 = exp(-196.0 * denom_inv);
        const float w15 = exp(-225.0 * denom_inv);
        const float w16 = exp(-256.0 * denom_inv);
        const float w17 = exp(-289.0 * denom_inv);
        const float w18 = exp(-324.0 * denom_inv);
        const float w19 = exp(-361.0 * denom_inv);
        const float w20 = exp(-400.0 * denom_inv);
        const float w21 = exp(-441.0 * denom_inv);
        //  Note: If the implementation uses a smaller blur than the max allowed,
        //  the worst case scenario is that the center weight will be overestimated,
        //  so we'll put a bit more energy into the brightpass...no huge deal.
        //  Then again, if the implementation uses a larger blur than the max
        //  "allowed" because of dynamic branching, the center weight could be
        //  underestimated, which is more of a problem...consider always using
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_12_PIXELS
            //  43x blur:
            const float weight_sum_inv = 1.0 /
                (w0 + 2.0 * (w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + w9 + w10 +
                w11 + w12 + w13 + w14 + w15 + w16 + w17 + w18 + w19 + w20 + w21));
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_9_PIXELS
            //  31x blur:
            const float weight_sum_inv = 1.0 /
                (w0 + 2.0 * (w1 + w2 + w3 + w4 + w5 + w6 + w7 +
                w8 + w9 + w10 + w11 + w12 + w13 + w14 + w15));
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_6_PIXELS
            //  25x blur:
            const float weight_sum_inv = 1.0 / (w0 + 2.0 * (
                w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + w9 + w10 + w11 + w12));
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_3_PIXELS
            //  17x blur:
            const float weight_sum_inv = 1.0 / (w0 + 2.0 * (
                w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8));
        #else
            //  9x blur:
            const float weight_sum_inv = 1.0 / (w0 + 2.0 * (w1 + w2 + w3 + w4));
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_3_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_6_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_9_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_12_PIXELS
        const float center_weight = weight_sum_inv * weight_sum_inv;
        return center_weight;
    #endif
}

inline float3 tex2DblurNfast(const sampler2D texture, const float2 tex_uv,
    const float2 dxdy, const float sigma)
{
    //  If sigma is static, we can safely branch and use the smallest blur
    //  that's big enough.  Ignore #define hints, because we'll only use a
    //  large blur if we actually need it, and the branches cost nothing.
    #ifndef RUNTIME_PHOSPHOR_BLOOM_SIGMA
        #define PHOSPHOR_BLOOM_BRANCH_FOR_BLUR_SIZE
    #else
        //  It's still worth branching if the profile supports dynamic branches:
        //  It's much faster than using a hugely excessive blur, but each branch
        //  eats ~1% FPS.
        #ifdef DRIVERS_ALLOW_DYNAMIC_BRANCHES
            #define PHOSPHOR_BLOOM_BRANCH_FOR_BLUR_SIZE
        #endif
    #endif
    //  Failed optimization notes:
    //  I originally created a same-size mipmapped 5-tap separable blur10 that
    //  could handle any sigma by reaching into lower mip levels.  It was
    //  as fast as blur25fast for runtime sigmas and a tad faster than
    //  blur31fast for static sigmas, but mipmapping two viewport-size passes
    //  ate 10% of FPS across all codepaths, so it wasn't worth it.
    #ifdef PHOSPHOR_BLOOM_BRANCH_FOR_BLUR_SIZE
        if(sigma <= blur9_std_dev)
        {
            return tex2Dblur9fast(texture, tex_uv, dxdy, sigma);
        }
        else if(sigma <= blur17_std_dev)
        {
            return tex2Dblur17fast(texture, tex_uv, dxdy, sigma);
        }
        else if(sigma <= blur25_std_dev)
        {
            return tex2Dblur25fast(texture, tex_uv, dxdy, sigma);
        }
        else if(sigma <= blur31_std_dev)
        {
            return tex2Dblur31fast(texture, tex_uv, dxdy, sigma);
        }
        else
        {
            return tex2Dblur43fast(texture, tex_uv, dxdy, sigma);
        }
    #else
        //  If we can't afford to branch, we can only guess at what blur
        //  size we need.  Therefore, use the largest blur allowed.
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_12_PIXELS
            return tex2Dblur43fast(texture, tex_uv, dxdy, sigma);
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_9_PIXELS
            return tex2Dblur31fast(texture, tex_uv, dxdy, sigma);
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_6_PIXELS
            return tex2Dblur25fast(texture, tex_uv, dxdy, sigma);
        #else
        #ifdef PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_3_PIXELS
            return tex2Dblur17fast(texture, tex_uv, dxdy, sigma);
        #else
            return tex2Dblur9fast(texture, tex_uv, dxdy, sigma);
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_3_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_6_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_9_PIXELS
        #endif  //  PHOSPHOR_BLOOM_TRIADS_LARGER_THAN_12_PIXELS
    #endif  //  PHOSPHOR_BLOOM_BRANCH_FOR_BLUR_SIZE
}

inline float get_bloom_approx_sigma(const float output_size_x_runtime,
    const float estimated_viewport_size_x)
{
    //  Requires:   1.) output_size_x_runtime == BLOOM_APPROX.output_size.x.
    //                  This is included for dynamic codepaths just in case the
    //                  following two globals are incorrect:
    //              2.) bloom_approx_size_x_for_skip should == the same
    //                  if PHOSPHOR_BLOOM_FAKE is #defined
    //              3.) bloom_approx_size_x should == the same otherwise
    //  Returns:    For gaussian4x4, return a dynamic small bloom sigma that's
    //              as close to optimal as possible given available information.
    //              For blur3x3, return the a static small bloom sigma that
    //              works well for typical cases.  Otherwise, we're using simple
    //              bilinear filtering, so use static calculations.
    //  Assume the default static value.  This is a compromise that ensures
    //  typical triads are blurred, even if unusually large ones aren't.
    static const float mask_num_triads_static =
        max(min_allowed_viewport_triads.x, mask_num_triads_desired_static);
    const float mask_num_triads_from_size =
        estimated_viewport_size_x/mask_triad_size_desired;
    const float mask_num_triads_runtime = max(min_allowed_viewport_triads.x,
        lerp(mask_num_triads_from_size, mask_num_triads_desired,
            mask_specify_num_triads));
    //  Assume an extremely large viewport size for asymptotic results:
    static const float max_viewport_size_x = 1080.0*1024.0*(4.0/3.0);
    if(bloom_approx_filter > 1.5)   //  4x4 true Gaussian resize
    {
        //  Use the runtime num triads and output size:
        const float asymptotic_triad_size =
            max_viewport_size_x/mask_num_triads_runtime;
        const float asymptotic_sigma = get_min_sigma_to_blur_triad(
            asymptotic_triad_size, bloom_diff_thresh);
        const float bloom_approx_sigma =
            asymptotic_sigma * output_size_x_runtime/max_viewport_size_x;
        //  The BLOOM_APPROX input has to be ORIG_LINEARIZED to avoid moire, but
        //  account for the Gaussian scanline sigma from the last pass too.
        //  The bloom will be too wide horizontally but tall enough vertically.
        return length(float2(bloom_approx_sigma, beam_max_sigma));
    }
    else    //  3x3 blur resize (the bilinear resize doesn't need a sigma)
    {
        //  We're either using blur3x3 or bilinear filtering.  The biggest
        //  reason to choose blur3x3 is to avoid dynamic weights, so use a
        //  static calculation.
        #ifdef PHOSPHOR_BLOOM_FAKE
            static const float output_size_x_static =
                bloom_approx_size_x_for_fake;
        #else
            static const float output_size_x_static = bloom_approx_size_x;
        #endif
        static const float asymptotic_triad_size =
            max_viewport_size_x/mask_num_triads_static;
        const float asymptotic_sigma = get_min_sigma_to_blur_triad(
            asymptotic_triad_size, bloom_diff_thresh);
        const float bloom_approx_sigma =
            asymptotic_sigma * output_size_x_static/max_viewport_size_x;
        //  The BLOOM_APPROX input has to be ORIG_LINEARIZED to avoid moire, but
        //  try accounting for the Gaussian scanline sigma from the last pass
        //  too; use the static default value:
        return length(float2(bloom_approx_sigma, beam_max_sigma_static));
    }
}

inline float get_final_bloom_sigma(const float bloom_sigma_runtime)
{
    //  Requires:   1.) bloom_sigma_runtime is a precalculated sigma that's
    //                  optimal for the [known] triad size.
    //              2.) Call this from a fragment shader (not a vertex shader),
    //                  or blurring with static sigmas won't be constant-folded.
    //  Returns:    Return the optimistic static sigma if the triad size is
    //              known at compile time.  Otherwise return the optimal runtime
    //              sigma (10% slower) or an implementation-specific compromise
    //              between an optimistic or pessimistic static sigma.
    //  Notes:      Call this from the fragment shader, NOT the vertex shader,
    //              so static sigmas can be constant-folded!
    const float bloom_sigma_optimistic = get_min_sigma_to_blur_triad(
        mask_triad_size_desired_static, bloom_diff_thresh);
    #ifdef RUNTIME_PHOSPHOR_BLOOM_SIGMA
        return bloom_sigma_runtime;
    #else
        //  Overblurring looks as bad as underblurring, so assume average-size
        //  triads, not worst-case huge triads:
        return bloom_sigma_optimistic;
    #endif
}

#endif  //  BLOOM_FUNCTIONS_H

{'repo_name': 'exokitxr/emukit', 'stars': '117', 'repo_language': 'JavaScript', 'file_name': 'inflate.js', 'mime_type': 'text/plain', 'hash': 9211039277020332775, 'source_dataset': 'data'}


module Jekyll
  class DataReader
    attr_reader :site, :content
    def initialize(site)
      @site = site
      @content = {}
      @entry_filter = EntryFilter.new(site)
    end

    # Read all the files in <source>/<dir>/_drafts and create a new Draft
    # object with each one.
    #
    # dir - The String relative path of the directory to read.
    #
    # Returns nothing.
    def read(dir)
      base = site.in_source_dir(dir)
      read_data_to(base, @content)
      @content
    end

    # Read and parse all yaml files under <dir> and add them to the
    # <data> variable.
    #
    # dir - The string absolute path of the directory to read.
    # data - The variable to which data will be added.
    #
    # Returns nothing
    def read_data_to(dir, data)
      return unless File.directory?(dir) && !@entry_filter.symlink?(dir)

      entries = Dir.chdir(dir) do
        Dir["*.{yaml,yml,json,csv}"] + Dir["*"].select { |fn| File.directory?(fn) }
      end

      entries.each do |entry|
        path = @site.in_source_dir(dir, entry)
        next if @entry_filter.symlink?(path)

        key = sanitize_filename(File.basename(entry, ".*"))
        if File.directory?(path)
          read_data_to(path, data[key] = {})
        else
          data[key] = read_data_file(path)
        end
      end
    end

    # Determines how to read a data file.
    #
    # Returns the contents of the data file.
    def read_data_file(path)
      case File.extname(path).downcase
      when ".csv"
        CSV.read(path, {
          :headers  => true,
          :encoding => site.config["encoding"]
        }).map(&:to_hash)
      else
        SafeYAML.load_file(path)
      end
    end

    def sanitize_filename(name)
      name.gsub!(%r![^\w\s-]+!, "")
      name.gsub!(%r!(^|\b\s)\s+($|\s?\b)!, '\\1\\2')
      name.gsub(%r!\s+!, "_")
    end
  end
end

{'repo_name': 'madhur/PortableJekyll', 'stars': '386', 'repo_language': 'HTML', 'file_name': 'slate.vim', 'mime_type': 'text/plain', 'hash': -8001327161960521740, 'source_dataset': 'data'}


/**
 * Copyright 2019 Google Inc. All rights reserved.
 * Modifications copyright (c) Microsoft Corporation.
 *
 * 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.
 */

import { helper, RegisteredListener } from '../helper';
import { FFSession } from './ffConnection';
import { Page } from '../page';
import * as network from '../network';
import * as frames from '../frames';
import * as types from '../types';
import { Protocol } from './protocol';

export class FFNetworkManager {
  private _session: FFSession;
  private _requests: Map<string, InterceptableRequest>;
  private _page: Page;
  private _eventListeners: RegisteredListener[];

  constructor(session: FFSession, page: Page) {
    this._session = session;

    this._requests = new Map();
    this._page = page;

    this._eventListeners = [
      helper.addEventListener(session, 'Network.requestWillBeSent', this._onRequestWillBeSent.bind(this)),
      helper.addEventListener(session, 'Network.responseReceived', this._onResponseReceived.bind(this)),
      helper.addEventListener(session, 'Network.requestFinished', this._onRequestFinished.bind(this)),
      helper.addEventListener(session, 'Network.requestFailed', this._onRequestFailed.bind(this)),
    ];
  }

  dispose() {
    helper.removeEventListeners(this._eventListeners);
  }

  async setRequestInterception(enabled: boolean) {
    await this._session.send('Network.setRequestInterception', {enabled});
  }

  _onRequestWillBeSent(event: Protocol.Network.requestWillBeSentPayload) {
    const redirectedFrom = event.redirectedFrom ? (this._requests.get(event.redirectedFrom) || null) : null;
    const frame = redirectedFrom ? redirectedFrom.request.frame() : (event.frameId ? this._page._frameManager.frame(event.frameId) : null);
    if (!frame)
      return;
    if (redirectedFrom)
      this._requests.delete(redirectedFrom._id);
    const request = new InterceptableRequest(this._session, frame, redirectedFrom, event);
    this._requests.set(request._id, request);
    this._page._frameManager.requestStarted(request.request);
  }

  _onResponseReceived(event: Protocol.Network.responseReceivedPayload) {
    const request = this._requests.get(event.requestId);
    if (!request)
      return;
    const getResponseBody = async () => {
      const response = await this._session.send('Network.getResponseBody', {
        requestId: request._id
      });
      if (response.evicted)
        throw new Error(`Response body for ${request.request.method()} ${request.request.url()} was evicted!`);
      return Buffer.from(response.base64body, 'base64');
    };
    const response = new network.Response(request.request, event.status, event.statusText, event.headers, getResponseBody);
    this._page._frameManager.requestReceivedResponse(response);
  }

  _onRequestFinished(event: Protocol.Network.requestFinishedPayload) {
    const request = this._requests.get(event.requestId);
    if (!request)
      return;
    const response = request.request._existingResponse()!;
    // Keep redirected requests in the map for future reference as redirectedFrom.
    const isRedirected = response.status() >= 300 && response.status() <= 399;
    if (isRedirected) {
      response._requestFinished('Response body is unavailable for redirect responses');
    } else {
      this._requests.delete(request._id);
      response._requestFinished();
    }
    this._page._frameManager.requestFinished(request.request);
  }

  _onRequestFailed(event: Protocol.Network.requestFailedPayload) {
    const request = this._requests.get(event.requestId);
    if (!request)
      return;
    this._requests.delete(request._id);
    const response = request.request._existingResponse();
    if (response)
      response._requestFinished();
    request.request._setFailureText(event.errorCode);
    this._page._frameManager.requestFailed(request.request, event.errorCode === 'NS_BINDING_ABORTED');
  }
}

const causeToResourceType: {[key: string]: string} = {
  TYPE_INVALID: 'other',
  TYPE_OTHER: 'other',
  TYPE_SCRIPT: 'script',
  TYPE_IMAGE: 'image',
  TYPE_STYLESHEET: 'stylesheet',
  TYPE_OBJECT: 'other',
  TYPE_DOCUMENT: 'document',
  TYPE_SUBDOCUMENT: 'document',
  TYPE_REFRESH: 'document',
  TYPE_XBL: 'other',
  TYPE_PING: 'other',
  TYPE_XMLHTTPREQUEST: 'xhr',
  TYPE_OBJECT_SUBREQUEST: 'other',
  TYPE_DTD: 'other',
  TYPE_FONT: 'font',
  TYPE_MEDIA: 'media',
  TYPE_WEBSOCKET: 'websocket',
  TYPE_CSP_REPORT: 'other',
  TYPE_XSLT: 'other',
  TYPE_BEACON: 'other',
  TYPE_FETCH: 'fetch',
  TYPE_IMAGESET: 'images',
  TYPE_WEB_MANIFEST: 'manifest',
};

const internalCauseToResourceType: {[key: string]: string} = {
  TYPE_INTERNAL_EVENTSOURCE: 'eventsource',
};

class InterceptableRequest implements network.RouteDelegate {
  readonly request: network.Request;
  _id: string;
  private _session: FFSession;

  constructor(session: FFSession, frame: frames.Frame, redirectedFrom: InterceptableRequest | null, payload: Protocol.Network.requestWillBeSentPayload) {
    this._id = payload.requestId;
    this._session = session;

    let postDataBuffer = null;
    if (payload.postData)
      postDataBuffer = Buffer.from(payload.postData, 'base64');
    this.request = new network.Request(payload.isIntercepted ? this : null, frame, redirectedFrom ? redirectedFrom.request : null, payload.navigationId,
        payload.url, internalCauseToResourceType[payload.internalCause] || causeToResourceType[payload.cause] || 'other', payload.method, postDataBuffer, payload.headers);
  }

  async continue(overrides: types.NormalizedContinueOverrides) {
    await this._session.sendMayFail('Network.resumeInterceptedRequest', {
      requestId: this._id,
      method: overrides.method,
      headers: overrides.headers,
      postData: overrides.postData ? Buffer.from(overrides.postData).toString('base64') : undefined
    });
  }

  async fulfill(response: types.NormalizedFulfillResponse) {
    const base64body = response.isBase64 ? response.body : Buffer.from(response.body).toString('base64');

    await this._session.sendMayFail('Network.fulfillInterceptedRequest', {
      requestId: this._id,
      status: response.status,
      statusText: network.STATUS_TEXTS[String(response.status)] || '',
      headers: response.headers,
      base64body,
    });
  }

  async abort(errorCode: string) {
    await this._session.sendMayFail('Network.abortInterceptedRequest', {
      requestId: this._id,
      errorCode,
    });
  }
}

{'repo_name': 'microsoft/playwright', 'stars': '14917', 'repo_language': 'TypeScript', 'file_name': 'COPYING.GPLv3', 'mime_type': 'text/plain', 'hash': -5826601494423320261, 'source_dataset': 'data'}


$foundCert = Test-Certificate -Cert Cert:\CurrentUser\my\8ef9a86dfd4bd0b4db313d55c4be8b837efa7b77 -User
if(!$foundCert)
{
    Write-Host "Certificate doesn't exist. Exit."
    exit
}

Write-Host "Certificate found. Sign the assemblies."
$signtool = "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe"
foreach ($line in Get-Content .\sign.txt) {
    & $signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a .\bin\$line | Write-Debug
    if ($LASTEXITCODE -ne 0)
    {
        Write-Host ".\bin\$line is not signed. Exit."
        exit $LASTEXITCODE
    }
}

Write-Host "Verify digital signature."
$files = Get-ChildItem .\bin\* -Include ('*.dll', "*.exe") -File
$files | ForEach-Object {
    & $signtool verify /pa /q $_.FullName 2>&1 | Write-Debug
    if ($LASTEXITCODE -ne 0)
    {
        Write-Host "$_.FullName is not signed. Exit."
        exit $LASTEXITCODE
    }
}

Write-Host "Verification finished."

{'repo_name': 'jexuswebserver/JexusManager', 'stars': '170', 'repo_language': 'C#', 'file_name': 'Resources.Designer.cs', 'mime_type': 'text/plain', 'hash': 9201345897929844980, 'source_dataset': 'data'}


//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// test set_new_handler

#include <new>
#include <cassert>

void f1() {}
void f2() {}

int main()
{
    assert(std::set_new_handler(f1) == 0);
    assert(std::set_new_handler(f2) == f1);
}

{'repo_name': 'bitrig/bitrig', 'stars': '252', 'repo_language': 'C', 'file_name': 'LoopSimplify.cpp', 'mime_type': 'text/x-c', 'hash': 2644508352293653580, 'source_dataset': 'data'}


require 'rails_helper'

describe 'idv/doc_auth/welcome.html.erb' do
  let(:flow_session) { {} }
  let(:user_fully_authenticated) { true }

  before do
    allow(view).to receive(:flow_session).and_return(flow_session)
    allow(view).to receive(:user_fully_authenticated?).and_return(user_fully_authenticated)
    allow(view).to receive(:url_for).and_return('https://www.example.com/')
    allow(view).to receive(:user_signing_up?).and_return(false)
  end

  context 'in doc auth with an authenticated user' do
    it 'renders a link to return to the SP' do
      render template: 'idv/doc_auth/welcome.html.erb'

      expect(rendered).to have_link(t('links.cancel'))
    end
  end

  context 'in recovery without an authenticated user' do
    let(:user_fully_authenticated) { false }

    it 'renders a link to return to the MFA step' do
      render template: 'idv/doc_auth/welcome.html.erb'

      expect(rendered).to have_link(t('two_factor_authentication.choose_another_option'))
    end
  end

  context 'when liveness checking enabled' do
    before do
      allow(view).to receive(:liveness_checking_enabled?).and_return(true)
    end

    it 'renders selfie instructions' do
      render template: 'idv/doc_auth/welcome.html.erb'

      expect(rendered).to have_text(t('doc_auth.instructions.bullet1a'))
    end
  end

  context 'when liveness checking is disabled' do
    before do
      allow(view).to receive(:liveness_checking_enabled?).and_return(false)
    end

    it 'renders selfie instructions' do
      render template: 'idv/doc_auth/welcome.html.erb'

      expect(rendered).to_not have_text(t('doc_auth.instructions.bullet1a'))
    end
  end

  context 'during the acuant maintenance window' do
    let(:start) { Time.zone.parse('2020-01-01T00:00:00Z') }
    let(:now) { Time.zone.parse('2020-01-01T12:00:00Z') }
    let(:finish) { Time.zone.parse('2020-01-01T23:59:59Z') }

    before do
      allow(Figaro.env).to receive(:acuant_maintenance_window_start).and_return(start.iso8601)
      allow(Figaro.env).to receive(:acuant_maintenance_window_finish).and_return(finish.iso8601)
    end

    around do |ex|
      Timecop.travel(now) { ex.run }
    end

    it 'renders the warning banner but no other content' do
      render template: 'idv/doc_auth/welcome.html.erb'

      expect(rendered).to have_content('We are currently under maintenance')
      expect(rendered).to_not have_content(t('doc_auth.headings.welcome'))
    end
  end
end

{'repo_name': '18F/identity-idp', 'stars': '295', 'repo_language': 'Ruby', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': 2971443704280680751, 'source_dataset': 'data'}


<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Post extends Model
{
    use SoftDeletes;

    /**
     * 该模型是否被自动维护时间戳
     *
     * @var bool
     */
     public $timestamps = true;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
     protected $fillable = [
        'adminid',
        'uid',
        'category_id',
        'tags',
        'uuid',
        'title',
        'name',
        'author',
        'source',
        'description',
        'password',
        'cover_ids',
        'pid',
        'level',
        'type',
        'show_type',
        'position',
        'content',
        'comment',
        'view',
        'page_tpl',
        'file_id',
        'comment_status',
        'status'
    ];

    protected $dates = ['delete_at'];
}

{'repo_name': 'tangtanglove/fullstack-backend', 'stars': '258', 'repo_language': 'PHP', 'file_name': 'LodopFuncs.js', 'mime_type': 'text/html', 'hash': -105311330418327677, 'source_dataset': 'data'}


^D:\FRANK\DESKTOP\FRANK\CS184\3DWORLD\GLEW-2.0.0\BUILD\GLEW.RC
D:\FRANK\DESKTOP\FRANK\CS184\3DWORLD\GLEW-2.0.0\BUILD\VC12\TMP\GLEW_STATIC\DEBUG\WIN32\GLEW.RES

{'repo_name': 'fegennari/3DWorld', 'stars': '366', 'repo_language': 'C++', 'file_name': 'COLL_OBJS2.TXT', 'mime_type': 'text/plain', 'hash': 6276704169606275820, 'source_dataset': 'data'}


<%# Copyright 2014 Frank Breedijk                                            %>
<%#                                                                          %>
<%# 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.                                           %>

Create a new notification

		Subject

		<input type='input' size=78 name='subject' id='newNotSubject'/>

		Trigger

		<select name='trigger' id='newNotTrigger'/></select>

		Recipients

		<input type='input' size=78 name='recipients' id='newNotRecipients'/>

		Message

		<textarea rows=5 cols=59 name='message' id='newNotMessage'/>

		The following keywords can be used in the message and subject:

$WORKSPACE - name of the workspace

$SCAN - Name of the scan

$SCANNER - Name of the scanner used

$PARAMETERS - Scanner parameters

$TIME - Time of the scan

$ATTN - Number of findings that need you attention (Only after scan)

$TARGETS - Targets of the scan (Only in message)

$SUMMARY - Summary of findings (Only in message, only after scan)

$NEW, $OPEN, $CHANGED, $NOISSUE, $GONE, $CLOSED, $MASKED
- Number of findings of that status (Only after scan)

$ATTACH:<ext> - Attach run attachment with that extension to the mail (Only in

			message, only after scan) E.g. if you specify $ATTACH:ivil.xml here, the all files with

			extension ivil.xml that are attacjed to the run, will be sent as attachment in the email.

		<input type='submit' value='Create Notification'/>
		<button type='button' class='cancel'>Cancel</button>

{'repo_name': 'seccubus/seccubus', 'stars': '590', 'repo_language': 'JavaScript', 'file_name': 'build', 'mime_type': 'text/x-shellscript', 'hash': -574597502974633762, 'source_dataset': 'data'}


--TEST--
oci_collection_assign()
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
require(__DIR__.'/skipif.inc');
?>
--FILE--
<?php

require __DIR__."/connect.inc";
require __DIR__."/create_type.inc";

$coll1 = oci_new_collection($c, $type_name);
$coll2 = oci_new_collection($c, $type_name);

var_dump($coll1->append(1));

var_dump($coll2->assign($coll1));

var_dump($coll2->getElem(0));

echo "Done\n";

require __DIR__."/drop_type.inc";

?>
--EXPECT--
bool(true)
bool(true)
float(1)
Done

{'repo_name': 'php/php-src', 'stars': '27767', 'repo_language': 'C', 'file_name': 'echo.inc', 'mime_type': 'text/x-php', 'hash': -8347551418866018221, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Plugin provider="0x101200a" interface="0x01c10032">
    <Command name="Python" id="0">

        <Help>For information about scripting, please see user documentation.</Help>

		<Input>
			<Argument name='script' optional='false' data='script'>
				<Help>The script to run.</Help>
			</Argument>

			<Option name='args' optional='true'>
				<Help>Script arguments</Help>
				<Argument name='script_args' optional='false' data='args'/>
			</Option>

			<Option name='project' optional='true'>
				<Help>Limit script searches to a given project</Help>
				<Argument name='name' optional='false' data='project'/>
			</Option>

			<Option name="quiet" optional='true'>
				<Help>Enable quiet if parent echo'ing is disabled</Help>
				<Set data='noquiet' value='false'/>
			</Option>

			<Option name="threads" optional='true'>
				<Help>Enable threading (not supported/recommended for most cases)</Help>
				<Set data='enablethreading' value='true'/>
			</Option>
		</Input>

		<Output>
			<Data name='script' type='string'/>
			<Data name='args' type='string'/>
			<Data name='project' type='string'/>
			<Data name='noquiet' type='bool' default='true'/>
			<Data name='enablethreading' type='bool' default='false'/>
		</Output>

    </Command>
</Plugin>

{'repo_name': 'mdiazcl/fuzzbunch-debian', 'stars': '124', 'repo_language': 'Python', 'file_name': 'Eternalchampion-2.0.0.fb', 'mime_type': 'text/xml', 'hash': -9140043813005813734, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 8c6f3ced7513b38468e660f8ff12ab3c
ModelImporter:
  serializedVersion: 27
  internalIDToNameTable:
  - first:
      1: 100000
    second: //RootNode
  - first:
      1: 100002
    second: Palm_02_billboard
  - first:
      4: 400000
    second: //RootNode
  - first:
      4: 400002
    second: Palm_02_billboard
  - first:
      21: 2100000
    second: Default
  - first:
      21: 2100002
    second: Trees_Billboard
  - first:
      23: 2300000
    second: //RootNode
  - first:
      23: 2300002
    second: Palm_02_billboard
  - first:
      33: 3300000
    second: //RootNode
  - first:
      33: 3300002
    second: Palm_02_billboard
  - first:
      43: 4300000
    second: Palm_02
  - first:
      43: 4300002
    second: Palm_02_billboard
  - first:
      74: 7400000
    second: Take 001
  - first:
      95: 9500000
    second: //RootNode
  externalObjects:
  - first:
      type: UnityEngine:Material
      assembly: UnityEngine.CoreModule
      name: Default
    second: {fileID: 2100000, guid: 65362f8b29e996742896ce4dd8a6d723, type: 2}
  - first:
      type: UnityEngine:Material
      assembly: UnityEngine.CoreModule
      name: Trees_Billboard
    second: {fileID: 2100000, guid: 7e3016a4668af4ed0879281ab8cfda9b, type: 2}
  materials:
    importMaterials: 1
    materialName: 0
    materialSearch: 1
    materialLocation: 1
  animations:
    legacyGenerateAnimations: 4
    bakeSimulation: 0
    resampleCurves: 1
    optimizeGameObjects: 0
    motionNodeName:
    rigImportErrors:
    rigImportWarnings:
    animationImportErrors:
    animationImportWarnings:
    animationRetargetingWarnings:
    animationDoRetargetingWarnings: 0
    importAnimatedCustomProperties: 0
    importConstraints: 0
    animationCompression: 1
    animationRotationError: 0.5
    animationPositionError: 0.5
    animationScaleError: 0.5
    animationWrapMode: 0
    extraExposedTransformPaths: []
    extraUserProperties: []
    clipAnimations: []
    isReadable: 1
  meshes:
    lODScreenPercentages: []
    globalScale: 2
    meshCompression: 0
    addColliders: 0
    useSRGBMaterialColor: 1
    sortHierarchyByName: 1
    importVisibility: 1
    importBlendShapes: 1
    importCameras: 1
    importLights: 1
    swapUVChannels: 0
    generateSecondaryUV: 0
    useFileUnits: 1
    keepQuads: 0
    weldVertices: 1
    preserveHierarchy: 0
    skinWeightsMode: 0
    maxBonesPerVertex: 4
    minBoneWeight: 0.001
    meshOptimizationFlags: -1
    indexFormat: 0
    secondaryUVAngleDistortion: 8
    secondaryUVAreaDistortion: 15.000001
    secondaryUVHardAngle: 88
    secondaryUVPackMargin: 4
    useFileScale: 1
  tangentSpace:
    normalSmoothAngle: 60
    normalImportMode: 0
    tangentImportMode: 3
    normalCalculationMode: 4
    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
    blendShapeNormalImportMode: 1
    normalSmoothingSource: 0
  referencedClips: []
  importAnimation: 0
  humanDescription:
    serializedVersion: 3
    human: []
    skeleton: []
    armTwist: 0.5
    foreArmTwist: 0.5
    upperLegTwist: 0.5
    legTwist: 0.5
    armStretch: 0.05
    legStretch: 0.05
    feetSpacing: 0
    globalScale: 2
    rootMotionBoneName:
    hasTranslationDoF: 0
    hasExtraRoot: 0
    skeletonHasParents: 1
  lastHumanDescriptionAvatarSource: {instanceID: 0}
  animationType: 0
  humanoidOversampling: 1
  avatarSetup: 0
  additionalBone: 0
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Verasl/BoatAttack', 'stars': '1199', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 4560004890260218874, 'source_dataset': 'data'}


' <SnippetGlobalPageCode>
Public NotInheritable Class GlobalPage
    Inherits Page

    ' <SnippetNavCommands>
    Dim rootPage As Page
    Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
        rootPage = e.Parameter
        frame1.Navigate(GetType(Page1), Me)
    End Sub

    Private Sub Back_Click(sender As Object, e As RoutedEventArgs)
        If frame1.CanGoBack() = True Then
            frame1.GoBack()
        ElseIf rootPage IsNot Nothing AndAlso rootPage.Frame.CanGoBack() = True Then
            rootPage.Frame.GoBack()
        End If
    End Sub

    Private Sub Page1Button_Click(sender As Object, e As RoutedEventArgs)
        frame1.Navigate(GetType(Page1), Me)
    End Sub

    Private Sub Page2Button_Click(sender As Object, e As RoutedEventArgs)
        frame1.Navigate(GetType(Page2), Me)
    End Sub
    ' </SnippetNavCommands>
End Class
' </SnippetGlobalPageCode>

{'repo_name': 'MicrosoftDocs/winrt-api', 'stars': '106', 'repo_language': 'JavaScript', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -6761506454487488499, 'source_dataset': 'data'}


/*
 * Copyright 2004-2020 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (https://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */
package org.h2.util.json;

import java.math.BigDecimal;
import java.util.ArrayDeque;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;

/**
 * JSON validation target with unique keys.
 */
public final class JSONValidationTargetWithUniqueKeys extends JSONValidationTarget {

    private final ArrayDeque<Object> stack;

    private final ArrayDeque<String> names;

    private boolean needSeparator;

    private String memberName;

    private JSONItemType type;

    /**
     * Creates new instance of JSON validation target with unique keys.
     */
    public JSONValidationTargetWithUniqueKeys() {
        stack = new ArrayDeque<>();
        names = new ArrayDeque<>();
    }

    @Override
    public void startObject() {
        beforeValue();
        names.push(memberName != null ? memberName : "");
        memberName = null;
        stack.push(new HashSet<>());
    }

    @Override
    public void endObject() {
        if (memberName != null) {
            throw new IllegalStateException();
        }
        if (!(stack.poll() instanceof HashSet)) {
            throw new IllegalStateException();
        }
        memberName = names.pop();
        afterValue(JSONItemType.OBJECT);
    }

    @Override
    public void startArray() {
        beforeValue();
        names.push(memberName != null ? memberName : "");
        memberName = null;
        stack.push(Collections.emptyList());
    }

    @Override
    public void endArray() {
        if (!(stack.poll() instanceof List)) {
            throw new IllegalStateException();
        }
        memberName = names.pop();
        afterValue(JSONItemType.ARRAY);
    }

    @Override
    public void member(String name) {
        if (memberName != null || !(stack.peek() instanceof HashSet)) {
            throw new IllegalStateException();
        }
        memberName = name;
        beforeValue();
    }

    @Override
    public void valueNull() {
        beforeValue();
        afterValue(JSONItemType.SCALAR);
    }

    @Override
    public void valueFalse() {
        beforeValue();
        afterValue(JSONItemType.SCALAR);
    }

    @Override
    public void valueTrue() {
        beforeValue();
        afterValue(JSONItemType.SCALAR);
    }

    @Override
    public void valueNumber(BigDecimal number) {
        beforeValue();
        afterValue(JSONItemType.SCALAR);
    }

    @Override
    public void valueString(String string) {
        beforeValue();
        afterValue(JSONItemType.SCALAR);
    }

    private void beforeValue() {
        if (memberName == null && stack.peek() instanceof HashSet) {
            throw new IllegalStateException();
        }
        if (needSeparator) {
            if (stack.isEmpty()) {
                throw new IllegalStateException();
            }
            needSeparator = false;
        }
    }

    @SuppressWarnings("unchecked")
    private void afterValue(JSONItemType type) {
        Object parent = stack.peek();
        if (parent == null) {
            this.type = type;
        } else if (parent instanceof HashSet) {
            if (!((HashSet<String>) parent).add(memberName)) {
                throw new IllegalStateException();
            }
        }
        needSeparator = true;
        memberName = null;
    }

    @Override
    public boolean isPropertyExpected() {
        return memberName == null && stack.peek() instanceof HashSet;
    }

    @Override
    public boolean isValueSeparatorExpected() {
        return needSeparator;
    }

    @Override
    public JSONItemType getResult() {
        if (!stack.isEmpty() || type == null) {
            throw new IllegalStateException();
        }
        return type;
    }

}

{'repo_name': 'codefollower/H2-Research', 'stars': '355', 'repo_language': 'Java', 'file_name': '1_install_service.bat', 'mime_type': 'text/x-msdos-batch', 'hash': -9163146242080363446, 'source_dataset': 'data'}


/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.management.network.v2017_10_01;

import com.microsoft.azure.SubResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
 * Request routing rule of an application gateway.
 */
@JsonFlatten
public class ApplicationGatewayRequestRoutingRule extends SubResource {
    /**
     * Rule type. Possible values include: 'Basic', 'PathBasedRouting'.
     */
    @JsonProperty(value = "properties.ruleType")
    private ApplicationGatewayRequestRoutingRuleType ruleType;

    /**
     * Backend address pool resource of the application gateway.
     */
    @JsonProperty(value = "properties.backendAddressPool")
    private SubResource backendAddressPool;

    /**
     * Frontend port resource of the application gateway.
     */
    @JsonProperty(value = "properties.backendHttpSettings")
    private SubResource backendHttpSettings;

    /**
     * Http listener resource of the application gateway.
     */
    @JsonProperty(value = "properties.httpListener")
    private SubResource httpListener;

    /**
     * URL path map resource of the application gateway.
     */
    @JsonProperty(value = "properties.urlPathMap")
    private SubResource urlPathMap;

    /**
     * Redirect configuration resource of the application gateway.
     */
    @JsonProperty(value = "properties.redirectConfiguration")
    private SubResource redirectConfiguration;

    /**
     * Provisioning state of the request routing rule resource. Possible values
     * are: 'Updating', 'Deleting', and 'Failed'.
     */
    @JsonProperty(value = "properties.provisioningState")
    private String provisioningState;

    /**
     * Name of the resource that is unique within a resource group. This name
     * can be used to access the resource.
     */
    @JsonProperty(value = "name")
    private String name;

    /**
     * A unique read-only string that changes whenever the resource is updated.
     */
    @JsonProperty(value = "etag")
    private String etag;

    /**
     * Type of the resource.
     */
    @JsonProperty(value = "type")
    private String type;

    /**
     * Get rule type. Possible values include: 'Basic', 'PathBasedRouting'.
     *
     * @return the ruleType value
     */
    public ApplicationGatewayRequestRoutingRuleType ruleType() {
        return this.ruleType;
    }

    /**
     * Set rule type. Possible values include: 'Basic', 'PathBasedRouting'.
     *
     * @param ruleType the ruleType value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withRuleType(ApplicationGatewayRequestRoutingRuleType ruleType) {
        this.ruleType = ruleType;
        return this;
    }

    /**
     * Get backend address pool resource of the application gateway.
     *
     * @return the backendAddressPool value
     */
    public SubResource backendAddressPool() {
        return this.backendAddressPool;
    }

    /**
     * Set backend address pool resource of the application gateway.
     *
     * @param backendAddressPool the backendAddressPool value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withBackendAddressPool(SubResource backendAddressPool) {
        this.backendAddressPool = backendAddressPool;
        return this;
    }

    /**
     * Get frontend port resource of the application gateway.
     *
     * @return the backendHttpSettings value
     */
    public SubResource backendHttpSettings() {
        return this.backendHttpSettings;
    }

    /**
     * Set frontend port resource of the application gateway.
     *
     * @param backendHttpSettings the backendHttpSettings value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withBackendHttpSettings(SubResource backendHttpSettings) {
        this.backendHttpSettings = backendHttpSettings;
        return this;
    }

    /**
     * Get http listener resource of the application gateway.
     *
     * @return the httpListener value
     */
    public SubResource httpListener() {
        return this.httpListener;
    }

    /**
     * Set http listener resource of the application gateway.
     *
     * @param httpListener the httpListener value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withHttpListener(SubResource httpListener) {
        this.httpListener = httpListener;
        return this;
    }

    /**
     * Get uRL path map resource of the application gateway.
     *
     * @return the urlPathMap value
     */
    public SubResource urlPathMap() {
        return this.urlPathMap;
    }

    /**
     * Set uRL path map resource of the application gateway.
     *
     * @param urlPathMap the urlPathMap value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withUrlPathMap(SubResource urlPathMap) {
        this.urlPathMap = urlPathMap;
        return this;
    }

    /**
     * Get redirect configuration resource of the application gateway.
     *
     * @return the redirectConfiguration value
     */
    public SubResource redirectConfiguration() {
        return this.redirectConfiguration;
    }

    /**
     * Set redirect configuration resource of the application gateway.
     *
     * @param redirectConfiguration the redirectConfiguration value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withRedirectConfiguration(SubResource redirectConfiguration) {
        this.redirectConfiguration = redirectConfiguration;
        return this;
    }

    /**
     * Get provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
     *
     * @return the provisioningState value
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Set provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
     *
     * @param provisioningState the provisioningState value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withProvisioningState(String provisioningState) {
        this.provisioningState = provisioningState;
        return this;
    }

    /**
     * Get name of the resource that is unique within a resource group. This name can be used to access the resource.
     *
     * @return the name value
     */
    public String name() {
        return this.name;
    }

    /**
     * Set name of the resource that is unique within a resource group. This name can be used to access the resource.
     *
     * @param name the name value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get a unique read-only string that changes whenever the resource is updated.
     *
     * @return the etag value
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Set a unique read-only string that changes whenever the resource is updated.
     *
     * @param etag the etag value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withEtag(String etag) {
        this.etag = etag;
        return this;
    }

    /**
     * Get type of the resource.
     *
     * @return the type value
     */
    public String type() {
        return this.type;
    }

    /**
     * Set type of the resource.
     *
     * @param type the type value to set
     * @return the ApplicationGatewayRequestRoutingRule object itself.
     */
    public ApplicationGatewayRequestRoutingRule withType(String type) {
        this.type = type;
        return this;
    }

}

{'repo_name': 'Azure/azure-sdk-for-java', 'stars': '587', 'repo_language': 'Java', 'file_name': 'MetricSpecification.java', 'mime_type': 'text/x-java', 'hash': -871512291859593340, 'source_dataset': 'data'}


/*

    IMPORTANT! This file is auto-generated each time you save your
    project - if you alter its contents, your changes may be overwritten!

*/

#include <juce_core/juce_core.mm>

{'repo_name': 'juce-framework/JUCE', 'stars': '2212', 'repo_language': 'C++', 'file_name': 'include_juce_data_structures.mm', 'mime_type': 'text/x-c', 'hash': -6539254570590503296, 'source_dataset': 'data'}


<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../../libc/fn.globfree64.html">

Redirecting to ../../../libc/fn.globfree64.html...

{'repo_name': 'rust-lang-ja/the-rust-programming-language-ja', 'stars': '349', 'repo_language': 'HTML', 'file_name': 'main.css', 'mime_type': 'text/plain', 'hash': -5628367143394835967, 'source_dataset': 'data'}


rows = {[1.981281e+002
2.420731e+002
2.610494e+002
2.710369e+002
2.930094e+002
3.039956e+002
3.139831e+002
3.249694e+002
3.439456e+002
3.609244e+002
3.679156e+002
3.749069e+002
3.799006e+002
3.868919e+002
3.888894e+002
3.908869e+002
3.918856e+002
3.918856e+002
3.908869e+002
3.898881e+002
3.858931e+002
3.828969e+002
3.799006e+002
3.759056e+002
3.729094e+002
3.689144e+002
3.659181e+002
3.619231e+002
3.589269e+002
3.539331e+002
3.509369e+002
];
[3.299631e+002
2.980031e+002
2.940081e+002
2.900131e+002
2.850194e+002
2.810244e+002
2.760306e+002
2.680406e+002
2.650444e+002
2.610494e+002
2.590519e+002
];
[2.450694e+002
1.991269e+002
1.951319e+002
1.911369e+002
1.881406e+002
1.851444e+002
1.831469e+002
1.801506e+002
1.791519e+002
1.781531e+002
];
};

cols = {[3.520606e+002
3.450694e+002
3.440706e+002
3.430719e+002
3.410744e+002
3.410744e+002
3.410744e+002
3.410744e+002
3.430719e+002
3.460681e+002
3.490644e+002
3.520606e+002
3.560556e+002
3.650444e+002
3.700381e+002
3.760306e+002
3.810244e+002
3.870169e+002
3.920106e+002
3.980031e+002
4.079906e+002
4.119856e+002
4.159806e+002
4.199756e+002
4.219731e+002
4.249694e+002
4.259681e+002
4.259681e+002
4.259681e+002
4.239706e+002
4.219731e+002
];
[3.450694e+002
3.800256e+002
3.840206e+002
3.870169e+002
3.900131e+002
3.920106e+002
3.940081e+002
3.950069e+002
3.940081e+002
3.930094e+002
3.910119e+002
];
[3.500631e+002
3.850194e+002
3.900131e+002
3.940081e+002
3.970044e+002
4.000006e+002
4.019981e+002
4.059931e+002
4.069919e+002
4.079906e+002
];
};

{'repo_name': 'FraPochetti/ImageTextRecognition', 'stars': '124', 'repo_language': 'Matlab', 'file_name': 'img044_042.m', 'mime_type': 'text/plain', 'hash': 6486540179744921347, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 4a3df287aaa282d4f86a7649a125b7aa
timeCreated: 1464338620
licenseType: Pro
TextureImporter:
  fileIDToRecycleName: {}
  serializedVersion: 2
  mipmaps:
    mipMapMode: 0
    enableMipMap: 0
    linearTexture: 0
    correctGamma: 0
    fadeOut: 0
    borderMipMap: 0
    mipMapFadeDistanceStart: 1
    mipMapFadeDistanceEnd: 3
  bumpmap:
    convertToNormalMap: 0
    externalNormalMap: 0
    heightScale: 0.25
    normalMapFilter: 0
  isReadable: 0
  grayScaleToAlpha: 0
  generateCubemap: 0
  cubemapConvolution: 0
  cubemapConvolutionSteps: 7
  cubemapConvolutionExponent: 1.5
  seamlessCubemap: 0
  textureFormat: -1
  maxTextureSize: 256
  textureSettings:
    filterMode: -1
    aniso: 0
    mipBias: -1
    wrapMode: -1
  nPOTScale: 1
  lightmap: 0
  rGBM: 0
  compressionQuality: 50
  allowsAlphaSplitting: 0
  spriteMode: 0
  spriteExtrude: 1
  spriteMeshType: 1
  alignment: 0
  spritePivot: {x: 0.5, y: 0.5}
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
  spritePixelsToUnits: 100
  alphaIsTransparency: 0
  textureType: 5
  buildTargetSettings:
  - buildTarget: Android
    maxTextureSize: 256
    textureFormat: 34
    compressionQuality: 50
    allowsAlphaSplitting: 0
  spriteSheet:
    sprites: []
    outline: []
  spritePackingTag:
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Acgmart/ET-MultiplyDemos', 'stars': '110', 'repo_language': 'C#', 'file_name': 'ImmutableTypeClassMapConvention.cs.meta', 'mime_type': 'text/plain', 'hash': -4056751214682332942, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema

    Version 2.0

    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.

    Example:

    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>

    There are any number of "resheader" rows that contain simple
    name/value pairs.

    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.

    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:

    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.

    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="CurrentLocale" xml:space="preserve">
    <value>Nuværende kultur: {0}</value>
  </data>
  <data name="HowToChange" xml:space="preserve">
    <value>For at ændre denne, skift system instillinger og genstart eksemplet</value>
  </data>
  <data name="Welcome" xml:space="preserve">
    <value>Velkommen til lokaliserings eksemplet!</value>
  </data>
</root>

{'repo_name': 'SimonDarksideJ/XNAGameStudio', 'stars': '220', 'repo_language': 'C#', 'file_name': 'FUNDING.yml', 'mime_type': 'text/plain', 'hash': 9111139088076565997, 'source_dataset': 'data'}


<!--
$PostgreSQL$
PostgreSQL documentation
-->

<refentry id="SQL-CREATELANGUAGE">
 <refmeta>
  <refentrytitle>CREATE LANGUAGE</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>CREATE LANGUAGE</refname>
  <refpurpose>define a new procedural language</refpurpose>
 </refnamediv>

 <indexterm zone="sql-createlanguage">
  <primary>CREATE LANGUAGE</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
CREATE [ OR REPLACE ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">name</replaceable>
CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">name</replaceable>
    HANDLER <replaceable class="parameter">call_handler</replaceable> [ INLINE <replaceable class="parameter">inline_handler</replaceable> ] [ VALIDATOR <replaceable>valfunction</replaceable> ]
</synopsis>
 </refsynopsisdiv>

 <refsect1 id="sql-createlanguage-description">
  <title>Description</title>

  <para>
   <command>CREATE LANGUAGE</command> registers a new
   procedural language with a <productname>PostgreSQL</productname>
   database.  Subsequently, functions and trigger procedures can be
   defined in this new language.
  </para>

  <para>
   <command>CREATE LANGUAGE</command> effectively associates the
   language name with handler function(s) that are responsible for executing
   functions written in the language.  Refer to <xref linkend="plhandler">
   for more information about language handlers.
  </para>

  <para>
   There are two forms of the <command>CREATE LANGUAGE</command> command.
   In the first form, the user supplies just the name of the desired
   language, and the <productname>PostgreSQL</productname> server consults
   the <link linkend="catalog-pg-pltemplate"><structname>pg_pltemplate</structname></link>
   system catalog to determine the correct parameters.  In the second form,
   the user supplies the language parameters along with the language name.
   The second form can be used to create a language that is not defined in
   <structname>pg_pltemplate</>, but this approach is considered obsolescent.
  </para>

  <para>
   When the server finds an entry in the <structname>pg_pltemplate</> catalog
   for the given language name, it will use the catalog data even if the
   command includes language parameters.  This behavior simplifies loading of
   old dump files, which are likely to contain out-of-date information
   about language support functions.
  </para>

  <para>
   Ordinarily, the user must have the
   <productname>PostgreSQL</productname> superuser privilege to
   register a new language.  However, the owner of a database can register
   a new language within that database if the language is listed in
   the <structname>pg_pltemplate</structname> catalog and is marked
   as allowed to be created by database owners (<structfield>tmpldbacreate</>
   is true).  The default is that trusted languages can be created
   by database owners, but this can be adjusted by superusers by modifying
   the contents of <structname>pg_pltemplate</structname>.
   The creator of a language becomes its owner and can later
   drop it, rename it, or assign it to a new owner.
  </para>

  <para>
   <command>CREATE OR REPLACE LANGUAGE</command> will either create a
   new language, or replace an existing definition.  If the language
   already exists, its parameters are updated according to the values
   specified or taken from <structname>pg_pltemplate</structname>,
   but the language's ownership and permissions settings do not change,
   and any existing functions written in the language are assumed to still
   be valid.  In addition to the normal privilege requirements for creating
   a language, the user must be superuser or owner of the existing language.
   The <literal>REPLACE</> case is mainly meant to be used to
   ensure that the language exists.  If the language has a
   <structname>pg_pltemplate</structname> entry then <literal>REPLACE</>
   will not actually change anything about an existing definition, except in
   the unusual case where the <structname>pg_pltemplate</structname> entry
   has been modified since the language was created.
  </para>
 </refsect1>

 <refsect1 id="sql-createlanguage-parameters">
  <title>Parameters</title>

   <variablelist>
    <varlistentry>
     <term><literal>TRUSTED</literal></term>

     <listitem>
      <para>
       <literal>TRUSTED</literal> specifies that the language does
       not grant access to data that the user would not otherwise
       have.  If this key word is omitted
       when registering the language, only users with the
       <productname>PostgreSQL</productname> superuser privilege can
       use this language to create new functions.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>PROCEDURAL</literal></term>

     <listitem>
      <para>
       This is a noise word.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable class="parameter">name</replaceable></term>

     <listitem>
      <para>
       The name of the new procedural language.  The language name is
       case insensitive. The name must be unique among the languages
       in the database.
      </para>

      <para>
       For backward compatibility, the name can be enclosed by single
       quotes.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>HANDLER</literal> <replaceable class="parameter">call_handler</replaceable></term>

     <listitem>
      <para>
       <replaceable class="parameter">call_handler</replaceable> is
       the name of a previously registered function that will be
       called to execute the procedural language's functions.  The call
       handler for a procedural language must be written in a compiled
       language such as C with version 1 call convention and
       registered with <productname>PostgreSQL</productname> as a
       function taking no arguments and returning the
       <type>language_handler</type> type, a placeholder type that is
       simply used to identify the function as a call handler.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>INLINE</literal> <replaceable class="parameter">inline_handler</replaceable></term>

     <listitem>
      <para>
       <replaceable class="parameter">inline_handler</replaceable> is the
       name of a previously registered function that will be called
       to execute an anonymous code block
       (<xref linkend="sql-do"> command)
       in this language.
       If no <replaceable class="parameter">inline_handler</replaceable>
       function is specified, the language does not support anonymous code
       blocks.
       The handler function must take one argument of
       type <type>internal</type>, which will be the <command>DO</> command's
       internal representation, and it will typically return
       <type>void</>.  The return value of the handler is ignored.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>VALIDATOR</literal> <replaceable class="parameter">valfunction</replaceable></term>

     <listitem>
      <para>
       <replaceable class="parameter">valfunction</replaceable> is the
       name of a previously registered function that will be called
       when a new function in the language is created, to validate the
       new function.
       If no
       validator function is specified, then a new function will not
       be checked when it is created.
       The validator function must take one argument of
       type <type>oid</type>, which will be the OID of the
       to-be-created function, and will typically return <type>void</>.
      </para>

      <para>
       A validator function would typically inspect the function body
       for syntactical correctness, but it can also look at other
       properties of the function, for example if the language cannot
       handle certain argument types.  To signal an error, the
       validator function should use the <function>ereport()</function>
       function.  The return value of the function is ignored.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>

  <para>
   The <literal>TRUSTED</> option and the support function name(s) are
   ignored if the server has an entry for the specified language
   name in <structname>pg_pltemplate</>.
  </para>
 </refsect1>

 <refsect1 id="sql-createlanguage-notes">
  <title>Notes</title>

  <para>
   The <xref linkend="app-createlang"> program is a simple wrapper around
   the <command>CREATE LANGUAGE</> command.  It eases
   installation of procedural languages from the shell command line.
  </para>

  <para>
   Use <xref linkend="sql-droplanguage">, or better yet the <xref
   linkend="app-droplang"> program, to drop procedural languages.
  </para>

  <para>
   The system catalog <classname>pg_language</classname> (see <xref
   linkend="catalog-pg-language">) records information about the
   currently installed languages.  Also, <command>createlang</command>
   has an option to list the installed languages.
  </para>

  <para>
   To create functions in a procedural language, a user must have the
   <literal>USAGE</literal> privilege for the language.  By default,
   <literal>USAGE</> is granted to <literal>PUBLIC</> (i.e., everyone)
   for trusted languages.  This can be revoked if desired.
  </para>

  <para>
   Procedural languages are local to individual databases.
   However, a language can be installed into the <literal>template1</literal>
   database, which will cause it to be available automatically in
   all subsequently-created databases.
  </para>

  <para>
   The call handler function, the inline handler function (if any),
   and the validator function (if any)
   must already exist if the server does not have an entry for the language
   in <structname>pg_pltemplate</>.  But when there is an entry,
   the functions need not already exist;
   they will be automatically defined if not present in the database.
   (This might result in <command>CREATE LANGUAGE</> failing, if the
   shared library that implements the language is not available in
   the installation.)
  </para>

  <para>
   In <productname>PostgreSQL</productname> versions before 7.3, it was
   necessary to declare handler functions as returning the placeholder
   type <type>opaque</>, rather than <type>language_handler</>.
   To support loading
   of old dump files, <command>CREATE LANGUAGE</> will accept a function
   declared as returning <type>opaque</>, but it will issue a notice and
   change the function's declared return type to <type>language_handler</>.
  </para>
 </refsect1>

 <refsect1 id="sql-createlanguage-examples">
  <title>Examples</title>

  <para>
   The preferred way of creating any of the standard procedural languages
   is just:
<programlisting>
CREATE LANGUAGE plperl;
</programlisting>
  </para>

  <para>
   For a language not known in the <structname>pg_pltemplate</> catalog, a
   sequence such as this is needed:
<programlisting>
CREATE FUNCTION plsample_call_handler() RETURNS language_handler
    AS '$libdir/plsample'
    LANGUAGE C;
CREATE LANGUAGE plsample
    HANDLER plsample_call_handler;
</programlisting>
  </para>
 </refsect1>

 <refsect1 id="sql-createlanguage-compat">
  <title>Compatibility</title>

  <para>
   <command>CREATE LANGUAGE</command> is a
   <productname>PostgreSQL</productname> extension.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-alterlanguage"></member>
   <member><xref linkend="sql-createfunction"></member>
   <member><xref linkend="sql-droplanguage"></member>
   <member><xref linkend="sql-grant"></member>
   <member><xref linkend="sql-revoke"></member>
   <member><xref linkend="app-createlang"></member>
   <member><xref linkend="app-droplang"></member>
  </simplelist>
 </refsect1>
</refentry>

{'repo_name': 'postgres/postgres-old-soon-decommissioned', 'stars': '135', 'repo_language': 'C', 'file_name': 'postmaster.sgml', 'mime_type': 'text/html', 'hash': 7544679084110370203, 'source_dataset': 'data'}


#!/usr/bin/env bash
CUDA_VISIBLE_DEVICES=0 \
python main.py \
--data_dir ../data/FB15k/ \
--embedding_dim 100 \
--margin_value 1 \
--batch_size 10000 \
--learning_rate 0.003 \
--n_generator 24 \
--n_rank_calculator 24 \
--eval_freq 100 \
--max_epoch 5000

{'repo_name': 'ZichaoHuang/TransE', 'stars': '132', 'repo_language': 'Python', 'file_name': 'main.py', 'mime_type': 'text/x-python', 'hash': 2154557038221018184, 'source_dataset': 'data'}


// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.components.external_intents;

/**
 * Handles intercepting navigation requests for an external authenticator application.
 */
public interface AuthenticatorNavigationInterceptor {
    /**
     * To be called by a Tab to check whether the passed in URL, which is about to be loaded,
     * should be processed by an external Authenticator application.
     *
     * @param url the URL about to be loaded in the tab
     * @return True if the URL has been handled by the Authenticator, false if it hasn't and
     *         should be processed normally by the Tab.
     */
    boolean handleAuthenticatorUrl(String url);
}

{'repo_name': 'nwjs/chromium.src', 'stars': '111', 'repo_language': 'None', 'file_name': 'AndroidManifest.xml', 'mime_type': 'text/xml', 'hash': -6332188982697770675, 'source_dataset': 'data'}


"use strict";
import * as qs from "querystring";
import { Logger } from "../logger";
import {
	CreateThirdPartyCardRequest,
	FetchThirdPartyBoardsRequest,
	FetchThirdPartyBoardsResponse,
	FetchThirdPartyCardsRequest,
	FetchThirdPartyCardsResponse,
	MoveThirdPartyCardRequest,
	MoveThirdPartyCardResponse,
	TrelloBoard,
	TrelloCard,
	TrelloCreateCardRequest,
	TrelloCreateCardResponse,
	TrelloMember
} from "../protocol/agent.protocol";
import { CSTrelloProviderInfo } from "../protocol/api.protocol";
import { log, lspProvider } from "../system";
import { ApiResponse, ThirdPartyIssueProviderBase } from "./provider";

@lspProvider("trello")
export class TrelloProvider extends ThirdPartyIssueProviderBase<CSTrelloProviderInfo> {
	private _trelloUserId: string | undefined;
	private _listNames: { [id: string]: string } = {};

	get displayName() {
		return "Trello";
	}

	get name() {
		return "trello";
	}

	get headers() {
		return {};
	}

	private get apiKey() {
		return this._providerInfo && this._providerInfo.apiKey;
	}

	async onConnected() {
		this._trelloUserId = await this.getMemberId();
	}

	@log()
	async getBoards(request: FetchThirdPartyBoardsRequest): Promise<FetchThirdPartyBoardsResponse> {
		// have to force connection here because we need apiKey and accessToken to even create our request
		await this.ensureConnected();

		const response = await this.get<TrelloBoard[]>(
			`/members/${this._trelloUserId}/boards?${qs.stringify({
				filter: "open",
				fields: "id,name,desc,descData,closed,idOrganization,pinned,url,labelNames,starred",
				lists: "open",
				key: this.apiKey,
				token: this.accessToken
			})}`
		);

		const boards = request.organizationId
			? response.body.filter(b => b.idOrganization === request.organizationId)
			: response.body;

		boards.forEach(board => {
			board.lists.forEach(list => {
				this._listNames[list.id] = list.name;
			});
		});
		return { boards };
	}

	async selfAssignCard(request: { cardId: string }) {
		await this.ensureConnected();

		const response = await this.put<{}, any>(
			`/cards/${request.cardId}?${qs.stringify({
				idMembers: this._trelloUserId,
				key: this.apiKey,
				token: this.accessToken
			})}`,
			{}
		);
		return response.body;
	}

	@log()
	async getCards(request: FetchThirdPartyCardsRequest): Promise<FetchThirdPartyCardsResponse> {
		// have to force connection here because we need apiKey and accessToken to even create our request
		await this.ensureConnected();

		let response: ApiResponse<TrelloCard[]>;

		if (true || request.data.assignedToMe) {
			response = await this.get<TrelloCard[]>(
				`/members/${this._trelloUserId}/cards?${qs.stringify({
					cards: "open",
					filter: "open",
					fields:
						"id,name,desc,url,idList,idBoard,idOrganization,dateLastActivity,shortLink,idShort",
					key: this.apiKey,
					token: this.accessToken
				})}`
			);
		} else if (request.data.assignedToAnyone) {
			response = await this.get<TrelloCard[]>(
				`/members/${this._trelloUserId}/cards?${qs.stringify({
					cards: "open",
					filter: "open",
					fields:
						"id,name,desc,url,idList,idBoard,idOrganization,dateLastActivity,shortLink,idShort",
					key: this.apiKey,
					token: this.accessToken
				})}`
			);
			response.body = [];
			const bodies = (
				await Promise.all(
					// @ts-ignore
					request.filterBoards.map(boardId => {
						const innerResponse = this.get<TrelloCard[]>(
							`/boards/${boardId}/cards?${qs.stringify({
								cards: "open",
								fields:
									"id,name,desc,url,idList,idBoard,idOrganization,dateLastActivity,shortLink,idShort",
								key: this.apiKey,
								token: this.accessToken
							})}`
						);
						return innerResponse;
					})
				)
			).forEach(resp => {
				// @ts-ignore
				if (!response) response = resp;
				// @ts-ignore
				else response.body = response.body.concat(resp.body);
			});
		} else {
			response = await this.get<TrelloCard[]>(
				`/lists/${request.listId}/cards?${qs.stringify({
					cards: "open",
					fields:
						"id,name,desc,url,idList,idBoard,idOrganization,dateLastActivity,shortLink,idShort",
					key: this.apiKey,
					token: this.accessToken
				})}`
			);
		}

		const cards = (request.organizationId
			? response.body.filter(c => c.idOrganization === request.organizationId)
			: response.body
		).map(card => {
			return {
				id: card.id,
				title: card.name,
				body: card.desc,
				url: card.url,
				modifiedAt: new Date(card.dateLastActivity).getTime(),
				tokenId: card.shortLink,
				idList: card.idList,
				listName: this._listNames[card.idList],
				idBoard: card.idBoard
			};
		});
		return { cards };
	}

	@log()
	async createCard(request: CreateThirdPartyCardRequest) {
		await this.ensureConnected();

		const data = request.data as TrelloCreateCardRequest;
		const response = await this.post<{}, TrelloCreateCardResponse>(
			`/cards?${qs.stringify({
				idList: data.listId,
				name: data.name,
				desc: data.description,
				key: this.apiKey,
				idMembers: (data.assignees! || []).map(a => a.id),
				token: this.accessToken
			})}`,
			{}
		);
		return response.body;
	}

	@log()
	async moveCard(request: MoveThirdPartyCardRequest) {
		await this.ensureConnected();

		const response = await this.put<{}, MoveThirdPartyCardResponse>(
			`/cards/${request.cardId}?${qs.stringify({
				idList: request.listId,
				key: this.apiKey,
				token: this.accessToken
			})}`,
			{}
		);
		return response.body;
	}

	@log()
	async getAssignableUsers(request: { boardId: string }) {
		await this.ensureConnected();

		const { body } = await this.get<TrelloMember[]>(
			`/boards/${request.boardId}/members?${qs.stringify({
				key: this.apiKey,
				token: this.accessToken,
				fields: "id,email,username,fullName"
			})}`
		);
		return { users: body.map(u => ({ ...u, displayName: u.fullName })) };
	}

	private async getMemberId() {
		const tokenResponse = await this.get<{ idMember: string; [key: string]: any }>(
			`/token/${this.accessToken}?${qs.stringify({ key: this.apiKey, token: this.accessToken })}`
		);

		return tokenResponse.body.idMember;
	}
}

{'repo_name': 'TeamCodeStream/codestream', 'stars': '232', 'repo_language': 'TypeScript', 'file_name': 'snapshot-sandbox', 'mime_type': 'text/x-shellscript', 'hash': -1731392780161043071, 'source_dataset': 'data'}


#include "f2c.h"
#include "blaswrap.h"

/* Table of constant values */

static integer c__1 = 1;

/* Subroutine */ int zptcon_(integer *n, doublereal *d__, doublecomplex *e,
	doublereal *anorm, doublereal *rcond, doublereal *rwork, integer *
	info)
{
    /* System generated locals */
    integer i__1;
    doublereal d__1;

    /* Builtin functions */
    double z_abs(doublecomplex *);

    /* Local variables */
    integer i__, ix;
    extern integer idamax_(integer *, doublereal *, integer *);
    extern /* Subroutine */ int xerbla_(char *, integer *);
    doublereal ainvnm;

/*  -- LAPACK routine (version 3.1) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2006 */

/*     .. Scalar Arguments .. */
/*     .. */
/*     .. Array Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  ZPTCON computes the reciprocal of the condition number (in the */
/*  1-norm) of a complex Hermitian positive definite tridiagonal matrix */
/*  using the factorization A = L*D*L**H or A = U**H*D*U computed by */
/*  ZPTTRF. */

/*  Norm(inv(A)) is computed by a direct method, and the reciprocal of */
/*  the condition number is computed as */
/*                   RCOND = 1 / (ANORM * norm(inv(A))). */

/*  Arguments */
/*  ========= */

/*  N       (input) INTEGER */
/*          The order of the matrix A.  N >= 0. */

/*  D       (input) DOUBLE PRECISION array, dimension (N) */
/*          The n diagonal elements of the diagonal matrix D from the */
/*          factorization of A, as computed by ZPTTRF. */

/*  E       (input) COMPLEX*16 array, dimension (N-1) */
/*          The (n-1) off-diagonal elements of the unit bidiagonal factor */
/*          U or L from the factorization of A, as computed by ZPTTRF. */

/*  ANORM   (input) DOUBLE PRECISION */
/*          The 1-norm of the original matrix A. */

/*  RCOND   (output) DOUBLE PRECISION */
/*          The reciprocal of the condition number of the matrix A, */
/*          computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the */
/*          1-norm of inv(A) computed in this routine. */

/*  RWORK   (workspace) DOUBLE PRECISION array, dimension (N) */

/*  INFO    (output) INTEGER */
/*          = 0:  successful exit */
/*          < 0:  if INFO = -i, the i-th argument had an illegal value */

/*  Further Details */
/*  =============== */

/*  The method used is described in Nicholas J. Higham, "Efficient */
/*  Algorithms for Computing the Condition Number of a Tridiagonal */
/*  Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986. */

/*  ===================================================================== */

/*     .. Parameters .. */
/*     .. */
/*     .. Local Scalars .. */
/*     .. */
/*     .. External Functions .. */
/*     .. */
/*     .. External Subroutines .. */
/*     .. */
/*     .. Intrinsic Functions .. */
/*     .. */
/*     .. Executable Statements .. */

/*     Test the input arguments. */

    /* Parameter adjustments */
    --rwork;
    --e;
    --d__;

    /* Function Body */
    *info = 0;
    if (*n < 0) {
	*info = -1;
    } else if (*anorm < 0.) {
	*info = -4;
    }
    if (*info != 0) {
	i__1 = -(*info);
	xerbla_("ZPTCON", &i__1);
	return 0;
    }

/*     Quick return if possible */

    *rcond = 0.;
    if (*n == 0) {
	*rcond = 1.;
	return 0;
    } else if (*anorm == 0.) {
	return 0;
    }

/*     Check that D(1:N) is positive. */

    i__1 = *n;
    for (i__ = 1; i__ <= i__1; ++i__) {
	if (d__[i__] <= 0.) {
	    return 0;
	}
/* L10: */
    }

/*     Solve M(A) * x = e, where M(A) = (m(i,j)) is given by */

/*        m(i,j) =  abs(A(i,j)), i = j, */
/*        m(i,j) = -abs(A(i,j)), i .ne. j, */

/*     and e = [ 1, 1, ..., 1 ]'.  Note M(A) = M(L)*D*M(L)'. */

/*     Solve M(L) * x = e. */

    rwork[1] = 1.;
    i__1 = *n;
    for (i__ = 2; i__ <= i__1; ++i__) {
	rwork[i__] = rwork[i__ - 1] * z_abs(&e[i__ - 1]) + 1.;
/* L20: */
    }

/*     Solve D * M(L)' * x = b. */

    rwork[*n] /= d__[*n];
    for (i__ = *n - 1; i__ >= 1; --i__) {
	rwork[i__] = rwork[i__] / d__[i__] + rwork[i__ + 1] * z_abs(&e[i__]);
/* L30: */
    }

/*     Compute AINVNM = max(x(i)), 1<=i<=n. */

    ix = idamax_(n, &rwork[1], &c__1);
    ainvnm = (d__1 = rwork[ix], abs(d__1));

/*     Compute the reciprocal condition number. */

    if (ainvnm != 0.) {
	*rcond = 1. / ainvnm / *anorm;
    }

    return 0;

/*     End of ZPTCON */

} /* zptcon_ */

{'repo_name': 'nya3jp/python-animeface', 'stars': '117', 'repo_language': 'C', 'file_name': 'Imaging.h', 'mime_type': 'text/x-c', 'hash': -4892089744798899375, 'source_dataset': 'data'}