Building configuration...

Current configuration : 77 bytes
!
interface GigabitEthernet3
 no ip address
 shutdown
 negotiation auto
end

{'repo_name': 'napalm-automation/napalm', 'stars': '1518', 'repo_language': 'Python', 'file_name': 'Vagrantfile', 'mime_type': 'text/plain', 'hash': -7390105798206557519, 'source_dataset': 'data'}


snappy-light

Context: #ffffff

{'repo_name': 'rainglow/vscode', 'stars': '1078', 'repo_language': 'Shell', 'file_name': 'shrek-contrast.json', 'mime_type': 'text/plain', 'hash': 6059437735852776238, 'source_dataset': 'data'}


// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Runtime.Serialization;

namespace BuildXL.Ide.JsonRpc
{
    /// <summary>
    /// The parameters for the "dscript/specsForModule" request.
    /// </summary>
    [DataContract]
    public sealed class SpecsForModuleParams
    {
        /// <summary>
        ///  The module identifier to return the spec for.
        /// </summary>
        [DataMember(Name = "moduleDescriptor")]
        public ModuleDescriptor ModuleDescriptor { get; set; }
    }
}

{'repo_name': 'microsoft/BuildXL', 'stars': '628', 'repo_language': 'C#', 'file_name': 'DiagnosticProcessor.cs', 'mime_type': 'text/plain', 'hash': -5368757419966542872, 'source_dataset': 'data'}


# Build / Install plugin containing Qt support structures

set( CMAKE_AUTOMOC ON )

set( qt_headers_public
  image_container.h
  image_io.h
  )

kwiver_install_headers(
  SUBDIR     arrows/qt
  ${qt_headers_public}
  )

kwiver_install_headers(
  ${CMAKE_CURRENT_BINARY_DIR}/kwiver_algo_qt_export.h
  NOPATH   SUBDIR     arrows/qt
  )

set( qt_sources
  image_container.cxx
  image_io.cxx
  )

if( KWIVER_ENABLE_PROCESSES )
  list(APPEND qt_headers_public
    EmbeddedPipelineWorker.h
    )

  list(APPEND qt_sources
    EmbeddedPipelineWorker.cxx
    )
endif()

kwiver_add_library( kwiver_algo_qt
  ${qt_headers_public}
  ${qt_sources}
  )
target_link_libraries( kwiver_algo_qt
  PUBLIC  kwiver_algo_core
          Qt5::Gui
          Qt5::Core
  )
if( KWIVER_ENABLE_PROCESSES )
  target_link_libraries( kwiver_algo_qt
    PUBLIC  kwiver_adapter
            sprokit_pipeline
    )
endif()

algorithms_create_plugin( kwiver_algo_qt
  register_algorithms.cxx
  )

if( KWIVER_ENABLE_TESTS )
  add_subdirectory( tests )
endif()

if (KWIVER_ENABLE_TOOLS)
  add_subdirectory(applets)
endif()

{'repo_name': 'Kitware/kwiver', 'stars': '127', 'repo_language': 'C++', 'file_name': 'gpu.h', 'mime_type': 'text/x-c++', 'hash': 6092078235190146959, 'source_dataset': 'data'}


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title></title>

{'repo_name': 'xugaoyi/vuepress-theme-vdoing', 'stars': '343', 'repo_language': 'Vue', 'file_name': 'fn.js', 'mime_type': 'text/plain', 'hash': -873272986758157059, 'source_dataset': 'data'}


---
# 1. Create an ECS cluster via AWS console, to create IAM profiles, and delete the cluster
# 1. Create an ECR
# 1. Create a new stack in CloudFormation at ap-northeast-1 region
# 1. Launch AWS CloudFormation Designer and paste this yaml to it
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS CloudFormation template to create an ECS cluster with a new VPC
Mappings:
  VpcCidrs:
    ap-northeast-1:
      vpc: 10.123.0.0/16
      pubsubnet1: 10.123.0.0/24
      pubsubnet2: 10.123.1.0/24
Parameters:
  EcsRepository:
    Type: String
    Description: Image to use for containers. repository-url/image:tag.
  EcsAmiId:
    Type: String
    Description: ECS AMI Id. Find AMIs whose name contains 'ecs-optimized'.
  EcsInstanceType:
    Type: String
    Description: ECS EC2 instance type
    Default: t2.micro
    ConstraintDescription: must be a valid EC2 instance type.
  AsgMaxSize:
    Type: Number
    Description: Maximum size and initial Desired Capacity of ECS Auto Scaling Group
    Default: '2'
  IamRoleInstanceProfile:
    Type: String
    Description: Name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The profile can be automatically created if you create an ECS cluster via AWS console.
    Default: ecsInstanceRole
  IamRoleServiceProfile:
    Type: String
    Description: Name or the Amazon Resource Name (ARN) of the service profile associated with the IAM role for the instance. The profile can be automatically created if you create an ECS cluster via AWS console.
    Default: ecsServiceRole
  EcsClusterName:
    Type: String
    Description: ECS Cluster Name
    Default: default
Resources:
  Vpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !FindInMap [VpcCidrs, !Ref "AWS::Region", vpc]
      EnableDnsSupport: true
      EnableDnsHostnames: true
  PubSubnetAz1:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref Vpc
      CidrBlock: !FindInMap [VpcCidrs, !Ref "AWS::Region", pubsubnet1]
      AvailabilityZone: !Select
        - '0'
        - Fn::GetAZs: !Ref "AWS::Region"
  PubSubnetAz2:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref Vpc
      CidrBlock: !FindInMap [VpcCidrs, !Ref "AWS::Region", pubsubnet2]
      AvailabilityZone: !Select
        - '1'
        - Fn::GetAZs: !Ref "AWS::Region"
  InternetGateway:
    Type: AWS::EC2::InternetGateway
  AttachGateway:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: !Ref Vpc
      InternetGatewayId: !Ref InternetGateway
  RouteViaIgw:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref Vpc
  PublicRouteViaIgw:
    Type: AWS::EC2::Route
    DependsOn: AttachGateway
    Properties:
      RouteTableId: !Ref RouteViaIgw
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId: !Ref InternetGateway
  PubSubnet1RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PubSubnetAz1
      RouteTableId: !Ref RouteViaIgw
  PubSubnet2RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PubSubnetAz2
      RouteTableId: !Ref RouteViaIgw
  ElbSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: ELB Allowed Ports
      VpcId: !Ref Vpc
      SecurityGroupIngress:
      - IpProtocol: tcp
        FromPort: 80
        ToPort: 8080
        CidrIp: 0.0.0.0/0
  EcsSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: ECS Allowed Ports
      VpcId: !Ref Vpc
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 8080
          ToPort: 8080
          CidrIp: 0.0.0.0/0
        - IpProtocol: tcp
          FromPort: '1'
          ToPort: '65535'
          SourceSecurityGroupId: !Ref ElbSecurityGroup
  EcsElasticLoadBalancer:
    Type: AWS::ElasticLoadBalancing::LoadBalancer
    Properties:
      SecurityGroups: [!Ref ElbSecurityGroup]
      Subnets: [!Ref PubSubnetAz1, !Ref PubSubnetAz2]
      CrossZone: true
      Listeners:
      - LoadBalancerPort: 80
        InstancePort: 8080
        Protocol: TCP
      HealthCheck:
        Target: HTTP:8080/
        HealthyThreshold: '2'
        UnhealthyThreshold: '10'
        Interval: '30'
        Timeout: '5'
  EcsInstanceLcWithoutKeyPair:
    Type: AWS::AutoScaling::LaunchConfiguration
    Properties:
      ImageId: !Ref EcsAmiId
      InstanceType: !Ref EcsInstanceType
      AssociatePublicIpAddress: true
      IamInstanceProfile: !Ref IamRoleInstanceProfile
      SecurityGroups: [!Ref EcsSecurityGroup]
      UserData: !Base64
        Fn::Join:
          - ''
          - - "#!/bin/bash\n"
            - "echo ECS_CLUSTER="
            - !Ref "EcsClusterName"
            - " >> /etc/ecs/ecs.config"
  EcsInstanceAsg:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      VPCZoneIdentifier: [!Ref PubSubnetAz1, !Ref PubSubnetAz2]
      LaunchConfigurationName: !Ref EcsInstanceLcWithoutKeyPair
      MinSize: '1'
      MaxSize: !Ref AsgMaxSize
      DesiredCapacity: !Ref AsgMaxSize
      Tags:
      - Key: Name
        Value: !Join
        - ''
        - - 'ECS Instance - '
          - !Ref "AWS::StackName"
        PropagateAtLaunch: true
  EcsCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: !Ref EcsClusterName
  EcsTaskDef:
    Type: AWS::ECS::TaskDefinition
    Properties:
      ContainerDefinitions:
      - Image: !Ref EcsRepository
        Command: [yarn, run, landingpage]
        Memory: 256
        Name: cattaz-container
        PortMappings:
        - ContainerPort: 8080
          HostPort: 8080
          Protocol: tcp
  EcsService:
    Type: AWS::ECS::Service
    Properties:
      Cluster: !Ref EcsCluster
      Role: !Ref IamRoleServiceProfile
      TaskDefinition: !Ref EcsTaskDef
      DesiredCount: 1
      LoadBalancers:
      - ContainerName: cattaz-container
        ContainerPort: 8080
        LoadBalancerName: !Ref EcsElasticLoadBalancer
Outputs:
  EcsInstanceAsgName:
    Description: Auto Scaling Group Name for ECS Instances
    Value: !Ref EcsInstanceAsg
  EcsElbName:
    Description: Load Balancer for ECS Service
    Value: !Ref EcsElasticLoadBalancer

{'repo_name': 'FujitsuLaboratories/cattaz', 'stars': '149', 'repo_language': 'JavaScript', 'file_name': 'config.js', 'mime_type': 'text/x-java', 'hash': 4410684608873783894, 'source_dataset': 'data'}


{'repo_name': 'sendbird/SendBird-Android', 'stars': '165', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/html', 'hash': 8961605518300127471, 'source_dataset': 'data'}


incomplete concrete ConjunctionRomance of Conjunction =
  CatRomance ** open CommonRomance, ResRomance, Coordination, Prelude in {

  flags optimize=all_subs ;

  lin

    ConjS conj ss = conjunctDistrTable Mood conj ss ;

    ConjAdv conj ss = conjunctDistrSS conj ss ;

    ConjNP conj ss = heavyNP (conjunctDistrTable Case conj ss ** {
      a = conjAgr (Ag Masc conj.n P3) ss.a ;
      hasClit = False ; isNeg = ss.isNeg
      }) ;
    ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
      isPre = ss.isPre
      } ;
    ConjRS conj ss = conjunctDistrTable2 Mood Agr conj ss ** {
      c = ss.c
      } ;

    ConjIAdv = conjunctDistrSS ;

    ConjCN co ns = conjunctDistrTable Number co ns ** {g = ns.g} ;

-- These fun's are generated from the list cat's.

    BaseS = twoTable Mood ;
    ConsS = consrTable Mood comma ;
    BaseAdv = twoSS ;
    ConsAdv = consrSS comma ;
    BaseNP x y = {
      s1 = \\c => (x.s ! c).ton ;
      s2 = \\c => (y.s ! conjunctCase c).ton ; ----e (conjunctCase c) ;
      a = conjAgr x.a y.a ; isNeg = orB x.isNeg y.isNeg
      } ;
    ConsNP x xs = {
      s1 = \\c => (x.s ! c).ton ++ comma ++ xs.s1 ! conjunctCase c ; ----e (conjunctCase c) ;
      s2 = \\c => xs.s2 ! c ; ----e (conjunctCase c) ;
      a = conjAgr x.a xs.a ; isNeg = orB x.isNeg xs.isNeg
      } ;
    BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
    ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
    BaseRS x y = twoTable2 Mood Agr x y ** {c = y.c} ;
    ConsRS xs x = consrTable2 Mood Agr comma xs x ** {c = xs.c} ;
    BaseIAdv = twoSS ;
    ConsIAdv = consrSS comma ;
    BaseCN x y = twoTable Number x y ** {g = conjGender x.g y.g} ;
    ConsCN x xs = consrTable Number comma x xs ** {g = conjGender x.g xs.g} ;

  lincat
    [S] = {s1,s2 : Mood => Str} ;
    [Adv] = {s1,s2 : Str} ;
    [AdV] = {s1,s2 : Str} ;
    [IAdv] = {s1,s2 : Str} ;
    [NP] = {s1,s2 : Case => Str ; a : Agr ; isNeg : Bool} ;
    [AP] = {s1,s2 : AForm  => Str ; isPre : Bool} ;
    [RS] = {s1,s2 : Mood => Agr => Str ; c : Case} ;
    [CN] = {s1,s2 : Number => Str ; g : Gender} ;

}

