text
stringlengths
2
100k
meta
dict
var baseAssignValue = require('./_baseAssignValue'), eq = require('./eq'); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue;
{ "pile_set_name": "Github" }
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. /*============================================================================= ShadowFilteringCommon.usf: Contains functions to filter a shadowmap, shared between forward/deferred shading. =========================================================================*/ #pragma once #include "PixelQuadMessagePassing.ush" struct FPCFSamplerSettings { Texture2D ShadowDepthTexture; SamplerState ShadowDepthTextureSampler; //XY - Pixel size of shadowmap //ZW - Inverse pixel size of shadowmap float4 ShadowBufferSize; // SceneDepth in lightspace. float SceneDepth; float TransitionScale; // set by the caller, constant for the code so only one code branch should be compiled bool bSubsurface; // Whether to treat shadow depths near 1 as unshadowed. This is useful when the shadowmap does not contain all the points being shadowed. bool bTreatMaxDepthUnshadowed; // only used if bSubsurface is true float DensityMulConstant; // only used if bSubsurface is true float2 ProjectionDepthBiasParameters; }; // linear PCF, input 3x3 // @param Values0 in row 0 from left to right: x,y,z,w // @param Values1 in row 1 from left to right: x,y,z,w // @param Values2 in row 2 from left to right: x,y,z,w // can be optimized float PCF2x2(float2 Fraction, float3 Values0, float3 Values1, float3 Values2) { float2 VerticalLerp00 = lerp(float2(Values0.x, Values1.x), float2(Values0.y, Values1.y), Fraction.xx); float PCFResult00 = lerp(VerticalLerp00.x, VerticalLerp00.y, Fraction.y); float2 VerticalLerp10 = lerp(float2(Values0.y, Values1.y), float2(Values0.z, Values1.z), Fraction.xx); float PCFResult10 = lerp(VerticalLerp10.x, VerticalLerp10.y, Fraction.y); float2 VerticalLerp01 = lerp(float2(Values1.x, Values2.x), float2(Values1.y, Values2.y), Fraction.xx); float PCFResult01 = lerp(VerticalLerp01.x, VerticalLerp01.y, Fraction.y); float2 VerticalLerp11 = lerp(float2(Values1.y, Values2.y), float2(Values1.z, Values2.z), Fraction.xx); float PCFResult11 = lerp(VerticalLerp11.x, VerticalLerp11.y, Fraction.y); return saturate((PCFResult00 + PCFResult10 + PCFResult01 + PCFResult11) * 0.25f); } // linear PCF, input 4x4 // @param Values0 in row 0 from left to right: x,y,z,w // @param Values1 in row 1 from left to right: x,y,z,w // @param Values2 in row 2 from left to right: x,y,z,w // @param Values3 in row 3 from left to right: x,y,z,w // can be optimized float PCF3x3(float2 Fraction, float4 Values0, float4 Values1, float4 Values2, float4 Values3) { float2 VerticalLerp00 = lerp(float2(Values0.x, Values1.x), float2(Values0.y, Values1.y), Fraction.xx); float PCFResult00 = lerp(VerticalLerp00.x, VerticalLerp00.y, Fraction.y); float2 VerticalLerp10 = lerp(float2(Values0.y, Values1.y), float2(Values0.z, Values1.z), Fraction.xx); float PCFResult10 = lerp(VerticalLerp10.x, VerticalLerp10.y, Fraction.y); float2 VerticalLerp20 = lerp(float2(Values0.z, Values1.z), float2(Values0.w, Values1.w), Fraction.xx); float PCFResult20 = lerp(VerticalLerp20.x, VerticalLerp20.y, Fraction.y); float2 VerticalLerp01 = lerp(float2(Values1.x, Values2.x), float2(Values1.y, Values2.y), Fraction.xx); float PCFResult01 = lerp(VerticalLerp01.x, VerticalLerp01.y, Fraction.y); float2 VerticalLerp11 = lerp(float2(Values1.y, Values2.y), float2(Values1.z, Values2.z), Fraction.xx); float PCFResult11 = lerp(VerticalLerp11.x, VerticalLerp11.y, Fraction.y); float2 VerticalLerp21 = lerp(float2(Values1.z, Values2.z), float2(Values1.w, Values2.w), Fraction.xx); float PCFResult21 = lerp(VerticalLerp21.x, VerticalLerp21.y, Fraction.y); float2 VerticalLerp02 = lerp(float2(Values2.x, Values3.x), float2(Values2.y, Values3.y), Fraction.xx); float PCFResult02 = lerp(VerticalLerp02.x, VerticalLerp02.y, Fraction.y); float2 VerticalLerp12 = lerp(float2(Values2.y, Values3.y), float2(Values2.z, Values3.z), Fraction.xx); float PCFResult12 = lerp(VerticalLerp12.x, VerticalLerp12.y, Fraction.y); float2 VerticalLerp22 = lerp(float2(Values2.z, Values3.z), float2(Values2.w, Values3.w), Fraction.xx); float PCFResult22 = lerp(VerticalLerp22.x, VerticalLerp22.y, Fraction.y); return saturate((PCFResult00 + PCFResult10 + PCFResult20 + PCFResult01 + PCFResult11 + PCFResult21 + PCFResult02 + PCFResult12 + PCFResult22) * .11111f); } // linear PCF, input 4x4 // using Gather: xyzw in counter clockwise order starting with the sample to the lower left of the queried location // @param Values0 left top // @param Values1 right top // @param Values2 left bottom // @param Values3 right bottom float PCF3x3gather(float2 Fraction, float4 Values0, float4 Values1, float4 Values2, float4 Values3) { float4 Results; Results.x = Values0.w * (1.0 - Fraction.x); Results.y = Values0.x * (1.0 - Fraction.x); Results.z = Values2.w * (1.0 - Fraction.x); Results.w = Values2.x * (1.0 - Fraction.x); Results.x += Values0.z; Results.y += Values0.y; Results.z += Values2.z; Results.w += Values2.y; Results.x += Values1.w; Results.y += Values1.x; Results.z += Values3.w; Results.w += Values3.x; Results.x += Values1.z * Fraction.x; Results.y += Values1.y * Fraction.x; Results.z += Values3.z * Fraction.x; Results.w += Values3.y * Fraction.x; return dot( Results, float4( 1.0 - Fraction.y, 1.0, 1.0, Fraction.y) * ( 1.0 / 9.0) ); } // horizontal PCF, input 6x2 float2 HorizontalPCF5x2(float2 Fraction, float4 Values00, float4 Values20, float4 Values40) { float Results0; float Results1; Results0 = Values00.w * (1.0 - Fraction.x); Results1 = Values00.x * (1.0 - Fraction.x); Results0 += Values00.z; Results1 += Values00.y; Results0 += Values20.w; Results1 += Values20.x; Results0 += Values20.z; Results1 += Values20.y; Results0 += Values40.w; Results1 += Values40.x; Results0 += Values40.z * Fraction.x; Results1 += Values40.y * Fraction.x; return float2(Results0, Results1); } // lowest quality ith PCF float PCF1x1(float2 Fraction, float4 Values00) { float2 HorizontalLerp00 = lerp(Values00.wx, Values00.zy, Fraction.xx); return lerp(HorizontalLerp00.x, HorizontalLerp00.y, Fraction.y); } float4 CalculateOcclusion(float4 ShadowmapDepth, FPCFSamplerSettings Settings) { if (Settings.bSubsurface) { // Determine the distance that the light traveled through the subsurface object // This assumes that anything between this subsurface pixel and the light was also a subsurface material, // As a result, subsurface materials receive leaked light based on how transparent they are float4 Thickness = max(Settings.SceneDepth - ShadowmapDepth, 0); float4 Occlusion = saturate(exp(-Thickness * Settings.DensityMulConstant)); // Never shadow from depths that were never written to (max depth value) return ShadowmapDepth > .99f ? 1 : Occlusion; } else { // The standard comparison is SceneDepth < ShadowmapDepth // Using a soft transition based on depth difference // Offsets shadows a bit but reduces self shadowing artifacts considerably float TransitionScale = Settings.TransitionScale; //SoftTransitionScale.z; float4 ShadowFactor = saturate((ShadowmapDepth - Settings.SceneDepth) * TransitionScale + 1); FLATTEN if (Settings.bTreatMaxDepthUnshadowed) { ShadowFactor = saturate(ShadowFactor + (ShadowmapDepth > .99f)); } return ShadowFactor; } } float3 CalculateOcclusion(float3 ShadowmapDepth, FPCFSamplerSettings Settings) { if (Settings.bSubsurface) { // Determine the distance that the light traveled through the subsurface object // This assumes that anything between this subsurface pixel and the light was also a subsurface material, // As a result, subsurface materials receive leaked light based on how transparent they are float3 Thickness = max(Settings.SceneDepth - (ShadowmapDepth - Settings.ProjectionDepthBiasParameters.x), 0); float3 Occlusion = saturate(exp(-Thickness * Settings.DensityMulConstant)); // Never shadow from depths that were never written to (max depth value) return ShadowmapDepth > .99f ? 1 : Occlusion; } else { // The standard comparison is Settings.SceneDepth < ShadowmapDepth // Using a soft transition based on depth difference // Offsets shadows a bit but reduces self shadowing artifacts considerably float TransitionScale = Settings.TransitionScale; //SoftTransitionScale.z; float3 ShadowFactor = saturate((ShadowmapDepth - Settings.SceneDepth) * TransitionScale + 1); FLATTEN if (Settings.bTreatMaxDepthUnshadowed) { ShadowFactor = saturate(ShadowFactor + (ShadowmapDepth > .99f)); } return ShadowFactor; } } void FetchRowOfThree(float2 Sample00TexelCenter, float VerticalOffset, out float3 Values0, FPCFSamplerSettings Settings) { Values0.x = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(0, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0.y = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(1, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0.z = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(2, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0 = CalculateOcclusion(Values0, Settings); } void FetchRowOfFour(float2 Sample00TexelCenter, float VerticalOffset, out float4 Values0, FPCFSamplerSettings Settings) { Values0.x = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(0, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0.y = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(1, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0.z = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(2, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0.w = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(3, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values0 = CalculateOcclusion(Values0, Settings); } void FetchRowOfThreeAfterFour(float2 Sample00TexelCenter, float VerticalOffset, out float3 Values1, FPCFSamplerSettings Settings) { Values1.x = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(4, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values1.y = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(5, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values1.z = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (Sample00TexelCenter + float2(6, VerticalOffset)) * Settings.ShadowBufferSize.zw, 0).r; Values1 = CalculateOcclusion(Values1, Settings); } // break this out for forward rendering as it's not part of ManualPCF's set of shadowquality settings. float Manual2x2PCF(float2 ShadowPosition, FPCFSamplerSettings Settings) { float2 TexelPos = ShadowPosition * Settings.ShadowBufferSize.xy - 0.5f; // bias to be consistent with texture filtering hardware float2 Fraction = frac(TexelPos); float2 TexelCenter = floor(TexelPos) + 0.5f; // bias to get reliable texel center content float3 SamplesValues0, SamplesValues1, SamplesValues2; FetchRowOfThree(TexelCenter, 0, SamplesValues0, Settings); FetchRowOfThree(TexelCenter, 1, SamplesValues1, Settings); FetchRowOfThree(TexelCenter, 2, SamplesValues2, Settings); return PCF2x2(Fraction, SamplesValues0, SamplesValues1, SamplesValues2); } float ManualNoFiltering(float2 ShadowPosition, FPCFSamplerSettings Settings) { // very low quality but very good performance, useful to profile, 1 sample, not using gather4 return CalculateOcclusion(Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, ShadowPosition, 0).rrr, Settings).r; } float Manual1x1PCF(float2 ShadowPosition, FPCFSamplerSettings Settings) { float2 TexelPos = ShadowPosition * Settings.ShadowBufferSize.xy - 0.5f; // bias to be consistent with texture filtering hardware float2 Fraction = frac(TexelPos); float2 TexelCenter = floor(TexelPos) + 0.5f; // bias to get reliable texel center content // using Gather: xyzw in counter clockwise order starting with the sample to the lower left of the queried location float4 Samples; #if FEATURE_GATHER4 Samples = Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, TexelCenter * Settings.ShadowBufferSize.zw); #else Samples.x = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (TexelCenter.xy + float2(0, 1)) * Settings.ShadowBufferSize.zw, 0).r; Samples.y = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (TexelCenter.xy + float2(1, 1)) * Settings.ShadowBufferSize.zw, 0).r; Samples.z = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (TexelCenter.xy + float2(1, 0)) * Settings.ShadowBufferSize.zw, 0).r; Samples.w = Texture2DSampleLevel(Settings.ShadowDepthTexture, Settings.ShadowDepthTextureSampler, (TexelCenter.xy + float2(0, 0)) * Settings.ShadowBufferSize.zw, 0).r; #endif float4 Values00 = CalculateOcclusion(Samples, Settings); return PCF1x1(Fraction, Values00); } float ManualPCF(float2 ShadowPosition, FPCFSamplerSettings Settings) { #if SHADOW_QUALITY == 1 return ManualNoFiltering(ShadowPosition, Settings); #endif #if SHADOW_QUALITY == 2 // low quality, 2x2 samples, using and not using gather4 return Manual1x1PCF(ShadowPosition, Settings); #endif #if SHADOW_QUALITY == 3 // medium quality, 4x4 samples, using and not using gather4 { float2 TexelPos = ShadowPosition * Settings.ShadowBufferSize.xy - 0.5f; // bias to be consistent with texture filtering hardware float2 Fraction = frac(TexelPos); float2 TexelCenter = floor(TexelPos) + 0.5f; // bias to get reliable texel center content { float2 Sample00TexelCenter = TexelCenter - float2(1, 1); float4 SampleValues0, SampleValues1, SampleValues2, SampleValues3; #if FEATURE_GATHER4 float2 SamplePos = TexelCenter * Settings.ShadowBufferSize.zw; // bias to get reliable texel center content SampleValues0 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(ShadowDepthTextureSampler, SamplePos, int2(-1, -1)), Settings); SampleValues1 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(ShadowDepthTextureSampler, SamplePos, int2(1, -1)), Settings); SampleValues2 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(ShadowDepthTextureSampler, SamplePos, int2(-1, 1)), Settings); SampleValues3 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(ShadowDepthTextureSampler, SamplePos, int2(1, 1)), Settings); return PCF3x3gather(Fraction, SampleValues0, SampleValues1, SampleValues2, SampleValues3); #else // FEATURE_GATHER4 FetchRowOfFour(Sample00TexelCenter, 0, SampleValues0, Settings); FetchRowOfFour(Sample00TexelCenter, 1, SampleValues1, Settings); FetchRowOfFour(Sample00TexelCenter, 2, SampleValues2, Settings); FetchRowOfFour(Sample00TexelCenter, 3, SampleValues3, Settings); return PCF3x3(Fraction, SampleValues0, SampleValues1, SampleValues2, SampleValues3); #endif // FEATURE_GATHER4 } } #endif #if FEATURE_GATHER4 // high quality, 6x6 samples, using gather4 { float2 TexelPos = ShadowPosition * Settings.ShadowBufferSize.xy - 0.5f; // bias to be consistent with texture filtering hardware float2 Fraction = frac(TexelPos); float2 TexelCenter = floor(TexelPos); float2 SamplePos = (TexelCenter + 0.5f) * Settings.ShadowBufferSize.zw; // bias to get reliable texel center content float Results; float4 Values00 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(-2, -2)), Settings); float4 Values20 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(0, -2)), Settings); float4 Values40 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(2, -2)), Settings); float2 Row0 = HorizontalPCF5x2(Fraction, Values00, Values20, Values40); Results = Row0.x * (1.0f - Fraction.y) + Row0.y; float4 Values02 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(-2, 0)), Settings); float4 Values22 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(0, 0)), Settings); float4 Values42 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(2, 0)), Settings); float2 Row1 = HorizontalPCF5x2(Fraction, Values02, Values22, Values42); Results += Row1.x + Row1.y; float4 Values04 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(-2, 2)), Settings); float4 Values24 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(0, 2)), Settings); float4 Values44 = CalculateOcclusion(Settings.ShadowDepthTexture.Gather(Settings.ShadowDepthTextureSampler, SamplePos, int2(2, 2)), Settings); float2 Row2 = HorizontalPCF5x2(Fraction, Values04, Values24, Values44); Results += Row2.x + Row2.y * Fraction.y; return 0.04f * Results; } #else // FEATURE_GATHER4 // high quality, 7x7 samples, not using gather4 (todo: ideally we make this 6x6 to get same results with gather code) { float2 Fraction = frac(ShadowPosition * Settings.ShadowBufferSize.xy); float2 Sample00TexelCenter = floor(ShadowPosition * Settings.ShadowBufferSize.xy) - float2(3, 3); // Fetch 7x7 shadowmap point samples // Do 6x6 PCF samples, sharing the point samples between neighboring PCF samples float4 Results; float4 SampleValues03; float4 SampleValues13; { float4 SampleValues10; float4 SampleValues11; float4 SampleValues12; // Group work to minimize temporary registers and to split texture work with PCF ALU operations to hide texture latency // Without this layout (all texture lookups at the beginning, PCF ALU's at the end) this shader was 4x slower on Nvidia cards { float4 SampleValues00; FetchRowOfFour(Sample00TexelCenter, 0, SampleValues00, Settings); SampleValues10.x = SampleValues00.w; float4 SampleValues01; FetchRowOfFour(Sample00TexelCenter, 1, SampleValues01, Settings); SampleValues11.x = SampleValues01.w; float4 SampleValues02; FetchRowOfFour(Sample00TexelCenter, 2, SampleValues02, Settings); SampleValues12.x = SampleValues02.w; FetchRowOfFour(Sample00TexelCenter, 3, SampleValues03, Settings); SampleValues13.x = SampleValues03.w; Results.x = PCF3x3(Fraction, SampleValues00, SampleValues01, SampleValues02, SampleValues03); } { FetchRowOfThreeAfterFour(Sample00TexelCenter, 0, SampleValues10.yzw, Settings); FetchRowOfThreeAfterFour(Sample00TexelCenter, 1, SampleValues11.yzw, Settings); FetchRowOfThreeAfterFour(Sample00TexelCenter, 2, SampleValues12.yzw, Settings); FetchRowOfThreeAfterFour(Sample00TexelCenter, 3, SampleValues13.yzw, Settings); Results.y = PCF3x3(Fraction, SampleValues10, SampleValues11, SampleValues12, SampleValues13); } } { float4 SampleValues14; float4 SampleValues15; float4 SampleValues16; { float4 SampleValues04; FetchRowOfFour(Sample00TexelCenter, 4, SampleValues04, Settings); SampleValues14.x = SampleValues04.w; float4 SampleValues05; FetchRowOfFour(Sample00TexelCenter, 5, SampleValues05, Settings); SampleValues15.x = SampleValues05.w; float4 SampleValues06; FetchRowOfFour(Sample00TexelCenter, 6, SampleValues06, Settings); SampleValues16.x = SampleValues06.w; Results.z = PCF3x3(Fraction, SampleValues03, SampleValues04, SampleValues05, SampleValues06); } { FetchRowOfThreeAfterFour(Sample00TexelCenter, 4, SampleValues14.yzw, Settings); FetchRowOfThreeAfterFour(Sample00TexelCenter, 5, SampleValues15.yzw, Settings); FetchRowOfThreeAfterFour(Sample00TexelCenter, 6, SampleValues16.yzw, Settings); Results.w = PCF3x3(Fraction, SampleValues13, SampleValues14, SampleValues15, SampleValues16); } } return dot(Results, .25f); } #endif // FEATURE_GATHER4 }
{ "pile_set_name": "Github" }
import logging from meross_iot.model.enums import Namespace _LOGGER = logging.getLogger(__name__) class HubMixn(object): __PUSH_MAP = { Namespace.HUB_ONLINE: 'online', Namespace.HUB_TOGGLEX: 'togglex', Namespace.HUB_BATTERY: 'battery' } def __init__(self, device_uuid: str, manager, **kwargs): super().__init__(device_uuid=device_uuid, manager=manager, **kwargs) async def async_handle_push_notification(self, namespace: Namespace, data: dict) -> bool: locally_handled = False target_data_key = self.__PUSH_MAP.get(namespace) if target_data_key is not None: _LOGGER.debug(f"{self.__class__.__name__} handling push notification for namespace {namespace}") payload = data.get(target_data_key) if payload is None: _LOGGER.error(f"{self.__class__.__name__} could not find {target_data_key} attribute in push notification data: " f"{data}") locally_handled = False else: notification_data = data.get(target_data_key, []) for subdev_state in notification_data: subdev_id = subdev_state.get('id') # Check the specific subdevice has been registered with this hub... subdev = self.get_subdevice(subdevice_id=subdev_id) if subdev is None: _LOGGER.warning( f"Received an update for a subdevice (id {subdev_id}) that has not yet been " f"registered with this hub. The update will be skipped.") return False else: await subdev.async_handle_push_notification(namespace=namespace, data=subdev_state) locally_handled = True # Always call the parent handler when done with local specific logic. This gives the opportunity to all # ancestors to catch all events. parent_handled = await super().async_handle_push_notification(namespace=namespace, data=data) return locally_handled or parent_handled class HubMs100Mixin(object): __PUSH_MAP = { # TODO: check this Namespace.HUB_SENSOR_ALERT: 'alert', Namespace.HUB_SENSOR_TEMPHUM: 'tempHum', Namespace.HUB_SENSOR_ALL: 'all' } _execute_command: callable _abilities_spec: dict get_subdevice: callable uuid: str def __init__(self, device_uuid: str, manager, **kwargs): super().__init__(device_uuid=device_uuid, manager=manager, **kwargs) async def async_update(self, *args, **kwargs) -> None: # Call the super implementation await super().async_update(*args, **kwargs) result = await self._execute_command(method="GET", namespace=Namespace.HUB_SENSOR_ALL, payload={'all': []}) subdevs_data = result.get('all', []) for d in subdevs_data: dev_id = d.get('id') target_device = self.get_subdevice(subdevice_id=dev_id) if target_device is None: _LOGGER.warning(f"Received data for subdevice {target_device}, which has not been registered with this" f"hub yet. This update will be ignored.") else: await target_device.async_handle_push_notification(namespace=Namespace.HUB_SENSOR_ALL, data=d) async def async_handle_push_notification(self, namespace: Namespace, data: dict) -> bool: locally_handled = False target_data_key = self.__PUSH_MAP.get(namespace) if target_data_key is not None: _LOGGER.debug(f"{self.__class__.__name__} handling push notification for namespace {namespace}") payload = data.get(target_data_key) if payload is None: _LOGGER.error( f"{self.__class__.__name__} could not find {target_data_key} attribute in push notification data: " f"{data}") locally_handled = False else: notification_data = data.get(target_data_key, []) for subdev_state in notification_data: subdev_id = subdev_state.get('id') # Check the specific subdevice has been registered with this hub... subdev = self.get_subdevice(subdevice_id=subdev_id) if subdev is None: _LOGGER.warning( f"Received an update for a subdevice (id {subdev_id}) that has not yet been " f"registered with this hub. The update will be skipped.") return False else: await subdev.async_handle_push_notification(namespace=namespace, data=subdev_state) locally_handled = True # Always call the parent handler when done with local specific logic. This gives the opportunity to all # ancestors to catch all events. parent_handled = await super().async_handle_push_notification(namespace=namespace, data=data) return locally_handled or parent_handled class HubMts100Mixin(object): __PUSH_MAP = { Namespace.HUB_MTS100_ALL: 'all', Namespace.HUB_MTS100_MODE: 'mode', Namespace.HUB_MTS100_TEMPERATURE: 'temperature' } _execute_command: callable _abilities_spec: dict get_subdevices: callable uuid: str def __init__(self, device_uuid: str, manager, **kwargs): super().__init__(device_uuid=device_uuid, manager=manager, **kwargs) async def async_update(self, *args, **kwargs) -> None: # Call the super implementation await super().async_update(*args, **kwargs) result = await self._execute_command(method="GET", namespace=Namespace.HUB_MTS100_ALL, payload={'all': []}) subdevs_data = result.get('all', []) for d in subdevs_data: dev_id = d.get('id') target_device = self.get_subdevice(subdevice_id=dev_id) if target_device is None: _LOGGER.warning(f"Received data for subdevice {target_device}, which has not been registered with this" f"hub yet. This update will be ignored.") await target_device.async_handle_push_notification(namespace=Namespace.HUB_MTS100_ALL, data=d) async def async_handle_push_notification(self, namespace: Namespace, data: dict) -> bool: locally_handled = False target_data_key = self.__PUSH_MAP.get(namespace) if target_data_key is not None: _LOGGER.debug(f"{self.__class__.__name__} handling push notification for namespace {namespace}") payload = data.get(target_data_key) if payload is None: _LOGGER.error(f"{self.__class__.__name__} could not find {target_data_key} attribute in push notification data: " f"{data}") locally_handled = False else: notification_data = data.get(target_data_key, []) for subdev_state in notification_data: subdev_id = subdev_state.get('id') # Check the specific subdevice has been registered with this hub... subdev = self.get_subdevice(subdevice_id=subdev_id) if subdev is None: _LOGGER.warning( f"Received an update for a subdevice (id {subdev_id}) that has not yet been " f"registered with this hub. The update will be skipped.") return False else: await subdev.async_handle_push_notification(namespace=namespace, data=subdev_state) locally_handled = True # Always call the parent handler when done with local specific logic. This gives the opportunity to all # ancestors to catch all events. parent_handled = await super().async_handle_push_notification(namespace=namespace, data=data) return locally_handled or parent_handled
{ "pile_set_name": "Github" }
var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; };
{ "pile_set_name": "Github" }
package gloomyfish.opencvdemo; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("gloomyfish.opencvdemo", appContext.getPackageName()); } }
{ "pile_set_name": "Github" }
package kernels import ( "fmt" "github.com/pa-m/sklearn/base" "math" "gonum.org/v1/gonum/floats" "gonum.org/v1/gonum/mat" //t "gorgonia.org/tensor" t "github.com/pa-m/sklearn/gaussian_process/tensor" ) // hyperparameter specification // for no value_type is mat.Vector // bounds is [2]float64 // IsFixed() is true if bounds are equal type hyperparameter struct { Name string PValue *float64 PBounds *[2]float64 } // IsFixed return true when bounds are equal or missing func (param hyperparameter) IsFixed() bool { return param.PBounds == nil || (*param.PBounds)[1] == (*param.PBounds)[0] } // hyperparameters ... type hyperparameters []hyperparameter func (params hyperparameters) notFixed() hyperparameters { notFixed := hyperparameters{} for _, p := range params { if !p.IsFixed() { notFixed = append(notFixed, p) } } return notFixed } func (params hyperparameters) Theta() mat.Matrix { notFixed := params.notFixed() return matFromFunc{ r: len(notFixed), c: 1, at: func(i, j int) float64 { return math.Log(*notFixed[i].PValue) }, set: func(i, j int, v float64) { *notFixed[i].PValue = math.Exp(v) }, } } func (params hyperparameters) Bounds() (t mat.Matrix) { notFixed := params.notFixed() return matFromFunc{ r: len(notFixed), c: 2, at: func(i, j int) float64 { return math.Log((*notFixed[i].PBounds)[j]) }, set: func(i, j int, v float64) { (*notFixed[i].PBounds)[j] = math.Exp(v) }, } } // Kernel interface type Kernel interface { hyperparameters() hyperparameters Theta() mat.Matrix Bounds() mat.Matrix CloneWithTheta(theta mat.Matrix) Kernel Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) Diag(X mat.Matrix) (K *mat.DiagDense) IsStationary() bool String() string } // StationaryKernelMixin mixin for kernels which are stationary: k(X, Y)= f(X-Y) type StationaryKernelMixin struct{} // IsStationary returns whether the kernel is stationary func (StationaryKernelMixin) IsStationary() bool { return true } // NormalizedKernelMixin is Mixin for kernels which are normalized: k(X, X)=1 type NormalizedKernelMixin struct{} // Diag returns the diagonal of the kernel k(X, X) func (k NormalizedKernelMixin) Diag(X mat.Matrix) (K *mat.DiagDense) { nx, _ := X.Dims() K = mat.NewDiagDense(nx, nil) for ix := 0; ix < nx; ix++ { K.SetDiag(ix, 1) } return } // KernelOperator is a kernel based on two others type KernelOperator struct { K1, K2 Kernel } // hyperparameters ... func (k KernelOperator) hyperparameters() hyperparameters { return append(k.K1.hyperparameters(), k.K2.hyperparameters()...) } // Theta ... func (k KernelOperator) Theta() mat.Matrix { return k.hyperparameters().Theta() } // Bounds ... func (k KernelOperator) Bounds() mat.Matrix { return k.hyperparameters().Bounds() } // CloneWithTheta ... func (k KernelOperator) CloneWithTheta(theta mat.Matrix) Kernel { if theta == mat.Matrix(nil) { return KernelOperator{K1: k.K1.CloneWithTheta(nil), K2: k.K2.CloneWithTheta(nil)} } var td = base.ToDense(theta) n1, _ := k.K1.Theta().Dims() n2, _ := k.K2.Theta().Dims() return KernelOperator{ K1: k.K1.CloneWithTheta(td.Slice(0, n1, 0, 1)), K2: k.K2.CloneWithTheta(td.Slice(n1, n1+n2, 0, 1)), } } // Eval ... func (k KernelOperator) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { panic("Eval must be implemented by wrapper") } // Diag ... func (k KernelOperator) Diag(X mat.Matrix) *mat.DiagDense { panic("Diag must be implemented by wrapper") } // String ... func (k KernelOperator) String() string { panic("Diag must be implemented by wrapper") } // IsStationary returns whether the kernel is stationary func (k KernelOperator) IsStationary() bool { return k.K1.IsStationary() && k.K2.IsStationary() } // Sum kernel K1 + K2 of two kernels K1 and K2 type Sum struct { KernelOperator } // CloneWithTheta ... func (k Sum) CloneWithTheta(theta mat.Matrix) Kernel { return &Sum{KernelOperator: k.KernelOperator.CloneWithTheta(theta).(KernelOperator)} } // Eval return the kernel k(X, Y) and optionally its gradient func (k *Sum) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { K1, K1g := k.K1.Eval(X, Y, evalGradient) K2, K2g := k.K2.Eval(X, Y, evalGradient) K1.Add(K1, K2) var Kg *t.Dense if evalGradient { s1, s2 := K1g.Shape(), K2g.Shape() s := t.Shape{s1[0], s1[1], s1[2] + s2[2]} Kg = t.NewDense(K1g.Dtype(), s) K1gdata, K2gdata, Kgdata := K1g.Data().([]float64), K2g.Data().([]float64), Kg.Data().([]float64) for i := range Kgdata { i2 := i % s[2] i1 := ((i - i2) / s[2]) % s[1] i0 := ((i - i2) / s[2]) / s[1] if i2 < s1[2] { Kgdata[i] = K1gdata[i0*s1[1]*s1[2]+i1*s1[2]+i2] } else { Kgdata[i] = K2gdata[i0*s2[1]*s2[2]+i1*s2[2]+(i2-s1[2])] } } } return K1, Kg } // Diag returns the diagonal of the kernel k(X, X) func (k *Sum) Diag(X mat.Matrix) *mat.DiagDense { K1 := k.K1.Diag(X) K2 := k.K2.Diag(X) nx, _ := K1.Dims() K1r, K2r := K1.RawBand(), K2.RawBand() for i, k1i, k2i := 0, 0, 0; i < nx; i, k1i, k2i = i+1, k1i+K1r.Stride, k2i+K2r.Stride { //K1.SetDiag(i, K1.At(i, i)+K2.At(i, i)) K1r.Data[k1i] += K2r.Data[k2i] } return K1 } // String ... func (k *Sum) String() string { return k.K1.String() + " + " + k.K2.String() } // Product kernel K1 * K2 of two kernels K1 and K2 type Product struct { KernelOperator } // CloneWithTheta ... func (k Product) CloneWithTheta(theta mat.Matrix) Kernel { return &Product{KernelOperator: k.KernelOperator.CloneWithTheta(theta).(KernelOperator)} } // Eval return the kernel k(X, Y) and optionally its gradient func (k *Product) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { K1, K1g := k.K1.Eval(X, Y, evalGradient) K2, K2g := k.K2.Eval(X, Y, evalGradient) K := &mat.Dense{} K.MulElem(K1, K2) var Kg *t.Dense if evalGradient { s1, s2 := K1g.Shape(), K2g.Shape() s := t.Shape{s1[0], s1[1], s1[2] + s2[2]} Kg = t.NewDense(K1g.Dtype(), s) K1r, K2r := K1.RawMatrix(), K2.RawMatrix() K1gdata, K2gdata, Kgdata := K1g.Data().([]float64), K2g.Data().([]float64), Kg.Data().([]float64) K1gStrides, K2gStrides, KgStrides := K1g.Strides(), K2g.Strides(), Kg.Strides() for i0 := 0; i0 < s[0]; i0++ { for i1 := 0; i1 < s[1]; i1++ { for i2 := 0; i2 < s[2]; i2++ { if i2 < s1[2] { Kgdata[i0*KgStrides[0]+i1*KgStrides[1]+i2*KgStrides[2]] = K1gdata[i0*K1gStrides[0]+i1*K1gStrides[1]+i2*K1gStrides[2]] * K2r.Data[i0*K2r.Stride+i1] } else { Kgdata[i0*KgStrides[0]+i1*KgStrides[1]+i2*KgStrides[2]] = K2gdata[i0*K2gStrides[0]+i1*K2gStrides[1]+(i2-s1[2])*K2gStrides[2]] * K1r.Data[i0*K1r.Stride+i1] } } } } } return K, Kg } // Diag returns the diagonal of the kernel k(X, X) func (k *Product) Diag(X mat.Matrix) *mat.DiagDense { K1 := k.K1.Diag(X) K2 := k.K2.Diag(X) nx, _ := K1.Dims() K1r, K2r := K1.RawBand(), K2.RawBand() for i, k1i, k2i := 0, 0, 0; i < nx; i, k1i, k2i = i+1, k1i+K1r.Stride, k2i+K2r.Stride { //K1.SetDiag(i, K1.At(i, i)*K2.At(i, i)) K1r.Data[k1i] *= K2r.Data[k2i] } return K1 } // String ... func (k *Product) String() string { return k.K1.String() + " * " + k.K2.String() } // Exponentiation exponentiate kernel by given exponent type Exponentiation struct { Kernel Exponent float64 } // hyperparameters ... func (k Exponentiation) hyperparameters() hyperparameters { hps := k.hyperparameters() params := make(hyperparameters, len(hps)) for i, p := range hps { p.Name = "kernel_" + p.Name params[i] = p } return params } // Eval return the kernel k(X, Y) and optionally its gradient func (k *Exponentiation) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { K, Kg := k.Kernel.Eval(X, Y, evalGradient) K.Apply(func(_, _ int, v float64) float64 { return math.Pow(v, k.Exponent) }, K) if evalGradient { Kdata := K.RawMatrix().Data Kgdata := Kg.Data().([]float64) for i := range Kgdata { Kgdata[i] *= k.Exponent * math.Pow(Kdata[i], k.Exponent-1) } } return K, Kg } // Diag returns the diagonal of the kernel k(X, X) func (k *Exponentiation) Diag(X mat.Matrix) *mat.DiagDense { K := k.Kernel.Diag(X) nx, _ := K.Dims() Kr := K.RawBand() for i, kri := 0, 0; i < nx; i, kri = i+1, kri+Kr.Stride { //K.SetDiag(i, math.Pow(K.At(i, i), k.Exponent)) Kr.Data[kri] = math.Pow(Kr.Data[kri], k.Exponent) } return K } // String ... func (k *Exponentiation) String() string { return fmt.Sprintf("%s ** %g", k.Kernel.String(), k.Exponent) } // ConstantKernel can be used as part of a product-kernel where it scales the magnitude of the other factor (kernel) or as part of a sum-kernel, where it modifies the mean of the Gaussian process. // k(x_1, x_2) = constant_value for all x_1, x_2 type ConstantKernel struct { ConstantValue float64 ConstantValueBounds [2]float64 StationaryKernelMixin } // hyperparameters ... func (k *ConstantKernel) hyperparameters() hyperparameters { return hyperparameters{ {"constant_value", &k.ConstantValue, &k.ConstantValueBounds}, } } // Theta ... func (k *ConstantKernel) Theta() mat.Matrix { return k.hyperparameters().Theta() } // Bounds ... func (k ConstantKernel) Bounds() mat.Matrix { return k.hyperparameters().Bounds() } // CloneWithTheta ... func (k ConstantKernel) CloneWithTheta(theta mat.Matrix) Kernel { clone := k matCopy(clone.Theta().(mat.Mutable), theta) return &clone } // Eval returns // K : array, shape (n_samples_X, n_samples_Y) // Kernel k(X, Y) func (k *ConstantKernel) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { if X == mat.Matrix(nil) { panic("ConstantKernel.Eval: X is nil") } nx, _ := X.Dims() if Y == mat.Matrix(nil) { Y = X } ny, _ := Y.Dims() K := mat.NewDense(nx, ny, nil) kdata := K.RawMatrix().Data for i := range kdata { kdata[i] = k.ConstantValue } var Kg *t.Dense if evalGradient && Y == X { if k.hyperparameters()[0].IsFixed() { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 0}) } else { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 1}, t.WithBacking(make([]float64, nx*nx))) it := Kg.Iterator() Kgdata := Kg.Data().([]float64) for i, e := it.Start(); e == nil; i, e = it.Next() { Kgdata[i] = k.ConstantValue } } } return K, Kg } // Diag returns the diagonal of the kernel k(X, X). func (k *ConstantKernel) Diag(X mat.Matrix) (K *mat.DiagDense) { nx, _ := X.Dims() K = mat.NewDiagDense(nx, nil) Kr := K.RawBand() for i, kri := 0, 0; i < nx; i, kri = i+1, kri+Kr.Stride { Kr.Data[kri] = k.ConstantValue } return } // String returns string representation of kernel func (k *ConstantKernel) String() string { return fmt.Sprintf("%.3g**2", math.Sqrt(k.ConstantValue)) } // WhiteKernel ... // The main use-case of this kernel is as part of a sum-kernel where it // explains the noise-component of the signal. Tuning its parameter // corresponds to estimating the noise-level. // k(x_1, x_2) = noise_level if x_1 == x_2 else 0 type WhiteKernel struct { NoiseLevel float64 NoiseLevelBounds [2]float64 StationaryKernelMixin } // hyperparameters ... func (k *WhiteKernel) hyperparameters() hyperparameters { return hyperparameters{ {"noise_level", &k.NoiseLevel, &k.NoiseLevelBounds}, } } // Theta ... func (k *WhiteKernel) Theta() mat.Matrix { return k.hyperparameters().Theta() } // Bounds ... func (k WhiteKernel) Bounds() mat.Matrix { return k.hyperparameters().Bounds() } // CloneWithTheta ... func (k WhiteKernel) CloneWithTheta(theta mat.Matrix) Kernel { clone := k matCopy(k.Theta().(mat.Mutable), theta) return &clone } // Eval return the kernel k(X, Y) func (k *WhiteKernel) Eval(X, Y mat.Matrix, evalGradient bool) (*mat.Dense, *t.Dense) { nx, nfeat := X.Dims() if Y == mat.Matrix(nil) { Y = X } ny, _ := Y.Dims() K := mat.NewDense(nx, ny, nil) Xrow := make([]float64, nfeat) Yrow := make([]float64, nfeat) Kr := K.RawMatrix() for ix, krix := 0, 0; ix < nx; ix, krix = ix+1, krix+Kr.Stride { mat.Row(Xrow, ix, X) for iy := 0; iy < ny; iy++ { mat.Row(Yrow, iy, Y) if floats.EqualApprox(Xrow, Yrow, 1e-8) { //K.Set(ix, iy, k.NoiseLevel) Kr.Data[krix+iy] = k.NoiseLevel } } } var Kg *t.Dense if evalGradient && Y == X { if k.hyperparameters()[0].IsFixed() { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 0}) } else { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 1}, t.WithBacking(make([]float64, nx*nx))) it := Kg.Iterator() Kgdata := Kg.Data().([]float64) for i, e := it.Start(); e == nil; i, e = it.Next() { if i%(nx+1) == 0 { Kgdata[i] = k.NoiseLevel } } } } return K, Kg } // Diag returns the diagonal of the kernel k(X, X) func (k *WhiteKernel) Diag(X mat.Matrix) *mat.DiagDense { nx, _ := X.Dims() K := mat.NewDiagDense(nx, nil) Kr := K.RawBand() for ix, kri := 0, 0; ix < nx; ix, kri = ix+1, kri+Kr.Stride { //K.SetDiag(ix, k.NoiseLevel) Kr.Data[kri] = k.NoiseLevel } return K } // String returns string representation of kernel func (k *WhiteKernel) String() string { return fmt.Sprintf("WhiteKernel(noise_level=%.3g)", k.NoiseLevel) } // RBF kernel is a stationary kernel. It is also known as the // "squared exponential" kernel. It is parameterized by a length-scale // parameter length_scale>0, which can either be a scalar (isotropic variant // of the kernel) or a vector with the same number of dimensions as the inputs // X (anisotropic variant of the kernel). The kernel is given by: // k(x_i, x_j) = exp(-1 / 2 d(x_i / length_scale, x_j / length_scale)^2) // This kernel is infinitely differentiable, which implies that GPs with this // kernel as covariance function have mean square derivatives of all orders, // and are thus very smooth. type RBF struct { LengthScale []float64 LengthScaleBounds [][2]float64 StationaryKernelMixin NormalizedKernelMixin } // hyperparameters ... func (k *RBF) hyperparameters() hyperparameters { params := make(hyperparameters, len(k.LengthScale)) for i := range k.LengthScale { params[i] = hyperparameter{Name: fmt.Sprintf("length_scale_%d", i), PValue: &k.LengthScale[i], PBounds: &k.LengthScaleBounds[i]} } return params } // Theta ... func (k *RBF) Theta() mat.Matrix { return k.hyperparameters().Theta() } // Bounds ... func (k RBF) Bounds() mat.Matrix { return k.hyperparameters().Bounds() } // CloneWithTheta ... func (k RBF) CloneWithTheta(theta mat.Matrix) Kernel { clone := k clone.LengthScale = make([]float64, len(k.LengthScale)) copy(clone.LengthScale, k.LengthScale) clone.LengthScaleBounds = make([][2]float64, len(k.LengthScaleBounds)) copy(clone.LengthScaleBounds, k.LengthScaleBounds) matCopy(clone.Theta().(mat.Mutable), theta) return &clone } // Eval return the kernel k(X, Y) func (k *RBF) Eval(X, Y mat.Matrix, evalGradient bool) (K *mat.Dense, Kg *t.Dense) { nx, nfeat := X.Dims() if Y == mat.Matrix(nil) { Y = X } ny, _ := Y.Dims() var scale func([]float64, int) float64 switch len(k.LengthScale) { case 1: scale = func(X []float64, feat int) float64 { return X[feat] / k.LengthScale[0] } default: if len(k.LengthScale) != nfeat { panic("LengthScale has wrong dimension") } scale = func(X []float64, feat int) float64 { return X[feat] / k.LengthScale[feat] } } K = mat.NewDense(nx, ny, nil) Xrow := make([]float64, nfeat) Yrow := make([]float64, nfeat) // K=np.exp(-0.5 * cdist(X/K.length_scale,Y/K.length_scale,'sqeuclidean')) Kr := K.RawMatrix() for ix, krix := 0, 0; ix < nx; ix, krix = ix+1, krix+Kr.Stride { mat.Row(Xrow, ix, X) for iy := 0; iy < ny; iy++ { mat.Row(Yrow, iy, Y) var d2 float64 for feat := 0; feat < nfeat; feat++ { d := scale(Xrow, feat) - scale(Yrow, feat) d2 += d * d } //K.Set(ix, iy, math.Exp(-.5*d2)) Kr.Data[krix+iy] = math.Exp(-.5 * d2) } } if evalGradient && Y == X { if k.hyperparameters()[0].IsFixed() { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 0}, t.WithBacking(nil)) } else { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 1}, t.WithBacking(make([]float64, nx*nx))) it := Kg.Iterator() Kgdata := Kg.Data().([]float64) Kdata := K.RawMatrix().Data xr, xc, xd := mat.NewVecDense(nfeat, nil), mat.NewVecDense(nfeat, nil), mat.NewVecDense(nfeat, nil) for i, e := it.Start(); e == nil; i, e = it.Next() { r, c := i/nx, i%nx mat.Row(xr.RawVector().Data, r, X) mat.Row(xc.RawVector().Data, c, X) xd.SubVec(xr, xc) switch len(k.LengthScale) { case 1: xd.ScaleVec(1/k.LengthScale[0], xd) case nfeat: xd.DivElemVec(xd, mat.NewVecDense(nfeat, k.LengthScale)) default: panic("dim error") } Kgdata[i] = Kdata[i] * mat.Dot(xd, xd) } } } return } // IsAnisotropic ... func (k *RBF) IsAnisotropic() bool { return len(k.LengthScale) > 1 } // String returns string representation of kernel func (k *RBF) String() string { return fmt.Sprintf("RBF(%v)", k.LengthScale) } // DotProduct kernel // The DotProduct kernel is non-stationary and can be obtained from linear // regression by putting N(0, 1) priors on the coefficients of x_d (d = 1, . . // . , D) and a prior of N(0, \sigma_0^2) on the bias. The DotProduct kernel // is invariant to a rotation of the coordinates about the origin, but not // translations. It is parameterized by a parameter sigma_0^2. For // sigma_0^2 =0, the kernel is called the homogeneous linear kernel, otherwise // it is inhomogeneous. The kernel is given by // k(x_i, x_j) = sigma_0 ^ 2 + x_i \cdot x_j // The DotProduct kernel is commonly combined with exponentiation. type DotProduct struct { Sigma0 float64 Sigma0Bounds [2]float64 } // hyperparameters ... func (k *DotProduct) hyperparameters() hyperparameters { return hyperparameters{ {"sigma_0", &k.Sigma0, &k.Sigma0Bounds}, } } // Theta ... func (k *DotProduct) Theta() mat.Matrix { return k.hyperparameters().Theta() } // Bounds ... func (k DotProduct) Bounds() mat.Matrix { return k.hyperparameters().Bounds() } // CloneWithTheta ... func (k DotProduct) CloneWithTheta(theta mat.Matrix) Kernel { clone := k matCopy(clone.Theta().(mat.Mutable), theta) return &clone } // Eval return the kernel k(X, Y) func (k *DotProduct) Eval(X, Y mat.Matrix, evalGradient bool) (K *mat.Dense, Kg *t.Dense) { nx, nfeat := X.Dims() if Y == mat.Matrix(nil) { Y = X } ny, _ := Y.Dims() K = mat.NewDense(nx, ny, nil) s2 := k.Sigma0 * k.Sigma0 Xrow := make([]float64, nfeat) Yrow := make([]float64, nfeat) Kr := K.RawMatrix() for ix, krix := 0, 0; ix < nx; ix, krix = ix+1, krix+Kr.Stride { mat.Row(Xrow, ix, X) for iy := 0; iy < ny; iy++ { mat.Row(Yrow, iy, Y) //K.Set(ix, iy, s2+mat.Dot(mat.NewVecDense(nfeat, Xrow), mat.NewVecDense(nfeat, Yrow))) Kr.Data[krix+iy] = s2 + mat.Dot(mat.NewVecDense(nfeat, Xrow), mat.NewVecDense(nfeat, Yrow)) } } if evalGradient && Y == X { if k.hyperparameters()[0].IsFixed() { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 0}) } else { Kg = t.NewDense(t.Float64, t.Shape{nx, nx, 1}, t.WithBacking(make([]float64, nx*nx))) it := Kg.Iterator() Kgdata := Kg.Data().([]float64) for i, e := it.Start(); e == nil; i, e = it.Next() { Kgdata[i] = 2 * k.Sigma0 * k.Sigma0 } } } return } // Diag returns the diagonal of the kernel k(X, X) func (k *DotProduct) Diag(X mat.Matrix) (K *mat.DiagDense) { n, nfeat := X.Dims() K = mat.NewDiagDense(n, nil) s2 := k.Sigma0 * k.Sigma0 Xrow := make([]float64, nfeat) Kr := K.RawBand() for i, kri := 0, 0; i < n; i, kri = i+1, kri+Kr.Stride { mat.Row(Xrow, i, X) Vrow := mat.NewVecDense(nfeat, Xrow) //K.SetDiag(i, s2+mat.Dot(Vrow, Vrow)) Kr.Data[kri] = s2 + mat.Dot(Vrow, Vrow) } return } // IsStationary returns whether the kernel is stationary func (k *DotProduct) IsStationary() bool { return false } // String returns string representation of kernel func (k *DotProduct) String() string { return fmt.Sprintf("DotProduct(sigma_0=%.3g)", k.Sigma0) }
{ "pile_set_name": "Github" }
// Copyright 2015 The Prometheus 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 expfmt import ( "fmt" "io" "net/http" "github.com/golang/protobuf/proto" "github.com/matttproud/golang_protobuf_extensions/pbutil" "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg" dto "github.com/prometheus/client_model/go" ) // Encoder types encode metric families into an underlying wire protocol. type Encoder interface { Encode(*dto.MetricFamily) error } type encoder func(*dto.MetricFamily) error func (e encoder) Encode(v *dto.MetricFamily) error { return e(v) } // Negotiate returns the Content-Type based on the given Accept header. // If no appropriate accepted type is found, FmtText is returned. func Negotiate(h http.Header) Format { for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { // Check for protocol buffer if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { switch ac.Params["encoding"] { case "delimited": return FmtProtoDelim case "text": return FmtProtoText case "compact-text": return FmtProtoCompact } } // Check for text format. ver := ac.Params["version"] if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { return FmtText } } return FmtText } // NewEncoder returns a new encoder based on content type negotiation. func NewEncoder(w io.Writer, format Format) Encoder { switch format { case FmtProtoDelim: return encoder(func(v *dto.MetricFamily) error { _, err := pbutil.WriteDelimited(w, v) return err }) case FmtProtoCompact: return encoder(func(v *dto.MetricFamily) error { _, err := fmt.Fprintln(w, v.String()) return err }) case FmtProtoText: return encoder(func(v *dto.MetricFamily) error { _, err := fmt.Fprintln(w, proto.MarshalTextString(v)) return err }) case FmtText: return encoder(func(v *dto.MetricFamily) error { _, err := MetricFamilyToText(w, v) return err }) } panic("expfmt.NewEncoder: unknown format") }
{ "pile_set_name": "Github" }
/* ============================================================================== This file is part of the JUCE library. Copyright (c) 2017 - ROLI Ltd. JUCE is an open source library subject to commercial or open-source licensing. By using JUCE, you agree to the terms of both the JUCE 5 End-User License Agreement and JUCE 5 Privacy Policy (both updated and effective as of the 27th April 2017). End User License Agreement: www.juce.com/juce-5-licence Privacy Policy: www.juce.com/juce-5-privacy-policy Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses). 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 { //============================================================================== /** Represents a linear source of mouse events from a mouse device or individual finger in a multi-touch environment. Each MouseEvent object contains a reference to the MouseInputSource that generated it. In an environment with a single mouse for input, all events will come from the same source, but in a multi-touch system, there may be multiple MouseInputSource obects active, each representing a stream of events coming from a particular finger. Events coming from a single MouseInputSource are always sent in a fixed and predictable order: a mouseMove will never be called without a mouseEnter having been sent beforehand, the only events that can happen between a mouseDown and its corresponding mouseUp are mouseDrags, etc. When there are multiple touches arriving from multiple MouseInputSources, their event streams may arrive in an interleaved order, so you should use the getIndex() method to find out which finger each event came from. @see MouseEvent @tags{GUI} */ class JUCE_API MouseInputSource final { public: /** Possible mouse input sources. */ enum InputSourceType { mouse, touch, pen }; //============================================================================== MouseInputSource (const MouseInputSource&) noexcept; MouseInputSource& operator= (const MouseInputSource&) noexcept; ~MouseInputSource() noexcept; //============================================================================== bool operator== (const MouseInputSource& other) const noexcept { return pimpl == other.pimpl; } bool operator!= (const MouseInputSource& other) const noexcept { return pimpl != other.pimpl; } //============================================================================== /** Returns the type of input source that this object represents. */ MouseInputSource::InputSourceType getType() const noexcept; /** Returns true if this object represents a normal desk-based mouse device. */ bool isMouse() const noexcept; /** Returns true if this object represents a source of touch events. */ bool isTouch() const noexcept; /** Returns true if this object represents a pen device. */ bool isPen() const noexcept; /** Returns true if this source has an on-screen pointer that can hover over items without clicking them. */ bool canHover() const noexcept; /** Returns true if this source may have a scroll wheel. */ bool hasMouseWheel() const noexcept; /** Returns this source's index in the global list of possible sources. If the system only has a single mouse, there will only be a single MouseInputSource with an index of 0. If the system supports multi-touch input, then the index will represent a finger number, starting from 0. When the first touch event begins, it will have finger number 0, and then if a second touch happens while the first is still down, it will have index 1, etc. */ int getIndex() const noexcept; /** Returns true if this device is currently being pressed. */ bool isDragging() const noexcept; /** Returns the last-known screen position of this source. */ Point<float> getScreenPosition() const noexcept; /** Returns the last-known screen position of this source without any scaling applied. */ Point<float> getRawScreenPosition() const noexcept; /** Returns a set of modifiers that indicate which buttons are currently held down on this device. */ ModifierKeys getCurrentModifiers() const noexcept; /** Returns the device's current touch or pen pressure. The range is 0 (soft) to 1 (hard). If the input device doesn't provide any pressure data, it may return a negative value here, or 0.0 or 1.0, depending on the platform. */ float getCurrentPressure() const noexcept; /** Returns the device's current orientation in radians. 0 indicates a touch pointer aligned with the x-axis and pointing from left to right; increasing values indicate rotation in the clockwise direction. Only reported by a touch pointer. */ float getCurrentOrientation() const noexcept; /** Returns the device's current rotation. Indicates the clockwise rotation, or twist, of the pointer in radians. The default is 0. Only reported by a pen pointer. */ float getCurrentRotation() const noexcept; /** Returns the angle of tilt of the pointer in a range of -1.0 to 1.0 either in the x- or y-axis. The default is 0. If x-axis, a positive value indicates a tilt to the right and if y-axis, a positive value indicates a tilt toward the user. Only reported by a pen pointer. */ float getCurrentTilt (bool tiltX) const noexcept; /** Returns true if the current pressure value is meaningful. */ bool isPressureValid() const noexcept; /** Returns true if the current orientation value is meaningful. */ bool isOrientationValid() const noexcept; /** Returns true if the current rotation value is meaningful. */ bool isRotationValid() const noexcept; /** Returns true if the current tilt value (either x- or y-axis) is meaningful. */ bool isTiltValid (bool tiltX) const noexcept; /** Returns the component that was last known to be under this pointer. */ Component* getComponentUnderMouse() const; /** Tells the device to dispatch a mouse-move or mouse-drag event. This is asynchronous - the event will occur on the message thread. */ void triggerFakeMove() const; /** Returns the number of clicks that should be counted as belonging to the current mouse event. So the mouse is currently down and it's the second click of a double-click, this will return 2. */ int getNumberOfMultipleClicks() const noexcept; /** Returns the time at which the last mouse-down occurred. */ Time getLastMouseDownTime() const noexcept; /** Returns the screen position at which the last mouse-down occurred. */ Point<float> getLastMouseDownPosition() const noexcept; /** Returns true if this mouse is currently down, and if it has been dragged more than a couple of pixels from the place it was pressed. */ bool hasMouseMovedSignificantlySincePressed() const noexcept; /** Returns true if this input source uses a visible mouse cursor. */ bool hasMouseCursor() const noexcept; /** Changes the mouse cursor, (if there is one). */ void showMouseCursor (const MouseCursor& cursor); /** Hides the mouse cursor (if there is one). */ void hideCursor(); /** Un-hides the mouse cursor if it was hidden by hideCursor(). */ void revealCursor(); /** Forces an update of the mouse cursor for whatever component it's currently over. */ void forceMouseCursorUpdate(); /** Returns true if this mouse can be moved indefinitely in any direction without running out of space. */ bool canDoUnboundedMovement() const noexcept; /** Allows the mouse to move beyond the edges of the screen. Calling this method when the mouse button is currently pressed will remove the cursor from the screen and allow the mouse to (seem to) move beyond the edges of the screen. This means that the coordinates returned to mouseDrag() will be unbounded, and this can be used for things like custom slider controls or dragging objects around, where movement would be otherwise be limited by the mouse hitting the edges of the screen. The unbounded mode is automatically turned off when the mouse button is released, or it can be turned off explicitly by calling this method again. @param isEnabled whether to turn this mode on or off @param keepCursorVisibleUntilOffscreen if set to false, the cursor will immediately be hidden; if true, it will only be hidden when it is moved beyond the edge of the screen */ void enableUnboundedMouseMovement (bool isEnabled, bool keepCursorVisibleUntilOffscreen = false) const; /** Returns true if this source is currently in "unbounded" mode. */ bool isUnboundedMouseMovementEnabled() const; /** Attempts to set this mouse pointer's screen position. */ void setScreenPosition (Point<float> newPosition); /** A default value for pressure, which is used when a device doesn't support it, or for mouse-moves, mouse-ups, etc. */ static const float invalidPressure; /** A default value for orientation, which is used when a device doesn't support it */ static const float invalidOrientation; /** A default value for rotation, which is used when a device doesn't support it */ static const float invalidRotation; /** Default values for tilt, which are used when a device doesn't support it */ static const float invalidTiltX; static const float invalidTiltY; private: //============================================================================== friend class ComponentPeer; friend class Desktop; friend class MouseInputSourceInternal; MouseInputSourceInternal* pimpl; struct SourceList; explicit MouseInputSource (MouseInputSourceInternal*) noexcept; void handleEvent (ComponentPeer&, Point<float>, int64 time, ModifierKeys, float, float, const PenDetails&); void handleWheel (ComponentPeer&, Point<float>, int64 time, const MouseWheelDetails&); void handleMagnifyGesture (ComponentPeer&, Point<float>, int64 time, float scaleFactor); static Point<float> getCurrentRawMousePosition(); static void setRawMousePosition (Point<float>); JUCE_LEAK_DETECTOR (MouseInputSource) }; } // namespace juce
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/">{ "Info": [ { "IsSuccess": "True", "InAddress": "臺中市豐原區中正路二二八號", "InSRS": "EPSG:4326", "InFuzzyType": "[單雙號機制]+[最近門牌號機制]", "InFuzzyBuffer": "0", "InIsOnlyFullMatch": "False", "InIsLockCounty": "True", "InIsLockTown": "False", "InIsLockVillage": "False", "InIsLockRoadSection": "False", "InIsLockLane": "False", "InIsLockAlley": "False", "InIsLockArea": "False", "InIsSameNumber_SubNumber": "True", "InCanIgnoreVillage": "True", "InCanIgnoreNeighborhood": "True", "InReturnMaxCount": "0", "OutTotal": "1", "OutMatchType": "完全比對", "OutMatchCode": "[臺中市]\tFULL:1", "OutTraceInfo": "[臺中市]\t { 完全比對 } 找到符合的門牌地址" } ], "AddressList": [ { "FULL_ADDR": "臺中市豐原區下街里7鄰中正路228號", "COUNTY": "臺中市", "TOWN": "豐原區", "VILLAGE": "下街里", "NEIGHBORHOOD": "7鄰", "ROAD": "中正路", "SECTION": "", "LANE": "", "ALLEY": "", "SUB_ALLEY": "", "TONG": "", "NUMBER": "228號", "X": 120.717261, "Y": 24.251962 } ] }</string>
{ "pile_set_name": "Github" }
evennia.utils.idmapper.manager ===================================== .. automodule:: evennia.utils.idmapper.manager :members: :undoc-members: :show-inheritance:
{ "pile_set_name": "Github" }
Random numbers are everywhere from computer games to lottery systems, graphics software, statistical sampling, computer simulation and cryptography. Graphic below is a quick explanation to how the random numbers are generated and why they may not be truly random. [![](/guides/random-numbers.png)](/guides/random-numbers.png) Here is the [original tweet](https://twitter.com/kamranahmedse/status/1237851549302312962) where this image was posted.
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import datetime import functools import numbers import time import six import jaraco.functools __metaclass__ = type class Stopwatch: """ A simple stopwatch which starts automatically. >>> w = Stopwatch() >>> _1_sec = datetime.timedelta(seconds=1) >>> w.split() < _1_sec True >>> import time >>> time.sleep(1.0) >>> w.split() >= _1_sec True >>> w.stop() >= _1_sec True >>> w.reset() >>> w.start() >>> w.split() < _1_sec True It should be possible to launch the Stopwatch in a context: >>> with Stopwatch() as watch: ... assert isinstance(watch.split(), datetime.timedelta) In that case, the watch is stopped when the context is exited, so to read the elapsed time:: >>> watch.elapsed datetime.timedelta(...) >>> watch.elapsed.seconds 0 """ def __init__(self): self.reset() self.start() def reset(self): self.elapsed = datetime.timedelta(0) if hasattr(self, 'start_time'): del self.start_time def start(self): self.start_time = datetime.datetime.utcnow() def stop(self): stop_time = datetime.datetime.utcnow() self.elapsed += stop_time - self.start_time del self.start_time return self.elapsed def split(self): local_duration = datetime.datetime.utcnow() - self.start_time return self.elapsed + local_duration # context manager support def __enter__(self): self.start() return self def __exit__(self, exc_type, exc_value, traceback): self.stop() class IntervalGovernor: """ Decorate a function to only allow it to be called once per min_interval. Otherwise, it returns None. """ def __init__(self, min_interval): if isinstance(min_interval, numbers.Number): min_interval = datetime.timedelta(seconds=min_interval) self.min_interval = min_interval self.last_call = None def decorate(self, func): @functools.wraps(func) def wrapper(*args, **kwargs): allow = ( not self.last_call or self.last_call.split() > self.min_interval ) if allow: self.last_call = Stopwatch() return func(*args, **kwargs) return wrapper __call__ = decorate class Timer(Stopwatch): """ Watch for a target elapsed time. >>> t = Timer(0.1) >>> t.expired() False >>> __import__('time').sleep(0.15) >>> t.expired() True """ def __init__(self, target=float('Inf')): self.target = self._accept(target) super(Timer, self).__init__() def _accept(self, target): "Accept None or ∞ or datetime or numeric for target" if isinstance(target, datetime.timedelta): target = target.total_seconds() if target is None: # treat None as infinite target target = float('Inf') return target def expired(self): return self.split().total_seconds() > self.target class BackoffDelay(six.Iterator): """ Exponential backoff delay. Useful for defining delays between retries. Consider for use with ``jaraco.functools.retry_call`` as the cleanup. Default behavior has no effect; a delay or jitter must be supplied for the call to be non-degenerate. >>> bd = BackoffDelay() >>> bd() >>> bd() The following instance will delay 10ms for the first call, 20ms for the second, etc. >>> bd = BackoffDelay(delay=0.01, factor=2) >>> bd() >>> bd() Inspect and adjust the state of the delay anytime. >>> bd.delay 0.04 >>> bd.delay = 0.01 Set limit to prevent the delay from exceeding bounds. >>> bd = BackoffDelay(delay=0.01, factor=2, limit=0.015) >>> bd() >>> bd.delay 0.015 To reset the backoff, simply call ``.reset()``: >>> bd.reset() >>> bd.delay 0.01 Iterate on the object to retrieve/advance the delay values. >>> next(bd) 0.01 >>> next(bd) 0.015 >>> import itertools >>> tuple(itertools.islice(bd, 3)) (0.015, 0.015, 0.015) Limit may be a callable taking a number and returning the limited number. >>> at_least_one = lambda n: max(n, 1) >>> bd = BackoffDelay(delay=0.01, factor=2, limit=at_least_one) >>> next(bd) 0.01 >>> next(bd) 1 Pass a jitter to add or subtract seconds to the delay. >>> bd = BackoffDelay(jitter=0.01) >>> next(bd) 0 >>> next(bd) 0.01 Jitter may be a callable. To supply a non-deterministic jitter between -0.5 and 0.5, consider: >>> import random >>> jitter=functools.partial(random.uniform, -0.5, 0.5) >>> bd = BackoffDelay(jitter=jitter) >>> next(bd) 0 >>> 0 <= next(bd) <= 0.5 True """ delay = 0 factor = 1 "Multiplier applied to delay" jitter = 0 "Number or callable returning extra seconds to add to delay" @jaraco.functools.save_method_args def __init__(self, delay=0, factor=1, limit=float('inf'), jitter=0): self.delay = delay self.factor = factor if isinstance(limit, numbers.Number): limit_ = limit def limit(n): return max(0, min(limit_, n)) self.limit = limit if isinstance(jitter, numbers.Number): jitter_ = jitter def jitter(): return jitter_ self.jitter = jitter def __call__(self): time.sleep(next(self)) def __next__(self): delay = self.delay self.bump() return delay def __iter__(self): return self def bump(self): self.delay = self.limit(self.delay * self.factor + self.jitter()) def reset(self): saved = self._saved___init__ self.__init__(*saved.args, **saved.kwargs)
{ "pile_set_name": "Github" }
/* * (C) Copyright 2011 * Holger Brunck, Keymile GmbH Hannover, [email protected] * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <i2c.h> #include <asm/io.h> #include <linux/ctype.h> #include "../common/common.h" static void i2c_write_start_seq(void) { struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR + CONFIG_SYS_I2C_OFFSET); udelay(DELAY_ABORT_SEQ); out_8(&dev->cr, (I2C_CR_MEN | I2C_CR_MSTA)); udelay(DELAY_ABORT_SEQ); out_8(&dev->cr, (I2C_CR_MEN)); } int i2c_make_abort(void) { struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR + CONFIG_SYS_I2C_OFFSET); uchar last; int nbr_read = 0; int i = 0; int ret = 0; /* wait after each operation to finsh with a delay */ out_8(&dev->cr, (I2C_CR_MSTA)); udelay(DELAY_ABORT_SEQ); out_8(&dev->cr, (I2C_CR_MEN | I2C_CR_MSTA)); udelay(DELAY_ABORT_SEQ); in_8(&dev->dr); udelay(DELAY_ABORT_SEQ); last = in_8(&dev->dr); nbr_read++; /* * do read until the last bit is 1, but stop if the full eeprom is * read. */ while (((last & 0x01) != 0x01) && (nbr_read < CONFIG_SYS_IVM_EEPROM_MAX_LEN)) { udelay(DELAY_ABORT_SEQ); last = in_8(&dev->dr); nbr_read++; } if ((last & 0x01) != 0x01) ret = -2; if ((last != 0xff) || (nbr_read > 1)) printf("[INFO] i2c abort after %d bytes (0x%02x)\n", nbr_read, last); udelay(DELAY_ABORT_SEQ); out_8(&dev->cr, (I2C_CR_MEN)); udelay(DELAY_ABORT_SEQ); /* clear status reg */ out_8(&dev->sr, 0); for (i = 0; i < 5; i++) i2c_write_start_seq(); if (ret != 0) printf("[ERROR] i2c abort failed after %d bytes (0x%02x)\n", nbr_read, last); return ret; }
{ "pile_set_name": "Github" }
http_headers log parse string_util
{ "pile_set_name": "Github" }
#==================================================================== # # wNim - Nim's Windows GUI Framework # (c) Copyright 2017-2020 Ward # #==================================================================== import private/gdiobjects/wPen export wPen
{ "pile_set_name": "Github" }
// // detail/posix_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef ASIO_DETAIL_POSIX_THREAD_HPP #define ASIO_DETAIL_POSIX_THREAD_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" #if defined(ASIO_HAS_PTHREADS) #include <pthread.h> #include "asio/detail/noncopyable.hpp" #include "asio/detail/push_options.hpp" namespace clmdep_asio { namespace detail { extern "C" { ASIO_DECL void* clmdep_asio_detail_posix_thread_function(void* arg); } class posix_thread : private noncopyable { public: // Constructor. template <typename Function> posix_thread(Function f, unsigned int = 0) : joined_(false) { start_thread(new func<Function>(f)); } // Destructor. ASIO_DECL ~posix_thread(); // Wait for the thread to exit. ASIO_DECL void join(); private: friend void* clmdep_asio_detail_posix_thread_function(void* arg); class func_base { public: virtual ~func_base() {} virtual void run() = 0; }; struct auto_func_base_ptr { func_base* ptr; ~auto_func_base_ptr() { delete ptr; } }; template <typename Function> class func : public func_base { public: func(Function f) : f_(f) { } virtual void run() { f_(); } private: Function f_; }; ASIO_DECL void start_thread(func_base* arg); ::pthread_t thread_; bool joined_; }; } // namespace detail } // namespace clmdep_asio #include "asio/detail/pop_options.hpp" #if defined(ASIO_HEADER_ONLY) # include "asio/detail/impl/posix_thread.ipp" #endif // defined(ASIO_HEADER_ONLY) #endif // defined(ASIO_HAS_PTHREADS) #endif // ASIO_DETAIL_POSIX_THREAD_HPP
{ "pile_set_name": "Github" }
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Setup\Module\Dependency\Report\Framework; use Magento\Setup\Module\Dependency\Report\Writer\Csv\AbstractWriter; /** * Csv file writer for framework dependencies report */ class Writer extends AbstractWriter { /** * Template method. Prepare data step * * @param \Magento\Setup\Module\Dependency\Report\Framework\Data\Config $config * @return array */ protected function prepareData($config) { $data[] = ['Dependencies of framework:', 'Total number']; $data[] = ['', $config->getDependenciesCount()]; $data[] = []; if ($config->getDependenciesCount()) { $data[] = ['Dependencies for each module:', '']; foreach ($config->getModules() as $module) { $data[] = [$module->getName(), $module->getDependenciesCount()]; foreach ($module->getDependencies() as $dependency) { $data[] = [' -- ' . $dependency->getLib(), $dependency->getCount()]; } $data[] = []; } } array_pop($data); return $data; } }
{ "pile_set_name": "Github" }
--- archs: [ armv7, armv7s, arm64, i386, x86_64 ] platform: ios install-name: /usr/lib/libReverseProxyDevice.dylib current-version: 1 compatibility-version: 1 exports: - archs: [ armv7, armv7s, arm64, i386, x86_64 ] symbols: [ _RPCopyProxyDictionary, _RPCopyProxyDictionaryWithOptions, _RPRegisterForAvailability, _RPRegistrationInvalidate, _RPRegistrationResume, _RPSetLogLevel, __RPCopyProxyDictionaryWithOptions, __RPRegisterForAvailability, __RPSetLogLevel ] ...
{ "pile_set_name": "Github" }
/* Copyright 2016-present Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import "SectionHeaderView.h" @implementation SectionHeaderView - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1]; _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; [_titleLabel setFont:[UIFont systemFontOfSize:16.0 weight:UIFontWeightUltraLight]]; [_titleLabel setTextColor:[UIColor colorWithWhite:0.5 alpha:1]]; [self addSubview:_titleLabel]; } return self; } - (void)layoutSubviews { [_titleLabel sizeToFit]; _titleLabel.frame = CGRectMake(16, self.bounds.size.height / 2.0 - _titleLabel.bounds.size.height / 2.0, _titleLabel.bounds.size.width, _titleLabel.bounds.size.height); } @end
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test: Margin-top using picas with a positive zero value, +0pc</title> <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-20 --> <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#propdef-margin-top" /> <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#margin-properties" /> <link rel="match" href="../reference/ref-no-vert-space-between.xht" /> <meta name="flags" content="" /> <meta name="assert" content="The 'margin-top' property sets a positive zero length value in picas." /> <style type="text/css"> #div1 { border-top: 5px solid blue; } #div2 { border-top: 5px solid orange; margin-top: +0pc; } </style> </head> <body> <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p> <div id="div1"></div> <div id="div2"></div> </body> </html>
{ "pile_set_name": "Github" }
/************************************************************* * * Copyright (c) 2017 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @fileoverview Implements the MathML version of the FindMath object * * @author [email protected] (Davide Cervone) */ import {AbstractFindMath} from '../../core/FindMath.js'; import {DOMAdaptor} from '../../core/DOMAdaptor.js'; import {OptionList} from '../../util/Options.js'; import {ProtoItem} from '../../core/MathItem.js'; /** * The MathML namespace */ const NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; /*****************************************************************/ /** * Implements the FindMathML object (extends AbstractFindMath) * * @template N The HTMLElement node class * @template T The Text node class * @template D The Document class */ export class FindMathML<N, T, D> extends AbstractFindMath<N, T, D> { /** * @override */ public static OPTIONS: OptionList = {}; /** * The DOMAdaptor for the document being processed */ public adaptor: DOMAdaptor<N, T, D>; /** * Locates math nodes, possibly with namespace prefixes. * Store them in a set so that if found more than once, they will only * appear in the list once. * * @override */ public findMath(node: N) { let set = new Set<N>(); this.findMathNodes(node, set); this.findMathPrefixed(node, set); const html = this.adaptor.root(this.adaptor.document); if (this.adaptor.kind(html) === 'html' && set.size === 0) { this.findMathNS(node, set); } return this.processMath(set); } /** * Find plain <math> tags * * @param {N} node The container to seaerch for math * @param {Set<N>} set The set in which to store the math nodes */ protected findMathNodes(node: N, set: Set<N>) { for (const math of this.adaptor.tags(node, 'math')) { set.add(math); } } /** * Find <m:math> tags (or whatever prefixes there are) * * @param {N} node The container to seaerch for math * @param {NodeSet} set The set in which to store the math nodes */ protected findMathPrefixed(node: N, set: Set<N>) { let html = this.adaptor.root(this.adaptor.document); for (const attr of this.adaptor.allAttributes(html)) { if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) { let prefix = attr.name.substr(6); for (const math of this.adaptor.tags(node, prefix + ':math')) { set.add(math); } } } } /** * Find namespaced math in XHTML documents (is this really needed?) * * @param {N} node The container to seaerch for math * @param {NodeSet} set The set in which to store the math nodes */ protected findMathNS(node: N, set: Set<N>) { for (const math of this.adaptor.tags(node, 'math', NAMESPACE)) { set.add(math); } } /** * Produce the array of proto math items from the node set */ protected processMath(set: Set<N>) { let math: ProtoItem<N, T>[] = []; for (const mml of Array.from(set)) { let display = (this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display'); let start = {node: mml, n: 0, delim: ''}; let end = {node: mml, n: 0, delim: ''}; math.push({math: this.adaptor.outerHTML(mml), start, end, display}); } return math; } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:paddingBottom="5px"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/screen_chat_queue_item_imageView" android:src="@drawable/messaging_48" android:layout_marginRight="3px"></ImageView> <TextView android:layout_height="wrap_content" android:layout_toRightOf="@+id/screen_chat_queue_item_imageView" android:id="@+id/screen_chat_queue_item_textView_remote" android:text="sip:[email protected]" android:layout_marginLeft="5px" android:textStyle="bold" android:layout_width="fill_parent" android:textSize="16dp"></TextView> <TextView android:layout_height="wrap_content" android:layout_below="@+id/screen_chat_queue_item_textView_remote" android:layout_toRightOf="@+id/screen_chat_queue_item_imageView" android:layout_marginLeft="5px" android:id="@+id/screen_chat_queue_item_textView_info" android:layout_width="fill_parent" android:text="Connected"></TextView> </RelativeLayout>
{ "pile_set_name": "Github" }
[CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon] DefaultValue=%ThemeDir%Space My Computer.ico,0 [CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon] DefaultValue=%ThemeDir%Space Network Neighborhood.ico,0 [CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon] full=%ThemeDir%Space Recycle Full.ico,0 empty=%ThemeDir%Space Recycle Empty.ico,0 [Control Panel\Cursors] Arrow=%ThemeDir%Space Normal Select.cur Help=%ThemeDir%Space Help Select.cur AppStarting=%ThemeDir%Space Working in background.ani Wait=%ThemeDir%Space Busy.ani NWPen=%ThemeDir%Space Handwriting.cur No=%ThemeDir%Space Unavailable.cur SizeNS=%ThemeDir%Space Vertical Resize.cur SizeWE=%ThemeDir%Space Horizontal Resize.cur Crosshair=%ThemeDir%Space Precision Select.cur IBeam=%ThemeDir%Space Text Select.cur SizeNWSE=%ThemeDir%Space Diagonal Resize 1.cur SizeNESW=%ThemeDir%Space Diagonal Resize 2.cur SizeAll=%ThemeDir%Space Move.cur UpArrow=%ThemeDir%Space Alternate Select.cur DefaultValue= [Control Panel\Desktop] Wallpaper=%ThemeDir%Space wallpaper.jpg Pattern=(None) TileWallpaper=0 WallpaperStyle=2 [AppEvents\Schemes\Apps\.Default\.Default\.Current] DefaultValue=%ThemeDir%Space default sound.wav [AppEvents\Schemes\Apps\.Default\AppGPFault\.Current] DefaultValue=%ThemeDir%Space program error.wav [AppEvents\Schemes\Apps\.Default\Maximize\.Current] DefaultValue=%ThemeDir%Space maximize.wav [AppEvents\Schemes\Apps\.Default\MenuCommand\.Current] DefaultValue=%ThemeDir%Space menu command.wav [AppEvents\Schemes\Apps\.Default\MenuPopup\.Current] DefaultValue=%ThemeDir%Space menu popup.wav [AppEvents\Schemes\Apps\.Default\Minimize\.Current] DefaultValue=%ThemeDir%Space minimize.wav [AppEvents\Schemes\Apps\.Default\Open\.Current] DefaultValue=%ThemeDir%Space open program.wav [AppEvents\Schemes\Apps\.Default\Close\.Current] DefaultValue=%ThemeDir%Space close program.wav [AppEvents\Schemes\Apps\.Default\RestoreDown\.Current] DefaultValue=%ThemeDir%Space restore down.wav [AppEvents\Schemes\Apps\.Default\RestoreUp\.Current] DefaultValue=%ThemeDir%Space restore up.wav [AppEvents\Schemes\Apps\.Default\RingIn\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\Ringout\.Current] DefaultValue= [AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current] DefaultValue=%ThemeDir%Space asterisk.wav [AppEvents\Schemes\Apps\.Default\SystemDefault\.Current] DefaultValue=%ThemeDir%Space beep.wav [AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current] DefaultValue=%ThemeDir%Space exclamation.wav [AppEvents\Schemes\Apps\.Default\SystemExit\.Current] DefaultValue=%ThemeDir%Space exit windows.wav [AppEvents\Schemes\Apps\.Default\SystemHand\.Current] DefaultValue=%ThemeDir%Space critical stop.wav [AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current] DefaultValue=%ThemeDir%Space question.wav [AppEvents\Schemes\Apps\.Default\SystemStart\.Current] DefaultValue=%ThemeDir%Space startup.wav [AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current] DefaultValue=%ThemeDir%Space empty recycle bin.wav [Metrics] IconMetrics=76 0 0 0 75 0 0 0 75 0 0 0 0 0 0 0 248 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 77 83 32 83 97 110 115 32 83 101 114 105 102 0 98 105 110 46 119 97 118 0 76 85 83 33 92 84 72 69 77 69 NonclientMetrics=84 1 0 0 1 0 0 0 13 0 0 0 13 0 0 0 20 0 0 0 20 0 0 0 240 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 87 101 115 116 109 105 110 115 116 101 114 0 75 105 100 115 32 80 108 117 115 33 92 84 104 101 109 101 115 92 115 112 15 0 0 0 15 0 0 0 247 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 77 83 32 83 97 110 115 32 83 101 114 105 102 0 100 115 32 80 108 117 115 33 92 84 104 101 109 101 115 92 115 112 18 0 0 0 18 0 0 0 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 79 67 82 32 65 32 69 120 116 101 110 100 101 100 0 115 32 80 108 117 115 33 92 84 104 101 109 101 115 92 115 112 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 77 83 32 83 97 110 115 32 83 101 114 105 102 0 0 115 32 80 108 117 115 33 92 84 104 101 109 101 115 92 115 112 245 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 0 0 79 67 82 32 65 32 69 120 116 101 110 100 101 100 0 115 32 80 108 117 115 33 92 84 104 101 109 101 115 92 115 112 [Control Panel\Colors] ActiveTitle=0 0 0 Background=0 0 0 Hilight=0 0 0 HilightText=0 255 0 TitleText=0 255 0 Window=255 255 255 WindowText=0 0 0 Scrollbar=192 200 208 InactiveTitle=80 96 104 Menu=128 144 152 WindowFrame=0 0 0 MenuText=0 0 0 ActiveBorder=128 144 152 InactiveBorder=128 144 152 AppWorkspace=83 96 102 ButtonFace=128 144 152 ButtonShadow=80 96 104 GrayText=80 96 104 ButtonText=0 0 0 InactiveTitleText=192 192 192 ButtonHilight=192 200 208 ButtonDkShadow=0 0 0 ButtonLight=128 144 152 InfoText=0 0 0 InfoWindow=255 255 255 [boot] SCRNSAVE.EXE=%WinDir%SYSTEM\Space.SCR [MasterThemeSelector] MTSM=DABJDKT ThemeImageBPP=8 ThemeColorBPP=8 Stretch=1
{ "pile_set_name": "Github" }
<?php // // ______ ______ __ __ ______ // /\ ___\ /\ ___\ /\_\ /\_\ /\ __ \ // \/\ __\ \/\ \____ \/\_\ \/\_\ \/\ \_\ \ // \/\_____\ \/\_____\ /\_\/\_\ \/\_\ \/\_\ \_\ // \/_____/ \/_____/ \/__\/_/ \/_/ \/_/ /_/ // // 上海商创网络科技有限公司 // // --------------------------------------------------------------------------------- // // 一、协议的许可和权利 // // 1. 您可以在完全遵守本协议的基础上,将本软件应用于商业用途; // 2. 您可以在协议规定的约束和限制范围内修改本产品源代码或界面风格以适应您的要求; // 3. 您拥有使用本产品中的全部内容资料、商品信息及其他信息的所有权,并独立承担与其内容相关的 // 法律义务; // 4. 获得商业授权之后,您可以将本软件应用于商业用途,自授权时刻起,在技术支持期限内拥有通过 // 指定的方式获得指定范围内的技术支持服务; // // 二、协议的约束和限制 // // 1. 未获商业授权之前,禁止将本软件用于商业用途(包括但不限于企业法人经营的产品、经营性产品 // 以及以盈利为目的或实现盈利产品); // 2. 未获商业授权之前,禁止在本产品的整体或在任何部分基础上发展任何派生版本、修改版本或第三 // 方版本用于重新开发; // 3. 如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回并承担相应法律责任; // // 三、有限担保和免责声明 // // 1. 本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的; // 2. 用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未获得商业授权之前,我们不承 // 诺提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任; // 3. 上海商创网络科技有限公司不对使用本产品构建的商城中的内容信息承担责任,但在不侵犯用户隐 // 私信息的前提下,保留以任何方式获取用户信息及商品信息的权利; // // 有关本产品最终用户授权协议、商业授权与技术服务的详细内容,均由上海商创网络科技有限公司独家 // 提供。上海商创网络科技有限公司拥有在不事先通知的情况下,修改授权协议的权力,修改后的协议对 // 改变之日起的新授权用户生效。电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和 // 等同的法律效力。您一旦开始修改、安装或使用本产品,即被视为完全理解并接受本协议的各项条款, // 在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本 // 授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 // // --------------------------------------------------------------------------------- // defined('IN_ECJIA') or exit('No permission resources.'); class mobile extends ecjia_front { public function __construct() { parent::__construct(); /* js与css加载路径*/ $this->assign('front_url', RC_App::apps_url('templates/front', __FILE__)); } public function download() { $this->assign('page_title', ecjia::config('shop_name') . __(' - 手机APP下载', 'mobile')); $this->assign('shop_url', RC_Uri::url('touch/index/init')); $this->assign('shop_app_icon', ecjia::config('mobile_app_icon') ? RC_Upload::upload_url(ecjia::config('mobile_app_icon')) : RC_Uri::admin_url('statics/images/nopic.png')); $this->assign('shop_app_description', ecjia::config('mobile_app_description') ? ecjia::config('mobile_app_description') : '暂无手机应用描述'); $this->assign('shop_android_download', ecjia::config('mobile_android_download')); $this->assign('shop_iphone_download', ecjia::config('mobile_iphone_download')); $this->assign('shop_ipad_download', ecjia::config('mobile_ipad_download')); $this->assign_lang(); return $this->display( RC_Package::package('app::mobile')->loadTemplate('front/download.dwt', true) ); } } // end
{ "pile_set_name": "Github" }
using Volo.Abp.Modularity; namespace Volo.Abp.EventBus { [DependsOn(typeof(AbpEventBusModule))] public class EventBusTestModule : AbpModule { } }
{ "pile_set_name": "Github" }
FROM node:10 WORKDIR /celo-monorepo # ensure yarn.lock is evaluated by kaniko cache diff COPY lerna.json package.json yarn.lock ./ COPY scripts/ scripts/ COPY patches/ patches/ # Copy only pkg.json COPY packages/typescript/package.json packages/typescript/ COPY packages/base/package.json packages/base/ COPY packages/utils/package.json packages/utils/ COPY packages/dev-utils/package.json packages/dev-utils/ COPY packages/protocol/package.json packages/protocol/ COPY packages/contractkit/package.json packages/contractkit/ COPY packages/leaderboard/package.json packages/leaderboard/ COPY packages/flake-tracker/package.json packages/flake-tracker/package.json RUN yarn install --frozen-lockfile --network-timeout 100000 && yarn cache clean # Copy the rest COPY packages/typescript packages/typescript/ COPY packages/base packages/base/ COPY packages/utils packages/utils/ COPY packages/dev-utils packages/dev-utils/ COPY packages/protocol packages/protocol/ COPY packages/contractkit packages/contractkit/ COPY packages/leaderboard packages/leaderboard/ COPY packages/flake-tracker packages/flake-tracker # build all RUN yarn build WORKDIR /celo-monorepo/packages/leaderboard CMD ["yarn run ts-node src/board.ts ; yarn run ts-node src/upload.ts"]
{ "pile_set_name": "Github" }
package cn.ieclipse.smartim.settings; import cn.ieclipse.smartim.common.RestUtils; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.options.ConfigurationException; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * Created by Jamling on 2017/7/11. */ public class GeneralPanel implements Configurable { private JComboBox comboSend; private JCheckBox chkNotify; private JCheckBox chkNotifyUnread; private JCheckBox chkSendBtn; private JPanel panel; private JCheckBox chkNotifyGroupMsg; private JCheckBox chkNotifyUnknown; private JCheckBox chkHideMyInput; private JLabel linkUpdate; private JLabel linkAbout; private JCheckBox chkHistory; private SmartIMSettings settings; public GeneralPanel(SmartIMSettings settings) { this.settings = settings; linkUpdate.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { super.mouseClicked(e); RestUtils.checkUpdate(); } }); linkAbout.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { BareBonesBrowserLaunch.openURL(RestUtils.about_url); } }); } @Nls @Override public String getDisplayName() { return "SmartIM"; } @Nullable @Override public String getHelpTopic() { return null; } @Nullable @Override public JComponent createComponent() { return panel; } @Override public boolean isModified() { return chkNotify.isSelected() != settings.getState().NOTIFY_MSG || chkNotifyUnread.isSelected() != settings .getState().NOTIFY_UNREAD || chkSendBtn.isSelected() != settings.getState().SHOW_SEND || chkNotifyGroupMsg.isSelected() != settings.getState().NOTIFY_GROUP_MSG || chkNotifyUnknown.isSelected() != settings.getState().NOTIFY_UNKNOWN || chkHideMyInput.isSelected() != settings.getState().HIDE_MY_INPUT || chkHistory.isSelected() != settings .getState().LOG_HISTORY || (!settings.getState().KEY_SEND.equals(comboSend.getSelectedItem().toString())); } @Override public void apply() throws ConfigurationException { settings.getState().NOTIFY_MSG = chkNotify.isSelected(); settings.getState().NOTIFY_UNREAD = chkNotifyUnread.isSelected(); settings.getState().SHOW_SEND = chkSendBtn.isSelected(); settings.getState().NOTIFY_GROUP_MSG = chkNotifyGroupMsg.isSelected(); settings.getState().NOTIFY_UNKNOWN = chkNotifyUnknown.isSelected(); settings.getState().HIDE_MY_INPUT = chkHideMyInput.isSelected(); settings.getState().LOG_HISTORY = chkHistory.isSelected(); settings.getState().KEY_SEND = comboSend.getSelectedItem().toString(); } @Override public void reset() { chkNotify.setSelected(settings.getState().NOTIFY_MSG); chkNotifyGroupMsg.setSelected(settings.getState().NOTIFY_GROUP_MSG); chkSendBtn.setSelected(settings.getState().SHOW_SEND); chkNotifyUnread.setSelected(settings.getState().NOTIFY_UNREAD); chkNotifyUnknown.setSelected(settings.getState().NOTIFY_UNKNOWN); chkHideMyInput.setSelected(settings.getState().HIDE_MY_INPUT); chkHistory.setSelected(settings.getState().LOG_HISTORY); comboSend.setSelectedItem(settings.getState().KEY_SEND); } @Override public void disposeUIResources() { } private void checkUpdate() { RestUtils.checkUpdate(); } }
{ "pile_set_name": "Github" }
{ "data": [ { "y": [ "12 AM diagonal", "1 AM diagonal", "2 AM diagonal", "3 AM diagonal", "4 AM diagonal", "5 AM diagonal", "6 AM diagonal", "7 AM diagonal", "8 AM diagonal", "9 AM diagonal", "10 AM diagonal", "11 AM diagonal" ], "x": [ 59.44, 68.75, 87.5, 100.5, 95.56, 92.8, 85.25, 77.4, 76.4, 73.94, 74.56, 81.06 ] }, { "y": [ "12 AM diagonal", "1 AM diagonal", "2 AM diagonal", "3 AM diagonal", "4 AM diagonal", "5 AM diagonal", "6 AM diagonal", "7 AM diagonal", "8 AM diagonal", "9 AM diagonal", "10 AM diagonal", "11 AM diagonal" ], "x": [ 81.06, 74.56, 73.94, 76.4, 77.4, 85.25, 92.8, 95.56, 100.5, 87.5, 68.75, 59.44 ], "xaxis": "x2", "yaxis": "y2" } ], "layout": { "grid": { "columns": 1, "rows": 2, "pattern": "independent" }, "margin": { "l": 0, "r": 0, "t": 0, "b": 0 }, "xaxis": { "showgrid": false, "showline": true, "zeroline": true, "automargin": true, "side": "bottom" }, "yaxis": { "side": "right", "showgrid": false, "showline": true, "zeroline": true, "automargin": true, "tickangle": -45 }, "xaxis2": { "showgrid": false, "showline": true, "zeroline": true, "automargin": true, "side": "top" }, "yaxis2": { "showgrid": false, "showline": true, "zeroline": true, "automargin": true, "tickangle": -45 }, "showlegend": false } }
{ "pile_set_name": "Github" }
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
{ "pile_set_name": "Github" }
--open-files-limit=65535 --secure-file-priv=$MYSQL_TMP_DIR
{ "pile_set_name": "Github" }
/** * *************************************************************************** * Copyright (c) 2010 Qcadoo Limited * Project: Qcadoo MES * Version: 1.4 * * This file is part of Qcadoo. * * Qcadoo 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; either version 3 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU 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, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *************************************************************************** */ package com.qcadoo.mes.materialFlowResources.criteriaModifiers; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.qcadoo.mes.materialFlow.constants.UserFieldsMF; import com.qcadoo.mes.materialFlow.constants.UserLocationFields; import com.qcadoo.model.api.DataDefinition; import com.qcadoo.model.api.DataDefinitionService; import com.qcadoo.model.api.EntityList; import com.qcadoo.model.api.search.SearchCriteriaBuilder; import com.qcadoo.model.api.search.SearchRestrictions; import com.qcadoo.security.api.SecurityService; import com.qcadoo.security.constants.QcadooSecurityConstants; import com.qcadoo.view.api.components.lookup.FilterValueHolder; @Service public class DocumentPositionsCriteriaModifier { public static final String LOCATION_FROM_ID = "locationFrom_id"; public static final String LOCATION_TO_ID = "locationTo_id"; @Autowired private SecurityService securityService; @Autowired private DataDefinitionService dataDefinitionService; public void restrictToUserLocations(final SearchCriteriaBuilder scb, final FilterValueHolder filterValue) { Long currentUserId = securityService.getCurrentUserId(); if (Objects.nonNull(currentUserId)) { EntityList userLocations = userDataDefinition().get(currentUserId).getHasManyField(UserFieldsMF.USER_LOCATIONS); if (!userLocations.isEmpty()) { Set<Integer> locationIds = userLocations.stream().map(ul -> ul.getBelongsToField(UserLocationFields.LOCATION)) .mapToInt(e -> e.getId().intValue()).boxed().collect(Collectors.toSet()); scb.add(SearchRestrictions.or(SearchRestrictions.in(LOCATION_TO_ID, locationIds), SearchRestrictions.in(LOCATION_FROM_ID, locationIds))); } } } private DataDefinition userDataDefinition() { return dataDefinitionService.get(QcadooSecurityConstants.PLUGIN_IDENTIFIER, QcadooSecurityConstants.MODEL_USER); } }
{ "pile_set_name": "Github" }
// // UIView+CustomAutoLayout.h // CommonLibrary // // Created by Alexi on 13-11-20. // Copyright (c) 2013年 ywchen. All rights reserved. // #import <UIKit/UIKit.h> // 使用装饰模式进行自动布局处理 #ifdef DEBUG #define IsArgInvalid(curView, brotherView) NSAssert((self.superview == brotherView.superview) && !(CGRectEqualToRect(brotherView.frame, CGRectZero)), @"UIView (CustomAutoLayout)参数出错") #define IsSuperViewInvalid(curView) NSAssert((self.superview != nil), @"UIView (CustomAutoLayout)父控件没有设置参数出错") #else #define IsArgInvalid(curView, brotherView) #define IsSuperViewInvalid(curView) #endif @interface UIView (CustomAutoLayout) - (UIView *)sameWith:(UIView *)brotherView; // 同一控件内两子之空间之间的相对位置 // margin 之间的空隙 // brotherView.superView与self.superView相同 // brotherView必须要先设置了frame // 会影响origin的位置,会影响其高度 - (UIView *)layoutAbove:(UIView *)brotherView; - (UIView *)layoutAbove:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)layoutBelow:(UIView *)brotherView; - (UIView *)layoutBelow:(UIView *)brotherView margin:(CGFloat)margin; // 会影响origin的位置,会影响其宽度 - (UIView *)layoutToLeftOf:(UIView *)brotherView; - (UIView *)layoutToLeftOf:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)layoutToRightOf:(UIView *)brotherView; - (UIView *)layoutToRightOf:(UIView *)brotherView margin:(CGFloat)margin; // 填充式布局 - (UIView *)scaleToAboveOf:(UIView *)brotherView; - (UIView *)scaleToAboveOf:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)scaleToBelowOf:(UIView *)brotherView; - (UIView *)scaleToBelowOf:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)scaleToLeftOf:(UIView *)brotherView; - (UIView *)scaleToLeftOf:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)scaleToRightOf:(UIView *)brotherView; - (UIView *)scaleToRightOf:(UIView *)brotherView margin:(CGFloat)margin; // 相对父控件进行填充 - (UIView *)scaleParent; - (UIView *)scaleToParentTop; - (UIView *)scaleToParentTopWithMargin:(CGFloat)margin; - (UIView *)scaleToParentBottom; - (UIView *)scaleToParentBottomWithMargin:(CGFloat)margin; - (UIView *)scaleToParentLeft; - (UIView *)scaleToParentLeftWithMargin:(CGFloat)margin; - (UIView *)scaleToParentRight; - (UIView *)scaleToParentRightWithMargin:(CGFloat)margin; // 同一控件内两子之空间之间的对齐关系 // 会影响origin的位置, 不影响大小 - (UIView *)alignTop:(UIView *)brotherView; - (UIView *)alignTop:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)alignBottom:(UIView *)brotherView; - (UIView *)alignBottom:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)alignLeft:(UIView *)brotherView; - (UIView *)alignLeft:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)alignRight:(UIView *)brotherView; - (UIView *)alignRight:(UIView *)brotherView margin:(CGFloat)margin; - (UIView *)alignHorizontalCenterOf:(UIView *)brotherView; - (UIView *)alignVerticalCenterOf:(UIView *)brotherView; - (UIView *)alignCenterOf:(UIView *)brotherView; - (UIView *)moveCenterTo:(CGPoint)center; - (UIView *)move:(CGPoint)vec; // 与父控件对齐的关系 // 只影响其坐标位置,不影响其大小 - (UIView *)alignParentTop; - (UIView *)alignParentBottom; - (UIView *)alignParentLeft; - (UIView *)alignParentRight; - (UIView *)alignParentCenter; - (UIView *)alignParentCenter:(CGPoint)margin; - (UIView *)alignParentTopWithMargin:(CGFloat)margin; - (UIView *)alignParentBottomWithMargin:(CGFloat)margin; - (UIView *)alignParentLeftWithMargin:(CGFloat)margin; - (UIView *)alignParentRightWithMargin:(CGFloat)margin; // 与父控件的边距 // 只影响其坐标位置,影响其大小 - (UIView *)marginParetnTop:(CGFloat)top bottom:(CGFloat)bottom left:(CGFloat)left rigth:(CGFloat)right; - (UIView *)marginParentWithEdgeInsets:(UIEdgeInsets)inset; - (UIView *)marginParetn:(CGFloat)margin; - (UIView *)marginParetnHorizontal:(CGFloat)margin; - (UIView *)marginParetnVertical:(CGFloat)margin; - (UIView *)marginParentTop:(CGFloat)margin; - (UIView *)marginParentBottom:(CGFloat)margin; - (UIView *)marginParentLeft:(CGFloat)margin; - (UIView *)marginParentRight:(CGFloat)margin; // 控件在父控控件中的位置 // 水平居中 // 只影响其坐标位置,不影响其大小 - (UIView *)layoutParentHorizontalCenter; // 垂直居中 - (UIView *)layoutParentVerticalCenter; // 居中 - (UIView *)layoutParentCenter; // 与其他控件的大小关系 // 影响其大小 - (UIView *)widthEqualTo:(UIView *)brotherView; - (UIView *)heigthEqualTo:(UIView *)brotherView; - (UIView *)sizeEqualTo:(UIView *)brotherView; - (UIView *)sizeWith:(CGSize)size; - (UIView *)shrink:(CGSize)size; - (UIView *)shrinkHorizontal:(CGFloat)margin; - (UIView *)shrinkVertical:(CGFloat)margin; - (UIView *)alignViews:(NSArray *)array isSubView:(BOOL)isSub padding:(CGFloat)padding margin:(CGFloat)margin horizontal:(BOOL)ishorizontal inRect:(CGRect)rect; // views里面的View都是按UI的指定顺序放好的 - (UIView *)alignSubviews:(NSArray *)views horizontallyWithPadding:(CGFloat)padding margin:(CGFloat)margin inRect:(CGRect)rect; - (UIView *)alignSubviews:(NSArray *)views verticallyWithPadding:(CGFloat)padding margin:(CGFloat)margin inRect:(CGRect)rect; - (UIView *)alignSubviewsHorizontallyWithPadding:(CGFloat)padding margin:(CGFloat)margin; - (UIView *)alignSubviewsVerticallyWithPadding:(CGFloat)padding margin:(CGFloat)margin; // 使views以Grid方式均匀显示 - (UIView *)gridViews:(NSArray *)views inColumn:(NSInteger)column size:(CGSize)cellSize margin:(CGSize)margin inRect:(CGRect)rect; @end
{ "pile_set_name": "Github" }
actions logout "Leave the chat-room." self push: 'event' with: 'left'. self session username: nil
{ "pile_set_name": "Github" }
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jclouds.cloudsigma.functions; import static org.testng.Assert.assertEquals; import org.jclouds.http.HttpResponse; import org.testng.annotations.Test; import com.google.inject.Guice; /** * * @author Adrian Cole */ @Test(groups = { "unit" }) public class KeyValuesDelimitedByBlankLinesToVLANInfoTest { private static final KeyValuesDelimitedByBlankLinesToVLANInfo FN = Guice.createInjector().getInstance( KeyValuesDelimitedByBlankLinesToVLANInfo.class); public void testNone() { assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("").build()), null); assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload("\n\n").build()), null); assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").build()), null); } public void testOne() { assertEquals(FN.apply(HttpResponse.builder().statusCode(200).message("").payload(MapToVLANInfoTest.class .getResourceAsStream("/vlan.txt")).build()), MapToVLANInfoTest.ONE); } }
{ "pile_set_name": "Github" }
## XPLUGIN: Test case for triggering interactive timeout while using a SSL connection --echo Preamble --source include/not_windows.inc --source ../include/have_performance_schema_threads.inc --source include/xplugin_preamble.inc ################################################################### --write_file $MYSQL_TMP_DIR/mysqlx-timeouting-interactive.tmp -->import assert_variable.macro -->callmacro Assert_session_variable mysqlx_wait_timeout 5 -->callmacro Assert_global_variable mysqlx_wait_timeout 10 -->sql SHOW SESSION VARIABLES LIKE 'mysqlx_wait_timeout'; SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query'; SELECT USER(); SHOW STATUS LIKE 'Mysqlx_ssl_active'; -->endsql -->echo # Hanging 'receive' command will cause interactive_timeout -->recvtype Mysqlx.Notice.Frame -->echo # We do no expect any message to be received here, -->echo # verification is done by comparing with 'result' file. -->recvuntildisc show-received EOF ################################################################### SET GLOBAL mysqlx_interactive_timeout = 5; SET GLOBAL mysqlx_wait_timeout = 10; eval CREATE USER temp_user@localhost IDENTIFIED WITH 'mysql_native_password' BY 'auth_string'; GRANT ALL ON *.* TO temp_user@localhost; let $wait_condition= SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME like "Mysqlx_aborted_clients" and VARIABLE_VALUE=0; --source include/wait_condition_or_abort.inc --echo # --echo # Run the test without SSL --echo # --replace_regex /(.*IO Read error:).*(read_timeout exceeded)/\1 \2/ exec $MYSQLXTEST --user temp_user --password='auth_string' --client-interactive --file=$MYSQL_TMP_DIR/mysqlx-timeouting-interactive.tmp 2>&1; let $wait_condition= SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME like "Mysqlx_aborted_clients" and VARIABLE_VALUE=1; --source include/wait_condition_or_abort.inc --echo # --echo # Run the test with SSL --echo # --replace_regex /(.*IO Read error:).*(read_timeout exceeded)/\1 \2/ exec $MYSQLXTEST --user temp_user --password='auth_string' --ssl-mode=REQUIRED --client-interactive --file=$MYSQL_TMP_DIR/mysqlx-timeouting-interactive.tmp 2>&1; let $wait_condition= SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME like "Mysqlx_aborted_clients" and VARIABLE_VALUE=2; --source include/wait_condition_or_abort.inc # Cleanup SET GLOBAL mysqlx_interactive_timeout = DEFAULT; SET GLOBAL mysqlx_wait_timeout = DEFAULT; --remove_file $MYSQL_TMP_DIR/mysqlx-timeouting-interactive.tmp DROP USER temp_user@localhost;
{ "pile_set_name": "Github" }
# BetterMeans - Work 2.0 # Copyright (C) 2006-2011 See readme for details and license# module MessagesHelper def link_to_message(message) return '' unless message link_to h(truncate(message.subject, :length => 60)), :controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root, :anchor => (message.parent_id ? "message-#{message.id}" : nil) end end
{ "pile_set_name": "Github" }
import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; import mapToCssModules from 'map-to-css-modules'; export const defaultProps = { tag: 'div', }; export const propTypes = { /** * @ignore */ className: PropTypes.string, /** * Replace the default component tag by the one specified. Can be: */ tag: PropTypes.any, /** * Replace or remove a className from the component. * See example <a href="https://www.npmjs.com/package/map-to-css-modules" target="_blank">here</a>. */ cssModule: PropTypes.object, }; class CardBlock extends React.Component { // eslint-disable-line react/prefer-stateless-function static propTypes = propTypes; static defaultProps = defaultProps; render() { const { className, cssModule, tag: Tag, ...attributes } = this.props; return ( <Tag className={mapToCssModules(cn( className, 'card-block' ), cssModule)} {...attributes} /> ); } } CardBlock.defaultProps = defaultProps; CardBlock.propTypes = propTypes; export default CardBlock;
{ "pile_set_name": "Github" }
// license:BSD-3-Clause // copyright-holders:Fabio Priuli /********************************************************************** Sega Game Gear "SMS Controller Adaptor" emulation Also known as "Master Link" cable. **********************************************************************/ #ifndef MAME_BUS_GAMEGEAR_SMSCRTLADP_H #define MAME_BUS_GAMEGEAR_SMSCRTLADP_H #pragma once #include "ggext.h" #include "bus/sms_ctrl/smsctrl.h" //************************************************************************** // TYPE DEFINITIONS //************************************************************************** // ======================> sms_ctrl_adaptor_device class sms_ctrl_adaptor_device : public device_t, public device_gg_ext_port_interface { public: // construction/destruction sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: // device-level overrides virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; // device_gg_ext_port_interface overrides virtual uint8_t peripheral_r() override; virtual void peripheral_w(uint8_t data) override; private: DECLARE_WRITE_LINE_MEMBER(th_pin_w); required_device<sms_control_port_device> m_subctrl_port; }; // device type definition DECLARE_DEVICE_TYPE(SMS_CTRL_ADAPTOR, sms_ctrl_adaptor_device) #endif // MAME_BUS_GAMEGEAR_SMSCRTLADP_H
{ "pile_set_name": "Github" }
// // Prefix header // // The contents of this file are implicitly included at the beginning of every source file. // #import <Availability.h> #ifndef __IPHONE_5_0 #warning "This project uses features only available in iOS SDK 5.0 and later." #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #endif
{ "pile_set_name": "Github" }
package epi; import epi.test_framework.EpiTest; import epi.test_framework.GenericTest; public class CountBits { @EpiTest(testDataFile = "count_bits.tsv") public static short countBits(int x) { short numBits = 0; while (x != 0) { numBits += (x & 1); x >>>= 1; } return numBits; } public static void main(String[] args) { System.exit( GenericTest .runFromAnnotations(args, "CountBits.java", new Object() {}.getClass().getEnclosingClass()) .ordinal()); } }
{ "pile_set_name": "Github" }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // ============================================================================= // PLEASE READ // // In general, you should not be adding stuff to this file. // // - If your thing is only used in one place, just put it in a reasonable // location in or near that one place. It's nice you want people to be able // to re-use your function, but realistically, if it hasn't been necessary // before after so many years of development, it's probably not going to be // used in other places in the future unless you know of them now. // // - If your thing is used by multiple callers and is UI-related, it should // probably be in app/win/ instead. Try to put it in the most specific file // possible (avoiding the *_util files when practical). // // ============================================================================= #ifndef BASE_WIN_WIN_UTIL_H_ #define BASE_WIN_WIN_UTIL_H_ #include <windows.h> #include <string> #include "base/base_export.h" #include "base/strings/string16.h" struct IPropertyStore; struct _tagpropertykey; typedef _tagpropertykey PROPERTYKEY; namespace base { namespace win { BASE_EXPORT void GetNonClientMetrics(NONCLIENTMETRICS* metrics); // Returns the string representing the current user sid. BASE_EXPORT bool GetUserSidString(std::wstring* user_sid); // Returns true if the shift key is currently pressed. BASE_EXPORT bool IsShiftPressed(); // Returns true if the ctrl key is currently pressed. BASE_EXPORT bool IsCtrlPressed(); // Returns true if the alt key is currently pressed. BASE_EXPORT bool IsAltPressed(); // Returns true if the altgr key is currently pressed. // Windows does not have specific key code and modifier bit and Alt+Ctrl key is // used as AltGr key in Windows. BASE_EXPORT bool IsAltGrPressed(); // Returns false if user account control (UAC) has been disabled with the // EnableLUA registry flag. Returns true if user account control is enabled. // NOTE: The EnableLUA registry flag, which is ignored on Windows XP // machines, might still exist and be set to 0 (UAC disabled), in which case // this function will return false. You should therefore check this flag only // if the OS is Vista or later. BASE_EXPORT bool UserAccountControlIsEnabled(); // Sets the boolean value for a given key in given IPropertyStore. BASE_EXPORT bool SetBooleanValueForPropertyStore( IPropertyStore* property_store, const PROPERTYKEY& property_key, bool property_bool_value); // Sets the string value for a given key in given IPropertyStore. BASE_EXPORT bool SetStringValueForPropertyStore( IPropertyStore* property_store, const PROPERTYKEY& property_key, const wchar_t* property_string_value); // Sets the application id in given IPropertyStore. The function is intended // for tagging application/chromium shortcut, browser window and jump list for // Win7. BASE_EXPORT bool SetAppIdForPropertyStore(IPropertyStore* property_store, const wchar_t* app_id); // Adds the specified |command| using the specified |name| to the AutoRun key. // |root_key| could be HKCU or HKLM or the root of any user hive. BASE_EXPORT bool AddCommandToAutoRun(HKEY root_key, const string16& name, const string16& command); // Removes the command specified by |name| from the AutoRun key. |root_key| // could be HKCU or HKLM or the root of any user hive. BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); // Reads the command specified by |name| from the AutoRun key. |root_key| // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, const string16& name, string16* command); // Sets whether to crash the process during exit. This is inspected by DLLMain // and used to intercept unexpected terminations of the process (via calls to // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes. // Note that not all mechanisms for terminating the process are covered by // this. In particular, TerminateProcess() is not caught. BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash); BASE_EXPORT bool ShouldCrashOnProcessDetach(); // Adjusts the abort behavior so that crash reports can be generated when the // process is aborted. BASE_EXPORT void SetAbortBehaviorForCrashReporting(); // A touch enabled device by this definition is something that has // integrated multi-touch ready to use and has Windows version > Windows7. BASE_EXPORT bool IsTouchEnabledDevice(); // Get the size of a struct up to and including the specified member. // This is necessary to set compatible struct sizes for different versions // of certain Windows APIs (e.g. SystemParametersInfo). #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ offsetof(struct_name, member) + \ (sizeof static_cast<struct_name*>(NULL)->member) // Displays the on screen keyboard on Windows 8 and above. Returns true on // success. BASE_EXPORT bool DisplayVirtualKeyboard(); // Dismisses the on screen keyboard if it is being displayed on Windows 8 and. // above. Returns true on success. BASE_EXPORT bool DismissVirtualKeyboard(); // Returns monitor info after correcting rcWorkArea based on metro version. // see bug #247430 for more details. BASE_EXPORT BOOL GetMonitorInfoWrapper(HMONITOR monitor, MONITORINFO* mi); } // namespace win } // namespace base #endif // BASE_WIN_WIN_UTIL_H_
{ "pile_set_name": "Github" }
var benchmark = require('benchmark') var suite = new benchmark.Suite() global.NewBuffer = require('../../').Buffer // native-buffer-browserify var LENGTH = 50 var newTarget = NewBuffer(LENGTH) suite.add('NewBuffer#bracket-notation', function () { for (var i = 0; i < LENGTH; i++) { newTarget[i] = i + 97 } }) .on('error', function (event) { console.error(event.target.error.stack) }) .on('cycle', function (event) { console.log(String(event.target)) }) .run({ 'async': true })
{ "pile_set_name": "Github" }
[Contents](../Contents.md) \| [Prev (8 Testing and Debugging)](../08_Testing_debugging/00_Overview.md) # 9 Packages We conclude the course with a few details on how to organize your code into a package structure. We'll also discuss the installation of third party packages and preparing to give your own code away to others. The subject of packaging is an ever-evolving, overly complex part of Python development. Rather than focus on specific tools, the main focus of this section is on some general code organization principles that will prove useful no matter what tools you later use to give code away or manage dependencies. * [9.1 Packages](01_Packages.md) * [9.2 Third Party Modules](02_Third_party.md) * [9.3 Giving your code to others](03_Distribution.md) [Contents](../Contents.md) \| [Prev (8 Testing and Debugging)](../08_Testing_debugging/00_Overview.md)
{ "pile_set_name": "Github" }
--- !tapi-tbd-v2 archs: [ armv7, armv7s, arm64, arm64e ] platform: ios flags: [ flat_namespace, not_app_extension_safe ] install-name: /System/Library/PrivateFrameworks/ActivitySharing.framework/ActivitySharing current-version: 1 compatibility-version: 1 objc-constraint: retain_release exports: - archs: [ armv7, armv7s, arm64, arm64e ] symbols: [ _ASAchievementDictionaryByIndex, _ASAchievementFromRichMessagePayload, _ASAchievementLocalizationPathForTemplate, _ASAchievementThumbnailPathForStyle, _ASAchievementsFromCodableAchievements, _ASActivityAppIdentifier, _ASActivityAppIsInstalled, _ASActivityAppIsVisible, _ASActivityAppLaunchURLForFriendOnDate, _ASActivityAppLaunchURLForMeOnDate, _ASActivityAppLaunchURLForSharingFriendList, _ASActivityAppLaunchURLForSharingInbox, _ASAllDatabaseCompetitionKeys, _ASAllDatabaseCompetitionListEntryKeys, _ASAllGoalsMetForSnapshot, _ASAnalyticsReportCompetitionRequestAccept, _ASAnalyticsReportCompetitionRequestIgnore, _ASAnalyticsReportCompetitionRequestSendApp, _ASAnalyticsReportCompetitionRequestSendBulletin, _ASAnalyticsReportSmackTalk, _ASAnalyticsUpdateWithFriends, _ASBestCompetitionVictoryBadgeStyleForPreferredStyles, _ASBreadcrumbKeyForBulletinType, _ASCacheIndexForLocalDate, _ASCloudKitAchievementRecordType, _ASCloudKitActivityDataRootRecordType, _ASCloudKitActivitySnapshotRecordType, _ASCloudKitCompetitionListRecordType, _ASCloudKitNotificationEventRecordType, _ASCloudKitRelationshipEventRecordType, _ASCloudKitRelationshipRecordType, _ASCloudKitWorkoutRecordType, _ASCodableAchievementsFromAchievements, _ASCodableActivityDataPreviewReadFrom, _ASCodableBulletinReadFrom, _ASCodableCloudKitAchievementReadFrom, _ASCodableCloudKitActivitySnapshotReadFrom, _ASCodableCloudKitCompetitionListReadFrom, _ASCodableCloudKitCompetitionReadFrom, _ASCodableCloudKitDateComponentsReadFrom, _ASCodableCloudKitNotificationEventReadFrom, _ASCodableCloudKitRelationshipEventReadFrom, _ASCodableCloudKitRelationshipReadFrom, _ASCodableCloudKitSampleReadFrom, _ASCodableCloudKitWorkoutReadFrom, _ASCodableContactListFromContacts, _ASCodableContactListReadFrom, _ASCodableContactReadFrom, _ASCodableDatabaseCompetitionListEntryReadFrom, _ASCodableDatabaseCompetitionPreferredVictoryBadgeStylesReadFrom, _ASCodableDatabaseCompetitionReadFrom, _ASCodableDatabaseCompetitionScoreReadFrom, _ASCodableFinalizeHandshakeReadFrom, _ASCodableFriendListFromFriends, _ASCodableFriendListReadFrom, _ASCodableFriendReadFrom, _ASCodableInviteRequestReadFrom, _ASCodableInviteResponseReadFrom, _ASCodableRelationshipContainerReadFrom, _ASCodableShareLocationsReadFrom, _ASCodableWithdrawInviteRequestReadFrom, _ASCodableWorkoutsFromWorkouts, _ASCompetitionCalculateDailyAverageScore, _ASCompetitionCalculateStartDateComponentsForFriend, _ASCompetitionCalculateStartDateComponentsForFriendWithProposedStartDate, _ASCompetitionCalculateTotalScore, _ASCompetitionCalculateUpdatedScores, _ASCompetitionCompetitionUUIDKey, _ASCompetitionCurrentCacheIndexKey, _ASCompetitionCurrentScoreDelta, _ASCompetitionDailyScoreForParticipantWithCacheIndex, _ASCompetitionDayWithHighestScoreForParticipant, _ASCompetitionDurationDateComponentsForNewCompetitions, _ASCompetitionDurationDateComponentsKey, _ASCompetitionEndedBasePrefix, _ASCompetitionEndedBestDaySuffix, _ASCompetitionEndedCloseSuffix, _ASCompetitionEndedDescriptionForFriend, _ASCompetitionEndedGenericSuffix, _ASCompetitionEndedKeyForFriend, _ASCompetitionEndedLoserSuffix, _ASCompetitionEndedLostPreviousSuffix, _ASCompetitionEndedNumWinningDaysSuffix, _ASCompetitionEndedTiedSuffix, _ASCompetitionEndedTitleForFriend, _ASCompetitionEndedWinnerSuffix, _ASCompetitionEndedWinningDaySuffix, _ASCompetitionFirstGlanceBasePrefix, _ASCompetitionFirstGlanceDescriptionForTypeWithFriends, _ASCompetitionFirstGlanceMultipleRelevantFriendsSuffix, _ASCompetitionFirstGlanceNameSuffix, _ASCompetitionFirstGlanceOneRelevantFriendSuffix, _ASCompetitionFirstGlanceProgressAheadSuffix, _ASCompetitionFirstGlanceProgressBehindSuffix, _ASCompetitionFirstGlanceProgressCloseSuffix, _ASCompetitionFirstGlanceProgressSignificantlyBehindSuffix, _ASCompetitionFirstGlanceSectionHeaderForType, _ASCompetitionFirstGlanceThreeRelevantFriendsSuffix, _ASCompetitionFirstGlanceTwoRelevantFriendsSuffix, _ASCompetitionFirstGlanceTypeEndSuffix, _ASCompetitionFirstGlanceTypeStartSuffix, _ASCompetitionFriendUUIDKey, _ASCompetitionFromRichMessagePayload, _ASCompetitionIsReadyToComplete, _ASCompetitionLastPushedCacheIndexKey, _ASCompetitionLearnMoreDetailsAttributedStringForFriend, _ASCompetitionLearnMoreIntroductionAttributedStringForFriend, _ASCompetitionListCKSystemFieldsKey, _ASCompetitionListFriendUUIDKey, _ASCompetitionListOwnerKey, _ASCompetitionListTypeKey, _ASCompetitionMaximumNumberOfPointsPerDayKey, _ASCompetitionMaximumPointsPerDayForNewCompetitions, _ASCompetitionNeedsScoreUpdateForSummary, _ASCompetitionOpponentScoreKey, _ASCompetitionParticipantHasCrossedMercyThresholdOnLastDayForCompetition, _ASCompetitionParticipationResourcePath, _ASCompetitionParticipationTemplate, _ASCompetitionParticipationTemplateUniqueName, _ASCompetitionPreferredVictoryBadgeStylesKey, _ASCompetitionRequestHasExpired, _ASCompetitionRequestHoursUntilExpiration, _ASCompetitionRequestIsStillVisible, _ASCompetitionRequestMinutesUntilExpiration, _ASCompetitionRequestTimeIntervalUntilExpiration, _ASCompetitionScoreCapCelebrationAssetURL, _ASCompetitionScoreCapCelebrationBulletinTitle, _ASCompetitionScoreCapCelebrationDescription, _ASCompetitionScoreCapCelebrationTitle, _ASCompetitionScoreKey, _ASCompetitionScoresAreWithinClosenessThreshold, _ASCompetitionStageStringWithCompetition, _ASCompetitionStartDateComponentsKey, _ASCompetitionTypeKey, _ASCompetitionVictoryBadgeColorFromStyle, _ASCompetitionVictoryBadgeModelFromStyle, _ASCompetitionVictoryCelebrationAssetURL, _ASCompetitionVictoryFriendUUIDFromTemplate, _ASCompetitionVictoryPropertyListPathForStyle, _ASCompetitionVictoryResourcePathForStyle, _ASCompetitionVictoryStyleForBadge, _ASCompetitionVictoryTemplateForFriend, _ASCompetitionVictoryTemplateNameForFriend, _ASCompetitionVictoryTemplateUniqueNamePrefix, _ASCompetitionWinCountForParticipant, _ASCompetitionWinningDayWithHighestScoreForParticipant, _ASCompetitionZeroPaddedScoreString, _ASCompetitionsEligibleForArchival, _ASCompetitionsSortedByEndDate, _ASContactSanitizedDestination, _ASContactStorePredicateForDestination, _ASContactsFromCodableContactList, _ASDailyAverageStringWithScore, _ASDateFromActivityAppLaunchURL, _ASDestinationIsEmail, _ASDestinationIsMako, _ASDestinationIsPhoneNumber, _ASDidLosePreviousCompetitionWithFriend, _ASDispatchQueueName, _ASDispatchQueueTaggedName, _ASDisplayModeToString, _ASEphemeralCompetitionVictoryAchievementForFriendAchievement, _ASEphemeralCompetitionVictoryAchievementForStyle, _ASEphemeralEarnedAchievement, _ASEphemeralEarnedAchievementForFriendAchievement, _ASFormattedSequence, _ASFormattedVictoryBadgeStyles, _ASFriendAchievementFromTemplateAndEarnedInstance, _ASFriendUUIDFromActivityAppLaunchURL, _ASFriendUUIDFromRichMessagePayload, _ASFriendsFromCodableFriendList, _ASFriendsSortedByCompetitionEndDate, _ASFriendsSortedByCompetitionEndDateForFirstGlanceType, _ASFriendsSortedByEarliestCompetitionVictoryOrPotentialVictoryDate, _ASFriendsWithCompetitionsEndingToday, _ASFriendsWithCompetitionsStartingToday, _ASFullNameForContactStoreContact, _ASIgnoredMostRecentCompetitionRequestFromContact, _ASIsCompetitionVictoryTemplate, _ASLaunchToMessagesWithRecipients, _ASLinearSequenceWithCount, _ASLogAchievements, _ASLogActivityData, _ASLogCloudKit, _ASLogCompetitions, _ASLogDatabase, _ASLogDefault, _ASLogFriendList, _ASLogNotifications, _ASLogPeriodicUpdates, _ASLogRelationships, _ASLoggingInitialize, _ASMaxNumber, _ASMessageFromRichMessagePayload, _ASNumberOfCompetitionVictoryBadgeModels, _ASNumberOfCompetitionVictoryColorsForBadgeModel, _ASNumberOfNewFriendsAllowedForFriends, _ASObjectsAreEqual, _ASPairedDeviceSupportsCompetitions, _ASPointsStringWithScore, _ASPreferredCompetitionVictoryBadgeStylesForFriend, _ASRecipientAddressFromRichMessagePayload, _ASRelationshipNeedsSupportedFeaturesUpdate, _ASRichMessagePayloadForAchievement, _ASRichMessagePayloadForCompetitionAccepted, _ASRichMessagePayloadForCompetitionScore, _ASRichMessagePayloadForGoalCompletion, _ASRichMessagePayloadForWorkout, _ASRichMessageTypeFromRichMessagePayload, _ASSanitizedContactDestination, _ASSanitizedContactDestinations, _ASSecureUnarchiveClassWithData, _ASServerInterface, _ASShortNameForContactStoreContact, _ASShuffledArray, _ASSnapshotDictionaryByIndex, _ASSnapshotFromRichMessagePayload, _ASStringForReachabilityStatus, _ASStringsAreEqual, _ASSupportedPhoneFeaturesForCurrentDevice, _ASSupportedWatchFeaturesForCurrentDevice, _ASTimestampFromRichMessagePayload, _ASUniqueItemsInArrayPreferringLastOccurance, _ASUpdateSupportedFeaturesForRelationship, _ASValidateEligibilityForAcceptingCompetitionRequest, _ASValidateEligibilityForIncomingCompetitionRequest, _ASValidateEligibilityForOutgoingCompetitionRequest, _ASWorkoutCaloriesString, _ASWorkoutCountString, _ASWorkoutDictionaryByIndex, _ASWorkoutFromRichMessagePayload, _ASWorkoutNameString, _ASWorkoutNotificationRecordIDForType, _ASWorkoutRecordIDForUUID, _ASWorkoutsFromCodableWorkouts, _ActivitySharingBundle, __ASCreateActivityDataRootRecordWithID, __ASCreateRecordsFromCloudKitCodablesAndRecordZoneID, _kASAchievementLocalizedPlaceholderCompetitionEndDayKey, _kASAchievementLocalizedPlaceholderFriendNameKey, _kASActivitySharingHostFriendDetail, _kASActivitySharingHostFriendList, _kASActivitySharingHostInbox, _kASActivitySharingHostMe, _kASActivitySharingIsSetupUserDefaultsKey, _kASActivitySharingPluginDatabaseCompetitionListsTableName, _kASActivitySharingPluginDatabaseCompetitionsTableName, _kASActivitySharingPluginDatabaseSchemaName, _kASActivitySharingScheme, _kASAssetsPath, _kASBulletinsSubsectionIdentifier, _kASChangeTokenExpirationInterval, _kASChangeTokenTimestampDefaultsKey, _kASCloudKitAccountStatusChangedNotificationKey, _kASCompetitionDurationNumberOfDaysUserDefaultsKey, _kASCompetitionRequestExpirationNumberOfSecondsUserDefaultsKey, _kASCompetitionRequestVisibilityAfterExpirationNumberOfSecondsDefaultsKey, _kASCompetitionsAchievementTemplateSourceIdentifier, _kASCompetititionMaximumPointsPerDayUserDefaultsKey, _kASDatabaseChangeTokenCacheDefaultsKey, _kASDiskCacheDirectory, _kASDisplayContextCompanion, _kASDisplayContextGizmo, _kASDomain, _kASFriendListChangedNotificationKey, _kASGatewayStatusChangedNotificationKey, _kASHasFriendsKey, _kASLiveBubblesBundleIdentifier, _kASMaxNumberOfFriends, _kASNotificationAchievementDataKey, _kASNotificationActivitySnapshotDataKey, _kASNotificationCurrentCompetitionStageKey, _kASNotificationFriendListDataKey, _kASNotificationIsDemoBulletinKey, _kASNotificationTypeKey, _kASNotificationWorkoutDataKey, _kASNotificationsBulletinProviderMachServiceName, _kASNotificationsEnabledKey, _kASNumberOfBucketsCompanion, _kASNumberOfBucketsWatch, _kASPluginIdentifier, _kASSubsectionIdentifierBulletinContextKey, _kASZoneChangeTokenCacheDefaultsKey, _kASiCloudServiceIdentifier, _kASiMessageServiceIdentifier ] objc-classes: [ _ASActivityDataNotification, _ASActivityDataNotificationGroup, _ASActivityDataNotificationRulesEngine, _ASAsyncTransactionQueue, _ASBulletinStore, _ASClient, _ASCodableActivityDataPreview, _ASCodableBulletin, _ASCodableCloudKitAchievement, _ASCodableCloudKitActivitySnapshot, _ASCodableCloudKitCompetition, _ASCodableCloudKitCompetitionList, _ASCodableCloudKitDateComponents, _ASCodableCloudKitNotificationEvent, _ASCodableCloudKitRelationship, _ASCodableCloudKitRelationshipEvent, _ASCodableCloudKitSample, _ASCodableCloudKitWorkout, _ASCodableContact, _ASCodableContactList, _ASCodableDatabaseCompetition, _ASCodableDatabaseCompetitionListEntry, _ASCodableDatabaseCompetitionPreferredVictoryBadgeStyles, _ASCodableDatabaseCompetitionScore, _ASCodableFinalizeHandshake, _ASCodableFriend, _ASCodableFriendList, _ASCodableInviteRequest, _ASCodableInviteResponse, _ASCodableRelationshipContainer, _ASCodableShareLocations, _ASCodableWithdrawInviteRequest, _ASCompetition, _ASCompetitionGizmoDetailView, _ASCompetitionGraphView, _ASCompetitionList, _ASCompetitionMessageBubbleView, _ASCompetitionParticipantScoreView, _ASCompetitionScoreView, _ASCompetitionScoreViewConfiguration, _ASCompetitionStore, _ASCompetitionTimeRemainingLabel, _ASContact, _ASDatabaeCompetitionListEntryBulkDeletionJournalEntry, _ASDatabaseCompetitionBulkDeletionJournalEntry, _ASDatabaseCompetitionDeletionJournalEntry, _ASDatabaseCompetitionEntity, _ASDatabaseCompetitionJournalEntry, _ASDatabaseCompetitionListEntryEncoder, _ASDatabaseCompetitionListEntryEntity, _ASDatabaseCompetitionListEntryJournalEntry, _ASDatabseCompetitionEncoder, _ASDemoData, _ASDisplayContext, _ASFriend, _ASFriendListDisplayContext, _ASFriendListQuery, _ASFriendListRow, _ASFriendListSection, _ASFriendListSectionManager, _ASNotificationEvent, _ASReachabilityManager, _ASReachabilityQueryOperation, _ASReachabilityStatusCache, _ASRelationship, _ASRelationshipEvent, _ASSampleCollector ] objc-ivars: [ _ASActivityDataNotification._friend, _ASActivityDataNotification._sample, _ASActivityDataNotificationGroup._achievementNotifications, _ASActivityDataNotificationGroup._goalCompletionNotifications, _ASActivityDataNotificationGroup._workoutNotifications, _ASAsyncTransactionQueue._description, _ASAsyncTransactionQueue._lockingQueue, _ASAsyncTransactionQueue._targetQueue, _ASBulletinStore._bulletins, _ASClient._clientQueue, _ASClient._pluginProxyProvider, _ASClient._serverProxy, _ASClient._serverQueue, _ASCodableActivityDataPreview._achievements, _ASCodableActivityDataPreview._activitySnapshot, _ASCodableActivityDataPreview._date, _ASCodableActivityDataPreview._has, _ASCodableActivityDataPreview._workouts, _ASCodableBulletin._achievementData, _ASCodableBulletin._competitionStage, _ASCodableBulletin._friendListData, _ASCodableBulletin._friendUUID, _ASCodableBulletin._has, _ASCodableBulletin._snapshotData, _ASCodableBulletin._timestamp, _ASCodableBulletin._title, _ASCodableBulletin._type, _ASCodableBulletin._workoutData, _ASCodableCloudKitAchievement._completedDate, _ASCodableCloudKitAchievement._definitionIdentifier, _ASCodableCloudKitAchievement._doubleValue, _ASCodableCloudKitAchievement._has, _ASCodableCloudKitAchievement._intValue, _ASCodableCloudKitAchievement._sample, _ASCodableCloudKitAchievement._templateUniqueName, _ASCodableCloudKitAchievement._workoutActivityType, _ASCodableCloudKitActivitySnapshot._activeHours, _ASCodableCloudKitActivitySnapshot._activeHoursGoal, _ASCodableCloudKitActivitySnapshot._briskMinutes, _ASCodableCloudKitActivitySnapshot._briskMinutesGoal, _ASCodableCloudKitActivitySnapshot._energyBurned, _ASCodableCloudKitActivitySnapshot._energyBurnedGoal, _ASCodableCloudKitActivitySnapshot._has, _ASCodableCloudKitActivitySnapshot._pushCount, _ASCodableCloudKitActivitySnapshot._sample, _ASCodableCloudKitActivitySnapshot._snapshotIndex, _ASCodableCloudKitActivitySnapshot._sourceUUID, _ASCodableCloudKitActivitySnapshot._stepCount, _ASCodableCloudKitActivitySnapshot._timeZoneOffsetFromUTCForNoon, _ASCodableCloudKitActivitySnapshot._walkingAndRunningDistance, _ASCodableCloudKitActivitySnapshot._wheelchairUse, _ASCodableCloudKitCompetition._currentCacheIndex, _ASCodableCloudKitCompetition._durationDateComponents, _ASCodableCloudKitCompetition._has, _ASCodableCloudKitCompetition._maximumNumberOfPointsPerDay, _ASCodableCloudKitCompetition._opponentScores, _ASCodableCloudKitCompetition._preferredVictoryBadgeStyles, _ASCodableCloudKitCompetition._scores, _ASCodableCloudKitCompetition._startDateComponents, _ASCodableCloudKitCompetition._uuid, _ASCodableCloudKitCompetitionList._competitions, _ASCodableCloudKitCompetitionList._friendUUID, _ASCodableCloudKitCompetitionList._has, _ASCodableCloudKitCompetitionList._type, _ASCodableCloudKitDateComponents._day, _ASCodableCloudKitDateComponents._era, _ASCodableCloudKitDateComponents._has, _ASCodableCloudKitDateComponents._hour, _ASCodableCloudKitDateComponents._month, _ASCodableCloudKitDateComponents._year, _ASCodableCloudKitNotificationEvent._date, _ASCodableCloudKitNotificationEvent._has, _ASCodableCloudKitNotificationEvent._triggerSnapshotIndex, _ASCodableCloudKitNotificationEvent._triggerUUID, _ASCodableCloudKitNotificationEvent._type, _ASCodableCloudKitRelationship._addresses, _ASCodableCloudKitRelationship._cloudKitAddress, _ASCodableCloudKitRelationship._eventCount, _ASCodableCloudKitRelationship._events, _ASCodableCloudKitRelationship._has, _ASCodableCloudKitRelationship._incomingHandshakeToken, _ASCodableCloudKitRelationship._outgoingHandshakeToken, _ASCodableCloudKitRelationship._preferredReachableAddress, _ASCodableCloudKitRelationship._preferredReachableService, _ASCodableCloudKitRelationship._supportedPhoneFeatures, _ASCodableCloudKitRelationship._supportedWatchFeatures, _ASCodableCloudKitRelationship._uuid, _ASCodableCloudKitRelationshipEvent._anchor, _ASCodableCloudKitRelationshipEvent._date, _ASCodableCloudKitRelationshipEvent._has, _ASCodableCloudKitRelationshipEvent._type, _ASCodableCloudKitSample._endDate, _ASCodableCloudKitSample._has, _ASCodableCloudKitSample._startDate, _ASCodableCloudKitSample._uuid, _ASCodableCloudKitWorkout._bundleID, _ASCodableCloudKitWorkout._deviceManufacturer, _ASCodableCloudKitWorkout._deviceModel, _ASCodableCloudKitWorkout._duration, _ASCodableCloudKitWorkout._goalInCanonicalUnit, _ASCodableCloudKitWorkout._goalType, _ASCodableCloudKitWorkout._has, _ASCodableCloudKitWorkout._isIndoorWorkout, _ASCodableCloudKitWorkout._isWatchWorkout, _ASCodableCloudKitWorkout._sample, _ASCodableCloudKitWorkout._totalBasalEnergyBurnedInCanonicalUnit, _ASCodableCloudKitWorkout._totalDistanceInCanonicalUnit, _ASCodableCloudKitWorkout._totalEnergyBurnedInCanonicalUnit, _ASCodableCloudKitWorkout._type, _ASCodableContact._destinations, _ASCodableContact._fullName, _ASCodableContact._linkedContactStoreIdentifier, _ASCodableContact._relationshipContainer, _ASCodableContact._remoteRelationshipContainer, _ASCodableContact._shortName, _ASCodableContactList._contacts, _ASCodableDatabaseCompetition._competition, _ASCodableDatabaseCompetition._friendUUID, _ASCodableDatabaseCompetition._has, _ASCodableDatabaseCompetition._type, _ASCodableDatabaseCompetitionListEntry._friendUUID, _ASCodableDatabaseCompetitionListEntry._has, _ASCodableDatabaseCompetitionListEntry._owner, _ASCodableDatabaseCompetitionListEntry._systemFieldsOnlyRecord, _ASCodableDatabaseCompetitionListEntry._type, _ASCodableDatabaseCompetitionPreferredVictoryBadgeStyles._styles, _ASCodableDatabaseCompetitionScore._scores, _ASCodableFinalizeHandshake._activityDataPreview, _ASCodableFinalizeHandshake._handshakeToken, _ASCodableFinalizeHandshake._inviterShareLocations, _ASCodableFriend._achievements, _ASCodableFriend._competitions, _ASCodableFriend._contact, _ASCodableFriend._snapshots, _ASCodableFriend._workouts, _ASCodableFriendList._friends, _ASCodableInviteRequest._activityDataPreview, _ASCodableInviteRequest._handshakeToken, _ASCodableInviteRequest._has, _ASCodableInviteRequest._inviterBuildNumber, _ASCodableInviteRequest._inviterCallerID, _ASCodableInviteRequest._inviterCloudKitAddress, _ASCodableInviteRequest._inviterVersion, _ASCodableInviteResponse._activityDataPreview, _ASCodableInviteResponse._handshakeToken, _ASCodableInviteResponse._has, _ASCodableInviteResponse._inviteeBuildNumber, _ASCodableInviteResponse._inviteeCloudKitAddress, _ASCodableInviteResponse._inviteeShareLocations, _ASCodableInviteResponse._inviteeVersion, _ASCodableInviteResponse._responseCode, _ASCodableRelationshipContainer._has, _ASCodableRelationshipContainer._relationship, _ASCodableRelationshipContainer._relationshipShareID, _ASCodableRelationshipContainer._remoteActivityShareID, _ASCodableRelationshipContainer._remoteRelationshipShareID, _ASCodableRelationshipContainer._systemFieldsOnlyRecord, _ASCodableRelationshipContainer._version, _ASCodableShareLocations._activityShareURL, _ASCodableShareLocations._relationshipShareURL, _ASCodableWithdrawInviteRequest._handshakeToken, _ASCompetition._UUID, _ASCompetition._currentCacheIndex, _ASCompetition._currentDateOverride, _ASCompetition._durationDateComponents, _ASCompetition._lastPushedCacheIndex, _ASCompetition._maximumNumberOfPointsPerDay, _ASCompetition._opponentScores, _ASCompetition._preferredVictoryBadgeStyles, _ASCompetition._scores, _ASCompetition._startDateComponents, _ASCompetitionGizmoDetailView._graphView, _ASCompetitionGizmoDetailView._isInteractionEnabled, _ASCompetitionGizmoDetailView._messageBubbleView, _ASCompetitionGizmoDetailView._modules, _ASCompetitionGizmoDetailView._previousLayoutWidth, _ASCompetitionGizmoDetailView._timeRemainingLabel, _ASCompetitionGizmoDetailView._timeRemainingSeparator, _ASCompetitionGizmoDetailView._totalScoreView, _ASCompetitionGizmoDetailView._totalWinsScoreView, _ASCompetitionGizmoDetailView._totalWinsSeparator, _ASCompetitionGizmoDetailView._type, _ASCompetitionGraphView._alignment, _ASCompetitionGraphView._barWidth, _ASCompetitionGraphView._bottomPadding, _ASCompetitionGraphView._competition, _ASCompetitionGraphView._currentDateFont, _ASCompetitionGraphView._dateColor, _ASCompetitionGraphView._dateFont, _ASCompetitionGraphView._dateFormatter, _ASCompetitionGraphView._dayLabelBaselineOffset, _ASCompetitionGraphView._drawsDailyScoreLabels, _ASCompetitionGraphView._drawsFutureScoreDots, _ASCompetitionGraphView._highlightedDateColor, _ASCompetitionGraphView._highlightsCurrentDay, _ASCompetitionGraphView._horizontalInset, _ASCompetitionGraphView._maxBarHeight, _ASCompetitionGraphView._showsBackgroundDateGuide, _ASCompetitionGraphView._showsBackgroundScoreGuide, _ASCompetitionGraphView._spaceBetweenBars, _ASCompetitionList._competitions, _ASCompetitionList._friendUUID, _ASCompetitionList._systemFieldsOnlyRecord, _ASCompetitionList._type, _ASCompetitionMessageBubbleView._backgroundView, _ASCompetitionMessageBubbleView._messageBubbleView, _ASCompetitionParticipantScoreView._configuration, _ASCompetitionParticipantScoreView._name, _ASCompetitionParticipantScoreView._nameFontSizeReduction, _ASCompetitionParticipantScoreView._nameLabel, _ASCompetitionParticipantScoreView._previousLayoutWidth, _ASCompetitionParticipantScoreView._primaryScore, _ASCompetitionParticipantScoreView._primaryScoreFontSizeReduction, _ASCompetitionParticipantScoreView._primaryScoreLabel, _ASCompetitionParticipantScoreView._scoreColor, _ASCompetitionParticipantScoreView._scoreLeftMargin, _ASCompetitionParticipantScoreView._scoreRightMargin, _ASCompetitionParticipantScoreView._secondaryScore, _ASCompetitionParticipantScoreView._secondaryScoreEnabled, _ASCompetitionParticipantScoreView._secondaryScoreLabel, _ASCompetitionScoreView._achievementThumbnailView, _ASCompetitionScoreView._configuration, _ASCompetitionScoreView._isRTLLayout, _ASCompetitionScoreView._myScoreView, _ASCompetitionScoreView._opponentScoreView, _ASCompetitionScoreView._previousLayoutWidth, _ASCompetitionScoreView._scoreTypeHeaderLabel, _ASCompetitionScoreViewConfiguration._achievementThumbnailAlignment, _ASCompetitionScoreViewConfiguration._achievementThumbnailQuality, _ASCompetitionScoreViewConfiguration._achievementThumbnailSize, _ASCompetitionScoreViewConfiguration._achievementThumbnailTopMargin, _ASCompetitionScoreViewConfiguration._alignment, _ASCompetitionScoreViewConfiguration._bottomMargin, _ASCompetitionScoreViewConfiguration._division, _ASCompetitionScoreViewConfiguration._headerBaselineOffset, _ASCompetitionScoreViewConfiguration._headerFont, _ASCompetitionScoreViewConfiguration._minimumMiddleMargin, _ASCompetitionScoreViewConfiguration._nameBaselineOffset, _ASCompetitionScoreViewConfiguration._nameFont, _ASCompetitionScoreViewConfiguration._opponentScoreViewWidth, _ASCompetitionScoreViewConfiguration._primaryScoreBaselineOffset, _ASCompetitionScoreViewConfiguration._primaryScoreFont, _ASCompetitionScoreViewConfiguration._primaryScoreSource, _ASCompetitionScoreViewConfiguration._primaryScoreUnitFont, _ASCompetitionScoreViewConfiguration._secondaryScoreBaselineOffset, _ASCompetitionScoreViewConfiguration._secondaryScoreFont, _ASCompetitionScoreViewConfiguration._showsAchievementThumbnail, _ASCompetitionScoreViewConfiguration._showsNames, _ASCompetitionScoreViewConfiguration._showsPrimaryScoreUnits, _ASCompetitionScoreViewConfiguration._showsScoreTypeHeader, _ASCompetitionScoreViewConfiguration._showsTodaySecondaryScore, _ASCompetitionScoreViewConfiguration._sideMargin, _ASCompetitionScoreViewConfiguration._uppercaseNames, _ASCompetitionScoreViewConfiguration._wantsScaledBaselineAlignment, _ASCompetitionScoreViewConfiguration._zeroPadPrimaryScore, _ASCompetitionStore._archivedCompetitionListCache, _ASCompetitionStore._currentCompetitionListCache, _ASCompetitionStore._profile, _ASCompetitionStore._remoteCompetitionListCache, _ASCompetitionStore._serialQueue, _ASContact._contactStore, _ASContact._destinations, _ASContact._fullName, _ASContact._linkedContactStoreIdentifier, _ASContact._relationship, _ASContact._remoteRelationship, _ASContact._shortName, _ASDatabaseCompetitionDeletionJournalEntry._friendUUID, _ASDatabaseCompetitionDeletionJournalEntry._type, _ASDatabaseCompetitionJournalEntry._databaseCompetition, _ASDatabaseCompetitionListEntryJournalEntry._competitionList, _ASDisplayContext._contentSizeCategory, _ASDisplayContext._dataFont, _ASDisplayContext._dataFontSize, _ASDisplayContext._descriptionFont, _ASDisplayContext._keyColors, _ASDisplayContext._multilineDataFont, _ASDisplayContext._multilineDataFontSize, _ASDisplayContext._multilineUnitFont, _ASDisplayContext._nameFont, _ASDisplayContext._nameFontSize, _ASDisplayContext._titleColors, _ASDisplayContext._unitFont, _ASFriend._competitions, _ASFriend._contact, _ASFriend._currentCacheIndex, _ASFriend._friendAchievements, _ASFriend._friendWorkouts, _ASFriend._snapshots, _ASFriendListDisplayContext._displayFilter, _ASFriendListDisplayContext._displayMode, _ASFriendListQuery._mostRecentToken, _ASFriendListQuery._updateHandler, _ASFriendListRow._friend, _ASFriendListRow._snapshot, _ASFriendListSection._rows, _ASFriendListSection._startDate, _ASFriendListSectionManager._allFriends, _ASFriendListSectionManager._client, _ASFriendListSectionManager._displayContextToSortedSectionsCache, _ASFriendListSectionManager._friendListQuery, _ASFriendListSectionManager._friendQueryRetries, _ASFriendListSectionManager._hasReceivedFriendListQueryResult, _ASFriendListSectionManager._hasReceivedMeQueryResult, _ASFriendListSectionManager._healthStore, _ASFriendListSectionManager._meQuery, _ASFriendListSectionManager._meQueryRetries, _ASFriendListSectionManager._model, _ASFriendListSectionManager._modelQueryToken, _ASFriendListSectionManager._readWriteQueue, _ASFriendListSectionManager._shouldGenerateDemoData, _ASFriendListSectionManager._workoutDataProvider, _ASNotificationEvent._date, _ASNotificationEvent._friendUUID, _ASNotificationEvent._triggerSnapshotIndex, _ASNotificationEvent._triggerUUID, _ASNotificationEvent._type, _ASReachabilityManager._queryOperationQueue, _ASReachabilityManager._serviceIdentifier, _ASReachabilityManager._statusCache, _ASReachabilityQueryOperation._batchQueryController, _ASReachabilityQueryOperation._completionHandler, _ASReachabilityQueryOperation._destinations, _ASReachabilityQueryOperation._executing, _ASReachabilityQueryOperation._finished, _ASReachabilityQueryOperation._rawIDSDestinationToOriginalDestination, _ASReachabilityQueryOperation._remainingDestinations, _ASReachabilityQueryOperation._results, _ASReachabilityQueryOperation._serviceIdentifier, _ASReachabilityQueryOperation._statusCache, _ASReachabilityQueryOperation._updateHandler, _ASReachabilityQueryOperation.timer, _ASReachabilityStatusCache._cache, _ASReachabilityStatusCache._serialQueue, _ASRelationship._UUID, _ASRelationship._addresses, _ASRelationship._cloudKitAddress, _ASRelationship._dateActivityDataInitiallyBecameVisible, _ASRelationship._dateForLatestDataHidden, _ASRelationship._dateForLatestIgnoredCompetitionRequest, _ASRelationship._dateForLatestIncomingCompetitionRequest, _ASRelationship._dateForLatestOutgoingCompetitionRequest, _ASRelationship._dateForLatestOutgoingInviteRequest, _ASRelationship._dateForLatestRelationshipStart, _ASRelationship._hasCompletedCompetition, _ASRelationship._hasIgnoredCompetitionRequest, _ASRelationship._hasIncomingCompetitionRequest, _ASRelationship._hasIncomingInviteRequest, _ASRelationship._hasOutgoingCompetitionRequest, _ASRelationship._hasOutgoingInviteRequest, _ASRelationship._incomingHandshakeToken, _ASRelationship._isAwaitingCompetitionResponse, _ASRelationship._isAwaitingInviteResponse, _ASRelationship._isCompetitionActive, _ASRelationship._isFriendshipActive, _ASRelationship._isHidingActivityData, _ASRelationship._isMuteEnabled, _ASRelationship._outgoingHandshakeToken, _ASRelationship._preferredReachableAddress, _ASRelationship._preferredReachableService, _ASRelationship._relationshipEvents, _ASRelationship._relationshipShareID, _ASRelationship._remoteActivityDataShareID, _ASRelationship._remoteRelationshipShareID, _ASRelationship._sentInviteResponse, _ASRelationship._supportedPhoneFeatures, _ASRelationship._supportedWatchFeatures, _ASRelationship._systemFieldsOnlyRecord, _ASRelationship._version, _ASRelationshipEvent._anchor, _ASRelationshipEvent._timestamp, _ASRelationshipEvent._type ] ...
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/color_white"> <com.makeramen.roundedimageview.RoundedImageView android:id="@+id/item_4_icon" android:layout_width="100dp" android:layout_height="80dp" android:layout_margin="10dp" android:scaleType="centerCrop" android:src="@mipmap/ic_doctor_1" app:riv_corner_radius="6dp" /> <TextView android:id="@+id/item_4_title" style="@style/text_14_333333" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/item_4_icon" android:layout_toEndOf="@id/item_4_icon" tools:text="怎样系统预防及治疗冠心病" /> <TextView android:id="@+id/item_4_name" style="@style/text_12_666666" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignStart="@id/item_4_title" android:layout_below="@id/item_4_title" android:layout_marginEnd="6dp" android:layout_marginTop="3dp" tools:text="刘飞" /> <TextView android:id="@+id/item_4_des" style="@style/text_12_9f9f9f" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/item_4_title" android:layout_marginTop="3dp" android:layout_toEndOf="@id/item_4_name" tools:text="首都医科大学宣武医院主治医师" /> <TextView android:id="@+id/item_4_people" style="@style/text_10_9f9f9f" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@id/item_4_icon" android:layout_alignStart="@id/item_4_title" tools:text="25人见过" /> <com.coorchice.library.SuperTextView android:id="@+id/item_4_tag" style="@style/text_10_5c93f7" android:layout_width="wrap_content" android:layout_height="18dp" android:layout_above="@id/item_4_people" android:layout_alignStart="@+id/item_4_title" android:layout_marginBottom="3dp" android:layout_marginEnd="6dp" android:layout_marginTop="6dp" android:gravity="center" android:paddingBottom="2dp" android:paddingLeft="4dp" android:paddingRight="4dp" android:paddingTop="2dp" app:corner="10dp" app:stroke_color="@color/color_5C93F7" app:stroke_width="1dp" tools:text="健康行家" /> <TextView android:id="@+id/item_4_price" style="@style/text_12_5c93f7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/item_4_icon" android:layout_marginEnd="10dp" tools:text="¥ 150/次" /> <View android:layout_width="match_parent" android:layout_height="0.5dp" android:layout_alignParentBottom="true" android:layout_alignStart="@id/item_4_icon" android:background="@color/color_line" /> </RelativeLayout>
{ "pile_set_name": "Github" }
<script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/highcharts-more.js"></script> <div id="container" style="height: 300px; width: 400px; margin: 0 auto;"></div>
{ "pile_set_name": "Github" }
Clazz.declarePackage ("J.renderbio"); Clazz.load (["J.renderbio.StrandsRenderer"], "J.renderbio.MeshRibbonRenderer", null, function () { c$ = Clazz.declareType (J.renderbio, "MeshRibbonRenderer", J.renderbio.StrandsRenderer); Clazz.overrideMethod (c$, "renderBioShape", function (bioShape) { if (this.wireframeOnly) this.renderStrands (); else this.renderMeshRibbon (); }, "J.shapebio.BioShape"); Clazz.defineMethod (c$, "renderMeshRibbon", function () { if (!this.setStrandCount ()) return; var offset = ((this.strandCount >> 1) * this.strandSeparation) + this.baseStrandOffset; this.render2Strand (false, offset, offset); this.renderStrands (); }); Clazz.defineMethod (c$, "render2Strand", function (doFill, offsetTop, offsetBottom) { this.getScreenControlPoints (); this.ribbonTopScreens = this.calcScreens (offsetTop); this.ribbonBottomScreens = this.calcScreens (-offsetBottom); for (var i = this.bsVisible.nextSetBit (0); i >= 0; i = this.bsVisible.nextSetBit (i + 1)) this.renderHermiteRibbon (doFill, i, false); this.vwr.freeTempScreens (this.ribbonTopScreens); this.vwr.freeTempScreens (this.ribbonBottomScreens); }, "~B,~N,~N"); });
{ "pile_set_name": "Github" }
#!/usr/bin/env perl # Decode HTML entities (e.g. &lt; becomes <) use HTML::Entities; while(<>) {print decode_entities($_);}
{ "pile_set_name": "Github" }
// Copyright (c) 2018 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // The Nethermind library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with the Nethermind. If not, see <http://www.gnu.org/licenses/>. using Nethermind.Core.Crypto; using Nethermind.DataMarketplace.Subprotocols.Messages; using Nethermind.Network; using Nethermind.Serialization.Rlp; namespace Nethermind.DataMarketplace.Subprotocols.Serializers { public class EnableDataStreamMessageSerializer : IMessageSerializer<EnableDataStreamMessage> { public byte[] Serialize(EnableDataStreamMessage message) => Rlp.Encode(Rlp.Encode(message.DepositId), Rlp.Encode(message.Client), Rlp.Encode(message.Args)).Bytes; public EnableDataStreamMessage Deserialize(byte[] bytes) { RlpStream context = bytes.AsRlpStream(); context.ReadSequenceLength(); Keccak depositId = context.DecodeKeccak(); string client = context.DecodeString(); string?[] args = context.DecodeArray(c => c.DecodeString()); return new EnableDataStreamMessage(depositId, client, args); } } }
{ "pile_set_name": "Github" }
Changes need to be published manually to coursera. - Install jekyll - Run "jekyll serve" on your machine - Copy the generated HTML and paste it into the corresponding page on the Coursera class site
{ "pile_set_name": "Github" }
/* * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal */ $.validator.addMethod( "cifES", function( value ) { "use strict"; var num = [], controlDigit, sum, i, count, tmp, secondDigit; value = value.toUpperCase(); // Quick format test if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) { return false; } for ( i = 0; i < 9; i++ ) { num[ i ] = parseInt( value.charAt( i ), 10 ); } // Algorithm for checking CIF codes sum = num[ 2 ] + num[ 4 ] + num[ 6 ]; for ( count = 1; count < 8; count += 2 ) { tmp = ( 2 * num[ count ] ).toString(); secondDigit = tmp.charAt( 1 ); sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) ); } /* The first (position 1) is a letter following the following criteria: * A. Corporations * B. LLCs * C. General partnerships * D. Companies limited partnerships * E. Communities of goods * F. Cooperative Societies * G. Associations * H. Communities of homeowners in horizontal property regime * J. Civil Societies * K. Old format * L. Old format * M. Old format * N. Nonresident entities * P. Local authorities * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008) * S. Organs of State Administration and regions * V. Agrarian Transformation * W. Permanent establishments of non-resident in Spain */ if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) { sum += ""; controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 ); value += controlDigit; return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) ); } return false; }, "Please specify a valid CIF number." );
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0 #include <linux/ceph/ceph_debug.h> #include <linux/bug.h> #include <linux/err.h> #include <linux/random.h> #include <linux/slab.h> #include <linux/types.h> #include <linux/ceph/mdsmap.h> #include <linux/ceph/messenger.h> #include <linux/ceph/decode.h> #include "super.h" /* * choose a random mds that is "up" (i.e. has a state > 0), or -1. */ int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m) { int n = 0; int i; /* special case for one mds */ if (1 == m->m_num_mds && m->m_info[0].state > 0) return 0; /* count */ for (i = 0; i < m->m_num_mds; i++) if (m->m_info[i].state > 0) n++; if (n == 0) return -1; /* pick */ n = prandom_u32() % n; i = 0; for (i = 0; n > 0; i++, n--) while (m->m_info[i].state <= 0) i++; return i; } #define __decode_and_drop_type(p, end, type, bad) \ do { \ if (*p + sizeof(type) > end) \ goto bad; \ *p += sizeof(type); \ } while (0) #define __decode_and_drop_set(p, end, type, bad) \ do { \ u32 n; \ size_t need; \ ceph_decode_32_safe(p, end, n, bad); \ need = sizeof(type) * n; \ ceph_decode_need(p, end, need, bad); \ *p += need; \ } while (0) #define __decode_and_drop_map(p, end, ktype, vtype, bad) \ do { \ u32 n; \ size_t need; \ ceph_decode_32_safe(p, end, n, bad); \ need = (sizeof(ktype) + sizeof(vtype)) * n; \ ceph_decode_need(p, end, need, bad); \ *p += need; \ } while (0) static int __decode_and_drop_compat_set(void **p, void* end) { int i; /* compat, ro_compat, incompat*/ for (i = 0; i < 3; i++) { u32 n; ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); /* mask */ *p += sizeof(u64); /* names (map<u64, string>) */ n = ceph_decode_32(p); while (n-- > 0) { u32 len; ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); *p += sizeof(u64); len = ceph_decode_32(p); ceph_decode_need(p, end, len, bad); *p += len; } } return 0; bad: return -1; } /* * Decode an MDS map * * Ignore any fields we don't care about (there are quite a few of * them). */ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end) { struct ceph_mdsmap *m; const void *start = *p; int i, j, n; int err = -EINVAL; u8 mdsmap_v, mdsmap_cv; u16 mdsmap_ev; m = kzalloc(sizeof(*m), GFP_NOFS); if (!m) return ERR_PTR(-ENOMEM); ceph_decode_need(p, end, 1 + 1, bad); mdsmap_v = ceph_decode_8(p); mdsmap_cv = ceph_decode_8(p); if (mdsmap_v >= 4) { u32 mdsmap_len; ceph_decode_32_safe(p, end, mdsmap_len, bad); if (end < *p + mdsmap_len) goto bad; end = *p + mdsmap_len; } ceph_decode_need(p, end, 8*sizeof(u32) + sizeof(u64), bad); m->m_epoch = ceph_decode_32(p); m->m_client_epoch = ceph_decode_32(p); m->m_last_failure = ceph_decode_32(p); m->m_root = ceph_decode_32(p); m->m_session_timeout = ceph_decode_32(p); m->m_session_autoclose = ceph_decode_32(p); m->m_max_file_size = ceph_decode_64(p); m->m_max_mds = ceph_decode_32(p); m->m_num_mds = m->m_max_mds; m->m_info = kcalloc(m->m_num_mds, sizeof(*m->m_info), GFP_NOFS); if (!m->m_info) goto nomem; /* pick out active nodes from mds_info (state > 0) */ n = ceph_decode_32(p); for (i = 0; i < n; i++) { u64 global_id; u32 namelen; s32 mds, inc, state; u64 state_seq; u8 info_v; void *info_end = NULL; struct ceph_entity_addr addr; u32 num_export_targets; void *pexport_targets = NULL; struct ceph_timespec laggy_since; struct ceph_mds_info *info; ceph_decode_need(p, end, sizeof(u64) + 1, bad); global_id = ceph_decode_64(p); info_v= ceph_decode_8(p); if (info_v >= 4) { u32 info_len; u8 info_cv; ceph_decode_need(p, end, 1 + sizeof(u32), bad); info_cv = ceph_decode_8(p); info_len = ceph_decode_32(p); info_end = *p + info_len; if (info_end > end) goto bad; } ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); *p += sizeof(u64); namelen = ceph_decode_32(p); /* skip mds name */ *p += namelen; ceph_decode_need(p, end, 4*sizeof(u32) + sizeof(u64) + sizeof(addr) + sizeof(struct ceph_timespec), bad); mds = ceph_decode_32(p); inc = ceph_decode_32(p); state = ceph_decode_32(p); state_seq = ceph_decode_64(p); ceph_decode_copy(p, &addr, sizeof(addr)); ceph_decode_addr(&addr); ceph_decode_copy(p, &laggy_since, sizeof(laggy_since)); *p += sizeof(u32); ceph_decode_32_safe(p, end, namelen, bad); *p += namelen; if (info_v >= 2) { ceph_decode_32_safe(p, end, num_export_targets, bad); pexport_targets = *p; *p += num_export_targets * sizeof(u32); } else { num_export_targets = 0; } if (info_end && *p != info_end) { if (*p > info_end) goto bad; *p = info_end; } dout("mdsmap_decode %d/%d %lld mds%d.%d %s %s\n", i+1, n, global_id, mds, inc, ceph_pr_addr(&addr.in_addr), ceph_mds_state_name(state)); if (mds < 0 || state <= 0) continue; if (mds >= m->m_num_mds) { int new_num = max(mds + 1, m->m_num_mds * 2); void *new_m_info = krealloc(m->m_info, new_num * sizeof(*m->m_info), GFP_NOFS | __GFP_ZERO); if (!new_m_info) goto nomem; m->m_info = new_m_info; m->m_num_mds = new_num; } info = &m->m_info[mds]; info->global_id = global_id; info->state = state; info->addr = addr; info->laggy = (laggy_since.tv_sec != 0 || laggy_since.tv_nsec != 0); info->num_export_targets = num_export_targets; if (num_export_targets) { info->export_targets = kcalloc(num_export_targets, sizeof(u32), GFP_NOFS); if (!info->export_targets) goto nomem; for (j = 0; j < num_export_targets; j++) info->export_targets[j] = ceph_decode_32(&pexport_targets); } else { info->export_targets = NULL; } } if (m->m_num_mds > m->m_max_mds) { /* find max up mds */ for (i = m->m_num_mds; i >= m->m_max_mds; i--) { if (i == 0 || m->m_info[i-1].state > 0) break; } m->m_num_mds = i; } /* pg_pools */ ceph_decode_32_safe(p, end, n, bad); m->m_num_data_pg_pools = n; m->m_data_pg_pools = kcalloc(n, sizeof(u64), GFP_NOFS); if (!m->m_data_pg_pools) goto nomem; ceph_decode_need(p, end, sizeof(u64)*(n+1), bad); for (i = 0; i < n; i++) m->m_data_pg_pools[i] = ceph_decode_64(p); m->m_cas_pg_pool = ceph_decode_64(p); m->m_enabled = m->m_epoch > 1; mdsmap_ev = 1; if (mdsmap_v >= 2) { ceph_decode_16_safe(p, end, mdsmap_ev, bad_ext); } if (mdsmap_ev >= 3) { if (__decode_and_drop_compat_set(p, end) < 0) goto bad_ext; } /* metadata_pool */ if (mdsmap_ev < 5) { __decode_and_drop_type(p, end, u32, bad_ext); } else { __decode_and_drop_type(p, end, u64, bad_ext); } /* created + modified + tableserver */ __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); __decode_and_drop_type(p, end, u32, bad_ext); /* in */ { int num_laggy = 0; ceph_decode_32_safe(p, end, n, bad_ext); ceph_decode_need(p, end, sizeof(u32) * n, bad_ext); for (i = 0; i < n; i++) { s32 mds = ceph_decode_32(p); if (mds >= 0 && mds < m->m_num_mds) { if (m->m_info[mds].laggy) num_laggy++; } } m->m_num_laggy = num_laggy; if (n > m->m_num_mds) { void *new_m_info = krealloc(m->m_info, n * sizeof(*m->m_info), GFP_NOFS | __GFP_ZERO); if (!new_m_info) goto nomem; m->m_info = new_m_info; } m->m_num_mds = n; } /* inc */ __decode_and_drop_map(p, end, u32, u32, bad_ext); /* up */ __decode_and_drop_map(p, end, u32, u64, bad_ext); /* failed */ __decode_and_drop_set(p, end, u32, bad_ext); /* stopped */ __decode_and_drop_set(p, end, u32, bad_ext); if (mdsmap_ev >= 4) { /* last_failure_osd_epoch */ __decode_and_drop_type(p, end, u32, bad_ext); } if (mdsmap_ev >= 6) { /* ever_allowed_snaps */ __decode_and_drop_type(p, end, u8, bad_ext); /* explicitly_allowed_snaps */ __decode_and_drop_type(p, end, u8, bad_ext); } if (mdsmap_ev >= 7) { /* inline_data_enabled */ __decode_and_drop_type(p, end, u8, bad_ext); } if (mdsmap_ev >= 8) { u32 name_len; /* enabled */ ceph_decode_8_safe(p, end, m->m_enabled, bad_ext); ceph_decode_32_safe(p, end, name_len, bad_ext); ceph_decode_need(p, end, name_len, bad_ext); *p += name_len; } /* damaged */ if (mdsmap_ev >= 9) { size_t need; ceph_decode_32_safe(p, end, n, bad_ext); need = sizeof(u32) * n; ceph_decode_need(p, end, need, bad_ext); *p += need; m->m_damaged = n > 0; } else { m->m_damaged = false; } bad_ext: *p = end; dout("mdsmap_decode success epoch %u\n", m->m_epoch); return m; nomem: err = -ENOMEM; goto out_err; bad: pr_err("corrupt mdsmap\n"); print_hex_dump(KERN_DEBUG, "mdsmap: ", DUMP_PREFIX_OFFSET, 16, 1, start, end - start, true); out_err: ceph_mdsmap_destroy(m); return ERR_PTR(err); } void ceph_mdsmap_destroy(struct ceph_mdsmap *m) { int i; for (i = 0; i < m->m_num_mds; i++) kfree(m->m_info[i].export_targets); kfree(m->m_info); kfree(m->m_data_pg_pools); kfree(m); } bool ceph_mdsmap_is_cluster_available(struct ceph_mdsmap *m) { int i, nr_active = 0; if (!m->m_enabled) return false; if (m->m_damaged) return false; if (m->m_num_laggy > 0) return false; for (i = 0; i < m->m_num_mds; i++) { if (m->m_info[i].state == CEPH_MDS_STATE_ACTIVE) nr_active++; } return nr_active > 0; }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2013 Michael Brown <[email protected]>. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * * You can also choose to distribute this program under the terms of * the Unmodified Binary Distribution Licence (as given in the file * COPYING.UBDL), provided that you have satisfied its requirements. */ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <stdio.h> #include <errno.h> #include <ipxe/ansiesc.h> #include <ipxe/ansicol.h> #include <config/colour.h> /** @file * * ANSI colour definitions * */ /** * Construct ANSI colour definition * * @v basic Basic colour * @v rgb 24-bit RGB value (or ANSICOL_NO_RGB) * @ret ansicol ANSI colour definition */ #define ANSICOL_DEFINE( basic, rgb ) ( ( (basic) << 28 ) | (rgb) ) /** * Extract basic colour from ANSI colour definition * * @v ansicol ANSI colour definition * @ret basic Basic colour */ #define ANSICOL_BASIC( ansicol ) ( (ansicol) >> 28 ) /** * Extract 24-bit RGB value from ANSI colour definition * * @v ansicol ANSI colour definition * @ret rgb 24-bit RGB value */ #define ANSICOL_RGB( ansicol ) ( ( (ansicol) >> 0 ) & 0xffffffUL ) /** * Extract 24-bit RGB value red component from ANSI colour definition * * @v ansicol ANSI colour definition * @ret red Red component */ #define ANSICOL_RED( ansicol ) ( ( (ansicol) >> 16 ) & 0xff ) /** * Extract 24-bit RGB value green component from ANSI colour definition * * @v ansicol ANSI colour definition * @ret green Green component */ #define ANSICOL_GREEN( ansicol ) ( ( (ansicol) >> 8 ) & 0xff ) /** * Extract 24-bit RGB value blue component from ANSI colour definition * * @v ansicol ANSI colour definition * @ret blue Blue component */ #define ANSICOL_BLUE( ansicol ) ( ( (ansicol) >> 0 ) & 0xff ) /** * Construct default ANSI colour definition * * @v basic Basic colour * @ret ansicol ANSI colour definition * * Colours default to being just a basic colour. If the colour * matches the normal UI text background colour, then its basic colour * value is set to @c ANSICOL_MAGIC. */ #define ANSICOL_DEFAULT( basic ) \ ANSICOL_DEFINE ( ( ( (basic) == COLOR_NORMAL_BG ) ? \ ANSICOL_MAGIC : (basic) ), \ ANSICOL_NO_RGB ) /** ANSI colour definitions */ static uint32_t ansicols[] = { [COLOR_BLACK] = ANSICOL_DEFAULT ( COLOR_BLACK ), [COLOR_RED] = ANSICOL_DEFAULT ( COLOR_RED ), [COLOR_GREEN] = ANSICOL_DEFAULT ( COLOR_GREEN ), [COLOR_YELLOW] = ANSICOL_DEFAULT ( COLOR_YELLOW ), [COLOR_BLUE] = ANSICOL_DEFAULT ( COLOR_BLUE ), [COLOR_MAGENTA] = ANSICOL_DEFAULT ( COLOR_MAGENTA ), [COLOR_CYAN] = ANSICOL_DEFAULT ( COLOR_CYAN ), [COLOR_WHITE] = ANSICOL_DEFAULT ( COLOR_WHITE ), }; /** Magic basic colour */ static uint8_t ansicol_magic = COLOR_NORMAL_BG; /** * Define ANSI colour * * @v colour Colour index * @v basic Basic colour * @v rgb 24-bit RGB value (or ANSICOL_NO_RGB) * @ret rc Return status code */ int ansicol_define ( unsigned int colour, unsigned int basic, uint32_t rgb ) { uint32_t ansicol; /* Fail if colour index is out of range */ if ( colour >= ( sizeof ( ansicols ) / sizeof ( ansicols[0] ) ) ) return -EINVAL; /* Update colour definition */ ansicol = ANSICOL_DEFINE ( basic, rgb ); ansicols[colour] = ansicol; DBGC ( &ansicols[0], "ANSICOL redefined colour %d as basic %d RGB " "%#06lx%s\n", colour, ANSICOL_BASIC ( ansicol ), ANSICOL_RGB ( ansicol ), ( ( ansicol & ANSICOL_NO_RGB ) ? " [norgb]" : "" ) ); return 0; } /** * Set ANSI colour (using colour definitions) * * @v colour Colour index * @v which Foreground/background selector */ void ansicol_set ( unsigned int colour, unsigned int which ) { uint32_t ansicol; unsigned int basic; /* Use default colour if colour index is out of range */ if ( colour < ( sizeof ( ansicols ) / sizeof ( ansicols[0] ) ) ) { ansicol = ansicols[colour]; } else { ansicol = ANSICOL_DEFINE ( COLOUR_DEFAULT, ANSICOL_NO_RGB ); } /* If basic colour is out of range, use the magic colour */ basic = ANSICOL_BASIC ( ansicol ); if ( basic >= 10 ) basic = ansicol_magic; /* Set basic colour first */ printf ( CSI "%c%dm", which, basic ); /* Set 24-bit RGB colour, if applicable */ if ( ! ( ansicol & ANSICOL_NO_RGB ) ) { printf ( CSI "%c8;2;%d;%d;%dm", which, ANSICOL_RED ( ansicol ), ANSICOL_GREEN ( ansicol ), ANSICOL_BLUE ( ansicol ) ); } } /** * Reset magic colour * */ void ansicol_reset_magic ( void ) { /* Set to the compile-time default background colour */ ansicol_magic = COLOR_NORMAL_BG; } /** * Set magic colour to transparent * */ void ansicol_set_magic_transparent ( void ) { /* Set to the console default colour (which will give a * transparent background on the framebuffer console). */ ansicol_magic = COLOR_DEFAULT; }
{ "pile_set_name": "Github" }
version https://git-lfs.github.com/spec/v1 oid sha256:a33ceece5595f59b6aec5ac123576f5e7a0902deb26fbd3055ce2921d70d126c size 396331
{ "pile_set_name": "Github" }
var type = 5; var title = "Small Herb Garden"; var desc = "This project is to create a Small Herb Garden."; var completion = "Congrats, you made a Small Herb Garden!"; var duration = 0; var claimable = 0; var requirements = { "r1541" : { "bucket_id" : "1", "group_id" : "1", "type" : "item", "class_id" : "plank", "num" : 16, "base_cost" : 5, "desc" : "Add planks" }, "r1553" : { "bucket_id" : "1", "group_id" : "2", "type" : "work", "class_id" : "hatchet", "class_ids" : { "0" : "hatchet", "1" : "class_axe" }, "skill" : "", "num" : 20, "base_cost" : 8, "energy" : 6, "wear" : 1, "verb_name" : "construct", "verb_past" : "constructed", "desc" : "Fence the area" }, "r1560" : { "bucket_id" : "2", "group_id" : "1", "type" : "item", "class_id" : "earth", "num" : 24, "base_cost" : 3, "desc" : "Add earth" }, "r1561" : { "bucket_id" : "2", "group_id" : "1", "type" : "item", "class_id" : "peat", "num" : 6, "base_cost" : 12, "desc" : "Add peat" }, "r1571" : { "bucket_id" : "2", "group_id" : "1", "type" : "item", "class_id" : "guano", "num" : 4, "base_cost" : 20, "desc" : "Add guano" }, "r1583" : { "bucket_id" : "2", "group_id" : "2", "type" : "work", "class_id" : "shovel", "class_ids" : { "0" : "shovel", "1" : "ace_of_spades" }, "skill" : "", "num" : 30, "base_cost" : 8, "energy" : 6, "wear" : 1, "verb_name" : "dig", "verb_past" : "dug", "desc" : "Mix ingredients" } }; function onComplete(pc, multiplier){ // generated from rewards var rewards = {}; rewards.xp = pc.stats_add_xp(Math.round(250 * multiplier), false, {type: 'job_complete', job: this.class_tsid}); rewards.items = []; rewards.recipes = []; return rewards; } var rewards = { "xp" : 250 }; function applyPerformanceRewards(pc){ // generated from rewards var rewards = {}; rewards.items = []; rewards.recipes = []; return rewards; } var performance_percent = 0; var performance_cutoff = 0; var performance_rewards = {}; //log.info("job_cult_herb_garden_small.js LOADED"); // generated ok (NO DATE)
{ "pile_set_name": "Github" }
Cresce nel Fano con cui gioca per tre stagioni in Serie C. Ha giocato alcune partite amichevoli sia con l'Under-19 che con l'Under-21. Ha giocato più di 150 partite in Championship. Il 6 gennaio, alla prima occasione, fa il suo esordio con la maglia bianconera, nella partita casalinga persa per 2-1 contro la Sampdoria. Lasciato il Kongsvinger, si accordò con lo Skeid, rimanendo in questa squadra fino al ritiro, nel 2003. Ha giocato nella massima serie brasiliana con il Fluminense. La Roma poi vincerà quell'edizione della Coppa Italia. Nella stagione 1965-1966 ha giocato la finale di Coppa Italia con la maglia del Catanzaro, partita persa con la Fiorentina per 2-1. Ha giocato 179 partite nella massima serie scozzese e 14 gare internazionali. Nella stagione 2008-2009 Exteberria arriva con il suo Athletic Bilbao alla finale di Copa del Rey, perdendola per 4-1. Nella stagione successiva le presenze in campionato scendono a 9 ma Sola debutta anche Coppa dei Campioni nella sfortunata gara esterna persa contro il Real Madrid. Il 22 luglio 2014, dopo la mancata iscrizione del Siena al campionato di Serie B, rimane svincolato. Ha esordito in Nazionale nel 2007. Debutta nel 2006 con la Nazionale azera, anno in cui gioca 7 partite. Alla fine della stagione 2010-2011, in cui ha giocato 36 partite tutte da titolare, collezionando tre reti e un'espulsione, è rimasto svincolato. Ha esordito con la Nazionale cipriota nel 1982, giocando 10 partite fino al 1985. In totale giocò 14 partite con l'Under-17. Lie giocò nel Mercantile, con cui vinse 2 edizioni della Coppa di Norvegia. Esordisce nella nazionale maggiore svedese il 22 gennaio 2004, giocando da titolare nella partita amichevole persa per 3-0 contro la Norvegia. Il 1º giugno 2012 esordisce in Nazionale. Ha esordito nella massima serie argentina con l'Argentinos Juniors nella stagione 2011-2012. Il 30 aprile 1972 esordisce in Austria-Malta (4-0). In Serie A ha giocato 62 gare tutte con la SPAL. In carriera ha giocato complessivamente 74 partite in Serie B, con 9 gol segnati. Con la maglia del Napoli, Bruscolotti ha vinto due Coppe Italia, uno scudetto e una Coppa di Lega Italo-Inglese. Ha esordito in Nazionale maggiore il 15 novembre 2013 nell'amichevole Albania-Bielorussia (0-0). Inizia la carriera nel 1975 con il Mount Wellington, club con il quale raggiunge la finale della Chatham Cup 1977 persa contro il Nelson United. Nel 1969 fu acquistato per il Deportivo Cali, e vincendo due titoli nazionali (1969 e 1970). Nella stagione 2011-2012 ha giocato 22 partite in Ligue 1 con il Digione. Ha esordito e segnato il 15 agosto alla prima di campionato nella partita persa 2-1 a Londra contro il Chelsea. Ha esordito con la Nazionale nel 2004. Con la Nazionale italiana ha preso parte al Mondiale 1994 perdendo in finale con il . Ha saltato per infortunio l'Europeo 1996, disputando il successivo. Ha esordito nel 2009 in prima squadra. Nel 2013 ha esordito con le Nazionali Under-20 e Under-21 dell'Olanda. Incomincia la carriera nel Defensor Sporting, e qui vi rimane fino all'estate 2004. Dopo la retrocessione della Eliteserien 2009, Elvestad rimase in squadra anche nella 1. divisjon e contribuì all'immediata promozione del Fredrikstad. Nel 1998, diventò allenatore del Lillestrøm. Vi rimase fino al 2005, anno in cui andò a ricoprire questo incarico al Göteborg. Nel 1924 si trasferì nel Fluminense dove rimase per tre anni. Durante questo periodo, fu campione e capocannoniere del Campionato Carioca del 1924. Magnussen giocò con la maglia del Tønsberg Turn. Ha un fratello più piccolo, anch'egli calciatore Vullnet Basha, che gioca nel Real Saragozza. Dopo 2 anni nelle giovanili, passa in prima squadra, dove ci rimane dal 2000 al 2006. Gioca totalmente 156 partite con 19 gol totali. Ha sempre giocato nel campionato libico. Giocò una sola partita con la Nazionale nordirlandese, contro la Georgia, in cui i verdi vinsero 4-1. Ha esordito con la Nazionale maggiore in un'amichevole contro la nel febbraio del 2007. Il 3 maggio 2014 conquista il suo primo trofeo da allenatore, vincendo la Coppa di Francia 2013-2014. Nella stagione 2013-2014 ha esordito nella massima serie del campionato macedone con il Rabotnički. Con "i leoni di Banie" disputò il 13 maggio 2000 la finale di Coppa di Romania 1999-2000, persa per 2-0 contro la Dinamo Bucarest. Ha esordito con la Nazionale lussemburghese nel 2006. Dopo aver giocato nell'Entella, è rimasto a vivere a Chiavari dove tuttora vive. Lee iniziò la sua carriera nel Bolton Wanderers, dove rimase fino al 1967, anno in cui venne acquistato dal Manchester City per 60.000 sterline. Con il Lille vinse il campionato francese nel 1954 e la Coppa di Francia nel 1953 e nel 1955. Nel 2010 è entrato nello staff tecnico di Devis Mangia. Con la Primavera del Varese arriva alla finale scudetto persa contro la Roma. Il 6 luglio 2010 ha realizzato il suo primo gol in Nazionale uruguaiana, nella semifinale del persa 2-3 contro l'Olanda. Nel 2007 passa al Lokeren con cui gioca con costanza. Dopo le tre stagioni, rimane in Belgio passando al KV Kortrijk. Gioca dal 2006 all'Evolucas, squadra della Guadalupa, con la quale ha vinto il titolo nazionale del 2008. ha esordito in nazionale nell'amichevole contro la Finlandia disputata il 9 agosto 1925. Nel 1986 ha vinto il Campionato Europeo Under 21. Nel gennaio 2012 viene ceduto al Grêmio con cui esordisce in maggio. Nella stagione successiva scese in campo più spesso e vinse la Coppa del Re. Johansen giocò nell'Eik-Tønsberg, prima di passare al Moss. Esordì con questa maglia il 1º maggio 1988, nella sconfitta per 2-1 sul campo del Rosenborg. Vi rimase fino al 1989. Ha esordito con la Nazionale salomonese nel 2012. Nel 1999 ha giocato la sua unica partita con la Nazionale cipriota. Dall'8 dicembre 2009 prende il posto di Gianluca Atzori sulla panchina del Catania. Debutta il 13 dicembre perdendo contro il Livorno (0-1). Prese parte, con la sua Nazionale, hai Giochi olimpici del 1912 dove vinse la medaglia d'argento. Ha partecipato, nel 2004, ai Campionati Europei Under-21 2004, con la Nazionale di calcio della Serbia e Montenegro Under-21, arrivando in finale, ma perdendo contro l'Italia. Aas vestì la maglia del Mercantile, con cui vinse due edizioni della Coppa di Norvegia (1907 e 1912). Nella stagione 2013-2014 esordisce in Eredivisie e in UEFA Europa League con l'Ajax. Nel 1974 si è trasferito al Galatasaray in cui è rimasto fino al 1985, disputando 407 partite e realizzando 27 gol. Il 30 luglio seguente perde da titolare la Supercoppa d`Olanda contro il Twente per 2-1. Il 2 maggio seguente vince la sua prima Eredivisie con l'Ajax concludendo la stagione con 4 presenze totali. <br> Con il "Flu" disputò 551 partite segnando 2 gol e vinse 2 Tornei Rio-San Paolo e 3 Campionati Paulisti. A fine campionato ritorna a Lucca, dove rimarrà per altre 2 stagioni, per un totale di 60 presenze e 9 reti. Cresce nel Brescia, squadra con la quale esordisce in Serie A il 29 settembre 2002 nella partita persa in casa dalla sua squadra contro la Roma per 3-2. Nel 1944, in piena guerra mondiale, con il Conversano vince il Campionato dell'Italia libera 1944. Ha giocato nella massima serie olandese ed in quella bulgara. A livello giovanile vinse l'edizione 1979 del campionato europeo di calcio Under-18. Ha esordito con la Nazionale islandese nel 2012. Nel 1987 torna al Genoa, società con cui vince la Serie B 1988-1989, ottenendo la promozione in massima serie. Nella stagione 2013-2014 giocherà nella Rivoltana, nel campionato lombardo di Eccellenza. La sua ultima convocazione Nazionale è nell'amichevole Germania Under-20-Italia Under-20, sempre con Rocca allenatore, giocata il 22 aprile 2009 e persa 5-0. Il 4 agosto 2011, dopo aver rescisso il contratto con la Lazio, firma per il Bassano Virtus. A fine stagione rimane però svincolato. Esordisce con la maglia della Nazionale maggiore il 4 febbraio 2009 nell'amichevole persa 5-1 contro il Giappone. Nella stagione 2012-2013 ha esordito in Eredivisie giocando 3 partite con il Groningen. Ha esordito in Serie A il 15 marzo 1942 in Livorno-Liguria (2-0). Vestì in 5 occasioni la casacca della Nazionale maggiore, giocando sempre partite amichevoli. Ha giocato nella massima serie dei campionati belga e olandese. Fu l'allenatore della Nazionale britannica che partecipò ai Giochi olimpici del 1920, guidò la Nazionale per un'unica partita nella quale il Regno Unito perse 3-1 contro la Norvegia. Il 31 gennaio 2005, alla scadenza del contratto, rimane svincolato e decide di trasferirsi al Vitória Setúbal, in Portogallo, dopo un periodo di prova all'Hellas Verona. Il 18 gennaio 2014 ha esordito in Nazionale nell'amichevole Polonia-Norvegia (3-0). Ha esordito in Nazionale il 15 novembre 2013 in Lussemburgo-Montenegro (1-4). Ha esordito con la Nazionale cipriota nel 2000, giocando 25 partite fino al 2003. Ha esordito con la Nazionale etiope nel 2011. Risulta, secondo alcune fonti nella squadra della Pro Vercelli che vinse l'ultimo scudetto. Colleziona 56 presenze in campionato, vincendolo insieme alla supercoppa nel 2005. Nella stagione 2004-2005 torna nuovamente al Perugia, in Serie B, e porta la squadra umbra alla conquista dei play off per il ritorno in A, persi contro il Torino. Nel 2013 ha giocato una partita in Nazionale. Con la Nazionale azera ha giocato 43 partite. Con il Borussia Mönchengladbach vinse la Bundesliga nel 1976 e nel 1977 e la Coppa UEFA nel 1979. Fa il suo esordio nella Nazionale del CT Maradona nell'amichevole del 10 febbraio 2010 vinta 2-1 contro la Giamaica. Nel 1953 passò all'Atalanta, con la quale giocò nella massima serie fino al 1958. Il 23 giugno 2013 gioca da titolare nella partita della fase a gironi della Confederations Cup persa contro l'Uruguay. Ha esordito in Nazionale il 5 marzo 2014 nell'amichevole Turchia-Svezia (2-1). Nonostante le prestazione offerte nella squadra mitteleuropea, rimane svincolato nella prima metà della stagione calcistica 2010-2011. Fu commissario tecnico della Jugoslavia durante il , dove la Nazionale uscì al primo turno dopo aver perso tutte le partite del girone. Ha giocato nella massima serie del proprio paese con varie squadre. Cresciuto nelle giovanili del Torino, vince un Torneo di Viareggio e ne perde in finale un altro. Insieme alla Selezione spagnola U-19 vince il Campionato europeo di calcio Under-19 2012 in Estonia. Il 5 marzo 2014 ha esordito in Nazionale maggiore nell'amichevole Portogallo-Camerun (5-1). Con la nazionale di calcio della Colombia ha giocato 25 volte, vincendo la Copa América 2001. Partecipò nel 1945 alla Coppa Città di Genova per la Kriegsmarine, il torneo fu vinto dal Genova 1893. Il 10 settembre 2012 ha esordito in Nazionale Under-21 giocando la partita di qualificazione agli Europei di categoria persa per 6-0 contro la Spagna. Ha esordito con la Nazionale capoverdiana 2010. Ha preso parte alla Coppa d'Africa 2013. Lie giocò con le maglie di Holmestrand e Frigg. La stagione successiva il Real Madrid decide di dargli spazio in prima squadra e con le "merengues" rimarrà tre anni nelle quali disputerà appena 37 incontri (segnando 13 reti). Il 14 dicembre 2012 esordisce con la Nazionale macedone nell'amichevole contro la Polonia persa per 4-1. Il 12 giugno del 1966 esordisce contro il Brasile (2-1). Gundersen vestì la maglia del Sarpsborg. In squadra, vinse la Coppa di Norvegia 1929. Nella stagione 1999-2000 esordì in Serie A con la maglia della Fiorentina. Con la Nazionale Under-21 ha giocato 3 partite di qualificazione agli Europei di categoria. Con la Nazionale Under-18, nel luglio 1995, è ancora vicecampione europeo dopo la finale persa per 4-1 contro la Spagna, dove segna l'unico gol degli azzurrini. Vestì la maglia della Nazionale maggiore in 2 occasioni. Esordì il 18 gennaio 1997, sostituendo Stig Johansen nell'amichevole contro la , persa per 1-0. Conclusa la carriera Crespo è rimasto a vivere a Parma con la famiglia, dichiarando che la città rappresenta gran parte della propria vita. Dal 2002 gioca con il KPMG United, militandovi per vari anni e vincendo due campionati. Nel 2005 si accasa in Giappone, presso i Bluewings, dove rimane per tre anni. Keane riscuote un vasto successo tra i tifosi del Tottenham, ed il rapporto è rimasto invariato anche dopo la breve esperienza a Liverpool. Nel 1969 decide di chiudere la carriera in Francia, con il Rennes, vincendo la Coppa di Francia 1971. Con la Nazionale olandese Under-21 ha vinto il Campionato europeo di categoria nel 2006. Cresce nella Cormonese, che nel 1941 lo cede in prestito per una stagione al Potenza. Rientra poi ai friulani, dove rimane fino al 1948. Ha esordito con la Nazionale cipriota nel 2001, disputando un solo incontro. Ha vinto 8 campionati greci, 2 coppe nazionali, una supercoppa e 4 titoli di capocannoniere del campionato con l'Olympiacos. Nel 1985 approda al Catanzaro dove rimane per un biennio, prima di unirsi alla Cremonese dove disputa 3 stagioni di B e due di Serie A. Successivamente continua a giocare in Serie C1 con Gallipoli, Juve Stabia e Paganese. Ha esordito nel 2008 con il Ried. Vanta tre vittorie in Division 1, una Coupe de France e due finali di Coppa dei Campioni entrambe perse contro il Real Madrid. Prelevato nell'estate 1926 dal AFK Vrsovice, Hallinger rimase nelle file del Modena per una sola stagione. La carriera di Ledwoń cominciò nel GKS Katowice nel 1991 e vi rimase per molti anni, fino al 1997, collezionando in totale 5 reti. Nell'estate 2011 passa al Sassuolo, giocando 21 partite con la casacca numero 33. Ha esordito con la maglia della Nazionale nel 2011. Ha esordito con la Nazionale albanese nel 2002. Nel 2001 rimane in compartecipazione fra Messina e Pescara, quindi alle buste la comproprietà va al Messina. Giocò da titolare fisso nel Milan che vinse il suo secondo scudetto, ricoprendo il ruolo di mediano. Ha anche segnato un gol in Champions League contro il CSKA Mosca, partita poi persa dal Beşiktaş 2-1. Caudera giocò la sua prima partita con la Juventus il 27 giugno 1926, persa 0-2 contro la Reggiana. In bianconero totalizzò 9 presenze, segnando 3 reti. Partecipò anche ad un'amichevole che l'Europa giocò contro il Resto del mondo. Djedje iniziò la carriera con la maglia dello Issia Wazi, con cui vinse la Coppa della Costa d'Avorio 2006. Nel 2001 debutta in Serie B con il Messina rimanendovi due annate, prima di scendere per una stagione al Martina in Serie C1. Passa in seguito al Genoa dove vince la Coppa delle Alpi. Dopo essersi svincolato dal Cittadella, il 4 ottobre 2011 viene ingaggiato dal Prato in Prima Divisione. Debutta il 9 ottobre nella partita contro l'Andria BAT persa (1-0). Nel 1942 passa al Valencia, con cui gioca per quattro stagioni vincendo il campionato nella stagione 1943-1944. In seguito gioca anche nel Modena in Serie B e nel Prato. Il debutto ufficiale nella Nazionale di calcio del Liechtenstein arriva il 25 aprile 2001, nella partita di qualificazione per il Mondiale 2002, persa dal Liechtenstein 2-0 contro l'Austria. Nella stagione 2002-2003 ha mantenuto il suo posto da titolare sia nella prima squadra che nella Nazionale, L'anno successivo l'Arsenal ha vinto il campionato rimanendo imbattuto. Ha giocato in massima serie con Willem II e Cambuur. Ha esordito con la Nazionale lituana il 7 giugno 2013 in Lituania-Grecia (0-1). Dal 2009 gioca nella massima serie argentina. Cresciuto nelle giovanili del Nacional Montevideo, con questa squadra rimane per cinque stagioni, vincendo due campionati. Nel 1963 passa al Padova dove rimane fino al 1965 per poi passare alla Ternana. Con il Torino ha vinto un campionato Primavera nella stagione 2010-11 battendo in finale il Brescia. Ha esordito in Nazionale nel 2008; nel 2010 ha partecipato alla Coppa d'Africa. Ha esordito con la Nazionale togolese nel 2011. Nonostante sia stato un calciatore poco conosciuto a livello internazionale, ha vinto molto con l'Athletic Club Sparta Praha. Nel 1945 milita nel Genova 1893, società con cui vince la Coppa Città di Genova. Con la Nazionale del proprio paese ha vinto la medaglia d'oro ai Giochi olimpici del 1948. Tornato al SpVgg Fürth, vinse con i biancoverdi il suo primo campionato nella stagione 1913-1914. Il 15 ottobre ha debuttato con la Nazionale maggiore nella partita persa per 2-0 contro l'. Ha esordito in nazionale il 7 giugno 2008, in una partita contro la Giordania. Ha esordito con la Nazionale ungherese il 4 giugno 2014 nell'amichevole Ungheria-Albania (1-0). Ha giocato nella massima serie dei campionati uruguaiano, messicano, argentino ed ecuadoriano. Ha esordito nella Nazionale cilena nel 2002. Ha giocato in Serie A con la maglia della Ternana nella stagione 1972-1973. Dopo la trafila delle giovanili, nel 1999 arriva nella prima squadra del Vllaznia, rimanendoci per 4 stagioni, nelle quali colleziona 83 presenze e segna anche 6 gol. Nel 2012 vinse la Coppa del Baltico giocando da titolare sia contro la che contro la . Riceve la sua prima convocazione in Nazionale maggiore il 19 maggio 2014, per la partita amichevole contro la Romania disputata il 31 maggio seguente e persa per 1-0. Nella stagione 2013-2014 rimane a Vicenza diventando uno dei giocatori, scelti dal presidente Tiziano Cunico, per puntare alla risalita in serie B insieme a Alessandro Camisa e Simone Tiribocchi. L'ultima gara disputata da Brezzi in nazionale risale al 27 maggio 1923, quando fu disputata un'amichevole a Praga contro la Cecoslovacchia, persa cinque ad uno. Ha giocato nella massima serie cipriota con l'Ermis Aradippou, l'APOEL, e l'Anorthosis. Il 5 luglio 2013 rescinde il contratto con il Cuneo rimanendo così svincolato. Ha esordito con la Nazionale cipriota nel 2001, giocando 11 partite fino al 2008. Nel 2005 scende in Serie C1 acquistato dal Pro Sesto e rimane ininterrottamente in questa serie a tutt'oggi, avendo giocato per il Benevento e per il Foligno. Nel 1971 viene ceduto al Burnley, squadra dove rimane fino al 1978, quando conclude la propria carriera. Il 26 maggio 2012 esordisce da titolare con la maglia della Nazionale maggiore in occasione dell'amichevole persa per 5-3 contro la Svizzera. Nella stagione 1994-1995 vince la Premier League, Eggen giocò l'intera carriera per il Rosenborg, dal 1979 al 1991. Vinse tre campionati. Ha esordito in Nazionale nel 2012. Haugen giocò una partita per la : giocò infatti il match vinto per 3-1 sulla . Nel 2000 entra nelle giovanili del Metz dove rimane fino al 2003 quando passa nelle giovanili dell'ASC Lascabas. Nella stagione 2011-2012 ha giocato 16 partite in Ligue 1 con il Digione. Ha esordito in Nazionale nel 2010. Nel 2013 esordisce in Nazionale Under-21. Ha esordito in Nazionale maggiore nel 2009. Tornò in seguito al Mount Wellington, rimanendovi sino al 1997, conquistando la sua terza Chatham Cup nel 1990. Si unisce al Barcellona nel 2003, a 12 anni. Al terzo anno delle giovanili torna alla squadra della sua città natale cioè al Reus dove rimane per due stagioni. Dal 1973 al 1984 ha giocato nell'Independiente Santa Fe. Ha giocato in massima serie con Montana, Cernomorec 919 Burgas e Beroe. Nel 1959 passò allo Sporting Cristal, dove rimase per quattro anni, prima di ritirarsi nel 1962; nel 1961 conquista il Campionato di calcio peruviano. Ha partecipato ai Giochi della VIII Olimpiade con la propria Nazionale, che vinse la medaglia d'argento, dopo aver perso la finale 3-0 contro l'Uruguay. Nel 2000 si trasferì (assieme al tecnico Carlo Mazzone) al Brescia, squadra con la quale rimase per due stagioni. Con la nazionale di calcio dell'Austria partecipò nel 1936 al torneo di calcio della XI Olimpiade, raggiungendo la finale della competizione, persa per 2 a 1 contro l'Italia. Song ha esordito nella Nazionale sudcoreana nel giugno 2001 contro la Macedonia. Ha esordito con l'Under-21 l'8 giugno 2009 in una partita vinta per 7-0 contro l'Azerbaigian. Ha vinto un titolo nazionale nel 1981 con il Boca Juniors. Ha esordito in Ligue 1 con il Rennes nella stagione 2013-2014. In seguito gioca in Serie C con Salernitana, Stabia e diverse squadre romane minori. Ha esordito in Nazionale nel 2014. Ha esordito in Ligue 1 con il Guingamp nella stagione 2013-2014. Nel 1986 sbagliò un rigore negli ultimi minuti regolamentari del quarto di finale contro la Francia, perso ai rigori dove stavolta Zico segnò. Ha esordito in Primera División con la maglia del Villarreal nella stagione 2007-2008. Nel 1960, appena risaliti dalla seconda categoria, i bianchi di Leeds lottarono subito per il titolo, perso solo per differenza reti a vantaggio del Liverpool. Il 22 luglio 2014, dopo la mancata iscrizione del Padova al campionato di Lega Pro, rimane svincolato. Il giorno successivo firma un triennale con il Modena. Sull'isola la sua definitiva affermazione dove è rimasto 4 stagioni, fino al 1969, passando alla Fiorentina in cambio di Eraldo Mancin. Ha realizzato il primo gol con i bianconeri nella sfida persa contro la Lazio (1-2) del 21 settembre 2011. Ha realizzato la prima doppietta contro il Genoa. Allenò la Nazionale ungherese alle Olimpiadi del 1924, dove perse a sorpresa agli ottavi di finale contro l'Egitto per 3-0. Ha partecipato alla stessa competizione nel 2002, segnando 1 rete, arrivando fino alla finale, persa ai rigori con il Camerun. Il 15 settembre seguente perde la sua prima partita di Emirates Cup per 4-3 contro l'Al-Jazira. Ha esordito in Nazionale nel 2004. Il 31 gennaio 2011 viene ceduto a titolo definitivo al Grosseto. Alla fine della stagione 2011-2012 rimane svincolato. Nel 1933-1934 gioca nel Savoia di Torre Annunziata. Il 21 maggio 2014 ha esordito con la Nazionale turca nell'amichevole vinta per 1-6 contro il Kosovo. L'esordio avviene il 13 settembre, nella partita pareggiata per 0-0 contro il Deportivo La Coruña. Quattro giorni dopo debutta in Europa League, nella partita persa contro il PSG (0-1). Ha esordito con la Nazionale di Gibilterra il 1º marzo 2014 nella partita persa in casa contro le Fær Øer (1-4). Ha esordito in Nazionale maggiore l'11 ottobre 2013 nell'amichevole Serbia-Giappone (2-0). Ha esordito in Nazionale nel 1999, vestendone la magia 12 volte sino al 2008. Ha esordito con la Nazionale lussemburghese nell'amichevole Italia-Lussemburgo (1-1) disputata il 4 giugno 2014. Dopo circa 2 anni passati con il Nizza rescinde consensualmente il proprio contratto rimanendo così svincolato. Ha esordito in Nazionale il 19 novembre 2013 nell'amichevole Malta-Isole Fær Øer (3-2). Ha fatto parte sia dell' sia dell' con la quale ha vinto l'Europeo di categoria nel 1992. Nel 2013 esordisce con la Nazionale Under-21. A livello europeo ha disputato una finale di Coppa dei Campioni nel 1976 contro il Bayern Monaco, perdendola 1-0. Bratseth veniva impiegato come libero. Veloce nonostante la stazza imponente, era un giocatore con buone capacità tecniche e che sapeva rimanere freddo anche quando era sotto pressione. Da calciatore vinse per cinque volte consecutive il campionato ungherese tra il 1920 e il 1925 con l'MTK. Nella stagione 2010-2011 raggiunge con il Padova la finale dei play-off della Serie B, persi contro il Novara. Con l'Argentina ha partecipato nel 2008 ai Giochi olimpici di Pechino, vincendo l'oro. Nel 2011 torna a giocare in Giappone con il Tokushima Vortis della Division 2, rimanendo una stagione. Centromediano metodista, dopo gli esordi nel Casale disputa una stagione nel Livorno, prima di far ritorno al Casale: qui rimane fino al 1929, totalizzando 100 presenze e 4 reti. Il 18 giugno 2014 esordisce con la Nazionale maggiore nell'amichevole contro la Cina persa per 2-0. Gioca tre stagioni con la maglia nerazzurra perde uno scudetto all'ultima giornata nel 1934-1935 e una finale di Coppa Europa contro l'Austria Vienna, appena giunto in Italia. Nel 2003 ha esordito con la Nazionale cipriota, giocando 5 partite fino all'anno successivo. Nella stagione seguente di Serie B rimane al Catanzaro, che aiuta a risalire in Serie A con 11 presenze ed una rete (nel pareggio 1-1 contro la Cremonese). Nel 2005 è l'unico giocatore a rimanere nella società umbra dopo il fallimento, e dalla stagione 2005/2006, per 3 stagioni, fu il capitano del Perugia, in Serie C1. Nel 1998 viene notato dall'Empoli che gli fa disputare 14 partite in Serie A, in seguito torna allo Spezia e vi rimane due stagioni, divenendone uno dei giocatori simbolo. Passò poi al Sandefjord, con cui raggiunse la finale di Coppa di Norvegia 2006, persa per 3-0 contro il Fredrikstad. Guidò poi il Tønsberg. Nel dicembre 2002 ha firmato per l'Arsenal, rimanendo però a Ginevra fino alla fine della stagione. Il trasferimento è costato ai "Gunners" 2,5 milioni di sterline. L'8 dicembre del 1962 esordisce contro Malta, realizzando anche una rete nel 1-3 finale. Ha esordito in Nazionale nel 2008. Ha giocato nella massima serie croata con Hrvatski dragovoljac, Lokomotiva Zagabria e Dinamo Zagabria. Nella stagione 2014-2015, dopo aver terminato la precedente con 8 goal all'attivo, il 26 giugno 2014 viene ceduto in prestito al Bastia, rimanendo quindi nella Ligue 1. Ha vinto con la gli europei nel 2010 e nel 2012. Nel 2004 torna a sedersi sulla panchina dello Sliema Wanderers e con cui vince il campionato nella stagione 2004-2005. Ha giocato sia con la Nazionale irlandese della FAI che con quella dell'IFA. Il 27 ottobre 1946 esordisce contro la Cecoslovacchia (3-4), segnando una rete. Fece il suo debutto con la maglia del Derby, proprio contro la sua ex squadra perdendo 1-0. Segnò il suo primo gol contro il Bristol City, terminata 1-1. Cresce nel Vicenza, con cui debutta in Serie B segnando già nell'incontro d'esordio. Dopo due anni nel campionato cadetto, passa al Sandonà in Serie C, rimanendovi per due stagioni. Bassett rimane alla presidenza del West Bromwich fino alla sua morte. Ha giocato nella massima serie del campionato colombiano con varie squadre. Ha partecipato ai Campionati europei Under-21 2007, titolare della Nazionale serba Under-21, con cui ha raggiunto la finale, persa contro l'Olanda. Nel 1990 torna a calcare i campi di Serie B con il Barletta e l'anno successivo con il Messina, dove rimane anche dopo la retrocessione in Serie C1. Nel 2013 ritorna di nuovo nello Skënderbeu, col quale vince la Supercoppa d'Albania e il campionato. Con la Sambenedettese disputa, il primo anno, i play-off, perdendo con il Pescara (che poi vincerà il campionato): risulta uno dei più continui della squadra allenata da Stefano Colantuono. In Serie B Cavallito ha giocato 88 gare. Ha esordito con l'Utrecht in Eredivisie nella stagione 2008-2009. Nel 1961 si trasferisce in Germania Ovest, all'Alemannia Aachen, dove chiuse la carriera, con il raggiungimento della finale, persa contro il Borussia Dortmund, della Coppa di Germania 1965. Il 22 marzo 2013 scende in campo da titolare nella partita persa per 2-0 a Zagabria contro la Croazia, valida per le qualificazioni ai Mondiali del 2014. Il 4 settembre 2014 esordisce in Nazionale maggiore nell'amichevole vinta per 2-0 contro l'Estonia. Ritornato al Padova nel 1945 ci rimane per due stagioni fino al 1947 collezionando 57 presenze. Nel 1964 venne ingaggiato dallo Sparta Rotterdam. Con i "biancorossi" vinse la Coppa d'Olanda 1965-1966. Enrique giocò cinque partite al , giocando anche nella Copa América 1989. Ha esordito con la Nazionale etiope nel 2010. L'anno seguente passa al Genoa, dove rimane quattro stagioni, conquistando due scudetti. Il 12 maggio 1935 esordisce contro la Polonia (5-2). Ha esordito in Nazionale il 5 marzo 2014 nell'amichevole Israele-Slovacchia (1-3). Ha esordito nel 2010 con il Deportivo Cali. È tornato in Brasile nel 2008, per giocare con l'Internacional de Porto Alegre. A livello di club, in carriera ha vinto due campionati olandesi, una Coppa d'Olanda e tre campionati belgi. Ha esordito in Eredivisie nella stagione 2013-2014 con l'RKC Waalwijk. Moacir iniziò la sua carriera professionistica nel 1956 nelle file del Flamengo in cui rimase fino al 1961 vincendo un Torneo Rio-San Paolo. Nel periodo in cui militava in nazionale ha giocato per l'Olimpija Liepaja, squadra con cui vinse tre campionati lettoni. Nell'estate del 2006 torna nel paese lusitano, allo Sporting Lisbona, dove rimane per due anni prima di tornare in patria, nella squadra che lo aveva lanciato, il Club Olimpia. Esordì in Serie A con l'Alessandria il 27 gennaio 1935 nell'incontro esterno perso dai "grigi" per 4-1 contro la Fiorentina. Nel 1987 è stato ingaggiato dall'Ankaragücü, dove è rimasto per 18 mesi. In seguito è passato al Göztepe per un anno. L'11 dicembre 2009 viene mandato al Bournemouth in un prestito "d'emergenza" durato solo 7 giorni. Riesce a giocare una sola sfida contro il Morecambe, incontro perso per 5-0. Convocato per i Mondiale 2014, segna la prima rete nella partita vinta contro l'Algeria per 2-1 all'esordio. Con la Nazionale di calcio del Brasile ha giocato durante . Con il Nantes vinse per 3 volte il campionato francese (1966, 1970, 1973). Ha giocato la sua intera carriera con il Kjøbenhavns Boldklub, con cui ha vinto un campionato nel 1913. Nella stagione 2013-2014 ha giocato 11 partite nella massima serie uruguaiana con il Danubio. Il 1º febbraio 2010 si trasferisce al Foggia nella Lega Pro Prima Divisione; Emanuele esordisce il 7 febbraio, nell'incontro casalingo perso 1-2 con la Ternana. Ritornò in Ecuador dove fu acquistato dal LDU Quito, squadra con cui vinse il campionato d'apertura ecuadoriano 2005. Con il Torino ha vinto un campionato Primavera nella stagione 2011/12 battendo in finale il Firenze. Ha esordito in Nazionale il 15 novembre 2013 nell'amichevole vinta per 1-0 sull'Irlanda del Nord. Cresciuto nelle giovanili dell'Partizan Belgrado, debutta in prima squadra giovanissimo, nel 2003, e vi rimane fino al 2007 vincendo il campionato 2004-2005. Ha esordito in Nazionale il 27 maggio 2012 nell'amichevole Tunisia-Ruanda (5-1). L'anno seguente Brehme vince la Coppa UEFA sempre con i neroazzurri contro la Roma. Ha esordito in Premier League il 24 maggio 2009 contro il Portsmouth. Nell'agosto del 1982 si trasferisce allo York City, cui rimarrà fino alla conclusione della carriera, avvenuta nel 1987, salvo una breve parentesi in prestito al Darlington. Nel luglio 2009 passa in prestito per una stagione al Bolton Wanderers. Riscattato da questi, vi rimane fino al 2012 anno in cui passa al Leeds United. Esordisce in Nazionale l'11 agosto del 1993 in un'amichevole contro la Norvegia, partita persa per 7-0. Viene convocato nuovamente nel 1997, giocando un'altra partita amichevole contro l'Islanda (1-0). Ha esordito con la Nazionale cambogiana nel 2011. Ha esordito con la Nazionale maggiore invece nel 2002. Gioca l'ultima partita in maglia nerazzurra nella partita giocata a Verona contro il ChievoVerona il 18 maggio 2014 e persa 2-1. Il 31 maggio 2014 ha esordito con la Nazionale rumena nell'amichevole Albania-Romania (0-1). Inizia la carriera agonistica nel Genoa, club con cui esordisce nella Serie B 1974-1975. Il 5 aprile del 1978 esordisce contro la Turchia (4-2). Nel 1970 passa al Brescia, club con cui non gioca alcun incontro ufficiale. Nel 2009 ha giocato 3 partite senza mai segnare negli Europei Under-19. Batistuta è rimasto celebre anche per delle esultanze particolari divenute col tempo un proprio marchio di fabbrica. Ha giocato per 73 volte nella Nazionale olandese, con la quale ha vinto l'Europeo del 1988. Il 2003 è l'anno del suo trasferimento al Lleida, in cui rimane per tre anni, comandando il reparto difensivo con grande autorità in 120 partite. Dopo il ritiro da giocatore, nel 1956 venne nominato allenatore della squadra riserve del Fulham, rimanendovi fino al 1965. Il 21 maggio 2014 esordisce con la Nazionale kosovara nell'amichevole Kosovo-Turchia (1-6). Il 15 agosto 2012 esordisce con la Nazionale maggiore in un'amichevole persa per 3-1 contro la Slovacchia. Scaduto il prestito, fa ritorno al PSG, ma, vedendosi fuori dai piani societari, rescinde il suo contratto con la squadra rimanendo svincolato. Nel 1999 ha vinto la Coppa America, disputata in Paraguay, e nel 2005 la Confederations Cup, svoltasi in Germania. Termina la carriera con il Matera, con cui vince il campionato di Serie D 1967-1968. Con la Nazionale maggiore ha esordito nell'amichevole contro il Congo del 3 marzo 2010 vinta per 5-2. Di Bari in maglia rossonera tocca i suoi livelli più alti e vi rimane per cinque stagioni (di cui le prime tre in Serie A). Con la Nazionale di calcio del Ghana Under-20 ha vinto il campionato mondiale di calcio Under-20 2009. Suo cugino di secondo grado Moses Nsubuga, ex calciatore dell'Elfsborg, perse una gamba in un incidente automobilistico nel 1997. Nel 1988 passa alla Sambenedettese ancora in Serie B, giocandovi per un anno. Con la propria Nazionale ha vinto i Giochi olimpici 1952. Josefsen giocò con la maglia dello Skeid. Ha giocato nella massima serie dei campionati kosovaro, finlandese e albanese. Con la Nazionale maltese ha esordito nel 2011. Scoperto da Paolo Mazza in Danimarca dove giocava nel KB, con il quale vinse 3 scudetti. Ha esordito con la Nazionale nel 1997, rimanendoci fino al 2001. Debutta nel calcio con la maglia del Groningen. Nel 2003 passa all'Utrecht, dove rimane fino al 2 gennaio 2008, quando si trasferisce all'APOEL Nicosia. Iniziò a giocare nel Gruppo Sportivo Bolognese Virtus, esordendo in massima divisione il 12 ottobre 1919, nella partita sul campo del Bologna persa per 8-0. Giocatore di Blackpool, Everton e Arsenal, vinse con l' il , della cui finale venne giudicato il miglior giocatore. Apre la stagione segnando uno dei due gol del Napoli nella finale della Supercoppa italiana persa per 4-2 in favore della Juventus. Nell'agosto 2007 viene ingaggiato dal Rubin Kazan', con cui vince il primo campionato russo nella storia del club. Gioca dal 2009 per Al-Wahda con cui ha vinto una UAE Pro-League nel 2009-2010. Il 4 luglio 2003 viene ceduto a titolo gratuito all'Acireale, collezionando 30 presenze e subendo 17 reti, perdendo nella semifinale dei play-off contro la Viterbese. La stagione si concluse con la vittoria di campionato e Champions League; O'Shea però rimase in panchina nella finale di Mosca contro il Chelsea. Nella stagione 1993-1994 la Juve Stabia è giunta al 5º posto nel campionato di Serie C1 girone B, quindi perde i play-off contro la Salernitana. Nel 1972 viene nominato responsabile del settore giovanile del Piacenza, rimanendovi per due anni. In seguito allena la rappresentativa dilettantistica cremonese. Ha esordito con la maglia della Nazionale nel 2014. Festeggia le 100 presenze in Serie A nella trasferta persa 4-2 a Lecce. Ha giocato nella massima serie del campionato uruguaiano e di quello bielorusso. Ha giocato nella massima serie cipriota con APOEL Nicosia, Olympiakos Nicosia e AEK Larnaca. Per la stagione 2013-2014 viene promosso in prima squadra, dove esordisce il 24 agosto 2013 nel corso della prima partita di campionato persa per 2-1 in casa dell'Hellas Verona. Ha esordito in Premier League il 15 agosto 2009 contro il West Ham. He esordito in Ligue 1 nella stagione 2013-2014 con la maglia del Nantes. In seguito al ritiro è rimasto nello stato di San Paolo, ove svolge la professione di allenatore. Segna il primo gol in campionato con la maglia dei "Blues" nella partita giocata in casa contro il Manchester City, persa 2-1. A giugno 2012 non rinnova il suo contratto con il Novara rimanendo quindi svincolato dal 1º luglio 2012. Nella stagione 1976-1977 gioca nel Granada, prima di passare all'Elche, squadra della Primera División. Ha giocato in tutte le nazionali giovanili. Con l'Under 19 nel 2003 ha vinto l'Europeo U-19 disputato in Liechtenstein. Con i "Gunners" debutta contro il Newcastle United giocando per tutti i novanta minuti. Nel 2008 passa ai colombiani del Deportivo Calì, rimanendovi una stagione. Viene convocato anche per la Copa América 2011 con la Nazionale maggiore, ma non rimane in panchina per tutta la competizione. Con l'Internazionale Torino disputò il primo campionato italiano di calcio, che perse in finale contro il Genoa. Ha giocato 5 partite nella nazionale Under 21 islandese. Con i sardi gioca due stagioni e retrocede in C1. Nel 1987-1988 viene ceduto al Brindisi sempre tra i semiprofessionisti e vi rimarrà fino al termine della stagione 1988-1989. Nel 1987 Mazza viene ceduto all'Acilia, di nuovo nell'Interregionale, squadra nella quale rimane fino al 1989. Nel biennio 2009-2010 ha giocato 4 partite di qualificazione all'Europeo Under-21. Il 26 maggio 2013 perde la finale di Coppa Italia contro i rivali storici della Lazio. Il 10 giugno 2013 viene esonerato come primo allenatore dalla Roma e . Ha sempre giocato nella massima serie iraniana con varie squadre. Nell'estate 1985 passa alla Triestina, rimanendovi per tre stagioni, giocando come titolare e segnando due gol nella sua ultima stagione. Ha giocato sia con la Nazionale greca che successivamente con quella cipriota. Durante la sessione invernale di calciomercato del 2006, è passato al Portsmouth, dove è rimasto per tre stagioni, prima di trasferirsi agli ordini di Eriksson nel Manchester City. Al termine della carriera di calciatore Pointer rimase nel Portsmouth come membro dello staff tecnico. Alla guida del Benfica ha vinto il campionato 1976-1977 e 1986-1987. Nel 1997 passa per un anno al Gualdo in Serie C1 e poi rimane nella stessa serie per tre stagioni all'Ascoli. Ha esordito in Nazionale il 19 novembre 2013 nell'amichevole pareggiata 0-0 contro Gibilterra. Ha giocato nel massimo campionato togolese, gabonese, rumeno e russo. Basile si trasferì al Louhans-Cuiseaux nel 2000. Con i francesi ha giocato 38 volte, segnando 15 gol. De Carvalho vi rimase fino al 2002. Con la Nazionale Under-21 ceca vince l'Europeo 2002 in Svizzera. Ha esordito nella Nazionale cilena nel 2007. Nel 1970 fu ceduto al Brescia in Serie B, rimanendovi per due stagioni; successivamente passò al Livorno. Il 3 giugno 2011 debutta con la Serbia, in una partita amichevole giocata a Seul contro la Corea del Sud, e persa 2-1. Dal 1994 al 1999 giocò nel Real Madrid vincendo due campionati, una Champions League e la successiva Coppa Intercontinentale. Nella stagione 1952-1953 si trasferisce al Losanna, dove rimane per una sola stagione nella quale termina il campionato in settima posizione, dietro allo Chaux-de-Fonds. Ha esordito in Nazionale azera nel 2012. È nella rosa dei 23 convocati per il , competizione in cui esordisce il 15 giugno 2014 giocando da titolare la prima partita del girone persa 2-1 contro l'Italia. Ha esordito con la Nazionale togolese nel 2000. Galliquio conta con 31 presenze con la Nazionale peruviana. Giocò la sua prima partita il 30 marzo del 2003 persa contro il Cile per 2-0. Con il Liverpool, negli anni ottanta, ha vinto 17 trofei. Nel 2006 viene convocato Giochi Asiatici in Qatar, dove con tre reti aiuta l'Iraq a vincere la Medaglia d'Argento, perdendo la finale contro i padroni di casa qatariani. Precedentemente aveva militato nel campionato svedese, scozzese, svizzero e tedesco, e con il Malmö aveva disputato la Coppa Intercontinentale 1979, persa contro i paraguaiani dell'Club Olimpia di Asunción. Ha esordito con la Nazionale cubana nel 2003, giocando 64 partite sino al 2012. Con la Nazionale di calcio della Colombia ha giocato 26 volte, vincendo la Copa América 2001. Dopo essere ritornato al Tigre alla scadenza del prestito vi è rimasto fino al 2009, quando è stato acquistato dal Parma per 3.520.000 milioni di euro. Formatosi calcisticamente nel Calcio Ligure, passò al Genoa nel 1919 dove rimase sino al 1922. Abrahamsen vestì la maglia del Bodø/Glimt, con cui vinse anche la Coppa di Norvegia 1975. Ha esordito in Nazionale nel 2004, giocando una partita. Nel 1992 ha esordito con la Nazionale cipriota, giocando 23 partite fino al 1997. Ha esordito con la Nazionale maggiore invece nel 2010. Da allenatore ha vinto tre campionati belgi con lo Standard Liegi, nel 1969, 1970 e nel 1971. Con lo Skonto ha vinto il campionato lettone 2010, la Baltic League 2010-2011 e la Coppa di Lettonia 2011-2012. Il 17 novembre 2010 esordisce con la Nazionale Under-21 diretta da Ciro Ferrara nell'amichevole vinta contro la Turchia (2-1). Lasciato il Manurewa nel 1987 passa al Gisborne City, dove vince nello stesso anno un'altra Chatham Cup. Il 13 agosto 2014 passa in prestito all'Empoli, dove debutta nella partita di Coppa Italia contro L'Aquila vinta 3-0. Burgueño a livello di club giocò per l'Atlanta e il Danubio. Debutta con la Nazionale maggiore il 20 maggio 2009 nella partita vinta 3-1 contro il Panama. Fino alla stagione 2004-2005 rimane fedele a questa società, che nel 2000 diventa Juvenes/Dogana. Nel giugno del 2010 rimane svincolato per poi passare, a settembre, al Barletta con cui firma un contratto annuale. Passa poi all'Omegna seguendo Regalia, per poi passare al Monza, dove rimane diverse stagioni, occupandosi del settore giovanile. Nel 2009 ha giocato un Mondiale Under-17. Ha esordito con la Nazionale libica nel 2011. In carriera ha giocato complessivamente 14 partite nella CAF Champions League. Francesco Soldera, come il fratello Giuseppe, iniziò a giocare nell'US Milanese. Nel periodo in cui ha giocato in nazionale militava nell'RFK, squadra con cui ha vinto almeno un campionato lettone. Ha giocato la sua unica partita in Nazionale nel 2000. A fine anno il Porto si qualifica al 1 posto in campionato e vince la sua seconda Supercoppa Portoghese. In seguito milita nel Derthona, dove rimane fino al 1930. Bekker gioca per il dal 2013. È stato convocato per la Gold Cup 2013. Ha esordito con la Nazionale maggiore il 19 novembre 2013 nell'amichevole Liechtenstein-Estonia (0-3). Convocato per il Mondiale sudafricano del 2010, è titolare all'esordio con il Giappone dove i leoni perdono 1-0. Il 5 maggio 2013 vince il suo primo campionato olandese con l'Ajax. Cresciuto nel Vancouver Whitecaps, ha esordito in prima squadra giocando 2 partite nel 2012. Nel 1987, guidando la squadra del Grêmio vinse il Campionato Gaúcho e la Coppa del Brasile. Nel 2003 lascia perdere l'avventura estera, andando a giocare nell'Ulsan Hyundai Horang-i, club della K-League, massima divisione coreana. In totale con gli azzurri gioca 56 partite e segna 3 gol. Dopo 9 presenze e 2 gol segnati, lascia nuovamente la squadra di Rotterdam e rimane svincolato. Conta una presenza per la . Il 19 giugno 1949, infatti, fu schierato in campo nella sfida persa per 1-3 contro la . Nel 1979-1980 vinse entrambe le competizioni nazionali, centrando il "double", ed attirando così l'attenzione di club stranieri. Nonostante le sue grandi potenzialità, gli infortuni lo hanno limitato parecchio, facendogli anche perdere la partecipazione al . Nel 1934 scrisse il libro "Il gioco del calcio". Conta 3 presenze per la . Esordì il 31 agosto 1920, nella sfida persa per 2-1 contro l'. La sfida era valida per i Giochi della VII Olimpiade. Nella nazionale spagnola ha giocato 43 partite segnando 5 reti. Dopo il suo ritiro è rimasto a vivere a Genova, sua nuova terra d'adozione, allenando squadre minori e dove è morto il 5 luglio 2010. Il 15 giugno 2010 segna il primo ed unico gol della sua squadra nel : a Johannesburg, nella partita persa 2-1 contro il . Al termine del 2009 perde la qualifica di internazionale per raggiunti limiti d'età. Dopo il ritiro dal calcio giocato ha cominciato la carriera di allenatore. Grazie a quelle due presenze Cusano poté fregiarsi della vittoria dello scudetto, vinto dai "rossoblu". Pedersen giocò 45 incontri per la . Debuttò il 12 settembre 1990, nella partita persa per due a zero contro l'. Nel 1970 vinse il Premio Bruno Roghi.. Con la nazionale giapponese di calcio a 5 ha disputato l'AFC Futsal Championship 2002: con la sua nazionale si laureò vicecampione d'Asia, perdendo la finale contro l'Iran. Partecipò alle olimpiadi di e vincendo un bronzo e un oro. Con la nazionale nordcoreana, Kim ha partecipato alla AFC Challenge Cup 2012, vincendola. Dal 2003 gioca nel Teleoptik per una stagione, prima di passare allo Zeta, dove rimane per due anni. Inizia a giocare nelle giovanili della società romana Leonina. Ha giocato tutta la carriera per club ciprioti. Giocatore fisicamente imponente, gioca come terzino destro, con attitudini offensive. Esterno sinistro mancino, può giocare anche come ala sulla stessa fascia. Ha preso parte alla Coppa delle nazioni oceaniane 2012, segnando anche un gol nella finale per il 3º/4º posto persa per 4-3 contro la Nuova Zelanda. Dopo un ulteriore intervento, questa volta di osteosintesi, i tempi di recupero si dilatano notevolmente, tanto da fargli perdere praticamente tutta la successiva stagione agonistica. Nel 2004 ha disputato l'AFC Futsal Championship 2004: con la sua nazionale si riconfermò vicecampione d'Asia, perdendo ancora una volta la finale contro l'Iran. Con la maglia della nazionale ha vinto due edizioni della Coppa del Baltico e una King's Cup. A 17 anni viene portato in prima squadra ma rimane sempre in panchina. Il 28 gennaio 2003, ha debuttato per la , nell'amichevole contro l', vinta per due a uno. Fece un gol sia nella partita d'apertura con la Finlandia (persa per 3 a 2) sia nella vittoria per 1 a 0 contro la Svezia. Nella zona offensiva può giocare come seconda punta, ala e anche come trequartista. Ha sempre giocato per club messicani. Soprannominato "el pardo" per le sue movenze feline, giocava come ala. Ha partecipato anche alle Olimpiadi di Sydney, vincendo la medaglia d'argento. Đokić giocò per tutta la carriera nel Jugoslavija, squadra di Belgrado. La sua carriera da calciatore professionista inizia nel 2011, esattamente il 1º ottobre, quando debutta in prima squadra nel match perso contro il Bayer Leverkusen. Ha esordito con la nazionale italiana nel giugno del 2002 contro la Serbia-Montenegro. Roberto Donadoni lascia il calcio giocato nel luglio del 2000 L'esordio in questa stagione avviene nella Kubok Rossii, dove la sua squadra perde per 1-3 contro la Dinamo Briansk. Con la sua squadra ha vinto consecutivamente due Coppe di Polonia, nel 2011 e nel 2012. Ala destra, può giocare sia come ala sinistra sia come trequartista, definito anche attaccante. Il 30 giugno 2013 rimane svincolato e il 22 luglio seguente parte per il ritiro a Coverciano dei calciatori svincolati sotto l'egida dell'Associazione Italiana Calciatori. Grazie agli insegnamenti di Mario Vigorito, grandissimo allenatore, riuscì ad esordire in nazionale. Il 3 dicembre 1939 esordisce contro la Germania nazista (3-1). Dopo essere tornato dal prestito, rimane svincolato a causa del fallimento del Siena. Conta 7 presenze e 3 reti per la . Esordì il 10 ottobre 1926, segnando una doppietta nella sfida persa per 3-4 contro la . Nel 1951, durante il governo comunista di Mátyás Rákosi, venne arrestato, e di lui si persero le tracce. Esterno di centrocampo, può giocare come trequartista e anche come attaccante. Si confermò come centravanti titolare della nazionale per qualche partita, realizzando il gol del vantaggio del 2-1 ancora una volta contro gli inglesi, nella gara poi persa per 2-3. Nel gennaio 2011 viene ricoverato in ospedale per un virus intestinale. In seguito a 12 giorni di degenza, Pellè perde circa 5 chili di peso. Il 7 settembre 2012 è in panchina per la gara di qualificazione ai Mondiali 2014 che la sua squadra perde per 4-0 in trasferta contro la . Ha esordito in quella partita, il 10 febbraio. Cresce nell'US Genovese, piccolo club ligure, con il quale gioca nella stagione 1925-1926. All'apertura delle buste, nessuna delle due società presenta un'offerta per il calciatore, che pertanto rimane nell'ultima squadra nella quale ha militato, ovvero i biancorossi. Centrocampista offensivo, poteva giocare sia da attaccante sia da ala destra. Con la Nazionale giapponese ha segnato 9 reti in 45 partite giocate. Trequartista, può giocare come ala su entrambe le fasce. Chiusa la carriera di giocatore, è rimasto nel mondo del calcio. Dal 1986 al 1990 giocò per Bruce Arena alla University of Virginia. Durante la sessione invernale del calciomercato perde il posto da titolare visto l'arrivo di Marcello Gazzola. Successivamente gioca ancora fino oltre i quarant'anni in altre squadre dillettantische friulane. Ala sinistra, può giocare nello stesso ruolo sulla fascia opposta o come esterno sinistro. Ala destra, può giocare nello stesso ruolo sulla fascia opposta o come trequartista. Nel periodo in cui militava in nazionale ha giocato per il Riga Vanderer. Ha perso un testicolo in un incidente di gioco durante una partita di calcio nel 2005. Ha esordito con la Guinea-Bissau nel 2011, dopo una convocazione nel dicembre 2010. Nel 2013 partecipa al OFC Under-20 Championship 2013 con la Nazionale di calcio della Nuova Zelanda vincendolo. Trequartista, può giocare come esterno su entrambe le fasce. Conta 5 presenze per la . Esordì il 25 maggio 1931, schierato in campo nella sfida persa per 3-1 contro la . Può ricoprire il ruolo di terzino destro o sinistro, ma il suo ruolo prediletto rimane quello di difensore centrale. Ha giocato 2 partite per il nel 1986, segnando una rete. Partecipa al Campionato asiatico di calcio Under-19 2012, arrivando fino alla finale persa contro la Corea del Sud, e venendo nominato miglior portiere della competizione. Residente dalla nascita a Cossato, in provincia di Biella, inizia a giocare con la Cossatese, la squadra del paese, presso la quale rimane fino alla categoria Under-15 dei Giovanissimi. In carriera, Stefanović giocò per tre club jugoslavi e cinque club francesi. Terzino sinistro, può giocare anche come esterno sinistro. Partecipò al , indossando la maglia numero undici, segnando un gol e riuscendo a piazzarsi al secondo posto in seguito alla finale persa contro il .
{ "pile_set_name": "Github" }
{ "backgroundcolor":"#000000", "height":39, "layers":[ { "data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 30, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 30, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 165, 165, 30, 30, 30, 165, 165, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 30, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 87, 87, 87, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 30, 2147483678, 2147483678, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 87, 87, 87, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 30, 30, 2147483813, 2147483678, 2147483678, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 30, 30, 165, 2147483813, 2147483813, 2147483678, 2147483678, 2147483813, 2147483813, 2147483813, 2147483813, 165, 165, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 165, 165, 2147483813, 2147483813, 2147483813, 2147483678, 2147483678, 2147483813, 2147483813, 2147483813, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 165, 165, 165, 2147483813, 2147483813, 2147483813, 2147483813, 2147483678, 2147483678, 2147483813, 2147483813, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 165, 165, 165, 165, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 2147483678, 2147483678, 2147483813, 165, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 30, 30, 165, 165, 165, 165, 165, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 2147483813, 2147483678, 2147483678, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 87, 87, 87, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 87, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 46, 46, 46, 46, 46, 46, 46, 165, 165, 165, 165, 165, 165, 165, 165, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], "height":39, "name":"back", "opacity":0.5, "type":"tilelayer", "visible":true, "width":75, "x":0, "y":0 }, { "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 165, 165, 165, 165, 165, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 165, 165, 165, 165, 165, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "height":39, "name":"front", "opacity":1, "type":"tilelayer", "visible":true, "width":75, "x":0, "y":0 }, { "draworder":"topdown", "height":200, "name":"objects", "objects":[ { "gid":8, "height":8, "id":11, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":96, "y":288 }, { "gid":8, "height":8, "id":12, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":168, "y":288 }, { "gid":8, "height":8, "id":13, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":432, "y":288 }, { "gid":8, "height":8, "id":14, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":488, "y":288 }, { "gid":2521, "height":22, "id":15, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":128, "y":288 }, { "gid":1131, "height":16, "id":16, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":48, "x":280, "y":288 }, { "gid":732, "height":32, "id":17, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":16, "x":240, "y":288 }, { "gid":2147484727, "height":28, "id":18, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":32, "x":352, "y":288 }, { "gid":2521, "height":22, "id":19, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":520, "y":288 }], "opacity":1, "type":"objectgroup", "visible":true, "width":200, "x":0, "y":0 }, { "draworder":"topdown", "height":200, "name":"npcs and monsters", "objects":[ { "height":8, "id":20, "name":"", "properties": { "npc":"avian", "typeName":"templeguard" }, "rotation":0, "type":"", "visible":true, "width":8, "x":200, "y":272 }, { "height":8, "id":21, "name":"", "properties": { "npc":"avian", "typeName":"templeguard" }, "rotation":0, "type":"", "visible":true, "width":8, "x":448, "y":272 }, { "height":8, "id":22, "name":"", "properties": { "npc":"avian", "typeName":"battlepriest" }, "rotation":0, "type":"", "visible":true, "width":8, "x":304, "y":272 }], "opacity":1, "type":"objectgroup", "visible":true, "width":200, "x":0, "y":0 }, { "draworder":"topdown", "height":200, "name":"mods and stagehands", "objects":[ { "gid":13, "height":8, "id":23, "name":"", "properties": { }, "rotation":0, "type":"", "visible":true, "width":8, "x":8, "y":288 }], "opacity":1, "type":"objectgroup", "visible":true, "width":200, "x":0, "y":0 }, { "draworder":"topdown", "height":200, "name":"wires", "objects":[], "opacity":1, "type":"objectgroup", "visible":true, "width":200, "x":0, "y":0 }], "nextobjectid":24, "orientation":"orthogonal", "properties": { }, "renderorder":"right-down", "tileheight":8, "tilesets":[ { "firstgid":1, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/miscellaneous.json" }, { "firstgid":21, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/materials.json" }, { "firstgid":211, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/supports.json" }, { "firstgid":247, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/liquids.json" }, { "firstgid":275, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/breakable.json" }, { "firstgid":579, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/bug.json" }, { "firstgid":622, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/crafting.json" }, { "firstgid":701, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/decorative.json" }, { "firstgid":2061, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/door.json" }, { "firstgid":2178, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/furniture.json" }, { "firstgid":2511, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/light.json" }, { "firstgid":2932, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/other.json" }, { "firstgid":3230, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/rail.json" }, { "firstgid":3234, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/refinery.json" }, { "firstgid":3235, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/seed.json" }, { "firstgid":3311, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/spawner.json" }, { "firstgid":3327, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/storage.json" }, { "firstgid":3548, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/techmanagement.json" }, { "firstgid":3549, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/trap.json" }, { "firstgid":3753, "source":"..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/wire.json" }, { "firstgid":3957, "source":"..\/..\/..\/tilesets\/extradungeons-custom\/modstuff.json" }], "tilewidth":8, "version":1, "width":75 }
{ "pile_set_name": "Github" }
--- id: 5f45b4c81cea7763550e40df title: Part 78 challengeType: 0 isHidden: true --- ## Description <section id='description'> To keep with the same color theme you have already been using (black and brown), change the color for when the link is visited to `black` and use `brown` for when the link is actually clicked. </section> ## Tests <section id='tests'> ```yml tests: - text: Test 1 testString: '' ``` </section> ## Challenge Seed <section id='challengeSeed'> <div id='html-seed'> ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Camper Cafe Menu</title> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="menu"> <header> <h1>CAMPER CAFE</h1> <p class="established">Est. 2020</p> </header> <hr> <main> <section> <h2>Coffees</h2> <article class="item"> <p class="flavor">French Vanilla</p><p class="price">3.00</p> </article> <article class="item"> <p class="flavor">Carmel Macchiato</p><p class="price">3.75</p> </article> <article class="item"> <p class="flavor">Pumpkin Spice</p><p class="price">3.50</p> </article> <article class="item"> <p class="flavor">Hazelnut</p><p class="price">4.00</p> </article> <article class="item"> <p class="flavor">Mocha</p><p class="price">4.50</p> </article> </section> <section> <h2>Desserts</h2> <article class="item"> <p class="dessert">Donut</p><p class="price">1.50</p> </article> <article class="item"> <p class="dessert">Cherry Pie</p><p class="price">2.75</p> </article> <article class="item"> <p class="dessert">Cheesecake</p><p class="price">3.00</p> </article> <article class="item"> <p class="dessert">Cinammon Roll</p><p class="price">2.50</p> </article> </section> </main> <hr class="bottom-line"> <footer> <p> <a href="https://www.freecodecamp.org" target="_blank">Visit our website</a> </p> <p>123 Free Code Camp Drive</p> </footer> </div> </body> <html> ``` </div> <div id='css-seed'> ```css body { background-image: url(https://tinyurl.com/coffee-beans-fcc); font-family: sans-serif; padding: 20px; } h1 { font-size: 40px; } h2 { font-size: 30px; } .established { font-style: italic; } h1, h2, p { text-align: center; } .menu { width: 80%; background-color: burlywood; margin-left: auto; margin-right: auto; padding: 20px; max-width: 500px; } hr { height: 2px; background-color: brown; border-color: brown; } .bottom-line { margin-top: 25px; } h1, h2 { font-family: Impact, serif; } .item p { display: inline-block; margin-top: 5px; margin-bottom: 5px; font-size: 18px; } .flavor, .dessert { text-align: left; width: 75%; } .price { text-align: right; width: 25% } /* FOOTER */ footer { font-size: 14px; } a { color: black; } --fcc-editable-region-- a:visited { color: grey; } a:hover { color: brown; } a:active { color: white; } --fcc-editable-region-- ``` </div> </section>
{ "pile_set_name": "Github" }
# ================================================================= # # Authors: Francesco Bartoli <[email protected]> # # Copyright (c) 2020 Francesco Bartoli # # 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. # # ================================================================= import logging from pygeoapi.provider.base import ProviderGenericError LOGGER = logging.getLogger(__name__) class BaseTileProvider: """generic Tile Provider ABC""" def __init__(self, provider_def): """ Initialize object :param provider_def: provider definition :returns: pygeoapi.providers.tile.BaseTileProvider """ self.name = provider_def['name'] self.data = provider_def['data'] self.format_type = provider_def['format']['name'] self.mimetype = provider_def['format']['mimetype'] self.options = provider_def.get('options', None) self.fields = {} def get_layer(self): """ Get provider layer name :returns: `string` of layer name """ def get_fields(self): """ Get provider field information (names, types) :returns: `dict` of fields """ raise NotImplementedError() def get_tiling_schemes(self): """ Get provider field information (names, types) :returns: `dict` of tiling schemes """ raise NotImplementedError() def get_tiles_service(self, baseurl, servicepath, dirpath, tile_type): """ Gets tile service description :param baseurl: base URL of endpoint :param servicepath: base path of URL :param dirpath: directory basepath (equivalent of URL) :param tile_type: tile format type :returns: `dict` of file listing or `dict` of GeoJSON item or raw file """ raise NotImplementedError() def get_tiles(self, layer, tileset, z, y, x, format_): """ Gets tiles data :param layer: tile layer :param tileset: tile set :param z: z index :param y: y index :param x: x index :param format_: tile format type :returns: `binary` of the tile """ raise NotImplementedError() def get_metadata(self): """ Provide data/file metadata :returns: `dict` of metadata construct (format determined by provider/standard) """ raise NotImplementedError() class ProviderTileQueryError(ProviderGenericError): """provider tile query error""" pass class ProviderTileNotFoundError(ProviderGenericError): """provider tile not found error""" pass class ProviderTilesetIdNotFoundError(ProviderTileQueryError): """provider tileset matrix query error""" pass
{ "pile_set_name": "Github" }
/* * Copyright Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ /* * Do not modify this file. This file is generated from the athena-2017-05-18.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Athena.Model { /// <summary> /// This is the response object from the CreateNamedQuery operation. /// </summary> public partial class CreateNamedQueryResponse : AmazonWebServiceResponse { private string _namedQueryId; /// <summary> /// Gets and sets the property NamedQueryId. /// <para> /// The unique ID of the query. /// </para> /// </summary> public string NamedQueryId { get { return this._namedQueryId; } set { this._namedQueryId = value; } } // Check to see if NamedQueryId property is set internal bool IsSetNamedQueryId() { return this._namedQueryId != null; } } }
{ "pile_set_name": "Github" }
# ------------------------------------------------------------------- # Config file for the `rawlog-grabber` MRPT application. # Usage: # rawlog-grabber CONFIG_FILE.ini # # Each section `[XXXXX]` but `[global]` defines a dedicated thread where a # sensor-specific driver runs. Each thread collects observations in parallel # and the main thread sort them by timestamp and dumps them to a RAWLOG file. # The driver for each thread is set with the field `driver`, which must # match the name of any of the classes in mrpt::hwdrivers implementing # a CGenericSensor. # # Read more online: # https://www.mrpt.org/list-of-mrpt-apps/application-rawlog-grabber/ # ------------------------------------------------------------------- # ======================================================= # Section: Global settings to the application # ======================================================= [global] # The prefix can contain a relative or absolute path. # The final name will be <PREFIX>_date_time.rawlog rawlog_prefix = ./dataset # Milliseconds between thread launches time_between_launches = 300 # Maximum time (seconds) between a sequence of observations # is splitted into sensory frames SF_max_time_span = 0.25 # ======================================================= # SENSOR: LASER_2D # # ======================================================= [LASER_2D] driver = CSickLaserUSB process_rate = 60 // Hz sensorLabel = LMS_FRONT pose_x = 0.095 // Laser range scaner 3D position in the robot (meters) pose_y = 0 pose_z = 0.31 pose_yaw = 0 // Angles in degrees pose_pitch = 0 pose_roll = 0 SICKUSB_serialNumber = LASER009 # ======================================================= # SENSOR: GPS_JAVAD # # ======================================================= [GPS_JAVAD_1] driver = CGPSInterface process_rate = 4 // Hz sensorLabel = GPS_JAVAD_1 serialPortName = COM6 baudRate = 115200 customInit = JAVAD pose_x = 0 // Laser range scaner 3D position in the robot (meters) pose_y = 0 pose_z = 0 # ======================================================= # SENSOR: GPS_JAVAD # # ======================================================= [GPS_JAVAD_2] driver = CGPSInterface process_rate = 4 // Hz sensorLabel = GPS_JAVAD_2 serialPortName = COM7 baudRate = 115200 customInit = JAVAD pose_x = 0 // Laser range scaner 3D position in the robot (meters) pose_y = 0 pose_z = 0 # ======================================================= # SENSOR: Dual LMS # # ======================================================= [DualLMS] driver = CBoardDLMS process_rate = 30 // Hz USB_serialname = DLMS-001 pose_x = 0 // Laser range scaner 3D position in the robot (meters) pose_y = 0 pose_z = 0
{ "pile_set_name": "Github" }
using SimplCommerce.Infrastructure.Models; namespace SimplCommerce.Module.Catalog.Models { public class ProductCategory : EntityBase { public bool IsFeaturedProduct { get; set; } public int DisplayOrder { get; set; } public long CategoryId { get; set; } public long ProductId { get; set; } public Category Category { get; set; } public Product Product { get; set; } } }
{ "pile_set_name": "Github" }
require File.expand_path('../helper', __FILE__) class TestRakeInvocationChain < Rake::TestCase def setup super @empty = Rake::InvocationChain::EMPTY @first_member = "A" @second_member = "B" @one = @empty.append(@first_member) @two = @one.append(@second_member) end def test_append chain = @empty.append("A") assert_equal 'TOP => A', chain.to_s # HACK end def test_append_one_circular ex = assert_raises RuntimeError do @one.append(@first_member) end assert_match(/circular +dependency/i, ex.message) assert_match(/A.*=>.*A/, ex.message) end def test_append_two_circular ex = assert_raises RuntimeError do @two.append(@first_member) end assert_match(/A.*=>.*B.*=>.*A/, ex.message) end def test_member_eh_one assert @one.member?(@first_member) end def test_member_eh_two assert @two.member?(@first_member) assert @two.member?(@second_member) end def test_to_s_empty assert_equal "TOP", @empty.to_s assert_equal "TOP => A", @one.to_s end end
{ "pile_set_name": "Github" }
/* * * Copyright 2015 gRPC 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. * */ /* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when using that endpoint. Because of various transitive includes in uv.h, including windows.h on Windows, uv.h must be included before other system headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include <grpc/slice.h> #include <grpc/slice_buffer.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> #include "src/core/lib/debug/trace.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/security/transport/tsi_error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/tsi/transport_security_grpc.h" #define STAGING_BUFFER_SIZE 8192 typedef struct { grpc_endpoint base; grpc_endpoint *wrapped_ep; struct tsi_frame_protector *protector; struct tsi_zero_copy_grpc_protector *zero_copy_protector; gpr_mu protector_mu; /* saved upper level callbacks and user_data. */ grpc_closure *read_cb; grpc_closure *write_cb; grpc_closure on_read; grpc_slice_buffer *read_buffer; grpc_slice_buffer source_buffer; /* saved handshaker leftover data to unprotect. */ grpc_slice_buffer leftover_bytes; /* buffers for read and write */ grpc_slice read_staging_buffer; grpc_slice write_staging_buffer; grpc_slice_buffer output_buffer; gpr_refcount ref; } secure_endpoint; grpc_tracer_flag grpc_trace_secure_endpoint = GRPC_TRACER_INITIALIZER(false, "secure_endpoint"); static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { secure_endpoint *ep = secure_ep; grpc_endpoint_destroy(exec_ctx, ep->wrapped_ep); tsi_frame_protector_destroy(ep->protector); tsi_zero_copy_grpc_protector_destroy(exec_ctx, ep->zero_copy_protector); grpc_slice_buffer_destroy_internal(exec_ctx, &ep->leftover_bytes); grpc_slice_unref_internal(exec_ctx, ep->read_staging_buffer); grpc_slice_unref_internal(exec_ctx, ep->write_staging_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &ep->output_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &ep->source_buffer); gpr_mu_destroy(&ep->protector_mu); gpr_free(ep); } #ifndef NDEBUG #define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ secure_endpoint_unref((exec_ctx), (ep), (reason), __FILE__, __LINE__) #define SECURE_ENDPOINT_REF(ep, reason) \ secure_endpoint_ref((ep), (reason), __FILE__, __LINE__) static void secure_endpoint_unref(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, const char *reason, const char *file, int line) { if (GRPC_TRACER_ON(grpc_trace_secure_endpoint)) { gpr_atm val = gpr_atm_no_barrier_load(&ep->ref.count); gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP unref %p : %s %" PRIdPTR " -> %" PRIdPTR, ep, reason, val, val - 1); } if (gpr_unref(&ep->ref)) { destroy(exec_ctx, ep); } } static void secure_endpoint_ref(secure_endpoint *ep, const char *reason, const char *file, int line) { if (GRPC_TRACER_ON(grpc_trace_secure_endpoint)) { gpr_atm val = gpr_atm_no_barrier_load(&ep->ref.count); gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP ref %p : %s %" PRIdPTR " -> %" PRIdPTR, ep, reason, val, val + 1); } gpr_ref(&ep->ref); } #else #define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ secure_endpoint_unref((exec_ctx), (ep)) #define SECURE_ENDPOINT_REF(ep, reason) secure_endpoint_ref((ep)) static void secure_endpoint_unref(grpc_exec_ctx *exec_ctx, secure_endpoint *ep) { if (gpr_unref(&ep->ref)) { destroy(exec_ctx, ep); } } static void secure_endpoint_ref(secure_endpoint *ep) { gpr_ref(&ep->ref); } #endif static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); ep->read_staging_buffer = GRPC_SLICE_MALLOC(STAGING_BUFFER_SIZE); *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); } static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, grpc_error *error) { if (GRPC_TRACER_ON(grpc_trace_secure_endpoint)) { size_t i; for (i = 0; i < ep->read_buffer->count; i++) { char *data = grpc_dump_slice(ep->read_buffer->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p: %s", ep, data); gpr_free(data); } } ep->read_buffer = NULL; GRPC_CLOSURE_SCHED(exec_ctx, ep->read_cb, error); SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); } static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *error) { unsigned i; uint8_t keep_looping = 0; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)user_data; uint8_t *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); uint8_t *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); if (error != GRPC_ERROR_NONE) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, ep->read_buffer); call_read_cb(exec_ctx, ep, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Secure read failed", &error, 1)); return; } if (ep->zero_copy_protector != NULL) { // Use zero-copy grpc protector to unprotect. result = tsi_zero_copy_grpc_protector_unprotect( exec_ctx, ep->zero_copy_protector, &ep->source_buffer, ep->read_buffer); } else { // Use frame protector to unprotect. /* TODO(yangg) check error, maybe bail out early */ for (i = 0; i < ep->source_buffer.count; i++) { grpc_slice encrypted = ep->source_buffer.slices[i]; uint8_t *message_bytes = GRPC_SLICE_START_PTR(encrypted); size_t message_size = GRPC_SLICE_LENGTH(encrypted); while (message_size > 0 || keep_looping) { size_t unprotected_buffer_size_written = (size_t)(end - cur); size_t processed_message_size = message_size; gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_unprotect( ep->protector, message_bytes, &processed_message_size, cur, &unprotected_buffer_size_written); gpr_mu_unlock(&ep->protector_mu); if (result != TSI_OK) { gpr_log(GPR_ERROR, "Decryption error: %s", tsi_result_to_string(result)); break; } message_bytes += processed_message_size; message_size -= processed_message_size; cur += unprotected_buffer_size_written; if (cur == end) { flush_read_staging_buffer(ep, &cur, &end); /* Force to enter the loop again to extract buffered bytes in protector. The bytes could be buffered because of running out of staging_buffer. If this happens at the end of all slices, doing another unprotect avoids leaving data in the protector. */ keep_looping = 1; } else if (unprotected_buffer_size_written > 0) { keep_looping = 1; } else { keep_looping = 0; } } if (result != TSI_OK) break; } if (cur != GRPC_SLICE_START_PTR(ep->read_staging_buffer)) { grpc_slice_buffer_add( ep->read_buffer, grpc_slice_split_head( &ep->read_staging_buffer, (size_t)(cur - GRPC_SLICE_START_PTR(ep->read_staging_buffer)))); } } /* TODO(yangg) experiment with moving this block after read_cb to see if it helps latency */ grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &ep->source_buffer); if (result != TSI_OK) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, ep->read_buffer); call_read_cb( exec_ctx, ep, grpc_set_tsi_error_result( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Unwrap failed"), result)); return; } call_read_cb(exec_ctx, ep, GRPC_ERROR_NONE); } static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, grpc_slice_buffer *slices, grpc_closure *cb) { secure_endpoint *ep = (secure_endpoint *)secure_ep; ep->read_cb = cb; ep->read_buffer = slices; grpc_slice_buffer_reset_and_unref_internal(exec_ctx, ep->read_buffer); SECURE_ENDPOINT_REF(ep, "read"); if (ep->leftover_bytes.count) { grpc_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); GPR_ASSERT(ep->leftover_bytes.count == 0); on_read(exec_ctx, ep, GRPC_ERROR_NONE); return; } grpc_endpoint_read(exec_ctx, ep->wrapped_ep, &ep->source_buffer, &ep->on_read); } static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); ep->write_staging_buffer = GRPC_SLICE_MALLOC(STAGING_BUFFER_SIZE); *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); } static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, grpc_slice_buffer *slices, grpc_closure *cb) { GPR_TIMER_BEGIN("secure_endpoint.endpoint_write", 0); unsigned i; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)secure_ep; uint8_t *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); uint8_t *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &ep->output_buffer); if (GRPC_TRACER_ON(grpc_trace_secure_endpoint)) { for (i = 0; i < slices->count; i++) { char *data = grpc_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data); gpr_free(data); } } if (ep->zero_copy_protector != NULL) { // Use zero-copy grpc protector to protect. result = tsi_zero_copy_grpc_protector_protect( exec_ctx, ep->zero_copy_protector, slices, &ep->output_buffer); } else { // Use frame protector to protect. for (i = 0; i < slices->count; i++) { grpc_slice plain = slices->slices[i]; uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = (size_t)(end - cur); size_t processed_message_size = message_size; gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_protect(ep->protector, message_bytes, &processed_message_size, cur, &protected_buffer_size_to_send); gpr_mu_unlock(&ep->protector_mu); if (result != TSI_OK) { gpr_log(GPR_ERROR, "Encryption error: %s", tsi_result_to_string(result)); break; } message_bytes += processed_message_size; message_size -= processed_message_size; cur += protected_buffer_size_to_send; if (cur == end) { flush_write_staging_buffer(ep, &cur, &end); } } if (result != TSI_OK) break; } if (result == TSI_OK) { size_t still_pending_size; do { size_t protected_buffer_size_to_send = (size_t)(end - cur); gpr_mu_lock(&ep->protector_mu); result = tsi_frame_protector_protect_flush( ep->protector, cur, &protected_buffer_size_to_send, &still_pending_size); gpr_mu_unlock(&ep->protector_mu); if (result != TSI_OK) break; cur += protected_buffer_size_to_send; if (cur == end) { flush_write_staging_buffer(ep, &cur, &end); } } while (still_pending_size > 0); if (cur != GRPC_SLICE_START_PTR(ep->write_staging_buffer)) { grpc_slice_buffer_add( &ep->output_buffer, grpc_slice_split_head( &ep->write_staging_buffer, (size_t)(cur - GRPC_SLICE_START_PTR(ep->write_staging_buffer)))); } } } if (result != TSI_OK) { /* TODO(yangg) do different things according to the error type? */ grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &ep->output_buffer); GRPC_CLOSURE_SCHED( exec_ctx, cb, grpc_set_tsi_error_result( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Wrap failed"), result)); GPR_TIMER_END("secure_endpoint.endpoint_write", 0); return; } grpc_endpoint_write(exec_ctx, ep->wrapped_ep, &ep->output_buffer, cb); GPR_TIMER_END("secure_endpoint.endpoint_write", 0); } static void endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, grpc_error *why) { secure_endpoint *ep = (secure_endpoint *)secure_ep; grpc_endpoint_shutdown(exec_ctx, ep->wrapped_ep, why); } static void endpoint_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; SECURE_ENDPOINT_UNREF(exec_ctx, ep, "destroy"); } static void endpoint_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, grpc_pollset *pollset) { secure_endpoint *ep = (secure_endpoint *)secure_ep; grpc_endpoint_add_to_pollset(exec_ctx, ep->wrapped_ep, pollset); } static void endpoint_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, grpc_pollset_set *pollset_set) { secure_endpoint *ep = (secure_endpoint *)secure_ep; grpc_endpoint_add_to_pollset_set(exec_ctx, ep->wrapped_ep, pollset_set); } static char *endpoint_get_peer(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_peer(ep->wrapped_ep); } static int endpoint_get_fd(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_fd(ep->wrapped_ep); } static grpc_resource_user *endpoint_get_resource_user( grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_resource_user(ep->wrapped_ep); } static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_write, endpoint_add_to_pollset, endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, endpoint_get_resource_user, endpoint_get_peer, endpoint_get_fd}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, struct tsi_zero_copy_grpc_protector *zero_copy_protector, grpc_endpoint *transport, grpc_slice *leftover_slices, size_t leftover_nslices) { size_t i; secure_endpoint *ep = (secure_endpoint *)gpr_malloc(sizeof(secure_endpoint)); ep->base.vtable = &vtable; ep->wrapped_ep = transport; ep->protector = protector; ep->zero_copy_protector = zero_copy_protector; grpc_slice_buffer_init(&ep->leftover_bytes); for (i = 0; i < leftover_nslices; i++) { grpc_slice_buffer_add(&ep->leftover_bytes, grpc_slice_ref_internal(leftover_slices[i])); } ep->write_staging_buffer = GRPC_SLICE_MALLOC(STAGING_BUFFER_SIZE); ep->read_staging_buffer = GRPC_SLICE_MALLOC(STAGING_BUFFER_SIZE); grpc_slice_buffer_init(&ep->output_buffer); grpc_slice_buffer_init(&ep->source_buffer); ep->read_buffer = NULL; GRPC_CLOSURE_INIT(&ep->on_read, on_read, ep, grpc_schedule_on_exec_ctx); gpr_mu_init(&ep->protector_mu); gpr_ref_init(&ep->ref, 1); return &ep->base; }
{ "pile_set_name": "Github" }
/* a demo of defining floating point functions, and floating point complex functions, macsyma macros, and the macsyma compiler for more details, see the numer directory.*/ /* 5:43pm thursday, 20 march 1980 if this demo screws up it is because something has changed and it is out of date. please tell gjc. */ /* showtime all should be done to keep track of the efficiency of the code. */ (showtime:'all,loadfile(numer,autoload,dsk,numer))$ /* make an expression */ exp1:taylor(exp(-x^2),x,0,5); /* make a numerical function. floatdefunk takes a math expression. */ floatdefunk('f,['x],exp1); /* lets see what translation and compilation can do for us in this case. use a function testfn which will call romberg of f, n times. */ testfn(n):=(modedeclare(n,fixnum),for j:2 thru n do romberg(f,
{ "pile_set_name": "Github" }
/* * linux/drivers/video/pmag-aa-fb.c * Copyright 2002 Karsten Merker <[email protected]> * * PMAG-AA TurboChannel framebuffer card support ... derived from * pmag-ba-fb.c, which is Copyright (C) 1999, 2000, 2001 by * Michael Engel <[email protected]>, Karsten Merker <[email protected]> * and Harald Koerfgen <[email protected]>, which itself is derived from * "HP300 Topcat framebuffer support (derived from macfb of all things) * Phil Blundell <[email protected]> 1998" * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this * archive for more details. * * 2002-09-28 Karsten Merker <[email protected]> * Version 0.01: First try to get a PMAG-AA running. * * 2003-02-24 Thiemo Seufer <[email protected]> * Version 0.02: Major code cleanup. * * 2003-09-21 Thiemo Seufer <[email protected]> * Hardware cursor support. */ #include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/string.h> #include <linux/timer.h> #include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/fb.h> #include <linux/console.h> #include <asm/bootinfo.h> #include <asm/dec/machtype.h> #include <asm/dec/tc.h> #include <video/fbcon.h> #include <video/fbcon-cfb8.h> #include "bt455.h" #include "bt431.h" /* Version information */ #define DRIVER_VERSION "0.02" #define DRIVER_AUTHOR "Karsten Merker <[email protected]>" #define DRIVER_DESCRIPTION "PMAG-AA Framebuffer Driver" /* Prototypes */ static int aafb_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info); /* * Bt455 RAM DAC register base offset (rel. to TC slot base address). */ #define PMAG_AA_BT455_OFFSET 0x100000 /* * Bt431 cursor generator offset (rel. to TC slot base address). */ #define PMAG_AA_BT431_OFFSET 0x180000 /* * Begin of PMAG-AA framebuffer memory relative to TC slot address, * resolution is 1280x1024x1 (8 bits deep, but only LSB is used). */ #define PMAG_AA_ONBOARD_FBMEM_OFFSET 0x200000 struct aafb_cursor { struct timer_list timer; int enable; int on; int vbl_cnt; int blink_rate; u16 x, y, width, height; }; #define CURSOR_TIMER_FREQ (HZ / 50) #define CURSOR_BLINK_RATE (20) #define CURSOR_DRAW_DELAY (2) struct aafb_info { struct fb_info info; struct display disp; struct aafb_cursor cursor; struct bt455_regs *bt455; struct bt431_regs *bt431; unsigned long fb_start; unsigned long fb_size; unsigned long fb_line_length; }; /* * Max 3 TURBOchannel slots -> max 3 PMAG-AA. */ static struct aafb_info my_fb_info[3]; static struct aafb_par { } current_par; static int currcon = -1; static void aafb_set_cursor(struct aafb_info *info, int on) { struct aafb_cursor *c = &info->cursor; if (on) { bt431_position_cursor(info->bt431, c->x, c->y); bt431_enable_cursor(info->bt431); } else bt431_erase_cursor(info->bt431); } static void aafbcon_cursor(struct display *disp, int mode, int x, int y) { struct aafb_info *info = (struct aafb_info *)disp->fb_info; struct aafb_cursor *c = &info->cursor; x *= fontwidth(disp); y *= fontheight(disp); if (c->x == x && c->y == y && (mode == CM_ERASE) == !c->enable) return; c->enable = 0; if (c->on) aafb_set_cursor(info, 0); c->x = x - disp->var.xoffset; c->y = y - disp->var.yoffset; switch (mode) { case CM_ERASE: c->on = 0; break; case CM_DRAW: case CM_MOVE: if (c->on) aafb_set_cursor(info, c->on); else c->vbl_cnt = CURSOR_DRAW_DELAY; c->enable = 1; break; } } static int aafbcon_set_font(struct display *disp, int width, int height) { struct aafb_info *info = (struct aafb_info *)disp->fb_info; struct aafb_cursor *c = &info->cursor; u8 fgc = ~attr_bgcol_ec(disp, disp->conp, &info->info); if (width > 64 || height > 64 || width < 0 || height < 0) return -EINVAL; c->height = height; c->width = width; bt431_set_font(info->bt431, fgc, width, height); return 1; } static void aafb_cursor_timer_handler(unsigned long data) { struct aafb_info *info = (struct aafb_info *)data; struct aafb_cursor *c = &info->cursor; if (!c->enable) goto out; if (c->vbl_cnt && --c->vbl_cnt == 0) { c->on ^= 1; aafb_set_cursor(info, c->on); c->vbl_cnt = c->blink_rate; } out: c->timer.expires = jiffies + CURSOR_TIMER_FREQ; add_timer(&c->timer); } static void __init aafb_cursor_init(struct aafb_info *info) { struct aafb_cursor *c = &info->cursor; c->enable = 1; c->on = 1; c->x = c->y = 0; c->width = c->height = 0; c->vbl_cnt = CURSOR_DRAW_DELAY; c->blink_rate = CURSOR_BLINK_RATE; init_timer(&c->timer); c->timer.data = (unsigned long)info; c->timer.function = aafb_cursor_timer_handler; mod_timer(&c->timer, jiffies + CURSOR_TIMER_FREQ); } static void __exit aafb_cursor_exit(struct aafb_info *info) { struct aafb_cursor *c = &info->cursor; del_timer_sync(&c->timer); } static struct display_switch aafb_switch8 = { .setup = fbcon_cfb8_setup, .bmove = fbcon_cfb8_bmove, .clear = fbcon_cfb8_clear, .putc = fbcon_cfb8_putc, .putcs = fbcon_cfb8_putcs, .revc = fbcon_cfb8_revc, .cursor = aafbcon_cursor, .set_font = aafbcon_set_font, .clear_margins = fbcon_cfb8_clear_margins, .fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16) }; static void aafb_get_par(struct aafb_par *par) { *par = current_par; } static int aafb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info) { struct aafb_info *ip = (struct aafb_info *)info; memset(fix, 0, sizeof(struct fb_fix_screeninfo)); strcpy(fix->id, "PMAG-AA"); fix->smem_start = ip->fb_start; fix->smem_len = ip->fb_size; fix->type = FB_TYPE_PACKED_PIXELS; fix->ypanstep = 1; fix->ywrapstep = 1; fix->visual = FB_VISUAL_MONO10; fix->line_length = 1280; fix->accel = FB_ACCEL_NONE; return 0; } static void aafb_set_disp(struct display *disp, int con, struct aafb_info *info) { struct fb_fix_screeninfo fix; disp->fb_info = &info->info; aafb_set_var(&disp->var, con, &info->info); if (disp->conp && disp->conp->vc_sw && disp->conp->vc_sw->con_cursor) disp->conp->vc_sw->con_cursor(disp->conp, CM_ERASE); disp->dispsw = &aafb_switch8; disp->dispsw_data = 0; aafb_get_fix(&fix, con, &info->info); disp->screen_base = (u8 *) fix.smem_start; disp->visual = fix.visual; disp->type = fix.type; disp->type_aux = fix.type_aux; disp->ypanstep = fix.ypanstep; disp->ywrapstep = fix.ywrapstep; disp->line_length = fix.line_length; disp->next_line = 2048; disp->can_soft_blank = 1; disp->inverse = 0; disp->scrollmode = SCROLL_YREDRAW; aafbcon_set_font(disp, fontwidth(disp), fontheight(disp)); } static int aafb_get_cmap(struct fb_cmap *cmap, int kspc, int con, struct fb_info *info) { static u16 color[2] = {0x0000, 0x000f}; static struct fb_cmap aafb_cmap = {0, 2, color, color, color, NULL}; fb_copy_cmap(&aafb_cmap, cmap, kspc ? 0 : 2); return 0; } static int aafb_set_cmap(struct fb_cmap *cmap, int kspc, int con, struct fb_info *info) { u16 color[2] = {0x0000, 0x000f}; if (cmap->start == 0 && cmap->len == 2 && memcmp(cmap->red, color, sizeof(color)) == 0 && memcmp(cmap->green, color, sizeof(color)) == 0 && memcmp(cmap->blue, color, sizeof(color)) == 0 && cmap->transp == NULL) return 0; else return -EINVAL; } static int aafb_ioctl(struct fb_info *info, u32 cmd, unsigned long arg) { /* TODO: Not yet implemented */ return -ENOIOCTLCMD; } static int aafb_switch(int con, struct fb_info *info) { struct aafb_info *ip = (struct aafb_info *)info; struct display *old = (currcon < 0) ? &ip->disp : (fb_display + currcon); struct display *new = (con < 0) ? &ip->disp : (fb_display + con); if (old->conp && old->conp->vc_sw && old->conp->vc_sw->con_cursor) old->conp->vc_sw->con_cursor(old->conp, CM_ERASE); /* Set the current console. */ currcon = con; aafb_set_disp(new, con, ip); return 0; } static void aafb_encode_var(struct fb_var_screeninfo *var, struct aafb_par *par) { var->xres = 1280; var->yres = 1024; var->xres_virtual = 2048; var->yres_virtual = 1024; var->xoffset = 0; var->yoffset = 0; var->bits_per_pixel = 8; var->grayscale = 1; var->red.offset = 0; var->red.length = 0; var->red.msb_right = 0; var->green.offset = 0; var->green.length = 1; var->green.msb_right = 0; var->blue.offset = 0; var->blue.length = 0; var->blue.msb_right = 0; var->transp.offset = 0; var->transp.length = 0; var->transp.msb_right = 0; var->nonstd = 0; var->activate &= ~FB_ACTIVATE_MASK & FB_ACTIVATE_NOW; var->accel_flags = 0; var->sync = FB_SYNC_ON_GREEN; var->vmode &= ~FB_VMODE_MASK & FB_VMODE_NONINTERLACED; } static int aafb_get_var(struct fb_var_screeninfo *var, int con, struct fb_info *info) { if (con < 0) { struct aafb_par par; memset(var, 0, sizeof(struct fb_var_screeninfo)); aafb_get_par(&par); aafb_encode_var(var, &par); } else *var = info->var; return 0; } static int aafb_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info) { struct aafb_par par; aafb_get_par(&par); aafb_encode_var(var, &par); info->var = *var; return 0; } static int aafb_update_var(int con, struct fb_info *info) { struct aafb_info *ip = (struct aafb_info *)info; struct display *disp = (con < 0) ? &ip->disp : (fb_display + con); if (con == currcon) aafbcon_cursor(disp, CM_ERASE, ip->cursor.x, ip->cursor.y); return 0; } /* 0 unblanks, any other blanks. */ static void aafb_blank(int blank, struct fb_info *info) { struct aafb_info *ip = (struct aafb_info *)info; u8 val = blank ? 0x00 : 0x0f; bt455_write_cmap_entry(ip->bt455, 1, val, val, val); aafbcon_cursor(&ip->disp, CM_ERASE, ip->cursor.x, ip->cursor.y); } static struct fb_ops aafb_ops = { .owner = THIS_MODULE, .fb_get_fix = aafb_get_fix, .fb_get_var = aafb_get_var, .fb_set_var = aafb_set_var, .fb_get_cmap = aafb_get_cmap, .fb_set_cmap = aafb_set_cmap, .fb_ioctl = aafb_ioctl }; static int __init init_one(int slot) { unsigned long base_addr = CKSEG1ADDR(get_tc_base_addr(slot)); struct aafb_info *ip = &my_fb_info[slot]; memset(ip, 0, sizeof(struct aafb_info)); /* * Framebuffer display memory base address and friends. */ ip->bt455 = (struct bt455_regs *) (base_addr + PMAG_AA_BT455_OFFSET); ip->bt431 = (struct bt431_regs *) (base_addr + PMAG_AA_BT431_OFFSET); ip->fb_start = base_addr + PMAG_AA_ONBOARD_FBMEM_OFFSET; ip->fb_size = 2048 * 1024; /* fb_fix_screeninfo.smem_length seems to be physical */ ip->fb_line_length = 2048; /* * Let there be consoles.. */ strcpy(ip->info.modename, "PMAG-AA"); ip->info.node = -1; ip->info.flags = FBINFO_FLAG_DEFAULT; ip->info.fbops = &aafb_ops; ip->info.disp = &ip->disp; ip->info.changevar = NULL; ip->info.switch_con = &aafb_switch; ip->info.updatevar = &aafb_update_var; ip->info.blank = &aafb_blank; aafb_set_disp(&ip->disp, currcon, ip); /* * Configure the RAM DACs. */ bt455_erase_cursor(ip->bt455); /* Init colormap. */ bt455_write_cmap_entry(ip->bt455, 0, 0x00, 0x00, 0x00); bt455_write_cmap_entry(ip->bt455, 1, 0x0f, 0x0f, 0x0f); /* Init hardware cursor. */ bt431_init_cursor(ip->bt431); aafb_cursor_init(ip); /* Clear the screen. */ memset ((void *)ip->fb_start, 0, ip->fb_size); if (register_framebuffer(&ip->info) < 0) return -EINVAL; printk(KERN_INFO "fb%d: %s frame buffer in TC slot %d\n", GET_FB_IDX(ip->info.node), ip->info.modename, slot); return 0; } static int __exit exit_one(int slot) { struct aafb_info *ip = &my_fb_info[slot]; if (unregister_framebuffer(&ip->info) < 0) return -EINVAL; return 0; } /* * Initialise the framebuffer. */ int __init pmagaafb_init(void) { int sid; int found = 0; while ((sid = search_tc_card("PMAG-AA")) >= 0) { found = 1; claim_tc_card(sid); init_one(sid); } return found ? 0 : -ENXIO; } static void __exit pmagaafb_exit(void) { int sid; while ((sid = search_tc_card("PMAG-AA")) >= 0) { exit_one(sid); release_tc_card(sid); } } MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESCRIPTION); MODULE_LICENSE("GPL"); #ifdef MODULE module_init(pmagaafb_init); module_exit(pmagaafb_exit); #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <playground version='6.0' target-platform='ios' display-mode='rendered'/>
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Diagnostics; namespace MemTraceTool { public interface IMemoryInfo { ulong MinAddress { get; } ulong MaxAddress { get; } void GetOccupancyMask(uint[] out_bits, ulong addr_lo, ulong addr_hi); void GetAllocationInfo(ulong address); } public partial class FragmentationWidget : UserControl, IDisposable { public IMemoryInfo MemoryInfo { get; set; } public int BytesPerPixelLog2 { get; set; } private Brush m_BackgroundBrush; private uint[] m_Buffer = new uint[1024]; public FragmentationWidget() { m_BackgroundBrush = new SolidBrush(Color.DarkGray); InitializeComponent(); } protected override void OnPaint(PaintEventArgs e) { var g = e.Graphics; Draw(g); } private Point AddressToPoint(ulong address) { var mem = MemoryInfo; if (null == mem) return new Point(0, 0); var sz = this.ClientSize; ulong w = (ulong) sz.Width; int bbp = BytesPerPixelLog2; ulong offset = (address - mem.MinAddress); int yoff = (int) ((offset >> bbp) / w); int xoff = (int) ((offset >> bbp) % w); return new Point(xoff, yoff); } private ulong PointToAddress(Point p) { var mem = MemoryInfo; var sz = this.ClientSize; if (mem == null || p.X < 0 || p.X >= sz.Width || p.Y <0 || p.Y >= sz.Height) return 0; int bbp = BytesPerPixelLog2; ulong x = (ulong) p.X; ulong y = (ulong) p.Y; ulong off = (x + y * (ulong)sz.Width) << bbp; return mem.MinAddress + off; } private void Draw(Graphics g) { var mem = MemoryInfo; var rect = g.ClipBounds; g.FillRectangle(m_BackgroundBrush, rect); if (null == mem) return; ulong start_addr = PointToAddress(new Point((int)rect.Left, (int)rect.Top)); ulong end_addr = PointToAddress(new Point((int)rect.Right, (int)rect.Bottom)); // Make sure the buffer is large enough. int bytes = (int)(end_addr - start_addr); int count = (bytes + 31) / 32; if (count > m_Buffer.Length) m_Buffer = new uint[count + 1024]; mem.GetOccupancyMask(m_Buffer, start_addr, end_addr); for (ulong addr = start_addr; addr < end_addr; ++addr) { } } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS Test: 'contain: size' should force elements to be monolithic, i.e. to not fragment inside a multicol element.</title> <link rel="author" title="Morgan Rae Reschenberg" href="mailto:[email protected]"> <link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size"> <link rel="match" href="contain-size-multicol-001-ref.html"> <style> .contain { contain:size; } .cols { column-count: 3; column-rule: 1px dotted blue; column-fill: auto; border: 2px solid blue; height: 50px; width: 300px; } .innerObject { height: 200px; width: 100px; background: orange; } </style> </head> <body> <div class="cols"> <div class="contain innerObject"> </div> </div> </body> </html>
{ "pile_set_name": "Github" }
# WPA2-EAP/CCMP using EAP-TLS ctrl_interface=/var/run/wpa_supplicant network={ ssid="example wpa2-eap network" key_mgmt=WPA-EAP proto=WPA2 pairwise=CCMP group=CCMP eap=TLS ca_cert="/etc/cert/ca.pem" private_key="/etc/cert/user.p12" private_key_passwd="PKCS#12 passhrase" }
{ "pile_set_name": "Github" }
// // MonoDevelopCredentialProvider.cs // // Author: // Matt Ward <[email protected]> // // Copyright (C) 2013 Matthew Ward // // 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. // using System; using System.Net; using NuGet; namespace ICSharpCode.PackageManagement { public class MonoDevelopCredentialProvider : ICredentialProvider { public ICredentials GetCredentials(Uri uri, IWebProxy proxy, CredentialType credentialType, bool retrying) { return null; } } }
{ "pile_set_name": "Github" }
# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 3.5 # Delete rule output on recipe failure. .DELETE_ON_ERROR: #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/r/Desktop/BabyOS # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/r/Desktop/BabyOS/build # Include any dependencies generated for this target. include bos/algorithm/CMakeFiles/algorithm.dir/depend.make # Include the progress variables for this target. include bos/algorithm/CMakeFiles/algorithm.dir/progress.make # Include the compile flags for this target's objects. include bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o: ../bos/algorithm/algo_base64.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_base64.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_base64.c bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_base64.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_base64.c > CMakeFiles/algorithm.dir/algo_base64.i bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_base64.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_base64.c -o CMakeFiles/algorithm.dir/algo_base64.s bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o: ../bos/algorithm/algo_gps.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_gps.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_gps.c bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_gps.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_gps.c > CMakeFiles/algorithm.dir/algo_gps.i bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_gps.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_gps.c -o CMakeFiles/algorithm.dir/algo_gps.s bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o: ../bos/algorithm/algo_hmac_sha1.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_hmac_sha1.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_hmac_sha1.c bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_hmac_sha1.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_hmac_sha1.c > CMakeFiles/algorithm.dir/algo_hmac_sha1.i bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_hmac_sha1.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_hmac_sha1.c -o CMakeFiles/algorithm.dir/algo_hmac_sha1.s bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o: ../bos/algorithm/algo_kalman.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_kalman.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_kalman.c bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_kalman.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_kalman.c > CMakeFiles/algorithm.dir/algo_kalman.i bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_kalman.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_kalman.c -o CMakeFiles/algorithm.dir/algo_kalman.s bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o: ../bos/algorithm/algo_matrix.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_matrix.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_matrix.c bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_matrix.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_matrix.c > CMakeFiles/algorithm.dir/algo_matrix.i bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_matrix.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_matrix.c -o CMakeFiles/algorithm.dir/algo_matrix.s bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o: ../bos/algorithm/algo_sort.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_sort.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_sort.c bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_sort.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_sort.c > CMakeFiles/algorithm.dir/algo_sort.i bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_sort.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_sort.c -o CMakeFiles/algorithm.dir/algo_sort.s bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o: bos/algorithm/CMakeFiles/algorithm.dir/flags.make bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o: ../bos/algorithm/algo_speedpid.c @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building C object bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/algorithm.dir/algo_speedpid.o -c /home/r/Desktop/BabyOS/bos/algorithm/algo_speedpid.c bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.i: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/algorithm.dir/algo_speedpid.i" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/r/Desktop/BabyOS/bos/algorithm/algo_speedpid.c > CMakeFiles/algorithm.dir/algo_speedpid.i bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.s: cmake_force @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/algorithm.dir/algo_speedpid.s" cd /home/r/Desktop/BabyOS/build/bos/algorithm && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/r/Desktop/BabyOS/bos/algorithm/algo_speedpid.c -o CMakeFiles/algorithm.dir/algo_speedpid.s bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.requires: .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.requires bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.provides: bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.requires $(MAKE) -f bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.provides.build .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.provides bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.provides.build: bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o # Object files for target algorithm algorithm_OBJECTS = \ "CMakeFiles/algorithm.dir/algo_base64.o" \ "CMakeFiles/algorithm.dir/algo_gps.o" \ "CMakeFiles/algorithm.dir/algo_hmac_sha1.o" \ "CMakeFiles/algorithm.dir/algo_kalman.o" \ "CMakeFiles/algorithm.dir/algo_matrix.o" \ "CMakeFiles/algorithm.dir/algo_sort.o" \ "CMakeFiles/algorithm.dir/algo_speedpid.o" # External object files for target algorithm algorithm_EXTERNAL_OBJECTS = bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/build.make bos/algorithm/libalgorithm.so: bos/algorithm/CMakeFiles/algorithm.dir/link.txt @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/r/Desktop/BabyOS/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Linking C shared library libalgorithm.so" cd /home/r/Desktop/BabyOS/build/bos/algorithm && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/algorithm.dir/link.txt --verbose=$(VERBOSE) # Rule to build all files generated by this target. bos/algorithm/CMakeFiles/algorithm.dir/build: bos/algorithm/libalgorithm.so .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/build bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_base64.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_gps.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_hmac_sha1.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_kalman.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_matrix.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_sort.o.requires bos/algorithm/CMakeFiles/algorithm.dir/requires: bos/algorithm/CMakeFiles/algorithm.dir/algo_speedpid.o.requires .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/requires bos/algorithm/CMakeFiles/algorithm.dir/clean: cd /home/r/Desktop/BabyOS/build/bos/algorithm && $(CMAKE_COMMAND) -P CMakeFiles/algorithm.dir/cmake_clean.cmake .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/clean bos/algorithm/CMakeFiles/algorithm.dir/depend: cd /home/r/Desktop/BabyOS/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/r/Desktop/BabyOS /home/r/Desktop/BabyOS/bos/algorithm /home/r/Desktop/BabyOS/build /home/r/Desktop/BabyOS/build/bos/algorithm /home/r/Desktop/BabyOS/build/bos/algorithm/CMakeFiles/algorithm.dir/DependInfo.cmake --color=$(COLOR) .PHONY : bos/algorithm/CMakeFiles/algorithm.dir/depend
{ "pile_set_name": "Github" }
//----------------------------------------------------------------------------- // VST Plug-Ins SDK // VSTGUI: Graphical User Interface Framework not only for VST plugins : // // Version 4.3 // //----------------------------------------------------------------------------- // VSTGUI LICENSE // (c) 2015, Steinberg Media Technologies, All Rights Reserved //----------------------------------------------------------------------------- // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of the Steinberg Media Technologies nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. // IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. //----------------------------------------------------------------------------- #include "vst3groupcontroller.h" #include <cassert> namespace VSTGUI { //------------------------------------------------------------------------ GroupController::GroupController (Steinberg::Vst::Parameter* parameter, Steinberg::Vst::EditController* editController) : parameter (parameter) , editController (editController) { parameter->addDependent (this); vstgui_assert (parameter->getInfo ().stepCount > 0); } //------------------------------------------------------------------------ GroupController::~GroupController () { parameter->removeDependent (this); } //------------------------------------------------------------------------ CView* GroupController::verifyView (CView* view, const UIAttributes& attributes, const IUIDescription* description) { CControl* control = dynamic_cast<CControl*>(view); if (control) { controls.push_back (control); control->setListener (this); parameter->deferUpdate (); } return view; } //------------------------------------------------------------------------ void GroupController::valueChanged (CControl* pControl) { Steinberg::Vst::ParamValue normValue = parameter->toNormalized (pControl->getTag ()); editController->performEdit (parameter->getInfo().id, normValue); parameter->setNormalized (normValue); } //------------------------------------------------------------------------ void GroupController::controlBeginEdit (CControl* pControl) { VSTGUI_RANGE_BASED_FOR_LOOP (ControlList, controls, CControl*, c) c->setMouseEnabled (c == pControl); VSTGUI_RANGE_BASED_FOR_LOOP_END editController->beginEdit (parameter->getInfo ().id); } //------------------------------------------------------------------------ void GroupController::controlEndEdit (CControl* pControl) { editController->endEdit (parameter->getInfo ().id); update (parameter, kChanged); } //------------------------------------------------------------------------ void PLUGIN_API GroupController::update (Steinberg::FUnknown* changedUnknown, Steinberg::int32 message) { Steinberg::Vst::Parameter* p = Steinberg::FCast<Steinberg::Vst::Parameter> (changedUnknown); if (p && p == parameter) { Steinberg::Vst::ParamValue plainValue = parameter->toPlain (parameter->getNormalized ()); VSTGUI_RANGE_BASED_FOR_LOOP (ControlList, controls, CControl*, c) if (c->getTag () == plainValue) { c->setValue (1); c->setMouseEnabled (false); } else { c->setValue (0); c->setMouseEnabled (true); } c->invalid (); VSTGUI_RANGE_BASED_FOR_LOOP_END } } } // namespace
{ "pile_set_name": "Github" }
// Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct vector21 { typedef aux::vector_tag<21> tag; typedef vector21 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef void_ item21; typedef T20 back; typedef v_iter< type,0 > begin; typedef v_iter< type,21 > end; }; template<> struct push_front_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 > type; }; }; template<> struct push_back_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; template< typename V > struct v_at< V,21 > { typedef typename V::item21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct vector22 { typedef aux::vector_tag<22> tag; typedef vector22 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef void_ item22; typedef T21 back; typedef v_iter< type,0 > begin; typedef v_iter< type,22 > end; }; template<> struct push_front_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21 > type; }; }; template<> struct push_back_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; template< typename V > struct v_at< V,22 > { typedef typename V::item22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct vector23 { typedef aux::vector_tag<23> tag; typedef vector23 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef void_ item23; typedef T22 back; typedef v_iter< type,0 > begin; typedef v_iter< type,23 > end; }; template<> struct push_front_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 > type; }; }; template<> struct push_back_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; template< typename V > struct v_at< V,23 > { typedef typename V::item23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct vector24 { typedef aux::vector_tag<24> tag; typedef vector24 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef void_ item24; typedef T23 back; typedef v_iter< type,0 > begin; typedef v_iter< type,24 > end; }; template<> struct push_front_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23 > type; }; }; template<> struct push_back_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; template< typename V > struct v_at< V,24 > { typedef typename V::item24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct vector25 { typedef aux::vector_tag<25> tag; typedef vector25 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef void_ item25; typedef T24 back; typedef v_iter< type,0 > begin; typedef v_iter< type,25 > end; }; template<> struct push_front_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 > type; }; }; template<> struct push_back_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; template< typename V > struct v_at< V,25 > { typedef typename V::item25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct vector26 { typedef aux::vector_tag<26> tag; typedef vector26 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef void_ item26; typedef T25 back; typedef v_iter< type,0 > begin; typedef v_iter< type,26 > end; }; template<> struct push_front_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25 > type; }; }; template<> struct push_back_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; template< typename V > struct v_at< V,26 > { typedef typename V::item26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct vector27 { typedef aux::vector_tag<27> tag; typedef vector27 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef void_ item27; typedef T26 back; typedef v_iter< type,0 > begin; typedef v_iter< type,27 > end; }; template<> struct push_front_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 > type; }; }; template<> struct push_back_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; template< typename V > struct v_at< V,27 > { typedef typename V::item27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct vector28 { typedef aux::vector_tag<28> tag; typedef vector28 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef void_ item28; typedef T27 back; typedef v_iter< type,0 > begin; typedef v_iter< type,28 > end; }; template<> struct push_front_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27 > type; }; }; template<> struct push_back_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; template< typename V > struct v_at< V,28 > { typedef typename V::item28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct vector29 { typedef aux::vector_tag<29> tag; typedef vector29 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef void_ item29; typedef T28 back; typedef v_iter< type,0 > begin; typedef v_iter< type,29 > end; }; template<> struct push_front_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 > type; }; }; template<> struct push_back_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; template< typename V > struct v_at< V,29 > { typedef typename V::item29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct vector30 { typedef aux::vector_tag<30> tag; typedef vector30 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef void_ item30; typedef T29 back; typedef v_iter< type,0 > begin; typedef v_iter< type,30 > end; }; template<> struct push_front_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29 > type; }; }; template<> struct push_back_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; template< typename V > struct v_at< V,30 > { typedef typename V::item30 type; }; }}
{ "pile_set_name": "Github" }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const ps = require("child_process"); const path = require("path"); const { isFirefoxRunning } = require("./utils/firefox"); const firefoxDriver = require("../../bin/firefox-driver"); const { getValue } = require("devtools-config"); function handleLaunchRequest(req, res) { const browser = req.body.browser; const location = getValue("defaultURL"); process.env.PATH += `:${__dirname}`; if (browser == "Firefox") { isFirefoxRunning().then((isRunning) => { const options = { useWebSocket: getValue("firefox.webSocketConnection"), webSocketPort: getValue("firefox.webSocketPort"), tcpPort: getValue("firefox.tcpPort") }; if (!isRunning) { firefoxDriver.start(location, options); res.end("launched firefox"); } else { res.end("already running firefox"); } }); } if (browser == "Chrome") { const chromeDriver = path.resolve(__dirname, "../../bin/chrome-driver.js"); ps.spawn("node", [chromeDriver, "--location", location]); res.end("launched chrome"); } } module.exports = { handleLaunchRequest };
{ "pile_set_name": "Github" }
/* * Copyright 2017 Capital One Services, LLC and Bitwise, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package hydrograph.engine.jaxb.inputtypes; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import hydrograph.engine.jaxb.ifparquet.TypeInputFileDelimitedBase; /** * <p>Java class for parquetFile complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="parquetFile"> * &lt;complexContent> * &lt;extension base="{hydrograph/engine/jaxb/ifparquet}type-input-file-delimited-base"> * &lt;sequence> * &lt;element name="path"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "parquetFile", namespace = "hydrograph/engine/jaxb/inputtypes", propOrder = { "path" }) public class ParquetFile extends TypeInputFileDelimitedBase { @XmlElement(required = true) protected ParquetFile.Path path; /** * Gets the value of the path property. * * @return * possible object is * {@link ParquetFile.Path } * */ public ParquetFile.Path getPath() { return path; } /** * Sets the value of the path property. * * @param value * allowed object is * {@link ParquetFile.Path } * */ public void setPath(ParquetFile.Path value) { this.path = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class Path { @XmlAttribute(name = "uri", required = true) protected String uri; /** * Gets the value of the uri property. * * @return * possible object is * {@link String } * */ public String getUri() { return uri; } /** * Sets the value of the uri property. * * @param value * allowed object is * {@link String } * */ public void setUri(String value) { this.uri = value; } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Type Name="XmlBuilder" FullName="System.Web.UI.WebControls.XmlBuilder"> <TypeSignature Language="C#" Value="public class XmlBuilder : System.Web.UI.ControlBuilder" /> <AssemblyInfo> <AssemblyName>System.Web</AssemblyName> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Web.UI.ControlBuilder</BaseTypeName> </Base> <Interfaces /> <Docs> <remarks>To be added.</remarks> <since version=".NET 2.0" /> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Interacts with the parser to build the <see cref="T:System.Web.UI.WebControls.Xml" /> control.</para> </summary> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public XmlBuilder ();" /> <MemberType>Constructor</MemberType> <Parameters /> <Docs> <remarks>To be added.</remarks> <since version=".NET 2.0" /> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.XmlBuilder" /> class.</para> </summary> </Docs> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="AppendLiteralString"> <MemberSignature Language="C#" Value="public override void AppendLiteralString (string s);" /> <MemberType>Method</MemberType> <ReturnValue> <ReturnType>System.Void</ReturnType> </ReturnValue> <Parameters> <Parameter Name="s" Type="System.String" /> </Parameters> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Web.UI.WebControls.XmlBuilder.AppendLiteralString(System.String)" /> method of the <see cref="T:System.Web.UI.WebControls.XmlBuilder" /> class overrides the <see cref="M:System.Web.UI.ControlBuilder.AppendLiteralString(System.String)" /> method of the <see cref="T:System.Web.UI.ControlBuilder" /> class so that the method of the base class has no effect.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Adds literal content to the control.</para> </summary> <param name="s"> <attribution license="cc4" from="Microsoft" modified="false" />The literal content to add to the control.</param> </Docs> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="GetChildControlType"> <MemberSignature Language="C#" Value="public override Type GetChildControlType (string tagName, System.Collections.IDictionary attribs);" /> <MemberType>Method</MemberType> <ReturnValue> <ReturnType>System.Type</ReturnType> </ReturnValue> <Parameters> <Parameter Name="tagName" Type="System.String" /> <Parameter Name="attribs" Type="System.Collections.IDictionary" /> </Parameters> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Web.UI.WebControls.XmlBuilder.GetChildControlType(System.String,System.Collections.IDictionary)" /> method of the <see cref="T:System.Web.UI.WebControls.XmlBuilder" /> class overrides the <see cref="M:System.Web.UI.ControlBuilder.GetChildControlType(System.String,System.Collections.IDictionary)" /> method of the <see cref="T:System.Web.UI.ControlBuilder" /> class. This implementation of the <see cref="M:System.Web.UI.WebControls.XmlBuilder.GetChildControlType(System.String,System.Collections.IDictionary)" /> method always returns null.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Obtains the <see cref="T:System.Type" /> for the <see cref="T:System.Web.UI.WebControls.Xml" /> control's specified child control.</para> </summary> <returns> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Web.UI.ControlBuilder.GetChildControlType(System.String,System.Collections.IDictionary)" /> method is overridden to always return null.</para> </returns> <param name="tagName"> <attribution license="cc4" from="Microsoft" modified="false" />The tag name of the child control.</param> <param name="attribs"> <attribution license="cc4" from="Microsoft" modified="false" />An array of attributes contained in the child control.</param> </Docs> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="NeedsTagInnerText"> <MemberSignature Language="C#" Value="public override bool NeedsTagInnerText ();" /> <MemberType>Method</MemberType> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Parameters /> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Web.UI.WebControls.XmlBuilder.NeedsTagInnerText" /> method of the <see cref="T:System.Web.UI.WebControls.XmlBuilder" /> class overrides the <see cref="M:System.Web.UI.ControlBuilder.NeedsTagInnerText" /> method of the <see cref="T:System.Web.UI.ControlBuilder" /> class to always return true.</para> <para>The inner text is the text between the opening and closing tags of the control.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Determines whether the <see cref="T:System.Web.UI.WebControls.Xml" /> control needs to get its inner text.</para> </summary> <returns> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The <see cref="M:System.Web.UI.ControlBuilder.NeedsTagInnerText" /> method is overridden to always return true.</para> </returns> </Docs> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> <Member MemberName="SetTagInnerText"> <MemberSignature Language="C#" Value="public override void SetTagInnerText (string text);" /> <MemberType>Method</MemberType> <ReturnValue> <ReturnType>System.Void</ReturnType> </ReturnValue> <Parameters> <Parameter Name="text" Type="System.String" /> </Parameters> <Docs> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>This method loads the <see cref="T:System.String" /> passed in to an XML document to determine whether it is well-formed. If it is, the code calls the <see cref="M:System.Web.UI.ControlBuilder.SetTagInnerText(System.String)" /> method of the <see cref="T:System.Web.UI.ControlBuilder" /> class.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Sets the <see cref="T:System.Web.UI.WebControls.Xml" /> control's inner text. </para> </summary> <param name="text"> <attribution license="cc4" from="Microsoft" modified="false" />The value to insert as the inner text. </param> </Docs> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> </AssemblyInfo> </Member> </Members> </Type>
{ "pile_set_name": "Github" }
{- expireGititCache - (C) 2009 John MacFarlane, licensed under the GPL This program is designed to be used in post-update hooks and other scripts. Usage: expireGititCache base-url [file..] Example: expireGititCache http://localhost:5001 page1.page foo/bar.hs "Front Page.page" will produce POST requests to http://localhost:5001/_expire/page1, http://localhost:5001/_expire/foo/bar.hs, and http://localhost:5001/_expire/Front Page. Return statuses: 0 -> the cached page was successfully expired (or was not cached in the first place) 1 -> fewer than two arguments were supplied 3 -> did not receive a 200 OK response from the request 5 -> could not parse the uri -} module Main where import Network.HTTP import System.Environment import Network.URI import System.FilePath import Control.Monad import System.IO import System.Exit main :: IO () main = do args <- getArgs (uriString : files) <- if length args < 2 then usageMessage >> return [""] else return args uri <- case parseURI uriString of Just u -> return u Nothing -> do hPutStrLn stderr ("Could not parse URI " ++ uriString) exitWith (ExitFailure 5) forM_ files (expireFile uri) usageMessage :: IO () usageMessage = do hPutStrLn stderr $ "Usage: expireGititCache base-url [file..]\n" ++ "Example: expireGititCache http://localhost:5001 page1.page foo/bar.hs" exitWith (ExitFailure 1) expireFile :: URI -> FilePath -> IO () expireFile uri file = do let path' = if takeExtension file == ".page" then dropExtension file else file let uri' = uri{uriPath = "/_expire/" ++ urlEncode path'} resResp <- simpleHTTP Request{rqURI = uri', rqMethod = POST, rqHeaders = [], rqBody = ""} case resResp of Left connErr -> error $ show connErr Right (Response (2,0,0) _ _ _) -> return () _ -> do hPutStrLn stderr ("Request for " ++ show uri' ++ " did not return success status") exitWith (ExitFailure 3)
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <ruleset name="Squiz"> <description>The Squiz coding standard.</description> <!-- Include some specific sniffs --> <rule ref="Generic.CodeAnalysis.EmptyStatement"/> <rule ref="Generic.Commenting.Todo"/> <rule ref="Generic.Commenting.DocComment"/> <rule ref="Generic.ControlStructures.InlineControlStructure"/> <rule ref="Generic.Formatting.DisallowMultipleStatements"/> <rule ref="Generic.Formatting.SpaceAfterCast"/> <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/> <rule ref="Generic.NamingConventions.ConstructorName"/> <rule ref="Generic.NamingConventions.UpperCaseConstantName"/> <rule ref="Generic.PHP.DeprecatedFunctions"/> <rule ref="Generic.PHP.DisallowShortOpenTag"/> <rule ref="Generic.PHP.LowerCaseKeyword"/> <rule ref="Generic.PHP.LowerCaseConstant"/> <rule ref="Generic.Strings.UnnecessaryStringConcat"/> <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> <rule ref="Generic.WhiteSpace.ScopeIndent"/> <rule ref="PEAR.ControlStructures.MultiLineCondition"/> <rule ref="PEAR.Files.IncludingFile"/> <rule ref="PEAR.Formatting.MultiLineAssignment"/> <rule ref="PEAR.Functions.ValidDefaultValue"/> <rule ref="PSR2.Files.EndFileNewline"/> <rule ref="Zend.Files.ClosingTag"/> <rule ref="Zend.Debug.CodeAnalyzer"/> <!-- Lines can be 120 chars long, but never show errors --> <rule ref="Generic.Files.LineLength"> <properties> <property name="lineLimit" value="120"/> <property name="absoluteLineLimit" value="0"/> </properties> </rule> <!-- Use Unix newlines --> <rule ref="Generic.Files.LineEndings"> <properties> <property name="eolChar" value="\n"/> </properties> </rule> <!-- Have 20 chars padding maximum and always show as errors --> <rule ref="Generic.Formatting.MultipleStatementAlignment"> <properties> <property name="maxPadding" value="20"/> <property name="error" value="true"/> </properties> </rule> <!-- We allow empty catch statements --> <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"> <severity>0</severity> </rule> <!-- We don't want gsjlint throwing errors for things we already check --> <rule ref="Generic.Debug.ClosureLinter"> <properties> <property name="errorCodes" type="array" value="0210"/> <property name="ignoreCodes" type="array" value="0001,0110,0240"/> </properties> </rule> <rule ref="Generic.Debug.ClosureLinter.ExternalToolError"> <message>%2$s</message> </rule> <!-- Only one argument per line in multi-line function calls --> <rule ref="PEAR.Functions.FunctionCallSignature"> <properties> <property name="allowMultipleArguments" value="false"/> </properties> </rule> </ruleset>
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE----- MIIDdzCCAl+gAwIBAgIEYfmBLTANBgkqhkiG9w0BAQsFADBsMRAwDgYDVQQGEwdVbmtub3duMRAw DgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYDVQQKEwdVbmtub3duMRAwDgYD VQQLEwdVbmtub3duMRAwDgYDVQQDEwdVbmtub3duMB4XDTE1MTIyMjA3MzEwOFoXDTE1MTIyOTA3 MzEwOFowbDEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5r bm93bjEQMA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEQMA4GA1UEAxMHVW5rbm93 bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKiYXkIpQFrLITiNWCTPkJbtftbPyZRE DaUbLFeUuPNhNKo2p8dARA7Dg9wpcJLc81XFjpPFgWygVTMWuR1ghHe798Zp+mMtBAH5vB0rufBo U7ixxQB+W7QzVpwPppJZiH54sNopkpQlfQGRSV9937A6VAESSfUMC+BrWRMbT+zTd+L6i8QNJeWg zMiBiGemLcXKh2+qBnKpmhw5YxxndUcQddnRj/VdzBgErzkYuV+zYmDEcTQ8JYGZwF2VMov4LCfe HDwUXrEpGtNa3/F42libsRYVq4ibGgmw4fsyrTqz4cLZs9qPGp7DOA6hY0vS6nXJ/x69JuXlad8n Q3NATckCAwEAAaMhMB8wHQYDVR0OBBYEFHyF8cbeRLytK4monQN/CsC4ZwiFMA0GCSqGSIb3DQEB CwUAA4IBAQAf0stu0pa3VHgOAo34CS9K2Vi4UcAXt1Aw0Pezg5W1R/hII75uHLtve5RNgmpIfDjJ a0XdeXOcbCMEXXp37iLeh1DYEcLukXVjqUet8GXFkmxvNK/S/HYLBv9d/YWVFs3wxWau+Q9Fz9fG 9F+NWsmIYCqH3XCpp41G4qMSel6pbkm3nwP4TiJI5y+9P4tM7iW8dRO1imMW0yXJUlibfsR/wWH9 gP66e8vr6L8QEvheExfmH7AFyhR5QfJSzKg9WurOEswMcCmtIrdGV8gIMvszMDkun+ew2T2qUTDz VgYGiLG58PrQOgAeWth3qfST7rVDGxZVWJrtm7SbMZAfAKbB -----END CERTIFICATE-----
{ "pile_set_name": "Github" }
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -resource-pressure=false -timeline < %s | FileCheck %s imul %rax, %rbx lzcnt %ax, %bx add %ecx, %ebx # CHECK: Iterations: 1 # CHECK-NEXT: Instructions: 3 # CHECK-NEXT: Total Cycles: 9 # CHECK-NEXT: Total uOps: 4 # CHECK: Dispatch Width: 4 # CHECK-NEXT: uOps Per Cycle: 0.44 # CHECK-NEXT: IPC: 0.33 # CHECK-NEXT: Block RThroughput: 1.0 # CHECK: Instruction Info: # CHECK-NEXT: [1]: #uOps # CHECK-NEXT: [2]: Latency # CHECK-NEXT: [3]: RThroughput # CHECK-NEXT: [4]: MayLoad # CHECK-NEXT: [5]: MayStore # CHECK-NEXT: [6]: HasSideEffects (U) # CHECK: [1] [2] [3] [4] [5] [6] Instructions: # CHECK-NEXT: 2 4 1.00 imulq %rax, %rbx # CHECK-NEXT: 1 2 0.25 lzcntw %ax, %bx # CHECK-NEXT: 1 1 0.25 addl %ecx, %ebx # CHECK: Timeline view: # CHECK-NEXT: Index 012345678 # CHECK: [0,0] DeeeeER . imulq %rax, %rbx # CHECK-NEXT: [0,1] D===eeER. lzcntw %ax, %bx # CHECK-NEXT: [0,2] D=====eER addl %ecx, %ebx # CHECK: Average Wait times (based on the timeline view): # CHECK-NEXT: [0]: Executions # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage # CHECK: [0] [1] [2] [3] # CHECK-NEXT: 0. 1 1.0 1.0 0.0 imulq %rax, %rbx # CHECK-NEXT: 1. 1 4.0 0.0 0.0 lzcntw %ax, %bx # CHECK-NEXT: 2. 1 6.0 0.0 0.0 addl %ecx, %ebx # CHECK-NEXT: 1 3.7 0.3 0.0 <total>
{ "pile_set_name": "Github" }
#include "../Eigen/Core" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define CV_QUALIFIER const #else #define CV_QUALIFIER #endif using namespace Eigen; void foo(CV_QUALIFIER Matrix3d &m){ Transpose<Matrix3d> t(m); } int main() {}
{ "pile_set_name": "Github" }
// Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef FORCE_INSTANTIATE_DWA200265_HPP # define FORCE_INSTANTIATE_DWA200265_HPP namespace boost { namespace python { namespace detail { // Allows us to force the argument to be instantiated without // incurring unused variable warnings template <class T> inline void force_instantiate(T const&) {} }}} // namespace boost::python::detail #endif // FORCE_INSTANTIATE_DWA200265_HPP
{ "pile_set_name": "Github" }
TOP = ../.. SWIG = $(TOP)/../preinst-swig SRCS = example.c AS_SRCS = runme.as ExampleModule.as TARGET = example INTERFACE = example.i LLVM_BCS = example example_wrap all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' AS_SRCS='$(AS_SRCS)' \ SWIG='$(SWIG)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ LLVM_BCS='$(LLVM_BCS)' as3 clean:: $(MAKE) -f $(TOP)/Makefile as3_clean rm -f $(TARGET).py check: all ./$(TARGET)
{ "pile_set_name": "Github" }
{{ define "title" }}Reflected XSS in POST processing (post.1){{end}} <!doctype html><html><head><title>{{ template "title" }}</title></head><body> <H2>Post Full Javascript injection test</H2> <p> <FORM method="POST" action="post1"> <INPUT type="text" id="in" name="in" size="40" value="{{.In}}"> <INPUT type="Submit" value="Search!"> </FORM> </body></html>
{ "pile_set_name": "Github" }
import * as glob from "glob"; export function globProxyFactory( params: { cwdAndRoot: string; } ) { const { cwdAndRoot } = params; function globProxy( params: { pathWithWildcard: string } ): Promise<string[]> { const { pathWithWildcard } = params; return new Promise<string[]>( (resolve, reject) => glob( pathWithWildcard, { "cwd": cwdAndRoot, "root": cwdAndRoot, "dot": true }, (er, files) => { if (!!er) { reject(er); return; } resolve(files); } ) ); } return { globProxy }; }
{ "pile_set_name": "Github" }
import { search } from '../apis'; let jsonData = []; export const MAX_DATA = 100000; const defaultQuery = { query: { match_all: {}, }, }; /** * A function to convert multilevel object to single level object and use key value pairs as Column and row pairs using recursion */ export const flatten = data => { const result = {}; function recurse(cur, prop = '') { if (Object(cur) !== cur) { result[prop] = cur; } else if (Array.isArray(cur)) { result[prop] = JSON.stringify(cur); } else { let isEmpty = true; Object.keys(cur).forEach(p => { isEmpty = false; recurse(cur[p], prop ? `${prop}.${p}` : p); }); if (isEmpty && prop) { result[prop] = {}; } } } recurse(data); return result; }; export const searchAfter = async ( app, types, url, version, query, chunkInfo, searchAfterData, ) => { try { const others = {}; if (searchAfterData) { others.search_after = [searchAfterData]; } const sortKey = version > 5 ? '_id' : '_uid'; const data = await search(app, types, url, { ...query, size: 1000, sort: [ { [sortKey]: 'desc', }, ], ...others, }); // eslint-disable-next-line const res = await getSearchAfterData( app, types, url, version, query, chunkInfo, searchAfterData, data, ); if (typeof res === 'string') { let exportData = JSON.parse(res); const lastObject = exportData[exportData.length - 1]; exportData = exportData.map(value => { const item = Object.assign(value._source); return item; }); return { data: exportData, searchAfter: version > 5 ? lastObject._id : `${lastObject._type}#${lastObject._id}`, }; } return res; } catch (e) { console.error('SEARCH ERROR', e); return e; } }; const getSearchAfterData = async ( app, types, url, version, query, chunkInfo, searchAfterData, data, ) => { const { hits } = data; let str = null; /** * Checking if the current length is less than chunk total, recursive call searchAfter */ if (hits && jsonData.length < chunkInfo.total) { const { hits: totalhits, total } = hits; jsonData = jsonData.concat(totalhits); const lastObject = totalhits[totalhits.length - 1]; const nextSearchData = version > 5 ? lastObject._id : `${lastObject._type}#${lastObject._id}`; return searchAfter( app, types, url, version, query, chunkInfo, totalhits.length === total ? '' : nextSearchData, ); } str = JSON.stringify(jsonData, null, 4); jsonData = []; return str; }; /** * Main function for getting data to be exported; * @param {*} app * @param {*} types * @param {*} url * @param {*} query * @param {*} searchAfter */ const exportData = async ( app, types, url, version, query, chunkInfo, searchAfterData, ) => { try { const finalQuery = query || defaultQuery; const res = await searchAfter( app, types, url, version, finalQuery, chunkInfo, searchAfterData, ); return res; } catch (e) { return e; } }; export default exportData;
{ "pile_set_name": "Github" }
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing se(t: () as a var b let a { class A { { } let a { let f = c { func a { extension NSData { class B { } struct A { struct A : a { enum B { class case c, var b let v
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- generated on 11/28/17 13:50:43 by SUMO Version dev-SVN-r26691 This data file and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html SPDX-License-Identifier: EPL-2.0 <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> <input> <net-file value="input_net.net.xml"/> <route-files value="ambiguous_restrict_od\flows.tools"/> <additional-files value="ambiguous_restrict_od\routes.tools,add.xml"/> </input> </configuration> --> <meandata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/meandata_file.xsd"> <interval begin="0.00" end="3627.00" id="all"> <edge id="1" sampledSeconds="378.21" traveltime="3.69" overlapTraveltime="3.87" density="1.04" occupancy="0.13" waitingTime="0.00" speed="27.12" departed="2000" arrived="0" entered="0" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="2" sampledSeconds="7203.10" traveltime="3.41" overlapTraveltime="3.60" density="21.58" occupancy="5.12" waitingTime="0.00" speed="26.94" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="3" sampledSeconds="12357.64" traveltime="4.72" overlapTraveltime="4.94" density="31.69" occupancy="5.04" waitingTime="0.00" speed="22.76" departed="0" arrived="0" entered="2500" left="2500" laneChangedFrom="461" laneChangedTo="461"/> <edge id="4" sampledSeconds="7204.49" traveltime="3.42" overlapTraveltime="3.60" density="21.60" occupancy="5.12" waitingTime="0.00" speed="26.91" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="5" sampledSeconds="7751.95" traveltime="3.69" overlapTraveltime="3.88" density="21.36" occupancy="5.09" waitingTime="0.00" speed="27.11" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="6" sampledSeconds="7156.77" traveltime="3.39" overlapTraveltime="3.58" density="21.44" occupancy="5.08" waitingTime="0.00" speed="27.11" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="7" sampledSeconds="8300.18" traveltime="3.97" overlapTraveltime="4.15" density="21.29" occupancy="3.39" waitingTime="0.00" speed="27.11" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="8" sampledSeconds="7156.79" traveltime="3.39" overlapTraveltime="3.58" density="21.44" occupancy="5.08" waitingTime="0.00" speed="27.11" departed="0" arrived="0" entered="2000" left="2000" laneChangedFrom="0" laneChangedTo="0"/> <edge id="9" sampledSeconds="7728.42" traveltime="3.69" overlapTraveltime="3.87" density="21.31" occupancy="5.08" waitingTime="0.00" speed="27.11" departed="0" arrived="2000" entered="2000" left="0" laneChangedFrom="0" laneChangedTo="0"/> <edge id="off3" sampledSeconds="5016.41" traveltime="9.77" overlapTraveltime="10.15" density="10.70" occupancy="5.19" waitingTime="0.00" speed="13.23" departed="0" arrived="500" entered="500" left="0" laneChangedFrom="0" laneChangedTo="0"/> <edge id="off7" sampledSeconds="0.00" departed="0" arrived="0" entered="0" left="0" laneChangedFrom="0" laneChangedTo="0"/> <edge id="on3" sampledSeconds="208.03" traveltime="9.73" overlapTraveltime="10.12" density="0.44" occupancy="0.12" waitingTime="0.00" speed="13.27" departed="500" arrived="0" entered="0" left="500" laneChangedFrom="0" laneChangedTo="0"/> <edge id="on7" sampledSeconds="0.00" departed="0" arrived="0" entered="0" left="0" laneChangedFrom="0" laneChangedTo="0"/> </interval> </meandata>
{ "pile_set_name": "Github" }
{ "name": "responsive-email", "description": "A table-based (but responsive) email template.", "version": "1.0.3", "keywords": [ "email", "template", "responsive", "html", "css" ], "author": { "name": "Phil Wareham", "url": "https://twitter.com/philwareham" }, "repository": { "type": "git", "url": "https://github.com/philwareham/responsive-email.git" }, "bugs": { "url": "https://github.com/philwareham/responsive-email/issues" }, "license": "MIT" }
{ "pile_set_name": "Github" }
project_path: /web/tools/chrome-devtools/_project.yaml book_path: /web/tools/chrome-devtools/_book.yaml description: Learn how to log messages to the Console. {# wf_updated_on: 2020-07-10 #} {# wf_published_on: 2019-04-19 #} {# wf_blink_components: Platform>DevTools #} [expand]: /web/tools/chrome-devtools/images/shared/expand.png # Get Started With Logging Messages In The Console {: .page-title } {% include "web/_shared/contributors/kaycebasques.html" %} This interactive tutorial shows you how to log and filter messages in the [Chrome DevTools](/web/tools/chrome-devtools/) Console. <figure> <img src="/web/tools/chrome-devtools/console/images/logexample.png" alt="Messages in the Console."> <figcaption> <b>Figure 1</b>. Messages in the Console. </figcaption> </figure> This tutorial is intended to be completed in order. It assumes that you understand the fundamentals of web development, such as how to use JavaScript to add interactivity to a page. ## Set up the demo and DevTools {: #setup } This tutorial is designed so that you can open up the demo and try all the workflows yourself. When you physically follow along, you're more likely to remember the workflows later. 1. Open the [demo](https://devtools.glitch.me/console/log.html){: class="external" target="_blank" rel="noopener" }. 1. Optional: Move the demo to a separate window. <figure> <img src="/web/tools/chrome-devtools/console/images/logsetup1.png" alt="This tutorial on the left, and the demo on the right."> <figcaption> <b>Figure 2</b>. This tutorial on the left, and the demo on the right. </figcaption> </figure> 1. Focus the demo and then press <kbd>Control</kbd>+<kbd>Shift</kbd>+<kdb>J</kbd> or <kbd>Command</kbd>+<kbd>Option</kbd>+<kdb>J</kbd> (Mac) to open DevTools. By default DevTools opens to the right of the demo. <figure> <img src="/web/tools/chrome-devtools/console/images/logsetup2.png" alt="DevTools opens to the right of the demo."> <figcaption> <b>Figure 3</b>. DevTools opens to the right of the demo. </figcaption> </figure> [placement]: /web/tools/chrome-devtools/ui#placement 1. Optional: [Dock DevTools to the bottom of the window or undock it into a separate window][placement]. <figure> <img src="/web/tools/chrome-devtools/console/images/logsetup3.png" alt="DevTools docked to the bottom of the demo."> <figcaption> <b>Figure 4</b>. DevTools docked to the bottom of the demo. </figcaption> </figure> <figure> <img src="/web/tools/chrome-devtools/console/images/logsetup4.png" alt="DevTools undocked in a separate window."> <figcaption> <b>Figure 5</b>. DevTools undocked in a separate window. </figcaption> </figure> ## View messages logged from JavaScript {: #javascript } Most messages that you see in the Console come from the web developers who wrote the page's JavaScript. The goal of this section is to introduce you to the different message types that you're likely to see in the Console, and explain how you can log each message type yourself from your own JavaScript. 1. Click the **Log Info** button in the demo. `Hello, Console!` gets logged to the Console. <figure> <img src="/web/tools/chrome-devtools/console/images/loginfo.png" alt="The Console after clicking Log Info."> <figcaption> <b>Figure 6</b>. The Console after clicking <b>Log Info</b>. </figcaption> </figure> 1. Next to the `Hello, Console!` message in the Console click **log.js:2**. The Sources panel opens and highlights the line of code that caused the message to get logged to the Console. The message was logged when the page's JavaScript called `console.log('Hello, Console!')`. <figure> <img src="/web/tools/chrome-devtools/console/images/viewlogsource.png" alt="DevTools opens the Sources panel after you click log.js:2."> <figcaption> <b>Figure 7</b>. DevTools opens the Sources panel after you click <b>log.js:2</b>. </figcaption> </figure> 1. Navigate back to the Console using any of the following workflows: * Click the **Console** tab. * Press <kbd>Control</kbd>+<kbd>[</kbd> or <kbd>Command</kbd>+<kbd>[</kbd> (Mac) until the Console panel is in focus. * [Open the Command Menu](/web/tools/chrome-devtools/command-menu), start typing `Console`, select the **Show Console Panel** command, and then press <kbd>Enter</kbd>. 1. Click the **Log Warning** button in the demo. `Abandon Hope All Ye Who Enter` gets logged to the Console. Messages formatted like this are warnings. <figure> <img src="/web/tools/chrome-devtools/console/images/logwarning.png" alt="The Console after clicking Log Warning."> <figcaption> <b>Figure 8</b>. The Console after clicking <b>Log Warning</b>. </figcaption> </figure> 1. Optional: Click **log.js:12** to view the code that caused the message to get formatted like this, and then navigate back to Console when you're finished. Do this whenever you want to see the code that caused a message to get logged a certain way. [trace]: https://en.wikipedia.org/wiki/Stack_trace 1. Click the **Expand** ![Expand][expand]{: .inline-icon } icon in front of `Abandon Hope All Ye Who Enter`. DevTools shows the [stack trace][trace]{: .external } leading up to the call. <figure> <img src="/web/tools/chrome-devtools/console/images/stacktrace.png" alt="A stack trace."> <figcaption> <b>Figure 9</b>. A stack trace. </figcaption> </figure> The stack trace is telling you that a function named `logWarning` was called, which in turn called a function named `quoteDante`. In other words, the call that happened first is at the bottom of the stack trace. You can log stack traces at any time by calling `console.trace()`. 1. Click **Log Error**. The following error message gets logged: `I'm sorry, Dave. I'm afraid I can't do that.` <figure> <img src="/web/tools/chrome-devtools/console/images/logerror.png" alt="An error message."> <figcaption> <b>Figure 10</b>. An error message. </figcaption> </figure> 1. Click **Log Table**. A table about famous artists gets logged to the Console. Note how the `birthday` column is only populated for one row. Check the code to figure out why that is. <figure> <img src="/web/tools/chrome-devtools/console/images/logtable.png" alt="A table in the Console."> <figcaption> <b>Figure 11</b>. A table in the Console. </figcaption> </figure> 1. Click **Log Group**. The names of 4 famous, crime-fighting turtles are grouped under the `Adolescent Irradiated Espionage Tortoises` label. <figure> <img src="/web/tools/chrome-devtools/console/images/loggroup.png" alt="A group of messages in the Console."> <figcaption> <b>Figure 12</b>. A group of messages in the Console. </figcaption> </figure> 1. Click **Log Custom**. A message with a red border and blue background gets logged to the Console. <figure> <img src="/web/tools/chrome-devtools/console/images/logcustom.png" alt="A message with custom formatting in the Console."> <figcaption> <b>Figure 13</b>. A message with custom formatting in the Console. </figcaption> </figure> The main idea here is that when you want to log messages to the Console from your JavaScript, you use one of the `console` methods. Each method formats messages differently. There are even more methods than what has been demonstrated in this section. At the end of the tutorial you'll learn how to explore the rest of the methods. ## View messages logged by the browser {: #browser } The browser logs messages to the Console, too. This usually happens when there's a problem with the page. 1. Click **Cause 404**. The browser logs a `404` network error because the page's JavaScript tried to fetch a file that doesn't exist. <figure> <img src="/web/tools/chrome-devtools/console/images/log404.png" alt="A 404 error in the Console."> <figcaption> <b>Figure 14</b>. A 404 error in the Console. </figcaption> </figure> 1. Click **Cause Error**. The browser logs an uncaught `TypeError` because the JavaScript is trying to update a DOM node that doesn't exist. <figure> <img src="/web/tools/chrome-devtools/console/images/logtypeerror.png" alt="A TypeError in the Console."> <figcaption> <b>Figure 15</b>. A TypeError in the Console. </figcaption> </figure> 1. Click the **Log Levels** dropdown and enable the **Verbose** option if it's disabled. You'll learn more about filtering in the next section. You need to do this to make sure that the next message you log is visible. **Note:** If the Default Levels dropdown is disabled, you may need to close the Console Sidebar. Filter by Message Source below for more information about the Console Sidebar. <figure> <img src="/web/tools/chrome-devtools/console/images/enablingverbose.png" alt="Enabling the Verbose log level."> <figcaption> <b>Figure 16</b>. Enabling the <b>Verbose</b> log level. </figcaption> </figure> 1. Click **Cause Violation**. The page becomes unresponsive for a few seconds and then the browser logs the message `[Violation] 'click' handler took 3000ms` to the Console. The exact duration may vary. <figure> <img src="/web/tools/chrome-devtools/console/images/logviolation.png" alt="A violation in the Console."> <figcaption> <b>Figure 17</b>. A violation in the Console. </figcaption> </figure> ## Filter messages {: #filter } On some pages you'll see the Console get flooded with messages. DevTools provides many different ways to filter out messages that aren't relevant to the task at hand. ### Filter by log level {: #level } Each `console` method is assigned a severity level: `Verbose`, `Info`, `Warning`, or `Error`. For example, `console.log()` is an `Info`-level message, whereas `console.error()` is an `Error`-level message. 1. Click the **Log Levels** dropdown and disable **Errors**. A level is disabled when there is no longer a checkmark next to it. The `Error`-level messages disappear. <figure> <img src="/web/tools/chrome-devtools/console/images/disablingerrors.png" alt="Disabling Error-level messages in the Console."> <figcaption> <b>Figure 18</b>. Disabling <code>Error</code>-level messages in the Console. </figcaption> </figure> 1. Click the **Log Levels** dropdown again and re-enable **Errors**. The `Error`-level messages reappear. ### Filter by text {: #text } When you want to only view messages that include an exact string, type that string into the **Filter** text box. 1. Type `Dave` into the **Filter** text box. All messages that do not include the string `Dave` are hidden. You might also see the `Adolescent Irradiated Espionage Tortoises` label. That's a bug. <figure> <img src="/web/tools/chrome-devtools/console/images/textfiltering.png" alt="Filtering out any message that does not include `Dave`."> <figcaption> <b>Figure 19</b>. Filtering out any message that does not include <code>Dave</code>. </figcaption> </figure> 1. Delete `Dave` from the **Filter** text box. All the messages reappear. ### Filter by regular expression {: #regex } [regex]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions When you want to show all messages that include a pattern of text, rather than a specific string, use a [regular expression][regex]{: .external }. 1. Type `/^[AH]/` into the **Filter** text box. Type this pattern into [RegExr](https://regexr.com) for an explanation of what it's doing. <figure> <img src="/web/tools/chrome-devtools/console/images/regexfiltering.png" alt="Filtering out any message that does not match the pattern `/^[AH]/`."> <figcaption> <b>Figure 20</b>. Filtering out any message that does not match the pattern <code>/^[AH]/</code>. </figcaption> </figure> 1. Delete `/^[AH]/` from the **Filter** text box. All messages are visible again. ### Filter by message source {: #source } When you want to only view the messages that came from a certain URL, use the **Sidebar**. [sidebar]: /web/tools/chrome-devtools/images/shared/show-console-sidebar.png 1. Click **Show Console Sidebar** ![Show Console Sidebar][sidebar]{: .inline-icon }. <figure> <img src="/web/tools/chrome-devtools/console/images/sidebaropened.png" alt="The Sidebar."> <figcaption> <b>Figure 21</b>. The Sidebar. </figcaption> </figure> 1. Click the **Expand** ![Expand][expand]{: .inline-icon } icon next to **12 Messages**. The **Sidebar** shows a list of URLs that caused messages to be logged. For example, `log.js` caused 11 messages. <figure> <img src="/web/tools/chrome-devtools/console/images/sidebarsources.png" alt="Viewing the source of messages in the Sidebar."> <figcaption> <b>Figure 22</b>. Viewing the source of messages in the Sidebar. </figcaption> </figure> ### Filter by user messages {: #user } Earlier, when you clicked **Log Info**, a script called `console.log('Hello, Console!')` in order to log the message to the Console. Messages logged from JavaScript like this are called *user messages*. In contrast, when you clicked **Cause 404**, the browser logged an `Error`-level message stating that the requested resource could not be found. Messages like that are considered *browser messages*. You can use the **Sidebar** to filter out browser messages and only show user messages. 1. Click **9 User Messages**. The browser messages are hidden. <figure> <img src="/web/tools/chrome-devtools/console/images/filteringbrowsermessages.png" alt="Filtering out browser messages."> <figcaption> <b>Figure 23</b>. Filtering out browser messages. </figcaption> </figure> 1. Click **12 Messages** to show all messages again. ## Use the Console alongside any other panel {: #drawer } What if you're editing styles, but you need to quickly check the Console log for something? Use the Drawer. 1. Click the **Elements** tab. 1. Press <kbd>Escape</kbd>. The Console tab of the **Drawer** opens. It has all of the features of the Console panel that you've been using throughout this tutorial. <figure> <img src="/web/tools/chrome-devtools/console/images/showingdrawer.png" alt="The Console tab in the Drawer."> <figcaption> <b>Figure 24</b>. The Console tab in the Drawer. </figcaption> </figure> ## Next steps {: #next } Congratulations, you have completed the tutorial. Click **Dispense Trophy** to receive your trophy. {% framebox width="auto" height="auto" enable_widgets="true" %} <style> .note::before { content: ""; } </style> <script> var label = '/web/tools/chrome-devtools/console/log'; var feedback = { "category": "Completion", "choices": [ { "button": { "text": "Dispense Trophy" }, "response": "🏆", "analytics": { "label": label } } ] }; </script> {% include "web/_shared/multichoice.html" %} {% endframebox %} * See [Console Reference](/web/tools/chrome-devtools/console/reference) to explore more features and workflows related to the Console UI. * See [Console API Reference](/web/tools/chrome-devtools/console/api) to learn more about all of the `console` methods that were demonstrated in [View messages logged from JavaScript](#javascript) and explore the other `console` methods that weren't covered in this tutorial. * See [Get Started](/web/tools/chrome-devtools/#start) to explore what else you can do with DevTools. ## Feedback {: #feedback } {% include "web/_shared/helpful.html" %}
{ "pile_set_name": "Github" }
/* * Copyright (c) 1999, 2006, 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 javax.management; import java.util.Vector; /** * This class implements of the {@link javax.management.NotificationFilter NotificationFilter} * interface for the {@link javax.management.AttributeChangeNotification attribute change notification}. * The filtering is performed on the name of the observed attribute. * <P> * It manages a list of enabled attribute names. * A method allows users to enable/disable as many attribute names as required. * * @since 1.5 */ public class AttributeChangeNotificationFilter implements NotificationFilter { /* Serial version */ private static final long serialVersionUID = -6347317584796410029L; /** * @serial {@link Vector} that contains the enabled attribute names. * The default value is an empty vector. */ private Vector<String> enabledAttributes = new Vector<String>(); /** * Invoked before sending the specified notification to the listener. * <BR>This filter compares the attribute name of the specified attribute change notification * with each enabled attribute name. * If the attribute name equals one of the enabled attribute names, * the notification must be sent to the listener and this method returns <CODE>true</CODE>. * * @param notification The attribute change notification to be sent. * @return <CODE>true</CODE> if the notification has to be sent to the listener, <CODE>false</CODE> otherwise. */ public synchronized boolean isNotificationEnabled(Notification notification) { String type = notification.getType(); if ((type == null) || (type.equals(AttributeChangeNotification.ATTRIBUTE_CHANGE) == false) || (!(notification instanceof AttributeChangeNotification))) { return false; } String attributeName = ((AttributeChangeNotification)notification).getAttributeName(); return enabledAttributes.contains(attributeName); } /** * Enables all the attribute change notifications the attribute name of which equals * the specified name to be sent to the listener. * <BR>If the specified name is already in the list of enabled attribute names, * this method has no effect. * * @param name The attribute name. * @exception java.lang.IllegalArgumentException The attribute name parameter is null. */ public synchronized void enableAttribute(String name) throws java.lang.IllegalArgumentException { if (name == null) { throw new java.lang.IllegalArgumentException("The name cannot be null."); } if (!enabledAttributes.contains(name)) { enabledAttributes.addElement(name); } } /** * Disables all the attribute change notifications the attribute name of which equals * the specified attribute name to be sent to the listener. * <BR>If the specified name is not in the list of enabled attribute names, * this method has no effect. * * @param name The attribute name. */ public synchronized void disableAttribute(String name) { enabledAttributes.removeElement(name); } /** * Disables all the attribute names. */ public synchronized void disableAllAttributes() { enabledAttributes.removeAllElements(); } /** * Gets all the enabled attribute names for this filter. * * @return The list containing all the enabled attribute names. */ public synchronized Vector<String> getEnabledAttributes() { return enabledAttributes; } }
{ "pile_set_name": "Github" }
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectGuid>{901BDCD7-6F86-4C0E-98C9-DB2281620CAE}</ProjectGuid> <ProjectVersion>12.0</ProjectVersion> <MainSource>contacts.dpr</MainSource> <Config Condition="'$(Config)'==''">Debug</Config> <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> <Cfg_1>true</Cfg_1> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''"> <Cfg_2>true</Cfg_2> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Base)'!=''"> <DCC_DependencyCheckOutputName>contacts.exe</DCC_DependencyCheckOutputName> <DCC_ImageBase>00400000</DCC_ImageBase> <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias> <DCC_Platform>x86</DCC_Platform> <DCC_E>false</DCC_E> <DCC_N>false</DCC_N> <DCC_S>false</DCC_S> <DCC_F>false</DCC_F> <DCC_K>false</DCC_K> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_1)'!=''"> <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> <DCC_DebugInformation>false</DCC_DebugInformation> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_2)'!=''"> <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> </PropertyGroup> <ItemGroup> <DelphiCompile Include="contacts.dpr"> <MainSource>MainSource</MainSource> </DelphiCompile> <DCCReference Include="main.pas"> <Form>Form3</Form> </DCCReference> <DCCReference Include="Profile.pas"> <Form>ProfileForm</Form> </DCCReference> <DCCReference Include="..\..\source\GoogleLogin.pas"/> <DCCReference Include="..\..\source\GContacts.pas"/> <DCCReference Include="..\..\source\GHelper.pas"/> <DCCReference Include="..\..\addons\nativexml\NativeXml.pas"/> <DCCReference Include="..\..\source\GDataCommon.pas"/> <DCCReference Include="..\..\source\uLanguage.pas"/> <DCCReference Include="uLog.pas"> <Form>fLog</Form> </DCCReference> <DCCReference Include="uQueryForm.pas"> <Form>fQuery</Form> </DCCReference> <DCCReference Include="uUpdate.pas"> <Form>fUpdateContact</Form> </DCCReference> <DCCReference Include="NewContact.pas"> <Form>fNewContact</Form> </DCCReference> <DCCReference Include="..\..\source\GConsts.pas"/> <None Include="ModelSupport_contacts\default.txaPackage"/> <None Include="ModelSupport_contacts\default.txvpck"/> <None Include="ModelSupport_contacts\NativeXml\default.txvpck"/> <None Include="ModelSupport_contacts\contacts\default.txvpck"/> <None Include="ModelSupport_contacts\Common\default.txvpck"/> <None Include="ModelSupport_contacts\GContacts\default.txvpck"/> <None Include="ModelSupport_contacts\GoogleLogin\default.txvpck"/> <None Include="ModelSupport_contacts\GHelper\default.txvpck"/> <None Include="ModelSupport_contacts\Profile\default.txvpck"/> <None Include="ModelSupport_contacts\GDataCommon\default.txvpck"/> <None Include="ModelSupport_contacts\main\default.txvpck"/> <None Include="ModelSupport_contacts\GData\default.txvpck"/> <None Include="ModelSupport_contacts\GDataCommon\default.txaPackage"/> <None Include="ModelSupport_contacts\GConsts\default.txvpck"/> <None Include="ModelSupport_contacts\GConsts\default.txaPackage"/> <BuildConfiguration Include="Base"> <Key>Base</Key> </BuildConfiguration> <BuildConfiguration Include="Debug"> <Key>Cfg_2</Key> <CfgParent>Base</CfgParent> </BuildConfiguration> <BuildConfiguration Include="Release"> <Key>Cfg_1</Key> <CfgParent>Base</CfgParent> </BuildConfiguration> </ItemGroup> <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> <ProjectExtensions> <Borland.Personality>Delphi.Personality.12</Borland.Personality> <Borland.ProjectType/> <BorlandProject> <Delphi.Personality> <Source> <Source Name="MainSource">contacts.dpr</Source> </Source> <Parameters> <Parameters Name="UseLauncher">False</Parameters> <Parameters Name="LoadAllSymbols">True</Parameters> <Parameters Name="LoadUnspecifiedSymbols">False</Parameters> </Parameters> <VersionInfo> <VersionInfo Name="IncludeVerInfo">False</VersionInfo> <VersionInfo Name="AutoIncBuild">False</VersionInfo> <VersionInfo Name="MajorVer">1</VersionInfo> <VersionInfo Name="MinorVer">0</VersionInfo> <VersionInfo Name="Release">0</VersionInfo> <VersionInfo Name="Build">0</VersionInfo> <VersionInfo Name="Debug">False</VersionInfo> <VersionInfo Name="PreRelease">False</VersionInfo> <VersionInfo Name="Special">False</VersionInfo> <VersionInfo Name="Private">False</VersionInfo> <VersionInfo Name="DLL">False</VersionInfo> <VersionInfo Name="Locale">1049</VersionInfo> <VersionInfo Name="CodePage">1251</VersionInfo> </VersionInfo> <VersionInfoKeys> <VersionInfoKeys Name="CompanyName"/> <VersionInfoKeys Name="FileDescription"/> <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> <VersionInfoKeys Name="InternalName"/> <VersionInfoKeys Name="LegalCopyright"/> <VersionInfoKeys Name="LegalTrademarks"/> <VersionInfoKeys Name="OriginalFilename"/> <VersionInfoKeys Name="ProductName"/> <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> <VersionInfoKeys Name="Comments"/> </VersionInfoKeys> </Delphi.Personality> <ModelSupport>True</ModelSupport> </BorlandProject> <ProjectFileVersion>12</ProjectFileVersion> </ProjectExtensions> </Project>
{ "pile_set_name": "Github" }
; Copyright (c) Rich Hickey. All rights reserved. ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this license. ; You must not remove this notice, or any other, from this software. ;functional hierarchical zipper, with navigation, editing and enumeration ;see Huet (ns clojure.zip (:refer-clojure :exclude (replace remove next))) (defn zipper "Creates a new zipper structure. branch? is a fn that, given a node, returns true if can have children, even if it currently doesn't. children is a fn that, given a branch node, returns a seq of its children. make-node is a fn that, given an existing node and a seq of children, returns a new branch node with the supplied children. root is the root node." [branch? children make-node root] #^{:zip/branch? branch? :zip/children children :zip/make-node make-node} [root nil]) (defn seq-zip "Returns a zipper for nested sequences, given a root sequence" [root] (zipper seq? identity (fn [node children] children) root)) (defn vector-zip "Returns a zipper for nested vectors, given a root vector" [root] (zipper vector? seq (fn [node children] (apply vector children)) root)) (defn xml-zip "Returns a zipper for xml elements (as from xml/parse), given a root element" [root] (zipper (complement string?) (comp seq :content) (fn [node children] (assoc node :content (and children (apply vector children)))) root)) (defn node "Returns the node at loc" [loc] (loc 0)) (defn branch? "Returns true if the node at loc is a branch" [loc] ((:zip/branch? ^loc) (node loc))) (defn children "Returns a seq of the children of node at loc, which must be a branch" [loc] ((:zip/children ^loc) (node loc))) (defn make-node "Returns a new branch node, given an existing node and new children. The loc is only used to supply the constructor." [loc node children] ((:zip/make-node ^loc) node children)) (defn path "Returns a seq of nodes leading to this loc" [loc] (:pnodes (loc 1))) (defn lefts "Returns a seq of the left siblings of this loc" [loc] (seq (:l (loc 1)))) (defn rights "Returns a seq of the right siblings of this loc" [loc] (:r (loc 1))) (defn down "Returns the loc of the leftmost child of the node at this loc, or nil if no children" [loc] (let [[node path] loc [c & cnext :as cs] (children loc)] (when cs (with-meta [c {:l [] :pnodes (if path (conj (:pnodes path) node) [node]) :ppath path :r cnext}] ^loc)))) (defn up "Returns the loc of the parent of the node at this loc, or nil if at the top" [loc] (let [[node {l :l, ppath :ppath, pnodes :pnodes r :r, changed? :changed?, :as path}] loc] (when pnodes (let [pnode (peek pnodes)] (with-meta (if changed? [(make-node loc pnode (concat l (cons node r))) (and ppath (assoc ppath :changed? true))] [pnode ppath]) ^loc))))) (defn root "zips all the way up and returns the root node, reflecting any changes." [loc] (if (= :end (loc 1)) (node loc) (let [p (up loc)] (if p (recur p) (node loc))))) (defn right "Returns the loc of the right sibling of the node at this loc, or nil" [loc] (let [[node {l :l [r & rnext :as rs] :r :as path}] loc] (when (and path rs) (with-meta [r (assoc path :l (conj l node) :r rnext)] ^loc)))) (defn rightmost "Returns the loc of the rightmost sibling of the node at this loc, or self" [loc] (let [[node {l :l r :r :as path}] loc] (if (and path r) (with-meta [(last r) (assoc path :l (apply conj l node (butlast r)) :r nil)] ^loc) loc))) (defn left "Returns the loc of the left sibling of the node at this loc, or nil" [loc] (let [[node {l :l r :r :as path}] loc] (when (and path (seq l)) (with-meta [(peek l) (assoc path :l (pop l) :r (cons node r))] ^loc)))) (defn leftmost "Returns the loc of the leftmost sibling of the node at this loc, or self" [loc] (let [[node {l :l r :r :as path}] loc] (if (and path (seq l)) (with-meta [(first l) (assoc path :l [] :r (concat (rest l) [node] r))] ^loc) loc))) (defn insert-left "Inserts the item as the left sibling of the node at this loc, without moving" [loc item] (let [[node {l :l :as path}] loc] (if (nil? path) (throw (new Exception "Insert at top")) (with-meta [node (assoc path :l (conj l item) :changed? true)] ^loc)))) (defn insert-right "Inserts the item as the right sibling of the node at this loc, without moving" [loc item] (let [[node {r :r :as path}] loc] (if (nil? path) (throw (new Exception "Insert at top")) (with-meta [node (assoc path :r (cons item r) :changed? true)] ^loc)))) (defn replace "Replaces the node at this loc, without moving" [loc node] (let [[_ path] loc] (with-meta [node (assoc path :changed? true)] ^loc))) (defn edit "Replaces the node at this loc with the value of (f node args)" [loc f & args] (replace loc (apply f (node loc) args))) (defn insert-child "Inserts the item as the leftmost child of the node at this loc, without moving" [loc item] (replace loc (make-node loc (node loc) (cons item (children loc))))) (defn append-child "Inserts the item as the rightmost child of the node at this loc, without moving" [loc item] (replace loc (make-node loc (node loc) (concat (children loc) [item])))) (defn next "Moves to the next loc in the hierarchy, depth-first. When reaching the end, returns a distinguished loc detectable via end?. If already at the end, stays there." [loc] (if (= :end (loc 1)) loc (or (and (branch? loc) (down loc)) (right loc) (loop [p loc] (if (up p) (or (right (up p)) (recur (up p))) [(node p) :end]))))) (defn prev "Moves to the previous loc in the hierarchy, depth-first. If already at the root, returns nil." [loc] (if-let [lloc (left loc)] (loop [loc lloc] (if-let [child (and (branch? loc) (down loc))] (recur (rightmost child)) loc)) (up loc))) (defn end? "Returns true if loc represents the end of a depth-first walk" [loc] (= :end (loc 1))) (defn remove "Removes the node at loc, returning the loc that would have preceded it in a depth-first walk." [loc] (let [[node {l :l, ppath :ppath, pnodes :pnodes, rs :r, :as path}] loc] (if (nil? path) (throw (new Exception "Remove at top")) (if (pos? (count l)) (loop [loc (with-meta [(peek l) (assoc path :l (pop l) :changed? true)] ^loc)] (if-let [child (and (branch? loc) (down loc))] (recur (rightmost child)) loc)) (with-meta [(make-node loc (peek pnodes) rs) (and ppath (assoc ppath :changed? true))] ^loc))))) (comment (load-file "/Users/rich/dev/clojure/src/zip.clj") (refer 'zip) (def data '[[a * b] + [c * d]]) (def dz (vector-zip data)) (right (down (right (right (down dz))))) (lefts (right (down (right (right (down dz)))))) (rights (right (down (right (right (down dz)))))) (up (up (right (down (right (right (down dz))))))) (path (right (down (right (right (down dz)))))) (-> dz down right right down right) (-> dz down right right down right (replace '/) root) (-> dz next next (edit str) next next next (replace '/) root) (-> dz next next next next next next next next next remove root) (-> dz next next next next next next next next next remove (insert-right 'e) root) (-> dz next next next next next next next next next remove up (append-child 'e) root) (end? (-> dz next next next next next next next next next remove next)) (-> dz next remove next remove root) (loop [loc dz] (if (end? loc) (root loc) (recur (next (if (= '* (node loc)) (replace loc '/) loc))))) (loop [loc dz] (if (end? loc) (root loc) (recur (next (if (= '* (node loc)) (remove loc) loc))))) )
{ "pile_set_name": "Github" }
using System; namespace Chloe.DbExpressions { public class DbConstantExpression : DbExpression { object _value; Type _type; public static readonly DbConstantExpression Null = new DbConstantExpression(null); public static readonly DbConstantExpression StringEmpty = new DbConstantExpression(string.Empty); public static readonly DbConstantExpression One = new DbConstantExpression(1); public static readonly DbConstantExpression Zero = new DbConstantExpression(0); public static readonly DbConstantExpression True = new DbConstantExpression(true); public static readonly DbConstantExpression False = new DbConstantExpression(false); public DbConstantExpression(object value) : base(DbExpressionType.Constant) { this._value = value; if (value != null) this._type = value.GetType(); else this._type = PublicConstants.TypeOfObject; } public DbConstantExpression(object value, Type type) : base(DbExpressionType.Constant) { PublicHelper.CheckNull(type); if (value != null) { Type t = value.GetType(); if (!type.IsAssignableFrom(t)) throw new ArgumentException(); } this._value = value; this._type = type; } public override Type Type { get { return this._type; } } public object Value { get { return this._value; } } public override T Accept<T>(DbExpressionVisitor<T> visitor) { return visitor.Visit(this); } } }
{ "pile_set_name": "Github" }
//===- Archive.cpp - ar File Format implementation ------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the ArchiveObjectFile class. // //===----------------------------------------------------------------------===// #include "llvm/Object/Archive.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Object/Binary.h" #include "llvm/Object/Error.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorOr.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <cassert> #include <cstddef> #include <cstdint> #include <cstring> #include <memory> #include <string> #include <system_error> using namespace llvm; using namespace object; using namespace llvm::support::endian; static const char *const Magic = "!<arch>\n"; static const char *const ThinMagic = "!<thin>\n"; void Archive::anchor() {} static Error malformedError(Twine Msg) { std::string StringMsg = "truncated or malformed archive (" + Msg.str() + ")"; return make_error<GenericBinaryError>(std::move(StringMsg), object_error::parse_failed); } ArchiveMemberHeader::ArchiveMemberHeader(const Archive *Parent, const char *RawHeaderPtr, uint64_t Size, Error *Err) : Parent(Parent), ArMemHdr(reinterpret_cast<const ArMemHdrType *>(RawHeaderPtr)) { if (RawHeaderPtr == nullptr) return; ErrorAsOutParameter ErrAsOutParam(Err); if (Size < sizeof(ArMemHdrType)) { if (Err) { std::string Msg("remaining size of archive too small for next archive " "member header "); Expected<StringRef> NameOrErr = getName(Size); if (!NameOrErr) { consumeError(NameOrErr.takeError()); uint64_t Offset = RawHeaderPtr - Parent->getData().data(); *Err = malformedError(Msg + "at offset " + Twine(Offset)); } else *Err = malformedError(Msg + "for " + NameOrErr.get()); } return; } if (ArMemHdr->Terminator[0] != '`' || ArMemHdr->Terminator[1] != '\n') { if (Err) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(StringRef(ArMemHdr->Terminator, sizeof(ArMemHdr->Terminator))); OS.flush(); std::string Msg("terminator characters in archive member \"" + Buf + "\" not the correct \"`\\n\" values for the archive " "member header "); Expected<StringRef> NameOrErr = getName(Size); if (!NameOrErr) { consumeError(NameOrErr.takeError()); uint64_t Offset = RawHeaderPtr - Parent->getData().data(); *Err = malformedError(Msg + "at offset " + Twine(Offset)); } else *Err = malformedError(Msg + "for " + NameOrErr.get()); } return; } } // This gets the raw name from the ArMemHdr->Name field and checks that it is // valid for the kind of archive. If it is not valid it returns an Error. Expected<StringRef> ArchiveMemberHeader::getRawName() const { char EndCond; auto Kind = Parent->kind(); if (Kind == Archive::K_BSD || Kind == Archive::K_DARWIN64) { if (ArMemHdr->Name[0] == ' ') { uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("name contains a leading space for archive member " "header at offset " + Twine(Offset)); } EndCond = ' '; } else if (ArMemHdr->Name[0] == '/' || ArMemHdr->Name[0] == '#') EndCond = ' '; else EndCond = '/'; StringRef::size_type end = StringRef(ArMemHdr->Name, sizeof(ArMemHdr->Name)).find(EndCond); if (end == StringRef::npos) end = sizeof(ArMemHdr->Name); assert(end <= sizeof(ArMemHdr->Name) && end > 0); // Don't include the EndCond if there is one. return StringRef(ArMemHdr->Name, end); } // This gets the name looking up long names. Size is the size of the archive // member including the header, so the size of any name following the header // is checked to make sure it does not overflow. Expected<StringRef> ArchiveMemberHeader::getName(uint64_t Size) const { // This can be called from the ArchiveMemberHeader constructor when the // archive header is truncated to produce an error message with the name. // Make sure the name field is not truncated. if (Size < offsetof(ArMemHdrType, Name) + sizeof(ArMemHdr->Name)) { uint64_t ArchiveOffset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("archive header truncated before the name field " "for archive member header at offset " + Twine(ArchiveOffset)); } // The raw name itself can be invalid. Expected<StringRef> NameOrErr = getRawName(); if (!NameOrErr) return NameOrErr.takeError(); StringRef Name = NameOrErr.get(); // Check if it's a special name. if (Name[0] == '/') { if (Name.size() == 1) // Linker member. return Name; if (Name.size() == 2 && Name[1] == '/') // String table. return Name; // It's a long name. // Get the string table offset. std::size_t StringOffset; if (Name.substr(1).rtrim(' ').getAsInteger(10, StringOffset)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(Name.substr(1).rtrim(' ')); OS.flush(); uint64_t ArchiveOffset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("long name offset characters after the '/' are " "not all decimal numbers: '" + Buf + "' for " "archive member header at offset " + Twine(ArchiveOffset)); } // Verify it. if (StringOffset >= Parent->getStringTable().size()) { uint64_t ArchiveOffset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("long name offset " + Twine(StringOffset) + " past " "the end of the string table for archive member " "header at offset " + Twine(ArchiveOffset)); } // GNU long file names end with a "/\n". if (Parent->kind() == Archive::K_GNU || Parent->kind() == Archive::K_GNU64) { size_t End = Parent->getStringTable().find('\n', /*From=*/StringOffset); if (End == StringRef::npos || End < 1 || Parent->getStringTable()[End - 1] != '/') { return malformedError("string table at long name offset " + Twine(StringOffset) + "not terminated"); } return Parent->getStringTable().slice(StringOffset, End - 1); } return Parent->getStringTable().begin() + StringOffset; } if (Name.startswith("#1/")) { uint64_t NameLength; if (Name.substr(3).rtrim(' ').getAsInteger(10, NameLength)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(Name.substr(3).rtrim(' ')); OS.flush(); uint64_t ArchiveOffset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("long name length characters after the #1/ are " "not all decimal numbers: '" + Buf + "' for " "archive member header at offset " + Twine(ArchiveOffset)); } if (getSizeOf() + NameLength > Size) { uint64_t ArchiveOffset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("long name length: " + Twine(NameLength) + " extends past the end of the member or archive " "for archive member header at offset " + Twine(ArchiveOffset)); } return StringRef(reinterpret_cast<const char *>(ArMemHdr) + getSizeOf(), NameLength).rtrim('\0'); } // It is not a long name so trim the blanks at the end of the name. if (Name[Name.size() - 1] != '/') return Name.rtrim(' '); // It's a simple name. return Name.drop_back(1); } Expected<uint32_t> ArchiveMemberHeader::getSize() const { uint32_t Ret; if (StringRef(ArMemHdr->Size, sizeof(ArMemHdr->Size)).rtrim(" ").getAsInteger(10, Ret)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(StringRef(ArMemHdr->Size, sizeof(ArMemHdr->Size)).rtrim(" ")); OS.flush(); uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("characters in size field in archive header are not " "all decimal numbers: '" + Buf + "' for archive " "member header at offset " + Twine(Offset)); } return Ret; } Expected<sys::fs::perms> ArchiveMemberHeader::getAccessMode() const { unsigned Ret; if (StringRef(ArMemHdr->AccessMode, sizeof(ArMemHdr->AccessMode)).rtrim(' ').getAsInteger(8, Ret)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(StringRef(ArMemHdr->AccessMode, sizeof(ArMemHdr->AccessMode)).rtrim(" ")); OS.flush(); uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("characters in AccessMode field in archive header " "are not all decimal numbers: '" + Buf + "' for the " "archive member header at offset " + Twine(Offset)); } return static_cast<sys::fs::perms>(Ret); } Expected<sys::TimePoint<std::chrono::seconds>> ArchiveMemberHeader::getLastModified() const { unsigned Seconds; if (StringRef(ArMemHdr->LastModified, sizeof(ArMemHdr->LastModified)).rtrim(' ') .getAsInteger(10, Seconds)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(StringRef(ArMemHdr->LastModified, sizeof(ArMemHdr->LastModified)).rtrim(" ")); OS.flush(); uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("characters in LastModified field in archive header " "are not all decimal numbers: '" + Buf + "' for the " "archive member header at offset " + Twine(Offset)); } return sys::toTimePoint(Seconds); } Expected<unsigned> ArchiveMemberHeader::getUID() const { unsigned Ret; StringRef User = StringRef(ArMemHdr->UID, sizeof(ArMemHdr->UID)).rtrim(' '); if (User.empty()) return 0; if (User.getAsInteger(10, Ret)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(User); OS.flush(); uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("characters in UID field in archive header " "are not all decimal numbers: '" + Buf + "' for the " "archive member header at offset " + Twine(Offset)); } return Ret; } Expected<unsigned> ArchiveMemberHeader::getGID() const { unsigned Ret; StringRef Group = StringRef(ArMemHdr->GID, sizeof(ArMemHdr->GID)).rtrim(' '); if (Group.empty()) return 0; if (Group.getAsInteger(10, Ret)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(Group); OS.flush(); uint64_t Offset = reinterpret_cast<const char *>(ArMemHdr) - Parent->getData().data(); return malformedError("characters in GID field in archive header " "are not all decimal numbers: '" + Buf + "' for the " "archive member header at offset " + Twine(Offset)); } return Ret; } Archive::Child::Child(const Archive *Parent, StringRef Data, uint16_t StartOfFile) : Parent(Parent), Header(Parent, Data.data(), Data.size(), nullptr), Data(Data), StartOfFile(StartOfFile) { } Archive::Child::Child(const Archive *Parent, const char *Start, Error *Err) : Parent(Parent), Header(Parent, Start, Parent ? Parent->getData().size() - (Start - Parent->getData().data()) : 0, Err) { if (!Start) return; // If we are pointed to real data, Start is not a nullptr, then there must be // a non-null Err pointer available to report malformed data on. Only in // the case sentinel value is being constructed is Err is permitted to be a // nullptr. assert(Err && "Err can't be nullptr if Start is not a nullptr"); ErrorAsOutParameter ErrAsOutParam(Err); // If there was an error in the construction of the Header // then just return with the error now set. if (*Err) return; uint64_t Size = Header.getSizeOf(); Data = StringRef(Start, Size); Expected<bool> isThinOrErr = isThinMember(); if (!isThinOrErr) { *Err = isThinOrErr.takeError(); return; } bool isThin = isThinOrErr.get(); if (!isThin) { Expected<uint64_t> MemberSize = getRawSize(); if (!MemberSize) { *Err = MemberSize.takeError(); return; } Size += MemberSize.get(); Data = StringRef(Start, Size); } // Setup StartOfFile and PaddingBytes. StartOfFile = Header.getSizeOf(); // Don't include attached name. Expected<StringRef> NameOrErr = getRawName(); if (!NameOrErr){ *Err = NameOrErr.takeError(); return; } StringRef Name = NameOrErr.get(); if (Name.startswith("#1/")) { uint64_t NameSize; if (Name.substr(3).rtrim(' ').getAsInteger(10, NameSize)) { std::string Buf; raw_string_ostream OS(Buf); OS.write_escaped(Name.substr(3).rtrim(' ')); OS.flush(); uint64_t Offset = Start - Parent->getData().data(); *Err = malformedError("long name length characters after the #1/ are " "not all decimal numbers: '" + Buf + "' for " "archive member header at offset " + Twine(Offset)); return; } StartOfFile += NameSize; } } Expected<uint64_t> Archive::Child::getSize() const { if (Parent->IsThin) { Expected<uint32_t> Size = Header.getSize(); if (!Size) return Size.takeError(); return Size.get(); } return Data.size() - StartOfFile; } Expected<uint64_t> Archive::Child::getRawSize() const { return Header.getSize(); } Expected<bool> Archive::Child::isThinMember() const { Expected<StringRef> NameOrErr = Header.getRawName(); if (!NameOrErr) return NameOrErr.takeError(); StringRef Name = NameOrErr.get(); return Parent->IsThin && Name != "/" && Name != "//"; } Expected<std::string> Archive::Child::getFullName() const { Expected<bool> isThin = isThinMember(); if (!isThin) return isThin.takeError(); assert(isThin.get()); Expected<StringRef> NameOrErr = getName(); if (!NameOrErr) return NameOrErr.takeError(); StringRef Name = *NameOrErr; if (sys::path::is_absolute(Name)) return Name; SmallString<128> FullName = sys::path::parent_path( Parent->getMemoryBufferRef().getBufferIdentifier()); sys::path::append(FullName, Name); return StringRef(FullName); } Expected<StringRef> Archive::Child::getBuffer() const { Expected<bool> isThinOrErr = isThinMember(); if (!isThinOrErr) return isThinOrErr.takeError(); bool isThin = isThinOrErr.get(); if (!isThin) { Expected<uint32_t> Size = getSize(); if (!Size) return Size.takeError(); return StringRef(Data.data() + StartOfFile, Size.get()); } Expected<std::string> FullNameOrErr = getFullName(); if (!FullNameOrErr) return FullNameOrErr.takeError(); const std::string &FullName = *FullNameOrErr; ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getFile(FullName); if (std::error_code EC = Buf.getError()) return errorCodeToError(EC); Parent->ThinBuffers.push_back(std::move(*Buf)); return Parent->ThinBuffers.back()->getBuffer(); } Expected<Archive::Child> Archive::Child::getNext() const { size_t SpaceToSkip = Data.size(); // If it's odd, add 1 to make it even. if (SpaceToSkip & 1) ++SpaceToSkip; const char *NextLoc = Data.data() + SpaceToSkip; // Check to see if this is at the end of the archive. if (NextLoc == Parent->Data.getBufferEnd()) return Child(nullptr, nullptr, nullptr); // Check to see if this is past the end of the archive. if (NextLoc > Parent->Data.getBufferEnd()) { std::string Msg("offset to next archive member past the end of the archive " "after member "); Expected<StringRef> NameOrErr = getName(); if (!NameOrErr) { consumeError(NameOrErr.takeError()); uint64_t Offset = Data.data() - Parent->getData().data(); return malformedError(Msg + "at offset " + Twine(Offset)); } else return malformedError(Msg + NameOrErr.get()); } Error Err = Error::success(); Child Ret(Parent, NextLoc, &Err); if (Err) return std::move(Err); return Ret; } uint64_t Archive::Child::getChildOffset() const { const char *a = Parent->Data.getBuffer().data(); const char *c = Data.data(); uint64_t offset = c - a; return offset; } Expected<StringRef> Archive::Child::getName() const { Expected<uint64_t> RawSizeOrErr = getRawSize(); if (!RawSizeOrErr) return RawSizeOrErr.takeError(); uint64_t RawSize = RawSizeOrErr.get(); Expected<StringRef> NameOrErr = Header.getName(Header.getSizeOf() + RawSize); if (!NameOrErr) return NameOrErr.takeError(); StringRef Name = NameOrErr.get(); return Name; } Expected<MemoryBufferRef> Archive::Child::getMemoryBufferRef() const { Expected<StringRef> NameOrErr = getName(); if (!NameOrErr) return NameOrErr.takeError(); StringRef Name = NameOrErr.get(); Expected<StringRef> Buf = getBuffer(); if (!Buf) return Buf.takeError(); return MemoryBufferRef(*Buf, Name); } Expected<std::unique_ptr<Binary>> Archive::Child::getAsBinary(LLVMContext *Context) const { Expected<MemoryBufferRef> BuffOrErr = getMemoryBufferRef(); if (!BuffOrErr) return BuffOrErr.takeError(); auto BinaryOrErr = createBinary(BuffOrErr.get(), Context); if (BinaryOrErr) return std::move(*BinaryOrErr); return BinaryOrErr.takeError(); } Expected<std::unique_ptr<Archive>> Archive::create(MemoryBufferRef Source) { Error Err = Error::success(); std::unique_ptr<Archive> Ret(new Archive(Source, Err)); if (Err) return std::move(Err); return std::move(Ret); } void Archive::setFirstRegular(const Child &C) { FirstRegularData = C.Data; FirstRegularStartOfFile = C.StartOfFile; } Archive::Archive(MemoryBufferRef Source, Error &Err) : Binary(Binary::ID_Archive, Source) { ErrorAsOutParameter ErrAsOutParam(&Err); StringRef Buffer = Data.getBuffer(); // Check for sufficient magic. if (Buffer.startswith(ThinMagic)) { IsThin = true; } else if (Buffer.startswith(Magic)) { IsThin = false; } else { Err = make_error<GenericBinaryError>("File too small to be an archive", object_error::invalid_file_type); return; } // Make sure Format is initialized before any call to // ArchiveMemberHeader::getName() is made. This could be a valid empty // archive which is the same in all formats. So claiming it to be gnu to is // fine if not totally correct before we look for a string table or table of // contents. Format = K_GNU; // Get the special members. child_iterator I = child_begin(Err, false); if (Err) return; child_iterator E = child_end(); // See if this is a valid empty archive and if so return. if (I == E) { Err = Error::success(); return; } const Child *C = &*I; auto Increment = [&]() { ++I; if (Err) return true; C = &*I; return false; }; Expected<StringRef> NameOrErr = C->getRawName(); if (!NameOrErr) { Err = NameOrErr.takeError(); return; } StringRef Name = NameOrErr.get(); // Below is the pattern that is used to figure out the archive format // GNU archive format // First member : / (may exist, if it exists, points to the symbol table ) // Second member : // (may exist, if it exists, points to the string table) // Note : The string table is used if the filename exceeds 15 characters // BSD archive format // First member : __.SYMDEF or "__.SYMDEF SORTED" (the symbol table) // There is no string table, if the filename exceeds 15 characters or has a // embedded space, the filename has #1/<size>, The size represents the size // of the filename that needs to be read after the archive header // COFF archive format // First member : / // Second member : / (provides a directory of symbols) // Third member : // (may exist, if it exists, contains the string table) // Note: Microsoft PE/COFF Spec 8.3 says that the third member is present // even if the string table is empty. However, lib.exe does not in fact // seem to create the third member if there's no member whose filename // exceeds 15 characters. So the third member is optional. if (Name == "__.SYMDEF" || Name == "__.SYMDEF_64") { if (Name == "__.SYMDEF") Format = K_BSD; else // Name == "__.SYMDEF_64" Format = K_DARWIN64; // We know that the symbol table is not an external file, but we still must // check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } SymbolTable = BufOrErr.get(); if (Increment()) return; setFirstRegular(*C); Err = Error::success(); return; } if (Name.startswith("#1/")) { Format = K_BSD; // We know this is BSD, so getName will work since there is no string table. Expected<StringRef> NameOrErr = C->getName(); if (!NameOrErr) { Err = NameOrErr.takeError(); return; } Name = NameOrErr.get(); if (Name == "__.SYMDEF SORTED" || Name == "__.SYMDEF") { // We know that the symbol table is not an external file, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } SymbolTable = BufOrErr.get(); if (Increment()) return; } else if (Name == "__.SYMDEF_64 SORTED" || Name == "__.SYMDEF_64") { Format = K_DARWIN64; // We know that the symbol table is not an external file, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } SymbolTable = BufOrErr.get(); if (Increment()) return; } setFirstRegular(*C); return; } // MIPS 64-bit ELF archives use a special format of a symbol table. // This format is marked by `ar_name` field equals to "/SYM64/". // For detailed description see page 96 in the following document: // http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf bool has64SymTable = false; if (Name == "/" || Name == "/SYM64/") { // We know that the symbol table is not an external file, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } SymbolTable = BufOrErr.get(); if (Name == "/SYM64/") has64SymTable = true; if (Increment()) return; if (I == E) { Err = Error::success(); return; } Expected<StringRef> NameOrErr = C->getRawName(); if (!NameOrErr) { Err = NameOrErr.takeError(); return; } Name = NameOrErr.get(); } if (Name == "//") { Format = has64SymTable ? K_GNU64 : K_GNU; // The string table is never an external member, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } StringTable = BufOrErr.get(); if (Increment()) return; setFirstRegular(*C); Err = Error::success(); return; } if (Name[0] != '/') { Format = has64SymTable ? K_GNU64 : K_GNU; setFirstRegular(*C); Err = Error::success(); return; } if (Name != "/") { Err = errorCodeToError(object_error::parse_failed); return; } Format = K_COFF; // We know that the symbol table is not an external file, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } SymbolTable = BufOrErr.get(); if (Increment()) return; if (I == E) { setFirstRegular(*C); Err = Error::success(); return; } NameOrErr = C->getRawName(); if (!NameOrErr) { Err = NameOrErr.takeError(); return; } Name = NameOrErr.get(); if (Name == "//") { // The string table is never an external member, but we still // must check any Expected<> return value. Expected<StringRef> BufOrErr = C->getBuffer(); if (!BufOrErr) { Err = BufOrErr.takeError(); return; } StringTable = BufOrErr.get(); if (Increment()) return; } setFirstRegular(*C); Err = Error::success(); } Archive::child_iterator Archive::child_begin(Error &Err, bool SkipInternal) const { if (isEmpty()) return child_end(); if (SkipInternal) return child_iterator(Child(this, FirstRegularData, FirstRegularStartOfFile), &Err); const char *Loc = Data.getBufferStart() + strlen(Magic); Child C(this, Loc, &Err); if (Err) return child_end(); return child_iterator(C, &Err); } Archive::child_iterator Archive::child_end() const { return child_iterator(Child(nullptr, nullptr, nullptr), nullptr); } StringRef Archive::Symbol::getName() const { return Parent->getSymbolTable().begin() + StringIndex; } Expected<Archive::Child> Archive::Symbol::getMember() const { const char *Buf = Parent->getSymbolTable().begin(); const char *Offsets = Buf; if (Parent->kind() == K_GNU64 || Parent->kind() == K_DARWIN64) Offsets += sizeof(uint64_t); else Offsets += sizeof(uint32_t); uint64_t Offset = 0; if (Parent->kind() == K_GNU) { Offset = read32be(Offsets + SymbolIndex * 4); } else if (Parent->kind() == K_GNU64) { Offset = read64be(Offsets + SymbolIndex * 8); } else if (Parent->kind() == K_BSD) { // The SymbolIndex is an index into the ranlib structs that start at // Offsets (the first uint32_t is the number of bytes of the ranlib // structs). The ranlib structs are a pair of uint32_t's the first // being a string table offset and the second being the offset into // the archive of the member that defines the symbol. Which is what // is needed here. Offset = read32le(Offsets + SymbolIndex * 8 + 4); } else if (Parent->kind() == K_DARWIN64) { // The SymbolIndex is an index into the ranlib_64 structs that start at // Offsets (the first uint64_t is the number of bytes of the ranlib_64 // structs). The ranlib_64 structs are a pair of uint64_t's the first // being a string table offset and the second being the offset into // the archive of the member that defines the symbol. Which is what // is needed here. Offset = read64le(Offsets + SymbolIndex * 16 + 8); } else { // Skip offsets. uint32_t MemberCount = read32le(Buf); Buf += MemberCount * 4 + 4; uint32_t SymbolCount = read32le(Buf); if (SymbolIndex >= SymbolCount) return errorCodeToError(object_error::parse_failed); // Skip SymbolCount to get to the indices table. const char *Indices = Buf + 4; // Get the index of the offset in the file member offset table for this // symbol. uint16_t OffsetIndex = read16le(Indices + SymbolIndex * 2); // Subtract 1 since OffsetIndex is 1 based. --OffsetIndex; if (OffsetIndex >= MemberCount) return errorCodeToError(object_error::parse_failed); Offset = read32le(Offsets + OffsetIndex * 4); } const char *Loc = Parent->getData().begin() + Offset; Error Err = Error::success(); Child C(Parent, Loc, &Err); if (Err) return std::move(Err); return C; } Archive::Symbol Archive::Symbol::getNext() const { Symbol t(*this); if (Parent->kind() == K_BSD) { // t.StringIndex is an offset from the start of the __.SYMDEF or // "__.SYMDEF SORTED" member into the string table for the ranlib // struct indexed by t.SymbolIndex . To change t.StringIndex to the // offset in the string table for t.SymbolIndex+1 we subtract the // its offset from the start of the string table for t.SymbolIndex // and add the offset of the string table for t.SymbolIndex+1. // The __.SYMDEF or "__.SYMDEF SORTED" member starts with a uint32_t // which is the number of bytes of ranlib structs that follow. The ranlib // structs are a pair of uint32_t's the first being a string table offset // and the second being the offset into the archive of the member that // define the symbol. After that the next uint32_t is the byte count of // the string table followed by the string table. const char *Buf = Parent->getSymbolTable().begin(); uint32_t RanlibCount = 0; RanlibCount = read32le(Buf) / 8; // If t.SymbolIndex + 1 will be past the count of symbols (the RanlibCount) // don't change the t.StringIndex as we don't want to reference a ranlib // past RanlibCount. if (t.SymbolIndex + 1 < RanlibCount) { const char *Ranlibs = Buf + 4; uint32_t CurRanStrx = 0; uint32_t NextRanStrx = 0; CurRanStrx = read32le(Ranlibs + t.SymbolIndex * 8); NextRanStrx = read32le(Ranlibs + (t.SymbolIndex + 1) * 8); t.StringIndex -= CurRanStrx; t.StringIndex += NextRanStrx; } } else { // Go to one past next null. t.StringIndex = Parent->getSymbolTable().find('\0', t.StringIndex) + 1; } ++t.SymbolIndex; return t; } Archive::symbol_iterator Archive::symbol_begin() const { if (!hasSymbolTable()) return symbol_iterator(Symbol(this, 0, 0)); const char *buf = getSymbolTable().begin(); if (kind() == K_GNU) { uint32_t symbol_count = 0; symbol_count = read32be(buf); buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint32_t))); } else if (kind() == K_GNU64) { uint64_t symbol_count = read64be(buf); buf += sizeof(uint64_t) + (symbol_count * (sizeof(uint64_t))); } else if (kind() == K_BSD) { // The __.SYMDEF or "__.SYMDEF SORTED" member starts with a uint32_t // which is the number of bytes of ranlib structs that follow. The ranlib // structs are a pair of uint32_t's the first being a string table offset // and the second being the offset into the archive of the member that // define the symbol. After that the next uint32_t is the byte count of // the string table followed by the string table. uint32_t ranlib_count = 0; ranlib_count = read32le(buf) / 8; const char *ranlibs = buf + 4; uint32_t ran_strx = 0; ran_strx = read32le(ranlibs); buf += sizeof(uint32_t) + (ranlib_count * (2 * (sizeof(uint32_t)))); // Skip the byte count of the string table. buf += sizeof(uint32_t); buf += ran_strx; } else if (kind() == K_DARWIN64) { // The __.SYMDEF_64 or "__.SYMDEF_64 SORTED" member starts with a uint64_t // which is the number of bytes of ranlib_64 structs that follow. The // ranlib_64 structs are a pair of uint64_t's the first being a string // table offset and the second being the offset into the archive of the // member that define the symbol. After that the next uint64_t is the byte // count of the string table followed by the string table. uint64_t ranlib_count = 0; ranlib_count = read64le(buf) / 16; const char *ranlibs = buf + 8; uint64_t ran_strx = 0; ran_strx = read64le(ranlibs); buf += sizeof(uint64_t) + (ranlib_count * (2 * (sizeof(uint64_t)))); // Skip the byte count of the string table. buf += sizeof(uint64_t); buf += ran_strx; } else { uint32_t member_count = 0; uint32_t symbol_count = 0; member_count = read32le(buf); buf += 4 + (member_count * 4); // Skip offsets. symbol_count = read32le(buf); buf += 4 + (symbol_count * 2); // Skip indices. } uint32_t string_start_offset = buf - getSymbolTable().begin(); return symbol_iterator(Symbol(this, 0, string_start_offset)); } Archive::symbol_iterator Archive::symbol_end() const { return symbol_iterator(Symbol(this, getNumberOfSymbols(), 0)); } uint32_t Archive::getNumberOfSymbols() const { if (!hasSymbolTable()) return 0; const char *buf = getSymbolTable().begin(); if (kind() == K_GNU) return read32be(buf); if (kind() == K_GNU64) return read64be(buf); if (kind() == K_BSD) return read32le(buf) / 8; if (kind() == K_DARWIN64) return read64le(buf) / 16; uint32_t member_count = 0; member_count = read32le(buf); buf += 4 + (member_count * 4); // Skip offsets. return read32le(buf); } Expected<Optional<Archive::Child>> Archive::findSym(StringRef name) const { Archive::symbol_iterator bs = symbol_begin(); Archive::symbol_iterator es = symbol_end(); for (; bs != es; ++bs) { StringRef SymName = bs->getName(); if (SymName == name) { if (auto MemberOrErr = bs->getMember()) return Child(*MemberOrErr); else return MemberOrErr.takeError(); } } return Optional<Child>(); } // Returns true if archive file contains no member file. bool Archive::isEmpty() const { return Data.getBufferSize() == 8; } bool Archive::hasSymbolTable() const { return !SymbolTable.empty(); }
{ "pile_set_name": "Github" }
package ch.cyberduck.binding.quicklook; /* * Copyright (c) 2002-2020 iterate GmbH. All rights reserved. * https://cyberduck.io/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ import ch.cyberduck.binding.ProxyController; import ch.cyberduck.binding.foundation.NSURL; public abstract class QLPreviewItem extends ProxyController { public abstract NSURL previewItemURL(); /*! * @abstract The item's title this will be used as apparent item title. * @discussion The title replaces the default item display name. This property is optional. */ public abstract String previewItemTitle(); }
{ "pile_set_name": "Github" }
/* * Copyright (c) AXA Group Operations Spain S.A. * * 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. */ const LangRu = require('./lang-ru'); const TokenizerRu = require('./tokenizer-ru'); const StemmerRu = require('./stemmer-ru'); const StopwordsRu = require('./stopwords-ru'); const NormalizerRu = require('./normalizer-ru'); const SentimentRu = require('./sentiment/sentiment_ru'); module.exports = { LangRu, StemmerRu, StopwordsRu, TokenizerRu, NormalizerRu, SentimentRu, };
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here:
{ "pile_set_name": "Github" }
/* * JFFS2 -- Journalling Flash File System, Version 2. * * Copyright © 2006 NEC Corporation * * Created by KaiGai Kohei <[email protected]> * * For licensing information, see the file 'LICENCE' in this directory. * */ #include <linux/kernel.h> #include <linux/fs.h> #include <linux/jffs2.h> #include <linux/xattr.h> #include <linux/mtd/mtd.h> #include "nodelist.h" static int jffs2_trusted_getxattr(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, void *buffer, size_t size, int flags) { return do_jffs2_getxattr(inode, JFFS2_XPREFIX_TRUSTED, name, buffer, size); } static int jffs2_trusted_setxattr(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, const void *buffer, size_t size, int flags) { return do_jffs2_setxattr(inode, JFFS2_XPREFIX_TRUSTED, name, buffer, size, flags); } static bool jffs2_trusted_listxattr(struct dentry *dentry) { return capable(CAP_SYS_ADMIN); } const struct xattr_handler jffs2_trusted_xattr_handler = { .prefix = XATTR_TRUSTED_PREFIX, .list = jffs2_trusted_listxattr, .set = jffs2_trusted_setxattr, .get = jffs2_trusted_getxattr };
{ "pile_set_name": "Github" }