// CodeContracts
//
// Copyright (c) Microsoft Corporation
//
// All rights reserved.
//
// MIT License
//
// 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.

// File System.Windows.Annotations.AnnotationResourceChangedEventArgs.cs
// Automatically generated contract file.
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.Windows.Annotations
{
  sealed public partial class AnnotationResourceChangedEventArgs : EventArgs
  {
    #region Methods and constructors
    public AnnotationResourceChangedEventArgs(Annotation annotation, AnnotationAction action, AnnotationResource resource)
    {
    }
    #endregion

    #region Properties and indexers
    public AnnotationAction Action
    {
      get
      {
        return default(AnnotationAction);
      }
    }

    public Annotation Annotation
    {
      get
      {
        return default(Annotation);
      }
    }

    public AnnotationResource Resource
    {
      get
      {
        return default(AnnotationResource);
      }
    }
    #endregion
  }
}

{'repo_name': 'microsoft/CodeContracts', 'stars': '833', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -244942782187424002, 'source_dataset': 'data'}


// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

0.j==B<T
Void{

{'repo_name': 'practicalswift/swift-compiler-crashes', 'stars': '858', 'repo_language': 'Swift', 'file_name': '21895-llvm-bitstreamcursor-readrecord.swift', 'mime_type': 'text/plain', 'hash': 8054814409277278076, 'source_dataset': 'data'}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { inject, injectable } from 'inversify';
import * as path from 'path';
import { Uri } from 'vscode';
import { IFileSystem } from '../../platform/types';
import { IDisposableRegistry, IExtensionContext } from '../../types';
import { IWebviewPanel, IWebviewPanelOptions, IWebviewPanelProvider } from '../types';
import { WebviewPanel } from './webviewPanel';

@injectable()
export class WebviewPanelProvider implements IWebviewPanelProvider {
    constructor(
        @inject(IDisposableRegistry) private readonly disposableRegistry: IDisposableRegistry,
        @inject(IFileSystem) private readonly fs: IFileSystem,
        @inject(IExtensionContext) private readonly context: IExtensionContext
    ) {}

    // tslint:disable-next-line:no-any
    public async create(options: IWebviewPanelOptions): Promise<IWebviewPanel> {
        // Allow loading resources from the `<extension folder>/tmp` folder when in webiviews.
        // Used by widgets to place files that are not otherwise accessible.
        const additionalRootPaths = [Uri.file(path.join(this.context.extensionPath, 'tmp'))];
        if (Array.isArray(options.additionalPaths)) {
            additionalRootPaths.push(...options.additionalPaths.map((item) => Uri.file(item)));
        }
        return new WebviewPanel(this.fs, this.disposableRegistry, options, additionalRootPaths);
    }
}

{'repo_name': 'DonJayamanne/pythonVSCode', 'stars': '1956', 'repo_language': 'TypeScript', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': -3703531729050098063, 'source_dataset': 'data'}


package org.squirrelframework.foundation.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;

public class DuplicateChecker {

    private static final Logger logger = LoggerFactory.getLogger(DuplicateChecker.class);

    private DuplicateChecker() {}

    public static void checkDuplicate(Class<?> cls) {
        checkDuplicate(cls.getName().replace('.', '/') + ".class");
    }

    public static void checkDuplicate(String path) {
        try {
            // Search file within classpath
            Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(path);
            Set<String> files = new HashSet<String>();
            while (urls.hasMoreElements()) {
                URL url = urls.nextElement();
                if (url != null) {
                    String file = url.getFile();
                    if (file != null && file.length() > 0) {
                        files.add(file);
                    }
                }
            }
            // If there are multiple files, it means duplicate jar placed in the classpath
            if (files.size() > 1) {
                logger.error("Duplicate class " + path + " in " + files.size() + " jar " + files);
            }
        } catch (Throwable e) {
            logger.error(e.getMessage(), e);
        }
    }
}

{'repo_name': 'hekailiang/squirrel', 'stars': '1458', 'repo_language': 'Java', 'file_name': 'StateMachineContextTest.java', 'mime_type': 'text/x-java', 'hash': 8931131347143577338, 'source_dataset': 'data'}


Resend unlock instructions

<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
  <%= devise_error_messages! %>

<%= f.label :email %>

  <%= f.email_field :email %>

<%= f.submit "Resend unlock instructions" %>

<% end %>

<%= render :partial => "devise/shared/links" %>

{'repo_name': 'Mehonoshin/smartvpn-billing', 'stars': '247', 'repo_language': 'CSS', 'file_name': 'bootstrap.css', 'mime_type': 'text/plain', 'hash': 3695677504871574466, 'source_dataset': 'data'}


{'repo_name': 'box/mojito', 'stars': '233', 'repo_language': 'Java', 'file_name': 'VirtualAssetPerformanceTest.java', 'mime_type': 'text/x-java', 'hash': -6439746411434926100, 'source_dataset': 'data'}


import gl,{ UNI_MODEL_MAT_NAME,UNI_NORM_MAT_NAME } from "../gl.js";
import fungi from "../fungi.js";

//Shortcut to create a shader based on the vert/frag progress text
function createShader(name,vert,frag){
	var shader = new ShaderBuilder(vert,frag);
	gl.res.shaders[name] = shader;
	return shader;
}

//Deserialize Downloaded Shader files to create shaders and materials.
function loadShader(js){
	//.............................
	//create shader
	var uniforms = [];
	var tfeedback = (js.shader.transFeedback != undefined)? js.shader.transFeedback : null;

	var shader = new ShaderBuilder(js.vertex,js.fragment,tfeedback);
	gl.res.shaders[js.shader.name] = shader;

	//.............................
	//Handle Uniforms
	var uniforms = (js.shader.uniforms && js.shader.uniforms.length > 0)? js.shader.uniforms.slice() : [];

	shader.useModelMatrix = js.shader.useModelMatrix;
	if(shader.useModelMatrix) uniforms.push(UNI_MODEL_MAT_NAME,"mat4"); //Special Uniform added to list

	shader.useNormalMatrix = js.shader.useNormalMatrix;
	if(shader.useNormalMatrix) uniforms.push(UNI_NORM_MAT_NAME,"mat3"); //Special Uniform added to list

	if(uniforms.length > 0) shader.prepareUniforms(uniforms); //shader.prepareUniforms(UNI_MODEL_MAT_NAME,"mat4");

	//.............................
	//Handle Ubo
	if(js.shader.useUBOTransform)	shader.prepareUniformBlocks(gl.UBOTransform,0);

	//.............................
	//load materials
	var mat,uni,uList = [];
	for(var i=0; i < js.materials.length; i++){
		mat = Material.create(js.materials[i].name,js.shader.name);

		if(js.materials[i].useBlending !== undefined)				mat.useBlending				= js.materials[i].useBlending;
		if(js.materials[i].useSampleAlphaCoverage !== undefined)	mat.useSampleAlphaCoverage	= js.materials[i].useSampleAlphaCoverage;

		if(js.materials[i].uniforms){
			uni = js.materials[i].uniforms;

			//Process special uniforms
			var uList = [];
			for(var u=0; u < uni.length; u+=3){
				switch(uni[u+1]){
					case "color":
						uList.push(uni[u], gl.rgbArray(uni[u+2]) ); break;
					case "acolor":
						uList.push(uni[u], gl.rgbaArray(uni[u+2]) ); break;
					case "tex":
						uList.push(uni[u], gl.res.textures[ uni[u+2] ]); break;
					default:
						uList.push(uni[u], uni[u+2]); break;
				}
			}

			mat.setUniforms(uList);
		}
	}
}

//------------------------------------------------------
// Material
//------------------------------------------------------
class Material{
	static create(name,shaderName){
		var m = new Material();
		m.shader = gl.res.shaders[shaderName];

		gl.res.materials[name] = m;
		return m;
	}

	constructor(){
		this.shader = null;
		this.uniforms = [];

		this.useBlending = false;
		//this.useModelMatrix = true;
		//this.useNormalMatrix = false;
		this.useSampleAlphaCoverage = false;
	}

	setUniforms(uName,uValue){
		var ary = (arguments.length == 1)? arguments[0] : arguments;
		for(var i=0; i < ary.length; i+=2) this.uniforms[ary[i]] = ary[i+1];  return this;
	}

	applyUniforms(){
		var ary = []; //TODO, this is just a hack, Object should have these as an array, no need to gen array each frame
		for(var n in this.uniforms) ary.push(n,this.uniforms[n]);

		this.shader.setUniforms.apply(this.shader,ary);

		//for(var n in this.uniforms) this.shader.setUniforms(n,this.uniforms[n]); //TODO, this is an issue with multiple textures in one shader
		return this;
	}
}

//------------------------------------------------------
// Shaders
//------------------------------------------------------
class ShaderBuilder{
	constructor(vertShader,fragShader,tfeedback){
		this.program = gl.createProgramFromText(vertShader,fragShader,true,tfeedback);
		this.useModelMatrix = true;
		this.useNormalMatrix = false;

		if(this.program != null){
			gl.ctx.useProgram(this.program);
			this._UniformList = [];		//List of Uniforms that have been loaded in. Key=UNIFORM_NAME {loc,type}
			this._TextureList = [];		//List of texture uniforms, Indexed {loc,tex}
		}
	}

	//---------------------------------------------------
	// Methods For Shader Prep.
	//---------------------------------------------------
	//Takes in unlimited arguments. Its grouped by two so for example (UniformName,UniformType): "uColors","3fv"
	prepareUniforms(uName,uType){
		var ary = (arguments.length == 1)? arguments[0] : arguments,
			loc = 0;

		for(var i=0; i < ary.length; i+=2){
			loc = gl.ctx.getUniformLocation(this.program,ary[i]);
			if(loc != null) this._UniformList[ary[i]] = {loc:loc,type:ary[i+1]};
			else console.log("Uniform not found " + ary[i]);
		}
		return this;
	}

	prepareUniformBlocks(ubo,blockIndex){
		var ind = 0;
		for(var i=0; i < arguments.length; i+=2){
			//ind = this.gl.getUniformBlockIndex(this.program,arguments[i].blockName); //TODO This function does not return block index, need to pass that value in param
			//console.log("Uniform Block Index",ind,ubo.blockName,ubo.blockPoint);

			gl.ctx.uniformBlockBinding(this.program, arguments[i+1], arguments[i].blockPoint);

			//console.log(this.gl.getActiveUniformBlockParameter(this.program, 0, this.gl.UNIFORM_BLOCK_DATA_SIZE)); //Get Size of Uniform Block
			//console.log(this.gl.getActiveUniformBlockParameter(this.program, 0, this.gl.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES));
			//console.log(this.gl.getActiveUniformBlockParameter(this.program, 0, this.gl.UNIFORM_BLOCK_ACTIVE_UNIFORMS));
			//console.log(this.gl.getActiveUniformBlockParameter(this.program, 0, this.gl.UNIFORM_BLOCK_BINDING));
		}
		return this;
	}

	//Takes in unlimited arguments. Its grouped by two so for example (UniformName,CacheTextureName): "uMask01","tex001";
	/*
	prepareTextures(uName,TextureCacheName){
		if(arguments.length % 2 != 0){ console.log("prepareTextures needs arguments to be in pairs."); return this; }

		var loc = 0,tex = "";
		for(var i=0; i < arguments.length; i+=2){
			tex = gl.res.textures[arguments[i+1]];
			if(tex === undefined){ console.log("Texture not found in cache " + arguments[i+1]); continue; }

			loc = gl.getUniformLocation(this.program,arguments[i]);
			if(loc != null) _TextureList.push({loc:loc,tex:tex});
		}
		return this;
	}
	*/

	//---------------------------------------------------
	// Setters Getters
	//---------------------------------------------------
	//Uses a 2 item group argument array. Uniform_Name, Uniform_Value;
	setUniforms(uName,uValue){
		if(arguments.length % 2 != 0){ console.log("setUniforms needs arguments to be in pairs."); return this; }

		var texCnt = 0, //TODO Loading textures only works if doing all uniforms in one go, material loads one at a time.
			name;

		for(var i=0; i < arguments.length; i+=2){
			name = arguments[i];
			if(this._UniformList[name] === undefined){ console.log("uniform not found " + name); return this; }

			switch(this._UniformList[name].type){
				case "float":	gl.ctx.uniform1f(this._UniformList[name].loc, arguments[i+1]); break;
				case "vec2":	gl.ctx.uniform2fv(this._UniformList[name].loc, arguments[i+1]); break;
				case "vec3":	gl.ctx.uniform3fv(this._UniformList[name].loc, arguments[i+1]); break;
				case "vec4":	gl.ctx.uniform4fv(this._UniformList[name].loc, arguments[i+1]); break;
				case "mat4":	gl.ctx.uniformMatrix4fv(this._UniformList[name].loc,false,arguments[i+1]); break;
				case "mat3":	gl.ctx.uniformMatrix3fv(this._UniformList[name].loc,false,arguments[i+1]); break;
				case "mat2x4": 	gl.ctx.uniformMatrix2x4fv(this._UniformList[name].loc,false,arguments[i+1]); break;
				case "sample2D":
					gl.ctx.activeTexture(gl.ctx.TEXTURE0 + texCnt);
					gl.ctx.bindTexture(gl.ctx.TEXTURE_2D,arguments[i+1]);
					gl.ctx.uniform1i(this._UniformList[name].loc,texCnt);
					texCnt++;
					break;
				default: console.log("unknown uniform type for " + name); break;
			}
		}
		return this;
	}

	//---------------------------------------------------
	// Methods
	//---------------------------------------------------
	activate(){ gl.ctx.useProgram(this.program); return this; }
	deactivate(){ gl.ctx.useProgram(null); return this; }

	//function helps clean up resources when shader is no longer needed.
	dispose(){
		//unbind the program if its currently active
		if(gl.ctx.getParameter(this.gl.CURRENT_PROGRAM) === this.program) gl.ctx.useProgram(null);
		gl.ctx.deleteProgram(this.program);
	}

	preRender(){
		gl.ctx.useProgram(this.program); //Save a function call and just activate this shader program on preRender

		//If passing in arguments, then lets push that to setUniforms for handling. Make less line needed in the main program by having preRender handle Uniforms
		if(arguments.length > 0) this.setUniforms.apply(this,arguments);

		//..........................................
		//Prepare textures that might be loaded up.
		//TODO, After done rendering need to deactivate the texture slots
		if(this._TextureList.length > 0){
			var texSlot;
			for(var i=0; i < this._TextureList.length; i++){
				texSlot = gl.ctx["TEXTURE" + i];
				//gl.ctx.activeTexture(texSlot);
				//gl.ctx.bindTexture(gl.ctx.TEXTURE_2D,this._TextureList[i].tex);
				//gl.ctx.uniform1i(this._TextureList[i].loc,i);
			}
		}

		return this;
	}
}

export default {
	create:createShader,
	load:loadShader,

	Material:Material,
	Builder:ShaderBuilder
}

{'repo_name': 'sketchpunk/FunWithWebGL2', 'stars': '423', 'repo_language': 'JavaScript', 'file_name': 'Quad1U.js', 'mime_type': 'text/x-java', 'hash': -8397286434024584841, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/translucent"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/songDowningRecycle"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="65dp"
        tools:listitem="@layout/recycler_downing_item">

    </android.support.v7.widget.RecyclerView>
    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="65dp"
        android:overScrollMode="never"/>

</LinearLayout>

{'repo_name': 'jsyjst/Yuan-SxMusic', 'stars': '129', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/html', 'hash': 2563209970814225927, 'source_dataset': 'data'}


package com.fashare.databinding

import io.reactivex.Observable
import io.reactivex.Observer
import io.reactivex.disposables.Disposable

/**
 * <pre>
 * author : jinliangshan
 * e-mail : 153614131@qq.com
 * desc   :
</pre> *
 */

open class TwoWayListVM<T>: ListVM<T>(){
    /**
     * lastItem: T          视图列表里的最后一条数据，无则为 null
     * 分两种情况:
     *      onRefresh(): lastItem = null, 直接拉取数据
     *      onLoadMore(): lastItem = 最后一条, 由lastItem作为参数，加载更多
     */
    open val loadTask: ((T?) -> Observable<List<T>>)? = null

    /**
     * originData: List<T>          当前视图列表里的数据
     * refreshable: Refreshable?    触发 loadTask 的下拉刷新控件
     * 分两种情况:
     *      onRefresh(): lastItem = null,       newData = netData
     *      onLoadMore(): lastItem = 最后一条,   netData = newData + originData
     */
    open val loadTaskObserver : ((List<T>, Refreshable?) -> Observer<List<T>>)? = { originData: List<T>, refreshable: Refreshable? ->
        object: Observer<List<T>>{
            override fun onNext(netData: List<T>) {
                val lastItem = if(!originData.isEmpty()) originData[originData.size-1] else null
                val isLoadMore = lastItem != null

                val newData = ArrayList<T>()
                if (isLoadMore) {
                    newData.addAll(originData)
                }
                newData.addAll(netData)

                data.clear()
                data.addAll(newData)
            }

            override fun onComplete() {
                refreshable?.endRefresh()
            }

            override fun onError(e: Throwable) {}

            override fun onSubscribe(d: Disposable) {}
        }
    }

    interface Refreshable{
        fun setOnRefresh(callback: CallBack?)
        fun endRefresh()

        interface CallBack {
            fun onRefresh()
            fun onLoadMore()
        }
    }
}

{'repo_name': 'fashare2015/MVVM-JueJin', 'stars': '405', 'repo_language': 'Java', 'file_name': 'colors_notify.xml', 'mime_type': 'text/xml', 'hash': 7050828277955840308, 'source_dataset': 'data'}


<!DOCTYPE mapper
	PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
	"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="TbSysFtpTranSegm">

	<resultMap type="com.netsteadfast.greenstep.po.hbm.TbSysFtpTranSegm" id="baseResultMap">
		<id column="OID" property="oid"/>
		<result column="FTP_ID" property="ftpId"/>
		<result column="TRAN_ID" property="tranId"/>
		<result column="NAME" property="name"/>
		<result column="BEGIN" property="begin"/>
		<result column="END" property="end"/>
		<result column="CUSERID" property="cuserid"/>
		<result column="CDATE" property="cdate"/>
		<result column="UUSERID" property="uuserid"/>
		<result column="UDATE" property="udate"/>
	</resultMap>

	<select id="selectByParams" resultMap="baseResultMap" >
		select * from tb_sys_ftp_tran_segm where 1=1
		<if test="oid != null">
			AND OID = #{oid}
		</if>
		<if test="ftpId != null">
			AND FTP_ID = #{ftpId}
		</if>
		<if test="tranId != null">
			AND TRAN_ID = #{tranId}
		</if>
		<if test="name != null">
			AND NAME = #{name}
		</if>
	</select>

	<select id="selectByValue" resultMap="baseResultMap" >
		select * from tb_sys_ftp_tran_segm where 1=1
		<if test="oid != null">
			AND OID = #{oid}
		</if>
		<if test="ftpId != null">
			AND FTP_ID = #{ftpId}
		</if>
		<if test="tranId != null">
			AND TRAN_ID = #{tranId}
		</if>
		<if test="name != null">
			AND NAME = #{name}
		</if>
	</select>

</mapper>

{'repo_name': 'billchen198318/bamboobsc', 'stars': '188', 'repo_language': 'Java', 'file_name': 'org.eclipse.wst.common.project.facet.core.xml', 'mime_type': 'text/xml', 'hash': 8523788615753043009, 'source_dataset': 'data'}


#pragma once

#include <Common/Base/hkBase.h>
#include "hkbBindable_0.h"
#include "hkbGenerator_0.h"
#include "hkbBoneWeightArray_0.h"

class BSBoneSwitchGeneratorBoneData : public hkbBindable
{
public:
   HK_DECLARE_CLASS_ALLOCATOR( HK_MEMORY_CLASS_BEHAVIOR_RUNTIME );
   HK_DECLARE_REFLECTION();

public:
   HK_FORCE_INLINE BSBoneSwitchGeneratorBoneData(void) {}
   HK_FORCE_INLINE BSBoneSwitchGeneratorBoneData( hkFinishLoadedObjectFlag flag ) : hkbBindable(flag)
   , m_pGenerator(flag)
   , m_spBoneWeight(flag)
      {}
   // Properties
   hkChar m_padding_1[4];
   hkRefPtr<hkbGenerator> m_pGenerator;
   hkRefPtr<hkbBoneWeightArray> m_spBoneWeight;
   hkChar m_padding_2[8];
};
extern const hkClass BSBoneSwitchGeneratorBoneDataClass;

{'repo_name': 'ShikyoKira/Project-New-Reign---Nemesis-Main', 'stars': '170', 'repo_language': 'Python', 'file_name': '#zcbe$0.txt', 'mime_type': 'text/plain', 'hash': 2657161786454229222, 'source_dataset': 'data'}


// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "rpcsend.h"
#include "rpcsend_private.h"
#include "rpcserviceaddress.h"
#include <vespa/messagebus/network/rpcnetwork.h>
#include <vespa/messagebus/tracelevel.h>
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/errorcode.h>
#include <vespa/fnet/channel.h>
#include <vespa/fnet/frt/reflection.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/lambdatask.h>

#include <vespa/vespalib/data/slime/cursor.h>

using vespalib::make_string;
using vespalib::makeLambdaTask;

namespace mbus {

using network::internal::ReplyContext;
using network::internal::SendContext;

namespace {

class FillByCopy final : public PayLoadFiller
{
public:
    FillByCopy(BlobRef payload) : _payload(payload) { }
    void fill(FRT_Values & v) const override {
        v.AddData(_payload.data(), _payload.size());
    }
    void fill(const vespalib::Memory & name, vespalib::slime::Cursor & v) const override {
        v.setData(name, vespalib::Memory(_payload.data(), _payload.size()));
    }
private:
    BlobRef _payload;
};

class FillByHandover final : public PayLoadFiller
{
public:
    FillByHandover(Blob payload) : _payload(std::move(payload)) { }
    void fill(FRT_Values & v) const override {
        size_t sz = _payload.size();
        v.AddData(std::move(_payload.payload()), sz);
    }
    void fill(const vespalib::Memory & name, vespalib::slime::Cursor & v) const override {
        v.setData(name, vespalib::Memory(_payload.data(), _payload.size()));
    }
private:
    mutable Blob _payload;
};

}

RPCSend::RPCSend() :
    _net(nullptr),
    _clientIdent("client"),
    _serverIdent("server")
{ }

RPCSend::~RPCSend() = default;

void
RPCSend::attach(RPCNetwork &net)
{
    _net = &net;
    const string &prefix = _net->getIdentity().getServicePrefix();
    if (!prefix.empty()) {
        _clientIdent = make_string("'%s'", prefix.c_str());
        _serverIdent = _clientIdent;
    }

    FRT_ReflectionBuilder builder(&_net->getSupervisor());
    build(builder);
}

void
RPCSend::replyError(FRT_RPCRequest *req, const vespalib::Version &version, uint32_t traceLevel, const Error &err)
{
    Reply::UP reply(new EmptyReply());
    reply->setContext(Context(new ReplyContext(*req, version)));
    reply->getTrace().setLevel(traceLevel);
    reply->addError(err);
    handleReply(std::move(reply));
}

void
RPCSend::handleDiscard(Context ctx)
{
    ReplyContext::UP tmp(static_cast<ReplyContext*>(ctx.value.PTR));
    FRT_RPCRequest &req = tmp->getRequest();
    FNET_Channel *chn = req.GetContext()._value.CHANNEL;
    req.SubRef();
    chn->Free();
}

void
RPCSend::sendByHandover(RoutingNode &recipient, const vespalib::Version &version, Blob payload, duration timeRemaining)
{
    send(recipient, version, FillByHandover(std::move(payload)), timeRemaining);
}

void
RPCSend::send(RoutingNode &recipient, const vespalib::Version &version, BlobRef payload, duration timeRemaining)
{
    send(recipient, version, FillByCopy(payload), timeRemaining);
}

void
RPCSend::send(RoutingNode &recipient, const vespalib::Version &version,
              const PayLoadFiller & payload, duration timeRemaining)
{
    auto ctx = std::make_unique<SendContext>(recipient, timeRemaining);
    auto &address = static_cast<RPCServiceAddress&>(recipient.getServiceAddress());
    const Message &msg = recipient.getMessage();
    Route route = recipient.getRoute();
    Hop hop = route.removeHop(0);

    FRT_RPCRequest *req = _net->allocRequest();
    encodeRequest(*req, version, route, address, msg, recipient.getTrace().getLevel(),  payload, timeRemaining);

    if (ctx->getTrace().shouldTrace(TraceLevel::SEND_RECEIVE)) {
        ctx->getTrace().trace(TraceLevel::SEND_RECEIVE,
                              make_string("Sending message (version %s) from %s to '%s' with %.2f seconds timeout.",
                                          version.toString().c_str(), _clientIdent.c_str(),
                                          address.getServiceName().c_str(), vespalib::to_s(ctx->getTimeout())));
    }

    if (hop.getIgnoreResult()) {
        address.getTarget().getFRTTarget().InvokeVoid(req);
        if (ctx->getTrace().shouldTrace(TraceLevel::SEND_RECEIVE)) {
            ctx->getTrace().trace(TraceLevel::SEND_RECEIVE,
                                  make_string("Not waiting for a reply from '%s'.", address.getServiceName().c_str()));
        }
        auto reply = std::make_unique<EmptyReply>();
        reply->getTrace().swap(ctx->getTrace());
        _net->getOwner().deliverReply(std::move(reply), recipient);
    } else {
        SendContext *ptr = ctx.release();
        req->SetContext(FNET_Context(ptr));
        address.getTarget().getFRTTarget().InvokeAsync(req, vespalib::to_s(ptr->getTimeout()), this);
    }
}

void
RPCSend::RequestDone(FRT_RPCRequest *req)
{
    doRequestDone(req);
}

void
RPCSend::doRequestDone(FRT_RPCRequest *req) {
    SendContext::UP ctx(static_cast<SendContext*>(req->GetContext()._value.VOIDP));
    const string &serviceName = static_cast<RPCServiceAddress&>(ctx->getRecipient().getServiceAddress()).getServiceName();
    Reply::UP reply;
    Error error;
    Trace & trace = ctx->getTrace();
    if (!req->CheckReturnTypes(getReturnSpec())) {
        reply = std::make_unique<EmptyReply>();
        switch (req->GetErrorCode()) {
            case FRTE_RPC_TIMEOUT:
                error = Error(ErrorCode::TIMEOUT,
                              make_string("A timeout occured while waiting for '%s' (%g seconds expired); %s",
                                          serviceName.c_str(), vespalib::to_s(ctx->getTimeout()), req->GetErrorMessage()));
                break;
            case FRTE_RPC_CONNECTION:
                error = Error(ErrorCode::CONNECTION_ERROR,
                              make_string("A connection error occured for '%s'; %s",
                                          serviceName.c_str(), req->GetErrorMessage()));
                break;
            default:
                error = Error(ErrorCode::NETWORK_ERROR,
                              make_string("A network error occured for '%s'; %s",
                                          serviceName.c_str(), req->GetErrorMessage()));
        }
    } else {
        FRT_Values &ret = *req->GetReturn();
        reply = createReply(ret, serviceName, error, trace.getRoot());
    }
    if (trace.shouldTrace(TraceLevel::SEND_RECEIVE)) {
        trace.trace(TraceLevel::SEND_RECEIVE,
                    make_string("Reply (type %d) received at %s.", reply->getType(), _clientIdent.c_str()));
    }
    reply->getTrace().swap(trace);
    if (error.getCode() != ErrorCode::NONE) {
        reply->addError(error);
    }
    _net->getOwner().deliverReply(std::move(reply), ctx->getRecipient());
    req->SubRef();
}

std::unique_ptr<Reply>
RPCSend::decode(vespalib::stringref protocolName, const vespalib::Version & version, BlobRef payload, Error & error) const
{
    Reply::UP reply;
    IProtocol * protocol = _net->getOwner().getProtocol(protocolName);
    if (protocol != nullptr) {
        Routable::UP routable = protocol->decode(version, payload);
        if (routable) {
            if (routable->isReply()) {
                reply.reset(static_cast<Reply*>(routable.release()));
            } else {
                error = Error(ErrorCode::DECODE_ERROR, "Payload decoded to a message when expecting a reply.");
            }
        } else {
            error = Error(ErrorCode::DECODE_ERROR,
                          make_string("Protocol '%s' failed to decode routable.", vespalib::string(protocolName).c_str()));
        }

    } else {
        error = Error(ErrorCode::UNKNOWN_PROTOCOL,
                      make_string("Protocol '%s' is not known by %s.", vespalib::string(protocolName).c_str(), _serverIdent.c_str()));
    }
    return reply;
}

void
RPCSend::handleReply(Reply::UP reply)
{
    const IProtocol * protocol = _net->getOwner().getProtocol(reply->getProtocol());
    if (!protocol || protocol->requireSequencing() || !_net->allowDispatchForEncode()) {
        doHandleReply(protocol, std::move(reply));
    } else {
        auto rejected = _net->getExecutor().execute(makeLambdaTask([this, protocol, reply = std::move(reply)]() mutable {
            doHandleReply(protocol, std::move(reply));
        }));
        assert (!rejected);
    }
}

void
RPCSend::doHandleReply(const IProtocol * protocol, Reply::UP reply) {
    ReplyContext::UP ctx(static_cast<ReplyContext*>(reply->getContext().value.PTR));
    FRT_RPCRequest &req = ctx->getRequest();
    string version = ctx->getVersion().toString();
    if (reply->getTrace().shouldTrace(TraceLevel::SEND_RECEIVE)) {
        reply->getTrace().trace(TraceLevel::SEND_RECEIVE, make_string("Sending reply (version %s) from %s.",
                                                                      version.c_str(), _serverIdent.c_str()));
    }
    Blob payload(0);
    if (reply->getType() != 0) {
        payload = protocol->encode(ctx->getVersion(), *reply);
        if (payload.size() == 0) {
            reply->addError(Error(ErrorCode::ENCODE_ERROR, "An error occured while encoding the reply, see log."));
        }
    }
    FRT_Values &ret = *req.GetReturn();
    createResponse(ret, version, *reply, std::move(payload));
    req.Return();
}

void
RPCSend::invoke(FRT_RPCRequest *req)
{
    req->Detach();
    FRT_Values &args = *req->GetParams();

    std::unique_ptr<Params> params = toParams(args);
    IProtocol * protocol = _net->getOwner().getProtocol(params->getProtocol());
    if (protocol == nullptr) {
        replyError(req, params->getVersion(), params->getTraceLevel(),
                   Error(ErrorCode::UNKNOWN_PROTOCOL, make_string("Protocol '%s' is not known by %s.",
                                                                  vespalib::string(params->getProtocol()).c_str(), _serverIdent.c_str())));
        return;
    }
    if (protocol->requireSequencing() || !_net->allowDispatchForDecode()) {
        doRequest(req, protocol, std::move(params));
    } else {
        auto rejected = _net->getExecutor().execute(makeLambdaTask([this, req, protocol, params = std::move(params)]() mutable {
            doRequest(req, protocol, std::move(params));
        }));
        assert (!rejected);
    }
}

void
RPCSend::doRequest(FRT_RPCRequest *req, const IProtocol * protocol, std::unique_ptr<Params> params)
{
    Routable::UP routable = protocol->decode(params->getVersion(), params->getPayload());
    req->DiscardBlobs();
    if ( ! routable ) {
        replyError(req, params->getVersion(), params->getTraceLevel(),
                   Error(ErrorCode::DECODE_ERROR,
                         make_string("Protocol '%s' failed to decode routable.", vespalib::string(params->getProtocol()).c_str())));
        return;
    }
    if (routable->isReply()) {
        replyError(req, params->getVersion(), params->getTraceLevel(),
                   Error(ErrorCode::DECODE_ERROR, "Payload decoded to a reply when expecting a mesage."));
        return;
    }
    Message::UP msg(static_cast<Message*>(routable.release()));
    vespalib::stringref route = params->getRoute();
    if (!route.empty()) {
        msg->setRoute(Route::parse(route));
    }
    msg->setContext(Context(new ReplyContext(*req, params->getVersion())));
    msg->pushHandler(*this, *this);
    msg->setRetryEnabled(params->useRetry());
    msg->setRetry(params->getRetries());
    msg->setTimeReceivedNow();
    msg->setTimeRemaining(params->getRemainingTime());
    msg->getTrace().setLevel(params->getTraceLevel());
    if (msg->getTrace().shouldTrace(TraceLevel::SEND_RECEIVE)) {
        msg->getTrace().trace(TraceLevel::SEND_RECEIVE,
                              make_string("Message (type %d) received at %s for session '%s'.",
                                          msg->getType(), _serverIdent.c_str(), string(params->getSession()).c_str()));
    }
    _net->getOwner().deliverMessage(std::move(msg), params->getSession());
}

} // namespace mbus

{'repo_name': 'vespa-engine/vespa', 'stars': '3207', 'repo_language': 'Java', 'file_name': 'SocketTestApp.java', 'mime_type': 'text/x-c', 'hash': 3321837590632621008, 'source_dataset': 'data'}


error: expected `display`, `visibility`, `source`, `backtrace`, `context`, or `crate_root`
 --> $DIR/attribute-misuse.rs:5:13
  |
5 |     #[snafu(unknown_attribute)]
  |             ^^^^^^^^^^^^^^^^^

error: `source` attribute is only valid on enum variant or struct fields with a name, not on a named struct
  --> $DIR/attribute-misuse.rs:13:13
   |
13 |     #[snafu(source(true))]
   |             ^^^^^^^^^^^^

error: `backtrace` attribute is only valid on enum variant or struct fields with a name, not on a named struct
  --> $DIR/attribute-misuse.rs:14:13
   |
14 |     #[snafu(backtrace)]
   |             ^^^^^^^^^

error: `display` attribute is only valid on enum variants or structs with named fields, not on a field
  --> $DIR/attribute-misuse.rs:23:17
   |
23 |         #[snafu(display("display should not work here"))]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `visibility` attribute is only valid on an enum, enum variants, or a struct with named fields, not on a field
  --> $DIR/attribute-misuse.rs:24:17
   |
24 |         #[snafu(visibility(pub))]
   |                 ^^^^^^^^^^^^^^^

error: `context` attribute is only valid on enum variants or structs with named fields, not on a field
  --> $DIR/attribute-misuse.rs:25:17
   |
25 |         #[snafu(context)]
   |                 ^^^^^^^

{'repo_name': 'shepmaster/snafu', 'stars': '505', 'repo_language': 'Rust', 'file_name': 'shared.rs', 'mime_type': 'text/plain', 'hash': 2989044765501833501, 'source_dataset': 'data'}


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

{'repo_name': 'aterai/java-swing-tips', 'stars': '211', 'repo_language': 'Java', 'file_name': 'jnlp.xml', 'mime_type': 'text/xml', 'hash': -7906284365736879141, 'source_dataset': 'data'}


/*!
 * Bootstrap v3.3.7 (http://getbootstrap.com)
 * Copyright 2011-2016 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
  -webkit-box-shadow: none;
          box-shadow: none;
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
  text-shadow: none;
}
.btn:active,
.btn.active {
  background-image: none;
}
.btn-default {
  text-shadow: 0 1px 0 #fff;
  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #dbdbdb;
  border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
  background-color: #e0e0e0;
  background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
  background-color: #e0e0e0;
  border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
  background-color: #e0e0e0;
  background-image: none;
}
.btn-primary {
  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #265a88;
  background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
  background-color: #265a88;
  border-color: #245580;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
  background-color: #265a88;
  background-image: none;
}
.btn-success {
  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
  background-color: #419641;
  background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
  background-color: #419641;
  border-color: #3e8f3e;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
  background-color: #419641;
  background-image: none;
}
.btn-info {
  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
  background-color: #2aabd2;
  background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
  background-color: #2aabd2;
  border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
  background-color: #2aabd2;
  background-image: none;
}
.btn-warning {
  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
  background-color: #eb9316;
  background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
  background-color: #eb9316;
  border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
  background-color: #eb9316;
  background-image: none;
}
.btn-danger {
  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
  background-color: #c12e2a;
  background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
  background-color: #c12e2a;
  border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
  background-color: #c12e2a;
  background-image: none;
}
.thumbnail,
.img-thumbnail {
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background-color: #e8e8e8;
  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
  background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background-color: #2e6da4;
  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
  background-repeat: repeat-x;
}
.navbar-default {
  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
  background-repeat: repeat-x;
  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  background-repeat: repeat-x;
  border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
  background-repeat: repeat-x;
  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
  border-radius: 0;
}
@media (max-width: 767px) {
  .navbar .navbar-nav .open .dropdown-menu > .active > a,
  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
    color: #fff;
    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
    background-repeat: repeat-x;
  }
}
.alert {
  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
  background-repeat: repeat-x;
  border-color: #b2dba1;
}
.alert-info {
  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
  background-repeat: repeat-x;
  border-color: #9acfea;
}
.alert-warning {
  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
  background-repeat: repeat-x;
  border-color: #f5e79e;
}
.alert-danger {
  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
  background-repeat: repeat-x;
  border-color: #dca7a7;
}
.progress {
  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar {
  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar-success {
  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar-info {
  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar-warning {
  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar-danger {
  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
  background-repeat: repeat-x;
}
.progress-bar-striped {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
  border-radius: 4px;
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
  text-shadow: 0 -1px 0 #286090;
  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
  background-repeat: repeat-x;
  border-color: #2b669a;
}
.list-group-item.active .badge,
.list-group-item.active:hover .badge,
.list-group-item.active:focus .badge {
  text-shadow: none;
}
.panel {
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.panel-default > .panel-heading {
  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
  background-repeat: repeat-x;
}
.panel-primary > .panel-heading {
  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
  background-repeat: repeat-x;
}
.panel-success > .panel-heading {
  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
  background-repeat: repeat-x;
}
.panel-info > .panel-heading {
  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
  background-repeat: repeat-x;
}
.panel-warning > .panel-heading {
  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
  background-repeat: repeat-x;
}
.panel-danger > .panel-heading {
  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
  background-repeat: repeat-x;
}
.well {
  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
  background-repeat: repeat-x;
  border-color: #dcdcdc;
  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}
/*# sourceMappingURL=bootstrap-theme.css.map */

{'repo_name': 'projectmesa/mesa', 'stars': '1111', 'repo_language': 'Python', 'file_name': 'test_visualization.py', 'mime_type': 'text/x-python', 'hash': -2391481469374192355, 'source_dataset': 'data'}