{'repo_name': 'GrammaticalFramework/GF', 'stars': '186', 'repo_language': 'Grammatical Framework', 'file_name': 'format', 'mime_type': 'text/plain', 'hash': 8152914260140069500, 'source_dataset': 'data'}


# Thor 隐私政策

Thor 非常重视您的隐私。所有使用产生的数据只会存储在设备本地，不会有任何数据上传（Thor 是一个完全的本地单机应用，甚至没有远程服务器）。并且没有任何的用户行为或者应用使用统计数据产生或上传。

本文内容或者在线存储服务中所涉及的三方品牌及标识提及均为文字引用，与相关品牌及商标无关。

在线查看地址（[https://github.com/PixelCyber/Thor/blob/master/privacy/privacy-zh-Hans.md](https://github.com/PixelCyber/Thor/blob/master/privacy/privacy-zh-Hans.md)）

### 我们收集或者访问哪些个人信息

- 当您下载并安装 Thor 以后，在使用过程中 Thor 会静默地访问您 App 本地的购买收据文件，以向苹果服务器验证本次购买的合法性，避免盗版软件的泛滥。整个过程所涉及的操作均严格使用系统提供的接口实现，最大限度地保障了收据验证的安全性和私密性。

- Thor 进行抓包调试操作时，会设置自己为系统 HTTP 代理，以获得 HTTP 流量中转能力，所有的流量均在 App 本地转发至它原本的目标地址。产生的存储数据均为 App 内本地保存，Thor 不会对任何数据进行在线统计或者上传，您可以随时随地查看、删除它们或者导出处理，您对所有的数据拥有唯一且完全的掌控。

- 在您进行保存数据到相册的操作时，应用会向您询问相册访问权限。

我们可能随时对隐私政策进行更新。如果隐私政策作出重大变更，我们将在 App 内通告更新的隐私政策。

{'repo_name': 'PixelCyber/Thor', 'stars': '560', 'repo_language': 'None', 'file_name': 'demo_list.md', 'mime_type': 'text/plain', 'hash': -1155765871005815772, 'source_dataset': 'data'}


# =================================================================================
#  https://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
# =================================================================================
#
# SYNOPSIS
#
#   AX_BOOST_UNIT_TEST_FRAMEWORK
#
# DESCRIPTION
#
#   Test for Unit_Test_Framework library from the Boost C++ libraries. The
#   macro requires a preceding call to AX_BOOST_BASE. Further documentation
#   is available at <http://randspringer.de/boost/index.html>.
#
#   This macro calls:
#
#     AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
#
#   And sets:
#
#     HAVE_BOOST_UNIT_TEST_FRAMEWORK
#
# LICENSE
#
#   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

#serial 22

AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
[
	AC_ARG_WITH([boost-unit-test-framework],
	AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
                   [use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker
                        e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
        [
        if test "$withval" = "no"; then
			want_boost="no"
        elif test "$withval" = "yes"; then
            want_boost="yes"
            ax_boost_user_unit_test_framework_lib=""
        else
		    want_boost="yes"
		ax_boost_user_unit_test_framework_lib="$withval"
		fi
        ],
        [want_boost="yes"]
	)

	if test "x$want_boost" = "xyes"; then
        AC_REQUIRE([AC_PROG_CC])
		CPPFLAGS_SAVED="$CPPFLAGS"
		CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
		export CPPFLAGS

		LDFLAGS_SAVED="$LDFLAGS"
		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
		export LDFLAGS

        AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
					   ax_cv_boost_unit_test_framework,
        [AC_LANG_PUSH([C++])
			 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
                                    [[using boost::unit_test::test_suite;
							 test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); if (test == NULL) { return 1; } else { return 0; }]])],
                   ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
         AC_LANG_POP([C++])
		])
		if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
			AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`

            if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
			saved_ldflags="${LDFLAGS}"
                for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
                    if test -r $monitor_library ; then
                       libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a.*$;\1;'`
                       ax_lib=${libextension}
                       link_unit_test_framework="yes"
                    else
                       link_unit_test_framework="no"
                    fi

			    if test "x$link_unit_test_framework" = "xyes"; then
                      BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
                      AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
					  break
				    fi
                done
                if test "x$link_unit_test_framework" != "xyes"; then
                for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.dll* $BOOSTLIBDIR/boost_unit_test_framework*.a* 2>/dev/null  | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a.*$;\1;'` ; do
                     ax_lib=${libextension}
				    AC_CHECK_LIB($ax_lib, exit,
                                 [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
                                 [link_unit_test_framework="no"])
				done
                fi
            else
                link_unit_test_framework="no"
			saved_ldflags="${LDFLAGS}"
                for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
                   if test "x$link_unit_test_framework" = "xyes"; then
                      break;
                   fi
                   for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
                   if test -r $unittest_library ; then
                       libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
                       ax_lib=${libextension}
                       link_unit_test_framework="yes"
                    else
                       link_unit_test_framework="no"
                    fi

				if test "x$link_unit_test_framework" = "xyes"; then
                        BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
                        AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
					    break
				    fi
                  done
               done
            fi
            if test "x$ax_lib" = "x"; then
                AC_MSG_ERROR(Could not find a version of the Boost::Unit_Test_Framework library!)
            fi
			if test "x$link_unit_test_framework" != "xyes"; then
				AC_MSG_ERROR(Could not link against $ax_lib !)
			fi
		fi

		CPPFLAGS="$CPPFLAGS_SAVED"
	LDFLAGS="$LDFLAGS_SAVED"
	fi
])

{'repo_name': 'FeatherCoin/Feathercoin', 'stars': '125', 'repo_language': 'C++', 'file_name': 'Makefile.am', 'mime_type': 'text/plain', 'hash': 8633751056257881899, 'source_dataset': 'data'}


import * as signalR from "@microsoft/signalr";
import * as sianglRMessagePack from "@microsoft/signalr-protocol-msgpack";
import { HttpTransportType, LogLevel } from "@microsoft/signalr";

type DotNetType = {
  invokeMethod<T>(assemblyName: string, methodIdentifier: string, ...args: any[]): T,
  invokeMethodAsync<T>(assemblyName: string, methodIdentifier: string, ...args: any[]): Promise<T>
}

type DotNetReferenceType = {
  invokeMethod<T>(methodIdentifier: string, ...args: any[]): T,
  invokeMethodAsync<T>(methodIdentifier: string, ...args: any[]): Promise<T>
}

export class HubConnectionManager {
  private _hubConnections: Map<string, signalR.HubConnection> = new Map<string, signalR.HubConnection>();
  private _handles: Map<string, (payload: any) => Promise<void>> = new Map<string, (payload: any) => Promise<void>>();

  public CreateConnection = (connectionId: string, httpConnectionOptions: DotNetReferenceType) => {
    if (!connectionId) throw new Error('Invalid connectionId.');
    if (!httpConnectionOptions) throw new Error('Invalid transport options.');

    const url = httpConnectionOptions.invokeMethod<string>('get_Url');

    if (!url) throw new Error('Invalid hub url.');

    let options: any = {
      logger: httpConnectionOptions.invokeMethod<LogLevel>('get_LogLevel'),
      transport: httpConnectionOptions.invokeMethod<HttpTransportType>('get_Transport'),
      logMessageContent: httpConnectionOptions.invokeMethod<boolean>('get_LogMessageContent'),
      skipNegotiation: httpConnectionOptions.invokeMethod<boolean>('get_SkipNegotiation')
    };

    if (httpConnectionOptions.invokeMethod<boolean>('HasAccessTokenFactory')) {
      options.accessTokenFactory = () => {
        return new Promise<string>(async (resolve, reject) => {
          const token = await httpConnectionOptions.invokeMethodAsync<string>('GetAccessToken');
          if (token) {
            resolve(token);
          } else {
            reject();
          }
        })
      }
    }

    if (this._hubConnections[connectionId]) return;

    let connectionBuilder = new signalR.HubConnectionBuilder()
      .withUrl(url, options);

    if (httpConnectionOptions.invokeMethod<boolean>('get_EnableMessagePack')) {
      connectionBuilder
        .withHubProtocol(new sianglRMessagePack.MessagePackHubProtocol());
    }

    this._hubConnections.set(connectionId, connectionBuilder.build());
  }

  public RemoveConnection = (connectionId: string) => {
    this._hubConnections.delete(connectionId);
  }

  public StartConnection = (connectionId: string): Promise<void> => {
    const connection = this.GetConnection(connectionId);

    return connection.start();
  }

  public StopConnection = (connectionId: string): Promise<void> => {
    const connection = this.GetConnection(connectionId);

    return connection.stop();
  }

  public InvokeAsync = (connectionId: string, methodName: string, args: any[]): Promise<void> => {
    const connection = this.GetConnection(connectionId);

    return connection.invoke(methodName, ...args);
  }

  public InvokeWithResultAsync = async (connectionId: string, methodName: string, args: any[]): Promise<any> => {
    const connection = this.GetConnection(connectionId);

    var result = await connection.invoke(methodName, ...args);

    return this.ReplaceTypedArray(result);
  }

  private GetConnection = (connectionId: string) => {
    if (!connectionId) throw new Error('Invalid connectionId.');

    const connection = this._hubConnections.get(connectionId);

    if (!connection) throw new Error('Invalid connection.');

    return connection;
  }

  private ReplaceTypedArray = (obj: any): any => {
    if (obj instanceof Int8Array ||
        obj instanceof Uint8Array ||
        obj instanceof Uint8ClampedArray ||
        obj instanceof Int16Array ||
        obj instanceof Uint16Array ||
        obj instanceof Int32Array ||
        obj instanceof Uint32Array ||
        obj instanceof Float32Array ||
        obj instanceof Float64Array)
    {
      obj = Array.prototype.slice.call(obj);
    }

    return obj;
  }

  public On = (connectionId: string, callback: DotNetReferenceType) => {
    const connection = this.GetConnection(connectionId);
    const handle = (...payloads) => callback.invokeMethodAsync<void>(
      'On', payloads.map(payload => JSON.stringify(this.ReplaceTypedArray(payload))));

    this._handles.set(callback.invokeMethod<string>('get_Id'), handle);

    connection.on(callback.invokeMethod<string>('get_MethodName'), handle);
  }

