text
stringlengths
2
99.9k
meta
dict
'use strict' const childProcess = require('child_process') , childModule = require.resolve('./child/index') function fork (forkModule, workerOptions) { // suppress --debug / --inspect flags while preserving others (like --harmony) let filteredArgs = process.execArgv.filter(function (v) { return !(/^--(debug|inspect)/).test(v) }) , options = Object.assign({ execArgv : filteredArgs , env : process.env , cwd : process.cwd() }, workerOptions) , child = childProcess.fork(childModule, process.argv, options) child.on('error', function() { // this *should* be picked up by onExit and the operation requeued }) child.send({ owner: 'farm', module: forkModule }) // return a send() function for this child return { send : child.send.bind(child) , child : child } } module.exports = fork
{ "pile_set_name": "Github" }
package org.hswebframework.web.authorization.simple.builder; import com.alibaba.fastjson.JSON; import org.hswebframework.web.authorization.access.DataAccessConfig; import org.hswebframework.web.authorization.builder.DataAccessConfigBuilder; import org.hswebframework.web.authorization.builder.DataAccessConfigBuilderFactory; import org.hswebframework.web.authorization.simple.*; import javax.annotation.PostConstruct; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.function.BiFunction; import static org.hswebframework.web.authorization.access.DataAccessConfig.DefaultType.*; import static org.hswebframework.web.authorization.access.DataAccessConfig.DefaultType.CUSTOM; import static org.hswebframework.web.authorization.access.DataAccessConfig.DefaultType.OWN_CREATED; /** * @author zhouhao */ public class SimpleDataAccessConfigBuilderFactory implements DataAccessConfigBuilderFactory { private List<String> defaultSupportConvert = Arrays.asList( CUSTOM, OWN_CREATED, FIELD_SCOPE, DENY_FIELDS); private List<DataAccessConfigConvert> converts = new LinkedList<>(); public SimpleDataAccessConfigBuilderFactory addConvert(DataAccessConfigConvert configBuilderConvert) { Objects.requireNonNull(configBuilderConvert); converts.add(configBuilderConvert); return this; } public void setDefaultSupportConvert(List<String> defaultSupportConvert) { this.defaultSupportConvert = defaultSupportConvert; } public List<String> getDefaultSupportConvert() { return defaultSupportConvert; } protected DataAccessConfigConvert createJsonConfig(String supportType, Class<? extends AbstractDataAccessConfig> clazz) { return createConfig(supportType, (action, config) -> JSON.parseObject(config, clazz)); } protected DataAccessConfigConvert createConfig(String supportType, BiFunction<String, String, ? extends DataAccessConfig> function) { return new DataAccessConfigConvert() { @Override public boolean isSupport(String type, String action, String config) { return supportType.equals(type); } @Override public DataAccessConfig convert(String type, String action, String config) { DataAccessConfig conf = function.apply(action, config); if (conf instanceof AbstractDataAccessConfig) { ((AbstractDataAccessConfig) conf).setAction(action); } return conf; } }; } @PostConstruct public void init() { if (defaultSupportConvert.contains(FIELD_SCOPE)) { converts.add(createJsonConfig(FIELD_SCOPE, SimpleFiledScopeDataAccessConfig.class)); } if (defaultSupportConvert.contains(DENY_FIELDS)) { converts.add(createJsonConfig(DENY_FIELDS, SimpleFieldFilterDataAccessConfig.class)); } if (defaultSupportConvert.contains(OWN_CREATED)) { converts.add(createConfig(OWN_CREATED, (action, config) -> new SimpleOwnCreatedDataAccessConfig(action))); } if (defaultSupportConvert.contains(SCRIPT)) { converts.add(createJsonConfig(SCRIPT, SimpleScriptDataAccessConfig.class)); } if (defaultSupportConvert.contains(CUSTOM)) { converts.add(createConfig(CUSTOM, (action, config) -> new SimpleCustomDataAccessConfigConfig(config))); } } @Override public DataAccessConfigBuilder create() { return new SimpleDataAccessConfigBuilder(converts); } }
{ "pile_set_name": "Github" }
! ! 5 ! </S> 3 $6,100,000,000 $6,100,000,000 2 $6,100,000,000 measure 2 $60 $60 2 $60 million 2 $600 $600 2 $600 per 2 $67,000 $67,000 2 $67,000 to 2 $740,000 $740,000 2 $740,000 in 2 $8,555 $8,555 2 $8,555 to 2 $88,000 $88,000 2 $88,000 was 2 & & 4 & Co. 2 & I 2 '' ' 390 -- - 124 / 2 2 1,000 1,000 2 1,000 churches 2 1,119 1,119 2 1,119 votes 2 1,700 1,700 2 1,700 Johnston 2 1-1/2 1 2 1.5 1.5 2 1.5 billion 2 11 11 8 11 candidates 2 11 senators 2 11 states 4 114 114 2 114 to 2 12 12 6 12 months 4 12 semester 2 12 states 2 12,000 12,000 2 12,000 babies 2 125,000 125,000 2 125,000 each 2 14.2 14.2 2 14.2 million 2 1409 1409 2 1409 SW 2 15 , 2 15 15 6 15 was 2 15 years 2 150 150 2 150 representatives 2 150,000,000 150,000,000 4 150,000,000 people 2 150,000,000 would 2 16 16 8 16 basic 2 16 beliefs 2 16 sectors 2 16,000 16,000 2 16,000 military 2 1600 1600 2 1600 Pennsylvania 2 169 169 2 169 years 2 17 , 2 17 17 8 17 million 2 17 months 4 17,000 17,000 2 17,000 retailers 2 2 ) 2 2 , 2 2 2 10 2 </S> 2 2 minutes 2 2 per 2 20 . 2 20 20 8 20 million 2 20 new 4 200 200 6 200 ; 2 200 Democratic 2 200 persons 2 21 21 4 21 millions 2 21 were 2 21st 21st 2 21st and 2 22 . 2 22 22 2 23d 23d 8 23d ward 8 24 ( 2 24 24 14 24 hour 4 24 semester 2 24 to 4 240 240 2 240 days 2 24th , 2 24th 24th 2 25 25 2 25 that 2 250 250 2 250 people 2 28th 28th 2 28th precincts 2 29 , 2 29 - 2 29 29 2 29-5 29 2 29th 29th 4 29th general 2 29th ward 2 2d 2d 2 2d St. 2 3 ( 2 3 , 2 3 - 2 3 3 10 3 per 4 3 vote 2 3.25 3.25 2 3.25 per 2 31 . 6 31 31 4 31st 31st 2 31st ward 2 330 330 2 330 Woodland 2 33d , 2 33d 33d 2 35 35 6 35 persons 2 35 years 4 350 350 2 350 persons 2 36 36 2 36 years 2 3646 3646 2 3646 N. 2 39 . 2 39 39 2 4 , 2 4 - 4 4 4 12 4 : 2 4 ballot 4 4 from 2 4 system 2 4 to 2 4-year 4 4 4.4 4.4 2 4.4 million 2 40 40 2 40 marching 2 400,000,000 400,000,000 2 400,000,000 inhabitants 2 402 . 2 402 402 2 41 , 2 41 41 2 42 , 2 42 42 2 42d 42d 2 42d precincts 2 47 47 2 47 dental 2 48 48 4 48 board 2 48 to 2 4911 4911 2 4911 Miles 2 4:30 4 2 4th 4th 2 4th ward 2 5 . 2 5.1 5.1 2 5.1 million 2 50 50 4 50 millions 2 50 persons 2 500 500 2 500 women 2 5000 5000 2 5000 women 2 520 - 2 520-acre 520 2 540 540 2 540 million 2 58th 58th 4 58th precinct 4 6 - 4 6 6 4 6 and 2 6 per 2 6,000 6,000 2 6,000 Communist 2 6-12 6 2 6-3-3 6 2 6.5 6.5 2 6.5 per 2 60 60 4 60 ; 2 60 days 2 61st 61st 2 61st St. 2 62 budget 2 62 session 2 63 63 2 63 million 2 637 637 2 637 E. 2 65 65 6 65 kept 2 65 who 4 677 677 2 677 persons 2 7 7 6 7 Democratic 2 7 against 2 7 p.m. 2 7,000 7,000 2 7,000 churches 2 7.5 7.5 2 7.5 per 2 70 70 6 70 Harvard 2 70 days 2 70 million 2 700 700 2 700 million 2 71 . 2 71 71 2 74 74 4 74 and 2 74 percent 2 75 , 2 75 75 2 750 750 2 750 million 2 8 - 2 8 8 8 8 a.m. 2 8 election 2 8 in 2 8 p.m. 2 8,000 8,000 2 8,000 new 2 8-4 8 2 800 800 2 800 in 2 81 81 2 81 to 2 87 - 2 87-31 87 2 9 ( 2 9 -- 2 9 9 6 9 </S> 2 90 90 2 90 days 2 900 - 2 900-student 900 2 92 92 2 92 medical 2 95 95 2 95 percent 2 9th 9th 2 9th precinct 2 : ' 2 : ( 2 : -- 2 : 1 4 : 30 2 : : 46 : </S> 13 : Relatively 2 : `` 13 : more 2 ; ; 48 ; </S> 8 ; division 2 ? </S> 21 ? ? 35 A. A 28 Aj , 2 Aj . 4 Aj Aj 6 B . 14 B. B 14 C . 22 C. C 22 CD CD 14 CD director 6 CD head 2 CD headquarters 2 CD job 2 CD vehicle 2 D ) 2 D . 16 D D 2 D. D 16 Dwight D. 2 Dwight Dwight 6 Dwight L. 2 Dwight M. 2 E . 14 E. E 14 Eugene A. 2 Eugene Eugene 6 Eugene Shiflett 2 Eugene at 2 European European 4 European nations 2 European waters 2 F . 12 F. F 12 FBI FBI 2 FBI man 2 G . 6 G. G 6 Ghana Ghana 2 Ghana an 2 H . 10 H. H 10 Hyannis Hyannis 2 Hyannis Port 2 I'd just 2 I'll be 2 I'm a 2 I'm not 2 I'm willing 2 Ierulli , 2 Ierulli Ierulli 6 Ierulli has 2 Ierulli will 2 Ignition Ignition 2 Ignition sets 2 Ike Ike 2 Irish Counties 2 Irish Irish 2 Ivan Allen 4 Ivan Ivan 4 J . 30 J. J 30 Jim ' 2 Jim , 2 Jim Jim 6 Jim Sheeran 2 Jimmie H. 2 Jimmie Jimmie 2 Jr . 18 Jr. Jr 18 K . 2 K. K 2 Khrushchev Khrushchev 4 Khrushchev pulled 2 Khrushchev was 2 Kremlin Kremlin 4 Kremlin for 2 Kremlin through 2 L . 14 L. L 14 Lt . 2 Lt. Lt 2 M . 16 M. M 16 McConnell McConnell 2 McConnell indorsed 2 McLemore , 2 McLemore McLemore 2 Mr . 106 Mr. Mr 106 Mrs . 16 Mrs. Mrs 16 My My 2 My experience 2 N . 4 N. N 4 Njust , 2 Njust Njust 2 O . 4 O'Connor's O'Connor's 2 O'Connor's novel 2 O'Neill Jr. 2 O'Neill O'Neill 4 O'Neill are 2 O. O 4 Oak Grove 2 Oak Lodge 2 Oak Oak 4 Oct . 4 Oct. Oct 4 October 1944 2 October October 2 Okla . 2 Okla. Okla 2 Oklahoma , 2 Oklahoma . 2 Oklahoma Oklahoma 6 Oklahoma high 2 Old Old 2 Old and 2 Oslo , 2 Oslo Oslo 10 Oslo attempt 2 Oslo in 2 Oslo meeting 2 P . 8 P. P 8 PTC , 2 PTC PTC 6 PTC as 2 PTC is 2 Pfaff Jr. 2 Pfaff Pfaff 8 Pfaff for 2 Pfaff served 2 Pfaff succeeds 2 Pye Pye 2 Pye to 2 R ) 2 R . 16 R R 2 R-Bergen , 2 R-Bergen R-Bergen 2 R-Cape May 2 R-Cape R-Cape 2 R-Warren R-Warren 2 R-Warren did 2 R. R 16 Rd . 2 Rd. Rd 2 Rhode Island 10 Rhode Rhode 10 S . 8 S. S 8 S.P.C.A . 2 S.P.C.A. S.P.C.A 2 SW Maplecrest 2 SW SW 2 Snodgrass , 2 Snodgrass Snodgrass 2 Square , 2 Square Square 4 Square will 2 Sr . 2 Sr. Sr 2 T . 6 T. T 6 TNT TNT 2 TNT or 2 Tyler Tyler 2 Tyler lawyer 2 U . 6 U. U 6 U.S . 10 U.S. U.S 10 Ullman , 2 Ullman Ullman 2 V . 4 V. V 4 W . 20 W. W 20 W.M . 2 W.M. W.M 2 Y . 2 Y. Y 2 Zimmerman , 4 Zimmerman Zimmerman 6 Zimmerman was 2 Zone . 2 Zone Zone 2 Zurich , 2 Zurich Zurich 4 Zurich by 2 `` ` 410 a-plate dinner 2 a.m . 2 a.m. a.m 2 ahead '' 2 ahead ahead 6 ahead of 2 awarding awarding 2 awarding of 2 awareness awareness 2 awareness of 2 away . 2 away away 4 away from 2 ayes '' 2 ayes ayes 2 d'etat . 2 dwellings dwellings 2 dwellings to 2 dynamic administration 2 dynamic dynamic 2 episode episode 2 episode is 2 equal equal 2 equal to 2 equally divided 2 equally equally 2 equipment equipment 2 equipment needed 2 equitable '' 2 equitable equitable 2 ethical climate 2 ethical ethical 2 eye eye 2 eye to 2 eyes eyes 2 eyes focused 2 idea , 2 idea idea 4 idea of 2 ideas ideas 2 ideas that 2 identical , 2 identical identical 2 identified as 2 identified identified 2 ignition ignition 2 ignition when 2 ignored ignored 2 ignored in 2 iron iron 2 iron out 2 irregularities '' 2 irregularities at 2 irregularities irregularities 6 irregularities took 2 ivory ivory 2 ivory tusks 2 lumber companies 2 lumber lumber 2 luncheon at 2 luncheon luncheon 4 luncheon together 2 lying lying 2 lying on 2 my candidacy 2 my client 2 my fellow 2 my man 2 my my 10 my political 2 oath-taking ceremonies 2 oath-taking oath-taking 2 occupancy occupancy 2 occupancy rates 2 occupation as 2 occupation license 2 occupation occupation 4 occupying occupying 2 occupying seats 2 odds favor 2 odds odds 2 old . 2 old national 2 old old 6 old ones 2 older older 2 older ones 2 p.m . 6 p.m. p.m 6 skills and 2 skills skills 2 slate , 2 slate slate 2 sledding later 2 sledding sledding 2 slogans slogans 2 slogans to 2 slowed slowed 2 slowed with 2 slums and 2 slums slums 2 square are 2 square square 4 squeeze '' 2 squeeze squeeze 2 squeezed out 2 squeezed squeezed 2 sway Cotten's 2 sway sway 2 swearing in 2 swearing swearing 2 swipe at 2 swipe swipe 2 type of 2 type type 2 types of 2 types types 2 utilities , 2 utilities and 2 utilities utilities 4 utility companies 2 utility utility 2
{ "pile_set_name": "Github" }
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"/> </resources>
{ "pile_set_name": "Github" }
{ "pile_set_name": "Github" }
require_relative "../../test_helper" class Test::Proxy::Routing::TestExplicitWebAppHost < Minitest::Test include ApiUmbrellaTestHelpers::Setup include Minitest::Hooks def setup super @refute_fallback_website = true setup_server once_per_class_setup do prepend_api_backends([ { :frontend_host => "#{unique_test_class_id}-apis-no-website.foo", :backend_host => "apis-no-website.bar", :servers => [{ :host => "127.0.0.1", :port => 9444 }], :url_matches => [{ :frontend_prefix => "/#{unique_test_class_id}-api/", :backend_prefix => "/" }], }, ]) prepend_website_backends([ { :frontend_host => "#{unique_test_class_id}-website.foo", :server_host => "127.0.0.1", :server_port => 9443, }, ]) override_config_set({ "router" => { "web_app_host" => "127.0.0.1", }, }, "--router") end end def after_all super override_config_reset("--router") end include ApiUmbrellaSharedTests::Routing end
{ "pile_set_name": "Github" }
/* * Copyright (c) 2014 Andrew O'Malley * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.github.andrewoma.dexx.collection.mutable; import com.github.andrewoma.dexx.collection.Builder; import com.github.andrewoma.dexx.collection.BuilderFactory; import com.github.andrewoma.dexx.collection.Set; import com.github.andrewoma.dexx.collection.internal.base.AbstractSet; import com.github.andrewoma.dexx.collection.internal.builder.AbstractBuilder; import org.jetbrains.annotations.NotNull; import java.util.HashSet; import java.util.Iterator; /** * */ public class MutableHashSet<A> extends AbstractSet<A> { private java.util.Set<A> underlying = new HashSet<A>(); @NotNull public static <A> BuilderFactory<A, Set<A>> factory() { return new BuilderFactory<A, Set<A>>() { @NotNull @Override public Builder<A, Set<A>> newBuilder() { return new MutableHashSetBuilder<A>(); } }; } private MutableHashSet(java.util.Set<A> underlying) { this.underlying = underlying; } @NotNull @Override public Set<A> add(A value) { underlying.add(value); return this; } @NotNull @Override public Set<A> remove(A value) { underlying.remove(value); return this; } @Override public int size() { return underlying.size(); } @Override public boolean contains(A value) { return underlying.contains(value); } @NotNull @Override public Iterator<A> iterator() { return underlying.iterator(); } static class MutableHashSetBuilder<A> extends AbstractBuilder<A, Set<A>> implements Builder<A, Set<A>> { private java.util.Set<A> result = new HashSet<A>(); @NotNull @Override public Builder<A, Set<A>> add(A element) { result.add(element); return this; } @NotNull @Override public Set<A> doBuild() { return new MutableHashSet<A>(result); } } }
{ "pile_set_name": "Github" }
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("placeholder","si",{title:"ස්ථාන හීම්කරුගේ ",toolbar:"ස්ථාන හීම්කරු නිර්මාණය කිරීම",name:"Placeholder Name",invalidName:"The placeholder can not be empty and can not contain any of following characters: [, ], \x3c, \x3e",pathName:"placeholder"});
{ "pile_set_name": "Github" }
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //// PARTICULAR PURPOSE. //// //// Copyright (c) Microsoft Corporation. All rights reserved #include "pch.h" #include "BasicCamera.h" void BasicCamera::GetViewMatrix(_Out_ float4x4 *viewMatrix) { *viewMatrix = m_view; } void BasicCamera::GetProjectionMatrix(_Out_ float4x4 *projectionMatrix) { *projectionMatrix = m_projection; } // this method updates the view matrix based on new position and focus coordinates void BasicCamera::SetViewParameters( _In_ float3 eyePosition, // the position of the camera _In_ float3 lookPosition, // the point the camera should look at _In_ float3 up // the durection vector for up ) { m_position = eyePosition; m_direction = normalize(lookPosition - eyePosition); float3 zAxis = -m_direction; float3 xAxis = normalize(cross(up, zAxis)); float3 yAxis = cross(zAxis, xAxis); float xOffset = -dot(xAxis, m_position); float yOffset = -dot(yAxis, m_position); float zOffset = -dot(zAxis, m_position); m_view = float4x4( xAxis.x, xAxis.y, xAxis.z, xOffset, yAxis.x, yAxis.y, yAxis.z, yOffset, zAxis.x, zAxis.y, zAxis.z, zOffset, 0.0f, 0.0f, 0.0f, 1.0f ); } // this method updates the projection matrix based on new parameters void BasicCamera::SetProjectionParameters( _In_ float minimumFieldOfView, // the minimum horizontal or vertical field of view, in degrees _In_ float aspectRatio, // the aspect ratio of the projection (width / height) _In_ float nearPlane, // depth to map to 0 _In_ float farPlane // depth to map to 1 ) { float minScale = 1.0f / tan(minimumFieldOfView * PI_F / 360.0f); float xScale = 1.0f; float yScale = 1.0f; if (aspectRatio < 1.0f) { xScale = minScale; yScale = minScale * aspectRatio; } else { xScale = minScale / aspectRatio; yScale = minScale; } float zScale = farPlane / (farPlane - nearPlane); m_projection = float4x4( xScale, 0.0f, 0.0f, 0.0f, 0.0f, yScale, 0.0f, 0.0f, 0.0f, 0.0f, -zScale, -nearPlane*zScale, 0.0f, 0.0f, -1.0f, 0.0f ); }
{ "pile_set_name": "Github" }
/* sf_modf.c -- float version of s_modf.c. * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ #include "fdlibm.h" #ifdef __STDC__ float modff(float x, float *iptr) #else float modff(x, iptr) float x,*iptr; #endif { __int32_t i0,j0; __uint32_t i; GET_FLOAT_WORD(i0,x); j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */ if(j0<23) { /* integer part in x */ if(j0<0) { /* |x|<1 */ SET_FLOAT_WORD(*iptr,i0&0x80000000); /* *iptr = +-0 */ return x; } else { i = (0x007fffff)>>j0; if((i0&i)==0) { /* x is integral */ *iptr = x; SET_FLOAT_WORD(x,i0&0x80000000); /* return +-0 */ return x; } else { SET_FLOAT_WORD(*iptr,i0&(~i)); return x - *iptr; } } } else { /* no fraction part */ *iptr = x; if (__fpclassifyf(x) == FP_NAN) return *iptr = x+x; /* x is NaN, return NaN */ SET_FLOAT_WORD(x,i0&0x80000000); /* return +-0 */ return x; } } #ifdef _DOUBLE_IS_32BITS #ifdef __STDC__ double modf(double x, double *iptr) #else double modf(x, iptr) double x,*iptr; #endif { return (double) modff((float) x, (float *) iptr); } #endif /* defined(_DOUBLE_IS_32BITS) */
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <translation xmlns="http://docs.openrepose.org/repose/translation/v1.0"> <request-translations> <request-translation http-methods="ALL" content-type="*/*" accept="*/*" translated-content-type=""> <style-sheets> <style id="request-3" href="uri-translation.xsl"/> </style-sheets> </request-translation> </request-translations> </translation>
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- import copy import datetime import sys from blist import sortedlist from .util import add_raw_postfix from .util import dt_to_ts from .util import EAException from .util import elastalert_logger from .util import elasticsearch_client from .util import format_index from .util import hashable from .util import lookup_es_key from .util import new_get_event_ts from .util import pretty_ts from .util import total_seconds from .util import ts_now from .util import ts_to_dt class RuleType(object): """ The base class for a rule type. The class must implement add_data and add any matches to self.matches. :param rules: A rule configuration. """ required_options = frozenset() def __init__(self, rules, args=None): self.matches = [] self.rules = rules self.occurrences = {} self.rules['category'] = self.rules.get('category', '') self.rules['description'] = self.rules.get('description', '') self.rules['owner'] = self.rules.get('owner', '') self.rules['priority'] = self.rules.get('priority', '2') def add_data(self, data): """ The function that the ElastAlert client calls with results from ES. Data is a list of dictionaries, from Elasticsearch. :param data: A list of events, each of which is a dictionary of terms. """ raise NotImplementedError() def add_match(self, event): """ This function is called on all matching events. Rules use it to add extra information about the context of a match. Event is a dictionary containing terms directly from Elasticsearch and alerts will report all of the information. :param event: The matching event, a dictionary of terms. """ # Convert datetime's back to timestamps ts = self.rules.get('timestamp_field') if ts in event: event[ts] = dt_to_ts(event[ts]) self.matches.append(copy.deepcopy(event)) def get_match_str(self, match): """ Returns a string that gives more context about a match. :param match: The matching event, a dictionary of terms. :return: A user facing string describing the match. """ return '' def garbage_collect(self, timestamp): """ Gets called periodically to remove old data that is useless beyond given timestamp. May also be used to compute things in the absence of new data. :param timestamp: A timestamp indicating the rule has been run up to that point. """ pass def add_count_data(self, counts): """ Gets called when a rule has use_count_query set to True. Called to add data from querying to the rule. :param counts: A dictionary mapping timestamps to hit counts. """ raise NotImplementedError() def add_terms_data(self, terms): """ Gets called when a rule has use_terms_query set to True. :param terms: A list of buckets with a key, corresponding to query_key, and the count """ raise NotImplementedError() def add_aggregation_data(self, payload): """ Gets called when a rule has use_terms_query set to True. :param terms: A list of buckets with a key, corresponding to query_key, and the count """ raise NotImplementedError() class CompareRule(RuleType): """ A base class for matching a specific term by passing it to a compare function """ required_options = frozenset(['compound_compare_key']) def expand_entries(self, list_type): """ Expand entries specified in files using the '!file' directive, if there are any, then add everything to a set. """ entries_set = set() for entry in self.rules[list_type]: if entry.startswith("!file"): # - "!file /path/to/list" filename = entry.split()[1] with open(filename, 'r') as f: for line in f: entries_set.add(line.rstrip()) else: entries_set.add(entry) self.rules[list_type] = entries_set def compare(self, event): """ An event is a match if this returns true """ raise NotImplementedError() def add_data(self, data): # If compare returns true, add it as a match for event in data: if self.compare(event): self.add_match(event) class BlacklistRule(CompareRule): """ A CompareRule where the compare function checks a given key against a blacklist """ required_options = frozenset(['compare_key', 'blacklist']) def __init__(self, rules, args=None): super(BlacklistRule, self).__init__(rules, args=None) self.expand_entries('blacklist') def compare(self, event): term = lookup_es_key(event, self.rules['compare_key']) if term in self.rules['blacklist']: return True return False class WhitelistRule(CompareRule): """ A CompareRule where the compare function checks a given term against a whitelist """ required_options = frozenset(['compare_key', 'whitelist', 'ignore_null']) def __init__(self, rules, args=None): super(WhitelistRule, self).__init__(rules, args=None) self.expand_entries('whitelist') def compare(self, event): term = lookup_es_key(event, self.rules['compare_key']) if term is None: return not self.rules['ignore_null'] if term not in self.rules['whitelist']: return True return False class ChangeRule(CompareRule): """ A rule that will store values for a certain term and match if those values change """ required_options = frozenset(['query_key', 'compound_compare_key', 'ignore_null']) change_map = {} occurrence_time = {} def compare(self, event): key = hashable(lookup_es_key(event, self.rules['query_key'])) values = [] elastalert_logger.debug(" Previous Values of compare keys " + str(self.occurrences)) for val in self.rules['compound_compare_key']: lookup_value = lookup_es_key(event, val) values.append(lookup_value) elastalert_logger.debug(" Current Values of compare keys " + str(values)) changed = False for val in values: if not isinstance(val, bool) and not val and self.rules['ignore_null']: return False # If we have seen this key before, compare it to the new value if key in self.occurrences: for idx, previous_values in enumerate(self.occurrences[key]): elastalert_logger.debug(" " + str(previous_values) + " " + str(values[idx])) changed = previous_values != values[idx] if changed: break if changed: self.change_map[key] = (self.occurrences[key], values) # If using timeframe, only return true if the time delta is < timeframe if key in self.occurrence_time: changed = event[self.rules['timestamp_field']] - self.occurrence_time[key] <= self.rules['timeframe'] # Update the current value and time elastalert_logger.debug(" Setting current value of compare keys values " + str(values)) self.occurrences[key] = values if 'timeframe' in self.rules: self.occurrence_time[key] = event[self.rules['timestamp_field']] elastalert_logger.debug("Final result of comparision between previous and current values " + str(changed)) return changed def add_match(self, match): # TODO this is not technically correct # if the term changes multiple times before an alert is sent # this data will be overwritten with the most recent change change = self.change_map.get(hashable(lookup_es_key(match, self.rules['query_key']))) extra = {} if change: extra = {'old_value': change[0], 'new_value': change[1]} elastalert_logger.debug("Description of the changed records " + str(dict(list(match.items()) + list(extra.items())))) super(ChangeRule, self).add_match(dict(list(match.items()) + list(extra.items()))) class FrequencyRule(RuleType): """ A rule that matches if num_events number of events occur within a timeframe """ required_options = frozenset(['num_events', 'timeframe']) def __init__(self, *args): super(FrequencyRule, self).__init__(*args) self.ts_field = self.rules.get('timestamp_field', '@timestamp') self.get_ts = new_get_event_ts(self.ts_field) self.attach_related = self.rules.get('attach_related', False) def add_count_data(self, data): """ Add count data to the rule. Data should be of the form {ts: count}. """ if len(data) > 1: raise EAException('add_count_data can only accept one count at a time') (ts, count), = list(data.items()) event = ({self.ts_field: ts}, count) self.occurrences.setdefault('all', EventWindow(self.rules['timeframe'], getTimestamp=self.get_ts)).append(event) self.check_for_match('all') def add_terms_data(self, terms): for timestamp, buckets in terms.items(): for bucket in buckets: event = ({self.ts_field: timestamp, self.rules['query_key']: bucket['key']}, bucket['doc_count']) self.occurrences.setdefault(bucket['key'], EventWindow(self.rules['timeframe'], getTimestamp=self.get_ts)).append(event) self.check_for_match(bucket['key']) def add_data(self, data): if 'query_key' in self.rules: qk = self.rules['query_key'] else: qk = None for event in data: if qk: key = hashable(lookup_es_key(event, qk)) else: # If no query_key, we use the key 'all' for all events key = 'all' # Store the timestamps of recent occurrences, per key self.occurrences.setdefault(key, EventWindow(self.rules['timeframe'], getTimestamp=self.get_ts)).append((event, 1)) self.check_for_match(key, end=False) # We call this multiple times with the 'end' parameter because subclasses # may or may not want to check while only partial data has been added if key in self.occurrences: # could have been emptied by previous check self.check_for_match(key, end=True) def check_for_match(self, key, end=False): # Match if, after removing old events, we hit num_events. # the 'end' parameter depends on whether this was called from the # middle or end of an add_data call and is used in subclasses if self.occurrences[key].count() >= self.rules['num_events']: event = self.occurrences[key].data[-1][0] if self.attach_related: event['related_events'] = [data[0] for data in self.occurrences[key].data[:-1]] self.add_match(event) self.occurrences.pop(key) def garbage_collect(self, timestamp): """ Remove all occurrence data that is beyond the timeframe away """ stale_keys = [] for key, window in self.occurrences.items(): if timestamp - lookup_es_key(window.data[-1][0], self.ts_field) > self.rules['timeframe']: stale_keys.append(key) list(map(self.occurrences.pop, stale_keys)) def get_match_str(self, match): lt = self.rules.get('use_local_time') match_ts = lookup_es_key(match, self.ts_field) starttime = pretty_ts(dt_to_ts(ts_to_dt(match_ts) - self.rules['timeframe']), lt) endtime = pretty_ts(match_ts, lt) message = 'At least %d events occurred between %s and %s\n\n' % (self.rules['num_events'], starttime, endtime) return message class AnyRule(RuleType): """ A rule that will match on any input data """ def add_data(self, data): for datum in data: self.add_match(datum) class EventWindow(object): """ A container for hold event counts for rules which need a chronological ordered event window. """ def __init__(self, timeframe, onRemoved=None, getTimestamp=new_get_event_ts('@timestamp')): self.timeframe = timeframe self.onRemoved = onRemoved self.get_ts = getTimestamp self.data = sortedlist(key=self.get_ts) self.running_count = 0 def clear(self): self.data = sortedlist(key=self.get_ts) self.running_count = 0 def append(self, event): """ Add an event to the window. Event should be of the form (dict, count). This will also pop the oldest events and call onRemoved on them until the window size is less than timeframe. """ self.data.add(event) self.running_count += event[1] while self.duration() >= self.timeframe: oldest = self.data[0] self.data.remove(oldest) self.running_count -= oldest[1] self.onRemoved and self.onRemoved(oldest) def duration(self): """ Get the size in timedelta of the window. """ if not self.data: return datetime.timedelta(0) return self.get_ts(self.data[-1]) - self.get_ts(self.data[0]) def count(self): """ Count the number of events in the window. """ return self.running_count def mean(self): """ Compute the mean of the value_field in the window. """ if len(self.data) > 0: datasum = 0 datalen = 0 for dat in self.data: if "placeholder" not in dat[0]: datasum += dat[1] datalen += 1 if datalen > 0: return datasum / float(datalen) return None else: return None def __iter__(self): return iter(self.data) def append_middle(self, event): """ Attempt to place the event in the correct location in our deque. Returns True if successful, otherwise False. """ rotation = 0 ts = self.get_ts(event) # Append left if ts is earlier than first event if self.get_ts(self.data[0]) > ts: self.data.appendleft(event) self.running_count += event[1] return # Rotate window until we can insert event while self.get_ts(self.data[-1]) > ts: self.data.rotate(1) rotation += 1 if rotation == len(self.data): # This should never happen return self.data.append(event) self.running_count += event[1] self.data.rotate(-rotation) class SpikeRule(RuleType): """ A rule that uses two sliding windows to compare relative event frequency. """ required_options = frozenset(['timeframe', 'spike_height', 'spike_type']) def __init__(self, *args): super(SpikeRule, self).__init__(*args) self.timeframe = self.rules['timeframe'] self.ref_windows = {} self.cur_windows = {} self.ts_field = self.rules.get('timestamp_field', '@timestamp') self.get_ts = new_get_event_ts(self.ts_field) self.first_event = {} self.skip_checks = {} self.field_value = self.rules.get('field_value') self.ref_window_filled_once = False def add_count_data(self, data): """ Add count data to the rule. Data should be of the form {ts: count}. """ if len(data) > 1: raise EAException('add_count_data can only accept one count at a time') for ts, count in data.items(): self.handle_event({self.ts_field: ts}, count, 'all') def add_terms_data(self, terms): for timestamp, buckets in terms.items(): for bucket in buckets: count = bucket['doc_count'] event = {self.ts_field: timestamp, self.rules['query_key']: bucket['key']} key = bucket['key'] self.handle_event(event, count, key) def add_data(self, data): for event in data: qk = self.rules.get('query_key', 'all') if qk != 'all': qk = hashable(lookup_es_key(event, qk)) if qk is None: qk = 'other' if self.field_value is not None: count = lookup_es_key(event, self.field_value) if count is not None: try: count = int(count) except ValueError: elastalert_logger.warn('{} is not a number: {}'.format(self.field_value, count)) else: self.handle_event(event, count, qk) else: self.handle_event(event, 1, qk) def clear_windows(self, qk, event): # Reset the state and prevent alerts until windows filled again self.ref_windows[qk].clear() self.first_event.pop(qk) self.skip_checks[qk] = lookup_es_key(event, self.ts_field) + self.rules['timeframe'] * 2 def handle_event(self, event, count, qk='all'): self.first_event.setdefault(qk, event) self.ref_windows.setdefault(qk, EventWindow(self.timeframe, getTimestamp=self.get_ts)) self.cur_windows.setdefault(qk, EventWindow(self.timeframe, self.ref_windows[qk].append, self.get_ts)) self.cur_windows[qk].append((event, count)) # Don't alert if ref window has not yet been filled for this key AND if lookup_es_key(event, self.ts_field) - self.first_event[qk][self.ts_field] < self.rules['timeframe'] * 2: # ElastAlert has not been running long enough for any alerts OR if not self.ref_window_filled_once: return # This rule is not using alert_on_new_data (with query_key) OR if not (self.rules.get('query_key') and self.rules.get('alert_on_new_data')): return # An alert for this qk has recently fired if qk in self.skip_checks and lookup_es_key(event, self.ts_field) < self.skip_checks[qk]: return else: self.ref_window_filled_once = True if self.field_value is not None: if self.find_matches(self.ref_windows[qk].mean(), self.cur_windows[qk].mean()): # skip over placeholder events for match, count in self.cur_windows[qk].data: if "placeholder" not in match: break self.add_match(match, qk) self.clear_windows(qk, match) else: if self.find_matches(self.ref_windows[qk].count(), self.cur_windows[qk].count()): # skip over placeholder events which have count=0 for match, count in self.cur_windows[qk].data: if count: break self.add_match(match, qk) self.clear_windows(qk, match) def add_match(self, match, qk): extra_info = {} if self.field_value is None: spike_count = self.cur_windows[qk].count() reference_count = self.ref_windows[qk].count() else: spike_count = self.cur_windows[qk].mean() reference_count = self.ref_windows[qk].mean() extra_info = {'spike_count': spike_count, 'reference_count': reference_count} match = dict(list(match.items()) + list(extra_info.items())) super(SpikeRule, self).add_match(match) def find_matches(self, ref, cur): """ Determines if an event spike or dip happening. """ # Apply threshold limits if self.field_value is None: if (cur < self.rules.get('threshold_cur', 0) or ref < self.rules.get('threshold_ref', 0)): return False elif ref is None or ref == 0 or cur is None or cur == 0: return False spike_up, spike_down = False, False if cur <= ref / self.rules['spike_height']: spike_down = True if cur >= ref * self.rules['spike_height']: spike_up = True if (self.rules['spike_type'] in ['both', 'up'] and spike_up) or \ (self.rules['spike_type'] in ['both', 'down'] and spike_down): return True return False def get_match_str(self, match): if self.field_value is None: message = 'An abnormal number (%d) of events occurred around %s.\n' % ( match['spike_count'], pretty_ts(match[self.rules['timestamp_field']], self.rules.get('use_local_time')) ) message += 'Preceding that time, there were only %d events within %s\n\n' % (match['reference_count'], self.rules['timeframe']) else: message = 'An abnormal average value (%.2f) of field \'%s\' occurred around %s.\n' % ( match['spike_count'], self.field_value, pretty_ts(match[self.rules['timestamp_field']], self.rules.get('use_local_time')) ) message += 'Preceding that time, the field had an average value of (%.2f) within %s\n\n' % ( match['reference_count'], self.rules['timeframe']) return message def garbage_collect(self, ts): # Windows are sized according to their newest event # This is a placeholder to accurately size windows in the absence of events for qk in list(self.cur_windows.keys()): # If we havn't seen this key in a long time, forget it if qk != 'all' and self.ref_windows[qk].count() == 0 and self.cur_windows[qk].count() == 0: self.cur_windows.pop(qk) self.ref_windows.pop(qk) continue placeholder = {self.ts_field: ts, "placeholder": True} # The placeholder may trigger an alert, in which case, qk will be expected if qk != 'all': placeholder.update({self.rules['query_key']: qk}) self.handle_event(placeholder, 0, qk) class FlatlineRule(FrequencyRule): """ A rule that matches when there is a low number of events given a timeframe. """ required_options = frozenset(['timeframe', 'threshold']) def __init__(self, *args): super(FlatlineRule, self).__init__(*args) self.threshold = self.rules['threshold'] # Dictionary mapping query keys to the first events self.first_event = {} def check_for_match(self, key, end=True): # This function gets called between every added document with end=True after the last # We ignore the calls before the end because it may trigger false positives if not end: return most_recent_ts = self.get_ts(self.occurrences[key].data[-1]) if self.first_event.get(key) is None: self.first_event[key] = most_recent_ts # Don't check for matches until timeframe has elapsed if most_recent_ts - self.first_event[key] < self.rules['timeframe']: return # Match if, after removing old events, we hit num_events count = self.occurrences[key].count() if count < self.rules['threshold']: # Do a deep-copy, otherwise we lose the datetime type in the timestamp field of the last event event = copy.deepcopy(self.occurrences[key].data[-1][0]) event.update(key=key, count=count) self.add_match(event) if not self.rules.get('forget_keys'): # After adding this match, leave the occurrences windows alone since it will # be pruned in the next add_data or garbage_collect, but reset the first_event # so that alerts continue to fire until the threshold is passed again. least_recent_ts = self.get_ts(self.occurrences[key].data[0]) timeframe_ago = most_recent_ts - self.rules['timeframe'] self.first_event[key] = min(least_recent_ts, timeframe_ago) else: # Forget about this key until we see it again self.first_event.pop(key) self.occurrences.pop(key) def get_match_str(self, match): ts = match[self.rules['timestamp_field']] lt = self.rules.get('use_local_time') message = 'An abnormally low number of events occurred around %s.\n' % (pretty_ts(ts, lt)) message += 'Between %s and %s, there were less than %s events.\n\n' % ( pretty_ts(dt_to_ts(ts_to_dt(ts) - self.rules['timeframe']), lt), pretty_ts(ts, lt), self.rules['threshold'] ) return message def garbage_collect(self, ts): # We add an event with a count of zero to the EventWindow for each key. This will cause the EventWindow # to remove events that occurred more than one `timeframe` ago, and call onRemoved on them. default = ['all'] if 'query_key' not in self.rules else [] for key in list(self.occurrences.keys()) or default: self.occurrences.setdefault( key, EventWindow(self.rules['timeframe'], getTimestamp=self.get_ts) ).append( ({self.ts_field: ts}, 0) ) self.first_event.setdefault(key, ts) self.check_for_match(key) class NewTermsRule(RuleType): """ Alerts on a new value in a list of fields. """ def __init__(self, rule, args=None): super(NewTermsRule, self).__init__(rule, args) self.seen_values = {} # Allow the use of query_key or fields if 'fields' not in self.rules: if 'query_key' not in self.rules: raise EAException("fields or query_key must be specified") self.fields = self.rules['query_key'] else: self.fields = self.rules['fields'] if not self.fields: raise EAException("fields must not be an empty list") if type(self.fields) != list: self.fields = [self.fields] if self.rules.get('use_terms_query') and \ (len(self.fields) != 1 or (len(self.fields) == 1 and type(self.fields[0]) == list)): raise EAException("use_terms_query can only be used with a single non-composite field") if self.rules.get('use_terms_query'): if [self.rules['query_key']] != self.fields: raise EAException('If use_terms_query is specified, you cannot specify different query_key and fields') if not self.rules.get('query_key').endswith('.keyword') and not self.rules.get('query_key').endswith('.raw'): if self.rules.get('use_keyword_postfix', True): elastalert_logger.warn('Warning: If query_key is a non-keyword field, you must set ' 'use_keyword_postfix to false, or add .keyword/.raw to your query_key.') try: self.get_all_terms(args) except Exception as e: # Refuse to start if we cannot get existing terms raise EAException('Error searching for existing terms: %s' % (repr(e))).with_traceback(sys.exc_info()[2]) def get_all_terms(self, args): """ Performs a terms aggregation for each field to get every existing term. """ self.es = elasticsearch_client(self.rules) window_size = datetime.timedelta(**self.rules.get('terms_window_size', {'days': 30})) field_name = {"field": "", "size": 2147483647} # Integer.MAX_VALUE query_template = {"aggs": {"values": {"terms": field_name}}} if args and hasattr(args, 'start') and args.start: end = ts_to_dt(args.start) elif 'start_date' in self.rules: end = ts_to_dt(self.rules['start_date']) else: end = ts_now() start = end - window_size step = datetime.timedelta(**self.rules.get('window_step_size', {'days': 1})) for field in self.fields: tmp_start = start tmp_end = min(start + step, end) time_filter = {self.rules['timestamp_field']: {'lt': self.rules['dt_to_ts'](tmp_end), 'gte': self.rules['dt_to_ts'](tmp_start)}} query_template['filter'] = {'bool': {'must': [{'range': time_filter}]}} query = {'aggs': {'filtered': query_template}} if 'filter' in self.rules: for item in self.rules['filter']: query_template['filter']['bool']['must'].append(item) # For composite keys, we will need to perform sub-aggregations if type(field) == list: self.seen_values.setdefault(tuple(field), []) level = query_template['aggs'] # Iterate on each part of the composite key and add a sub aggs clause to the elastic search query for i, sub_field in enumerate(field): if self.rules.get('use_keyword_postfix', True): level['values']['terms']['field'] = add_raw_postfix(sub_field, self.is_five_or_above()) else: level['values']['terms']['field'] = sub_field if i < len(field) - 1: # If we have more fields after the current one, then set up the next nested structure level['values']['aggs'] = {'values': {'terms': copy.deepcopy(field_name)}} level = level['values']['aggs'] else: self.seen_values.setdefault(field, []) # For non-composite keys, only a single agg is needed if self.rules.get('use_keyword_postfix', True): field_name['field'] = add_raw_postfix(field, self.is_five_or_above()) else: field_name['field'] = field # Query the entire time range in small chunks while tmp_start < end: if self.rules.get('use_strftime_index'): index = format_index(self.rules['index'], tmp_start, tmp_end) else: index = self.rules['index'] res = self.es.search(body=query, index=index, ignore_unavailable=True, timeout='50s') if 'aggregations' in res: buckets = res['aggregations']['filtered']['values']['buckets'] if type(field) == list: # For composite keys, make the lookup based on all fields # Make it a tuple since it can be hashed and used in dictionary lookups for bucket in buckets: # We need to walk down the hierarchy and obtain the value at each level self.seen_values[tuple(field)] += self.flatten_aggregation_hierarchy(bucket) else: keys = [bucket['key'] for bucket in buckets] self.seen_values[field] += keys else: if type(field) == list: self.seen_values.setdefault(tuple(field), []) else: self.seen_values.setdefault(field, []) if tmp_start == tmp_end: break tmp_start = tmp_end tmp_end = min(tmp_start + step, end) time_filter[self.rules['timestamp_field']] = {'lt': self.rules['dt_to_ts'](tmp_end), 'gte': self.rules['dt_to_ts'](tmp_start)} for key, values in self.seen_values.items(): if not values: if type(key) == tuple: # If we don't have any results, it could either be because of the absence of any baseline data # OR it may be because the composite key contained a non-primitive type. Either way, give the # end-users a heads up to help them debug what might be going on. elastalert_logger.warning(( 'No results were found from all sub-aggregations. This can either indicate that there is ' 'no baseline data OR that a non-primitive field was used in a composite key.' )) else: elastalert_logger.info('Found no values for %s' % (field)) continue self.seen_values[key] = list(set(values)) elastalert_logger.info('Found %s unique values for %s' % (len(set(values)), key)) def flatten_aggregation_hierarchy(self, root, hierarchy_tuple=()): """ For nested aggregations, the results come back in the following format: { "aggregations" : { "filtered" : { "doc_count" : 37, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "1.1.1.1", # IP address (root) "doc_count" : 13, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "80", # Port (sub-aggregation) "doc_count" : 3, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "ack", # Reason (sub-aggregation, leaf-node) "doc_count" : 3 }, { "key" : "syn", # Reason (sub-aggregation, leaf-node) "doc_count" : 1 } ] } }, { "key" : "82", # Port (sub-aggregation) "doc_count" : 3, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "ack", # Reason (sub-aggregation, leaf-node) "doc_count" : 3 }, { "key" : "syn", # Reason (sub-aggregation, leaf-node) "doc_count" : 3 } ] } } ] } }, { "key" : "2.2.2.2", # IP address (root) "doc_count" : 4, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "443", # Port (sub-aggregation) "doc_count" : 3, "values" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "ack", # Reason (sub-aggregation, leaf-node) "doc_count" : 3 }, { "key" : "syn", # Reason (sub-aggregation, leaf-node) "doc_count" : 3 } ] } } ] } } ] } } } } Each level will either have more values and buckets, or it will be a leaf node We'll ultimately return a flattened list with the hierarchies appended as strings, e.g the above snippet would yield a list with: [ ('1.1.1.1', '80', 'ack'), ('1.1.1.1', '80', 'syn'), ('1.1.1.1', '82', 'ack'), ('1.1.1.1', '82', 'syn'), ('2.2.2.2', '443', 'ack'), ('2.2.2.2', '443', 'syn') ] A similar formatting will be performed in the add_data method and used as the basis for comparison """ results = [] # There are more aggregation hierarchies left. Traverse them. if 'values' in root: results += self.flatten_aggregation_hierarchy(root['values']['buckets'], hierarchy_tuple + (root['key'],)) else: # We've gotten to a sub-aggregation, which may have further sub-aggregations # See if we need to traverse further for node in root: if 'values' in node: results += self.flatten_aggregation_hierarchy(node, hierarchy_tuple) else: results.append(hierarchy_tuple + (node['key'],)) return results def add_data(self, data): for document in data: for field in self.fields: value = () lookup_field = field if type(field) == list: # For composite keys, make the lookup based on all fields # Make it a tuple since it can be hashed and used in dictionary lookups lookup_field = tuple(field) for sub_field in field: lookup_result = lookup_es_key(document, sub_field) if not lookup_result: value = None break value += (lookup_result,) else: value = lookup_es_key(document, field) if not value and self.rules.get('alert_on_missing_field'): document['missing_field'] = lookup_field self.add_match(copy.deepcopy(document)) elif value: if value not in self.seen_values[lookup_field]: document['new_field'] = lookup_field self.add_match(copy.deepcopy(document)) self.seen_values[lookup_field].append(value) def add_terms_data(self, terms): # With terms query, len(self.fields) is always 1 and the 0'th entry is always a string field = self.fields[0] for timestamp, buckets in terms.items(): for bucket in buckets: if bucket['doc_count']: if bucket['key'] not in self.seen_values[field]: match = {field: bucket['key'], self.rules['timestamp_field']: timestamp, 'new_field': field} self.add_match(match) self.seen_values[field].append(bucket['key']) def is_five_or_above(self): version = self.es.info()['version']['number'] return int(version[0]) >= 5 class CardinalityRule(RuleType): """ A rule that matches if cardinality of a field is above or below a threshold within a timeframe """ required_options = frozenset(['timeframe', 'cardinality_field']) def __init__(self, *args): super(CardinalityRule, self).__init__(*args) if 'max_cardinality' not in self.rules and 'min_cardinality' not in self.rules: raise EAException("CardinalityRule must have one of either max_cardinality or min_cardinality") self.ts_field = self.rules.get('timestamp_field', '@timestamp') self.cardinality_field = self.rules['cardinality_field'] self.cardinality_cache = {} self.first_event = {} self.timeframe = self.rules['timeframe'] def add_data(self, data): qk = self.rules.get('query_key') for event in data: if qk: key = hashable(lookup_es_key(event, qk)) else: # If no query_key, we use the key 'all' for all events key = 'all' self.cardinality_cache.setdefault(key, {}) self.first_event.setdefault(key, lookup_es_key(event, self.ts_field)) value = hashable(lookup_es_key(event, self.cardinality_field)) if value is not None: # Store this timestamp as most recent occurence of the term self.cardinality_cache[key][value] = lookup_es_key(event, self.ts_field) self.check_for_match(key, event) def check_for_match(self, key, event, gc=True): # Check to see if we are past max/min_cardinality for a given key time_elapsed = lookup_es_key(event, self.ts_field) - self.first_event.get(key, lookup_es_key(event, self.ts_field)) timeframe_elapsed = time_elapsed > self.timeframe if (len(self.cardinality_cache[key]) > self.rules.get('max_cardinality', float('inf')) or (len(self.cardinality_cache[key]) < self.rules.get('min_cardinality', float('-inf')) and timeframe_elapsed)): # If there might be a match, run garbage collect first, as outdated terms are only removed in GC # Only run it if there might be a match so it doesn't impact performance if gc: self.garbage_collect(lookup_es_key(event, self.ts_field)) self.check_for_match(key, event, False) else: self.first_event.pop(key, None) self.add_match(event) def garbage_collect(self, timestamp): """ Remove all occurrence data that is beyond the timeframe away """ for qk, terms in list(self.cardinality_cache.items()): for term, last_occurence in list(terms.items()): if timestamp - last_occurence > self.rules['timeframe']: self.cardinality_cache[qk].pop(term) # Create a placeholder event for if a min_cardinality match occured if 'min_cardinality' in self.rules: event = {self.ts_field: timestamp} if 'query_key' in self.rules: event.update({self.rules['query_key']: qk}) self.check_for_match(qk, event, False) def get_match_str(self, match): lt = self.rules.get('use_local_time') starttime = pretty_ts(dt_to_ts(ts_to_dt(lookup_es_key(match, self.ts_field)) - self.rules['timeframe']), lt) endtime = pretty_ts(lookup_es_key(match, self.ts_field), lt) if 'max_cardinality' in self.rules: message = ('A maximum of %d unique %s(s) occurred since last alert or between %s and %s\n\n' % (self.rules['max_cardinality'], self.rules['cardinality_field'], starttime, endtime)) else: message = ('Less than %d unique %s(s) occurred since last alert or between %s and %s\n\n' % (self.rules['min_cardinality'], self.rules['cardinality_field'], starttime, endtime)) return message class BaseAggregationRule(RuleType): def __init__(self, *args): super(BaseAggregationRule, self).__init__(*args) bucket_interval = self.rules.get('bucket_interval') if bucket_interval: if 'seconds' in bucket_interval: self.rules['bucket_interval_period'] = str(bucket_interval['seconds']) + 's' elif 'minutes' in bucket_interval: self.rules['bucket_interval_period'] = str(bucket_interval['minutes']) + 'm' elif 'hours' in bucket_interval: self.rules['bucket_interval_period'] = str(bucket_interval['hours']) + 'h' elif 'days' in bucket_interval: self.rules['bucket_interval_period'] = str(bucket_interval['days']) + 'd' elif 'weeks' in bucket_interval: self.rules['bucket_interval_period'] = str(bucket_interval['weeks']) + 'w' else: raise EAException("Unsupported window size") if self.rules.get('use_run_every_query_size'): if total_seconds(self.rules['run_every']) % total_seconds(self.rules['bucket_interval_timedelta']) != 0: raise EAException("run_every must be evenly divisible by bucket_interval if specified") else: if total_seconds(self.rules['buffer_time']) % total_seconds(self.rules['bucket_interval_timedelta']) != 0: raise EAException("Buffer_time must be evenly divisible by bucket_interval if specified") def generate_aggregation_query(self): raise NotImplementedError() def add_aggregation_data(self, payload): for timestamp, payload_data in payload.items(): if 'interval_aggs' in payload_data: self.unwrap_interval_buckets(timestamp, None, payload_data['interval_aggs']['buckets']) elif 'bucket_aggs' in payload_data: self.unwrap_term_buckets(timestamp, payload_data['bucket_aggs']['buckets']) else: self.check_matches(timestamp, None, payload_data) def unwrap_interval_buckets(self, timestamp, query_key, interval_buckets): for interval_data in interval_buckets: # Use bucket key here instead of start_time for more accurate match timestamp self.check_matches(ts_to_dt(interval_data['key_as_string']), query_key, interval_data) def unwrap_term_buckets(self, timestamp, term_buckets): for term_data in term_buckets: if 'interval_aggs' in term_data: self.unwrap_interval_buckets(timestamp, term_data['key'], term_data['interval_aggs']['buckets']) else: self.check_matches(timestamp, term_data['key'], term_data) def check_matches(self, timestamp, query_key, aggregation_data): raise NotImplementedError() class MetricAggregationRule(BaseAggregationRule): """ A rule that matches when there is a low number of events given a timeframe. """ required_options = frozenset(['metric_agg_key', 'metric_agg_type']) allowed_aggregations = frozenset(['min', 'max', 'avg', 'sum', 'cardinality', 'value_count']) def __init__(self, *args): super(MetricAggregationRule, self).__init__(*args) self.ts_field = self.rules.get('timestamp_field', '@timestamp') if 'max_threshold' not in self.rules and 'min_threshold' not in self.rules: raise EAException("MetricAggregationRule must have at least one of either max_threshold or min_threshold") self.metric_key = 'metric_' + self.rules['metric_agg_key'] + '_' + self.rules['metric_agg_type'] if not self.rules['metric_agg_type'] in self.allowed_aggregations: raise EAException("metric_agg_type must be one of %s" % (str(self.allowed_aggregations))) self.rules['aggregation_query_element'] = self.generate_aggregation_query() def get_match_str(self, match): message = 'Threshold violation, %s:%s %s (min: %s max : %s) \n\n' % ( self.rules['metric_agg_type'], self.rules['metric_agg_key'], match[self.metric_key], self.rules.get('min_threshold'), self.rules.get('max_threshold') ) return message def generate_aggregation_query(self): return {self.metric_key: {self.rules['metric_agg_type']: {'field': self.rules['metric_agg_key']}}} def check_matches(self, timestamp, query_key, aggregation_data): if "compound_query_key" in self.rules: self.check_matches_recursive(timestamp, query_key, aggregation_data, self.rules['compound_query_key'], dict()) else: metric_val = aggregation_data[self.metric_key]['value'] if self.crossed_thresholds(metric_val): match = {self.rules['timestamp_field']: timestamp, self.metric_key: metric_val} if query_key is not None: match[self.rules['query_key']] = query_key self.add_match(match) def check_matches_recursive(self, timestamp, query_key, aggregation_data, compound_keys, match_data): if len(compound_keys) < 1: # shouldn't get to this point, but checking for safety return match_data[compound_keys[0]] = aggregation_data['key'] if 'bucket_aggs' in aggregation_data: for result in aggregation_data['bucket_aggs']['buckets']: self.check_matches_recursive(timestamp, query_key, result, compound_keys[1:], match_data) else: metric_val = aggregation_data[self.metric_key]['value'] if self.crossed_thresholds(metric_val): match_data[self.rules['timestamp_field']] = timestamp match_data[self.metric_key] = metric_val # add compound key to payload to allow alerts to trigger for every unique occurence compound_value = [match_data[key] for key in self.rules['compound_query_key']] match_data[self.rules['query_key']] = ",".join([str(value) for value in compound_value]) self.add_match(match_data) def crossed_thresholds(self, metric_value): if metric_value is None: return False if 'max_threshold' in self.rules and metric_value > self.rules['max_threshold']: return True if 'min_threshold' in self.rules and metric_value < self.rules['min_threshold']: return True return False class SpikeMetricAggregationRule(BaseAggregationRule, SpikeRule): """ A rule that matches when there is a spike in an aggregated event compared to its reference point """ required_options = frozenset(['metric_agg_key', 'metric_agg_type', 'spike_height', 'spike_type']) allowed_aggregations = frozenset(['min', 'max', 'avg', 'sum', 'cardinality', 'value_count']) def __init__(self, *args): # We inherit everything from BaseAggregation and Spike, overwrite only what we need in functions below super(SpikeMetricAggregationRule, self).__init__(*args) # MetricAgg alert things self.metric_key = 'metric_' + self.rules['metric_agg_key'] + '_' + self.rules['metric_agg_type'] if not self.rules['metric_agg_type'] in self.allowed_aggregations: raise EAException("metric_agg_type must be one of %s" % (str(self.allowed_aggregations))) # Disabling bucket intervals (doesn't make sense in context of spike to split up your time period) if self.rules.get('bucket_interval'): raise EAException("bucket intervals are not supported for spike aggregation alerts") self.rules['aggregation_query_element'] = self.generate_aggregation_query() def generate_aggregation_query(self): """Lifted from MetricAggregationRule, added support for scripted fields""" if self.rules.get('metric_agg_script'): return {self.metric_key: {self.rules['metric_agg_type']: self.rules['metric_agg_script']}} return {self.metric_key: {self.rules['metric_agg_type']: {'field': self.rules['metric_agg_key']}}} def add_aggregation_data(self, payload): """ BaseAggregationRule.add_aggregation_data unpacks our results and runs checks directly against hardcoded cutoffs. We instead want to use all of our SpikeRule.handle_event inherited logic (current/reference) from the aggregation's "value" key to determine spikes from aggregations """ for timestamp, payload_data in payload.items(): if 'bucket_aggs' in payload_data: self.unwrap_term_buckets(timestamp, payload_data['bucket_aggs']) else: # no time / term split, just focus on the agg event = {self.ts_field: timestamp} agg_value = payload_data[self.metric_key]['value'] self.handle_event(event, agg_value, 'all') return def unwrap_term_buckets(self, timestamp, term_buckets, qk=[]): """ create separate spike event trackers for each term, handle compound query keys """ for term_data in term_buckets['buckets']: qk.append(term_data['key']) # handle compound query keys (nested aggregations) if term_data.get('bucket_aggs'): self.unwrap_term_buckets(timestamp, term_data['bucket_aggs'], qk) # reset the query key to consider the proper depth for N > 2 del qk[-1] continue qk_str = ','.join(qk) agg_value = term_data[self.metric_key]['value'] event = {self.ts_field: timestamp, self.rules['query_key']: qk_str} # pass to SpikeRule's tracker self.handle_event(event, agg_value, qk_str) # handle unpack of lowest level del qk[-1] return def get_match_str(self, match): """ Overwrite SpikeRule's message to relate to the aggregation type & field instead of count """ message = 'An abnormal {0} of {1} ({2}) occurred around {3}.\n'.format( self.rules['metric_agg_type'], self.rules['metric_agg_key'], round(match['spike_count'], 2), pretty_ts(match[self.rules['timestamp_field']], self.rules.get('use_local_time')) ) message += 'Preceding that time, there was a {0} of {1} of ({2}) within {3}\n\n'.format( self.rules['metric_agg_type'], self.rules['metric_agg_key'], round(match['reference_count'], 2), self.rules['timeframe']) return message class PercentageMatchRule(BaseAggregationRule): required_options = frozenset(['match_bucket_filter']) def __init__(self, *args): super(PercentageMatchRule, self).__init__(*args) self.ts_field = self.rules.get('timestamp_field', '@timestamp') if 'max_percentage' not in self.rules and 'min_percentage' not in self.rules: raise EAException("PercentageMatchRule must have at least one of either min_percentage or max_percentage") self.min_denominator = self.rules.get('min_denominator', 0) self.match_bucket_filter = self.rules['match_bucket_filter'] self.rules['aggregation_query_element'] = self.generate_aggregation_query() def get_match_str(self, match): percentage_format_string = self.rules.get('percentage_format_string', None) message = 'Percentage violation, value: %s (min: %s max : %s) of %s items\n\n' % ( percentage_format_string % (match['percentage']) if percentage_format_string else match['percentage'], self.rules.get('min_percentage'), self.rules.get('max_percentage'), match['denominator'] ) return message def generate_aggregation_query(self): return { 'percentage_match_aggs': { 'filters': { 'other_bucket': True, 'filters': { 'match_bucket': { 'bool': { 'must': self.match_bucket_filter } } } } } } def check_matches(self, timestamp, query_key, aggregation_data): match_bucket_count = aggregation_data['percentage_match_aggs']['buckets']['match_bucket']['doc_count'] other_bucket_count = aggregation_data['percentage_match_aggs']['buckets']['_other_']['doc_count'] if match_bucket_count is None or other_bucket_count is None: return else: total_count = other_bucket_count + match_bucket_count if total_count == 0 or total_count < self.min_denominator: return else: match_percentage = (match_bucket_count * 1.0) / (total_count * 1.0) * 100 if self.percentage_violation(match_percentage): match = {self.rules['timestamp_field']: timestamp, 'percentage': match_percentage, 'denominator': total_count} if query_key is not None: match[self.rules['query_key']] = query_key self.add_match(match) def percentage_violation(self, match_percentage): if 'max_percentage' in self.rules and match_percentage > self.rules['max_percentage']: return True if 'min_percentage' in self.rules and match_percentage < self.rules['min_percentage']: return True return False
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="JustMock" version="2020.2.616.1" targetFramework="net48" /> <package id="MSTest.TestAdapter" version="2.1.1" targetFramework="net48" /> <package id="MSTest.TestFramework" version="2.1.1" targetFramework="net48" /> </packages>
{ "pile_set_name": "Github" }
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'colorbutton', 'uk', { auto: 'Авто', bgColorTitle: 'Колір фону', colors: { '000': 'Чорний', '800000': 'Бордовий', '8B4513': 'Коричневий', '2F4F4F': 'Темний сіро-зелений', '008080': 'Морської хвилі', '000080': 'Сливовий', '4B0082': 'Індиго', '696969': 'Темно-сірий', B22222: 'Темночервоний', A52A2A: 'Каштановий', DAA520: 'Бежевий', '006400': 'Темно-зелений', '40E0D0': 'Бірюзовий', '0000CD': 'Темносиній', '800080': 'Пурпурний', '808080': 'Сірий', F00: 'Червоний', FF8C00: 'Темно-помаранчевий', FFD700: 'Жовтий', '008000': 'Зелений', '0FF': 'Синьо-зелений', '00F': 'Синій', EE82EE: 'Фіолетовий', A9A9A9: 'Тьмяно-сірий', FFA07A: 'Рожевий', FFA500: 'Помаранчевий', FFFF00: 'Яскравожовтий', '00FF00': 'Салатовий', AFEEEE: 'Світлобірюзовий', ADD8E6: 'Блакитний', DDA0DD: 'Світлофіолетовий', D3D3D3: 'Світло-сірий', FFF0F5: 'Світлорожевий', FAEBD7: 'Світлооранжевий', FFFFE0: 'Світло-жовтий', F0FFF0: 'Світлозелений', F0FFFF: 'Світлий синьо-зелений', F0F8FF: 'Світлоблакитний', E6E6FA: 'Лавандовий', FFF: 'Білий', '1ABC9C': 'Насичений блакитний', '2ECC71': 'Смарагдовий', '3498DB': 'Яскраво-синій', '9B59B6': 'Аметистовий', '4E5F70': 'Сірувато-синій', 'F1C40F': 'Яскраво-жовтий', '16A085': 'Темно-блакитний', '27AE60': 'Темно-смарагдовий', '2980B9': 'Насичений синій', '8E44AD': 'Темно-фіолетовий', '2C3E50': 'Ненасичений синій', 'F39C12': 'Помаранчевий', 'E67E22': 'Морквяний', 'E74C3C': 'Блідо-червоний', 'ECF0F1': 'Яскраво-сріблястий', '95A5A6': 'Світлий сірувато-блакитний', 'DDD': 'Світло-сірий', 'D35400': 'Гарбузовий', 'C0392B': 'Насичений червоний', 'BDC3C7': 'Сріблястий', '7F8C8D': 'Сірувато-блакитний', '999': 'Темно-сірий' }, more: 'Кольори...', panelTitle: 'Кольори', textColorTitle: 'Колір тексту' } );
{ "pile_set_name": "Github" }
/* * Copyright 2017 Google * * 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 <Foundation/Foundation.h> /** The version of the Firebase SDK. */ FOUNDATION_EXPORT const unsigned char *const FIRVersionString; /** The version of the FirebaseCore Component. */ FOUNDATION_EXPORT const unsigned char *const FIRCoreVersionString;
{ "pile_set_name": "Github" }
# # Copyright (C) 2011 - 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/>. # module AccountsHelper def show_last_batch @last_batch && !(@current_batch && @current_batch.importing?) end def print_messages(batch) return '' unless batch render :partial => 'accounts/sis_batch_messages', :object => batch end def print_counts(batch) return '' unless batch.data && batch.data[:counts] render :partial => 'accounts/sis_batch_counts', :object => batch end def show_code_and_term_for(course) show_term = course.enrollment_term && !course.enrollment_term.default_term? show_code = course.course_code != course.name "#{course.course_code if show_code}#{', ' if show_term && show_code}#{course.enrollment_term.name if show_term}" end def turnitin_originality_options(account) [ account.root_account? ? nil : [I18n.t('Use parent account setting'), nil], [I18n.t('#turnitin_settings.originality_report_visible_immediately', "Immediately"), 'immediate'], [I18n.t('#turnitin_settings.originality_report_visible_after_grading', "After the assignment is graded"), 'after_grading'], [I18n.t('#turnitin_settings.originality_report_visible_after_due_date', "After the Due Date"), 'after_due_date'], [I18n.t('#turnitin_settings.originality_report_never', "Never"), 'never'] ].compact end def dashboard_view_options(account) [ [I18n.t('Card View'), 'cards'], [I18n.t('Recent Activity'), 'activity'], [I18n.t('List View'), 'planner'] ] end end
{ "pile_set_name": "Github" }
use SDL; use SDL::Events; use SDLx::App; my $app = SDLx::App->new; $app->add_event_handler( sub { my $event = shift; if( $event->type == SDL_MOUSEMOTION ) { printf( "x=%d y=%d\n", $event->motion_x, $event->motion_y ); $app->stop } } ); $app->run;
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB0FC98-8AD5-4D2A-BF06-0EA4DCF8764D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ImageResizer.Plugins.SqlReader</RootNamespace> <AssemblyName>ImageResizer.Plugins.SqlReader</AssemblyName> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\dlls\debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\..\dlls\debug\ImageResizer.Plugins.SqlReader.XML</DocumentationFile> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\dlls\release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\..\dlls\release\ImageResizer.Plugins.SqlReader.XML</DocumentationFile> <Prefer32Bit>false</Prefer32Bit> <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Trial|AnyCPU'"> <OutputPath>..\..\dlls\release\</OutputPath> <DefineConstants>TRACE;TRIAL</DefineConstants> <Optimize>true</Optimize> <DebugType>pdbonly</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> <ErrorReport>prompt</ErrorReport> <DocumentationFile>..\..\dlls\release\ImageResizer.Plugins.SqlReader.XML</DocumentationFile> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Web" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="..\..\Core\SharedAssemblyInfo.cs"> <Link>SharedAssemblyInfo.cs</Link> </Compile> <Compile Include="SqlReader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Core\ImageResizer.csproj"> <Project>{FA5EF673-A6A4-498D-AA24-C025CC5267AF}</Project> <Name>ImageResizer</Name> </ProjectReference> <ProjectReference Include="..\ImageResizer.Storage\ImageResizer.Storage.csproj"> <Project>{80bb303c-8f55-410c-ba91-342ecc435101}</Project> <Name>ImageResizer.Storage</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Content Include="flaws.txt" /> </ItemGroup> <ItemGroup> <None Include="readme.md" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>
{ "pile_set_name": "Github" }
// // DAContextMenuTableViewControllerDemoTests.m // DAContextMenuTableViewControllerDemoTests // // Created by Daria Kopaliani on 7/24/13. // Copyright (c) 2013 Daria Kopaliani. All rights reserved. // #import <XCTest/XCTest.h> @interface DAContextMenuTableViewControllerDemoTests : XCTestCase @end @implementation DAContextMenuTableViewControllerDemoTests - (void)setUp { [super setUp]; // Set-up code here. } - (void)tearDown { // Tear-down code here. [super tearDown]; } - (void)testExample { XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); } @end
{ "pile_set_name": "Github" }
白井めぐみ最新番号 【VNDS-2500】近親相姦絵巻 禁断の性交 【VNDS-704】禁断の性</a>2006-04-20NEXT GROUP$$$ネクストイレブ87分钟
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Predis package. * * (c) Daniele Alessandri <suppakilla@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Predis; use Predis\Command\CommandInterface; use Predis\Command\RawCommand; use Predis\Command\ScriptCommand; use Predis\Configuration\Options; use Predis\Configuration\OptionsInterface; use Predis\Connection\AggregateConnectionInterface; use Predis\Connection\ConnectionInterface; use Predis\Connection\ParametersInterface; use Predis\Monitor\Consumer as MonitorConsumer; use Predis\Pipeline\Pipeline; use Predis\PubSub\Consumer as PubSubConsumer; use Predis\Response\ErrorInterface as ErrorResponseInterface; use Predis\Response\ResponseInterface; use Predis\Response\ServerException; use Predis\Transaction\MultiExec as MultiExecTransaction; /** * Client class used for connecting and executing commands on Redis. * * This is the main high-level abstraction of Predis upon which various other * abstractions are built. Internally it aggregates various other classes each * one with its own responsibility and scope. * * {@inheritdoc} * * @author Daniele Alessandri <suppakilla@gmail.com> */ class Client implements ClientInterface, \IteratorAggregate { const VERSION = '1.1.1'; protected $connection; protected $options; private $profile; /** * @param mixed $parameters Connection parameters for one or more servers. * @param mixed $options Options to configure some behaviours of the client. */ public function __construct($parameters = null, $options = null) { $this->options = $this->createOptions($options ?: array()); $this->connection = $this->createConnection($parameters ?: array()); $this->profile = $this->options->profile; } /** * Creates a new instance of Predis\Configuration\Options from different * types of arguments or simply returns the passed argument if it is an * instance of Predis\Configuration\OptionsInterface. * * @param mixed $options Client options. * * @throws \InvalidArgumentException * * @return OptionsInterface */ protected function createOptions($options) { if (is_array($options)) { return new Options($options); } if ($options instanceof OptionsInterface) { return $options; } throw new \InvalidArgumentException('Invalid type for client options.'); } /** * Creates single or aggregate connections from different types of arguments * (string, array) or returns the passed argument if it is an instance of a * class implementing Predis\Connection\ConnectionInterface. * * Accepted types for connection parameters are: * * - Instance of Predis\Connection\ConnectionInterface. * - Instance of Predis\Connection\ParametersInterface. * - Array * - String * - Callable * * @param mixed $parameters Connection parameters or connection instance. * * @throws \InvalidArgumentException * * @return ConnectionInterface */ protected function createConnection($parameters) { if ($parameters instanceof ConnectionInterface) { return $parameters; } if ($parameters instanceof ParametersInterface || is_string($parameters)) { return $this->options->connections->create($parameters); } if (is_array($parameters)) { if (!isset($parameters[0])) { return $this->options->connections->create($parameters); } $options = $this->options; if ($options->defined('aggregate')) { $initializer = $this->getConnectionInitializerWrapper($options->aggregate); $connection = $initializer($parameters, $options); } elseif ($options->defined('replication')) { $replication = $options->replication; if ($replication instanceof AggregateConnectionInterface) { $connection = $replication; $options->connections->aggregate($connection, $parameters); } else { $initializer = $this->getConnectionInitializerWrapper($replication); $connection = $initializer($parameters, $options); } } else { $connection = $options->cluster; $options->connections->aggregate($connection, $parameters); } return $connection; } if (is_callable($parameters)) { $initializer = $this->getConnectionInitializerWrapper($parameters); $connection = $initializer($this->options); return $connection; } throw new \InvalidArgumentException('Invalid type for connection parameters.'); } /** * Wraps a callable to make sure that its returned value represents a valid * connection type. * * @param mixed $callable * * @return \Closure */ protected function getConnectionInitializerWrapper($callable) { return function () use ($callable) { $connection = call_user_func_array($callable, func_get_args()); if (!$connection instanceof ConnectionInterface) { throw new \UnexpectedValueException( 'The callable connection initializer returned an invalid type.' ); } return $connection; }; } /** * {@inheritdoc} */ public function getProfile() { return $this->profile; } /** * {@inheritdoc} */ public function getOptions() { return $this->options; } /** * Creates a new client instance for the specified connection ID or alias, * only when working with an aggregate connection (cluster, replication). * The new client instances uses the same options of the original one. * * @param string $connectionID Identifier of a connection. * * @throws \InvalidArgumentException * * @return Client */ public function getClientFor($connectionID) { if (!$connection = $this->getConnectionById($connectionID)) { throw new \InvalidArgumentException("Invalid connection ID: $connectionID."); } return new static($connection, $this->options); } /** * Opens the underlying connection and connects to the server. */ public function connect() { $this->connection->connect(); } /** * Closes the underlying connection and disconnects from the server. */ public function disconnect() { $this->connection->disconnect(); } /** * Closes the underlying connection and disconnects from the server. * * This is the same as `Client::disconnect()` as it does not actually send * the `QUIT` command to Redis, but simply closes the connection. */ public function quit() { $this->disconnect(); } /** * Returns the current state of the underlying connection. * * @return bool */ public function isConnected() { return $this->connection->isConnected(); } /** * {@inheritdoc} */ public function getConnection() { return $this->connection; } /** * Retrieves the specified connection from the aggregate connection when the * client is in cluster or replication mode. * * @param string $connectionID Index or alias of the single connection. * * @throws NotSupportedException * * @return Connection\NodeConnectionInterface */ public function getConnectionById($connectionID) { if (!$this->connection instanceof AggregateConnectionInterface) { throw new NotSupportedException( 'Retrieving connections by ID is supported only by aggregate connections.' ); } return $this->connection->getConnectionById($connectionID); } /** * Executes a command without filtering its arguments, parsing the response, * applying any prefix to keys or throwing exceptions on Redis errors even * regardless of client options. * * It is possible to identify Redis error responses from normal responses * using the second optional argument which is populated by reference. * * @param array $arguments Command arguments as defined by the command signature. * @param bool $error Set to TRUE when Redis returned an error response. * * @return mixed */ public function executeRaw(array $arguments, &$error = null) { $error = false; $response = $this->connection->executeCommand( new RawCommand($arguments) ); if ($response instanceof ResponseInterface) { if ($response instanceof ErrorResponseInterface) { $error = true; } return (string) $response; } return $response; } /** * {@inheritdoc} */ public function __call($commandID, $arguments) { return $this->executeCommand( $this->createCommand($commandID, $arguments) ); } /** * {@inheritdoc} */ public function createCommand($commandID, $arguments = array()) { return $this->profile->createCommand($commandID, $arguments); } /** * {@inheritdoc} */ public function executeCommand(CommandInterface $command) { $response = $this->connection->executeCommand($command); if ($response instanceof ResponseInterface) { if ($response instanceof ErrorResponseInterface) { $response = $this->onErrorResponse($command, $response); } return $response; } return $command->parseResponse($response); } /** * Handles -ERR responses returned by Redis. * * @param CommandInterface $command Redis command that generated the error. * @param ErrorResponseInterface $response Instance of the error response. * * @throws ServerException * * @return mixed */ protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response) { if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') { $eval = $this->createCommand('EVAL'); $eval->setRawArguments($command->getEvalArguments()); $response = $this->executeCommand($eval); if (!$response instanceof ResponseInterface) { $response = $command->parseResponse($response); } return $response; } if ($this->options->exceptions) { throw new ServerException($response->getMessage()); } return $response; } /** * Executes the specified initializer method on `$this` by adjusting the * actual invokation depending on the arity (0, 1 or 2 arguments). This is * simply an utility method to create Redis contexts instances since they * follow a common initialization path. * * @param string $initializer Method name. * @param array $argv Arguments for the method. * * @return mixed */ private function sharedContextFactory($initializer, $argv = null) { switch (count($argv)) { case 0: return $this->$initializer(); case 1: return is_array($argv[0]) ? $this->$initializer($argv[0]) : $this->$initializer(null, $argv[0]); case 2: list($arg0, $arg1) = $argv; return $this->$initializer($arg0, $arg1); default: return $this->$initializer($this, $argv); } } /** * Creates a new pipeline context and returns it, or returns the results of * a pipeline executed inside the optionally provided callable object. * * @param mixed ... Array of options, a callable for execution, or both. * * @return Pipeline|array */ public function pipeline(/* arguments */) { return $this->sharedContextFactory('createPipeline', func_get_args()); } /** * Actual pipeline context initializer method. * * @param array $options Options for the context. * @param mixed $callable Optional callable used to execute the context. * * @return Pipeline|array */ protected function createPipeline(array $options = null, $callable = null) { if (isset($options['atomic']) && $options['atomic']) { $class = 'Predis\Pipeline\Atomic'; } elseif (isset($options['fire-and-forget']) && $options['fire-and-forget']) { $class = 'Predis\Pipeline\FireAndForget'; } else { $class = 'Predis\Pipeline\Pipeline'; } /* * @var ClientContextInterface */ $pipeline = new $class($this); if (isset($callable)) { return $pipeline->execute($callable); } return $pipeline; } /** * Creates a new transaction context and returns it, or returns the results * of a transaction executed inside the optionally provided callable object. * * @param mixed ... Array of options, a callable for execution, or both. * * @return MultiExecTransaction|array */ public function transaction(/* arguments */) { return $this->sharedContextFactory('createTransaction', func_get_args()); } /** * Actual transaction context initializer method. * * @param array $options Options for the context. * @param mixed $callable Optional callable used to execute the context. * * @return MultiExecTransaction|array */ protected function createTransaction(array $options = null, $callable = null) { $transaction = new MultiExecTransaction($this, $options); if (isset($callable)) { return $transaction->execute($callable); } return $transaction; } /** * Creates a new publish/subscribe context and returns it, or starts its loop * inside the optionally provided callable object. * * @param mixed ... Array of options, a callable for execution, or both. * * @return PubSubConsumer|null */ public function pubSubLoop(/* arguments */) { return $this->sharedContextFactory('createPubSub', func_get_args()); } /** * Actual publish/subscribe context initializer method. * * @param array $options Options for the context. * @param mixed $callable Optional callable used to execute the context. * * @return PubSubConsumer|null */ protected function createPubSub(array $options = null, $callable = null) { $pubsub = new PubSubConsumer($this, $options); if (!isset($callable)) { return $pubsub; } foreach ($pubsub as $message) { if (call_user_func($callable, $pubsub, $message) === false) { $pubsub->stop(); } } } /** * Creates a new monitor consumer and returns it. * * @return MonitorConsumer */ public function monitor() { return new MonitorConsumer($this); } /** * {@inheritdoc} */ public function getIterator() { $clients = array(); $connection = $this->getConnection(); if (!$connection instanceof \Traversable) { throw new ClientException('The underlying connection is not traversable'); } foreach ($connection as $node) { $clients[(string) $node] = new static($node, $this->getOptions()); } return new \ArrayIterator($clients); } }
{ "pile_set_name": "Github" }
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { jqxChartModule } from 'jqwidgets-ng/jqxchart'; import { AppComponent } from './app.component'; @NgModule({ imports: [BrowserModule, jqxChartModule, CommonModule], declarations: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { }
{ "pile_set_name": "Github" }
using System; using Server; using Server.Items; namespace Server.Mobiles { [CorpseName( "an Abscess corpse" )] public class Abscess : Hydra { [Constructable] public Abscess() { IsParagon = true; Name = "Abscess"; Hue = 0x8FD; SetStr( 845, 871 ); SetDex( 121, 134 ); SetInt( 124, 142 ); SetHits( 7470, 7540 ); SetDamage( 26, 31 ); SetDamageType( ResistanceType.Physical, 60 ); SetDamageType( ResistanceType.Fire, 10 ); SetDamageType( ResistanceType.Cold, 10 ); SetDamageType( ResistanceType.Poison, 10 ); SetDamageType( ResistanceType.Energy, 10 ); SetResistance( ResistanceType.Physical, 65, 75 ); SetResistance( ResistanceType.Fire, 70, 80 ); SetResistance( ResistanceType.Cold, 25, 35 ); SetResistance( ResistanceType.Poison, 35, 45 ); SetResistance( ResistanceType.Energy, 35, 45 ); SetSkill( SkillName.Wrestling, 132.3, 143.8 ); SetSkill( SkillName.Tactics, 121.0, 130.5 ); SetSkill( SkillName.MagicResist, 102.9, 119.0 ); SetSkill( SkillName.Anatomy, 91.8, 94.3 ); // TODO: Fame/Karma } public override void GenerateLoot() { AddLoot( LootPack.UltraRich, 4 ); } public override void OnDeath( Container c ) { base.OnDeath( c ); c.DropItem( new AbscessTail() ); } public override bool GivesMLMinorArtifact { get { return true; } } public Abscess( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } } }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2012 - 2017, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form, except as embedded into a Nordic * Semiconductor ASA integrated circuit in a product or a software update for * such product, must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. Neither the name of Nordic Semiconductor ASA nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * 4. This software, with or without modification, must only be used with a * Nordic Semiconductor ASA integrated circuit. * * 5. Any software provided in binary form under this license must not be reverse * engineered, decompiled, modified and/or disassembled. * * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef RADIO_TEST_H #define RADIO_TEST_H #include <stdint.h> #ifdef __cplusplus extern "C" { #endif void radio_tx_carrier(uint8_t txpower, uint8_t mode, uint8_t channel); void radio_modulated_tx_carrier(uint8_t txpower, uint8_t mode, uint8_t channel); void radio_rx_carrier(uint8_t mode, uint8_t channel); void radio_tx_sweep_start(uint8_t txpower, uint8_t mode, uint8_t channel_start, uint8_t channel_end, uint8_t delayms); void radio_rx_sweep_start(uint8_t mode, uint8_t channel_start, uint8_t channel_end, uint8_t delayms); void radio_sweep_end(void); #ifdef __cplusplus } #endif #endif
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: b2a82e3e5f7344c4bbe15fdb9cf9870b MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/DuetRecommendation.framework/DuetRecommendation */ @interface _DRTopicStatisticsQuery : _DKQuery <_DKExecutableQuery> { NSObject<OS_dispatch_queue> * _defaultQueue; NSPredicate * _predicate; _DRTopicInterestSummary * _summary; } @property (retain) _DRTopicInterestSummary *summary; + (id)countExpression; + (id)sumExpression; + (id)topicStatisticsQuery; + (id)topicStatisticsQueryWithFilter:(id)arg1; - (void).cxx_destruct; - (void)clearSummary; - (id)executeUsingCoreDataStorage:(id)arg1 error:(id*)arg2; - (id)handleResults:(id)arg1 error:(id)arg2; - (id)initWithPredicate:(id)arg1; - (void)setSummary:(id)arg1; - (id)summary; @end
{ "pile_set_name": "Github" }
.card:not(*:empty){ color:rgb(77, 60, 51); text-shadow:none; background: url('../../music/wood3.png'); background-size:auto; } #arena:not(.chess) .player[data-position='0']>.equips>.equip5>.image{ background-position: -6px -6px; } #arena.mobile:not(.chess) .player[data-position='0']>.equips>.equip5 { border-radius: 100%; } #arena.mobile:not(.chess) .player[data-position='0']>.equips>.equip5>.name{ display: none; } #arena.mobile:not(.chess) .player[data-position='0']>.equips>.equip5>.info{ display: none; }
{ "pile_set_name": "Github" }
Version 1 From -0.125 1.125 Length 4101 Components 1 { -0.0267908168796 -0.0267653794441 -0.0267399008311 -0.0267143809741 -0.0266888198063 -0.0266632172608 -0.0266375732705 -0.0266118877685 -0.0265861606875 -0.0265603919602 -0.0265345815192 -0.026508729297 -0.0264828352259 -0.0264568992382 -0.0264309212661 -0.0264049012415 -0.0263788390964 -0.0263527347626 -0.0263265881719 -0.0263003992558 -0.0262741679458 -0.0262478941733 -0.0262215778695 -0.0261952189656 -0.0261688173927 -0.0261423730816 -0.0261158859632 -0.0260893559682 -0.0260627830271 -0.0260361670705 -0.0260095080288 -0.0259828058321 -0.0259560604106 -0.0259292716944 -0.0259024396134 -0.0258755640973 -0.0258486450759 -0.0258216824787 -0.0257946762352 -0.0257676262747 -0.0257405325265 -0.0257133949197 -0.0256862133833 -0.0256589878462 -0.0256317182371 -0.0256044044848 -0.0255770465177 -0.0255496442642 -0.0255221976528 -0.0254947066115 -0.0254671710685 -0.0254395909518 -0.0254119661891 -0.0253842967082 -0.0253565824367 -0.0253288233021 -0.0253010192318 -0.025273170153 -0.0252452759929 -0.0252173366785 -0.0251893521367 -0.0251613222943 -0.025133247078 -0.0251051264143 -0.0250769602297 -0.0250487484504 -0.0250204910026 -0.0249921878125 -0.024963838806 -0.0249354439088 -0.0249070030468 -0.0248785161455 -0.0248499831304 -0.0248214039269 -0.0247927784601 -0.0247641066552 -0.0247353884372 -0.0247066237309 -0.0246778124611 -0.0246489545524 -0.0246200499294 -0.0245910985163 -0.0245621002375 -0.0245330550171 -0.024503962779 -0.0244748234473 -0.0244456369456 -0.0244164031976 -0.0243871221268 -0.0243577936567 -0.0243284177104 -0.0242989942112 -0.024269523082 -0.0242400042457 -0.0242104376252 -0.0241808231431 -0.0241511607218 -0.0241214502838 -0.0240916917514 -0.0240618850467 -0.0240320300918 -0.0240021268085 -0.0239721751185 -0.0239421749436 -0.0239121262052 -0.0238820288248 -0.0238518827236 -0.0238216878226 -0.023791444043 -0.0237611513057 -0.0237308095312 -0.0237004186404 -0.0236699785536 -0.0236394891912 -0.0236089504735 -0.0235783623206 -0.0235477246524 -0.0235170373888 -0.0234863004495 -0.0234555137541 -0.023424677222 -0.0233937907727 -0.0233628543252 -0.0233318677986 -0.0233008311119 -0.0232697441838 -0.0232386069331 -0.0232074192783 -0.0231761811378 -0.0231448924298 -0.0231135530725 -0.0230821629839 -0.023050722082 -0.0230192302843 -0.0229876875087 -0.0229560936724 -0.0229244486929 -0.0228927524874 -0.022861004973 -0.0228292060665 -0.0227973556849 -0.0227654537447 -0.0227335001626 -0.0227014948549 -0.0226694377379 -0.0226373287277 -0.0226051677403 -0.0225729546916 -0.0225406894973 -0.0225083720731 -0.0224760023342 -0.0224435801961 -0.022411105574 -0.0223785783828 -0.0223459985375 -0.0223133659529 -0.0222806805436 -0.022247942224 -0.0222151509085 -0.0221823065113 -0.0221494089465 -0.0221164581281 -0.0220834539698 -0.0220503963853 -0.022017285288 -0.0219841205915 -0.0219509022088 -0.0219176300532 -0.0218843040375 -0.0218509240745 -0.021817490077 -0.0217840019575 -0.0217504596283 -0.0217168630018 -0.0216832119899 -0.0216495065047 -0.021615746458 -0.0215819317615 -0.0215480623267 -0.021514138065 -0.0214801588876 -0.0214461247056 -0.0214120354301 -0.0213778909718 -0.0213436912414 -0.0213094361494 -0.0212751256062 -0.021240759522 -0.021206337807 -0.0211718603711 -0.021137327124 -0.0211027379755 -0.021068092835 -0.0210333916119 -0.0209986342155 -0.0209638205547 -0.0209289505385 -0.0208940240757 -0.020859041075 -0.0208240014447 -0.0207889050932 -0.0207537519287 -0.0207185418593 -0.0206832747927 -0.0206479506368 -0.0206125692992 -0.0205771306872 -0.0205416347081 -0.0205060812692 -0.0204704702773 -0.0204348016393 -0.020399075262 -0.0203632910517 -0.020327448915 -0.020291548758 -0.0202555904868 -0.0202195740074 -0.0201834992254 -0.0201473660467 -0.0201111743765 -0.0200749241203 -0.0200386151831 -0.02000224747 -0.0199658208859 -0.0199293353355 -0.0198927907232 -0.0198561869535 -0.0198195239307 -0.0197828015588 -0.0197460197417 -0.0197091783832 -0.019672277387 -0.0196353166564 -0.0195982960948 -0.0195612156054 -0.0195240750911 -0.0194868744547 -0.019449613599 -0.0194122924265 -0.0193749108394 -0.0193374687401 -0.0192999660306 -0.0192624026127 -0.0192247783881 -0.0191870932586 -0.0191493471253 -0.0191115398897 -0.0190736714528 -0.0190357417155 -0.0189977505785 -0.0189596979426 -0.0189215837081 -0.0188834077754 -0.0188451700445 -0.0188068704154 -0.0187685087879 -0.0187300850617 -0.0186915991363 -0.0186530509108 -0.0186144402846 -0.0185757671566 -0.0185370314255 -0.0184982329902 -0.018459371749 -0.0184204476003 -0.0183814604422 -0.0183424101729 -0.01830329669 -0.0182641198913 -0.0182248796743 -0.0181855759363 -0.0181462085745 -0.0181067774859 -0.0180672825674 -0.0180277237155 -0.0179881008269 -0.0179484137979 -0.0179086625245 -0.017868846903 -0.0178289668289 -0.0177890221982 -0.0177490129061 -0.0177089388482 -0.0176687999194 -0.0176285960149 -0.0175883270294 -0.0175479928576 -0.0175075933939 -0.0174671285327 -0.0174265981681 -0.017386002194 -0.0173453405043 -0.0173046129926 -0.0172638195524 -0.0172229600768 -0.017182034459 -0.017141042592 -0.0170999843685 -0.0170588596811 -0.0170176684221 -0.0169764104839 -0.0169350857585 -0.0168936941377 -0.0168522355134 -0.0168107097769 -0.0167691168198 -0.0167274565331 -0.0166857288079 -0.016643933535 -0.0166020706051 -0.0165601399086 -0.0165181413359 -0.016476074777 -0.0164339401219 -0.0163917372605 -0.0163494660822 -0.0163071264765 -0.0162647183326 -0.0162222415396 -0.0161796959863 -0.0161370815615 -0.0160943981536 -0.0160516456509 -0.0160088239418 -0.015965932914 -0.0159229724554 -0.0158799424536 -0.015836842796 -0.0157936733699 -0.0157504340623 -0.0157071247601 -0.01566374535 -0.0156202957185 -0.015576775752 -0.0155331853365 -0.0154895243581 -0.0154457927025 -0.0154019902553 -0.0153581169019 -0.0153141725275 -0.0152701570172 -0.0152260702558 -0.015181912128 -0.0151376825182 -0.0150933813107 -0.0150490083897 -0.015004563639 -0.0149600469424 -0.0149154581834 -0.0148707972453 -0.0148260640113 -0.0147812583645 -0.0147363801874 -0.0146914293628 -0.0146464057731 -0.0146013093004 -0.0145561398268 -0.0145108972341 -0.014465581404 -0.0144201922178 -0.0143747295568 -0.0143291933022 -0.0142835833347 -0.0142378995351 -0.0141921417838 -0.0141463099612 -0.0141004039472 -0.0140544236218 -0.0140083688648 -0.0139622395556 -0.0139160355736 -0.0138697567978 -0.0138234031072 -0.0137769743805 -0.0137304704963 -0.0136838913329 -0.0136372367685 -0.0135905066809 -0.0135437009479 -0.0134968194471 -0.0134498620559 -0.0134028286513 -0.0133557191103 -0.0133085333097 -0.0132612711261 -0.0132139324357 -0.0131665171147 -0.0131190250392 -0.0130714560848 -0.0130238101271 -0.0129760870414 -0.0129282867029 -0.0128804089865 -0.012832453767 -0.0127844209189 -0.0127363103166 -0.0126881218342 -0.0126398553456 -0.0125915107245 -0.0125430878445 -0.0124945865789 -0.0124460068007 -0.012397348383 -0.0123486111983 -0.0122997951193 -0.0122509000181 -0.0122019257669 -0.0121528722375 -0.0121037393016 -0.0120545268307 -0.012005234696 -0.0119558627685 -0.0119064109192 -0.0118568790185 -0.011807266937 -0.0117575745448 -0.011707801712 -0.0116579483082 -0.0116080142031 -0.0115579992661 -0.0115079033663 -0.0114577263727 -0.0114074681539 -0.0113571285785 -0.0113067075147 -0.0112562048308 -0.0112056203945 -0.0111549540735 -0.0111042057352 -0.011053375247 -0.0110024624758 -0.0109514672884 -0.0109003895513 -0.0108492291311 -0.0107979858938 -0.0107466597053 -0.0106952504314 -0.0106437579377 -0.0105921820892 -0.0105405227513 -0.0104887797886 -0.0104369530658 -0.0103850424474 -0.0103330477975 -0.0102809689801 -0.0102288058589 -0.0101765582976 -0.0101242261593 -0.0100718093072 -0.0100193076041 -0.00996672091277 -0.00991404909553 -0.0098612920146 -0.00980844953197 -0.00975552150939 -0.00970250780839 -0.00964940829027 -0.00959622281612 -0.00954295124679 -0.00948959344292 -0.00943614926491 -0.00938261857294 -0.00932900122697 -0.00927529708672 -0.00922150601168 -0.00916762786115 -0.00911366249415 -0.0090596097695 -0.0090054695458 -0.0089512416814 -0.00889692603444 -0.0088425224628 -0.00878803082416 -0.00873345097597 -0.00867878277542 -0.0086240260795 -0.00856918074496 -0.0085142466283 -0.00845922358582 -0.00840411147355 -0.00834891014732 -0.0082936194627 -0.00823823927505 -0.00818276943949 -0.00812720981089 -0.00807156024389 -0.00801582059292 -0.00795999071213 -0.00790407045548 -0.00784805967666 -0.00779195822914 -0.00773576596615 -0.00767948274068 -0.00762310840547 -0.00756664281305 -0.00751008581568 -0.00745343726542 -0.00739669701404 -0.00733986491311 -0.00728294081395 -0.00722592456763 -0.00716881602498 -0.00711161503661 -0.00705432145285 -0.00699693512382 -0.00693945589939 -0.00688188362918 -0.00682421816257 -0.00676645934869 -0.00670860703644 -0.00665066107447 -0.00659262131118 -0.00653448759472 -0.006476259773 -0.0064179376937 -0.00635952120422 -0.00630101015175 -0.0062424043832 -0.00618370374525 -0.00612490808433 -0.00606601724662 -0.00600703107805 -0.0059479494243 -0.0058887721308 -0.00582949904273 -0.00577013000503 -0.00571066486236 -0.00565110345917 -0.00559144563962 -0.00553169124764 -0.00547184012691 -0.00541189212083 -0.00535184707258 -0.00529170482506 -0.00523146522093 -0.0051711281026 -0.0051106933122 -0.00505016069164 -0.00498953008254 -0.00492880132629 -0.004867974264 -0.00480704873655 -0.00474602458454 -0.00468490164831 -0.00462367976797 -0.00456235878333 -0.00450093853399 -0.00443941885923 -0.00437779959813 -0.00431608058947 -0.00425426167179 -0.00419234268334 -0.00413032346216 -0.00406820384596 -0.00400598367225 -0.00394366277825 -0.0038812410009 -0.0038187181769 -0.00375609414268 -0.00369336873441 -0.00363054178797 -0.00356761313902 -0.0035045826229 -0.00344145007473 -0.00337821532933 -0.00331487822127 -0.00325143858485 -0.0031878962541 -0.00312425106278 -0.00306050284439 -0.00299665143214 -0.00293269665898 -0.00286863835761 -0.00280447636043 -0.00274021049958 -0.00267584060693 -0.00261136651408 -0.00254678805234 -0.00248210505278 -0.00241731734616 -0.002352424763 -0.00228742713351 -0.00222232428766 -0.00215711605512 -0.00209180226529 -0.0020263827473 -0.00196085733001 -0.00189522584198 -0.00182948811151 -0.00176364396662 -0.00169769323505 -0.00163163574425 -0.00156547132142 -0.00149919979344 -0.00143282098695 -0.00136633472828 -0.00129974084348 -0.00123303915835 -0.00116622949837 -0.00109931168877 -0.00103228555445 -0.00096515092009 -0.000897907610033 -0.000830555448365 -0.000763094258877 -0.00069552386508 -0.000627844090196 -0.000560054757163 -0.00049215568863 -0.000424146706961 -0.000356027634231 -0.000287798292228 -0.000219458502451 -0.000151008086111 -8.24468641278e-05 -1.37746571327e-05 5.50087145338e-05 0.000123903430822 0.000192909671974 0.000262027618522 0.000331257451293 0.000400599351404 0.000470053500267 0.000539620079588 0.000609299271365 0.000679091257893 0.000748996221761 0.000819014345853 0.000889145813349 0.000959390807728 0.00102974951276 0.00110022211253 0.00117080879139 0.00124150973401 0.00131232512537 0.00138325515073 0.00145429999565 0.00152545984601 0.00159673488796 0.00166812530798 0.00173963129285 0.00181125302962 0.00188299070569 0.00195484450872 0.0020268146267 0.00209890124793 0.00217110456098 0.00224342475476 0.00231586201848 0.00238841654163 0.00246108851404 0.00253387812584 0.00260678556744 0.0026798110296 0.00275295470336 0.00282621678008 0.00289959745142 0.00297309690937 0.00304671534621 0.00312045295454 0.00319430992727 0.00326828645763 0.00334238273915 0.00341659896569 0.0034909353314 0.00356539203077 0.00363996925859 0.00371466720996 0.00378948608032 0.00386442606539 0.00393948736124 0.00401467016424 0.00408997467109 0.00416540107879 0.00424094958468 0.0043166203864 0.00439241368193 0.00446832966954 0.00454436854786 0.00462053051582 0.00469681577267 0.00477322451798 0.00484975695166 0.00492641327392 0.00500319368533 0.00508009838674 0.00515712757936 0.00523428146471 0.00531156024463 0.00538896412131 0.00546649329725 0.00554414797527 0.00562192835854 0.00569983465055 0.00577786705511 0.00585602577637 0.00593431101881 0.00601272298724 0.0060912618868 0.00616992792295 0.00624872130151 0.00632764222862 0.00640669091074 0.00648586755469 0.0065651723676 0.00664460555695 0.00672416733055 0.00680385789655 0.00688367746344 0.00696362624004 0.00704370443551 0.00712391225935 0.0072042499214 0.00728471763184 0.00736531560119 0.0074460440403 0.00752690316037 0.00760789317296 0.00768901428994 0.00777026672355 0.00785165068635 0.00793316639126 0.00801481405154 0.00809659388079 0.00817850609298 0.00826055090239 0.00834272852367 0.00842503917182 0.00850748306217 0.00859006041041 0.00867277143258 0.00875561634507 0.00883859536461 0.0089217087083 0.00900495659357 0.00908833923822 0.00917185686039 0.00925550967858 0.00933929791164 0.00942322177878 0.00950728149956 0.00959147729389 0.00967580938204 0.00976027798465 0.0098448833227 0.00992962561753 0.0100145050909 0.0100995219647 0.0101846764616 0.0102699688041 0.0103553992156 0.0104409679195 0.0105266751396 0.0106125211002 0.0106985060258 0.0107846301415 0.0108708936725 0.0109572968446 0.0110438398837 0.0111305230163 0.0112173464691 0.0113043104694 0.0113914152445 0.0114786610225 0.0115660480316 0.0116535765003 0.0117412466576 0.0118290587331 0.0119170129562 0.0120051095573 0.0120933487666 0.0121817308152 0.0122702559342 0.0123589243552 0.0124477363102 0.0125366920316 0.012625791752 0.0127150357045 0.0128044241227 0.0128939572405 0.0129836352919 0.0130734585117 0.0131634271349 0.0132535413967 0.0133438015331 0.0134342077801 0.0135247603742 0.0136154595523 0.0137063055518 0.0137972986102 0.0138884389657 0.0139797268567 0.014071162522 0.0141627462009 0.0142544781328 0.0143463585579 0.0144383877165 0.0145305658493 0.0146228931976 0.0147153700028 0.0148079965069 0.0149007729523 0.0149936995815 0.0150867766379 0.0151800043648 0.0152733830062 0.0153669128063 0.0154605940099 0.0155544268621 0.0156484116082 0.0157425484943 0.0158368377666 0.0159312796717 0.0160258744568 0.0161206223693 0.0162155236572 0.0163105785686 0.0164057873522 0.0165011502572 0.0165966675331 0.0166923394297 0.0167881661973 0.0168841480866 0.0169802853488 0.0170765782353 0.017173026998 0.0172696318894 0.0173663931621 0.0174633110692 0.0175603858644 0.0176576178016 0.0177550071352 0.0178525541199 0.017950259011 0.018048122064 0.0181461435351 0.0182443236806 0.0183426627575 0.0184411610229 0.0185398187345 0.0186386361506 0.0187376135296 0.0188367511304 0.0189360492124 0.0190355080354 0.0191351278596 0.0192349089456 0.0193348515545 0.0194349559477 0.0195352223872 0.0196356511352 0.0197362424544 0.0198369966082 0.0199379138599 0.0200389944737 0.0201402387141 0.0202416468458 0.0203432191342 0.020444955845 0.0205468572443 0.0206489235989 0.0207511551756 0.020853552242 0.020956115066 0.0210588439158 0.0211617390602 0.0212648007684 0.0213680293101 0.0214714249553 0.0215749879745 0.0216787186387 0.0217826172192 0.0218866839879 0.0219909192169 0.0220953231791 0.0221998961475 0.0223046383958 0.0224095501979 0.0225146318283 0.022619883562 0.0227253056743 0.022830898441 0.0229366621383 0.023042597043 0.0231487034322 0.0232549815835 0.0233614317749 0.0234680542849 0.0235748493925 0.0236818173771 0.0237889585185 0.023896273097 0.0240037613934 0.0241114236889 0.0242192602651 0.0243272714042 0.0244354573888 0.0245438185018 0.0246523550268 0.0247610672477 0.024869955449 0.0249790199155 0.0250882609325 0.0251976787859 0.0253072737619 0.0254170461471 0.0255269962289 0.0256371242949 0.0257474306331 0.0258579155322 0.0259685792811 0.0260794221695 0.0261904444873 0.026301646525 0.0264130285734 0.0265245909241 0.0266363338687 0.0267482576998 0.0268603627101 0.0269726491929 0.0270851174419 0.0271977677514 0.0273106004161 0.0274236157313 0.0275368139925 0.0276501954959 0.0277637605381 0.0278775094163 0.0279914424281 0.0281055598715 0.028219862045 0.0283343492477 0.0284490217792 0.0285638799394 0.0286789240288 0.0287941543484 0.0289095711996 0.0290251748845 0.0291409657054 0.0292569439653 0.0293731099675 0.0294894640162 0.0296060064155 0.0297227374704 0.0298396574864 0.0299567667692 0.0300740656253 0.0301915543616 0.0303092332854 0.0304271027045 0.0305451629275 0.030663414263 0.0307818570206 0.03090049151 0.0310193180417 0.0311383369264 0.0312575484757 0.0313769530013 0.0314965508156 0.0316163422316 0.0317363275626 0.0318565071226 0.0319768812259 0.0320974501875 0.0322182143228 0.0323391739477 0.0324603293787 0.0325816809328 0.0327032289275 0.0328249736807 0.0329469155109 0.0330690547372 0.0331913916791 0.0333139266566 0.0334366599904 0.0335595920015 0.0336827230116 0.0338060533427 0.0339295833176 0.0340533132594 0.0341772434918 0.034301374339 0.0344257061258 0.0345502391775 0.0346749738198 0.0347999103792 0.0349250491824 0.0350503905568 0.0351759348304 0.0353016823315 0.0354276333893 0.0355537883331 0.0356801474931 0.0358067111998 0.0359334797844 0.0360604535784 0.0361876329141 0.0363150181242 0.0364426095419 0.0365704075011 0.0366984123361 0.0368266243818 0.0369550439737 0.0370836714476 0.0372125071401 0.0373415513882 0.0374708045297 0.0376002669025 0.0377299388455 0.0378598206978 0.0379899127993 0.0381202154902 0.0382507291116 0.0383814540048 0.0385123905119 0.0386435389753 0.0387748997383 0.0389064731444 0.039038259538 0.0391702592637 0.0393024726669 0.0394349000935 0.03956754189 0.0397003984033 0.0398334699812 0.0399667569716 0.0401002597233 0.0402339785855 0.0403679139082 0.0405020660417 0.0406364353369 0.0407710221454 0.0409058268194 0.0410408497114 0.0411760911748 0.0413115515633 0.0414472312313 0.0415831305338 0.0417192498264 0.0418555894651 0.0419921498067 0.0421289312083 0.042265934028 0.042403158624 0.0425406053553 0.0426782745817 0.0428161666632 0.0429542819606 0.0430926208352 0.043231183649 0.0433699707644 0.0435089825445 0.0436482193531 0.0437876815544 0.0439273695133 0.0440672835952 0.0442074241661 0.0443477915927 0.0444883862422 0.0446292084824 0.0447702586818 0.0449115372094 0.0450530444347 0.045194780728 0.0453367464602 0.0454789420025 0.045621367727 0.0457640240064 0.0459069112138 0.0460500297231 0.0461933799086 0.0463369621455 0.0464807768094 0.0466248242764 0.0467691049235 0.0469136191282 0.0470583672684 0.0472033497229 0.047348566871 0.0474940190927 0.0476397067683 0.0477856302792 0.047931790007 0.0480781863341 0.0482248196435 0.048371690319 0.0485187987445 0.0486661453052 0.0488137303864 0.0489615543742 0.0491096176555 0.0492579206175 0.0494064636482 0.0495552471362 0.0497042714709 0.0498535370421 0.0500030442402 0.0501527934565 0.0503027850826 0.050453019511 0.0506034971348 0.0507542183476 0.0509051835438 0.0510563931182 0.0512078474665 0.051359546985 0.0515114920704 0.0516636831203 0.0518161205329 0.051968804707 0.052121736042 0.052274914938 0.0524283417957 0.0525820170167 0.0527359410028 0.0528901141568 0.0530445368821 0.0531992095826 0.053354132663 0.0535093065286 0.0536647315854 0.05382040824 0.0539763368996 0.0541325179723 0.0542889518665 0.0544456389916 0.0546025797575 0.0547597745748 0.0549172238547 0.0550749280091 0.0552328874507 0.0553911025927 0.0555495738489 0.0557083016341 0.0558672863634 0.0560265284527 0.0561860283188 0.0563457863789 0.0565058030509 0.0566660787534 0.0568266139059 0.0569874089282 0.057148464241 0.0573097802658 0.0574713574244 0.0576331961398 0.0577952968351 0.0579576599346 0.0581202858629 0.0582831750457 0.0584463279089 0.0586097448795 0.058773426385 0.0589373728535 0.0591015847141 0.0592660623963 0.0594308063304 0.0595958169475 0.0597610946792 0.0599266399579 0.0600924532167 0.0602585348895 0.0604248854107 0.0605915052155 0.0607583947398 0.0609255544203 0.0610929846943 0.0612606859998 0.0614286587755 0.0615969034609 0.0617654204961 0.0619342103221 0.0621032733804 0.0622726101133 0.0624422209638 0.0626121063757 0.0627822667933 0.062952702662 0.0631234144275 0.0632944025366 0.0634656674364 0.0636372095752 0.0638090294016 0.0639811273652 0.0641535039162 0.0643261595057 0.0644990945852 0.0646723096073 0.064845805025 0.0650195812923 0.0651936388639 0.0653679781951 0.0655425997419 0.0657175039613 0.0658926913108 0.0660681622487 0.0662439172342 0.0664199567269 0.0665962811876 0.0667728910773 0.0669497868583 0.0671269689934 0.0673044379459 0.0674821941803 0.0676602381616 0.0678385703555 0.0680171912287 0.0681961012484 0.0683753008827 0.0685547906004 0.0687345708712 0.0689146421652 0.0690950049537 0.0692756597085 0.0694566069022 0.0696378470083 0.0698193805008 0.0700012078547 0.0701833295457 0.0703657460503 0.0705484578456 0.0707314654098 0.0709147692216 0.0710983697605 0.0712822675069 0.0714664629419 0.0716509565473 0.0718357488059 0.0720208402012 0.0722062312172 0.0723919223391 0.0725779140527 0.0727642068445 0.072950801202 0.0731376976132 0.0733248965672 0.0735123985536 0.0737002040632 0.073888313587 0.0740767276174 0.0742654466472 0.0744544711702 0.0746438016808 0.0748334386744 0.0750233826472 0.075213634096 0.0754041935186 0.0755950614136 0.0757862382802 0.0759777246186 0.0761695209298 0.0763616277156 0.0765540454786 0.0767467747221 0.0769398159504 0.0771331696685 0.0773268363823 0.0775208165984 0.0777151108242 0.0779097195683 0.0781046433396 0.078299882648 0.0784954380045 0.0786913099206 0.0788874989088 0.0790840054823 0.0792808301551 0.0794779734424 0.0796754358597 0.0798732179237 0.0800713201519 0.0802697430625 0.0804684871746 0.0806675530082 0.080866941084 0.0810666519238 0.08126668605 0.0814670439858 0.0816677262556 0.0818687333843 0.0820700658977 0.0822717243227 0.0824737091868 0.0826760210184 0.0828786603468 0.0830816277021 0.0832849236154 0.0834885486185 0.0836925032441 0.0838967880258 0.0841014034981 0.0843063501963 0.0845116286565 0.0847172394158 0.0849231830121 0.0851294599843 0.0853360708719 0.0855430162155 0.0857502965565 0.0859579124372 0.0861658644007 0.0863741529911 0.0865827787534 0.0867917422333 0.0870010439775 0.0872106845335 0.0874206644499 0.087630984276 0.087841644562 0.0880526458591 0.0882639887192 0.0884756736953 0.0886877013413 0.0889000722117 0.0891127868622 0.0893258458493 0.0895392497304 0.0897529990638 0.0899670944087 0.0901815363253 0.0903963253745 0.0906114621183 0.0908269471195 0.0910427809418 0.09125896415 0.0914754973096 0.0916923809871 0.0919096157499 0.0921272021664 0.0923451408057 0.092563432238 0.0927820770345 0.0930010757672 0.093220429009 0.0934401373337 0.0936602013162 0.0938806215322 0.0941013985583 0.0943225329722 0.0945440253524 0.0947658762783 0.0949880863304 0.0952106560899 0.0954335861393 0.0956568770616 0.0958805294411 0.0961045438629 0.0963289209131 0.0965536611786 0.0967787652475 0.0970042337086 0.0972300671519 0.097456266168 0.0976828313489 0.0979097632873 0.0981370625768 0.0983647298121 0.0985927655888 0.0988211705036 0.0990499451539 0.0992790901383 0.0995086060563 0.0997384935083 0.0999687530958 0.100199385421 0.100430391088 0.1006617707 0.100893524863 0.101125654183 0.101358159268 0.101591040726 0.101824299165 0.102057935197 0.102291949433 0.102526342484 0.102761114965 0.102996267488 0.10323180067 0.103467715127 0.103704011475 0.103940690334 0.104177752321 0.104415198058 0.104653028166 0.104891243266 0.105129843982 0.105368830939 0.105608204761 0.105847966075 0.106088115508 0.106328653688 0.106569581245 0.106810898808 0.10705260701 0.107294706482 0.107537197859 0.107780081773 0.108023358862 0.10826702976 0.108511095107 0.108755555539 0.109000411698 0.109245664222 0.109491313755 0.109737360938 0.109983806416 0.110230650833 0.110477894835 0.110725539069 0.110973584182 0.111222030824 0.111470879644 0.111720131294 0.111969786426 0.112219845692 0.112470309748 0.112721179248 0.112972454848 0.113224137207 0.113476226982 0.113728724832 0.11398163142 0.114234947405 0.114488673452 0.114742810223 0.114997358384 0.1152523186 0.115507691539 0.115763477869 0.116019678258 0.116276293378 0.116533323899 0.116790770494 0.117048633836 0.1173069146 0.117565613463 0.117824731099 0.118084268188 0.118344225409 0.118604603441 0.118865402966 0.119126624666 0.119388269225 0.119650337326 0.119912829657 0.120175746902 0.120439089751 0.120702858891 0.120967055014 0.121231678811 0.121496730973 0.121762212194 0.122028123169 0.122294464593 0.122561237163 0.122828441577 0.123096078535 0.123364148736 0.123632652881 0.123901591674 0.124170965817 0.124440776015 0.124711022975 0.124981707404 0.125252830008 0.125524391499 0.125796392585 0.12606883398 0.126341716395 0.126615040545 0.126888807144 0.127163016909 0.127437670557 0.127712768807 0.127988312379 0.128264301993 0.128540738371 0.128817622237 0.129094954314 0.129372735329 0.129650966009 0.12992964708 0.130208779273 0.130488363317 0.130768399944 0.131048889887 0.131329833879 0.131611232656 0.131893086953 0.132175397508 0.132458165059 0.132741390347 0.133025074112 0.133309217097 0.133593820044 0.133878883699 0.134164408806 0.134450396115 0.134736846371 0.135023760325 0.135311138728 0.13559898233 0.135887291886 0.13617606815 0.136465311877 0.136755023823 0.137045204747 0.137335855408 0.137626976566 0.137918568983 0.138210633422 0.138503170647 0.138796181422 0.139089666516 0.139383626695 0.139678062729 0.139972975388 0.140268365443 0.140564233667 0.140860580835 0.141157407721 0.141454715103 0.141752503757 0.142050774464 0.142349528002 0.142648765155 0.142948486705 0.143248693436 0.143549386133 0.143850565583 0.144152232574 0.144454387895 0.144757032337 0.145060166691 0.145363791751 0.145667908311 0.145972517166 0.146277619114 0.146583214952 0.14688930548 0.147195891499 0.147502973812 0.14781055322 0.14811863053 0.148427206546 0.148736282077 0.149045857931 0.149355934918 0.149666513849 0.149977595536 0.150289180794 0.150601270438 0.150913865283 0.151226966149 0.151540573853 0.151854689217 0.152169313062 0.152484446212 0.15280008949 0.153116243723 0.153432909738 0.153750088363 0.154067780428 0.154385986764 0.154704708204 0.155023945581 0.155343699731 0.15566397149 0.155984761696 0.156306071189 0.156627900808 0.156950251396 0.157273123797 0.157596518854 0.157920437415 0.158244880326 0.158569848436 0.158895342595 0.159221363655 0.15954791247 0.159874989892 0.160202596779 0.160530733986 0.160859402373 0.161188602799 0.161518336126 0.161848603215 0.162179404933 0.162510742142 0.162842615712 0.163175026509 0.163507975403 0.163841463266 0.16417549097 0.164510059389 0.164845169398 0.165180821873 0.165517017694 0.165853757739 0.166191042889 0.166528874028 0.166867252038 0.167206177805 0.167545652216 0.167885676159 0.168226250523 0.168567376199 0.16890905408 0.16925128506 0.169594070034 0.169937409899 0.170281305553 0.170625757895 0.170970767828 0.171316336253 0.171662464075 0.172009152199 0.172356401532 0.172704212983 0.173052587461 0.173401525878 0.173751029147 0.174101098183 0.1744517339 0.174802937217 0.175154709052 0.175507050326 0.17585996196 0.176213444877 0.176567500003 0.176922128264 0.177277330587 0.177633107901 0.177989461139 0.178346391231 0.178703899111 0.179061985716 0.179420651981 0.179779898845 0.180139727248 0.180500138131 0.180861132438 0.181222711112 0.1815848751 0.181947625348 0.182310962807 0.182674888427 0.183039403159 0.183404507958 0.183770203778 0.184136491576 0.184503372311 0.184870846943 0.185238916432 0.185607581742 0.185976843837 0.186346703683 0.186717162249 0.187088220502 0.187459879414 0.187832139958 0.188205003106 0.188578469835 0.188952541122 0.189327217945 0.189702501284 0.190078392122 0.190454891442 0.190832000228 0.191209719467 0.191588050148 0.19196699326 0.192346549795 0.192726720745 0.193107507106 0.193488909873 0.193870930045 0.19425356862 0.1946368266 0.195020704987 0.195405204786 0.195790327002 0.196176072644 0.19656244272 0.196949438242 0.197337060221 0.197725309672 0.19811418761 0.198503695053 0.19889383302 0.199284602532 0.199676004611 0.20006804028 0.200460710566 0.200854016496 0.201247959098 0.201642539404 0.202037758446 0.202433617257 0.202830116873 0.203227258333 0.203625042673 0.204023470937 0.204422544164 0.204822263401 0.205222629692 0.205623644085 0.206025307628 0.206427621374 0.206830586374 0.207234203683 0.207638474356 0.208043399452 0.208448980029 0.208855217148 0.209262111873 0.209669665268 0.210077878399 0.210486752335 0.210896288144 0.211306486898 0.211717349671 0.212128877537 0.212541071573 0.212953932858 0.21336746247 0.213781661494 0.214196531011 0.214612072107 0.21502828587 0.215445173388 0.215862735752 0.216280974055 0.21669988939 0.217119482854 0.217539755544 0.217960708559 0.218382343002 0.218804659976 0.219227660584 0.219651345934 0.220075717134 0.220500775294 0.220926521527 0.221352956946 0.221780082667 0.222207899807 0.222636409486 0.223065612825 0.223495510946 0.223926104974 0.224357396036 0.22478938526 0.225222073776 0.225655462716 0.226089553215 0.226524346407 0.22695984343 0.227396045424 0.22783295353 0.22827056889 0.22870889265 0.229147925957 0.229587669958 0.230028125805 0.23046929465 0.230911177646 0.231353775951 0.231797090721 0.232241123117 0.232685874301 0.233131345435 0.233577537686 0.234024452221 0.234472090208 0.23492045282 0.235369541228 0.235819356608 0.236269900137 0.236721172994 0.237173176358 0.237625911413 0.238079379344 0.238533581335 0.238988518576 0.239444192257 0.23990060357 0.240357753709 0.24081564387 0.24127427525 0.241733649051 0.242193766473 0.242654628721 0.243116237 0.243578592517 0.244041696483 0.244505550109 0.244970154608 0.245435511196 0.24590162109 0.24636848551 0.246836105678 0.247304482816 0.24777361815 0.248243512907 0.248714168317 0.249185585611 0.249657766023 0.250130710787 0.25060442114 0.251078898324 0.251554143577 0.252030158145 0.252506943271 0.252984500205 0.253462830194 0.253941934491 0.254421814348 0.254902471022 0.255383905769 0.25586611985 0.256349114525 0.256832891059 0.257317450718 0.257802794767 0.258288924479 0.258775841124 0.259263545975 0.259752040311 0.260241325407 0.260731402544 0.261222273005 0.261713938073 0.262206399035 0.26269965718 0.263193713797 0.263688570179 0.264184227621 0.26468068742 0.265177950874 0.265676019284 0.266174893954 0.266674576188 0.267175067294 0.267676368581 0.268178481361 0.268681406947 0.269185146656 0.269689701804 0.270195073712 0.270701263702 0.271208273099 0.271716103228 0.272224755419 0.272734231002 0.273244531309 0.273755657677 0.274267611442 0.274780393944 0.275294006524 0.275808450526 0.276323727295 0.276839838181 0.277356784532 0.277874567702 0.278393189045 0.278912649917 0.279432951679 0.279954095691 0.280476083316 0.280998915921 0.281522594872 0.282047121541 0.282572497299 0.28309872352 0.283625801582 0.284153732863 0.284682518745 0.285212160611 0.285742659847 0.28627401784 0.286806235981 0.287339315662 0.287873258277 0.288408065224 0.288943737902 0.289480277711 0.290017686057 0.290555964344 0.291095113982 0.29163513638 0.292176032951 0.292717805111 0.293260454276 0.293803981867 0.294348389306 0.294893678016 0.295439849424 0.29598690496 0.296534846054 0.29708367414 0.297633390654 0.298183997033 0.298735494719 0.299287885155 0.299841169784 0.300395350056 0.300950427419 0.301506403326 0.302063279231 0.302621056592 0.303179736868 0.303739321519 0.304299812011 0.304861209809 0.305423516383 0.305986733203 0.306550861743 0.307115903478 0.307681859887 0.308248732451 0.308816522653 0.309385231978 0.309954861913 0.31052541395 0.311096889581 0.311669290301 0.312242617607 0.312816872999 0.313392057981 0.313968174056 0.314545222731 0.315123205517 0.315702123926 0.316281979472 0.316862773672 0.317444508045 0.318027184115 0.318610803404 0.319195367439 0.319780877751 0.320367335871 0.320954743333 0.321543101674 0.322132412433 0.322722677153 0.323313897376 0.32390607465 0.324499210525 0.325093306552 0.325688364284 0.32628438528 0.326881371098 0.327479323301 0.328078243451 0.328678133118 0.329278993869 0.329880827276 0.330483634916 0.331087418363 0.331692179198 0.332297919004 0.332904639364 0.333512341867 0.334121028101 0.33473069966 0.335341358139 0.335953005135 0.336565642247 0.33717927108 0.337793893239 0.33840951033 0.339026123966 0.339643735758 0.340262347324 0.340881960281 0.34150257625 0.342124196855 0.342746823723 0.343370458482 0.343995102763 0.344620758201 0.345247426433 0.345875109099 0.346503807839 0.3471335243 0.347764260128 0.348396016975 0.349028796491 0.349662600334 0.350297430161 0.350933287632 0.351570174413 0.352208092168 0.352847042566 0.35348702728 0.354128047984 0.354770106354 0.35541320407 0.356057342815 0.356702524275 0.357348750136 0.35799602209 0.358644341829 0.359293711051 0.359944131454 0.360595604739 0.361248132611 0.361901716778 0.362556358948 0.363212060835 0.363868824154 0.364526650624 0.365185541964 0.3658454999 0.366506526158 0.367168622466 0.367831790558 0.368496032168 0.369161349034 0.369827742896 0.370495215499 0.371163768587 0.371833403911 0.372504123222 0.373175928275 0.373848820828 0.37452280264 0.375197875476 0.3758740411 0.376551301283 0.377229657796 0.377909112414 0.378589666914 0.379271323077 0.379954082686 0.380637947528 0.381322919391 0.382009000068 0.382696191353 0.383384495044 0.384073912942 0.384764446851 0.385456098577 0.38614886993 0.386842762722 0.387537778769 0.388233919888 0.388931187901 0.389629584632 0.390329111909 0.391029771561 0.391731565422 0.392434495327 0.393138563116 0.39384377063 0.394550119715 0.395257612218 0.39596624999 0.396676034886 0.397386968762 0.398099053478 0.398812290897 0.399526682885 0.400242231311 0.400958938047 0.401676804968 0.402395833952 0.40311602688 0.403837385637 0.40455991211 0.405283608188 0.406008475766 0.406734516739 0.407461733007 0.408190126473 0.408919699042 0.409650452623 0.410382389128 0.411115510471 0.411849818571 0.412585315349 0.413322002728 0.414059882637 0.414798957005 0.415539227767 0.416280696858 0.417023366219 0.417767237792 0.418512313525 0.419258595365 0.420006085266 0.420754785183 0.421504697074 0.422255822902 0.423008164632 0.423761724232 0.424516503674 0.425272504931 0.426029729983 0.426788180809 0.427547859395 0.428308767727 0.429070907797 0.429834281598 0.430598891127 0.431364738386 0.432131825376 0.432900154106 0.433669726585 0.434440544827 0.435212610848 0.435985926668 0.436760494311 0.437536315802 0.438313393172 0.439091728453 0.439871323682 0.440652180897 0.441434302143 0.442217689466 0.443002344914 0.44378827054 0.444575468402 0.445363940557 0.446153689069 0.446944716005 0.447737023433 0.448530613426 0.449325488061 0.450121649417 0.450919099577 0.451717840627 0.452517874657 0.453319203761 0.454121830033 0.454925755575 0.455730982489 0.456537512883 0.457345348865 0.45815449255 0.458964946055 0.459776711499 0.460589791007 0.461404186705 0.462219900725 0.4630369352 0.463855292268 0.464674974069 0.465495982749 0.466318320455 0.467141989339 0.467966991555 0.468793329262 0.469621004621 0.470450019799 0.471280376963 0.472112078287 0.472945125946 0.473779522119 0.474615268989 0.475452368744 0.476290823573 0.477130635669 0.47797180723 0.478814340456 0.479658237551 0.480503500724 0.481350132186 0.482198134151 0.483047508838 0.48389825847 0.484750385271 0.485603891472 0.486458779305 0.487315051007 0.488172708818 0.489031754982 0.489892191746 0.490754021361 0.491617246082 0.492481868167 0.493347889879 0.494215313483 0.495084141248 0.495954375448 0.496826018359 0.497699072261 0.498573539438 0.499449422179 0.500326722775 0.501205443521 0.502085586715 0.502967154661 0.503850149665 0.504734574037 0.505620430091 0.506507720143 0.507396446517 0.508286611536 0.50917821753 0.510071266831 0.510965761775 0.511861704703 0.512759097959 0.51365794389 0.514558244848 0.515460003189 0.516363221271 0.517267901457 0.518174046115 0.519081657615 0.519990738331 0.520901290641 0.521813316929 0.52272681958 0.523641800983 0.524558263534 0.525476209628 0.526395641668 0.52731656206 0.528238973211 0.529162877537 0.530088277453 0.531015175382 0.531943573747 0.532873474977 0.533804881506 0.53473779577 0.53567222021 0.536608157271 0.5375456094 0.538484579051 0.539425068681 0.540367080748 0.541310617719 0.542255682062 0.543202276249 0.544150402756 0.545100064064 0.546051262657 0.547004001025 0.547958281659 0.548914107056 0.549871479717 0.550830402147 0.551790876853 0.55275290635 0.553716493153 0.554681639784 0.555648348768 0.556616622633 0.557586463914 0.558557875147 0.559530858873 0.560505417638 0.561481553993 0.56245927049 0.563438569687 0.564419454147 0.565401926435 0.566385989123 0.567371644784 0.568358895997 0.569347745345 0.570338195416 0.571330248799 0.572323908091 0.573319175891 0.574316054803 0.575314547436 0.5763146564 0.577316384313 0.578319733796 0.579324707473 0.580331307974 0.581339537932 0.582349399985 0.583360896774 0.584374030947 0.585388805153 0.586405222048 0.58742328429 0.588442994543 0.589464355475 0.590487369758 0.591512040068 0.592538369086 0.593566359497 0.594596013991 0.595627335261 0.596660326005 0.597694988926 0.598731326731 0.599769342131 0.600809037842 0.601850416583 0.602893481079 0.60393823406 0.604984678257 0.60603281641 0.607082651259 0.608134185553 0.609187422041 0.610242363479 0.611299012627 0.61235737225 0.613417445116 0.614479233998 0.615542741675 0.616607970929 0.617674924547 0.61874360532 0.619814016043 0.620886159518 0.621960038549 0.623035655946 0.624113014523 0.625192117098 0.626272966494 0.627355565539 0.628439917066 0.629526023911 0.630613888916 0.631703514927 0.632794904794 0.633888061373 0.634982987524 0.636079686111 0.637178160003 0.638278412074 0.639380445204 0.640484262273 0.641589866172 0.642697259791 0.643806446029 0.644917427787 0.646030207971 0.647144789493 0.648261175269 0.649379368219 0.65049937127 0.65162118735 0.652744819395 0.653870270344 0.654997543143 0.656126640739 0.657257566088 0.658390322147 0.659524911881 0.660661338257 0.661799604248 0.662939712833 0.664081666995 0.66522546972 0.666371124001 0.667518632836 0.668667999227 0.66981922618 0.670972316708 0.672127273826 0.673284100558 0.674442799928 0.675603374969 0.676765828717 0.677930164213 0.679096384503 0.680264492638 0.681434491674 0.682606384673 0.683780174699 0.684955864824 0.686133458124 0.68731295768 0.688494366577 0.689677687906 0.690862924762 0.692050080248 0.693239157468 0.694430159533 0.69562308956 0.696817950668 0.698014745985 0.699213478641 0.700414151772 0.70161676852 0.702821332031 0.704027845456 0.705236311951 0.706446734678 0.707659116805 0.708873461502 0.710089771947 0.711308051321 0.712528302813 0.713750529613 0.714974734921 0.716200921939 0.717429093874 0.71865925394 0.719891405355 0.721125551343 0.722361695132 0.723599839957 0.724839989056 0.726082145675 0.727326313062 0.728572494473 0.729820693168 0.731070912413 0.732323155478 0.733577425639 0.734833726178 0.736092060382 0.737352431543 0.738614842958 0.739879297929 0.741145799765 0.742414351779 0.743684957291 0.744957619623 0.746232342106 0.747509128074 0.748787980869 0.750068903835 0.751351900323 0.752636973691 0.7539241273 0.755213364518 0.756504688718 0.757798103277 0.75909361158 0.760391217016 0.76169092298 0.762992732873 0.764296650099 0.76560267807 0.766910820203 0.768221079921 0.76953346065 0.770847965826 0.772164598886 0.773483363275 0.774804262444 0.776127299848 0.777452478948 0.778779803211 0.780109276111 0.781440901124 0.782774681735 0.784110621433 0.785448723714 0.786788992078 0.788131430031 0.789476041085 0.790822828759 0.792171796575 0.793522948063 0.794876286758 0.7962318162 0.797589539936 0.798949461518 0.800311584503 0.801675912455 0.803042448943 0.804411197543 0.805782161835 0.807155345407 0.80853075185 0.809908384763 0.81128824775 0.812670344421 0.814054678392 0.815441253285 0.816830072727 0.818221140351 0.819614459798 0.821010034711 0.822407868742 0.823807965549 0.825210328793 0.826614962145 0.828021869278 0.829431053873 0.830842519618 0.832256270204 0.833672309331 0.835090640702 0.83651126803 0.837934195029 0.839359425424 0.840786962942 0.842216811318 0.843648974294 0.845083455615 0.846520259035 0.847959388313 0.849400847213 0.850844639507 0.852290768973 0.853739239393 0.855190054556 0.856643218259 0.858098734304 0.859556606497 0.861016838654 0.862479434595 0.863944398145 0.865411733137 0.866881443412 0.868353532812 0.86982800519 0.871304864403 0.872784114315 0.874265758797 0.875749801723 0.877236246977 0.878725098447 0.880216360029 0.881710035624 0.88320612914 0.884704644491 0.886205585597 0.887708956384 0.889214760787 0.890723002745 0.892233686203 0.893746815114 0.895262393436 0.896780425134 0.89830091418 0.899823864552 0.901349280233 0.902877165216 0.904407523496 0.905940359078 0.907475675972 0.909013478195 0.910553769769 0.912096554725 0.913641837099 0.915189620932 0.916739910276 0.918292709185 0.919848021722 0.921405851956 0.922966203963 0.924529081824 0.926094489629 0.927662431473 0.929232911458 0.930805933692 0.932381502291 0.933959621377 0.935540295079 0.937123527532 0.938709322877 0.940297685265 0.941888618849 0.943482127793 0.945078216265 0.946676888441 0.948278148503 0.949882000641 0.95148844905 0.953097497934 0.954709151502 0.95632341397 0.957940289561 0.959559782506 0.961181897041 0.962806637411 0.964434007865 0.966064012662 0.967696656065 0.969331942346 0.970969875784 0.972610460663 0.974253701276 0.975899601921 0.977548166904 0.979199400539 0.980853307146 0.98250989105 0.984169156587 0.985831108097 0.987495749929 0.989163086436 0.990833121982 0.992505860935 0.994181307672 0.995859466576 0.997540342037 0.999223938453 1.00091026023 1.00259931177 1.00429109751 1.00598562186 1.00768288926 1.00938290415 1.01108567098 1.0127911942 1.01449947828 1.01621052767 1.01792434687 1.01964094035 1.0213603126 1.02308246813 1.02480741143 1.02653514703 1.02826567943 1.02999901318 1.03173515279 1.03347410282 1.03521586782 1.03696045233 1.03870786093 1.04045809819 1.04221116869 1.043967077 1.04572582773 1.04748742548 1.04925187486 1.05101918047 1.05278934696 1.05456237893 1.05633828105 1.05811705794 1.05989871427 1.0616832547 1.06347068389 1.06526100652 1.06705422728 1.06885035085 1.07064938194 1.07245132525 1.07425618549 1.0760639674 1.07787467569 1.0796883151 1.08150489039 1.0833244063 1.08514686758 1.08697227902 1.08880064539 1.09063197146 1.09246626204 1.09430352191 1.09614375589 1.09798696878 1.09983316542 1.10168235064 1.10353452926 1.10538970614 1.10724788612 1.10910907408 1.11097327488 1.11284049339 1.11471073451 1.11658400312 1.11846030412 1.12033964243 1.12222202296 1.12410745064 1.12599593039 1.12788746716 1.12978206591 1.13167973157 1.13358046912 1.13548428354 1.1373911798 1.13930116288 1.1412142378 1.14313040955 1.14504968314 1.14697206361 1.14889755596 1.15082616526 1.15275789653 1.15469275483 1.15663074523 1.1585718728 1.16051614261 1.16246355974 1.16441412931 1.1663678564 1.16832474613 1.17028480362 1.172248034 1.1742144424 1.17618403397 1.17815681386 1.18013278723 1.18211195925 1.1840943351 1.18607991997 1.18806871904 1.19006073753 1.19205598064 1.1940544536 1.19605616163 1.19806110997 1.20006930387 1.20208074857 1.20409544935 1.20611341146 1.2081346402 1.21015914085 1.2121869187 1.21421797907 1.21625232725 1.21828996859 1.2203309084 1.22237515203 1.22442270483 1.22647357214 1.22852775935 1.23058527181 1.23264611492 1.23471029407 1.23677781465 1.23884868207 1.24092290176 1.24300047914 1.24508141965 1.24716572872 1.24925341182 1.2513444744 1.25343892193 1.2555367599 1.25763799378 1.25974262909 1.26185067133 1.263962126 1.26607699864 1.26819529478 1.27031701995 1.27244217972 1.27457077963 1.27670282527 1.2788383222 1.28097727601 1.28311969231 1.28526557669 1.28741493476 1.28956777216 1.29172409451 1.29388390746 1.29604721665 1.29821402775 1.30038434642 1.30255817834 1.30473552921 1.3069164047 1.30910081054 1.31128875244 1.31348023611 1.3156752673 1.31787385174 1.32007599519 1.32228170341 1.32449098217 1.32670383725 1.32892027444 1.33114029953 1.33336391835 1.33559113669 1.33782196039 1.34005639529 1.34229444723 1.34453612207 1.34678142566 1.3490303639 1.35128294265 1.35353916781 1.35579904529 1.358062581 1.36032978086 1.36260065079 1.36487519675 1.36715342468 1.36943534054 1.37172095031 1.37401025995 1.37630327547 1.37860000286 1.38090044813 1.38320461729 1.38551251638 1.38782415143 1.3901395285 1.39245865363 1.3947815329 1.39710817238 1.39943857816 1.40177275634 1.40411071302 1.40645245432 1.40879798636 1.41114731529 1.41350044725 1.41585738839 1.41821814488 1.4205827229 1.42295112864 1.42532336828 1.42769944804 1.43007937413 1.43246315278 1.43485079023 1.43724229272 1.4396376665 1.44203691785 1.44444005305 1.44684707837 1.44925800011 1.4516728246 1.45409155813 1.45651420704 1.45894077767 1.46137127636 1.46380570948 1.46624408339 1.46868640447 1.47113267912 1.47358291372 1.4760371147 1.47849528847 1.48095744147 1.48342358013 1.48589371091 1.48836784026 1.49084597467 1.49332812062 1.49581428459 1.4983044731 1.50079869266 1.50329694979 1.50579925103 1.50830560292 1.51081601203 1.51333048492 1.51584902817 1.51837164837 1.52089835211 1.52342914602 1.5259640367 1.52850303079 1.53104613494 1.53359335579 1.53614470002 1.53870017429 1.54125978529 1.54382353972 1.54639144428 1.5489635057 1.5515397307 1.55412012602 1.55670469841 1.55929345464 1.56188640147 1.5644835457 1.56708489411 1.56969045351 1.57230023072 1.57491423256 1.57753246588 1.58015493752 1.58278165435 1.58541262323 1.58804785106 1.59068734471 1.59333111111 1.59597915716 1.5986314898 1.60128811596 1.60394904259 1.60661427666 1.60928382513 1.611957695 1.61463589325 1.61731842689 1.62000530295 1.62269652845 1.62539211043 1.62809205594 1.63079637205 1.63350506583 1.63621814437 1.63893561477 1.64165748413 1.64438375958 1.64711444825 1.64984955728 1.65258909383 1.65533306507 1.65808147817 1.66083434033 1.66359165875 1.66635344063 1.66911969321 1.67189042373 1.67466563943 1.67744534757 1.68022955542 1.68301827027 1.68581149942 1.68860925017 1.69141152984 1.69421834577 1.69702970529 1.69984561576 1.70266608455 1.70549111904 1.70832072661 1.71115491468 1.71399369065 1.71683706195 1.71968503602 1.72253762032 1.7253948223 1.72825664944 1.73112310923 1.73399420916 1.73686995675 1.73975035952 1.742635425 1.74552516075 1.74841957433 1.7513186733 1.75422246526 1.75713095779 1.76004415851 1.76296207503 1.765884715 1.76881208606 1.77174419587 1.77468105209 1.77762266242 1.78056903455 1.78352017618 1.78647609503 1.78943679885 1.79240229537 1.79537259236 1.79834769758 1.80132761881 1.80431236387 1.80730194054 1.81029635666 1.81329562006 1.81629973858 1.81930872009 1.82232257245 1.82534130356 1.8283649213 1.83139343359 1.83442684835 1.83746517352 1.84050841705 1.8435565869 1.84660969104 1.84966773746 1.85273073416 1.85579868915 1.85887161047 1.86194950615 1.86503238424 1.8681202528 1.87121311993 1.8743109937 1.87741388222 1.88052179361 1.88363473601 1.88675271755 1.88987574639 1.89300383071 1.89613697868 1.8992751985 1.90241849839 1.90556688657 1.90872037127 1.91187896074 1.91504266325 1.91821148708 1.92138544051 1.92456453184 1.92774876941 1.93093816153 1.93413271654 1.93733244282 1.94053734872 1.94374744264 1.94696273297 1.95018322812 1.95340893652 1.95663986661 1.95987602684 1.96311742567 1.9663640716 1.9696159731 1.97287313869 1.97613557689 1.97940329624 1.98267630528 1.98595461257 1.9892382267 1.99252715626 1.99582140984 1.99912099607 2.00242592357 2.00573620101 2.00905183702 2.0123728403 2.01569921953 2.01903098341 2.02236814065 2.02571069999 2.02905867018 2.03241205997 2.03577087813 2.03913513345 2.04250483474 2.04587999081 2.04926061048 2.05264670261 2.05603827605 2.05943533968 2.06283790238 2.06624597306 2.06965956062 2.07307867401 2.07650332216 2.07993351404 2.08336925862 2.08681056489 2.09025744184 2.09370989851 2.09716794392 2.10063158712 2.10410083717 2.10757570314 2.11105619413 2.11454231924 2.1180340876 2.12153150834 2.1250345906 2.12854334355 2.13205777638 2.13557789828 2.13910371845 2.14263524612 2.14617249053 2.14971546093 2.1532641666 2.15681861681 2.16037882087 2.16394478809 2.1675165278 2.17109404934 2.17467736207 2.17826647538 2.18186139863 2.18546214126 2.18906871266 2.19268112229 2.19629937958 2.199923494 2.20355347505 2.2071893322 2.21083107498 2.21447871292 2.21813225555 2.22179171243 2.22545709314 2.22912840727 2.23280566442 2.23648887421 2.24017804628 2.24387319028 2.24757431588 2.25128143276 2.25499455061 2.25871367916 2.26243882813 2.26617000727 2.26990722634 2.27365049512 2.27739982339 2.28115522098 2.2849166977 2.28868426339 2.29245792791 2.29623770114 2.30002359296 2.30381561328 2.30761377202 2.31141807911 2.3152285445 2.31904517818 2.32286799011 2.32669699031 2.33053218878 2.33437359557 2.33822122073 2.34207507431 2.3459351664 2.34980150711 2.35367410654 2.35755297483 2.36143812212 2.36532955858 2.36922729439 2.37313133975 2.37704170487 2.38095839997 2.38488143532 2.38881082117 2.3927465678 2.39668868551 2.40063718461 2.40459207543 2.40855336832 2.41252107364 2.41649520177 2.42047576311 2.42446276807 2.42845622709 2.43245615061 2.43646254909 2.44047543302 2.4444948129 2.44852069923 2.45255310256 2.45659203344 2.46063750242 2.4646895201 2.46874809707 2.47281324395 2.47688497139 2.48096329002 2.48504821052 2.48913974357 2.49323789989 2.49734269019 2.50145412521 2.50557221571 2.50969697246 2.51382840625 2.51796652789 2.52211134821 2.52626287805 2.53042112828 2.53458610976 2.5387578334 2.54293631011 2.54712155082 2.55131356649 2.55551236807 2.55971796656 2.56393037296 2.56814959828 2.57237565357 2.57660854988 2.58084829828 2.58509490987 2.58934839576 2.59360876708 2.59787603496 2.60215021059 2.60643130513 2.61071932978 2.61501429578 2.61931621434 2.62362509673 2.62794095423 2.63226379811 2.63659363969 2.6409304903 2.64527436129 2.64962526401 2.65398320985 2.65834821022 2.66272027653 2.66709942022 2.67148565274 2.67587898558 2.68027943023 2.68468699819 2.689101701 2.69352355021 2.69795255739 2.70238873412 2.70683209201 2.71128264269 2.71574039779 2.72020536899 2.72467756796 2.7291570064 2.73364369603 2.73813764859 2.74263887584 2.74714738955 2.75166320151 2.75618632355 2.76071676749 2.7652545452 2.76979966853 2.77435214938 2.77891199966 2.7834792313 2.78805385624 2.79263588647 2.79722533396 2.80182221072 2.80642652877 2.81103830017 2.81565753698 2.82028425128 2.82491845518 2.8295601608 2.83420938028 2.8388661258 2.84353040952 2.84820224366 2.85288164043 2.85756861208 2.86226317087 2.86696532908 2.87167509902 2.876392493 2.88111752337 2.88585020249 2.89059054274 2.89533855652 2.90009425625 2.90485765438 2.90962876337 2.9144075957 2.91919416386 2.9239884804 2.92879055783 2.93360040874 2.93841804571 2.94324348133 2.94807672823 2.95291779906 2.95776670648 2.96262346318 2.96748808186 2.97236057525 2.9772409561 2.98212923718 2.98702543127 2.99192955118 2.99684160975 3.00176161982 3.00668959427 3.01162554599 3.01656948789 3.0215214329 3.02648139399 3.03144938413 3.03642541631 3.04140950355 3.0464016589 3.05140189541 3.05641022616 3.06142666427 3.06645122284 3.07148391503 3.076524754 3.08157375295 3.08663092507 3.09169628361 3.09676984181 3.10185161294 3.1069416103 3.11203984721 3.11714633701 3.12226109305 3.12738412872 3.13251545741 3.13765509256 3.14280304761 3.14795933602 3.1531239713 3.15829696694 3.16347833648 3.16866809348 3.17386625152 3.17907282419 3.18428782512 3.18951126795 3.19474316634 3.19998353398 3.20523238459 3.21048973189 3.21575558964 3.22102997161 3.22631289161 3.23160436346 3.23690440099 3.24221301807 3.2475302286 3.25285604648 3.25819048565 3.26353356007 3.2688852837 3.27424567055 3.27961473466 3.28499249005 3.29037895081 3.29577413102 3.3011780448 3.30659070628 3.31201212963 3.31744232903 3.32288131869 3.32832911284 3.33378572572 3.33925117162 3.34472546483 3.35020861968 3.3557006505 3.36120157168 3.36671139759 3.37223014265 3.37775782131 3.38329444802 3.38884003727 3.39439460357 3.39995816144 3.40553072545 3.41111231017 3.41670293021 3.42230260019 3.42791133476 3.43352914859 3.43915605639 3.44479207286 3.45043721277 3.45609149087 3.46175492196 3.46742752086 3.47310930241 3.47880028146 3.48450047292 3.49020989168 3.4959285527 3.50165647093 3.50739366135 3.51314013898 3.51889591884 3.52466101601 3.53043544555 3.53621922258 3.54201236223 3.54781487966 3.55362679004 3.55944810858 3.56527885051 3.57111903108 3.57696866557 3.5828277693 3.58869635757 3.59457444576 3.60046204923 3.6063591834 3.61226586368 3.61818210553 3.62410792443 3.63004333588 3.63598835541 3.64194299858 3.64790728096 3.65388121815 3.65986482579 3.66585811953 3.67186111504 3.67787382804 3.68389627425 3.68992846943 3.69597042936 3.70202216985 3.70808370673 3.71415505586 3.72023623312 3.72632725443 3.73242813571 3.73853889292 3.74465954207 3.75079009915 3.7569305802 3.7630810013 3.76924137853 3.77541172801 3.78159206588 3.78778240831 3.79398277149 3.80019317166 3.80641362504 3.81264414793 3.81888475661 3.82513546741 3.8313962967 3.83766726084 3.84394837625 3.85023965935 3.85654112661 3.86285279451 3.86917467956 3.8755067983 3.88184916731 3.88820180316 3.89456472249 3.90093794194 3.90732147817 3.9137153479 3.92011956785 3.92653415477 3.93295912545 3.93939449669 3.94584028534 3.95229650825 3.95876318231 3.96524032445 3.97172795161 3.97822608076 3.9847347289 3.99125391306 3.99778365029 4.00432395769 4.01087485235 4.01743635142 4.02400847206 4.03059123147 4.03718464687 4.04378873551 4.05040351467 4.05702900164 4.06366521377 4.07031216842 4.07696988298 4.08363837486 4.09031766151 4.0970077604 4.10370868904 4.11042046496 4.11714310572 4.1238766289 4.13062105213 4.13737639304 4.14414266931 4.15091989864 4.15770809876 4.16450728743 4.17131748244 4.17813870161 4.18497096278 4.19181428382 4.19866868264 4.20553417718 4.21241078538 4.21929852525 4.22619741481 4.23310747209 4.24002871519 4.2469611622 4.25390483126 4.26085974055 4.26782590825 4.27480335259 4.28179209183 4.28879214424 4.29580352814 4.30282626188 4.30986036383 4.31690585238 4.32396274598 4.33103106308 4.33811082218 4.3452020418 4.35230474048 4.35941893682 4.36654464943 4.37368189694 4.38083069803 4.3879910714 4.39516303579 4.40234660995 4.40954181269 4.41674866282 4.4239671792 4.43119738072 4.43843928628 4.44569291485 4.45295828538 4.4602354169 4.46752432844 4.47482503906 4.48213756788 4.48946193401 4.49679815663 4.50414625492 4.5115062481 4.51887815545 4.52626199623 4.53365778977 4.54106555541 4.54848531255 4.55591708058 4.56336087895 4.57081672713 4.57828464464 4.58576465101 4.5932567658 4.60076100862 4.6082773991 4.61580595691 4.62334670174 4.63089965332 4.63846483141 4.6460422558 4.65363194631 4.66123392281 4.66884820517 4.67647481333 4.68411376722 4.69176508685 4.69942879222 4.70710490338 4.71479344043 4.72249442346 4.73020787263 4.73793380812 4.74567225014 4.75342321894 4.76118673479 4.768962818 4.77675148893 4.78455276794 4.79236667544 4.80019323188 4.80803245774 4.81588437352 4.82374899976 4.83162635704 4.83951646597 4.84741934719 4.85533502138 4.86326350924 4.87120483152 4.87915900899 4.88712606246 4.89510601278 4.90309888083 4.9111046875 4.91912345376 4.92715520057 4.93519994896 4.94325771996 4.95132853465 4.95941241416 4.96750937963 4.97561945224 4.98374265322 4.99187900381 5.00002852529 5.008191239 5.01636716628 5.02455632853 5.03275874717 5.04097444366 5.04920343949 5.05744575619 5.06570141532 5.07397043849 5.08225284732 5.09054866349 5.0988579087 5.10718060468 5.11551677321 5.12386643611 5.1322296152 5.14060633238 5.14899660956 5.15740046869 5.16581793175 5.17424902077 5.1826937578 5.19115216494 5.19962426432 5.20811007809 5.21660962847 5.22512293768 5.23365002801 5.24219092175 5.25074564125 5.2593142089 5.26789664711 5.27649297833 5.28510322506 5.29372740981 5.30236555516 5.3110176837 5.31968381807 5.32836398093 5.337058195 5.34576648303 5.35448886779 5.36322537211 5.37197601884 5.38074083087 5.38951983114 5.39831304261 5.4071204883 5.41594219123 5.42477817449 5.43362846119 5.44249307449 5.45137203759 5.46026537371 5.46917310611 5.4780952581 5.48703185303 5.49598291427 5.50494846524 5.5139285294 5.52292313023 5.53193229128 5.54095603611 5.54999438833 5.55904737158 5.56811500955 5.57719732597 5.58629434458 5.5954060892 5.60453258366 5.61367385184 5.62282991765 5.63200080504 5.64118653802 5.6503871406 5.65960263687 5.66883305092 5.67807840692 5.68733872904 5.69661404152 5.70590436862 5.71520973464 5.72453016393 5.73386568087 5.74321630989 5.75258207545 5.76196300206 5.77135911425 5.7807704366 5.79019699375 5.79963881034 5.80909591109 5.81856832072 5.82805606404 5.83755916585 5.84707765102 5.85661154445 5.86616087108 5.8757256559 5.88530592393 5.89490170024 5.90451300992 5.91413987812 5.92378233003 5.93344039088 5.94311408592 5.95280344048 5.9625084799 5.97222922957 5.98196571491 5.99171796142 6.00148599458 6.01126983998 6.02106952319 6.03088506985 6.04071650565 6.05056385631 6.06042714759 6.07030640529 6.08020165526 6.09011292339 6.10004023561 6.10998361788 6.11994309622 6.1299186967 6.1399104454 6.14991836847 6.15994249209 6.16998284248 6.18003944591 6.1901123287 6.20020151719 6.21030703777 6.2204289169 6.23056718105 6.24072185673 6.25089297053 6.26108054904 6.27128461893 6.28150520688 6.29174233963 6.30199604397 6.31226634673 6.32255327477 6.332856855 6.34317711439 6.35351407993 6.36386777866 6.37423823767 6.38462548409 6.3950295451 6.40545044792 6.41588821981 6.42634288807 6.43681448007 6.44730302318 6.45780854486 6.46833107259 6.4788706339 6.48942725635 6.50000096758 6.51059179523 6.52119976703 6.53182491072 6.54246725409 6.553126825 6.56380365133 6.57449776101 6.58520918202 6.59593794238 6.60668407016 6.61744759347 6.62822854048 6.63902693939 6.64984281845 6.66067620595 6.67152713025 6.68239561972 6.6932817028 6.70418540797 6.71510676376 6.72604579873 6.73700254152 6.74797702077 6.75896926522 6.7699793036 6.78100716473 6.79205287745 6.80311647067 6.81419797333 6.82529741442 6.83641482298 6.84755022809 6.85870365889 6.86987514455 6.8810647143 6.89227239743 6.90349822324 6.9147422211 6.92600442044 6.93728485072 6.94858354144 6.95990052218 6.97123582253 6.98258947215 6.99396150074 7.00535193806 7.01676081391 7.02818815813 7.03963400062 7.05109837132 7.06258130023 7.07408281738 7.08560295288 7.09714173685 7.10869919949 7.12027537103 7.13187028175 7.14348396199 7.15511644214 7.16676775263 7.17843792394 7.1901269866 7.20183497119 7.21356190834 7.22530782873 7.2370727631 7.24885674221 7.26065979691 7.27248195806 7.28432325661 7.29618372352 7.30806338982 7.3199622866 7.33188044499 7.34381789616 7.35577467135 7.36775080183 7.37974631895 7.39176125407 7.40379563865 7.41584950415 7.42792288211 7.44001580413 7.45212830183 7.46426040691 7.47641215111 7.48858356621 7.50077468407 7.51298553657 7.52521615566 7.53746657334 7.54973682165 7.56202693271 7.57433693866 7.5866668717 7.5990167641 7.61138664817 7.62377655626 7.63618652079 7.64861657423 7.6610667491 7.67353707796 7.68602759346 7.69853832825 7.71106931507 7.72362058671 7.736192176 7.74878411583 7.76139643915 7.77402917894 7.78668236827 7.79935604023 7.81205022798 7.82476496473 7.83750028375 7.85025621835 7.8630328019 7.87583006783 7.88864804962 7.90148678081 7.91434629498 7.92722662578 7.9401278069 7.9530498721 7.96599285518 7.97895679 7.99194171048 8.0049476506 8.01797464436 8.03102272587 8.04409192925 8.0571822887 8.07029383846 8.08342661283 8.09658064617 8.1097559729 8.12295262749 8.13617064446 8.14941005838 8.16267090391 8.17595321572 8.18925702857 8.20258237727 8.21592929668 8.2292978217 8.24268798733 8.25609982859 8.26953338057 8.2829886784 8.29646575731 8.30996465253 8.3234853994 8.33702803328 8.35059258959 8.36417910384 8.37778761156 8.39141814836 8.40507074989 8.41874545188 8.4324422901 8.44616130038 8.45990251861 8.47366598075 8.48745172281 8.50125978084 8.51509019097 8.52894298939 8.54281821234 8.55671589611 8.57063607707 8.58457879164 8.59854407628 8.61253196755 8.62654250202 8.64057571636 8.65463164729 8.66871033156 8.68281180602 8.69693610755 8.71108327312 8.72525333973 8.73944634444 8.75366232441 8.7679013168 8.78216335889 8.79644848797 8.81075674143 8.82508815669 8.83944277126 8.85382062267 8.86822174856 8.88264618658 8.8970939745 8.91156515009 8.92605975122 8.9405778158 8.95511938184 8.96968448735 8.98427317046 8.99888546932 9.01352142217 9.0281810673 9.04286444305 9.05757158785 9.07230254017 9.08705733855 9.10183602158 9.11663862794 9.13146519635 9.1463157656 9.16119037454 9.17608906209 9.19101186722 9.20595882897 9.22092998646 9.23592537884 9.25094504534 9.26598902527 9.28105735798 9.29615008288 9.31126723948 9.32640886731 9.34157500598 9.35676569519 9.37198097466 9.38722088421 9.4024854637 9.41777475307 9.43308879232 9.44842762151 9.46379128078 9.47917981031 9.49459325037 9.51003164128 9.52549502343 9.54098343728 9.55649692334 9.57203552221 9.58759927453 9.60318822102 9.61880240247 9.63444185973 9.6501066337 9.66579676538 9.68151229581 9.69725326611 9.71301971746 9.7288116911 9.74462922835 9.76047237059 9.77634115928 9.79223563592 9.8081558421 9.82410181947 9.84007360975 9.85607125472 9.87209479624 9.88814427622 9.90421973666 9.92032121961 9.9364487672 9.95260242161 9.96878222511 9.98498822004 10.0012204488 10.0174789538 10.0337637776 10.0500749629 10.0664125523 10.0827765885 10.0991671143 10.1155841727 10.1320278065 10.1484980589 10.1649949729 10.1815185916 10.1980689582 10.2146461162 10.2312501088 10.2478809795 10.2645387717 10.2812235292 10.2979352955 10.3146741143 10.3314400294 10.3482330848 10.3650533243 10.3819007919 10.3987755318 10.415677588 10.4326070047 10.4495638264 10.4665480973 10.4835598619 10.5005991646 10.5176660501 10.534760563 10.551882748 10.56903265 10.5862103137 10.6034157841 10.6206491063 10.6379103253 10.6551994864 10.6725166346 10.6898618153 10.707235074 10.7246364559 10.7420660068 10.7595237722 10.7770097977 10.794524129 10.8120668121 10.8296378929 10.8472374172 10.8648654311 10.8825219807 10.9002071123 10.9179208721 10.9356633065 10.9534344618 10.9712343845 10.9890631213 11.0069207188 11.0248072236 11.0427226826 11.0606671427 11.0786406507 11.0966432538 11.114674999 11.1327359335 11.1508261045 11.1689455594 11.1870943456 11.2052725105 11.2234801017 11.2417171669 11.2599837538 11.27827991 11.2966056836 11.3149611225 11.3333462746 11.3517611881 11.3702059112 11.3886804921 11.4071849791 11.4257194206 11.4442838652 11.4628783614 11.4815029579 11.5001577034 11.5188426466 11.5375578365 11.5563033221 11.5750791523 11.5938853763 11.6127220433 11.6315892026 11.6504869035 11.6694151955 11.6883741281 11.7073637509 11.7263841135 11.7454352658 11.7645172576 11.7836301388 11.8027739594 11.8219487694 11.8411546192 11.8603915588 11.8796596386 }
{ "pile_set_name": "Github" }
# Reorder String by Case 给定一个只包含字母的字符串,按照先小写字母后大写字母的顺序进行排序。 样例 给出"abAcD",一个可能的答案为"acbAD" 注意 小写字母或者大写字母他们之间不一定要保持在原始字符串中的相对位置。 挑战 在原地扫描一遍完成 ## Solution 和快排的方法类似,找到两个要交换的元素,分别交换即可 ## Code ```java public class Solution { /** *@param chars: The letter array you should sort by Case *@return: void */ public void sortLetters(char[] chars) { int len = chars.length; if (len <= 1) return; int p1 = 0, p2 = len-1; while (p1<len && chars[p1]>='a' && chars[p1]<='z') p1++; while (p2>=0 && chars[p2]>='A' && chars[p2]<='Z') p2--; while (p1<p2){ //swap p1 and p2. char temp = chars[p1]; chars[p1] = chars[p2]; chars[p2] = temp; //find next swap positions. while (p1<len && chars[p1]>='a' && chars[p1]<='z') p1++; while (p2>=0 && chars[p2]>='A' && chars[p2]<='Z') p2--; } } } ```
{ "pile_set_name": "Github" }
<div class="hexo-douban-item"> <div class="hexo-douban-picture"><img src="<%= root %>/assets/douban-loading.gif" data-src="<%= item.image %>" referrerPolicy="no-referrer" /></div> <div class="hexo-douban-info"> <div class="hexo-douban-title"> <a target="_blank" href="<%= item.alt %>"><%= item.title %></a> </div> <div class="hexo-douban-meta"><%= item.date %> / <%= item.tags %> / <%= item.recommend %> </div> <div class="hexo-douban-comments"> <%= item.comment %></div> </div> </div>
{ "pile_set_name": "Github" }
#!/bin/bash # Show colored output if running interactively if [ -t 1 ] ; then export ANSIBLE_FORCE_COLOR=true fi # Log everything from this script into _quickstart.log echo "$0 $@" > _quickstart.log exec &> >(tee -i -a _quickstart.log ) # With LANG set to everything else than C completely undercipherable errors # like "file not found" and decoding errors will start to appear during scripts # or even ansible modules LANG=C DEFAULT_OPT_TAGS="untagged,provision,environment,libvirt,undercloud-scripts,undercloud-inventory,overcloud-scripts,undercloud-setup,undercloud-install,undercloud-post-install,tripleoui-validate,notest" DEFAULT_OPT_OVERCLOUD_PREP_TAGS="overcloud-prep-config,overcloud-prep-images,overcloud-prep-flavors,overcloud-prep-containers,overcloud-prep-network,overcloud-scripts,overcloud-ssl" ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner : ${OPT_BOOTSTRAP:=0} : ${OPT_CLEAN:=0} : ${OPT_PLAYBOOK:=quickstart-extras.yml} : ${OPT_RELEASE:=queens} : ${OPT_RETAIN_INVENTORY_FILE:=0} : ${OPT_SYSTEM_PACKAGES:=0} : ${OPT_TAGS:=$DEFAULT_OPT_TAGS} : ${OPT_TEARDOWN:=nodes} : ${OPT_WORKDIR:=~/.quickstart} : ${OPT_LIST_TASKS_ONLY=""} : ${USER_OVERRIDE_SUDO_CHECK:=0} # disable pip implicit version check, if we need min version we should mention it export PIP_DISABLE_PIP_VERSION_CHECK=${PIP_DISABLE_PIP_VERSION_CHECK:=1} clean_virtualenv() { if [ -d $OPT_WORKDIR ]; then echo "WARNING: Removing $OPT_WORKDIR. Triggering virtualenv bootstrap." rm -rf $OPT_WORKDIR fi } : ${OOOQ_BASE_REQUIREMENTS:=requirements.txt} : ${OOOQ_EXTRA_REQUIREMENTS:=quickstart-extras-requirements.txt} # Our docs support running quickstart.sh as a standalone script. # We have to download install-deps.sh to support that use case. ABSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" if [[ ! -e ${ABSDIR}/install-deps.sh ]]; then echo "install-deps.sh was not found, in the same directory ($ABSDIR) as quickstart.sh" echo "downloading install-deps.sh to ${ABSDIR}/install-deps.sh" curl -o ${ABSDIR}/install-deps.sh https://opendev.org/openstack/tripleo-quickstart/raw/branch/master/install-deps.sh curl -o ${ABSDIR}/bindep.txt https://opendev.org/openstack/tripleo-quickstart/raw/branch/master/bindep.txt fi source ${ABSDIR}/install-deps.sh print_logo () { if [ `TERM=${TERM:-vt100} tput cols` -lt 105 ]; then cat <<EOBANNER ---------------------------------------------------------------------------- | , . , | | )-_'''_-( | | ./ o\ /o \. | | . \__/ \__/ . | | ... V ... | | ... - - - ... | | . - - . | | \`-.....-´ | | ____ ____ ____ _ _ _ _ | | / __ \ / __ \ / __ \ (_) | | | | | | | | | | | | ___ | | | | | | | |_ _ _ ___| | _____| |_ __ _ _ __| |_ | | | | | |/ _ \| | | | | | | | | | | |/ __| |/ / __| __/ _\` | '__| __| | | | |__| | |_| | |__| | | |__| | |_| | | (__| <\__ \ |_|(_| | | | |_ | | \____/ \___/ \____/ \___\_\\\__,_|_|\___|_|\_\___/\__\__,_|_| \__| | | | | | ---------------------------------------------------------------------------- EOBANNER else cat <<EOBANNER ------------------------------------------------------------------------------------------------------- | , . , _______ _ _ ____ ____ _ _ _ _ | | )-_'''_-( |__ __| (_) | | / __ \ / __ \ (_) | | | | | | | | ./ o\ /o \. | |_ __ _ _ __ | | ___| | | | | | | |_ _ _ ___| | _____| |_ __ _ _ __| |_ | | . \__/ \__/ . | | '__| | '_ \| |/ _ \ | | | | | | | | | | |/ __| |/ / __| __/ _\` | '__| __| | | ... V ... | | | | | |_) | | __/ |__| | | |__| | |_| | | (__| <\__ \ |_|(_| | | | |_ | | ... - - - ... |_|_| |_| .__/|_|\___|\____/ \___\_\\\__,_|_|\___|_|\_\___/\__\__,_|_| \__| | | . - - . | | | | \`-.....-´ |_| | ------------------------------------------------------------------------------------------------------- EOBANNER fi } # This creates a Python virtual environment and installs # tripleo-quickstart into that environment. It only runs if # the local working directory does not exist, or if explicitly # requested via --bootstrap. bootstrap () { set -e # install required deps for a python virtual environment install_deps # setup the virtual environment install_virtual_env # continue package installs with bindep install_package_deps_via_bindep if [ "$OPT_NO_CLONE" != 1 ]; then if ! [ -d "$OOOQ_DIR" ]; then echo "Cloning tripleo-quickstart repository..." git clone https://opendev.org/openstack/tripleo-quickstart \ $OOOQ_DIR fi cd $OOOQ_DIR if [ -n "$OPT_GERRIT" ]; then git review -d "$OPT_GERRIT" else git remote update git checkout --quiet origin/master fi fi pushd $OOOQ_DIR # use stable/train as the latest known good python2 upper constraints # tq can use the last known good for train in virt environments and # execute against any openstack wth --release if [ "$(python_cmd)" == "python2" ]; then export PIP_CONSTRAINT=${PIP_CONSTRAINT:-https://opendev.org/openstack/requirements/raw/branch/stable/train/upper-constraints.txt} fi $(python_cmd) setup.py install egg_info --egg-base $OPT_WORKDIR if [ $OPT_CLEAN == 1 ]; then $(python_cmd) -m pip install --no-cache-dir --force-reinstall "${OPT_REQARGS[@]}" else $(python_cmd) -m pip install --force-reinstall "${OPT_REQARGS[@]}" fi if [ -x "$ZUUL_CLONER" ] && [ ! -z "$ZUUL_BRANCH" ]; then # pull in tripleo-quickstart-extras from source $ZUUL_CLONER --cache-dir \ /opt/git \ https://opendev.org \ openstack/tripleo-quickstart-extras pushd openstack/tripleo-quickstart-extras if [ $OPT_CLEAN == 1 ]; then $(python_cmd) -m pip install --no-cache-dir --force-reinstall . else $(python_cmd) -m pip install --force-reinstall . fi popd fi popd } activate_venv() { . $OPT_WORKDIR/bin/activate } usage () { echo "Usage: $0 --install-deps" echo " install quickstart package dependencies and exit" echo "" echo "Usage: $0 [options] [virthost]" echo "" echo " virthost a physical machine hosting the libvirt VMs of the TripleO" echo " deployment, required unless VIRTHOST is already defined." echo "" echo "Basic options:" echo " -p, --playbook <file>" echo " playbook to run, relative to playbooks directory" echo " (default=$OPT_PLAYBOOK)" echo " -r, --requirements <file>" echo " install requirements with pip, can be used" echo " multiple times. By using this flag you override " echo " both requirements.txt and quickstart-extras-requirements.txt." echo " The user assumes responsibility for the requirements. " echo " -u, --url-requirements <PIP format URL>" echo " Pip format URL for requirements to install for quickstart" echo " For example: -u git+https://opendev.org/openstack/tripleo-upgrade#egg=tripleo-upgrade" echo " -R, --release OpenStack release to deploy (default=$OPT_RELEASE)" echo " -c, --config <file>" echo " specify the config file that contains the node" echo " configuration, can be used only once" echo " (default=config/general_config/minimal.yml)" echo " -N, --nodes <file>" echo " specify the number of nodes that should be created by" echo " the provisioner. " echo " -E, --environment <file>" echo " specify additional configuration that is specific to" echo " the environment where TripleO-Quickstart is running." echo " -e, --extra-vars <key>=<value>" echo " additional ansible variables, can be used multiple times" echo " -w, --working-dir <dir>" echo " directory where the virtualenv, inventory files, etc." echo " are created (default=$OPT_WORKDIR)" echo "" echo "Advanced options:" echo " -v, --ansible-debug" echo " invoke ansible-playbook with -vvvv" echo " -y, --dry-run" echo " dry run of playbook, invoke ansible with --list-tasks" echo " -X, --clean discard the working directory on start" echo " -b, --bootstrap force creation of the virtualenv and the installation" echo " of requirements without discarding the working directory" echo " -n, --no-clone skip cloning the tripleo-quickstart repo, use quickstart" echo " code from \$PWD" echo " -g, --gerrit <change-id>" echo " check out <change-id> for the tripleo-quickstart repo" echo " before running the playbook" echo " -q, --override_sudo_check" echo " If passwordless sudo is not enabled, prompt for " echo " the user password while installing packages" echo " -I, --retain-inventory" echo " keep the ansible inventory on start, used for consecutive" echo " runs of quickstart on the same environment" echo " -s, --system-site-packages" echo " give access to the global site-packages modules" echo " to the virtualenv" echo " -t, --tags <tag1>[,<tag2>,...]" echo " only run plays and tasks tagged with these values," echo " specify 'all' to run everything" echo " (default=$OPT_TAGS)" echo " -o, --tags-overcloud-prep" echo " Include the overcloud prep tags automatically in" echo " addition to the default tags" echo " -T, --teardown [ all | virthost | nodes | none ]" echo " parts of a previous deployment to tear down before" echo " starting a new one, see the docs for full description" echo " (default=$OPT_TEARDOWN)" echo " -S, --skip-tags <tag1>[,<tag2>,...]" echo " only run plays and tasks whose tags do" echo " not match these values" echo " -l, --print-logo print the TripleO logo and exit" echo " -h, --help print this help and exit" } OPT_VARS=() OPT_ENVIRONMENT=() while [ "x$1" != "x" ]; do case "$1" in --install-deps|-i) OPT_INSTALL_DEPS=1 ;; --system-site-packages|-s) OPT_SYSTEM_PACKAGES=1 ;; --requirements|-r) OPT_REQARGS+=("-r") OPT_REQARGS+=("$2") shift ;; --url-requirements|-u) OPT_REQARGS+=("$2") shift ;; --release|-R) OPT_RELEASE=$2 shift ;; --bootstrap|-b) OPT_BOOTSTRAP=1 ;; --ansible-debug|-v) OPT_DEBUG_ANSIBLE=1 ;; --working-dir|-w) OPT_WORKDIR=$(realpath $2) shift ;; --tags|-t) OPT_TAGS=$2 shift ;; --skip-tags|-S) OPT_SKIP_TAGS=$2 shift ;; --tags-overcloud-prep|-o) OPT_TAGS="${OPT_TAGS:+$OPT_TAGS,$DEFAULT_OPT_OVERCLOUD_PREP_TAGS}" shift ;; --config|-c) OPT_CONFIG=$2 shift ;; --override_sudo_check|-q) USER_OVERRIDE_SUDO_CHECK=1 ;; --nodes|-N) OPT_NODES=$2 shift ;; --environment|-E) OPT_ENVIRONMENT+=("-e") OPT_ENVIRONMENT+=("@$2") shift ;; --clean|-X) OPT_CLEAN=1 ;; --playbook|-p) OPT_PLAYBOOK=$2 shift ;; --extra-vars|-e) OPT_VARS+=("-e") OPT_VARS+=("$2") shift ;; --teardown|-T) OPT_TEARDOWN=$2 shift ;; --help|-h) usage exit ;; # developer options --gerrit|-g) OPT_GERRIT=$2 OPT_BOOTSTRAP=1 shift ;; --dry-run|-y) OPT_LIST_TASKS_ONLY=" --list-tasks" ;; --no-clone|-n) OPT_NO_CLONE=1 ;; --retain-inventory|-I) OPT_RETAIN_INVENTORY_FILE=1 ;; --print-logo|-l) PRINT_LOGO=1 ;; --) shift break ;; -*) echo "ERROR: unknown option: $1" >&2 usage >&2 exit 2 ;; *) break ;; esac shift done if [ -z "$OPT_REQARGS" ]; then OPT_REQARGS=("-r" "$OOOQ_BASE_REQUIREMENTS" "-r" "$OOOQ_EXTRA_REQUIREMENTS") else OPT_REQARGS+=("-r" "$OOOQ_BASE_REQUIREMENTS") fi if [ "$PRINT_LOGO" = 1 ]; then print_logo echo "..." echo "Nothing more to do" exit fi if [ "$OPT_NO_CLONE" = 1 ]; then OOOQ_DIR=$ABSDIR else OOOQ_DIR=$OPT_WORKDIR/tripleo-quickstart fi if [ "$OPT_CLEAN" = 1 ]; then clean_virtualenv fi if [ "$OPT_TEARDOWN" = "all" ]; then OPT_TAGS="${OPT_TAGS:+$OPT_TAGS,}teardown-all" elif [ "$OPT_TEARDOWN" = "virthost" ]; then OPT_TAGS="${OPT_TAGS:+$OPT_TAGS,}teardown-nodes,teardown-environment" elif [ "$OPT_TEARDOWN" = "nodes" ]; then OPT_TAGS="${OPT_TAGS:+$OPT_TAGS,}teardown-nodes" elif [ "$OPT_TEARDOWN" = "none" ]; then OPT_SKIP_TAGS="${OPT_SKIP_TAGS:+$OPT_SKIP_TAGS,}teardown-all" fi # Set this default after option processing, because the default depends # on another option. # Default general configuration : ${OPT_CONFIG:=$OPT_WORKDIR/config/general_config/minimal.yml} # Default Nodes : ${OPT_NODES:=$OPT_WORKDIR/config/nodes/1ctlr_1comp.yml} # Default Environment : ${OPT_ENVIRONMENT:=-e @$OPT_WORKDIR/config/environments/default_libvirt.yml} # allow the deprecated config files to work OLD_CONFIG="" if [[ "$OPT_CONFIG" =~ (^|.*/)ha.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/pacemaker.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/3ctlr_1comp.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)ceph.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/minimal.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/1ctlr_1comp_1ceph.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)ha_big.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/pacemaker.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/3ctlr_3comp.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)fake_ha_ipa.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/ipa.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/1ctlr_1comp_1supp.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)ha_ipa.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/ipa.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/3ctlr_1comp.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)ha_ipv6.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/ipv6.yml; OPT_NODES=$OPT_WORKDIR/config/nodes/3ctlr_1comp.yml; elif [[ "$OPT_CONFIG" =~ (^|.*/)minimal_pacemaker.yml$ ]]; then OLD_CONFIG=$OPT_CONFIG OPT_CONFIG=$OPT_WORKDIR/config/general_config/pacemaker.yml; fi if [ "$OLD_CONFIG" != "" ]; then echo "******************** PLEASE READ ****************************" >&2 echo "" >&2 echo "DEPRECATION NOTICE: $OLD_CONFIG has been deprecated" >&2 echo "" >&2 sleep 3; fi if [ "$OPT_INSTALL_DEPS" = 1 ]; then echo "NOTICE: installing dependencies" >&2 install_deps install_bindep install_package_deps_via_bindep exit $? fi if [ "$OPT_BOOTSTRAP" = 1 ] || ! [ -f "$OPT_WORKDIR/bin/activate" ]; then bootstrap if [ $? -ne 0 ]; then echo "ERROR: bootstrap failed; try \"$0 --install-deps\"" >&2 echo " to install package dependencies or \"$0 --clean\"" >&2 echo " to remove $OPT_WORKDIR and start over" >&2 exit 1 fi fi if [ "$#" -lt 1 ]; then if [ "${VIRTHOST:-}" == "" ]; then echo "ERROR: You didn't specify a target machine and VIRTHOST is not defined" >&2 usage >&2 exit 2 else echo "NOTICE: Using VIRTHOST=$VIRTHOST as target machine" >&2 fi else VIRTHOST=$1 fi if [ $VIRTHOST == "127.0.0.1" ] || [ $VIRTHOST == "localhost" ]; then echo "ERROR: Please use 127.0.0.2 to deploy to localhost" >&2 exit 2 fi if [ "$#" -gt 2 ]; then usage >&2 exit 2 fi print_logo echo "Installing OpenStack ${OPT_RELEASE:+"$OPT_RELEASE "}on host $VIRTHOST" echo "Using directory $OPT_WORKDIR for a local working directory" echo "Current run is logged in _quickstart.log file in current directory" set -ex activate_venv export ANSIBLE_CONFIG=$OOOQ_DIR/ansible.cfg export ANSIBLE_INVENTORY=$OPT_WORKDIR/hosts export ANSIBLE_COLLECTIONS_PATHS="$OPT_WORKDIR/share/ansible/collections:~/.ansible/collections:/usr/share/ansible/collections" export ARA_DATABASE="sqlite:///${OPT_WORKDIR}/ara.sqlite" #set the ansible ssh.config options if not already set. source $OOOQ_DIR/ansible_ssh_env.sh if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 -a -z "$OPT_LIST_TASKS_ONLY" ]; then # Clear out inventory file to avoid tripping over data # from a previous invocation cat >$ANSIBLE_INVENTORY <<EOF [localhost] 127.0.0.1 ansible_connection=local EOF fi if [ "$OPT_DEBUG_ANSIBLE" = 1 ]; then VERBOSITY=vvvv else VERBOSITY=vv fi if [ ! -f $OPT_WORKDIR/playbooks/$OPT_PLAYBOOK ]; then printf "\n !! execute quickstart.sh --clean to ensure the dependencies are installed !!" >&2 exit 1 fi ansible-playbook -$VERBOSITY $OPT_WORKDIR/playbooks/$OPT_PLAYBOOK \ -e @$OPT_WORKDIR/config/release/$OPT_RELEASE.yml \ -e @$OPT_NODES \ -e @$OPT_CONFIG \ ${OPT_ENVIRONMENT[@]} \ -e local_working_dir=$OPT_WORKDIR \ ${OPT_LIST_TASKS_ONLY} \ -e virthost=$VIRTHOST \ ${OPT_VARS[@]} \ ${OPT_TAGS:+-t $OPT_TAGS} \ ${OPT_SKIP_TAGS:+--skip-tags $OPT_SKIP_TAGS} # We only print out further usage instructions when using the default # tags, since this is for new users (and not even applicable to some tags). set +x if ! [[ "overcloud-deploy" =~ .*$OPT_TAGS.* ]] && [[ $OPT_PLAYBOOK == quickstart-extras.yml ]]; then cat <<EOF ################################## Virtual Environment Setup Complete ################################## Access the undercloud by: ssh -F $OPT_WORKDIR/ssh.config.ansible undercloud Follow the documentation in the link below to complete your deployment. Note, by default only the undercloud has been installed. https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/install_overcloud.html#upload-images For fully automated deployments please refer to: https://docs.openstack.org/tripleo-quickstart/latest/getting-started.html TripleO's cheat sheet is available at: http://superuser.openstack.org/articles/new-tripleo-quick-start-cheatsheet/ ################################## Virtual Environment Setup Complete ################################## EOF fi
{ "pile_set_name": "Github" }
/* * Copyright 2017 HugeGraph Authors * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.baidu.hugegraph.core; import java.util.Date; import org.junit.Test; import com.baidu.hugegraph.HugeException; import com.baidu.hugegraph.exception.ExistedException; import com.baidu.hugegraph.exception.NotAllowException; import com.baidu.hugegraph.exception.NotFoundException; import com.baidu.hugegraph.schema.PropertyKey; import com.baidu.hugegraph.schema.SchemaManager; import com.baidu.hugegraph.schema.Userdata; import com.baidu.hugegraph.testutil.Assert; import com.baidu.hugegraph.type.define.AggregateType; import com.baidu.hugegraph.type.define.Cardinality; import com.baidu.hugegraph.type.define.DataType; import com.baidu.hugegraph.util.DateUtil; import com.google.common.collect.ImmutableList; public class PropertyKeyCoreTest extends SchemaCoreTest { @Test public void testAddPropertyKey() { SchemaManager schema = graph().schema(); PropertyKey id = schema.propertyKey("id") .asText() .valueSingle() .create(); Assert.assertEquals("id", id.name()); Assert.assertEquals(DataType.TEXT, id.dataType()); Assert.assertEquals(Cardinality.SINGLE, id.cardinality()); } @Test public void testAddPropertyKeyWithValidName() { SchemaManager schema = graph().schema(); // One space and single char schema.propertyKey(" s").create(); schema.propertyKey("s s").create(); schema.propertyKey(" .").create(); schema.propertyKey(". .").create(); schema.propertyKey("@$%^&*()_+`-={}|[]\"<?;'~,./\\").create(); schema.propertyKey("azAZ0123456789").create(); schema.propertyKey(" ~").create(); schema.propertyKey("x~").create(); } @Test public void testAddPropertyKeyWithIllegalName() { SchemaManager schema = graph().schema(); // Empty string Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("").create(); }); // One space Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey(" ").create(); }); // Multi spaces Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey(" ").create(); }); // End with spaces Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("s ").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey(" . ").create(); }); // Internal characters Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("#").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey(">").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey(":").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("!").create(); }); // Start with '~' Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("~").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("~ ").create(); }); Assert.assertThrows(IllegalArgumentException.class, () -> { schema.propertyKey("~x").create(); }); } @Test public void testAddPropertyKeyWithoutDataType() { SchemaManager schema = graph().schema(); PropertyKey id = schema.propertyKey("id").valueSingle().create(); Assert.assertEquals(DataType.TEXT, id.dataType()); } @Test public void testAddPropertyKeyWithoutCardinality() { SchemaManager schema = graph().schema(); PropertyKey id = schema.propertyKey("id").asText().create(); Assert.assertEquals(Cardinality.SINGLE, id.cardinality()); } @Test public void testAddPropertyKeyWithoutDataTypeAndCardinality() { SchemaManager schema = graph().schema(); PropertyKey id = schema.propertyKey("id").create(); Assert.assertEquals(DataType.TEXT, id.dataType()); Assert.assertEquals(Cardinality.SINGLE, id.cardinality()); } @Test public void testAddPropertyKeyWithAggregateType() { SchemaManager schema = graph().schema(); PropertyKey startTime = schema.propertyKey("startTime") .asDate().valueSingle().calcMin() .ifNotExist().create(); Assert.assertEquals(DataType.DATE, startTime.dataType()); Assert.assertEquals(Cardinality.SINGLE, startTime.cardinality()); Assert.assertEquals(AggregateType.MIN, startTime.aggregateType()); startTime = schema.getPropertyKey("startTime"); Assert.assertEquals(DataType.DATE, startTime.dataType()); Assert.assertEquals(Cardinality.SINGLE, startTime.cardinality()); Assert.assertEquals(AggregateType.MIN, startTime.aggregateType()); PropertyKey endTime = schema.propertyKey("endTime") .asDate().valueSingle().calcMax() .ifNotExist().create(); Assert.assertEquals(DataType.DATE, endTime.dataType()); Assert.assertEquals(Cardinality.SINGLE, endTime.cardinality()); Assert.assertEquals(AggregateType.MAX, endTime.aggregateType()); endTime = schema.getPropertyKey("endTime"); Assert.assertEquals(DataType.DATE, endTime.dataType()); Assert.assertEquals(Cardinality.SINGLE, endTime.cardinality()); Assert.assertEquals(AggregateType.MAX, endTime.aggregateType()); PropertyKey times = schema.propertyKey("times") .asLong().valueSingle().calcSum() .ifNotExist().create(); Assert.assertEquals(DataType.LONG, times.dataType()); Assert.assertEquals(Cardinality.SINGLE, times.cardinality()); Assert.assertEquals(AggregateType.SUM, times.aggregateType()); times = schema.getPropertyKey("times"); Assert.assertEquals(DataType.LONG, times.dataType()); Assert.assertEquals(Cardinality.SINGLE, times.cardinality()); Assert.assertEquals(AggregateType.SUM, times.aggregateType()); PropertyKey oldProp = schema.propertyKey("oldProp") .asLong().valueSingle().calcOld() .ifNotExist().create(); Assert.assertEquals(DataType.LONG, oldProp.dataType()); Assert.assertEquals(Cardinality.SINGLE, oldProp.cardinality()); Assert.assertEquals(AggregateType.OLD, oldProp.aggregateType()); oldProp = schema.getPropertyKey("oldProp"); Assert.assertEquals(DataType.LONG, oldProp.dataType()); Assert.assertEquals(Cardinality.SINGLE, oldProp.cardinality()); Assert.assertEquals(AggregateType.OLD, oldProp.aggregateType()); PropertyKey regular = schema.propertyKey("regular").create(); Assert.assertEquals(DataType.TEXT, regular.dataType()); Assert.assertEquals(Cardinality.SINGLE, regular.cardinality()); Assert.assertEquals(AggregateType.NONE, regular.aggregateType()); regular = schema.getPropertyKey("regular"); Assert.assertEquals(DataType.TEXT, regular.dataType()); Assert.assertEquals(Cardinality.SINGLE, regular.cardinality()); Assert.assertEquals(AggregateType.NONE, regular.aggregateType()); } @Test public void testAddPropertyKeyWithAggregateTypeInvalid() { SchemaManager schema = graph().schema(); // Invalid cardinality Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueList().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueSet().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueList().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueSet().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueList().calcSum().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueSet().calcSum().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueList().calcOld().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asDate().valueSet().calcOld().create(); }); // Invalid data type Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asText().valueSingle().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBlob().valueSingle().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBoolean().valueSingle().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asUUID().valueSingle().calcMin().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asText().valueSingle().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBlob().valueSingle().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBoolean().valueSingle().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asUUID().valueSingle().calcMax().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asText().valueSingle().calcSum().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBlob().valueSingle().calcSum().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asBoolean().valueSingle().calcSum().create(); }); Assert.assertThrows(NotAllowException.class, () -> { schema.propertyKey("aggregateProperty") .asUUID().valueSingle().calcSum().create(); }); } @Test public void testRemovePropertyKey() { SchemaManager schema = graph().schema(); schema.propertyKey("id").valueSingle().create(); Assert.assertNotNull(schema.getPropertyKey("id")); schema.propertyKey("id").remove(); Assert.assertThrows(NotFoundException.class, () -> { schema.getPropertyKey("id"); }); } @Test public void testRemoveNotExistPropertyKey() { SchemaManager schema = graph().schema(); schema.propertyKey("not-exist-pk").remove(); } @Test public void testRemovePropertyKeyUsedByVertexLabel() { super.initPropertyKeys(); SchemaManager schema = graph().schema(); schema.vertexLabel("person") .properties("name", "age", "city") .primaryKeys("name") .nullableKeys("city") .create(); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("name").remove(); }); } @Test public void testRemovePropertyKeyUsedByEdgeLabel() { super.initPropertyKeys(); SchemaManager schema = graph().schema(); schema.vertexLabel("person") .properties("name", "age", "city") .primaryKeys("name") .nullableKeys("city") .create(); schema.vertexLabel("book") .properties("name") .primaryKeys("name") .create(); schema.edgeLabel("write").link("person", "book") .properties("time", "weight") .create(); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("time").remove(); }); } @Test public void testAddPropertyKeyWithUserdata() { SchemaManager schema = graph().schema(); PropertyKey age = schema.propertyKey("age") .userdata("min", 0) .userdata("max", 100) .create(); Assert.assertEquals(3, age.userdata().size()); Assert.assertEquals(0, age.userdata().get("min")); Assert.assertEquals(100, age.userdata().get("max")); PropertyKey id = schema.propertyKey("id") .userdata("length", 15) .userdata("length", 18) .create(); // The same key user data will be overwritten Assert.assertEquals(2, id.userdata().size()); Assert.assertEquals(18, id.userdata().get("length")); PropertyKey sex = schema.propertyKey("sex") .userdata("range", ImmutableList.of("male", "female")) .create(); Assert.assertEquals(2, sex.userdata().size()); Assert.assertEquals(ImmutableList.of("male", "female"), sex.userdata().get("range")); } @Test public void testAppendPropertyKeyWithUserdata() { SchemaManager schema = graph().schema(); PropertyKey age = schema.propertyKey("age") .userdata("min", 0) .create(); Assert.assertEquals(2, age.userdata().size()); Assert.assertEquals(0, age.userdata().get("min")); age = schema.propertyKey("age") .userdata("min", 1) .userdata("max", 100) .append(); Assert.assertEquals(3, age.userdata().size()); Assert.assertEquals(1, age.userdata().get("min")); Assert.assertEquals(100, age.userdata().get("max")); } @Test public void testEliminatePropertyKeyWithUserdata() { SchemaManager schema = graph().schema(); PropertyKey age = schema.propertyKey("age") .userdata("min", 0) .userdata("max", 100) .create(); Assert.assertEquals(3, age.userdata().size()); Assert.assertEquals(0, age.userdata().get("min")); Assert.assertEquals(100, age.userdata().get("max")); age = schema.propertyKey("age") .userdata("max", "") .eliminate(); Assert.assertEquals(2, age.userdata().size()); Assert.assertEquals(0, age.userdata().get("min")); } @Test public void testUpdatePropertyKeyWithoutUserdata() { SchemaManager schema = graph().schema(); schema.propertyKey("age") .asInt() .valueSingle() .userdata("min", 0) .create(); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("age").asLong().append(); }); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("age").valueList().append(); }); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("age").asLong().eliminate(); }); Assert.assertThrows(HugeException.class, () -> { schema.propertyKey("age").valueList().eliminate(); }); } @Test public void testCreateTime() { SchemaManager schema = graph().schema(); PropertyKey id = schema.propertyKey("id") .asText() .valueSingle() .create(); Date createTime = (Date) id.userdata().get(Userdata.CREATE_TIME); Date now = DateUtil.now(); Assert.assertFalse(createTime.after(now)); id = schema.getPropertyKey("id"); createTime = (Date) id.userdata().get(Userdata.CREATE_TIME); Assert.assertFalse(createTime.after(now)); } @Test public void testDuplicatePropertyKeyWithIdentityProperties() { SchemaManager schema = graph().schema(); schema.propertyKey("fakePropKey") .asText() .ifNotExist() .create(); schema.propertyKey("fakePropKey") .asText() .checkExist(false) .create(); schema.propertyKey("fakePropKey") .userdata("b", "") // won't check userdata .asText() .checkExist(false) .create(); } @Test public void testDuplicatePropertyKeyWithDifferentProperties() { SchemaManager schema = graph().schema(); schema.propertyKey("fakePropKey") .asText() .ifNotExist() .create(); Assert.assertThrows(ExistedException.class, () -> { schema.propertyKey("fakePropKey") .asDouble() .checkExist(false) .create(); }); Assert.assertThrows(ExistedException.class, () -> { schema.propertyKey("fakePropKey") .asText() .valueList() .checkExist(false) .create(); }); Assert.assertThrows(ExistedException.class, () -> { schema.propertyKey("fakePropKey") .asText() .aggregateType(AggregateType.MAX) .checkExist(false) .create(); }); } }
{ "pile_set_name": "Github" }
#include <arpa/inet.h> #include <cassert> #include <stdint.h> #include <iomanip> #include <iostream> #include <string> int main (void) { using std::cin; using std::cout; using std::endl; using std::setprecision; uint32_t magic; cin.read (reinterpret_cast<char*> (&magic), sizeof (uint32_t)); magic = ntohl (magic); assert (magic == 2051); uint32_t n_images; cin.read (reinterpret_cast<char*> (&n_images), sizeof (uint32_t)); n_images = ntohl (n_images); uint32_t n_rows; cin.read (reinterpret_cast<char*> (&n_rows), sizeof (uint32_t)); n_rows = ntohl (n_rows); uint32_t n_columns; cin.read (reinterpret_cast<char*> (&n_columns), sizeof (uint32_t)); n_columns = ntohl (n_columns); uint32_t rc = n_rows * n_columns; unsigned char buf[rc]; for (cin.read (reinterpret_cast<char*> (buf), rc); ! cin.eof (); cin.read (reinterpret_cast<char*> (buf), rc)) { for (unsigned int p = 0; p < n_rows * n_columns; ++p) { if (buf[p]) cout << " " << p << ":" << static_cast<unsigned int>(buf[p]); } cout << endl; } return 0; }
{ "pile_set_name": "Github" }
//! @brief Solana Rust-based BPF program utility functions and types extern crate solana_sdk; pub fn uadd(x: u128, y: u128) -> u128 { x + y } pub fn usubtract(x: u128, y: u128) -> u128 { x - y } pub fn umultiply(x: u128, y: u128) -> u128 { x * y } pub fn udivide(n: u128, d: u128) -> u128 { n / d } pub fn umodulo(n: u128, d: u128) -> u128 { n % d } pub fn add(x: i128, y: i128) -> i128 { x + y } pub fn subtract(x: i128, y: i128) -> i128 { x - y } pub fn multiply(x: i128, y: i128) -> i128 { x * y } pub fn divide(n: i128, d: i128) -> i128 { n / d } pub fn modulo(n: i128, d: i128) -> i128 { n % d }
{ "pile_set_name": "Github" }
import * as HighlightApis from '../../behaviour/highlighting/HighlightApis'; import { HighlightingBehaviour } from '../../behaviour/highlighting/HighlightingTypes'; import HighlightSchema from '../../behaviour/highlighting/HighlightSchema'; import * as Behaviour from './Behaviour'; const Highlighting: HighlightingBehaviour = Behaviour.create({ fields: HighlightSchema, name: 'highlighting', apis: HighlightApis }); export { Highlighting };
{ "pile_set_name": "Github" }
{ "type": "bundle", "id": "bundle--7b067d45-5cf4-4e46-8d0b-0ef162724acf", "spec_version": "2.0", "objects": [ { "created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5", "object_marking_refs": [ "marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168" ], "source_ref": "attack-pattern--0c2d00da-7742-49e7-9928-4514e5075d32", "target_ref": "attack-pattern--aedfca76-3b30-4866-b2aa-0f1d7fd1e4b6", "relationship_type": "subtechnique-of", "id": "relationship--6c99a74d-8a17-453b-9100-ebb3cca33faa", "type": "relationship", "modified": "2020-03-13T14:10:43.600Z", "created": "2020-03-13T14:10:43.600Z" } ] }
{ "pile_set_name": "Github" }
/* * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.palantir.atlasdb.table.description; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import com.palantir.atlasdb.protos.generated.TableMetadataPersistence; import com.palantir.atlasdb.protos.generated.TableMetadataPersistence.LogSafety; public class NamedColumnDescriptionTest { private static final String SHORT_NAME = "shortName"; private static final String LONG_NAME = "longName"; private static final ColumnValueDescription COLUMN_VALUE_DESCRIPTION = ColumnValueDescription.forType(ValueType.VAR_LONG); private static final NamedColumnDescription LOGGABILITY_UNSPECIFIED_DESCRIPTION = new NamedColumnDescription(SHORT_NAME, LONG_NAME, COLUMN_VALUE_DESCRIPTION); private static final NamedColumnDescription NAME_LOGGABLE_DESCRIPTION = new NamedColumnDescription(SHORT_NAME, LONG_NAME, COLUMN_VALUE_DESCRIPTION, LogSafety.SAFE); private static final NamedColumnDescription NAME_NOT_LOGGABLE_DESCRIPTION = new NamedColumnDescription(SHORT_NAME, LONG_NAME, COLUMN_VALUE_DESCRIPTION, LogSafety.UNSAFE); @Test public void nameIsNotLoggableByDefault() { assertThat(LOGGABILITY_UNSPECIFIED_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.UNSAFE); } @Test public void nameCanBeSpecifiedToBeLoggable() { assertThat(NAME_LOGGABLE_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.SAFE); } @Test public void nameCanBeSpecifiedToBeNotLoggable() { assertThat(NAME_NOT_LOGGABLE_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.UNSAFE); } @Test public void canSerializeAndDeserializeLoggabilityUnspecifiedDescription() { assertCanSerializeAndDeserializeWithSafety(LOGGABILITY_UNSPECIFIED_DESCRIPTION, LogSafety.UNSAFE); } @Test public void canSerializeAndDeserializeKeepingLoggability() { assertCanSerializeAndDeserializeWithSafety(NAME_LOGGABLE_DESCRIPTION, LogSafety.SAFE); } @Test public void canSerializeAndDeserializeKeepingNonLoggability() { assertCanSerializeAndDeserializeWithSafety(NAME_NOT_LOGGABLE_DESCRIPTION, LogSafety.UNSAFE); } private static void assertCanSerializeAndDeserializeWithSafety( NamedColumnDescription componentDescription, LogSafety logSafety) { TableMetadataPersistence.NamedColumnDescription.Builder builder = componentDescription.persistToProto(); assertThat(NamedColumnDescription.hydrateFromProto(builder.build())) .isEqualTo(componentDescription) .matches(description -> description.logSafety == logSafety); } }
{ "pile_set_name": "Github" }
# Event 1643 - task_0 ###### Version: 0 ## Description None ## Data Dictionary |Standard Name|Field Name|Type|Description|Sample Value| |---|---|---|---|---| |TBD|szString|AnsiString|None|`None`| |TBD|BSSID|Binary|None|`None`| |TBD|dwValue1|UInt32|None|`None`| |TBD|dwValue2|UInt32|None|`None`| |TBD|dwValue3|UInt32|None|`None`| ## Tags * etw_level_Informational * etw_task_task_0
{ "pile_set_name": "Github" }
/* * Copyright 2010 ZXing 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 com.dcloud.zxing.aztec; import java.util.List; import java.util.Map; import com.dcloud.zxing.BarcodeFormat; import com.dcloud.zxing.BinaryBitmap; import com.dcloud.zxing.ChecksumException; import com.dcloud.zxing.FormatException; import com.dcloud.zxing.NotFoundException; import com.dcloud.zxing.Reader; import com.dcloud.zxing.Result; import com.dcloud.zxing.ResultPoint; import com.dcloud.zxing.ResultPointCallback; import com.dcloud.zxing.aztec.decoder.Decoder; import com.dcloud.zxing.aztec.detector.Detector; import com.dcloud.zxing.DecodeHintType; import com.dcloud.zxing.ResultMetadataType; import com.dcloud.zxing.common.DecoderResult; /** * This implementation can detect and decode Aztec codes in an image. * * @author David Olivier */ public final class AztecReader implements Reader { /** * Locates and decodes a Data Matrix code in an image. * * @return a String representing the content encoded by the Data Matrix code * @throws NotFoundException if a Data Matrix code cannot be found * @throws FormatException if a Data Matrix code cannot be decoded * @throws ChecksumException if error correction fails */ @Override public Result decode(BinaryBitmap image) throws NotFoundException, FormatException { return decode(image, null); } @Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, FormatException { AztecDetectorResult detectorResult = new Detector(image.getBlackMatrix()).detect(); ResultPoint[] points = detectorResult.getPoints(); if (hints != null) { ResultPointCallback rpcb = (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK); if (rpcb != null) { for (ResultPoint point : points) { rpcb.foundPossibleResultPoint(point); } } } DecoderResult decoderResult = new Decoder().decode(detectorResult); Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.AZTEC); List<byte[]> byteSegments = decoderResult.getByteSegments(); if (byteSegments != null) { result.putMetadata(ResultMetadataType.BYTE_SEGMENTS, byteSegments); } String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; } @Override public void reset() { // do nothing } }
{ "pile_set_name": "Github" }
// Copyright © 2019 The Vultr-cli 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 cmd import ( "context" "errors" "fmt" "os" "regexp" "strconv" "github.com/spf13/cobra" "github.com/vultr/govultr" "github.com/vultr/vultr-cli/cmd/printer" ) // dnsRecordCmd represents the dnsRecord command func DnsRecord() *cobra.Command { dnsRecordCmd := &cobra.Command{ Use: "record", Short: "dns record", Long: ``, } dnsRecordCmd.AddCommand(recordCreate, recordlist, recordDelete, recordUpdate) // Create recordCreate.Flags().StringP("domain", "m", "", "name of domain you want to create this record for") recordCreate.Flags().StringP("type", "t", "", "record type you want to create : Possible values A, AAAA, CNAME, NS, MX, SRV, TXT CAA, SSHFP") recordCreate.Flags().StringP("name", "n", "", "name of record") recordCreate.Flags().StringP("data", "d", "", "data for the record") recordCreate.MarkFlagRequired("domain") recordCreate.MarkFlagRequired("type") recordCreate.MarkFlagRequired("name") recordCreate.MarkFlagRequired("data") // Create Optional recordCreate.Flags().IntP("ttl", "", 0, "time to live for the record") recordCreate.Flags().IntP("priority", "p", 0, "only required for MX and SRV") // Update recordUpdate.Flags().StringP("name", "n", "", "name of record") recordUpdate.Flags().StringP("data", "d", "", "data for the record") recordUpdate.Flags().IntP("ttl", "", 0, "time to live for the record") recordUpdate.Flags().IntP("priority", "p", -1, "only required for MX and SRV") return dnsRecordCmd } // Temporary solution to determine if the record type is TXT, in order to // add quotes around the value. The API does not accept TXT records without // quotes. var regRecordTxt = regexp.MustCompile("([A-Z]|=|_)") var recordCreate = &cobra.Command{ Use: "create", Short: "create a dns record", Long: ``, Run: func(cmd *cobra.Command, args []string) { domain, _ := cmd.Flags().GetString("domain") rType, _ := cmd.Flags().GetString("type") name, _ := cmd.Flags().GetString("name") data, _ := cmd.Flags().GetString("data") // Record data for TXT must be enclosed in quotes if data[0] != '"' && data[len(data)-1] != '"' && regRecordTxt.Match([]byte(data)) { data = fmt.Sprintf("\"%s\"", data) } ttl, _ := cmd.Flags().GetInt("ttl") priority, _ := cmd.Flags().GetInt("priority") err := client.DNSRecord.Create(context.TODO(), domain, rType, name, data, ttl, priority) if err != nil { fmt.Printf("error while creating dns record : %v\n", err) os.Exit(1) } fmt.Println("created dns record") }, } var recordlist = &cobra.Command{ Use: "list <domainName>", Short: "list all dns records", Long: ``, Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return errors.New("please provide a domain name") } return nil }, Run: func(cmd *cobra.Command, args []string) { domain := args[0] records, err := client.DNSRecord.List(context.TODO(), domain) if err != nil { fmt.Printf("error while getting dns records : %v\n", err) os.Exit(1) } printer.DnsRecordsList(records) }, } var recordDelete = &cobra.Command{ Use: "delete <domainName> <recordID>", Short: "delete dns record", Aliases: []string{"destroy"}, Long: ``, Args: func(cmd *cobra.Command, args []string) error { if len(args) < 2 { return errors.New("please provide a domainName & recordID") } return nil }, Run: func(cmd *cobra.Command, args []string) { domain := args[0] id := args[1] err := client.DNSRecord.Delete(context.TODO(), domain, id) if err != nil { fmt.Printf("error while deleting dns record : %v\n", err) os.Exit(1) } fmt.Println("deleted dns record") }, } var recordUpdate = &cobra.Command{ Use: "update <domainName> <recordID>", Short: "update dns record", Long: ``, Args: func(cmd *cobra.Command, args []string) error { if len(args) < 2 { return errors.New("please provide a domainName & recordID") } return nil }, Run: func(cmd *cobra.Command, args []string) { domain := args[0] id := args[1] name, _ := cmd.Flags().GetString("name") data, _ := cmd.Flags().GetString("data") ttl, _ := cmd.Flags().GetInt("ttl") priority, _ := cmd.Flags().GetInt("priority") updates := &govultr.DNSRecord{} i, _ := strconv.Atoi(id) updates.RecordID = i if name != "" { updates.Name = name } if data != "" { // Record data for TXT must be enclosed in quotes if data[0] != '"' && data[len(data)-1] != '"' && regRecordTxt.Match([]byte(data)) { data = fmt.Sprintf("\"%s\"", data) } updates.Data = data } if ttl != 0 { updates.TTL = ttl } if priority != -1 { updates.Priority = &priority } err := client.DNSRecord.Update(context.TODO(), domain, updates) if err != nil { fmt.Printf("error updating dns record : %v\n", err) os.Exit(1) } fmt.Println("updated dns record") }, }
{ "pile_set_name": "Github" }
# retry Abstraction for exponential and custom retry strategies for failed operations. ## Installation npm install retry ## Current Status This module has been tested and is ready to be used. ## Tutorial The example below will retry a potentially failing `dns.resolve` operation `10` times using an exponential backoff strategy. With the default settings, this means the last attempt is made after `17 minutes and 3 seconds`. ``` javascript var dns = require('dns'); var retry = require('retry'); function faultTolerantResolve(address, cb) { var operation = retry.operation(); operation.attempt(function(currentAttempt) { dns.resolve(address, function(err, addresses) { if (operation.retry(err)) { return; } cb(err ? operation.mainError() : null, addresses); }); }); } faultTolerantResolve('nodejs.org', function(err, addresses) { console.log(err, addresses); }); ``` Of course you can also configure the factors that go into the exponential backoff. See the API documentation below for all available settings. currentAttempt is an int representing the number of attempts so far. ``` javascript var operation = retry.operation({ retries: 5, factor: 3, minTimeout: 1 * 1000, maxTimeout: 60 * 1000, randomize: true, }); ``` ## API ### retry.operation([options]) Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with two additions: * `forever`: Whether to retry forever, defaults to `false`. * `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. ### retry.timeouts([options]) Returns an array of timeouts. All time `options` and return values are in milliseconds. If `options` is an array, a copy of that array is returned. `options` is a JS object that can contain any of the following keys: * `retries`: The maximum amount of times to retry the operation. Default is `10`. * `factor`: The exponential factor to use. Default is `2`. * `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`. * `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`. * `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`. The formula used to calculate the individual timeouts is: ``` Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout) ``` Have a look at [this article][article] for a better explanation of approach. If you want to tune your `factor` / `times` settings to attempt the last retry after a certain amount of time, you can use wolfram alpha. For example in order to tune for `10` attempts in `5 minutes`, you can use this equation: ![screenshot](https://github.com/tim-kos/node-retry/raw/master/equation.gif) Explaining the various values from left to right: * `k = 0 ... 9`: The `retries` value (10) * `1000`: The `minTimeout` value in ms (1000) * `x^k`: No need to change this, `x` will be your resulting factor * `5 * 60 * 1000`: The desired total amount of time for retrying in ms (5 minutes) To make this a little easier for you, use wolfram alpha to do the calculations: <http://www.wolframalpha.com/input/?i=Sum%5B1000*x^k%2C+{k%2C+0%2C+9}%5D+%3D+5+*+60+*+1000> [article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html ### retry.createTimeout(attempt, opts) Returns a new `timeout` (integer in milliseconds) based on the given parameters. `attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed). `opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above. `retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13). ### retry.wrap(obj, [options], [methodNames]) Wrap all functions of the `obj` with retry. Optionally you can pass operation options and an array of method names which need to be wrapped. ``` retry.wrap(obj) retry.wrap(obj, ['method1', 'method2']) retry.wrap(obj, {retries: 3}) retry.wrap(obj, {retries: 3}, ['method1', 'method2']) ``` The `options` object can take any options that the usual call to `retry.operation` can take. ### new RetryOperation(timeouts, [options]) Creates a new `RetryOperation` where `timeouts` is an array where each value is a timeout given in milliseconds. Available options: * `forever`: Whether to retry forever, defaults to `false`. * `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. If `forever` is true, the following changes happen: * `RetryOperation.errors()` will only output an array of one item: the last error. * `RetryOperation` will repeatedly use the `timeouts` array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on. #### retryOperation.errors() Returns an array of all errors that have been passed to `retryOperation.retry()` so far. #### retryOperation.mainError() A reference to the error object that occured most frequently. Errors are compared using the `error.message` property. If multiple error messages occured the same amount of time, the last error object with that message is returned. If no errors occured so far, the value is `null`. #### retryOperation.attempt(fn, timeoutOps) Defines the function `fn` that is to be retried and executes it for the first time right away. The `fn` function can receive an optional `currentAttempt` callback that represents the number of attempts to execute `fn` so far. Optionally defines `timeoutOps` which is an object having a property `timeout` in miliseconds and a property `cb` callback function. Whenever your retry operation takes longer than `timeout` to execute, the timeout callback function `cb` is called. #### retryOperation.try(fn) This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. #### retryOperation.start(fn) This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. #### retryOperation.retry(error) Returns `false` when no `error` value is given, or the maximum amount of retries has been reached. Otherwise it returns `true`, and retries the operation after the timeout for the current attempt number. #### retryOperation.stop() Allows you to stop the operation being retried. Useful for aborting the operation on a fatal error etc. #### retryOperation.attempts() Returns an int representing the number of attempts it took to call `fn` before it was successful. ## License retry is licensed under the MIT license. # Changelog 0.10.0 Adding `stop` functionality, thanks to @maxnachlinger. 0.9.0 Adding `unref` functionality, thanks to @satazor. 0.8.0 Implementing retry.wrap. 0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). 0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. 0.5.0 Some minor refactoring. 0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it. 0.3.0 Added retryOperation.start() which is an alias for retryOperation.try(). 0.2.0 Added attempts() function and parameter to retryOperation.try() representing the number of attempts it took to call fn().
{ "pile_set_name": "Github" }
commandlinefu_id: 706 translator: weibo: '' hide: true command: |- du -hs * | grep '^[0-9,]*[MG]' | sort -rn summary: |- Show sorted list of files with sizes more than 1MB in the current dir
{ "pile_set_name": "Github" }
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>buffered_write_stream::get_io_context</title> <link rel="stylesheet" href="../../../boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <link rel="home" href="../../../index.html" title="Asio"> <link rel="up" href="../buffered_write_stream.html" title="buffered_write_stream"> <link rel="prev" href="get_executor.html" title="buffered_write_stream::get_executor"> <link rel="next" href="get_io_service.html" title="buffered_write_stream::get_io_service"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="get_executor.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../buffered_write_stream.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="get_io_service.html"><img src="../../../next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="asio.reference.buffered_write_stream.get_io_context"></a><a class="link" href="get_io_context.html" title="buffered_write_stream::get_io_context">buffered_write_stream::get_io_context</a> </h4></div></div></div> <p> <a class="indexterm" name="asio.indexterm.buffered_write_stream.get_io_context"></a> (Deprecated: Use <code class="computeroutput">get_executor()</code>.) Get the <a class="link" href="../io_context.html" title="io_context"><code class="computeroutput">io_context</code></a> associated with the object. </p> <pre class="programlisting">asio::io_context &amp; get_io_context(); </pre> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2018 Christopher M. Kohlhoff<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="get_executor.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../buffered_write_stream.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="get_io_service.html"><img src="../../../next.png" alt="Next"></a> </div> </body> </html>
{ "pile_set_name": "Github" }
#!/bin/bash ##### # Helper script for pretty formatting of json files ##### for file in `ls -a app/phones | grep -v \\\.\$`; do cat app/phones/$file | python -mjson.tool > tmp.json rm app/phones/$file mv tmp.json app/phones/$file done
{ "pile_set_name": "Github" }
// #Regression #Conformance #Quotations #ReflectedDefinition // Regression for DevDiv:361318 //<Expects status="success"></Expects> open System.Reflection open Microsoft.FSharp.Quotations.DerivedPatterns type Iface1 = abstract Foo : int type Iface2 = inherit Iface1 abstract Bar : int type Test() = interface Iface2 with [<ReflectedDefinition>] member this.Foo = 0 [<ReflectedDefinition>] member this.Bar = 1 let bindingFlags = BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Static ||| BindingFlags.GetProperty ||| BindingFlags.Instance try for ty in Assembly.GetExecutingAssembly().GetTypes() do for mthd in ty.GetMethods(bindingFlags) do match mthd with | MethodWithReflectedDefinition _ -> printfn "%s" mthd.Name | _ -> () 0 with | _ -> printfn "FAIL: exception detected (did DevDiv:361318 regress?)" 1 |> exit
{ "pile_set_name": "Github" }
/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.corba.se.impl.legacy.connection; import com.sun.corba.se.pept.transport.Connection; import com.sun.corba.se.spi.orb.ORB; import com.sun.corba.se.spi.ior.IOR; import com.sun.corba.se.spi.logging.CORBALogDomains; import com.sun.corba.se.spi.transport.CorbaContactInfoList; import com.sun.corba.se.spi.transport.SocketInfo; import com.sun.corba.se.impl.logging.ORBUtilSystemException; import com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl; /** * @author Harold Carr */ public class SocketFactoryContactInfoImpl extends SocketOrChannelContactInfoImpl { protected ORBUtilSystemException wrapper; protected SocketInfo socketInfo; // XREVISIT // See SocketOrChannelAcceptorImpl.createMessageMediator // See SocketFactoryContactInfoImpl.constructor() // See SocketOrChannelContactInfoImpl.constructor() public SocketFactoryContactInfoImpl() { } public SocketFactoryContactInfoImpl( ORB orb, CorbaContactInfoList contactInfoList, IOR effectiveTargetIOR, short addressingDisposition, SocketInfo cookie) { super(orb, contactInfoList); this.effectiveTargetIOR = effectiveTargetIOR; this.addressingDisposition = addressingDisposition; wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.RPC_TRANSPORT ) ; socketInfo = orb.getORBData().getLegacySocketFactory() .getEndPointInfo(orb, effectiveTargetIOR, cookie); socketType = socketInfo.getType(); hostname = socketInfo.getHost(); port = socketInfo.getPort(); } //////////////////////////////////////////////////// // // pept.transport.ContactInfo // public Connection createConnection() { Connection connection = new SocketFactoryConnectionImpl( orb, this, orb.getORBData().connectionSocketUseSelectThreadToWait(), orb.getORBData().connectionSocketUseWorkerThreadForEvent()); return connection; } //////////////////////////////////////////////////// // // java.lang.Object // public String toString() { return "SocketFactoryContactInfoImpl[" + socketType + " " + hostname + " " + port + "]"; } } // End of file.
{ "pile_set_name": "Github" }
#!/usr/bin/env python3 # Copyright 2014-2018 PUNCH Cyber Analytics Group # # 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 typing import Optional from stoq.data_classes import Payload, Request, WorkerResponse from stoq.plugins import WorkerPlugin class DummyWorker(WorkerPlugin): async def scan( self, payload: Payload, request: Request ) -> Optional[WorkerResponse]: return None
{ "pile_set_name": "Github" }
/// @ref core /// @file glm/ext/vector_bool3.hpp #pragma once #include "../detail/type_vec3.hpp" namespace glm { /// @addtogroup core_vector /// @{ /// 3 components vector of boolean. /// /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> typedef vec<3, bool, defaultp> bvec3; /// @} }//namespace glm
{ "pile_set_name": "Github" }
/* * Copyright 2011 David Jurgens * * This file is part of the S-Space package and is covered under the terms and * conditions therein. * * The S-Space package is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation and distributed hereunder to you. * * THIS SOFTWARE IS PROVIDED "AS IS" AND NO REPRESENTATIONS OR WARRANTIES, * EXPRESS OR IMPLIED ARE MADE. BY WAY OF EXAMPLE, BUT NOT LIMITATION, WE MAKE * NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- ABILITY OR FITNESS FOR ANY * PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE OR DOCUMENTATION * WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER * RIGHTS. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package edu.ucla.sspace.matrix; import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.*; public class TransposedMatrixTests { @Test public void testSize() { Matrix m = new ArrayMatrix( new double[][] { { 0.89453775, 0.27084422, 0.20789784, 1.3732798, 1.5811776 }, {-1.4221323, -0.8210684, -0.52053654, 0.8210684, 0.3005319}}); assertEquals(2, m.rows()); assertEquals(5, m.columns()); Matrix t = new TransposedMatrix(m); assertEquals(5, t.rows()); assertEquals(2, t.columns()); } @Test public void testGet() { Matrix m = new ArrayMatrix( new double[][] { { 0.89453775, 0.27084422, 0.20789784, 1.3732798, 1.5811776 }, {-1.4221323, -0.8210684, -0.52053654, 0.8210684, 0.3005319}}); assertEquals(2, m.rows()); assertEquals(5, m.columns()); Matrix t = new TransposedMatrix(m); assertEquals(m.get(0,0), t.get(0,0), 0.001); assertEquals(m.get(1,1), t.get(1,1), 0.001); assertEquals(m.get(0,3), t.get(3,0), 0.001); assertEquals(m.get(1,3), t.get(3,1), 0.001); assertEquals(m.get(1,4), t.get(4,1), 0.001); } }
{ "pile_set_name": "Github" }
package com.nielsmasdorp.speculum.models.forecast; /** * @author Niels Masdorp (NielsMasdorp) */ @SuppressWarnings("unused") public class ForecastResponse { private Currently currently; private Forecast daily; public Currently getCurrently() { return currently; } public Forecast getForecast() { return daily; } public Forecast getDaily() { return daily; } }
{ "pile_set_name": "Github" }
/****************************************/ /* LeanBack Player | HTML5 Media Player */ /* Release: 0.8.x */ /****************************************/ /* LeanBack Player - no HTML5, no Flash */ .leanback-player-html-fallback {position: relative; text-align: center; font: 13px/1.231 arial, helvetica, sans-serif !important; color: #000 !important; z-index: 1002;} .leanback-player-html-fallback img {border: 1px solid #555; z-index: 1000;} .leanback-player-html-fallback div {position: absolute; width: auto; min-width: 220px; height: 20px; bottom: -2px; left: 0; right: -2px; margin: 0; border: 1px solid #555; padding: 5px 5px 0; background: #fff; z-index: 1001;} .leanback-player-html-fallback a {font-size: 12px; color: #000 !important; text-decoration: none;} .leanback-player-html-fallback a:hover {border-bottom: dotted 1px #000;} .leanback-player-audio .leanback-player-html-fallback {position: relative; min-width: 220px !important; height: 20px !important;} .leanback-player-audio .leanback-player-html-fallback div {bottom: auto; left: auto; right: auto;} /************************************/ /* LeanBack Player - Flash Fallback */ .leanback-player-flash-fallback {position: absolute; margin: auto; text-align: center; border: 1px solid #555; z-index: 1003;} /*******************/ /* IFrame Settings */ iframe.h5_lb_player_smallscreen::-webkit-scrollbar, iframe.h5_lb_player_fullscreen::-webkit-scrollbar {display: none;} iframe.h5_lb_player_fullscreen { position: fixed; top: 0; left: 0; border: 0; z-index: 1004; } iframe.h5_lb_player_smallscreen { margin: 0 !important; padding: 0 !important; overflow: hidden; z-index: 1000; } body.h5_lb_iframe { position: absolute !important; border: 0 !important; margin: 0 !important; padding: 0 !important; top: 0 !important; right: 0 !important; left: -2px !important; bottom: 0 !important; } /*******************/ /* LeanBack Player */ .h5_lb_player {cursor: pointer; direction: ltr;} .h5_lb_player .h5_lb_video {border: 1px solid #555; background: #000; cursor: pointer; z-index: 1000; outline: 0;} .h5_lb_player .h5_lb_audio {cursor: pointer; outline: 0;} .h5_lb_player audio {display: none !important;} .h5_lb_smallscreen {position: relative; margin: auto; text-align: center;} .h5_lb_fullscreen {position: fixed !important; top: 0; left: 0; margin: auto; text-align: center; border: 0; background: #000; z-index: 9999;} .h5_lb_fullscreen .h5_lb_video {border: 0;} .h5_lb_unfocused {opacity: 0.7;} .h5_lb_unfocused:hover {opacity: 1.0;} /*******************/ /* Big Play Button */ .h5_lb_player .big_play_button { position: absolute; top: 50%; left: 50%; margin:-40px 0 0 -40px; width: 80px; height: 80px; vertical-align: baseline; border: 1px solid #2b5880; cursor: pointer !important; display: block; z-index: 1003; /* Radius */ -moz-border-radius: 15px; -webkit-border-radius: 15px; border-radius: 15px; /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCABQAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgUB/9oADAMBAAIQAxAAAAHUK0uEjsIBQkVCRX//xAAUEAEAAAAAAAAAAAAAAAAAAAAw/9oACAEBAAEFAi//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAw/9oACAEBAAY/Ai//xAAVEAEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAQABPyGqqqqqqv/aAAwDAQACAAMAAAAQAxPzz//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EIiIj//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAECAQE/EKqqr//EABQQAQAAAAAAAAAAAAAAAAAAADD/2gAIAQEAAT8QIAP/2Q==') repeat-x; } .h5_lb_player .big_play_button:hover { border: 1px solid #747474; /* Background */ background: #747474; /* Background - Gradients */ background: #747474 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCABQAAEDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAMCBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAemmMJjCYwmMJj//xAAUEAEAAAAAAAAAAAAAAAAAAAAw/9oACAEBAAEFAi//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAw/9oACAEBAAY/Ai//xAAVEAEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAQABPyGqqqqqqv/aAAwDAQACAAMAAAAQMMMMM//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QP//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QP//EABQQAQAAAAAAAAAAAAAAAAAAADD/2gAIAQEAAT8QKUv/2Q==') repeat-x; } .h5_lb_player .big_play_button div { margin: 20px 0 0 22px; padding: 0; height: 0; width: 0; font-size: 0; line-height: 0%; border-top: 20px solid transparent; border-left: 40px solid #fff; border-bottom: 20px solid transparent; } /*******************/ /* Loading Spinner */ .h5_lb_player .h5_lb_spinner {position: absolute; top: 50%; left: 50%; margin:-7px 0 0 -7px; width: 28px; height: 28px; z-index: 1002;} .h5_lb_player .h5_lb_spinner div { position: absolute; width: 12px; height: 12px; background: #fff; /* Border Radius */ -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } /******************/ /* Logo */ .h5_lb_player img.logo {position: absolute; margin: 0; top: 12px; left: 12px; border: 1px solid transparent; display: block; z-index: 1000;} /******************/ /* Poster, Object */ .h5_lb_player img.poster {position: absolute; margin: 0; top: 0; left: auto; right: auto; border: 1px solid transparent; display: block; z-index: 1001;} .h5_lb_fullscreen img.poster {border: 0;} /***************/ /* Control Bar */ .h5_lb_controls { position: absolute; top: auto; right: -1px; bottom: -1px; left: 1px; height: 36px; cursor: default; z-index: 1001; /* Border RGBa with 0.8 opacity */ border-color: rgba(100, 100, 100, 0.8); /* Disable selection */ -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; user-select: none; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.8 opacity */ background: rgba(100, 100, 100, 0.8); } .h5_lb_controls_below { right: -2px; bottom: -38px; left: 0; border-left: 1px solid #555; border-right: 1px solid #555; border-bottom: 1px solid #555; /* Background */ background: #646464; } .h5_lb_fullscreen .h5_lb_controls { position: absolute; top: auto; bottom: -1px; left: 0; margin: 0 0 1px 0; padding: 0 !important; border: 0; } .h5_lb_player:hover .h5_lb_controls {display: block;} .h5_lb_controls_audio { position: relative !important; margin: auto !important; bottom: auto !important; border: 0 !important; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.8 opacity */ background: rgba(100, 100, 100, 0.8); } /********************/ /* Control Buttons */ .h5_lb_controls > div { float: left; text-align: center !important; margin: 0; padding: 0; width: 32px; height: 36px; } .h5_lb_fullscreen .h5_lb_controls { /* Background - only RGB */ background: #646464; } /*****************/ /* Control Items */ .h5_lb_controls div.h5_lb_play_control {display: block; cursor: pointer;} .h5_lb_controls div.h5_lb_pause_control {display: none; cursor: pointer;} .h5_lb_controls div.h5_lb_stop_control {display: block; cursor: pointer;} .h5_lb_controls div.h5_lb_progress_control {cursor: pointer; display: block; width: 0;} /* width is calculated dynamically at runtime */ .h5_lb_controls div.h5_lb_timer_control {display: block; width: 120px; cursor: default !important;} .h5_lb_controls div.h5_lb_volume_control {display: block; width: auto; padding: 0 6px;} .h5_lb_controls div.h5_lb_playback_control {cursor: pointer; display: block; width: 40px;} .h5_lb_controls div.h5_lb_subtitle_control {cursor: pointer; display: block; width: 50px;} .h5_lb_controls div.h5_lb_sources_control {cursor: pointer; display: block; width: 50px;} .h5_lb_controls div.h5_lb_fullscreen_control {display: block; width: 45px; padding: 0 6px;} /****************************/ /* Play Control: Inner Item */ .h5_lb_controls div.h5_lb_play_control div {margin: 10px 0 0 9px; font-size: 0; line-height: 0%; width: 0; border-top: 9px solid transparent; border-left: 18px solid #fff; border-bottom: 9px solid transparent; cursor: pointer;} /*****************************/ /* Pause Control: Inner Item */ .h5_lb_controls div.h5_lb_pause_control div {height: 18px; width: 5px; background: #fff; float: left; cursor: pointer;} .h5_lb_controls div.h5_lb_pause_control div:nth-child(1) {margin: 10px 0 0 9px;} .h5_lb_controls div.h5_lb_pause_control div:nth-child(2) {margin: 10px 0 0 5px;} /***************************/ /* Stop Control: Inner Item */ .h5_lb_controls div.h5_lb_stop_control div {margin: 10px 0 0 7px; width: 18px; height: 18px; background: #fff;} /********************************/ /* Progress Control: Inner Item */ .h5_lb_controls div.h5_lb_progress_control .progress_bar_bg { position: absolute; margin: 10px 7px 0; height: 16px; border: 1px solid #f1f1f1; background: #3e3e3e; cursor: pointer; z-Index: 1000; } .h5_lb_controls div.h5_lb_progress_control .progress_bar_buffered { position: absolute; margin: 11px 8px 0; height: 16px; z-Index: 1001; /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAQAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAG9GP/EABUQAQEAAAAAAAAAAAAAAAAAAAAS/9oACAEBAAEFAqU//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwF//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwI//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABPyEP/9oADAMBAAIAAwAAABAD/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPxB//8QAFRABAQAAAAAAAAAAAAAAAAAAAHH/2gAIAQEAAT8Qtb//2Q==') repeat-x; } .h5_lb_controls div.h5_lb_progress_control .progress_bar_played { position: absolute; margin: 11px 8px 0; height: 16px; z-Index: 1002; /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAQAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAME/8QAFAEBAAAAAAAAAAAAAAAAAAAABf/aAAwDAQACEAMQAAABkxEjv//EABUQAQEAAAAAAAAAAAAAAAAAAAAS/9oACAEBAAEFAqU//8QAFREBAQAAAAAAAAAAAAAAAAAAABL/2gAIAQMBAT8Bh//EABURAQEAAAAAAAAAAAAAAAAAAAAS/9oACAECAQE/Abf/xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAE/IT//2gAMAwEAAgADAAAAEMf/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/ED//xAAVEAEBAAAAAAAAAAAAAAAAAAAAcf/aAAgBAQABPxClP//Z') repeat-x; } .h5_lb_controls div.h5_lb_progress_control div.progress_bar_time { position: absolute; margin: 11px 0 0 8px; height: 16px; border: 1px solid transparent; background: transparent; z-Index: 1003; display: none; } .progress_bar_time div.progress_bar_time_line { position: absolute; top: -9px; margin: 0 0 0 -9px; width: 0; height: 0; display: none; font-size: 0; line-height: 0%; border-top: 10px solid #fff; border-bottom: 10px solid transparent; border-left: 10px solid transparent; border-right: 10px solid transparent; } .h5_lb_controls_below .progress_bar_time div.progress_bar_time_line { margin: 0 0 0 -10px !important; } .progress_bar_time div.progress_bar_time_txt { position: absolute; top: -28px; margin: 0 0 0 -5px; padding: 3px 5px; height: 12px; color: #fff; border: 1px solid #fff; font: 10px/1.231 "bitstream vera sans", "lucida grande", verdana; font-weight: bold; display: none; /* Border Radius */ -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAASAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAG9KJwf/8QAFhABAQEAAAAAAAAAAAAAAAAAEgAQ/9oACAEBAAEFAlLP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABPyFP/9oADAMBAAIAAwAAABDDz//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8QP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EABgQAAIDAAAAAAAAAAAAAAAAAABxARFR/9oACAEBAAE/EGGLnT//2Q==') repeat-x; } .h5_lb_controls_below .progress_bar_time div.progress_bar_time_txt { margin: 0 0 0 -4px !important; } .progress_bar_time:hover .progress_bar_time_line, .progress_bar_time:hover .progress_bar_time_txt {z-Index: 1004; display: block;} /*****************************/ /* Timer Control: Inner Item */ .h5_lb_timer_control div {margin: 12px 0 0; font: 11px/1.231 "bitstream vera sans", "lucida grande", verdana; font-weight: bold; text-align: center; color: #fff;} /*************************/ /* Volume Control: Items */ /* Mute Items */ .h5_lb_controls div.h5_lb_volume_control .h5_lb_mute div {position: absolute;} .h5_lb_mute div:nth-child(1), .h5_lb_mute div:nth-child(2), .h5_lb_mute div:nth-child(3), .h5_lb_mute div:nth-child(4) { border-width: 1px 0 1px 1px; border-color: #fff; border-style: solid; cursor: pointer; } .h5_lb_mute div:nth-child(2), .h5_lb_mute div:nth-child(3), .h5_lb_mute div:nth-child(4) { /* Border Radius */ -moz-border-radius: 8px 0 0 8px; -webkit-border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px; } .h5_lb_mute div:nth-child(1) {margin: 15px 0 0 4px; height: 5px; width: 4px; z-index: 1001;} .h5_lb_mute div:nth-child(2) {margin: 13px 0 0 8px; height: 9px; width: 2px; z-index: 1000;} .h5_lb_mute div:nth-child(3) {margin: 12px 0 0 10px; height: 11px; width: 2px; border-width: 1px 0;} .h5_lb_mute div:nth-child(4) {margin: 11px 0 0 11px; height: 13px; width: 1px; border-width: 1px 1px 1px 0;} .h5_lb_mute div:nth-child(5), .h5_lb_mute div:nth-child(6), .h5_lb_mute div:nth-child(7) { border-top: 1px solid #fff; border-right: 1px solid #fff; border-bottom: 1px solid #fff; /* Border Radius */ -moz-border-radius: 0 8px 8px 0; -webkit-border-radius: 0 8px 8px 0; border-radius: 0 8px 8px 0; } .h5_lb_mute div:nth-child(5) {margin: 17px 0 0 14px; height: 2px; width: 1px;} .h5_lb_mute div:nth-child(6) {margin: 15px 0 0 15px; height: 6px; width: 2px;} .h5_lb_mute div:nth-child(7) {margin: 13px 0 0 16px; height: 10px; width: 3px;} .h5_lb_mute div:nth-child(1).is { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAFAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAX/xAAUAQEAAAAAAAAAAAAAAAAAAAAE/9oADAMBAAIQAxAAAAGeHB//xAAWEAADAAAAAAAAAAAAAAAAAAAAARP/2gAIAQEAAQUCoz//xAAWEQADAAAAAAAAAAAAAAAAAAAAARH/2gAIAQMBAT8BiP/EABYRAAMAAAAAAAAAAAAAAAAAAAABEv/aAAgBAgEBPwGmf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQ/wD/xAAVEQEBAAAAAAAAAAAAAAAAAAAAYf/aAAgBAwEBPxCT/8QAFREBAQAAAAAAAAAAAAAAAAAAAGH/2gAIAQIBAT8Qo//EABYQAAMAAAAAAAAAAAAAAAAAAABhof/aAAgBAQABPxB9P//Z') repeat-x; } .h5_lb_mute div:nth-child(1).isnot { /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAFAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAP/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGoP//EABYQAAMAAAAAAAAAAAAAAAAAAAABE//aAAgBAQABBQKjP//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQA//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABYQAAMAAAAAAAAAAAAAAAAAAAAR8P/aAAgBAQABPxCGf//Z') repeat-x; } .h5_lb_mute div:nth-child(2).is { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAHAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAE/9oADAMBAAIQAxAAAAGUOD//xAAWEAADAAAAAAAAAAAAAAAAAAAAAhL/2gAIAQEAAQUCtj//xAAWEQADAAAAAAAAAAAAAAAAAAAAARL/2gAIAQMBAT8BlH//xAAWEQADAAAAAAAAAAAAAAAAAAAAARL/2gAIAQIBAT8Bpn//xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAY/An//xAAVEAEBAAAAAAAAAAAAAAAAAAAAcf/aAAgBAQABPyGj/9oADAMBAAIAAwAAABD/AP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8QX//EABYQAAMAAAAAAAAAAAAAAAAAAAAB8P/aAAgBAQABPxCDP//Z') repeat-x; } .h5_lb_mute div:nth-child(2).isnot { /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAHAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGoH//EABYQAAMAAAAAAAAAAAAAAAAAAAABEv/aAAgBAQABBQKmf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQA//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABYQAAMAAAAAAAAAAAAAAAAAAABxkf/aAAgBAQABPxB1P//Z') repeat-x; } .h5_lb_mute div:nth-child(3).is { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAJAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAME/8QAFAEBAAAAAAAAAAAAAAAAAAAABP/aAAwDAQACEAMQAAABzJHh/8QAFRABAQAAAAAAAAAAAAAAAAAAEBP/2gAIAQEAAQUCqf/EABURAQEAAAAAAAAAAAAAAAAAAAAS/9oACAEDAQE/AYf/xAAWEQADAAAAAAAAAAAAAAAAAAAAARL/2gAIAQIBAT8Btn//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAWEAADAAAAAAAAAAAAAAAAAAAQEVH/2gAIAQEAAT8haj//2gAMAwEAAgADAAAAEAf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAwEBPxCH/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPxBf/8QAFhAAAwAAAAAAAAAAAAAAAAAAEGGR/9oACAEBAAE/EHaP/9k=') repeat-x; } .h5_lb_mute div:nth-child(3).isnot { /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAJAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAME/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB1Ij/xAAVEAEBAAAAAAAAAAAAAAAAAAAQE//aAAgBAQABBQKh/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwF//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwI//8QAFRABAQAAAAAAAAAAAAAAAAAAEHH/2gAIAQEAAT8hs//aAAwDAQACAAMAAAAQ8//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABcQAAMBAAAAAAAAAAAAAAAAABARUZH/2gAIAQEAAT8QatH/2Q==') repeat-x; } .h5_lb_mute div:nth-child(4).is { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAF/9oADAMBAAIQAxAAAAGdEQP/AP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFArP/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEv/aAAgBAwEBPwGX/8QAFREBAQAAAAAAAAAAAAAAAAAAABL/2gAIAQIBAT8Bt//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8CP//EABYQAQEBAAAAAAAAAAAAAAAAAAABEf/aAAgBAQABPyE2v//aAAwDAQACAAMAAAAQD//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EJf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPxCn/8QAFhABAQEAAAAAAAAAAAAAAAAAAGFx/9oACAEBAAE/ENrP/9k=') repeat-x; } .h5_lb_mute div:nth-child(4).isnot { /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGtIP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFAqP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AX//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AX//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAWEAEBAQAAAAAAAAAAAAAAAAAAARH/2gAIAQEAAT8hdr//2gAMAwEAAgADAAAAEMP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/EH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/EH//xAAWEAEBAQAAAAAAAAAAAAAAAAAAYXH/2gAIAQEAAT8Q2o//2Q==') repeat-x; } /* Volume Items */ .h5_lb_controls div.h5_lb_volume_control .h5_lb_volume {margin: 0 0 0 28px;} .h5_lb_controls div.h5_lb_volume_control .h5_lb_volume div {position: relative; margin: 10px 1px 0 0; width: 4px; height: 18px; float: left; background: #3e3e3e; cursor: pointer;} .h5_lb_controls div.h5_lb_volume_control .h5_lb_volume div:hover {margin: 8px 1px 0 0; height: 20px;} .h5_lb_controls div.h5_lb_volume_control .h5_lb_volume div.is { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAQAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAME/8QAFAEBAAAAAAAAAAAAAAAAAAAABf/aAAwDAQACEAMQAAABkxEjv//EABUQAQEAAAAAAAAAAAAAAAAAAAAS/9oACAEBAAEFAqU//8QAFREBAQAAAAAAAAAAAAAAAAAAABL/2gAIAQMBAT8Bh//EABURAQEAAAAAAAAAAAAAAAAAAAAS/9oACAECAQE/Abf/xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAE/IT//2gAMAwEAAgADAAAAEMf/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/ED//xAAVEAEBAAAAAAAAAAAAAAAAAAAAcf/aAAgBAQABPxClP//Z') repeat-x; } .h5_lb_controls div.h5_lb_volume_control .h5_lb_volume div.isnot { /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAQAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAG9GP/EABUQAQEAAAAAAAAAAAAAAAAAAAAS/9oACAEBAAEFAqU//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwF//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwI//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABPyEP/9oADAMBAAIAAwAAABAD/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPxB//8QAFRABAQAAAAAAAAAAAAAAAAAAAHH/2gAIAQEAAT8Qtb//2Q==') repeat-x; } /*********************************/ /* Playback Control: Inner Items */ .h5_lb_controls div.h5_lb_playback_control div {text-align: center !important; margin: 11px 0 0; font: 12px/1.231 arial, helvetica, sans-serif; font-weight: bold; color: #fff;} .h5_lb_controls div.h5_lb_playback_control div.playback_nav { position: absolute; width: 38px; margin: 0 0 3px -1px; padding: 0; display: none; border: 1px solid #949494; border-bottom: 0; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.8 opacity */ background: rgba(100, 100, 100, 0.8); } .h5_lb_controls div.h5_lb_playback_control:hover div.playback_nav {display: block; padding: 2px;} .h5_lb_controls div.h5_lb_playback_control .playback_nav div {color: #fff; font-weight: normal; font: 0.9em arial, helvetica, sans-serif; height: 15px; margin: 0; padding: 0 2px;} .h5_lb_controls div.h5_lb_playback_control .playback_nav div:hover {color: #3e3e3e; background: #f1f1f1; display: block; z-index: 1001;} .h5_lb_fullscreen .h5_lb_controls div.h5_lb_playback_control div.playback_nav { /* Background - only RGB */ background: #646464; } /*********************************/ /* Subtitle Control: Inner Items */ .h5_lb_controls div.h5_lb_subtitle_control div {text-align: center !important; padding: 11px 0 0; font: 12px/1.231 arial, helvetica, sans-serif; font-weight: bold; color: #fff;} .h5_lb_controls div.h5_lb_subtitle_control div.subtitle_nav { position: absolute; width: 52px; margin: 0 0 3px -3px; padding: 0; display: none; border: 1px solid #949494; border-bottom: 0; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.8 opacity */ background: rgba(100, 100, 100, 0.8); } .h5_lb_controls div.h5_lb_subtitle_control:hover div.subtitle_nav {display: block; padding: 2px;} .h5_lb_controls div.h5_lb_subtitle_control .subtitle_nav div {color: #fff; font-weight: normal; font: 0.9em arial, helvetica, sans-serif; height: 15px; padding: 0 2px;} .h5_lb_controls div.h5_lb_subtitle_control .subtitle_nav div:hover {color: #3e3e3e; background: #f1f1f1; display: block; z-index: 1001;} .h5_lb_fullscreen .h5_lb_controls div.h5_lb_subtitle_control div.subtitle_nav { /* Background - only RGB */ background: #646464; } /*********************************/ /* Sources Control: Inner Items */ .h5_lb_controls div.h5_lb_sources_control div {text-align: center !important; padding: 11px 0 0; font: 12px/1.231 arial, helvetica, sans-serif; font-weight: bold; color: #fff;} .h5_lb_controls div.h5_lb_sources_control div.sources_nav { position: absolute; width: 52px; margin: 0 0 3px -3px; padding: 0; display: none; border: 1px solid #949494; border-bottom: 0; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.8 opacity */ background: rgba(100, 100, 100, 0.8); } .h5_lb_controls div.h5_lb_sources_control:hover div.sources_nav {display: block; padding: 2px;} .h5_lb_controls div.h5_lb_sources_control div.sources_nav div {color: #fff; line-height: normal !important; vertical-align: bottom !important; font-weight: normal !important; font: 11px/1.231 arial, helvetica, sans-serif !important; height: 17px; padding: 0 2px;} .h5_lb_controls div.h5_lb_sources_control div.sources_nav div span {line-height: normal; vertical-align: text-top; font-weight: lighter; font: 8px/1.231 arial, helvetica, sans-serif !important; padding: 0;} .h5_lb_controls div.h5_lb_sources_control .sources_nav div:hover {color: #3e3e3e; background: #f1f1f1; display: block; z-index: 1001;} .h5_lb_fullscreen .h5_lb_controls div.h5_lb_sources_control div.sources_nav { /* Background - only RGB */ background: #646464; } /***********************************/ /* Fullscreen Control: Inner Items */ .h5_lb_controls div.h5_lb_fullscreen_control div { position: absolute; border: 1px solid #fff; cursor: pointer; /* Radius */ /*-moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;*/ } .h5_lb_controls div.h5_lb_fullscreen_control div.h5_lb_fullscreen_control_fs1 { margin: 14px 0 0 12px; height: 9px; width: 14px; z-index: 1000; /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAKAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGtEP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFArP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AX//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AX//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAE/IT//2gAMAwEAAgADAAAAEDP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/EH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/EH//xAAYEAACAwAAAAAAAAAAAAAAAAAAARFRcf/aAAgBAQABPxDZLtn/2Q==') repeat-x; } .h5_lb_controls div.h5_lb_fullscreen_control div.h5_lb_fullscreen_control_fs2 { margin: 10px 0 0 8px; height: 16px; width: 24px; z-index: 1001; display: none; /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAAWAAEDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAQC/8QAFQEBAQAAAAAAAAAAAAAAAAAAAwX/2gAMAwEAAhADEAAAAcJVObMBb//EABUQAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEBAAEFAqqv/8QAFREBAQAAAAAAAAAAAAAAAAAAEBL/2gAIAQMBAT8Bk//EABURAQEAAAAAAAAAAAAAAAAAABAS/9oACAECAQE/AaP/xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/An//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAE/IX//2gAMAwEAAgADAAAAEPQP/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oACAEDAQE/EDI//8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oACAECAQE/EHa//8QAFxAAAwEAAAAAAAAAAAAAAAAAABARcf/aAAgBAQABPxDa0f/Z') repeat-x; } .h5_lb_controls div.h5_lb_fullscreen_control:hover div.h5_lb_fullscreen_control_fs2 {display: block;} /*********************/ /* In-video Subtitle */ .h5_lb_player .h5_lb_subtitles { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin-top: 0; margin-bottom: 0; color: #fff; text-align: center; display: none; z-index: 1000; } .h5_lb_player .h5_lb_subtitles .plain { display: inline-block; position: absolute; top: auto; right: -1px; bottom: 44px; left: 1px; margin: 0; padding: 0; z-index: 1000; } .h5_lb_player .h5_lb_subtitles .vtt { position: absolute; font: 12px/1.231 arial, helvetica, sans-serif !important; } .h5_lb_player .h5_lb_subtitles .vtt div { display: inline-block; position: relative !important; } .h5_lb_player .h5_lb_subtitles .plain div { display: inline-block; padding: 5px 10px; background: rgba(0,0,0,0.5); white-space: normal; } .h5_lb_fullscreen .h5_lb_subtitles .plain {font: 22px/1.231 arial, helvetica, sans-serif;} .h5_lb_smallscreen .h5_lb_subtitles .plain {font: 12px/1.231 arial, helvetica, sans-serif;} /***********************/ /* Embedding Code/Link */ .h5_lb_player .h5_lb_embed { position: absolute; top: 5px; right: 5px; margin: 5px; width: auto; height: 40px; text-align: right; z-index: 1001; } .h5_lb_fullscreen .h5_lb_embed { visibility: hidden; } .h5_lb_player .h5_lb_embed .h5_lb_embed_inner { margin: 0 0 3px auto; padding: 5px; border: 1px solid #949494; color: #fff; text-align: center !important; width: auto; height: auto; line-height: normal !important; font-size: 11px !important; font-family: arial, helvetica, sans-serif !important; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.7 opacity */ background: rgba(100, 100, 100, 0.7); } .h5_lb_player .h5_lb_embed .h5_lb_embed_inner:hover { /* Background RGBa with 0.9 opacity */ background: rgba(100, 100, 100, 0.9); } .h5_lb_player div.h5_lb_embed_code { position: absolute; top: 15px; right: 20px; bottom: 55px; left: 20px; text-align: center; color: #fff; z-index: 1005; cursor: default; display: none; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.9 opacity */ background: rgba(100, 100, 100, 0.9); } .h5_lb_player div.h5_lb_embed_code textarea.h5_lb_embed_code_user { margin: 10px 20px 5px 20px; padding: 5px; width: 90%; height: 175px; line-height: normal !important; vertical-align: baseline; font-size: 12px !important; font-family: arial, helvetica, sans-serif !important; background: #fff; color: #000; border: 1px solid #323232; overflow: auto; cursor: default; } .h5_lb_player div.h5_lb_embed_code div.h5_lb_embed_code_txt { line-height: normal !important; vertical-align: baseline; font-size: 10px !important; font-family: arial, helvetica, sans-serif !important; cursor: default; text-align: center !important; } .h5_lb_player div.h5_lb_embed_code button.h5_lb_embed_code_btn { position: absolute; bottom: 0; left: 50%; margin: 5px -35px 5px; padding: 2px 5px; width: 70px; } /*********************/ /* Info Control Item */ .h5_lb_controls div.h5_lb_info_control {display: block; width: 40px; cursor: pointer;} .h5_lb_controls div.h5_lb_info_control div { text-align: center !important; height: 30px; margin: 12px 0 0 4px; /* Background - Gradients - "LEANBACK PLAYER" LOGO */ background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAANCAYAAABVRWWUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKdQAACnUBSiXd/QAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAACVSURBVDiNvZJBCsMgEEX/lIB3aY7o0fRKLqM1Ln4XbRpbKDhKfDAgMt+nOCCJqppxzqn6a88NnZR914dEAKBf+si5N9ovTSnNl25xmy+NMepD5JeUrz0213pfVT7v/cezHAsAkPd0tRBCUEmrfgrJQ9pu7IQkSymQ03m++ELEWjtfCgxM7wjL7y1yzgQAY8zwH/876wnyF8XX1PkYhQAAAABJRU5ErkJggg==') no-repeat; } .leanback-player-audio .h5_lb_info_content { width: 500px !important; height: 240px !important; top: 50% !important; right: 50% !important; bottom: auto !important; left: 50% !important; margin: -120px 0 0 -250px !important; } .h5_lb_player .h5_lb_info_content { position: absolute; top: 40px; right: 40px; bottom: 45px; left: 40px; margin: -20px 0 0 -20px; text-align: center; color: #fff; cursor: default; display: none; z-index: 1003; } .h5_lb_fullscreen .h5_lb_info_content { position: absolute; top: 25%; right: 22%; bottom: 25%; left: 22%; margin: -20px 0 0 -20px; text-align: center; color: #fff; cursor: default; display: none; z-index: 1003; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_menu { position: absolute; top: 0; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_menu .entry { position: relative; top: 0; left: 20px; margin-left: -6px; padding: 4px 6px; min-width: 65px; width: auto; height: 14px; font: 12px/1.231 arial, helvetica, sans-serif; font-weight: bold; border: 1px solid #bababa; border-bottom: 1px solid #949494; cursor: pointer; display: block; float: left; z-index: 1003; /* Radius */ -webkit-border-top-left-radius: 8px; -moz-border-radius-topleft: 8px; border-top-left-radius: 8px; /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGtIP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFAqP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AX//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AX//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAWEAEBAQAAAAAAAAAAAAAAAAAAARH/2gAIAQEAAT8hdr//2gAMAwEAAgADAAAAEMP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/EH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/EH//xAAWEAEBAQAAAAAAAAAAAAAAAAAAYXH/2gAIAQEAAT8Q2o//2Q==') repeat-x; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_menu .entry:last-child { -webkit-border-top-right-radius: 8px; -moz-border-radius-topright: 8px; border-top-right-radius: 8px; padding: 4px 6px; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_menu .entry_active{ border-bottom: 1px solid #2b5880; /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAF/9oADAMBAAIQAxAAAAGdEQP/AP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFArP/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEv/aAAgBAwEBPwGX/8QAFREBAQAAAAAAAAAAAAAAAAAAABL/2gAIAQIBAT8Bt//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8CP//EABYQAQEBAAAAAAAAAAAAAAAAAAABEf/aAAgBAQABPyE2v//aAAwDAQACAAMAAAAQD//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EJf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPxCn/8QAFhABAQEAAAAAAAAAAAAAAAAAAGFx/9oACAEBAAE/ENrP/9k=') repeat-x; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt { position: absolute; top: 23px; bottom: 0; padding: 20px 0 35px 20px; width: 100%; text-align: left; line-height: 14px !important; font: 12px/1.231 arial, helvetica, sans-serif; border: 1px solid #949494; display: block; clear: both; z-index: 1002; /* Background Fallback for web browsers doesn't support RGBa */ background: #646464; /* Background RGBa with 0.9 opacity */ background: rgba(100, 100, 100, 0.9); /* Disable selection */ -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; user-select: none; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt div.info_txt { position: relative; margin: 0 20px 0 0 !important; padding: 0 !important; overflow-y: auto; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt div a { color: #fff; font: 10px/1.231 arial, helvetica, sans-serif; text-decoration: none; cursor: pointer; border-bottom: 1px dotted #fff; color: #fff; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt div ul {margin: 5px 0 0; padding: 0 18px 0;} .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt div li {font: 10px/1.231 arial, helvetica, sans-serif; line-height: 14px !important;} .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt button.keys {font: 10px/1.231 "Arial Unicode MS", Arial, sans-serif; margin: 1px; padding: 0 2px 2px 2px; color: #050; text-shadow: 0 0 0; vertical-align: middle;} .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt_shortcuts {padding-bottom: 40px;} .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt button.h5_lb_info_content_btn { position: absolute; bottom: 5px; right: 5px; margin: 0; padding: 2px 5px; width: 70px; z-index: 1003; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt .headline { margin: 0 0 0 0; padding: 10px 10px 5px 10px; display: block; background: #323232; border-bottom: 1px solid #7a7a7a; font-size: 11px !important; font-weight: bold; /* Radius */ -webkit-border-top-right-radius: 8px; -webkit-border-top-left-radius: 8px; -moz-border-radius-topright: 8px; -moz-border-radius-topleft: 8px; border-top-right-radius: 8px; border-top-left-radius: 8px; } .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt .about_txt, .h5_lb_player .h5_lb_info_content .h5_lb_info_content_txt .shortcuts_txt { color: #fff; height: 100%; font-size: 10px !important; font-family: arial, helvetica, sans-serif !important; } .about_txt div, .shortcuts_txt div { margin: 0; padding: 5px 10px; background: #323232; /* Radius */ -webkit-border-bottom-right-radius: 8px; -webkit-border-bottom-left-radius: 8px; -moz-border-radius-bottomright: 8px; -moz-border-radius-bottomleft: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; } .about_txt div { padding: 10px; } .h5_lb_info_content_txt ul{ list-style-type: circle !important; } /*******************/ /* Default Content */ .h5_lb_player .btn { color: #fff; line-height: normal !important; vertical-align: baseline; font-size: 10px !important; font-family: arial, helvetica, sans-serif !important; border-top: 1px solid #eaeaea; border-right: 1px solid #eaeaea; border-bottom: 1px solid #bababa; border-left: 1px solid #bababa; cursor: pointer; /* Radius */ -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; /* Background */ background: #7a7a7a; /* Background - Gradients */ background: #7a7a7a url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGtIP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFAqP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AX//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AX//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/Aj//xAAWEAEBAQAAAAAAAAAAAAAAAAAAARH/2gAIAQEAAT8hdr//2gAMAwEAAgADAAAAEMP/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/EH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/EH//xAAWEAEBAQAAAAAAAAAAAAAAAAAAYXH/2gAIAQEAAT8Q2o//2Q==') repeat-x; } .h5_lb_player .btn:hover { /* Background */ background: #2b5880; /* Background - Gradients */ background: #2b5880 url('data:image/png;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCAALAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAT/xAAUAQEAAAAAAAAAAAAAAAAAAAAF/9oADAMBAAIQAxAAAAGdEQP/AP/EABUQAQEAAAAAAAAAAAAAAAAAABAS/9oACAEBAAEFArP/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEv/aAAgBAwEBPwGX/8QAFREBAQAAAAAAAAAAAAAAAAAAABL/2gAIAQIBAT8Bt//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8CP//EABYQAQEBAAAAAAAAAAAAAAAAAAABEf/aAAgBAQABPyE2v//aAAwDAQACAAMAAAAQD//EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EJf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPxCn/8QAFhABAQEAAAAAAAAAAAAAAAAAAGFx/9oACAEBAAE/ENrP/9k=') repeat-x; } /*******************/ /* Hacking Content */ .elem_visible {display: block !important;} .elem_visibility_hidden {visibility: hidden !important;} .h5_lb_fullscreen_fix {margin: 0 !important;} /****************************************/ /* CSS Loaded Test - do not change this */ .h5_lb_css_loaded_test {display: none;}
{ "pile_set_name": "Github" }
# # Copyright (C) 2012 Samsung Electronics # Lukasz Majewski <l.majewski@samsung.com> # # See file CREDITS for list of people who contributed to this # project. # # 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 $(TOPDIR)/config.mk LIB = $(obj)libsamsung.o COBJS-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o SRCS := $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) $(LIB): $(obj).depend $(OBJS) $(call cmd_link_o_target, $(OBJS)) ######################################################################### # defines $(obj).depend target include $(SRCTREE)/rules.mk sinclude $(obj).depend #########################################################################
{ "pile_set_name": "Github" }
/* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ // It turns out that some (most?) JavaScript engines don't self-host // `Array.prototype.sort`. This makes sense because C++ will likely remain // faster than JS when doing raw CPU-intensive sorting. However, when using a // custom comparator function, calling back and forth between the VM's C++ and // JIT'd JS is rather slow *and* loses JIT type information, resulting in // worse generated code for the comparator function than would be optimal. In // fact, when sorting with a comparator, these costs outweigh the benefits of // sorting in C++. By using our own JS-implemented Quick Sort (below), we get // a ~3500ms mean speed-up in `bench/bench.html`. /** * Swap the elements indexed by `x` and `y` in the array `ary`. * * @param {Array} ary * The array. * @param {Number} x * The index of the first item. * @param {Number} y * The index of the second item. */ function swap(ary, x, y) { var temp = ary[x]; ary[x] = ary[y]; ary[y] = temp; } /** * Returns a random integer within the range `low .. high` inclusive. * * @param {Number} low * The lower bound on the range. * @param {Number} high * The upper bound on the range. */ function randomIntInRange(low, high) { return Math.round(low + (Math.random() * (high - low))); } /** * The Quick Sort algorithm. * * @param {Array} ary * An array to sort. * @param {function} comparator * Function to use to compare two items. * @param {Number} p * Start index of the array * @param {Number} r * End index of the array */ function doQuickSort(ary, comparator, p, r) { // If our lower bound is less than our upper bound, we (1) partition the // array into two pieces and (2) recurse on each half. If it is not, this is // the empty array and our base case. if (p < r) { // (1) Partitioning. // // The partitioning chooses a pivot between `p` and `r` and moves all // elements that are less than or equal to the pivot to the before it, and // all the elements that are greater than it after it. The effect is that // once partition is done, the pivot is in the exact place it will be when // the array is put in sorted order, and it will not need to be moved // again. This runs in O(n) time. // Always choose a random pivot so that an input array which is reverse // sorted does not cause O(n^2) running time. var pivotIndex = randomIntInRange(p, r); var i = p - 1; swap(ary, pivotIndex, r); var pivot = ary[r]; // Immediately after `j` is incremented in this loop, the following hold // true: // // * Every element in `ary[p .. i]` is less than or equal to the pivot. // // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. for (var j = p; j < r; j++) { if (comparator(ary[j], pivot) <= 0) { i += 1; swap(ary, i, j); } } swap(ary, i + 1, j); var q = i + 1; // (2) Recurse on each half. doQuickSort(ary, comparator, p, q - 1); doQuickSort(ary, comparator, q + 1, r); } } /** * Sort the given array in-place with the given comparator function. * * @param {Array} ary * An array to sort. * @param {function} comparator * Function to use to compare two items. */ exports.quickSort = function (ary, comparator) { doQuickSort(ary, comparator, 0, ary.length - 1); };
{ "pile_set_name": "Github" }
import Combine import PhotoAlbums import Photos import UIKit class AlbumCollectionViewDataSource: NSObject, UICollectionViewDataSource, UICollectionViewDataSourcePrefetching, PHPhotoLibraryChangeObserver { /// nil if deleted. private(set) var album: FetchedAlbum? var filter: VideoTypesFilter { get { settings.videoTypesFilter } set { settings.videoTypesFilter = newValue fetchAlbum() } } var isEmpty: Bool { album?.isEmpty ?? true } var albumDeletedHandler: (() -> ())? var albumChangedHandler: (() -> ())? var videosChangedHandler: ((PHFetchResultChangeDetails<PHAsset>?) -> ())? var imageOptions: PHImageManager.ImageOptions { didSet { guard imageOptions != oldValue else { return } imageManager.stopCachingImagesForAllAssets() } } var isAuthorizationLimited: Bool { if #available(iOS 14, *) { return PHPhotoLibrary.authorizationStatus(for: .readWrite) == .limited } else { return false } } var settings: UserDefaults let photoLibrary: PHPhotoLibrary private let cellProvider: (IndexPath, PHAsset) -> (UICollectionViewCell) private let imageManager: PHCachingImageManager private let filterQueue: DispatchQueue init(album: FetchedAlbum?, photoLibrary: PHPhotoLibrary = .shared(), imageManager: PHCachingImageManager = .init(), imageOptions: PHImageManager.ImageOptions = .init(size: .zero, mode: .aspectFill, requestOptions: .default()), settings: UserDefaults = .standard, filterQueue: DispatchQueue = .init(label: "", qos: .userInteractive, attributes: []), cellProvider: @escaping (IndexPath, PHAsset) -> (UICollectionViewCell)) { self.album = album self.photoLibrary = photoLibrary self.imageManager = imageManager self.imageOptions = imageOptions self.settings = settings self.filterQueue = filterQueue self.cellProvider = cellProvider super.init() photoLibrary.register(self) } deinit { photoLibrary.unregisterChangeObserver(self) imageManager.stopCachingImagesForAllAssets() } /// Precondition: `album != nil`. func video(at indexPath: IndexPath) -> PHAsset { album!.fetchResult.object(at: indexPath.item) } func thumbnail(for video: PHAsset, completionHandler: @escaping (UIImage?, PHImageManager.Info) -> ()) -> Cancellable { imageManager.requestImage(for: video, options: imageOptions, completionHandler: completionHandler) } func indexPath(of video: PHAsset) -> IndexPath? { guard let index = album?.fetchResult.index(of: video) else { return nil } return IndexPath(item: index, section: 0) } func toggleFavorite(for video: PHAsset) { photoLibrary.performChanges({ PHAssetChangeRequest(for: video).isFavorite = !video.isFavorite }, completionHandler: nil) } func delete(_ video: PHAsset) { photoLibrary.performChanges({ PHAssetChangeRequest.deleteAssets([video] as NSArray) }, completionHandler: nil) } private func fetchAlbum() { guard let album = album?.assetCollection else { return } let filter = self.filter filterQueue.async { [weak self] in let fetchOptions = PHFetchOptions.assets(forAlbumType: album.assetCollectionType, videoFilter: filter) let filteredAlbum = FetchedAlbum.fetchUpdate(for: album, assetFetchOptions: fetchOptions) DispatchQueue.main.async { self?.album = filteredAlbum self?.videosChangedHandler?(nil) } } } private func safeVideos(at indexPaths: [IndexPath]) -> [PHAsset] { guard let fetchResult = album?.fetchResult else { return [] } let indexes = IndexSet(indexPaths.map { $0.item }) let safeIndexes = indexes.filteredIndexSet { $0 < fetchResult.count } return fetchResult.objects(at: safeIndexes) } } extension AlbumCollectionViewDataSource { // MARK: UICollectionViewDataSource func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { album?.count ?? 0 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { cellProvider(indexPath, video(at: indexPath)) } // MARK: UICollectionViewDataSourcePrefetching func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { // Index paths might not exist anymore in the model. let videos = safeVideos(at: indexPaths) imageManager.startCachingImages(for: videos, targetSize: imageOptions.size, contentMode: imageOptions.mode, options: imageOptions.requestOptions) } func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) { let videos = safeVideos(at: indexPaths) imageManager.stopCachingImages(for: videos, targetSize: imageOptions.size, contentMode: imageOptions.mode, options: imageOptions.requestOptions) } } // MARK: - PHPhotoLibraryChangeObserver extension AlbumCollectionViewDataSource { func photoLibraryDidChange(_ change: PHChange) { DispatchQueue.main.async { [weak self] in self?.updateAlbum(with: change) } } private func updateAlbum(with change: PHChange) { guard let oldAlbum = album, let changeDetails = change.changeDetails(for: oldAlbum) else { return } self.album = changeDetails.albumAfterChanges guard changeDetails.albumAfterChanges != nil else { imageManager.stopCachingImagesForAllAssets() albumDeletedHandler?() return } if changeDetails.assetCollectionChanges != nil { albumChangedHandler?() } if let videoChange = changeDetails.fetchResultChanges { imageManager.stopCachingImagesForAllAssets() videosChangedHandler?(videoChange) } } }
{ "pile_set_name": "Github" }
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->check()) { if ($guard === 'admin') { return redirect(route('admin::index')); } elseif ($guard === 'member') { return redirect('/'); } } return $next($request); } }
{ "pile_set_name": "Github" }
#if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" #else #import <React/RCTBridgeModule.h> #endif @interface RNKakaoLogins : NSObject <RCTBridgeModule> @end
{ "pile_set_name": "Github" }
require 'tzinfo/timezone_definition' module TZInfo module Definitions module America module Inuvik include TimezoneDefinition timezone 'America/Inuvik' do |tz| tz.offset :o0, 0, 0, :zzz tz.offset :o1, -28800, 0, :PST tz.offset :o2, -28800, 7200, :PDDT tz.offset :o3, -25200, 0, :MST tz.offset :o4, -25200, 3600, :MDT tz.transition 1953, 1, :o1, 4868757, 2 tz.transition 1965, 4, :o2, 14633255, 6 tz.transition 1965, 10, :o1, 14634389, 6 tz.transition 1979, 4, :o3, 294228000 tz.transition 1980, 4, :o4, 325674000 tz.transition 1980, 10, :o3, 341395200 tz.transition 1981, 4, :o4, 357123600 tz.transition 1981, 10, :o3, 372844800 tz.transition 1982, 4, :o4, 388573200 tz.transition 1982, 10, :o3, 404899200 tz.transition 1983, 4, :o4, 420022800 tz.transition 1983, 10, :o3, 436348800 tz.transition 1984, 4, :o4, 452077200 tz.transition 1984, 10, :o3, 467798400 tz.transition 1985, 4, :o4, 483526800 tz.transition 1985, 10, :o3, 499248000 tz.transition 1986, 4, :o4, 514976400 tz.transition 1986, 10, :o3, 530697600 tz.transition 1987, 4, :o4, 544611600 tz.transition 1987, 10, :o3, 562147200 tz.transition 1988, 4, :o4, 576061200 tz.transition 1988, 10, :o3, 594201600 tz.transition 1989, 4, :o4, 607510800 tz.transition 1989, 10, :o3, 625651200 tz.transition 1990, 4, :o4, 638960400 tz.transition 1990, 10, :o3, 657100800 tz.transition 1991, 4, :o4, 671014800 tz.transition 1991, 10, :o3, 688550400 tz.transition 1992, 4, :o4, 702464400 tz.transition 1992, 10, :o3, 720000000 tz.transition 1993, 4, :o4, 733914000 tz.transition 1993, 10, :o3, 752054400 tz.transition 1994, 4, :o4, 765363600 tz.transition 1994, 10, :o3, 783504000 tz.transition 1995, 4, :o4, 796813200 tz.transition 1995, 10, :o3, 814953600 tz.transition 1996, 4, :o4, 828867600 tz.transition 1996, 10, :o3, 846403200 tz.transition 1997, 4, :o4, 860317200 tz.transition 1997, 10, :o3, 877852800 tz.transition 1998, 4, :o4, 891766800 tz.transition 1998, 10, :o3, 909302400 tz.transition 1999, 4, :o4, 923216400 tz.transition 1999, 10, :o3, 941356800 tz.transition 2000, 4, :o4, 954666000 tz.transition 2000, 10, :o3, 972806400 tz.transition 2001, 4, :o4, 986115600 tz.transition 2001, 10, :o3, 1004256000 tz.transition 2002, 4, :o4, 1018170000 tz.transition 2002, 10, :o3, 1035705600 tz.transition 2003, 4, :o4, 1049619600 tz.transition 2003, 10, :o3, 1067155200 tz.transition 2004, 4, :o4, 1081069200 tz.transition 2004, 10, :o3, 1099209600 tz.transition 2005, 4, :o4, 1112518800 tz.transition 2005, 10, :o3, 1130659200 tz.transition 2006, 4, :o4, 1143968400 tz.transition 2006, 10, :o3, 1162108800 tz.transition 2007, 3, :o4, 1173603600 tz.transition 2007, 11, :o3, 1194163200 tz.transition 2008, 3, :o4, 1205053200 tz.transition 2008, 11, :o3, 1225612800 tz.transition 2009, 3, :o4, 1236502800 tz.transition 2009, 11, :o3, 1257062400 tz.transition 2010, 3, :o4, 1268557200 tz.transition 2010, 11, :o3, 1289116800 tz.transition 2011, 3, :o4, 1300006800 tz.transition 2011, 11, :o3, 1320566400 tz.transition 2012, 3, :o4, 1331456400 tz.transition 2012, 11, :o3, 1352016000 tz.transition 2013, 3, :o4, 1362906000 tz.transition 2013, 11, :o3, 1383465600 tz.transition 2014, 3, :o4, 1394355600 tz.transition 2014, 11, :o3, 1414915200 tz.transition 2015, 3, :o4, 1425805200 tz.transition 2015, 11, :o3, 1446364800 tz.transition 2016, 3, :o4, 1457859600 tz.transition 2016, 11, :o3, 1478419200 tz.transition 2017, 3, :o4, 1489309200 tz.transition 2017, 11, :o3, 1509868800 tz.transition 2018, 3, :o4, 1520758800 tz.transition 2018, 11, :o3, 1541318400 tz.transition 2019, 3, :o4, 1552208400 tz.transition 2019, 11, :o3, 1572768000 tz.transition 2020, 3, :o4, 1583658000 tz.transition 2020, 11, :o3, 1604217600 tz.transition 2021, 3, :o4, 1615712400 tz.transition 2021, 11, :o3, 1636272000 tz.transition 2022, 3, :o4, 1647162000 tz.transition 2022, 11, :o3, 1667721600 tz.transition 2023, 3, :o4, 1678611600 tz.transition 2023, 11, :o3, 1699171200 tz.transition 2024, 3, :o4, 1710061200 tz.transition 2024, 11, :o3, 1730620800 tz.transition 2025, 3, :o4, 1741510800 tz.transition 2025, 11, :o3, 1762070400 tz.transition 2026, 3, :o4, 1772960400 tz.transition 2026, 11, :o3, 1793520000 tz.transition 2027, 3, :o4, 1805014800 tz.transition 2027, 11, :o3, 1825574400 tz.transition 2028, 3, :o4, 1836464400 tz.transition 2028, 11, :o3, 1857024000 tz.transition 2029, 3, :o4, 1867914000 tz.transition 2029, 11, :o3, 1888473600 tz.transition 2030, 3, :o4, 1899363600 tz.transition 2030, 11, :o3, 1919923200 tz.transition 2031, 3, :o4, 1930813200 tz.transition 2031, 11, :o3, 1951372800 tz.transition 2032, 3, :o4, 1962867600 tz.transition 2032, 11, :o3, 1983427200 tz.transition 2033, 3, :o4, 1994317200 tz.transition 2033, 11, :o3, 2014876800 tz.transition 2034, 3, :o4, 2025766800 tz.transition 2034, 11, :o3, 2046326400 tz.transition 2035, 3, :o4, 2057216400 tz.transition 2035, 11, :o3, 2077776000 tz.transition 2036, 3, :o4, 2088666000 tz.transition 2036, 11, :o3, 2109225600 tz.transition 2037, 3, :o4, 2120115600 tz.transition 2037, 11, :o3, 2140675200 tz.transition 2038, 3, :o4, 19723975, 8 tz.transition 2038, 11, :o3, 14794409, 6 tz.transition 2039, 3, :o4, 19726887, 8 tz.transition 2039, 11, :o3, 14796593, 6 tz.transition 2040, 3, :o4, 19729799, 8 tz.transition 2040, 11, :o3, 14798777, 6 tz.transition 2041, 3, :o4, 19732711, 8 tz.transition 2041, 11, :o3, 14800961, 6 tz.transition 2042, 3, :o4, 19735623, 8 tz.transition 2042, 11, :o3, 14803145, 6 tz.transition 2043, 3, :o4, 19738535, 8 tz.transition 2043, 11, :o3, 14805329, 6 tz.transition 2044, 3, :o4, 19741503, 8 tz.transition 2044, 11, :o3, 14807555, 6 tz.transition 2045, 3, :o4, 19744415, 8 tz.transition 2045, 11, :o3, 14809739, 6 tz.transition 2046, 3, :o4, 19747327, 8 tz.transition 2046, 11, :o3, 14811923, 6 tz.transition 2047, 3, :o4, 19750239, 8 tz.transition 2047, 11, :o3, 14814107, 6 tz.transition 2048, 3, :o4, 19753151, 8 tz.transition 2048, 11, :o3, 14816291, 6 tz.transition 2049, 3, :o4, 19756119, 8 tz.transition 2049, 11, :o3, 14818517, 6 tz.transition 2050, 3, :o4, 19759031, 8 tz.transition 2050, 11, :o3, 14820701, 6 end end end end end
{ "pile_set_name": "Github" }
## Android视图系统:Android应用窗口Window 作者:[郭孝星](https://github.com/guoxiaoxing) 校对:[郭孝星](https://github.com/guoxiaoxing) 文章状态:已完成 **关于项目** > [BeesAndroid](https://github.com/BeesAndroid/BeesAndroid)项目旨在通过提供一系列的工具与方法,降低阅读Android系统源码的门槛,让更多的Android工程师理解Android系统,掌握Android系统。 **文章目录** - 一 窗口类型 - 二 窗口参数 - 三 窗口模式 - 四 窗口回调 - 五 窗口实现 **官方描述** > Abstract base class for a top-level window look and behavior policy. Window在Android是一个窗口的概念,日常开发中我们和它接触的不多,我们更多接触的是View,但是View都是通过Window来呈现的,Window是View的直接管理者。 而WindowManager承担者管理Window的责任。 ## 一 窗口类型 <img src="https://github.com/BeesAndroid/BeesAndroid/raw/master/art/principle/app/view/window_layer.png" width="250" height="500"/> Window在Android中有三种类型: - 应用Window:z-index在1~99之间,它往往对应着一个Activity。 - 子Window:z-index在1000~1999之间,它往往不能独立存在,需要依附在父Window上,例如Dialog等。 - 系统Window:z-index在2000~2999之间,它往往需要声明权限才能创建,例如Toast、状态栏、系统音量条、错误提示框都是系统Window。 >z-index是Android窗口的层级的概念,z-index越大的窗口越居于顶层, z-index对应着WindowManager.LayoutParams里的type参数,具体说来。 应用Window - public static final int FIRST_APPLICATION_WINDOW = 1;//1 - public static final int TYPE_BASE_APPLICATION = 1;//窗口的基础值,其他的窗口值要大于这个值 - public static final int TYPE_APPLICATION = 2;//普通的应用程序窗口类型 - public static final int TYPE_APPLICATION_STARTING = 3;//应用程序启动窗口类型,用于系统在应用程序窗口启动前显示的窗口。 - public static final int TYPE_DRAWN_APPLICATION = 4; - public static final int LAST_APPLICATION_WINDOW = 99;//2 子Window - public static final int FIRST_SUB_WINDOW = 1000;//子窗口类型初始值 - public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW; - public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW + 1; - public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW + 2; - public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW + 3; - public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW + 4; - public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = FIRST_SUB_WINDOW + 5; - public static final int LAST_SUB_WINDOW = 1999;//子窗口类型结束值 系统Window - public static final int FIRST_SYSTEM_WINDOW = 2000;//系统窗口类型初始值 - public static final int TYPE_STATUS_BAR = FIRST_SYSTEM_WINDOW;//系统状态栏窗口 - public static final int TYPE_SEARCH_BAR = FIRST_SYSTEM_WINDOW+1;//搜索条窗口 - public static final int TYPE_PHONE = FIRST_SYSTEM_WINDOW+2;//通话窗口 - public static final int TYPE_SYSTEM_ALERT = FIRST_SYSTEM_WINDOW+3;//系统ALERT窗口 - public static final int TYPE_KEYGUARD = FIRST_SYSTEM_WINDOW+4;//锁屏窗口 - public static final int TYPE_TOAST = FIRST_SYSTEM_WINDOW+5;//TOAST窗口 ## 二 窗口参数 在WindowManager里定义了一个LayoutParams内部类,它描述了窗口的参数信息,主要包括: - public int x:窗口x轴坐标 - public int y:窗口y轴坐标 - public int type:窗口类型 - public int flags:窗口属性 - public int softInputMode:输入法键盘模式 关于窗口属性,它控制着窗口的行为,举几个常见的: - FLAG_ALLOW_LOCK_WHILE_SCREEN_ON 只要窗口可见,就允许在开启状态的屏幕上锁屏 - FLAG_NOT_FOCUSABLE 窗口不能获得输入焦点,设置该标志的同时,FLAG_NOT_TOUCH_MODAL也会被设置 - FLAG_NOT_TOUCHABLE 窗口不接收任何触摸事件 - FLAG_NOT_TOUCH_MODAL 在该窗口区域外的触摸事件传递给其他的Window,而自己只会处理窗口区域内的触摸事件 - FLAG_KEEP_SCREEN_ON 只要窗口可见,屏幕就会一直亮着 - FLAG_LAYOUT_NO_LIMITS 允许窗口超过屏幕之外 - FLAG_FULLSCREEN 隐藏所有的屏幕装饰窗口,比如在游戏、播放器中的全屏显示 - FLAG_SHOW_WHEN_LOCKED 窗口可以在锁屏的窗口之上显示 - FLAG_IGNORE_CHEEK_PRESSES 当用户的脸贴近屏幕时(比如打电话),不会去响应此事件 - FLAG_TURN_SCREEN_ON 窗口显示时将屏幕点亮 关于窗口类型,它对应着窗口的层级,上面我们也提到过了。 它的构造函数也主要是针对这几个参数的。 ```java public static class LayoutParams extends ViewGroup.LayoutParams implements Parcelable { public LayoutParams() { super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); type = TYPE_APPLICATION; format = PixelFormat.OPAQUE; } public LayoutParams(int _type) { super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); type = _type; format = PixelFormat.OPAQUE; } public LayoutParams(int _type, int _flags) { super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); type = _type; flags = _flags; format = PixelFormat.OPAQUE; } public LayoutParams(int _type, int _flags, int _format) { super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); type = _type; flags = _flags; format = _format; } public LayoutParams(int w, int h, int _type, int _flags, int _format) { super(w, h); type = _type; flags = _flags; format = _format; } public LayoutParams(int w, int h, int xpos, int ypos, int _type, int _flags, int _format) { super(w, h); x = xpos; y = ypos; type = _type; flags = _flags; format = _format; } } ``` ## 三 窗口模式 关于窗口模式我们就比较熟悉了,我们会在AndroidManifest.xml里Activity的标签下设置android:windowSoftInputMode="adjustNothing",来控制输入键盘显示行为。 可选的有6个参数,源码里也有6个值与之对应: - SOFT_INPUT_STATE_UNSPECIFIED:没有指定软键盘输入区域的显示状态。 - SOFT_INPUT_STATE_UNCHANGED:不要改变软键盘输入区域的显示状态。 - SOFT_INPUT_STATE_HIDDEN:在合适的时候隐藏软键盘输入区域,例如,当用户导航到当前窗口时。 - SOFT_INPUT_STATE_ALWAYS_HIDDEN:当窗口获得焦点时,总是隐藏软键盘输入区域。 - SOFT_INPUT_STATE_VISIBLE:在合适的时候显示软键盘输入区域,例如,当用户导航到当前窗口时。 - SOFT_INPUT_STATE_ALWAYS_VISIBLE:当窗口获得焦点时,总是显示软键盘输入区域。 当然,我们也可以通过代码设置键盘模式。 ```java getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); ``` ## 四 窗口回调 Window里定义了一个Callback接口,Activity实现了Window.Callback接口,将Activity关联给Window,Window就可以将一些事件交由Activity处理。 ```java public interface Callback { //键盘事件分发 public boolean dispatchKeyEvent(KeyEvent event); //触摸事件分发 public boolean dispatchTouchEvent(MotionEvent event); //轨迹球事件分发 public boolean dispatchTrackballEvent(MotionEvent event); //可见性事件分发 public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event); //创建Panel View public View onCreatePanelView(int featureId); //创建menu public boolean onCreatePanelMenu(int featureId, Menu menu); //画板准备好时回调 public boolean onPreparePanel(int featureId, View view, Menu menu); //menu打开时回调 public boolean onMenuOpened(int featureId, Menu menu); //menu item被选择时回调 public boolean onMenuItemSelected(int featureId, MenuItem item); //Window Attributes发生变化时回调 public void onWindowAttributesChanged(WindowManager.LayoutParams attrs); //Content View发生变化时回调 public void onContentChanged(); //窗口焦点发生变化时回调 public void onWindowFocusChanged(boolean hasFocus); //Window被添加到WIndowManager时回调 public void onAttachedToWindow(); //Window被从WIndowManager中移除时回调 public void onDetachedFromWindow(); */ //画板关闭时回调 public void onPanelClosed(int featureId, Menu menu); //用户开始执行搜索操作时回调 public boolean onSearchRequested(); } ``` ## 五 窗口实现 Window是一个抽象类,它的唯一实现类是PhoneWindow,PhoneWindow里包含了以下内容: - private DecorView mDecor:DecorView是Activity中的顶级View,它本质上是一个FrameLayout,一般说来它内部包含标题栏和内容栏(com.android.internal.R.id.content)。 - ViewGroup mContentParent:窗口内容视图,它是mDecor本身或者是它的子View。 - private ImageView mLeftIconView:左上角图标 - private ImageView mRightIconView:右上角图标 - private ProgressBar mCircularProgressBar:圆形loading条 - private ProgressBar mHorizontalProgressBar:水平loading条 - 其他的一些和转场动画相关的Transition与listener 看到这些,大家有没有觉得很熟悉,这就是我们日常开发中经常见到的东西,它在PhoneWindow里被创建。另外,我们在Activity里经常调用的方法,它的实际实现也是 在PhoneWindow里,我们分别来看一看。 ### setContentView() 这是一个我们非常熟悉的方法,只不过我们通常是在Activity里进行调用,但是它的实际实现是在PhoneWindow里。 ```java public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void setContentView(int layoutResID) { // Note: FEATURE_CONTENT_TRANSITIONS may be set in the process of installing the window // decor, when theme attributes and the like are crystalized. Do not check the feature // before this happens. if (mContentParent == null) { //1. 如果没有DecorView则创建它,并将创建好的DecorView赋值给mContentParent installDecor(); } else if (!hasFeature(FEATURE_CONTENT_TRANSITIONS)) { mContentParent.removeAllViews(); } if (hasFeature(FEATURE_CONTENT_TRANSITIONS)) { final Scene newScene = Scene.getSceneForLayout(mContentParent, layoutResID, getContext()); transitionTo(newScene); } else { //2. 将Activity传入的布局文件生成View并添加到mContentParent中 mLayoutInflater.inflate(layoutResID, mContentParent); } mContentParent.requestApplyInsets(); final Callback cb = getCallback(); if (cb != null && !isDestroyed()) { //3. 回调Window.Callback里的onContentChanged()方法,这个Callback也被Activity //所持有,因此它实际回调的是Activity里的onContentChanged()方法,通知Activity //视图已经发生改变。 cb.onContentChanged(); } mContentParentExplicitlySet = true; } } ``` 这个方法主要做了两件事情: 1. 如果没有DecorView则创建它,并将创建好的DecorView赋值给mContentParent 2. 将Activity传入的布局文件生成View并添加到mContentParent中 3. 回调Window.Callback里的onContentChanged()方法,这个Callback也被Activity所持有,因此它实际回调的是Activity里的onContentChanged()方法,通知Activity视图已经发生改变。 创建DecorView是通过installDecor()方法完成的,它的逻辑也非常简单,就是创建了一个ViewGroup然后返回给了mDecor和mContentParent。 ```java public class PhoneWindow extends Window implements MenuBuilder.Callback { public static final int ID_ANDROID_CONTENT = com.android.internal.R.id.content; private void installDecor() { mForceDecorInstall = false; if (mDecor == null) { //生成DecorView mDecor = generateDecor(-1); mDecor.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS); mDecor.setIsRootNamespace(true); if (!mInvalidatePanelMenuPosted && mInvalidatePanelMenuFeatures != 0) { mDecor.postOnAnimation(mInvalidatePanelMenuRunnable); } } else { mDecor.setWindow(this); } if (mContentParent == null) { mContentParent = generateLayout(mDecor); ... } else { ... } ... } } protected ViewGroup generateLayout(DecorView decor) { //读取并设置主题颜色、状态栏颜色等信息 ... ViewGroup contentParent = (ViewGroup)findViewById(ID_ANDROID_CONTENT); //设置窗口参数等信息 ... return contentParent; } } ``` 通过以上这些流程,DecorView已经被创建并初始化完毕,Activity里的布局文件也被成功的添加到PhoneWindow的mContentParent(实际上就是DecorView,它是Activity的顶层View) 中,但是这个时候DecorView还没有真正的被WindowManager添加到Window中,它还无法接受用户的输入信息和焦点事件,这个时候就相当于走到了Activity的onCreate()流程,界面还 未展示给用户。 直到走到Activity的onResume()方法,它会调用Activity的makeVisible()方法,DecorView才真正的被用户所看到。 ```java public class Activity extends ContextThemeWrapper implements LayoutInflater.Factory2, Window.Callback, KeyEvent.Callback, OnCreateContextMenuListener, ComponentCallbacks2, Window.OnWindowDismissedCallback, WindowControllerCallback { void makeVisible() { if (!mWindowAdded) { ViewManager wm = getWindowManager(); wm.addView(mDecor, getWindow().getAttributes()); mWindowAdded = true; } mDecor.setVisibility(View.VISIBLE); } } ``` 通常以上的分析,我们理解了setContentView的工作原理,另外还有addContentView、clearContentView,正如它们的名字那样,setContentView是替换View,addContentView是添加View。实现原理相同。 好了,以上便是本篇文章的全部内容,下一篇文章我们来分析WindowManager的内容,分析Window的添加、移除和更新的流程。 ## 附录 文章末尾给大家提供一个WindowUtils工具类。 ```java import android.animation.ValueAnimator; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.view.Surface; import android.view.Window; import android.view.WindowManager; public final class WindowUtils { /** * Don't let anyone instantiate this class. */ private WindowUtils() { throw new Error("Do not need instantiate!"); } /** * 获取当前窗口的旋转角度 * * @param activity activity * @return int */ public static int getDisplayRotation(Activity activity) { switch (activity.getWindowManager().getDefaultDisplay().getRotation()) { case Surface.ROTATION_0: return 0; case Surface.ROTATION_90: return 90; case Surface.ROTATION_180: return 180; case Surface.ROTATION_270: return 270; default: return 0; } } /** * 当前是否是横屏 * * @param context context * @return boolean */ public static final boolean isLandscape(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; } /** * 当前是否是竖屏 * * @param context context * @return boolean */ public static final boolean isPortrait(Context context) { return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT; } /** * 调整窗口的透明度 1.0f,0.5f 变暗 * @param from from>=0&&from<=1.0f * @param to to>=0&&to<=1.0f * @param context 当前的activity */ public static void dimBackground(final float from, final float to, Activity context) { final Window window = context.getWindow(); ValueAnimator valueAnimator = ValueAnimator.ofFloat(from, to); valueAnimator.setDuration(500); valueAnimator.addUpdateListener( new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { WindowManager.LayoutParams params = window.getAttributes(); params.alpha = (Float) animation.getAnimatedValue(); window.setAttributes(params); } }); valueAnimator.start(); } } ``` > 本篇文章到这里就结束了,欢迎关注我们的BeesAndroid微信公众平台,BeesAndroid致力于分享Android系统源码的设计与实现相关文章,也欢迎开源爱好者参与到BeesAndroid项目中来。 微信公众平台 <img src="https://github.com/BeesAndroid/BeesAndroid/raw/master/art/wechat.png" width="300"/>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk> * Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit * Version: 0.0.18 * * FEATURES currently supported: * See ca0106_main.c for features. * * Changelog: * Support interrupts per period. * Removed noise from Center/LFE channel when in Analog mode. * Rename and remove mixer controls. * 0.0.6 * Use separate card based DMA buffer for periods table list. * 0.0.7 * Change remove and rename ctrls into lists. * 0.0.8 * Try to fix capture sources. * 0.0.9 * Fix AC3 output. * Enable S32_LE format support. * 0.0.10 * Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".) * 0.0.11 * Add Model name recognition. * 0.0.12 * Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period. * Remove redundent "voice" handling. * 0.0.13 * Single trigger call for multi channels. * 0.0.14 * Set limits based on what the sound card hardware can do. * playback periods_min=2, periods_max=8 * capture hw constraints require period_size = n * 64 bytes. * playback hw constraints require period_size = n * 64 bytes. * 0.0.15 * Separate ca0106.c into separate functional .c files. * 0.0.16 * Modified Copyright message. * 0.0.17 * Add iec958 file in proc file system to show status of SPDIF in. * 0.0.18 * Implement support for Line-in capture on SB Live 24bit. * * This code was initially based on code from ALSA's emu10k1x.c which is: * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> * * 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 <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/moduleparam.h> #include <sound/core.h> #include <sound/initval.h> #include <sound/pcm.h> #include <sound/ac97_codec.h> #include <sound/info.h> #include <sound/asoundef.h> #include <asm/io.h> #include "ca0106.h" #ifdef CONFIG_PROC_FS struct snd_ca0106_category_str { int val; const char *name; }; static struct snd_ca0106_category_str snd_ca0106_con_category[] = { { IEC958_AES1_CON_DAT, "DAT" }, { IEC958_AES1_CON_VCR, "VCR" }, { IEC958_AES1_CON_MICROPHONE, "microphone" }, { IEC958_AES1_CON_SYNTHESIZER, "synthesizer" }, { IEC958_AES1_CON_RATE_CONVERTER, "rate converter" }, { IEC958_AES1_CON_MIXER, "mixer" }, { IEC958_AES1_CON_SAMPLER, "sampler" }, { IEC958_AES1_CON_PCM_CODER, "PCM coder" }, { IEC958_AES1_CON_IEC908_CD, "CD" }, { IEC958_AES1_CON_NON_IEC908_CD, "non-IEC908 CD" }, { IEC958_AES1_CON_GENERAL, "general" }, }; static void snd_ca0106_proc_dump_iec958( struct snd_info_buffer *buffer, u32 value) { int i; u32 status[4]; status[0] = value & 0xff; status[1] = (value >> 8) & 0xff; status[2] = (value >> 16) & 0xff; status[3] = (value >> 24) & 0xff; if (! (status[0] & IEC958_AES0_PROFESSIONAL)) { /* consumer */ snd_iprintf(buffer, "Mode: consumer\n"); snd_iprintf(buffer, "Data: "); if (!(status[0] & IEC958_AES0_NONAUDIO)) { snd_iprintf(buffer, "audio\n"); } else { snd_iprintf(buffer, "non-audio\n"); } snd_iprintf(buffer, "Rate: "); switch (status[3] & IEC958_AES3_CON_FS) { case IEC958_AES3_CON_FS_44100: snd_iprintf(buffer, "44100 Hz\n"); break; case IEC958_AES3_CON_FS_48000: snd_iprintf(buffer, "48000 Hz\n"); break; case IEC958_AES3_CON_FS_32000: snd_iprintf(buffer, "32000 Hz\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } snd_iprintf(buffer, "Copyright: "); if (status[0] & IEC958_AES0_CON_NOT_COPYRIGHT) { snd_iprintf(buffer, "permitted\n"); } else { snd_iprintf(buffer, "protected\n"); } snd_iprintf(buffer, "Emphasis: "); if ((status[0] & IEC958_AES0_CON_EMPHASIS) != IEC958_AES0_CON_EMPHASIS_5015) { snd_iprintf(buffer, "none\n"); } else { snd_iprintf(buffer, "50/15us\n"); } snd_iprintf(buffer, "Category: "); for (i = 0; i < ARRAY_SIZE(snd_ca0106_con_category); i++) { if ((status[1] & IEC958_AES1_CON_CATEGORY) == snd_ca0106_con_category[i].val) { snd_iprintf(buffer, "%s\n", snd_ca0106_con_category[i].name); break; } } if (i >= ARRAY_SIZE(snd_ca0106_con_category)) { snd_iprintf(buffer, "unknown 0x%x\n", status[1] & IEC958_AES1_CON_CATEGORY); } snd_iprintf(buffer, "Original: "); if (status[1] & IEC958_AES1_CON_ORIGINAL) { snd_iprintf(buffer, "original\n"); } else { snd_iprintf(buffer, "1st generation\n"); } snd_iprintf(buffer, "Clock: "); switch (status[3] & IEC958_AES3_CON_CLOCK) { case IEC958_AES3_CON_CLOCK_1000PPM: snd_iprintf(buffer, "1000 ppm\n"); break; case IEC958_AES3_CON_CLOCK_50PPM: snd_iprintf(buffer, "50 ppm\n"); break; case IEC958_AES3_CON_CLOCK_VARIABLE: snd_iprintf(buffer, "variable pitch\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } } else { snd_iprintf(buffer, "Mode: professional\n"); snd_iprintf(buffer, "Data: "); if (!(status[0] & IEC958_AES0_NONAUDIO)) { snd_iprintf(buffer, "audio\n"); } else { snd_iprintf(buffer, "non-audio\n"); } snd_iprintf(buffer, "Rate: "); switch (status[0] & IEC958_AES0_PRO_FS) { case IEC958_AES0_PRO_FS_44100: snd_iprintf(buffer, "44100 Hz\n"); break; case IEC958_AES0_PRO_FS_48000: snd_iprintf(buffer, "48000 Hz\n"); break; case IEC958_AES0_PRO_FS_32000: snd_iprintf(buffer, "32000 Hz\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } snd_iprintf(buffer, "Rate Locked: "); if (status[0] & IEC958_AES0_PRO_FREQ_UNLOCKED) snd_iprintf(buffer, "no\n"); else snd_iprintf(buffer, "yes\n"); snd_iprintf(buffer, "Emphasis: "); switch (status[0] & IEC958_AES0_PRO_EMPHASIS) { case IEC958_AES0_PRO_EMPHASIS_CCITT: snd_iprintf(buffer, "CCITT J.17\n"); break; case IEC958_AES0_PRO_EMPHASIS_NONE: snd_iprintf(buffer, "none\n"); break; case IEC958_AES0_PRO_EMPHASIS_5015: snd_iprintf(buffer, "50/15us\n"); break; case IEC958_AES0_PRO_EMPHASIS_NOTID: default: snd_iprintf(buffer, "unknown\n"); break; } snd_iprintf(buffer, "Stereophonic: "); if ((status[1] & IEC958_AES1_PRO_MODE) == IEC958_AES1_PRO_MODE_STEREOPHONIC) { snd_iprintf(buffer, "stereo\n"); } else { snd_iprintf(buffer, "not indicated\n"); } snd_iprintf(buffer, "Userbits: "); switch (status[1] & IEC958_AES1_PRO_USERBITS) { case IEC958_AES1_PRO_USERBITS_192: snd_iprintf(buffer, "192bit\n"); break; case IEC958_AES1_PRO_USERBITS_UDEF: snd_iprintf(buffer, "user-defined\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } snd_iprintf(buffer, "Sample Bits: "); switch (status[2] & IEC958_AES2_PRO_SBITS) { case IEC958_AES2_PRO_SBITS_20: snd_iprintf(buffer, "20 bit\n"); break; case IEC958_AES2_PRO_SBITS_24: snd_iprintf(buffer, "24 bit\n"); break; case IEC958_AES2_PRO_SBITS_UDEF: snd_iprintf(buffer, "user defined\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } snd_iprintf(buffer, "Word Length: "); switch (status[2] & IEC958_AES2_PRO_WORDLEN) { case IEC958_AES2_PRO_WORDLEN_22_18: snd_iprintf(buffer, "22 bit or 18 bit\n"); break; case IEC958_AES2_PRO_WORDLEN_23_19: snd_iprintf(buffer, "23 bit or 19 bit\n"); break; case IEC958_AES2_PRO_WORDLEN_24_20: snd_iprintf(buffer, "24 bit or 20 bit\n"); break; case IEC958_AES2_PRO_WORDLEN_20_16: snd_iprintf(buffer, "20 bit or 16 bit\n"); break; default: snd_iprintf(buffer, "unknown\n"); break; } } } static void snd_ca0106_proc_iec958(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; u32 value; value = snd_ca0106_ptr_read(emu, SAMPLE_RATE_TRACKER_STATUS, 0); snd_iprintf(buffer, "Status: %s, %s, %s\n", (value & 0x100000) ? "Rate Locked" : "Not Rate Locked", (value & 0x200000) ? "SPDIF Locked" : "No SPDIF Lock", (value & 0x400000) ? "Audio Valid" : "No valid audio" ); snd_iprintf(buffer, "Estimated sample rate: %u\n", ((value & 0xfffff) * 48000) / 0x8000 ); if (value & 0x200000) { snd_iprintf(buffer, "IEC958/SPDIF input status:\n"); value = snd_ca0106_ptr_read(emu, SPDIF_INPUT_STATUS, 0); snd_ca0106_proc_dump_iec958(buffer, value); } snd_iprintf(buffer, "\n"); } static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long flags; char line[64]; u32 reg, val; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%x %x", &reg, &val) != 2) continue; if (reg < 0x40 && val <= 0xffffffff) { spin_lock_irqsave(&emu->emu_lock, flags); outl(val, emu->port + (reg & 0xfffffffc)); spin_unlock_irqrestore(&emu->emu_lock, flags); } } } static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long value; unsigned long flags; int i; snd_iprintf(buffer, "Registers:\n\n"); for(i = 0; i < 0x20; i+=4) { spin_lock_irqsave(&emu->emu_lock, flags); value = inl(emu->port + i); spin_unlock_irqrestore(&emu->emu_lock, flags); snd_iprintf(buffer, "Register %02X: %08lX\n", i, value); } } static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned int value; unsigned long flags; int i; snd_iprintf(buffer, "Registers:\n\n"); for(i = 0; i < 0x20; i+=2) { spin_lock_irqsave(&emu->emu_lock, flags); value = inw(emu->port + i); spin_unlock_irqrestore(&emu->emu_lock, flags); snd_iprintf(buffer, "Register %02X: %04X\n", i, value); } } static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned int value; unsigned long flags; int i; snd_iprintf(buffer, "Registers:\n\n"); for(i = 0; i < 0x20; i+=1) { spin_lock_irqsave(&emu->emu_lock, flags); value = inb(emu->port + i); spin_unlock_irqrestore(&emu->emu_lock, flags); snd_iprintf(buffer, "Register %02X: %02X\n", i, value); } } static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long value; int i,j; snd_iprintf(buffer, "Registers\n"); for(i = 0; i < 0x40; i++) { snd_iprintf(buffer, "%02X: ",i); for (j = 0; j < 4; j++) { value = snd_ca0106_ptr_read(emu, i, j); snd_iprintf(buffer, "%08lX ", value); } snd_iprintf(buffer, "\n"); } } static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long value; int i,j; snd_iprintf(buffer, "Registers\n"); for(i = 0x40; i < 0x80; i++) { snd_iprintf(buffer, "%02X: ",i); for (j = 0; j < 4; j++) { value = snd_ca0106_ptr_read(emu, i, j); snd_iprintf(buffer, "%08lX ", value); } snd_iprintf(buffer, "\n"); } } static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; char line[64]; unsigned int reg, channel_id , val; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3) continue; if (reg < 0x80 && val <= 0xffffffff && channel_id <= 3) snd_ca0106_ptr_write(emu, reg, channel_id, val); } } static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; char line[64]; unsigned int reg, val; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%x %x", &reg, &val) != 2) continue; if ((reg <= 0x7f) || (val <= 0x1ff)) { snd_ca0106_i2c_write(emu, reg, val); } } } int snd_ca0106_proc_init(struct snd_ca0106 *emu) { struct snd_info_entry *entry; if(! snd_card_proc_new(emu->card, "iec958", &entry)) snd_info_set_text_ops(entry, emu, snd_ca0106_proc_iec958); if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) { snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32); entry->c.text.write = snd_ca0106_proc_reg_write32; entry->mode |= S_IWUSR; } if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry)) snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16); if(! snd_card_proc_new(emu->card, "ca0106_reg8", &entry)) snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read8); if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) { snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); entry->c.text.write = snd_ca0106_proc_reg_write; entry->mode |= S_IWUSR; } if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { entry->c.text.write = snd_ca0106_proc_i2c_write; entry->private_data = emu; entry->mode |= S_IWUSR; } if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); return 0; } #endif /* CONFIG_PROC_FS */
{ "pile_set_name": "Github" }
/* ============================================================================== This file is part of the JUCE library. Copyright (c) 2020 - Raw Material Software Limited JUCE is an open source library subject to commercial or open-source licensing. The code included in this file is provided under the terms of the ISC license http://www.isc.org/downloads/software-support-policy/isc-license. 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. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED. ============================================================================== */ namespace juce { static void parseWildcard (const String& pattern, StringArray& result) { result.addTokens (pattern.toLowerCase(), ";,", "\"'"); result.trim(); result.removeEmptyStrings(); // special case for *.*, because people use it to mean "any file", but it // would actually ignore files with no extension. for (auto& r : result) if (r == "*.*") r = "*"; } static bool matchWildcard (const File& file, const StringArray& wildcards) { auto filename = file.getFileName(); for (auto& w : wildcards) if (filename.matchesWildcard (w, true)) return true; return false; } WildcardFileFilter::WildcardFileFilter (const String& fileWildcardPatterns, const String& directoryWildcardPatterns, const String& desc) : FileFilter (desc.isEmpty() ? fileWildcardPatterns : (desc + " (" + fileWildcardPatterns + ")")) { parseWildcard (fileWildcardPatterns, fileWildcards); parseWildcard (directoryWildcardPatterns, directoryWildcards); } WildcardFileFilter::~WildcardFileFilter() { } bool WildcardFileFilter::isFileSuitable (const File& file) const { return matchWildcard (file, fileWildcards); } bool WildcardFileFilter::isDirectorySuitable (const File& file) const { return matchWildcard (file, directoryWildcards); } } // namespace juce
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: org.glassfish.grizzly:grizzly-rcm:2.2.16"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-rcm/2.2.16/grizzly-rcm-2.2.16.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-rcm/2.2.16/grizzly-rcm-2.2.16-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-rcm/2.2.16/grizzly-rcm-2.2.16-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
import angular from 'angular'; import modalModule from 'common/components/modal'; import builderTpl from 'app/admin/builder/builder.tpl'; var builderModule = angular.module('admin.builder', [modalModule.name, builderTpl.name]); builderModule.controller('BuilderController', function() { console.log('builder!'); }); export default builderModule;
{ "pile_set_name": "Github" }
/* * Copyright (C) 1999-2005, 2016 Free Software Foundation, Inc. * This file is part of the GNU LIBICONV Library. * * The GNU LIBICONV Library is free software; you can redistribute it * and/or modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * The GNU LIBICONV 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with the GNU LIBICONV Library; see the file COPYING.LIB. * If not, see <http://www.gnu.org/licenses/>. */ /* * Atari ST */ static const unsigned short atarist_2uni[128] = { /* 0x80 */ 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, /* 0x90 */ 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x00df, 0x0192, /* 0xa0 */ 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, /* 0xb0 */ 0x00e3, 0x00f5, 0x00d8, 0x00f8, 0x0153, 0x0152, 0x00c0, 0x00c3, 0x00d5, 0x00a8, 0x00b4, 0x2020, 0x00b6, 0x00a9, 0x00ae, 0x2122, /* 0xc0 */ 0x0133, 0x0132, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05db, 0x05dc, 0x05de, 0x05e0, /* 0xd0 */ 0x05e1, 0x05e2, 0x05e4, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0x05df, 0x05da, 0x05dd, 0x05e3, 0x05e5, 0x00a7, 0x2227, 0x221e, /* 0xe0 */ 0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x222e, 0x03c6, 0x2208, 0x2229, /* 0xf0 */ 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af, }; static int atarist_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) { unsigned char c = *s; if (c < 0x80) *pwc = (ucs4_t) c; else *pwc = (ucs4_t) atarist_2uni[c-0x80]; return 1; } static const unsigned char atarist_page00[96] = { 0x00, 0xad, 0x9b, 0x9c, 0x00, 0x9d, 0x00, 0xdd, /* 0xa0-0xa7 */ 0xb9, 0xbd, 0xa6, 0xae, 0xaa, 0x00, 0xbe, 0xff, /* 0xa8-0xaf */ 0xf8, 0xf1, 0xfd, 0xfe, 0xba, 0xe6, 0xbc, 0xfa, /* 0xb0-0xb7 */ 0x00, 0x00, 0xa7, 0xaf, 0xac, 0xab, 0x00, 0xa8, /* 0xb8-0xbf */ 0xb6, 0x00, 0x00, 0xb7, 0x8e, 0x8f, 0x92, 0x80, /* 0xc0-0xc7 */ 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */ 0x00, 0xa5, 0x00, 0x00, 0x00, 0xb8, 0x99, 0x00, /* 0xd0-0xd7 */ 0xb2, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x9e, /* 0xd8-0xdf */ 0x85, 0xa0, 0x83, 0xb0, 0x84, 0x86, 0x91, 0x87, /* 0xe0-0xe7 */ 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, /* 0xe8-0xef */ 0x00, 0xa4, 0x95, 0xa2, 0x93, 0xb1, 0x94, 0xf6, /* 0xf0-0xf7 */ 0xb3, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */ }; static const unsigned char atarist_page01[104] = { 0x00, 0x00, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ 0x00, 0x00, 0xb5, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ }; static const unsigned char atarist_page03[56] = { 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ 0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0xe8, 0x00, /* 0xa0-0xa7 */ 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ 0x00, 0xe0, 0xe1, 0x00, 0xeb, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */ 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ }; static const unsigned char atarist_page05[32] = { 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, /* 0xd0-0xd7 */ 0xca, 0xcb, 0xd9, 0xcc, 0xcd, 0xda, 0xce, 0xd8, /* 0xd8-0xdf */ 0xcf, 0xd0, 0xd1, 0xdb, 0xd2, 0xdc, 0xd3, 0xd4, /* 0xe0-0xe7 */ 0xd5, 0xd6, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */ }; static const unsigned char atarist_page22[96] = { 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ 0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0xdf, 0x00, /* 0x18-0x1f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, /* 0x20-0x27 */ 0x00, 0xef, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, /* 0x28-0x2f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ }; static const unsigned char atarist_page23[24] = { 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ }; static int atarist_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) { unsigned char c = 0; if (wc < 0x0080) { *r = wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0100) c = atarist_page00[wc-0x00a0]; else if (wc >= 0x0130 && wc < 0x0198) c = atarist_page01[wc-0x0130]; else if (wc >= 0x0390 && wc < 0x03c8) c = atarist_page03[wc-0x0390]; else if (wc >= 0x05d0 && wc < 0x05f0) c = atarist_page05[wc-0x05d0]; else if (wc == 0x2020) c = 0xbb; else if (wc == 0x207f) c = 0xfc; else if (wc == 0x2122) c = 0xbf; else if (wc >= 0x2208 && wc < 0x2268) c = atarist_page22[wc-0x2208]; else if (wc >= 0x2310 && wc < 0x2328) c = atarist_page23[wc-0x2310]; if (c != 0) { *r = c; return 1; } return RET_ILUNI; }
{ "pile_set_name": "Github" }
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/compiler/plugin.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "google/protobuf/compiler/plugin.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // @@protoc_insertion_point(includes) namespace google { namespace protobuf { namespace compiler { namespace { const ::google::protobuf::Descriptor* CodeGeneratorRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* CodeGeneratorRequest_reflection_ = NULL; const ::google::protobuf::Descriptor* CodeGeneratorResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* CodeGeneratorResponse_reflection_ = NULL; const ::google::protobuf::Descriptor* CodeGeneratorResponse_File_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* CodeGeneratorResponse_File_reflection_ = NULL; } // namespace void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); const ::google::protobuf::FileDescriptor* file = ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "google/protobuf/compiler/plugin.proto"); GOOGLE_CHECK(file != NULL); CodeGeneratorRequest_descriptor_ = file->message_type(0); static const int CodeGeneratorRequest_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_), }; CodeGeneratorRequest_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( CodeGeneratorRequest_descriptor_, CodeGeneratorRequest::default_instance_, CodeGeneratorRequest_offsets_, GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _unknown_fields_), -1, ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(CodeGeneratorRequest)); CodeGeneratorResponse_descriptor_ = file->message_type(1); static const int CodeGeneratorResponse_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_), }; CodeGeneratorResponse_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( CodeGeneratorResponse_descriptor_, CodeGeneratorResponse::default_instance_, CodeGeneratorResponse_offsets_, GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _unknown_fields_), -1, ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(CodeGeneratorResponse)); CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0); static const int CodeGeneratorResponse_File_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, insertion_point_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, content_), }; CodeGeneratorResponse_File_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( CodeGeneratorResponse_File_descriptor_, CodeGeneratorResponse_File::default_instance_, CodeGeneratorResponse_File_offsets_, GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _unknown_fields_), -1, ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(CodeGeneratorResponse_File)); } namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, &protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto); } void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( CodeGeneratorRequest_descriptor_, &CodeGeneratorRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( CodeGeneratorResponse_descriptor_, &CodeGeneratorResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( CodeGeneratorResponse_File_descriptor_, &CodeGeneratorResponse_File::default_instance()); } } // namespace void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { delete CodeGeneratorRequest::default_instance_; delete CodeGeneratorRequest_reflection_; delete CodeGeneratorResponse::default_instance_; delete CodeGeneratorResponse_reflection_; delete CodeGeneratorResponse_File::default_instance_; delete CodeGeneratorResponse_File_reflection_; } void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { static bool already_here = false; if (already_here) return; already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n%google/protobuf/compiler/plugin.proto\022" "\030google.protobuf.compiler\032 google/protob" "uf/descriptor.proto\"}\n\024CodeGeneratorRequ" "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet" "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr" "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener" "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003(" "\01324.google.protobuf.compiler.CodeGenerat" "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n" "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\tB" ",\n\034com.google.protobuf.compilerB\014PluginP" "rotos", 445); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes); CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest(); CodeGeneratorResponse::default_instance_ = new CodeGeneratorResponse(); CodeGeneratorResponse_File::default_instance_ = new CodeGeneratorResponse_File(); CodeGeneratorRequest::default_instance_->InitAsDefaultInstance(); CodeGeneratorResponse::default_instance_->InitAsDefaultInstance(); CodeGeneratorResponse_File::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto { StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); } } static_descriptor_initializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto_; // =================================================================== #ifndef _MSC_VER const int CodeGeneratorRequest::kFileToGenerateFieldNumber; const int CodeGeneratorRequest::kParameterFieldNumber; const int CodeGeneratorRequest::kProtoFileFieldNumber; #endif // !_MSC_VER CodeGeneratorRequest::CodeGeneratorRequest() : ::google::protobuf::Message() { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest) } void CodeGeneratorRequest::InitAsDefaultInstance() { } CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) : ::google::protobuf::Message() { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest) } void CodeGeneratorRequest::SharedCtor() { ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } CodeGeneratorRequest::~CodeGeneratorRequest() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest) SharedDtor(); } void CodeGeneratorRequest::SharedDtor() { if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete parameter_; } if (this != default_instance_) { } } void CodeGeneratorRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() { protobuf_AssignDescriptorsOnce(); return CodeGeneratorRequest_descriptor_; } const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; } CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL; CodeGeneratorRequest* CodeGeneratorRequest::New() const { return new CodeGeneratorRequest; } void CodeGeneratorRequest::Clear() { if (has_parameter()) { if (parameter_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { parameter_->clear(); } } file_to_generate_.Clear(); proto_file_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); } bool CodeGeneratorRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated string file_to_generate = 1; case 1: { if (tag == 10) { parse_file_to_generate: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_file_to_generate())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(this->file_to_generate_size() - 1).data(), this->file_to_generate(this->file_to_generate_size() - 1).length(), ::google::protobuf::internal::WireFormat::PARSE, "file_to_generate"); } else { goto handle_unusual; } if (input->ExpectTag(10)) goto parse_file_to_generate; if (input->ExpectTag(18)) goto parse_parameter; break; } // optional string parameter = 2; case 2: { if (tag == 18) { parse_parameter: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parameter())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), this->parameter().length(), ::google::protobuf::internal::WireFormat::PARSE, "parameter"); } else { goto handle_unusual; } if (input->ExpectTag(122)) goto parse_proto_file; break; } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; case 15: { if (tag == 122) { parse_proto_file: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_proto_file())); } else { goto handle_unusual; } if (input->ExpectTag(122)) goto parse_proto_file; if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorRequest) return false; #undef DO_ } void CodeGeneratorRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest) // repeated string file_to_generate = 1; for (int i = 0; i < this->file_to_generate_size(); i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(i).data(), this->file_to_generate(i).length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "file_to_generate"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->file_to_generate(i), output); } // optional string parameter = 2; if (has_parameter()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), this->parameter().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "parameter"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->parameter(), output); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; for (int i = 0; i < this->proto_file_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 15, this->proto_file(i), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest) } ::google::protobuf::uint8* CodeGeneratorRequest::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) // repeated string file_to_generate = 1; for (int i = 0; i < this->file_to_generate_size(); i++) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(i).data(), this->file_to_generate(i).length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "file_to_generate"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->file_to_generate(i), target); } // optional string parameter = 2; if (has_parameter()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), this->parameter().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "parameter"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->parameter(), target); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; for (int i = 0; i < this->proto_file_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 15, this->proto_file(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest) return target; } int CodeGeneratorRequest::ByteSize() const { int total_size = 0; if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { // optional string parameter = 2; if (has_parameter()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parameter()); } } // repeated string file_to_generate = 1; total_size += 1 * this->file_to_generate_size(); for (int i = 0; i < this->file_to_generate_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->file_to_generate(i)); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; total_size += 1 * this->proto_file_size(); for (int i = 0; i < this->proto_file_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->proto_file(i)); } if (!unknown_fields().empty()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) { GOOGLE_CHECK_NE(&from, this); const CodeGeneratorRequest* source = ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorRequest*>( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { MergeFrom(*source); } } void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { GOOGLE_CHECK_NE(&from, this); file_to_generate_.MergeFrom(from.file_to_generate_); proto_file_.MergeFrom(from.proto_file_); if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { if (from.has_parameter()) { set_parameter(from.parameter()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool CodeGeneratorRequest::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->proto_file())) return false; return true; } void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) { if (other != this) { file_to_generate_.Swap(&other->file_to_generate_); std::swap(parameter_, other->parameter_); proto_file_.Swap(&other->proto_file_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; metadata.descriptor = CodeGeneratorRequest_descriptor_; metadata.reflection = CodeGeneratorRequest_reflection_; return metadata; } // =================================================================== #ifndef _MSC_VER const int CodeGeneratorResponse_File::kNameFieldNumber; const int CodeGeneratorResponse_File::kInsertionPointFieldNumber; const int CodeGeneratorResponse_File::kContentFieldNumber; #endif // !_MSC_VER CodeGeneratorResponse_File::CodeGeneratorResponse_File() : ::google::protobuf::Message() { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } void CodeGeneratorResponse_File::InitAsDefaultInstance() { } CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) : ::google::protobuf::Message() { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } void CodeGeneratorResponse_File::SharedCtor() { ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File) SharedDtor(); } void CodeGeneratorResponse_File::SharedDtor() { if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete name_; } if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete insertion_point_; } if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete content_; } if (this != default_instance_) { } } void CodeGeneratorResponse_File::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() { protobuf_AssignDescriptorsOnce(); return CodeGeneratorResponse_File_descriptor_; } const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; } CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL; CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const { return new CodeGeneratorResponse_File; } void CodeGeneratorResponse_File::Clear() { if (_has_bits_[0 / 32] & 7) { if (has_name()) { if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { name_->clear(); } } if (has_insertion_point()) { if (insertion_point_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { insertion_point_->clear(); } } if (has_content()) { if (content_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { content_->clear(); } } } ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); } bool CodeGeneratorResponse_File::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), ::google::protobuf::internal::WireFormat::PARSE, "name"); } else { goto handle_unusual; } if (input->ExpectTag(18)) goto parse_insertion_point; break; } // optional string insertion_point = 2; case 2: { if (tag == 18) { parse_insertion_point: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_insertion_point())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), this->insertion_point().length(), ::google::protobuf::internal::WireFormat::PARSE, "insertion_point"); } else { goto handle_unusual; } if (input->ExpectTag(122)) goto parse_content; break; } // optional string content = 15; case 15: { if (tag == 122) { parse_content: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_content())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), this->content().length(), ::google::protobuf::internal::WireFormat::PARSE, "content"); } else { goto handle_unusual; } if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse.File) return true; failure: // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse.File) return false; #undef DO_ } void CodeGeneratorResponse_File::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse.File) // optional string name = 1; if (has_name()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional string insertion_point = 2; if (has_insertion_point()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), this->insertion_point().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "insertion_point"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->insertion_point(), output); } // optional string content = 15; if (has_content()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), this->content().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "content"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 15, this->content(), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File) } ::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) // optional string name = 1; if (has_name()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), this->name().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional string insertion_point = 2; if (has_insertion_point()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), this->insertion_point().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "insertion_point"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->insertion_point(), target); } // optional string content = 15; if (has_content()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), this->content().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "content"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 15, this->content(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File) return target; } int CodeGeneratorResponse_File::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional string name = 1; if (has_name()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // optional string insertion_point = 2; if (has_insertion_point()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->insertion_point()); } // optional string content = 15; if (has_content()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->content()); } } if (!unknown_fields().empty()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) { GOOGLE_CHECK_NE(&from, this); const CodeGeneratorResponse_File* source = ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse_File*>( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { MergeFrom(*source); } } void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) { GOOGLE_CHECK_NE(&from, this); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { if (from.has_name()) { set_name(from.name()); } if (from.has_insertion_point()) { set_insertion_point(from.insertion_point()); } if (from.has_content()) { set_content(from.content()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool CodeGeneratorResponse_File::IsInitialized() const { return true; } void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) { if (other != this) { std::swap(name_, other->name_); std::swap(insertion_point_, other->insertion_point_); std::swap(content_, other->content_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; metadata.descriptor = CodeGeneratorResponse_File_descriptor_; metadata.reflection = CodeGeneratorResponse_File_reflection_; return metadata; } // ------------------------------------------------------------------- #ifndef _MSC_VER const int CodeGeneratorResponse::kErrorFieldNumber; const int CodeGeneratorResponse::kFileFieldNumber; #endif // !_MSC_VER CodeGeneratorResponse::CodeGeneratorResponse() : ::google::protobuf::Message() { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse) } void CodeGeneratorResponse::InitAsDefaultInstance() { } CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) : ::google::protobuf::Message() { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse) } void CodeGeneratorResponse::SharedCtor() { ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } CodeGeneratorResponse::~CodeGeneratorResponse() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse) SharedDtor(); } void CodeGeneratorResponse::SharedDtor() { if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete error_; } if (this != default_instance_) { } } void CodeGeneratorResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() { protobuf_AssignDescriptorsOnce(); return CodeGeneratorResponse_descriptor_; } const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; } CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL; CodeGeneratorResponse* CodeGeneratorResponse::New() const { return new CodeGeneratorResponse; } void CodeGeneratorResponse::Clear() { if (has_error()) { if (error_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { error_->clear(); } } file_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); } bool CodeGeneratorResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string error = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_error())); ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), this->error().length(), ::google::protobuf::internal::WireFormat::PARSE, "error"); } else { goto handle_unusual; } if (input->ExpectTag(122)) goto parse_file; break; } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; case 15: { if (tag == 122) { parse_file: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_file())); } else { goto handle_unusual; } if (input->ExpectTag(122)) goto parse_file; if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse) return true; failure: // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse) return false; #undef DO_ } void CodeGeneratorResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse) // optional string error = 1; if (has_error()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), this->error().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "error"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->error(), output); } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; for (int i = 0; i < this->file_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 15, this->file(i), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse) } ::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) // optional string error = 1; if (has_error()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), this->error().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "error"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->error(), target); } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; for (int i = 0; i < this->file_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 15, this->file(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse) return target; } int CodeGeneratorResponse::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional string error = 1; if (has_error()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->error()); } } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; total_size += 1 * this->file_size(); for (int i = 0; i < this->file_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->file(i)); } if (!unknown_fields().empty()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) { GOOGLE_CHECK_NE(&from, this); const CodeGeneratorResponse* source = ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse*>( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { MergeFrom(*source); } } void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) { GOOGLE_CHECK_NE(&from, this); file_.MergeFrom(from.file_); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { if (from.has_error()) { set_error(from.error()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool CodeGeneratorResponse::IsInitialized() const { return true; } void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) { if (other != this) { std::swap(error_, other->error_); file_.Swap(&other->file_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; metadata.descriptor = CodeGeneratorResponse_descriptor_; metadata.reflection = CodeGeneratorResponse_reflection_; return metadata; } // @@protoc_insertion_point(namespace_scope) } // namespace compiler } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope)
{ "pile_set_name": "Github" }
" local syntax file - set colors on a per-machine basis: " vim: tw=0 ts=4 sw=4 " Vim color file " Maintainer: Ron Aaron <ron@ronware.org> " Last Change: 2013 May 24 set background=dark hi clear if exists("syntax_on") syntax reset endif let g:colors_name = "ron" hi Normal guifg=cyan guibg=black hi NonText guifg=yellow guibg=#303030 hi comment guifg=green hi constant guifg=cyan gui=bold hi identifier guifg=cyan gui=NONE hi statement guifg=lightblue gui=NONE hi preproc guifg=Pink2 hi type guifg=seagreen gui=bold hi special guifg=yellow hi ErrorMsg guifg=Black guibg=Red hi WarningMsg guifg=Black guibg=Green hi Error guibg=Red hi Todo guifg=Black guibg=orange hi Cursor guibg=#60a060 guifg=#00ff00 hi Search guibg=darkgray guifg=black gui=bold hi IncSearch gui=NONE guibg=steelblue hi LineNr guifg=darkgrey hi title guifg=darkgrey hi ShowMarksHL ctermfg=cyan ctermbg=lightblue cterm=bold guifg=yellow guibg=black gui=bold hi StatusLineNC gui=NONE guifg=lightblue guibg=darkblue hi StatusLine gui=bold guifg=cyan guibg=blue hi label guifg=gold2 hi operator guifg=orange hi clear Visual hi Visual term=reverse cterm=reverse gui=reverse hi DiffChange guibg=darkgreen hi DiffText guibg=olivedrab hi DiffAdd guibg=slateblue hi DiffDelete guibg=coral hi Folded guibg=gray30 hi FoldColumn guibg=gray30 guifg=white hi cIf0 guifg=gray hi diffOnly guifg=red gui=bold
{ "pile_set_name": "Github" }
use futures::prelude::*; use std::sync::Arc; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; pub struct NextTick { started: bool, notify: Arc<AtomicBool> } impl Future for NextTick { type Item = (); type Error = !; fn poll( &mut self ) -> Result<Async<()>, !> { if self.notify.load(Ordering::Relaxed) == true { return Ok(Async::Ready(())); } if !self.started { self.started = true; let notify = self.notify.clone(); let task = ::executor::current_task(); ::raw::schedule(move || { notify.store(true, Ordering::Relaxed); ::executor::run_once_next_tick(&task); }); } Ok(Async::NotReady) } } impl NextTick { pub fn new() -> NextTick { NextTick { started: false, notify: Arc::new(AtomicBool::new(false)) } } }
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -fsyntax-only -std=c99 -verify -pedantic %s int x[10]; int x[] = {1,2,3}; int testx[(sizeof(x) == sizeof(int) * 10) ? 1 : -1]; int (*a)(int (*x)[10], int (*y)[]); int (*a)(int (*x)[], int (*y)[5]); void b() { int x[10], y[5]; a(&x, &y); a(&y, &y); // expected-warning {{incompatible pointer}} a(&x, &x); // expected-warning {{incompatible pointer}} }
{ "pile_set_name": "Github" }
[ { "BriefDescription": "Uncore cache clock ticks", "Counter": "0,1,2,3", "EventName": "UNC_C_CLOCKTICKS", "PerPkg": "1", "Unit": "CBO" }, { "BriefDescription": "All LLC Misses (code+ data rd + data wr - including demand and prefetch)", "Counter": "0,1", "EventCode": "0x34", "EventName": "UNC_C_LLC_LOOKUP.ANY", "Filter": "filter_state=0x1", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x11", "Unit": "CBO" }, { "BriefDescription": "M line evictions from LLC (writebacks to memory)", "Counter": "0,1", "EventCode": "0x37", "EventName": "UNC_C_LLC_VICTIMS.M_STATE", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "LLC misses - demand and prefetch data reads - excludes LLC prefetches. Derived from unc_c_tor_inserts.miss_opcode.demand", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_MISSES.DATA_READ", "Filter": "filter_opc=0x182", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x3", "Unit": "CBO" }, { "BriefDescription": "LLC misses - Uncacheable reads. Derived from unc_c_tor_inserts.miss_opcode.uncacheable", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_MISSES.UNCACHEABLE", "Filter": "filter_opc=0x187", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x3", "Unit": "CBO" }, { "BriefDescription": "PCIe allocating writes that miss LLC - DDIO misses. Derived from unc_c_tor_inserts.miss_opcode.ddio_miss", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_MISSES.PCIE_WRITE", "Filter": "filter_opc=0x19c", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x3", "Unit": "CBO" }, { "BriefDescription": "LLC misses for ItoM writes (as part of fast string memcpy stores). Derived from unc_c_tor_inserts.miss_opcode.itom_write", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_MISSES.ITOM_WRITE", "Filter": "filter_opc=0x1c8", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x3", "Unit": "CBO" }, { "BriefDescription": "Streaming stores (full cache line). Derived from unc_c_tor_inserts.opcode.streaming_full", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.STREAMING_FULL", "Filter": "filter_opc=0x18c", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "Streaming stores (partial cache line). Derived from unc_c_tor_inserts.opcode.streaming_partial", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.STREAMING_PARTIAL", "Filter": "filter_opc=0x18d", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "Partial PCIe reads. Derived from unc_c_tor_inserts.opcode.pcie_partial", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_PARTIAL_READ", "Filter": "filter_opc=0x195", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "PCIe allocating writes that hit in LLC (DDIO hits). Derived from unc_c_tor_inserts.opcode.ddio_hit", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_WRITE", "Filter": "filter_opc=0x19c", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "PCIe read current. Derived from unc_c_tor_inserts.opcode.pcie_read_current", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_READ", "Filter": "filter_opc=0x19e", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "ItoM write hits (as part of fast string memcpy stores). Derived from unc_c_tor_inserts.opcode.itom_write_hit", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.ITOM_WRITE", "Filter": "filter_opc=0x1c8", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "PCIe non-snoop reads. Derived from unc_c_tor_inserts.opcode.pcie_read", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_NS_READ", "Filter": "filter_opc=0x1e4", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "PCIe non-snoop writes (partial). Derived from unc_c_tor_inserts.opcode.pcie_partial_write", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_NS_PARTIAL_WRITE", "Filter": "filter_opc=0x1e5", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "PCIe non-snoop writes (full line). Derived from unc_c_tor_inserts.opcode.pcie_full_write", "Counter": "0,1", "EventCode": "0x35", "EventName": "LLC_REFERENCES.PCIE_NS_WRITE", "Filter": "filter_opc=0x1e6", "PerPkg": "1", "ScaleUnit": "64Bytes", "UMask": "0x1", "Unit": "CBO" }, { "BriefDescription": "Occupancy counter for all LLC misses; we divide this by UNC_C_CLOCKTICKS to get average Q depth", "EventCode": "0x36", "EventName": "UNC_C_TOR_OCCUPANCY.MISS_ALL", "Filter": "filter_opc=0x182", "MetricExpr": "(UNC_C_TOR_OCCUPANCY.MISS_ALL / UNC_C_CLOCKTICKS) * 100.", "MetricName": "tor_occupancy.miss_all %", "PerPkg": "1", "UMask": "0xa", "Unit": "CBO" }, { "BriefDescription": "Occupancy counter for LLC data reads (demand and L2 prefetch). Derived from unc_c_tor_occupancy.miss_opcode.llc_data_read", "EventCode": "0x36", "EventName": "UNC_C_TOR_OCCUPANCY.LLC_DATA_READ", "PerPkg": "1", "UMask": "0x3", "Unit": "CBO" }, { "BriefDescription": "read requests to home agent", "Counter": "0,1,2,3", "EventCode": "0x1", "EventName": "UNC_H_REQUESTS.READS", "PerPkg": "1", "UMask": "0x3", "Unit": "HA" }, { "BriefDescription": "write requests to home agent", "Counter": "0,1,2,3", "EventCode": "0x1", "EventName": "UNC_H_REQUESTS.WRITES", "PerPkg": "1", "UMask": "0xc", "Unit": "HA" } ]
{ "pile_set_name": "Github" }
// std import { deepStrictEqual, strictEqual } from 'assert'; // 3p import 'reflect-metadata'; // FoalTS import { getHookFunction, getHookFunctions, Hook, HookFunction, MergeHooks } from './hooks'; describe('Hook', () => { const hook1: HookFunction = () => { return; }; const hook2: HookFunction = () => undefined; const hook3: HookFunction = () => undefined; it('should add the hook to the metadata hooks on the method class.', () => { class Foobar { @Hook(hook1) @Hook(hook2) barfoo() {} } const actual = Reflect.getOwnMetadata('hooks', Foobar.prototype, 'barfoo'); deepStrictEqual(actual, [ hook1, hook2 ]); }); it('should add the hooks to the metadata hooks on the method class.', () => { class Foobar { @Hook(hook1, hook2, hook3) barfoo() {} } const actual = Reflect.getOwnMetadata('hooks', Foobar.prototype, 'barfoo'); deepStrictEqual(actual, [ hook1, hook2, hook3 ]); }); it('should add the hook to the metadata hooks on the class.', () => { @Hook(hook1) @Hook(hook2) class Foobar {} const actual = Reflect.getOwnMetadata('hooks', Foobar); deepStrictEqual(actual, [ hook1, hook2 ]); }); it('should add the hooks to the metadata hooks on the method class.', () => { @Hook(hook1, hook2, hook3) class Foobar { barfoo() {} } const actual = Reflect.getOwnMetadata('hooks', Foobar); deepStrictEqual(actual, [ hook1, hook2, hook3 ]); }); }); describe('getHookFunction', () => { it('should take a hook decorator and return its hook function.', () => { const hookFunction = () => {}; const hook = Hook(hookFunction); strictEqual(getHookFunction(hook), hookFunction); }); }); describe('getHookFunctions', () => { it('should take a hook decorator and return its hook functions.', () => { const hookFunction = () => {}; const hookFunction2 = () => {}; const hookFunction3 = () => {}; const hook = Hook(hookFunction, hookFunction2, hookFunction3); deepStrictEqual( getHookFunctions(hook), [ hookFunction, hookFunction2, hookFunction3 ] ); }); }); describe('MergeHooks', () => { const hook1: HookFunction = () => { return; }; const hook2: HookFunction = () => undefined; const hook3: HookFunction = () => undefined; const hook4: HookFunction = () => undefined; it('should create a new hook decorator from the hook functions of the given decorators.', () => { @MergeHooks( Hook(hook1), Hook(hook2, hook3), Hook(hook4), ) class Foobar { barfoo() {} } const actual = Reflect.getOwnMetadata('hooks', Foobar); deepStrictEqual(actual, [ hook1, hook2, hook3, hook4 ]); }); });
{ "pile_set_name": "Github" }
//===-- lib/MC/Disassembler.cpp - Disassembler Public C Interface ---------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "Disassembler.h" #include "llvm-c/Disassembler.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Triple.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCDisassembler/MCDisassembler.h" #include "llvm/MC/MCDisassembler/MCRelocationInfo.h" #include "llvm/MC/MCDisassembler/MCSymbolizer.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCInstrDesc.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCInstrItineraries.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSchedule.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" #include <cassert> #include <cstddef> #include <cstring> using namespace llvm; // LLVMCreateDisasm() creates a disassembler for the TripleName. Symbolic // disassembly is supported by passing a block of information in the DisInfo // parameter and specifying the TagType and callback functions as described in // the header llvm-c/Disassembler.h . The pointer to the block and the // functions can all be passed as NULL. If successful, this returns a // disassembler context. If not, it returns NULL. // LLVMDisasmContextRef LLVMCreateDisasmCPUFeatures(const char *TT, const char *CPU, const char *Features, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp) { // Get the target. std::string Error; const Target *TheTarget = TargetRegistry::lookupTarget(TT, Error); if (!TheTarget) return nullptr; const MCRegisterInfo *MRI = TheTarget->createMCRegInfo(TT); if (!MRI) return nullptr; // Get the assembler info needed to setup the MCContext. const MCAsmInfo *MAI = TheTarget->createMCAsmInfo(*MRI, TT); if (!MAI) return nullptr; const MCInstrInfo *MII = TheTarget->createMCInstrInfo(); if (!MII) return nullptr; const MCSubtargetInfo *STI = TheTarget->createMCSubtargetInfo(TT, CPU, Features); if (!STI) return nullptr; // Set up the MCContext for creating symbols and MCExpr's. MCContext *Ctx = new MCContext(MAI, MRI, nullptr); if (!Ctx) return nullptr; // Set up disassembler. MCDisassembler *DisAsm = TheTarget->createMCDisassembler(*STI, *Ctx); if (!DisAsm) return nullptr; std::unique_ptr<MCRelocationInfo> RelInfo( TheTarget->createMCRelocationInfo(TT, *Ctx)); if (!RelInfo) return nullptr; std::unique_ptr<MCSymbolizer> Symbolizer(TheTarget->createMCSymbolizer( TT, GetOpInfo, SymbolLookUp, DisInfo, Ctx, std::move(RelInfo))); DisAsm->setSymbolizer(std::move(Symbolizer)); // Set up the instruction printer. int AsmPrinterVariant = MAI->getAssemblerDialect(); MCInstPrinter *IP = TheTarget->createMCInstPrinter( Triple(TT), AsmPrinterVariant, *MAI, *MII, *MRI); if (!IP) return nullptr; LLVMDisasmContext *DC = new LLVMDisasmContext(TT, DisInfo, TagType, GetOpInfo, SymbolLookUp, TheTarget, MAI, MRI, STI, MII, Ctx, DisAsm, IP); if (!DC) return nullptr; DC->setCPU(CPU); return DC; } LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *TT, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp) { return LLVMCreateDisasmCPUFeatures(TT, CPU, "", DisInfo, TagType, GetOpInfo, SymbolLookUp); } LLVMDisasmContextRef LLVMCreateDisasm(const char *TT, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp) { return LLVMCreateDisasmCPUFeatures(TT, "", "", DisInfo, TagType, GetOpInfo, SymbolLookUp); } // // LLVMDisasmDispose() disposes of the disassembler specified by the context. // void LLVMDisasmDispose(LLVMDisasmContextRef DCR){ LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); delete DC; } /// Emits the comments that are stored in \p DC comment stream. /// Each comment in the comment stream must end with a newline. static void emitComments(LLVMDisasmContext *DC, formatted_raw_ostream &FormattedOS) { // Flush the stream before taking its content. StringRef Comments = DC->CommentsToEmit.str(); // Get the default information for printing a comment. const MCAsmInfo *MAI = DC->getAsmInfo(); StringRef CommentBegin = MAI->getCommentString(); unsigned CommentColumn = MAI->getCommentColumn(); bool IsFirst = true; while (!Comments.empty()) { if (!IsFirst) FormattedOS << '\n'; // Emit a line of comments. FormattedOS.PadToColumn(CommentColumn); size_t Position = Comments.find('\n'); FormattedOS << CommentBegin << ' ' << Comments.substr(0, Position); // Move after the newline character. Comments = Comments.substr(Position+1); IsFirst = false; } FormattedOS.flush(); // Tell the comment stream that the vector changed underneath it. DC->CommentsToEmit.clear(); } /// Gets latency information for \p Inst from the itinerary /// scheduling model, based on \p DC information. /// \return The maximum expected latency over all the operands or -1 /// if no information is available. static int getItineraryLatency(LLVMDisasmContext *DC, const MCInst &Inst) { const int NoInformationAvailable = -1; // Check if we have a CPU to get the itinerary information. if (DC->getCPU().empty()) return NoInformationAvailable; // Get itinerary information. const MCSubtargetInfo *STI = DC->getSubtargetInfo(); InstrItineraryData IID = STI->getInstrItineraryForCPU(DC->getCPU()); // Get the scheduling class of the requested instruction. const MCInstrDesc& Desc = DC->getInstrInfo()->get(Inst.getOpcode()); unsigned SCClass = Desc.getSchedClass(); int Latency = 0; for (unsigned OpIdx = 0, OpIdxEnd = Inst.getNumOperands(); OpIdx != OpIdxEnd; ++OpIdx) Latency = std::max(Latency, IID.getOperandCycle(SCClass, OpIdx)); return Latency; } /// Gets latency information for \p Inst, based on \p DC information. /// \return The maximum expected latency over all the definitions or -1 /// if no information is available. static int getLatency(LLVMDisasmContext *DC, const MCInst &Inst) { // Try to compute scheduling information. const MCSubtargetInfo *STI = DC->getSubtargetInfo(); const MCSchedModel SCModel = STI->getSchedModel(); const int NoInformationAvailable = -1; // Check if we have a scheduling model for instructions. if (!SCModel.hasInstrSchedModel()) // Try to fall back to the itinerary model if the scheduling model doesn't // have a scheduling table. Note the default does not have a table. return getItineraryLatency(DC, Inst); // Get the scheduling class of the requested instruction. const MCInstrDesc& Desc = DC->getInstrInfo()->get(Inst.getOpcode()); unsigned SCClass = Desc.getSchedClass(); const MCSchedClassDesc *SCDesc = SCModel.getSchedClassDesc(SCClass); // Resolving the variant SchedClass requires an MI to pass to // SubTargetInfo::resolveSchedClass. if (!SCDesc || !SCDesc->isValid() || SCDesc->isVariant()) return NoInformationAvailable; // Compute output latency. int16_t Latency = 0; for (unsigned DefIdx = 0, DefEnd = SCDesc->NumWriteLatencyEntries; DefIdx != DefEnd; ++DefIdx) { // Lookup the definition's write latency in SubtargetInfo. const MCWriteLatencyEntry *WLEntry = STI->getWriteLatencyEntry(SCDesc, DefIdx); Latency = std::max(Latency, WLEntry->Cycles); } return Latency; } /// Emits latency information in DC->CommentStream for \p Inst, based /// on the information available in \p DC. static void emitLatency(LLVMDisasmContext *DC, const MCInst &Inst) { int Latency = getLatency(DC, Inst); // Report only interesting latencies. if (Latency < 2) return; DC->CommentStream << "Latency: " << Latency << '\n'; } // // LLVMDisasmInstruction() disassembles a single instruction using the // disassembler context specified in the parameter DC. The bytes of the // instruction are specified in the parameter Bytes, and contains at least // BytesSize number of bytes. The instruction is at the address specified by // the PC parameter. If a valid instruction can be disassembled its string is // returned indirectly in OutString which whos size is specified in the // parameter OutStringSize. This function returns the number of bytes in the // instruction or zero if there was no valid instruction. If this function // returns zero the caller will have to pick how many bytes they want to step // over by printing a .byte, .long etc. to continue. // size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes, uint64_t BytesSize, uint64_t PC, char *OutString, size_t OutStringSize){ LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); // Wrap the pointer to the Bytes, BytesSize and PC in a MemoryObject. ArrayRef<uint8_t> Data(Bytes, BytesSize); uint64_t Size; MCInst Inst; const MCDisassembler *DisAsm = DC->getDisAsm(); MCInstPrinter *IP = DC->getIP(); MCDisassembler::DecodeStatus S; SmallVector<char, 64> InsnStr; raw_svector_ostream Annotations(InsnStr); S = DisAsm->getInstruction(Inst, Size, Data, PC, /*REMOVE*/ nulls(), Annotations); switch (S) { case MCDisassembler::Fail: case MCDisassembler::SoftFail: // FIXME: Do something different for soft failure modes? return 0; case MCDisassembler::Success: { StringRef AnnotationsStr = Annotations.str(); SmallVector<char, 64> InsnStr; raw_svector_ostream OS(InsnStr); formatted_raw_ostream FormattedOS(OS); IP->printInst(&Inst, FormattedOS, AnnotationsStr, *DC->getSubtargetInfo()); if (DC->getOptions() & LLVMDisassembler_Option_PrintLatency) emitLatency(DC, Inst); emitComments(DC, FormattedOS); assert(OutStringSize != 0 && "Output buffer cannot be zero size"); size_t OutputSize = std::min(OutStringSize-1, InsnStr.size()); std::memcpy(OutString, InsnStr.data(), OutputSize); OutString[OutputSize] = '\0'; // Terminate string. return Size; } } llvm_unreachable("Invalid DecodeStatus!"); } // // LLVMSetDisasmOptions() sets the disassembler's options. It returns 1 if it // can set all the Options and 0 otherwise. // int LLVMSetDisasmOptions(LLVMDisasmContextRef DCR, uint64_t Options){ if (Options & LLVMDisassembler_Option_UseMarkup){ LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); MCInstPrinter *IP = DC->getIP(); IP->setUseMarkup(true); DC->addOptions(LLVMDisassembler_Option_UseMarkup); Options &= ~LLVMDisassembler_Option_UseMarkup; } if (Options & LLVMDisassembler_Option_PrintImmHex){ LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); MCInstPrinter *IP = DC->getIP(); IP->setPrintImmHex(true); DC->addOptions(LLVMDisassembler_Option_PrintImmHex); Options &= ~LLVMDisassembler_Option_PrintImmHex; } if (Options & LLVMDisassembler_Option_AsmPrinterVariant){ LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); // Try to set up the new instruction printer. const MCAsmInfo *MAI = DC->getAsmInfo(); const MCInstrInfo *MII = DC->getInstrInfo(); const MCRegisterInfo *MRI = DC->getRegisterInfo(); int AsmPrinterVariant = MAI->getAssemblerDialect(); AsmPrinterVariant = AsmPrinterVariant == 0 ? 1 : 0; MCInstPrinter *IP = DC->getTarget()->createMCInstPrinter( Triple(DC->getTripleName()), AsmPrinterVariant, *MAI, *MII, *MRI); if (IP) { DC->setIP(IP); DC->addOptions(LLVMDisassembler_Option_AsmPrinterVariant); Options &= ~LLVMDisassembler_Option_AsmPrinterVariant; } } if (Options & LLVMDisassembler_Option_SetInstrComments) { LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); MCInstPrinter *IP = DC->getIP(); IP->setCommentStream(DC->CommentStream); DC->addOptions(LLVMDisassembler_Option_SetInstrComments); Options &= ~LLVMDisassembler_Option_SetInstrComments; } if (Options & LLVMDisassembler_Option_PrintLatency) { LLVMDisasmContext *DC = static_cast<LLVMDisasmContext *>(DCR); DC->addOptions(LLVMDisassembler_Option_PrintLatency); Options &= ~LLVMDisassembler_Option_PrintLatency; } return (Options == 0); }
{ "pile_set_name": "Github" }
/* Animations */ .logo, .about, .headlinks li, nav.archive.header{ opacity: 0; -webkit-transform: translateY(-20px); -moz-transform: translateY(-20px); transform: translateY(-20px); -webkit-animation: fadein .6s .5s 1 forwards ease-in-out; -moz-animation: fadein .6s .5s 1 forwards ease-in-out; animation: fadein .6s .5s 1 forwards ease-in-out; } .about{ -webkit-animation-delay: .8s; -moz-animation-delay: .8s; animation-delay: .8s; } .headlinks li.twitter{ -webkit-animation-delay: 1.1s; -moz-animation-delay: 1.1s; animation-delay: 1.1s; } .headlinks li.github{ -webkit-animation-delay: 1.3s; -moz-animation-delay: 1.3s; animation-delay: 1.3s; } .headlinks li.weibo{ -webkit-animation-delay: 1.5s; -moz-animation-delay: 1.5s; animation-delay: 1.5s; } @-webkit-keyframes fadein{ 0%{ -webkit-transform: translateY(-20px); opacity: 0; } 100%{ -webkit-transform: translateY(0); opacity: 1; } } @-moz-keyframes fadein{ 0%{ -moz-transform: translateY(-20px); opacity: 0; } 100%{ -moz-transform: translateY(0); opacity: 1; } }
{ "pile_set_name": "Github" }
// Copyright 2015-2019 the openage authors. See copying.md for legal info. #include "main_args_link.h" #include <QtQml> #include "../error/error.h" #include "engine_info.h" #include "guisys/link/qml_engine_with_singleton_items_info.h" #include "guisys/link/qtsdl_checked_static_cast.h" namespace openage::gui { namespace { // register "MainArgs" in the qml engine to be used globally. const int registration = qmlRegisterSingletonType<MainArgsLink>("yay.sfttech.openage", 1, 0, "MainArgs", &MainArgsLink::provider); } MainArgsLink::MainArgsLink(QObject *parent, const util::Path &asset_dir) : QObject{parent}, asset_dir{asset_dir} { Q_UNUSED(registration); } QObject* MainArgsLink::provider(QQmlEngine *engine, QJSEngine*) { auto *engine_with_singleton_items_info = qtsdl::checked_static_cast<qtsdl::QmlEngineWithSingletonItemsInfo*>(engine); auto info = static_cast<EngineQMLInfo*>(engine_with_singleton_items_info->get_singleton_items_info()); ENSURE(info, "globals were lost or not passed to the gui subsystem"); // owned by the QML engine return new MainArgsLink{nullptr, info->asset_dir}; } } // namespace openage::gui
{ "pile_set_name": "Github" }
# Handlers for docker
{ "pile_set_name": "Github" }
// Copyright 2015 Brett Vickers. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package etree import ( "io" "strings" ) // A simple stack type stack struct { data []interface{} } func (s *stack) empty() bool { return len(s.data) == 0 } func (s *stack) push(value interface{}) { s.data = append(s.data, value) } func (s *stack) pop() interface{} { value := s.data[len(s.data)-1] s.data[len(s.data)-1] = nil s.data = s.data[:len(s.data)-1] return value } func (s *stack) peek() interface{} { return s.data[len(s.data)-1] } // A fifo is a simple first-in-first-out queue. type fifo struct { data []interface{} head, tail int } func (f *fifo) add(value interface{}) { if f.len()+1 >= len(f.data) { f.grow() } f.data[f.tail] = value if f.tail++; f.tail == len(f.data) { f.tail = 0 } } func (f *fifo) remove() interface{} { value := f.data[f.head] f.data[f.head] = nil if f.head++; f.head == len(f.data) { f.head = 0 } return value } func (f *fifo) len() int { if f.tail >= f.head { return f.tail - f.head } return len(f.data) - f.head + f.tail } func (f *fifo) grow() { c := len(f.data) * 2 if c == 0 { c = 4 } buf, count := make([]interface{}, c), f.len() if f.tail >= f.head { copy(buf[0:count], f.data[f.head:f.tail]) } else { hindex := len(f.data) - f.head copy(buf[0:hindex], f.data[f.head:]) copy(buf[hindex:count], f.data[:f.tail]) } f.data, f.head, f.tail = buf, 0, count } // countReader implements a proxy reader that counts the number of // bytes read from its encapsulated reader. type countReader struct { r io.Reader bytes int64 } func newCountReader(r io.Reader) *countReader { return &countReader{r: r} } func (cr *countReader) Read(p []byte) (n int, err error) { b, err := cr.r.Read(p) cr.bytes += int64(b) return b, err } // countWriter implements a proxy writer that counts the number of // bytes written by its encapsulated writer. type countWriter struct { w io.Writer bytes int64 } func newCountWriter(w io.Writer) *countWriter { return &countWriter{w: w} } func (cw *countWriter) Write(p []byte) (n int, err error) { b, err := cw.w.Write(p) cw.bytes += int64(b) return b, err } // isWhitespace returns true if the byte slice contains only // whitespace characters. func isWhitespace(s string) bool { for i := 0; i < len(s); i++ { if c := s[i]; c != ' ' && c != '\t' && c != '\n' && c != '\r' { return false } } return true } // spaceMatch returns true if namespace a is the empty string // or if namespace a equals namespace b. func spaceMatch(a, b string) bool { switch { case a == "": return true default: return a == b } } // spaceDecompose breaks a namespace:tag identifier at the ':' // and returns the two parts. func spaceDecompose(str string) (space, key string) { colon := strings.IndexByte(str, ':') if colon == -1 { return "", str } return str[:colon], str[colon+1:] } // Strings used by crIndent const ( crsp = "\n " crtab = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" ) // crIndent returns a carriage return followed by n copies of the // first non-CR character in the source string. func crIndent(n int, source string) string { switch { case n < 0: return source[:1] case n < len(source): return source[:n+1] default: return source + strings.Repeat(source[1:2], n-len(source)+1) } } // nextIndex returns the index of the next occurrence of sep in s, // starting from offset. It returns -1 if the sep string is not found. func nextIndex(s, sep string, offset int) int { switch i := strings.Index(s[offset:], sep); i { case -1: return -1 default: return offset + i } } // isInteger returns true if the string s contains an integer. func isInteger(s string) bool { for i := 0; i < len(s); i++ { if (s[i] < '0' || s[i] > '9') && !(i == 0 && s[i] == '-') { return false } } return true }
{ "pile_set_name": "Github" }
1
{ "pile_set_name": "Github" }
<?php /** * @link http://www.iisns.com/ * @copyright Copyright (c) 2015 iiSNS * @license http://www.iisns.com/license/ */ namespace frontend\models; use Yii; use yii\base\Model; use yii\db\Query; use app\modules\home\models\Album; use justinvoelker\tagging\TaggingQuery; /** * ContactForm is the model used by ExploreController. * * @author Shiyang <dr@shiyang.me> */ class Explore extends Model { public static function getAllPhotos() { $query = (new Query())->select('a.id, a.name, p.path, u.username, u.avatar') ->from('{{%home_album}} as a') ->join('LEFT JOIN','{{%home_photo}} as p', 'p.album_id=a.id') ->join('LEFT JOIN','{{%user}} as u', 'a.created_by=u.id') ->where('a.status=:type', [':type' => Album::TYPE_PUBLIC]) ->orderBy('a.id DESC'); return Yii::$app->tools->Pagination($query, 25); } public static function getPostQuery() { return (new Query())->select('e.id, title, content, e.created_at, u.username, u.avatar') ->from('{{%home_post}} as e') ->join('LEFT JOIN','{{%user}} as u', 'u.id=e.user_id') ->where('e.explore_status=1') ->orderBy('e.id DESC'); } public static function getPostTags() { return (new TaggingQuery())->select('tags') ->from('{{%home_post}}') ->where('explore_status=1') ->limit(10) ->displaySort(['freq' => SORT_DESC]) ->getTags(); } public static function getPostList() { return (new Query())->select('e.id, title, content, e.created_at, u.username, u.avatar') ->from('{{%home_post}} as e') ->join('LEFT JOIN','{{%user}} as u', 'u.id=e.user_id') ->where('e.explore_status=1') ->orderBy('e.id DESC'); } public static function getCurrentUserForum() { if (!Yii::$app->user->isGuest) { $myForums = Yii::$app->db->createCommand('SELECT forum_url, forum_name, forum_icon, status FROM {{%forum}} WHERE user_id=' . Yii::$app->user->id)->queryAll(); } else { $myForums = null; } return $myForums; } public static function getForumList() { $forums = (new Query())->select('forum_url,forum_name,forum_desc,forum_icon') ->from('{{%forum}}') ->where('status=1') ->orderBy('id DESC'); return Yii::$app->tools->Pagination($forums); } }
{ "pile_set_name": "Github" }
doctype html html head title= title link(rel='stylesheet', href='/stylesheets/style.css') body block content
{ "pile_set_name": "Github" }
// // XJRankViewController.swift // XJ直播 // // Created by Paul on 2016/12/12. // Copyright © 2016年 Paul. All rights reserved. // import UIKit class XJRankViewController: XJBaseViewController { override func viewDidLoad() { super.viewDidLoad() self.navigationController?.isNavigationBarHidden = true setupUI() } } // MARK: - 设置 UI 界面 extension XJRankViewController { fileprivate func setupUI() { let rect = CGRect(x: 0, y: kStatusBarH, width: kScreenW, height: kScreenH - kStatusBarH) let titles = ["明星榜","富豪榜","人气榜","周星榜"] let style = XJTitleStyle() style.isShowBottomLine = true style.isScrollEnable = false var childVCs = [XJSubbankViewController]() for i in 0..<titles.count { let vc = i == 3 ? XJWeeklyRankViewController() : XJNomalRankViewController() vc.currentIndex = i // vc.view.backgroundColor = UIColor.randomColor() childVCs.append(vc) } let scrollPageView = XJScrollPageView(frame: rect, titles: titles, style: style, childVcs: childVCs, parentVc: self) view.addSubview(scrollPageView) } }
{ "pile_set_name": "Github" }
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. // You may push code into the target .java compilation unit if you wish to edit any member(s). package nl.bzk.brp.model.data.kern; import nl.bzk.brp.model.data.kern.Partij; import org.springframework.beans.factory.annotation.Configurable; privileged aspect Partij_Roo_Configurable { declare @type: Partij: @Configurable; }
{ "pile_set_name": "Github" }
// Copyright (c) 2020 .NET Foundation and Contributors. All rights reserved. // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. namespace ReactiveUI.Tests { public class InteractionBindView : ReactiveObject, IViewFor<InteractionBindViewModel> { private InteractionBindViewModel? _viewModel; object? IViewFor.ViewModel { get => ViewModel; set => ViewModel = (InteractionBindViewModel?)value; } public InteractionBindViewModel? ViewModel { get => _viewModel; set => this.RaiseAndSetIfChanged(ref _viewModel, value); } } }
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x", "filename" : "[抠鼻]@2x.png" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- You may freely edit this file. See commented blocks below for --> <!-- some examples of how to customize the build. --> <!-- (If you delete it and reopen the project it will be recreated.) --> <!-- By default, only the Clean and Build commands use this build script. --> <!-- Commands such as Run, Debug, and Test only use this build script if --> <!-- the Compile on Save feature is turned off for the project. --> <!-- You can turn off the Compile on Save (or Deploy on Save) setting --> <!-- in the project's Project Properties dialog box.--> <project name="MapleCashCosmeticsChecker" default="default" basedir="."> <description>Builds, tests, and runs the project MapleCashCosmeticsChecker.</description> <import file="nbproject/build-impl.xml"/> <!-- There exist several targets which are by default empty and which can be used for execution of your tasks. These targets are usually executed before and after some main targets. They are: -pre-init: called before initialization of project properties -post-init: called after initialization of project properties -pre-compile: called before javac compilation -post-compile: called after javac compilation -pre-compile-single: called before javac compilation of single file -post-compile-single: called after javac compilation of single file -pre-compile-test: called before javac compilation of JUnit tests -post-compile-test: called after javac compilation of JUnit tests -pre-compile-test-single: called before javac compilation of single JUnit test -post-compile-test-single: called after javac compilation of single JUunit test -pre-jar: called before JAR building -post-jar: called after JAR building -post-clean: called after cleaning build products (Targets beginning with '-' are not intended to be called on their own.) Example of inserting an obfuscator after compilation could look like this: <target name="-post-compile"> <obfuscate> <fileset dir="${build.classes.dir}"/> </obfuscate> </target> For list of available properties check the imported nbproject/build-impl.xml file. Another way to customize the build is by overriding existing main targets. The targets of interest are: -init-macrodef-javac: defines macro for javac compilation -init-macrodef-junit: defines macro for junit execution -init-macrodef-debug: defines macro for class debugging -init-macrodef-java: defines macro for class execution -do-jar: JAR building run: execution of project -javadoc-build: Javadoc generation test-report: JUnit report generation An example of overriding the target for project execution could look like this: <target name="run" depends="MapleCashCosmeticsChecker-impl.jar"> <exec dir="bin" executable="launcher.exe"> <arg file="${dist.jar}"/> </exec> </target> Notice that the overridden target depends on the jar target and not only on the compile target as the regular run target does. Again, for a list of available properties which you can use, check the target you are overriding in the nbproject/build-impl.xml file. --> </project>
{ "pile_set_name": "Github" }
# util-extend The Node object extending function that Node uses for Node! ## Usage ```js var extend = require('util-extend'); function functionThatTakesOptions(options) { var options = extend(defaults, options); // now any unset options are set to the defaults. } ```
{ "pile_set_name": "Github" }
# -*- coding: utf-8 from globaleaks import models from globaleaks.handlers.admin.field import db_create_field, db_update_field, db_create_option_trigger, db_reset_option_triggers from globaleaks.handlers.base import BaseHandler from globaleaks.handlers.operation import OperationHandler from globaleaks.handlers.public import serialize_step from globaleaks.models import fill_localized_keys from globaleaks.orm import transact, tw from globaleaks.rest import requests, errors def db_create_step(session, tid, request, language): """ Transaction for creating a step :param session: An ORM session :param tid: A tenant ID :param request: The request data :param session: the session on which perform queries. :param language: the language of the specified steps. """ fill_localized_keys(request, models.Step.localized_keys, language) step = models.db_forge_obj(session, models.Step, request) for trigger in request.get('triggered_by_options', []): db_create_option_trigger(session, trigger['option'], 'step', step.id, trigger.get('sufficient', True)) for c in request['children']: c['tid'] = tid c['step_id'] = step.id db_create_field(session, tid, c, language) return serialize_step(session, tid, step, language) def db_update_step(session, tid, step_id, request, language): """ Transaction for updating a step :param session: An ORM session :param tid: The tenant ID :param step_id: the step_id of the step to update :param request: the step definition dict :param language: the language of the step definition dict :return: a serialization of the object """ step = models.db_get(session, models.Step, models.Step.id == step_id, models.Questionnaire.id == models.Step.questionnaire_id, models.Questionnaire.tid == tid) fill_localized_keys(request, models.Step.localized_keys, language) step.update(request) for child in request['children']: db_update_field(session, tid, child['id'], child, language) db_reset_option_triggers(session, 'step', step.id) for trigger in request.get('triggered_by_options', []): db_create_option_trigger(session, trigger['option'], 'step', step.id, trigger.get('sufficient', True)) return serialize_step(session, tid, step, language) def db_delete_step(session, tid, step_id): subquery = session.query(models.Questionnaire.id).filter(models.Questionnaire.tid == tid).subquery() session.query(models.Step).filter(models.Step.id == step_id, models.Step.questionnaire_id.in_(subquery)).delete(synchronize_session=False) @transact def order_elements(session, handler, req_args, *args, **kwargs): steps = session.query(models.Step) \ .filter(models.Step.questionnaire_id == req_args['questionnaire_id'], models.Questionnaire.id == req_args['questionnaire_id'], models.Questionnaire.tid == handler.request.tid) id_dict = {step.id: step for step in steps} ids = req_args['ids'] if len(ids) != len(id_dict) and set(ids) != set(id_dict): raise errors.InputValidationError('list does not contain all context ids') for i, step_id in enumerate(ids): id_dict[step_id].order = i class StepCollection(OperationHandler): check_roles = 'admin' cache_resource = True invalidate_cache = True def post(self): request = self.validate_message(self.request.content.read(), requests.AdminStepDesc) return tw(db_create_step, self.request.tid, request, self.request.language) def operation_descriptors(self): return { 'order_elements': ( order_elements, { 'questionnaire_id': requests.uuid_regexp, 'ids': [str], } ) } class StepInstance(BaseHandler): check_roles = 'admin' invalidate_cache = True def put(self, step_id): request = self.validate_message(self.request.content.read(), requests.AdminStepDesc) return tw(db_update_step, self.request.tid, step_id, request, self.request.language) def delete(self, step_id): return tw(db_delete_step, self.request.tid, step_id)
{ "pile_set_name": "Github" }
import { Registry } from '../utils/Registry'; import { FieldConfigPropertyItem } from '../types/fieldOverrides'; export class FieldConfigOptionsRegistry extends Registry<FieldConfigPropertyItem> {}
{ "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. // #pragma mark - // // File: /Applications/Xcode-7GM.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox // UUID: C8DEA8AF-E162-3886-8500-DE0EDC8B7373 // // Arch: x86_64 // Current version: 492.0.0 // Compatibility version: 1.0.0 // Source version: 801.4.2.0.0 // Minimum iOS version: 9.0.0 // SDK version: 9.0.0 // // // This file does not contain any Objective-C runtime information. //
{ "pile_set_name": "Github" }
/* BSD 2-Clause License Copyright Vulcan Inc. 2017-2018 and Living Computer Museum + Labs 2018 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace D.Debugger { partial class CPDebugger { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.IOPSourceBox = new System.Windows.Forms.GroupBox(); this.Disassembly = new D.Debugger.MicrocodeDisplay(); this.SourceFiles = new System.Windows.Forms.ListBox(); this.SourceDisplay = new D.Debugger.SourceDisplay(); this.dataGridViewCheckBoxColumn3 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn4 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn5 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn6 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn7 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn8 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewCheckBoxColumn9 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.IOPSourceBox.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Disassembly)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.SourceDisplay)).BeginInit(); this.SuspendLayout(); // // IOPSourceBox // this.IOPSourceBox.Controls.Add(this.Disassembly); this.IOPSourceBox.Controls.Add(this.SourceFiles); this.IOPSourceBox.Controls.Add(this.SourceDisplay); this.IOPSourceBox.Location = new System.Drawing.Point(10, 5); this.IOPSourceBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.IOPSourceBox.Name = "IOPSourceBox"; this.IOPSourceBox.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); this.IOPSourceBox.Size = new System.Drawing.Size(1256, 1129); this.IOPSourceBox.TabIndex = 2; this.IOPSourceBox.TabStop = false; this.IOPSourceBox.Text = "Microcode Source"; // // Disassembly // this.Disassembly.AllowUserToAddRows = false; this.Disassembly.AllowUserToDeleteRows = false; this.Disassembly.AllowUserToResizeColumns = false; this.Disassembly.AllowUserToResizeRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver; this.Disassembly.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.Disassembly.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle2.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.Disassembly.DefaultCellStyle = dataGridViewCellStyle2; this.Disassembly.Location = new System.Drawing.Point(230, 712); this.Disassembly.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Disassembly.Name = "Disassembly"; this.Disassembly.RowHeadersVisible = false; this.Disassembly.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; this.Disassembly.Size = new System.Drawing.Size(1017, 403); this.Disassembly.TabIndex = 2; this.Disassembly.VirtualMode = true; this.Disassembly.SelectionChanged += new System.EventHandler(this.OnDisassemblySelectionChanged); // // SourceFiles // this.SourceFiles.FormattingEnabled = true; this.SourceFiles.ItemHeight = 20; this.SourceFiles.Location = new System.Drawing.Point(10, 31); this.SourceFiles.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SourceFiles.Name = "SourceFiles"; this.SourceFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.SourceFiles.Size = new System.Drawing.Size(206, 1084); this.SourceFiles.TabIndex = 1; this.SourceFiles.Click += new System.EventHandler(this.OnSourceFilesClicked); this.SourceFiles.DoubleClick += new System.EventHandler(this.OnSourceFilesDoubleClicked); // // SourceDisplay // this.SourceDisplay.AllowUserToAddRows = false; this.SourceDisplay.AllowUserToDeleteRows = false; this.SourceDisplay.AllowUserToResizeColumns = false; this.SourceDisplay.AllowUserToResizeRows = false; this.SourceDisplay.BorderStyle = System.Windows.Forms.BorderStyle.None; this.SourceDisplay.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical; this.SourceDisplay.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle3.NullValue = null; dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.SourceDisplay.DefaultCellStyle = dataGridViewCellStyle3; this.SourceDisplay.Location = new System.Drawing.Point(228, 29); this.SourceDisplay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SourceDisplay.Name = "SourceDisplay"; this.SourceDisplay.RowHeadersVisible = false; this.SourceDisplay.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; this.SourceDisplay.RowTemplate.Height = 18; this.SourceDisplay.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.SourceDisplay.Size = new System.Drawing.Size(1018, 672); this.SourceDisplay.TabIndex = 0; this.SourceDisplay.VirtualMode = true; this.SourceDisplay.SelectionChanged += new System.EventHandler(this.OnSourceDisplaySelectionChanged); this.SourceDisplay.MouseClick += new System.Windows.Forms.MouseEventHandler(this.OnSourceDisplayMouseClick); // // dataGridViewCheckBoxColumn3 // this.dataGridViewCheckBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn3.HeaderText = "B"; this.dataGridViewCheckBoxColumn3.Name = "dataGridViewCheckBoxColumn3"; this.dataGridViewCheckBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn5 // this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn5.HeaderText = "Address"; this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; this.dataGridViewTextBoxColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn6 // this.dataGridViewTextBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn6.HeaderText = "Source"; this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; this.dataGridViewTextBoxColumn6.ReadOnly = true; this.dataGridViewTextBoxColumn6.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn1 // this.dataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn1.HeaderText = "B"; this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1"; this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn1 // this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn1.HeaderText = "Address"; this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; this.dataGridViewTextBoxColumn1.ReadOnly = true; this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn2 // this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn2.HeaderText = "Disassembly"; this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.ReadOnly = true; this.dataGridViewTextBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn2 // this.dataGridViewCheckBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn2.HeaderText = "B"; this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2"; this.dataGridViewCheckBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn3 // this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn3.HeaderText = "Address"; this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; this.dataGridViewTextBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn4 // this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn4.HeaderText = "Source"; this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; this.dataGridViewTextBoxColumn4.ReadOnly = true; this.dataGridViewTextBoxColumn4.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn4 // this.dataGridViewCheckBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn4.HeaderText = "B"; this.dataGridViewCheckBoxColumn4.Name = "dataGridViewCheckBoxColumn4"; this.dataGridViewCheckBoxColumn4.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn7 // this.dataGridViewTextBoxColumn7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn7.HeaderText = "Address"; this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; this.dataGridViewTextBoxColumn7.ReadOnly = true; this.dataGridViewTextBoxColumn7.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn8 // this.dataGridViewTextBoxColumn8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn8.HeaderText = "Disassembly"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; this.dataGridViewTextBoxColumn8.ReadOnly = true; this.dataGridViewTextBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn5 // this.dataGridViewCheckBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn5.HeaderText = "B"; this.dataGridViewCheckBoxColumn5.Name = "dataGridViewCheckBoxColumn5"; this.dataGridViewCheckBoxColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn9 // this.dataGridViewTextBoxColumn9.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn9.HeaderText = "Address"; this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; this.dataGridViewTextBoxColumn9.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn10 // this.dataGridViewTextBoxColumn10.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn10.HeaderText = "Source"; this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; this.dataGridViewTextBoxColumn10.ReadOnly = true; this.dataGridViewTextBoxColumn10.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn6 // this.dataGridViewCheckBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn6.HeaderText = "B"; this.dataGridViewCheckBoxColumn6.Name = "dataGridViewCheckBoxColumn6"; this.dataGridViewCheckBoxColumn6.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn11 // this.dataGridViewTextBoxColumn11.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn11.HeaderText = "Address"; this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11"; this.dataGridViewTextBoxColumn11.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn12 // this.dataGridViewTextBoxColumn12.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn12.HeaderText = "Disassembly"; this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12"; this.dataGridViewTextBoxColumn12.ReadOnly = true; this.dataGridViewTextBoxColumn12.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn7 // this.dataGridViewCheckBoxColumn7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn7.HeaderText = "B"; this.dataGridViewCheckBoxColumn7.Name = "dataGridViewCheckBoxColumn7"; this.dataGridViewCheckBoxColumn7.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn13 // this.dataGridViewTextBoxColumn13.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn13.HeaderText = "Address"; this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13"; this.dataGridViewTextBoxColumn13.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn14 // this.dataGridViewTextBoxColumn14.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn14.HeaderText = "Source"; this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14"; this.dataGridViewTextBoxColumn14.ReadOnly = true; this.dataGridViewTextBoxColumn14.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn8 // this.dataGridViewCheckBoxColumn8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn8.HeaderText = "B"; this.dataGridViewCheckBoxColumn8.Name = "dataGridViewCheckBoxColumn8"; this.dataGridViewCheckBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn15 // this.dataGridViewTextBoxColumn15.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn15.HeaderText = "Address"; this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15"; this.dataGridViewTextBoxColumn15.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn15.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn16 // this.dataGridViewTextBoxColumn16.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn16.HeaderText = "Disassembly"; this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16"; this.dataGridViewTextBoxColumn16.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn16.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewCheckBoxColumn9 // this.dataGridViewCheckBoxColumn9.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewCheckBoxColumn9.HeaderText = "B"; this.dataGridViewCheckBoxColumn9.Name = "dataGridViewCheckBoxColumn9"; this.dataGridViewCheckBoxColumn9.Resizable = System.Windows.Forms.DataGridViewTriState.False; // // dataGridViewTextBoxColumn17 // this.dataGridViewTextBoxColumn17.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; this.dataGridViewTextBoxColumn17.HeaderText = "Address"; this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17"; this.dataGridViewTextBoxColumn17.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // dataGridViewTextBoxColumn18 // this.dataGridViewTextBoxColumn18.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn18.HeaderText = "Source"; this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18"; this.dataGridViewTextBoxColumn18.ReadOnly = true; this.dataGridViewTextBoxColumn18.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewTextBoxColumn18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // CPDebugger // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1274, 1138); this.ControlBox = false; this.Controls.Add(this.IOPSourceBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.KeyPreview = true; this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "CPDebugger"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "CP Debugger"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.CPDebugger_FormClosed); this.IOPSourceBox.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.Disassembly)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.SourceDisplay)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.GroupBox IOPSourceBox; private SourceDisplay SourceDisplay; private System.Windows.Forms.ListBox SourceFiles; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; private MicrocodeDisplay Disassembly; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn4; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn6; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn7; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn14; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn8; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn15; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn16; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn9; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18; } }
{ "pile_set_name": "Github" }
/* Names of various DWARF tags. Copyright (C) 2012-2019 Free Software Foundation, Inc. This file is part of GNU CC. GNU CC 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, or (at your option) any later version. In addition to the permissions in the GNU General Public License, the Free Software Foundation gives you unlimited permission to link the compiled version of this file into combinations with other programs, and to distribute those combinations without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into a combined executable.) GNU CC 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 GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "dwarf2.h" #define DW_FIRST_TAG(name, value) \ const char *get_DW_TAG_name (unsigned int tag) \ { switch (tag) { \ DW_TAG (name, value) #define DW_END_TAG } return 0; } #define DW_FIRST_FORM(name, value) \ const char *get_DW_FORM_name (unsigned int form) \ { switch (form) { \ DW_FORM (name, value) #define DW_END_FORM } return 0; } #define DW_FIRST_AT(name, value) \ const char *get_DW_AT_name (unsigned int attr) { \ switch (attr) { \ DW_AT (name, value) #define DW_END_AT } return 0; } #define DW_FIRST_OP(name, value) \ const char *get_DW_OP_name (unsigned int op) { \ switch (op) { \ DW_OP (name, value) #define DW_END_OP } return 0; } #define DW_FIRST_ATE(name, value) \ const char *get_DW_ATE_name (unsigned int enc) { \ switch (enc) { \ DW_ATE (name, value) #define DW_END_ATE } return 0; } #define DW_FIRST_CFA(name, value) \ const char *get_DW_CFA_name (unsigned int opc) { \ switch (opc) { \ DW_CFA (name, value) #define DW_END_CFA } return 0; } #define DW_FIRST_IDX(name, value) \ const char *get_DW_IDX_name (unsigned int idx) { \ switch (idx) { \ DW_IDX (name, value) #define DW_END_IDX } return 0; } #define DW_TAG(name, value) case name: return # name ; #define DW_TAG_DUP(name, value) #define DW_FORM(name, value) case name: return # name ; #define DW_AT(name, value) case name: return # name ; #define DW_AT_DUP(name, value) #define DW_OP(name, value) case name: return # name ; #define DW_OP_DUP(name, value) #define DW_ATE(name, value) case name: return # name ; #define DW_ATE_DUP(name, value) #define DW_CFA(name, value) case name: return # name ; #define DW_CFA_DUP(name, value) #define DW_IDX(name, value) case name: return # name ; #define DW_IDX_DUP(name, value) #include "dwarf2.def" #undef DW_FIRST_TAG #undef DW_END_TAG #undef DW_FIRST_FORM #undef DW_END_FORM #undef DW_FIRST_AT #undef DW_END_AT #undef DW_FIRST_OP #undef DW_END_OP #undef DW_FIRST_ATE #undef DW_END_ATE #undef DW_FIRST_CFA #undef DW_END_CFA #undef DW_FIRST_IDX #undef DW_END_IDX #undef DW_TAG #undef DW_TAG_DUP #undef DW_FORM #undef DW_AT #undef DW_AT_DUP #undef DW_OP #undef DW_OP_DUP #undef DW_ATE #undef DW_ATE_DUP #undef DW_CFA #undef DW_CFA_DUP #undef DW_IDX #undef DW_IDX_DUP
{ "pile_set_name": "Github" }
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package auth import ( "bytes" rand "crypto/rand" mrand "math/rand" "testing" ) // Test cases are from RFC 4231, and match those present in the tests directory // of the download here: https://nacl.cr.yp.to/install.html var testCases = []struct { key [32]byte msg []byte out [32]byte }{ { key: [32]byte{ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, }, msg: []byte("Hi There"), out: [32]byte{ 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78, 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde, }, }, { key: [32]byte{'J', 'e', 'f', 'e'}, msg: []byte("what do ya want for nothing?"), out: [32]byte{ 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6, 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54, }, }, { key: [32]byte{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, }, msg: []byte{ // 50 bytes of 0xdd 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, }, out: [32]byte{ 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9, 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36, 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39, }, }, { key: [32]byte{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, }, msg: []byte{ 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, }, out: [32]byte{ 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69, 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7, 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d, 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb, }, }, } func TestSum(t *testing.T) { for i, test := range testCases { tag := Sum(test.msg, &test.key) if !bytes.Equal(tag[:], test.out[:]) { t.Errorf("#%d: Sum: got\n%x\nwant\n%x", i, tag, test.out) } } } func TestVerify(t *testing.T) { wrongMsg := []byte("unknown msg") for i, test := range testCases { if !Verify(test.out[:], test.msg, &test.key) { t.Errorf("#%d: Verify(%x, %q, %x) failed", i, test.out, test.msg, test.key) } if Verify(test.out[:], wrongMsg, &test.key) { t.Errorf("#%d: Verify(%x, %q, %x) unexpectedly passed", i, test.out, wrongMsg, test.key) } } } func TestStress(t *testing.T) { if testing.Short() { t.Skip("exhaustiveness test") } var key [32]byte msg := make([]byte, 10000) prng := mrand.New(mrand.NewSource(0)) // copied from tests/auth5.c in nacl for i := 0; i < 10000; i++ { if _, err := rand.Read(key[:]); err != nil { t.Fatal(err) } if _, err := rand.Read(msg[:i]); err != nil { t.Fatal(err) } tag := Sum(msg[:i], &key) if !Verify(tag[:], msg[:i], &key) { t.Errorf("#%d: unexpected failure from Verify", i) } if i > 0 { msgIndex := prng.Intn(i) oldMsgByte := msg[msgIndex] msg[msgIndex] += byte(1 + prng.Intn(255)) if Verify(tag[:], msg[:i], &key) { t.Errorf("#%d: unexpected success from Verify after corrupting message", i) } msg[msgIndex] = oldMsgByte tag[prng.Intn(len(tag))] += byte(1 + prng.Intn(255)) if Verify(tag[:], msg[:i], &key) { t.Errorf("#%d: unexpected success from Verify after corrupting authenticator", i) } } } } func BenchmarkAuth(b *testing.B) { var key [32]byte if _, err := rand.Read(key[:]); err != nil { b.Fatal(err) } buf := make([]byte, 1024) if _, err := rand.Read(buf[:]); err != nil { b.Fatal(err) } b.SetBytes(int64(len(buf))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { tag := Sum(buf, &key) if Verify(tag[:], buf, &key) == false { b.Fatal("unexpected failure from Verify") } } }
{ "pile_set_name": "Github" }
#pragma once #include <memory> #include "envoy/buffer/buffer.h" #include "zlib.h" namespace Envoy { namespace Zlib { /** * Shared code between the compressor and the decompressor. */ // TODO(junr03): move to extensions tree once the compressor side is moved to extensions. class Base { public: Base(uint64_t chunk_size, std::function<void(z_stream*)> zstream_deleter); /** * It returns the checksum of all output produced so far. Compressor's checksum at the end of * the stream has to match decompressor's checksum produced at the end of the decompression. * Likewise, the decompressor's checksum has to match the compressor's checksum at the end of * compression. * @return uint64_t CRC-32 if a gzip stream is being read or Adler-32 for other compression * types. */ uint64_t checksum(); protected: void updateOutput(Buffer::Instance& output_buffer); const uint64_t chunk_size_; bool initialized_{false}; const std::unique_ptr<unsigned char[]> chunk_char_ptr_; const std::unique_ptr<z_stream, std::function<void(z_stream*)>> zstream_ptr_; }; } // namespace Zlib } // namespace Envoy
{ "pile_set_name": "Github" }
diff -uNr patch-2.7.6/lib/tempname.c patch-2.7.6.mod/lib/tempname.c --- patch-2.7.6/lib/tempname.c 2018-02-03 14:41:53.000000000 +0200 +++ patch-2.7.6.mod/lib/tempname.c 2019-03-01 18:34:47.353225515 +0200 @@ -32,7 +32,7 @@ #include <stdio.h> #ifndef P_tmpdir -# define P_tmpdir "/tmp" +# define P_tmpdir "@TERMUX_PREFIX@/tmp" #endif #ifndef TMP_MAX # define TMP_MAX 238328 @@ -147,8 +147,8 @@ { if (direxists (P_tmpdir)) dir = P_tmpdir; - else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) - dir = "/tmp"; + else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp")) + dir = "@TERMUX_PREFIX@/tmp"; else { __set_errno (ENOENT); diff -uNr patch-2.7.6/src/util.c patch-2.7.6.mod/src/util.c --- patch-2.7.6/src/util.c 2018-02-03 14:41:49.000000000 +0200 +++ patch-2.7.6.mod/src/util.c 2019-03-01 18:35:00.313283739 +0200 @@ -1601,7 +1601,7 @@ } #ifndef TMPDIR -#define TMPDIR "/tmp" +#define TMPDIR "@TERMUX_PREFIX@/tmp" #endif struct try_safe_open_args
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="sCheckingForUpdates" xml:space="preserve"> <value>Checking for updates...</value> </data> <data name="sLastCheck" xml:space="preserve"> <value>Last check {0}</value> <comment></comment></data> <data name="sLatestVersion" xml:space="preserve"> <value>You have the latest version.</value> <comment></comment></data> <data name="sSkipping" xml:space="preserve"> <value>Skipping this version.</value> <comment></comment></data> <data name="sUpdateAvailable" xml:space="preserve"> <value>An update is available.</value> <comment></comment></data> </root>
{ "pile_set_name": "Github" }
package token // StringSet is a useful type for looking up strings. type stringSet map[string]struct{} // NewStringSet creates a new StringSet with the given strings. func newStringSet(keys ...string) stringSet { ss := make(stringSet, len(keys)) ss.add(keys...) return ss } // Add inserts the given keys into this StringSet. func (ss stringSet) add(keys ...string) { for _, key := range keys { ss[key] = struct{}{} } } // Contains returns whether the given key is in this StringSet. func (ss stringSet) contains(key string) bool { _, ok := ss[key] return ok } // Keys returns a slice of all keys in this StringSet. func (ss stringSet) keys() []string { keys := make([]string, 0, len(ss)) for key := range ss { keys = append(keys, key) } return keys }
{ "pile_set_name": "Github" }
package net.mamoe.mirai.qqandroid.network.protocol.data.jce import kotlinx.serialization.Serializable import net.mamoe.mirai.qqandroid.network.Packet import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY import net.mamoe.mirai.qqandroid.utils.io.JceStruct import net.mamoe.mirai.qqandroid.utils.io.serialization.tars.TarsId import kotlin.jvm.JvmField @Suppress("ArrayInDataClass") @Serializable internal class RequestPushNotify( @TarsId(0) @JvmField val uin: Long? = 0L, @TarsId(1) @JvmField val ctype: Byte = 0, @TarsId(2) @JvmField val strService: String?, @TarsId(3) @JvmField val strCmd: String?, @TarsId(4) @JvmField val vNotifyCookie: ByteArray? = EMPTY_BYTE_ARRAY, @TarsId(5) @JvmField val usMsgType: Int?, @TarsId(6) @JvmField val wUserActive: Int?, @TarsId(7) @JvmField val wGeneralFlag: Int?, @TarsId(8) @JvmField val bindedUin: Long?, @TarsId(9) @JvmField val stMsgInfo: MsgInfo?, @TarsId(10) @JvmField val msgCtrlBuf: String?, @TarsId(11) @JvmField val serverBuf: ByteArray?, @TarsId(12) @JvmField val pingFlag: Long?, @TarsId(13) @JvmField val svrip: Int? ) : JceStruct, Packet @Serializable internal class MsgInfo( @TarsId(0) @JvmField val lFromUin: Long = 0L, @TarsId(1) @JvmField val uMsgTime: Long = 0L, @TarsId(2) @JvmField val shMsgType: Short, @TarsId(3) @JvmField val shMsgSeq: Short, @TarsId(4) @JvmField val strMsg: String?, @TarsId(5) @JvmField val uRealMsgTime: Int?, @TarsId(6) @JvmField val vMsg: ByteArray, @TarsId(7) @JvmField val uAppShareID: Long?, @TarsId(8) @JvmField val vMsgCookies: ByteArray? = EMPTY_BYTE_ARRAY, @TarsId(9) @JvmField val vAppShareCookie: ByteArray? = EMPTY_BYTE_ARRAY, @TarsId(10) @JvmField val lMsgUid: Long?, @TarsId(11) @JvmField val lLastChangeTime: Long?, @TarsId(12) @JvmField val vCPicInfo: List<CPicInfo>?, @TarsId(13) @JvmField val stShareData: ShareData?, @TarsId(14) @JvmField val lFromInstId: Long?, @TarsId(15) @JvmField val vRemarkOfSender: ByteArray?, @TarsId(16) @JvmField val strFromMobile: String?, @TarsId(17) @JvmField val strFromName: String?, @TarsId(18) @JvmField val vNickName: List<String>?//, //@SerialId(19) @JvmField val stC2CTmpMsgHead: TempMsgHead? ) : JceStruct @Serializable internal class ShareData( @TarsId(0) @JvmField val pkgname: String = "", @TarsId(1) @JvmField val msgtail: String = "", @TarsId(2) @JvmField val picurl: String = "", @TarsId(3) @JvmField val url: String = "" ) : JceStruct @Serializable internal class TempMsgHead( @TarsId(0) @JvmField val c2c_type: Int? = 0, @TarsId(1) @JvmField val serviceType: Int? = 0 ) : JceStruct @Serializable internal class CPicInfo( @TarsId(0) @JvmField val vPath: ByteArray = EMPTY_BYTE_ARRAY, @TarsId(1) @JvmField val vHost: ByteArray? = EMPTY_BYTE_ARRAY ) : JceStruct
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -triple arm-linux-gnueabi -emit-llvm %s -o - | FileCheck %s -check-prefix=ARM // RUN: %clang_cc1 -triple powerpc-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=PPC32 // RUN: %clang_cc1 -triple powerpc64-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=PPC64 // RUN: %clang_cc1 -triple mipsel-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=MIPS32 // RUN: %clang_cc1 -triple mipsisa32r6el-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=MIPS32 // RUN: %clang_cc1 -triple mips64el-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=MIPS64 // RUN: %clang_cc1 -triple mips64el-linux-gnuabi64 -emit-llvm %s -o - | FileCheck %s -check-prefix=MIPS64 // RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnuabi64 -emit-llvm %s -o - | FileCheck %s -check-prefix=MIPS64 // RUN: %clang_cc1 -triple sparc-unknown-eabi -emit-llvm %s -o - | FileCheck %s -check-prefix=SPARCV8 -check-prefix=SPARC // RUN: %clang_cc1 -triple sparcv9-unknown-eabi -emit-llvm %s -o - | FileCheck %s -check-prefix=SPARCV9 -check-prefix=SPARC unsigned char c1, c2; unsigned short s1, s2; unsigned int i1, i2; unsigned long long ll1, ll2; unsigned char a1[100], a2[100]; enum memory_order { memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release, memory_order_acq_rel, memory_order_seq_cst }; void test1(void) { (void)__atomic_load(&c1, &c2, memory_order_seq_cst); (void)__atomic_store(&c1, &c2, memory_order_seq_cst); (void)__atomic_load(&s1, &s2, memory_order_seq_cst); (void)__atomic_store(&s1, &s2, memory_order_seq_cst); (void)__atomic_load(&i1, &i2, memory_order_seq_cst); (void)__atomic_store(&i1, &i2, memory_order_seq_cst); (void)__atomic_load(&ll1, &ll2, memory_order_seq_cst); (void)__atomic_store(&ll1, &ll2, memory_order_seq_cst); (void)__atomic_load(&a1, &a2, memory_order_seq_cst); (void)__atomic_store(&a1, &a2, memory_order_seq_cst); // ARM-LABEL: define{{.*}} void @test1 // ARM: = call{{.*}} zeroext i8 @__atomic_load_1(i8* @c1 // ARM: call{{.*}} void @__atomic_store_1(i8* @c1, i8 zeroext // ARM: = call{{.*}} zeroext i16 @__atomic_load_2(i8* bitcast (i16* @s1 to i8*) // ARM: call{{.*}} void @__atomic_store_2(i8* bitcast (i16* @s1 to i8*), i16 zeroext // ARM: = call{{.*}} i32 @__atomic_load_4(i8* bitcast (i32* @i1 to i8*) // ARM: call{{.*}} void @__atomic_store_4(i8* bitcast (i32* @i1 to i8*), i32 // ARM: = call{{.*}} i64 @__atomic_load_8(i8* bitcast (i64* @ll1 to i8*) // ARM: call{{.*}} void @__atomic_store_8(i8* bitcast (i64* @ll1 to i8*), i64 // ARM: call{{.*}} void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // ARM: call{{.*}} void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC32-LABEL: define void @test1 // PPC32: = load atomic i8, i8* @c1 seq_cst // PPC32: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC32: = load atomic i16, i16* @s1 seq_cst // PPC32: store atomic i16 {{.*}}, i16* @s1 seq_cst // PPC32: = load atomic i32, i32* @i1 seq_cst // PPC32: store atomic i32 {{.*}}, i32* @i1 seq_cst // PPC32: = call i64 @__atomic_load_8(i8* bitcast (i64* @ll1 to i8*) // PPC32: call void @__atomic_store_8(i8* bitcast (i64* @ll1 to i8*), i64 // PPC32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC64-LABEL: define void @test1 // PPC64: = load atomic i8, i8* @c1 seq_cst // PPC64: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC64: = load atomic i16, i16* @s1 seq_cst // PPC64: store atomic i16 {{.*}}, i16* @s1 seq_cst // PPC64: = load atomic i32, i32* @i1 seq_cst // PPC64: store atomic i32 {{.*}}, i32* @i1 seq_cst // PPC64: = load atomic i64, i64* @ll1 seq_cst // PPC64: store atomic i64 {{.*}}, i64* @ll1 seq_cst // PPC64: call void @__atomic_load(i64 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC64: call void @__atomic_store(i64 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // MIPS32-LABEL: define void @test1 // MIPS32: = load atomic i8, i8* @c1 seq_cst // MIPS32: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS32: = load atomic i16, i16* @s1 seq_cst // MIPS32: store atomic i16 {{.*}}, i16* @s1 seq_cst // MIPS32: = load atomic i32, i32* @i1 seq_cst // MIPS32: store atomic i32 {{.*}}, i32* @i1 seq_cst // MIPS32: call i64 @__atomic_load_8(i8* bitcast (i64* @ll1 to i8*) // MIPS32: call void @__atomic_store_8(i8* bitcast (i64* @ll1 to i8*), i64 // MIPS32: call void @__atomic_load(i32 signext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // MIPS32: call void @__atomic_store(i32 signext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // MIPS64-LABEL: define void @test1 // MIPS64: = load atomic i8, i8* @c1 seq_cst // MIPS64: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS64: = load atomic i16, i16* @s1 seq_cst // MIPS64: store atomic i16 {{.*}}, i16* @s1 seq_cst // MIPS64: = load atomic i32, i32* @i1 seq_cst // MIPS64: store atomic i32 {{.*}}, i32* @i1 seq_cst // MIPS64: = load atomic i64, i64* @ll1 seq_cst // MIPS64: store atomic i64 {{.*}}, i64* @ll1 seq_cst // MIPS64: call void @__atomic_load(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0) // MIPS64: call void @__atomic_store(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // SPARC-LABEL: define void @test1 // SPARC: = load atomic i8, i8* @c1 seq_cst // SPARC: store atomic i8 {{.*}}, i8* @c1 seq_cst // SPARC: = load atomic i16, i16* @s1 seq_cst // SPARC: store atomic i16 {{.*}}, i16* @s1 seq_cst // SPARC: = load atomic i32, i32* @i1 seq_cst // SPARC: store atomic i32 {{.*}}, i32* @i1 seq_cst // SPARCV8: call i64 @__atomic_load_8(i8* bitcast (i64* @ll1 to i8*) // SPARCV8: call void @__atomic_store_8(i8* bitcast (i64* @ll1 to i8*), i64 // SPARCV9: load atomic i64, i64* @ll1 seq_cst, align 8 // SPARCV9: store atomic i64 {{.*}}, i64* @ll1 seq_cst, align 8 // SPARCV8: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // SPARCV8: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) }
{ "pile_set_name": "Github" }
package yaml const ( // The size of the input raw buffer. input_raw_buffer_size = 512 // The size of the input buffer. // It should be possible to decode the whole raw buffer. input_buffer_size = input_raw_buffer_size * 3 // The size of the output buffer. output_buffer_size = 128 // The size of the output raw buffer. // It should be possible to encode the whole output buffer. output_raw_buffer_size = (output_buffer_size*2 + 2) // The size of other stacks and queues. initial_stack_size = 16 initial_queue_size = 16 initial_string_size = 16 ) // Check if the character at the specified position is an alphabetical // character, a digit, '_', or '-'. func is_alpha(b []byte, i int) bool { return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' } // Check if the character at the specified position is a digit. func is_digit(b []byte, i int) bool { return b[i] >= '0' && b[i] <= '9' } // Get the value of a digit. func as_digit(b []byte, i int) int { return int(b[i]) - '0' } // Check if the character at the specified position is a hex-digit. func is_hex(b []byte, i int) bool { return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' } // Get the value of a hex-digit. func as_hex(b []byte, i int) int { bi := b[i] if bi >= 'A' && bi <= 'F' { return int(bi) - 'A' + 10 } if bi >= 'a' && bi <= 'f' { return int(bi) - 'a' + 10 } return int(bi) - '0' } // Check if the character is ASCII. func is_ascii(b []byte, i int) bool { return b[i] <= 0x7F } // Check if the character at the start of the buffer can be printed unescaped. func is_printable(b []byte, i int) bool { return ((b[i] == 0x0A) || // . == #x0A (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF (b[i] > 0xC2 && b[i] < 0xED) || (b[i] == 0xED && b[i+1] < 0xA0) || (b[i] == 0xEE) || (b[i] == 0xEF && // #xE000 <= . <= #xFFFD !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) } // Check if the character at the specified position is NUL. func is_z(b []byte, i int) bool { return b[i] == 0x00 } // Check if the beginning of the buffer is a BOM. func is_bom(b []byte, i int) bool { return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF } // Check if the character at the specified position is space. func is_space(b []byte, i int) bool { return b[i] == ' ' } // Check if the character at the specified position is tab. func is_tab(b []byte, i int) bool { return b[i] == '\t' } // Check if the character at the specified position is blank (space or tab). func is_blank(b []byte, i int) bool { //return is_space(b, i) || is_tab(b, i) return b[i] == ' ' || b[i] == '\t' } // Check if the character at the specified position is a line break. func is_break(b []byte, i int) bool { return (b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) } func is_crlf(b []byte, i int) bool { return b[i] == '\r' && b[i+1] == '\n' } // Check if the character is a line break or NUL. func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( // is_break: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) // is_z: b[i] == 0) } // Check if the character is a line break, space, or NUL. func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( // is_space: b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) b[i] == 0) } // Check if the character is a line break, space, tab, or NUL. func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( // is_blank: b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) b[i] == 0) } // Determine the width of the character. func width(b byte) int { // Don't replace these by a switch without first // confirming that it is being inlined. if b&0x80 == 0x00 { return 1 } if b&0xE0 == 0xC0 { return 2 } if b&0xF0 == 0xE0 { return 3 } if b&0xF8 == 0xF0 { return 4 } return 0 }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head><title> FFTW Frequently Asked Questions with Answers </title> <link rev="made" href="mailto:fftw@fftw.org"> <link rel="Contents" href="index.html"> <link rel="Start" href="index.html"> <META name="description" content="Frequently asked questions and answers (FAQ) for FFTW."> <link rel="Bookmark" title="FFTW FAQ" href="index.html"> <LINK rel="Bookmark" title="FFTW Home Page" href="http://www.fftw.org"> <LINK rel="Bookmark" title="FFTW Manual" href="http://www.fftw.org/doc/"> </head><body text="#000000" bgcolor="#FFFFFF"><h1> FFTW Frequently Asked Questions with Answers </h1> This is the list of Frequently Asked Questions about FFTW, a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. <h1> Index </h1> <ul> <li><b><font size="+2"><a href="section1.html" rel=subdocument>Section 1. Introduction and General Information</a></font></b> <li><a href="section1.html#whatisfftw" rel=subdocument>Q1.1. What is FFTW?</a> <li><a href="section1.html#whereisfftw" rel=subdocument>Q1.2. How do I obtain FFTW?</a> <li><a href="section1.html#isfftwfree" rel=subdocument>Q1.3. Is FFTW free software?</a> <li><a href="section1.html#nonfree" rel=subdocument>Q1.4. What is this about non-free licenses?</a> <br><br><li><b><font size="+2"><a href="section2.html" rel=subdocument>Section 2. Installing FFTW</a></font></b> <li><a href="section2.html#systems" rel=subdocument>Q2.1. Which systems does FFTW run on?</a> <li><a href="section2.html#runOnDOS" rel=subdocument>Q2.2. Does FFTW run on DOS/Windows?</a> <li><a href="section2.html#compilerCrashes" rel=subdocument>Q2.3. My compiler has trouble with FFTW.</a> <li><a href="section2.html#solarisSucks" rel=subdocument>Q2.4. FFTW does not compile on Solaris, complaining about <code>const</code>.</a> <li><a href="section2.html#languages" rel=subdocument>Q2.5. Which language is FFTW written in?</a> <li><a href="section2.html#fortran" rel=subdocument>Q2.6. Can I call FFTW from FORTRAN?</a> <li><a href="section2.html#cplusplus" rel=subdocument>Q2.7. Can I call FFTW from C++?</a> <li><a href="section2.html#whynotfortran" rel=subdocument>Q2.8. Why isn't FFTW written in FORTRAN/C++?</a> <li><a href="section2.html#singleprec" rel=subdocument>Q2.9. How do I compile FFTW to run in single precision?</a> <br><br><li><b><font size="+2"><a href="section3.html" rel=subdocument>Section 3. Using FFTW</a></font></b> <li><a href="section3.html#slow" rel=subdocument>Q3.1. FFTW seems really slow.</a> <li><a href="section3.html#slows" rel=subdocument>Q3.2. FFTW slows down after repeated calls.</a> <li><a href="section3.html#segfault" rel=subdocument>Q3.3. An FFTW routine is crashing when I call it.</a> <li><a href="section3.html#fortran64" rel=subdocument>Q3.4. My Fortran program crashes when calling FFTW.</a> <li><a href="section3.html#conventions" rel=subdocument>Q3.5. FFTW gives results different from my old FFT.</a> <li><a href="section3.html#inplace" rel=subdocument>Q3.6. Your in-place transform gives incorrect results.</a> <li><a href="section3.html#savePlans" rel=subdocument>Q3.7. Can I save FFTW's plans?</a> <li><a href="section3.html#whyscaled" rel=subdocument>Q3.8. Why does your inverse transform return a scaled result?</a> <li><a href="section3.html#centerorigin" rel=subdocument>Q3.9. How can I make FFTW put the origin (zero frequency) at the center of its output?</a> <li><a href="section3.html#imageaudio" rel=subdocument>Q3.10. How do I FFT an image/audio file in <i>foobar</i> format?</a> <li><a href="section3.html#linkfails" rel=subdocument>Q3.11. My program does not link (on Unix).</a> <li><a href="section3.html#nostack" rel=subdocument>Q3.12. My program crashes, complaining about stack space.</a> <br><br><li><b><font size="+2"><a href="section4.html" rel=subdocument>Section 4. Internals of FFTW</a></font></b> <li><a href="section4.html#howworks" rel=subdocument>Q4.1. How does FFTW work?</a> <li><a href="section4.html#whyfast" rel=subdocument>Q4.2. Why is FFTW so fast?</a> <li><a href="section4.html#wisdom" rel=subdocument>Q4.3. What is this <code>wisdom</code> thing?</a> <li><a href="section4.html#whywisdom" rel=subdocument>Q4.4. Why do you use <code>wisdom</code>? I just wanted to save a plan.</a> <br><br><li><b><font size="+2"><a href="section5.html" rel=subdocument>Section 5. Known bugs</a></font></b> <li><a href="section5.html#rfftwndbug" rel=subdocument>Q5.1. FFTW 1.1 crashes in rfftwnd on Linux.</a> <li><a href="section5.html#fftwmpibug" rel=subdocument>Q5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak memory.</a> <li><a href="section5.html#testsingbug" rel=subdocument>Q5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision.</a> <li><a href="section5.html#teststoobig" rel=subdocument>Q5.4. The test program in FFTW 1.2.1 fails for n &gt; 46340.</a> <li><a href="section5.html#linuxthreads" rel=subdocument>Q5.5. The threaded code fails on Linux Redhat 5.0</a> <li><a href="section5.html#bigrfftwnd" rel=subdocument>Q5.6. FFTW 2.0's rfftwnd fails for rank &gt; 1 transforms with a final dimension &gt;= 65536.</a> <li><a href="section5.html#primebug" rel=subdocument>Q5.7. FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97.</a> <li><a href="section5.html#mpichbug" rel=subdocument>Q5.8. FFTW 2.1.1's MPI test programs crash with MPICH.</a> <li><a href="section5.html#aixthreadbug" rel=subdocument>Q5.9. FFTW 2.1.2's multi-threaded transforms don't work on AIX.</a> <li><a href="section5.html#bigprimebug" rel=subdocument>Q5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime sizes.</a> <li><a href="section5.html#aixflags" rel=subdocument>Q5.11. FFTW 2.1.3 crashes on AIX</a> </ul><hr> <address> <A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A> - 24 March 2003 </address><br> Extracted from FFTW Frequently Asked Questions with Answers, Copyright &copy; 2003 Massachusetts Institute of Technology. </body></html>
{ "pile_set_name": "Github" }
/* * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.awt.event; import java.util.EventListener; /** * The listener interface for receiving adjustment events. * * @author Amy Fowler * @since 1.1 */ public interface AdjustmentListener extends EventListener { /** * Invoked when the value of the adjustable has changed. */ public void adjustmentValueChanged(AdjustmentEvent e); }
{ "pile_set_name": "Github" }