text
stringlengths
2
100k
meta
dict
/* * Copyright (C) 2012 - Virtual Open Systems and Columbia University * Author: Christoffer Dall <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __ARM_KVM_H__ #define __ARM_KVM_H__ #include <linux/types.h> #include <linux/psci.h> #include <asm/ptrace.h> #define __KVM_HAVE_GUEST_DEBUG #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_READONLY_MEM #define KVM_REG_SIZE(id) \ (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) /* Valid for svc_regs, abt_regs, und_regs, irq_regs in struct kvm_regs */ #define KVM_ARM_SVC_sp svc_regs[0] #define KVM_ARM_SVC_lr svc_regs[1] #define KVM_ARM_SVC_spsr svc_regs[2] #define KVM_ARM_ABT_sp abt_regs[0] #define KVM_ARM_ABT_lr abt_regs[1] #define KVM_ARM_ABT_spsr abt_regs[2] #define KVM_ARM_UND_sp und_regs[0] #define KVM_ARM_UND_lr und_regs[1] #define KVM_ARM_UND_spsr und_regs[2] #define KVM_ARM_IRQ_sp irq_regs[0] #define KVM_ARM_IRQ_lr irq_regs[1] #define KVM_ARM_IRQ_spsr irq_regs[2] /* Valid only for fiq_regs in struct kvm_regs */ #define KVM_ARM_FIQ_r8 fiq_regs[0] #define KVM_ARM_FIQ_r9 fiq_regs[1] #define KVM_ARM_FIQ_r10 fiq_regs[2] #define KVM_ARM_FIQ_fp fiq_regs[3] #define KVM_ARM_FIQ_ip fiq_regs[4] #define KVM_ARM_FIQ_sp fiq_regs[5] #define KVM_ARM_FIQ_lr fiq_regs[6] #define KVM_ARM_FIQ_spsr fiq_regs[7] struct kvm_regs { struct pt_regs usr_regs; /* R0_usr - R14_usr, PC, CPSR */ unsigned long svc_regs[3]; /* SP_svc, LR_svc, SPSR_svc */ unsigned long abt_regs[3]; /* SP_abt, LR_abt, SPSR_abt */ unsigned long und_regs[3]; /* SP_und, LR_und, SPSR_und */ unsigned long irq_regs[3]; /* SP_irq, LR_irq, SPSR_irq */ unsigned long fiq_regs[8]; /* R8_fiq - R14_fiq, SPSR_fiq */ }; /* Supported Processor Types */ #define KVM_ARM_TARGET_CORTEX_A15 0 #define KVM_ARM_TARGET_CORTEX_A7 1 #define KVM_ARM_NUM_TARGETS 2 /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ #define KVM_ARM_DEVICE_TYPE_SHIFT 0 #define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) #define KVM_ARM_DEVICE_ID_SHIFT 16 #define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) /* Supported device IDs */ #define KVM_ARM_DEVICE_VGIC_V2 0 /* Supported VGIC address types */ #define KVM_VGIC_V2_ADDR_TYPE_DIST 0 #define KVM_VGIC_V2_ADDR_TYPE_CPU 1 #define KVM_VGIC_V2_DIST_SIZE 0x1000 #define KVM_VGIC_V2_CPU_SIZE 0x2000 /* Supported VGICv3 address types */ #define KVM_VGIC_V3_ADDR_TYPE_DIST 2 #define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 #define KVM_VGIC_ITS_ADDR_TYPE 4 #define KVM_VGIC_V3_DIST_SIZE SZ_64K #define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) #define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K) #define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */ #define KVM_ARM_VCPU_PSCI_0_2 1 /* CPU uses PSCI v0.2 */ struct kvm_vcpu_init { __u32 target; __u32 features[7]; }; struct kvm_sregs { }; struct kvm_fpu { }; struct kvm_guest_debug_arch { }; struct kvm_debug_exit_arch { }; struct kvm_sync_regs { }; struct kvm_arch_memory_slot { }; /* If you need to interpret the index values, here is the key: */ #define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000 #define KVM_REG_ARM_COPROC_SHIFT 16 #define KVM_REG_ARM_32_OPC2_MASK 0x0000000000000007 #define KVM_REG_ARM_32_OPC2_SHIFT 0 #define KVM_REG_ARM_OPC1_MASK 0x0000000000000078 #define KVM_REG_ARM_OPC1_SHIFT 3 #define KVM_REG_ARM_CRM_MASK 0x0000000000000780 #define KVM_REG_ARM_CRM_SHIFT 7 #define KVM_REG_ARM_32_CRN_MASK 0x0000000000007800 #define KVM_REG_ARM_32_CRN_SHIFT 11 #define ARM_CP15_REG_SHIFT_MASK(x,n) \ (((x) << KVM_REG_ARM_ ## n ## _SHIFT) & KVM_REG_ARM_ ## n ## _MASK) #define __ARM_CP15_REG(op1,crn,crm,op2) \ (KVM_REG_ARM | (15 << KVM_REG_ARM_COPROC_SHIFT) | \ ARM_CP15_REG_SHIFT_MASK(op1, OPC1) | \ ARM_CP15_REG_SHIFT_MASK(crn, 32_CRN) | \ ARM_CP15_REG_SHIFT_MASK(crm, CRM) | \ ARM_CP15_REG_SHIFT_MASK(op2, 32_OPC2)) #define ARM_CP15_REG32(...) (__ARM_CP15_REG(__VA_ARGS__) | KVM_REG_SIZE_U32) #define __ARM_CP15_REG64(op1,crm) \ (__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64) #define ARM_CP15_REG64(...) __ARM_CP15_REG64(__VA_ARGS__) #define KVM_REG_ARM_TIMER_CTL ARM_CP15_REG32(0, 14, 3, 1) #define KVM_REG_ARM_TIMER_CNT ARM_CP15_REG64(1, 14) #define KVM_REG_ARM_TIMER_CVAL ARM_CP15_REG64(3, 14) /* Normal registers are mapped as coprocessor 16. */ #define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT) #define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / 4) /* Some registers need more space to represent values. */ #define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT) #define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00 #define KVM_REG_ARM_DEMUX_ID_SHIFT 8 #define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT) #define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF #define KVM_REG_ARM_DEMUX_VAL_SHIFT 0 /* VFP registers: we could overload CP10 like ARM does, but that's ugly. */ #define KVM_REG_ARM_VFP (0x0012 << KVM_REG_ARM_COPROC_SHIFT) #define KVM_REG_ARM_VFP_MASK 0x000000000000FFFF #define KVM_REG_ARM_VFP_BASE_REG 0x0 #define KVM_REG_ARM_VFP_FPSID 0x1000 #define KVM_REG_ARM_VFP_FPSCR 0x1001 #define KVM_REG_ARM_VFP_MVFR1 0x1006 #define KVM_REG_ARM_VFP_MVFR0 0x1007 #define KVM_REG_ARM_VFP_FPEXC 0x1008 #define KVM_REG_ARM_VFP_FPINST 0x1009 #define KVM_REG_ARM_VFP_FPINST2 0x100A /* Device Control API: ARM VGIC */ #define KVM_DEV_ARM_VGIC_GRP_ADDR 0 #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 #define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2 #define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32 #define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT) #define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 #define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) #define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 #define KVM_DEV_ARM_VGIC_GRP_CTRL 4 #define KVM_DEV_ARM_VGIC_CTRL_INIT 0 /* KVM_IRQ_LINE irq field index values */ #define KVM_ARM_IRQ_TYPE_SHIFT 24 #define KVM_ARM_IRQ_TYPE_MASK 0xff #define KVM_ARM_IRQ_VCPU_SHIFT 16 #define KVM_ARM_IRQ_VCPU_MASK 0xff #define KVM_ARM_IRQ_NUM_SHIFT 0 #define KVM_ARM_IRQ_NUM_MASK 0xffff /* irq_type field */ #define KVM_ARM_IRQ_TYPE_CPU 0 #define KVM_ARM_IRQ_TYPE_SPI 1 #define KVM_ARM_IRQ_TYPE_PPI 2 /* out-of-kernel GIC cpu interrupt injection irq_number field */ #define KVM_ARM_IRQ_CPU_IRQ 0 #define KVM_ARM_IRQ_CPU_FIQ 1 /* * This used to hold the highest supported SPI, but it is now obsolete * and only here to provide source code level compatibility with older * userland. The highest SPI number can be set via KVM_DEV_ARM_VGIC_GRP_NR_IRQS. */ #ifndef __KERNEL__ #define KVM_ARM_IRQ_GIC_MAX 127 #endif /* One single KVM irqchip, ie. the VGIC */ #define KVM_NR_IRQCHIPS 1 /* PSCI interface */ #define KVM_PSCI_FN_BASE 0x95c1ba5e #define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) #define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0) #define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1) #define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) #define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) #define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS #define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED #define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS #define KVM_PSCI_RET_DENIED PSCI_RET_DENIED #endif /* __ARM_KVM_H__ */
{ "pile_set_name": "Github" }
/* * Copyright 2010-2012 VMware and contributors * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springsource.loaded; /** * Interface implemented by all dispatchers so code can be generated to call the dynamic executor regardless of the * dispatcher instance the code is actually working with. The method name here lines up with that defined in Constants - * see mDynamicDispatchName. * * @author Andy Clement * @since 0.5.0 */ public interface __DynamicallyDispatchable { Object __execute(Object[] parameters, Object instance, String nameAndDescriptor); }
{ "pile_set_name": "Github" }
--- - name: Install requied Etherpad packages apt: pkg={{ item }} state=latest install_recommends=no with_items: [ 'build-essential', 'pkg-config', 'libssl-dev', 'libpq-dev' ] - name: Install Abiword if enabled apt: pkg=abiword state=latest install_recommends=no when: etherpad_abiword is defined and etherpad_abiword - name: Create Etherpad system group group: name={{ etherpad_group }} system=yes state=present - name: Create Etherpad user user: name={{ etherpad_user }} group={{ etherpad_group }} home={{ etherpad_home }} comment="Etherpad" system=yes state=present - name: Secure Etherpad home directory file: path={{ etherpad_home }} state=directory owner={{ etherpad_user }} group={{ etherpad_group }} mode=0750 - name: Clone Etherpad source code git: repo={{ etherpad_source_address + '/' + etherpad_repository }} dest={{ etherpad_sources + '/' + etherpad_repository }} version={{ etherpad_version }} bare=yes update=yes sudo_user: '{{ etherpad_user }}' register: etherpad_register_source - name: Check if Etherpad is checked out stat: path={{ etherpad_home + '/' + etherpad_repository }} register: etherpad_register_directory - name: Create Etherpad directory file: path={{ etherpad_home + '/' + etherpad_repository }} state=directory owner={{ etherpad_user }} group={{ etherpad_group }} mode=0755 when: (etherpad_register_source is defined and etherpad_register_source.changed == True) or (etherpad_register_directory is defined and etherpad_register_directory.stat.exists == False) - name: Prepare Etherpad worktree template: src=srv/users/etherpad/etherpad-lite/git.j2 dest={{ etherpad_home + '/' + etherpad_repository }}/.git owner={{ etherpad_user }} group={{ etherpad_group }} mode=0644 when: (etherpad_register_source is defined and etherpad_register_source.changed == True) or (etherpad_register_directory is defined and etherpad_register_directory.stat.exists == False) - name: Checkout Etherpad shell: GIT_WORK_TREE={{ etherpad_home + '/' + etherpad_repository }} git checkout -f {{ etherpad_version }} chdir={{ etherpad_sources + '/' + etherpad_repository }} sudo_user: '{{ etherpad_user }}' register: etherpad_register_checkout notify: [ 'Restart etherpad-lite' ] when: (etherpad_register_source is defined and etherpad_register_source.changed == True) or (etherpad_register_directory is defined and etherpad_register_directory.stat.exists == False) - name: Set default MySQL password set_fact: etherpad_mysql_database_password: "" - name: Lookup MySQL password if secrets/ directory is defined set_fact: etherpad_mysql_database_password: "{{ lookup('password', secret + '/credentials/' + ansible_fqdn + '/mysql/' + etherpad_database_config[etherpad_database].username + '/password') }}" when: (secret is defined and secret) and (etherpad_database is defined and etherpad_database == 'mysql') - name: Generate Etherpad session key set_fact: etherpad_session_key: "{{ lookup('password', secret + '/credentials/' + ansible_fqdn + '/etherpad/session_key chars=ascii,numbers,digits,hexdigits length=30') }}" when: secret is defined and secret - name: Generate Etherpad configuration template: src=srv/users/etherpad/etherpad-lite/settings.json.j2 dest={{ etherpad_home + '/' + etherpad_repository }}/settings.json owner={{ etherpad_user }} group={{ etherpad_group }} mode=0644 notify: [ 'Restart etherpad-lite' ] - name: Reserve Etherpad port template: src=etc/services.d/50_etherpad-lite.j2 dest=/etc/services.d/50_etherpad-lite owner=root group=root mode=0644 notify: [ 'Assemble services.d' ] - name: Create log directory file: state=directory path=/var/log/{{ etherpad_user }} owner={{ etherpad_user }} group=adm mode=0755 - name: Configure etherpad-lite system service template: src={{ item }}.j2 dest=/{{ item }} owner=root group=root mode=0644 with_items: [ 'etc/default/etherpad-lite', 'etc/logrotate.d/etherpad-lite' ] - name: Install etherpad-lite init script template: src=etc/init.d/etherpad-lite.j2 dest=/etc/init.d/etherpad-lite owner=root group=root mode=0755 register: etherpad_register_init_script notify: [ 'Restart etherpad-lite' ] - name: Enable etherpad-lite service command: insserv etherpad-lite when: etherpad_register_init_script is defined and etherpad_register_init_script.changed - name: Install Etherpad dependencies command: bin/installDeps.sh chdir={{ etherpad_home + '/' + etherpad_repository }} creates={{ etherpad_home }}/.node-gyp sudo_user: '{{ etherpad_user }}' - name: Manage Etherpad plugins npm: path={{ etherpad_home + '/' + etherpad_repository }} state=present production=yes name='ep_{{ item }}' with_items: etherpad_plugins sudo_user: '{{ etherpad_user }}' notify: [ 'Restart etherpad-lite' ] when: etherpad_plugins is defined and etherpad_plugins
{ "pile_set_name": "Github" }
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja ([email protected]). All rights reserved. * Copyright 2008-2009 David G. Lowe ([email protected]). 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. * * 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. *************************************************************************/ #ifndef OPENCV_FLANN_HDF5_H_ #define OPENCV_FLANN_HDF5_H_ #include <hdf5.h> #include "matrix.h" namespace cvflann { namespace { template<typename T> hid_t get_hdf5_type() { throw FLANNException("Unsupported type for IO operations"); } template<> hid_t get_hdf5_type<char>() { return H5T_NATIVE_CHAR; } template<> hid_t get_hdf5_type<unsigned char>() { return H5T_NATIVE_UCHAR; } template<> hid_t get_hdf5_type<short int>() { return H5T_NATIVE_SHORT; } template<> hid_t get_hdf5_type<unsigned short int>() { return H5T_NATIVE_USHORT; } template<> hid_t get_hdf5_type<int>() { return H5T_NATIVE_INT; } template<> hid_t get_hdf5_type<unsigned int>() { return H5T_NATIVE_UINT; } template<> hid_t get_hdf5_type<long>() { return H5T_NATIVE_LONG; } template<> hid_t get_hdf5_type<unsigned long>() { return H5T_NATIVE_ULONG; } template<> hid_t get_hdf5_type<float>() { return H5T_NATIVE_FLOAT; } template<> hid_t get_hdf5_type<double>() { return H5T_NATIVE_DOUBLE; } } #define CHECK_ERROR(x,y) if ((x)<0) throw FLANNException((y)); template<typename T> void save_to_file(const cvflann::Matrix<T>& dataset, const std::string& filename, const std::string& name) { #if H5Eset_auto_vers == 2 H5Eset_auto( H5E_DEFAULT, NULL, NULL ); #else H5Eset_auto( NULL, NULL ); #endif herr_t status; hid_t file_id; file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT); if (file_id < 0) { file_id = H5Fcreate(filename.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT); } CHECK_ERROR(file_id,"Error creating hdf5 file."); hsize_t dimsf[2]; // dataset dimensions dimsf[0] = dataset.rows; dimsf[1] = dataset.cols; hid_t space_id = H5Screate_simple(2, dimsf, NULL); hid_t memspace_id = H5Screate_simple(2, dimsf, NULL); hid_t dataset_id; #if H5Dcreate_vers == 2 dataset_id = H5Dcreate2(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); #else dataset_id = H5Dcreate(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT); #endif if (dataset_id<0) { #if H5Dopen_vers == 2 dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT); #else dataset_id = H5Dopen(file_id, name.c_str()); #endif } CHECK_ERROR(dataset_id,"Error creating or opening dataset in file."); status = H5Dwrite(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, H5P_DEFAULT, dataset.data ); CHECK_ERROR(status, "Error writing to dataset"); H5Sclose(memspace_id); H5Sclose(space_id); H5Dclose(dataset_id); H5Fclose(file_id); } template<typename T> void load_from_file(cvflann::Matrix<T>& dataset, const std::string& filename, const std::string& name) { herr_t status; hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT); CHECK_ERROR(file_id,"Error opening hdf5 file."); hid_t dataset_id; #if H5Dopen_vers == 2 dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT); #else dataset_id = H5Dopen(file_id, name.c_str()); #endif CHECK_ERROR(dataset_id,"Error opening dataset in file."); hid_t space_id = H5Dget_space(dataset_id); hsize_t dims_out[2]; H5Sget_simple_extent_dims(space_id, dims_out, NULL); dataset = cvflann::Matrix<T>(new T[dims_out[0]*dims_out[1]], dims_out[0], dims_out[1]); status = H5Dread(dataset_id, get_hdf5_type<T>(), H5S_ALL, H5S_ALL, H5P_DEFAULT, dataset[0]); CHECK_ERROR(status, "Error reading dataset"); H5Sclose(space_id); H5Dclose(dataset_id); H5Fclose(file_id); } #ifdef HAVE_MPI namespace mpi { /** * Loads a the hyperslice corresponding to this processor from a hdf5 file. * @param flann_dataset Dataset where the data is loaded * @param filename HDF5 file name * @param name Name of dataset inside file */ template<typename T> void load_from_file(cvflann::Matrix<T>& dataset, const std::string& filename, const std::string& name) { MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; int mpi_size, mpi_rank; MPI_Comm_size(comm, &mpi_size); MPI_Comm_rank(comm, &mpi_rank); herr_t status; hid_t plist_id = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_mpio(plist_id, comm, info); hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, plist_id); CHECK_ERROR(file_id,"Error opening hdf5 file."); H5Pclose(plist_id); hid_t dataset_id; #if H5Dopen_vers == 2 dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT); #else dataset_id = H5Dopen(file_id, name.c_str()); #endif CHECK_ERROR(dataset_id,"Error opening dataset in file."); hid_t space_id = H5Dget_space(dataset_id); hsize_t dims[2]; H5Sget_simple_extent_dims(space_id, dims, NULL); hsize_t count[2]; hsize_t offset[2]; hsize_t item_cnt = dims[0]/mpi_size+(dims[0]%mpi_size==0 ? 0 : 1); hsize_t cnt = (mpi_rank<mpi_size-1 ? item_cnt : dims[0]-item_cnt*(mpi_size-1)); count[0] = cnt; count[1] = dims[1]; offset[0] = mpi_rank*item_cnt; offset[1] = 0; hid_t memspace_id = H5Screate_simple(2,count,NULL); H5Sselect_hyperslab(space_id, H5S_SELECT_SET, offset, NULL, count, NULL); dataset.rows = count[0]; dataset.cols = count[1]; dataset.data = new T[dataset.rows*dataset.cols]; plist_id = H5Pcreate(H5P_DATASET_XFER); H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE); status = H5Dread(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, plist_id, dataset.data); CHECK_ERROR(status, "Error reading dataset"); H5Pclose(plist_id); H5Sclose(space_id); H5Sclose(memspace_id); H5Dclose(dataset_id); H5Fclose(file_id); } } #endif // HAVE_MPI } // namespace cvflann::mpi #endif /* OPENCV_FLANN_HDF5_H_ */
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:background="@android:color/white" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/white"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorPrimaryDark" android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout android:id="@+id/fragment_title_bar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="@color/colorPrimaryDark" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:padding="10dp" android:text="Curtain Menu" android:textColor="@android:color/white" android:textSize="16sp" android:textStyle="bold" /> </RelativeLayout> </FrameLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:orientation="vertical"> <android.support.v7.widget.AppCompatImageView android:id="@+id/header" android:layout_width="73dp" android:layout_height="73dp" android:layout_gravity="center_horizontal" app:srcCompat="@mipmap/rounded_corners" /> <android.support.v7.widget.AppCompatTextView android:id="@+id/nickname" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_weight="1" android:gravity="center" android:padding="10dp" android:text="Android1404" android:textColor="@android:color/white" android:textSize="16sp" /> </LinearLayout> </LinearLayout> </FrameLayout> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:lineSpacingExtra="10dp" android:padding="10dp" android:text="@string/android_desc" android:textColor="#444444" android:textSize="16sp" /> </LinearLayout> </FrameLayout>
{ "pile_set_name": "Github" }
'use strict'; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { var obj; while (queue.length) { var item = queue.pop(); obj = item.obj[item.prop]; if (Array.isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } return obj; }; exports.arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; exports.merge = function merge(target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = exports.arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = exports.merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = exports.merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; exports.assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; exports.decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; exports.encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; exports.compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } return compactQueue(queue); }; exports.isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; exports.isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); };
{ "pile_set_name": "Github" }
## Process this with automake to create Makefile.in AUTOMAKE_OPTIONS=foreign DISTCLEANFILES=ffitarget.h noinst_HEADERS=ffi_common.h ffi_cfi.h EXTRA_DIST=ffi.h.in nodist_include_HEADERS = ffi.h ffitarget.h
{ "pile_set_name": "Github" }
java_library( name = "a", srcs = [ "A.java", "B.java", ], ) java_binary( name = "binary", main_class = "A", deps = [":a"], )
{ "pile_set_name": "Github" }
@comment $OpenBSD: PLIST,v$ @bin bin/f18
{ "pile_set_name": "Github" }
/* * Copyright 2014 Splunk, 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. */ package com.splunk.examples.fluent_pivot; import com.splunk.*; public class Program { public static void main(String[] argv) { try { run(argv); } catch (Exception e) { e.printStackTrace(); System.exit(1); } } static void run(String[] argsIn) throws Exception { Command command; Service service; command = Command.splunk("input"); service = Service.connect(command.opts); DataModel dataModel = service.getDataModels().get("internal_audit_logs"); DataModelObject searches = dataModel.getObject("searches"); System.out.print("Working with object " + searches.getDisplayName()); System.out.println(" in model " + dataModel.getDisplayName()); System.out.print(" Lineage: "); for (String name : searches.getLineage()) { System.out.print(" -> " + name); } System.out.println(); System.out.println(" Internal name: " + searches.getName()); Job firstFiveEntries = searches.runQuery("| head 5"); while (!firstFiveEntries.isDone()) { Thread.sleep(100); } ResultsReaderXml results = new ResultsReaderXml(firstFiveEntries.getResults()); for (Event event : results) { System.out.println(event.toString()); } System.out.println("~~~~~~~~~~~~~~~~~~~~"); System.out.println("Pivoting on searches"); Pivot pivot = searches.createPivotSpecification(). addRowSplit("user", "Executing user"). addColumnSplit("exec_time", null, null, null, 4). addCellValue("search", "Search Query", StatsFunction.DISTINCT_VALUES). pivot(); System.out.println("Query for binning search queries by execution time and executing user:"); System.out.println(" " + pivot.getPrettyQuery()); Job pivotJob = pivot.run(); while (!pivotJob.isDone()) { Thread.sleep(100); } results = new ResultsReaderXml(pivotJob.getResults()); for (Event event : results) { System.out.println(event.toString()); } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>mxGraph: com.mxgraph.mxBasicCanvas Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">mxGraph </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search'); }); </script> <div id="main-nav"></div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1mxgraph.html">mxgraph</a></li><li class="navelem"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html">mxBasicCanvas</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pub-static-attribs">Static Public Attributes</a> &#124; <a href="#pro-methods">Protected Member Functions</a> &#124; <a href="#pro-attribs">Protected Attributes</a> &#124; <a href="#properties">Properties</a> &#124; <a href="classcom_1_1mxgraph_1_1mxBasicCanvas-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">com.mxgraph.mxBasicCanvas Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> </div><!--header--> <div class="contents"> <p>Basic implementation of a canvas that draws a graph. <a href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for com.mxgraph.mxBasicCanvas:</div> <div class="dyncontent"> <div class="center"> <img src="classcom_1_1mxgraph_1_1mxBasicCanvas.png" usemap="#com.mxgraph.mxBasicCanvas_map" alt=""/> <map id="com.mxgraph.mxBasicCanvas_map" name="com.mxgraph.mxBasicCanvas_map"> <area href="interfacecom_1_1mxgraph_1_1mxICanvas.html" title="Defines the requirements for a canvas that paints the vertices and edges of a graph. " alt="com.mxgraph.mxICanvas" shape="rect" coords="0,0,180,24"/> <area href="classcom_1_1mxgraph_1_1mxGdiCanvas.html" title="Implementation of a canvas that uses GDI for painting. " alt="com.mxgraph.mxGdiCanvas" shape="rect" coords="0,112,180,136"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ab8d6ec57958c57bfc796e3404fdf9816"><td class="memItemLeft" align="right" valign="top">abstract Object&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#ab8d6ec57958c57bfc796e3404fdf9816">DrawCell</a> (<a class="el" href="classcom_1_1mxgraph_1_1mxCellState.html">mxCellState</a> state)</td></tr> <tr class="memdesc:ab8d6ec57958c57bfc796e3404fdf9816"><td class="mdescLeft">&#160;</td><td class="mdescRight">see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a2b9d62b6b658833c5455b3e79807e73a" title="Draws the given cell. ">com.mxgraph.mxICanvas.DrawCell()</a> <a href="#ab8d6ec57958c57bfc796e3404fdf9816">More...</a><br /></td></tr> <tr class="separator:ab8d6ec57958c57bfc796e3404fdf9816"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acc1d4e9e83ced1b5b70d1097b53aade4"><td class="memItemLeft" align="right" valign="top">abstract Object&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#acc1d4e9e83ced1b5b70d1097b53aade4">DrawLabel</a> (string text, <a class="el" href="classcom_1_1mxgraph_1_1mxCellState.html">mxCellState</a> state, bool html)</td></tr> <tr class="memdesc:acc1d4e9e83ced1b5b70d1097b53aade4"><td class="mdescLeft">&#160;</td><td class="mdescRight">see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a81915e5bda4641165f93ac7b9177fae8" title="Draws the given label. ">com.mxgraph.mxICanvas.DrawLabel()</a> <a href="#acc1d4e9e83ced1b5b70d1097b53aade4">More...</a><br /></td></tr> <tr class="separator:acc1d4e9e83ced1b5b70d1097b53aade4"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a> Static Public Attributes</h2></td></tr> <tr class="memitem:a845a6c57b10c117c3f64e68678536107"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a845a6c57b10c117c3f64e68678536107">DEFAULT_IMAGEBASEPATH</a> = &quot;&quot;</td></tr> <tr class="memdesc:a845a6c57b10c117c3f64e68678536107"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the default value for the imageBasePath in all GDI canvases. Default is an empty string. <a href="#a845a6c57b10c117c3f64e68678536107">More...</a><br /></td></tr> <tr class="separator:a845a6c57b10c117c3f64e68678536107"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr class="memitem:ac456dc7e33e5013277435b671cbd5ca3"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#ac456dc7e33e5013277435b671cbd5ca3">GetImageForStyle</a> (Dictionary&lt; string, Object &gt; style)</td></tr> <tr class="memdesc:ac456dc7e33e5013277435b671cbd5ca3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the image path from the given style. If the path is relative (does not start with a slash) then it is appended to the imageBasePath. <a href="#ac456dc7e33e5013277435b671cbd5ca3">More...</a><br /></td></tr> <tr class="separator:ac456dc7e33e5013277435b671cbd5ca3"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr class="memitem:a74388fd782b7572a8bb9083f6cf88b4b"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a74388fd782b7572a8bb9083f6cf88b4b">imageBasePath</a> = <a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a845a6c57b10c117c3f64e68678536107">DEFAULT_IMAGEBASEPATH</a></td></tr> <tr class="memdesc:a74388fd782b7572a8bb9083f6cf88b4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the base path for images with relative paths. Trailing slash is required. Default value is DEFAULT_IMAGEBASEPATH. <a href="#a74388fd782b7572a8bb9083f6cf88b4b">More...</a><br /></td></tr> <tr class="separator:a74388fd782b7572a8bb9083f6cf88b4b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2673993cd3f9dbc20f4f270d517f2f9d"><td class="memItemLeft" align="right" valign="top">Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a2673993cd3f9dbc20f4f270d517f2f9d">translate</a> = new Point(0, 0)</td></tr> <tr class="memdesc:a2673993cd3f9dbc20f4f270d517f2f9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the current translation. Default is (0,0). <a href="#a2673993cd3f9dbc20f4f270d517f2f9d">More...</a><br /></td></tr> <tr class="separator:a2673993cd3f9dbc20f4f270d517f2f9d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a87ae22b03150a396473764ea6e560712"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a87ae22b03150a396473764ea6e560712">scale</a></td></tr> <tr class="memdesc:a87ae22b03150a396473764ea6e560712"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the current scale. Default is 1. <a href="#a87ae22b03150a396473764ea6e560712">More...</a><br /></td></tr> <tr class="separator:a87ae22b03150a396473764ea6e560712"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a49655bf82a4191de7b47d6a18d7244aa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a49655bf82a4191de7b47d6a18d7244aa">drawLabels</a> = true</td></tr> <tr class="memdesc:a49655bf82a4191de7b47d6a18d7244aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies whether labels should be painted. Default is true. <a href="#a49655bf82a4191de7b47d6a18d7244aa">More...</a><br /></td></tr> <tr class="separator:a49655bf82a4191de7b47d6a18d7244aa"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a> Properties</h2></td></tr> <tr class="memitem:a3ef2ee08e5a075274841476d119354ea"><td class="memItemLeft" align="right" valign="top">Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a3ef2ee08e5a075274841476d119354ea">Translate</a><code> [get, set]</code></td></tr> <tr class="memdesc:a3ef2ee08e5a075274841476d119354ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a64c4a0b2c985c41c6338a894b79d3a87" title="Sets or returns the user object of the cell. ">com.mxgraph.mxICanvas.Translate</a> <a href="#a3ef2ee08e5a075274841476d119354ea">More...</a><br /></td></tr> <tr class="separator:a3ef2ee08e5a075274841476d119354ea"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a49d54a42504a7e093693f41ddb33f85f"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a49d54a42504a7e093693f41ddb33f85f">Scale</a><code> [get, set]</code></td></tr> <tr class="memdesc:a49d54a42504a7e093693f41ddb33f85f"><td class="mdescLeft">&#160;</td><td class="mdescRight">see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a5b01b41f8e91b566071590db46590f0b" title="Sets or returns the user object of the cell. ">com.mxgraph.mxICanvas.Scale</a> <a href="#a49d54a42504a7e093693f41ddb33f85f">More...</a><br /></td></tr> <tr class="separator:a49d54a42504a7e093693f41ddb33f85f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3c77fbc9dc6414cad89eeb61efece6e5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a3c77fbc9dc6414cad89eeb61efece6e5">DrawLabels</a><code> [get, set]</code></td></tr> <tr class="memdesc:a3c77fbc9dc6414cad89eeb61efece6e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if labels should be visible. <a href="#a3c77fbc9dc6414cad89eeb61efece6e5">More...</a><br /></td></tr> <tr class="separator:a3c77fbc9dc6414cad89eeb61efece6e5"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aec37e006e0983a1de63fa9a38abfc49f"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#aec37e006e0983a1de63fa9a38abfc49f">ImageBasePath</a><code> [get, set]</code></td></tr> <tr class="memdesc:aec37e006e0983a1de63fa9a38abfc49f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets or gets the image base path. <a href="#aec37e006e0983a1de63fa9a38abfc49f">More...</a><br /></td></tr> <tr class="separator:aec37e006e0983a1de63fa9a38abfc49f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td colspan="2" onclick="javascript:toggleInherit('properties_interfacecom_1_1mxgraph_1_1mxICanvas')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html">com.mxgraph.mxICanvas</a></td></tr> <tr class="memitem:a64c4a0b2c985c41c6338a894b79d3a87 inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="memItemLeft" align="right" valign="top">Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a64c4a0b2c985c41c6338a894b79d3a87">Translate</a><code> [get, set]</code></td></tr> <tr class="memdesc:a64c4a0b2c985c41c6338a894b79d3a87 inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets or returns the user object of the cell. <a href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a64c4a0b2c985c41c6338a894b79d3a87">More...</a><br /></td></tr> <tr class="separator:a64c4a0b2c985c41c6338a894b79d3a87 inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5b01b41f8e91b566071590db46590f0b inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a5b01b41f8e91b566071590db46590f0b">Scale</a><code> [get, set]</code></td></tr> <tr class="memdesc:a5b01b41f8e91b566071590db46590f0b inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets or returns the user object of the cell. <a href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a5b01b41f8e91b566071590db46590f0b">More...</a><br /></td></tr> <tr class="separator:a5b01b41f8e91b566071590db46590f0b inherit properties_interfacecom_1_1mxgraph_1_1mxICanvas"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Basic implementation of a canvas that draws a graph. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="ab8d6ec57958c57bfc796e3404fdf9816"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab8d6ec57958c57bfc796e3404fdf9816">&#9670;&nbsp;</a></span>DrawCell()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">abstract Object com.mxgraph.mxBasicCanvas.DrawCell </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1mxgraph_1_1mxCellState.html">mxCellState</a>&#160;</td> <td class="paramname"><em>state</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a2b9d62b6b658833c5455b3e79807e73a" title="Draws the given cell. ">com.mxgraph.mxICanvas.DrawCell()</a> </p> <p>Implements <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a2b9d62b6b658833c5455b3e79807e73a">com.mxgraph.mxICanvas</a>.</p> <p>Implemented in <a class="el" href="classcom_1_1mxgraph_1_1mxGdiCanvas.html#a76bd38ecebca3a73798ac61c58a5015c">com.mxgraph.mxGdiCanvas</a>.</p> </div> </div> <a id="acc1d4e9e83ced1b5b70d1097b53aade4"></a> <h2 class="memtitle"><span class="permalink"><a href="#acc1d4e9e83ced1b5b70d1097b53aade4">&#9670;&nbsp;</a></span>DrawLabel()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">abstract Object com.mxgraph.mxBasicCanvas.DrawLabel </td> <td>(</td> <td class="paramtype">string&#160;</td> <td class="paramname"><em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcom_1_1mxgraph_1_1mxCellState.html">mxCellState</a>&#160;</td> <td class="paramname"><em>state</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool&#160;</td> <td class="paramname"><em>html</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a81915e5bda4641165f93ac7b9177fae8" title="Draws the given label. ">com.mxgraph.mxICanvas.DrawLabel()</a> </p> <p>Implements <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a81915e5bda4641165f93ac7b9177fae8">com.mxgraph.mxICanvas</a>.</p> <p>Implemented in <a class="el" href="classcom_1_1mxgraph_1_1mxGdiCanvas.html#a962325d7b89f75230f1e3fb991b5fe34">com.mxgraph.mxGdiCanvas</a>.</p> </div> </div> <a id="ac456dc7e33e5013277435b671cbd5ca3"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac456dc7e33e5013277435b671cbd5ca3">&#9670;&nbsp;</a></span>GetImageForStyle()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">string com.mxgraph.mxBasicCanvas.GetImageForStyle </td> <td>(</td> <td class="paramtype">Dictionary&lt; string, Object &gt;&#160;</td> <td class="paramname"><em>style</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the image path from the given style. If the path is relative (does not start with a slash) then it is appended to the imageBasePath. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">style</td><td></td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd></dd></dl> <p class="reference">References <a class="el" href="classcom_1_1mxgraph_1_1mxUtils.html#aab5a20a39aea1062f4ea855f7649bcdb">com.mxgraph.mxUtils.GetString()</a>, and <a class="el" href="classcom_1_1mxgraph_1_1mxConstants.html#a153b61b6f0e5809f11945482a914b0b9">com.mxgraph.mxConstants.STYLE_IMAGE</a>.</p> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a id="a845a6c57b10c117c3f64e68678536107"></a> <h2 class="memtitle"><span class="permalink"><a href="#a845a6c57b10c117c3f64e68678536107">&#9670;&nbsp;</a></span>DEFAULT_IMAGEBASEPATH</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">string com.mxgraph.mxBasicCanvas.DEFAULT_IMAGEBASEPATH = &quot;&quot;</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Defines the default value for the imageBasePath in all GDI canvases. Default is an empty string. </p> </div> </div> <a id="a49655bf82a4191de7b47d6a18d7244aa"></a> <h2 class="memtitle"><span class="permalink"><a href="#a49655bf82a4191de7b47d6a18d7244aa">&#9670;&nbsp;</a></span>drawLabels</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">bool com.mxgraph.mxBasicCanvas.drawLabels = true</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Specifies whether labels should be painted. Default is true. </p> </div> </div> <a id="a74388fd782b7572a8bb9083f6cf88b4b"></a> <h2 class="memtitle"><span class="permalink"><a href="#a74388fd782b7572a8bb9083f6cf88b4b">&#9670;&nbsp;</a></span>imageBasePath</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">string com.mxgraph.mxBasicCanvas.imageBasePath = <a class="el" href="classcom_1_1mxgraph_1_1mxBasicCanvas.html#a845a6c57b10c117c3f64e68678536107">DEFAULT_IMAGEBASEPATH</a></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Defines the base path for images with relative paths. Trailing slash is required. Default value is DEFAULT_IMAGEBASEPATH. </p> </div> </div> <a id="a87ae22b03150a396473764ea6e560712"></a> <h2 class="memtitle"><span class="permalink"><a href="#a87ae22b03150a396473764ea6e560712">&#9670;&nbsp;</a></span>scale</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">double com.mxgraph.mxBasicCanvas.scale</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Specifies the current scale. Default is 1. </p> </div> </div> <a id="a2673993cd3f9dbc20f4f270d517f2f9d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2673993cd3f9dbc20f4f270d517f2f9d">&#9670;&nbsp;</a></span>translate</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">Point com.mxgraph.mxBasicCanvas.translate = new Point(0, 0)</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Specifies the current translation. Default is (0,0). </p> </div> </div> <h2 class="groupheader">Property Documentation</h2> <a id="a3c77fbc9dc6414cad89eeb61efece6e5"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3c77fbc9dc6414cad89eeb61efece6e5">&#9670;&nbsp;</a></span>DrawLabels</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">bool com.mxgraph.mxBasicCanvas.DrawLabels</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets if labels should be visible. </p> </div> </div> <a id="aec37e006e0983a1de63fa9a38abfc49f"></a> <h2 class="memtitle"><span class="permalink"><a href="#aec37e006e0983a1de63fa9a38abfc49f">&#9670;&nbsp;</a></span>ImageBasePath</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">string com.mxgraph.mxBasicCanvas.ImageBasePath</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets or gets the image base path. </p> </div> </div> <a id="a49d54a42504a7e093693f41ddb33f85f"></a> <h2 class="memtitle"><span class="permalink"><a href="#a49d54a42504a7e093693f41ddb33f85f">&#9670;&nbsp;</a></span>Scale</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">double com.mxgraph.mxBasicCanvas.Scale</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a5b01b41f8e91b566071590db46590f0b" title="Sets or returns the user object of the cell. ">com.mxgraph.mxICanvas.Scale</a> </p> </div> </div> <a id="a3ef2ee08e5a075274841476d119354ea"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3ef2ee08e5a075274841476d119354ea">&#9670;&nbsp;</a></span>Translate</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">Point com.mxgraph.mxBasicCanvas.Translate</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>see <a class="el" href="interfacecom_1_1mxgraph_1_1mxICanvas.html#a64c4a0b2c985c41c6338a894b79d3a87" title="Sets or returns the user object of the cell. ">com.mxgraph.mxICanvas.Translate</a> </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>src/canvas/mxBasicCanvas.cs</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>
{ "pile_set_name": "Github" }
--- title: Azure Notebooks プレビュー用のサンプル Jupyter ノートブック description: サンプルは、無料の Azure Notebooks クラウド サービスで実行される Jupyter ノートブックを体験するための優れた方法です。 ms.topic: sample ms.date: 01/11/2019 ms.openlocfilehash: 397e40f628e6e935fef74d2225d2e477aac7b276 ms.sourcegitcommit: 62717591c3ab871365a783b7221851758f4ec9a4 ms.translationtype: HT ms.contentlocale: ja-JP ms.lasthandoff: 08/22/2020 ms.locfileid: "85833997" --- # <a name="discover-and-use-sample-notebooks-in-azure-notebooks-preview"></a>Azure Notebooks プレビューでサンプル ノートブックを検出して使用する [!INCLUDE [notebooks-status](../../includes/notebooks-status.md)] インターネットには、Azure Notebooks に簡単に取り込むことができて、人々の関心が高い便利な Jupyter ノートブックのコレクションが多数あります。 この記事では、注目すべきサンプルの一覧を示します。 検索する対象のノートブックを特定したら、次に示すいくつかの詳細情報を把握しておきます。 - ノートブックが既に Azure Notebooks 内にある場合は、プロジェクト ダッシュボード上の **[複製]** ボタンを使用して、ご自身のアカウントにプロジェクトのコピーを作成します。 - 一部のノートブックでは、特定のパッケージを実行する必要があります。 `!pip install` (Python) または `install.packages` (R) を使用してノートブック自体からパッケージをインストールできますが、[適切な環境を利用して Azure Notebooks プロジェクトを構成する](configure-manage-azure-notebooks-projects.md)ことも可能です。 ## <a name="great-sample-notebooks"></a>優れたサンプル ノートブック - [Azure Notebooks スターター セット](https://notebooks.azure.com/#sample-redirect)には、データ アクセス、Azure Machine Learning、いくつかのデータ サイエンス エクスペリエンスを示すノートブックと共に、Python、R、および F# の紹介が含まれています。 - [Jupyter Notebooks の概要](https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Notebook%20Basics.ipynb) (jupyter.org) - [データ サイエンスの概要](https://github.com/jakevdp/PythonDataScienceHandbook/tree/master/notebooks) (Jake Vanderplas 氏) - [便利なノートブックのギャラリー](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks) (GitHub 上の Jupyter プロジェクト) - [nbviewer.jupyter.org](https://nbviewer.jupyter.org) - [インペリアル カレッジ ロンドンの物理学部](https://notebooks.azure.com/cvanbreu/libraries)による物理の手引き - [Azure Machine Learning の入門サンプル](https://notebooks.azure.com/azureml/projects/azureml-getting-started) ## <a name="next-steps"></a>次のステップ - [方法: プロジェクトの構成と管理](configure-manage-azure-notebooks-projects.md) - [方法: データ ファイルの操作](work-with-project-data-files.md) - [方法: データ リソースへのアクセス](access-data-resources-jupyter-notebooks.md) - [方法: Azure Machine Learning の使用](use-machine-learning-services-jupyter-notebooks.md)
{ "pile_set_name": "Github" }
MODEL: META_ARCHITECTURE: "panoptic_deeplab" BN_MOMENTUM: 0.01 BACKBONE: NAME: "resnet101" DILATION: (False, False, False) PRETRAINED: True DECODER: IN_CHANNELS: 2048 FEATURE_KEY: "res5" DECODER_CHANNELS: 256 ATROUS_RATES: (3, 6, 9) PANOPTIC_DEEPLAB: LOW_LEVEL_CHANNELS: (1024, 512, 256) LOW_LEVEL_KEY: ["res4", "res3", "res2"] LOW_LEVEL_CHANNELS_PROJECT: (128, 64, 32) INSTANCE: ENABLE: True LOW_LEVEL_CHANNELS_PROJECT: (64, 32, 16) DECODER_CHANNELS: 128 HEAD_CHANNELS: 32 ASPP_CHANNELS: 256 NUM_CLASSES: (1, 2) CLASS_KEY: ["center", "offset"] DATASET: ROOT: "./datasets/cityscapes" DATASET: "cityscapes_panoptic" NUM_CLASSES: 19 TRAIN_SPLIT: 'train' TEST_SPLIT: 'val' CROP_SIZE: (1025, 2049) MIRROR: True MIN_SCALE: 0.5 MAX_SCALE: 2.0 SCALE_STEP_SIZE: 0.1 MEAN: (0.485, 0.456, 0.406) STD: (0.229, 0.224, 0.225) SEMANTIC_ONLY: False IGNORE_STUFF_IN_OFFSET: True SMALL_INSTANCE_AREA: 4096 SMALL_INSTANCE_WEIGHT: 3 SOLVER: BASE_LR: 0.00005 WEIGHT_DECAY: 0.0 WEIGHT_DECAY_NORM: 0.0 BIAS_LR_FACTOR: 1.0 WEIGHT_DECAY_BIAS: 0.0 OPTIMIZER: "adam" LR_SCHEDULER_NAME: "WarmupPolyLR" WARMUP_ITERS: 0 LOSS: SEMANTIC: NAME: "hard_pixel_mining" IGNORE: 255 TOP_K_PERCENT: 0.2 WEIGHT: 1.0 CENTER: NAME: "mse" WEIGHT: 200.0 OFFSET: NAME: "l1" WEIGHT: 0.01 TRAIN: IMS_PER_BATCH: 8 MAX_ITER: 90000 DEBUG: DEBUG: True DEBUG_FREQ: 100 TEST: EVAL_INSTANCE: True EVAL_PANOPTIC: True POST_PROCESSING: CENTER_THRESHOLD: 0.1 NMS_KERNEL: 7 TOP_K_INSTANCE: 200 STUFF_AREA: 2048 OUTPUT_DIR: "./output/panoptic_deeplab_R101_os32_cityscapes" GPUS: (0, 1, 2, 3, 4, 5, 6, 7) WORKERS: 1
{ "pile_set_name": "Github" }
const ModelInfoDefinitionContext = require('./generated/LUFileParser').LUFileParser.ModelInfoDefinitionContext; const DiagnosticSeverity = require('./diagnostic').DiagnosticSeverity; const BuildDiagnostic = require('./diagnostic').BuildDiagnostic; class LUModelInfo { /** * * @param {ImportDefinitionContext} parseTree */ constructor(parseTree) { this.ParseTree = parseTree; this.ModelInfo = parseTree.getText(); } } module.exports = LUModelInfo;
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE REQUEST----- MIIBGzCBxgIBADBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEa MBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0 IGNlcnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8S MVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8E y2//Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAANBAAB+uQi+qwn6qRSHB8EUTvsm 5TNTHzYDeN39nyIbZNX2s0se3Srn2Bxft5YCwD3moFZ9QoyDHxE0h6qLX5yjD+8= -----END CERTIFICATE REQUEST-----
{ "pile_set_name": "Github" }
{ "ecadd_0-0_0-0_21000_192_d0g0v0_Istanbul" : { "_info" : { "comment" : "Puts the points (0, 0) and (0, 0) into the ECADD precompile, truncating or expanding the input data to 192 bytes. Gives the execution 21000 bytes", "filling-rpc-server" : "Geth-1.9.14-unstable-8cf83419-20200512", "filling-tool-version" : "retesteth-0.0.3+commit.672a84dd.Linux.g++", "lllcversion" : "Version: 0.5.14-develop.2019.11.27+commit.8f259595.Linux.g++", "source" : "src/GeneralStateTestsFiller/stZeroKnowledge2/ecadd_0-0_0-0_21000_192Filler.json", "sourceHash" : "81ec7f8ce47177998c4be6de67b7c8ba455eb4412398cb79f9c30bd5803afccb" }, "genesisBlockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f5e100", "gasUsed" : "0x00", "hash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x00", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0xc7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaa", "timestamp" : "0x00", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x0000000000000000000000000000000000000000" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000005" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "balance" : "0x04a0ae", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "balance" : "0x0de0b6b3a75f5f52", "code" : "0x", "nonce" : "0x05", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "balance" : "0x00", "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } } }, "postState" : { "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "balance" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000005" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000000" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "code" : "0x", "nonce" : "0x06", "balance" : "0x0de0b6b3a75eb5b2", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x1bc16d674ecd4a4e", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } } }, "network" : "Istanbul", "sealEngine" : "NoProof", "lastblockhash" : "0xbb28792dc8dc7be81662dfb279b7636f56b0a88c2d5f73ba91974aba76bfe83b", "genesisRLP" : "0xf901f9f901f4a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaaa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks" : [ { "rlp" : "0xf90367f901f8a0ae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0e47bb113061254b83927e31da93ccfb0f1ace57b561f78fd19580df7fffae3b4a050f548117010dd7a0a4791aeb45d67ff9699b76b7fab09cff750e1b88cf33fa5a031fb5f6af38ba8e13cea934d8d00142bc78e57c47e76ac220398ad2bcb08c5e8b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f75e7782a9a08203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f90168f90165050182a9a094c305c901078781c232a2a521c2af7980f8385ee980b9010430c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ba0f5787391726bd5b60b85f273a96bbe2705d9a6ef3a21bbd50dde758652a6fef0a01b05945fb6d2a974a74837daba509d44b05ae12a8c3e72966377ca155706cd87c0", "blockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f75e77", "gasUsed" : "0xa9a0", "hash" : "0xbb28792dc8dc7be81662dfb279b7636f56b0a88c2d5f73ba91974aba76bfe83b", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x01", "parentHash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "receiptTrie" : "0x31fb5f6af38ba8e13cea934d8d00142bc78e57c47e76ac220398ad2bcb08c5e8", "stateRoot" : "0xe47bb113061254b83927e31da93ccfb0f1ace57b561f78fd19580df7fffae3b4", "timestamp" : "0x03e8", "transactionsTrie" : "0x50f548117010dd7a0a4791aeb45d67ff9699b76b7fab09cff750e1b88cf33fa5", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "transactions" : [ { "data" : "0x30c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0xa9a0", "gasPrice" : "0x01", "nonce" : "0x05", "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", "value" : "0x00", "v" : "0x1b", "r" : "0xf5787391726bd5b60b85f273a96bbe2705d9a6ef3a21bbd50dde758652a6fef0", "s" : "0x1b05945fb6d2a974a74837daba509d44b05ae12a8c3e72966377ca155706cd87" } ] } ] }, "ecadd_0-0_0-0_21000_192_d0g1v0_Istanbul" : { "_info" : { "comment" : "Puts the points (0, 0) and (0, 0) into the ECADD precompile, truncating or expanding the input data to 192 bytes. Gives the execution 21000 bytes", "filling-rpc-server" : "Geth-1.9.14-unstable-8cf83419-20200512", "filling-tool-version" : "retesteth-0.0.3+commit.672a84dd.Linux.g++", "lllcversion" : "Version: 0.5.14-develop.2019.11.27+commit.8f259595.Linux.g++", "source" : "src/GeneralStateTestsFiller/stZeroKnowledge2/ecadd_0-0_0-0_21000_192Filler.json", "sourceHash" : "81ec7f8ce47177998c4be6de67b7c8ba455eb4412398cb79f9c30bd5803afccb" }, "genesisBlockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f5e100", "gasUsed" : "0x00", "hash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x00", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0xc7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaa", "timestamp" : "0x00", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x0000000000000000000000000000000000000000" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000005" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "balance" : "0x04a0ae", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "balance" : "0x0de0b6b3a75f5f52", "code" : "0x", "nonce" : "0x05", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "balance" : "0x00", "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } } }, "postState" : { "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "balance" : "0x00", "storage" : { "0x00" : "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5" } }, "0x0000000000000000000000000000000000000005" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000000" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "code" : "0x", "nonce" : "0x06", "balance" : "0x0de0b6b3a75eb2ca", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x1bc16d674ecd4d36", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } } }, "network" : "Istanbul", "sealEngine" : "NoProof", "lastblockhash" : "0x35ebe0d184d372315f6914ca8034e4cee90b1816cd9df5c838b502e071305ff7", "genesisRLP" : "0xf901f9f901f4a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaaa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks" : [ { "rlp" : "0xf90368f901f8a0ae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08a06d91858d9cab38e5b40bcb2e0ddc83680ba27bbece8cb4f9776ca88d34aeb151a003af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137bb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f75e7782ac888203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f90169f90166050183015f9094c305c901078781c232a2a521c2af7980f8385ee980b9010430c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ba06ae3d7c73a0a3350b954ff89014d73d81f445ee956fa7164f1290e6928206fb1a05f02a42c031ad1c8ce146366bce8f0d779d1221505687689f4e154f2e7abfad0c0", "blockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f75e77", "gasUsed" : "0xac88", "hash" : "0x35ebe0d184d372315f6914ca8034e4cee90b1816cd9df5c838b502e071305ff7", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x01", "parentHash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "receiptTrie" : "0x03af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137b", "stateRoot" : "0xc07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08", "timestamp" : "0x03e8", "transactionsTrie" : "0x6d91858d9cab38e5b40bcb2e0ddc83680ba27bbece8cb4f9776ca88d34aeb151", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "transactions" : [ { "data" : "0x30c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0x015f90", "gasPrice" : "0x01", "nonce" : "0x05", "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", "value" : "0x00", "v" : "0x1b", "r" : "0x6ae3d7c73a0a3350b954ff89014d73d81f445ee956fa7164f1290e6928206fb1", "s" : "0x5f02a42c031ad1c8ce146366bce8f0d779d1221505687689f4e154f2e7abfad0" } ] } ] }, "ecadd_0-0_0-0_21000_192_d0g2v0_Istanbul" : { "_info" : { "comment" : "Puts the points (0, 0) and (0, 0) into the ECADD precompile, truncating or expanding the input data to 192 bytes. Gives the execution 21000 bytes", "filling-rpc-server" : "Geth-1.9.14-unstable-8cf83419-20200512", "filling-tool-version" : "retesteth-0.0.3+commit.672a84dd.Linux.g++", "lllcversion" : "Version: 0.5.14-develop.2019.11.27+commit.8f259595.Linux.g++", "source" : "src/GeneralStateTestsFiller/stZeroKnowledge2/ecadd_0-0_0-0_21000_192Filler.json", "sourceHash" : "81ec7f8ce47177998c4be6de67b7c8ba455eb4412398cb79f9c30bd5803afccb" }, "genesisBlockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f5e100", "gasUsed" : "0x00", "hash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x00", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0xc7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaa", "timestamp" : "0x00", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x0000000000000000000000000000000000000000" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000005" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "balance" : "0x04a0ae", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "balance" : "0x0de0b6b3a75f5f52", "code" : "0x", "nonce" : "0x05", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "balance" : "0x00", "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } } }, "postState" : { "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "balance" : "0x00", "storage" : { "0x00" : "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5" } }, "0x0000000000000000000000000000000000000005" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000000" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "code" : "0x", "nonce" : "0x06", "balance" : "0x0de0b6b3a75eb2ca", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x1bc16d674ecd4d36", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } } }, "network" : "Istanbul", "sealEngine" : "NoProof", "lastblockhash" : "0x050044dcfce0a97e0976498efe70e249a9ccf39754afaf89acfc6ff744e62d52", "genesisRLP" : "0xf901f9f901f4a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaaa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks" : [ { "rlp" : "0xf90368f901f8a0ae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08a0d4bfd0278f1fd0b4b84eccde9b80fd2b110aa00950bf97850a74a80f07737a13a003af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137bb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f75e7782ac888203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f90169f9016605018301adb094c305c901078781c232a2a521c2af7980f8385ee980b9010430c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ba05d0699e987422bb068c75bee95ff6237f6df9ba4dcb1eafaaf3b0923c309e4b7a07b7bfb190f8864e5bd668293ac9e7712b36cc6bbf38bc6e880ba25e46ca8047cc0", "blockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f75e77", "gasUsed" : "0xac88", "hash" : "0x050044dcfce0a97e0976498efe70e249a9ccf39754afaf89acfc6ff744e62d52", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x01", "parentHash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "receiptTrie" : "0x03af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137b", "stateRoot" : "0xc07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08", "timestamp" : "0x03e8", "transactionsTrie" : "0xd4bfd0278f1fd0b4b84eccde9b80fd2b110aa00950bf97850a74a80f07737a13", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "transactions" : [ { "data" : "0x30c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0x01adb0", "gasPrice" : "0x01", "nonce" : "0x05", "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", "value" : "0x00", "v" : "0x1b", "r" : "0x5d0699e987422bb068c75bee95ff6237f6df9ba4dcb1eafaaf3b0923c309e4b7", "s" : "0x7b7bfb190f8864e5bd668293ac9e7712b36cc6bbf38bc6e880ba25e46ca8047c" } ] } ] }, "ecadd_0-0_0-0_21000_192_d0g3v0_Istanbul" : { "_info" : { "comment" : "Puts the points (0, 0) and (0, 0) into the ECADD precompile, truncating or expanding the input data to 192 bytes. Gives the execution 21000 bytes", "filling-rpc-server" : "Geth-1.9.14-unstable-8cf83419-20200512", "filling-tool-version" : "retesteth-0.0.3+commit.672a84dd.Linux.g++", "lllcversion" : "Version: 0.5.14-develop.2019.11.27+commit.8f259595.Linux.g++", "source" : "src/GeneralStateTestsFiller/stZeroKnowledge2/ecadd_0-0_0-0_21000_192Filler.json", "sourceHash" : "81ec7f8ce47177998c4be6de67b7c8ba455eb4412398cb79f9c30bd5803afccb" }, "genesisBlockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f5e100", "gasUsed" : "0x00", "hash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x00", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0xc7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaa", "timestamp" : "0x00", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x0000000000000000000000000000000000000000" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000005" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "balance" : "0x01", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "balance" : "0x04a0ae", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "balance" : "0x0de0b6b3a75f5f52", "code" : "0x", "nonce" : "0x05", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "balance" : "0x00", "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } } }, "postState" : { "0x24143873e0e0815fdcbcffdbe09c979cbf9ad013" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000001" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xdceceaf3fc5c0a63d195d69b1a90011b7b19650d" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0xc305c901078781c232a2a521c2af7980f8385ee9" : { "code" : "0x600035601c52740100000000000000000000000000000000000000006020526fffffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff000000000000000000000000000000016060527402540be3fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffdabf41c00000000000000000000000002540be40060a0526330c8d1da600051141561012b5760c06004356004013511151558576004356004013560200160043560040161014037604061026061014051610160600060066305f5e0fff11558576040610240526102406060806102c0828460006004601bf15050506102c08051602082012090506000556102c060206020820352604081510160206001820306601f820103905060208203f350005b", "nonce" : "0x01", "balance" : "0x00", "storage" : { "0x00" : "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5" } }, "0x0000000000000000000000000000000000000005" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x13cbb8d99c6c4e0f2728c7d72606e78a29c4e224" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000000" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000003" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { "code" : "0x", "nonce" : "0x06", "balance" : "0x0de0b6b3a75eb2ca", "storage" : { } }, "0x0000000000000000000000000000000000000006" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x0000000000000000000000000000000000000007" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x598443f1880ef585b21f1d7585bd0577402861e5" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x0000000000000000000000000000000000000004" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0xe0fc04fa2d34a66b779fd5cee748268032a146c0" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x3535353535353535353535353535353535353535" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x1bc16d674ecd4d36", "storage" : { } }, "0x0000000000000000000000000000000000000002" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x01", "storage" : { } }, "0x77db2bebba79db42a978f896968f4afce746ea1f" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x10a1c1cb95c92ec31d3f22c66eef1d9f3f258c6b" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } }, "0x90f0b1ebbba1c1936aff7aaf20a7878ff9e04b6c" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x0de0b6b3a7640000", "storage" : { } } }, "network" : "Istanbul", "sealEngine" : "NoProof", "lastblockhash" : "0x6a5bc50c3fdb438e37b6545780b23036bd71b3743e91b20fea2d99dd184a7dbd", "genesisRLP" : "0xf901f9f901f4a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c7c83396811d3191909b7c6f6147c47c70bf7de2a5e0bb63ce937e1c87610eaaa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808405f5e100808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks" : [ { "rlp" : "0xf90368f901f8a0ae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943535353535353535353535353535353535353535a0c07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08a059bc894f9bc9ecd8b76592330f3c26833d31a0cb4b0784be357ac049e2356e74a003af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137bb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018405f75e7782ac888203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f90169f90166050183030d4094c305c901078781c232a2a521c2af7980f8385ee980b9010430c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ca0850425c4d9bf6d12d202e7ade490362273b55a1fc57960ff86ae63abbec915e9a018751fd258f3cc30493e34f4d635111f4d99ef5f82004a93ecdc876de8a53f38c0", "blockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x3535353535353535353535353535353535353535", "difficulty" : "0x020000", "extraData" : "0x00", "gasLimit" : "0x05f75e77", "gasUsed" : "0xac88", "hash" : "0x6a5bc50c3fdb438e37b6545780b23036bd71b3743e91b20fea2d99dd184a7dbd", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x01", "parentHash" : "0xae88d04014b7494747eb1c17d71525305731cad41717fe04c6bc480a7ca486da", "receiptTrie" : "0x03af6919b4cf280f730556baa0461e6d6da424f8a3cef88e84eb1d2fe566137b", "stateRoot" : "0xc07c62296756f9adece82d8f54d741ec31adaa181bc9470363fec9e96faf5f08", "timestamp" : "0x03e8", "transactionsTrie" : "0x59bc894f9bc9ecd8b76592330f3c26833d31a0cb4b0784be357ac049e2356e74", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "transactions" : [ { "data" : "0x30c8d1da000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0x030d40", "gasPrice" : "0x01", "nonce" : "0x05", "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", "value" : "0x00", "v" : "0x1c", "r" : "0x850425c4d9bf6d12d202e7ade490362273b55a1fc57960ff86ae63abbec915e9", "s" : "0x18751fd258f3cc30493e34f4d635111f4d99ef5f82004a93ecdc876de8a53f38" } ] } ] } }
{ "pile_set_name": "Github" }
using UnityEngine; using System; using System.Collections; using System.Collections.Generic; namespace Nanome.Core.Daemon { public class Dispatcher : Nanome.Core.Behaviour { private static readonly Queue<IEnumerator> _queue = new Queue<IEnumerator>(); private static Dispatcher _instance; public static void queue(IEnumerator action) { lock (_queue) { _queue.Enqueue(action); } } public static void queue(Action action) { queue(_instance.actionable(action)); } private void Awake() { if (_instance != null) { Destroy(gameObject); return; } else { _instance = this; } } private void Update() { lock(_queue) { while (_queue.Count > 0) { var coroutine = _queue.Dequeue(); lock (coroutines) { coroutines.Add(coroutine); } _instance.StartCoroutine(coroutine); } } } private IEnumerator actionable(Action callback) { callback(); yield return null; } private static HashSet<IEnumerator> coroutines = new HashSet<IEnumerator>(); public delegate void StoppedDelegate(); public static void stopAll(StoppedDelegate callback = null) { lock (_queue) { _queue.Clear(); } lock (coroutines) { foreach (var coroutine in coroutines) { _instance.StopCoroutine(coroutine); } coroutines.Clear(); } if (callback != null) { callback(); } } } }
{ "pile_set_name": "Github" }
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:conversion-gen=k8s.io/apimachinery/pkg/apis/meta/v1 package internalversion
{ "pile_set_name": "Github" }
/// <reference path="../../typings/_custom.d.ts" /> // Angular 2 import {Component} from 'angular2/angular2'; import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2'; import {ROUTER_DIRECTIVES} from 'angular2/router'; // Services import {GameService} from '../services/GameService'; // Components import {Board} from './board/board'; const ANGULAR_DIRECTIVES = [ // Angular's core directives CORE_DIRECTIVES, // Angular's form directives FORM_DIRECTIVES, // Angular's router ROUTER_DIRECTIVES ]; @Component({ selector: 'tictactoe', bindings: [ GameService ], directives: [ ANGULAR_DIRECTIVES, // Board ], template:` <div style="padding: 0 16px;"> <h1>Tic Tac Toe</h1> <h2 *ng-if="game.winner">{{ game.winner }} won!</h2> <h2 *ng-if="game.draw">draw</h2> <button (click)="reset()">reset</button> <board [board]="game.board" (select)="game.play($event)"></board> </div> ` }) export class Tictactoe { constructor(public game: GameService) { } reset() { this.game.dispose(); this.game = GameService.create(); } }
{ "pile_set_name": "Github" }
# Tenko parser test case - Path: tests/testcases/export_declaration/export_default_ident_asi_regex_flag.md > :: export declaration > > ::> export default ident asi regex flag > > This is an edge case with a regex after ASI > > In this case the export is a value so the next line cannot be a regex, instead a division ## Input `````js export default x /y/g ````` ## Output _Note: the whole output block is auto-generated. Manual changes will be overwritten!_ Below follow outputs in five parsing modes: sloppy, sloppy+annexb, strict script, module, module+annexb. Note that the output parts are auto-generated by the test runner to reflect actual result. ### Sloppy mode Parsed with script goal and as if the code did not start with strict mode header. ````` throws: Parser error! The `export` keyword can only be used with the module goal start@1:0, error@1:0 ╔══╦════════════════ 1 ║ export default x ║ ^^^^^^------- error 2 ║ /y/g ╚══╩════════════════ ````` ### Strict mode Parsed with script goal but as if it was starting with `"use strict"` at the top. _Output same as sloppy mode._ ### Module goal Parsed with the module goal. ````` ast: { type: 'Program', loc:{start:{line:1,column:0},end:{line:2,column:4},source:''}, body: [ { type: 'ExportDefaultDeclaration', loc:{start:{line:1,column:0},end:{line:2,column:4},source:''}, declaration: { type: 'BinaryExpression', loc:{start:{line:1,column:15},end:{line:2,column:4},source:''}, left: { type: 'BinaryExpression', loc:{start:{line:1,column:15},end:{line:2,column:2},source:''}, left: { type: 'Identifier', loc:{start:{line:1,column:15},end:{line:1,column:16},source:''}, name: 'x' }, operator: '/', right: { type: 'Identifier', loc:{start:{line:2,column:1},end:{line:2,column:2},source:''}, name: 'y' } }, operator: '/', right: { type: 'Identifier', loc:{start:{line:2,column:3},end:{line:2,column:4},source:''}, name: 'g' } } } ] } tokens (9x): ID_export ID_default IDENT PUNC_DIV IDENT PUNC_DIV IDENT ASI ````` ### Sloppy mode with AnnexB Parsed with script goal with AnnexB rules enabled and as if the code did not start with strict mode header. _Output same as sloppy mode._ ### Module goal with AnnexB Parsed with the module goal with AnnexB rules enabled. _Output same as module mode._ ## AST Printer Printer output different from input [module][annexb:no]: ````js export default (x / y) / g; ```` Produces same AST
{ "pile_set_name": "Github" }
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <name>springboot-learning-example</name> <groupId>springboot</groupId> <artifactId>springboot-learning-example</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <!-- WebFlux 异常处理 --> <module>2-x-spring-boot-webflux-handling-errors</module> <!-- 动态运行 groovy 脚本 --> <module>2-x-spring-boot-groovy</module> <!-- 第 1 章《Spring Boot 入门》 --> <module>chapter-1-spring-boot-quickstart</module> <!-- 第 2 章《配置》 --> <module>chapter-2-spring-boot-config</module> <!-- 第 3 章《Web 开发》 --> <module>chapter-3-spring-boot-web</module> <!-- 第 4 章《模板引擎》 --> <module>chapter-4-spring-boot-web-thymeleaf</module> <!-- 第 5 章《数据存储》 --> <module>chapter-5-spring-boot-data-jpa</module> <!-- 第 4 章表单校验案例 --> <module>chapter-4-spring-boot-validating-form-input</module> <!-- 第 4 章数据分页排序案例 --> <module>chapter-5-spring-boot-paging-sorting</module> <!-- Spring Data ES 篇 --> <module>spring-data-elasticsearch-crud</module> <module>spring-data-elasticsearch-query</module> <!-- Spring Boot 之配置文件详解 --> <module>springboot-configuration</module> <!-- Spring Boot 整合 Dubbo/ZooKeeper 详解 SOA 案例 --> <module>springboot-dubbo-server</module> <module>springboot-dubbo-client</module> <!-- Spring Boot 整合 Elasticsearch --> <module>springboot-elasticsearch</module> <!-- Spring Boot 集成 FreeMarker --> <module>springboot-freemarker</module> <!-- Spring Boot 整合 HBase --> <module>springboot-hbase</module> <!-- Spring Boot 之 HelloWorld 详解 --> <module>springboot-helloworld</module> <!-- 数据缓存篇 --> <!-- Spring Boot 整合 Mybatis 的完整 Web 案例 --> <module>springboot-mybatis</module> <!-- Spring Boot 整合 Mybatis Annotation 注解案例 --> <module>springboot-mybatis-annotation</module> <!-- Spring Boot 整合 Mybatis 实现 Druid 多数据源配置 --> <module>springboot-mybatis-mutil-datasource</module> <!-- Spring Boot 整合 Redis 实现缓存 --> <module>springboot-mybatis-redis</module> <!-- Spring Boot 注解实现整合 Redis 实现缓存 --> <module>springboot-mybatis-redis-annotation</module> <!-- Spring Boot 实现 Restful 服务,基于 HTTP / JSON 传输 --> <module>springboot-restful</module> <!-- Spring Boot 之配置文件详解 --> <module>springboot-properties</module> <!-- Spring Boot HTTP over JSON 的错误码异常处理 --> <module>springboot-validation-over-json</module> <!-- Spring Boot 2.0 WebFlux --> <!-- Spring Boot WebFlux 快速入门 --> <module>springboot-webflux-1-quickstart</module> <!-- Spring Boot WebFlux 实现 Restful 服务,基于 HTTP / JSON 传输 --> <module>springboot-webflux-2-restful</module> <module>springboot-webflux-3-mongodb</module> <module>springboot-webflux-4-thymeleaf</module> <module>springboot-webflux-5-thymeleaf-mongodb</module> <module>springboot-webflux-6-redis</module> <module>springboot-webflux-7-redis-cache</module> </modules> </project>
{ "pile_set_name": "Github" }
package jwf.debugport; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.IBinder; /** * No-op implementation of DebugPortService. */ public class DebugPortService extends Service { public static final String METADATA_DEBUG_PORT = "jwf.debugport.METADATA_DEBUG_PORT"; public static final String METADATA_SQLITE_PORT = "jwf.debugport.METADATA_SQLITE_PORT"; public static final String METADATA_STARTUP_COMMANDS = "jwf.debugport.METADATA_STARTUP_COMMANDS"; public static Params start(Context context) { Params params = new Params(); return params; } public static void start(Context context, Params params) { } public static void stop(Context context) { } public static void kill(Context context) { } @Override public IBinder onBind(Intent intent) { return null; } }
{ "pile_set_name": "Github" }
<?php declare(strict_types=1); /* * This file is part of JoliCode's Slack PHP API project. * * (c) JoliCode <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace JoliCode\Slack\Api\Normalizer; use Jane\JsonSchemaRuntime\Normalizer\CheckArray; use Jane\JsonSchemaRuntime\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class StarsListGetResponse200ItemsItemItem3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; use CheckArray; public function supportsDenormalization($data, $type, $format = null) { return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === $type; } public function supportsNormalization($data, $format = null) { return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === \get_class($data); } public function denormalize($data, $class, $format = null, array $context = []) { if (isset($data['$ref'])) { return new Reference($data['$ref'], $context['document-origin']); } if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem3(); if (\array_key_exists('channel', $data) && null !== $data['channel']) { $object->setChannel($data['channel']); } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { $object->setChannel(null); } if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { $object->setDateCreate($data['date_create']); } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { $object->setDateCreate(null); } if (\array_key_exists('type', $data) && null !== $data['type']) { $object->setType($data['type']); } elseif (\array_key_exists('type', $data) && null === $data['type']) { $object->setType(null); } return $object; } public function normalize($object, $format = null, array $context = []) { $data = []; if (null !== $object->getChannel()) { $data['channel'] = $object->getChannel(); } if (null !== $object->getDateCreate()) { $data['date_create'] = $object->getDateCreate(); } if (null !== $object->getType()) { $data['type'] = $object->getType(); } return $data; } }
{ "pile_set_name": "Github" }
<!-- $Id: ancdes_nxd.txt,v 7.00 2014/11/22 22:01:04 mr Exp $ --> %include;ancdes_stat %( death date year - spouse death date year tf1/tl1 = nxd %) %define;stat_a2() <table class="title" width="100%%"><tr> %if;(evar.m = "A") <td>[*generation/generations]0</td> %end; <td align="center">[*year/month/day]0 [death] - [year/month/day]0 [death] x</td> <td align="right">[*date of death]</td> </tr></table> %end; %define;anc_a() <div class="stat2 bcbg1"> %apply;stat_a2() %foreach;ancestor_level(l_v) %empty_sorted_list; %reset_count; %if;(level > 1 and (evar.only != "on" or level = l_v)) %foreach;ancestor; %if;(ancestor.is_male and ancestor.same = "") %if;(ancestor.death_date.year != "" and ancestor.spouse.death_date.year != "") %let;l1;%ancestor.death_date.year;%in; %let;l2;%ancestor.spouse.death_date.year;%in; %if;(l1 >= l2) %let;l3;%expr(l1 - l2)%in; %incr_count; %apply;add_in_sorted_list(l1,l3,ancestor.sex,ancestor.index) %elseif;(l1 < l2) %let;l3;%expr(l2 - l1)%in; %incr_count; %apply;add_in_sorted_list(l2,l3,ancestor.spouse.sex,ancestor.spouse.index) %end; %end; %end; %end; %apply;stat2() %end; %end; </div> %end; %define;des_a2(curlev, maxlev) %foreach;family; %if;(curlev < maxlev and family.desc_level = curlev) %family.set_infinite_desc_level; %if;(death_date.year != "" and death_date.prec = "" and spouse.death_date.year != "" and spouse.death_date.prec = "") %let;a;%death_date.year;%in; %let;b;%spouse.death_date.year;%in; %incr_count; %if;(a >= b) %let;l_age;%expr(a - b)%in; %apply;add_in_sorted_list(a,l_age,sex,index) %elseif;(a < b) %let;l_age;%expr(b - a)%in; %apply;add_in_sorted_list(b,l_age,spouse.sex,spouse.index) %end; %end; %if;(has_children) %foreach;child; %apply;des_a2(curlev+1, maxlev) %end; %end; %end; %end; %end; %( main %) %apply;togen() %if;(evar.m = "A") %apply;anc_a() %else; <div class="stat2 bcbg1"> %apply;stat_a2() %reset_desc_level; %reset_count; %empty_sorted_list; %apply;des_a2(0,l_v) %apply;stat2() </div> %end;
{ "pile_set_name": "Github" }
var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var test = require('tap').test; test('return value', function (t) { t.plan(2); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var file = '/tmp/' + [x,y,z].join('/'); // should return the first dir created. // By this point, it would be profoundly surprising if /tmp didn't // already exist, since every other test makes things in there. // Note that this will throw on failure, which will fail the test. var made = mkdirp.sync(file); t.equal(made, '/tmp/' + x); // making the same file again should have no effect. made = mkdirp.sync(file); t.equal(made, null); });
{ "pile_set_name": "Github" }
/***************************************************************************/ /* * linux/arch/m68knommu/platform/5249/config.c * * Copyright (C) 2002, Greg Ungerer ([email protected]) */ /***************************************************************************/ #include <linux/kernel.h> #include <linux/param.h> #include <linux/init.h> #include <linux/io.h> #include <asm/machdep.h> #include <asm/coldfire.h> #include <asm/mcfsim.h> #include <asm/mcfuart.h> /***************************************************************************/ static struct mcf_platform_uart m5249_uart_platform[] = { { .mapbase = MCF_MBAR + MCFUART_BASE1, .irq = 73, }, { .mapbase = MCF_MBAR + MCFUART_BASE2, .irq = 74, }, { }, }; static struct platform_device m5249_uart = { .name = "mcfuart", .id = 0, .dev.platform_data = m5249_uart_platform, }; static struct platform_device *m5249_devices[] __initdata = { &m5249_uart, }; /***************************************************************************/ static void __init m5249_uart_init_line(int line, int irq) { if (line == 0) { writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR); writeb(irq, MCF_MBAR + MCFUART_BASE1 + MCFUART_UIVR); mcf_mapirq2imr(irq, MCFINTC_UART0); } else if (line == 1) { writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCF_MBAR + MCFSIM_UART2ICR); writeb(irq, MCF_MBAR + MCFUART_BASE2 + MCFUART_UIVR); mcf_mapirq2imr(irq, MCFINTC_UART1); } } static void __init m5249_uarts_init(void) { const int nrlines = ARRAY_SIZE(m5249_uart_platform); int line; for (line = 0; (line < nrlines); line++) m5249_uart_init_line(line, m5249_uart_platform[line].irq); } /***************************************************************************/ static void __init m5249_timers_init(void) { /* Timer1 is always used as system timer */ writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3, MCF_MBAR + MCFSIM_TIMER1ICR); mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1); #ifdef CONFIG_HIGHPROFILE /* Timer2 is to be used as a high speed profile timer */ writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3, MCF_MBAR + MCFSIM_TIMER2ICR); mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2); #endif } /***************************************************************************/ void m5249_cpu_reset(void) { local_irq_disable(); /* Set watchdog to soft reset, and enabled */ __raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR); for (;;) /* wait for watchdog to timeout */; } /***************************************************************************/ void __init config_BSP(char *commandp, int size) { mach_reset = m5249_cpu_reset; m5249_timers_init(); m5249_uarts_init(); } /***************************************************************************/ static int __init init_BSP(void) { platform_add_devices(m5249_devices, ARRAY_SIZE(m5249_devices)); return 0; } arch_initcall(init_BSP); /***************************************************************************/
{ "pile_set_name": "Github" }
--- title: セッションの動作を構成する - Azure Active Directory B2C | Microsoft Docs description: Azure Active Directory B2C でセッションの動作を構成します。 services: active-directory-b2c author: msmimart manager: celestedg ms.service: active-directory ms.workload: identity ms.topic: how-to ms.date: 07/30/2020 ms.author: mimart ms.subservice: B2C ms.openlocfilehash: c47b0249824a3683b8f24cc01cc5eea5ccf32585 ms.sourcegitcommit: 11e2521679415f05d3d2c4c49858940677c57900 ms.translationtype: HT ms.contentlocale: ja-JP ms.lasthandoff: 07/31/2020 ms.locfileid: "87482670" --- # <a name="configure-session-behavior-in-azure-active-directory-b2c"></a>Azure Active Directory B2C でセッションの動作を構成する Azure Active Directory B2C (Azure AD B2C) で[シングル サインオン (SSO) セッション](session-overview.md)管理を使用すると、管理者は、ユーザーが認証された後にそのユーザーとの対話を制御できます。 たとえば、管理者は、選択した ID プロバイダーを表示するかどうか、アカウントの詳細を再入力する必要があるかどうかを制御できます。 この記事では、Azure AD B2C の SSO 設定を構成する方法について説明します。 ## <a name="session-behavior-properties"></a>セッションの動作のプロパティ 次のプロパティを使用して、Web アプリケーション セッションを管理できます。 - **[Web アプリのセッションの有効期間 (分)]** - 認証の成功時にユーザーのブラウザーに格納される Azure AD B2C のセッション Cookie の有効期間。 - 既定値 = 1,440 分。 - 最小値 (この値を含む) = 15 分。 - 最大値 (この値を含む) = 1,440 分。 - **[Web アプリのセッション タイムアウト]** - [セッションの有効期限の種類](session-overview.md#session-expiry-type)、 *[ローリング]* または *[絶対]* 。 - **[シングル サインオン構成]** - Azure AD B2C テナント内の複数のアプリとユーザー フローにまたがるシングル サインオン (SSO) の動作の[セッション スコープ](session-overview.md#session-scope)。 ## <a name="configure-the-properties"></a>プロパティを構成する 1. [Azure portal](https://portal.azure.com) にサインインします。 2. ご利用の Azure AD B2C テナントを含むディレクトリを使用していることを確認してください。そのためには、トップ メニューにある **[ディレクトリ + サブスクリプション]** フィルターを選択して、ご利用の Azure AD B2C テナントを含むディレクトリを選択します。 3. Azure portal の左上隅にある **[すべてのサービス]** を選択してから、 **[Azure AD B2C]** を検索して選択します。 4. **[ユーザー フロー]** を選択します。 5. あらかじめ作成しておいたユーザー フローを開きます。 6. **[プロパティ]** を選択します。 7. **[Web アプリのセッションの有効期間 (分)]** 、 **[Web アプリのセッション タイムアウト]** 、 **[シングル サインオン構成]** 、 **[ログアウト要求に ID トークンが必要]** を必要に応じて構成します。 ![Azure portal のセッション動作プロパティの設定](./media/session-behavior/session-behavior.png) 8. **[保存]** をクリックします。 ## <a name="next-steps"></a>次のステップ - [Azure AD B2C セッション](session-overview.md)の詳細について学習します。
{ "pile_set_name": "Github" }
{ "static_CallEcrecover0_completeReturnValue_d0g0v0_Istanbul" : { "_info" : { "comment" : "", "filling-rpc-server" : "Geth-1.9.6-unstable-63b18027-20190920", "filling-tool-version" : "retesteth-0.0.1+commit.0ae18aef.Linux.g++", "lllcversion" : "Version: 0.5.12-develop.2019.9.13+commit.2d601a4f.Linux.g++", "source" : "src/GeneralStateTestsFiller/stStaticCall/static_CallEcrecover0_completeReturnValueFiller.json", "sourceHash" : "2d997cda8b3f22b81ef0e31f63242b50d361409e3ec1151b6c19374bbb63229c" }, "genesisBlockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "difficulty" : "0x20000", "extraData" : "0x00", "gasLimit" : "0x989680", "gasUsed" : "0x0", "hash" : "0xaf294464afce951938365599af4bc5c6c852731173559a434e89af4ccedc9114", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x0", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0x73330047c173ea0a19f7d1ec5d65f9581838d8a470d40b832d357d5d85d833c9", "timestamp" : "0x0", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x01312d00", "code" : "0x7f18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c600052601c6020527f73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f6040527feeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549606052602060806080600060016132c8fa60025560805160005500", "nonce" : "0x00", "storage" : { } }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "0x0de0b6b3a7640000", "code" : "0x", "nonce" : "0x00", "storage" : { } } }, "postState" : { "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "code" : "0x", "nonce" : "0x01", "balance" : "0x0de0b6b3a7617c53", "storage" : { } }, "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "code" : "0x7f18c547e4f7b0f325ad1e56f57e26c745b09a3e503d86e00e5255ff7f715d3d1c600052601c6020527f73b1693892219d736caba55bdb67216e485557ea6b6af75f37096c9aa6a5a75f6040527feeb940b1d03b21e36b0e47e79769f095fe2ab855bd91e3a38756b7d75a9c4549606052602060806080600060016132c8fa60025560805160005500", "nonce" : "0x00", "balance" : "0x0132b3a0", "storage" : { "0x00" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x02" : "0x01" } }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { "code" : "0x", "nonce" : "0x00", "balance" : "0x1bc16d674ec8fd0d", "storage" : { } } }, "network" : "Istanbul", "sealEngine" : "NoProof", "lastblockhash" : "0xb1af2559c1486c6d45b333ad590fa2951897edf102c4862a5abd7908c4c04bdb", "genesisRLP" : "0xf901f8f901f3a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa073330047c173ea0a19f7d1ec5d65f9581838d8a470d40b832d357d5d85d833c9a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008083989680808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", "blocks" : [ { "rlp" : "0xf90262f901f7a0af294464afce951938365599af4bc5c6c852731173559a434e89af4ccedc9114a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa05af7df84ce7093cf387dc0e310e2706dc941aa7aea9bbb3bc1c1b0d7cc463c12a098fa170d192a6eff341cc8b8392cf1c8256997c28117ae4c20481271ffe00b0ba0fa745df4ace07c7ad2090fbf76140b643b9612b977d317740786c6491623fc9cb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018398bca482fd0d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f865f8638001830592a894095e7baea6a6c7c4c2dfeb977efac326af552d87830186a0801ca082cfe09a590896d5e895674505c40f1701ab05245f9f568bf506b9558e61c67fa04a98fee75f6fbf3fa4b3e104a9bb7283a6e076670719bac8af481531151b7b3cc0", "blockHeader" : { "bloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "difficulty" : "0x20000", "extraData" : "0x00", "gasLimit" : "0x98bca4", "gasUsed" : "0xfd0d", "hash" : "0xb1af2559c1486c6d45b333ad590fa2951897edf102c4862a5abd7908c4c04bdb", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce" : "0x0000000000000000", "number" : "0x1", "parentHash" : "0xaf294464afce951938365599af4bc5c6c852731173559a434e89af4ccedc9114", "receiptTrie" : "0xfa745df4ace07c7ad2090fbf76140b643b9612b977d317740786c6491623fc9c", "stateRoot" : "0x5af7df84ce7093cf387dc0e310e2706dc941aa7aea9bbb3bc1c1b0d7cc463c12", "timestamp" : "0x3e8", "transactionsTrie" : "0x98fa170d192a6eff341cc8b8392cf1c8256997c28117ae4c20481271ffe00b0b", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "transactions" : [ { "data" : "0x", "gasLimit" : "0x0592a8", "gasPrice" : "0x01", "nonce" : "0x00", "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "0x0186a0", "v" : "0x1c", "r" : "0x82cfe09a590896d5e895674505c40f1701ab05245f9f568bf506b9558e61c67f", "s" : "0x4a98fee75f6fbf3fa4b3e104a9bb7283a6e076670719bac8af481531151b7b3c" } ] } ] } }
{ "pile_set_name": "Github" }
#!/bin/bash cd ~/docker-registry && docker-compose up -d echo "Registry started. Please use \"curl https://$USER:7312mInalM4n@$(hostname).$(dnsdomainname)/v2/_catalog\" to list available images."
{ "pile_set_name": "Github" }
/* * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package io.siddhi.core.executor.condition.compare.lessthan; import io.siddhi.core.executor.ExpressionExecutor; /** * Executor class for Float-Integer Less Than condition. Condition evaluation logic is implemented within * executor. */ public class LessThanCompareConditionExpressionExecutorFloatInt extends LessThanCompareConditionExpressionExecutor { public LessThanCompareConditionExpressionExecutorFloatInt( ExpressionExecutor leftExpressionExecutor, ExpressionExecutor rightExpressionExecutor) { super(leftExpressionExecutor, rightExpressionExecutor); } @Override protected Boolean execute(Object left, Object right) { return (Float) left < (Integer) right; } }
{ "pile_set_name": "Github" }
// Copyright 2016 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 "components/subresource_filter/core/common/fuzzy_pattern_matching.h" #include <vector> #include "testing/gtest/include/gtest/gtest.h" namespace subresource_filter { TEST(FuzzyPatternMatchingTest, StartsWithFuzzy) { const struct { const char* text; const char* subpattern; bool expected_starts_with; } kTestCases[] = { {"abc", "", true}, {"abc", "a", true}, {"abc", "ab", true}, {"abc", "abc", true}, {"abc", "abcd", false}, {"abc", "abc^", true}, {"abc", "abc^^", false}, {"abc", "abcd^", false}, {"abc", "ab^", false}, {"abc", "bc", false}, {"abc", "bc^", false}, {"abc", "^abc", false}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Test: " << test_case.text << "; Subpattern: " << test_case.subpattern); const bool starts_with = StartsWithFuzzy(test_case.text, test_case.subpattern); EXPECT_EQ(test_case.expected_starts_with, starts_with); } } TEST(FuzzyPatternMatchingTest, EndsWithFuzzy) { const struct { const char* text; const char* subpattern; bool expected_ends_with; } kTestCases[] = { {"abc", "", true}, {"abc", "c", true}, {"abc", "bc", true}, {"abc", "abc", true}, {"abc", "0abc", false}, {"abc", "abc^", true}, {"abc", "abc^^", false}, {"abc", "abcd^", false}, {"abc", "ab^", false}, {"abc", "ab", false}, {"abc", "bc^", true}, {"abc", "^abc", false}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Test: " << test_case.text << "; Subpattern: " << test_case.subpattern); const bool ends_with = EndsWithFuzzy(test_case.text, test_case.subpattern); EXPECT_EQ(test_case.expected_ends_with, ends_with); } } TEST(FuzzyPatternMatchingTest, AllOccurrences) { const struct { const char* text; const char* subpattern; std::vector<size_t> expected_matches; } kTestCases[] = { {"abcd", "", {0, 1, 2, 3, 4}}, {"abcd", "de", std::vector<size_t>()}, {"abcd", "ab", {2}}, {"abcd", "bc", {3}}, {"abcd", "cd", {4}}, {"a/bc/a/b", "", {0, 1, 2, 3, 4, 5, 6, 7, 8}}, {"a/bc/a/b", "de", std::vector<size_t>()}, {"a/bc/a/b", "a/", {2, 7}}, {"a/bc/a/c", "a/c", {8}}, {"a/bc/a/c", "a^c", {8}}, {"a/bc/a/c", "a?c", std::vector<size_t>()}, {"ab^cd", "ab/cd", std::vector<size_t>()}, {"ab^cd", "b/c", std::vector<size_t>()}, {"ab^cd", "ab^cd", {5}}, {"ab^cd", "b^c", {4}}, {"ab^b/b", "b/b", {6}}, {"a/a/a/a", "a/a", {3, 5, 7}}, {"a/a/a/a", "^a^a^a", {7}}, {"a/a/a/a", "^a^a?a", std::vector<size_t>()}, {"a/a/a/a", "?a?a?a", std::vector<size_t>()}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Test: " << test_case.text << "; Subpattern: " << test_case.subpattern); std::vector<size_t> failure; BuildFailureFunctionFuzzy(test_case.subpattern, &failure); const auto& occurrences = AllOccurrencesFuzzy( test_case.text, test_case.subpattern, failure.data()); std::vector<size_t> matches(occurrences.begin(), occurrences.end()); EXPECT_EQ(test_case.expected_matches, matches); } } } // namespace subresource_filter
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE----- MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe Fw0wODAyMjkwMTMzNDZaFw0zNTA3MTcwMTMzNDZaMIGUMQswCQYDVQQGEwJVUzET MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI hvcNAQEBBQADggENADCCAQgCggEBANaTGQTexgskse3HYuDZ2CU+Ps1s6x3i/waM qOi8qM1r03hupwqnbOYOuw+ZNVn/2T53qUPn6D1LZLjk/qLT5lbx4meoG7+yMLV4 wgRDvkxyGLhG9SEVhvA4oU6Jwr44f46+z4/Kw9oe4zDJ6pPQp8PcSvNQIg1QCAcy 4ICXF+5qBTNZ5qaU7Cyz8oSgpGbIepTYOzEJOmc3Li9kEsBubULxWBjf/gOBzAzU RNps3cO4JFgZSAGzJWQTT7/emMkod0jb9WdqVA2BVMi7yge54kdVMxHEa5r3b97s zI5p58ii0I54JiCUP5lyfTwE/nKZHZnfm644oLIXf6MdW2r+6R8CAQOjgfwwgfkw HQYDVR0OBBYEFEhZAFY9JyxGrhGGBaR0GawJyowRMIHJBgNVHSMEgcEwgb6AFEhZ AFY9JyxGrhGGBaR0GawJyowRoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJAJNurL4H8gHfMAwGA1Ud EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHqvlozrUMRBBVEY0NqrrwFbinZa J6cVosK0TyIUFf/azgMJWr+kLfcHCHJsIGnlw27drgQAvilFLAhLwn62oX6snb4Y LCBOsVMR9FXYJLZW2+TcIkCRLXWG/oiVHQGo/rWuWkJgU134NDEFJCJGjDbiLCpe +ZTWHdcwauTJ9pUbo8EvHRkU3cYfGmLaLfgn9gP+pWA7LFQNvXwBnDa6sppCccEX 31I828XzgXpJ4O+mDL1/dBd+ek8ZPUP0IgdyZm5MTYPhvVqGCHzzTy3sIeJFymwr sBbmg2OAUNLEMO6nwmocSdN2ClirfxqCzJOLSDE4QyS9BAH6EhY6UFcOaE0= -----END CERTIFICATE-----
{ "pile_set_name": "Github" }
<!-- Copyright (C) 2017 The Android Open Source Project 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. --> <link rel="import" href="../../../bower_components/polymer/polymer.html"> <link rel="import" href="../../shared/gr-js-api-interface/gr-js-api-interface.html"> <link rel="import" href="gr-plugin-popup.html"> <dom-module id="gr-popup-interface"> <script src="gr-popup-interface.js"></script> </dom-module>
{ "pile_set_name": "Github" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 Guenter Bartsch, Heiko Schaefer # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import unittest import logging import codecs from nltools import misc from sqlalchemy.orm import sessionmaker from zamiaai import model from zamiaprolog.logicdb import LogicDB from aiprolog.runtime import AIPrologRuntime from aiprolog.parser import AIPrologParser UNITTEST_MODULE = 'unittests' UNITTEST_CONTEXT = 'unittests' class TestAIProlog (unittest.TestCase): def setUp(self): config = misc.load_config('.airc') # # logic DB # self.db = LogicDB(model.url) # # aiprolog environment setup # self.prolog_rt = AIPrologRuntime(self.db) self.parser = AIPrologParser(self.db) self.prolog_rt.set_trace(True) self.db.clear_module(UNITTEST_MODULE) # @unittest.skip("temporarily disabled") def test_tokenize(self): clause = self.parser.parse_line_clause_body("tokenize (de, 'hallo, welt!', X)") logging.debug('clause: %s' % clause) solutions = self.prolog_rt.search(clause) logging.debug('solutions: %s' % repr(solutions)) self.assertEqual (len(solutions), 1) self.assertEqual (len(solutions[0]['X'].l), 2) # @unittest.skip("temporarily disabled") def test_edit_distance(self): clause = self.parser.parse_line_clause_body("edit_distance (['hallo', 'welt'], ['hallo', 'springfield'], X)") logging.debug('clause: %s' % clause) solutions = self.prolog_rt.search(clause) logging.debug('solutions: %s' % repr(solutions)) self.assertEqual (len(solutions), 1) self.assertEqual (solutions[0]['X'].f, 1.0) # class TestMacroEngine (unittest.TestCase): # # def setUp(self): # Session = sessionmaker(bind=model.engine) # self.session = Session() # # def testLocalMacros(self): # # me = NLPMacroEngine(self.session) # discourses = me.macro_expand('de', u'(HAL,|Computer,|Du,|) (Ich bin|Ich fühle mich|Man bin ich|Da bin ich) (zufrieden|so zufrieden|glücklich|so glücklich|froh|so froh)', u'', None) # # self.assertEqual(len(discourses), 96) # # def testMacroTokens(self): # # me = NLPMacroEngine(self.session) # discourses = me.macro_expand('de', u'hallo (HAL|Computer|Du|lieber computer|) wie geht es dir (heute|)', # u'foo @MACRO_0:TSTART_W_0 bar @MACRO_0:TEND_W_0 @MACRO_0:W baz @MACRO_1:TEND_W_0?', None) # # self.assertEqual(len(discourses), 10) # self.assertEqual(discourses[0][1], u'foo 1 bar 2 HAL baz 7?') # # discourses = me.macro_expand('de', u'foobar what is the full name of (foo|donald trump)', # u'foo @MACRO_0:TSTART_W_0 bar @MACRO_0:TEND_W_0', None) # # self.assertEqual(len(discourses), 2) # self.assertEqual(discourses[0][1], u'foo 7 bar 8') # self.assertEqual(discourses[1][1], u'foo 7 bar 9') if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) logging.getLogger('sqlalchemy.engine').setLevel(logging.WARNING) unittest.main()
{ "pile_set_name": "Github" }
{ "id": "golden-trout-model", "name": "Golden Trout Model", "games": { "nh": { "sellPrice": { "currency": "bells", "value": 45000 } } }, "category": "Furniture" }
{ "pile_set_name": "Github" }
// Windows Template Library - WTL version 9.0 // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. // // This file is a part of the Windows Template Library. // The use and distribution terms for this software are covered by the // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) // which can be found in the file CPL.TXT at the root of this distribution. // By using this software in any fashion, you are agreeing to be bound by // the terms of this license. You must not remove this notice, or // any other, from this software. #ifndef __ATLRES_H__ #define __ATLRES_H__ #pragma once #if defined(_WIN32_WCE) && !defined(__ATLRESCE_H__) #error Use atlresCE.h instead of atlres.h for Windows CE #endif #ifdef RC_INVOKED #ifndef _INC_WINDOWS #define _INC_WINDOWS #ifndef _WIN32_WCE #define VS_VERSION_INFO 1 #ifdef APSTUDIO_INVOKED #define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols #endif // APSTUDIO_INVOKED #ifndef WINVER #define WINVER 0x0400 // default to Windows Version 4.0 #endif // !WINVER #include <winresrc.h> // operation messages sent to DLGINIT #define LB_ADDSTRING (WM_USER+1) #define CB_ADDSTRING (WM_USER+3) #endif // !_WIN32_WCE #ifdef APSTUDIO_INVOKED #undef APSTUDIO_HIDDEN_SYMBOLS #endif // APSTUDIO_INVOKED #ifdef IDC_STATIC #undef IDC_STATIC #endif // IDC_STATIC #define IDC_STATIC (-1) #endif // !_INC_WINDOWS #endif // RC_INVOKED #ifdef APSTUDIO_INVOKED #define APSTUDIO_HIDDEN_SYMBOLS #endif // APSTUDIO_INVOKED /////////////////////////////////////////////////////////////////////////////// // ATL resource types #ifndef RC_INVOKED #define RT_DLGINIT MAKEINTRESOURCE(240) #define RT_TOOLBAR MAKEINTRESOURCE(241) #endif // RC_INVOKED /////////////////////////////////////////////////////////////////////////////// #ifdef APSTUDIO_INVOKED #undef APSTUDIO_HIDDEN_SYMBOLS #endif // APSTUDIO_INVOKED /////////////////////////////////////////////////////////////////////////////// // Standard window components #define ID_SEPARATOR 0 // special separator value #define ID_DEFAULT_PANE 0 // default status bar pane #ifndef RC_INVOKED // code only // standard control bars (IDW = window ID) #define ATL_IDW_TOOLBAR 0xE800 // main Toolbar for window #define ATL_IDW_STATUS_BAR 0xE801 // Status bar window #define ATL_IDW_COMMAND_BAR 0xE802 // Command bar window // parts of a frame window #define ATL_IDW_CLIENT 0xE900 #define ATL_IDW_PANE_FIRST 0xE900 // first pane (256 max) #define ATL_IDW_PANE_LAST 0xE9FF #define ATL_IDW_HSCROLL_FIRST 0xEA00 // first Horz scrollbar (16 max) #define ATL_IDW_VSCROLL_FIRST 0xEA10 // first Vert scrollbar (16 max) #define ATL_IDW_SIZE_BOX 0xEA20 // size box for splitters #define ATL_IDW_PANE_SAVE 0xEA21 // to shift ATL_IDW_PANE_FIRST // bands for a rebar #define ATL_IDW_BAND_FIRST 0xEB00 #define ATL_IDW_BAND_LAST 0xEBFF #endif // !RC_INVOKED /////////////////////////////////////////////////////////////////////////////// // Standard Commands // File commands #define ID_FILE_NEW 0xE100 #define ID_FILE_OPEN 0xE101 #define ID_FILE_CLOSE 0xE102 #define ID_FILE_SAVE 0xE103 #define ID_FILE_SAVE_AS 0xE104 #define ID_FILE_PAGE_SETUP 0xE105 #define ID_FILE_PRINT_SETUP 0xE106 #define ID_FILE_PRINT 0xE107 #define ID_FILE_PRINT_DIRECT 0xE108 #define ID_FILE_PRINT_PREVIEW 0xE109 #define ID_FILE_UPDATE 0xE10A #define ID_FILE_SAVE_COPY_AS 0xE10B #define ID_FILE_SEND_MAIL 0xE10C #define ID_FILE_MRU_FIRST 0xE110 #define ID_FILE_MRU_FILE1 0xE110 // range - 16 max #define ID_FILE_MRU_FILE2 0xE111 #define ID_FILE_MRU_FILE3 0xE112 #define ID_FILE_MRU_FILE4 0xE113 #define ID_FILE_MRU_FILE5 0xE114 #define ID_FILE_MRU_FILE6 0xE115 #define ID_FILE_MRU_FILE7 0xE116 #define ID_FILE_MRU_FILE8 0xE117 #define ID_FILE_MRU_FILE9 0xE118 #define ID_FILE_MRU_FILE10 0xE119 #define ID_FILE_MRU_FILE11 0xE11A #define ID_FILE_MRU_FILE12 0xE11B #define ID_FILE_MRU_FILE13 0xE11C #define ID_FILE_MRU_FILE14 0xE11D #define ID_FILE_MRU_FILE15 0xE11E #define ID_FILE_MRU_FILE16 0xE11F #define ID_FILE_MRU_LAST 0xE11F // Edit commands #define ID_EDIT_CLEAR 0xE120 #define ID_EDIT_CLEAR_ALL 0xE121 #define ID_EDIT_COPY 0xE122 #define ID_EDIT_CUT 0xE123 #define ID_EDIT_FIND 0xE124 #define ID_EDIT_PASTE 0xE125 #define ID_EDIT_PASTE_LINK 0xE126 #define ID_EDIT_PASTE_SPECIAL 0xE127 #define ID_EDIT_REPEAT 0xE128 #define ID_EDIT_REPLACE 0xE129 #define ID_EDIT_SELECT_ALL 0xE12A #define ID_EDIT_UNDO 0xE12B #define ID_EDIT_REDO 0xE12C #define ID_EDIT_DELETE ID_EDIT_CLEAR #define ID_EDIT_FIND_NEXT ID_EDIT_REPEAT #define ID_EDIT_FIND_PREVIOUS 0xE12D // Window commands #define ID_WINDOW_NEW 0xE130 #define ID_WINDOW_ARRANGE 0xE131 #define ID_WINDOW_CASCADE 0xE132 #define ID_WINDOW_TILE_HORZ 0xE133 #define ID_WINDOW_TILE_VERT 0xE134 #define ID_WINDOW_SPLIT 0xE135 #ifndef RC_INVOKED // code only #define ATL_IDM_WINDOW_FIRST 0xE130 #define ATL_IDM_WINDOW_LAST 0xE13F #define ATL_IDM_FIRST_MDICHILD 0xFF00 // window list starts here #define ATL_IDM_LAST_MDICHILD 0xFFFD #endif // !RC_INVOKED // TabView #define ID_WINDOW_TABFIRST 0xFF00 // = ATL_IDM_FIRST_MDICHILD #define ID_WINDOW_TABLAST 0xFFFD #define ID_WINDOW_SHOWTABLIST 0xFFFE // Help and App commands #define ID_APP_ABOUT 0xE140 #define ID_APP_EXIT 0xE141 #define ID_HELP_INDEX 0xE142 #define ID_HELP_FINDER 0xE143 #define ID_HELP_USING 0xE144 #define ID_CONTEXT_HELP 0xE145 // shift-F1 // special commands for processing help #define ID_HELP 0xE146 // first attempt for F1 #define ID_DEFAULT_HELP 0xE147 // last attempt // Misc #define ID_NEXT_PANE 0xE150 #define ID_PREV_PANE 0xE151 #define ID_PANE_CLOSE 0xE152 #define ID_PANE_NEXT ID_NEXT_PANE #define ID_PANE_PREVIOUS ID_PREV_PANE // Format #define ID_FORMAT_FONT 0xE160 // Scroll #define ID_SCROLL_UP 0xE170 #define ID_SCROLL_DOWN 0xE171 #define ID_SCROLL_PAGE_UP 0xE172 #define ID_SCROLL_PAGE_DOWN 0xE173 #define ID_SCROLL_TOP 0xE174 #define ID_SCROLL_BOTTOM 0xE175 #define ID_SCROLL_LEFT 0xE176 #define ID_SCROLL_RIGHT 0xE177 #define ID_SCROLL_PAGE_LEFT 0xE178 #define ID_SCROLL_PAGE_RIGHT 0xE179 #define ID_SCROLL_ALL_LEFT 0xE17A #define ID_SCROLL_ALL_RIGHT 0xE17B // OLE commands #define ID_OLE_INSERT_NEW 0xE200 #define ID_OLE_EDIT_LINKS 0xE201 #define ID_OLE_EDIT_CONVERT 0xE202 #define ID_OLE_EDIT_CHANGE_ICON 0xE203 #define ID_OLE_EDIT_PROPERTIES 0xE204 #define ID_OLE_VERB_FIRST 0xE210 // range - 16 max #ifndef RC_INVOKED // code only #define ID_OLE_VERB_LAST 0xE21F #endif // !RC_INVOKED // View commands (same number used as IDW used for toolbar and status bar) #define ID_VIEW_TOOLBAR 0xE800 #define ID_VIEW_STATUS_BAR 0xE801 #define ID_VIEW_REFRESH 0xE803 #define ID_VIEW_RIBBON 0xE804 /////////////////////////////////////////////////////////////////////////////// // Standard control IDs #ifdef IDC_STATIC #undef IDC_STATIC #endif // IDC_STATIC #define IDC_STATIC (-1) // all static controls /////////////////////////////////////////////////////////////////////////////// // Standard string error/warnings // idle status bar message #define ATL_IDS_IDLEMESSAGE 0xE001 #ifndef RC_INVOKED // code only #define ATL_IDS_SCFIRST 0xEF00 #endif // !RC_INVOKED #define ATL_IDS_SCSIZE 0xEF00 #define ATL_IDS_SCMOVE 0xEF01 #define ATL_IDS_SCMINIMIZE 0xEF02 #define ATL_IDS_SCMAXIMIZE 0xEF03 #define ATL_IDS_SCNEXTWINDOW 0xEF04 #define ATL_IDS_SCPREVWINDOW 0xEF05 #define ATL_IDS_SCCLOSE 0xEF06 #define ATL_IDS_SCRESTORE 0xEF12 #define ATL_IDS_SCTASKLIST 0xEF13 #define ATL_IDS_MDICHILD 0xEF1F #define ATL_IDS_MRU_FILE 0xEFDA /////////////////////////////////////////////////////////////////////////////// // Misc. control IDs // Property Sheet control id's (determined with Spy++) #define ID_APPLY_NOW 0x3021 #define ID_WIZBACK 0x3023 #define ID_WIZNEXT 0x3024 #define ID_WIZFINISH 0x3025 #define ATL_IDC_TAB_CONTROL 0x3020 #endif // __ATLRES_H__
{ "pile_set_name": "Github" }
/* * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved * * The original version of this source code and documentation * is copyrighted and owned by Taligent, Inc., a wholly-owned * subsidiary of IBM. These materials are provided under terms * of a License Agreement between Taligent and Sun. This technology * is protected by multiple US and International patents. * * This notice and attribution to Taligent may not be removed. * Taligent is a registered trademark of Taligent, Inc. * */ package sun.text.resources; import java.util.ListResourceBundle; public class FormatData_lv extends ListResourceBundle { /** * Overrides ListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { { "MonthNames", new String[] { "janv\u0101ris", // january "febru\u0101ris", // february "marts", // march "apr\u012blis", // april "maijs", // may "j\u016bnijs", // june "j\u016blijs", // july "augusts", // august "septembris", // september "oktobris", // october "novembris", // november "decembris", // december "" // month 13 if applicable } }, { "MonthAbbreviations", new String[] { "Jan", // abb january "Feb", // abb february "Mar", // abb march "Apr", // abb april "Maijs", // abb may "J\u016bn", // abb june "J\u016bl", // abb july "Aug", // abb august "Sep", // abb september "Okt", // abb october "Nov", // abb november "Dec", // abb december "" // abb month 13 if applicable } }, { "DayNames", new String[] { "sv\u0113tdiena", // Sunday "pirmdiena", // Monday "otrdiena", // Tuesday "tre\u0161diena", // Wednesday "ceturtdiena", // Thursday "piektdiena", // Friday "sestdiena" // Saturday } }, { "DayAbbreviations", new String[] { "Sv", // abb Sunday "P", // abb Monday "O", // abb Tuesday "T", // abb Wednesday "C", // abb Thursday "Pk", // abb Friday "S" // abb Saturday } }, { "Eras", new String[] { // era strings "pm\u0113", "m\u0113" } }, { "NumberElements", new String[] { ",", // decimal separator "\u00a0", // group (thousands) separator ";", // list separator "%", // percent sign "0", // native 0 digit "#", // pattern digit "-", // minus sign "E", // exponential "\u2030", // per mille "\u221e", // infinity "\ufffd" // NaN } }, { "DateTimePatterns", new String[] { "HH:mm:ss z", // full time pattern "HH:mm:ss z", // long time pattern "HH:mm:ss", // medium time pattern "HH:mm", // short time pattern "EEEE, yyyy, d MMMM", // full date pattern "EEEE, yyyy, d MMMM", // long date pattern "yyyy.d.M", // medium date pattern "yy.d.M", // short date pattern "{1} {0}" // date-time pattern } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, }; } }
{ "pile_set_name": "Github" }
/* Copyright (c) 2017-2020, Arvid Norberg Copyright (c) 2017, 2020, Alden Torres Copyright (c) 2020, Fonic All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author 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. */ #include "libtorrent/aux_/alert_manager.hpp" #include "libtorrent/alert_types.hpp" #include "test.hpp" #include "setup_transfer.hpp" #include <algorithm> using namespace lt; TORRENT_TEST(alerts_types) { // this counter is incremented sequentially // with each call to TEST_ALERT_TYPE // it starts at 3 because the first alerts // are abstract int count_alert_types = 3; #if TORRENT_ABI_VERSION == 1 TEST_EQUAL(torrent_alert::alert_type, 0); TEST_EQUAL(peer_alert::alert_type, 1); TEST_EQUAL(tracker_alert::alert_type, 2); TEST_EQUAL(alert::debug_notification, alert_category::connect); #endif #define TEST_ALERT_TYPE(name, seq, prio, cat) \ TEST_CHECK(name::priority == prio); \ TEST_EQUAL(name::alert_type, seq); \ TEST_EQUAL(name::static_category, cat); \ TEST_EQUAL(count_alert_types, seq); \ TEST_EQUAL(std::string(alert_name(name::alert_type)) + "_alert", #name); \ count_alert_types++ #if TORRENT_ABI_VERSION == 1 TEST_ALERT_TYPE(torrent_added_alert, 3, alert_priority::normal, alert_category::status); #else ++count_alert_types; #endif #if TORRENT_ABI_VERSION == 1 #define PROGRESS_NOTIFICATION alert::progress_notification | #else #define PROGRESS_NOTIFICATION #endif TEST_ALERT_TYPE(torrent_removed_alert, 4, alert_priority::critical, alert_category::status); TEST_ALERT_TYPE(read_piece_alert, 5, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(file_completed_alert, 6, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::file_progress); TEST_ALERT_TYPE(file_renamed_alert, 7, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(file_rename_failed_alert, 8, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(performance_alert, 9, alert_priority::normal, alert::performance_warning); TEST_ALERT_TYPE(state_changed_alert, 10, alert_priority::high, alert_category::status); TEST_ALERT_TYPE(tracker_error_alert, 11, alert_priority::high, alert_category::tracker | alert_category::error); TEST_ALERT_TYPE(tracker_warning_alert, 12, alert_priority::normal, alert_category::tracker | alert_category::error); TEST_ALERT_TYPE(scrape_reply_alert, 13, alert_priority::critical, alert_category::tracker); TEST_ALERT_TYPE(scrape_failed_alert, 14, alert_priority::critical, alert_category::tracker | alert_category::error); TEST_ALERT_TYPE(tracker_reply_alert, 15, alert_priority::normal, alert_category::tracker); TEST_ALERT_TYPE(dht_reply_alert, 16, alert_priority::normal, alert_category::dht | alert_category::tracker); TEST_ALERT_TYPE(tracker_announce_alert, 17, alert_priority::normal, alert_category::tracker); TEST_ALERT_TYPE(hash_failed_alert, 18, alert_priority::normal, alert_category::status); TEST_ALERT_TYPE(peer_ban_alert, 19, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(peer_unsnubbed_alert, 20, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(peer_snubbed_alert, 21, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(peer_error_alert, 22, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(peer_connect_alert, 23, alert_priority::normal, alert_category::connect); TEST_ALERT_TYPE(peer_disconnected_alert, 24, alert_priority::normal, alert_category::connect); TEST_ALERT_TYPE(invalid_request_alert, 25, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(torrent_finished_alert, 26, alert_priority::high, alert_category::status); TEST_ALERT_TYPE(piece_finished_alert, 27, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::piece_progress); TEST_ALERT_TYPE(request_dropped_alert, 28, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::block_progress | alert_category::peer); TEST_ALERT_TYPE(block_timeout_alert, 29, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::block_progress | alert_category::peer); TEST_ALERT_TYPE(block_finished_alert, 30, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::block_progress); TEST_ALERT_TYPE(block_downloading_alert, 31, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::block_progress); TEST_ALERT_TYPE(unwanted_block_alert, 32, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(storage_moved_alert, 33, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(storage_moved_failed_alert, 34, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(torrent_deleted_alert, 35, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(torrent_delete_failed_alert, 36, alert_priority::critical, alert_category::storage | alert_category::error); TEST_ALERT_TYPE(save_resume_data_alert, 37, alert_priority::critical, alert_category::storage); TEST_ALERT_TYPE(save_resume_data_failed_alert, 38, alert_priority::critical, alert_category::storage | alert_category::error); TEST_ALERT_TYPE(torrent_paused_alert, 39, alert_priority::high, alert_category::status); TEST_ALERT_TYPE(torrent_resumed_alert, 40, alert_priority::high, alert_category::status); TEST_ALERT_TYPE(torrent_checked_alert, 41, alert_priority::high, alert_category::status); TEST_ALERT_TYPE(url_seed_alert, 42, alert_priority::normal, alert_category::peer | alert_category::error); TEST_ALERT_TYPE(file_error_alert, 43, alert_priority::high, alert_category::status | alert_category::error | alert_category::storage); TEST_ALERT_TYPE(metadata_failed_alert, 44, alert_priority::normal, alert_category::error); TEST_ALERT_TYPE(metadata_received_alert, 45, alert_priority::normal, alert_category::status); TEST_ALERT_TYPE(udp_error_alert, 46, alert_priority::normal, alert_category::error); TEST_ALERT_TYPE(external_ip_alert, 47, alert_priority::normal, alert_category::status); TEST_ALERT_TYPE(listen_failed_alert, 48, alert_priority::critical, alert_category::status | alert_category::error); TEST_ALERT_TYPE(listen_succeeded_alert, 49, alert_priority::critical, alert_category::status); TEST_ALERT_TYPE(portmap_error_alert, 50, alert_priority::normal, alert_category::port_mapping | alert_category::error); TEST_ALERT_TYPE(portmap_alert, 51, alert_priority::normal, alert_category::port_mapping); TEST_ALERT_TYPE(portmap_log_alert, 52, alert_priority::normal, alert_category::port_mapping_log); TEST_ALERT_TYPE(fastresume_rejected_alert, 53, alert_priority::critical, alert_category::status | alert_category::error); TEST_ALERT_TYPE(peer_blocked_alert, 54, alert_priority::normal, alert_category::ip_block); TEST_ALERT_TYPE(dht_announce_alert, 55, alert_priority::normal, alert_category::dht); TEST_ALERT_TYPE(dht_get_peers_alert, 56, alert_priority::normal, alert_category::dht); #if TORRENT_ABI_VERSION <= 2 TEST_ALERT_TYPE(stats_alert, 57, alert_priority::normal, alert_category::stats); #else count_alert_types++; #endif TEST_ALERT_TYPE(cache_flushed_alert, 58, alert_priority::high, alert_category::storage); #if TORRENT_ABI_VERSION == 1 TEST_ALERT_TYPE(anonymous_mode_alert, 59, alert_priority::normal, alert_category::error); #else count_alert_types++; #endif TEST_ALERT_TYPE(lsd_peer_alert, 60, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(trackerid_alert, 61, alert_priority::normal, alert_category::status); TEST_ALERT_TYPE(dht_bootstrap_alert, 62, alert_priority::normal, alert_category::dht); count_alert_types++; // 63 is gone TEST_ALERT_TYPE(torrent_error_alert, 64, alert_priority::high, alert_category::error | alert_category::status); TEST_ALERT_TYPE(torrent_need_cert_alert, 65, alert_priority::critical, alert_category::status); TEST_ALERT_TYPE(incoming_connection_alert, 66, alert_priority::normal, alert_category::peer); TEST_ALERT_TYPE(add_torrent_alert, 67, alert_priority::critical, alert_category::status); TEST_ALERT_TYPE(state_update_alert, 68, alert_priority::high, alert_category::status); #if TORRENT_ABI_VERSION == 1 TEST_ALERT_TYPE(mmap_cache_alert, 69, alert_priority::normal, alert_category::error); #else count_alert_types++; #endif TEST_ALERT_TYPE(session_stats_alert, 70, alert_priority::critical, alert_category_t{}); count_alert_types++; count_alert_types++; // 72 is gone TEST_ALERT_TYPE(dht_error_alert, 73, alert_priority::normal, alert_category::error | alert_category::dht); TEST_ALERT_TYPE(dht_immutable_item_alert, 74, alert_priority::critical, alert_category::dht); TEST_ALERT_TYPE(dht_mutable_item_alert, 75, alert_priority::critical, alert_category::dht); TEST_ALERT_TYPE(dht_put_alert, 76, alert_priority::normal, alert_category::dht); TEST_ALERT_TYPE(i2p_alert, 77, alert_priority::normal, alert_category::error); TEST_ALERT_TYPE(dht_outgoing_get_peers_alert, 78, alert_priority::normal, alert_category::dht); TEST_ALERT_TYPE(log_alert, 79, alert_priority::normal, alert_category::session_log); TEST_ALERT_TYPE(torrent_log_alert, 80, alert_priority::normal, alert_category::torrent_log); TEST_ALERT_TYPE(peer_log_alert, 81, alert_priority::normal, alert_category::peer_log); TEST_ALERT_TYPE(lsd_error_alert, 82, alert_priority::normal, alert_category::error); TEST_ALERT_TYPE(dht_stats_alert, 83, alert_priority::normal, alert_category_t{}); TEST_ALERT_TYPE(incoming_request_alert, 84, alert_priority::normal, alert_category::incoming_request); TEST_ALERT_TYPE(dht_log_alert, 85, alert_priority::normal, alert_category::dht_log); TEST_ALERT_TYPE(dht_pkt_alert, 86, alert_priority::normal, alert_category::dht_log); TEST_ALERT_TYPE(dht_get_peers_reply_alert, 87, alert_priority::normal, alert_category::dht_operation); TEST_ALERT_TYPE(dht_direct_response_alert, 88, alert_priority::critical, alert_category::dht); TEST_ALERT_TYPE(picker_log_alert, 89, alert_priority::normal, alert_category::picker_log); TEST_ALERT_TYPE(session_error_alert, 90, alert_priority::normal, alert_category::error); TEST_ALERT_TYPE(dht_live_nodes_alert, 91, alert_priority::normal, alert_category::dht); TEST_ALERT_TYPE(session_stats_header_alert, 92, alert_priority::normal, alert_category_t{}); TEST_ALERT_TYPE(dht_sample_infohashes_alert, 93, alert_priority::normal, alert_category::dht_operation); TEST_ALERT_TYPE(block_uploaded_alert, 94, alert_priority::normal, PROGRESS_NOTIFICATION alert_category::upload); TEST_ALERT_TYPE(alerts_dropped_alert, 95, alert_priority::meta, alert_category::error); TEST_ALERT_TYPE(socks5_alert, 96, alert_priority::normal, alert_category::error); #undef TEST_ALERT_TYPE TEST_EQUAL(num_alert_types, 97); TEST_EQUAL(num_alert_types, count_alert_types); } TORRENT_TEST(dht_get_peers_reply_alert) { aux::alert_manager mgr(1, dht_get_peers_reply_alert::static_category); TEST_EQUAL(mgr.should_post<dht_get_peers_reply_alert>(), true); sha1_hash const ih = rand_hash(); tcp::endpoint const ep1 = rand_tcp_ep(rand_v4); tcp::endpoint const ep2 = rand_tcp_ep(rand_v4); tcp::endpoint const ep3 = rand_tcp_ep(rand_v4); tcp::endpoint const ep4 = rand_tcp_ep(rand_v6); tcp::endpoint const ep5 = rand_tcp_ep(rand_v6); std::vector<tcp::endpoint> v = {ep1, ep2, ep3, ep4, ep5}; mgr.emplace_alert<dht_get_peers_reply_alert>(ih, v); auto const* a = alert_cast<dht_get_peers_reply_alert>(mgr.wait_for_alert(seconds(0))); TEST_CHECK(a != nullptr); TEST_EQUAL(a->info_hash, ih); TEST_EQUAL(a->num_peers(), 5); std::vector<tcp::endpoint> peers = a->peers(); std::sort(v.begin(), v.end()); std::sort(peers.begin(), peers.end()); TEST_CHECK(v == peers); } TORRENT_TEST(dht_live_nodes_alert) { aux::alert_manager mgr(1, dht_live_nodes_alert::static_category); TEST_EQUAL(mgr.should_post<dht_live_nodes_alert>(), true); sha1_hash const ih = rand_hash(); sha1_hash const h1 = rand_hash(); sha1_hash const h2 = rand_hash(); sha1_hash const h3 = rand_hash(); sha1_hash const h4 = rand_hash(); sha1_hash const h5 = rand_hash(); udp::endpoint const ep1 = rand_udp_ep(rand_v4); udp::endpoint const ep2 = rand_udp_ep(rand_v4); udp::endpoint const ep3 = rand_udp_ep(rand_v4); udp::endpoint const ep4 = rand_udp_ep(rand_v6); udp::endpoint const ep5 = rand_udp_ep(rand_v6); std::vector<std::pair<sha1_hash, udp::endpoint>> v; v.emplace_back(h1, ep1); v.emplace_back(h2, ep2); v.emplace_back(h3, ep3); v.emplace_back(h4, ep4); v.emplace_back(h5, ep5); mgr.emplace_alert<dht_live_nodes_alert>(ih, v); auto const* a = alert_cast<dht_live_nodes_alert>(mgr.wait_for_alert(seconds(0))); TEST_CHECK(a != nullptr); TEST_EQUAL(a->node_id, ih); TEST_EQUAL(a->num_nodes(), 5); auto nodes = a->nodes(); std::sort(v.begin(), v.end()); std::sort(nodes.begin(), nodes.end()); TEST_CHECK(v == nodes); } TORRENT_TEST(session_stats_alert) { aux::alert_manager mgr(1, {}); std::vector<alert*> alerts; counters cnt; mgr.emplace_alert<session_stats_header_alert>(); mgr.emplace_alert<session_stats_alert>(cnt); mgr.get_all(alerts); TEST_EQUAL(alerts.size(), 2); auto const* h = alert_cast<session_stats_header_alert>(alerts[0]); TEST_CHECK(h != nullptr); TEST_CHECK(h->message().find("session stats header: ") != std::string::npos); auto const* v = alert_cast<session_stats_alert>(alerts[1]); TEST_CHECK(v != nullptr); TEST_CHECK(v->message().find("session stats (") != std::string::npos); } TORRENT_TEST(dht_sample_infohashes_alert) { aux::alert_manager mgr(1, dht_sample_infohashes_alert::static_category); TEST_EQUAL(mgr.should_post<dht_sample_infohashes_alert>(), true); sha1_hash const node_id = rand_hash(); udp::endpoint const endpoint = rand_udp_ep(); time_duration const interval = seconds(10); int const num = 100; sha1_hash const h1 = rand_hash(); sha1_hash const h2 = rand_hash(); sha1_hash const h3 = rand_hash(); sha1_hash const h4 = rand_hash(); sha1_hash const h5 = rand_hash(); std::vector<sha1_hash> const v = {h1, h2, h3, h4, h5}; sha1_hash const nh1 = rand_hash(); sha1_hash const nh2 = rand_hash(); sha1_hash const nh3 = rand_hash(); sha1_hash const nh4 = rand_hash(); sha1_hash const nh5 = rand_hash(); udp::endpoint const nep1 = rand_udp_ep(rand_v4); udp::endpoint const nep2 = rand_udp_ep(rand_v4); udp::endpoint const nep3 = rand_udp_ep(rand_v4); udp::endpoint const nep4 = rand_udp_ep(rand_v6); udp::endpoint const nep5 = rand_udp_ep(rand_v6); std::vector<std::pair<sha1_hash, udp::endpoint>> nv; nv.emplace_back(nh1, nep1); nv.emplace_back(nh2, nep2); nv.emplace_back(nh3, nep3); nv.emplace_back(nh4, nep4); nv.emplace_back(nh5, nep5); mgr.emplace_alert<dht_sample_infohashes_alert>(node_id, endpoint, interval, num, v, nv); auto const* a = alert_cast<dht_sample_infohashes_alert>(mgr.wait_for_alert(seconds(0))); TEST_CHECK(a != nullptr); TEST_EQUAL(a->node_id, node_id); TEST_EQUAL(a->endpoint, endpoint); TEST_CHECK(a->interval == interval); TEST_EQUAL(a->num_infohashes, num); TEST_EQUAL(a->num_samples(), 5); TEST_CHECK(a->samples() == v); TEST_EQUAL(a->num_nodes(), 5); auto nodes = a->nodes(); std::sort(nv.begin(), nv.end()); std::sort(nodes.begin(), nodes.end()); TEST_CHECK(nv == nodes); } TORRENT_TEST(performance_warning) { using pw = lt::performance_alert; TEST_EQUAL(performance_warning_str(pw::outstanding_disk_buffer_limit_reached), "max outstanding disk writes reached"_sv); TEST_EQUAL(performance_warning_str(pw::outstanding_request_limit_reached), "max outstanding piece requests reached"_sv); TEST_EQUAL(performance_warning_str(pw::upload_limit_too_low), "upload limit too low (download rate will suffer)"_sv); TEST_EQUAL(performance_warning_str(pw::download_limit_too_low), "download limit too low (upload rate will suffer)"_sv); TEST_EQUAL(performance_warning_str(pw::send_buffer_watermark_too_low), "send buffer watermark too low (upload rate will suffer)"_sv); TEST_EQUAL(performance_warning_str(pw::too_many_optimistic_unchoke_slots), "too many optimistic unchoke slots"_sv); TEST_EQUAL(performance_warning_str(pw::too_high_disk_queue_limit), "the disk queue limit is too high compared to the cache size. The disk queue eats into the cache size"_sv); TEST_EQUAL(performance_warning_str(pw::aio_limit_reached), "outstanding AIO operations limit reached"_sv); TEST_EQUAL(performance_warning_str(pw::too_few_outgoing_ports), "too few ports allowed for outgoing connections"_sv); TEST_EQUAL(performance_warning_str(pw::too_few_file_descriptors), "too few file descriptors are allowed for this process. connection limit lowered"_sv); } #undef PROGRESS_NOTIFICATION
{ "pile_set_name": "Github" }
[[cron]] schedule = "*/5 * * * *" [cron.job] type = "TwoJob" queue = "critical"
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <!-- Copyright 2011 The Closure Library Authors. All Rights Reserved. Use of this source code is governed by the Apache License, Version 2.0. See the COPYING file for details. --> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title> Closure Unit Tests - goog.storage.mechanism.HTML5SessionStorage </title> <script src="../../base.js"> </script> <script> goog.require('goog.storage.mechanism.HTML5SessionStorageTest'); </script> </head> <body> </body> </html>
{ "pile_set_name": "Github" }
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # pkg.name: "util/debounce" pkg.description: "Debouncing / hysteresis utility package." pkg.author: "Apache Mynewt <[email protected]>" pkg.homepage: "http://mynewt.apache.org/" pkg.keywords: - debounce - hysteresis
{ "pile_set_name": "Github" }
Transformers ============ .. automodule:: mlutils.transformers :members: :undoc-members: :inherited-members:
{ "pile_set_name": "Github" }
/* * /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBoldScript.js * * Copyright (c) 2009-2013 The MathJax Consortium * * 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. */ MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{120016:[699,21,984,50,955],120017:[699,21,1060,55,985],120018:[699,21,912,60,877],120019:[699,21,991,60,906],120020:[699,21,826,95,791],120021:[699,21,1042,65,1025],120022:[699,21,834,82,799],120023:[699,21,1171,65,1154],120024:[699,21,997,47,977],120025:[699,224,906,19,886],120026:[699,21,1154,45,1130],120027:[699,21,1036,40,1015],120028:[699,21,1300,60,1245],120029:[699,21,1095,60,1078],120030:[699,21,809,72,749],120031:[699,21,1025,55,994],120032:[699,52,809,72,749],120033:[699,21,1048,55,973],120034:[699,21,816,81,781],120035:[699,21,1030,65,1025],120036:[699,21,964,60,904],120037:[699,21,1040,60,1024],120038:[699,21,1320,60,1306],120039:[699,21,1033,64,1010],120040:[699,224,989,60,963],120041:[699,21,996,50,976],120042:[462,14,942,35,865],120043:[699,14,646,60,624],120044:[462,14,764,35,683],120045:[699,14,949,28,912],120046:[462,14,726,35,648],120047:[699,205,768,25,749],120048:[462,224,819,27,771],120049:[699,14,838,55,758],120050:[698,14,558,40,534],120051:[698,223,840,41,823],120052:[699,14,810,55,730],120053:[699,14,650,43,632],120054:[462,14,1137,45,1057],120055:[462,14,851,45,771],120056:[462,14,848,35,780],120057:[462,205,885,25,770],120058:[462,205,913,35,833],120059:[462,0,677,40,648],120060:[557,14,562,51,449],120061:[669,14,618,47,612],120062:[450,14,842,31,762],120063:[458,14,732,40,670],120064:[458,14,1012,40,950],120065:[462,14,820,63,740],120066:[450,224,784,40,711],120067:[493,14,782,61,702]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/MathBoldScript.js");
{ "pile_set_name": "Github" }
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/api/http.proto package annotations import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // Defines the HTTP configuration for an API service. It contains a list of // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method // to one or more HTTP REST API methods. type Http struct { // A list of HTTP configuration rules that apply to individual API methods. // // **NOTE:** All service configuration rules follow "last one wins" order. Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // When set to true, URL path parmeters will be fully URI-decoded except in // cases of single segment matches in reserved expansion, where "%2F" will be // left encoded. // // The default behavior is to not decode RFC 6570 reserved characters in multi // segment matches. FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Http) Reset() { *m = Http{} } func (m *Http) String() string { return proto.CompactTextString(m) } func (*Http) ProtoMessage() {} func (*Http) Descriptor() ([]byte, []int) { return fileDescriptor_ff9994be407cdcc9, []int{0} } func (m *Http) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Http.Unmarshal(m, b) } func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Http.Marshal(b, m, deterministic) } func (m *Http) XXX_Merge(src proto.Message) { xxx_messageInfo_Http.Merge(m, src) } func (m *Http) XXX_Size() int { return xxx_messageInfo_Http.Size(m) } func (m *Http) XXX_DiscardUnknown() { xxx_messageInfo_Http.DiscardUnknown(m) } var xxx_messageInfo_Http proto.InternalMessageInfo func (m *Http) GetRules() []*HttpRule { if m != nil { return m.Rules } return nil } func (m *Http) GetFullyDecodeReservedExpansion() bool { if m != nil { return m.FullyDecodeReservedExpansion } return false } // `HttpRule` defines the mapping of an RPC method to one or more HTTP // REST API methods. The mapping specifies how different portions of the RPC // request message are mapped to URL path, URL query parameters, and // HTTP request body. The mapping is typically specified as an // `google.api.http` annotation on the RPC method, // see "google/api/annotations.proto" for details. // // The mapping consists of a field specifying the path template and // method kind. The path template can refer to fields in the request // message, as in the example below which describes a REST GET // operation on a resource collection of messages: // // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { // option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } // string message_id = 1; // mapped to the URL // SubMessage sub = 2; // `sub.subfield` is url-mapped // } // message Message { // string text = 1; // content of the resource // } // // The same http annotation can alternatively be expressed inside the // `GRPC API Configuration` YAML file. // // http: // rules: // - selector: <proto_package_name>.Messaging.GetMessage // get: /v1/messages/{message_id}/{sub.subfield} // // This definition enables an automatic, bidrectional mapping of HTTP // JSON to RPC. Example: // // HTTP | RPC // -----|----- // `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` // // In general, not only fields but also field paths can be referenced // from a path pattern. Fields mapped to the path pattern cannot be // repeated and must have a primitive (non-message) type. // // Any fields in the request message which are not bound by the path // pattern automatically become (optional) HTTP query // parameters. Assume the following definition of the request message: // // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { // option (google.api.http).get = "/v1/messages/{message_id}"; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } // string message_id = 1; // mapped to the URL // int64 revision = 2; // becomes a parameter // SubMessage sub = 3; // `sub.subfield` becomes a parameter // } // // // This enables a HTTP JSON to RPC mapping as below: // // HTTP | RPC // -----|----- // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` // // Note that fields which are mapped to HTTP parameters must have a // primitive type or a repeated primitive type. Message types are not // allowed. In the case of a repeated type, the parameter can be // repeated in the URL, as in `...?param=A&param=B`. // // For HTTP method kinds which allow a request body, the `body` field // specifies the mapping. Consider a REST update method on the // message resource collection: // // // service Messaging { // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { // option (google.api.http) = { // put: "/v1/messages/{message_id}" // body: "message" // }; // } // } // message UpdateMessageRequest { // string message_id = 1; // mapped to the URL // Message message = 2; // mapped to the body // } // // // The following HTTP JSON to RPC mapping is enabled, where the // representation of the JSON in the request body is determined by // protos JSON encoding: // // HTTP | RPC // -----|----- // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define that // every field not bound by the path template should be mapped to the // request body. This enables the following alternative definition of // the update method: // // service Messaging { // rpc UpdateMessage(Message) returns (Message) { // option (google.api.http) = { // put: "/v1/messages/{message_id}" // body: "*" // }; // } // } // message Message { // string message_id = 1; // string text = 2; // } // // // The following HTTP JSON to RPC mapping is enabled: // // HTTP | RPC // -----|----- // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible to // have HTTP parameters, as all fields not bound by the path end in // the body. This makes this option more rarely used in practice of // defining REST APIs. The common usage of `*` is in custom methods // which don't use the URL at all for transferring data. // // It is possible to define multiple HTTP methods for one RPC by using // the `additional_bindings` option. Example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { // option (google.api.http) = { // get: "/v1/messages/{message_id}" // additional_bindings { // get: "/v1/users/{user_id}/messages/{message_id}" // } // }; // } // } // message GetMessageRequest { // string message_id = 1; // string user_id = 2; // } // // // This enables the following two alternative HTTP JSON to RPC // mappings: // // HTTP | RPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` // // # Rules for HTTP mapping // // The rules for mapping HTTP path, query parameters, and body fields // to the request message are as follows: // // 1. The `body` field specifies either `*` or a field path, or is // omitted. If omitted, it indicates there is no HTTP request body. // 2. Leaf fields (recursive expansion of nested messages in the // request) can be classified into three types: // (a) Matched in the URL template. // (b) Covered by body (if body is `*`, everything except (a) fields; // else everything under the body field) // (c) All other fields. // 3. URL query parameters found in the HTTP request are mapped to (c) fields. // 4. Any body sent with an HTTP request can contain only (b) fields. // // The syntax of the path template is as follows: // // Template = "/" Segments [ Verb ] ; // Segments = Segment { "/" Segment } ; // Segment = "*" | "**" | LITERAL | Variable ; // Variable = "{" FieldPath [ "=" Segments ] "}" ; // FieldPath = IDENT { "." IDENT } ; // Verb = ":" LITERAL ; // // The syntax `*` matches a single path segment. The syntax `**` matches zero // or more path segments, which must be the last part of the path except the // `Verb`. The syntax `LITERAL` matches literal text in the path. // // The syntax `Variable` matches part of the URL path as specified by its // template. A variable template must not contain other variables. If a variable // matches a single path segment, its template may be omitted, e.g. `{var}` // is equivalent to `{var=*}`. // // If a variable contains exactly one path segment, such as `"{var}"` or // `"{var=*}"`, when such a variable is expanded into a URL path, all characters // except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the // Discovery Document as `{var}`. // // If a variable contains one or more path segments, such as `"{var=foo/*}"` // or `"{var=**}"`, when such a variable is expanded into a URL path, all // characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables // show up in the Discovery Document as `{+var}`. // // NOTE: While the single segment variable matches the semantics of // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 // Simple String Expansion, the multi segment variable **does not** match // RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion // does not expand special characters like `?` and `#`, which would lead // to invalid URLs. // // NOTE: the field paths in variables and in the `body` must not refer to // repeated fields or map fields. type HttpRule struct { // Selects methods to which this rule applies. // // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Determines the URL pattern is matched by this rules. This pattern can be // used with any of the {get|put|post|delete|patch} methods. A custom method // can be defined using the 'custom' field. // // Types that are valid to be assigned to Pattern: // *HttpRule_Get // *HttpRule_Put // *HttpRule_Post // *HttpRule_Delete // *HttpRule_Patch // *HttpRule_Custom Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` // The name of the request field whose value is mapped to the HTTP body, or // `*` for mapping all fields not captured by the path pattern to the HTTP // body. NOTE: the referred field must not be a repeated field and must be // present at the top-level of request message type. Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` // Optional. The name of the response field whose value is mapped to the HTTP // body of response. Other response fields are ignored. When // not set, the response message will be used as HTTP body of response. ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` // Additional HTTP bindings for the selector. Nested bindings must // not contain an `additional_bindings` field themselves (that is, // the nesting may only be one level deep). AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *HttpRule) Reset() { *m = HttpRule{} } func (m *HttpRule) String() string { return proto.CompactTextString(m) } func (*HttpRule) ProtoMessage() {} func (*HttpRule) Descriptor() ([]byte, []int) { return fileDescriptor_ff9994be407cdcc9, []int{1} } func (m *HttpRule) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HttpRule.Unmarshal(m, b) } func (m *HttpRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_HttpRule.Marshal(b, m, deterministic) } func (m *HttpRule) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpRule.Merge(m, src) } func (m *HttpRule) XXX_Size() int { return xxx_messageInfo_HttpRule.Size(m) } func (m *HttpRule) XXX_DiscardUnknown() { xxx_messageInfo_HttpRule.DiscardUnknown(m) } var xxx_messageInfo_HttpRule proto.InternalMessageInfo func (m *HttpRule) GetSelector() string { if m != nil { return m.Selector } return "" } type isHttpRule_Pattern interface { isHttpRule_Pattern() } type HttpRule_Get struct { Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` } type HttpRule_Put struct { Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` } type HttpRule_Post struct { Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` } type HttpRule_Delete struct { Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` } type HttpRule_Patch struct { Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` } type HttpRule_Custom struct { Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` } func (*HttpRule_Get) isHttpRule_Pattern() {} func (*HttpRule_Put) isHttpRule_Pattern() {} func (*HttpRule_Post) isHttpRule_Pattern() {} func (*HttpRule_Delete) isHttpRule_Pattern() {} func (*HttpRule_Patch) isHttpRule_Pattern() {} func (*HttpRule_Custom) isHttpRule_Pattern() {} func (m *HttpRule) GetPattern() isHttpRule_Pattern { if m != nil { return m.Pattern } return nil } func (m *HttpRule) GetGet() string { if x, ok := m.GetPattern().(*HttpRule_Get); ok { return x.Get } return "" } func (m *HttpRule) GetPut() string { if x, ok := m.GetPattern().(*HttpRule_Put); ok { return x.Put } return "" } func (m *HttpRule) GetPost() string { if x, ok := m.GetPattern().(*HttpRule_Post); ok { return x.Post } return "" } func (m *HttpRule) GetDelete() string { if x, ok := m.GetPattern().(*HttpRule_Delete); ok { return x.Delete } return "" } func (m *HttpRule) GetPatch() string { if x, ok := m.GetPattern().(*HttpRule_Patch); ok { return x.Patch } return "" } func (m *HttpRule) GetCustom() *CustomHttpPattern { if x, ok := m.GetPattern().(*HttpRule_Custom); ok { return x.Custom } return nil } func (m *HttpRule) GetBody() string { if m != nil { return m.Body } return "" } func (m *HttpRule) GetResponseBody() string { if m != nil { return m.ResponseBody } return "" } func (m *HttpRule) GetAdditionalBindings() []*HttpRule { if m != nil { return m.AdditionalBindings } return nil } // XXX_OneofFuncs is for the internal use of the proto package. func (*HttpRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _HttpRule_OneofMarshaler, _HttpRule_OneofUnmarshaler, _HttpRule_OneofSizer, []interface{}{ (*HttpRule_Get)(nil), (*HttpRule_Put)(nil), (*HttpRule_Post)(nil), (*HttpRule_Delete)(nil), (*HttpRule_Patch)(nil), (*HttpRule_Custom)(nil), } } func _HttpRule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*HttpRule) // pattern switch x := m.Pattern.(type) { case *HttpRule_Get: b.EncodeVarint(2<<3 | proto.WireBytes) b.EncodeStringBytes(x.Get) case *HttpRule_Put: b.EncodeVarint(3<<3 | proto.WireBytes) b.EncodeStringBytes(x.Put) case *HttpRule_Post: b.EncodeVarint(4<<3 | proto.WireBytes) b.EncodeStringBytes(x.Post) case *HttpRule_Delete: b.EncodeVarint(5<<3 | proto.WireBytes) b.EncodeStringBytes(x.Delete) case *HttpRule_Patch: b.EncodeVarint(6<<3 | proto.WireBytes) b.EncodeStringBytes(x.Patch) case *HttpRule_Custom: b.EncodeVarint(8<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Custom); err != nil { return err } case nil: default: return fmt.Errorf("HttpRule.Pattern has unexpected type %T", x) } return nil } func _HttpRule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*HttpRule) switch tag { case 2: // pattern.get if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Pattern = &HttpRule_Get{x} return true, err case 3: // pattern.put if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Pattern = &HttpRule_Put{x} return true, err case 4: // pattern.post if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Pattern = &HttpRule_Post{x} return true, err case 5: // pattern.delete if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Pattern = &HttpRule_Delete{x} return true, err case 6: // pattern.patch if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Pattern = &HttpRule_Patch{x} return true, err case 8: // pattern.custom if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(CustomHttpPattern) err := b.DecodeMessage(msg) m.Pattern = &HttpRule_Custom{msg} return true, err default: return false, nil } } func _HttpRule_OneofSizer(msg proto.Message) (n int) { m := msg.(*HttpRule) // pattern switch x := m.Pattern.(type) { case *HttpRule_Get: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Get))) n += len(x.Get) case *HttpRule_Put: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Put))) n += len(x.Put) case *HttpRule_Post: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Post))) n += len(x.Post) case *HttpRule_Delete: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Delete))) n += len(x.Delete) case *HttpRule_Patch: n += 1 // tag and wire n += proto.SizeVarint(uint64(len(x.Patch))) n += len(x.Patch) case *HttpRule_Custom: s := proto.Size(x.Custom) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } // A custom pattern is used for defining custom HTTP verb. type CustomHttpPattern struct { // The name of this custom HTTP verb. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` // The path matched by this custom verb. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} } func (m *CustomHttpPattern) String() string { return proto.CompactTextString(m) } func (*CustomHttpPattern) ProtoMessage() {} func (*CustomHttpPattern) Descriptor() ([]byte, []int) { return fileDescriptor_ff9994be407cdcc9, []int{2} } func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CustomHttpPattern.Unmarshal(m, b) } func (m *CustomHttpPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CustomHttpPattern.Marshal(b, m, deterministic) } func (m *CustomHttpPattern) XXX_Merge(src proto.Message) { xxx_messageInfo_CustomHttpPattern.Merge(m, src) } func (m *CustomHttpPattern) XXX_Size() int { return xxx_messageInfo_CustomHttpPattern.Size(m) } func (m *CustomHttpPattern) XXX_DiscardUnknown() { xxx_messageInfo_CustomHttpPattern.DiscardUnknown(m) } var xxx_messageInfo_CustomHttpPattern proto.InternalMessageInfo func (m *CustomHttpPattern) GetKind() string { if m != nil { return m.Kind } return "" } func (m *CustomHttpPattern) GetPath() string { if m != nil { return m.Path } return "" } func init() { proto.RegisterType((*Http)(nil), "google.api.Http") proto.RegisterType((*HttpRule)(nil), "google.api.HttpRule") proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") } func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_ff9994be407cdcc9) } var fileDescriptor_ff9994be407cdcc9 = []byte{ // 419 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x8e, 0xd3, 0x30, 0x10, 0x86, 0x49, 0x9b, 0x76, 0xdb, 0xe9, 0x82, 0x84, 0x59, 0x90, 0x85, 0x40, 0x54, 0xe5, 0x52, 0x71, 0x48, 0xa5, 0xe5, 0xc0, 0x61, 0x4f, 0x1b, 0xa8, 0x58, 0x6e, 0x55, 0x8e, 0x5c, 0x22, 0x37, 0x1e, 0x52, 0x83, 0xd7, 0xb6, 0xe2, 0x09, 0xa2, 0xaf, 0xc3, 0x63, 0xf1, 0x24, 0x1c, 0x91, 0x9d, 0x84, 0x56, 0x42, 0xe2, 0x36, 0xf3, 0xff, 0x9f, 0xa7, 0x7f, 0x27, 0x03, 0x4f, 0x6b, 0x6b, 0x6b, 0x8d, 0x1b, 0xe1, 0xd4, 0xe6, 0x40, 0xe4, 0x32, 0xd7, 0x58, 0xb2, 0x0c, 0x3a, 0x39, 0x13, 0x4e, 0xad, 0x8e, 0x90, 0xde, 0x11, 0x39, 0xf6, 0x06, 0x26, 0x4d, 0xab, 0xd1, 0xf3, 0x64, 0x39, 0x5e, 0x2f, 0xae, 0xaf, 0xb2, 0x13, 0x93, 0x05, 0xa0, 0x68, 0x35, 0x16, 0x1d, 0xc2, 0xb6, 0xf0, 0xea, 0x4b, 0xab, 0xf5, 0xb1, 0x94, 0x58, 0x59, 0x89, 0x65, 0x83, 0x1e, 0x9b, 0xef, 0x28, 0x4b, 0xfc, 0xe1, 0x84, 0xf1, 0xca, 0x1a, 0x3e, 0x5a, 0x26, 0xeb, 0x59, 0xf1, 0x22, 0x62, 0x1f, 0x22, 0x55, 0xf4, 0xd0, 0x76, 0x60, 0x56, 0xbf, 0x46, 0x30, 0x1b, 0x46, 0xb3, 0xe7, 0x30, 0xf3, 0xa8, 0xb1, 0x22, 0xdb, 0xf0, 0x64, 0x99, 0xac, 0xe7, 0xc5, 0xdf, 0x9e, 0x31, 0x18, 0xd7, 0x48, 0x71, 0xe6, 0xfc, 0xee, 0x41, 0x11, 0x9a, 0xa0, 0xb9, 0x96, 0xf8, 0x78, 0xd0, 0x5c, 0x4b, 0xec, 0x0a, 0x52, 0x67, 0x3d, 0xf1, 0xb4, 0x17, 0x63, 0xc7, 0x38, 0x4c, 0x25, 0x6a, 0x24, 0xe4, 0x93, 0x5e, 0xef, 0x7b, 0xf6, 0x0c, 0x26, 0x4e, 0x50, 0x75, 0xe0, 0xd3, 0xde, 0xe8, 0x5a, 0xf6, 0x0e, 0xa6, 0x55, 0xeb, 0xc9, 0xde, 0xf3, 0xd9, 0x32, 0x59, 0x2f, 0xae, 0x5f, 0x9e, 0x2f, 0xe3, 0x7d, 0x74, 0x42, 0xee, 0x9d, 0x20, 0xc2, 0xc6, 0x84, 0x81, 0x1d, 0xce, 0x18, 0xa4, 0x7b, 0x2b, 0x8f, 0xfc, 0x22, 0xfe, 0x81, 0x58, 0xb3, 0xd7, 0xf0, 0xb0, 0x41, 0xef, 0xac, 0xf1, 0x58, 0x46, 0xf3, 0x32, 0x9a, 0x97, 0x83, 0x98, 0x07, 0x68, 0x0b, 0x4f, 0x84, 0x94, 0x8a, 0x94, 0x35, 0x42, 0x97, 0x7b, 0x65, 0xa4, 0x32, 0xb5, 0xe7, 0x8b, 0xff, 0x7c, 0x0b, 0x76, 0x7a, 0x90, 0xf7, 0x7c, 0x3e, 0x87, 0x0b, 0xd7, 0x85, 0x5a, 0xdd, 0xc0, 0xe3, 0x7f, 0x92, 0x86, 0x7c, 0xdf, 0x94, 0x91, 0xfd, 0x82, 0x63, 0x1d, 0x34, 0x27, 0xe8, 0xd0, 0x6d, 0xb7, 0x88, 0x75, 0xfe, 0x15, 0x1e, 0x55, 0xf6, 0xfe, 0xec, 0x67, 0xf3, 0x79, 0x1c, 0x13, 0xae, 0x67, 0x97, 0x7c, 0xbe, 0xed, 0x8d, 0xda, 0x6a, 0x61, 0xea, 0xcc, 0x36, 0xf5, 0xa6, 0x46, 0x13, 0x6f, 0x6b, 0xd3, 0x59, 0xc2, 0x29, 0x1f, 0xaf, 0x4e, 0x18, 0x63, 0x49, 0x84, 0x98, 0xfe, 0xe6, 0xac, 0xfe, 0x9d, 0x24, 0x3f, 0x47, 0xe9, 0xc7, 0xdb, 0xdd, 0xa7, 0xfd, 0x34, 0xbe, 0x7b, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0xae, 0xde, 0xa1, 0xd0, 0xac, 0x02, 0x00, 0x00, }
{ "pile_set_name": "Github" }
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.client.impl.auth.oauth2; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.io.Reader; import lombok.Data; import lombok.NoArgsConstructor; /** * A JSON object representing a credentials file. */ @Data @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class KeyFile { private static ObjectMapper objectMapper = new ObjectMapper(); @JsonProperty("type") private String type; @JsonProperty("client_id") private String clientId; @JsonProperty("client_secret") private String clientSecret; @JsonProperty("client_email") private String clientEmail; @JsonProperty("issuer_url") private String issuerUrl; public String toJson() throws IOException { return objectMapper.writeValueAsString(this); } public static KeyFile fromJson(String value) throws IOException { return objectMapper.readValue(value, KeyFile.class); } public static KeyFile fromJson(Reader value) throws IOException { return objectMapper.readValue(value, KeyFile.class); } }
{ "pile_set_name": "Github" }
name = "ext/libsodium"; description = "Extension for libsodium : in PECL until PHP 7.2, and in core ever since. The Sodium crypto library (libsodium) is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more. Sodium supports a variety of compilers and operating systems, including Windows (with MinGW or Visual Studio, x86 and x64), iOS and Android. The design choices emphasize security, and \"magic constants\" have clear rationales. <?php // Example from the docs : https://paragonie.com/book/pecl-libsodium/read/06-hashing.md#crypto-generichash // Fast, unkeyed hash function. // Can be used as a secure replacement for MD5 $h = \Sodium\crypto_generichash('msg'); // Fast, keyed hash function. // The key can be of any length between \Sodium\CRYPTO_GENERICHASH_KEYBYTES_MIN // and \Sodium\CRYPTO_GENERICHASH_KEYBYTES_MAX, in bytes. // \Sodium\CRYPTO_GENERICHASH_KEYBYTES is the recommended length. $h = \Sodium\crypto_generichash('msg', $key); // Fast, keyed hash function, with user-chosen output length, in bytes. // Output length can be between \Sodium\CRYPTO_GENERICHASH_BYTES_MIN and // \Sodium\CRYPTO_GENERICHASH_BYTES_MAX. // \Sodium\CRYPTO_GENERICHASH_BYTES is the default length. $h = \Sodium\crypto_generichash('msg', $key, 64); ?> See also `PHP extension for libsodium <https://github.com/jedisct1/libsodium-php>`_ and `Using Libsodium in PHP Projects <https://paragonie.com/book/pecl-libsodium/read/00-intro.md>`_. "; clearphp = ""; severity = ""; timetofix = ""; exakatSince = "0.10.2";
{ "pile_set_name": "Github" }
/* Localized versions of Info.plist keys */
{ "pile_set_name": "Github" }
#include "jit/backend/x64/x64_local.h" extern "C" { #include "core/exception_handler.h" #include "core/memory.h" #include "jit/backend/x64/x64_backend.h" #include "jit/backend/x64/x64_disassembler.h" #include "jit/ir/ir.h" #include "jit/jit.h" #include "jit/jit_backend.h" #include "jit/jit_guest.h" } /* * x64 register layout */ /* clang-format off */ #if PLATFORM_WINDOWS const int x64_arg0_idx = Xbyak::Operand::RCX; const int x64_arg1_idx = Xbyak::Operand::RDX; const int x64_arg2_idx = Xbyak::Operand::R8; const int x64_arg3_idx = Xbyak::Operand::R9; #else const int x64_arg0_idx = Xbyak::Operand::RDI; const int x64_arg1_idx = Xbyak::Operand::RSI; const int x64_arg2_idx = Xbyak::Operand::RDX; const int x64_arg3_idx = Xbyak::Operand::RCX; #endif const Xbyak::Reg64 arg0(x64_arg0_idx); const Xbyak::Reg64 arg1(x64_arg1_idx); const Xbyak::Reg64 arg2(x64_arg2_idx); const Xbyak::Reg64 arg3(x64_arg3_idx); const Xbyak::Reg64 guestctx(Xbyak::Operand::R14); const Xbyak::Reg64 guestmem(Xbyak::Operand::R15); const struct jit_register x64_registers[] = { {"rax", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rax}, {"rcx", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rcx}, {"rdx", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rdx}, {"rbx", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rbx}, {"rsp", JIT_RESERVED | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rsp}, {"rbp", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rbp}, #if PLATFORM_WINDOWS {"rsi", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rsi}, {"rdi", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rdi}, {"r8", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r8}, {"r9", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r9}, #else {"rsi", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rsi}, {"rdi", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::rdi}, {"r8", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r8}, {"r9", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r9}, #endif {"r10", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r10}, {"r11", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r11}, {"r12", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r12}, {"r13", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r13}, {"r14", JIT_RESERVED | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r14}, {"r15", JIT_RESERVED | JIT_CALLEE_SAVE | JIT_REG_I64, (const void *)&Xbyak::util::r15}, #if PLATFORM_WINDOWS {"xmm0", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm0}, {"xmm1", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm1}, {"xmm2", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm2}, {"xmm3", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm3}, {"xmm4", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm4}, {"xmm5", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm5}, {"xmm6", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm6}, {"xmm7", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm7}, {"xmm8", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm8}, {"xmm9", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm9}, {"xmm10", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm10}, {"xmm11", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm11}, {"xmm12", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm12}, {"xmm13", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm13}, {"xmm14", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm14}, {"xmm15", JIT_ALLOCATE | JIT_CALLEE_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm15}, #else {"xmm0", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm0}, {"xmm1", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm1}, {"xmm2", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm2}, {"xmm3", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm3}, {"xmm4", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm4}, {"xmm5", JIT_RESERVED | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm5}, {"xmm6", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm6}, {"xmm7", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm7}, {"xmm8", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm8}, {"xmm9", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm9}, {"xmm10", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm10}, {"xmm11", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm11}, {"xmm12", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm12}, {"xmm13", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm13}, {"xmm14", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm14}, {"xmm15", JIT_ALLOCATE | JIT_CALLER_SAVE | JIT_REG_F64 | JIT_REG_V128, (const void *)&Xbyak::util::xmm15}, #endif }; const int x64_num_registers = ARRAY_SIZE(x64_registers); /* clang-format on */ Xbyak::Reg x64_backend_reg(struct x64_backend *backend, const struct ir_value *v) { CHECK(v->reg >= 0 && v->reg < x64_num_registers); Xbyak::Reg reg = *(const Xbyak::Reg *)x64_registers[v->reg].data; CHECK(reg.isREG()); switch (v->type) { case VALUE_I8: reg = reg.cvt8(); break; case VALUE_I16: reg = reg.cvt16(); break; case VALUE_I32: reg = reg.cvt32(); break; case VALUE_I64: /* no conversion needed */ break; default: LOG_FATAL("unexpected value type"); break; } return reg; } Xbyak::Xmm x64_backend_xmm(struct x64_backend *backend, const struct ir_value *v) { CHECK(v->reg >= 0 && v->reg < x64_num_registers); Xbyak::Xmm xmm = *(const Xbyak::Xmm *)x64_registers[v->reg].data; CHECK(xmm.isXMM()); return xmm; } int x64_backend_push_regs(struct x64_backend *backend, int mask) { int size = 0; auto &e = *backend->codegen; for (int i = 0; i < x64_num_registers; i++) { const struct jit_register *r = &x64_registers[i]; if ((r->flags & mask) != mask) { continue; } if (r->flags & JIT_REG_I64) { Xbyak::Reg reg = *(const Xbyak::Reg *)r->data; CHECK(reg.isREG()); size += 8; e.mov(e.qword[e.rsp - size], reg); } else if (r->flags & (JIT_REG_F64 | JIT_REG_V128)) { Xbyak::Xmm xmm = *(const Xbyak::Xmm *)r->data; CHECK(xmm.isXMM()); size += 16; e.movdqu(e.ptr[e.rsp - size], xmm); } } return size; } void x64_backend_pop_regs(struct x64_backend *backend, int mask) { int size = 0; auto &e = *backend->codegen; for (int i = 0; i < x64_num_registers; i++) { const struct jit_register *r = &x64_registers[i]; if ((r->flags & mask) != mask) { continue; } if ((r->flags & JIT_REG_I64)) { Xbyak::Reg reg = *(const Xbyak::Reg *)r->data; CHECK(reg.isREG()); size += 8; e.mov(reg, e.qword[e.rsp - size]); } else if (r->flags & (JIT_REG_F64 | JIT_REG_V128)) { Xbyak::Xmm xmm = *(const Xbyak::Xmm *)r->data; CHECK(xmm.isXMM()); size += 16; e.movdqu(xmm, e.ptr[e.rsp - size]); } } } void x64_backend_load_mem(struct x64_backend *backend, const struct ir_value *dst, const Xbyak::RegExp &src_exp) { auto &e = *backend->codegen; switch (dst->type) { case VALUE_I8: e.mov(x64_backend_reg(backend, dst), e.byte[src_exp]); break; case VALUE_I16: e.mov(x64_backend_reg(backend, dst), e.word[src_exp]); break; case VALUE_I32: e.mov(x64_backend_reg(backend, dst), e.dword[src_exp]); break; case VALUE_I64: e.mov(x64_backend_reg(backend, dst), e.qword[src_exp]); break; case VALUE_F32: if (X64_USE_AVX) { e.vmovss(x64_backend_xmm(backend, dst), e.dword[src_exp]); } else { e.movss(x64_backend_xmm(backend, dst), e.dword[src_exp]); } break; case VALUE_F64: if (X64_USE_AVX) { e.vmovsd(x64_backend_xmm(backend, dst), e.qword[src_exp]); } else { e.movsd(x64_backend_xmm(backend, dst), e.qword[src_exp]); } break; case VALUE_V128: if (X64_USE_AVX) { e.vmovups(x64_backend_xmm(backend, dst), e.ptr[src_exp]); } else { e.movups(x64_backend_xmm(backend, dst), e.ptr[src_exp]); } break; default: LOG_FATAL("unexpected load result type"); break; } } void x64_backend_store_mem(struct x64_backend *backend, const Xbyak::RegExp &dst_exp, const struct ir_value *src) { auto &e = *backend->codegen; if (ir_is_constant(src)) { switch (src->type) { case VALUE_I8: e.mov(e.byte[dst_exp], src->i8); break; case VALUE_I16: e.mov(e.word[dst_exp], src->i16); break; case VALUE_I32: case VALUE_F32: e.mov(e.dword[dst_exp], src->i32); break; case VALUE_I64: case VALUE_F64: e.mov(e.qword[dst_exp], src->i64); break; default: LOG_FATAL("unexpected value type"); break; } return; } switch (src->type) { case VALUE_I8: e.mov(e.byte[dst_exp], x64_backend_reg(backend, src)); break; case VALUE_I16: e.mov(e.word[dst_exp], x64_backend_reg(backend, src)); break; case VALUE_I32: e.mov(e.dword[dst_exp], x64_backend_reg(backend, src)); break; case VALUE_I64: e.mov(e.qword[dst_exp], x64_backend_reg(backend, src)); break; case VALUE_F32: if (X64_USE_AVX) { e.vmovss(e.dword[dst_exp], x64_backend_xmm(backend, src)); } else { e.movss(e.dword[dst_exp], x64_backend_xmm(backend, src)); } break; case VALUE_F64: if (X64_USE_AVX) { e.vmovsd(e.qword[dst_exp], x64_backend_xmm(backend, src)); } else { e.movsd(e.qword[dst_exp], x64_backend_xmm(backend, src)); } break; case VALUE_V128: if (X64_USE_AVX) { e.vmovups(e.ptr[dst_exp], x64_backend_xmm(backend, src)); } else { e.movups(e.ptr[dst_exp], x64_backend_xmm(backend, src)); } break; default: LOG_FATAL("unexpected load result type"); break; } } void x64_backend_mov_value(struct x64_backend *backend, const Xbyak::Reg &dst, const struct ir_value *v) { auto &e = *backend->codegen; if (ir_is_constant(v)) { switch (v->type) { case VALUE_I8: e.mov(dst.cvt8(), v->i8); break; case VALUE_I16: e.mov(dst.cvt16(), v->i16); break; case VALUE_I32: e.mov(dst.cvt32(), v->i32); break; case VALUE_I64: e.mov(dst.cvt64(), v->i64); break; default: LOG_FATAL("unexpected value type"); break; } return; } switch (v->type) { case VALUE_I8: e.mov(dst.cvt8(), x64_backend_reg(backend, v)); break; case VALUE_I16: e.mov(dst.cvt16(), x64_backend_reg(backend, v)); break; case VALUE_I32: e.mov(dst.cvt32(), x64_backend_reg(backend, v)); break; case VALUE_I64: e.mov(dst, x64_backend_reg(backend, v)); break; default: LOG_FATAL("unexpected value type"); break; } } const Xbyak::Address x64_backend_xmm_constant(struct x64_backend *backend, enum xmm_constant c) { auto &e = *backend->codegen; return e.ptr[e.rip + backend->xmm_const[c]]; } void x64_backend_block_label(char *name, size_t size, struct ir_block *block) { snprintf(name, size, ".%p", block); } static void x64_backend_emit_thunks(struct x64_backend *backend) { auto &e = *backend->codegen; { for (int i = 0; i < 16; i++) { Xbyak::Reg64 dst(i); e.align(32); backend->load_thunk[i] = e.getCurr<void (*)()>(); /* save caller-saved registers that our code uses and ensure stack is 16-byte aligned */ int save_mask = JIT_ALLOCATE | JIT_CALLER_SAVE; int offset = x64_backend_push_regs(backend, save_mask); offset = ALIGN_UP(offset + X64_STACK_SHADOW_SPACE + 8, 16) - 8; e.sub(e.rsp, offset); /* call the mmio handler */ e.call(e.rax); /* restore caller-saved registers */ e.add(e.rsp, offset); x64_backend_pop_regs(backend, save_mask); /* save mmio handler result */ e.mov(dst, e.rax); /* return to jit code */ e.ret(); } } { e.align(32); backend->store_thunk = e.getCurr<void (*)()>(); /* save caller-saved registers that our code uses and ensure stack is 16-byte aligned */ int save_mask = JIT_ALLOCATE | JIT_CALLER_SAVE; int offset = x64_backend_push_regs(backend, save_mask); offset = ALIGN_UP(offset + X64_STACK_SHADOW_SPACE + 8, 16) - 8; e.sub(e.rsp, offset); /* call the mmio handler */ e.call(e.rax); /* restore caller-saved registers */ e.add(e.rsp, offset); x64_backend_pop_regs(backend, save_mask); /* return to jit code */ e.ret(); } } static void x64_backend_emit_constants(struct x64_backend *backend) { auto &e = *backend->codegen; /* xmm constants. SSE / AVX provides no support for loading a constant into an xmm register, so instead frequently used constants are emitted to the code buffer and used as memory operands */ e.align(32); e.L(backend->xmm_const[XMM_CONST_PS_ABS_MASK]); e.dq(INT64_C(0x7fffffff7fffffff)); e.dq(INT64_C(0x7fffffff7fffffff)); e.align(32); e.L(backend->xmm_const[XMM_CONST_PD_ABS_MASK]); e.dq(INT64_C(0x7fffffffffffffff)); e.dq(INT64_C(0x7fffffffffffffff)); e.align(32); e.L(backend->xmm_const[XMM_CONST_PS_SIGN_MASK]); e.dq(INT64_C(0x8000000080000000)); e.dq(INT64_C(0x8000000080000000)); e.align(32); e.L(backend->xmm_const[XMM_CONST_PD_SIGN_MASK]); e.dq(INT64_C(0x8000000000000000)); e.dq(INT64_C(0x8000000000000000)); e.align(32); e.L(backend->xmm_const[XMM_CONST_PD_MIN_INT32]); double dbl_min_i32 = INT32_MIN; e.dq(*(uint64_t *)&dbl_min_i32); e.dq(*(uint64_t *)&dbl_min_i32); e.align(32); e.L(backend->xmm_const[XMM_CONST_PD_MAX_INT32]); double dbl_max_i32 = INT32_MAX; e.dq(*(uint64_t *)&dbl_max_i32); e.dq(*(uint64_t *)&dbl_max_i32); } static int x64_backend_handle_exception(struct jit_backend *base, struct exception_state *ex) { struct x64_backend *backend = container_of(base, struct x64_backend, base); struct jit_guest *guest = backend->base.guest; const uint8_t *data = (const uint8_t *)ex->thread_state.rip; /* figure out the guest address that was being accessed */ const uint8_t *fault_addr = (const uint8_t *)ex->fault_addr; const uint8_t *protected_start = (const uint8_t *)ex->thread_state.r15; uint32_t guest_addr = (uint32_t)(fault_addr - protected_start); /* ensure it was an mmio address that caused the exception */ uint8_t *ptr; guest->lookup(guest->mem, guest_addr, NULL, &ptr, NULL, NULL); if (ptr) { return 0; } /* it's assumed a mov has triggered the exception */ struct x64_mov mov; if (!x64_decode_mov(data, &mov)) { return 0; } /* instead of handling the mmio callback from inside of the exception handler, force rip to the beginning of a thunk which will invoke the callback once the exception handler has exited. this frees the callbacks from any restrictions imposed by an exception handler, and also prevents a possible recursive exception push the return address (the next instruction after the current mov) to the stack. each thunk will be responsible for pushing / popping caller- saved registers */ ex->thread_state.rsp -= 8; *(uint64_t *)(ex->thread_state.rsp) = ex->thread_state.rip + mov.length; CHECK(ex->thread_state.rsp % 16 == 8); if (mov.is_load) { /* prep argument registers (memory object, guest_addr) for read function */ ex->thread_state.r[x64_arg0_idx] = (uint64_t)guest->mem; ex->thread_state.r[x64_arg1_idx] = (uint64_t)guest_addr; /* prep function call address for thunk */ switch (mov.operand_size) { case 1: ex->thread_state.rax = (uint64_t)guest->r8; break; case 2: ex->thread_state.rax = (uint64_t)guest->r16; break; case 4: ex->thread_state.rax = (uint64_t)guest->r32; break; case 8: ex->thread_state.rax = (uint64_t)guest->r64; break; } /* resume execution in the thunk once the exception handler exits */ ex->thread_state.rip = (uint64_t)backend->load_thunk[mov.reg]; } else { /* prep argument registers (memory object, guest_addr, value) for write function */ ex->thread_state.r[x64_arg0_idx] = (uint64_t)guest->mem; ex->thread_state.r[x64_arg1_idx] = (uint64_t)guest_addr; ex->thread_state.r[x64_arg2_idx] = mov.has_imm ? mov.imm : ex->thread_state.r[mov.reg]; /* prep function call address for thunk */ switch (mov.operand_size) { case 1: ex->thread_state.rax = (uint64_t)guest->w8; break; case 2: ex->thread_state.rax = (uint64_t)guest->w16; break; case 4: ex->thread_state.rax = (uint64_t)guest->w32; break; case 8: ex->thread_state.rax = (uint64_t)guest->w64; break; } /* resume execution in the thunk once the exception handler exits */ ex->thread_state.rip = (uint64_t)backend->store_thunk; } return 1; } static void x64_backend_dump_code(struct jit_backend *base, const uint8_t *addr, int size, FILE *output) { struct x64_backend *backend = container_of(base, struct x64_backend, base); cs_insn *insns; size_t count = cs_disasm(backend->capstone_handle, addr, size, 0, 0, &insns); fprintf(output, "#==--------------------------------------------------==#\n"); fprintf(output, "# x64\n"); fprintf(output, "#==--------------------------------------------------==#\n"); const int max_mnemonic_width = 8; for (size_t i = 0; i < count; i++) { cs_insn &insn = insns[i]; fprintf(output, "# 0x%08" PRIx64 " %-*s %s\n", insn.address, max_mnemonic_width, insn.mnemonic, insn.op_str); } cs_free(insns, count); } void x64_backend_emit_branch(struct x64_backend *backend, struct ir *ir, const ir_value *target) { struct jit_guest *guest = backend->base.guest; auto &e = *backend->codegen; char block_label[128]; int dispatch_type = 0; /* update guest pc */ if (target) { if (ir_is_constant(target)) { if (target->type == VALUE_BLOCK) { x64_backend_block_label(block_label, sizeof(block_label), target->blk); struct ir_value *addr = ir_get_meta(ir, target->blk, IR_META_ADDR); e.mov(e.dword[guestctx + guest->offset_pc], addr->i32); dispatch_type = 0; } else { uint32_t addr = target->i32; e.mov(e.dword[guestctx + guest->offset_pc], addr); dispatch_type = 1; } } else { Xbyak::Reg addr = x64_backend_reg(backend, target); e.mov(e.dword[guestctx + guest->offset_pc], addr); dispatch_type = 2; } } else { dispatch_type = 2; } /* jump directly to the block / to dispatch */ switch (dispatch_type) { case 0: e.jmp(block_label, Xbyak::CodeGenerator::T_NEAR); break; case 1: e.call(backend->dispatch_static); break; case 2: e.jmp(backend->dispatch_dynamic); break; } } static void x64_backend_emit_epilog(struct x64_backend *backend, struct ir *ir, struct ir_block *block) { auto &e = *backend->codegen; /* if the block didn't branch to another address, return to dispatch */ struct ir_instr *last_instr = list_last_entry(&block->instrs, struct ir_instr, it); if (last_instr->op != OP_BRANCH && last_instr->op != OP_BRANCH_COND) { x64_backend_emit_branch(backend, ir, NULL); } } static void x64_backend_emit_prolog(struct x64_backend *backend, struct ir *ir, struct ir_block *block) { struct jit_guest *guest = backend->base.guest; auto &e = *backend->codegen; /* count number of instrs / cycles in the block */ int num_instrs = 0; int num_cycles = 0; list_for_each_entry(instr, &block->instrs, struct ir_instr, it) { if (instr->op == OP_SOURCE_INFO) { num_instrs += 1; num_cycles += instr->arg[1]->i32; } } /* yield control once remaining cycles are executed */ e.mov(e.eax, e.dword[guestctx + guest->offset_cycles]); e.test(e.eax, e.eax); e.js(backend->dispatch_exit); /* yield control to any pending interrupts */ e.mov(e.rax, e.qword[guestctx + guest->offset_interrupts]); e.test(e.rax, e.rax); e.jnz(backend->dispatch_interrupt); /* update debug run counts */ e.sub(e.dword[guestctx + guest->offset_cycles], num_cycles); e.add(e.dword[guestctx + guest->offset_instrs], num_instrs); } static void x64_backend_emit(struct x64_backend *backend, struct ir *ir, jit_emit_cb emit_cb, void *emit_data) { auto &e = *backend->codegen; CHECK_LT(ir->locals_size, X64_STACK_SIZE); e.inLocalLabel(); list_for_each_entry(block, &ir->blocks, struct ir_block, it) { int first = 1; uint8_t *block_addr = e.getCurr<uint8_t *>(); /* label each block for local branches */ char block_label[128]; x64_backend_block_label(block_label, sizeof(block_label), block); e.L(block_label); x64_backend_emit_prolog(backend, ir, block); list_for_each_entry(instr, &block->instrs, struct ir_instr, it) { /* call emit callback for each guest block / instruction enabling users to map each to their corresponding host address */ if (emit_cb && instr->op == OP_SOURCE_INFO) { uint32_t guest_addr = instr->arg[0]->i32; if (first) { emit_cb(emit_data, JIT_EMIT_BLOCK, guest_addr, block_addr); first = 0; } uint8_t *instr_addr = e.getCurr<uint8_t *>(); emit_cb(emit_data, JIT_EMIT_INSTR, guest_addr, instr_addr); } struct jit_emitter *emitter = &x64_emitters[instr->op]; x64_emit_cb emit = (x64_emit_cb)emitter->func; CHECK_NOTNULL(emit); emit(backend, e, ir, instr); } x64_backend_emit_epilog(backend, ir, block); } e.outLocalLabel(); } static int x64_backend_assemble_code(struct jit_backend *base, struct ir *ir, uint8_t **addr, int *size, jit_emit_cb emit_cb, void *emit_data) { struct x64_backend *backend = container_of(base, struct x64_backend, base); auto &e = *backend->codegen; int res = 1; uint8_t *code = e.getCurr<uint8_t *>(); /* try to generate the x64 code. if the code buffer overflows let the backend know so it can reset the cache and try again */ try { x64_backend_emit(backend, ir, emit_cb, emit_data); } catch (const Xbyak::Error &e) { if (e != Xbyak::ERR_CODE_IS_TOO_BIG) { LOG_FATAL("x64 codegen failure, %s", e.what()); } res = 0; } /* return code address */ *addr = code; *size = (int)(e.getCurr<uint8_t *>() - code); return res; } static void x64_backend_reset(struct jit_backend *base) { struct x64_backend *backend = container_of(base, struct x64_backend, base); /* avoid reemitting thunks by just resetting the size to a safe spot after the thunks */ backend->codegen->setSize(X64_THUNK_SIZE); } static void x64_backend_destroy(struct jit_backend *base) { struct x64_backend *backend = container_of(base, struct x64_backend, base); cs_close(&backend->capstone_handle); delete backend->codegen; x64_dispatch_shutdown(backend); free(backend); } struct jit_backend *x64_backend_create(struct jit_guest *guest, void *code, int code_size) { struct x64_backend *backend = (struct x64_backend *)calloc(1, sizeof(struct x64_backend)); Xbyak::util::Cpu cpu; backend->base.guest = guest; backend->base.destroy = &x64_backend_destroy; /* compile interface */ backend->base.registers = x64_registers; backend->base.num_registers = ARRAY_SIZE(x64_registers); backend->base.emitters = x64_emitters; backend->base.num_emitters = ARRAY_SIZE(x64_emitters); backend->base.reset = &x64_backend_reset; backend->base.assemble_code = &x64_backend_assemble_code; backend->base.dump_code = &x64_backend_dump_code; backend->base.handle_exception = &x64_backend_handle_exception; /* dispatch interface */ backend->base.run_code = &x64_dispatch_run_code; backend->base.lookup_code = &x64_dispatch_lookup_code; backend->base.cache_code = &x64_dispatch_cache_code; backend->base.invalidate_code = &x64_dispatch_invalidate_code; backend->base.patch_edge = &x64_dispatch_patch_edge; backend->base.restore_edge = &x64_dispatch_restore_edge; /* setup codegen buffer */ int r = protect_pages(code, code_size, ACC_READWRITEEXEC); CHECK(r); int have_avx2 = cpu.has(Xbyak::util::Cpu::tAVX2); int have_sse2 = cpu.has(Xbyak::util::Cpu::tSSE2); CHECK(have_avx2 || have_sse2, "CPU must support either AVX2 or SSE2"); backend->codegen = new Xbyak::CodeGenerator(code_size, code); backend->use_avx = have_avx2; /* create disassembler */ int res = cs_open(CS_ARCH_X86, CS_MODE_64, &backend->capstone_handle); CHECK_EQ(res, CS_ERR_OK); /* emit initial thunks */ x64_dispatch_init(backend); x64_dispatch_emit_thunks(backend); x64_backend_emit_thunks(backend); x64_backend_emit_constants(backend); CHECK_LT(backend->codegen->getSize(), X64_THUNK_SIZE); return &backend->base; }
{ "pile_set_name": "Github" }
/* TYPOGRAPHY */ body { background: var(--bg1); } @font-face { font-family: 'IBM Plex Sans'; src: url("assets/fonts/IBM_Plex_Sans/IBMPlexSans-Regular.ttf") format("truetype"); } @font-face { font-family: Epilogue; src: url("assets/fonts/Epilogue/Epilogue-VariableFont_wght.ttf") format("truetype"); } html {font-size: 87.5%;} /*14px*/ /* CSS Vars */ :root { --fn-dropshadow:0 1px 2px rgba(0,0,0,0); --contrast-normal: var(--bg2); --light-theme-lines: var(--contrast-darkest); --dark-theme-lines: var(--contrast-lighter); --lines: var(--dark-theme-lines); --sidenav-width: 240px; --btn-default-bg: var(--alt-bg2); --hover-bg: var(--lines) !important; --font-family-body: 'IBM Plex Sans'; } body { font-family: var(--font-family-body), sans-serif; font-weight: 400; line-height: 1.65; /*min-width: 320px;*/ } p {margin-bottom: 1.15rem;} h1, h2, h3, h4, h5 { margin: 2.75rem 0 1.05rem; margin: 0; font-family: 'IBM Plex Sans', sans-serif; font-weight: 400; line-height: 1.15; } h1 { margin-top: 0; font-size: 2.488em; } h1 { color: var(--fg1);} h1, h2{ font-family: 'Epilogue', sans-serif; font-weight: 500; } h2 {font-size: 2.074em;} h3 {font-size: 1.728em;} h4 {font-size: 1.44em;} h5 {font-size: 1.2em;} small, .text_small {font-size: 0.833em;} .text-extra-small{ font-size: x-small;} span.code{ font-family:'Inconsolata'; opacity: 0.75; background: rgba(255,255,255,0.1); } /* * Variables * height 36px * * */ /* MENUS */ .mat-menu-item { line-height:36px !important; height:36px !important; } /* Cards */ .mat-card{ border:solid var(--highlights) rgba(255,255,255,0.025); /*border-top-size:var(--highlights);*/ } entity-table .mat-card, entity-form .mat-card{ padding:0 !important; } .form-card.mat-card { max-width:960px; margin:0 auto; } entity-form .mat-card > *, entity-table .mat-card > *{ padding:16px !important; margin:0 !important; } .mat-card > .no-padding{ padding:0 !important; } .mat-card-title-text{ margin:0 !important; } .mat-toolbar .mat-button{ height:36px !important; margin: 0 4px; } .fn-toolbar{ background:var(--alt-bg1); } .fn-toolbar.icons-only{ padding:8px !important; } /* Special Override Classes */ /* FreeNAS Specific */ button.menu-toggle .mat-icon{ position:relative; top:6px; right:-10px; } /* This element is part of entity-table. * It currently uses css to do artificially * put itselt inside the title bar. * This needs to be changed in the markup * instead of using this type of hack */ #filter{ position: static !important; margin-top:-10px; /* The form field reserves too much space in mat-toolbar. This wins some of the screen back */ text-align:right; max-height:38px; } entity-table .multiactions-title{ margin-bottom: 16px ; } entity-table .mat-toolbar.mat-card-toolbar{ position:relative; z-index:2; } /* Elements with shadows */ .datatable-header, entity-table .mat-toolbar.mat-card-toolbar{ box-shadow:var(--fn-dropshadow); } /*********************************************************************/ /* Dematerialize Form Fields :) */ .form-element{ margin: 16px 0; text-align:left; } .form-element .label{ } .form-element .label.input-text, .form-element .label.input-select{ font-size: x-small; } .form-element .label-container { margin-bottom: 4px; padding: 4px 0; } .borderless{ border: none !important; } .mat-divider{ background: var(--lines) !important; opacity: 1 !important; } .fieldset { padding-bottom: 24px; } .fieldset.empty-fieldset { padding-bottom: 0px; } .full-width{ position: relative; } .form-element.form-combobox .mat-form-field, .form-element.form-ip-netmask .mat-form-field, .form-element.form-combobox .mat-menu-trigger, .form-element .mat-form-field-wrapper, .form-element input[type = "password"], .form-element input[type = "email"], .form-element input[type = "text"], .form-element input[type = "number"], .form-element textarea, .form-element select{ background-color: var(--bg1); color: var(--fg1); border: solid 1px var(--lines); padding: 8px; box-sizing: border-box; color: var(--fg1); } .form-element, #password, .form-element.form-combobox .mat-form-field, .form-element.form-ip-netmask .mat-form-field, .form-element.form-combobox .mat-menu-trigger, .form-element .mat-form-field-wrapper, .form-element input[type = "password"], .form-element input[type = "email"], .form-element input[type = "text"], .form-element input[type = "number"], .form-element textarea, .form-element select{ width: calc(100% - 24px) !important; line-height: normal !important; min-height: 33px; } entity-form-list .list-action-block-wrapper .form-element, entity-form-list .list-action-block-wrapper #password, entity-form-list .list-action-block-wrapper .form-element.form-combobox .mat-form-field, entity-form-list .list-action-block-wrapper .form-element.form-ip-netmask .mat-form-field, entity-form-list .list-action-block-wrapper .form-element.form-combobox .mat-menu-trigger, entity-form-list .list-action-block-wrapper .form-element .mat-form-field-wrapper, entity-form-list .list-action-block-wrapper .form-element input[type = "password"], entity-form-list .list-action-block-wrapper .form-element input[type = "email"], entity-form-list .list-action-block-wrapper .form-element input[type = "text"], entity-form-list .list-action-block-wrapper .form-element input[type = "number"], entity-form-list .list-action-block-wrapper .form-element textarea, entity-form-list .list-action-block-wrapper .has-tooltip mat-form-field.full-width, entity-form-list .list-action-block-wrapper .form-element select{ width: 100% !important; } /* Combo Box */ .form-element.form-combobox .label-container{ margin-bottom: 0; padding-bottom: 3px; } .form-element.form-combobox .mat-form-field-wrapper input, .form-element.form-combobox .mat-form-field-wrapper{ background-color: unset; border: unset; padding: unset; } .form-element.form-combobox .mat-form-field{ max-width: calc(100% - 58px) !important; height: 33px; margin-right: 1px; padding: 0 8px; } .form-element.form-combobox .mat-menu-trigger:hover { cursor: pointer; } .form-element.form-combobox .mat-menu-trigger{ position: relative; top: -9px; padding: 9px 2px 8px; } .form-element.form-combobox .mat-menu-trigger .mat-icon{ position: relative !important; top: 7px !important; } .form-element.form-combobox .mat-form-field, .form-element.form-combobox .mat-menu-trigger{ height: 33px; } /* IP w/Netmask*/ .form-element.form-ip-netmask .mat-form-field { max-height: 33px; } .form-element.form-ip-netmask .mat-form-field-wrapper input, .form-element.form-ip-netmask .mat-form-field-wrapper{ background-color: unset; border: unset; padding: unset; } .form-element.form-combobox .mat-select-trigger{ position: relative; top: 2px; padding: 9px 2px 8px; } /* Form List */ .form-list .form-list-item { position: relative; right: 18px; top: 50%; } .form-list .list-action-inline { display: flex; align-items: center; justify-content: center; } .form-list .list-action { display: flex; justify-content: right; } /* Chips */ .form-element .mat-chip{ font-size: smaller !important; padding: 1px 16px 0 !important; } /* Login Form */ .login-form .form-element .mat-form-field-wrapper{ width: 100% !important; min-height: unset; max-height: 33px; } .login-form .form-element .mat-form-field-wrapper input{ background: none; border: none; margin: 0; padding: 0 0 2px 0; } .login-form .form-element .mat-form-field-prefix .mat-icon { font-size: 16px; } .login-form .form-element .mat-form-field-prefix{ margin-bottom: 2px; } .login-form .form-element.username .mat-form-field-prefix{ top: -5px; } .login-form .form-element.password .mat-form-field-prefix{ top: -16px; } .form-element textarea{ min-width: calc(100% - 24px); max-width: calc(100% - 24px); min-height: 96px; } .form-element input[type = "password"], .form-element .has_toggle_pw input { position: relative; top: -6px; height: inherit; display: inline; } .form-element button.toggle_pw { position: absolute; bottom: -3px; right: 32px; } .form-element button.toggle_pw i{ font-size: 22px; opacity: 0.75; } .form-element .mat-form-field-type-mat-select .mat-form-field-wrapper { min-height: 33px; width: 100% !important; } .form-element.form-explorer .mat-form-field-wrapper{ padding-left: 0; } .form-element.form-explorer .mat-form-field-wrapper, .form-element.form-explorer .mat-form-field-flex, .form-element.form-explorer .mat-form-field-flex input { border: none; } .form-element.form-combobox .mat-form-field-flex, .form-element.form-combobox .mat-form-field-flex input { border: none; } .margin-for-error{ position: static !important; } .mat-checkbox-frame{ border-color: var(--fg2) !important; } .mat-checkbox{ opacity: 0.75; } tooltip button i{ opacity: 0.5; } .label-container tooltip { margin: 0 0 4px 4px; } .tooltip .material-icons{ font-size: 16px !important; } /* Normalize mat-select */ .mat-form-field-label-wrapper, .mat-form-field-underline, .mat-form-field-subscript-wrapper { display: none; } .mat-form-field-appearance-legacy .mat-form-field-infix { padding: 0; border: 0; } /* Buttons */ .mat-button, .mat-flat-button { border-radius : 0 !important; text-transform: capitalize !important; } .mat-button[disabled] span.mat-button-wrapper, .mat-flat-button[disabled] span.mat-button-wrapper{ opacity: 0.5; } .mat-card-actions .mat-button, .mat-card-actions .mat-flat-button{ background:var(--btn-default-bg) !important; background-color:var(--btn-default-bg) !important; color:var(--fg2) !important; } .mat-button, .mat-flat-button, button.mat-button.btn-default, button.mat-button.mat-default, .mat-card-actions button.mat-default, button.mat-default, button.mat-button.mat-accent.btn-default, button.mat-button[type="button"]:not(button.mat-primary) { background:var(--btn-default-bg) !important; background-color:var(--btn-default-bg) !important; color:var(--fg2) !important; } button.mat-button[type="button"]:hover, button.mat-button.mat-accent[type="button"]:hover{ background-color: var(--alt-bg1) !important; color: var(--fg2) !important; } button.mat-button.mat-primary{ background-color:var(--primary) !important; color:var(--primary-txt) !important; opacity: 1 !important; } button.mat-button.mat-accent{ background-color:var(--accent) !important; color:var(--accent-txt) !important; opacity: 1 !important; } /* Menus */ .mat-option:hover:not(.mat-option-disabled), .sidenav-link:hover, .slide-in-nav-item:hover, .mat-menu-item:hover, .mat-button:hover{ background-color: var(--hover-bg) !important; } /* Nested Cards */ .mat-card .form-card.mat-card{ box-shadow: unset; border: none; } /* Top bar fixes */ .topbar .mat-icon-button, .topbar .mat-icon-button .mat-icon[alt="iXsystem logo"]{ color: var(--topbar-txt) !important; } /* Material Cards*/ .mat-card{ padding: 0 !important; position: relative; } .mat-card .mat-toolbar-row, .mat-card .mat-card-content > div, .mat-card .mat-card-footer { padding: 16px; } .mat-card .mat-toolbar{ } .mat-card .mat-toolbar-row{ border-bottom: solid 1px var(--lines); min-height: 48px !important; height: 56px; } .mat-card .mat-toolbar-row .actions{ position: absolute; right: 16px; } .mat-card .mat-card-footer .actions button{ margin-right: 8px; } .mat-card-content{ /*padding-bottom: 80px;*/ } .mat-card .mat-card-footer { width: 100%; padding:0 16px; margin-top: 8px; } /* Material Tables */ table.mat-table { width: 100%; background-color: var(--bg2) !important; } .mat-table thead th{ background-color: var(--contrast-darker); background-color: rgba(0,0,0,0.1); opacity: 0.75; vertical-align: middle; } tr.mat-header-row, .mat-table thead tr{ max-height: 48px; height: 48px; } .mat-row, .mat-header-row, .mat-footer-row, th.mat-header-cell, td.mat-cell, td.mat-footer-cell{ border-bottom-color: var(--lines) !important; } mat-row, mat-header-row, mat-footer-row, th.mat-header-cell, td.mat-cell, td.mat-footer-cell{ color: var(--fg2) !important; vertical-align: middle; position: relative; } td.mat-cell .mat-icon{ position: absolute; top: calc(50% - 12px); } .mat-row:hover, tr.mat-row:hover { background: rgba(0,0,0,0.1); cursor: pointer; } /* Material Lists */ .mat-list-item{ border-bottom: solid 1px var(--lines) !important; } .value, .mat-list-item .value{ font-weight: 500; } .label, .mat-list-item .label{ margin-right: 16px; } mat-card.mat-card .mat-list-base{ padding-top: 0; } /* This should probably be implemented as a component */ .page-title{ width: calc(100% - 64px); margin: 0 auto; color: var(--fg1); }
{ "pile_set_name": "Github" }
<h2>[%loc('Textile help')%]</h2> <p><a href="http://www.bradchoate.com/mt/docs/mtmanual_textile2.html" target="_blank">[%loc('Textile2 complete reference')%]</a></p> <table> <tr> <td>_[%loc('your text')%]_</td> <td class="arrow">-></td> <td><em>[%loc('your text')%]</em></td> </tr> <tr> <td>*[%loc('your text')%]*</td> <td class="arrow">-></td> <td><strong>[%loc('your text')%]</strong></td> </tr> <tr> <td>%{color:red}[%loc('hello')%]%</td> <td class="arrow">-></td> <td><span style="color: red;">[%loc('hello')%]</span></td> </tr> <tr> <td>* [%loc('Bulleted list')%]<br />* [%loc('Second item')%]</td> <td class="arrow">-></td> <td>&#8226; [%loc('Bulleted list')%]<br />&#8226; [%loc('Second item')%]</td> </tr> <tr> <td># [%loc('Numbered list')%]<br /># [%loc('Second item')%]</td> <td class="arrow">-></td> <td>1. [%loc('Numbered list')%]<br />2. [%loc('Second item')%]</td> </tr> [% IF(INC.exists('MojoMojo/Formatter/Emote.pm')) -%] <tr> <td>:-)</td> <td class="arrow">-></td> <td><em><img src="[%base%]/.static/emote/regular_smile.gif" alt="smile emote" /><br/>[%loc('And others.')%]</em></td> </tr> [% END -%] <tr> <td>"[%loc('linkname')%]":[%loc('URL')%]</td> <td class="arrow">-></td> <td><a href="URL">[%loc('linkname')%]</a></td> </tr> [% IF(INC.exists('MojoMojo/Formatter/Amazon.pm')) -%] <tr> <td>{{http://amazon/url}}</td> <td class="arrow">-></td> <td><em>[%loc('Show this product')%]</em></td> </tr> [% END -%] <tr> <td>[%loc('|a|table|row|')%]<br />[%loc('|b|table|row|')%]</td> <td class="arrow">-></td> <td>[%loc('Table')%]</td> </tr> <tr> <td>!/img/url!</td> <td class="arrow">-></td> <td>[%loc('Image')%]</td> </tr> [% IF(INC.exists('MojoMojo/Formatter/RSS.pm')) -%] <tr> <td>{{feed://[%loc('your/url')%]}}</td> <td class="arrow">-></td> <td><em>[%loc('include this rss feed')%]</em></td> </tr> [% END -%] </table>
{ "pile_set_name": "Github" }
select 'NativeBlockInputStream'; select toTypeName(dict), dict, lowCardinalityIndices(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', 'bb', '', 'a', 'ccc', 'a', 'bb', '', 'dddd']) as v)); select '-'; select toTypeName(dict), dict, lowCardinalityIndices(dict), lowCardinalityKeys(dict) from (select '123_' || toLowCardinality(v) as dict from (select arrayJoin(['a', Null, 'bb', '', 'a', Null, 'ccc', 'a', 'bb', '', 'dddd']) as v)); select 'MergeTree'; drop table if exists lc_small_dict; drop table if exists lc_big_dict; create table lc_small_dict (str StringWithDictionary) engine = MergeTree order by str; create table lc_big_dict (str StringWithDictionary) engine = MergeTree order by str; insert into lc_small_dict select toString(number % 1000) from system.numbers limit 1000000; insert into lc_big_dict select toString(number) from system.numbers limit 1000000; detach table lc_small_dict; detach table lc_big_dict; attach table lc_small_dict; attach table lc_big_dict; select sum(toUInt64OrZero(str)) from lc_small_dict; select sum(toUInt64OrZero(str)) from lc_big_dict; drop table if exists lc_small_dict; drop table if exists lc_big_dict;
{ "pile_set_name": "Github" }
/* * Test program for MSA instruction PCNT.H * * Copyright (C) 2019 Wave Computing, Inc. * Copyright (C) 2019 Aleksandar Markovic <[email protected]> * * 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, see <https://www.gnu.org/licenses/>. * */ #include <sys/time.h> #include <stdint.h> #include "../../../../include/wrappers_msa.h" #include "../../../../include/test_inputs_128.h" #include "../../../../include/test_utils_128.h" #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT) int32_t main(void) { char *isa_ase_name = "MSA"; char *group_name = "Bit Count"; char *instruction_name = "PCNT.H"; int32_t ret; uint32_t i; struct timeval start, end; double elapsed_time; uint64_t b128_result[TEST_COUNT_TOTAL][2]; uint64_t b128_expect[TEST_COUNT_TOTAL][2] = { { 0x0010001000100010ULL, 0x0010001000100010ULL, }, /* 0 */ { 0x0000000000000000ULL, 0x0000000000000000ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x0009000800070009ULL, 0x0008000700090008ULL, }, { 0x0007000800090007ULL, 0x0008000900070008ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, /* 8 */ { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x000a000700080009ULL, 0x0006000a00070008ULL, }, { 0x0006000900080007ULL, 0x000a000600090008ULL, }, { 0x000a00080006000aULL, 0x00080006000a0008ULL, }, { 0x00060008000a0006ULL, 0x0008000a00060008ULL, }, { 0x0009000900090008ULL, 0x0007000700070009ULL, }, { 0x0007000700070008ULL, 0x0009000900090007ULL, }, { 0x0008000800080008ULL, 0x0008000800080008ULL, }, /* 16 */ { 0x0008000800080008ULL, 0x0008000800080008ULL, }, { 0x0009000900090009ULL, 0x0008000700070007ULL, }, { 0x0007000700070007ULL, 0x0008000900090009ULL, }, { 0x000a000a00080006ULL, 0x0006000a000a0008ULL, }, { 0x000600060008000aULL, 0x000a000600060008ULL, }, { 0x000b000a00050007ULL, 0x000b000800050009ULL, }, { 0x00050006000b0009ULL, 0x00050008000b0007ULL, }, { 0x000c00080004000cULL, 0x00080004000c0008ULL, }, /* 24 */ { 0x00040008000c0004ULL, 0x0008000c00040008ULL, }, { 0x000d00060007000cULL, 0x0003000b00080005ULL, }, { 0x0003000a00090004ULL, 0x000d00050008000bULL, }, { 0x000e0004000a0008ULL, 0x0006000c0002000eULL, }, { 0x0002000c00060008ULL, 0x000a0004000e0002ULL, }, { 0x000f0002000d0004ULL, 0x000b000600090008ULL, }, { 0x0001000e0003000cULL, 0x0005000a00070008ULL, }, { 0x0010000000100000ULL, 0x0010000000100000ULL, }, /* 32 */ { 0x0000001000000010ULL, 0x0000001000000010ULL, }, { 0x00100001000e0003ULL, 0x000c0005000a0007ULL, }, { 0x0000000f0002000dULL, 0x0004000b00060009ULL, }, { 0x00100002000c0006ULL, 0x0008000a0004000eULL, }, { 0x0000000e0004000aULL, 0x00080006000c0002ULL, }, { 0x00100003000a0009ULL, 0x0004000f0000000eULL, }, { 0x0000000d00060007ULL, 0x000c000100100002ULL, }, { 0x001000040008000cULL, 0x0000001000040008ULL, }, /* 40 */ { 0x0000000c00080004ULL, 0x00100000000c0008ULL, }, { 0x001000050006000fULL, 0x0000000c00090002ULL, }, { 0x0000000b000a0001ULL, 0x001000040007000eULL, }, { 0x0010000600040010ULL, 0x00020008000e0000ULL, }, { 0x0000000a000c0000ULL, 0x000e000800020010ULL, }, { 0x0010000700020010ULL, 0x0005000400100003ULL, }, { 0x00000009000e0000ULL, 0x000b000c0000000dULL, }, { 0x0010000800000010ULL, 0x0008000000100008ULL, }, /* 48 */ { 0x0000000800100000ULL, 0x0008001000000008ULL, }, { 0x001000090000000eULL, 0x000b0000000c000dULL, }, { 0x0000000700100002ULL, 0x0005001000040003ULL, }, { 0x0010000a0000000cULL, 0x000e000000080010ULL, }, { 0x0000000600100004ULL, 0x0002001000080000ULL, }, { 0x0010000b0000000aULL, 0x0010000100040010ULL, }, { 0x0000000500100006ULL, 0x0000000f000c0000ULL, }, { 0x0010000c00000008ULL, 0x0010000400000010ULL, }, /* 56 */ { 0x0000000400100008ULL, 0x0000000c00100000ULL, }, { 0x0010000d00000006ULL, 0x001000070000000cULL, }, { 0x000000030010000aULL, 0x0000000900100004ULL, }, { 0x0010000e00000004ULL, 0x0010000a00000008ULL, }, { 0x000000020010000cULL, 0x0000000600100008ULL, }, { 0x0010000f00000002ULL, 0x0010000d00000004ULL, }, { 0x000000010010000eULL, 0x000000030010000cULL, }, { 0x0006000900050005ULL, 0x00090008000d0005ULL, }, /* 64 */ { 0x000d000400080006ULL, 0x0009000900090009ULL, }, { 0x00080009000b0005ULL, 0x0008000c00090005ULL, }, { 0x0008000700080008ULL, 0x0009000600060006ULL, }, { 0x0008000a000c0005ULL, 0x0005000a000a0009ULL, }, { 0x00070009000a000aULL, 0x00070004000b0006ULL, }, { 0x0009000500080008ULL, 0x00060003000b0008ULL, }, { 0x000b000700080008ULL, 0x000b00090004000aULL, }, { 0x0005000700090008ULL, 0x000c000700080007ULL, }, /* 72 */ { 0x000900080009000bULL, 0x0006000800070009ULL, }, { 0x0007000c00090008ULL, 0x0007000700080007ULL, }, { 0x0007000a00060008ULL, 0x00080009000a0009ULL, }, { 0x0007000800070007ULL, 0x0006000800090007ULL, }, { 0x0006000b00060006ULL, 0x0009000800070009ULL, }, { 0x000500060008000bULL, 0x000a000a00080006ULL, }, { 0x000800080009000bULL, 0x0008000a00070009ULL, }, }; reset_msa_registers(); gettimeofday(&start, NULL); for (i = 0; i < TEST_COUNT_TOTAL; i++) { if (i < PATTERN_INPUTS_COUNT) { do_msa_PCNT_H(b128_pattern[i], b128_result[i]); } else { do_msa_PCNT_H(b128_random[i - PATTERN_INPUTS_COUNT], b128_result[i]); } } gettimeofday(&end, NULL); elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0; elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0; ret = check_results_128(isa_ase_name, group_name, instruction_name, TEST_COUNT_TOTAL, elapsed_time, &b128_result[0][0], &b128_expect[0][0]); return ret; }
{ "pile_set_name": "Github" }
<?php /* You may not change or alter any portion of this comment or credits of supporting developers from this source code or any supporting source code which is considered copyrighted (c) material of the original comment or credit authors. 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. */ namespace Xoops\Form; /** * ElementTray - a group of form elements * * @category Xoops\Form\ElementTray * @package Xoops\Form * @author Kazumi Ono <[email protected]> * @copyright 2001-2016 XOOPS Project (http://xoops.org) * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @link http://xoops.org */ class ElementTray extends Element implements ContainerInterface { /** * array of form element objects * * @var Element[] */ protected $elements = array(); /** * __construct * * @param string|array $caption caption or array of all attributes * Control attributes: * :joiner joiner for elements in tray * @param string $joiner joiner for elements in tray * @param string $name name */ public function __construct($caption, $joiner = '&nbsp;', $name = '') { if (is_array($caption)) { parent::__construct($caption); $this->setIfNotSet(':joiner', '&nbsp;'); } else { parent::__construct(); $this->setName($name); $this->setCaption($caption); $this->set(':joiner', $joiner); } } /** * Are there are required elements? * * @return bool */ public function isRequired() { foreach ($this->elements as $el) { if ($el->isRequired()) { return true; } } return false; } /** * Add an element to the tray * * @param Element $formElement Element to add * @param boolean $required true = entry required * * @return void */ public function addElement(Element $formElement, $required = false) { $this->elements[] = $formElement; if ($required) { $formElement->setRequired(); } } // ContainerInterface /** * get an array of "required" form elements * * @return array array of Element objects */ public function getRequired() { $required = []; foreach ($this->elements as $el) { if ($el->isRequired()) { $required[] = $el; } } return $required; } /** * Get an array of the elements in this group * * @param bool $recurse get elements recursively? * * @return array Array of Element objects. */ public function getElements($recurse = false) { if (!$recurse) { return $this->elements; } else { $ret = array(); foreach ($this->elements as $ele) { if ($ele instanceof ContainerInterface) { /* @var ContainerInterface $ele */ $elements = $ele->getElements(true); foreach ($elements as $ele2) { $ret[] = $ele2; } unset($elements); unset($ele2); } else { $ret[] = $ele; } unset($ele); } return $ret; } } /** * Get the delimiter of this group * * @param boolean $encode True to encode special characters * * @return string The delimiter */ protected function getJoiner($encode = false) { $joiner = $this->get(':joiner'); return $encode ? htmlspecialchars(str_replace('&nbsp;', ' ', $joiner)) : $joiner; } /** * defaultRender * * @return string rendered form element */ public function defaultRender() { $count = 0; $ret = "<div class=\"form-inline\">"; foreach ($this->getElements() as $ele) { /* @var Element $ele */ if ($count > 0) { $ret .= $this->getJoiner(); } if ($ele->getCaption() != '') { $ret .= '<div class="form-group">'; $ret .= '<label class="control-label">' . $ele->getCaption() . "</label>&nbsp;"; $ret .= '</div>'; } $ret .= $ele->render() . "\n"; if (!$ele->isHidden()) { ++$count; } } $ret .= '</div>'; return $ret; } }
{ "pile_set_name": "Github" }
#define NO_IDENT // disables Ident server #define NO_SECSYSTEM // disables System Secure Monitor on startup function #define NO_CRYPT // disables Crypted Strings (disabled when using DUMP_ENCRYPT) #define DEBUG_CRYPT // enables bot string dump in order to try to debug the Crypt() function #ifdef DUMP_ENCRYPT #define NO_CRYPT #endif #define IRCLINE 512 #define MAXTHREADS 600 #define MAXALIASES 16 #define LOGSIZE 192 #define LOGLINE 192 #define MAXLOGINS 2 #define MAX_LINES 600 #define MAXSCANTHRD 600 #define MAXSCANTIME 999 #define MAXHOSTNAME 255 #define BLOCKSIZE 512 #define FLOOD_DELAY 2000 #define MAXSTRLEN 500 #define MAXNICKLEN 28 #define MAXPINGSIZE 65500 #define MAXTOKENS 32 #define AMPM(x) ((x>12)?("PM"):("AM")) #define HOUR(x) ((x>12)?(x-12):(x)) #define fFD_ISSET(fd, set) __fWSAFDIsSet((SOCKET)(fd), (fd_set FAR *)(set)) #define addpredefinedaliases()
{ "pile_set_name": "Github" }
main( ) { auto c; while (1) { while ( (c=getchar()) != ' ') if (putchar(c) == '*n') exit(); putchar( '*n' ); while ( (c=getchar()) == ' '); /* skip blanks */ if (putchar(c)=='*n') exit(); /* done when newline */ } }
{ "pile_set_name": "Github" }
config BR2_PACKAGE_DTV_SCAN_TABLES bool "dtv-scan-tables" help The Digital TV scan tables. http://git.linuxtv.org/dtv-scan-tables.git
{ "pile_set_name": "Github" }
#!/bin/sh #-*-sh-*- # # Copyright © 2009 CNRS # Copyright © 2009-2013 Inria. All rights reserved. # Copyright © 2009 Université Bordeaux 1 # See COPYING in top-level directory. # HWLOC_top_builddir="@HWLOC_top_builddir@" distrib="$HWLOC_top_builddir/utils/hwloc-distrib" HWLOC_top_srcdir="@HWLOC_top_srcdir@" HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src export HWLOC_PLUGINS_PATH : ${TMPDIR=/tmp} { tmp=` (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null ` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/foo$$-$RANDOM (umask 077 && mkdir "$tmp") } || exit $? file="$tmp/test-hwloc-distrib.output" set -e ( $distrib --if synthetic --input "2 2 2" 2 echo $distrib --if synthetic --input "2 2 2" 4 echo $distrib --if synthetic --input "2 2 2" 8 echo $distrib --if synthetic --input "2 2 2" 13 echo $distrib --if synthetic --input "2 2 2" 16 echo $distrib --if synthetic --input "3 3 3" 4 ) > "$file" diff @HWLOC_DIFF_U@ $HWLOC_top_srcdir/utils/test-hwloc-distrib.output "$file" rm -rf "$tmp"
{ "pile_set_name": "Github" }
/* define if glog doesn't use RTTI */ /* #undef DISABLE_RTTI */ /* Namespace for Google classes */ #define GOOGLE_NAMESPACE google /* Define if you have the `dladdr' function */ /* #undef HAVE_DLADDR */ /* Define if you have the `snprintf' function */ #define HAVE_SNPRINTF /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H /* Define to 1 if you have the <execinfo.h> header file. */ #define HAVE_EXECINFO_H /* Define if you have the `fcntl' function */ #define HAVE_FCNTL /* Define to 1 if you have the <glob.h> header file. */ #define HAVE_GLOB_H /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `pthread' library (-lpthread). */ /* #undef HAVE_LIBPTHREAD */ /* Define to 1 if you have the <libunwind.h> header file. */ #define HAVE_LIBUNWIND_H /* define if you have google gflags library */ #define HAVE_LIB_GFLAGS /* define if you have google gmock library */ /* #undef HAVE_LIB_GMOCK */ /* define if you have google gtest library */ /* #undef HAVE_LIB_GTEST */ /* define if you have libunwind */ /* #undef HAVE_LIB_UNWIND */ /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H /* define to disable multithreading support. */ /* #undef NO_THREADS */ /* define if the compiler implements namespaces */ #define HAVE_NAMESPACES /* Define if you have the 'pread' function */ #define HAVE_PREAD /* Define if you have POSIX threads libraries and header files. */ #define HAVE_PTHREAD /* Define to 1 if you have the <pwd.h> header file. */ #define HAVE_PWD_H /* Define if you have the 'pwrite' function */ #define HAVE_PWRITE /* define if the compiler implements pthread_rwlock_* */ /* #undef HAVE_RWLOCK */ /* Define if you have the 'sigaction' function */ #define HAVE_SIGACTION /* Define if you have the `sigaltstack' function */ /* #undef HAVE_SIGALTSTACK */ /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H /* Define to 1 if you have the <syscall.h> header file. */ /* #undef HAVE_SYSCALL_H */ /* Define to 1 if you have the <syslog.h> header file. */ #define HAVE_SYSLOG_H /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/syscall.h> header file. */ #define HAVE_SYS_SYSCALL_H /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/ucontext.h> header file. */ #define HAVE_SYS_UCONTEXT_H 1 /* Define to 1 if you have the <sys/utsname.h> header file. */ #define HAVE_SYS_UTSNAME_H /* Define to 1 if you have the <ucontext.h> header file. */ /* #undef HAVE_UCONTEXT_H */ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the <unwind.h> header file. */ #define HAVE_UNWIND_H 1 /* define if the compiler supports using expression for operator */ #define HAVE_USING_OPERATOR /* define if your compiler has __attribute__ */ #define HAVE___ATTRIBUTE__ /* define if your compiler has __builtin_expect */ #define HAVE___BUILTIN_EXPECT 1 /* define if your compiler has __sync_val_compare_and_swap */ #define HAVE___SYNC_VAL_COMPARE_AND_SWAP /* Define to the sub-directory in which libtool stores uninstalled libraries. */ /* #undef LT_OBJDIR */ /* Name of package */ /* #undef PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the home page for this package. */ /* #undef PACKAGE_URL */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* How to access the PC from a struct ucontext */ /* #undef PC_FROM_UCONTEXT */ /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 /* Define to 1 if you have the ANSI C header files. */ /* #undef STDC_HEADERS */ /* the namespace where STL code like vector<> is defined */ #define STL_NAMESPACE std /* location of source code */ #define TEST_SRC_DIR "." /* Version number of package */ /* #undef VERSION */ /* Stops putting the code inside the Google namespace */ #define _END_GOOGLE_NAMESPACE_ } /* Puts following code inside the Google namespace */ #define _START_GOOGLE_NAMESPACE_ namespace google { #define GOOGLE_GLOG_DLL_DECL
{ "pile_set_name": "Github" }
# deep-eql [![Build Status](https://travis-ci.org/chaijs/deep-eql.png?branch=master)](https://travis-ci.org/chaijs/deep-eql) [![Coverage Status](https://coveralls.io/repos/chaijs/deep-eql/badge.png?branch=master)](https://coveralls.io/r/chaijs/deep-eql?branch=master) > Improved deep equality testing for Node.js and the browser. ## Installation ### Node.js `deep-eql` is available on [npm](http://npmjs.org). $ npm install deep-eql ### Component `deep-eql` is available as a [component](https://github.com/component/component). $ component install chaijs/deep-eql ## Usage ### Rules - Strict equality for non-traversable nodes according to [egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - `eql(NaN, NaN).should.be.true;` - `eql(-0, +0).should.be.false;` - Arguments are not Arrays: - `eql([], arguments).should.be.false;` - `eql([], Array.prototype.slice.call(arguments)).should.be.true;` ## License (The MIT License) Copyright (c) 2013 Jake Luer <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "pile_set_name": "Github" }
import { h, Component, Prop, Watch, Host, State, Event, EventEmitter, } from '@stencil/core'; import { PlayerProps } from '../../core/player/PlayerProps'; import { withPlayerContext } from '../../core/player/PlayerContext'; import { Disposal } from '../../core/player/Disposal'; import { isUndefined } from '../../../utils/unit'; import { listen } from '../../../utils/dom'; @Component({ tag: 'vime-captions', styleUrl: 'captions.scss', }) export class Captions { private textTracksDisposal = new Disposal(); private textTrackDisposal = new Disposal(); private state = new Map<TextTrack, TextTrackMode>(); @State() isEnabled = false; @State() activeTrack?: TextTrack; @Watch('activeTrack') onActiveTrackChange() { this.vTrackChange.emit(this.activeTrack); } @State() activeCues: TextTrackCue[] = []; @Watch('activeCues') onActiveCuesChange() { this.vCuesChange.emit(this.activeCues); } /** * Whether the captions should be visible or not. */ @Prop() hidden = false; /** * The height of any lower control bar in pixels so that the captions can reposition when it's * active. */ @Prop() controlsHeight = 0; /** * @internal */ @Prop() isControlsActive: PlayerProps['isControlsActive'] = false; /** * @internal */ @Prop() isVideoView: PlayerProps['isVideoView'] = false; /** * @internal */ @Prop() playbackStarted: PlayerProps['playbackStarted'] = false; /** * @internal */ @Prop() textTracks?: PlayerProps['textTracks']; /** * Emitted when the current track changes. */ @Event({ bubbles: false }) vTrackChange!: EventEmitter<TextTrack | undefined>; /** * Emitted when the active cues change. A cue is active when * `currentTime >= cue.startTime && currentTime <= cue.endTime`. */ @Event({ bubbles: false }) vCuesChange!: EventEmitter<TextTrackCue[]>; disconnectedCallback() { this.cleanup(); } private cleanup() { this.state.clear(); this.textTracksDisposal.empty(); this.textTrackDisposal.empty(); } private onCueChange() { this.activeCues = Array.from(this.activeTrack?.activeCues ?? []); } private onTrackChange() { this.activeCues = []; this.textTrackDisposal.empty(); if (isUndefined(this.activeTrack)) return; this.textTrackDisposal.add(listen(this.activeTrack!, 'cuechange', this.onCueChange.bind(this))); } private findActiveTrack() { let activeTrack: TextTrack; Array.from(this.textTracks!).forEach((track) => { if (isUndefined(activeTrack) && (track.mode === 'showing')) { // eslint-disable-next-line no-param-reassign track.mode = 'hidden'; activeTrack = track; this.state.set(track, 'hidden'); } else { // eslint-disable-next-line no-param-reassign track.mode = 'disabled'; this.state.set(track, 'disabled'); } }); return activeTrack!; } private onTracksChange() { let hasChanged = false; Array.from(this.textTracks!).forEach((track) => { if (!hasChanged) { hasChanged = !this.state.has(track) || (track.mode !== this.state.get(track)); } this.state.set(track, track.mode); }); if (hasChanged) { const activeTrack = this.findActiveTrack(); if (this.activeTrack !== activeTrack) { this.activeTrack = activeTrack; this.onTrackChange(); } } } @Watch('textTracks') onTextTracksListChange() { this.cleanup(); if (isUndefined(this.textTracks)) return; this.onTracksChange(); this.textTracksDisposal.add(listen(this.textTracks!, 'change', this.onTracksChange.bind(this))); } @Watch('isVideoView') @Watch('playbackStarted') onEnabledChange() { this.isEnabled = this.playbackStarted && this.isVideoView; } private renderCurrentCue() { const currentCue = this.activeCues[0]; if (isUndefined(currentCue)) return ''; const div = document.createElement('div'); div.append((currentCue as VTTCue)!.getCueAsHTML()); return div.innerHTML.trim(); } render() { return ( <Host style={{ transform: `translateY(-${this.isControlsActive ? this.controlsHeight : 0}px)`, }} class={{ enabled: this.isEnabled, hidden: this.hidden, }} > <span>{this.renderCurrentCue()}</span> </Host> ); } } withPlayerContext(Captions, [ 'isVideoView', 'playbackStarted', 'isControlsActive', 'textTracks', ]);
{ "pile_set_name": "Github" }
<snippet> <content><![CDATA[cc.EventMouse]]></content> <tabTrigger>EventMouse</tabTrigger> <scope>source.lua</scope> <description>.</description> </snippet>
{ "pile_set_name": "Github" }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { "imgTitle": "{0} ({1}x{2})", "missingAudioSupport": "Désolé, la lecture des fichiers audio n'est pas prise en charge.", "missingVideoSupport": "Désolé, la lecture des fichiers vidéo n'est pas prise en charge.", "nativeBinaryError": "Impossible d'afficher le fichier dans l'éditeur : soit il est binaire, soit il est très volumineux, soit il utilise un encodage de texte non pris en charge." }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2010-2020 Contributors to the openHAB project * * See the NOTICE file(s) distributed with this work for additional * information. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 */ package org.openhab.binding.tplinksmarthome.internal.model; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; import org.openhab.core.library.types.PercentType; /** * Data class for reading the retrieved state of a Smart Home light bulb. * Mostly only getter methods as the values are set by gson based on the retrieved json. * * @author Hilbrand Bouwkamp - Initial contribution */ public class LightState extends ErrorResponse { private int brightness; private int colorTemp; private int hue; private int ignoreDefault; private String mode; private int onOff; private int saturation; public PercentType getBrightness() { return onOff > 0 ? new PercentType(brightness) : PercentType.ZERO; } public int getColorTemp() { return colorTemp; } public DecimalType getHue() { return new DecimalType(hue); } public int getIgnoreDefault() { return ignoreDefault; } public String getMode() { return mode; } public OnOffType getOnOff() { return onOff == 1 ? OnOffType.ON : OnOffType.OFF; } public PercentType getSaturation() { return new PercentType(saturation); } public void setOnOff(OnOffType onOff) { this.onOff = onOff == OnOffType.ON ? 1 : 0; } @Override public String toString() { return "brightness:" + brightness + ", color_temp:" + colorTemp + ", hue:" + hue + ", ignore_default:" + ignoreDefault + ", mode:" + mode + ", on_off:" + onOff + ", saturation:" + saturation + super.toString(); } }
{ "pile_set_name": "Github" }
@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS= set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windowz variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* goto execute :4NT_args @rem Get arguments from the 4NT Shell from JP Software set CMD_LINE_ARGS=%$ :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega
{ "pile_set_name": "Github" }
// Copyright 2019 JD.com Inc. JD AI #ifndef BNN_PAD_H #define BNN_PAD_H #include <dabnn/layer.h> namespace bnn { class Pad : public Layer { public: MatCP input_mat; MatCP output_mat; int pad_h; int pad_w; float val; Pad(NetCP net, const std::string &name, css &input, int pad_h, int pad_w, float val, css &output) : Layer(net, name, "Pad"), input_mat(mat(input)), output_mat(mat(output)), pad_h(pad_h), pad_w(pad_w), val(val) {} virtual void forward_impl() const; }; } // namespace bnn #endif /* BNN_PAD_H */
{ "pile_set_name": "Github" }
/* * SBP2 driver (SCSI over IEEE1394) * * Copyright (C) 2005-2007 Kristian Hoegsberg <[email protected]> * * 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. */ /* * The basic structure of this driver is based on the old storage driver, * drivers/ieee1394/sbp2.c, originally written by * James Goodwin <[email protected]> * with later contributions and ongoing maintenance from * Ben Collins <[email protected]>, * Stefan Richter <[email protected]> * and many others. */ #include <linux/blkdev.h> #include <linux/bug.h> #include <linux/completion.h> #include <linux/delay.h> #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/firewire.h> #include <linux/firewire-constants.h> #include <linux/init.h> #include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/scatterlist.h> #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/string.h> #include <linux/stringify.h> #include <linux/workqueue.h> #include <asm/byteorder.h> #include <asm/system.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_device.h> #include <scsi/scsi_host.h> /* * So far only bridges from Oxford Semiconductor are known to support * concurrent logins. Depending on firmware, four or two concurrent logins * are possible on OXFW911 and newer Oxsemi bridges. * * Concurrent logins are useful together with cluster filesystems. */ static int sbp2_param_exclusive_login = 1; module_param_named(exclusive_login, sbp2_param_exclusive_login, bool, 0644); MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " "(default = Y, use N for concurrent initiators)"); /* * Flags for firmware oddities * * - 128kB max transfer * Limit transfer size. Necessary for some old bridges. * * - 36 byte inquiry * When scsi_mod probes the device, let the inquiry command look like that * from MS Windows. * * - skip mode page 8 * Suppress sending of mode_sense for mode page 8 if the device pretends to * support the SCSI Primary Block commands instead of Reduced Block Commands. * * - fix capacity * Tell sd_mod to correct the last sector number reported by read_capacity. * Avoids access beyond actual disk limits on devices with an off-by-one bug. * Don't use this with devices which don't have this bug. * * - delay inquiry * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. * * - power condition * Set the power condition field in the START STOP UNIT commands sent by * sd_mod on suspend, resume, and shutdown (if manage_start_stop is on). * Some disks need this to spin down or to resume properly. * * - override internal blacklist * Instead of adding to the built-in blacklist, use only the workarounds * specified in the module load parameter. * Useful if a blacklist entry interfered with a non-broken device. */ #define SBP2_WORKAROUND_128K_MAX_TRANS 0x1 #define SBP2_WORKAROUND_INQUIRY_36 0x2 #define SBP2_WORKAROUND_MODE_SENSE_8 0x4 #define SBP2_WORKAROUND_FIX_CAPACITY 0x8 #define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 #define SBP2_INQUIRY_DELAY 12 #define SBP2_WORKAROUND_POWER_CONDITION 0x20 #define SBP2_WORKAROUND_OVERRIDE 0x100 static int sbp2_param_workarounds; module_param_named(workarounds, sbp2_param_workarounds, int, 0644); MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" ", 128kB max transfer = " __stringify(SBP2_WORKAROUND_128K_MAX_TRANS) ", 36 byte inquiry = " __stringify(SBP2_WORKAROUND_INQUIRY_36) ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) ", set power condition in start stop unit = " __stringify(SBP2_WORKAROUND_POWER_CONDITION) ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) ", or a combination)"); /* I don't know why the SCSI stack doesn't define something like this... */ typedef void (*scsi_done_fn_t)(struct scsi_cmnd *); static const char sbp2_driver_name[] = "sbp2"; /* * We create one struct sbp2_logical_unit per SBP-2 Logical Unit Number Entry * and one struct scsi_device per sbp2_logical_unit. */ struct sbp2_logical_unit { struct sbp2_target *tgt; struct list_head link; struct fw_address_handler address_handler; struct list_head orb_list; u64 command_block_agent_address; u16 lun; int login_id; /* * The generation is updated once we've logged in or reconnected * to the logical unit. Thus, I/O to the device will automatically * fail and get retried if it happens in a window where the device * is not ready, e.g. after a bus reset but before we reconnect. */ int generation; int retries; struct delayed_work work; bool has_sdev; bool blocked; }; /* * We create one struct sbp2_target per IEEE 1212 Unit Directory * and one struct Scsi_Host per sbp2_target. */ struct sbp2_target { struct kref kref; struct fw_unit *unit; const char *bus_id; struct list_head lu_list; u64 management_agent_address; u64 guid; int directory_id; int node_id; int address_high; unsigned int workarounds; unsigned int mgt_orb_timeout; unsigned int max_payload; int dont_block; /* counter for each logical unit */ int blocked; /* ditto */ }; static struct fw_device *target_device(struct sbp2_target *tgt) { return fw_parent_device(tgt->unit); } /* Impossible login_id, to detect logout attempt before successful login */ #define INVALID_LOGIN_ID 0x10000 #define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */ #define SBP2_ORB_NULL 0x80000000 #define SBP2_RETRY_LIMIT 0xf /* 15 retries */ #define SBP2_CYCLE_LIMIT (0xc8 << 12) /* 200 125us cycles */ /* * There is no transport protocol limit to the CDB length, but we implement * a fixed length only. 16 bytes is enough for disks larger than 2 TB. */ #define SBP2_MAX_CDB_SIZE 16 /* * The default maximum s/g segment size of a FireWire controller is * usually 0x10000, but SBP-2 only allows 0xffff. Since buffers have to * be quadlet-aligned, we set the length limit to 0xffff & ~3. */ #define SBP2_MAX_SEG_SIZE 0xfffc /* Unit directory keys */ #define SBP2_CSR_UNIT_CHARACTERISTICS 0x3a #define SBP2_CSR_FIRMWARE_REVISION 0x3c #define SBP2_CSR_LOGICAL_UNIT_NUMBER 0x14 #define SBP2_CSR_LOGICAL_UNIT_DIRECTORY 0xd4 /* Management orb opcodes */ #define SBP2_LOGIN_REQUEST 0x0 #define SBP2_QUERY_LOGINS_REQUEST 0x1 #define SBP2_RECONNECT_REQUEST 0x3 #define SBP2_SET_PASSWORD_REQUEST 0x4 #define SBP2_LOGOUT_REQUEST 0x7 #define SBP2_ABORT_TASK_REQUEST 0xb #define SBP2_ABORT_TASK_SET 0xc #define SBP2_LOGICAL_UNIT_RESET 0xe #define SBP2_TARGET_RESET_REQUEST 0xf /* Offsets for command block agent registers */ #define SBP2_AGENT_STATE 0x00 #define SBP2_AGENT_RESET 0x04 #define SBP2_ORB_POINTER 0x08 #define SBP2_DOORBELL 0x10 #define SBP2_UNSOLICITED_STATUS_ENABLE 0x14 /* Status write response codes */ #define SBP2_STATUS_REQUEST_COMPLETE 0x0 #define SBP2_STATUS_TRANSPORT_FAILURE 0x1 #define SBP2_STATUS_ILLEGAL_REQUEST 0x2 #define SBP2_STATUS_VENDOR_DEPENDENT 0x3 #define STATUS_GET_ORB_HIGH(v) ((v).status & 0xffff) #define STATUS_GET_SBP_STATUS(v) (((v).status >> 16) & 0xff) #define STATUS_GET_LEN(v) (((v).status >> 24) & 0x07) #define STATUS_GET_DEAD(v) (((v).status >> 27) & 0x01) #define STATUS_GET_RESPONSE(v) (((v).status >> 28) & 0x03) #define STATUS_GET_SOURCE(v) (((v).status >> 30) & 0x03) #define STATUS_GET_ORB_LOW(v) ((v).orb_low) #define STATUS_GET_DATA(v) ((v).data) struct sbp2_status { u32 status; u32 orb_low; u8 data[24]; }; struct sbp2_pointer { __be32 high; __be32 low; }; struct sbp2_orb { struct fw_transaction t; struct kref kref; dma_addr_t request_bus; int rcode; struct sbp2_pointer pointer; void (*callback)(struct sbp2_orb * orb, struct sbp2_status * status); struct list_head link; }; #define MANAGEMENT_ORB_LUN(v) ((v)) #define MANAGEMENT_ORB_FUNCTION(v) ((v) << 16) #define MANAGEMENT_ORB_RECONNECT(v) ((v) << 20) #define MANAGEMENT_ORB_EXCLUSIVE(v) ((v) ? 1 << 28 : 0) #define MANAGEMENT_ORB_REQUEST_FORMAT(v) ((v) << 29) #define MANAGEMENT_ORB_NOTIFY ((1) << 31) #define MANAGEMENT_ORB_RESPONSE_LENGTH(v) ((v)) #define MANAGEMENT_ORB_PASSWORD_LENGTH(v) ((v) << 16) struct sbp2_management_orb { struct sbp2_orb base; struct { struct sbp2_pointer password; struct sbp2_pointer response; __be32 misc; __be32 length; struct sbp2_pointer status_fifo; } request; __be32 response[4]; dma_addr_t response_bus; struct completion done; struct sbp2_status status; }; struct sbp2_login_response { __be32 misc; struct sbp2_pointer command_block_agent; __be32 reconnect_hold; }; #define COMMAND_ORB_DATA_SIZE(v) ((v)) #define COMMAND_ORB_PAGE_SIZE(v) ((v) << 16) #define COMMAND_ORB_PAGE_TABLE_PRESENT ((1) << 19) #define COMMAND_ORB_MAX_PAYLOAD(v) ((v) << 20) #define COMMAND_ORB_SPEED(v) ((v) << 24) #define COMMAND_ORB_DIRECTION ((1) << 27) #define COMMAND_ORB_REQUEST_FORMAT(v) ((v) << 29) #define COMMAND_ORB_NOTIFY ((1) << 31) struct sbp2_command_orb { struct sbp2_orb base; struct { struct sbp2_pointer next; struct sbp2_pointer data_descriptor; __be32 misc; u8 command_block[SBP2_MAX_CDB_SIZE]; } request; struct scsi_cmnd *cmd; scsi_done_fn_t done; struct sbp2_logical_unit *lu; struct sbp2_pointer page_table[SG_ALL] __attribute__((aligned(8))); dma_addr_t page_table_bus; }; #define SBP2_ROM_VALUE_WILDCARD ~0 /* match all */ #define SBP2_ROM_VALUE_MISSING 0xff000000 /* not present in the unit dir. */ /* * List of devices with known bugs. * * The firmware_revision field, masked with 0xffff00, is the best * indicator for the type of bridge chip of a device. It yields a few * false positives but this did not break correctly behaving devices * so far. */ static const struct { u32 firmware_revision; u32 model; unsigned int workarounds; } sbp2_workarounds_table[] = { /* DViCO Momobay CX-1 with TSB42AA9 bridge */ { .firmware_revision = 0x002800, .model = 0x001010, .workarounds = SBP2_WORKAROUND_INQUIRY_36 | SBP2_WORKAROUND_MODE_SENSE_8 | SBP2_WORKAROUND_POWER_CONDITION, }, /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { .firmware_revision = 0x002800, .model = 0x000000, .workarounds = SBP2_WORKAROUND_POWER_CONDITION, }, /* Initio bridges, actually only needed for some older ones */ { .firmware_revision = 0x000200, .model = SBP2_ROM_VALUE_WILDCARD, .workarounds = SBP2_WORKAROUND_INQUIRY_36, }, /* PL-3507 bridge with Prolific firmware */ { .firmware_revision = 0x012800, .model = SBP2_ROM_VALUE_WILDCARD, .workarounds = SBP2_WORKAROUND_POWER_CONDITION, }, /* Symbios bridge */ { .firmware_revision = 0xa0b800, .model = SBP2_ROM_VALUE_WILDCARD, .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, }, /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ { .firmware_revision = 0x002600, .model = SBP2_ROM_VALUE_WILDCARD, .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, }, { .firmware_revision = 0x0a2700, .model = 0x000000, .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS | SBP2_WORKAROUND_FIX_CAPACITY, }, /* iPod 4th generation */ { .firmware_revision = 0x0a2700, .model = 0x000021, .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, }, /* iPod mini */ { .firmware_revision = 0x0a2700, .model = 0x000022, .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, }, /* iPod mini */ { .firmware_revision = 0x0a2700, .model = 0x000023, .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, }, /* iPod Photo */ { .firmware_revision = 0x0a2700, .model = 0x00007e, .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, } }; static void free_orb(struct kref *kref) { struct sbp2_orb *orb = container_of(kref, struct sbp2_orb, kref); kfree(orb); } static void sbp2_status_write(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *payload, size_t length, void *callback_data) { struct sbp2_logical_unit *lu = callback_data; struct sbp2_orb *orb; struct sbp2_status status; unsigned long flags; if (tcode != TCODE_WRITE_BLOCK_REQUEST || length < 8 || length > sizeof(status)) { fw_send_response(card, request, RCODE_TYPE_ERROR); return; } status.status = be32_to_cpup(payload); status.orb_low = be32_to_cpup(payload + 4); memset(status.data, 0, sizeof(status.data)); if (length > 8) memcpy(status.data, payload + 8, length - 8); if (STATUS_GET_SOURCE(status) == 2 || STATUS_GET_SOURCE(status) == 3) { fw_notify("non-orb related status write, not handled\n"); fw_send_response(card, request, RCODE_COMPLETE); return; } /* Lookup the orb corresponding to this status write. */ spin_lock_irqsave(&card->lock, flags); list_for_each_entry(orb, &lu->orb_list, link) { if (STATUS_GET_ORB_HIGH(status) == 0 && STATUS_GET_ORB_LOW(status) == orb->request_bus) { orb->rcode = RCODE_COMPLETE; list_del(&orb->link); break; } } spin_unlock_irqrestore(&card->lock, flags); if (&orb->link != &lu->orb_list) { orb->callback(orb, &status); kref_put(&orb->kref, free_orb); /* orb callback reference */ } else { fw_error("status write for unknown orb\n"); } fw_send_response(card, request, RCODE_COMPLETE); } static void complete_transaction(struct fw_card *card, int rcode, void *payload, size_t length, void *data) { struct sbp2_orb *orb = data; unsigned long flags; /* * This is a little tricky. We can get the status write for * the orb before we get this callback. The status write * handler above will assume the orb pointer transaction was * successful and set the rcode to RCODE_COMPLETE for the orb. * So this callback only sets the rcode if it hasn't already * been set and only does the cleanup if the transaction * failed and we didn't already get a status write. * * Here we treat RCODE_CANCELLED like RCODE_COMPLETE because some * OXUF936QSE firmwares occasionally respond after Split_Timeout and * complete the ORB just fine. Note, we also get RCODE_CANCELLED * from sbp2_cancel_orbs() if fw_cancel_transaction() == 0. */ spin_lock_irqsave(&card->lock, flags); if (orb->rcode == -1) orb->rcode = rcode; if (orb->rcode != RCODE_COMPLETE && orb->rcode != RCODE_CANCELLED) { list_del(&orb->link); spin_unlock_irqrestore(&card->lock, flags); orb->callback(orb, NULL); kref_put(&orb->kref, free_orb); /* orb callback reference */ } else { spin_unlock_irqrestore(&card->lock, flags); } kref_put(&orb->kref, free_orb); /* transaction callback reference */ } static void sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu, int node_id, int generation, u64 offset) { struct fw_device *device = target_device(lu->tgt); unsigned long flags; orb->pointer.high = 0; orb->pointer.low = cpu_to_be32(orb->request_bus); spin_lock_irqsave(&device->card->lock, flags); list_add_tail(&orb->link, &lu->orb_list); spin_unlock_irqrestore(&device->card->lock, flags); kref_get(&orb->kref); /* transaction callback reference */ kref_get(&orb->kref); /* orb callback reference */ fw_send_request(device->card, &orb->t, TCODE_WRITE_BLOCK_REQUEST, node_id, generation, device->max_speed, offset, &orb->pointer, 8, complete_transaction, orb); } static int sbp2_cancel_orbs(struct sbp2_logical_unit *lu) { struct fw_device *device = target_device(lu->tgt); struct sbp2_orb *orb, *next; struct list_head list; unsigned long flags; int retval = -ENOENT; INIT_LIST_HEAD(&list); spin_lock_irqsave(&device->card->lock, flags); list_splice_init(&lu->orb_list, &list); spin_unlock_irqrestore(&device->card->lock, flags); list_for_each_entry_safe(orb, next, &list, link) { retval = 0; fw_cancel_transaction(device->card, &orb->t); orb->rcode = RCODE_CANCELLED; orb->callback(orb, NULL); kref_put(&orb->kref, free_orb); /* orb callback reference */ } return retval; } static void complete_management_orb(struct sbp2_orb *base_orb, struct sbp2_status *status) { struct sbp2_management_orb *orb = container_of(base_orb, struct sbp2_management_orb, base); if (status) memcpy(&orb->status, status, sizeof(*status)); complete(&orb->done); } static int sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id, int generation, int function, int lun_or_login_id, void *response) { struct fw_device *device = target_device(lu->tgt); struct sbp2_management_orb *orb; unsigned int timeout; int retval = -ENOMEM; if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device)) return 0; orb = kzalloc(sizeof(*orb), GFP_ATOMIC); if (orb == NULL) return -ENOMEM; kref_init(&orb->base.kref); orb->response_bus = dma_map_single(device->card->device, &orb->response, sizeof(orb->response), DMA_FROM_DEVICE); if (dma_mapping_error(device->card->device, orb->response_bus)) goto fail_mapping_response; orb->request.response.high = 0; orb->request.response.low = cpu_to_be32(orb->response_bus); orb->request.misc = cpu_to_be32( MANAGEMENT_ORB_NOTIFY | MANAGEMENT_ORB_FUNCTION(function) | MANAGEMENT_ORB_LUN(lun_or_login_id)); orb->request.length = cpu_to_be32( MANAGEMENT_ORB_RESPONSE_LENGTH(sizeof(orb->response))); orb->request.status_fifo.high = cpu_to_be32(lu->address_handler.offset >> 32); orb->request.status_fifo.low = cpu_to_be32(lu->address_handler.offset); if (function == SBP2_LOGIN_REQUEST) { /* Ask for 2^2 == 4 seconds reconnect grace period */ orb->request.misc |= cpu_to_be32( MANAGEMENT_ORB_RECONNECT(2) | MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login)); timeout = lu->tgt->mgt_orb_timeout; } else { timeout = SBP2_ORB_TIMEOUT; } init_completion(&orb->done); orb->base.callback = complete_management_orb; orb->base.request_bus = dma_map_single(device->card->device, &orb->request, sizeof(orb->request), DMA_TO_DEVICE); if (dma_mapping_error(device->card->device, orb->base.request_bus)) goto fail_mapping_request; sbp2_send_orb(&orb->base, lu, node_id, generation, lu->tgt->management_agent_address); wait_for_completion_timeout(&orb->done, msecs_to_jiffies(timeout)); retval = -EIO; if (sbp2_cancel_orbs(lu) == 0) { fw_error("%s: orb reply timed out, rcode=0x%02x\n", lu->tgt->bus_id, orb->base.rcode); goto out; } if (orb->base.rcode != RCODE_COMPLETE) { fw_error("%s: management write failed, rcode 0x%02x\n", lu->tgt->bus_id, orb->base.rcode); goto out; } if (STATUS_GET_RESPONSE(orb->status) != 0 || STATUS_GET_SBP_STATUS(orb->status) != 0) { fw_error("%s: error status: %d:%d\n", lu->tgt->bus_id, STATUS_GET_RESPONSE(orb->status), STATUS_GET_SBP_STATUS(orb->status)); goto out; } retval = 0; out: dma_unmap_single(device->card->device, orb->base.request_bus, sizeof(orb->request), DMA_TO_DEVICE); fail_mapping_request: dma_unmap_single(device->card->device, orb->response_bus, sizeof(orb->response), DMA_FROM_DEVICE); fail_mapping_response: if (response) memcpy(response, orb->response, sizeof(orb->response)); kref_put(&orb->base.kref, free_orb); return retval; } static void sbp2_agent_reset(struct sbp2_logical_unit *lu) { struct fw_device *device = target_device(lu->tgt); __be32 d = 0; fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST, lu->tgt->node_id, lu->generation, device->max_speed, lu->command_block_agent_address + SBP2_AGENT_RESET, &d, 4); } static void complete_agent_reset_write_no_wait(struct fw_card *card, int rcode, void *payload, size_t length, void *data) { kfree(data); } static void sbp2_agent_reset_no_wait(struct sbp2_logical_unit *lu) { struct fw_device *device = target_device(lu->tgt); struct fw_transaction *t; static __be32 d; t = kmalloc(sizeof(*t), GFP_ATOMIC); if (t == NULL) return; fw_send_request(device->card, t, TCODE_WRITE_QUADLET_REQUEST, lu->tgt->node_id, lu->generation, device->max_speed, lu->command_block_agent_address + SBP2_AGENT_RESET, &d, 4, complete_agent_reset_write_no_wait, t); } static inline void sbp2_allow_block(struct sbp2_logical_unit *lu) { /* * We may access dont_block without taking card->lock here: * All callers of sbp2_allow_block() and all callers of sbp2_unblock() * are currently serialized against each other. * And a wrong result in sbp2_conditionally_block()'s access of * dont_block is rather harmless, it simply misses its first chance. */ --lu->tgt->dont_block; } /* * Blocks lu->tgt if all of the following conditions are met: * - Login, INQUIRY, and high-level SCSI setup of all of the target's * logical units have been finished (indicated by dont_block == 0). * - lu->generation is stale. * * Note, scsi_block_requests() must be called while holding card->lock, * otherwise it might foil sbp2_[conditionally_]unblock()'s attempt to * unblock the target. */ static void sbp2_conditionally_block(struct sbp2_logical_unit *lu) { struct sbp2_target *tgt = lu->tgt; struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; spin_lock_irqsave(&card->lock, flags); if (!tgt->dont_block && !lu->blocked && lu->generation != card->generation) { lu->blocked = true; if (++tgt->blocked == 1) scsi_block_requests(shost); } spin_unlock_irqrestore(&card->lock, flags); } /* * Unblocks lu->tgt as soon as all its logical units can be unblocked. * Note, it is harmless to run scsi_unblock_requests() outside the * card->lock protected section. On the other hand, running it inside * the section might clash with shost->host_lock. */ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu) { struct sbp2_target *tgt = lu->tgt; struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; bool unblock = false; spin_lock_irqsave(&card->lock, flags); if (lu->blocked && lu->generation == card->generation) { lu->blocked = false; unblock = --tgt->blocked == 0; } spin_unlock_irqrestore(&card->lock, flags); if (unblock) scsi_unblock_requests(shost); } /* * Prevents future blocking of tgt and unblocks it. * Note, it is harmless to run scsi_unblock_requests() outside the * card->lock protected section. On the other hand, running it inside * the section might clash with shost->host_lock. */ static void sbp2_unblock(struct sbp2_target *tgt) { struct fw_card *card = target_device(tgt)->card; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); unsigned long flags; spin_lock_irqsave(&card->lock, flags); ++tgt->dont_block; spin_unlock_irqrestore(&card->lock, flags); scsi_unblock_requests(shost); } static int sbp2_lun2int(u16 lun) { struct scsi_lun eight_bytes_lun; memset(&eight_bytes_lun, 0, sizeof(eight_bytes_lun)); eight_bytes_lun.scsi_lun[0] = (lun >> 8) & 0xff; eight_bytes_lun.scsi_lun[1] = lun & 0xff; return scsilun_to_int(&eight_bytes_lun); } static void sbp2_release_target(struct kref *kref) { struct sbp2_target *tgt = container_of(kref, struct sbp2_target, kref); struct sbp2_logical_unit *lu, *next; struct Scsi_Host *shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); struct scsi_device *sdev; struct fw_device *device = target_device(tgt); /* prevent deadlocks */ sbp2_unblock(tgt); list_for_each_entry_safe(lu, next, &tgt->lu_list, link) { sdev = scsi_device_lookup(shost, 0, 0, sbp2_lun2int(lu->lun)); if (sdev) { scsi_remove_device(sdev); scsi_device_put(sdev); } if (lu->login_id != INVALID_LOGIN_ID) { int generation, node_id; /* * tgt->node_id may be obsolete here if we failed * during initial login or after a bus reset where * the topology changed. */ generation = device->generation; smp_rmb(); /* node_id vs. generation */ node_id = device->node_id; sbp2_send_management_orb(lu, node_id, generation, SBP2_LOGOUT_REQUEST, lu->login_id, NULL); } fw_core_remove_address_handler(&lu->address_handler); list_del(&lu->link); kfree(lu); } scsi_remove_host(shost); fw_notify("released %s, target %d:0:0\n", tgt->bus_id, shost->host_no); fw_unit_put(tgt->unit); scsi_host_put(shost); fw_device_put(device); } static void sbp2_target_get(struct sbp2_target *tgt) { kref_get(&tgt->kref); } static void sbp2_target_put(struct sbp2_target *tgt) { kref_put(&tgt->kref, sbp2_release_target); } static struct workqueue_struct *sbp2_wq; /* * Always get the target's kref when scheduling work on one its units. * Each workqueue job is responsible to call sbp2_target_put() upon return. */ static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay) { sbp2_target_get(lu->tgt); if (!queue_delayed_work(sbp2_wq, &lu->work, delay)) sbp2_target_put(lu->tgt); } /* * Write retransmit retry values into the BUSY_TIMEOUT register. * - The single-phase retry protocol is supported by all SBP-2 devices, but the * default retry_limit value is 0 (i.e. never retry transmission). We write a * saner value after logging into the device. * - The dual-phase retry protocol is optional to implement, and if not * supported, writes to the dual-phase portion of the register will be * ignored. We try to write the original 1394-1995 default here. * - In the case of devices that are also SBP-3-compliant, all writes are * ignored, as the register is read-only, but contains single-phase retry of * 15, which is what we're trying to set for all SBP-2 device anyway, so this * write attempt is safe and yields more consistent behavior for all devices. * * See section 8.3.2.3.5 of the 1394-1995 spec, section 6.2 of the SBP-2 spec, * and section 6.4 of the SBP-3 spec for further details. */ static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu) { struct fw_device *device = target_device(lu->tgt); __be32 d = cpu_to_be32(SBP2_CYCLE_LIMIT | SBP2_RETRY_LIMIT); fw_run_transaction(device->card, TCODE_WRITE_QUADLET_REQUEST, lu->tgt->node_id, lu->generation, device->max_speed, CSR_REGISTER_BASE + CSR_BUSY_TIMEOUT, &d, 4); } static void sbp2_reconnect(struct work_struct *work); static void sbp2_login(struct work_struct *work) { struct sbp2_logical_unit *lu = container_of(work, struct sbp2_logical_unit, work.work); struct sbp2_target *tgt = lu->tgt; struct fw_device *device = target_device(tgt); struct Scsi_Host *shost; struct scsi_device *sdev; struct sbp2_login_response response; int generation, node_id, local_node_id; if (fw_device_is_shutdown(device)) goto out; generation = device->generation; smp_rmb(); /* node IDs must not be older than generation */ node_id = device->node_id; local_node_id = device->card->node_id; /* If this is a re-login attempt, log out, or we might be rejected. */ if (lu->has_sdev) sbp2_send_management_orb(lu, device->node_id, generation, SBP2_LOGOUT_REQUEST, lu->login_id, NULL); if (sbp2_send_management_orb(lu, node_id, generation, SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) { if (lu->retries++ < 5) { sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); } else { fw_error("%s: failed to login to LUN %04x\n", tgt->bus_id, lu->lun); /* Let any waiting I/O fail from now on. */ sbp2_unblock(lu->tgt); } goto out; } tgt->node_id = node_id; tgt->address_high = local_node_id << 16; smp_wmb(); /* node IDs must not be older than generation */ lu->generation = generation; lu->command_block_agent_address = ((u64)(be32_to_cpu(response.command_block_agent.high) & 0xffff) << 32) | be32_to_cpu(response.command_block_agent.low); lu->login_id = be32_to_cpu(response.misc) & 0xffff; fw_notify("%s: logged in to LUN %04x (%d retries)\n", tgt->bus_id, lu->lun, lu->retries); /* set appropriate retry limit(s) in BUSY_TIMEOUT register */ sbp2_set_busy_timeout(lu); PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect); sbp2_agent_reset(lu); /* This was a re-login. */ if (lu->has_sdev) { sbp2_cancel_orbs(lu); sbp2_conditionally_unblock(lu); goto out; } if (lu->tgt->workarounds & SBP2_WORKAROUND_DELAY_INQUIRY) ssleep(SBP2_INQUIRY_DELAY); shost = container_of((void *)tgt, struct Scsi_Host, hostdata[0]); sdev = __scsi_add_device(shost, 0, 0, sbp2_lun2int(lu->lun), lu); /* Reported error during __scsi_add_device() */ if (IS_ERR(sdev)) goto out_logout_login; /* Unreported error during __scsi_add_device() */ smp_rmb(); /* get current card generation */ if (generation != device->card->generation) { scsi_remove_device(sdev); scsi_device_put(sdev); goto out_logout_login; } /* No error during __scsi_add_device() */ lu->has_sdev = true; scsi_device_put(sdev); sbp2_allow_block(lu); goto out; out_logout_login: smp_rmb(); /* generation may have changed */ generation = device->generation; smp_rmb(); /* node_id must not be older than generation */ sbp2_send_management_orb(lu, device->node_id, generation, SBP2_LOGOUT_REQUEST, lu->login_id, NULL); /* * If a bus reset happened, sbp2_update will have requeued * lu->work already. Reset the work from reconnect to login. */ PREPARE_DELAYED_WORK(&lu->work, sbp2_login); out: sbp2_target_put(tgt); } static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry) { struct sbp2_logical_unit *lu; lu = kmalloc(sizeof(*lu), GFP_KERNEL); if (!lu) return -ENOMEM; lu->address_handler.length = 0x100; lu->address_handler.address_callback = sbp2_status_write; lu->address_handler.callback_data = lu; if (fw_core_add_address_handler(&lu->address_handler, &fw_high_memory_region) < 0) { kfree(lu); return -ENOMEM; } lu->tgt = tgt; lu->lun = lun_entry & 0xffff; lu->login_id = INVALID_LOGIN_ID; lu->retries = 0; lu->has_sdev = false; lu->blocked = false; ++tgt->dont_block; INIT_LIST_HEAD(&lu->orb_list); INIT_DELAYED_WORK(&lu->work, sbp2_login); list_add_tail(&lu->link, &tgt->lu_list); return 0; } static int sbp2_scan_logical_unit_dir(struct sbp2_target *tgt, const u32 *directory) { struct fw_csr_iterator ci; int key, value; fw_csr_iterator_init(&ci, directory); while (fw_csr_iterator_next(&ci, &key, &value)) if (key == SBP2_CSR_LOGICAL_UNIT_NUMBER && sbp2_add_logical_unit(tgt, value) < 0) return -ENOMEM; return 0; } static int sbp2_scan_unit_dir(struct sbp2_target *tgt, const u32 *directory, u32 *model, u32 *firmware_revision) { struct fw_csr_iterator ci; int key, value; fw_csr_iterator_init(&ci, directory); while (fw_csr_iterator_next(&ci, &key, &value)) { switch (key) { case CSR_DEPENDENT_INFO | CSR_OFFSET: tgt->management_agent_address = CSR_REGISTER_BASE + 4 * value; break; case CSR_DIRECTORY_ID: tgt->directory_id = value; break; case CSR_MODEL: *model = value; break; case SBP2_CSR_FIRMWARE_REVISION: *firmware_revision = value; break; case SBP2_CSR_UNIT_CHARACTERISTICS: /* the timeout value is stored in 500ms units */ tgt->mgt_orb_timeout = (value >> 8 & 0xff) * 500; break; case SBP2_CSR_LOGICAL_UNIT_NUMBER: if (sbp2_add_logical_unit(tgt, value) < 0) return -ENOMEM; break; case SBP2_CSR_LOGICAL_UNIT_DIRECTORY: /* Adjust for the increment in the iterator */ if (sbp2_scan_logical_unit_dir(tgt, ci.p - 1 + value) < 0) return -ENOMEM; break; } } return 0; } /* * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be * provided in the config rom. Most devices do provide a value, which * we'll use for login management orbs, but with some sane limits. */ static void sbp2_clamp_management_orb_timeout(struct sbp2_target *tgt) { unsigned int timeout = tgt->mgt_orb_timeout; if (timeout > 40000) fw_notify("%s: %ds mgt_ORB_timeout limited to 40s\n", tgt->bus_id, timeout / 1000); tgt->mgt_orb_timeout = clamp_val(timeout, 5000, 40000); } static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model, u32 firmware_revision) { int i; unsigned int w = sbp2_param_workarounds; if (w) fw_notify("Please notify [email protected] " "if you need the workarounds parameter for %s\n", tgt->bus_id); if (w & SBP2_WORKAROUND_OVERRIDE) goto out; for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) { if (sbp2_workarounds_table[i].firmware_revision != (firmware_revision & 0xffffff00)) continue; if (sbp2_workarounds_table[i].model != model && sbp2_workarounds_table[i].model != SBP2_ROM_VALUE_WILDCARD) continue; w |= sbp2_workarounds_table[i].workarounds; break; } out: if (w) fw_notify("Workarounds for %s: 0x%x " "(firmware_revision 0x%06x, model_id 0x%06x)\n", tgt->bus_id, w, firmware_revision, model); tgt->workarounds = w; } static struct scsi_host_template scsi_driver_template; static int sbp2_probe(struct device *dev) { struct fw_unit *unit = fw_unit(dev); struct fw_device *device = fw_parent_device(unit); struct sbp2_target *tgt; struct sbp2_logical_unit *lu; struct Scsi_Host *shost; u32 model, firmware_revision; if (dma_get_max_seg_size(device->card->device) > SBP2_MAX_SEG_SIZE) BUG_ON(dma_set_max_seg_size(device->card->device, SBP2_MAX_SEG_SIZE)); shost = scsi_host_alloc(&scsi_driver_template, sizeof(*tgt)); if (shost == NULL) return -ENOMEM; tgt = (struct sbp2_target *)shost->hostdata; dev_set_drvdata(&unit->device, tgt); tgt->unit = unit; kref_init(&tgt->kref); INIT_LIST_HEAD(&tgt->lu_list); tgt->bus_id = dev_name(&unit->device); tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; if (fw_device_enable_phys_dma(device) < 0) goto fail_shost_put; shost->max_cmd_len = SBP2_MAX_CDB_SIZE; if (scsi_add_host(shost, &unit->device) < 0) goto fail_shost_put; fw_device_get(device); fw_unit_get(unit); /* implicit directory ID */ tgt->directory_id = ((unit->directory - device->config_rom) * 4 + CSR_CONFIG_ROM) & 0xffffff; firmware_revision = SBP2_ROM_VALUE_MISSING; model = SBP2_ROM_VALUE_MISSING; if (sbp2_scan_unit_dir(tgt, unit->directory, &model, &firmware_revision) < 0) goto fail_tgt_put; sbp2_clamp_management_orb_timeout(tgt); sbp2_init_workarounds(tgt, model, firmware_revision); /* * At S100 we can do 512 bytes per packet, at S200 1024 bytes, * and so on up to 4096 bytes. The SBP-2 max_payload field * specifies the max payload size as 2 ^ (max_payload + 2), so * if we set this to max_speed + 7, we get the right value. */ tgt->max_payload = min(device->max_speed + 7, 10U); tgt->max_payload = min(tgt->max_payload, device->card->max_receive - 1); /* Do the login in a workqueue so we can easily reschedule retries. */ list_for_each_entry(lu, &tgt->lu_list, link) sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); return 0; fail_tgt_put: sbp2_target_put(tgt); return -ENOMEM; fail_shost_put: scsi_host_put(shost); return -ENOMEM; } static int sbp2_remove(struct device *dev) { struct fw_unit *unit = fw_unit(dev); struct sbp2_target *tgt = dev_get_drvdata(&unit->device); sbp2_target_put(tgt); return 0; } static void sbp2_reconnect(struct work_struct *work) { struct sbp2_logical_unit *lu = container_of(work, struct sbp2_logical_unit, work.work); struct sbp2_target *tgt = lu->tgt; struct fw_device *device = target_device(tgt); int generation, node_id, local_node_id; if (fw_device_is_shutdown(device)) goto out; generation = device->generation; smp_rmb(); /* node IDs must not be older than generation */ node_id = device->node_id; local_node_id = device->card->node_id; if (sbp2_send_management_orb(lu, node_id, generation, SBP2_RECONNECT_REQUEST, lu->login_id, NULL) < 0) { /* * If reconnect was impossible even though we are in the * current generation, fall back and try to log in again. * * We could check for "Function rejected" status, but * looking at the bus generation as simpler and more general. */ smp_rmb(); /* get current card generation */ if (generation == device->card->generation || lu->retries++ >= 5) { fw_error("%s: failed to reconnect\n", tgt->bus_id); lu->retries = 0; PREPARE_DELAYED_WORK(&lu->work, sbp2_login); } sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); goto out; } tgt->node_id = node_id; tgt->address_high = local_node_id << 16; smp_wmb(); /* node IDs must not be older than generation */ lu->generation = generation; fw_notify("%s: reconnected to LUN %04x (%d retries)\n", tgt->bus_id, lu->lun, lu->retries); sbp2_agent_reset(lu); sbp2_cancel_orbs(lu); sbp2_conditionally_unblock(lu); out: sbp2_target_put(tgt); } static void sbp2_update(struct fw_unit *unit) { struct sbp2_target *tgt = dev_get_drvdata(&unit->device); struct sbp2_logical_unit *lu; fw_device_enable_phys_dma(fw_parent_device(unit)); /* * Fw-core serializes sbp2_update() against sbp2_remove(). * Iteration over tgt->lu_list is therefore safe here. */ list_for_each_entry(lu, &tgt->lu_list, link) { sbp2_conditionally_block(lu); lu->retries = 0; sbp2_queue_work(lu, 0); } } #define SBP2_UNIT_SPEC_ID_ENTRY 0x0000609e #define SBP2_SW_VERSION_ENTRY 0x00010483 static const struct ieee1394_device_id sbp2_id_table[] = { { .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, .specifier_id = SBP2_UNIT_SPEC_ID_ENTRY, .version = SBP2_SW_VERSION_ENTRY, }, { } }; static struct fw_driver sbp2_driver = { .driver = { .owner = THIS_MODULE, .name = sbp2_driver_name, .bus = &fw_bus_type, .probe = sbp2_probe, .remove = sbp2_remove, }, .update = sbp2_update, .id_table = sbp2_id_table, }; static void sbp2_unmap_scatterlist(struct device *card_device, struct sbp2_command_orb *orb) { if (scsi_sg_count(orb->cmd)) dma_unmap_sg(card_device, scsi_sglist(orb->cmd), scsi_sg_count(orb->cmd), orb->cmd->sc_data_direction); if (orb->request.misc & cpu_to_be32(COMMAND_ORB_PAGE_TABLE_PRESENT)) dma_unmap_single(card_device, orb->page_table_bus, sizeof(orb->page_table), DMA_TO_DEVICE); } static unsigned int sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data) { int sam_status; sense_data[0] = 0x70; sense_data[1] = 0x0; sense_data[2] = sbp2_status[1]; sense_data[3] = sbp2_status[4]; sense_data[4] = sbp2_status[5]; sense_data[5] = sbp2_status[6]; sense_data[6] = sbp2_status[7]; sense_data[7] = 10; sense_data[8] = sbp2_status[8]; sense_data[9] = sbp2_status[9]; sense_data[10] = sbp2_status[10]; sense_data[11] = sbp2_status[11]; sense_data[12] = sbp2_status[2]; sense_data[13] = sbp2_status[3]; sense_data[14] = sbp2_status[12]; sense_data[15] = sbp2_status[13]; sam_status = sbp2_status[0] & 0x3f; switch (sam_status) { case SAM_STAT_GOOD: case SAM_STAT_CHECK_CONDITION: case SAM_STAT_CONDITION_MET: case SAM_STAT_BUSY: case SAM_STAT_RESERVATION_CONFLICT: case SAM_STAT_COMMAND_TERMINATED: return DID_OK << 16 | sam_status; default: return DID_ERROR << 16; } } static void complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status) { struct sbp2_command_orb *orb = container_of(base_orb, struct sbp2_command_orb, base); struct fw_device *device = target_device(orb->lu->tgt); int result; if (status != NULL) { if (STATUS_GET_DEAD(*status)) sbp2_agent_reset_no_wait(orb->lu); switch (STATUS_GET_RESPONSE(*status)) { case SBP2_STATUS_REQUEST_COMPLETE: result = DID_OK << 16; break; case SBP2_STATUS_TRANSPORT_FAILURE: result = DID_BUS_BUSY << 16; break; case SBP2_STATUS_ILLEGAL_REQUEST: case SBP2_STATUS_VENDOR_DEPENDENT: default: result = DID_ERROR << 16; break; } if (result == DID_OK << 16 && STATUS_GET_LEN(*status) > 1) result = sbp2_status_to_sense_data(STATUS_GET_DATA(*status), orb->cmd->sense_buffer); } else { /* * If the orb completes with status == NULL, something * went wrong, typically a bus reset happened mid-orb * or when sending the write (less likely). */ result = DID_BUS_BUSY << 16; sbp2_conditionally_block(orb->lu); } dma_unmap_single(device->card->device, orb->base.request_bus, sizeof(orb->request), DMA_TO_DEVICE); sbp2_unmap_scatterlist(device->card->device, orb); orb->cmd->result = result; orb->done(orb->cmd); } static int sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device, struct sbp2_logical_unit *lu) { struct scatterlist *sg = scsi_sglist(orb->cmd); int i, n; n = dma_map_sg(device->card->device, sg, scsi_sg_count(orb->cmd), orb->cmd->sc_data_direction); if (n == 0) goto fail; if (n == 1) { orb->request.data_descriptor.high = cpu_to_be32(lu->tgt->address_high); orb->request.data_descriptor.low = cpu_to_be32(sg_dma_address(sg)); orb->request.misc |= cpu_to_be32(COMMAND_ORB_DATA_SIZE(sg_dma_len(sg))); return 0; } for_each_sg(sg, sg, n, i) { orb->page_table[i].high = cpu_to_be32(sg_dma_len(sg) << 16); orb->page_table[i].low = cpu_to_be32(sg_dma_address(sg)); } orb->page_table_bus = dma_map_single(device->card->device, orb->page_table, sizeof(orb->page_table), DMA_TO_DEVICE); if (dma_mapping_error(device->card->device, orb->page_table_bus)) goto fail_page_table; /* * The data_descriptor pointer is the one case where we need * to fill in the node ID part of the address. All other * pointers assume that the data referenced reside on the * initiator (i.e. us), but data_descriptor can refer to data * on other nodes so we need to put our ID in descriptor.high. */ orb->request.data_descriptor.high = cpu_to_be32(lu->tgt->address_high); orb->request.data_descriptor.low = cpu_to_be32(orb->page_table_bus); orb->request.misc |= cpu_to_be32(COMMAND_ORB_PAGE_TABLE_PRESENT | COMMAND_ORB_DATA_SIZE(n)); return 0; fail_page_table: dma_unmap_sg(device->card->device, scsi_sglist(orb->cmd), scsi_sg_count(orb->cmd), orb->cmd->sc_data_direction); fail: return -ENOMEM; } /* SCSI stack integration */ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) { struct sbp2_logical_unit *lu = cmd->device->hostdata; struct fw_device *device = target_device(lu->tgt); struct sbp2_command_orb *orb; int generation, retval = SCSI_MLQUEUE_HOST_BUSY; /* * Bidirectional commands are not yet implemented, and unknown * transfer direction not handled. */ if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) { fw_error("Can't handle DMA_BIDIRECTIONAL, rejecting command\n"); cmd->result = DID_ERROR << 16; done(cmd); return 0; } orb = kzalloc(sizeof(*orb), GFP_ATOMIC); if (orb == NULL) { fw_notify("failed to alloc orb\n"); return SCSI_MLQUEUE_HOST_BUSY; } /* Initialize rcode to something not RCODE_COMPLETE. */ orb->base.rcode = -1; kref_init(&orb->base.kref); orb->lu = lu; orb->done = done; orb->cmd = cmd; orb->request.next.high = cpu_to_be32(SBP2_ORB_NULL); orb->request.misc = cpu_to_be32( COMMAND_ORB_MAX_PAYLOAD(lu->tgt->max_payload) | COMMAND_ORB_SPEED(device->max_speed) | COMMAND_ORB_NOTIFY); if (cmd->sc_data_direction == DMA_FROM_DEVICE) orb->request.misc |= cpu_to_be32(COMMAND_ORB_DIRECTION); generation = device->generation; smp_rmb(); /* sbp2_map_scatterlist looks at tgt->address_high */ if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0) goto out; memcpy(orb->request.command_block, cmd->cmnd, cmd->cmd_len); orb->base.callback = complete_command_orb; orb->base.request_bus = dma_map_single(device->card->device, &orb->request, sizeof(orb->request), DMA_TO_DEVICE); if (dma_mapping_error(device->card->device, orb->base.request_bus)) { sbp2_unmap_scatterlist(device->card->device, orb); goto out; } sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, generation, lu->command_block_agent_address + SBP2_ORB_POINTER); retval = 0; out: kref_put(&orb->base.kref, free_orb); return retval; } static int sbp2_scsi_slave_alloc(struct scsi_device *sdev) { struct sbp2_logical_unit *lu = sdev->hostdata; /* (Re-)Adding logical units via the SCSI stack is not supported. */ if (!lu) return -ENOSYS; sdev->allow_restart = 1; /* SBP-2 requires quadlet alignment of the data buffers. */ blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1); if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36) sdev->inquiry_len = 36; return 0; } static int sbp2_scsi_slave_configure(struct scsi_device *sdev) { struct sbp2_logical_unit *lu = sdev->hostdata; sdev->use_10_for_rw = 1; if (sbp2_param_exclusive_login) sdev->manage_start_stop = 1; if (sdev->type == TYPE_ROM) sdev->use_10_for_ms = 1; if (sdev->type == TYPE_DISK && lu->tgt->workarounds & SBP2_WORKAROUND_MODE_SENSE_8) sdev->skip_ms_page_8 = 1; if (lu->tgt->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) sdev->fix_capacity = 1; if (lu->tgt->workarounds & SBP2_WORKAROUND_POWER_CONDITION) sdev->start_stop_pwr_cond = 1; if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) blk_queue_max_hw_sectors(sdev->request_queue, 128 * 1024 / 512); blk_queue_max_segment_size(sdev->request_queue, SBP2_MAX_SEG_SIZE); return 0; } /* * Called by scsi stack when something has really gone wrong. Usually * called when a command has timed-out for some reason. */ static int sbp2_scsi_abort(struct scsi_cmnd *cmd) { struct sbp2_logical_unit *lu = cmd->device->hostdata; fw_notify("%s: sbp2_scsi_abort\n", lu->tgt->bus_id); sbp2_agent_reset(lu); sbp2_cancel_orbs(lu); return SUCCESS; } /* * Format of /sys/bus/scsi/devices/.../ieee1394_id: * u64 EUI-64 : u24 directory_ID : u16 LUN (all printed in hexadecimal) * * This is the concatenation of target port identifier and logical unit * identifier as per SAM-2...SAM-4 annex A. */ static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev, struct device_attribute *attr, char *buf) { struct scsi_device *sdev = to_scsi_device(dev); struct sbp2_logical_unit *lu; if (!sdev) return 0; lu = sdev->hostdata; return sprintf(buf, "%016llx:%06x:%04x\n", (unsigned long long)lu->tgt->guid, lu->tgt->directory_id, lu->lun); } static DEVICE_ATTR(ieee1394_id, S_IRUGO, sbp2_sysfs_ieee1394_id_show, NULL); static struct device_attribute *sbp2_scsi_sysfs_attrs[] = { &dev_attr_ieee1394_id, NULL }; static struct scsi_host_template scsi_driver_template = { .module = THIS_MODULE, .name = "SBP-2 IEEE-1394", .proc_name = sbp2_driver_name, .queuecommand = sbp2_scsi_queuecommand, .slave_alloc = sbp2_scsi_slave_alloc, .slave_configure = sbp2_scsi_slave_configure, .eh_abort_handler = sbp2_scsi_abort, .this_id = -1, .sg_tablesize = SG_ALL, .use_clustering = ENABLE_CLUSTERING, .cmd_per_lun = 1, .can_queue = 1, .sdev_attrs = sbp2_scsi_sysfs_attrs, }; MODULE_AUTHOR("Kristian Hoegsberg <[email protected]>"); MODULE_DESCRIPTION("SCSI over IEEE1394"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table); /* Provide a module alias so root-on-sbp2 initrds don't break. */ #ifndef CONFIG_IEEE1394_SBP2_MODULE MODULE_ALIAS("sbp2"); #endif static int __init sbp2_init(void) { sbp2_wq = create_singlethread_workqueue(KBUILD_MODNAME); if (!sbp2_wq) return -ENOMEM; return driver_register(&sbp2_driver.driver); } static void __exit sbp2_cleanup(void) { driver_unregister(&sbp2_driver.driver); destroy_workqueue(sbp2_wq); } module_init(sbp2_init); module_exit(sbp2_cleanup);
{ "pile_set_name": "Github" }
// compile // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // /tmp/x.go:5: cannot use _ as value package p func f(ch chan int) bool { select { case _, ok := <-ch: return ok } _, ok := <-ch _ = ok select { case _, _ = <-ch: return true } return false }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" sourcelanguage="en_US"> <context> <name>DisplayArrangementWidget</name> <message> <location filename="../displayarrangementwidget.cpp" line="103"/> <source>Screen %1 connected</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayarrangementwidget.cpp" line="104"/> <source>To start using it, configure your screens.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayarrangementwidget.cpp" line="105"/> <source>Configure Screens</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DisplayConfigurationWidget</name> <message> <location filename="../displayconfigurationwidget.ui" line="79"/> <source>Set as Default monitor</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayconfigurationwidget.ui" line="108"/> <source>Done</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayconfigurationwidget.ui" line="157"/> <source>Resolution</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayconfigurationwidget.ui" line="164"/> <source>Power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displayconfigurationwidget.ui" line="188"/> <source>Refresh Rate</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DisplayPane</name> <message> <location filename="../displaypane.ui" line="40"/> <location filename="../displaypane.cpp" line="124"/> <source>Display</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="135"/> <source>Screen Scaling</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="145"/> <source>If apps and buttons look too small on your device, you can scale them up to improve usability.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="161"/> <source>SCALING</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="189"/> <source>&amp;100% (96 dpi)</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="196"/> <source>1&amp;50% (144 dpi)</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="203"/> <source>&amp;200% (192 dpi)</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="210"/> <source>&amp;300% (288 dpi)</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="252"/> <source>If the start time is later than the end time, Redshift will be activated until the end time on the next day.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="284"/> <source>Scheduled</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="308"/> <source>End Time</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="339"/> <source>We&apos;ll send your current location to https://sunrise-sunset.org/ to determine sunlight times if you enable this option.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="367"/> <source>Use Sunlight Cycle</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="393"/> <source>Redshift Intensity</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="406"/> <source>REDSHIFT</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="413"/> <source>Start Time</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.ui" line="420"/> <source>Redshift blocks blue light so that you can sleep better at night.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypane.cpp" line="98"/> <source>Redshift</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DisplayPositionWidget</name> <message> <location filename="../displaypositionwidget.ui" line="26"/> <source>SCREENS</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypositionwidget.ui" line="33"/> <source>Select a screen to configure it, or drag it around to reposition it. To duplicate displays, drag them on top of each other and set them to have the same resolution.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypositionwidget.ui" line="78"/> <source>Set</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypositionwidget.cpp" line="164"/> <source>No Powered Displays</source> <translation type="unfinished"></translation> </message> <message> <location filename="../displaypositionwidget.cpp" line="164"/> <source>All available displays in your configuration are off. Are you sure you want to set this screen configuration?</source> <translation type="unfinished"></translation> </message> </context> </TS>
{ "pile_set_name": "Github" }
# Gamgee: a C++14 library for genomics data processing and analysis The source code is available at http://www.github.com/broadinstitute/gamgee.
{ "pile_set_name": "Github" }
/* * Copyright (c) 2010-2011 Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "htc.h" /******************/ /* BTCOEX */ /******************/ #define ATH_HTC_BTCOEX_PRODUCT_ID "wb193" #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT /* * Detects if there is any priority bt traffic */ static void ath_detect_bt_priority(struct ath9k_htc_priv *priv) { struct ath_btcoex *btcoex = &priv->btcoex; struct ath_hw *ah = priv->ah; if (ath9k_hw_gpio_get(ah, ah->btcoex_hw.btpriority_gpio)) btcoex->bt_priority_cnt++; if (time_after(jiffies, btcoex->bt_priority_time + msecs_to_jiffies(ATH_BT_PRIORITY_TIME_THRESHOLD))) { priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED | OP_BT_SCAN); /* Detect if colocated bt started scanning */ if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { ath_dbg(ath9k_hw_common(ah), BTCOEX, "BT scan detected\n"); priv->op_flags |= (OP_BT_SCAN | OP_BT_PRIORITY_DETECTED); } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { ath_dbg(ath9k_hw_common(ah), BTCOEX, "BT priority traffic detected\n"); priv->op_flags |= OP_BT_PRIORITY_DETECTED; } btcoex->bt_priority_cnt = 0; btcoex->bt_priority_time = jiffies; } } /* * This is the master bt coex work which runs for every * 45ms, bt traffic will be given priority during 55% of this * period while wlan gets remaining 45% */ static void ath_btcoex_period_work(struct work_struct *work) { struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, coex_period_work.work); struct ath_btcoex *btcoex = &priv->btcoex; struct ath_common *common = ath9k_hw_common(priv->ah); u32 timer_period; bool is_btscan; int ret; ath_detect_bt_priority(priv); is_btscan = !!(priv->op_flags & OP_BT_SCAN); ret = ath9k_htc_update_cap_target(priv, !!(priv->op_flags & OP_BT_PRIORITY_DETECTED)); if (ret) { ath_err(common, "Unable to set BTCOEX parameters\n"); return; } ath9k_hw_btcoex_bt_stomp(priv->ah, is_btscan ? ATH_BTCOEX_STOMP_ALL : btcoex->bt_stomp_type); ath9k_hw_btcoex_enable(priv->ah); timer_period = is_btscan ? btcoex->btscan_no_stomp : btcoex->btcoex_no_stomp; ieee80211_queue_delayed_work(priv->hw, &priv->duty_cycle_work, msecs_to_jiffies(timer_period)); ieee80211_queue_delayed_work(priv->hw, &priv->coex_period_work, msecs_to_jiffies(btcoex->btcoex_period)); } /* * Work to time slice between wlan and bt traffic and * configure weight registers */ static void ath_btcoex_duty_cycle_work(struct work_struct *work) { struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, duty_cycle_work.work); struct ath_hw *ah = priv->ah; struct ath_btcoex *btcoex = &priv->btcoex; struct ath_common *common = ath9k_hw_common(ah); bool is_btscan = priv->op_flags & OP_BT_SCAN; ath_dbg(common, BTCOEX, "time slice work for bt and wlan\n"); if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW); ath9k_hw_btcoex_enable(priv->ah); } static void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) { struct ath_btcoex *btcoex = &priv->btcoex; btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD; btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * btcoex->btcoex_period / 100; btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) * btcoex->btcoex_period / 100; INIT_DELAYED_WORK(&priv->coex_period_work, ath_btcoex_period_work); INIT_DELAYED_WORK(&priv->duty_cycle_work, ath_btcoex_duty_cycle_work); } /* * (Re)start btcoex work */ static void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) { struct ath_btcoex *btcoex = &priv->btcoex; struct ath_hw *ah = priv->ah; ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex work\n"); btcoex->bt_priority_cnt = 0; btcoex->bt_priority_time = jiffies; priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED | OP_BT_SCAN); ieee80211_queue_delayed_work(priv->hw, &priv->coex_period_work, 0); } /* * Cancel btcoex and bt duty cycle work. */ static void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv) { cancel_delayed_work_sync(&priv->coex_period_work); cancel_delayed_work_sync(&priv->duty_cycle_work); } void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv) { struct ath_hw *ah = priv->ah; if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) { ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_LOW_WLAN_WGHT); ath9k_hw_btcoex_enable(ah); ath_htc_resume_btcoex_work(priv); } } void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv) { struct ath_hw *ah = priv->ah; if (ah->btcoex_hw.enabled && ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) { ath9k_hw_btcoex_disable(ah); if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) ath_htc_cancel_btcoex_work(priv); } } void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) { struct ath_hw *ah = priv->ah; int qnum; if (product && strncmp(product, ATH_HTC_BTCOEX_PRODUCT_ID, 5) == 0) { ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_3WIRE; } switch (ath9k_hw_get_btcoex_scheme(priv->ah)) { case ATH_BTCOEX_CFG_NONE: break; case ATH_BTCOEX_CFG_3WIRE: priv->ah->btcoex_hw.btactive_gpio = 7; priv->ah->btcoex_hw.btpriority_gpio = 6; priv->ah->btcoex_hw.wlanactive_gpio = 8; priv->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; ath9k_hw_btcoex_init_3wire(priv->ah); ath_htc_init_btcoex_work(priv); qnum = priv->hwq_map[WME_AC_BE]; ath9k_hw_init_btcoex_hw(priv->ah, qnum); break; default: WARN_ON(1); break; } } #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */ /*******/ /* LED */ /*******/ #ifdef CONFIG_MAC80211_LEDS void ath9k_led_work(struct work_struct *work) { struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, led_work); ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, (priv->brightness == LED_OFF)); } static void ath9k_led_brightness(struct led_classdev *led_cdev, enum led_brightness brightness) { struct ath9k_htc_priv *priv = container_of(led_cdev, struct ath9k_htc_priv, led_cdev); /* Not locked, but it's just a tiny green light..*/ priv->brightness = brightness; ieee80211_queue_work(priv->hw, &priv->led_work); } void ath9k_deinit_leds(struct ath9k_htc_priv *priv) { if (!priv->led_registered) return; ath9k_led_brightness(&priv->led_cdev, LED_OFF); led_classdev_unregister(&priv->led_cdev); cancel_work_sync(&priv->led_work); } void ath9k_init_leds(struct ath9k_htc_priv *priv) { int ret; if (AR_SREV_9287(priv->ah)) priv->ah->led_pin = ATH_LED_PIN_9287; else if (AR_SREV_9271(priv->ah)) priv->ah->led_pin = ATH_LED_PIN_9271; else if (AR_DEVID_7010(priv->ah)) priv->ah->led_pin = ATH_LED_PIN_7010; else priv->ah->led_pin = ATH_LED_PIN_DEF; /* Configure gpio 1 for output */ ath9k_hw_cfg_output(priv->ah, priv->ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT); /* LED off, active low */ ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 1); snprintf(priv->led_name, sizeof(priv->led_name), "ath9k_htc-%s", wiphy_name(priv->hw->wiphy)); priv->led_cdev.name = priv->led_name; priv->led_cdev.brightness_set = ath9k_led_brightness; ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &priv->led_cdev); if (ret < 0) return; INIT_WORK(&priv->led_work, ath9k_led_work); priv->led_registered = true; return; } #endif /*******************/ /* Rfkill */ /*******************/ static bool ath_is_rfkill_set(struct ath9k_htc_priv *priv) { bool is_blocked; ath9k_htc_ps_wakeup(priv); is_blocked = ath9k_hw_gpio_get(priv->ah, priv->ah->rfkill_gpio) == priv->ah->rfkill_polarity; ath9k_htc_ps_restore(priv); return is_blocked; } void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw) { struct ath9k_htc_priv *priv = hw->priv; bool blocked = !!ath_is_rfkill_set(priv); wiphy_rfkill_set_hw_state(hw->wiphy, blocked); } void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv) { if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) wiphy_rfkill_start_polling(priv->hw->wiphy); } void ath9k_htc_radio_enable(struct ieee80211_hw *hw) { struct ath9k_htc_priv *priv = hw->priv; struct ath_hw *ah = priv->ah; struct ath_common *common = ath9k_hw_common(ah); int ret; u8 cmd_rsp; if (!ah->curchan) ah->curchan = ath9k_cmn_get_curchannel(hw, ah); /* Reset the HW */ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); if (ret) { ath_err(common, "Unable to reset hardware; reset status %d (freq %u MHz)\n", ret, ah->curchan->channel); } ath9k_cmn_update_txpow(ah, priv->curtxpow, priv->txpowlimit, &priv->curtxpow); /* Start RX */ WMI_CMD(WMI_START_RECV_CMDID); ath9k_host_rx_init(priv); /* Start TX */ htc_start(priv->htc); spin_lock_bh(&priv->tx.tx_lock); priv->tx.flags &= ~ATH9K_HTC_OP_TX_QUEUES_STOP; spin_unlock_bh(&priv->tx.tx_lock); ieee80211_wake_queues(hw); WMI_CMD(WMI_ENABLE_INTR_CMDID); /* Enable LED */ ath9k_hw_cfg_output(ah, ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT); ath9k_hw_set_gpio(ah, ah->led_pin, 0); } void ath9k_htc_radio_disable(struct ieee80211_hw *hw) { struct ath9k_htc_priv *priv = hw->priv; struct ath_hw *ah = priv->ah; struct ath_common *common = ath9k_hw_common(ah); int ret; u8 cmd_rsp; ath9k_htc_ps_wakeup(priv); /* Disable LED */ ath9k_hw_set_gpio(ah, ah->led_pin, 1); ath9k_hw_cfg_gpio_input(ah, ah->led_pin); WMI_CMD(WMI_DISABLE_INTR_CMDID); /* Stop TX */ ieee80211_stop_queues(hw); ath9k_htc_tx_drain(priv); WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); /* Stop RX */ WMI_CMD(WMI_STOP_RECV_CMDID); /* Clear the WMI event queue */ ath9k_wmi_event_drain(priv); /* * The MIB counters have to be disabled here, * since the target doesn't do it. */ ath9k_hw_disable_mib_counters(ah); if (!ah->curchan) ah->curchan = ath9k_cmn_get_curchannel(hw, ah); /* Reset the HW */ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); if (ret) { ath_err(common, "Unable to reset hardware; reset status %d (freq %u MHz)\n", ret, ah->curchan->channel); } /* Disable the PHY */ ath9k_hw_phy_disable(ah); ath9k_htc_ps_restore(priv); ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP); }
{ "pile_set_name": "Github" }
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tokenizer REF boost-1.73.0 SHA512 cef77b4fb338dfefac3dc0f7eeef99acc07dc7ae66795697f10b8ad595bec93ad5f3f0fe0c802651415ae2620856f6e3bbf1b0ed28dac9baa7685c2a98d581e4 HEAD_REF master ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH})
{ "pile_set_name": "Github" }
# # Makefile # Copyright (C) 2018 hzshang <[email protected]> # # Distributed under terms of the MIT license. PROG=note CFLAGS=-lcrypto -fno-stack-protector -z now all:main.c gcc $^ $(CFLAGS) -o $(PROG) strip -s $(PROG) debug:main.c gcc $^ $(CFLAGS) -o $(PROG) -g clean: rm -rf $(PROG)
{ "pile_set_name": "Github" }
#!/usr/bin/env node // Standalone semver comparison program. // Exits successfully and prints matching version(s) if // any supplied version is valid and passes all tests. var argv = process.argv.slice(2) var versions = [] var range = [] var inc = null var version = require('../package.json').version var loose = false var includePrerelease = false var coerce = false var identifier var semver = require('../semver') var reverse = false var options = {} main() function main () { if (!argv.length) return help() while (argv.length) { var a = argv.shift() var indexOfEqualSign = a.indexOf('=') if (indexOfEqualSign !== -1) { a = a.slice(0, indexOfEqualSign) argv.unshift(a.slice(indexOfEqualSign + 1)) } switch (a) { case '-rv': case '-rev': case '--rev': case '--reverse': reverse = true break case '-l': case '--loose': loose = true break case '-p': case '--include-prerelease': includePrerelease = true break case '-v': case '--version': versions.push(argv.shift()) break case '-i': case '--inc': case '--increment': switch (argv[0]) { case 'major': case 'minor': case 'patch': case 'prerelease': case 'premajor': case 'preminor': case 'prepatch': inc = argv.shift() break default: inc = 'patch' break } break case '--preid': identifier = argv.shift() break case '-r': case '--range': range.push(argv.shift()) break case '-c': case '--coerce': coerce = true break case '-h': case '--help': case '-?': return help() default: versions.push(a) break } } var options = { loose: loose, includePrerelease: includePrerelease } versions = versions.map(function (v) { return coerce ? (semver.coerce(v) || { version: v }).version : v }).filter(function (v) { return semver.valid(v) }) if (!versions.length) return fail() if (inc && (versions.length !== 1 || range.length)) { return failInc() } for (var i = 0, l = range.length; i < l; i++) { versions = versions.filter(function (v) { return semver.satisfies(v, range[i], options) }) if (!versions.length) return fail() } return success(versions) } function failInc () { console.error('--inc can only be used on a single version with no range') fail() } function fail () { process.exit(1) } function success () { var compare = reverse ? 'rcompare' : 'compare' versions.sort(function (a, b) { return semver[compare](a, b, options) }).map(function (v) { return semver.clean(v, options) }).map(function (v) { return inc ? semver.inc(v, inc, options, identifier) : v }).forEach(function (v, i, _) { console.log(v) }) } function help () { console.log(['SemVer ' + version, '', 'A JavaScript implementation of the https://semver.org/ specification', 'Copyright Isaac Z. Schlueter', '', 'Usage: semver [options] <version> [<version> [...]]', 'Prints valid versions sorted by SemVer precedence', '', 'Options:', '-r --range <range>', ' Print versions that match the specified range.', '', '-i --increment [<level>]', ' Increment a version by the specified level. Level can', ' be one of: major, minor, patch, premajor, preminor,', " prepatch, or prerelease. Default level is 'patch'.", ' Only one version may be specified.', '', '--preid <identifier>', ' Identifier to be used to prefix premajor, preminor,', ' prepatch or prerelease version increments.', '', '-l --loose', ' Interpret versions and ranges loosely', '', '-p --include-prerelease', ' Always include prerelease versions in range matching', '', '-c --coerce', ' Coerce a string into SemVer if possible', ' (does not imply --loose)', '', 'Program exits successfully if any valid version satisfies', 'all supplied ranges, and prints all satisfying versions.', '', 'If no satisfying versions are found, then exits failure.', '', 'Versions are printed in ascending order, so supplying', 'multiple versions to the utility will just sort them.' ].join('\n')) }
{ "pile_set_name": "Github" }
/* TEST_OUTPUT: --- fail_compilation/fail196.d(26): Error: delimited string must end in )" fail_compilation/fail196.d(26): Error: Implicit string concatenation is error-prone and disallowed in D fail_compilation/fail196.d(26): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\x0a assert(s == " fail_compilation/fail196.d(27): Error: semicolon expected, not `foo` fail_compilation/fail196.d(27): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement fail_compilation/fail196.d(29): Error: found `";\x0a assert(s == "` when expecting `;` following statement fail_compilation/fail196.d(30): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement fail_compilation/fail196.d(32): Error: found `{` when expecting `;` following statement fail_compilation/fail196.d(32): Error: found `}` when expecting `;` following statement fail_compilation/fail196.d(33): Error: found `foo` when expecting `;` following statement fail_compilation/fail196.d(33): Error: found `}` when expecting `;` following statement fail_compilation/fail196.d(35): Error: found `<` when expecting `;` following statement fail_compilation/fail196.d(36): Error: found `foo` when expecting `;` following statement fail_compilation/fail196.d(36): Error: found `<` instead of statement fail_compilation/fail196.d(42): Error: unterminated string constant starting at fail_compilation/fail196.d(42) fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement --- */ void main() { string s = q"(foo(xxx)) "; assert(s == "foo(xxx)"); s = q"[foo[xxx]]"; assert(s == "foo[xxx]"); s = q"{foo{xxx}}"; assert(s == "foo{xxx}"); s = q"<foo<xxx>>"; assert(s == "foo<xxx>"); s = q"[foo(]"; assert(s == "foo("); s = q"/foo]/"; assert(s == "foo]"); }
{ "pile_set_name": "Github" }
<html> <head> <style type="text/css"> .header { font: 12pt; } .key { color: #404080; font-weight: bold; border-style: none; } .value { color: #404040; border-style: none; } .summary { border-style: none; width: 100%; height: 100%; } .table1 td { border-width: 1px; border-style: solid; border-color: blue; } </style> </head> <body> <blockquote> <table class="table1"> <tr> <td colspan="2" nowrap>Cell One Cell One Cell this text is not visible </td> </tr> <tr> <td>Cell Three </td> <td>Cell Four </td> </tr> </table> <hr /> <table class="table1"> <tr> <td> <table width="100%"> <tr> <td style="white-space: nowrap;">Left Inner Cell One</td> <td style="white-space: nowrap;" align="right">Right Inner Cell Two</td> </tr> </table> </td> </tr> </table> <hr /> <table class="table1" width="100%"> <tr style="vertical-align: top;"> <td width="32" style="padding: 2px 5px 0 0">Fixed width column </td> <td>column without a width so should take all the space but be close to the left column </td> </tr> </table> <hr /> <table cellpadding="8" cellspacing="0"> <tbody> <tr> <td> <strong>A:</strong> </td> <td>1 </td> </tr> <tr> <td> <strong>B:</strong> </td> <td>2 </td> </tr> <tr> <td> <strong>C:</strong> </td> <td>3 </td> </tr> </tbody> </table> <hr /> <!-- empty table to check that it doesn't break layout --> <table> <tr> </tr> </table> <table border="1" style="width: 500px;"> <tr> <td> <strong>Nuance <br /> df</strong> </td> <td>sdfsdf </td> <td>sdfsd </td> </tr> </table> <hr /> <table border="1" style="border: 1px solid #000000; width: 100%;"> <tbody> <tr> <td>a </td> <td>LongStringLongStringLongStringLongStringLongStringLongStringLongString </td> <td>text </td> </tr> </tbody> </table> <hr /> <table border="1" style="border: 1px solid #000000; width: 100%;"> <thead> <tr> <th colspan="3" style="width: 50%; padding: 2px; border: 1px solid #000000; color: #ffffff; background-color: #6690bc; text-align: left;">Title </th> </tr> </thead> <tbody> <tr> <td>Word 1 </td> <td>Word 2 </td> <td>Word 3 </td> </tr> </tbody> </table> <hr /> <table border="1" style="border: 1px solid #000000; max-width: 100%"> <tr> <td>Word1Word1 Word1Word1Word1 </td> <td>Word 2 </td> <td>Word3Word3Word3Word3 Word3Word3Word3Word3Word3Word3Word3Word3Word3 </td> </tr> </table> <hr /> <table border="1" style="border: 1px solid #000000; max-width: 100%"> <tr> <td width="200px">Word1 Word1Word1 </td> <td width="150px">Word 2 </td> <td width="300px">Word3Word3Word3 Word3 </td> </tr> </table> <hr /> <table class="summary"> <tr> <td colspan="2" class="header">Container </td> </tr> <tr> <td class="key">Type </td> <td class="value">$Type </td> </tr> </table> <hr /> <table> <tr> <td>this is a long message this is a long message this is a long message</td> <td>this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message this is a long message </td> </tr> </table> <hr /> <table cellspacing="0" cellpadding="0" border="1" cols="6" lang="en-US" class="r10" style="WIDTH: 175.1543mm; background-color: red"> <tr> <td style="HEIGHT: 9.49mm; WIDTH: 0.00mm; background-color: yellow"></td> <td style="WIDTH: 6.05mm; min-width: 6.05mm; background-color: blue"></td> <td style="WIDTH: 147.37mm; min-width: 147.37mm; background-color: black"></td> <td style="WIDTH: 9.00mm; min-width: 9.00mm; background-color: white"></td> <td style="WIDTH: 8.20mm; min-width: 8.20mm; background-color: yellow"></td> <td style="WIDTH: 4.53mm; min-width: 4.53mm; background-color: green"></td> </tr> </table> <br/> <table cellspacing="0" cellpadding="0" border="1" cols="6" lang="en-US" class="r10" style="WIDTH: 175.1543mm; background-color: red"> <tr> <td style="HEIGHT: 3mm; WIDTH: 12.00mm; background-color: yellow"></td> <td style="WIDTH: 6.05mm; min-width: 6.05mm; background-color: blue"></td> </tr> <tr> <td style="HEIGHT: 3mm; WIDTH: 12.00mm; background-color: yellow"></td> <td style="WIDTH: 18.05mm; background-color: blue"></td> </tr> </table> </blockquote> </body> </html>
{ "pile_set_name": "Github" }
cmake_minimum_required(VERSION 2.6) PROJECT(CheckerBoard) FIND_PACKAGE(OpenCV REQUIRED ) INCLUDE_DIRECTORIES( ${OPENCV_INCLUDE_DIR} ) ADD_EXECUTABLE(CheckerBoard CheckerBoard.cxx) TARGET_LINK_LIBRARIES(CheckerBoard opencv_core opencv_highgui opencv_flann opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_objdetect opencv_features2d opencv_calib3d opencv_legacy opencv_contrib )
{ "pile_set_name": "Github" }
1 of 6 resource instances DISABLED and 0 BLOCKED from further action due to failure Current cluster status: Online: [ 18builder 18node1 18node2 ] RemoteOnline: [ remote1 ] shooter (stonith:fence_xvm): Started 18node1 remote1 (ocf::pacemaker:remote): Started 18builder (disabled) FAKE1 (ocf::heartbeat:Dummy): Started 18node2 FAKE2 (ocf::heartbeat:Dummy): Stopped FAKE3 (ocf::heartbeat:Dummy): Started 18builder FAKE4 (ocf::heartbeat:Dummy): Started 18node1 Transition Summary: * Stop remote1 ( 18builder ) due to node availability Executing cluster transition: * Resource action: FAKE1 monitor on remote1 * Resource action: FAKE2 monitor on remote1 * Resource action: FAKE3 monitor on remote1 * Resource action: FAKE4 monitor on remote1 * Resource action: remote1 stop on 18builder Revised cluster status: Online: [ 18builder 18node1 18node2 ] RemoteOFFLINE: [ remote1 ] shooter (stonith:fence_xvm): Started 18node1 remote1 (ocf::pacemaker:remote): Stopped (disabled) FAKE1 (ocf::heartbeat:Dummy): Started 18node2 FAKE2 (ocf::heartbeat:Dummy): Stopped FAKE3 (ocf::heartbeat:Dummy): Started 18builder FAKE4 (ocf::heartbeat:Dummy): Started 18node1
{ "pile_set_name": "Github" }
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport */ @interface OISFUZipInputBundle : NSObject <SFUInputBundle> { OISFUZipArchive * _zipArchive; } @property (readonly, copy) NSString *debugDescription; @property (readonly, copy) NSString *description; @property (readonly) unsigned long long hash; @property (readonly) Class superclass; - (id)bufferedInputStreamForEntry:(id)arg1; - (void)copyEntry:(id)arg1 toFile:(id)arg2; - (unsigned int)crc32ForEntry:(id)arg1; - (void)dealloc; - (bool)hasEntryWithName:(id)arg1; - (id)initWithZipArchive:(id)arg1; - (id)inputStreamForEntry:(id)arg1; - (long long)lengthOfEntry:(id)arg1; @end
{ "pile_set_name": "Github" }
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Dtbuild3(Package): """Simple package which acts as a build dependency""" homepage = "http://www.example.com" url = "http://www.example.com/dtbuild3-1.0.tar.gz" version('1.0', '0123456789abcdef0123456789abcdef')
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> <string>15G31</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>Fabric</string> <key>CFBundleIdentifier</key> <string>io.fabric.sdk.mac</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Fabric</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>1.6.11</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>60</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string>7D1014</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>15E60</string> <key>DTSDKName</key> <string>macosx10.11</string> <key>DTXcode</key> <string>0731</string> <key>DTXcodeBuild</key> <string>7D1014</string> <key>NSHumanReadableCopyright</key> <string>Copyright © 2015 Twitter. All rights reserved.</string> <key>UIDeviceFamily</key> <array> <integer>3</integer> <integer>2</integer> <integer>1</integer> <integer>4</integer> </array> </dict> </plist>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.rmi.transport; import java.io.IOException; /** * Skeleton to dispatch DGC methods. * Originally generated by RMIC but frozen to match the stubs. */ @SuppressWarnings({"deprecation", "serial"}) public final class DGCImpl_Skel implements java.rmi.server.Skeleton { private static final java.rmi.server.Operation[] operations = { new java.rmi.server.Operation("void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)"), new java.rmi.server.Operation("java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)") }; private static final long interfaceHash = -669196253586618813L; public java.rmi.server.Operation[] getOperations() { return operations.clone(); } public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall remoteCall, int opnum, long hash) throws java.lang.Exception { if (hash != interfaceHash) throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch"); sun.rmi.transport.DGCImpl server = (sun.rmi.transport.DGCImpl) obj; StreamRemoteCall call = (StreamRemoteCall) remoteCall; switch (opnum) { case 0: // clean(ObjID[], long, VMID, boolean) { java.rmi.server.ObjID[] $param_arrayOf_ObjID_1; long $param_long_2; java.rmi.dgc.VMID $param_VMID_3; boolean $param_boolean_4; try { java.io.ObjectInput in = call.getInputStream(); $param_arrayOf_ObjID_1 = (java.rmi.server.ObjID[]) in.readObject(); $param_long_2 = in.readLong(); $param_VMID_3 = (java.rmi.dgc.VMID) in.readObject(); $param_boolean_4 = in.readBoolean(); } catch (ClassCastException | IOException | ClassNotFoundException e) { call.discardPendingRefs(); throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); } finally { call.releaseInputStream(); } server.clean($param_arrayOf_ObjID_1, $param_long_2, $param_VMID_3, $param_boolean_4); try { call.getResultStream(true); } catch (java.io.IOException e) { throw new java.rmi.MarshalException("error marshalling return", e); } break; } case 1: // dirty(ObjID[], long, Lease) { java.rmi.server.ObjID[] $param_arrayOf_ObjID_1; long $param_long_2; java.rmi.dgc.Lease $param_Lease_3; try { java.io.ObjectInput in = call.getInputStream(); $param_arrayOf_ObjID_1 = (java.rmi.server.ObjID[]) in.readObject(); $param_long_2 = in.readLong(); $param_Lease_3 = (java.rmi.dgc.Lease) in.readObject(); } catch (ClassCastException | IOException | ClassNotFoundException e) { call.discardPendingRefs(); throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); } finally { call.releaseInputStream(); } java.rmi.dgc.Lease $result = server.dirty($param_arrayOf_ObjID_1, $param_long_2, $param_Lease_3); try { java.io.ObjectOutput out = call.getResultStream(true); out.writeObject($result); } catch (java.io.IOException e) { throw new java.rmi.MarshalException("error marshalling return", e); } break; } default: throw new java.rmi.UnmarshalException("invalid method number"); } } }
{ "pile_set_name": "Github" }
//===- llvm/CodeGen/DwarfExpression.cpp - Dwarf Debug Framework -----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file contains support for writing dwarf debug info into asm files. // //===----------------------------------------------------------------------===// #include "DwarfExpression.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/SmallBitVector.h" #include "llvm/BinaryFormat/Dwarf.h" #include "llvm/CodeGen/TargetRegisterInfo.h" #include "llvm/IR/DebugInfoMetadata.h" #include "llvm/Support/ErrorHandling.h" #include <algorithm> #include <cassert> #include <cstdint> using namespace llvm; void DwarfExpression::emitConstu(uint64_t Value) { if (Value < 32) emitOp(dwarf::DW_OP_lit0 + Value); else if (Value == std::numeric_limits<uint64_t>::max()) { // Only do this for 64-bit values as the DWARF expression stack uses // target-address-size values. emitOp(dwarf::DW_OP_lit0); emitOp(dwarf::DW_OP_not); } else { emitOp(dwarf::DW_OP_constu); emitUnsigned(Value); } } void DwarfExpression::addReg(int DwarfReg, const char *Comment) { assert(DwarfReg >= 0 && "invalid negative dwarf register number"); assert((LocationKind == Unknown || LocationKind == Register) && "location description already locked down"); LocationKind = Register; if (DwarfReg < 32) { emitOp(dwarf::DW_OP_reg0 + DwarfReg, Comment); } else { emitOp(dwarf::DW_OP_regx, Comment); emitUnsigned(DwarfReg); } } void DwarfExpression::addBReg(int DwarfReg, int Offset) { assert(DwarfReg >= 0 && "invalid negative dwarf register number"); assert(LocationKind != Register && "location description already locked down"); if (DwarfReg < 32) { emitOp(dwarf::DW_OP_breg0 + DwarfReg); } else { emitOp(dwarf::DW_OP_bregx); emitUnsigned(DwarfReg); } emitSigned(Offset); } void DwarfExpression::addFBReg(int Offset) { emitOp(dwarf::DW_OP_fbreg); emitSigned(Offset); } void DwarfExpression::addOpPiece(unsigned SizeInBits, unsigned OffsetInBits) { if (!SizeInBits) return; const unsigned SizeOfByte = 8; if (OffsetInBits > 0 || SizeInBits % SizeOfByte) { emitOp(dwarf::DW_OP_bit_piece); emitUnsigned(SizeInBits); emitUnsigned(OffsetInBits); } else { emitOp(dwarf::DW_OP_piece); unsigned ByteSize = SizeInBits / SizeOfByte; emitUnsigned(ByteSize); } this->OffsetInBits += SizeInBits; } void DwarfExpression::addShr(unsigned ShiftBy) { emitConstu(ShiftBy); emitOp(dwarf::DW_OP_shr); } void DwarfExpression::addAnd(unsigned Mask) { emitConstu(Mask); emitOp(dwarf::DW_OP_and); } bool DwarfExpression::addMachineReg(const TargetRegisterInfo &TRI, unsigned MachineReg, unsigned MaxSize) { if (!TRI.isPhysicalRegister(MachineReg)) { if (isFrameRegister(TRI, MachineReg)) { DwarfRegs.push_back({-1, 0, nullptr}); return true; } return false; } int Reg = TRI.getDwarfRegNum(MachineReg, false); // If this is a valid register number, emit it. if (Reg >= 0) { DwarfRegs.push_back({Reg, 0, nullptr}); return true; } // Walk up the super-register chain until we find a valid number. // For example, EAX on x86_64 is a 32-bit fragment of RAX with offset 0. for (MCSuperRegIterator SR(MachineReg, &TRI); SR.isValid(); ++SR) { Reg = TRI.getDwarfRegNum(*SR, false); if (Reg >= 0) { unsigned Idx = TRI.getSubRegIndex(*SR, MachineReg); unsigned Size = TRI.getSubRegIdxSize(Idx); unsigned RegOffset = TRI.getSubRegIdxOffset(Idx); DwarfRegs.push_back({Reg, 0, "super-register"}); // Use a DW_OP_bit_piece to describe the sub-register. setSubRegisterPiece(Size, RegOffset); return true; } } // Otherwise, attempt to find a covering set of sub-register numbers. // For example, Q0 on ARM is a composition of D0+D1. unsigned CurPos = 0; // The size of the register in bits. const TargetRegisterClass *RC = TRI.getMinimalPhysRegClass(MachineReg); unsigned RegSize = TRI.getRegSizeInBits(*RC); // Keep track of the bits in the register we already emitted, so we // can avoid emitting redundant aliasing subregs. Because this is // just doing a greedy scan of all subregisters, it is possible that // this doesn't find a combination of subregisters that fully cover // the register (even though one may exist). SmallBitVector Coverage(RegSize, false); for (MCSubRegIterator SR(MachineReg, &TRI); SR.isValid(); ++SR) { unsigned Idx = TRI.getSubRegIndex(MachineReg, *SR); unsigned Size = TRI.getSubRegIdxSize(Idx); unsigned Offset = TRI.getSubRegIdxOffset(Idx); Reg = TRI.getDwarfRegNum(*SR, false); if (Reg < 0) continue; // Intersection between the bits we already emitted and the bits // covered by this subregister. SmallBitVector CurSubReg(RegSize, false); CurSubReg.set(Offset, Offset + Size); // If this sub-register has a DWARF number and we haven't covered // its range, emit a DWARF piece for it. if (CurSubReg.test(Coverage)) { // Emit a piece for any gap in the coverage. if (Offset > CurPos) DwarfRegs.push_back({-1, Offset - CurPos, "no DWARF register encoding"}); DwarfRegs.push_back( {Reg, std::min<unsigned>(Size, MaxSize - Offset), "sub-register"}); if (Offset >= MaxSize) break; // Mark it as emitted. Coverage.set(Offset, Offset + Size); CurPos = Offset + Size; } } // Failed to find any DWARF encoding. if (CurPos == 0) return false; // Found a partial or complete DWARF encoding. if (CurPos < RegSize) DwarfRegs.push_back({-1, RegSize - CurPos, "no DWARF register encoding"}); return true; } void DwarfExpression::addStackValue() { if (DwarfVersion >= 4) emitOp(dwarf::DW_OP_stack_value); } void DwarfExpression::addSignedConstant(int64_t Value) { assert(LocationKind == Implicit || LocationKind == Unknown); LocationKind = Implicit; emitOp(dwarf::DW_OP_consts); emitSigned(Value); } void DwarfExpression::addUnsignedConstant(uint64_t Value) { assert(LocationKind == Implicit || LocationKind == Unknown); LocationKind = Implicit; emitConstu(Value); } void DwarfExpression::addUnsignedConstant(const APInt &Value) { assert(LocationKind == Implicit || LocationKind == Unknown); LocationKind = Implicit; unsigned Size = Value.getBitWidth(); const uint64_t *Data = Value.getRawData(); // Chop it up into 64-bit pieces, because that's the maximum that // addUnsignedConstant takes. unsigned Offset = 0; while (Offset < Size) { addUnsignedConstant(*Data++); if (Offset == 0 && Size <= 64) break; addStackValue(); addOpPiece(std::min(Size - Offset, 64u), Offset); Offset += 64; } } bool DwarfExpression::addMachineRegExpression(const TargetRegisterInfo &TRI, DIExpressionCursor &ExprCursor, unsigned MachineReg, unsigned FragmentOffsetInBits) { auto Fragment = ExprCursor.getFragmentInfo(); if (!addMachineReg(TRI, MachineReg, Fragment ? Fragment->SizeInBits : ~1U)) { LocationKind = Unknown; return false; } bool HasComplexExpression = false; auto Op = ExprCursor.peek(); if (Op && Op->getOp() != dwarf::DW_OP_LLVM_fragment) HasComplexExpression = true; // If the register can only be described by a complex expression (i.e., // multiple subregisters) it doesn't safely compose with another complex // expression. For example, it is not possible to apply a DW_OP_deref // operation to multiple DW_OP_pieces. if (HasComplexExpression && DwarfRegs.size() > 1) { DwarfRegs.clear(); LocationKind = Unknown; return false; } // Handle simple register locations. if (LocationKind != Memory && !HasComplexExpression) { for (auto &Reg : DwarfRegs) { if (Reg.DwarfRegNo >= 0) addReg(Reg.DwarfRegNo, Reg.Comment); addOpPiece(Reg.Size); } DwarfRegs.clear(); return true; } // Don't emit locations that cannot be expressed without DW_OP_stack_value. if (DwarfVersion < 4) if (any_of(ExprCursor, [](DIExpression::ExprOperand Op) -> bool { return Op.getOp() == dwarf::DW_OP_stack_value; })) { DwarfRegs.clear(); LocationKind = Unknown; return false; } assert(DwarfRegs.size() == 1); auto Reg = DwarfRegs[0]; bool FBReg = isFrameRegister(TRI, MachineReg); int SignedOffset = 0; assert(Reg.Size == 0 && "subregister has same size as superregister"); // Pattern-match combinations for which more efficient representations exist. // [Reg, DW_OP_plus_uconst, Offset] --> [DW_OP_breg, Offset]. if (Op && (Op->getOp() == dwarf::DW_OP_plus_uconst)) { SignedOffset = Op->getArg(0); ExprCursor.take(); } // [Reg, DW_OP_constu, Offset, DW_OP_plus] --> [DW_OP_breg, Offset] // [Reg, DW_OP_constu, Offset, DW_OP_minus] --> [DW_OP_breg,-Offset] // If Reg is a subregister we need to mask it out before subtracting. if (Op && Op->getOp() == dwarf::DW_OP_constu) { auto N = ExprCursor.peekNext(); if (N && (N->getOp() == dwarf::DW_OP_plus || (N->getOp() == dwarf::DW_OP_minus && !SubRegisterSizeInBits))) { int Offset = Op->getArg(0); SignedOffset = (N->getOp() == dwarf::DW_OP_minus) ? -Offset : Offset; ExprCursor.consume(2); } } if (FBReg) addFBReg(SignedOffset); else addBReg(Reg.DwarfRegNo, SignedOffset); DwarfRegs.clear(); return true; } /// Assuming a well-formed expression, match "DW_OP_deref* DW_OP_LLVM_fragment?". static bool isMemoryLocation(DIExpressionCursor ExprCursor) { while (ExprCursor) { auto Op = ExprCursor.take(); switch (Op->getOp()) { case dwarf::DW_OP_deref: case dwarf::DW_OP_LLVM_fragment: break; default: return false; } } return true; } void DwarfExpression::addExpression(DIExpressionCursor &&ExprCursor, unsigned FragmentOffsetInBits) { // If we need to mask out a subregister, do it now, unless the next // operation would emit an OpPiece anyway. auto N = ExprCursor.peek(); if (SubRegisterSizeInBits && N && (N->getOp() != dwarf::DW_OP_LLVM_fragment)) maskSubRegister(); while (ExprCursor) { auto Op = ExprCursor.take(); switch (Op->getOp()) { case dwarf::DW_OP_LLVM_fragment: { unsigned SizeInBits = Op->getArg(1); unsigned FragmentOffset = Op->getArg(0); // The fragment offset must have already been adjusted by emitting an // empty DW_OP_piece / DW_OP_bit_piece before we emitted the base // location. assert(OffsetInBits >= FragmentOffset && "fragment offset not added?"); // If addMachineReg already emitted DW_OP_piece operations to represent // a super-register by splicing together sub-registers, subtract the size // of the pieces that was already emitted. SizeInBits -= OffsetInBits - FragmentOffset; // If addMachineReg requested a DW_OP_bit_piece to stencil out a // sub-register that is smaller than the current fragment's size, use it. if (SubRegisterSizeInBits) SizeInBits = std::min<unsigned>(SizeInBits, SubRegisterSizeInBits); // Emit a DW_OP_stack_value for implicit location descriptions. if (LocationKind == Implicit) addStackValue(); // Emit the DW_OP_piece. addOpPiece(SizeInBits, SubRegisterOffsetInBits); setSubRegisterPiece(0, 0); // Reset the location description kind. LocationKind = Unknown; return; } case dwarf::DW_OP_plus_uconst: assert(LocationKind != Register); emitOp(dwarf::DW_OP_plus_uconst); emitUnsigned(Op->getArg(0)); break; case dwarf::DW_OP_plus: case dwarf::DW_OP_minus: case dwarf::DW_OP_mul: case dwarf::DW_OP_div: case dwarf::DW_OP_mod: case dwarf::DW_OP_or: case dwarf::DW_OP_and: case dwarf::DW_OP_xor: case dwarf::DW_OP_shl: case dwarf::DW_OP_shr: case dwarf::DW_OP_shra: case dwarf::DW_OP_lit0: case dwarf::DW_OP_not: case dwarf::DW_OP_dup: emitOp(Op->getOp()); break; case dwarf::DW_OP_deref: assert(LocationKind != Register); if (LocationKind != Memory && ::isMemoryLocation(ExprCursor)) // Turning this into a memory location description makes the deref // implicit. LocationKind = Memory; else emitOp(dwarf::DW_OP_deref); break; case dwarf::DW_OP_constu: assert(LocationKind != Register); emitConstu(Op->getArg(0)); break; case dwarf::DW_OP_stack_value: LocationKind = Implicit; break; case dwarf::DW_OP_swap: assert(LocationKind != Register); emitOp(dwarf::DW_OP_swap); break; case dwarf::DW_OP_xderef: assert(LocationKind != Register); emitOp(dwarf::DW_OP_xderef); break; default: llvm_unreachable("unhandled opcode found in expression"); } } if (LocationKind == Implicit) // Turn this into an implicit location description. addStackValue(); } /// add masking operations to stencil out a subregister. void DwarfExpression::maskSubRegister() { assert(SubRegisterSizeInBits && "no subregister was registered"); if (SubRegisterOffsetInBits > 0) addShr(SubRegisterOffsetInBits); uint64_t Mask = (1ULL << (uint64_t)SubRegisterSizeInBits) - 1ULL; addAnd(Mask); } void DwarfExpression::finalize() { assert(DwarfRegs.size() == 0 && "dwarf registers not emitted"); // Emit any outstanding DW_OP_piece operations to mask out subregisters. if (SubRegisterSizeInBits == 0) return; // Don't emit a DW_OP_piece for a subregister at offset 0. if (SubRegisterOffsetInBits == 0) return; addOpPiece(SubRegisterSizeInBits, SubRegisterOffsetInBits); } void DwarfExpression::addFragmentOffset(const DIExpression *Expr) { if (!Expr || !Expr->isFragment()) return; uint64_t FragmentOffset = Expr->getFragmentInfo()->OffsetInBits; assert(FragmentOffset >= OffsetInBits && "overlapping or duplicate fragments"); if (FragmentOffset > OffsetInBits) addOpPiece(FragmentOffset - OffsetInBits); OffsetInBits = FragmentOffset; }
{ "pile_set_name": "Github" }
# 第5课:条件 将以下内容以Jupyter Notebook的方式做练习和自己总结,可存档附件到作业后面。 条件:if - elif - else,每个后面跟冒号: 注意:python没有switch – case语句 常用的操作符 ``` < 小于 <= 小于或等于 > 大于 >= 大于或等于 == 等于 != 不等于 ``` 创建 test05.py ``` #!/anaconda3/bin/python3 import random x = random.choice(range(10)) y = random.choice(range(20)) if x > y: print('x:', x) elif x == y: print('x = y =', x) else: print('y:', y) ``` python3 test05.py ``` if - elif - else可嵌套,类似这样: if 条件1: 语句 if 条件2: 语句 elif 条件3: 语句 else: 语句 elif 条件4: 语句 else: ``` 一组有趣的例子:条件为真或为假 1、条件为真:不为0、为True、为”None” ``` >>> a = 1 >>> if a: ... print("True") ... else: ... print("False") ... True >>> a = "None" >>> if a: ... print("True") ... else: ... print("False") ... True ``` 2、条件为假:为0、为False、为None ``` >>> a = 0 >>> if a: ... print("True") ... else: ... print("False") ... False >>> a = None >>> if a: ... print("True") ... else: ... print("False") ... False ``` 你再试试 a = True 或 False的情况。 有点困了,该睡觉了。月亮 配图来自Twitter:@atikix ![配图](https://wiki.huihoo.com/images/f/fe/Devopsgirls05.jpg)
{ "pile_set_name": "Github" }
const huffman = require('../../..').String.huffman; const assert = require('assert'); describe('Huffman', () => { const messages = [ '', 'a', 'b', 'hello', 'test', 'aaaabbbccddef', 'The seething sea ceaseth and thus' + ' the seething sea sufficeth us.', 'Shep Schwab shopped at Scott\'s Schnapps shop;' + '\nOne shot of Scott\'s Schnapps stopped Schwab\'s watch.' ]; for (let randomTestIndex = 0; randomTestIndex < 15; ++randomTestIndex) { const length = Math.floor(Math.random() * 100 + 1); const characters = []; for (let charIndex = 0; charIndex < length; ++charIndex) { const charCode = Math.floor(Math.random() * 10 + 'a'.charCodeAt()); characters.push(String.fromCharCode(charCode)); } messages.push(characters.join('')); } it('decodes previously encoded messages correctly', () => { messages.forEach(message => { const encoded = huffman.encode(message); const decoded = huffman.decode(encoded.encoding, encoded.value); assert.equal(message, decoded); const encodedCompressed = huffman.encode(message, true); const decodedCompressed = huffman.decode( encodedCompressed.encoding, encodedCompressed.value ); assert.equal(message, decodedCompressed); }); }); it('raises an error if it fails to decode', () => { const badArgs = [[{}, '0'], [{}, [0]], [{a: '0', b: '10', c: '11'}, '001']]; badArgs.forEach(args => { assert.throws(() => { huffman.decode.apply(null, args); }); }); }); it('encodes sample strings in the expected manner', () => { assert.deepEqual(huffman.encode(''), {encoding: {}, value: ''}); assert.deepEqual(huffman.encode('a'), {encoding: {a: '0'}, value: '0'}); assert.deepEqual(huffman.encode('aaaaa'), { encoding: {a: '0'}, value: '00000' }); let result = huffman.encode('aabc'); assert.equal(result.encoding.a.length, 1); assert.equal(result.encoding.b.length, 2); assert.equal(result.encoding.c.length, 2); result = huffman.encode('abcdabcdabcdabcd'); Object.keys(result.encoding).forEach(char => { assert.equal(result.encoding[char].length, 2); }); assert.equal(result.value.length, 32); }); it('satisfies the entropy condition (H <= cost <= H+1)', () => { messages.forEach(message => { const frequencies = message.split('').reduce((acc, char) => { acc[char] = (acc[char] || 0) + 1; return acc; }, {}); Object.keys(frequencies).forEach(char => { frequencies[char] /= message.length; }); const entropy = Object.keys(frequencies).reduce((partial, char) => { const freq = frequencies[char]; return partial - freq * Math.log(freq); }, 0) / Math.log(2); const encoding = huffman.encode(message).encoding; const cost = Object.keys(encoding).reduce( (partial, char) => partial + frequencies[char] * encoding[char].length, 0 ); assert(entropy <= cost); assert(cost <= entropy + 1); }); }); });
{ "pile_set_name": "Github" }
{% extends "sounds/_section.html" %} {% load cache %} {% load paginator %} {% load display_pack %} {% block title %}Packs{% endblock title %} {% block section_content %} <h1>Packs</h1> <h3>Sort by</h3> <ul class="list_order" id="filter_query_display"> <li><a href="?order=name" {% ifequal order "name" %}class="selected"{% endifequal %}>name</a></li> <li><a href="?order=-created" {% ifequal order "-created" %}class="selected"{% endifequal %}>creation date</a></li> <li><a href="?order=-last_updated" {% ifequal order "-last_updated" %}class="selected"{% endifequal %}>last update</a></li> <li><a href="?order=-num_sounds" {% ifequal order "-num_sounds" %}class="selected"{% endifequal %}>number of sounds</a></li> <li><a href="?order=-num_downloads" {% ifequal order "-num_downloads" %}class="selected"{% endifequal %}>number of downloads</a></li> </ul> {% cache 3600 browse_packs order current_page %} <p>{% show_paginator paginator page current_page request "pack" %}</p> {% for pack in page.object_list %} {% display_pack pack %} {% endfor %} {% show_paginator paginator page current_page request "pack" %} {% endcache %} {% endblock %}
{ "pile_set_name": "Github" }
/* * JFFS2 -- Journalling Flash File System, Version 2. * * Copyright © 2006 NEC Corporation * * Created by KaiGai Kohei <[email protected]> * * For licensing information, see the file 'LICENCE' in this directory. * */ #include <linux/kernel.h> #include <linux/slab.h> #include <linux/fs.h> #include <linux/time.h> #include <linux/pagemap.h> #include <linux/highmem.h> #include <linux/crc32.h> #include <linux/jffs2.h> #include <linux/xattr.h> #include <linux/mtd/mtd.h> #include <linux/security.h> #include "nodelist.h" /* ---- Initial Security Label(s) Attachment callback --- */ static int jffs2_initxattrs(struct inode *inode, const struct xattr *xattr_array, void *fs_info) { const struct xattr *xattr; int err = 0; for (xattr = xattr_array; xattr->name != NULL; xattr++) { err = do_jffs2_setxattr(inode, JFFS2_XPREFIX_SECURITY, xattr->name, xattr->value, xattr->value_len, 0); if (err < 0) break; } return err; } /* ---- Initial Security Label(s) Attachment ----------- */ int jffs2_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr) { return security_inode_init_security(inode, dir, qstr, &jffs2_initxattrs, NULL); } /* ---- XATTR Handler for "security.*" ----------------- */ static int jffs2_security_getxattr(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, void *buffer, size_t size) { return do_jffs2_getxattr(inode, JFFS2_XPREFIX_SECURITY, name, buffer, size); } static int jffs2_security_setxattr(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, const void *buffer, size_t size, int flags) { return do_jffs2_setxattr(inode, JFFS2_XPREFIX_SECURITY, name, buffer, size, flags); } const struct xattr_handler jffs2_security_xattr_handler = { .prefix = XATTR_SECURITY_PREFIX, .set = jffs2_security_setxattr, .get = jffs2_security_getxattr };
{ "pile_set_name": "Github" }
(set-info :smt-lib-version 2.6) (set-logic UF) (set-info :source | Set theory. |) (set-info :category "crafted") (set-info :status unsat) (declare-sort Set 0) (declare-sort Elem 0) (declare-fun member (Elem Set) Bool) (declare-fun subset (Set Set) Bool) (assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (=> (and (member ?x ?s1) (subset ?s1 ?s2)) (member ?x ?s2)))) (assert (forall ((?s1 Set) (?s2 Set)) (=> (not (subset ?s1 ?s2)) (exists ((?x Elem)) (and (member ?x ?s1) (not (member ?x ?s2))))))) (assert (forall ((?s1 Set) (?s2 Set)) (=> (forall ((?x Elem)) (=> (member ?x ?s1) (member ?x ?s2))) (subset ?s1 ?s2)))) (declare-fun seteq (Set Set) Bool) (assert (forall ((?s1 Set) (?s2 Set)) (= (seteq ?s1 ?s2) (= ?s1 ?s2)))) (assert (forall ((?s1 Set) (?s2 Set)) (= (seteq ?s1 ?s2) (and (subset ?s1 ?s2) (subset ?s2 ?s1))))) (declare-fun union (Set Set) Set) (assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (member ?x (union ?s1 ?s2)) (or (member ?x ?s1) (member ?x ?s2))))) (declare-fun intersection (Set Set) Set) (assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (member ?x (intersection ?s1 ?s2)) (and (member ?x ?s1) (member ?x ?s2))))) (declare-fun difference (Set Set) Set) (assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (member ?x (difference ?s1 ?s2)) (and (member ?x ?s1) (not (member ?x ?s2)))))) (declare-fun a () Set) (declare-fun b () Set) (declare-fun d () Set) (assert (subset d a)) (assert (not (subset (difference b a) (difference b d)))) (check-sat) (exit)
{ "pile_set_name": "Github" }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`GlobalModalDangerLink renders correctly 1`] = ` <span> <a onClick={[Function]} onKeyPress={[Function]} role="link" style={ Object { "cursor": "pointer", } } tabIndex={0} /> </span> `;
{ "pile_set_name": "Github" }
/* Localized versions of Info.plist keys */ CFBundleName = "npwebpgPlugin-v0.5.9.plugin"; NSHumanReadableCopyright = "Copyright 2012 CURE|THE|ITCH";
{ "pile_set_name": "Github" }
@import "../import1.css"; @import "../import2.css"; body { margin: 0; padding: 0; background: #edf5fa; font: 76%/170% Verdana, sans-serif; color: #494949; } .this .is .a .test { font: 1em/100% Verdana, sans-serif; color: #494949; } .this .is .a .test { font: 1em/100% Verdana, sans-serif; color: #494949; } textarea, select { font: 1em/160% Verdana, sans-serif; color: #494949; }
{ "pile_set_name": "Github" }
/*============================================================================= Copyright (c) 2003 Hartmut Kaiser http://spirit.sourceforge.net/ 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) =============================================================================*/ #ifndef BOOST_SPIRIT_SELECT_HPP #define BOOST_SPIRIT_SELECT_HPP #include <boost/preprocessor/repeat.hpp> #include <boost/preprocessor/enum.hpp> #include <boost/preprocessor/enum_params.hpp> #include <boost/preprocessor/enum_params_with_defaults.hpp> #include <boost/preprocessor/inc.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/facilities/intercept.hpp> #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/parser.hpp> #include <boost/spirit/home/classic/phoenix/tuples.hpp> /////////////////////////////////////////////////////////////////////////////// // // Spirit predefined maximum number of possible embedded select_p parsers. // It should NOT be greater than PHOENIX_LIMIT! // /////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_SPIRIT_SELECT_LIMIT) #define BOOST_SPIRIT_SELECT_LIMIT PHOENIX_LIMIT #endif // !defined(BOOST_SPIRIT_SELECT_LIMIT) /////////////////////////////////////////////////////////////////////////////// // // ensure BOOST_SPIRIT_SELECT_LIMIT <= PHOENIX_LIMIT and // BOOST_SPIRIT_SELECT_LIMIT > 0 // BOOST_SPIRIT_SELECT_LIMIT <= 15 // // [Pushed this down a little to make CW happy with BOOST_STATIC_ASSERT] // [Otherwise, it complains: 'boost_static_assert_test_42' redefined] // /////////////////////////////////////////////////////////////////////////////// BOOST_STATIC_ASSERT(BOOST_SPIRIT_SELECT_LIMIT <= PHOENIX_LIMIT); BOOST_STATIC_ASSERT(BOOST_SPIRIT_SELECT_LIMIT > 0); BOOST_STATIC_ASSERT(BOOST_SPIRIT_SELECT_LIMIT <= 15); /////////////////////////////////////////////////////////////////////////////// // // Calculate the required amount of tuple members rounded up to the nearest // integer dividable by 3 // /////////////////////////////////////////////////////////////////////////////// #if BOOST_SPIRIT_SELECT_LIMIT > 12 #define BOOST_SPIRIT_SELECT_LIMIT_A 15 #elif BOOST_SPIRIT_SELECT_LIMIT > 9 #define BOOST_SPIRIT_SELECT_LIMIT_A 12 #elif BOOST_SPIRIT_SELECT_LIMIT > 6 #define BOOST_SPIRIT_SELECT_LIMIT_A 9 #elif BOOST_SPIRIT_SELECT_LIMIT > 3 #define BOOST_SPIRIT_SELECT_LIMIT_A 6 #else #define BOOST_SPIRIT_SELECT_LIMIT_A 3 #endif /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////////// // // The select_default_no_fail and select_default_fail structs are used to // distinguish two different behaviours for the select_parser in case that not // any of the given sub-parsers match. // // If the select_parser is used with the select_default_no_fail behaviour, // then in case of no matching sub-parser the whole select_parser returns an // empty match and the value -1. // // If the select_parser is used with the select_default_fail behaviour, then // in case of no matching sub-parser the whole select_parser fails to match at // all. // /////////////////////////////////////////////////////////////////////////////// struct select_default_no_fail {}; struct select_default_fail {}; BOOST_SPIRIT_CLASSIC_NAMESPACE_END }} // namespace BOOST_SPIRIT_CLASSIC_NS /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/dynamic/impl/select.ipp> /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////////// template <typename TupleT, typename BehaviourT, typename T> struct select_parser : public parser<select_parser<TupleT, BehaviourT, T> > { typedef select_parser<TupleT, BehaviourT, T> self_t; select_parser(TupleT const &t_) : t(t_) {} template <typename ScannerT> struct result { typedef typename match_result<ScannerT, T>::type type; }; template <typename ScannerT> typename parser_result<self_t, ScannerT>::type parse(ScannerT const& scan) const { typedef typename parser_result<self_t, ScannerT>::type result_t; if (!scan.at_end()) { return impl::parse_tuple_element< TupleT::length, result_t, TupleT, BehaviourT>::do_(t, scan); } return impl::select_match_gen<result_t, BehaviourT>::do_(scan); } TupleT const t; }; /////////////////////////////////////////////////////////////////////////////// template <typename BehaviourT, typename T = int> struct select_parser_gen { /////////////////////////////////////////////////////////////////////////// // // This generates different select_parser_gen::operator()() functions with // an increasing number of parser parameters: // // template <typename ParserT0, ...> // select_parser< // ::phoenix::tuple< // typename impl::as_embedded_parser<ParserT0>::type, // ... // >, // BehaviourT, // T // > // operator()(ParserT0 const &p0, ...) const // { // typedef impl::as_embedded_parser<ParserT0> parser_t0; // ... // // typedef ::phoenix::tuple< // parser_t0::type, // ... // > tuple_t; // typedef select_parser<tuple_t, BehaviourT, T> result_t; // // return result_t(tuple_t( // parser_t0::convert(p0), // ... // )); // } // // The number of generated functions depends on the maximum tuple member // limit defined by the PHOENIX_LIMIT pp constant. // /////////////////////////////////////////////////////////////////////////// #define BOOST_SPIRIT_SELECT_EMBEDDED(z, N, _) \ typename impl::as_embedded_parser<BOOST_PP_CAT(ParserT, N)>::type \ /**/ #define BOOST_SPIRIT_SELECT_EMBEDDED_TYPEDEF(z, N, _) \ typedef impl::as_embedded_parser<BOOST_PP_CAT(ParserT, N)> \ BOOST_PP_CAT(parser_t, N); \ /**/ #define BOOST_SPIRIT_SELECT_CONVERT(z, N, _) \ BOOST_PP_CAT(parser_t, N)::convert(BOOST_PP_CAT(p, N)) \ /**/ #define BOOST_SPIRIT_SELECT_PARSER(z, N, _) \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(N), typename ParserT) \ > \ select_parser< \ ::phoenix::tuple< \ BOOST_PP_ENUM_ ## z(BOOST_PP_INC(N), \ BOOST_SPIRIT_SELECT_EMBEDDED, _) \ >, \ BehaviourT, \ T \ > \ operator()( \ BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_INC(N), \ ParserT, const &p) \ ) const \ { \ BOOST_PP_REPEAT_ ## z(BOOST_PP_INC(N), \ BOOST_SPIRIT_SELECT_EMBEDDED_TYPEDEF, _) \ \ typedef ::phoenix::tuple< \ BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_INC(N), \ typename parser_t, ::type BOOST_PP_INTERCEPT) \ > tuple_t; \ typedef select_parser<tuple_t, BehaviourT, T> result_t; \ \ return result_t(tuple_t( \ BOOST_PP_ENUM_ ## z(BOOST_PP_INC(N), \ BOOST_SPIRIT_SELECT_CONVERT, _) \ )); \ } \ /**/ BOOST_PP_REPEAT(BOOST_SPIRIT_SELECT_LIMIT_A, BOOST_SPIRIT_SELECT_PARSER, _) #undef BOOST_SPIRIT_SELECT_PARSER #undef BOOST_SPIRIT_SELECT_CONVERT #undef BOOST_SPIRIT_SELECT_EMBEDDED_TYPEDEF #undef BOOST_SPIRIT_SELECT_EMBEDDED /////////////////////////////////////////////////////////////////////////// }; /////////////////////////////////////////////////////////////////////////////// // // Predefined parser generator helper objects // /////////////////////////////////////////////////////////////////////////////// select_parser_gen<select_default_no_fail> const select_p = select_parser_gen<select_default_no_fail>(); select_parser_gen<select_default_fail> const select_fail_p = select_parser_gen<select_default_fail>(); #undef BOOST_SPIRIT_SELECT_LIMIT_A /////////////////////////////////////////////////////////////////////////////// BOOST_SPIRIT_CLASSIC_NAMESPACE_END }} // namespace BOOST_SPIRIT_CLASSIC_NS #endif // BOOST_SPIRIT_SELECT_HPP
{ "pile_set_name": "Github" }
<!-- Description: entry source generator Expect: not bozo and entries[0]['source']['generator'] == 'Example generator' --> <feed xmlns="http://www.w3.org/2005/Atom"> <entry> <source> <generator uri="http://example.com/" version="2.65">Example generator</generator> </source> </entry> </feed>
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2013, The Linux Foundation. All rights reserved. * Copyright (c) 2015, Sony Mobile Communications AB */ #include <linux/hwspinlock.h> #include <linux/io.h> #include <linux/kernel.h> #include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/regmap.h> #include "hwspinlock_internal.h" #define QCOM_MUTEX_APPS_PROC_ID 1 #define QCOM_MUTEX_NUM_LOCKS 32 static int qcom_hwspinlock_trylock(struct hwspinlock *lock) { struct regmap_field *field = lock->priv; u32 lock_owner; int ret; ret = regmap_field_write(field, QCOM_MUTEX_APPS_PROC_ID); if (ret) return ret; ret = regmap_field_read(field, &lock_owner); if (ret) return ret; return lock_owner == QCOM_MUTEX_APPS_PROC_ID; } static void qcom_hwspinlock_unlock(struct hwspinlock *lock) { struct regmap_field *field = lock->priv; u32 lock_owner; int ret; ret = regmap_field_read(field, &lock_owner); if (ret) { pr_err("%s: unable to query spinlock owner\n", __func__); return; } if (lock_owner != QCOM_MUTEX_APPS_PROC_ID) { pr_err("%s: spinlock not owned by us (actual owner is %d)\n", __func__, lock_owner); } ret = regmap_field_write(field, 0); if (ret) pr_err("%s: failed to unlock spinlock\n", __func__); } static const struct hwspinlock_ops qcom_hwspinlock_ops = { .trylock = qcom_hwspinlock_trylock, .unlock = qcom_hwspinlock_unlock, }; static const struct of_device_id qcom_hwspinlock_of_match[] = { { .compatible = "qcom,sfpb-mutex" }, { .compatible = "qcom,tcsr-mutex" }, { } }; MODULE_DEVICE_TABLE(of, qcom_hwspinlock_of_match); static int qcom_hwspinlock_probe(struct platform_device *pdev) { struct hwspinlock_device *bank; struct device_node *syscon; struct reg_field field; struct regmap *regmap; size_t array_size; u32 stride; u32 base; int ret; int i; syscon = of_parse_phandle(pdev->dev.of_node, "syscon", 0); if (!syscon) { dev_err(&pdev->dev, "no syscon property\n"); return -ENODEV; } regmap = syscon_node_to_regmap(syscon); of_node_put(syscon); if (IS_ERR(regmap)) return PTR_ERR(regmap); ret = of_property_read_u32_index(pdev->dev.of_node, "syscon", 1, &base); if (ret < 0) { dev_err(&pdev->dev, "no offset in syscon\n"); return -EINVAL; } ret = of_property_read_u32_index(pdev->dev.of_node, "syscon", 2, &stride); if (ret < 0) { dev_err(&pdev->dev, "no stride syscon\n"); return -EINVAL; } array_size = QCOM_MUTEX_NUM_LOCKS * sizeof(struct hwspinlock); bank = devm_kzalloc(&pdev->dev, sizeof(*bank) + array_size, GFP_KERNEL); if (!bank) return -ENOMEM; platform_set_drvdata(pdev, bank); for (i = 0; i < QCOM_MUTEX_NUM_LOCKS; i++) { field.reg = base + i * stride; field.lsb = 0; field.msb = 31; bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev, regmap, field); } pm_runtime_enable(&pdev->dev); ret = hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops, 0, QCOM_MUTEX_NUM_LOCKS); if (ret) pm_runtime_disable(&pdev->dev); return ret; } static int qcom_hwspinlock_remove(struct platform_device *pdev) { struct hwspinlock_device *bank = platform_get_drvdata(pdev); int ret; ret = hwspin_lock_unregister(bank); if (ret) { dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); return ret; } pm_runtime_disable(&pdev->dev); return 0; } static struct platform_driver qcom_hwspinlock_driver = { .probe = qcom_hwspinlock_probe, .remove = qcom_hwspinlock_remove, .driver = { .name = "qcom_hwspinlock", .of_match_table = qcom_hwspinlock_of_match, }, }; static int __init qcom_hwspinlock_init(void) { return platform_driver_register(&qcom_hwspinlock_driver); } /* board init code might need to reserve hwspinlocks for predefined purposes */ postcore_initcall(qcom_hwspinlock_init); static void __exit qcom_hwspinlock_exit(void) { platform_driver_unregister(&qcom_hwspinlock_driver); } module_exit(qcom_hwspinlock_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Hardware spinlock driver for Qualcomm SoCs");
{ "pile_set_name": "Github" }
'use strict'; const child_process = require('child_process'); const fs = require('fs'); const path = require('path'); const runSequence = require('run-sequence'); const AWS = require('aws-sdk'); const s3 = new AWS.S3(); const lambda = new AWS.Lambda(); const cloudFormation = new AWS.CloudFormation(); const packageInfo = require('../../package.json'); const lib = require('./gulp-lib'); const { CFN_S3_BUCKET: Bucket, CFN_S3_PREFIX, STACK_NAME, SOURCE_BUCKET, DESTINATION_BUCKET, FFMPEG_ARGS, USE_GZIP, MIME_TYPES, VIDEO_MAX_DURATION, EXECUTION_ROLE_ARN, CI, CLOUDFORMATION_ROLE_ARN, } = process.env; const s3Prefix = CFN_S3_PREFIX || packageInfo.name; const templateKey = `${s3Prefix}/cloudformation.template`; const lambdaKey = `${s3Prefix}/lambda.zip`; const StackName = STACK_NAME || packageInfo.name; const now = new Date(); function getCloudFormationOperation(StackName) { return cloudFormation .describeStacks({ StackName }) .promise() .then(() => 'updateStack') .catch(() => 'createStack'); } function printEventsAndWaitFor(condition, StackName) { let lastEvent; // Print the stack events while we're waiting for the stack to complete const interval = setInterval( () => cloudFormation .describeStackEvents({ StackName }) .promise() .then(({StackEvents}) => { const newEvents = []; for (const stackEvent of StackEvents) { if (stackEvent.EventId === lastEvent || stackEvent.Timestamp < now) break; newEvents.unshift(stackEvent); } for (const stackEvent of newEvents) { console.log( lib.stackEventToRow(stackEvent) ); } // Timeout of 15 minutes if (new Date() - now > 9e5) process.exit(1); const [firstItem] = StackEvents; if (firstItem) lastEvent = firstItem.EventId; }) .catch(() => clearInterval(interval)), 5e3 // 5 seconds ); console.log(lib.head); return cloudFormation .waitFor(condition, { StackName }) .promise() .then(() => { clearInterval(interval); console.log(lib.table.borderBottom); }); } module.exports = function(gulp, prefix) { // Upload the function code to S3 gulp.task(`${prefix}:upload`, () => Promise .all([ { Key: templateKey, file: './platform/aws/cloudformation.json' }, { Key: lambdaKey, file: 'dist.zip' } ].map(({Key, file}) => s3 .putObject({ Bucket, Key, Body: fs.createReadStream(file) }) .promise() )) ); // Deploy the CloudFormation Stack gulp.task(`${prefix}:deployStack`, () => { const Parameters = [ ['SourceBucketName', SOURCE_BUCKET], ['DestinationBucketName', DESTINATION_BUCKET], ['LambdaS3Bucket', Bucket], ['LambdaS3Key', lambdaKey], ['FFmpegArgs', FFMPEG_ARGS], ['UseGzip', USE_GZIP], ['MimeTypes', MIME_TYPES], ['VideoMaxDuration', VIDEO_MAX_DURATION], CI ? ['ExecutionRoleManagedPolicyArn', EXECUTION_ROLE_ARN] : undefined ] .filter(val => val) .map(([ParameterKey, ParameterValue]) => ({ParameterKey, ParameterValue})); return getCloudFormationOperation(StackName) .then(operation => cloudFormation [operation]({ StackName, Capabilities: [ 'CAPABILITY_IAM' ], Parameters, RoleARN: CLOUDFORMATION_ROLE_ARN || undefined, TemplateURL: `https://s3.amazonaws.com/${Bucket}/${templateKey}` }) .promise() .then(() => `stack${operation === 'createStack' ? 'Create' : 'Update'}Complete`) ) .then(condition => printEventsAndWaitFor(condition, StackName)) .catch(console.error); }); gulp.task(`${prefix}:deleteStack`, () => cloudFormation .deleteStack({ StackName, RoleARN: CLOUDFORMATION_ROLE_ARN || undefined, }) .promise() .then(() => printEventsAndWaitFor('stackDeleteComplete', StackName)) ); // Once the stack is deployed, this will update the function if the code is changed without recreating the stack gulp.task(`${prefix}:updateCode`, () => cloudFormation .describeStackResource({ StackName, LogicalResourceId: 'Lambda' }) .promise() .then(({StackResourceDetail: {PhysicalResourceId: FunctionName}}) => lambda .updateFunctionCode({ FunctionName, S3Bucket: Bucket, S3Key: lambdaKey }) .promise() ) ); // Builds the function and uploads gulp.task(`${prefix}:build-upload`, () => runSequence( 'clean', 'download-ffmpeg', `${prefix}:source`, 'npm', 'untar-ffmpeg', 'copy-ffmpeg', 'zip', `${prefix}:upload` )); // For an already created stack gulp.task(`${prefix}:update`, () => runSequence( `${prefix}:build-upload`, `${prefix}:updateCode` )); // For a new stack (or you change cloudformation.json) gulp.task(`${prefix}:default`, () => runSequence( `${prefix}:build-upload`, `${prefix}:deployStack` )); const ciStackName = `CI-for-${StackName}`; gulp.task(`${prefix}:ci-bootstrap`, () => { const StackName = ciStackName; const simpleGit = require('simple-git')(); const outputEnvMap = new Map([ ['CIUserAccessKey', 'AWS_ACCESS_KEY_ID'], ['CIUserSecretKey', 'AWS_SECRET_ACCESS_KEY'], ['CIRegion', 'AWS_REGION'], ['ServiceRoleArn', 'CLOUDFORMATION_ROLE_ARN'], ['ModulePolicyArn', 'EXECUTION_ROLE_ARN'], ['Bucket', 'CFN_S3_BUCKET'] ]); return Promise .all([ getCloudFormationOperation(StackName), new Promise((resolve, reject) => simpleGit.getRemotes( true, (err, data) => err ? reject(err) : resolve(data) ) ) .then(remotes => { for (const {refs: {fetch: url}} of remotes) { // Use GitHub user and repo name for StackPrefix if (/github\.com/.test(url)) { return url .replace(/^.*github.com[:/]/, '') .replace(/\.git$/, '') .replace(/\//g, '-'); } } return packageInfo.name; }) ]) .then(([operation, ParameterValue]) => cloudFormation[operation]({ StackName, Capabilities: [ 'CAPABILITY_NAMED_IAM' ], Parameters: [ { ParameterKey: 'StackPrefix', ParameterValue, } ], TemplateBody: fs.readFileSync( path.join( __dirname, '../../test/integration/aws/bootstrap.template' ), { encoding: 'utf8' } ) }) .promise() .then(() => `stack${operation === 'createStack' ? 'Create' : 'Update'}Complete`) ) .then(condition => printEventsAndWaitFor(condition, StackName)) .catch(console.error) .then(() => cloudFormation .describeStacks({ StackName }) .promise() ) .then(({Stacks: [{Outputs}]}) => console.log( Outputs .map(({OutputKey, OutputValue}) => `${outputEnvMap.get(OutputKey)}=${OutputValue}`) .join('\n') )) }); gulp.task(`${prefix}:create-cfn-bucket`, () => s3 .createBucket({ Bucket }) .promise() .catch(console.error) ); };
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- generated on Tue Mar 3 08:46:38 2020 by Eclipse SUMO Version v1_5_0+0337-8d59749 This data file and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html SPDX-License-Identifier: EPL-2.0 <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> <input> <net-file value="three_split.net.xml"/> <additional-files value="input_routes.rou.xml,input_additional2.add.xml"/> </input> <output> <write-license value="true"/> <tripinfo-output value="tripinfos.xml"/> </output> <time> <begin value="0"/> </time> <processing> <default.speeddev value="0"/> <pedestrian.model value="nonInteracting"/> </processing> <report> <xml-validation value="never"/> <duration-log.disable value="true"/> <no-step-log value="true"/> </report> <mesoscopic> <mesosim value="true"/> </mesoscopic> </configuration> --> <tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd"> <tripinfo id="0" depart="0.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="18.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_0" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="1" depart="20.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="38.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_1" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="2" depart="40.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="58.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_2" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="3" depart="60.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="78.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_3" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="4" depart="80.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="98.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_4" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="5" depart="100.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="118.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_5" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="6" depart="120.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="138.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_6" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="7" depart="140.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="158.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_7" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="8" depart="160.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="178.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_8" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> <tripinfo id="9" depart="180.00" departLane="" departPos="0.00" departSpeed="27.80" departDelay="0.00" arrival="198.00" arrivalLane="" arrivalPos="0.00" arrivalSpeed="27.80" duration="18.00" routeLength="500.00" waitingTime="0.00" waitingCount="0" stopTime="0.00" timeLoss="0.00" rerouteNo="0" devices="tripinfo_9" vType="DEFAULT_VEHTYPE" speedFactor="1.00" vaporized="vaporizer"/> </tripinfos>
{ "pile_set_name": "Github" }
Size: - 0.1 - 0.1 - 0.1 Color: - 0.85253966 - 0.94 - 0.66 - 1 Body: Animated Pose: - - -0.8895867 - 0.4554928 - 3.409159e-2 - 0.21872646 - - 0.15644582 - 0.23371726 - 0.9596359 - 4.0068145 - - 0.4291394 - 0.85901266 - -0.27917182 - 9.13257 - - 0.0 - 0.0 - 0.0 - 1 Shape: Cube
{ "pile_set_name": "Github" }
<?xml version='1.0' ?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="StandardTransforms.xsl"/> <xsl:output method="text"/> <xsl:template match="Processes"> <xsl:text> PID PARENT CREATE TIME NAME</xsl:text> <xsl:text>&#x0D;&#x0A;</xsl:text> <xsl:text>-------------------------------------------------------------------------------</xsl:text> <xsl:text>&#x0D;&#x0A;</xsl:text> <xsl:apply-templates select="Process"/> </xsl:template> <xsl:template match="Process"> <xsl:variable name="procdate" select="substring-before(@procTime, 'T')" /> <xsl:variable name="proctime" select="substring-after (@procTime, 'T')" /> <xsl:variable name="procyear" select="substring-before($procdate, '-')" /> <xsl:variable name="procmonth" select="substring-before(substring-after($procdate, '-'), '-')" /> <xsl:variable name="procday" select="substring-after(substring-after($procdate, '-'), '-')" /> <xsl:variable name="prochour" select="substring-before($proctime, ':')" /> <xsl:variable name="procminute" select="substring-before(substring-after($proctime, ':'), ':')" /> <xsl:variable name="procsecond" select="substring-after(substring-after($proctime, ':'), ':')" /> <xsl:variable name="kerntime" select="substring-after (@kernTime, 'T')" /> <xsl:variable name="kernhour" select="substring-before($kerntime, ':')" /> <xsl:variable name="kernminute" select="substring-before(substring-after($kerntime, ':'), ':')" /> <xsl:variable name="kernsecond" select="substring-after(substring-after($kerntime, ':'), ':')" /> <xsl:variable name="usertime" select="substring-after (@userTime, 'T')" /> <xsl:variable name="userhour" select="substring-before($usertime, ':')" /> <xsl:variable name="userminute" select="substring-before(substring-after($usertime, ':'), ':')" /> <xsl:variable name="usersecond" select="substring-after(substring-after($usertime, ':'), ':')" /> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="ceiling((12 - string-length(@id)) div 2)" /> </xsl:call-template> <xsl:value-of select="@id" /> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="floor((12 - string-length(@id)) div 2)" /> </xsl:call-template> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="ceiling((12 - string-length(@parent)) div 2)" /> </xsl:call-template> <xsl:value-of select="@parent" /> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="floor((12 - string-length(@parent)) div 2)" /> </xsl:call-template> <xsl:choose> <xsl:when test="@procTime"> <xsl:variable name="createFormat" select="concat(' ', format-number($procmonth, '00'), '/', format-number($procday, '00'), '/', format-number($procyear, '0000'), ' ', format-number($prochour, '00'), ':', format-number($procminute, '00'), ':', format-number($procsecond, '00'), ' ' )"/> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="22 - string-length($createFormat)" /> </xsl:call-template> <xsl:value-of select="$createFormat" /> </xsl:when> <xsl:otherwise> <xsl:variable name="createFormat" select="concat(' ', format-number(0, '00'), '/', format-number(0, '00'), '/', format-number(0, '0000'), ' ', format-number(0, '00'), ':', format-number(0, '00'), ':', format-number(0, '00'), ' ' )"/> <xsl:call-template name="Whitespace"> <xsl:with-param name="i" select="22 - string-length($createFormat)" /> </xsl:call-template> <xsl:value-of select="$createFormat" /> </xsl:otherwise> </xsl:choose> <xsl:text> </xsl:text> <xsl:call-template name="StripPath"> <xsl:with-param name="path" select="."/> </xsl:call-template> <xsl:text>&#x0D;&#x0A;</xsl:text> <xsl:if test="string-length(@comment) > 0"> <xsl:text>&#x09;</xsl:text> <xsl:value-of select="@comment"/> <xsl:text>&#x0D;&#x0A;</xsl:text> </xsl:if> </xsl:template> <!-- Functions --> <xsl:template name="StripPath"> <xsl:param name="path"/> <xsl:choose> <xsl:when test="contains($path, '\')"> <xsl:call-template name="StripPath"> <xsl:with-param name="path" select="substring-after($path, '\')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$path"/> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:transform>
{ "pile_set_name": "Github" }
<?php /* * This file is part of PHP CS Fixer. * * (c) Fabien Potencier <[email protected]> * Dariusz Rumiński <[email protected]> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Whitespace; use PhpCsFixer\AbstractFixer; use PhpCsFixer\FixerDefinition\FixerDefinition; use PhpCsFixer\FixerDefinition\VersionSpecification; use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample; use PhpCsFixer\Tokenizer\CT; use PhpCsFixer\Tokenizer\Tokens; /** * @author Jack Cherng <[email protected]> */ final class CompactNullableTypehintFixer extends AbstractFixer { /** * {@inheritdoc} */ public function getDefinition() { return new FixerDefinition( 'Remove extra spaces in a nullable typehint.', [ new VersionSpecificCodeSample( "<?php\nfunction sample(? string \$str): ? string\n{}\n", new VersionSpecification(70100) ), ], 'Rule is applied only in a PHP 7.1+ environment.' ); } /** * {@inheritdoc} */ public function isCandidate(Tokens $tokens) { return \PHP_VERSION_ID >= 70100 && $tokens->isTokenKindFound(CT::T_NULLABLE_TYPE); } /** * {@inheritdoc} */ protected function applyFix(\SplFileInfo $file, Tokens $tokens) { static $typehintKinds = [ CT::T_ARRAY_TYPEHINT, T_CALLABLE, T_NS_SEPARATOR, T_STRING, ]; for ($index = $tokens->count() - 1; $index >= 0; --$index) { if (!$tokens[$index]->isGivenKind(CT::T_NULLABLE_TYPE)) { continue; } // remove whitespaces only if there are only whitespaces // between '?' and the variable type if ( $tokens[$index + 1]->isWhitespace() && $tokens[$index + 2]->isGivenKind($typehintKinds) ) { $tokens->removeTrailingWhitespace($index); } } } }
{ "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 "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }}
{ "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 "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag<N1>::type , typename times_tag<N2>::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }}
{ "pile_set_name": "Github" }