  public Off = (connectionId: string, methodName: string, handleId: string) => {
    const connection = this.GetConnection(connectionId);
    const handle = this._handles.get(handleId);

    if (handle) {
      connection.off(methodName, handle);

      this._handles.delete(handleId);
    }
  }

  public OnClose = (connectionId: string, onErrorCallback: DotNetReferenceType) => {
    const connection = this.GetConnection(connectionId);

    connection.onclose(async err => {
      onErrorCallback.invokeMethodAsync<void>('OnClose', JSON.stringify(err));
    });
  }
}

{'repo_name': 'BlazorExtensions/SignalR', 'stars': '170', 'repo_language': 'C#', 'file_name': 'ChatHub.cs', 'mime_type': 'text/plain', 'hash': -2970921577753053036, 'source_dataset': 'data'}


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.dubbo.remoting.etcd;

import static org.apache.dubbo.remoting.Constants.DEFAULT_IO_THREADS;

public interface Constants {
    String ETCD3_NOTIFY_MAXTHREADS_KEYS = "etcd3.notify.maxthreads";

    int DEFAULT_ETCD3_NOTIFY_THREADS = DEFAULT_IO_THREADS;

    String DEFAULT_ETCD3_NOTIFY_QUEUES_KEY = "etcd3.notify.queues";

    int DEFAULT_GRPC_QUEUES = 300_0000;

    String RETRY_PERIOD_KEY = "retry.period";

    int DEFAULT_RETRY_PERIOD = 5 * 1000;

    int DEFAULT_SESSION_TIMEOUT = 60 * 1000;

    String HTTP_SUBFIX_KEY = "://";

    String HTTP_KEY = "http://";

    int DEFAULT_KEEPALIVE_TIMEOUT = DEFAULT_SESSION_TIMEOUT / 2;

    String SESSION_TIMEOUT_KEY = "session";

    int DEFAULT_RECONNECT_PERIOD = 3 * 1000;

    String ROUTERS_CATEGORY = "routers";

    String PROVIDERS_CATEGORY = "providers";

    String CONSUMERS_CATEGORY = "consumers";

    String CONFIGURATORS_CATEGORY = "configurators";
}

{'repo_name': 'apache/dubbo', 'stars': '32984', 'repo_language': 'Java', 'file_name': 'pom.xml', 'mime_type': 'text/xml', 'hash': -8092231640022587409, 'source_dataset': 'data'}


//! moment.js locale configuration
//! locale : Klingon [tlh]
//! author : Dominika Kruk : https://github.com/amaranthrose

;(function (global, factory) {
   typeof exports === 'object' && typeof module !== 'undefined'
       && typeof require === 'function' ? factory(require('../moment')) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';

    //! moment.js locale configuration

    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');

    function translateFuture(output) {
        var time = output;
        time =
            output.indexOf('jaj') !== -1
                ? time.slice(0, -3) + 'leS'
                : output.indexOf('jar') !== -1
                ? time.slice(0, -3) + 'waQ'
                : output.indexOf('DIS') !== -1
                ? time.slice(0, -3) + 'nem'
                : time + ' pIq';
        return time;
    }

    function translatePast(output) {
        var time = output;
        time =
            output.indexOf('jaj') !== -1
                ? time.slice(0, -3) + 'Hu’'
                : output.indexOf('jar') !== -1
                ? time.slice(0, -3) + 'wen'
                : output.indexOf('DIS') !== -1
                ? time.slice(0, -3) + 'ben'
                : time + ' ret';
        return time;
    }

    function translate(number, withoutSuffix, string, isFuture) {
        var numberNoun = numberAsNoun(number);
        switch (string) {
            case 'ss':
                return numberNoun + ' lup';
            case 'mm':
                return numberNoun + ' tup';
            case 'hh':
                return numberNoun + ' rep';
            case 'dd':
                return numberNoun + ' jaj';
            case 'MM':
                return numberNoun + ' jar';
            case 'yy':
                return numberNoun + ' DIS';
        }
    }

    function numberAsNoun(number) {
        var hundred = Math.floor((number % 1000) / 100),
            ten = Math.floor((number % 100) / 10),
            one = number % 10,
            word = '';
        if (hundred > 0) {
            word += numbersNouns[hundred] + 'vatlh';
        }
        if (ten > 0) {
            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
        }
        if (one > 0) {
            word += (word !== '' ? ' ' : '') + numbersNouns[one];
        }
        return word === '' ? 'pagh' : word;
    }

    var tlh = moment.defineLocale('tlh', {
        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
            '_'
        ),
        monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
            '_'
        ),
        monthsParseExact: true,
        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
            '_'
        ),
        weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
            '_'
        ),
        weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
            '_'
        ),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[DaHjaj] LT',
            nextDay: '[wa’leS] LT',
            nextWeek: 'LLL',
            lastDay: '[wa’Hu’] LT',
            lastWeek: 'LLL',
            sameElse: 'L',
        },
        relativeTime: {
            future: translateFuture,
            past: translatePast,
            s: 'puS lup',
            ss: translate,
            m: 'wa’ tup',
            mm: translate,
            h: 'wa’ rep',
            hh: translate,
            d: 'wa’ jaj',
            dd: translate,
            M: 'wa’ jar',
            MM: translate,
            y: 'wa’ DIS',
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });

    return tlh;

})));

{'repo_name': 'wikimedia/mediawiki', 'stars': '2016', 'repo_language': 'PHP', 'file_name': 'README', 'mime_type': 'text/plain', 'hash': -2638698431488537517, 'source_dataset': 'data'}


{'repo_name': 'microsoft/AzureDevOpsDemoGenerator', 'stars': '152', 'repo_language': 'HTML', 'file_name': 'post.html', 'mime_type': 'text/plain', 'hash': -7011135116390777317, 'source_dataset': 'data'}


//
//  main.m
//  NativeJsWebView
//
//  Created by Peter Traeg on 5/27/13.
//  Copyright (c) 2013 Peter Traeg. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "njwAppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([njwAppDelegate class]));
    }
}

{'repo_name': 'MyGitHubFork/WebBasicCommonDemos', 'stars': '237', 'repo_language': 'PHP', 'file_name': 'StoriesView.vue', 'mime_type': 'text/html', 'hash': -4397882433034949952, 'source_dataset': 'data'}


<?php
/**
 * CHttpRequest and CCookieCollection class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright © 2008-2011 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

/**
 * CHttpRequest encapsulates the $_SERVER variable and resolves its inconsistency among different Web servers.
 *
 * CHttpRequest also manages the cookies sent from and sent to the user.
 * By setting {@link enableCookieValidation} to true,
 * cookies sent from the user will be validated to see if they are tampered.
 * The property {@link getCookies cookies} returns the collection of cookies.
 * For more details, see {@link CCookieCollection}.
 *
 * CHttpRequest is a default application component loaded by {@link CWebApplication}. It can be
 * accessed via {@link CWebApplication::getRequest()}.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @version $Id: CHttpRequest.php 3050 2011-03-12 13:22:11Z qiang.xue $
 * @package system.web
 * @since 1.0
 */
class CHttpRequest extends CApplicationComponent
{
	/**
	 * @var boolean whether cookies should be validated to ensure they are not tampered. Defaults to false.
	 */
	public $enableCookieValidation=false;
	/**
	 * @var boolean whether to enable CSRF (Cross-Site Request Forgery) validation. Defaults to false.
	 * By setting this property to true, forms submitted to an Yii Web application must be originated
	 * from the same application. If not, a 400 HTTP exception will be raised.
	 * Note, this feature requires that the user client accepts cookie.
	 * You also need to use {@link CHtml::form} or {@link CHtml::statefulForm} to generate
	 * the needed HTML forms in your pages.
	 * @see http://seclab.stanford.edu/websec/csrf/csrf.pdf
	 */
	public $enableCsrfValidation=false;
	/**
	 * @var string the name of the token used to prevent CSRF. Defaults to 'YII_CSRF_TOKEN'.
	 * This property is effectively only when {@link enableCsrfValidation} is true.
	 */
	public $csrfTokenName='YII_CSRF_TOKEN';
	/**
	 * @var array the property values (in name-value pairs) used to initialize the CSRF cookie.
	 * Any property of {@link CHttpCookie} may be initialized.
	 * This property is effective only when {@link enableCsrfValidation} is true.
	 */
	public $csrfCookie;

	private $_requestUri;
	private $_pathInfo;
	private $_scriptFile;
	private $_scriptUrl;
	private $_hostInfo;
	private $_baseUrl;
	private $_cookies;
	private $_preferredLanguage;
	private $_csrfToken;
	private $_deleteParams;
	private $_putParams;

	/**
	 * Initializes the application component.
	 * This method overrides the parent implementation by preprocessing
	 * the user request data.
	 */
	public function init()
	{
		parent::init();
		$this->normalizeRequest();
	}

	/**
	 * Normalizes the request data.
	 * This method strips off slashes in request data if get_magic_quotes_gpc() returns true.
	 * It also performs CSRF validation if {@link enableCsrfValidation} is true.
	 */
	protected function normalizeRequest()
	{
		// normalize request
		if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
		{
			if(isset($_GET))
				$_GET=$this->stripSlashes($_GET);
			if(isset($_POST))
				$_POST=$this->stripSlashes($_POST);
			if(isset($_REQUEST))
				$_REQUEST=$this->stripSlashes($_REQUEST);
			if(isset($_COOKIE))
				$_COOKIE=$this->stripSlashes($_COOKIE);
		}

		if($this->enableCsrfValidation)
			Yii::app()->attachEventHandler('onBeginRequest',array($this,'validateCsrfToken'));
	}

	/**
	 * Strips slashes from input data.
	 * This method is applied when magic quotes is enabled.
	 * @param mixed $data input data to be processed
	 * @return mixed processed data
	 */
	public function stripSlashes(&$data)
	{
		return is_array($data)?array_map(array($this,'stripSlashes'),$data):stripslashes($data);
	}

	/**
	 * Returns the named GET or POST parameter value.
	 * If the GET or POST parameter does not exist, the second parameter to this method will be returned.
	 * If both GET and POST contains such a named parameter, the GET parameter takes precedence.
	 * @param string $name the GET parameter name
	 * @param mixed $defaultValue the default parameter value if the GET parameter does not exist.
	 * @return mixed the GET parameter value
	 * @since 1.0.4
	 * @see getQuery
	 * @see getPost
	 */
	public function getParam($name,$defaultValue=null)
	{
		return isset($_GET[$name]) ? $_GET[$name] : (isset($_POST[$name]) ? $_POST[$name] : $defaultValue);
	}

	/**
	 * Returns the named GET parameter value.
	 * If the GET parameter does not exist, the second parameter to this method will be returned.
	 * @param string $name the GET parameter name
	 * @param mixed $defaultValue the default parameter value if the GET parameter does not exist.
	 * @return mixed the GET parameter value
	 * @since 1.0.4
	 * @see getPost
	 * @see getParam
	 */
	public function getQuery($name,$defaultValue=null)
	{
		return isset($_GET[$name]) ? $_GET[$name] : $defaultValue;
	}

	/**
	 * Returns the named POST parameter value.
	 * If the POST parameter does not exist, the second parameter to this method will be returned.
	 * @param string $name the POST parameter name
	 * @param mixed $defaultValue the default parameter value if the POST parameter does not exist.
	 * @return mixed the POST parameter value
	 * @since 1.0.4
	 * @see getParam
	 * @see getQuery
	 */
	public function getPost($name,$defaultValue=null)
	{
		return isset($_POST[$name]) ? $_POST[$name] : $defaultValue;
	}

	/**
	 * Returns the named DELETE parameter value.
	 * If the DELETE parameter does not exist or if the current request is not a DELETE request,
	 * the second parameter to this method will be returned.
	 * @param string $name the DELETE parameter name
	 * @param mixed $defaultValue the default parameter value if the DELETE parameter does not exist.
	 * @return mixed the DELETE parameter value
	 * @since 1.1.7
	 */
	public function getDelete($name,$defaultValue=null)
	{
		if($this->_deleteParams===null)
			$this->_deleteParams=$this->getIsDeleteRequest() ? $this->getRestParams() : array();
		return isset($this->_deleteParams[$name]) ? $this->_deleteParams[$name] : $defaultValue;
	}

	/**
	 * Returns the named PUT parameter value.
	 * If the PUT parameter does not exist or if the current request is not a PUT request,
	 * the second parameter to this method will be returned.
	 * @param string $name the PUT parameter name
	 * @param mixed $defaultValue the default parameter value if the PUT parameter does not exist.
	 * @return mixed the PUT parameter value
	 * @since 1.1.7
	 */
	public function getPut($name,$defaultValue=null)
	{
		if($this->_putParams===null)
			$this->_putParams=$this->getIsPutRequest() ? $this->getRestParams() : array();
		return isset($this->_putParams[$name]) ? $this->_putParams[$name] : $defaultValue;
	}

	/**
	 * Returns the PUT or DELETE request parameters.
	 * @return array the request parameters
	 * @since 1.1.7
	 */
	protected function getRestParams()
	{
		$result=array();
		if(function_exists('mb_parse_str'))
			mb_parse_str(file_get_contents('php://input'), $result);
		else
			parse_str(file_get_contents('php://input'), $result);
		return $result;
	}

	/**
	 * Returns the currently requested URL.
	 * This is the same as {@link getRequestUri}.
	 * @return string part of the request URL after the host info.
	 */
	public function getUrl()
	{
		return $this->getRequestUri();
	}

	/**
	 * Returns the schema and host part of the application URL.
	 * The returned URL does not have an ending slash.
	 * By default this is determined based on the user request information.
	 * You may explicitly specify it by setting the {@link setHostInfo hostInfo} property.
	 * @param string $schema schema to use (e.g. http, https). If empty, the schema used for the current request will be used.
	 * @return string schema and hostname part (with port number if needed) of the request URL (e.g. http://www.yiiframework.com)
	 * @see setHostInfo
	 */
	public function getHostInfo($schema='')
	{
		if($this->_hostInfo===null)
		{
			if($secure=$this->getIsSecureConnection())
				$http='https';
			else
				$http='http';
			if(isset($_SERVER['HTTP_HOST']))
				$this->_hostInfo=$http.'://'.$_SERVER['HTTP_HOST'];
			else
			{
				$this->_hostInfo=$http.'://'.$_SERVER['SERVER_NAME'];
				$port=$secure ? $this->getSecurePort() : $this->getPort();
				if(($port!==80 && !$secure) || ($port!==443 && $secure))
					$this->_hostInfo.=':'.$port;
			}
		}
		if($schema!=='')
		{
			$secure=$this->getIsSecureConnection();
			if($secure && $schema==='https' || !$secure && $schema==='http')
				return $this->_hostInfo;

			$port=$schema==='https' ? $this->getSecurePort() : $this->getPort();
			if($port!==80 && $schema==='http' || $port!==443 && $schema==='https')
				$port=':'.$port;
			else
				$port='';

			$pos=strpos($this->_hostInfo,':');
			return $schema.substr($this->_hostInfo,$pos,strcspn($this->_hostInfo,':',$pos+1)+1).$port;
		}
		else
			return $this->_hostInfo;
	}

	/**
	 * Sets the schema and host part of the application URL.
	 * This setter is provided in case the schema and hostname cannot be determined
	 * on certain Web servers.
	 * @param string $value the schema and host part of the application URL.
	 */
	public function setHostInfo($value)
	{
		$this->_hostInfo=rtrim($value,'/');
	}

	/**
	 * Returns the relative URL for the application.
	 * This is similar to {@link getScriptUrl scriptUrl} except that
	 * it does not have the script file name, and the ending slashes are stripped off.
	 * @param boolean $absolute whether to return an absolute URL. Defaults to false, meaning returning a relative one.
	 * This parameter has been available since 1.0.2.
	 * @return string the relative URL for the application
	 * @see setScriptUrl
	 */
	public function getBaseUrl($absolute=false)
	{
		if($this->_baseUrl===null)
			$this->_baseUrl=rtrim(dirname($this->getScriptUrl()),'\\/');
		return $absolute ? $this->getHostInfo() . $this->_baseUrl : $this->_baseUrl;
	}

	/**
	 * Sets the relative URL for the application.
	 * By default the URL is determined based on the entry script URL.
	 * This setter is provided in case you want to change this behavior.
	 * @param string $value the relative URL for the application
	 */
	public function setBaseUrl($value)
	{
		$this->_baseUrl=$value;
	}

	/**
	 * Returns the relative URL of the entry script.
	 * The implementation of this method referenced Zend_Controller_Request_Http in Zend Framework.
	 * @return string the relative URL of the entry script.
	 */
	public function getScriptUrl()
	{
		if($this->_scriptUrl===null)
		{
			$scriptName=basename($_SERVER['SCRIPT_FILENAME']);
			if(basename($_SERVER['SCRIPT_NAME'])===$scriptName)
				$this->_scriptUrl=$_SERVER['SCRIPT_NAME'];
			else if(basename($_SERVER['PHP_SELF'])===$scriptName)
				$this->_scriptUrl=$_SERVER['PHP_SELF'];
			else if(isset($_SERVER['ORIG_SCRIPT_NAME']) && basename($_SERVER['ORIG_SCRIPT_NAME'])===$scriptName)
				$this->_scriptUrl=$_SERVER['ORIG_SCRIPT_NAME'];
			else if(($pos=strpos($_SERVER['PHP_SELF'],'/'.$scriptName))!==false)
				$this->_scriptUrl=substr($_SERVER['SCRIPT_NAME'],0,$pos).'/'.$scriptName;
			else if(isset($_SERVER['DOCUMENT_ROOT']) && strpos($_SERVER['SCRIPT_FILENAME'],$_SERVER['DOCUMENT_ROOT'])===0)
				$this->_scriptUrl=str_replace('\\','/',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME']));
			else
				throw new CException(Yii::t('yii','CHttpRequest is unable to determine the entry script URL.'));
		}
		return $this->_scriptUrl;
	}

	/**
	 * Sets the relative URL for the application entry script.
	 * This setter is provided in case the entry script URL cannot be determined
	 * on certain Web servers.
	 * @param string $value the relative URL for the application entry script.
	 */
	public function setScriptUrl($value)
	{
		$this->_scriptUrl='/'.trim($value,'/');
	}

	/**
	 * Returns the path info of the currently requested URL.
	 * This refers to the part that is after the entry script and before the question mark.
	 * The starting and ending slashes are stripped off.
	 * @return string part of the request URL that is after the entry script and before the question mark.
	 * Note, the returned pathinfo is decoded starting from 1.1.4.
	 * Prior to 1.1.4, whether it is decoded or not depends on the server configuration
	 * (in most cases it is not decoded).
	 * @throws CException if the request URI cannot be determined due to improper server configuration
	 */
	public function getPathInfo()
	{
		if($this->_pathInfo===null)
		{
			$pathInfo=$this->getRequestUri();

			if(($pos=strpos($pathInfo,'?'))!==false)
			   $pathInfo=substr($pathInfo,0,$pos);

			$pathInfo=urldecode($pathInfo);

			$scriptUrl=$this->getScriptUrl();
			$baseUrl=$this->getBaseUrl();
			if(strpos($pathInfo,$scriptUrl)===0)
				$pathInfo=substr($pathInfo,strlen($scriptUrl));
			else if($baseUrl==='' || strpos($pathInfo,$baseUrl)===0)
				$pathInfo=substr($pathInfo,strlen($baseUrl));
			else if(strpos($_SERVER['PHP_SELF'],$scriptUrl)===0)
				$pathInfo=substr($_SERVER['PHP_SELF'],strlen($scriptUrl));
			else
				throw new CException(Yii::t('yii','CHttpRequest is unable to determine the path info of the request.'));

			$this->_pathInfo=trim($pathInfo,'/');
		}
		return $this->_pathInfo;
	}

	/**
	 * Returns the request URI portion for the currently requested URL.
	 * This refers to the portion that is after the {@link hostInfo host info} part.
	 * It includes the {@link queryString query string} part if any.
	 * The implementation of this method referenced Zend_Controller_Request_Http in Zend Framework.
	 * @return string the request URI portion for the currently requested URL.
	 * @throws CException if the request URI cannot be determined due to improper server configuration
	 * @since 1.0.1
	 */
	public function getRequestUri()
	{
		if($this->_requestUri===null)
		{
			if(isset($_SERVER['HTTP_X_REWRITE_URL'])) // IIS
				$this->_requestUri=$_SERVER['HTTP_X_REWRITE_URL'];
			else if(isset($_SERVER['REQUEST_URI']))
			{
				$this->_requestUri=$_SERVER['REQUEST_URI'];
				if(isset($_SERVER['HTTP_HOST']))
				{
					if(strpos($this->_requestUri,$_SERVER['HTTP_HOST'])!==false)
						$this->_requestUri=preg_replace('/^\w+:\/\/[^\/]+/','',$this->_requestUri);
				}
				else
					$this->_requestUri=preg_replace('/^(http|https):\/\/[^\/]+/i','',$this->_requestUri);
			}
			else if(isset($_SERVER['ORIG_PATH_INFO']))  // IIS 5.0 CGI
			{
				$this->_requestUri=$_SERVER['ORIG_PATH_INFO'];
				if(!empty($_SERVER['QUERY_STRING']))
					$this->_requestUri.='?'.$_SERVER['QUERY_STRING'];
			}
			else
				throw new CException(Yii::t('yii','CHttpRequest is unable to determine the request URI.'));
		}

		return $this->_requestUri;
	}

	/**
	 * Returns part of the request URL that is after the question mark.
	 * @return string part of the request URL that is after the question mark
	 */
	public function getQueryString()
	{
		return isset($_SERVER['QUERY_STRING'])?$_SERVER['QUERY_STRING']:'';
	}

	/**
	 * Return if the request is sent via secure channel (https).
	 * @return boolean if the request is sent via secure channel (https)
	 */
	public function getIsSecureConnection()
	{
		return isset($_SERVER['HTTPS']) && !strcasecmp($_SERVER['HTTPS'],'on');
	}

	/**
	 * Returns the request type, such as GET, POST, HEAD, PUT, DELETE.
	 * @return string request type, such as GET, POST, HEAD, PUT, DELETE.
	 */
	public function getRequestType()
	{
		return strtoupper(isset($_SERVER['REQUEST_METHOD'])?$_SERVER['REQUEST_METHOD']:'GET');
	}

	/**
	 * Returns whether this is a POST request.
	 * @return boolean whether this is a POST request.
	 */
	public function getIsPostRequest()
	{
		return isset($_SERVER['REQUEST_METHOD']) && !strcasecmp($_SERVER['REQUEST_METHOD'],'POST');
	}

	/**
	 * Returns whether this is a DELETE request.
	 * @return boolean whether this is a DELETE request.
	 * @since 1.1.7
	 */
	public function getIsDeleteRequest()
	{
		return isset($_SERVER['REQUEST_METHOD']) && !strcasecmp($_SERVER['REQUEST_METHOD'],'DELETE');
	}

	/**
	 * Returns whether this is a PUT request.
	 * @return boolean whether this is a PUT request.
	 * @since 1.1.7
	 */
	public function getIsPutRequest()
	{
		return isset($_SERVER['REQUEST_METHOD']) && !strcasecmp($_SERVER['REQUEST_METHOD'],'PUT');
	}

	/**
	 * Returns whether this is an AJAX (XMLHttpRequest) request.
	 * @return boolean whether this is an AJAX (XMLHttpRequest) request.
	 */
	public function getIsAjaxRequest()
	{
		return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest';
	}

	/**
	 * Returns the server name.
	 * @return string server name
	 */
	public function getServerName()
	{
		return $_SERVER['SERVER_NAME'];
	}

	/**
	 * Returns the server port number.
	 * @return integer server port number
	 */
	public function getServerPort()
	{
		return $_SERVER['SERVER_PORT'];
	}

	/**
	 * Returns the URL referrer, null if not present
	 * @return string URL referrer, null if not present
	 */
	public function getUrlReferrer()
	{
		return isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:null;
	}

	/**
	 * Returns the user agent, null if not present.
	 * @return string user agent, null if not present
	 */
	public function getUserAgent()
	{
		return isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:null;
	}

	/**
	 * Returns the user IP address.
	 * @return string user IP address
	 */
	public function getUserHostAddress()
	{
		return isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'127.0.0.1';
	}

	/**
	 * Returns the user host name, null if it cannot be determined.
	 * @return string user host name, null if cannot be determined
	 */
	public function getUserHost()
	{
		return isset($_SERVER['REMOTE_HOST'])?$_SERVER['REMOTE_HOST']:null;
	}

	/**
	 * Returns entry script file path.
	 * @return string entry script file path (processed w/ realpath())
	 */
	public function getScriptFile()
	{
		if($this->_scriptFile!==null)
			return $this->_scriptFile;
		else
			return $this->_scriptFile=realpath($_SERVER['SCRIPT_FILENAME']);
	}

	/**
	 * Returns information about the capabilities of user browser.
	 * @param string $userAgent the user agent to be analyzed. Defaults to null, meaning using the
	 * current User-Agent HTTP header information.
	 * @return array user browser capabilities.
	 * @see http://www.php.net/manual/en/function.get-browser.php
	 */
	public function getBrowser($userAgent=null)
	{
		return get_browser($userAgent,true);
	}

	/**
	 * Returns user browser accept types, null if not present.
	 * @return string user browser accept types, null if not present
	 */
	public function getAcceptTypes()
	{
		return isset($_SERVER['HTTP_ACCEPT'])?$_SERVER['HTTP_ACCEPT']:null;
	}

	private $_port;

 	/**
	 * Returns the port to use for insecure requests.
	 * Defaults to 80, or the port specified by the server if the current
	 * request is insecure.
	 * You may explicitly specify it by setting the {@link setPort port} property.
	 * @return integer port number for insecure requests.
	 * @see setPort
	 * @since 1.1.3
	 */
	public function getPort()
	{
		if($this->_port===null)
			$this->_port=!$this->getIsSecureConnection() && isset($_SERVER['SERVER_PORT']) ? (int)$_SERVER['SERVER_PORT'] : 80;
		return $this->_port;
	}

	/**
	 * Sets the port to use for insecure requests.
	 * This setter is provided in case a custom port is necessary for certain
	 * server configurations.
	 * @param integer $value port number.
	 * @since 1.1.3
	 */
	public function setPort($value)
	{
		$this->_port=(int)$value;
		$this->_hostInfo=null;
	}

	private $_securePort;

	/**
	 * Returns the port to use for secure requests.
	 * Defaults to 443, or the port specified by the server if the current
	 * request is secure.
	 * You may explicitly specify it by setting the {@link setSecurePort securePort} property.
	 * @return integer port number for secure requests.
	 * @see setSecurePort
	 * @since 1.1.3
	 */
	public function getSecurePort()
	{
		if($this->_securePort===null)
			$this->_securePort=$this->getIsSecureConnection() && isset($_SERVER['SERVER_PORT']) ? (int)$_SERVER['SERVER_PORT'] : 443;
		return $this->_securePort;
	}

	/**
	 * Sets the port to use for secure requests.
	 * This setter is provided in case a custom port is necessary for certain
	 * server configurations.
	 * @param integer $value port number.
	 * @since 1.1.3
	 */
	public function setSecurePort($value)
	{
		$this->_securePort=(int)$value;
		$this->_hostInfo=null;
	}

	/**
	 * Returns the cookie collection.
	 * The result can be used like an associative array. Adding {@link CHttpCookie} objects
	 * to the collection will send the cookies to the client; and removing the objects
	 * from the collection will delete those cookies on the client.
	 * @return CCookieCollection the cookie collection.
	 */
	public function getCookies()
	{
		if($this->_cookies!==null)
			return $this->_cookies;
		else
			return $this->_cookies=new CCookieCollection($this);
	}

	/**
	 * Redirects the browser to the specified URL.
	 * @param string $url URL to be redirected to. If the URL is a relative one, the base URL of
	 * the application will be inserted at the beginning.
	 * @param boolean $terminate whether to terminate the current application
	 * @param integer $statusCode the HTTP status code. Defaults to 302. See {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html}
	 * for details about HTTP status code. This parameter has been available since version 1.0.4.
	 */
	public function redirect($url,$terminate=true,$statusCode=302)
	{
		if(strpos($url,'/')===0)
			$url=$this->getHostInfo().$url;
		header('Location: '.$url, true, $statusCode);
		if($terminate)
			Yii::app()->end();
	}

	/**
	 * Returns the user preferred language.
	 * The returned language ID will be canonicalized using {@link CLocale::getCanonicalID}.
	 * This method returns false if the user does not have language preference.
	 * @return string the user preferred language.
	 */
	public function getPreferredLanguage()
	{
		if($this->_preferredLanguage===null)
		{
			if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && ($n=preg_match_all('/([\w\-_]+)\s*(;\s*q\s*=\s*(\d*\.\d*))?/',$_SERVER['HTTP_ACCEPT_LANGUAGE'],$matches))>0)
			{
				$languages=array();
				for($i=0;$i<$n;++$i)
					$languages[$matches[1][$i]]=empty($matches[3][$i]) ? 1.0 : floatval($matches[3][$i]);
				arsort($languages);
				foreach($languages as $language=>$pref)
					return $this->_preferredLanguage=CLocale::getCanonicalID($language);
			}
			return $this->_preferredLanguage=false;
		}
		return $this->_preferredLanguage;
	}

	/**
	 * Sends a file to user.
	 * @param string $fileName file name
	 * @param string $content content to be set.
	 * @param string $mimeType mime type of the content. If null, it will be guessed automatically based on the given file name.
	 * @param boolean $terminate whether to terminate the current application after calling this method
	 */
	public function sendFile($fileName,$content,$mimeType=null,$terminate=true)
	{
		if($mimeType===null)
		{
			if(($mimeType=CFileHelper::getMimeTypeByExtension($fileName))===null)
				$mimeType='text/plain';
		}
		header('Pragma: public');
		header('Expires: 0');
		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
		header("Content-type: $mimeType");
		if(ini_get("output_handler")=='')
			header('Content-Length: '.(function_exists('mb_strlen') ? mb_strlen($content,'8bit') : strlen($content)));
		header("Content-Disposition: attachment; filename=\"$fileName\"");
		header('Content-Transfer-Encoding: binary');

		if($terminate)
		{
			// clean up the application first because the file downloading could take long time
			// which may cause timeout of some resources (such as DB connection)
			Yii::app()->end(0,false);
			echo $content;
			exit(0);
		}
		else
			echo $content;
	}

	/**
	 * Sends existing file to a browser as a download using x-sendfile.
	 *
	 * X-Sendfile is a feature allowing a web application to redirect the request for a file to the webserver
	 * that in turn processes the request, this way eliminating the need to perform tasks like reading the file
	 * and sending it to the user. When dealing with a lot of files (or very big files) this can lead to a great
	 * increase in performance as the web application is allowed to terminate earlier while the webserver is
	 * handling the request.
	 *
	 * The request is sent to the server through a special non-standard HTTP-header.
	 * When the web server encounters the presence of such header it will discard all output and send the file
	 * specified by that header using web server internals including all optimizations like caching-headers.
	 *
	 * As this header directive is non-standard different directives exists for different web servers applications:
	 * <ul>
	 * <li>Apache: {@link http://tn123.org/mod_xsendfile X-Sendfile}</li>
	 * <li>Lighttpd v1.4: {@link http://redmine.lighttpd.net/wiki/lighttpd/X-LIGHTTPD-send-file X-LIGHTTPD-send-file}</li>
	 * <li>Lighttpd v1.5: X-Sendfile {@link http://redmine.lighttpd.net/wiki/lighttpd/X-LIGHTTPD-send-file X-Sendfile}</li>
	 * <li>Nginx: {@link http://wiki.nginx.org/XSendfile X-Accel-Redirect}</li>
	 * <li>Cherokee: {@link http://www.cherokee-project.com/doc/other_goodies.html#x-sendfile X-Sendfile and X-Accel-Redirect}</li>
	 * </ul>
	 * So for this method to work the X-SENDFILE option/module should be enabled by the web server and
	 * a proper xHeader should be sent.
	 *
	 * <b>Note:</b>
	 * This option allows to download files that are not under web folders, and even files that are otherwise protected (deny from all) like .htaccess
	 *
	 * <b>Side effects</b>:
	 * If this option is disabled by the web server, when this method is called a download configuration dialog
	 * will open but the downloaded file will have 0 bytes.
	 *
	 * <b>Example</b>:
	 * <pre>
	 * <?php
	 *   Yii::app()->request->xSendFile('/home/user/Pictures/picture1.jpg',array(
	 *	  'saveName'=>'image1.jpg',
	 *	  'mimeType'=>'image/jpeg',
	 *	  'terminate'=>false,
	 *   ));
	 * ?>
	 * </pre>
	 * @param string $filePath file name with full path
	 * @param array $options additional options:
	 * <ul>
	 * <li>saveName: file name shown to the user, if not set real file name will be used</li>
	 * <li>mimeType: mime type of the file, if not set it will be guessed automatically based on the file name.</li>
	 * <li>xHeader: appropriate x-sendfile header, defaults to "X-Sendfile"</li>
	 * <li>terminate: whether to terminate the current application after calling this method, defaults to true</li>
	 * </ul>
	 * @return boolean false if file not found, true otherwise.
	 */
	public function xSendFile($filePath, $options=array())
	{
		if(!is_file($filePath))
			return false;

		if(!isset($options['saveName']))
			$options['saveName']=basename($filePath);

		if(!isset($options['mimeType']))
		{
			if(($options['mimeType']=CFileHelper::getMimeTypeByExtension($filePath))===null)
				$options['mimeType']='text/plain';
		}

		if(!isset($options['xHeader']))
			$options['xHeader']='X-Sendfile';

		header('Content-type: '.$options['mimeType']);
		header('Content-Disposition: attachment; filename="'.$options['saveName'].'"');
		header(trim($options['xHeader']).': '.$filePath);

		if(!isset($options['terminate']) || $options['terminate'])
			Yii::app()->end();

		return true;
	}

	/**
	 * Returns the random token used to perform CSRF validation.
	 * The token will be read from cookie first. If not found, a new token
	 * will be generated.
	 * @return string the random token for CSRF validation.
	 * @see enableCsrfValidation
	 */
	public function getCsrfToken()
	{
		if($this->_csrfToken===null)
		{
			$cookie=$this->getCookies()->itemAt($this->csrfTokenName);
			if(!$cookie || ($this->_csrfToken=$cookie->value)==null)
			{
				$cookie=$this->createCsrfCookie();
				$this->_csrfToken=$cookie->value;
				$this->getCookies()->add($cookie->name,$cookie);
			}
		}

		return $this->_csrfToken;
	}

	/**
	 * Creates a cookie with a randomly generated CSRF token.
	 * Initial values specified in {@link csrfCookie} will be applied
	 * to the generated cookie.
	 * @return CHttpCookie the generated cookie
	 * @see enableCsrfValidation
	 */
	protected function createCsrfCookie()
	{
		$cookie=new CHttpCookie($this->csrfTokenName,sha1(uniqid(mt_rand(),true)));
		if(is_array($this->csrfCookie))
		{
			foreach($this->csrfCookie as $name=>$value)
				$cookie->$name=$value;
		}
		return $cookie;
	}

	/**
	 * Performs the CSRF validation.
	 * This is the event handler responding to {@link CApplication::onBeginRequest}.
	 * The default implementation will compare the CSRF token obtained
	 * from a cookie and from a POST field. If they are different, a CSRF attack is detected.
	 * @param CEvent $event event parameter
	 * @throws CHttpException if the validation fails
	 * @since 1.0.4
	 */
	public function validateCsrfToken($event)
	{
		if($this->getIsPostRequest())
		{
			// only validate POST requests
			$cookies=$this->getCookies();
			if($cookies->contains($this->csrfTokenName) && isset($_POST[$this->csrfTokenName]))
			{
				$tokenFromCookie=$cookies->itemAt($this->csrfTokenName)->value;
				$tokenFromPost=$_POST[$this->csrfTokenName];
				$valid=$tokenFromCookie===$tokenFromPost;
			}
			else
				$valid=false;
			if(!$valid)
				throw new CHttpException(400,Yii::t('yii','The CSRF token could not be verified.'));
		}
	}
}

/**
 * CCookieCollection implements a collection class to store cookies.
 *
 * You normally access it via {@link CHttpRequest::getCookies()}.
 *
 * Since CCookieCollection extends from {@link CMap}, it can be used
 * like an associative array as follows:
 * <pre>
 * $cookies[$name]=new CHttpCookie($name,$value); // sends a cookie
 * $value=$cookies[$name]->value; // reads a cookie value
 * unset($cookies[$name]);  // removes a cookie
 * </pre>
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @version $Id: CHttpRequest.php 3050 2011-03-12 13:22:11Z qiang.xue $
 * @package system.web
 * @since 1.0
 */
class CCookieCollection extends CMap
{
	private $_request;
	private $_initialized=false;

	/**
	 * Constructor.
	 * @param CHttpRequest $request owner of this collection.
	 */
	public function __construct(CHttpRequest $request)
	{
		$this->_request=$request;
		$this->copyfrom($this->getCookies());
		$this->_initialized=true;
	}

	/**
	 * @return CHttpRequest the request instance
	 */
	public function getRequest()
	{
		return $this->_request;
	}

	/**
	 * @return array list of validated cookies
	 */
	protected function getCookies()
	{
		$cookies=array();
		if($this->_request->enableCookieValidation)
		{
			$sm=Yii::app()->getSecurityManager();
			foreach($_COOKIE as $name=>$value)
			{
				if(is_string($value) && ($value=$sm->validateData($value))!==false)
					$cookies[$name]=new CHttpCookie($name,@unserialize($value));
			}
		}
		else
		{
			foreach($_COOKIE as $name=>$value)
				$cookies[$name]=new CHttpCookie($name,$value);
		}
		return $cookies;
	}

	/**
	 * Adds a cookie with the specified name.
	 * This overrides the parent implementation by performing additional
	 * operations for each newly added CHttpCookie object.
	 * @param mixed $name Cookie name.
	 * @param CHttpCookie $cookie Cookie object.
	 * @throws CException if the item to be inserted is not a CHttpCookie object.
	 */
	public function add($name,$cookie)
	{
		if($cookie instanceof CHttpCookie)
		{
			$this->remove($name);
			parent::add($name,$cookie);
			if($this->_initialized)
				$this->addCookie($cookie);
		}
		else
			throw new CException(Yii::t('yii','CHttpCookieCollection can only hold CHttpCookie objects.'));
	}

	/**
	 * Removes a cookie with the specified name.
	 * This overrides the parent implementation by performing additional
	 * cleanup work when removing a CHttpCookie object.
	 * @param mixed $name Cookie name.
	 * @return CHttpCookie The removed cookie object.
	 */
	public function remove($name)
	{
		if(($cookie=parent::remove($name))!==null)
		{
			if($this->_initialized)
				$this->removeCookie($cookie);
		}
		return $cookie;
	}

	/**
	 * Sends a cookie.
	 * @param CHttpCookie $cookie cook to be sent
	 */
	protected function addCookie($cookie)
	{
		$value=$cookie->value;
		if($this->_request->enableCookieValidation)
			$value=Yii::app()->getSecurityManager()->hashData(serialize($value));
		if(version_compare(PHP_VERSION,'5.2.0','>='))
			setcookie($cookie->name,$value,$cookie->expire,$cookie->path,$cookie->domain,$cookie->secure,$cookie->httpOnly);
		else
			setcookie($cookie->name,$value,$cookie->expire,$cookie->path,$cookie->domain,$cookie->secure);
	}

	/**
	 * Deletes a cookie.
	 * @param CHttpCookie $cookie cook to be deleted
	 */
	protected function removeCookie($cookie)
	{
		if(version_compare(PHP_VERSION,'5.2.0','>='))
			setcookie($cookie->name,null,0,$cookie->path,$cookie->domain,$cookie->secure,$cookie->httpOnly);
		else
			setcookie($cookie->name,null,0,$cookie->path,$cookie->domain,$cookie->secure);
	}
}

{'repo_name': 'aarondunn/bugkick', 'stars': '122', 'repo_language': 'PHP', 'file_name': 'index.jade', 'mime_type': 'text/plain', 'hash': -97746797787082905, 'source_dataset': 'data'}


// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.

// +build sqlite_icu icu

package sqlite3

/*
#cgo LDFLAGS: -licuuc -licui18n
#cgo CFLAGS: -DSQLITE_ENABLE_ICU
#cgo darwin CFLAGS: -I/usr/local/opt/icu4c/include
#cgo darwin LDFLAGS: -L/usr/local/opt/icu4c/lib
#cgo openbsd LDFLAGS: -lsqlite3
*/
import "C"

{'repo_name': 'rancher/k3s', 'stars': '13376', 'repo_language': 'Go', 'file_name': 'discovery.go', 'mime_type': 'text/plain', 'hash': 1954301987140307979, 'source_dataset': 'data'}


/*
** Zabbix
** Copyright (C) 2001-2020 Zabbix SIA
**
** 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
** (at your option) 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/

#include "common.h"
#include "../zabbix_server/alerter/alerter_protocol.h"

zbx_uint32_t	zbx_alerter_serialize_alert_send(unsigned char **data, zbx_uint64_t mediatypeid, unsigned char type,
		const char *smtp_server, const char *smtp_helo, const char *smtp_email, const char *exec_path,
		const char *gsm_modem, const char *username, const char *passwd, unsigned short smtp_port,
		unsigned char smtp_security, unsigned char smtp_verify_peer, unsigned char smtp_verify_host,
		unsigned char smtp_authentication, const char *exec_params, int maxsessions, int maxattempts,
		const char *attempt_interval, unsigned char content_type, const char *script, const char *timeout,
		const char *sendto, const char *subject, const char *message, const char *params)
{
	ZBX_UNUSED(data);
	ZBX_UNUSED(mediatypeid);
	ZBX_UNUSED(type);
	ZBX_UNUSED(smtp_server);
	ZBX_UNUSED(smtp_helo);
	ZBX_UNUSED(smtp_email);
	ZBX_UNUSED(exec_path);
	ZBX_UNUSED(gsm_modem);
	ZBX_UNUSED(username);
	ZBX_UNUSED(passwd);
	ZBX_UNUSED(smtp_port);
	ZBX_UNUSED(smtp_security);
	ZBX_UNUSED(smtp_verify_peer);
	ZBX_UNUSED(smtp_verify_host);
	ZBX_UNUSED(smtp_authentication);
	ZBX_UNUSED(exec_params);
	ZBX_UNUSED(maxsessions);
	ZBX_UNUSED(maxattempts);
	ZBX_UNUSED(attempt_interval);
	ZBX_UNUSED(content_type);
	ZBX_UNUSED(script);
	ZBX_UNUSED(timeout);
	ZBX_UNUSED(sendto);
	ZBX_UNUSED(subject);
	ZBX_UNUSED(message);
	ZBX_UNUSED(params);

	THIS_SHOULD_NEVER_HAPPEN;

	return 0;
}

void	zbx_alerter_deserialize_result(const unsigned char *data, char **value, int *errcode, char **error,
		char **debug)
{
	ZBX_UNUSED(value);
	ZBX_UNUSED(data);
	ZBX_UNUSED(errcode);
	ZBX_UNUSED(error);
	ZBX_UNUSED(debug);

	THIS_SHOULD_NEVER_HAPPEN;
}

{'repo_name': 'zabbix/zabbix', 'stars': '1000', 'repo_language': 'C', 'file_name': 'zabbix-server', 'mime_type': 'text/x-shellscript', 'hash': 7940733536268720446, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: a97ca0b99ece2d94aaaf59653feb45dd
timeCreated: 1465923851
licenseType: Free
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: -3
  maxTextureSize: 64
  textureSettings:
    filterMode: -1
    aniso: 16
    mipBias: -1
    wrapMode: 1
  nPOTScale: 0
  lightmap: 0
  rGBM: 0
  compressionQuality: 50
  allowsAlphaSplitting: 0
  spriteMode: 1
  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: 1
  textureType: 8
  buildTargetSettings: []
  spriteSheet:
    sprites: []
    outline: []
  spritePackingTag:
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'yasirkula/UnityIngameDebugConsole', 'stars': '470', 'repo_language': 'C#', 'file_name': 'IngameDebugConsole.aar.meta', 'mime_type': 'text/plain', 'hash': -1669759420471205872, 'source_dataset': 'data'}


.. _common-downloads_firmware:

===================
DOWNLOADS: Firmware
===================

The latest firmware for all of the vehicles is available from the `firmware server <https://firmware.ardupilot.org/>`__.
This includes:

* `Copter <https://firmware.ardupilot.org/Copter>`__
* `Plane <https://firmware.ardupilot.org/Plane>`__
* `Rover <https://firmware.ardupilot.org/Rover>`__
* `AntennaTracker <https://firmware.ardupilot.org/AntennaTracker>`__

This page provides additional links to a number of specific builds that are considered "significant" - for example, the last builds of
Copter to fit on the APM2.x board.

.. tip::

    The firmware server additionally hosts GCS installers and other tools:

    * `Mission Planner <https://firmware.ardupilot.org/Tools/MissionPlanner>`__
    * `APM Planner 2.0 <https://firmware.ardupilot.org/Tools/APMPlanner>`__
    * `RadioSiK <https://firmware.ardupilot.org/SiK>`__
    * `Developer Builds <https://firmware.ardupilot.org/devbuild>`__
    * `Build and Development Tools <https://firmware.ardupilot.org/Tools>`__
    * `Companion Computers and associated example code <https://github.com/ArduPilot/companion>`__

Firmware
========

The following firmware is "special" in that it represents some significant milestone - e.g. "the last version of a build for a particular autopilot".

ArduCopter APM 2.x Firmware
---------------------------

ArduCopter v3.2.1 firmware for APM 2.x. This is the **last build** of ArduCopter that still fits on the **APM 2.x** boards.

* `ArduCopter_APM_2.0_Firmware_3.2.1.zip <https://download.ardupilot.org/downloads/wiki/firmware/ArduCopter_APM_2.0_Firmware_3.2.1.zip>`__

ArduCopter APM 1.0 Firmware
---------------------------

ArduCopter v3.2.1 firmware for APM 1.0. This is the last build of ArduCopter that still fits on the **APM 1.0** boards.

* `ArduCopter_APM_1.0_Firmware_3.2.1.zip <https://download.ardupilot.org/downloads/wiki/firmware/ArduCopter_APM_1.0_Firmware_3.2.1.zip>`__

Bootloader
==========

Bootloaders for various electronics created by ArduPilot Group

APM2.x Autopilot
================

Bootloader for APM2.x autopilot series

* Bootloader for: `32u2 MCU <https://firmware.ardupilot.org/downloads/bootloader/Arduino-usbdfu.hex>`__
* Bootloader for: `2560 MCU <https://firmware.ardupilot.org/downloads/bootloader/stk500boot_v2_mega2560.hex>`__

You need AVR programmer with ISP connector to burn these boot loaders.

License
=======

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 3 of the License, or (at your option) 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 <http://www.gnu.org/licenses/gpl.html>`__ for more details.

Safety
======

Operating a powered vehicle of any kind can be a lot of fun.
However, nothing will ruin your day at the park more quickly than an accident or running afoul of the law.
Since we want you to have a great experience, please make sure that you do all of the following:

* Operate within all local laws and regulations.
  For example, in the United States, current regulations require you to operate most UAVs under 400
  foot above ground level, within line of site, and away from obstructions and populated areas.
  Since these regulations vary from place to place, even within the same country, ensure that
  you understand what you need to do to stay compliant.
* Never operate the vehicle or software in a way that could be dangerous to you, other people, or property.
  Propellers, while rotating, could easily cut you; if a UAV fell on a person or object,
  it could cause injury; a UAV caught in power lines could cause an outage.
  As Ben Franklin said, “An ounce of prevention is worth a pound of cure.”
* Always keep in mind that software and hardware failures happen.
  Although we design our products to minimize such issues, you should always operate with the understanding that
  a failure could occur at any point of time and without warning.
  As such, you should take the appropriate precautions to minimize danger in case of failure.
* Never use the software or hardware for manned vehicles.
  The software and hardware we provide is only for use in unmanned vehicles.

[copywiki destination="copter,plane,rover,planner,planner2,antennatracker,dev,ardupilot,mavproxy"]

{'repo_name': 'ArduPilot/ardupilot_wiki', 'stars': '234', 'repo_language': 'Python', 'file_name': 'installing-apm-planner-2.rst', 'mime_type': 'text/plain', 'hash': -3027795774788996512, 'source_dataset': 'data'}


import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { JhiEventManager } from 'ng-jhipster';

import { IProduct } from 'app/shared/model/store/product.model';
import { ProductService } from './product.service';

@Component({
  selector: 'jhi-product-delete-dialog',
  templateUrl: './product-delete-dialog.component.html'
})
export class ProductDeleteDialogComponent {
  product: IProduct;

  constructor(protected productService: ProductService, public activeModal: NgbActiveModal, protected eventManager: JhiEventManager) {}

  clear() {
    this.activeModal.dismiss('cancel');
  }

  confirmDelete(id: number) {
    this.productService.delete(id).subscribe(response => {
      this.eventManager.broadcast({
        name: 'productListModification',
        content: 'Deleted an product'
      });
      this.activeModal.dismiss(true);
    });
  }
}

@Component({
  selector: 'jhi-product-delete-popup',
  template: ''
})
export class ProductDeletePopupComponent implements OnInit, OnDestroy {
  protected ngbModalRef: NgbModalRef;

  constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {}

  ngOnInit() {
    this.activatedRoute.data.subscribe(({ product }) => {
      setTimeout(() => {
        this.ngbModalRef = this.modalService.open(ProductDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' });
        this.ngbModalRef.componentInstance.product = product;
        this.ngbModalRef.result.then(
          result => {
            this.router.navigate(['/product', { outlets: { popup: null } }]);
            this.ngbModalRef = null;
          },
          reason => {
            this.router.navigate(['/product', { outlets: { popup: null } }]);
            this.ngbModalRef = null;
          }
        );
      }, 0);
    });
  }

  ngOnDestroy() {
    this.ngbModalRef = null;
  }
}

{'repo_name': 'oktadeveloper/java-microservices-examples', 'stars': '122', 'repo_language': 'Java', 'file_name': 'MavenWrapperDownloader.java', 'mime_type': 'text/x-c', 'hash': -1957070478270415874, 'source_dataset': 'data'}


# -*- coding: utf-8 -*-

"""
For system and cluster level functions interacting with the underlying NiFi
Services
"""

from __future__ import absolute_import
import nipyapi

__all__ = [
    "get_system_diagnostics", "get_cluster", "get_node",
    "get_nifi_version_info"
]

def get_system_diagnostics():
    """
    Returns NiFi Sytems diagnostics page

    Returns (json):
    """
    with nipyapi.utils.rest_exceptions():
        return nipyapi.nifi.SystemDiagnosticsApi().get_system_diagnostics()

def get_cluster():
    """
    EXPERIMENTAL
    Returns the contents of the NiFi cluster

    Returns (json):
    """
    with nipyapi.utils.rest_exceptions():
        return nipyapi.nifi.ControllerApi().get_cluster()

def get_node(nid):
    """
    Returns the cluster node information

    Args:
        nid (str): The UUID of the Node to target

    Returns:

    """
    with nipyapi.utils.rest_exceptions():
        return nipyapi.nifi.ControllerApi().get_node(nid)

def get_nifi_version_info():
    """
    Returns the version information of the connected NiFi instance

    Returns (VersionInfoDTO):
    """
    diags = get_system_diagnostics()
    return diags.system_diagnostics.aggregate_snapshot.version_info

{'repo_name': 'Chaffelson/nipyapi', 'stars': '144', 'repo_language': 'Python', 'file_name': 'nipyapi_testFlow_00.xml', 'mime_type': 'text/xml', 'hash': 7437250668603527575, 'source_dataset': 'data'}


<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

namespace Magento\Framework\View\Element;

use Magento\Framework\Api\Search\SearchCriteria;
use Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Magento\Framework\Config\DataInterface as ConfigData;
use Magento\Framework\Config\DataInterfaceFactory as ConfigDataFactory;

/**
 * Test the component factory.
 */
class UiComponentFactoryTest extends TestCase
{
    /**
     * @var UiComponentFactoryFactory
     */
    private $factory;

    /**
     * @inheritDoc
     */
    protected function setUp(): void
    {
        $this->factory = Bootstrap::getObjectManager()->get(UiComponentFactoryFactory::class);
    }

    /**
     * Create factory with mock config provided.
     *
     * @param array $mockConfig
     * @return UiComponentFactory
     */
    private function createFactory(array $mockConfig): UiComponentFactory
    {
        $dataMock = $this->getMockForAbstractClass(ConfigData::class);
        $dataMock->method('get')->willReturnCallback(
            function (string $id) use ($mockConfig) : array {
                return $mockConfig[$id];
            }
        );
        $dataFactoryMock = $this->getMockBuilder(ConfigDataFactory::class)
            ->disableOriginalConstructor()
            ->getMock();
        $dataFactoryMock->method('create')->willReturn($dataMock);

        return $this->factory->create(['configFactory' => $dataFactoryMock]);
    }

    /**
     * Test creating a component.
     *
     * @return void
     * @magentoAppArea adminhtml
     */
    public function testCreate(): void
    {
        //Mocking component config.
        $factory = $this->createFactory([
            'test' => [
                'arguments' => ['data' => ['config' => ['component' => 'uiComponent']]],
                'attributes' => [
                    'name' => 'test',
                    'sorting' => true,
                    'class' => 'Magento\Ui\Component\Listing',
                    'component' => 'uiComponent'
                ],
                'children' => [
                    'test_child' => [
                        'arguments' => [
                            'data' => ['config' => ['component' => 'uiComponent']],
                            'dataProvider' => $this->generateMockProvider()
                        ],
                        'attributes' => [
                            'name' => 'test_child',
                            'sorting' => true,
                            'class' => 'Magento\Ui\Component\Listing',
                            'component' => 'uiComponent'
                        ],
                        'children' => []
                    ]
                ]
            ],
            'test_child_child' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'component' => 'uiComponent',
                            'label' => '${\'Label\'}',
                            'componentType' => 'component'
                        ]
                    ],
                ],
                'attributes' => [
                    'name' => 'test_child_child',
                    'sorting' => true,
                    'class' => 'Magento\Ui\Component\Listing',
                    'component' => 'uiComponent'
                ],
                'children' => []
            ]
        ]);
        $component = $factory->create('test', null, ['data' => ['label' => '${\'Label\'}']]);

        $componentData = $component->getData();
        //Arguments passed must be sanitized
        $this->assertArrayHasKey('__disableTmpl', $componentData);
        $this->assertEquals(['label' => true], $componentData['__disableTmpl']);
        //Metadata provided by the dataProvider must be sanitized as well.
        $this->assertArrayHasKey('test_child_child', $childData = $component->getChildComponents());
        $childData = $component->getChildComponents()['test_child_child']->getData()['config'];
        $this->assertArrayHasKey('__disableTmpl', $childData);
        $this->assertEquals(['label' => true], $childData['__disableTmpl']);
    }

    /**
     * Generate provider for the test.
     *
     * @return DataProviderInterface
     */
    private function generateMockProvider(): DataProviderInterface
    {
        /** @var DataProviderInterface|MockObject $mock */
        $mock = $this->getMockForAbstractClass(DataProviderInterface::class);
        $mock->method('getName')->willReturn('test');
        $mock->method('getPrimaryFieldName')->willReturn('id');
        $mock->method('getRequestFieldName')->willReturn('id');
        $mock->method('getData')->willReturn([]);
        $mock->method('getConfigData')->willReturn([]);
        $mock->method('getFieldMetaInfo')->willReturn([]);
        $mock->method('getFieldSetMetaInfo')->willReturn('id');
        $mock->method('getFieldsMetaInfo')->willReturn('id');
        $mock->method('getSearchCriteria')->willReturn(new SearchCriteria());
        $mock->method('getSearchResult')->willReturn([]);
        $mock->method('getMeta')->willReturn(
            [
                'test_child_child' => [
                    'arguments' => [
                        'data' => [
                            'config' => [
                                'component' => 'uiComponent',
                                'label' => '${\'Label\'}',
                                'componentType' => 'component'
                            ]
                        ],
                    ],
                    'attributes' => [
                        'name' => 'test_child_child',
                        'sorting' => true,
                        'class' => 'Magento\Ui\Component\Listing',
                        'component' => 'uiComponent'
                    ]
                ]
            ]
        );

        return $mock;
    }
}

{'repo_name': 'magento/magento2', 'stars': '8767', 'repo_language': 'PHP', 'file_name': 'report.phtml', 'mime_type': 'text/x-php', 'hash': -255348993407791433, 'source_dataset': 'data'}


opam-version: "2.0"
maintainer:   "dave@recoil.org"
authors:      ["Anil Madhavapeddy" "David Scott"]
homepage:     "https://github.com/mirage/shared-memory-ring"
bug-reports:  "https://github.com/mirage/shared-memory-ring/issues"
dev-repo: "git+https://github.com/mirage/shared-memory-ring.git"
license:      "ISC"
tags:         [ "org:mirage" "org:xapi-project"]

build: [
  [ "jbuilder" "subst" "-p" name] {pinned}
  [ "jbuilder" "build" "-p" name "-j" jobs ]
]

depends: [
  "ocaml" {>= "4.02.0"}
  "ocamlfind" {build}
  "jbuilder" {>= "1.0+beta9"}
  "cstruct" {>= "2.4.1"}
  "shared-memory-ring" {= "2.0.0"}
  "lwt"
  "mirage-profile"
  "ounit" {with-test}
]
synopsis: "Shared memory rings for RPC and bytestream communications."
description: """
Includes concrete implementations of Xen console and Xenstore
rings."""
url {
  src:
    "https://github.com/mirage/shared-memory-ring/releases/download/2.0.0/shared-memory-ring-2.0.0.tbz"
  checksum: "md5=344072988978d74a264bf7c431b31002"
}

{'repo_name': 'ocaml/opam-repository', 'stars': '333', 'repo_language': 'Shell', 'file_name': 'opam', 'mime_type': 'text/plain', 'hash': 5348744573983798935, 'source_dataset': 'data'}


<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="Image" module="OFS.Image"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_Cacheable__manager_id</string> </key>
            <value> <string>http_cache</string> </value>
        </item>
        <item>
            <key> <string>__name__</string> </key>
            <value> <string>sepafon.png</string> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>image/png</string> </value>
        </item>
        <item>
            <key> <string>height</string> </key>
            <value> <int>16</int> </value>
        </item>
        <item>
            <key> <string>precondition</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>width</string> </key>
            <value> <int>2</int> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>

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


FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04

ARG BART_URL=https://github.com/mrirecon/bart
ARG BART_BRANCH=master

#Fix default ceres package on 16.04 is broken

RUN apt-get update --quiet && \
    apt-get install --no-install-recommends --no-install-suggests --yes software-properties-common

RUN apt-get update --quiet && \
    apt-get install --no-install-recommends --no-install-suggests --yes  \
    apt-utils wget build-essential emacs python-dev python-pip libhdf5-serial-dev git-core \
    libfftw3-dev h5utils jq libzmq-dev \
    hdf5-tools liblapack-dev libxml2-dev libfreetype6-dev pkg-config \
    libxslt-dev gcc-multilib  \
    libgtest-dev python-dev liblapack-dev liblapacke-dev libplplot-dev libdcmtk-dev \
    supervisor cpio net-tools libpugixml-dev

RUN apt-get install --no-install-recommends --no-install-suggests --yes \
    libopenblas-base libopenblas-dev

#Update cmake to something not entirely ancient
RUN add-apt-repository ppa:litenstein/cmake310-xenial
RUN apt-get update
RUN apt-get -y install cmake

#Update gcc to something remotely recent
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get -y install gcc-7 g++-7
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7

RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y python3.6
RUN apt-get install -y python3.6-dev
RUN apt-get install -y python3.6-venv

RUN cd /tmp
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3.6 get-pip.py
RUN rm /usr/bin/python3
RUN ln -s /usr/bin/python3.6 /usr/bin/python3

#Python stuff
RUN pip3 install --upgrade pip
RUN pip3 install -U pip setuptools
RUN pip3 install h5py psutil pyxb lxml Pillow configargparse numpy==1.15.4 Cython scipy tk-tools matplotlib==2.2.3 scikit-image opencv_python pydicom scikit-learn

RUN apt-get install -y python3.6-tk

RUN pip3 install --upgrade tensorflow
RUN pip3 install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip3 install tensorboardx visdom tqdm

# for embedded python plot, we need agg backend
RUN mkdir -p /root/.config/matplotlib && touch /root/.config/matplotlib/matplotlibrc
RUN echo "backend : agg" >> /root/.config/matplotlib/matplotlibrc

# Compile boost
RUN cd /opt && \
    wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz && \
    tar -xzvf boost_1_69_0.tar.gz && \
    cd boost_1_69_0 && \
    ./bootstrap.sh --with-python=/usr/bin/python3 --prefix=/usr && \
    ./b2 -j$(nproc) address-model=64 stage && \
    ./b2 install

# since cmake has problems to find python3 and boost-python3
RUN ln -s /usr/lib/libboost_python36.so /usr/lib/libboost_python3.so

# Compile armadillo
RUN cd /opt && \
    wget http://sourceforge.net/projects/arma/files/armadillo-9.200.8.tar.xz && \
    tar xvf armadillo-9.200.8.tar.xz && \
    cd armadillo-9.200.8 && \
    mkdir build && cd build && \
    cmake -DCMAKE_BUILD_TYPE=Release ../ && \
    make -j$(nproc) && \
    make PREFIX=/usr/lib/x86_64-linux-gnu install

# Compile PugiXML
RUN cd /opt && \
    git clone https://github.com/zeux/pugixml.git --branch v1.9 && cd pugixml && \
    mkdir build && cd build &&\
    cmake -DCMAKE_BUILD_TYPE=Release .. &&  \
    make -j$(nproc) && \
    make install

# fix the  qhull reentrant problem
# RUN pip uninstall -y scipy

#ZFP
RUN cd /opt && \
    git clone https://github.com/hansenms/ZFP.git && \
    cd ZFP && \
    mkdir lib && \
    make && \
    make shared && \
    make -j $(nproc) install

# BART
RUN cd /opt && \
    git clone ${BART_URL} --branch ${BART_BRANCH} --single-branch && \
    cd bart && \
    make -j $(nproc) && \
    make install

RUN apt-get clean

#Set more environment variables in preparation for Gadgetron installation
ENV GADGETRON_HOME=/usr/local \
    ISMRMRD_HOME=/usr/local

ENV PATH=$PATH:/usr/local/cuda/bin;$GADGETRON_HOME/bin:$ISMRMRD_HOME/bin \
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:$ISMRMRD_HOME/lib:$GADGETRON_HOME/lib

ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs:${LIBRARY_PATH}

# Clean up packages.
#RUN  apt-get clean && \
#   rm -rf /var/lib/apt/lists/*

{'repo_name': 'gadgetron/gadgetron', 'stars': '137', 'repo_language': 'C++', 'file_name': 'build-and-push-codespace-image.sh', 'mime_type': 'text/x-shellscript', 'hash': 7813411154120275088, 'source_dataset': 'data'}


/*
 * Internal GPIO functions.
 *
 * Copyright (C) 2013, Intel Corporation
 * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef GPIOLIB_H
#define GPIOLIB_H

#include <linux/err.h>
#include <linux/device.h>

enum of_gpio_flags;

struct acpi_device;

/**
 * struct acpi_gpio_info - ACPI GPIO specific information
 * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo
 * @active_low: in case of @gpioint, the pin is active low
 */
struct acpi_gpio_info {
	bool gpioint;
	bool active_low;
};

/* gpio suffixes used for ACPI and device tree lookup */
static const char * const gpio_suffixes[] = { "gpios", "gpio" };

#ifdef CONFIG_ACPI
void acpi_gpiochip_add(struct gpio_chip *chip);
void acpi_gpiochip_remove(struct gpio_chip *chip);

void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);

struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev,
					  const char *propname, int index,
					  struct acpi_gpio_info *info);
struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode,
				      const char *propname, int index,
				      struct acpi_gpio_info *info);

int acpi_gpio_count(struct device *dev, const char *con_id);
#else
static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }

static inline void
acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }

static inline void
acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }

static inline struct gpio_desc *
acpi_get_gpiod_by_index(struct acpi_device *adev, const char *propname,
			int index, struct acpi_gpio_info *info)
{
	return ERR_PTR(-ENOSYS);
}
static inline struct gpio_desc *
acpi_node_get_gpiod(struct fwnode_handle *fwnode, const char *propname,
		    int index, struct acpi_gpio_info *info)
{
	return ERR_PTR(-ENXIO);
}
static inline int acpi_gpio_count(struct device *dev, const char *con_id)
{
	return -ENODEV;
}
#endif

struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
		   const char *list_name, int index, enum of_gpio_flags *flags);

struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum);

extern struct spinlock gpio_lock;
extern struct list_head gpio_chips;

struct gpio_desc {
	struct gpio_chip	*chip;
	unsigned long		flags;
/* flag symbols are bit numbers */
#define FLAG_REQUESTED	0
#define FLAG_IS_OUT	1
#define FLAG_EXPORT	2	/* protected by sysfs_lock */
#define FLAG_SYSFS	3	/* exported via /sys/class/gpio/control */
#define FLAG_ACTIVE_LOW	6	/* value has active low */
#define FLAG_OPEN_DRAIN	7	/* Gpio is open drain type */
#define FLAG_OPEN_SOURCE 8	/* Gpio is open source type */
#define FLAG_USED_AS_IRQ 9	/* GPIO is connected to an IRQ */
#define FLAG_IS_HOGGED	11	/* GPIO is hogged */

	/* Connection label */
	const char		*label;
	/* Name of the GPIO */
	const char		*name;
};

int gpiod_request(struct gpio_desc *desc, const char *label);
void gpiod_free(struct gpio_desc *desc);
int gpiod_hog(struct gpio_desc *desc, const char *name,
		unsigned long lflags, enum gpiod_flags dflags);

/*
 * Return the GPIO number of the passed descriptor relative to its chip
 */
static int __maybe_unused gpio_chip_hwgpio(const struct gpio_desc *desc)
{
	return desc - &desc->chip->desc[0];
}

/* With descriptor prefix */

#define gpiod_emerg(desc, fmt, ...)					       \
	pr_emerg("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\
		 ##__VA_ARGS__)
#define gpiod_crit(desc, fmt, ...)					       \
	pr_crit("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
		 ##__VA_ARGS__)
#define gpiod_err(desc, fmt, ...)					       \
	pr_err("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",  \
		 ##__VA_ARGS__)
#define gpiod_warn(desc, fmt, ...)					       \
	pr_warn("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
		 ##__VA_ARGS__)
#define gpiod_info(desc, fmt, ...)					       \
	pr_info("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
		 ##__VA_ARGS__)
#define gpiod_dbg(desc, fmt, ...)					       \
	pr_debug("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\
		 ##__VA_ARGS__)

/* With chip prefix */

#define chip_emerg(chip, fmt, ...)					\
	pr_emerg("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)
#define chip_crit(chip, fmt, ...)					\
	pr_crit("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)
#define chip_err(chip, fmt, ...)					\
	pr_err("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)
#define chip_warn(chip, fmt, ...)					\
	pr_warn("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)
#define chip_info(chip, fmt, ...)					\
	pr_info("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)
#define chip_dbg(chip, fmt, ...)					\
	pr_debug("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__)

#ifdef CONFIG_GPIO_SYSFS

int gpiochip_sysfs_register(struct gpio_chip *chip);
void gpiochip_sysfs_unregister(struct gpio_chip *chip);

#else

static inline int gpiochip_sysfs_register(struct gpio_chip *chip)
{
	return 0;
}

static inline void gpiochip_sysfs_unregister(struct gpio_chip *chip)
{
}

#endif /* CONFIG_GPIO_SYSFS */

#endif /* GPIOLIB_H */

{'repo_name': 'seemoo-lab/bcm-rpi3', 'stars': '140', 'repo_language': 'C', 'file_name': 'spi.c', 'mime_type': 'text/x-c', 'hash': 6712813200895046265, 'source_dataset': 'data'}