text
stringlengths
2
99.9k
meta
dict
/* * Test_BlendStates.cpp * * This file is part of the "LLGL" project (Copyright (c) 2015-2019 by Lukas Hermanns) * See "LICENSE.txt" for license information. */ #include <LLGL/LLGL.h> #include <LLGL/Utility.h> #include <Gauss/Gauss.h> #include <memory> #include <iostream> #include <string> #include <sstream> #define STB_IMAGE_IMPLEMENTATION #include <stb/stb_image.h> int main() { try { // Load render system module LLGL::RendererConfigurationOpenGL rendererConfig; { rendererConfig.contextProfile = LLGL::OpenGLContextProfile::CoreProfile; } LLGL::RenderSystemDescriptor rendererDesc; { rendererDesc.moduleName = "OpenGL"; rendererDesc.rendererConfig = &rendererConfig; rendererDesc.rendererConfigSize = sizeof(rendererConfig); } auto renderer = LLGL::RenderSystem::Load("OpenGL"); // Create render context LLGL::RenderContextDescriptor contextDesc; contextDesc.videoMode.resolution = { 800, 600 }; contextDesc.vsync.enabled = true; auto context = renderer->CreateRenderContext(contextDesc); // Setup window title auto& window = static_cast<LLGL::Window&>(context->GetSurface()); auto title = "LLGL Test 10 ( " + renderer->GetName() + " )"; window.SetTitle(std::wstring(title.begin(), title.end())); // Setup input controller auto input = std::make_shared<LLGL::Input>(); window.AddEventListener(input); window.Show(); // Create vertex buffer struct Vertex { Gs::Vector2f position; LLGL::ColorRGBAub color; } vertices[] = { { { -0.5f, -0.5f }, { 255, 0, 0, 255 } }, { { -0.5f, 0.5f }, { 0, 255, 0, 160 } }, { { 0.5f, -0.5f }, { 255, 0, 255, 80 } }, { { 0.5f, 0.5f }, { 0, 0, 255, 0 } }, }; LLGL::VertexFormat vertexFormat; vertexFormat.AppendAttribute({ "position", LLGL::Format::RG32Float }); vertexFormat.AppendAttribute({ "color", LLGL::Format::RGBA8UNorm }); vertexFormat.SetStride(sizeof(Vertex)); LLGL::BufferDescriptor vertexBufferDesc; { vertexBufferDesc.size = sizeof(vertices); vertexBufferDesc.bindFlags = LLGL::BindFlags::VertexBuffer; vertexBufferDesc.vertexAttribs = vertexFormat.attributes; } auto vertexBuffer = renderer->CreateBuffer(vertexBufferDesc, vertices); // Create shader program LLGL::ShaderProgramDescriptor shaderProgramDesc; { LLGL::ShaderDescriptor vertexShaderDesc{ LLGL::ShaderType::Vertex, "Shaders/BlendTest.vert" }; vertexShaderDesc.vertex.inputAttribs = vertexBufferDesc.vertexAttribs; shaderProgramDesc.vertexShader = renderer->CreateShader(vertexShaderDesc);//{ LLGL::ShaderType::Vertex, "Shaders/BlendTest.vert" }); shaderProgramDesc.fragmentShader = renderer->CreateShader({ LLGL::ShaderType::Fragment, "Shaders/BlendTest.frag" }); } auto shaderProgram = renderer->CreateShaderProgram(shaderProgramDesc); if (shaderProgram->HasErrors()) throw std::runtime_error(shaderProgram->GetReport()); // Create graphics pipeline static const std::size_t numPipelines = 4; LLGL::PipelineState* pipeline[numPipelines] = {}; LLGL::GraphicsPipelineDescriptor pipelineDesc; { pipelineDesc.shaderProgram = shaderProgram; pipelineDesc.primitiveTopology = LLGL::PrimitiveTopology::TriangleStrip; } pipeline[0] = renderer->CreatePipelineState(pipelineDesc); { pipelineDesc.blend.targets[0].blendEnabled = true; } pipeline[1] = renderer->CreatePipelineState(pipelineDesc); { pipelineDesc.primitiveTopology = LLGL::PrimitiveTopology::LineLoop; } pipeline[2] = renderer->CreatePipelineState(pipelineDesc); { pipelineDesc.blend.targets[0].blendEnabled = false; pipelineDesc.blend.targets[0].colorMask = { false, false, false, false }; } pipeline[3] = renderer->CreatePipelineState(pipelineDesc); // Create command buffer auto commandQueue = renderer->GetCommandQueue(); auto commands = renderer->CreateCommandBuffer(); // Scene parameters std::size_t pipelineIndex = 0; const auto& resolution = context->GetResolution(); auto w = resolution.width / 2; auto h = resolution.height / 2; auto x = static_cast<std::int32_t>(w); auto y = static_cast<std::int32_t>(h); // Main loop while (window.ProcessEvents() && !input->KeyDown(LLGL::Key::Escape)) { // User input if (input->KeyDownRepeated(LLGL::Key::Tab)) { if (input->KeyPressed(LLGL::Key::Shift)) { if (pipelineIndex == 0) pipelineIndex = numPipelines - 1; else pipelineIndex = (pipelineIndex - 1); } else pipelineIndex = (pipelineIndex + 1) % numPipelines; } // Update scene static float angle; angle += 0.1f; auto dx = static_cast<int>(std::sin(angle) * 10.0f); auto dy = static_cast<int>(std::cos(angle) * 10.0f); LLGL::Viewport viewports[4] = { { { 0, 0 }, { w, h } }, { { x, 0 }, { w, h } }, { { x + dx, y + dy }, { w, h } }, { { 0, y }, { w, h } }, }; // Render scene commands->Begin(); { commands->SetVertexBuffer(*vertexBuffer); commands->BeginRenderPass(*context); { commands->Clear(LLGL::ClearFlags::Color); for (int i = 0; i < 4; ++i) { commands->SetViewport(viewports[i]); commands->SetPipelineState(*pipeline[i]); commands->Draw(4, 0); } } commands->EndRenderPass(); } commands->End(); commandQueue->Submit(*commands); context->Present(); } } catch (const std::exception& e) { std::cerr << e.what() << std::endl; #ifdef _WIN32 system("pause"); #endif } return 0; }
{ "pile_set_name": "Github" }
using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Microsoft.WindowsAzure.MobileServices.Test.Unit.Table { [TestClass] public class MobileServiceContractResolverTests { [TestMethod] public void ResolveContractIsThreadSafe() { const int iterationCount = 100; for (int i = 0; i < iterationCount; i++) { MobileServiceContractResolver contractResolver = new MobileServiceContractResolver(); Func<JsonContract> resolveContract = () => contractResolver.ResolveContract(typeof(PocoType)); Task t1 = Task.Run(resolveContract); Task t2 = Task.Run(resolveContract); Task.WhenAll(t1, t2).Wait(); } } [TestMethod] public void ResolveTableNameIsThreadSafe() { const int iterationCount = 100; for (int i = 0; i < iterationCount; i++) { MobileServiceContractResolver contractResolver = new MobileServiceContractResolver(); Action resolveTableName = () => contractResolver.ResolveTableName(typeof(PocoType)); Task t1 = Task.Run(resolveTableName); Task t2 = Task.Run(resolveTableName); Task.WhenAll(t1, t2).Wait(); } } } }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>OpenSOAP: StringHash.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.6 --> <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div> <h1>StringHash.h</h1><a href="StringHash_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/* -*- mode: c++; -*-</span> 00002 <span class="comment"> *-----------------------------------------------------------------------------</span> 00003 <span class="comment"> * $RCSfile: StringHash.h,v $</span> 00004 <span class="comment"> *</span> 00005 <span class="comment"> * See Copyright for the status of this software.</span> 00006 <span class="comment"> *</span> 00007 <span class="comment"> * The OpenSOAP Project</span> 00008 <span class="comment"> * http://opensoap.jp/</span> 00009 <span class="comment"> *-----------------------------------------------------------------------------</span> 00010 <span class="comment"> */</span> 00011 <span class="preprocessor">#ifndef OpenSOAP_StringHash_H</span> 00012 <span class="preprocessor"></span><span class="preprocessor">#define OpenSOAP_StringHash_H</span> 00013 <span class="preprocessor"></span> 00014 <span class="preprocessor">#include &lt;<a class="code" href="String_8h.html">OpenSOAP/String.h</a>&gt;</span> 00015 00022 <span class="preprocessor">#ifdef __cplusplus</span> 00023 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { 00024 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> 00025 <a name="l00030"></a><a class="code" href="StringHash_8h.html#a0">00030</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>tagOpenSOAPStringHash <a class="code" href="StringHash_8h.html#a0">OpenSOAPStringHash</a>; 00031 <a name="l00036"></a><a class="code" href="StringHash_8h.html#a1">00036</a> <span class="keyword">typedef</span> <a class="code" href="StringHash_8h.html#a0">OpenSOAPStringHash</a> *<a class="code" href="StringHash_8h.html#a1">OpenSOAPStringHashPtr</a>; 00037 00046 <span class="keywordtype">int</span> 00047 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00048 <a class="code" href="StringHash_8h.html#a2">OpenSOAPStringHashCreate</a>(OpenSOAPStringHashPtr * <span class="comment">/* [out] */</span> strh); 00049 00058 <span class="keywordtype">int</span> 00059 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00060 <a class="code" href="StringHash_8h.html#a3">OpenSOAPStringHashRelease</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh); 00061 00070 <span class="keywordtype">int</span> 00071 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00072 <a class="code" href="StringHash_8h.html#a4">OpenSOAPStringHashClear</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh); 00073 00086 <span class="keywordtype">int</span> 00087 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00088 <a class="code" href="StringHash_8h.html#a5">OpenSOAPStringHashRemoveKey</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh, 00089 <a class="code" href="String_8h.html#a1">OpenSOAPStringPtr</a> <span class="comment">/* [in] */</span> key, 00090 <span class="keywordtype">void</span> ** <span class="comment">/* [out] */</span> val); 00091 00104 <span class="keywordtype">int</span> 00105 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00106 <a class="code" href="StringHash_8h.html#a6">OpenSOAPStringHashSetValue</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh, 00107 <a class="code" href="String_8h.html#a1">OpenSOAPStringPtr</a> <span class="comment">/* [in] */</span> key, 00108 <span class="keywordtype">void</span> * <span class="comment">/* [in] */</span> val); 00109 00122 <span class="keywordtype">int</span> 00123 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00124 <a class="code" href="StringHash_8h.html#a7">OpenSOAPStringHashSetValueMB</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh, 00125 <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="comment">/* [in] */</span> key, 00126 <span class="keywordtype">void</span> * <span class="comment">/* [in] */</span> val); 00127 00140 <span class="keywordtype">int</span> 00141 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00142 <a class="code" href="StringHash_8h.html#a8">OpenSOAPStringHashSetValueWC</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh, 00143 <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * <span class="comment">/* [in] */</span> key, 00144 <span class="keywordtype">void</span> * <span class="comment">/* [in] */</span> val); 00145 00158 <span class="keywordtype">int</span> 00159 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00160 <a class="code" href="StringHash_8h.html#a9">OpenSOAPStringHashGetValue</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00161 <a class="code" href="String_8h.html#a1">OpenSOAPStringPtr</a> <span class="comment">/* [in] */</span> key, 00162 <span class="keywordtype">void</span> ** <span class="comment">/* [out] */</span> val); 00163 00176 <span class="keywordtype">int</span> 00177 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00178 <a class="code" href="StringHash_8h.html#a10">OpenSOAPStringHashGetValueMB</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00179 <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="comment">/* [in] */</span> key, 00180 <span class="keywordtype">void</span> ** <span class="comment">/* [out] */</span> val); 00181 00194 <span class="keywordtype">int</span> 00195 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00196 <a class="code" href="StringHash_8h.html#a11">OpenSOAPStringHashGetValueWC</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00197 <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> * <span class="comment">/* [in] */</span> key, 00198 <span class="keywordtype">void</span> ** <span class="comment">/* [out] */</span> val); 00199 00210 <span class="keywordtype">int</span> 00211 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00212 <a class="code" href="StringHash_8h.html#a12">OpenSOAPStringHashGetSize</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00213 size_t * <span class="comment">/* [out] */</span> sz); 00214 00227 <span class="keywordtype">int</span> 00228 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00229 <a class="code" href="StringHash_8h.html#a13">OpenSOAPStringHashGetKeys</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00230 size_t * <span class="comment">/* [in, out] */</span> sz, 00231 <a class="code" href="String_8h.html#a1">OpenSOAPStringPtr</a> * <span class="comment">/* [out] */</span> keys); 00244 <span class="keywordtype">int</span> 00245 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00246 <a class="code" href="StringHash_8h.html#a14">OpenSOAPStringHashGetValues</a>(OpenSOAPStringHashPtr <span class="comment">/* [in] */</span> strh, 00247 size_t * <span class="comment">/* [in, out] */</span> sz, 00248 <span class="keywordtype">void</span> ** <span class="comment">/* [out] */</span> vals); 00249 00262 <span class="keywordtype">int</span> 00263 <a class="code" href="Defines_8h.html#a0">OPENSOAP_API</a> 00264 <a class="code" href="StringHash_8h.html#a15">OpenSOAPStringHashApplyToValues</a>(OpenSOAPStringHashPtr <span class="comment">/* [in, out] */</span> strh, 00265 <span class="keywordtype">int</span> <span class="comment">/* [in] */</span> (*aply)(<span class="keywordtype">void</span> *, <span class="keywordtype">void</span> *), 00266 <span class="keywordtype">void</span> * <span class="comment">/* [in] */</span> opt); 00267 00268 <span class="preprocessor">#ifdef __cplusplus</span> 00269 <span class="preprocessor"></span>} 00270 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> 00271 00272 <span class="preprocessor">#endif </span><span class="comment">/* OpenSOAP_StringHash_H */</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 18 18:29:44 2004 for OpenSOAP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6 </small></address> </body> </html>
{ "pile_set_name": "Github" }
." Copyright (c) 2004, 2011, 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. ." ." 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. ." .TH jinfo 1 "16 Mar 2012" .LP .SH "Name" jinfo \- Configuration Info .LP .SH "SYNOPSIS" .LP .nf \f3 .fl \fP\f3jinfo\fP [ option ] pid .fl \f3jinfo\fP [ option ] executable core .fl \f3jinfo\fP [ option ] [server\-id@]remote\-hostname\-or\-IP .fl .fi .LP .SH "PARAMETERS" .LP .RS 3 .TP 3 option Options are mutually exclusive. Option, if used, should follow immediately after the command name. .RE .LP .RS 3 .TP 3 pid process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. .RE .LP .RS 3 .TP 3 executable Java executable from which the core dump was produced. .RE .LP .RS 3 .TP 3 core core file for which the configuration info is to be printed. .RE .LP .RS 3 .TP 3 remote\-hostname\-or\-IP remote debug server's (see jsadebugd(1)) hostname or IP address. .RE .LP .RS 3 .TP 3 server\-id optional unique id, if multiple debug servers are running on the same remote host. .RE .LP .SH "DESCRIPTION" .LP .LP \f3jinfo\fP prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.: .br jinfo \-J\-d64 \-sysprops pid .LP .LP \f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' need to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP .LP .LP \f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP .LP .SH "OPTIONS" .LP .RS 3 .TP 3 <no option> prints both command line flags as well as System properties name, value pairs. .br .TP 3 \-flag name prints the name and value of the given command line flag. .br .TP 3 \-flag [+|\-]name enables or disables the given boolean command line flag. .br .TP 3 \-flag name=value sets the given command line flag to the specified value. .br .TP 3 \-flags prints command line flags passed to the JVM. pairs. .br .TP 3 \-sysprops prints Java System properties as name, value pairs. .br .TP 3 \-h prints a help message .TP 3 \-help prints a help message .RE .LP .SH "SEE ALSO" .LP .RS 3 .TP 2 o jps(1) .TP 2 o jsadebugd(1) .RE .LP
{ "pile_set_name": "Github" }
<#PSScriptInfo .VERSION 1.0.1 .GUID 8fced2a6-bb34-400c-a44e-2c484e3bc9e3 .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT DSC Community contributors. All rights reserved. .TAGS DSCConfiguration .LICENSEURI https://github.com/dsccommunity/ActiveDirectoryDsc/blob/master/LICENSE .PROJECTURI https://github.com/dsccommunity/ActiveDirectoryDsc .ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png .RELEASENOTES Updated author, copyright notice, and URLs. #> #Requires -Module ActiveDirectoryDsc <# .DESCRIPTION This configuration will remove the Active Directory replication site called 'Cupertino'. #> Configuration ADReplicationSite_RemoveADReplicationSite_Config { Import-DscResource -Module ActiveDirectoryDsc Node localhost { ADReplicationSite 'CupertinoSite' { Ensure = 'Absent' Name = 'Cupertino' } } }
{ "pile_set_name": "Github" }
/*- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _CONSTR_SEQUENCE_H_ #define _CONSTR_SEQUENCE_H_ #include <asn_application.h> #ifdef __cplusplus extern "C" { #endif typedef const struct asn_SEQUENCE_specifics_s { /* * Target structure description. */ int struct_size; /* Size of the target structure. */ int ctx_offset; /* Offset of the asn_struct_ctx_t member */ /* * Tags to members mapping table (sorted). */ const asn_TYPE_tag2member_t *tag2el; int tag2el_count; /* * Optional members of the extensions root (roms) or additions (aoms). * Meaningful for PER. */ const int *oms; /* Optional MemberS */ int roms_count; /* Root optional members count */ int aoms_count; /* Additions optional members count */ /* * Description of an extensions group. */ int ext_after; /* Extensions start after this member */ int ext_before; /* Extensions stop before this member */ } asn_SEQUENCE_specifics_t; /* * A set specialized functions dealing with the SEQUENCE type. */ asn_struct_free_f SEQUENCE_free; asn_struct_print_f SEQUENCE_print; asn_constr_check_f SEQUENCE_constraint; ber_type_decoder_f SEQUENCE_decode_ber; der_type_encoder_f SEQUENCE_encode_der; xer_type_decoder_f SEQUENCE_decode_xer; xer_type_encoder_f SEQUENCE_encode_xer; per_type_decoder_f SEQUENCE_decode_uper; per_type_encoder_f SEQUENCE_encode_uper; #ifdef __cplusplus } #endif #endif /* _CONSTR_SEQUENCE_H_ */
{ "pile_set_name": "Github" }
``` php <?php phpinfo(); ?> ```
{ "pile_set_name": "Github" }
package com.epam.jdi.uitests.web.selenium.elements.complex.table; /* * Copyright 2004-2016 EPAM Systems * * This file is part of JDI project. * * JDI 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. * * JDI 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 JDI. If not, see <http://www.gnu.org/licenses/>. */ import com.epam.commons.LinqUtils; import com.epam.commons.linqinterfaces.JFuncTREx; import com.epam.commons.map.MapArray; import com.epam.jdi.uitests.core.interfaces.base.IBaseElement; import com.epam.jdi.uitests.core.interfaces.complex.tables.interfaces.Column; import com.epam.jdi.uitests.core.interfaces.complex.tables.interfaces.ICell; import com.epam.jdi.uitests.core.interfaces.complex.tables.interfaces.IEntityTable; import java.lang.reflect.Field; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.function.Function; import static com.epam.commons.LinqUtils.select; import static com.epam.commons.LinqUtils.where; import static com.epam.commons.PrintUtils.print; import static com.epam.commons.ReflectionUtils.*; import static com.epam.commons.StringUtils.LINE_BREAK; import static com.epam.jdi.uitests.core.settings.JDISettings.exception; import static com.epam.jdi.uitests.core.settings.JDISettings.logger; import static org.apache.commons.lang3.reflect.FieldUtils.writeField; /** * Created by Sergey_Mishanin on 11/18/16. */ // Use following initialization for Entity table: 'public EntityTable<Entity, Row> jobsListEntity = new EntityTable<>(Entity.class, Row.class);' public class EntityTable<E, R> extends Table implements IEntityTable<E,R> { private Class<R> rowClass; private Class<E> entityClass; public EntityTable(Class<E> entityClass) { this.entityClass = checkEntityIsNotNull(entityClass); hasColumnHeaders(select(entityClass.getDeclaredFields(), Field::getName)); } public EntityTable(Class<E> entityClass, Class<R> rowClass){ this(entityClass); this.rowClass = rowClass; } private R newRow(){ if (rowClass == null) throw exception("Row class was not specified"); try { return rowClass.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw exception("Can't Instantiate row: " + rowClass.getName()); } } private R castToRow(MapArray<String, ICell> row) { R newRow = newRow(); row.pairs.forEach(pair -> setRowField(newRow, newRow.getClass().getFields(), pair.key, pair.value)); return newRow; } private void setField(Object row, Field[] fields, String fieldName, Function<Field, Object> valueFunc) { Field field = LinqUtils.first(fields, f -> f.getName().equalsIgnoreCase(fieldName)); if (field == null) return; try { writeField(field, row, valueFunc.apply(field), true); } catch (IllegalAccessException e) { throw exception("Can't write field with name: " + fieldName); } } private void setRowField(R row, Field[] fields, String fieldName, ICell cell) { setField(row, fields, fieldName, field -> { Class clazz = field.getType(); if (clazz == null) return null; IBaseElement value; try { value = cell.get(clazz); } catch (Exception e) { throw exception("Can't Instantiate row element: " + fieldName); } return value; }); } public List<R> getRows() { return select(rows().get(), row -> castToRow(row.value)); } public R firstRow(JFuncTREx<R, Boolean> rule) { List<R> rows = getRows(rule); if (rows.size() > 0) return rows.get(0); else { logger.info("Can't find any rows that meat criterias"); return null; } } public List<R> getRows(JFuncTREx<R, Boolean> rule) { List<R> rows = where(getRows(), rule); if (rows.size() == 0) logger.info("Can't find any rows that meat criterias"); return rows; } public R getRow(String value, Column column) { return castToRow(row(value, column)); } public R getRow(int rowNum) { return castToRow(row(rowNum)); } public R getRow(String rowName) { return castToRow(row(rowName)); } private E rowToEntity(MapArray<String, ICell> row) { E entity = newEntity(entityClass); if (row == null) return entity; Field[] fields = entity.getClass().getFields(); row.pairs.forEach(entry -> setEntityField(entity, fields, entry.key, entry.value.getText())); return entity; } public List<E> entities(String... colNames){ return select(colNames, colName -> rowToEntity(columns.getColumn(colName))); } public List<R> getRows(String... colNames) { return select(colNames, colName -> castToRow(columns.getColumn(colName))); } public List<E> entities(JFuncTREx<E, Boolean> rule) { List<E> entities = where(entities(), rule); if (rows.size() == 0) logger.info("Can't find any rows that meat criterias"); return entities; } public E entity(JFuncTREx<E, Boolean> rule) { List<E> rows = entities(rule); if (rows.size() > 0) return rows.get(0); else { logger.info("Can't find any rows that meat criterias"); return null; } } public E entity(int rowNum){ return rowToEntity(rows.getRow(rowNum)); } public E entity(String value, Column column){ return rowToEntity(row(value, column)); } public E entity(String rowName){ return rowToEntity(rows.getRow(rowName)); } public List<E> all(){ List<E> result = logger.logOff(() -> select(rows.get().values(), this::rowToEntity)); logger.info("Got entities from table: " + LINE_BREAK + print(select(result, Object::toString), LINE_BREAK)); return result; } private void setEntityField(E entity, Field[] fields, String fieldName, String value) { setField(entity, fields, fieldName, field -> convertStringToType(value, field)); } public int size() { return rows.count(); } public boolean contains(Object o) { return allCells.contains(o); } public Iterator<E> iterator() { return all().iterator(); } public Object[] toArray() { return all().toArray(); } public <T1> T1[] toArray(T1[] a) { return all().toArray(a); } public boolean add(E t) { throw new UnsupportedOperationException(); } public boolean remove(Object o) { throw new UnsupportedOperationException(); } public boolean containsAll(Collection<?> c) { return all().containsAll(c); } public boolean addAll(Collection<? extends E> c) { throw new UnsupportedOperationException(); } public boolean addAll(int index, Collection<? extends E> c) { throw new UnsupportedOperationException(); } public boolean removeAll(Collection<?> c) { throw new UnsupportedOperationException(); } public boolean retainAll(Collection<?> c) { throw new UnsupportedOperationException(); } public E get(int index) { return entity(index); } public E set(int index, E element) { throw new UnsupportedOperationException(); } public void add(int index, E element) { throw new UnsupportedOperationException(); } public E remove(int index) { throw new UnsupportedOperationException(); } public int indexOf(Object o) { return all().indexOf(o); } public int lastIndexOf(Object o) { return all().lastIndexOf(o); } public ListIterator<E> listIterator() { return all().listIterator(); } public ListIterator<E> listIterator(int index) { return all().listIterator(index); } public List<E> subList(int fromIndex, int toIndex) { return all().subList(fromIndex, toIndex); } }
{ "pile_set_name": "Github" }
digiCamControl - DSLR camera remote control open source software Copyright (C) 2019 Duka Istvan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "pile_set_name": "Github" }
// 3D World - Classes for procedural animals // by Frank Gennari // 3-17-16 #pragma once #include "3DWorld.h" #include "function_registry.h" #include "inlines.h" class tile_t; struct tile_offset_t { int dxoff, dyoff; tile_offset_t(int dxoff_=0, int dyoff_=0) : dxoff(dxoff_), dyoff(dyoff_) {} void set_from_xyoff2() {dxoff = -xoff2; dyoff = -yoff2;} int get_delta_xoff() const {return ((xoff - xoff2) - dxoff);} int get_delta_yoff() const {return ((yoff - yoff2) - dyoff);} vector3d get_xlate() const {return vector3d(get_delta_xoff()*DX_VAL, get_delta_yoff()*DY_VAL, 0.0);} vector3d subtract_from(tile_offset_t const &o) const {return vector3d((o.dxoff - dxoff)*DX_VAL, (o.dyoff - dyoff)*DY_VAL, 0.0);} }; class animal_t : public sphere_t { public: vector3d velocity; protected: bool enabled; vector3d dir; colorRGBA color; //tile_offset_t tile_off; int get_ndiv(point const &pos_) const; void gen_dir_vel(rand_gen_t &rgen, float speed); float heading() const {return atan2(velocity.x, velocity.y);} public: animal_t() : enabled(0) {} void apply_force(vector3d const &force) {velocity += force;} void apply_force_xy(vector3d const &force) {velocity.x += force.x; velocity.y += force.y;} bool is_enabled() const {return enabled;} bool is_visible(point const &pos_, float vis_dist_scale=1.0) const; point get_draw_pos() const; }; class fish_t : public animal_t { float get_mesh_zval_at_pos(tile_t const *const tile) const; float get_half_height() const {return 0.4*radius;} // approximate public: bool gen(rand_gen_t &rgen, cube_t const &range, tile_t const *const tile); bool update(rand_gen_t &rgen, tile_t const *const tile); void draw(shader_t &s) const; }; class bird_t : public animal_t { bool flocking; float time; public: bird_t() : flocking(0), time(0) {} bool gen(rand_gen_t &rgen, cube_t const &range, tile_t const *const tile); bool update(rand_gen_t &rgen, tile_t const *const tile); void apply_force_xy_const_vel(vector3d const &force); void draw(shader_t &s) const; }; class animal_group_base_t { protected: rand_gen_t rgen; bool generated; public: animal_group_base_t() : generated(0) {} bool was_generated() const {return generated;} }; template<typename A> class animal_group_t : public vector<A>, public animal_group_base_t { cube_t bcube; public: void gen(unsigned num, cube_t const &range, tile_t const *const tile); void update(tile_t const *const tile); void remove(unsigned ix); void remove_disabled(); void draw_animals(shader_t &s) const; void clear() {vector<A>::clear(); generated = 0;} }; struct vect_fish_t : public animal_group_t<fish_t> { static void begin_draw(shader_t &s); static void end_draw(shader_t &s); void draw() const; }; struct vect_bird_t : public animal_group_t<bird_t> { void flock(tile_t const *const tile); static void begin_draw(shader_t &s); static void end_draw(shader_t &s); void draw() const; }; bool birds_active();
{ "pile_set_name": "Github" }
require('dotenv').config() module.exports = { env: { REALTIME_URL: process.env.REALTIME_URL, DB_HOST: process.env.DB_HOST, DB_NAME: process.env.DB_NAME, DB_USER: process.env.DB_USER, DB_PASSWORD: process.env.DB_PASSWORD, DB_PORT: process.env.DB_PORT, }, }
{ "pile_set_name": "Github" }
/* Copyright The containerd 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 images
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Lua/C API Extensions</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Mike Pall"> <meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall"> <meta name="Language" content="en"> <link rel="stylesheet" type="text/css" href="bluequad.css" media="screen"> <link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print"> </head> <body> <div id="site"> <a href="http://luajit.org"><span>Lua<span id="logo">JIT</span></span></a> </div> <div id="head"> <h1>Lua/C API Extensions</h1> </div> <div id="nav"> <ul><li> <a href="luajit.html">LuaJIT</a> <ul><li> <a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a> </li><li> <a href="install.html">Installation</a> </li><li> <a href="running.html">Running</a> </li></ul> </li><li> <a href="extensions.html">Extensions</a> <ul><li> <a href="ext_ffi.html">FFI Library</a> <ul><li> <a href="ext_ffi_tutorial.html">FFI Tutorial</a> </li><li> <a href="ext_ffi_api.html">ffi.* API</a> </li><li> <a href="ext_ffi_semantics.html">FFI Semantics</a> </li></ul> </li><li> <a href="ext_jit.html">jit.* Library</a> </li><li> <a class="current" href="ext_c_api.html">Lua/C API</a> </li><li> <a href="ext_profiler.html">Profiler</a> </li></ul> </li><li> <a href="status.html">Status</a> <ul><li> <a href="changes.html">Changes</a> </li></ul> </li><li> <a href="faq.html">FAQ</a> </li><li> <a href="http://luajit.org/performance.html">Performance <span class="ext">&raquo;</span></a> </li><li> <a href="http://wiki.luajit.org/">Wiki <span class="ext">&raquo;</span></a> </li><li> <a href="http://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> </li></ul> </div> <div id="main"> <p> LuaJIT adds some extensions to the standard Lua/C API. The LuaJIT include directory must be in the compiler search path (<tt>-I<i>path</i></tt>) to be able to include the required header for C code: </p> <pre class="code"> #include "luajit.h" </pre> <p> Or for C++ code: </p> <pre class="code"> #include "lua.hpp" </pre> <h2 id="luaJIT_setmode"><tt>luaJIT_setmode(L, idx, mode)</tt> &mdash; Control VM</h2> <p> This is a C API extension to allow control of the VM from C code. The full prototype of <tt>LuaJIT_setmode</tt> is: </p> <pre class="code"> LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); </pre> <p> The returned status is either success (<tt>1</tt>) or failure (<tt>0</tt>). The second argument is either <tt>0</tt> or a stack index (similar to the other Lua/C API functions). </p> <p> The third argument specifies the mode, which is 'or'ed with a flag. The flag can be <tt>LUAJIT_MODE_OFF</tt> to turn a feature on, <tt>LUAJIT_MODE_ON</tt> to turn a feature off, or <tt>LUAJIT_MODE_FLUSH</tt> to flush cached code. </p> <p> The following modes are defined: </p> <h3 id="mode_engine"><tt>luaJIT_setmode(L, 0, LUAJIT_MODE_ENGINE|flag)</tt></h3> <p> Turn the whole JIT compiler on or off or flush the whole cache of compiled code. </p> <h3 id="mode_func"><tt>luaJIT_setmode(L, idx, LUAJIT_MODE_FUNC|flag)</tt><br> <tt>luaJIT_setmode(L, idx, LUAJIT_MODE_ALLFUNC|flag)</tt><br> <tt>luaJIT_setmode(L, idx, LUAJIT_MODE_ALLSUBFUNC|flag)</tt></h3> <p> This sets the mode for the function at the stack index <tt>idx</tt> or the parent of the calling function (<tt>idx = 0</tt>). It either enables JIT compilation for a function, disables it and flushes any already compiled code or only flushes already compiled code. This applies recursively to all sub-functions of the function with <tt>LUAJIT_MODE_ALLFUNC</tt> or only to the sub-functions with <tt>LUAJIT_MODE_ALLSUBFUNC</tt>. </p> <h3 id="mode_trace"><tt>luaJIT_setmode(L, trace,<br> &nbsp;&nbsp;LUAJIT_MODE_TRACE|LUAJIT_MODE_FLUSH)</tt></h3> <p> Flushes the specified root trace and all of its side traces from the cache. The code for the trace will be retained as long as there are any other traces which link to it. </p> <h3 id="mode_wrapcfunc"><tt>luaJIT_setmode(L, idx, LUAJIT_MODE_WRAPCFUNC|flag)</tt></h3> <p> This mode defines a wrapper function for calls to C functions. If called with <tt>LUAJIT_MODE_ON</tt>, the stack index at <tt>idx</tt> must be a <tt>lightuserdata</tt> object holding a pointer to the wrapper function. From now on all C functions are called through the wrapper function. If called with <tt>LUAJIT_MODE_OFF</tt> this mode is turned off and all C functions are directly called. </p> <p> The wrapper function can be used for debugging purposes or to catch and convert foreign exceptions. But please read the section on <a href="extensions.html#exceptions">C++&nbsp;exception interoperability</a> first. Recommended usage can be seen in this C++ code excerpt: </p> <pre class="code"> #include &lt;exception&gt; #include "lua.hpp" // Catch C++ exceptions and convert them to Lua error messages. // Customize as needed for your own exception classes. static int wrap_exceptions(lua_State *L, lua_CFunction f) { try { return f(L); // Call wrapped function and return result. } catch (const char *s) { // Catch and convert exceptions. lua_pushstring(L, s); } catch (std::exception& e) { lua_pushstring(L, e.what()); } catch (...) { lua_pushliteral(L, "caught (...)"); } return lua_error(L); // Rethrow as a Lua error. } static int myinit(lua_State *L) { ... // Define wrapper function and enable it. lua_pushlightuserdata(L, (void *)wrap_exceptions); luaJIT_setmode(L, -1, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_ON); lua_pop(L, 1); ... } </pre> <p> Note that you can only define <b>a single global wrapper function</b>, so be careful when using this mechanism from multiple C++ modules. Also note that this mechanism is not without overhead. </p> <br class="flush"> </div> <div id="foot"> <hr class="hide"> Copyright &copy; 2005-2017 Mike Pall <span class="noprint"> &middot; <a href="contact.html">Contact</a> </span> </div> </body> </html>
{ "pile_set_name": "Github" }
2.0.3 (2013-09-26) * fix for UTF-8 support on Linux builds * add spec file for RPM packaging 2.0.2 (12/04/2011) * Fixed exception text construction bug (pointer + offset, instead of std::string + std::string) * Fixed crash in UnknownElement::operator= * Fixed bug where object member names couldn't contain special characters * Fixed crash when parsing an incomplete document * Cosmetic changes to parser * Added proper BSD license text 2.0.1 (11/17/2009) * A couple of Reader functions not inlined, sometimes resulting in linker duplicate symbols. Oops. 2.0.0 (11/14/2009) * Redesign/simplicification of the element class relationships: * Element/Element_T base class or *Imp classes eliminated. Originally necessary for aggregation by Object/Array, but now unnecessary with UnknownElement type * json_cast<> functions eliminated. Static type safety relaxed, allowing more concise document data extraction code (dynamic type safety still completely maintained). * Quick-Interpreter/-Builder classes eliminated. Equivalent functionality now in "UnknownElement", but now more accessible In summary, simpler design, less code in library, less code necessary to utilize library. See test app for many more new examples. * Entire library is now inlined. Bound to be controversial, but... * Modern compilers should eliminate redundant object code * Fixes problems associated with different runtime libraries, library debug information, security & debug iterator compile-time options under MSVC++, among other things. * Simply include the appropriate file & go - no linker settings to mess with. * Added 64-bit build targets for MSVC 8/9 test app, just because. * Scan/Parse exceptions moved into Reader class scope, and Parse exceptions fixed to always include bad token string * A few more random bug fixes * Tested under: * MSVC++ 2005 * MSVC++ 2008 * GCC 4.4.0 1.1.0 (08/30/2009) * Implemented operator == for all element types * Added makefile for building with g++ (thanks George Morgan). * Fixed a few compiler errors on non-Visual Studio compilers (my C++ wasn't as ANSI as I thought...) * Support for (non-standard) comments REMOVED * Support for Visual Studio 7.1 (2003) REMOVED * Fixed the "Unexpected token..." exception string (was gibberish) * Improvements to the QuickInterpreter & QuickBuilder interfaces * Elements now sanity-check themselves during operations and throw an exception accordingly, for example if an Object gets tricked into thinking it's an Array (reinterpret_cast, reading a document with an Array root element into an Object, etc) * Other random minor bug fixes & general cleanup 1.0.0 (01/31/2009) * Initial release! Remaining work: better documentation, better test/sample app, yada yada
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout 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="match_parent"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> </android.support.design.widget.AppBarLayout> <include layout="@layout/content_main" /> </android.support.design.widget.CoordinatorLayout>
{ "pile_set_name": "Github" }
0 1 1.779840e-002 -1.000000e+000 8.237392e-001
{ "pile_set_name": "Github" }
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <style> .param_th{ text-align:center!important; font-size:14px; padding:5px; } .param_td_oper{ text-align:center!important; } .imgItem_td_1{ width:60px; height:100px; padding:2px; margin:2px; } .imgItem_td_1 img{ width:60px; } .basic_td{ text-align:left!important; } </style> <div align="center" > <div class="easyui-tabs" id="tabActivity" style="width:100%"> <div title="平台渠道分成配置" style="padding:10px;text-align:center"> <form id="sdkChannelConfigForm" method="post"> <table class="tableForm" style="width:99%;"> <tr> <th>SDK广告渠道标识:</th> <td colspan="3" style="text-align:left"> <input name="channelFlag" value="${sdkChannelConfigVo.channelFlag}" data-options="required:true" class="easyui-textbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>SDK广告渠道名称:</th> <td colspan="3" style="text-align:left"> <input name="channelName" value="${sdkChannelConfigVo.channelName}" data-options="required:true" class="easyui-textbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>换算比例:</th> <td colspan="3" style="text-align:left"> <input name="cRate" value="${sdkChannelConfigVo.cRate}" data-options="required:true" class="easyui-textbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>分成比例:</th> <td colspan="3" style="text-align:left"> <input name="sRate" value="${sdkChannelConfigVo.sRate}" data-options="required:true" class="easyui-textbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>优先级:</th> <td colspan="3" style="text-align:left"> <input name="orderNo" value="${sdkChannelConfigVo.orderNo}" data-options="required:true" class="easyui-numberbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>平台回调秘钥:</th> <td colspan="3" style="text-align:left"> <input name="sdkPwd" value="${sdkChannelConfigVo.sdkPwd}" data-options="required:true" class="easyui-textbox" style="width:95%; text-align:left"/> </td> </tr> <tr> <th>是否启用:</th> <td colspan="3" style="text-align:left"> <select id="isEnabledFlag" name="isEnabledFlag" class="easyui-combobox" data-options=" onSelect:function(data){ $('#isEnabled').val(data.value); }" style="width:95%; text-align:left" editable=false> <option value="1">禁用</option> <option value="2">启用</option> </select> </td> </tr> </table> <input name="id" type="hidden" value="${sdkChannelConfigVo.id}"/> <input name="isEnabled" id="isEnabled" type="hidden" value="${sdkChannelConfigVo.isEnabled}"/> </form> </div> </div> </div> <script type="text/javascript"> $(function(){ var select = document.getElementById("isEnabledFlag"); var value = $('#isEnabled').val(); for(var i=0; i<select.options.length; i++){ //alert('value='+select.options[i].value+', value='+value); if(select.options[i].value == value){ select.options[i].selected = true; break; } } }); </script>
{ "pile_set_name": "Github" }
{ "private": true, "scripts": { "start": "webpack-dev-server --inline", "build": "webpack" }, "dependencies": { "angular": "^1.4.8", "angular-route": "^1.4.8" }, "devDependencies": { "babel-core": "^6.2.1", "babel-loader": "^6.2.0", "babel-preset-es2015": "^6.1.18", "css-loader": "^0.23.0", "extract-text-webpack-plugin": "^0.9.1", "html-webpack-plugin": "^1.6.2", "webpack": "^1.12.6", "webpack-dev-server": "^1.12.1" } }
{ "pile_set_name": "Github" }
import random from mmf.common.sample import Sample from mmf.datasets.builders.coco import COCODataset class MaskedCOCODataset(COCODataset): def __init__(self, config, dataset_type, imdb_file_index, *args, **kwargs): super().__init__(config, dataset_type, imdb_file_index, *args, **kwargs) self.dataset_name = "masked_coco" self._two_sentence = config.get("two_sentence", True) self._false_caption = config.get("false_caption", True) self._two_sentence_probability = config.get("two_sentence_probability", 0.5) self._false_caption_probability = config.get("false_caption_probability", 0.5) def load_item(self, idx): sample_info = self.annotation_db[idx] current_sample = Sample() if self._use_features: features = self.features_db[idx] if hasattr(self, "transformer_bbox_processor"): features["image_info_0"] = self.transformer_bbox_processor( features["image_info_0"] ) if self.config.get("use_image_feature_masks", False): current_sample.update( { "image_labels": self.masked_region_processor( features["image_feature_0"] ) } ) current_sample.update(features) else: image_path = str(sample_info["image_name"]) + ".jpg" current_sample.image = self.image_db.from_path(image_path)["images"][0] current_sample = self._add_masked_caption(sample_info, current_sample) return current_sample def _add_masked_caption(self, sample_info, current_sample): captions = sample_info["captions"] image_id = sample_info["image_id"] num_captions = len(captions) selected_caption_index = random.randint(0, num_captions - 1) other_caption_indices = [ i for i in range(num_captions) if i != selected_caption_index ] selected_caption = captions[selected_caption_index] other_caption = None is_correct = -1 if self._dataset_type == "train": if self._two_sentence: if random.random() > self._two_sentence_probability: other_caption = self._get_mismatching_caption(image_id) is_correct = False else: other_caption = captions[random.choice(other_caption_indices)] is_correct = True elif self._false_caption: if random.random() < self._false_caption_probability: selected_caption = self._get_mismatching_caption(image_id) is_correct = False else: is_correct = True processed = self.masked_token_processor( { "text_a": selected_caption, "text_b": other_caption, "is_correct": is_correct, } ) processed.pop("tokens") current_sample.update(processed) return current_sample def _get_mismatching_caption(self, image_id): other_item = self.annotation_db[random.randint(0, len(self.annotation_db) - 1)] while other_item["image_id"] == image_id: other_item = self.annotation_db[ random.randint(0, len(self.annotation_db) - 1) ] other_caption = other_item["captions"][ random.randint(0, len(other_item["captions"]) - 1) ] return other_caption
{ "pile_set_name": "Github" }
<resources> <string name="app_name">niceimageview</string> </resources>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2008-2011 Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef EEPROM_H #define EEPROM_H #define AR_EEPROM_MODAL_SPURS 5 #include "../ath.h" #include <net/cfg80211.h> #include "ar9003_eeprom.h" /* helpers to swap EEPROM fields, which are stored as __le16 or __le32. Since * we are 100% sure about it we __force these to u16/u32 for the swab calls to * silence the sparse checks. These macros are used when we have a Big Endian * EEPROM (according to AR5416_EEPMISC_BIG_ENDIAN) and need to convert the * fields to __le16/__le32. */ #define EEPROM_FIELD_SWAB16(field) \ (field = (__force __le16)swab16((__force u16)field)) #define EEPROM_FIELD_SWAB32(field) \ (field = (__force __le32)swab32((__force u32)field)) #ifdef __BIG_ENDIAN #define AR5416_EEPROM_MAGIC 0x5aa5 #else #define AR5416_EEPROM_MAGIC 0xa55a #endif #define CTRY_DEBUG 0x1ff #define CTRY_DEFAULT 0 #define AR_EEPROM_EEPCAP_COMPRESS_DIS 0x0001 #define AR_EEPROM_EEPCAP_AES_DIS 0x0002 #define AR_EEPROM_EEPCAP_FASTFRAME_DIS 0x0004 #define AR_EEPROM_EEPCAP_BURST_DIS 0x0008 #define AR_EEPROM_EEPCAP_MAXQCU 0x01F0 #define AR_EEPROM_EEPCAP_MAXQCU_S 4 #define AR_EEPROM_EEPCAP_HEAVY_CLIP_EN 0x0200 #define AR_EEPROM_EEPCAP_KC_ENTRIES 0xF000 #define AR_EEPROM_EEPCAP_KC_ENTRIES_S 12 #define AR_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040 #define AR_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080 #define AR_EEPROM_EEREGCAP_EN_KK_U2 0x0100 #define AR_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200 #define AR_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400 #define AR_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800 #define AR_EEPROM_EEREGCAP_EN_KK_U1_ODD_PRE4_0 0x4000 #define AR_EEPROM_EEREGCAP_EN_KK_NEW_11A_PRE4_0 0x8000 #define AR5416_EEPROM_MAGIC_OFFSET 0x0 #define AR5416_EEPROM_S 2 #define AR5416_EEPROM_OFFSET 0x2000 #define AR5416_EEPROM_MAX 0xae0 #define AR5416_EEPROM_START_ADDR \ (AR_SREV_9100(ah)) ? 0x1fff1000 : 0x503f1200 #define SD_NO_CTL 0xE0 #define NO_CTL 0xff #define CTL_MODE_M 0xf #define CTL_11A 0 #define CTL_11B 1 #define CTL_11G 2 #define CTL_2GHT20 5 #define CTL_5GHT20 6 #define CTL_2GHT40 7 #define CTL_5GHT40 8 #define EXT_ADDITIVE (0x8000) #define CTL_11A_EXT (CTL_11A | EXT_ADDITIVE) #define CTL_11G_EXT (CTL_11G | EXT_ADDITIVE) #define CTL_11B_EXT (CTL_11B | EXT_ADDITIVE) #define SUB_NUM_CTL_MODES_AT_5G_40 2 #define SUB_NUM_CTL_MODES_AT_2G_40 3 #define POWER_CORRECTION_FOR_TWO_CHAIN 6 /* 10*log10(2)*2 */ #define POWER_CORRECTION_FOR_THREE_CHAIN 10 /* 10*log10(3)*2 */ /* * For AR9285 and later chipsets, the following bits are not being programmed * in EEPROM and so need to be enabled always. * * Bit 0: en_fcc_mid * Bit 1: en_jap_mid * Bit 2: en_fcc_dfs_ht40 * Bit 3: en_jap_ht40 * Bit 4: en_jap_dfs_ht40 */ #define AR9285_RDEXT_DEFAULT 0x1F #define ATH9K_POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) #define FREQ2FBIN(x, y) (u8)((y) ? ((x) - 2300) : (((x) - 4800) / 5)) #define FBIN2FREQ(x, y) ((y) ? (2300 + x) : (4800 + 5 * x)) #define ath9k_hw_use_flash(_ah) (!(_ah->ah_flags & AH_USE_EEPROM)) #define OLC_FOR_AR9280_20_LATER (AR_SREV_9280_20_OR_LATER(ah) && \ ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) #define OLC_FOR_AR9287_10_LATER (AR_SREV_9287_11_OR_LATER(ah) && \ ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) #define EEP_RFSILENT_ENABLED 0x0001 #define EEP_RFSILENT_ENABLED_S 0 #define EEP_RFSILENT_POLARITY 0x0002 #define EEP_RFSILENT_POLARITY_S 1 #define EEP_RFSILENT_GPIO_SEL ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x00fc : 0x001c) #define EEP_RFSILENT_GPIO_SEL_S 2 #define AR5416_OPFLAGS_11A 0x01 #define AR5416_OPFLAGS_11G 0x02 #define AR5416_OPFLAGS_N_5G_HT40 0x04 #define AR5416_OPFLAGS_N_2G_HT40 0x08 #define AR5416_OPFLAGS_N_5G_HT20 0x10 #define AR5416_OPFLAGS_N_2G_HT20 0x20 #define AR5416_EEP_NO_BACK_VER 0x1 #define AR5416_EEP_VER 0xE #define AR5416_EEP_VER_MAJOR_SHIFT 12 #define AR5416_EEP_VER_MAJOR_MASK 0xF000 #define AR5416_EEP_VER_MINOR_MASK 0x0FFF #define AR5416_EEP_MINOR_VER_2 0x2 #define AR5416_EEP_MINOR_VER_3 0x3 #define AR5416_EEP_MINOR_VER_7 0x7 #define AR5416_EEP_MINOR_VER_9 0x9 #define AR5416_EEP_MINOR_VER_16 0x10 #define AR5416_EEP_MINOR_VER_17 0x11 #define AR5416_EEP_MINOR_VER_19 0x13 #define AR5416_EEP_MINOR_VER_20 0x14 #define AR5416_EEP_MINOR_VER_21 0x15 #define AR5416_EEP_MINOR_VER_22 0x16 #define AR5416_NUM_5G_CAL_PIERS 8 #define AR5416_NUM_2G_CAL_PIERS 4 #define AR5416_NUM_5G_20_TARGET_POWERS 8 #define AR5416_NUM_5G_40_TARGET_POWERS 8 #define AR5416_NUM_2G_CCK_TARGET_POWERS 3 #define AR5416_NUM_2G_20_TARGET_POWERS 4 #define AR5416_NUM_2G_40_TARGET_POWERS 4 #define AR5416_NUM_CTLS 24 #define AR5416_NUM_BAND_EDGES 8 #define AR5416_NUM_PD_GAINS 4 #define AR5416_PD_GAINS_IN_MASK 4 #define AR5416_PD_GAIN_ICEPTS 5 #define AR5416_NUM_PDADC_VALUES 128 #define AR5416_BCHAN_UNUSED 0xFF #define AR5416_MAX_PWR_RANGE_IN_HALF_DB 64 #define AR5416_MAX_CHAINS 3 #define AR9300_MAX_CHAINS 3 #define AR5416_PWR_TABLE_OFFSET_DB -5 /* Rx gain type values */ #define AR5416_EEP_RXGAIN_23DB_BACKOFF 0 #define AR5416_EEP_RXGAIN_13DB_BACKOFF 1 #define AR5416_EEP_RXGAIN_ORIG 2 /* Tx gain type values */ #define AR5416_EEP_TXGAIN_ORIGINAL 0 #define AR5416_EEP_TXGAIN_HIGH_POWER 1 /* Endianness of EEPROM content */ #define AR5416_EEPMISC_BIG_ENDIAN 0x01 #define AR5416_EEP4K_START_LOC 64 #define AR5416_EEP4K_NUM_2G_CAL_PIERS 3 #define AR5416_EEP4K_NUM_2G_CCK_TARGET_POWERS 3 #define AR5416_EEP4K_NUM_2G_20_TARGET_POWERS 3 #define AR5416_EEP4K_NUM_2G_40_TARGET_POWERS 3 #define AR5416_EEP4K_NUM_CTLS 12 #define AR5416_EEP4K_NUM_BAND_EDGES 4 #define AR5416_EEP4K_NUM_PD_GAINS 2 #define AR5416_EEP4K_MAX_CHAINS 1 #define AR9280_TX_GAIN_TABLE_SIZE 22 #define AR9287_EEP_VER 0xE #define AR9287_EEP_MINOR_VER_1 0x1 #define AR9287_EEP_MINOR_VER_2 0x2 #define AR9287_EEP_MINOR_VER_3 0x3 #define AR9287_EEP_MINOR_VER AR9287_EEP_MINOR_VER_3 #define AR9287_EEP_MINOR_VER_b AR9287_EEP_MINOR_VER #define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1 #define AR9287_EEP_START_LOC 128 #define AR9287_HTC_EEP_START_LOC 256 #define AR9287_NUM_2G_CAL_PIERS 3 #define AR9287_NUM_2G_CCK_TARGET_POWERS 3 #define AR9287_NUM_2G_20_TARGET_POWERS 3 #define AR9287_NUM_2G_40_TARGET_POWERS 3 #define AR9287_NUM_CTLS 12 #define AR9287_NUM_BAND_EDGES 4 #define AR9287_PD_GAIN_ICEPTS 1 #define AR9287_EEPMISC_WOW 0x02 #define AR9287_MAX_CHAINS 2 #define AR9287_ANT_16S 32 #define AR9287_DATA_SZ 32 #define AR9287_PWR_TABLE_OFFSET_DB -5 #define AR9287_CHECKSUM_LOCATION (AR9287_EEP_START_LOC + 1) #define CTL_EDGE_TPOWER(_ctl) ((_ctl) & 0x3f) #define CTL_EDGE_FLAGS(_ctl) (((_ctl) >> 6) & 0x03) #define LNA_CTL_BUF_MODE BIT(0) #define LNA_CTL_ISEL_LO BIT(1) #define LNA_CTL_ISEL_HI BIT(2) #define LNA_CTL_BUF_IN BIT(3) #define LNA_CTL_FEM_BAND BIT(4) #define LNA_CTL_LOCAL_BIAS BIT(5) #define LNA_CTL_FORCE_XPA BIT(6) #define LNA_CTL_USE_ANT1 BIT(7) enum eeprom_param { EEP_NFTHRESH_5, EEP_NFTHRESH_2, EEP_MAC_MSW, EEP_MAC_MID, EEP_MAC_LSW, EEP_REG_0, EEP_OP_CAP, EEP_OP_MODE, EEP_RF_SILENT, EEP_OB_5, EEP_DB_5, EEP_OB_2, EEP_DB_2, EEP_TX_MASK, EEP_RX_MASK, EEP_FSTCLK_5G, EEP_RXGAIN_TYPE, EEP_OL_PWRCTRL, EEP_TXGAIN_TYPE, EEP_RC_CHAIN_MASK, EEP_DAC_HPWR_5G, EEP_FRAC_N_5G, EEP_DEV_TYPE, EEP_TEMPSENSE_SLOPE, EEP_TEMPSENSE_SLOPE_PAL_ON, EEP_PWR_TABLE_OFFSET, EEP_PAPRD, EEP_MODAL_VER, EEP_ANT_DIV_CTL1, EEP_CHAIN_MASK_REDUCE, EEP_ANTENNA_GAIN_2G, EEP_ANTENNA_GAIN_5G, }; enum ar5416_rates { rate6mb, rate9mb, rate12mb, rate18mb, rate24mb, rate36mb, rate48mb, rate54mb, rate1l, rate2l, rate2s, rate5_5l, rate5_5s, rate11l, rate11s, rateXr, rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3, rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7, rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3, rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7, rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, Ar5416RateSize }; enum ath9k_hal_freq_band { ATH9K_HAL_FREQ_BAND_5GHZ = 0, ATH9K_HAL_FREQ_BAND_2GHZ = 1 }; struct base_eep_header { __le16 length; __le16 checksum; __le16 version; u8 opCapFlags; u8 eepMisc; __le16 regDmn[2]; u8 macAddr[6]; u8 rxMask; u8 txMask; __le16 rfSilent; __le16 blueToothOptions; __le16 deviceCap; __le32 binBuildNumber; u8 deviceType; u8 pwdclkind; u8 fastClk5g; u8 divChain; u8 rxGainType; u8 dacHiPwrMode_5G; u8 openLoopPwrCntl; u8 dacLpMode; u8 txGainType; u8 rcChainMask; u8 desiredScaleCCK; u8 pwr_table_offset; u8 frac_n_5g; u8 futureBase_3[21]; } __packed; struct base_eep_header_4k { __le16 length; __le16 checksum; __le16 version; u8 opCapFlags; u8 eepMisc; __le16 regDmn[2]; u8 macAddr[6]; u8 rxMask; u8 txMask; __le16 rfSilent; __le16 blueToothOptions; __le16 deviceCap; __le32 binBuildNumber; u8 deviceType; u8 txGainType; } __packed; struct spur_chan { __le16 spurChan; u8 spurRangeLow; u8 spurRangeHigh; } __packed; struct modal_eep_header { __le32 antCtrlChain[AR5416_MAX_CHAINS]; __le32 antCtrlCommon; u8 antennaGainCh[AR5416_MAX_CHAINS]; u8 switchSettling; u8 txRxAttenCh[AR5416_MAX_CHAINS]; u8 rxTxMarginCh[AR5416_MAX_CHAINS]; u8 adcDesiredSize; u8 pgaDesiredSize; u8 xlnaGainCh[AR5416_MAX_CHAINS]; u8 txEndToXpaOff; u8 txEndToRxOn; u8 txFrameToXpaOn; u8 thresh62; u8 noiseFloorThreshCh[AR5416_MAX_CHAINS]; u8 xpdGain; u8 xpd; u8 iqCalICh[AR5416_MAX_CHAINS]; u8 iqCalQCh[AR5416_MAX_CHAINS]; u8 pdGainOverlap; u8 ob; u8 db; u8 xpaBiasLvl; u8 pwrDecreaseFor2Chain; u8 pwrDecreaseFor3Chain; u8 txFrameToDataStart; u8 txFrameToPaOn; u8 ht40PowerIncForPdadc; u8 bswAtten[AR5416_MAX_CHAINS]; u8 bswMargin[AR5416_MAX_CHAINS]; u8 swSettleHt40; u8 xatten2Db[AR5416_MAX_CHAINS]; u8 xatten2Margin[AR5416_MAX_CHAINS]; u8 ob_ch1; u8 db_ch1; u8 lna_ctl; u8 miscBits; __le16 xpaBiasLvlFreq[3]; u8 futureModal[6]; struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]; } __packed; struct calDataPerFreqOpLoop { u8 pwrPdg[2][5]; u8 vpdPdg[2][5]; u8 pcdac[2][5]; u8 empty[2][5]; } __packed; struct modal_eep_4k_header { __le32 antCtrlChain[AR5416_EEP4K_MAX_CHAINS]; __le32 antCtrlCommon; u8 antennaGainCh[AR5416_EEP4K_MAX_CHAINS]; u8 switchSettling; u8 txRxAttenCh[AR5416_EEP4K_MAX_CHAINS]; u8 rxTxMarginCh[AR5416_EEP4K_MAX_CHAINS]; u8 adcDesiredSize; u8 pgaDesiredSize; u8 xlnaGainCh[AR5416_EEP4K_MAX_CHAINS]; u8 txEndToXpaOff; u8 txEndToRxOn; u8 txFrameToXpaOn; u8 thresh62; u8 noiseFloorThreshCh[AR5416_EEP4K_MAX_CHAINS]; u8 xpdGain; u8 xpd; u8 iqCalICh[AR5416_EEP4K_MAX_CHAINS]; u8 iqCalQCh[AR5416_EEP4K_MAX_CHAINS]; u8 pdGainOverlap; #ifdef __BIG_ENDIAN_BITFIELD u8 ob_1:4, ob_0:4; u8 db1_1:4, db1_0:4; #else u8 ob_0:4, ob_1:4; u8 db1_0:4, db1_1:4; #endif u8 xpaBiasLvl; u8 txFrameToDataStart; u8 txFrameToPaOn; u8 ht40PowerIncForPdadc; u8 bswAtten[AR5416_EEP4K_MAX_CHAINS]; u8 bswMargin[AR5416_EEP4K_MAX_CHAINS]; u8 swSettleHt40; u8 xatten2Db[AR5416_EEP4K_MAX_CHAINS]; u8 xatten2Margin[AR5416_EEP4K_MAX_CHAINS]; #ifdef __BIG_ENDIAN_BITFIELD u8 db2_1:4, db2_0:4; #else u8 db2_0:4, db2_1:4; #endif u8 version; #ifdef __BIG_ENDIAN_BITFIELD u8 ob_3:4, ob_2:4; u8 antdiv_ctl1:4, ob_4:4; u8 db1_3:4, db1_2:4; u8 antdiv_ctl2:4, db1_4:4; u8 db2_2:4, db2_3:4; u8 reserved:4, db2_4:4; #else u8 ob_2:4, ob_3:4; u8 ob_4:4, antdiv_ctl1:4; u8 db1_2:4, db1_3:4; u8 db1_4:4, antdiv_ctl2:4; u8 db2_2:4, db2_3:4; u8 db2_4:4, reserved:4; #endif u8 tx_diversity; u8 flc_pwr_thresh; u8 bb_scale_smrt_antenna; #define EEP_4K_BB_DESIRED_SCALE_MASK 0x1f u8 futureModal[1]; struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]; } __packed; struct base_eep_ar9287_header { __le16 length; __le16 checksum; __le16 version; u8 opCapFlags; u8 eepMisc; __le16 regDmn[2]; u8 macAddr[6]; u8 rxMask; u8 txMask; __le16 rfSilent; __le16 blueToothOptions; __le16 deviceCap; __le32 binBuildNumber; u8 deviceType; u8 openLoopPwrCntl; int8_t pwrTableOffset; int8_t tempSensSlope; int8_t tempSensSlopePalOn; u8 futureBase[29]; } __packed; struct modal_eep_ar9287_header { __le32 antCtrlChain[AR9287_MAX_CHAINS]; __le32 antCtrlCommon; int8_t antennaGainCh[AR9287_MAX_CHAINS]; u8 switchSettling; u8 txRxAttenCh[AR9287_MAX_CHAINS]; u8 rxTxMarginCh[AR9287_MAX_CHAINS]; int8_t adcDesiredSize; u8 txEndToXpaOff; u8 txEndToRxOn; u8 txFrameToXpaOn; u8 thresh62; int8_t noiseFloorThreshCh[AR9287_MAX_CHAINS]; u8 xpdGain; u8 xpd; int8_t iqCalICh[AR9287_MAX_CHAINS]; int8_t iqCalQCh[AR9287_MAX_CHAINS]; u8 pdGainOverlap; u8 xpaBiasLvl; u8 txFrameToDataStart; u8 txFrameToPaOn; u8 ht40PowerIncForPdadc; u8 bswAtten[AR9287_MAX_CHAINS]; u8 bswMargin[AR9287_MAX_CHAINS]; u8 swSettleHt40; u8 version; u8 db1; u8 db2; u8 ob_cck; u8 ob_psk; u8 ob_qam; u8 ob_pal_off; u8 futureModal[30]; struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]; } __packed; struct cal_data_per_freq { u8 pwrPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; u8 vpdPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; } __packed; struct cal_data_per_freq_4k { u8 pwrPdg[AR5416_EEP4K_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; u8 vpdPdg[AR5416_EEP4K_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; } __packed; struct cal_target_power_leg { u8 bChannel; u8 tPow2x[4]; } __packed; struct cal_target_power_ht { u8 bChannel; u8 tPow2x[8]; } __packed; struct cal_ctl_edges { u8 bChannel; u8 ctl; } __packed; struct cal_data_op_loop_ar9287 { u8 pwrPdg[2][5]; u8 vpdPdg[2][5]; u8 pcdac[2][5]; u8 empty[2][5]; } __packed; struct cal_data_per_freq_ar9287 { u8 pwrPdg[AR5416_NUM_PD_GAINS][AR9287_PD_GAIN_ICEPTS]; u8 vpdPdg[AR5416_NUM_PD_GAINS][AR9287_PD_GAIN_ICEPTS]; } __packed; union cal_data_per_freq_ar9287_u { struct cal_data_op_loop_ar9287 calDataOpen; struct cal_data_per_freq_ar9287 calDataClose; } __packed; struct cal_ctl_data_ar9287 { struct cal_ctl_edges ctlEdges[AR9287_MAX_CHAINS][AR9287_NUM_BAND_EDGES]; } __packed; struct cal_ctl_data { struct cal_ctl_edges ctlEdges[AR5416_MAX_CHAINS][AR5416_NUM_BAND_EDGES]; } __packed; struct cal_ctl_data_4k { struct cal_ctl_edges ctlEdges[AR5416_EEP4K_MAX_CHAINS][AR5416_EEP4K_NUM_BAND_EDGES]; } __packed; struct ar5416_eeprom_def { struct base_eep_header baseEepHeader; u8 custData[64]; struct modal_eep_header modalHeader[2]; u8 calFreqPier5G[AR5416_NUM_5G_CAL_PIERS]; u8 calFreqPier2G[AR5416_NUM_2G_CAL_PIERS]; struct cal_data_per_freq calPierData5G[AR5416_MAX_CHAINS][AR5416_NUM_5G_CAL_PIERS]; struct cal_data_per_freq calPierData2G[AR5416_MAX_CHAINS][AR5416_NUM_2G_CAL_PIERS]; struct cal_target_power_leg calTargetPower5G[AR5416_NUM_5G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower5GHT20[AR5416_NUM_5G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower5GHT40[AR5416_NUM_5G_40_TARGET_POWERS]; struct cal_target_power_leg calTargetPowerCck[AR5416_NUM_2G_CCK_TARGET_POWERS]; struct cal_target_power_leg calTargetPower2G[AR5416_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT20[AR5416_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT40[AR5416_NUM_2G_40_TARGET_POWERS]; u8 ctlIndex[AR5416_NUM_CTLS]; struct cal_ctl_data ctlData[AR5416_NUM_CTLS]; u8 padding; } __packed; struct ar5416_eeprom_4k { struct base_eep_header_4k baseEepHeader; u8 custData[20]; struct modal_eep_4k_header modalHeader; u8 calFreqPier2G[AR5416_EEP4K_NUM_2G_CAL_PIERS]; struct cal_data_per_freq_4k calPierData2G[AR5416_EEP4K_MAX_CHAINS][AR5416_EEP4K_NUM_2G_CAL_PIERS]; struct cal_target_power_leg calTargetPowerCck[AR5416_EEP4K_NUM_2G_CCK_TARGET_POWERS]; struct cal_target_power_leg calTargetPower2G[AR5416_EEP4K_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT20[AR5416_EEP4K_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT40[AR5416_EEP4K_NUM_2G_40_TARGET_POWERS]; u8 ctlIndex[AR5416_EEP4K_NUM_CTLS]; struct cal_ctl_data_4k ctlData[AR5416_EEP4K_NUM_CTLS]; u8 padding; } __packed; struct ar9287_eeprom { struct base_eep_ar9287_header baseEepHeader; u8 custData[AR9287_DATA_SZ]; struct modal_eep_ar9287_header modalHeader; u8 calFreqPier2G[AR9287_NUM_2G_CAL_PIERS]; union cal_data_per_freq_ar9287_u calPierData2G[AR9287_MAX_CHAINS][AR9287_NUM_2G_CAL_PIERS]; struct cal_target_power_leg calTargetPowerCck[AR9287_NUM_2G_CCK_TARGET_POWERS]; struct cal_target_power_leg calTargetPower2G[AR9287_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT20[AR9287_NUM_2G_20_TARGET_POWERS]; struct cal_target_power_ht calTargetPower2GHT40[AR9287_NUM_2G_40_TARGET_POWERS]; u8 ctlIndex[AR9287_NUM_CTLS]; struct cal_ctl_data_ar9287 ctlData[AR9287_NUM_CTLS]; u8 padding; } __packed; enum reg_ext_bitmap { REG_EXT_FCC_MIDBAND = 0, REG_EXT_JAPAN_MIDBAND = 1, REG_EXT_FCC_DFS_HT40 = 2, REG_EXT_JAPAN_NONDFS_HT40 = 3, REG_EXT_JAPAN_DFS_HT40 = 4 }; struct ath9k_country_entry { u16 countryCode; u16 regDmnEnum; u16 regDmn5G; u16 regDmn2G; u8 isMultidomain; u8 iso[3]; }; struct eeprom_ops { int (*check_eeprom)(struct ath_hw *hw); u32 (*get_eeprom)(struct ath_hw *hw, enum eeprom_param param); bool (*fill_eeprom)(struct ath_hw *hw); u32 (*dump_eeprom)(struct ath_hw *hw, bool dump_base_hdr, u8 *buf, u32 len, u32 size); int (*get_eeprom_ver)(struct ath_hw *hw); int (*get_eeprom_rev)(struct ath_hw *hw); void (*set_board_values)(struct ath_hw *hw, struct ath9k_channel *chan); void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan); void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 powerLimit, bool test); u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, bool is2GHz); u8 (*get_eepmisc)(struct ath_hw *ah); }; void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val); void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask, u32 shift, u32 val); int16_t ath9k_hw_interpolate(u16 target, u16 srcLeft, u16 srcRight, int16_t targetLeft, int16_t targetRight); bool ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize, u16 *indexL, u16 *indexR); bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data); int ath9k_hw_nvram_swap_data(struct ath_hw *ah, bool *swap_needed, int size); bool ath9k_hw_nvram_validate_checksum(struct ath_hw *ah, int size); bool ath9k_hw_nvram_check_version(struct ath_hw *ah, int version, int minrev); void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, int eep_start_loc, int size); void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList, u8 *pVpdList, u16 numIntercepts, u8 *pRetVpdList); void ath9k_hw_get_legacy_target_powers(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_target_power_leg *powInfo, u16 numChannels, struct cal_target_power_leg *pNewPower, u16 numRates, bool isExtTarget); void ath9k_hw_get_target_powers(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_target_power_ht *powInfo, u16 numChannels, struct cal_target_power_ht *pNewPower, u16 numRates, bool isHt40Target); u16 ath9k_hw_get_max_edge_power(u16 freq, struct cal_ctl_edges *pRdEdgesPower, bool is2GHz, int num_band_edges); u16 ath9k_hw_get_scaled_power(struct ath_hw *ah, u16 power_limit, u8 antenna_reduction); void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah); int ath9k_hw_eeprom_init(struct ath_hw *ah); void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, struct ath9k_channel *chan, void *pRawDataSet, u8 *bChans, u16 availPiers, u16 tPdGainOverlap, u16 *pPdGainBoundaries, u8 *pPDADCValues, u16 numXpdGains); static inline u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz) { if (fbin == AR5416_BCHAN_UNUSED) return fbin; return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin)); } #define ar5416_get_ntxchains(_txchainmask) \ (((_txchainmask >> 2) & 1) + \ ((_txchainmask >> 1) & 1) + (_txchainmask & 1)) extern const struct eeprom_ops eep_def_ops; extern const struct eeprom_ops eep_4k_ops; extern const struct eeprom_ops eep_ar9287_ops; extern const struct eeprom_ops eep_ar9287_ops; extern const struct eeprom_ops eep_ar9300_ops; #endif /* EEPROM_H */
{ "pile_set_name": "Github" }
const UserText = { USER_INFO_LABEL_NAME: '用户名称', USER_INFO_LABEL_EMAIL: '用户邮件', USER_INFO_LABEL_PASSWORD: '密码', USER_INFO_LABEL_CONFIRM_PASSWORD: '确认密码', USER_INFO_PLACEHOLDER_NAME: '请输入用户名称', USER_INFO_PLACEHOLDER_EMAIL: '请输入邮箱地址', USER_INFO_PLACEHOLDER_PASSWORD: '请输入密码', USER_INFO_PLACEHOLDER_CONFIRM_PASSWORD: '请再次输入密码确认', USER_INFO_BTN_SUBMIT: '确认', } export default UserText
{ "pile_set_name": "Github" }
/**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org 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. ****************************************************************************/ #include "platform/CCCommon.h" #include "CCStdC.h" NS_CC_BEGIN #define MAX_LEN (cocos2d::kMaxLogLen + 1) void MessageBox(const char * pszMsg, const char * pszTitle) { MessageBoxA(NULL, pszMsg, pszTitle, MB_OK); } void LuaLog(const char *pszMsg) { int bufflen = MultiByteToWideChar(CP_UTF8, 0, pszMsg, -1, NULL, 0); WCHAR* widebuff = new WCHAR[bufflen + 1]; memset(widebuff, 0, sizeof(WCHAR) * (bufflen + 1)); MultiByteToWideChar(CP_UTF8, 0, pszMsg, -1, widebuff, bufflen); OutputDebugStringW(widebuff); OutputDebugStringA("\n"); bufflen = WideCharToMultiByte(CP_ACP, 0, widebuff, -1, NULL, 0, NULL, NULL); char* buff = new char[bufflen + 1]; memset(buff, 0, sizeof(char) * (bufflen + 1)); WideCharToMultiByte(CP_ACP, 0, widebuff, -1, buff, bufflen, NULL, NULL); puts(buff); delete[] widebuff; delete[] buff; } NS_CC_END
{ "pile_set_name": "Github" }
import { Dropoff } from "./Dropoff"; import { GameMap } from "./GameMap"; import { Logging } from "./Logging"; import { Player } from "./Player"; import { Position } from "./Position"; import { ServerCommunication } from "./ServerCommunicaion"; import { Ship } from "./Ship"; import { Shipyard } from "./Shipyard"; export class Game { public turnNumber = 0; public server: ServerCommunication = new ServerCommunication(); public myId = 0; public players = new Map<number, Player>(); public me?: Player; public gameMap?: GameMap; /** * Initialize a game object collecting all the start-state * instances for pre-game. Also sets up a log file in * "bot-<bot_id>.log". * @returns The initialized gameMap and me so we don't have to check if undefined. */ public async initialize(): Promise<[GameMap, Player]> { const serverData = await this.server.getInitialData(); this.myId = serverData.myId; Logging.setup(`bot-${this.myId}.log`); serverData.players.forEach((playerData) => { const player = new Player(playerData.id, new Shipyard(playerData.id, -1, new Position(playerData.x, playerData.y))); this.players.set(player.id, player); }); this.me = this.players.get(this.myId); this.gameMap = new GameMap(serverData.cells); return [this.gameMap as GameMap, this.me as Player]; // We cast here because we have just initialized } /** * Updates the game object's state. */ public async updateFrame() { const data = await this.server.getUpdateData(this.players.size); this.turnNumber = data.turn; Logging.info(`================ TURN ${this.turnNumber.toString().padStart(3, "0")} ================`); data.players.forEach((playerData) => { const player = this.players.get(playerData.id) as Player; player.haliteAmount = playerData.halite; // Process ships const newShipsData = playerData.ships .filter((shipData) => !player.hasShip(shipData.id)); newShipsData.forEach((newShipData) => player.addShip(new Ship(player.id, newShipData.id, new Position(newShipData.x, newShipData.y), newShipData.halite))); const lostShips = player.getShips() .filter((ship) => !playerData.ships.some((shipData) => shipData.id === ship.id)); lostShips.forEach((ship) => player.loseShip(ship.id)); player.getShips().forEach((ship) => { const updatedShipData = playerData.ships .find((shipData) => ship.id === shipData.id); if (updatedShipData) { [ship.haliteAmount, ship.position.x, ship.position.y] = [updatedShipData.halite, updatedShipData.x, updatedShipData.y]; } }); // Process dropoffs const newDropoffsData = playerData.dropoffs .filter((dropoffData) => !player.dropoffs.has(dropoffData.id)); newDropoffsData.forEach((newDropoffData: { id: number, x: number, y: number }) => player.dropoffs.set(newDropoffData.id, new Dropoff(player.id, newDropoffData.id, new Position(newDropoffData.x, newDropoffData.y)))); const lostDropoffs = Array.from(player.dropoffs.values()) .filter((dropoff) => !playerData.dropoffs.some((dropoffData) => dropoffData.id === dropoff.id)); lostDropoffs.forEach((lostDropoff) => { player.dropoffs.delete(lostDropoff.id); player.lostDropoffs.set(lostDropoff.id, lostDropoff); }); }); const gameMap = this.gameMap as GameMap; // Mark all cells as safe gameMap.cells.forEach((row) => row.forEach((cell) => cell.markSafe())); // Update cells data.cells.forEach((cell) => gameMap.get(new Position(cell.x, cell.y)).haliteAmount = cell.halite); // Mark cells with ships as unsafe for navigation, mark sturctures for (const player of this.players.values()) { player.getShips() .forEach((ship) => gameMap.get(ship.position).markUnsafe(ship)); player.getDropoffs() .forEach((dropoff) => gameMap.get(dropoff.position).structure = dropoff); } } /** * Indicate that your bot is ready to play by sending the bot name. */ public async ready(botName: string) { await this.server.sendCommands([botName]); } /** * Send all commands to the game engine, effectively ending your * turn. */ public async endTurn(commands: string[]) { await this.server.sendCommands(commands); } }
{ "pile_set_name": "Github" }
<?php /* * This file is part of Twig. * * (c) 2009 Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Imports macros. * * <pre> * {% import 'forms.html' as forms %} * </pre> */ class Twig_TokenParser_Import extends Twig_TokenParser { /** * Parses a token and returns a node. * * @param Twig_Token $token A Twig_Token instance * * @return Twig_NodeInterface A Twig_NodeInterface instance */ public function parse(Twig_Token $token) { $macro = $this->parser->getExpressionParser()->parseExpression(); $this->parser->getStream()->expect('as'); $var = new Twig_Node_Expression_AssignName($this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue(), $token->getLine()); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); $this->parser->addImportedSymbol('template', $var->getAttribute('name')); return new Twig_Node_Import($macro, $var, $token->getLine(), $this->getTag()); } /** * Gets the tag name associated with this token parser. * * @return string The tag name */ public function getTag() { return 'import'; } }
{ "pile_set_name": "Github" }
fonts/sha1sum/d46a2549d27c32605024201abf801bb9a9273da3.ttf عربيעבריתأهلבריתمم(ُenglish ) مرحبا Text is: عربيעבריתأهلבריתمم(ُenglish ) مرحبا Direction is: DEFAULT Before script detection: script for ch[0] Arab script for ch[1] Arab script for ch[2] Arab script for ch[3] Arab script for ch[4] Hebr script for ch[5] Hebr script for ch[6] Hebr script for ch[7] Hebr script for ch[8] Hebr script for ch[9] Arab script for ch[10] Arab script for ch[11] Arab script for ch[12] Hebr script for ch[13] Hebr script for ch[14] Hebr script for ch[15] Hebr script for ch[16] Arab script for ch[17] Arab script for ch[18] Zyyy script for ch[19] Zinh script for ch[20] Latn script for ch[21] Latn script for ch[22] Latn script for ch[23] Latn script for ch[24] Latn script for ch[25] Latn script for ch[26] Latn script for ch[27] Zyyy script for ch[28] Zyyy script for ch[29] Zyyy script for ch[30] Arab script for ch[31] Arab script for ch[32] Arab script for ch[33] Arab script for ch[34] Arab After script detection: script for ch[0] Arab script for ch[1] Arab script for ch[2] Arab script for ch[3] Arab script for ch[4] Hebr script for ch[5] Hebr script for ch[6] Hebr script for ch[7] Hebr script for ch[8] Hebr script for ch[9] Arab script for ch[10] Arab script for ch[11] Arab script for ch[12] Hebr script for ch[13] Hebr script for ch[14] Hebr script for ch[15] Hebr script for ch[16] Arab script for ch[17] Arab script for ch[18] Arab script for ch[19] Arab script for ch[20] Latn script for ch[21] Latn script for ch[22] Latn script for ch[23] Latn script for ch[24] Latn script for ch[25] Latn script for ch[26] Latn script for ch[27] Latn script for ch[28] Arab script for ch[29] Arab script for ch[30] Arab script for ch[31] Arab script for ch[32] Arab script for ch[33] Arab script for ch[34] Arab Number of runs before script itemization: 3 Fribidi Runs: run[0]: start: 27 length: 8 level: 1 run[1]: start: 20 length: 7 level: 2 run[2]: start: 0 length: 20 level: 1 Number of runs after script itemization: 8 Final Runs: run[0]: start: 28 length: 7 direction: rtl script: Arab font: DejaVu Sans run[1]: start: 27 length: 1 direction: rtl script: Latn font: DejaVu Sans run[2]: start: 20 length: 7 direction: ltr script: Latn font: DejaVu Sans run[3]: start: 16 length: 4 direction: rtl script: Arab font: DejaVu Sans run[4]: start: 12 length: 4 direction: rtl script: Hebr font: DejaVu Sans run[5]: start: 9 length: 3 direction: rtl script: Arab font: DejaVu Sans run[6]: start: 4 length: 5 direction: rtl script: Hebr font: DejaVu Sans run[7]: start: 0 length: 4 direction: rtl script: Arab font: DejaVu Sans Glyph information: glyph [35] x_offset: 0 y_offset: 0 x_advance: 624 font: DejaVu Sans glyph [38] x_offset: 0 y_offset: 0 x_advance: 618 font: DejaVu Sans glyph [40] x_offset: 0 y_offset: 0 x_advance: 1266 font: DejaVu Sans glyph [42] x_offset: 0 y_offset: 0 x_advance: 1130 font: DejaVu Sans glyph [50] x_offset: 0 y_offset: 0 x_advance: 1097 font: DejaVu Sans glyph [1] x_offset: 0 y_offset: 0 x_advance: 651 font: DejaVu Sans glyph [2] x_offset: 0 y_offset: 0 x_advance: 799 font: DejaVu Sans glyph [1] x_offset: 0 y_offset: 0 x_advance: 651 font: DejaVu Sans glyph [4] x_offset: 0 y_offset: 0 x_advance: 1260 font: DejaVu Sans glyph [9] x_offset: 0 y_offset: 0 x_advance: 1298 font: DejaVu Sans glyph [5] x_offset: 0 y_offset: 0 x_advance: 1300 font: DejaVu Sans glyph [8] x_offset: 0 y_offset: 0 x_advance: 569 font: DejaVu Sans glyph [7] x_offset: 0 y_offset: 0 x_advance: 569 font: DejaVu Sans glyph [10] x_offset: 0 y_offset: 0 x_advance: 1067 font: DejaVu Sans glyph [6] x_offset: 0 y_offset: 0 x_advance: 1298 font: DejaVu Sans glyph [27] x_offset: 0 y_offset: 0 x_advance: 0 font: DejaVu Sans glyph [3] x_offset: 0 y_offset: 0 x_advance: 799 font: DejaVu Sans glyph [49] x_offset: 0 y_offset: 0 x_advance: 1363 font: DejaVu Sans glyph [50] x_offset: 0 y_offset: 0 x_advance: 1097 font: DejaVu Sans glyph [15] x_offset: 0 y_offset: 0 x_advance: 1346 font: DejaVu Sans glyph [12] x_offset: 0 y_offset: 0 x_advance: 458 font: DejaVu Sans glyph [14] x_offset: 0 y_offset: 0 x_advance: 1156 font: DejaVu Sans glyph [11] x_offset: 0 y_offset: 0 x_advance: 1184 font: DejaVu Sans glyph [46] x_offset: 0 y_offset: 0 x_advance: 1551 font: DejaVu Sans glyph [53] x_offset: 0 y_offset: 0 x_advance: 1080 font: DejaVu Sans glyph [16] x_offset: 0 y_offset: 0 x_advance: 569 font: DejaVu Sans glyph [15] x_offset: 0 y_offset: 0 x_advance: 1346 font: DejaVu Sans glyph [12] x_offset: 0 y_offset: 0 x_advance: 458 font: DejaVu Sans glyph [14] x_offset: 0 y_offset: 0 x_advance: 1156 font: DejaVu Sans glyph [11] x_offset: 0 y_offset: 0 x_advance: 1184 font: DejaVu Sans glyph [13] x_offset: 0 y_offset: 0 x_advance: 1282 font: DejaVu Sans glyph [56] x_offset: 0 y_offset: 0 x_advance: 1707 font: DejaVu Sans glyph [37] x_offset: 0 y_offset: 0 x_advance: 570 font: DejaVu Sans glyph [42] x_offset: 0 y_offset: 0 x_advance: 1130 font: DejaVu Sans glyph [44] x_offset: 0 y_offset: 0 x_advance: 1222 font: DejaVu Sans UTF-32 clusters: 34 33 32 31 30 29 28 27 20 21 22 23 24 25 26 18 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 UTF-8 clusters: 57 55 53 51 49 48 47 46 39 40 41 42 43 44 45 36 36 34 32 30 28 26 24 22 20 18 16 14 12 10 08 06 04 02 00
{ "pile_set_name": "Github" }
local httpc = require "httpc" local json = require "json" local class = require "class" local type = type local ipairs = ipairs local function check_error (code, response) if code ~= 200 then return nil, "请求失败." .. (response or "") end local r = json.decode(response) if type(r) ~= 'table' then return nil, "未知的回应." end if r.errcode ~= 0 then return nil, r.errmsg end return true end local dingtalk = { __VERSION__ = 0.1, robot = "https://oapi.dingtalk.com/robot/send?access_token=" } -- 发送text消息 function dingtalk.send_text (opt) assert(type(opt) == 'table', "dingtalk error: 无效的参数.") assert(type(opt.token) == 'string' and opt.token ~= '', "dingtalk error: 无效的Token参数.") assert(type(opt.content) == 'string' and opt.content ~= '', "dingtalk error: 无效的content参数.") local allmobiles = {} if type(opt.mobiles) == 'table' then for _, phone in ipairs(opt.mobiles) do allmobiles[#allmobiles+1] = tostring(phone) end end local code, response = httpc.json(dingtalk.robot..opt.token, nil, json.encode({ msgtype = "text", text = { content = opt.content }, at = { atMobiles = allmobiles, isAtAll = opt.atall == true} })) return check_error(code, response) end -- 发送link消息 function dingtalk.send_link (opt) assert(type(opt) == 'table', "dingtalk error: 无效的参数.") assert(type(opt.token) == 'string' and opt.token ~= '', "dingtalk error: 无效的Token参数.") assert(type(opt.msg_link) == 'string' and opt.msg_link ~= '', "dingtalk error: 无效的msg_link(必须为非空字符串).") assert(type(opt.msg_title) == 'string' and opt.msg_title ~= '', "dingtalk error: 无效的msg_title(必须为非空字符串).") assert(type(opt.msg_describe) == 'string' and opt.msg_describe ~= '', "dingtalk error: 无效的msg_describe(必须为非空字符串).") local code, response = httpc.json(dingtalk.robot..opt.token, nil, json.encode({ msgtype = "link", link = { title = opt.msg_title, text = opt.msg_describe, messageUrl = opt.msg_link, picUrl = opt.msg_pic } })) return check_error(code, response) end -- 发送markdown消息 function dingtalk.send_markdown (opt) assert(type(opt) == 'table', "dingtalk error: 无效的参数.") assert(type(opt.token) == 'string' and opt.token ~= '', "dingtalk error: 无效的Token参数.") assert(type(opt.msg_title) == 'string' and opt.msg_title ~= '', "dingtalk error: 无效的msg_title(必须为非空字符串).") assert(type(opt.msg_content) == 'string' and opt.msg_content ~= '', "dingtalk error: 无效的msg_content(必须为非空字符串).") local allmobiles = {} if type(opt.mobiles) == 'table' then for _, phone in ipairs(opt.mobiles) do allmobiles[#allmobiles+1] = tostring(phone) end end local code, response = httpc.json(dingtalk.robot..opt.token, nil, json.encode({ msgtype = "markdown", markdown = { title = opt.msg_title, text = opt.msg_content }, at = { atMobiles = opt.mobiles, isAtAll = opt.atall == true } })) return check_error(code, response) end -- 发送actionCard消息 function dingtalk.send_actioncard (opt) assert(type(opt) == 'table', "dingtalk error: 无效的参数.") assert(type(opt.token) == 'string' and opt.token ~= '', "dingtalk error: 无效的Token参数.") assert(type(opt.msg_title) == 'string' and opt.msg_title ~= '', "dingtalk error: 无效的msg_title(必须为非空字符串).") assert(type(opt.msg_describe) == 'string' and opt.msg_describe ~= '', "dingtalk error: 无效的msg_describe(必须为非空字符串).") local btns, single_title, single_url = nil, nil, nil if type(opt.single) == 'table' and (type(opt.single.title) == 'string' and opt.single.title ~= '') and (type(opt.single.url) == 'string' and opt.single.url ~= '') then single_title, single_url = opt.single.title, opt.single.url end if not single_title and not single_url and type(opt.btns) == 'table' and #opt.btns >= 1 then btns = {} for index, btn in ipairs(opt.btns) do assert(type(btn.title) == 'string' and btn.title ~= '', 'dingtalk error: btns第'..index..'个参数title无效.') assert(type(btn.url) == 'string' and btn.url ~= '', 'dingtalk error: btns第'..index..'个参数url无效.') btns[#btns+1] = {title = btn.title, actionURL = btn.url} end end local code, response = httpc.json(dingtalk.robot..opt.token, nil, json.encode({ msgtype = "actionCard", actionCard = { title = opt.msg_title, text = opt.msg_describe, singleURL = single_url, singleTitle = single_title, btns = btns, hideAvatar = opt.hide_avatar and '1' or '0', btnOrientation = opt.btn_orientation and '1' or '0' }})) return check_error(code, response) end -- 发送FeedCard消息 function dingtalk.send_feedcard (opt) assert(type(opt) == 'table', "dingtalk error: 无效的参数.") assert(type(opt.token) == 'string' and opt.token ~= '', "dingtalk error: 无效的Token参数.") assert(type(opt.msg_links) == 'table' and #opt.msg_links >= 1, "dingtalk error: 无效的msg_links参数(内部至少有一条消息).") local links = {} for index, link in ipairs(opt.msg_links) do assert(type(link) == 'table', "dingtalk error: 无效的消息"..index) assert(type(link.msg_title) == 'string' and link.msg_title ~= '', "dingtalk error: 第"..index..'个消息的msg_title无效.') assert(type(link.msg_link) == 'string' and link.msg_link ~= '', "dingtalk error: 第"..index..'个消息的msg_link无效.') links[#links+1] = { title = link.msg_title, messageURL = link.msg_link, picURL = link.msg_pic } end local code, response = httpc.json(dingtalk.robot..opt.token, nil, json.encode({ msgtype = "feedCard", feedCard = { links = links } })) return check_error(code, response) end return dingtalk
{ "pile_set_name": "Github" }
users <- data.frame( uid=c(12,13), username=c("kim", "john") ) #' Lookup a user #' @get /users/<id> function(id){ subset(users, uid %in% id) }
{ "pile_set_name": "Github" }
// stylelint-disable declaration-no-important // Typography @mixin text-emphasis-variant($parent, $color) { #{$parent} { color: $color !important; } a#{$parent} { @include hover-focus { color: darken($color, 10%) !important; } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Usluga nedostupna!</title> <style type="text/css"> /*<![CDATA[*/ body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;} h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } h3 {font-family:"Verdana";font-weight:bold;font-size:11pt} p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px} .version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;} /*]]>*/ </style> </head> <body> <h1>Usluga nedostupna!</h1> <p> Naš sustav je trenutno u procesu održavanja. Molimo vas da navratite kasnije. </p> <p> Zahvaljujemo. </p> <div class="version"> <?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?> </div> </body> </html>
{ "pile_set_name": "Github" }
// Resize anything @mixin resizable($direction) { resize: $direction; // Options: horizontal, vertical, both overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` }
{ "pile_set_name": "Github" }
--- id: before-you-start title: Before you start sidebar_label: Before you start --- React Native Navigation is a module, dependent on and intended to be used alongside [React Native](https://github.com/facebook/react-native), so some experience with it and knowledge of core concepts is required. If you feel the need, you can start with their [getting started](https://reactnative.dev/docs/getting-started) tutorial, and then come back here when you're ready. We also assume you are working on a Mac with XCode and Android Studio installed and setup. You can also make it work in a Linux distribution, of course, but in that case bare in mind that some sections of the docs that deal with iOS might not be relevant to you. If you want to dig right into it, start with [installing](docs-Installing.mdx) the library. If you're just looking around, we suggest checking out [basic navigation](docs-basic-navigation.mdx) first.
{ "pile_set_name": "Github" }
// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; use gst; use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { pub struct PtpClock(Object<gst_net_sys::GstPtpClock, gst_net_sys::GstPtpClockClass, PtpClockClass>) @extends gst::Clock, gst::Object; match fn { get_type => || gst_net_sys::gst_ptp_clock_get_type(), } } impl PtpClock { pub fn get_property_domain(&self) -> u32 { unsafe { let mut value = Value::from_type(<u32 as StaticType>::static_type()); gobject_sys::g_object_get_property( self.as_ptr() as *mut gobject_sys::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `domain` getter") .unwrap() } } pub fn get_property_grandmaster_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(<u64 as StaticType>::static_type()); gobject_sys::g_object_get_property( self.as_ptr() as *mut gobject_sys::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `grandmaster-clock-id` getter") .unwrap() } } pub fn get_property_internal_clock(&self) -> Option<gst::Clock> { unsafe { let mut value = Value::from_type(<gst::Clock as StaticType>::static_type()); gobject_sys::g_object_get_property( self.as_ptr() as *mut gobject_sys::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `internal-clock` getter") } } pub fn get_property_master_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(<u64 as StaticType>::static_type()); gobject_sys::g_object_get_property( self.as_ptr() as *mut gobject_sys::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `master-clock-id` getter") .unwrap() } } pub fn connect_property_grandmaster_clock_id_notify< F: Fn(&PtpClock) + Send + Sync + 'static, >( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_grandmaster_clock_id_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::grandmaster-clock-id\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_grandmaster_clock_id_trampoline::<F> as *const (), )), Box_::into_raw(f), ) } } pub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_internal_clock_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::internal-clock\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_internal_clock_trampoline::<F> as *const (), )), Box_::into_raw(f), ) } } pub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_master_clock_id_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::master-clock-id\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_master_clock_id_trampoline::<F> as *const (), )), Box_::into_raw(f), ) } } } unsafe impl Send for PtpClock {} unsafe impl Sync for PtpClock {}
{ "pile_set_name": "Github" }
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MBED_PORTINOUT_H #define MBED_PORTINOUT_H #include "platform.h" #if DEVICE_PORTINOUT #include "port_api.h" namespace mbed { /** A multiple pin digital in/out used to set/read multiple bi-directional pins */ class PortInOut { public: /** Create an PortInOut, connected to the specified port * * @param port Port to connect to (Port0-Port5) * @param mask A bitmask to identify which bits in the port should be included (0 - ignore) */ PortInOut(PortName port, int mask = 0xFFFFFFFF) { port_init(&_port, port, mask, PIN_INPUT); } /** Write the value to the output port * * @param value An integer specifying a bit to write for every corresponding port pin */ void write(int value) { port_write(&_port, value); } /** Read the value currently output on the port * * @returns * An integer with each bit corresponding to associated port pin setting */ int read() { return port_read(&_port); } /** Set as an output */ void output() { port_dir(&_port, PIN_OUTPUT); } /** Set as an input */ void input() { port_dir(&_port, PIN_INPUT); } /** Set the input pin mode * * @param mode PullUp, PullDown, PullNone, OpenDrain */ void mode(PinMode mode) { port_mode(&_port, mode); } /** A shorthand for write() */ PortInOut& operator= (int value) { write(value); return *this; } PortInOut& operator= (PortInOut& rhs) { write(rhs.read()); return *this; } /** A shorthand for read() */ operator int() { return read(); } private: port_t _port; }; } // namespace mbed #endif #endif
{ "pile_set_name": "Github" }
/** * @module helpers/progressBar */ export default class HelpersProgressBar { constructor(container) { this._container = container; this._modes = { load: { name: 'load', color: '#FFF56F', }, parse: { name: 'parse', color: '#2196F3', }, }; this.requestAnimationFrameID = null; this._mode = null; this._value = null; this._total = null; this._totalFiles = null; this.init(); } free() { let progressContainers = this._container.getElementsByClassName('progress container'); if (progressContainers.length > 0) { progressContainers[0].parentNode.removeChild(progressContainers[0]); } progressContainers = null; // stop rendering loop window.cancelAnimationFrame(this.requestAnimationFrameID); } init() { let progressContainer = this._domContainer(); for (let mode in this._modes) { if (this._modes.hasOwnProperty(mode)) { let bar = this._domBar(this._modes[mode]); progressContainer.appendChild(bar); bar = null; } } this._container.appendChild(progressContainer); progressContainer = null; // start rendering loop this.updateUI(); } // url can be used in child class to show overall progress bar update(value, total, mode, url = '') { this._mode = mode; this._value = value; // depending on CDN, total return to XHTTPRequest can be 0. // In this case, we generate a random number to animate the progressbar if (total === 0) { this._total = value; this._value = Math.random() * value; } else { this._total = total; } } updateUI() { this.requestAnimationFrameID = requestAnimationFrame(() => { this.updateUI(); }); if ( !( this._modes.hasOwnProperty(this._mode) && this._modes[this._mode].hasOwnProperty('name') && this._modes[this._mode].hasOwnProperty('color') ) ) { return false; } const progress = Math.round((this._value / this._total) * 100); const color = this._modes[this._mode].color; let progressBar = this._container.getElementsByClassName( 'progress ' + this._modes[this._mode].name ); if (progressBar.length > 0) { progressBar[0].style.borderColor = color; progressBar[0].style.width = progress + '%'; } progressBar = null; } _domContainer() { let container = document.createElement('div'); // class it container.classList.add('progress'); container.classList.add('container'); // style it container.style.width = '100%'; container.style.height = '8px'; container.style.position = 'absolute'; container.style.backgroundColor = 'rgba(158, 158, 158, 0.5)'; container.style.top = '0'; container.style.zIndex = '1'; return container; } _domBar(mode) { if (!(mode.hasOwnProperty('name') && mode.hasOwnProperty('color'))) { window.console.log('Invalid mode provided.'); window.console.log(mode); return false; } let bar = document.createElement('div'); // class it bar.classList.add(mode.name); bar.classList.add('progress'); // style it bar.style.border = '2px solid ' + mode.color; bar.style.width = '0%'; return bar; } set totalFiles(totalFiles) { this._totalFiles = totalFiles; } get totalFiles() { return this._totalFiles; } }
{ "pile_set_name": "Github" }
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; namespace MonoNX.OsHle.Handles { class KProcessScheduler : IDisposable { private class SchedulerThread : IDisposable { public HThread Thread { get; private set; } public AutoResetEvent WaitEvent { get; private set; } public SchedulerThread(HThread Thread) { this.Thread = Thread; WaitEvent = new AutoResetEvent(false); } public void Dispose() { Dispose(true); } protected virtual void Dispose(bool Disposing) { if (Disposing) { WaitEvent.Dispose(); } } } private class ThreadQueue { private List<SchedulerThread> Threads; public ThreadQueue() { Threads = new List<SchedulerThread>(); } public void Push(SchedulerThread Thread) { lock (Threads) { Threads.Add(Thread); } } public SchedulerThread Pop(int MinPriority = 0x40) { lock (Threads) { SchedulerThread SchedThread; int HighestPriority = MinPriority; int HighestPrioIndex = -1; for (int Index = 0; Index < Threads.Count; Index++) { SchedThread = Threads[Index]; if (HighestPriority > SchedThread.Thread.Priority) { HighestPriority = SchedThread.Thread.Priority; HighestPrioIndex = Index; } } if (HighestPrioIndex == -1) { return null; } SchedThread = Threads[HighestPrioIndex]; Threads.RemoveAt(HighestPrioIndex); return SchedThread; } } public bool HasThread(SchedulerThread SchedThread) { lock (Threads) { return Threads.Contains(SchedThread); } } } private ConcurrentDictionary<HThread, SchedulerThread> AllThreads; private ThreadQueue[] WaitingToRun; private HashSet<int> ActiveProcessors; private object SchedLock; public KProcessScheduler() { AllThreads = new ConcurrentDictionary<HThread, SchedulerThread>(); WaitingToRun = new ThreadQueue[4]; for (int Index = 0; Index < 4; Index++) { WaitingToRun[Index] = new ThreadQueue(); } ActiveProcessors = new HashSet<int>(); SchedLock = new object(); } public void StartThread(HThread Thread) { lock (SchedLock) { SchedulerThread SchedThread = new SchedulerThread(Thread); if (!AllThreads.TryAdd(Thread, SchedThread)) { return; } if (!ActiveProcessors.Contains(Thread.ProcessorId)) { ActiveProcessors.Add(Thread.ProcessorId); Thread.Thread.Execute(); Logging.Debug($"{GetDbgThreadInfo(Thread)} running."); } else { WaitingToRun[Thread.ProcessorId].Push(SchedThread); Logging.Debug($"{GetDbgThreadInfo(SchedThread.Thread)} waiting to run."); } } } public void Suspend(int ProcessorId) { lock (SchedLock) { SchedulerThread SchedThread = WaitingToRun[ProcessorId].Pop(); if (SchedThread != null) { RunThread(SchedThread); } else { ActiveProcessors.Remove(ProcessorId); } } } public void Resume(HThread CurrThread) { SchedulerThread SchedThread; Logging.Debug($"{GetDbgThreadInfo(CurrThread)} entering ipc delay wait state."); lock (SchedLock) { if (!AllThreads.TryGetValue(CurrThread, out SchedThread)) { Logging.Error($"{GetDbgThreadInfo(CurrThread)} was not found on the scheduler queue!"); return; } } TryResumingExecution(SchedThread); } public void WaitForSignal(HThread Thread, int Timeout = -1) { SchedulerThread SchedThread; Logging.Debug($"{GetDbgThreadInfo(Thread)} entering signal wait state."); lock (SchedLock) { SchedThread = WaitingToRun[Thread.ProcessorId].Pop(); if (SchedThread != null) { RunThread(SchedThread); } else { ActiveProcessors.Remove(Thread.ProcessorId); } if (!AllThreads.TryGetValue(Thread, out SchedThread)) { Logging.Error($"{GetDbgThreadInfo(Thread)} was not found on the scheduler queue!"); return; } } if (Timeout >= 0) { Logging.Debug($"{GetDbgThreadInfo(Thread)} has wait timeout of {Timeout}ms."); SchedThread.WaitEvent.WaitOne(Timeout); } else { SchedThread.WaitEvent.WaitOne(); } TryResumingExecution(SchedThread); } private void TryResumingExecution(SchedulerThread SchedThread) { HThread Thread = SchedThread.Thread; lock (SchedLock) { if (ActiveProcessors.Add(Thread.ProcessorId)) { Logging.Debug($"{GetDbgThreadInfo(Thread)} resuming execution..."); return; } WaitingToRun[Thread.ProcessorId].Push(SchedThread); } SchedThread.WaitEvent.WaitOne(); Logging.Debug($"{GetDbgThreadInfo(Thread)} resuming execution..."); } public void Yield(HThread Thread) { SchedulerThread SchedThread; Logging.Debug($"{GetDbgThreadInfo(Thread)} yielded execution."); lock (SchedLock) { SchedThread = WaitingToRun[Thread.ProcessorId].Pop(Thread.Priority); if (SchedThread == null) { Logging.Debug($"{GetDbgThreadInfo(Thread)} resumed because theres nothing better to run."); return; } RunThread(SchedThread); if (!AllThreads.TryGetValue(Thread, out SchedThread)) { Logging.Error($"{GetDbgThreadInfo(Thread)} was not found on the scheduler queue!"); return; } WaitingToRun[Thread.ProcessorId].Push(SchedThread); } SchedThread.WaitEvent.WaitOne(); Logging.Debug($"{GetDbgThreadInfo(Thread)} resuming execution..."); } private void RunThread(SchedulerThread SchedThread) { if (!SchedThread.Thread.Thread.Execute()) { SchedThread.WaitEvent.Set(); } else { Logging.Debug($"{GetDbgThreadInfo(SchedThread.Thread)} running."); } } public void Signal(params HThread[] Threads) { lock (SchedLock) { foreach (HThread Thread in Threads) { if (AllThreads.TryGetValue(Thread, out SchedulerThread SchedThread)) { if (!WaitingToRun[Thread.ProcessorId].HasThread(SchedThread)) { Logging.Debug($"{GetDbgThreadInfo(Thread)} signaled."); SchedThread.WaitEvent.Set(); } } } } } private string GetDbgThreadInfo(HThread Thread) { return $"Thread {Thread.ThreadId} (core {Thread.ProcessorId}) prio {Thread.Priority}"; } public void Dispose() { Dispose(true); } protected virtual void Dispose(bool Disposing) { if (Disposing) { foreach (SchedulerThread SchedThread in AllThreads.Values) { SchedThread.Dispose(); } } } } }
{ "pile_set_name": "Github" }
#pragma once #include "Util.h" namespace Linux { class UtilRPI : public Util { public: UtilRPI(); static UtilRPI *from(AP_HAL::Util *util) { return static_cast<UtilRPI*>(util); } /* return the Raspberry Pi version */ int get_rpi_version() const; protected: // Called in the constructor once int _check_rpi_version(); private: int _rpi_version = 0; }; }
{ "pile_set_name": "Github" }
FROM library/nginx:latest ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -qq && apt-get install -y --no-install-recommends unzip # Install swagger COPY ./lib/swagger-ui-*.zip /opt/ RUN cd /opt && \ unzip swagger-ui-* && \ mkdir -p /var/www && \ mv doc/ /var/www/ # Install client COPY ./lib/indigo-service-client-*.zip /opt/ RUN cd /opt && \ unzip indigo-service-client-* && \ mkdir -p /var/www/ && \ mv indigo-service-client*/ /var/www/client/ # Install Ketcher COPY ./lib/ketcher*.zip /opt/ RUN cd /opt && \ unzip ketcher* && \ mv ketcher*/ /srv/ketcher/ COPY ./lib/favicon.ico /var/www/client/ COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf # Clean RUN apt-get autoremove -y && rm -rf /opt/* /var/lib/apt/lists/*
{ "pile_set_name": "Github" }
This patch allows the user to specify desired packet types (outgoing, broadcast, unicast, etc.) on packet sockets via setsockopt. This can reduce the load in situations where only a limited number of packet types are necessary Signed-off-by: Felix Fietkau <nbd@openwrt.org> --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h @@ -31,6 +31,8 @@ struct sockaddr_ll { #define PACKET_KERNEL 7 /* To kernel space */ /* Unused, PACKET_FASTROUTE and PACKET_LOOPBACK are invisible to user space */ #define PACKET_FASTROUTE 6 /* Fastrouted frame */ +#define PACKET_MASK_ANY 0xffffffff /* mask for packet type bits */ + /* Packet socket options */ @@ -54,6 +56,7 @@ struct sockaddr_ll { #define PACKET_FANOUT 18 #define PACKET_TX_HAS_OFF 19 #define PACKET_QDISC_BYPASS 20 +#define PACKET_RECV_TYPE 21 #define PACKET_FANOUT_HASH 0 #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1547,6 +1547,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; + struct packet_sock *po; /* * When we registered the protocol we saved the socket in the data @@ -1554,6 +1555,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; + po = pkt_sk(sk); /* * Yank back the headers [hope the device set this @@ -1566,7 +1568,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ - if (skb->pkt_type == PACKET_LOOPBACK) + if (!(po->pkt_type & (1 << skb->pkt_type))) goto out; if (!net_eq(dev_net(dev), sock_net(sk))) @@ -1773,12 +1775,12 @@ static int packet_rcv(struct sk_buff *sk int skb_len = skb->len; unsigned int snaplen, res; - if (skb->pkt_type == PACKET_LOOPBACK) - goto drop; - sk = pt->af_packet_priv; po = pkt_sk(sk); + if (!(po->pkt_type & (1 << skb->pkt_type))) + goto drop; + if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; @@ -1898,12 +1900,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); - if (skb->pkt_type == PACKET_LOOPBACK) - goto drop; - sk = pt->af_packet_priv; po = pkt_sk(sk); + if (!(po->pkt_type & (1 << skb->pkt_type))) + goto drop; + if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; @@ -2866,6 +2868,7 @@ static int packet_create(struct net *net spin_lock_init(&po->bind_lock); mutex_init(&po->pg_vec_lock); po->prot_hook.func = packet_rcv; + po->pkt_type = PACKET_MASK_ANY & ~(1 << PACKET_LOOPBACK); if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; @@ -3471,6 +3474,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } + case PACKET_RECV_TYPE: + { + unsigned int val; + if (optlen != sizeof(val)) + return -EINVAL; + if (copy_from_user(&val, optval, sizeof(val))) + return -EFAULT; + po->pkt_type = val & ~BIT(PACKET_LOOPBACK); + return 0; + } default: return -ENOPROTOOPT; } @@ -3522,6 +3535,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; + case PACKET_RECV_TYPE: + if (len > sizeof(unsigned int)) + len = sizeof(unsigned int); + val = po->pkt_type; + + data = &val; + break; case PACKET_VERSION: val = po->tp_version; break; --- a/net/packet/internal.h +++ b/net/packet/internal.h @@ -115,6 +115,7 @@ struct packet_sock { struct net_device __rcu *cached_dev; int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; + unsigned int pkt_type; }; static struct packet_sock *pkt_sk(struct sock *sk)
{ "pile_set_name": "Github" }
%1 -DWRITE_ARITH_H -DNO_FPINIT %2 %3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto nolonglong exit 0 :nolonglong %1 -DNO_LONG_LONG -DWRITE_ARITH_H -DNO_FPINIT %2 %3 %4 %5 %6 %7 %8 %9
{ "pile_set_name": "Github" }
/* * feature_match.cpp - optical flow feature match * * Copyright (c) 2016-2017 Intel Corporation * * 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. * * Author: Wind Yuan <feng.yuan@intel.com> * Author: Yinhang Liu <yinhangx.liu@intel.com> */ #include "feature_match.h" #define XCAM_FM_DEBUG 0 namespace XCam { FeatureMatch::FeatureMatch () : _x_offset (0.0f) , _y_offset (0.0f) , _mean_offset (0.0f) , _mean_offset_y (0.0f) , _valid_count (0) , _fm_idx (-1) , _frame_num (0) { } void FeatureMatch::set_fm_index (int idx) { _fm_idx = idx; } void FeatureMatch::set_config (const FMConfig &config) { _config = config; } void FeatureMatch::set_crop_rect (const Rect &left_rect, const Rect &right_rect) { _left_rect = left_rect; _right_rect = right_rect; } void FeatureMatch::get_crop_rect (Rect &left_rect, Rect &right_rect) { left_rect = _left_rect; right_rect = _right_rect; } void FeatureMatch::reset_offsets () { _x_offset = 0.0f; _y_offset = 0.0f; _mean_offset = 0.0f; _mean_offset_y = 0.0f; } float FeatureMatch::get_current_left_offset_x () { return _x_offset; } float FeatureMatch::get_current_left_offset_y () { return _y_offset; } void FeatureMatch::set_dst_width (int width) { XCAM_UNUSED (width); XCAM_LOG_ERROR ("dst width is not supported"); XCAM_ASSERT (false); } void FeatureMatch::enable_adjust_crop_area () { XCAM_LOG_ERROR ("adjust crop area is not supported"); XCAM_ASSERT (false); } bool FeatureMatch::get_mean_offset ( const std::vector<float> &offsets, float sum, int &count, float &mean_offset) { if (count < _config.min_corners || count <= 0) return false; mean_offset = sum / count; #if XCAM_FM_DEBUG XCAM_LOG_INFO ( "FeatureMatch(idx:%d): X-axis mean offset:%.2f, pre_mean_offset:%.2f (%d times, count:%d)", _fm_idx, mean_offset, 0.0f, 0, count); #endif bool ret = true; float delta = 20.0f;//mean_offset; float pre_mean_offset = mean_offset; for (int try_times = 1; try_times < 4; ++try_times) { int recur_count = 0; sum = 0.0f; for (size_t i = 0; i < offsets.size (); ++i) { if (fabs (offsets[i] - mean_offset) >= _config.recur_offset_error) continue; sum += offsets[i]; ++recur_count; } if (recur_count < _config.min_corners || recur_count <= 0) { ret = false; break; } mean_offset = sum / recur_count; #if XCAM_FM_DEBUG XCAM_LOG_INFO ( "FeatureMatch(idx:%d): X-axis mean_offset:%.2f, pre_mean_offset:%.2f (%d times, count:%d)", _fm_idx, mean_offset, pre_mean_offset, try_times, recur_count); #endif if (mean_offset == pre_mean_offset && recur_count == count) return true; if (fabs (mean_offset - pre_mean_offset) > fabs (delta) * 1.2f) { ret = false; break; } delta = mean_offset - pre_mean_offset; pre_mean_offset = mean_offset; count = recur_count; } return ret; } }
{ "pile_set_name": "Github" }
#ifndef COLLECTCFG_H #define COLLECTCFG_H // // This file is distributed under the MIT License. See LICENSE.md for details. // // Standard includes #include <fstream> #include <map> #include <set> // LLVM includes #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Pass.h" template<typename T> struct CompareByName { bool operator()(const T *LHS, const T *RHS) const { return LHS->getName() < RHS->getName(); } }; class CollectCFG : public llvm::ModulePass { public: static char ID; public: CollectCFG() : llvm::ModulePass(ID) {} bool runOnModule(llvm::Module &M) override; void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { AU.setPreservesAll(); } void serialize(std::ostream &Output); private: bool isNewInstruction(llvm::BasicBlock *BB); private: using BasicBlock = llvm::BasicBlock; template<typename T, size_t N> using SmallVector = llvm::SmallVector<T, N>; using Comparer = CompareByName<BasicBlock>; std::map<BasicBlock *, SmallVector<BasicBlock *, 2>, Comparer> Result; std::set<BasicBlock *> BlackList; }; #endif // COLLECTCFG_H
{ "pile_set_name": "Github" }
/***************************************************************************** * video_epg.c : EPG manipulation functions ***************************************************************************** * Copyright (C) 2010 Adrien Maglo * 2017 VLC authors, VideoLAN and VideoLabs * * Author: Adrien Maglo <magsoft@videolan.org> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <time.h> #include <vlc_common.h> #include <vlc_vout.h> #include <vlc_vout_osd.h> #include <vlc_events.h> #include <vlc_input_item.h> #include <vlc_epg.h> #include <vlc_url.h> #include "vout_spuregion_helper.h" /* Layout percentage defines */ #define OSDEPG_MARGIN 0.025 #define OSDEPG_MARGINS (OSDEPG_MARGIN * 2) #define OSDEPG_PADDING 0.05 /* inner margins */ #define OSDEPG_WIDTH (1.0 - OSDEPG_MARGINS) #define OSDEPG_HEIGHT 0.25 #define OSDEPG_LEFT OSDEPG_MARGIN #define OSDEPG_TOP (1.0 - OSDEPG_MARGINS - OSDEPG_HEIGHT + OSDEPG_MARGIN) /* layout */ #define OSDEPG_ROWS_COUNT 10 #define OSDEPG_ROW_HEIGHT (1.0 / OSDEPG_ROWS_COUNT) #define OSDEPG_LOGO_SIZE (OSDEPG_HEIGHT) /* shortcuts */ #define OSDEPG_RIGHT (1.0 - OSDEPG_MARGIN) #define OSDEPG_ROWS(x) (OSDEPG_ROW_HEIGHT * x) #define OSDEPG_ROW(x) (OSDEPG_ROWS(x)) #define EPGOSD_TEXTSIZE_NAME (OSDEPG_ROWS(2)) #define EPGOSD_TEXTSIZE_PROG (OSDEPG_ROWS(2)) #define EPGOSD_TEXTSIZE_NTWK (OSDEPG_ROWS(2)) //#define RGB_COLOR1 0xf48b00 //#define ARGB_BGCOLOR 0xC0333333 #define RGB_COLOR1 0x2badde #define ARGB_BGCOLOR 0xc003182d typedef struct { vlc_epg_t *epg; int64_t time; char *art; vlc_object_t *obj; } epg_spu_updater_sys_t; static char * GetDefaultArtUri( void ) { char *psz_uri = NULL; char *psz_path = config_GetSysPath(VLC_SYSDATA_DIR, "icons/hicolor/" "128x128/"PACKAGE_NAME".png"); if( psz_path != NULL ) { psz_uri = vlc_path2uri( psz_path, NULL ); free( psz_path ); } return psz_uri; } #define GRADIENT_COLORS 40 static subpicture_region_t * vout_OSDBackground(int x, int y, int width, int height, uint32_t i_argb) { /* Create a new subpicture region */ video_palette_t palette; spuregion_CreateVGradientPalette( &palette, GRADIENT_COLORS, i_argb, 0xFF000000 ); video_format_t fmt; video_format_Init(&fmt, VLC_CODEC_YUVP); fmt.i_width = fmt.i_visible_width = width; fmt.i_height = fmt.i_visible_height = height; fmt.i_sar_num = 1; fmt.i_sar_den = 1; fmt.p_palette = &palette; subpicture_region_t *region = subpicture_region_New(&fmt); if (!region) return NULL; region->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP; region->i_x = x; region->i_y = y; spuregion_CreateVGradientFill( region->p_picture->p, palette.i_entries ); return region; } static subpicture_region_t * vout_OSDEpgSlider(int x, int y, int width, int height, float ratio) { /* Create a new subpicture region */ video_palette_t palette = { .i_entries = 4, .palette = { [0] = { HEX2YUV(RGB_COLOR1), 0x20 }, /* Bar fill remain/background */ [1] = { HEX2YUV(0x00ff00), 0xff }, [2] = { HEX2YUV(RGB_COLOR1), 0xC0 }, /* Bar fill */ [3] = { HEX2YUV(0xffffff), 0xff }, /* Bar outline */ }, }; video_format_t fmt; video_format_Init(&fmt, VLC_CODEC_YUVP); fmt.i_width = fmt.i_visible_width = width; fmt.i_height = fmt.i_visible_height = height; fmt.i_sar_num = 1; fmt.i_sar_den = 1; fmt.p_palette = &palette; subpicture_region_t *region = subpicture_region_New(&fmt); if (!region) return NULL; region->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP; region->i_x = x; region->i_y = y; picture_t *picture = region->p_picture; ratio = VLC_CLIP(ratio, 0, 1); int filled_part_width = ratio * width; for (int j = 0; j < height; j++) { for (int i = 0; i < width; ) { /* Slider border. */ bool is_outline = j == 0 || j == height - 1 || i == 0 || i == width - 1; /* We can see the video through the part of the slider which corresponds to the leaving time. */ bool is_border = j < 3 || j > height - 4 || i < 3 || i > width - 4 || i < filled_part_width; uint8_t color = 2 * is_border + is_outline; if(i >= 3 && i < width - 4) { if(filled_part_width > 4) memset(&picture->p->p_pixels[picture->p->i_pitch * j + i], color, filled_part_width - 4); if(width > filled_part_width + 4) memset(&picture->p->p_pixels[picture->p->i_pitch * j + filled_part_width], color, width - filled_part_width - 4); i = __MAX(i+1, filled_part_width - 1); } else { picture->p->p_pixels[picture->p->i_pitch * j + i] = color; i++; } } } return region; } static void vout_OSDSegmentSetNoWrap(text_segment_t *p_segment) { for( ; p_segment; p_segment = p_segment->p_next ) { p_segment->style->e_wrapinfo = STYLE_WRAP_NONE; p_segment->style->i_features |= STYLE_HAS_WRAP_INFO; } } static text_segment_t * vout_OSDSegment(const char *psz_text, int size, uint32_t color) { text_segment_t *p_segment = text_segment_New(psz_text); if(unlikely(!p_segment)) return NULL; /* Set text style */ p_segment->style = text_style_Create(STYLE_NO_DEFAULTS); if (unlikely(!p_segment->style)) { text_segment_Delete(p_segment); return NULL; } p_segment->style->i_font_size = __MAX(size ,1 ); p_segment->style->i_font_color = color; p_segment->style->i_font_alpha = STYLE_ALPHA_OPAQUE; p_segment->style->i_outline_alpha = STYLE_ALPHA_TRANSPARENT; p_segment->style->i_shadow_alpha = STYLE_ALPHA_TRANSPARENT; p_segment->style->i_features |= STYLE_HAS_FONT_ALPHA | STYLE_HAS_FONT_COLOR | STYLE_HAS_OUTLINE_ALPHA | STYLE_HAS_SHADOW_ALPHA; return p_segment; } static subpicture_region_t * vout_OSDImage( vlc_object_t *p_obj, int x, int y, int w, int h, const char *psz_uri ) { video_format_t fmt_out; video_format_Init( &fmt_out, VLC_CODEC_YUVA ); fmt_out.i_width = fmt_out.i_visible_width = w; fmt_out.i_height = fmt_out.i_visible_height = h; subpicture_region_t *image = spuregion_CreateFromPicture( p_obj, &fmt_out, psz_uri ); if( image ) { image->i_x = x; image->i_y = y; image->i_align = SUBPICTURE_ALIGN_LEFT|SUBPICTURE_ALIGN_TOP; } return image; } static void vout_OSDRegionConstrain(subpicture_region_t *p_region, int w, int h) { if( p_region ) { p_region->i_max_width = w; p_region->i_max_height = h; } } static subpicture_region_t * vout_OSDTextRegion(text_segment_t *p_segment, int x, int y ) { video_format_t fmt; subpicture_region_t *region; if (!p_segment) return NULL; /* Create a new subpicture region */ video_format_Init(&fmt, VLC_CODEC_TEXT); fmt.i_sar_num = 1; fmt.i_sar_den = 1; region = subpicture_region_New(&fmt); if (!region) return NULL; region->p_text = p_segment; region->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP; region->i_text_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP; region->i_x = x; region->i_y = y; region->b_balanced_text = false; return region; } static subpicture_region_t * vout_OSDEpgText(const char *text, int x, int y, int size, uint32_t color) { return vout_OSDTextRegion(vout_OSDSegment(text, size, color), x, y); } static char * vout_OSDPrintTime(time_t t) { char *psz; struct tm tms; localtime_r(&t, &tms); if(asprintf(&psz, "%2.2d:%2.2d", tms.tm_hour, tms.tm_min) < 0) psz = NULL; return psz; } static subpicture_region_t * vout_OSDEpgEvent(const vlc_epg_event_t *p_evt, int x, int y, int size) { text_segment_t *p_segment = NULL; char *psz_start = vout_OSDPrintTime(p_evt->i_start); char *psz_end = vout_OSDPrintTime(p_evt->i_start + p_evt->i_duration); char *psz_text; if( -1 < asprintf(&psz_text, "%s-%s ", psz_start, psz_end)) { p_segment = vout_OSDSegment(psz_text, size, RGB_COLOR1); if( p_segment ) p_segment->p_next = vout_OSDSegment(p_evt->psz_name, size, 0xffffff); vout_OSDSegmentSetNoWrap( p_segment ); } free( psz_start ); free( psz_end ); if(!p_segment) return NULL; return vout_OSDTextRegion(p_segment, x, y); } static void vout_FillRightPanel(epg_spu_updater_sys_t *p_sys, int x, int y, int width, int height, int rx, int ry, subpicture_region_t **last_ptr) { float f_progress = 0; VLC_UNUSED(ry); /* Display the name of the channel. */ *last_ptr = vout_OSDEpgText(p_sys->epg->psz_name, x, y, height * EPGOSD_TEXTSIZE_NAME, 0x00ffffff); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; const vlc_epg_event_t *p_current = p_sys->epg->p_current; vlc_epg_event_t *p_next = NULL; if(!p_sys->epg->p_current && p_sys->epg->i_event) p_current = p_sys->epg->pp_event[0]; for(size_t i=0; i<p_sys->epg->i_event; i++) { if( p_sys->epg->pp_event[i]->i_id != p_current->i_id ) { p_next = p_sys->epg->pp_event[i]; break; } } /* Display the name of the current program. */ if(p_current) { *last_ptr = vout_OSDEpgEvent(p_current, x, y + height * OSDEPG_ROW(2), height * EPGOSD_TEXTSIZE_PROG); /* region rendering limits */ vout_OSDRegionConstrain(*last_ptr, width, 0); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; } /* NEXT EVENT */ if(p_next) { *last_ptr = vout_OSDEpgEvent(p_next, x, y + height * OSDEPG_ROW(5), height * EPGOSD_TEXTSIZE_PROG); /* region rendering limits */ vout_OSDRegionConstrain(*last_ptr, width, 0); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; } if(p_sys->time) { f_progress = (p_sys->time - p_sys->epg->p_current->i_start) / (float)p_sys->epg->p_current->i_duration; } /* Display the current program time slider. */ *last_ptr = vout_OSDEpgSlider(x + width * 0.05, y + height * OSDEPG_ROW(9), width * 0.90, height * OSDEPG_ROWS(1), f_progress); if (*last_ptr) last_ptr = &(*last_ptr)->p_next; /* Format the hours */ if(p_sys->time) { char *psz_network = vout_OSDPrintTime(p_sys->time); if(psz_network) { *last_ptr = vout_OSDEpgText(psz_network, rx, y + height * OSDEPG_ROW(0), height * EPGOSD_TEXTSIZE_NTWK, RGB_COLOR1); free(psz_network); if(*last_ptr) { (*last_ptr)->i_align = SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_RIGHT; last_ptr = &(*last_ptr)->p_next; } } } } static subpicture_region_t * vout_BuildOSDEpg(epg_spu_updater_sys_t *p_sys, int x, int y, int visible_width, int visible_height) { subpicture_region_t *head; subpicture_region_t **last_ptr = &head; const int i_padding = visible_height * (OSDEPG_HEIGHT * OSDEPG_PADDING); *last_ptr = vout_OSDBackground(x + visible_width * OSDEPG_LEFT, y + visible_height * OSDEPG_TOP, visible_width * OSDEPG_WIDTH, visible_height * OSDEPG_HEIGHT, ARGB_BGCOLOR); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; struct { int x; int y; int w; int h; int rx; int ry; } panel = { x + visible_width * OSDEPG_LEFT + i_padding, y + visible_height * OSDEPG_TOP + i_padding, visible_width * OSDEPG_WIDTH - 2 * i_padding, visible_height * OSDEPG_HEIGHT - 2 * i_padding, visible_width * OSDEPG_LEFT + i_padding, visible_height * (1.0 - OSDEPG_TOP - OSDEPG_HEIGHT) + i_padding, }; if( p_sys->art ) { struct { int x; int y; int w; int h; } logo = { panel.x, panel.y, panel.h, panel.h, }; *last_ptr = vout_OSDBackground(logo.x, logo.y, logo.w, logo.h, 0xFF000000 | RGB_COLOR1); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; int logo_padding = visible_height * (OSDEPG_LOGO_SIZE * OSDEPG_PADDING); *last_ptr = vout_OSDImage( p_sys->obj, logo.x + logo_padding, logo.y + logo_padding, logo.w - 2 * logo_padding, logo.h - 2 * logo_padding, p_sys->art ); if(*last_ptr) last_ptr = &(*last_ptr)->p_next; /* shrink */ panel.x += logo.w + i_padding; panel.w -= logo.w + i_padding; } vout_FillRightPanel( p_sys, panel.x, panel.y, panel.w, panel.h, panel.rx, panel.ry, last_ptr ); return head; } static int OSDEpgValidate(subpicture_t *subpic, bool has_src_changed, const video_format_t *fmt_src, bool has_dst_changed, const video_format_t *fmt_dst, vlc_tick_t ts) { VLC_UNUSED(subpic); VLC_UNUSED(ts); VLC_UNUSED(fmt_src); VLC_UNUSED(has_src_changed); VLC_UNUSED(fmt_dst); if (!has_dst_changed) return VLC_SUCCESS; return VLC_EGENERIC; } static void OSDEpgUpdate(subpicture_t *subpic, const video_format_t *fmt_src, const video_format_t *fmt_dst, vlc_tick_t ts) { epg_spu_updater_sys_t *sys = subpic->updater.p_sys; VLC_UNUSED(fmt_src); VLC_UNUSED(ts); video_format_t fmt = *fmt_dst; fmt.i_width = fmt.i_width * fmt.i_sar_num / fmt.i_sar_den; fmt.i_visible_width = fmt.i_visible_width * fmt.i_sar_num / fmt.i_sar_den; fmt.i_x_offset = fmt.i_x_offset * fmt.i_sar_num / fmt.i_sar_den; subpic->i_original_picture_width = fmt.i_visible_width; subpic->i_original_picture_height = fmt.i_visible_height; subpic->p_region = vout_BuildOSDEpg(sys, fmt.i_x_offset, fmt.i_y_offset, fmt.i_visible_width, fmt.i_visible_height); } static void OSDEpgDestroy(subpicture_t *subpic) { epg_spu_updater_sys_t *sys = subpic->updater.p_sys; if( sys->epg ) vlc_epg_Delete(sys->epg); free( sys->art ); free(sys); } /** * \brief Show EPG information about the current program of an input item * \param vout pointer to the vout the information is to be showed on * \param p_input pointer to the input item the information is to be showed * \param i_action osd_epg_action_e action */ int vout_OSDEpg(vout_thread_t *vout, input_item_t *input ) { vlc_epg_t *epg = NULL; int64_t epg_time; /* Look for the current program EPG event */ vlc_mutex_lock(&input->lock); const vlc_epg_t *tmp = input->p_epg_table; if ( tmp ) { /* Pick table designated event, or first/next one */ const vlc_epg_event_t *p_current_event = tmp->p_current; epg = vlc_epg_New(tmp->i_id, tmp->i_source_id); if(epg) { if( p_current_event ) { vlc_epg_event_t *p_event = vlc_epg_event_Duplicate(p_current_event); if(p_event) { if(!vlc_epg_AddEvent(epg, p_event)) vlc_epg_event_Delete(p_event); else vlc_epg_SetCurrent(epg, p_event->i_start); } } /* Add next event if any */ vlc_epg_event_t *p_next = NULL; for(size_t i=0; i<tmp->i_event; i++) { vlc_epg_event_t *p_evt = tmp->pp_event[i]; if((!p_next || p_next->i_start > p_evt->i_start) && (!p_current_event || (p_evt->i_id != p_current_event->i_id && p_evt->i_start >= p_current_event->i_start + p_current_event->i_duration ))) { p_next = tmp->pp_event[i]; } } if( p_next ) { vlc_epg_event_t *p_event = vlc_epg_event_Duplicate(p_next); if(!vlc_epg_AddEvent(epg, p_event)) vlc_epg_event_Delete(p_event); } if(epg->i_event > 0) { epg->psz_name = strdup(tmp->psz_name); } else { vlc_epg_Delete(epg); epg = NULL; } } } epg_time = input->i_epg_time; vlc_mutex_unlock(&input->lock); /* If no EPG event has been found. */ if (epg == NULL) return VLC_EGENERIC; if(epg->psz_name == NULL) /* Fallback (title == channel name) */ epg->psz_name = input_item_GetMeta( input, vlc_meta_Title ); epg_spu_updater_sys_t *sys = malloc(sizeof(*sys)); if (!sys) { vlc_epg_Delete(epg); return VLC_EGENERIC; } sys->epg = epg; sys->obj = VLC_OBJECT(vout); sys->time = epg_time; sys->art = input_item_GetMeta( input, vlc_meta_ArtworkURL ); if( !sys->art ) sys->art = GetDefaultArtUri(); subpicture_updater_t updater = { .pf_validate = OSDEpgValidate, .pf_update = OSDEpgUpdate, .pf_destroy = OSDEpgDestroy, .p_sys = sys }; const vlc_tick_t now = vlc_tick_now(); subpicture_t *subpic = subpicture_New(&updater); if (!subpic) { vlc_epg_Delete(sys->epg); free(sys); return VLC_EGENERIC; } subpic->i_channel = VOUT_SPU_CHANNEL_OSD; subpic->i_start = now; subpic->i_stop = now + VLC_TICK_FROM_SEC(3); subpic->b_ephemer = true; subpic->b_absolute = false; subpic->b_fade = true; subpic->b_subtitle = false; vout_PutSubpicture(vout, subpic); return VLC_SUCCESS; }
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "iphone", "scale" : "1x" }, { "idiom" : "iphone", "subtype" : "retina4", "scale" : "1x" }, { "idiom" : "iphone", "filename" : "timed-walkingman-return@2x.png", "scale" : "2x" }, { "idiom" : "iphone", "subtype" : "retina4", "scale" : "2x" }, { "idiom" : "iphone", "filename" : "timed-walkingman-return@3x.png", "scale" : "3x" }, { "idiom" : "iphone", "subtype" : "retina4", "scale" : "3x" }, { "idiom" : "ipad", "scale" : "1x" }, { "idiom" : "ipad", "filename" : "timed-walkingman-return@2x~ipad.png", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
/* * Copyright 2016 Smith AR <audoban@openmailbox.org> * Michail Vourlakos <mvourlakos@gmail.com> * * This file is part of Latte-Dock * * Latte-Dock 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. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import QtQuick 2.0 import QtQuick.Controls 1.4 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 import QtQuick.Controls.Styles.Plasma 2.0 as PlasmaStyles import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents PlasmaStyles.CheckBoxStyle{ id: checkboxStyle label: PlasmaComponents.Label { id: labelStyleTxt text: control.text wrapMode: Text.WordWrap elide: Text.ElideNone Rectangle { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.bottom height: 1 * units.devicePixelRatio color: theme.highlightColor visible: control.activeFocus } } panel: Item { implicitWidth: Math.round(row.implicitWidth + padding.left + padding.right) implicitHeight: Math.round(row.implicitHeight + padding.top + padding.bottom) RowLayout { id: row y: padding.top x: padding.left width: parent.width - padding.left - padding.right spacing: checkboxStyle.spacing Loader { id: indicatorLoader Layout.alignment: Qt.AlignTop sourceComponent: indicator } Loader { id: labelLoader Layout.alignment: Qt.AlignTop Layout.fillHeight: true Layout.fillWidth: true sourceComponent: label } } } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2011 the original author or authors * * Permission is hereby granted to use, modify, and distribute this file * in accordance with the terms of the license agreement accompanying it. */ package org.swiftsuspenders.support.injectees { import org.swiftsuspenders.support.types.Clazz; public class UnknownInjectParametersInjectee { [Inject(optional=true,name='test',param1=true,param2='str',param3=123)] public var property:Clazz; } }
{ "pile_set_name": "Github" }
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = [ "configuration.go", "evaluator.go", "registry.go", ], importpath = "k8s.io/kubernetes/pkg/quota/v1/generic", deps = [ "//pkg/quota/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", ], ) filegroup( name = "package-srcs", srcs = glob(["**"]), tags = ["automanaged"], visibility = ["//visibility:private"], ) filegroup( name = "all-srcs", srcs = [":package-srcs"], tags = ["automanaged"], ) go_test( name = "go_default_test", srcs = ["evaluator_test.go"], embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", ], )
{ "pile_set_name": "Github" }
/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ /** * When using Closure Compiler, JSCompiler_renameProperty(property, object) is * replaced at compile time by the munged name for object[property]. We cannot * alias this function, so we have to use a small shim that has the same * behavior when not compiling. */ window.JSCompiler_renameProperty = (prop, _obj) => prop; export const defaultConverter = { toAttribute(value, type) { switch (type) { case Boolean: return value ? '' : null; case Object: case Array: // if the value is `null` or `undefined` pass this through // to allow removing/no change behavior. return value == null ? value : JSON.stringify(value); } return value; }, fromAttribute(value, type) { switch (type) { case Boolean: return value !== null; case Number: return value === null ? null : Number(value); case Object: case Array: return JSON.parse(value); } return value; } }; /** * Change function that returns true if `value` is different from `oldValue`. * This method is used as the default for a property's `hasChanged` function. */ export const notEqual = (value, old) => { // This ensures (old==NaN, value==NaN) always returns false return old !== value && (old === old || value === value); }; const defaultPropertyDeclaration = { attribute: true, type: String, converter: defaultConverter, reflect: false, hasChanged: notEqual }; const microtaskPromise = Promise.resolve(true); const STATE_HAS_UPDATED = 1; const STATE_UPDATE_REQUESTED = 1 << 2; const STATE_IS_REFLECTING_TO_ATTRIBUTE = 1 << 3; const STATE_IS_REFLECTING_TO_PROPERTY = 1 << 4; const STATE_HAS_CONNECTED = 1 << 5; /** * Base element class which manages element properties and attributes. When * properties change, the `update` method is asynchronously called. This method * should be supplied by subclassers to render updates as desired. */ export class UpdatingElement extends HTMLElement { constructor() { super(); this._updateState = 0; this._instanceProperties = undefined; this._updatePromise = microtaskPromise; this._hasConnectedResolver = undefined; /** * Map with keys for any properties that have changed since the last * update cycle with previous values. */ this._changedProperties = new Map(); /** * Map with keys of properties that should be reflected when updated. */ this._reflectingProperties = undefined; this.initialize(); } /** * Returns a list of attributes corresponding to the registered properties. * @nocollapse */ static get observedAttributes() { // note: piggy backing on this to ensure we're finalized. this.finalize(); const attributes = []; // Use forEach so this works even if for/of loops are compiled to for loops // expecting arrays this._classProperties.forEach((v, p) => { const attr = this._attributeNameForProperty(p, v); if (attr !== undefined) { this._attributeToPropertyMap.set(attr, p); attributes.push(attr); } }); return attributes; } /** * Ensures the private `_classProperties` property metadata is created. * In addition to `finalize` this is also called in `createProperty` to * ensure the `@property` decorator can add property metadata. */ /** @nocollapse */ static _ensureClassProperties() { // ensure private storage for property declarations. if (!this.hasOwnProperty(JSCompiler_renameProperty('_classProperties', this))) { this._classProperties = new Map(); // NOTE: Workaround IE11 not supporting Map constructor argument. const superProperties = Object.getPrototypeOf(this)._classProperties; if (superProperties !== undefined) { superProperties.forEach((v, k) => this._classProperties.set(k, v)); } } } /** * Creates a property accessor on the element prototype if one does not exist. * The property setter calls the property's `hasChanged` property option * or uses a strict identity check to determine whether or not to request * an update. * @nocollapse */ static createProperty(name, options = defaultPropertyDeclaration) { // Note, since this can be called by the `@property` decorator which // is called before `finalize`, we ensure storage exists for property // metadata. this._ensureClassProperties(); this._classProperties.set(name, options); // Do not generate an accessor if the prototype already has one, since // it would be lost otherwise and that would never be the user's intention; // Instead, we expect users to call `requestUpdate` themselves from // user-defined accessors. Note that if the super has an accessor we will // still overwrite it if (options.noAccessor || this.prototype.hasOwnProperty(name)) { return; } const key = typeof name === 'symbol' ? Symbol() : `__${name}`; Object.defineProperty(this.prototype, name, { // tslint:disable-next-line:no-any no symbol in index get() { // tslint:disable-next-line:no-any no symbol in index return this[key]; }, set(value) { // tslint:disable-next-line:no-any no symbol in index const oldValue = this[name]; // tslint:disable-next-line:no-any no symbol in index this[key] = value; this.requestUpdate(name, oldValue); }, configurable: true, enumerable: true }); } /** * Creates property accessors for registered properties and ensures * any superclasses are also finalized. * @nocollapse */ static finalize() { if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this)) && this.finalized) { return; } // finalize any superclasses const superCtor = Object.getPrototypeOf(this); if (typeof superCtor.finalize === 'function') { superCtor.finalize(); } this.finalized = true; this._ensureClassProperties(); // initialize Map populated in observedAttributes this._attributeToPropertyMap = new Map(); // make any properties // Note, only process "own" properties since this element will inherit // any properties defined on the superClass, and finalization ensures // the entire prototype chain is finalized. if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) { const props = this.properties; // support symbols in properties (IE11 does not support this) const propKeys = [ ...Object.getOwnPropertyNames(props), ...(typeof Object.getOwnPropertySymbols === 'function') ? Object.getOwnPropertySymbols(props) : [] ]; // This for/of is ok because propKeys is an array for (const p of propKeys) { // note, use of `any` is due to TypeSript lack of support for symbol in // index types // tslint:disable-next-line:no-any no symbol in index this.createProperty(p, props[p]); } } } /** * Returns the property name for the given attribute `name`. * @nocollapse */ static _attributeNameForProperty(name, options) { const attribute = options.attribute; return attribute === false ? undefined : (typeof attribute === 'string' ? attribute : (typeof name === 'string' ? name.toLowerCase() : undefined)); } /** * Returns true if a property should request an update. * Called when a property value is set and uses the `hasChanged` * option for the property if present or a strict identity check. * @nocollapse */ static _valueHasChanged(value, old, hasChanged = notEqual) { return hasChanged(value, old); } /** * Returns the property value for the given attribute value. * Called via the `attributeChangedCallback` and uses the property's * `converter` or `converter.fromAttribute` property option. * @nocollapse */ static _propertyValueFromAttribute(value, options) { const type = options.type; const converter = options.converter || defaultConverter; const fromAttribute = (typeof converter === 'function' ? converter : converter.fromAttribute); return fromAttribute ? fromAttribute(value, type) : value; } /** * Returns the attribute value for the given property value. If this * returns undefined, the property will *not* be reflected to an attribute. * If this returns null, the attribute will be removed, otherwise the * attribute will be set to the value. * This uses the property's `reflect` and `type.toAttribute` property options. * @nocollapse */ static _propertyValueToAttribute(value, options) { if (options.reflect === undefined) { return; } const type = options.type; const converter = options.converter; const toAttribute = converter && converter.toAttribute || defaultConverter.toAttribute; return toAttribute(value, type); } /** * Performs element initialization. By default captures any pre-set values for * registered properties. */ initialize() { this._saveInstanceProperties(); } /** * Fixes any properties set on the instance before upgrade time. * Otherwise these would shadow the accessor and break these properties. * The properties are stored in a Map which is played back after the * constructor runs. Note, on very old versions of Safari (<=9) or Chrome * (<=41), properties created for native platform properties like (`id` or * `name`) may not have default values set in the element constructor. On * these browsers native properties appear on instances and therefore their * default value will overwrite any element default (e.g. if the element sets * this.id = 'id' in the constructor, the 'id' will become '' since this is * the native platform default). */ _saveInstanceProperties() { // Use forEach so this works even if for/of loops are compiled to for loops // expecting arrays this.constructor ._classProperties.forEach((_v, p) => { if (this.hasOwnProperty(p)) { const value = this[p]; delete this[p]; if (!this._instanceProperties) { this._instanceProperties = new Map(); } this._instanceProperties.set(p, value); } }); } /** * Applies previously saved instance properties. */ _applyInstanceProperties() { // Use forEach so this works even if for/of loops are compiled to for loops // expecting arrays // tslint:disable-next-line:no-any this._instanceProperties.forEach((v, p) => this[p] = v); this._instanceProperties = undefined; } connectedCallback() { this._updateState = this._updateState | STATE_HAS_CONNECTED; // Ensure connection triggers an update. Updates cannot complete before // connection and if one is pending connection the `_hasConnectionResolver` // will exist. If so, resolve it to complete the update, otherwise // requestUpdate. if (this._hasConnectedResolver) { this._hasConnectedResolver(); this._hasConnectedResolver = undefined; } else { this.requestUpdate(); } } /** * Allows for `super.disconnectedCallback()` in extensions while * reserving the possibility of making non-breaking feature additions * when disconnecting at some point in the future. */ disconnectedCallback() { } /** * Synchronizes property values when attributes change. */ attributeChangedCallback(name, old, value) { if (old !== value) { this._attributeToProperty(name, value); } } _propertyToAttribute(name, value, options = defaultPropertyDeclaration) { const ctor = this.constructor; const attr = ctor._attributeNameForProperty(name, options); if (attr !== undefined) { const attrValue = ctor._propertyValueToAttribute(value, options); // an undefined value does not change the attribute. if (attrValue === undefined) { return; } // Track if the property is being reflected to avoid // setting the property again via `attributeChangedCallback`. Note: // 1. this takes advantage of the fact that the callback is synchronous. // 2. will behave incorrectly if multiple attributes are in the reaction // stack at time of calling. However, since we process attributes // in `update` this should not be possible (or an extreme corner case // that we'd like to discover). // mark state reflecting this._updateState = this._updateState | STATE_IS_REFLECTING_TO_ATTRIBUTE; if (attrValue == null) { this.removeAttribute(attr); } else { this.setAttribute(attr, attrValue); } // mark state not reflecting this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_ATTRIBUTE; } } _attributeToProperty(name, value) { // Use tracking info to avoid deserializing attribute value if it was // just set from a property setter. if (this._updateState & STATE_IS_REFLECTING_TO_ATTRIBUTE) { return; } const ctor = this.constructor; const propName = ctor._attributeToPropertyMap.get(name); if (propName !== undefined) { const options = ctor._classProperties.get(propName) || defaultPropertyDeclaration; // mark state reflecting this._updateState = this._updateState | STATE_IS_REFLECTING_TO_PROPERTY; this[propName] = // tslint:disable-next-line:no-any ctor._propertyValueFromAttribute(value, options); // mark state not reflecting this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_PROPERTY; } } /** * Requests an update which is processed asynchronously. This should * be called when an element should update based on some state not triggered * by setting a property. In this case, pass no arguments. It should also be * called when manually implementing a property setter. In this case, pass the * property `name` and `oldValue` to ensure that any configured property * options are honored. Returns the `updateComplete` Promise which is resolved * when the update completes. * * @param name {PropertyKey} (optional) name of requesting property * @param oldValue {any} (optional) old value of requesting property * @returns {Promise} A Promise that is resolved when the update completes. */ requestUpdate(name, oldValue) { let shouldRequestUpdate = true; // if we have a property key, perform property update steps. if (name !== undefined && !this._changedProperties.has(name)) { const ctor = this.constructor; const options = ctor._classProperties.get(name) || defaultPropertyDeclaration; if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) { // track old value when changing. this._changedProperties.set(name, oldValue); // add to reflecting properties set if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) { if (this._reflectingProperties === undefined) { this._reflectingProperties = new Map(); } this._reflectingProperties.set(name, options); } // abort the request if the property should not be considered changed. } else { shouldRequestUpdate = false; } } if (!this._hasRequestedUpdate && shouldRequestUpdate) { this._enqueueUpdate(); } return this.updateComplete; } /** * Sets up the element to asynchronously update. */ async _enqueueUpdate() { // Mark state updating... this._updateState = this._updateState | STATE_UPDATE_REQUESTED; let resolve; const previousUpdatePromise = this._updatePromise; this._updatePromise = new Promise((res) => resolve = res); // Ensure any previous update has resolved before updating. // This `await` also ensures that property changes are batched. await previousUpdatePromise; // Make sure the element has connected before updating. if (!this._hasConnected) { await new Promise((res) => this._hasConnectedResolver = res); } // Allow `performUpdate` to be asynchronous to enable scheduling of updates. const result = this.performUpdate(); // Note, this is to avoid delaying an additional microtask unless we need // to. if (result != null && typeof result.then === 'function') { await result; } resolve(!this._hasRequestedUpdate); } get _hasConnected() { return (this._updateState & STATE_HAS_CONNECTED); } get _hasRequestedUpdate() { return (this._updateState & STATE_UPDATE_REQUESTED); } get hasUpdated() { return (this._updateState & STATE_HAS_UPDATED); } /** * Performs an element update. * * You can override this method to change the timing of updates. For instance, * to schedule updates to occur just before the next frame: * * ``` * protected async performUpdate(): Promise<unknown> { * await new Promise((resolve) => requestAnimationFrame(() => resolve())); * super.performUpdate(); * } * ``` */ performUpdate() { // Mixin instance properties once, if they exist. if (this._instanceProperties) { this._applyInstanceProperties(); } if (this.shouldUpdate(this._changedProperties)) { const changedProperties = this._changedProperties; this.update(changedProperties); this._markUpdated(); if (!(this._updateState & STATE_HAS_UPDATED)) { this._updateState = this._updateState | STATE_HAS_UPDATED; this.firstUpdated(changedProperties); } this.updated(changedProperties); } else { this._markUpdated(); } } _markUpdated() { this._changedProperties = new Map(); this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED; } /** * Returns a Promise that resolves when the element has completed updating. * The Promise value is a boolean that is `true` if the element completed the * update without triggering another update. The Promise result is `false` if * a property was set inside `updated()`. This getter can be implemented to * await additional state. For example, it is sometimes useful to await a * rendered element before fulfilling this Promise. To do this, first await * `super.updateComplete` then any subsequent state. * * @returns {Promise} The Promise returns a boolean that indicates if the * update resolved without triggering another update. */ get updateComplete() { return this._updatePromise; } /** * Controls whether or not `update` should be called when the element requests * an update. By default, this method always returns `true`, but this can be * customized to control when to update. * * * @param _changedProperties Map of changed properties with old values */ shouldUpdate(_changedProperties) { return true; } /** * Updates the element. This method reflects property values to attributes. * It can be overridden to render and keep updated element DOM. * Setting properties inside this method will *not* trigger * another update. * * * @param _changedProperties Map of changed properties with old values */ update(_changedProperties) { if (this._reflectingProperties !== undefined && this._reflectingProperties.size > 0) { // Use forEach so this works even if for/of loops are compiled to for // loops expecting arrays this._reflectingProperties.forEach((v, k) => this._propertyToAttribute(k, this[k], v)); this._reflectingProperties = undefined; } } /** * Invoked whenever the element is updated. Implement to perform * post-updating tasks via DOM APIs, for example, focusing an element. * * Setting properties inside this method will trigger the element to update * again after this update cycle completes. * * * @param _changedProperties Map of changed properties with old values */ updated(_changedProperties) { } /** * Invoked when the element is first updated. Implement to perform one time * work on the element after update. * * Setting properties inside this method will trigger the element to update * again after this update cycle completes. * * * @param _changedProperties Map of changed properties with old values */ firstUpdated(_changedProperties) { } } /** * Marks class as having finished creating properties. */ UpdatingElement.finalized = true; //# sourceMappingURL=updating-element.js.map
{ "pile_set_name": "Github" }
#ifndef ACE_STREAM_MODULES_CPP #define ACE_STREAM_MODULES_CPP #include "ace/Stream_Modules.h" #include "ace/OS_NS_string.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Head) template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::ACE_Stream_Head (void) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::ACE_Stream_Head"); } template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Stream_Head (void) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Stream_Head"); } template <ACE_SYNCH_DECL, class TIME_POLICY> void ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::dump"); #endif /* ACE_HAS_DUMP */ } // ACE_Module that act as the head and tail of a Stream. template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::open (void *) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::open"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::close (u_long) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::close"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::svc (void) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::svc"); return -1; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::control (ACE_Message_Block *mb) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::control"); ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; switch (cmd = ioc->cmd ()) { case ACE_IO_Cntl_Msg::SET_LWM: case ACE_IO_Cntl_Msg::SET_HWM: this->water_marks (cmd, *(size_t *) mb->cont ()->rd_ptr ()); ioc->rval (0); break; default: return 0; } return ioc->rval (); } // Performs canonical flushing at the ACE_Stream Head. template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::canonical_flush (ACE_Message_Block *mb) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::canonical_flush"); char *cp = mb->rd_ptr (); if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR)) { this->flush (ACE_Task_Flags::ACE_FLUSHALL); ACE_CLR_BITS (*cp, ACE_Task_Flags::ACE_FLUSHR); } if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW)) return this->reply (mb); else mb->release (); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::put"); int res = 0; if (mb->msg_type () == ACE_Message_Block::MB_IOCTL && (res = this->control (mb)) == -1) return res; if (this->is_writer ()) return this->put_next (mb, tv); else // this->is_reader () { switch (mb->msg_type ()) { case ACE_Message_Block::MB_FLUSH: return this->canonical_flush (mb); default: break; } return this->putq (mb, tv); } } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::init (int, ACE_TCHAR *[]) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::init"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::info (ACE_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) return -1; else ACE_OS::strsncpy (*strp, name, length); return static_cast<int> (ACE_OS::strlen (name)); } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::fini (void) { ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE, TIME_POLICY>::fini"); return 0; } ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Tail) template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::ACE_Stream_Tail (void) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::ACE_Stream_Tail"); } template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Stream_Tail (void) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Stream_Tail"); } template <ACE_SYNCH_DECL, class TIME_POLICY> void ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::dump"); #endif /* ACE_HAS_DUMP */ } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::open (void *) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::open"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::close (u_long) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::close"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::svc (void) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::svc"); return -1; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::control (ACE_Message_Block *mb) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::control"); ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; switch (cmd = ioc->cmd ()) { case ACE_IO_Cntl_Msg::SET_LWM: case ACE_IO_Cntl_Msg::SET_HWM: { size_t wm_size = *(size_t *) mb->cont ()->rd_ptr (); this->water_marks (cmd, wm_size); this->sibling ()->water_marks (cmd, wm_size); ioc->rval (0); break; } default: mb->msg_type (ACE_Message_Block::MB_IOCNAK); break; } return this->reply (mb); } // Perform flush algorithm as though we were the driver. template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::canonical_flush (ACE_Message_Block *mb) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::canonical_flush"); char *cp = mb->rd_ptr (); if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW)) { this->flush (ACE_Task_Flags::ACE_FLUSHALL); ACE_CLR_BITS (*cp, ACE_Task_Flags::ACE_FLUSHW); } if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR)) { this->sibling ()->flush (ACE_Task_Flags::ACE_FLUSHALL); return this->reply (mb); } else mb->release (); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::put (ACE_Message_Block *mb, ACE_Time_Value *) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::put"); if (this->is_writer ()) { switch (mb->msg_type ()) { case ACE_Message_Block::MB_IOCTL: return this->control (mb); /* NOTREACHED */ default: mb->release (); return 0; /* NOTREACHED */ } } return -1; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::init (int, ACE_TCHAR *[]) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::init"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::info (ACE_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) return -1; else ACE_OS::strsncpy (*strp, name, length); return static_cast<int> (ACE_OS::strlen (name)); } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::fini (void) { ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE, TIME_POLICY>::fini"); return 0; } ACE_ALLOC_HOOK_DEFINE(ACE_Thru_Task) template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::ACE_Thru_Task (void) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::ACE_Thru_Task"); } template <ACE_SYNCH_DECL, class TIME_POLICY> ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Thru_Task (void) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::~ACE_Thru_Task"); } template <ACE_SYNCH_DECL, class TIME_POLICY> void ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::dump"); #endif /* ACE_HAS_DUMP */ } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::open (void *) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::open"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::close (u_long) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::close"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::svc (void) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::svc"); return -1; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::put (ACE_Message_Block *msg, ACE_Time_Value *tv) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::put"); return this->put_next (msg, tv); } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::init (int, ACE_TCHAR *[]) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::init"); return 0; } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::info (ACE_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) return -1; else ACE_OS::strsncpy (*strp, name, length); return static_cast<int> (ACE_OS::strlen (name)); } template <ACE_SYNCH_DECL, class TIME_POLICY> int ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::fini (void) { ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE, TIME_POLICY>::fini"); return 0; } ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_STREAM_MODULES_CPP */
{ "pile_set_name": "Github" }
###### The boy from Africa # Remembering Tony Thomas, a great Economist journalist ##### He kept a spike in his office for poor copy—and once killed a mouse with it ![image](images/20190525_BKP001_0.jpg) > May 23rd 2019 “FRESH AIR and fresh light” was how Tony Thomas appeared to his bureau chief when he breezed into the Brussels office of The Economist in 1974. Improbable, even. He had come out of Africa, via the Yorkshire Post and the Washington office of the Times, to cover Britain’s efforts to join the Common Market. Unlike the desk-bound pundits in St James’s Street, here was a journalist of the old school. He was not afraid to get his hands dirty; to ask in his brisk, emphatic way, “What’s the story?” and to challenge conventional wisdom whenever he met it. Throughout his quarter-century at The Economist, as well as over fine wine and venison stew in the Welsh hills he retired to, he kept the habit. His Southern Rhodesian background made that difference. He was always, in accent, dress, head and heart, the boy from Africa. Bulawayo, his home town, was a place for hard grafters, unlike soft-handed Harare. So straight out of government school at 16 he had joined the Bulawayo Chronicle, then made his way to England to work there. But the move didn’t change him. When his doctor remarked latterly that he should be good for a couple of years, he told friends he would be able to plant at least one more crop of “mealies”, or maize. Once at The Economist he thrived, writing for almost every section of the paper. After Brussels he became US business correspondent, covering the whole country out of New York. America became his lasting joy and fascination. He did two stints there, and never tired of reviewing books on its history. With Edmund Fawcett, a colleague whose sister, Sarah (pictured right on previous page), he married, he wrote “The American Condition”, assessing land and people with his usual unflinching eye—but also the humanity of Rembrandt or Norman Rockwell, favourite artists. In London, as Business Affairs editor for six years, he kept a spike in his office to receive poor copy. (Ever the country boy, he also killed a stray mouse with it.) He wrote an enthusiastic survey on golf, ran Books & arts, and with the then-editor, Rupert Pennant-Rea, a soft Harare man, introduced a sports page. Its failure disappointed him. But then, at Books & arts, he was already doing “the best job on the paper”. Meanwhile he used his clear eye, first, to turn writers’ dross into good vigorous prose, and second to spot young talent when it turned up. Several of today’s senior editors were hired by him. He took pride in that, and them. His move to a whitewashed cottage in Crickadarn in 1998 seemed sudden, prompted by a cancer prognosis that he delightedly outlived by many years. But Wales was the land his great-grandparents had left for southern Africa; and there he turned his voracious appetite for life to becoming an honorary Welshman. He was a vice-president of the Erwood agricultural show, grew vegetables of prize-winning size, was teaching himself Welsh and found in Mattie (short for Matabele), a spirited Welsh springer, the perfect dog. But, like any journalist worth their salt, he loaded the sofa at weekends with every decent London paper he could get. For though he might have left the world of news, it, like The Economist, never left him. <<<<<<< HEAD -- 单词注释: 1.tony['tәuni]:a. 高贵的, 时髦的 2.thoma[]:n. (Thoma)人名;(阿尔巴、阿拉伯)索玛;(英、德、罗、匈、捷、塞、瑞典)托马 3.economist[i:'kɒnәmist]:n. 经济学者, 经济家 [经] 经济学家 4.spike[spaik]:n. 长钉, 鞋钉, 钉状物, 尖峰状物, 穗 vt. 以大钉钉牢, 用尖物刺穿, 阻止, 弃置不用 [计] 尖峰信号 5.Brussel[]:n. 布鲁塞尔(比利时首都) 6.improbable[im'prɒbәbl]:a. 不大可能的, 不象发生的, 荒谬可笑的 [法] 未必会的, 不大可能发生的, 未必确实的 7.Yorkshire['jɔ:kʃә]:n. 约克郡, 约克王朝 8.Washington['wɒʃiŋtn]:n. 华盛顿 9.pundit['pʌndit]:n. 学者, 梵文学者, 博学的印度人, 权威 10.ST[]:[计] 段表, 状态, 系统测试, 直端连接器 [化] 磺胺噻唑 11.emphatic[im'fætik]:a. 语调强的, 着重的, 强调了的 12.venison['venizn]:n. 鹿肉, 野味 13.stew[stju:]:n. 炖, 烦恼, 热浴, 妓院, 鱼塘 vi. 炖, 焖, 忧虑 vt. 炖, 焖, 使焦虑 14.Welsh[welʃ]:a. 威尔士的 n. 威尔士人 vi. 赖赌帐, 逃避责任 15.rhodesian[rəu'di:ziən]:n. 罗得西亚(前南非一地区)人 16.alway['ɔ:lwei]:adv. 永远;总是(等于always) 17.Bulawayo[,bu:lә'weiәj]:布拉瓦约[津巴布韦西南部城市] 18.grafter['grɑ:ftә]:n. 嫁接的人, 收贿者, 贪污者 [法] 贪污分子, 受贿者, 骗子 19.HARARE[hә'rɑ:rei]:哈拉雷[津巴布韦首都](旧称索尔兹伯里) 20.chronicle['krɒnikl]:n. 年代记, 记录, 编年史 vt. 把...载入编年史 21.latterly['lætәli]:adv. 近来, 最近 22.mealie['mi:li]:n. 玉米 23.maize[meiz]:n. 玉蜀黍, 黄色 a. 玉蜀黍色的, 黄色的 24.york[jɔ:k]:n. 约克郡;约克王朝 25.fascination[.fæsi'neiʃәn]:n. 令人着迷的事物, 入迷, 魅力 26.stint[stint]:vt. 节省, 限制, 停止 vi. 节约 n. 吝惜, 节约, 限额 27.edmund['edmәnd]:n. 艾德蒙(男子名) 28.Fawcett[]:n. 福西特(男子名) 29.Sarah['sєәrә]:n. 萨拉(<<圣经>>故事人物) 30.unflinching[.ʌn'flintʃiŋ]:a. 不畏惧的, 不退缩的, 不畏缩的 31.humanity[hju:'mæniti]:n. 人性, 人类, 博爱 32.Rembrandt['rembrænt]:伦布兰特(van Rijn [Ryn], 1609-1669, 荷兰画家) 33.norman['nɔ:mәn]:a. 诺曼第语的;诺曼第人的 34.Rockwell['rɒk,wel]:n. 罗克韦尔(美国公司);洛克威尔(姓氏) 35.stray[strei]:n. 走失的家畜, 浪子 a. 迷途的, 偶然的 vi. 迷路, 彷徨, 流浪 36.Rupert['ru:pət]:n. 鲁珀特(男子名) 37.dross[drɒs]:n. 浮渣, 碎屑, 渣滓 [化] 浮渣 38.prose[prәuz]:n. 散文 v. 写散文 a. 散文的, 平凡的 39.prognosis[prɒg'nәusis]:n. 预测, 预后 [医] 预后 40.delightedly[dɪ'laɪtɪdlɪ]:adv. 欣喜地, 高兴地; 欢欢喜喜 41.outlive[aut'liv]:vt. 比...经久, 比...活得长, 度过(风暴)而健在 42.wale[weil]:n. 隆起的伤痕, 鞭痕, 凸条纹, 精华, 选择 vt. 在...上留下鞭痕, 织成棱纹, 挑选, 撑住 vi. 挑选 43.voracious[vә'reiʃәs]:a. 贪吃的, 狼吞虎咽的, 贪婪的 44.honorary['ɒnәrәri]:a. 荣誉的, 无报酬的, 道义上的 [法] 名誉的, 荣誉的 45.welshman['welʃmәn]:n. 威尔士男子 46.Erwood[]:[地名] 埃鲁德 ( 加、英 ) 47.Mattie['mæti]:n. 马提(男子名);玛蒂(女子名) 48.Matabele[,mætә'bi:li]:n. 马塔贝列人(居住在非洲津巴布韦的祖鲁人)(亦作Matabeli, Matabili) 49.springer['spriŋә]:n. 跳的人 ======= >>>>>>> 50f1fbac684ef65c788c2c3b1cb359dd2a904378
{ "pile_set_name": "Github" }
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class ServiceTestCase(IntegrationTestCase): def test_list_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.serverless.v1.services.list() self.holodeck.assert_has_request(Request( 'get', 'https://serverless.twilio.com/v1/Services', )) def test_read_empty_response(self): self.holodeck.mock(Response( 200, ''' { "services": [], "meta": { "first_page_url": "https://serverless.twilio.com/v1/Services?PageSize=50&Page=0", "key": "services", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://serverless.twilio.com/v1/Services?PageSize=50&Page=0" } } ''' )) actual = self.client.serverless.v1.services.list() self.assertIsNotNone(actual) def test_fetch_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch() self.holodeck.assert_has_request(Request( 'get', 'https://serverless.twilio.com/v1/Services/ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', )) def test_fetch_response(self): self.holodeck.mock(Response( 200, ''' { "sid": "ZS00000000000000000000000000000000", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "test-service", "unique_name": "test-service-1", "include_credentials": true, "ui_editable": false, "date_created": "2018-11-10T20:00:00Z", "date_updated": "2018-11-10T20:00:00Z", "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000", "links": { "environments": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments", "functions": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions", "assets": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Assets", "builds": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds" } } ''' )) actual = self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch() self.assertIsNotNone(actual) def test_delete_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete() self.holodeck.assert_has_request(Request( 'delete', 'https://serverless.twilio.com/v1/Services/ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', )) def test_delete_response(self): self.holodeck.mock(Response( 204, None, )) actual = self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete() self.assertTrue(actual) def test_create_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.serverless.v1.services.create(unique_name="unique_name", friendly_name="friendly_name") values = {'UniqueName': "unique_name", 'FriendlyName': "friendly_name", } self.holodeck.assert_has_request(Request( 'post', 'https://serverless.twilio.com/v1/Services', data=values, )) def test_create_response(self): self.holodeck.mock(Response( 201, ''' { "sid": "ZS00000000000000000000000000000000", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "service-friendly", "unique_name": "service-unique", "include_credentials": true, "ui_editable": false, "date_created": "2018-11-10T20:00:00Z", "date_updated": "2018-11-10T20:00:00Z", "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000", "links": { "environments": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments", "functions": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions", "assets": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Assets", "builds": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds" } } ''' )) actual = self.client.serverless.v1.services.create(unique_name="unique_name", friendly_name="friendly_name") self.assertIsNotNone(actual) def test_update_request(self): self.holodeck.mock(Response(500, '')) with self.assertRaises(TwilioException): self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update() self.holodeck.assert_has_request(Request( 'post', 'https://serverless.twilio.com/v1/Services/ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', )) def test_update_response(self): self.holodeck.mock(Response( 200, ''' { "sid": "ZS00000000000000000000000000000000", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "service-friendly-update", "unique_name": "service-unique-update", "include_credentials": true, "ui_editable": true, "date_created": "2018-11-10T20:00:00Z", "date_updated": "2018-11-10T20:00:00Z", "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000", "links": { "environments": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments", "functions": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions", "assets": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Assets", "builds": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds" } } ''' )) actual = self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update() self.assertIsNotNone(actual)
{ "pile_set_name": "Github" }
package com.coremedia.iso.boxes; import com.googlecode.mp4parser.AbstractBox; import java.nio.ByteBuffer; /** * */ public class ItemDataBox extends AbstractBox { ByteBuffer data = ByteBuffer.allocate(0); public static final String TYPE = "idat"; public ItemDataBox() { super(TYPE); } public ByteBuffer getData() { return data; } public void setData(ByteBuffer data) { this.data = data; } @Override protected long getContentSize() { return data.limit(); } @Override public void _parseDetails(ByteBuffer content) { data = content.slice(); content.position(content.position() + content.remaining()); } @Override protected void getContent(ByteBuffer byteBuffer) { byteBuffer.put(data); } }
{ "pile_set_name": "Github" }
server: port: 8087 address: 0.0.0.0 servlet: context-path: / spring: datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/hmily_order?useUnicode=true&characterEncoding=utf8&useSSL=false username: root password: 12345 mybatis: type-aliases-package: org.dromara.hmily.demo.common.order.entity config-location: classpath:mybatis/mybatis-config.xml logging: level: root: error org.springframework.web: info org.apache.ibatis: debug org.dromara.hmily.demo.bonuspoint: debug org.dromara.hmily.demo.lottery: debug org.dromara.hmily.demo: debug io.netty: info path: "./logs" brpc: global: naming: namingServiceUrl: zookeeper://127.0.0.1:2181/examples group: "normal" version: 2.0.0 ignoreFailOfNamingService: true client: workThreadNum: 1 ioThreadNum: 1 protocol-type: 30 max-try-times: 1
{ "pile_set_name": "Github" }
/* * Copyright (C) 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef CompositionEvent_h #define CompositionEvent_h #include "UIEvent.h" namespace WebCore { class CompositionEvent : public UIEvent { public: static PassRefPtr<CompositionEvent> create() { return adoptRef(new CompositionEvent); } static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data) { return adoptRef(new CompositionEvent(type, view, data)); } virtual ~CompositionEvent(); void initCompositionEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data); String data() const { return m_data; } virtual bool isCompositionEvent() const; private: CompositionEvent(); CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data); String m_data; }; } // namespace WebCore #endif // CompositionEvent_h
{ "pile_set_name": "Github" }
import { createDuration } from './create'; function addSubtract (duration, input, value, direction) { var other = createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) export function add (input, value) { return addSubtract(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) export function subtract (input, value) { return addSubtract(this, input, value, -1); }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* */ /* * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved * * The original version of this source code and documentation * is copyrighted and owned by Taligent, Inc., a wholly-owned * subsidiary of IBM. These materials are provided under terms * of a License Agreement between Taligent and Sun. This technology * is protected by multiple US and International patents. * * This notice and attribution to Taligent may not be removed. * Taligent is a registered trademark of Taligent, Inc. * */ package sun.text.resources; import java.util.ListResourceBundle; public class CollationData_lt extends ListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "Rule", /* for lt, accents sorted backwards plus the following: */ "@" + // tal : french secondary "& C < c\u030c , C\u030c " + // nt : open-o < c-caron "& I ; y = \u0131 , Y = \u0130 " + // nt : i is equivalent to y "& S < s\u030c , S\u030c " + // nt : long-s < s-caron "& X < y\u0301, Y\u0301 "+ // nt : x < y-acute "< y\u0302 , Y\u0302 < y\u0308, Y\u0308 " + // nt : y-circumflex < y-umlaut "& Z < z\u030c , Z\u030c " // nt : ezh-tail < z-caron } }; } }
{ "pile_set_name": "Github" }
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 Appendix: 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) 19yy <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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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" }
using System.Collections.Generic; using clawSoft.clawPDF.Core.Jobs; using clawSoft.clawPDF.Core.Settings.Enums; using clawSoft.clawPDF.Utilities; using SystemInterface.IO; namespace clawSoft.clawPDF.Core.Ghostscript.OutputDevices { /// <summary> /// Extends OutputDevice to create PNG files /// </summary> public class PngDevice : OutputDevice { public PngDevice(IJob job) : base(job) { } public PngDevice(IJob job, IFile file, IOsHelper osHelper) : base(job, file, osHelper) { } protected override void AddDeviceSpecificParameters(IList<string> parameters) { switch (Job.Profile.PngSettings.Color) { case PngColor.BlackWhite: parameters.Add("-sDEVICE=pngmonod"); break; case PngColor.Color24Bit: parameters.Add("-sDEVICE=png16m"); break; case PngColor.Color32BitTransp: parameters.Add("-sDEVICE=pngalpha"); break; case PngColor.Color4Bit: parameters.Add("-sDEVICE=png16"); break; case PngColor.Color8Bit: parameters.Add("-sDEVICE=png256"); break; case PngColor.Gray8Bit: parameters.Add("-sDEVICE=pnggray"); break; } parameters.Add("-r" + Job.Profile.PngSettings.Dpi); parameters.Add("-dTextAlphaBits=4"); parameters.Add("-dGraphicsAlphaBits=4"); } protected override string ComposeOutputFilename() { //%d for multiple Pages return Job.JobTempFileName + "%d.png"; } } }
{ "pile_set_name": "Github" }
require('./$.typed-array')('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });
{ "pile_set_name": "Github" }
/** * This file is copyright 2017 State of the Netherlands (Ministry of Interior Affairs and Kingdom Relations). * It is made available under the terms of the GNU Affero General Public License, version 3 as published by the Free Software Foundation. * The project of which this file is part, may be found at https://github.com/MinBZK/operatieBRP. */ package nl.bzk.brp.model.operationeel.ber; import javax.persistence.Entity; import javax.persistence.Table; import nl.bzk.brp.model.algemeen.attribuuttype.ber.Meldingtekst; import nl.bzk.brp.model.algemeen.stamgegeven.kern.Element; import nl.bzk.brp.model.algemeen.stamgegeven.kern.Regel; import nl.bzk.brp.model.logisch.ber.GedeblokkeerdeMelding; import nl.bzk.brp.model.operationeel.ber.basis.AbstractGedeblokkeerdeMeldingModel; /** * Een melding die gedeblokkeerd is. * * Bij het controleren van een bijhoudingsbericht kunnen er ��n of meer meldingen zijn die gedeblokkeerd dienen te * worden opdat de bijhouding ook daadwerkelijk verricht kan worden. De gedeblokkeerde meldingen worden geadministreerd. * * * */ @Entity @Table(schema = "Ber", name = "GedeblokkeerdeMelding") public class GedeblokkeerdeMeldingModel extends AbstractGedeblokkeerdeMeldingModel implements GedeblokkeerdeMelding { /** * Standaard constructor (t.b.v. Hibernate/JPA). * */ protected GedeblokkeerdeMeldingModel() { super(); } /** * Standaard constructor die direct alle identificerende attributen instantieert of doorgeeft. * * @param regel regel van Gedeblokkeerde melding. * @param melding melding van Gedeblokkeerde melding. * @param attribuut attribuut van Gedeblokkeerde melding. */ public GedeblokkeerdeMeldingModel(final Regel regel, final Meldingtekst melding, final Element attribuut) { super(regel, melding, attribuut); } /** * Copy constructor om vanuit het bericht model een instantie van het operationeel model te maken. * * @param gedeblokkeerdeMelding Te kopieren object type. */ public GedeblokkeerdeMeldingModel(final GedeblokkeerdeMelding gedeblokkeerdeMelding) { super(gedeblokkeerdeMelding); } }
{ "pile_set_name": "Github" }
@prefix : <http://example.org/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . :c foaf:name "Chris" . :c foaf:mbox "chris@example.org" . :d foaf:name "Dan" . :d foaf:mbox "dan@example.org" . :c foaf:knows :d .
{ "pile_set_name": "Github" }
/* * Copyright (c) 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.grpc.client; import com.tangosol.io.Serializer; import com.tangosol.net.ConfigurableCacheFactory; import com.tangosol.net.NamedCache; import io.grpc.Channel; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import java.util.HashMap; import java.util.Map; /** * An integration test for {@link NamedCacheClient} that creates instances of * {@link NamedCacheClient} using the {@link AsyncNamedCacheClient.Builder}. * <p> * This integration test runs without a CDI environment. * * @author Jonathan Knight 2019.11.07 * @since 20.06 */ class ScopedNamedCacheClientIT extends BaseNamedCacheClientIT { // ----- test lifecycle ------------------------------------------------- @BeforeAll static void setupBaseTest() throws Exception { serverHelper = new ServerHelper(SCOPE_NAME); serverHelper.start(); ccf = serverHelper.getCCF(); channel = serverHelper.getChannel(); } @AfterAll static void cleanupBaseTest() { clients.values() .stream() .flatMap(m -> m.values().stream()) .forEach(client -> { try { if (client.isActiveInternal()) { client.destroy().join(); } } catch (Throwable t) { // ignored - we're done anyway } }); serverHelper.shutdown(); } // ----- BaseNamedCacheClientIT methods --------------------------------- @Override @SuppressWarnings("unchecked") protected <K, V> NamedCacheClient<K, V> createClient(String sCacheName, String sSerializerName, Serializer serializer) { Map<String, AsyncNamedCacheClient<?, ?>> map = clients.computeIfAbsent(sCacheName, k -> new HashMap<>()); AsyncNamedCacheClient<K, V> async = (AsyncNamedCacheClient<K, V>) map.computeIfAbsent(sSerializerName, k -> AsyncNamedCacheClient.builder(SCOPE_NAME, sCacheName) .channel(channel) .serializer(serializer, sSerializerName) .build()); if (!async.isActiveInternal()) { map.remove(sSerializerName); return createClient(sCacheName, sSerializerName, serializer); } return (NamedCacheClient<K, V>) async.getNamedCache(); } @Override protected <K, V> NamedCache<K, V> ensureCache(String sName, ClassLoader loader) { return ccf.ensureCache(sName, loader); } // ----- data members --------------------------------------------------- public static final String SCOPE_NAME = "testing"; private static final Map<String, Map<String, AsyncNamedCacheClient<?, ?>>> clients = new HashMap<>(); private static ServerHelper serverHelper; private static ConfigurableCacheFactory ccf; private static Channel channel; }
{ "pile_set_name": "Github" }
NOTE: ->*nix Systems: use the configure script and everything should work without problems. ->MSW: FIRST you need the mingw compiler (i think cygwin must work too, but you will have to modify the configure.in and change MINGW32 for CYGWIN) Then, run configure and pray. If it finds everything it needs (the only thing missed may be the pthreads library) is ready to compile. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options.
{ "pile_set_name": "Github" }
package warnings import ( "fmt" "github.com/pkg/errors" ) // WarnShouldUseUpdate is the message printed to the user when they attempt // to use "ship init" with a present state file on disk var WarnShouldUseUpdate = warning{msg: `To build on your progress, run "ship update"`} var WarnCannotRemoveState = warning{msg: `Existing state was found that Ship cannot automatically remove. Please delete the existing state and try again.`} // WarnShouldMoveDirectory is the message printed to the user when they attempt to run ship when files like `base` or // `overlays` are already present func WarnShouldMoveDirectory(dir string) error { return warning{msg: fmt.Sprintf(`Found existing directory %q. To avoid losing work, please move or remove %q before proceeding, or re-run with --rm-asset-dest.`, dir, dir)} } func WarnFileNotFound(filePath string) error { return warning{msg: fmt.Sprintf(`File %q was not found.`, filePath)} } type warning struct { msg string } func (w warning) Error() string { return w.msg } func IsWarning(err error) bool { cause := errors.Cause(err) _, ok := cause.(warning) return ok } func StripStackIfWarning(err error) error { if IsWarning(err) { return errors.Cause(err) } return err }
{ "pile_set_name": "Github" }
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // This file defines the map container and its helpers to support protobuf maps. // // The Map and MapIterator types are provided by this header file. // Please avoid using other types defined here, unless they are public // types within Map or MapIterator, such as Map::value_type. #ifndef GOOGLE_PROTOBUF_MAP_H__ #define GOOGLE_PROTOBUF_MAP_H__ #include <iterator> #include <limits> // To support Visual Studio 2008 #include <set> #include <utility> #include <google/protobuf/stubs/common.h> #include <google/protobuf/arena.h> #include <google/protobuf/generated_enum_util.h> #include <google/protobuf/map_type_handler.h> #include <google/protobuf/stubs/hash.h> #if __cpp_exceptions && LANG_CXX11 #include <random> #endif namespace google { namespace protobuf { template <typename Key, typename T> class Map; class MapIterator; template <typename Enum> struct is_proto_enum; namespace internal { template <typename Derived, typename Key, typename T, WireFormatLite::FieldType key_wire_type, WireFormatLite::FieldType value_wire_type, int default_enum_value> class MapFieldLite; template <typename Derived, typename Key, typename T, WireFormatLite::FieldType key_wire_type, WireFormatLite::FieldType value_wire_type, int default_enum_value> class MapField; template <typename Key, typename T> class TypeDefinedMapFieldBase; class DynamicMapField; class GeneratedMessageReflection; } // namespace internal // This is the class for google::protobuf::Map's internal value_type. Instead of using // std::pair as value_type, we use this class which provides us more control of // its process of construction and destruction. template <typename Key, typename T> class MapPair { public: typedef const Key first_type; typedef T second_type; MapPair(const Key& other_first, const T& other_second) : first(other_first), second(other_second) {} explicit MapPair(const Key& other_first) : first(other_first), second() {} MapPair(const MapPair& other) : first(other.first), second(other.second) {} ~MapPair() {} // Implicitly convertible to std::pair of compatible types. template <typename T1, typename T2> operator std::pair<T1, T2>() const { return std::pair<T1, T2>(first, second); } const Key first; T second; private: friend class ::google::protobuf::Arena; friend class Map<Key, T>; }; // google::protobuf::Map is an associative container type used to store protobuf map // fields. Each Map instance may or may not use a different hash function, a // different iteration order, and so on. E.g., please don't examine // implementation details to decide if the following would work: // Map<int, int> m0, m1; // m0[0] = m1[0] = m0[1] = m1[1] = 0; // assert(m0.begin()->first == m1.begin()->first); // Bug! // // Map's interface is similar to std::unordered_map, except that Map is not // designed to play well with exceptions. template <typename Key, typename T> class Map { public: typedef Key key_type; typedef T mapped_type; typedef MapPair<Key, T> value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef hash<Key> hasher; Map() : arena_(NULL), default_enum_value_(0) { Init(); } explicit Map(Arena* arena) : arena_(arena), default_enum_value_(0) { Init(); } Map(const Map& other) : arena_(NULL), default_enum_value_(other.default_enum_value_) { Init(); insert(other.begin(), other.end()); } template <class InputIt> Map(const InputIt& first, const InputIt& last) : arena_(NULL), default_enum_value_(0) { Init(); insert(first, last); } ~Map() { clear(); if (arena_ == NULL) { delete elements_; } } private: void Init() { elements_ = Arena::Create<InnerMap>(arena_, 0, hasher(), Allocator(arena_)); } // re-implement std::allocator to use arena allocator for memory allocation. // Used for google::protobuf::Map implementation. Users should not use this class // directly. template <typename U> class MapAllocator { public: typedef U value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; MapAllocator() : arena_(NULL) {} explicit MapAllocator(Arena* arena) : arena_(arena) {} template <typename X> MapAllocator(const MapAllocator<X>& allocator) : arena_(allocator.arena()) {} pointer allocate(size_type n, const void* hint = 0) { // If arena is not given, malloc needs to be called which doesn't // construct element object. if (arena_ == NULL) { return static_cast<pointer>(::operator new(n * sizeof(value_type))); } else { return reinterpret_cast<pointer>( Arena::CreateArray<uint8>(arena_, n * sizeof(value_type))); } } void deallocate(pointer p, size_type n) { if (arena_ == NULL) { #if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation) ::operator delete(p, n * sizeof(value_type)); #else ::operator delete(p); #endif } } #if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \ !defined(GOOGLE_PROTOBUF_OS_NACL) && \ !defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN) template<class NodeType, class... Args> void construct(NodeType* p, Args&&... args) { // Clang 3.6 doesn't compile static casting to void* directly. (Issue // #1266) According C++ standard 5.2.9/1: "The static_cast operator shall // not cast away constness". So first the maybe const pointer is casted to // const void* and after the const void* is const casted. new (const_cast<void*>(static_cast<const void*>(p))) NodeType(std::forward<Args>(args)...); } template<class NodeType> void destroy(NodeType* p) { p->~NodeType(); } #else void construct(pointer p, const_reference t) { new (p) value_type(t); } void destroy(pointer p) { p->~value_type(); } #endif template <typename X> struct rebind { typedef MapAllocator<X> other; }; template <typename X> bool operator==(const MapAllocator<X>& other) const { return arena_ == other.arena_; } template <typename X> bool operator!=(const MapAllocator<X>& other) const { return arena_ != other.arena_; } // To support Visual Studio 2008 size_type max_size() const { // parentheses around (std::...:max) prevents macro warning of max() return (std::numeric_limits<size_type>::max)(); } // To support gcc-4.4, which does not properly // support templated friend classes Arena* arena() const { return arena_; } private: typedef void DestructorSkippable_; Arena* const arena_; }; // InnerMap's key type is Key and its value type is value_type*. We use a // custom class here and for Node, below, to ensure that k_ is at offset 0, // allowing safe conversion from pointer to Node to pointer to Key, and vice // versa when appropriate. class KeyValuePair { public: KeyValuePair(const Key& k, value_type* v) : k_(k), v_(v) {} const Key& key() const { return k_; } Key& key() { return k_; } value_type* value() const { return v_; } value_type*& value() { return v_; } private: Key k_; value_type* v_; }; typedef MapAllocator<KeyValuePair> Allocator; // InnerMap is a generic hash-based map. It doesn't contain any // protocol-buffer-specific logic. It is a chaining hash map with the // additional feature that some buckets can be converted to use an ordered // container. This ensures O(lg n) bounds on find, insert, and erase, while // avoiding the overheads of ordered containers most of the time. // // The implementation doesn't need the full generality of unordered_map, // and it doesn't have it. More bells and whistles can be added as needed. // Some implementation details: // 1. The hash function has type hasher and the equality function // equal_to<Key>. We inherit from hasher to save space // (empty-base-class optimization). // 2. The number of buckets is a power of two. // 3. Buckets are converted to trees in pairs: if we convert bucket b then // buckets b and b^1 will share a tree. Invariant: buckets b and b^1 have // the same non-NULL value iff they are sharing a tree. (An alternative // implementation strategy would be to have a tag bit per bucket.) // 4. As is typical for hash_map and such, the Keys and Values are always // stored in linked list nodes. Pointers to elements are never invalidated // until the element is deleted. // 5. The trees' payload type is pointer to linked-list node. Tree-converting // a bucket doesn't copy Key-Value pairs. // 6. Once we've tree-converted a bucket, it is never converted back. However, // the items a tree contains may wind up assigned to trees or lists upon a // rehash. // 7. The code requires no C++ features from C++11 or later. // 8. Mutations to a map do not invalidate the map's iterators, pointers to // elements, or references to elements. // 9. Except for erase(iterator), any non-const method can reorder iterators. class InnerMap : private hasher { public: typedef value_type* Value; InnerMap(size_type n, hasher h, Allocator alloc) : hasher(h), num_elements_(0), seed_(Seed()), table_(NULL), alloc_(alloc) { n = TableSize(n); table_ = CreateEmptyTable(n); num_buckets_ = index_of_first_non_null_ = n; } ~InnerMap() { if (table_ != NULL) { clear(); Dealloc<void*>(table_, num_buckets_); } } private: enum { kMinTableSize = 8 }; // Linked-list nodes, as one would expect for a chaining hash table. struct Node { KeyValuePair kv; Node* next; }; // This is safe only if the given pointer is known to point to a Key that is // part of a Node. static Node* NodePtrFromKeyPtr(Key* k) { return reinterpret_cast<Node*>(k); } static Key* KeyPtrFromNodePtr(Node* node) { return &node->kv.key(); } // Trees. The payload type is pointer to Key, so that we can query the tree // with Keys that are not in any particular data structure. When we insert, // though, the pointer is always pointing to a Key that is inside a Node. struct KeyCompare { bool operator()(const Key* n0, const Key* n1) const { return *n0 < *n1; } }; typedef typename Allocator::template rebind<Key*>::other KeyPtrAllocator; typedef std::set<Key*, KeyCompare, KeyPtrAllocator> Tree; typedef typename Tree::iterator TreeIterator; // iterator and const_iterator are instantiations of iterator_base. template <typename KeyValueType> struct iterator_base { typedef KeyValueType& reference; typedef KeyValueType* pointer; // Invariants: // node_ is always correct. This is handy because the most common // operations are operator* and operator-> and they only use node_. // When node_ is set to a non-NULL value, all the other non-const fields // are updated to be correct also, but those fields can become stale // if the underlying map is modified. When those fields are needed they // are rechecked, and updated if necessary. iterator_base() : node_(NULL), m_(NULL), bucket_index_(0) {} explicit iterator_base(const InnerMap* m) : m_(m) { SearchFrom(m->index_of_first_non_null_); } // Any iterator_base can convert to any other. This is overkill, and we // rely on the enclosing class to use it wisely. The standard "iterator // can convert to const_iterator" is OK but the reverse direction is not. template <typename U> explicit iterator_base(const iterator_base<U>& it) : node_(it.node_), m_(it.m_), bucket_index_(it.bucket_index_) {} iterator_base(Node* n, const InnerMap* m, size_type index) : node_(n), m_(m), bucket_index_(index) {} iterator_base(TreeIterator tree_it, const InnerMap* m, size_type index) : node_(NodePtrFromKeyPtr(*tree_it)), m_(m), bucket_index_(index) { // Invariant: iterators that use buckets with trees have an even // bucket_index_. GOOGLE_DCHECK_EQ(bucket_index_ % 2, 0); } // Advance through buckets, looking for the first that isn't empty. // If nothing non-empty is found then leave node_ == NULL. void SearchFrom(size_type start_bucket) { GOOGLE_DCHECK(m_->index_of_first_non_null_ == m_->num_buckets_ || m_->table_[m_->index_of_first_non_null_] != NULL); node_ = NULL; for (bucket_index_ = start_bucket; bucket_index_ < m_->num_buckets_; bucket_index_++) { if (m_->TableEntryIsNonEmptyList(bucket_index_)) { node_ = static_cast<Node*>(m_->table_[bucket_index_]); break; } else if (m_->TableEntryIsTree(bucket_index_)) { Tree* tree = static_cast<Tree*>(m_->table_[bucket_index_]); GOOGLE_DCHECK(!tree->empty()); node_ = NodePtrFromKeyPtr(*tree->begin()); break; } } } reference operator*() const { return node_->kv; } pointer operator->() const { return &(operator*()); } friend bool operator==(const iterator_base& a, const iterator_base& b) { return a.node_ == b.node_; } friend bool operator!=(const iterator_base& a, const iterator_base& b) { return a.node_ != b.node_; } iterator_base& operator++() { if (node_->next == NULL) { TreeIterator tree_it; const bool is_list = revalidate_if_necessary(&tree_it); if (is_list) { SearchFrom(bucket_index_ + 1); } else { GOOGLE_DCHECK_EQ(bucket_index_ & 1, 0); Tree* tree = static_cast<Tree*>(m_->table_[bucket_index_]); if (++tree_it == tree->end()) { SearchFrom(bucket_index_ + 2); } else { node_ = NodePtrFromKeyPtr(*tree_it); } } } else { node_ = node_->next; } return *this; } iterator_base operator++(int /* unused */) { iterator_base tmp = *this; ++*this; return tmp; } // Assumes node_ and m_ are correct and non-NULL, but other fields may be // stale. Fix them as needed. Then return true iff node_ points to a // Node in a list. If false is returned then *it is modified to be // a valid iterator for node_. bool revalidate_if_necessary(TreeIterator* it) { GOOGLE_DCHECK(node_ != NULL && m_ != NULL); // Force bucket_index_ to be in range. bucket_index_ &= (m_->num_buckets_ - 1); // Common case: the bucket we think is relevant points to node_. if (m_->table_[bucket_index_] == static_cast<void*>(node_)) return true; // Less common: the bucket is a linked list with node_ somewhere in it, // but not at the head. if (m_->TableEntryIsNonEmptyList(bucket_index_)) { Node* l = static_cast<Node*>(m_->table_[bucket_index_]); while ((l = l->next) != NULL) { if (l == node_) { return true; } } } // Well, bucket_index_ still might be correct, but probably // not. Revalidate just to be sure. This case is rare enough that we // don't worry about potential optimizations, such as having a custom // find-like method that compares Node* instead of const Key&. iterator_base i(m_->find(*KeyPtrFromNodePtr(node_), it)); bucket_index_ = i.bucket_index_; return m_->TableEntryIsList(bucket_index_); } Node* node_; const InnerMap* m_; size_type bucket_index_; }; public: typedef iterator_base<KeyValuePair> iterator; typedef iterator_base<const KeyValuePair> const_iterator; iterator begin() { return iterator(this); } iterator end() { return iterator(); } const_iterator begin() const { return const_iterator(this); } const_iterator end() const { return const_iterator(); } void clear() { for (size_type b = 0; b < num_buckets_; b++) { if (TableEntryIsNonEmptyList(b)) { Node* node = static_cast<Node*>(table_[b]); table_[b] = NULL; do { Node* next = node->next; DestroyNode(node); node = next; } while (node != NULL); } else if (TableEntryIsTree(b)) { Tree* tree = static_cast<Tree*>(table_[b]); GOOGLE_DCHECK(table_[b] == table_[b + 1] && (b & 1) == 0); table_[b] = table_[b + 1] = NULL; typename Tree::iterator tree_it = tree->begin(); do { Node* node = NodePtrFromKeyPtr(*tree_it); typename Tree::iterator next = tree_it; ++next; tree->erase(tree_it); DestroyNode(node); tree_it = next; } while (tree_it != tree->end()); DestroyTree(tree); b++; } } num_elements_ = 0; index_of_first_non_null_ = num_buckets_; } const hasher& hash_function() const { return *this; } static size_type max_size() { return static_cast<size_type>(1) << (sizeof(void**) >= 8 ? 60 : 28); } size_type size() const { return num_elements_; } bool empty() const { return size() == 0; } iterator find(const Key& k) { return iterator(FindHelper(k).first); } const_iterator find(const Key& k) const { return find(k, NULL); } // In traditional C++ style, this performs "insert if not present." std::pair<iterator, bool> insert(const KeyValuePair& kv) { std::pair<const_iterator, size_type> p = FindHelper(kv.key()); // Case 1: key was already present. if (p.first.node_ != NULL) return std::make_pair(iterator(p.first), false); // Case 2: insert. if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) { p = FindHelper(kv.key()); } const size_type b = p.second; // bucket number Node* node = Alloc<Node>(1); alloc_.construct(&node->kv, kv); iterator result = InsertUnique(b, node); ++num_elements_; return std::make_pair(result, true); } // The same, but if an insertion is necessary then the value portion of the // inserted key-value pair is left uninitialized. std::pair<iterator, bool> insert(const Key& k) { std::pair<const_iterator, size_type> p = FindHelper(k); // Case 1: key was already present. if (p.first.node_ != NULL) return std::make_pair(iterator(p.first), false); // Case 2: insert. if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) { p = FindHelper(k); } const size_type b = p.second; // bucket number Node* node = Alloc<Node>(1); typedef typename Allocator::template rebind<Key>::other KeyAllocator; KeyAllocator(alloc_).construct(&node->kv.key(), k); iterator result = InsertUnique(b, node); ++num_elements_; return std::make_pair(result, true); } Value& operator[](const Key& k) { KeyValuePair kv(k, Value()); return insert(kv).first->value(); } void erase(iterator it) { GOOGLE_DCHECK_EQ(it.m_, this); typename Tree::iterator tree_it; const bool is_list = it.revalidate_if_necessary(&tree_it); size_type b = it.bucket_index_; Node* const item = it.node_; if (is_list) { GOOGLE_DCHECK(TableEntryIsNonEmptyList(b)); Node* head = static_cast<Node*>(table_[b]); head = EraseFromLinkedList(item, head); table_[b] = static_cast<void*>(head); } else { GOOGLE_DCHECK(TableEntryIsTree(b)); Tree* tree = static_cast<Tree*>(table_[b]); tree->erase(*tree_it); if (tree->empty()) { // Force b to be the minimum of b and b ^ 1. This is important // only because we want index_of_first_non_null_ to be correct. b &= ~static_cast<size_type>(1); DestroyTree(tree); table_[b] = table_[b + 1] = NULL; } } DestroyNode(item); --num_elements_; if (GOOGLE_PREDICT_FALSE(b == index_of_first_non_null_)) { while (index_of_first_non_null_ < num_buckets_ && table_[index_of_first_non_null_] == NULL) { ++index_of_first_non_null_; } } } private: const_iterator find(const Key& k, TreeIterator* it) const { return FindHelper(k, it).first; } std::pair<const_iterator, size_type> FindHelper(const Key& k) const { return FindHelper(k, NULL); } std::pair<const_iterator, size_type> FindHelper(const Key& k, TreeIterator* it) const { size_type b = BucketNumber(k); if (TableEntryIsNonEmptyList(b)) { Node* node = static_cast<Node*>(table_[b]); do { if (IsMatch(*KeyPtrFromNodePtr(node), k)) { return std::make_pair(const_iterator(node, this, b), b); } else { node = node->next; } } while (node != NULL); } else if (TableEntryIsTree(b)) { GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]); b &= ~static_cast<size_t>(1); Tree* tree = static_cast<Tree*>(table_[b]); Key* key = const_cast<Key*>(&k); typename Tree::iterator tree_it = tree->find(key); if (tree_it != tree->end()) { if (it != NULL) *it = tree_it; return std::make_pair(const_iterator(tree_it, this, b), b); } } return std::make_pair(end(), b); } // Insert the given Node in bucket b. If that would make bucket b too big, // and bucket b is not a tree, create a tree for buckets b and b^1 to share. // Requires count(*KeyPtrFromNodePtr(node)) == 0 and that b is the correct // bucket. num_elements_ is not modified. iterator InsertUnique(size_type b, Node* node) { GOOGLE_DCHECK(index_of_first_non_null_ == num_buckets_ || table_[index_of_first_non_null_] != NULL); // In practice, the code that led to this point may have already // determined whether we are inserting into an empty list, a short list, // or whatever. But it's probably cheap enough to recompute that here; // it's likely that we're inserting into an empty or short list. iterator result; GOOGLE_DCHECK(find(*KeyPtrFromNodePtr(node)) == end()); if (TableEntryIsEmpty(b)) { result = InsertUniqueInList(b, node); } else if (TableEntryIsNonEmptyList(b)) { if (GOOGLE_PREDICT_FALSE(TableEntryIsTooLong(b))) { TreeConvert(b); result = InsertUniqueInTree(b, node); GOOGLE_DCHECK_EQ(result.bucket_index_, b & ~static_cast<size_type>(1)); } else { // Insert into a pre-existing list. This case cannot modify // index_of_first_non_null_, so we skip the code to update it. return InsertUniqueInList(b, node); } } else { // Insert into a pre-existing tree. This case cannot modify // index_of_first_non_null_, so we skip the code to update it. return InsertUniqueInTree(b, node); } // parentheses around (std::min) prevents macro expansion of min(...) index_of_first_non_null_ = (std::min)(index_of_first_non_null_, result.bucket_index_); return result; } // Helper for InsertUnique. Handles the case where bucket b is a // not-too-long linked list. iterator InsertUniqueInList(size_type b, Node* node) { node->next = static_cast<Node*>(table_[b]); table_[b] = static_cast<void*>(node); return iterator(node, this, b); } // Helper for InsertUnique. Handles the case where bucket b points to a // Tree. iterator InsertUniqueInTree(size_type b, Node* node) { GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]); // Maintain the invariant that node->next is NULL for all Nodes in Trees. node->next = NULL; return iterator(static_cast<Tree*>(table_[b]) ->insert(KeyPtrFromNodePtr(node)) .first, this, b & ~static_cast<size_t>(1)); } // Returns whether it did resize. Currently this is only used when // num_elements_ increases, though it could be used in other situations. // It checks for load too low as well as load too high: because any number // of erases can occur between inserts, the load could be as low as 0 here. // Resizing to a lower size is not always helpful, but failing to do so can // destroy the expected big-O bounds for some operations. By having the // policy that sometimes we resize down as well as up, clients can easily // keep O(size()) = O(number of buckets) if they want that. bool ResizeIfLoadIsOutOfRange(size_type new_size) { const size_type kMaxMapLoadTimes16 = 12; // controls RAM vs CPU tradeoff const size_type hi_cutoff = num_buckets_ * kMaxMapLoadTimes16 / 16; const size_type lo_cutoff = hi_cutoff / 4; // We don't care how many elements are in trees. If a lot are, // we may resize even though there are many empty buckets. In // practice, this seems fine. if (GOOGLE_PREDICT_FALSE(new_size >= hi_cutoff)) { if (num_buckets_ <= max_size() / 2) { Resize(num_buckets_ * 2); return true; } } else if (GOOGLE_PREDICT_FALSE(new_size <= lo_cutoff && num_buckets_ > kMinTableSize)) { size_type lg2_of_size_reduction_factor = 1; // It's possible we want to shrink a lot here... size() could even be 0. // So, estimate how much to shrink by making sure we don't shrink so // much that we would need to grow the table after a few inserts. const size_type hypothetical_size = new_size * 5 / 4 + 1; while ((hypothetical_size << lg2_of_size_reduction_factor) < hi_cutoff) { ++lg2_of_size_reduction_factor; } size_type new_num_buckets = std::max<size_type>( kMinTableSize, num_buckets_ >> lg2_of_size_reduction_factor); if (new_num_buckets != num_buckets_) { Resize(new_num_buckets); return true; } } return false; } // Resize to the given number of buckets. void Resize(size_t new_num_buckets) { GOOGLE_DCHECK_GE(new_num_buckets, kMinTableSize); void** const old_table = table_; const size_type old_table_size = num_buckets_; num_buckets_ = new_num_buckets; table_ = CreateEmptyTable(num_buckets_); const size_type start = index_of_first_non_null_; index_of_first_non_null_ = num_buckets_; for (size_type i = start; i < old_table_size; i++) { if (TableEntryIsNonEmptyList(old_table, i)) { TransferList(old_table, i); } else if (TableEntryIsTree(old_table, i)) { TransferTree(old_table, i++); } } Dealloc<void*>(old_table, old_table_size); } void TransferList(void* const* table, size_type index) { Node* node = static_cast<Node*>(table[index]); do { Node* next = node->next; InsertUnique(BucketNumber(*KeyPtrFromNodePtr(node)), node); node = next; } while (node != NULL); } void TransferTree(void* const* table, size_type index) { Tree* tree = static_cast<Tree*>(table[index]); typename Tree::iterator tree_it = tree->begin(); do { Node* node = NodePtrFromKeyPtr(*tree_it); InsertUnique(BucketNumber(**tree_it), node); } while (++tree_it != tree->end()); DestroyTree(tree); } Node* EraseFromLinkedList(Node* item, Node* head) { if (head == item) { return head->next; } else { head->next = EraseFromLinkedList(item, head->next); return head; } } bool TableEntryIsEmpty(size_type b) const { return TableEntryIsEmpty(table_, b); } bool TableEntryIsNonEmptyList(size_type b) const { return TableEntryIsNonEmptyList(table_, b); } bool TableEntryIsTree(size_type b) const { return TableEntryIsTree(table_, b); } bool TableEntryIsList(size_type b) const { return TableEntryIsList(table_, b); } static bool TableEntryIsEmpty(void* const* table, size_type b) { return table[b] == NULL; } static bool TableEntryIsNonEmptyList(void* const* table, size_type b) { return table[b] != NULL && table[b] != table[b ^ 1]; } static bool TableEntryIsTree(void* const* table, size_type b) { return !TableEntryIsEmpty(table, b) && !TableEntryIsNonEmptyList(table, b); } static bool TableEntryIsList(void* const* table, size_type b) { return !TableEntryIsTree(table, b); } void TreeConvert(size_type b) { GOOGLE_DCHECK(!TableEntryIsTree(b) && !TableEntryIsTree(b ^ 1)); typename Allocator::template rebind<Tree>::other tree_allocator(alloc_); Tree* tree = tree_allocator.allocate(1); // We want to use the three-arg form of construct, if it exists, but we // create a temporary and use the two-arg construct that's known to exist. // It's clunky, but the compiler should be able to generate more-or-less // the same code. tree_allocator.construct(tree, Tree(KeyCompare(), KeyPtrAllocator(alloc_))); // Now the tree is ready to use. size_type count = CopyListToTree(b, tree) + CopyListToTree(b ^ 1, tree); GOOGLE_DCHECK_EQ(count, tree->size()); table_[b] = table_[b ^ 1] = static_cast<void*>(tree); } // Copy a linked list in the given bucket to a tree. // Returns the number of things it copied. size_type CopyListToTree(size_type b, Tree* tree) { size_type count = 0; Node* node = static_cast<Node*>(table_[b]); while (node != NULL) { tree->insert(KeyPtrFromNodePtr(node)); ++count; Node* next = node->next; node->next = NULL; node = next; } return count; } // Return whether table_[b] is a linked list that seems awfully long. // Requires table_[b] to point to a non-empty linked list. bool TableEntryIsTooLong(size_type b) { const size_type kMaxLength = 8; size_type count = 0; Node* node = static_cast<Node*>(table_[b]); do { ++count; node = node->next; } while (node != NULL); // Invariant: no linked list ever is more than kMaxLength in length. GOOGLE_DCHECK_LE(count, kMaxLength); return count >= kMaxLength; } size_type BucketNumber(const Key& k) const { // We inherit from hasher, so one-arg operator() provides a hash function. size_type h = (*const_cast<InnerMap*>(this))(k); // To help prevent people from making assumptions about the hash function, // we use the seed differently depending on NDEBUG. The default hash // function, the seeding, etc., are all likely to change in the future. #ifndef NDEBUG return (h * (seed_ | 1)) & (num_buckets_ - 1); #else return (h + seed_) & (num_buckets_ - 1); #endif } bool IsMatch(const Key& k0, const Key& k1) const { return std::equal_to<Key>()(k0, k1); } // Return a power of two no less than max(kMinTableSize, n). // Assumes either n < kMinTableSize or n is a power of two. size_type TableSize(size_type n) { return n < static_cast<size_type>(kMinTableSize) ? static_cast<size_type>(kMinTableSize) : n; } // Use alloc_ to allocate an array of n objects of type U. template <typename U> U* Alloc(size_type n) { typedef typename Allocator::template rebind<U>::other alloc_type; return alloc_type(alloc_).allocate(n); } // Use alloc_ to deallocate an array of n objects of type U. template <typename U> void Dealloc(U* t, size_type n) { typedef typename Allocator::template rebind<U>::other alloc_type; alloc_type(alloc_).deallocate(t, n); } void DestroyNode(Node* node) { alloc_.destroy(&node->kv); Dealloc<Node>(node, 1); } void DestroyTree(Tree* tree) { typename Allocator::template rebind<Tree>::other tree_allocator(alloc_); tree_allocator.destroy(tree); tree_allocator.deallocate(tree, 1); } void** CreateEmptyTable(size_type n) { GOOGLE_DCHECK(n >= kMinTableSize); GOOGLE_DCHECK_EQ(n & (n - 1), 0); void** result = Alloc<void*>(n); memset(result, 0, n * sizeof(result[0])); return result; } // Return a randomish value. size_type Seed() const { // random_device can throw, so avoid it unless we are compiling with // exceptions enabled. #if __cpp_exceptions && LANG_CXX11 try { std::random_device rd; std::knuth_b knuth(rd()); std::uniform_int_distribution<size_type> u; return u(knuth); } catch (...) { } #endif size_type s = static_cast<size_type>(reinterpret_cast<uintptr_t>(this)); #if defined(__x86_64__) && defined(__GNUC__) uint32 hi, lo; asm("rdtsc" : "=a" (lo), "=d" (hi)); s += ((static_cast<uint64>(hi) << 32) | lo); #endif return s; } size_type num_elements_; size_type num_buckets_; size_type seed_; size_type index_of_first_non_null_; void** table_; // an array with num_buckets_ entries Allocator alloc_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(InnerMap); }; // end of class InnerMap public: // Iterators class const_iterator : public std::iterator<std::forward_iterator_tag, value_type, ptrdiff_t, const value_type*, const value_type&> { typedef typename InnerMap::const_iterator InnerIt; public: const_iterator() {} explicit const_iterator(const InnerIt& it) : it_(it) {} const_reference operator*() const { return *it_->value(); } const_pointer operator->() const { return &(operator*()); } const_iterator& operator++() { ++it_; return *this; } const_iterator operator++(int) { return const_iterator(it_++); } friend bool operator==(const const_iterator& a, const const_iterator& b) { return a.it_ == b.it_; } friend bool operator!=(const const_iterator& a, const const_iterator& b) { return !(a == b); } private: InnerIt it_; }; class iterator : public std::iterator<std::forward_iterator_tag, value_type> { typedef typename InnerMap::iterator InnerIt; public: iterator() {} explicit iterator(const InnerIt& it) : it_(it) {} reference operator*() const { return *it_->value(); } pointer operator->() const { return &(operator*()); } iterator& operator++() { ++it_; return *this; } iterator operator++(int) { return iterator(it_++); } // Allow implicit conversion to const_iterator. operator const_iterator() const { return const_iterator(typename InnerMap::const_iterator(it_)); } friend bool operator==(const iterator& a, const iterator& b) { return a.it_ == b.it_; } friend bool operator!=(const iterator& a, const iterator& b) { return !(a == b); } private: friend class Map; InnerIt it_; }; iterator begin() { return iterator(elements_->begin()); } iterator end() { return iterator(elements_->end()); } const_iterator begin() const { return const_iterator(iterator(elements_->begin())); } const_iterator end() const { return const_iterator(iterator(elements_->end())); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } // Capacity size_type size() const { return elements_->size(); } bool empty() const { return size() == 0; } // Element access T& operator[](const key_type& key) { value_type** value = &(*elements_)[key]; if (*value == NULL) { *value = CreateValueTypeInternal(key); internal::MapValueInitializer<google::protobuf::is_proto_enum<T>::value, T>::Initialize((*value)->second, default_enum_value_); } return (*value)->second; } const T& at(const key_type& key) const { const_iterator it = find(key); GOOGLE_CHECK(it != end()); return it->second; } T& at(const key_type& key) { iterator it = find(key); GOOGLE_CHECK(it != end()); return it->second; } // Lookup size_type count(const key_type& key) const { const_iterator it = find(key); GOOGLE_DCHECK(it == end() || key == it->first); return it == end() ? 0 : 1; } const_iterator find(const key_type& key) const { return const_iterator(iterator(elements_->find(key))); } iterator find(const key_type& key) { return iterator(elements_->find(key)); } std::pair<const_iterator, const_iterator> equal_range( const key_type& key) const { const_iterator it = find(key); if (it == end()) { return std::pair<const_iterator, const_iterator>(it, it); } else { const_iterator begin = it++; return std::pair<const_iterator, const_iterator>(begin, it); } } std::pair<iterator, iterator> equal_range(const key_type& key) { iterator it = find(key); if (it == end()) { return std::pair<iterator, iterator>(it, it); } else { iterator begin = it++; return std::pair<iterator, iterator>(begin, it); } } // insert std::pair<iterator, bool> insert(const value_type& value) { std::pair<typename InnerMap::iterator, bool> p = elements_->insert(value.first); if (p.second) { p.first->value() = CreateValueTypeInternal(value); } return std::pair<iterator, bool>(iterator(p.first), p.second); } template <class InputIt> void insert(InputIt first, InputIt last) { for (InputIt it = first; it != last; ++it) { iterator exist_it = find(it->first); if (exist_it == end()) { operator[](it->first) = it->second; } } } // Erase and clear size_type erase(const key_type& key) { iterator it = find(key); if (it == end()) { return 0; } else { erase(it); return 1; } } iterator erase(iterator pos) { if (arena_ == NULL) delete pos.operator->(); iterator i = pos++; elements_->erase(i.it_); return pos; } void erase(iterator first, iterator last) { while (first != last) { first = erase(first); } } void clear() { erase(begin(), end()); } // Assign Map& operator=(const Map& other) { if (this != &other) { clear(); insert(other.begin(), other.end()); } return *this; } void swap(Map& other) { if (arena_ == other.arena_) { std::swap(default_enum_value_, other.default_enum_value_); std::swap(elements_, other.elements_); } else { // TODO(zuguang): optimize this. The temporary copy can be allocated // in the same arena as the other message, and the "other = copy" can // be replaced with the fast-path swap above. Map copy = *this; *this = other; other = copy; } } // Access to hasher. Currently this returns a copy, but it may // be modified to return a const reference in the future. hasher hash_function() const { return elements_->hash_function(); } private: // Set default enum value only for proto2 map field whose value is enum type. void SetDefaultEnumValue(int default_enum_value) { default_enum_value_ = default_enum_value; } value_type* CreateValueTypeInternal(const Key& key) { if (arena_ == NULL) { return new value_type(key); } else { value_type* value = reinterpret_cast<value_type*>( Arena::CreateArray<uint8>(arena_, sizeof(value_type))); Arena::CreateInArenaStorage(const_cast<Key*>(&value->first), arena_); Arena::CreateInArenaStorage(&value->second, arena_); const_cast<Key&>(value->first) = key; return value; } } value_type* CreateValueTypeInternal(const value_type& value) { if (arena_ == NULL) { return new value_type(value); } else { value_type* p = reinterpret_cast<value_type*>( Arena::CreateArray<uint8>(arena_, sizeof(value_type))); Arena::CreateInArenaStorage(const_cast<Key*>(&p->first), arena_); Arena::CreateInArenaStorage(&p->second, arena_); const_cast<Key&>(p->first) = value.first; p->second = value.second; return p; } } Arena* arena_; int default_enum_value_; InnerMap* elements_; friend class ::google::protobuf::Arena; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; template <typename Derived, typename K, typename V, internal::WireFormatLite::FieldType key_wire_type, internal::WireFormatLite::FieldType value_wire_type, int default_enum_value> friend class internal::MapFieldLite; }; } // namespace protobuf } // namespace google #endif // GOOGLE_PROTOBUF_MAP_H__
{ "pile_set_name": "Github" }
/* zmalloc - total amount of allocated memory aware version of malloc() * * Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com> * 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 Redis 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. */ #ifndef __ZMALLOC_H #define __ZMALLOC_H /* Double expansion needed for stringification of macro values. */ #define __xstr(s) __str(s) #define __str(s) #s #if defined(USE_TCMALLOC) #define ZMALLOC_LIB ("tcmalloc-" __xstr(TC_VERSION_MAJOR) "." __xstr(TC_VERSION_MINOR)) #include <google/tcmalloc.h> #if TC_VERSION_MAJOR >= 1 && TC_VERSION_MINOR >= 6 #define HAVE_MALLOC_SIZE 1 #define zmalloc_size(p) tc_malloc_size(p) #else #error "Newer version of tcmalloc required" #endif #elif defined(USE_JEMALLOC) #define ZMALLOC_LIB ("jemalloc-" __xstr(JEMALLOC_VERSION_MAJOR) "." __xstr(JEMALLOC_VERSION_MINOR) "." __xstr(JEMALLOC_VERSION_BUGFIX)) #define JEMALLOC_MANGLE #include <jemalloc/jemalloc.h> #if JEMALLOC_VERSION_MAJOR >= 2 && JEMALLOC_VERSION_MINOR >= 1 #define HAVE_MALLOC_SIZE 1 #define zmalloc_size(p) JEMALLOC_P(malloc_usable_size)(p) #else #error "Newer version of jemalloc required" #endif #elif defined(__APPLE__) #include <malloc/malloc.h> #define HAVE_MALLOC_SIZE 1 #define zmalloc_size(p) malloc_size(p) #endif #ifndef ZMALLOC_LIB #define ZMALLOC_LIB "libc" #endif void *zmalloc(size_t size); void *zcalloc(size_t size); void *zrealloc(void *ptr, size_t size); void zfree(void *ptr); char *zstrdup(const char *s); size_t zmalloc_used_memory(void); void zmalloc_enable_thread_safeness(void); float zmalloc_get_fragmentation_ratio(void); size_t zmalloc_get_rss(void); #ifndef HAVE_MALLOC_SIZE size_t zmalloc_size(void *ptr); #endif #endif /* __ZMALLOC_H */
{ "pile_set_name": "Github" }
from typing import Any, Optional from boto.compat import StandardError class BotoClientError(StandardError): reason: Any def __init__(self, reason, *args) -> None: ... class SDBPersistenceError(StandardError): ... class StoragePermissionsError(BotoClientError): ... class S3PermissionsError(StoragePermissionsError): ... class GSPermissionsError(StoragePermissionsError): ... class BotoServerError(StandardError): status: Any reason: Any body: Any request_id: Any error_code: Any message: str box_usage: Any def __init__(self, status, reason, body: Optional[Any] = ..., *args) -> None: ... def __getattr__(self, name): ... def __setattr__(self, name, value): ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class ConsoleOutput: parent: Any instance_id: Any timestamp: Any comment: Any output: Any def __init__(self, parent: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class StorageCreateError(BotoServerError): bucket: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def endElement(self, name, value, connection): ... class S3CreateError(StorageCreateError): ... class GSCreateError(StorageCreateError): ... class StorageCopyError(BotoServerError): ... class S3CopyError(StorageCopyError): ... class GSCopyError(StorageCopyError): ... class SQSError(BotoServerError): detail: Any type: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class SQSDecodeError(BotoClientError): message: Any def __init__(self, reason, message) -> None: ... class StorageResponseError(BotoServerError): resource: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class S3ResponseError(StorageResponseError): ... class GSResponseError(StorageResponseError): ... class EC2ResponseError(BotoServerError): errors: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... request_id: Any def endElement(self, name, value, connection): ... class JSONResponseError(BotoServerError): status: Any reason: Any body: Any error_message: Any error_code: Any def __init__(self, status, reason, body: Optional[Any] = ..., *args) -> None: ... class DynamoDBResponseError(JSONResponseError): ... class SWFResponseError(JSONResponseError): ... class EmrResponseError(BotoServerError): ... class _EC2Error: connection: Any error_code: Any error_message: Any def __init__(self, connection: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class SDBResponseError(BotoServerError): ... class AWSConnectionError(BotoClientError): ... class StorageDataError(BotoClientError): ... class S3DataError(StorageDataError): ... class GSDataError(StorageDataError): ... class InvalidUriError(Exception): message: Any def __init__(self, message) -> None: ... class InvalidAclError(Exception): message: Any def __init__(self, message) -> None: ... class InvalidCorsError(Exception): message: Any def __init__(self, message) -> None: ... class NoAuthHandlerFound(Exception): ... class InvalidLifecycleConfigError(Exception): message: Any def __init__(self, message) -> None: ... class ResumableTransferDisposition: START_OVER: str WAIT_BEFORE_RETRY: str ABORT_CUR_PROCESS: str ABORT: str class ResumableUploadException(Exception): message: Any disposition: Any def __init__(self, message, disposition) -> None: ... class ResumableDownloadException(Exception): message: Any disposition: Any def __init__(self, message, disposition) -> None: ... class TooManyRecordsException(Exception): message: Any def __init__(self, message) -> None: ... class PleaseRetryException(Exception): message: Any response: Any def __init__(self, message, response: Optional[Any] = ...) -> None: ... class InvalidInstanceMetadataError(Exception): MSG: str def __init__(self, msg) -> None: ...
{ "pile_set_name": "Github" }
local b = import 'b.jsonnet'; local a(x) = import 'a.jsonnet'; // Not a proper import! true
{ "pile_set_name": "Github" }
#include <QTableView> #include <QMenu> #include <QHeaderView> #include <QSortFilterProxyModel> #include <QApplication> #include <QSettings> #include "ui_actiontableeditor.h" #include "actiontablemodel.h" #include "actiontableeditor.h" #include "actioneditordialog.h" //start id="setup" ActionTableEditor::ActionTableEditor(QWidget* parent) : QDialog(parent), m_ui(new Ui::ActionTableEditor) { // Designer UI class initialization m_ui->setupUi(this); m_model = new ActionTableModel(allActions(), this); setupSortFilter(); } ActionTableEditor:: ActionTableEditor(QList<QAction*> actions, QWidget* parent) : QDialog(parent) { m_ui->setupUi(this); m_model = new ActionTableModel(actions, this); setupSortFilter(); } QList<QAction*> ActionTableEditor::allActions() { QList<QAction*> actions; foreach (QAction* a, qApp->findChildren<QAction*>()) { if (a->children().size() > 0) continue; if (a->text().size() > 0) actions << a; } foreach (QWidget* w, qApp->topLevelWidgets()) foreach (QAction* a, w->findChildren<QAction*>()) { // skip menus if (qobject_cast<QMenu*>(a->parent()) != 0) continue; if (a->text().size() > 0) actions << a; } return actions; } //start id=dialog void ActionTableEditor:: on_m_tableView_activated(const QModelIndex& idx) { int row = idx.row(); QAction* action = m_model->action(row); ActionEditorDialog aed(action); int result = aed.exec(); if (result == QDialog::Accepted) { QKeySequence ks = aed.keySequence(); m_model->setData(idx, ks.toString()); m_changedActions << action; } } //end //start id=settings void ActionTableEditor::accept() { QSettings s; s.beginGroup("shortcut"); foreach (QAction* act, m_changedActions) { s.setValue(act->text(), act->shortcut() ); } s.endGroup(); QDialog::accept(); } //end void ActionTableEditor::restoreShortcuts(QList<QAction*> actions) { QSettings s; s.beginGroup("shortcut"); foreach (QAction* act, actions) { QVariant v = s.value(act->text(), QVariant()); if (!v.isNull()) { QKeySequence ks = v.value<QKeySequence>(); act->setShortcut(ks); } } s.endGroup(); } //start id="sortfilter" void ActionTableEditor::setupSortFilter() { m_sortFilterProxy = new QSortFilterProxyModel(this); m_sortFilterProxy->setSourceModel(m_model); /* SortFilterProxy source model set to ActionTableModel. */ m_ui->m_tableView->setModel(m_sortFilterProxy); /* Table view model set to proxy model instead of ActionTableModel. */ m_sortFilterProxy->setFilterKeyColumn(-1); /* Filter on all fields. */ } void ActionTableEditor::on_m_filterField_textChanged /* Auto-connected slot. */ (const QString& newText) { m_sortFilterProxy->setFilterFixedString(newText); /* Change the filter string. */ } //end ActionTableEditor::~ActionTableEditor() { delete m_ui; /* the other pointer members are QObject with this as parent */ } void ActionTableEditor::changeEvent(QEvent* e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: m_ui->retranslateUi(this); break; default: break; } }
{ "pile_set_name": "Github" }
// Code generated by protoc-gen-go. // source: metrics.proto // DO NOT EDIT! /* Package io_prometheus_client is a generated protocol buffer package. It is generated from these files: metrics.proto It has these top-level messages: LabelPair Gauge Counter Quantile Summary Untyped Histogram Bucket Metric MetricFamily */ package io_prometheus_client import proto "github.com/golang/protobuf/proto" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = math.Inf type MetricType int32 const ( MetricType_COUNTER MetricType = 0 MetricType_GAUGE MetricType = 1 MetricType_SUMMARY MetricType = 2 MetricType_UNTYPED MetricType = 3 MetricType_HISTOGRAM MetricType = 4 ) var MetricType_name = map[int32]string{ 0: "COUNTER", 1: "GAUGE", 2: "SUMMARY", 3: "UNTYPED", 4: "HISTOGRAM", } var MetricType_value = map[string]int32{ "COUNTER": 0, "GAUGE": 1, "SUMMARY": 2, "UNTYPED": 3, "HISTOGRAM": 4, } func (x MetricType) Enum() *MetricType { p := new(MetricType) *p = x return p } func (x MetricType) String() string { return proto.EnumName(MetricType_name, int32(x)) } func (x *MetricType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType") if err != nil { return err } *x = MetricType(value) return nil } type LabelPair struct { Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *LabelPair) Reset() { *m = LabelPair{} } func (m *LabelPair) String() string { return proto.CompactTextString(m) } func (*LabelPair) ProtoMessage() {} func (m *LabelPair) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *LabelPair) GetValue() string { if m != nil && m.Value != nil { return *m.Value } return "" } type Gauge struct { Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Gauge) Reset() { *m = Gauge{} } func (m *Gauge) String() string { return proto.CompactTextString(m) } func (*Gauge) ProtoMessage() {} func (m *Gauge) GetValue() float64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type Counter struct { Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Counter) Reset() { *m = Counter{} } func (m *Counter) String() string { return proto.CompactTextString(m) } func (*Counter) ProtoMessage() {} func (m *Counter) GetValue() float64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type Quantile struct { Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Quantile) Reset() { *m = Quantile{} } func (m *Quantile) String() string { return proto.CompactTextString(m) } func (*Quantile) ProtoMessage() {} func (m *Quantile) GetQuantile() float64 { if m != nil && m.Quantile != nil { return *m.Quantile } return 0 } func (m *Quantile) GetValue() float64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type Summary struct { SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Summary) Reset() { *m = Summary{} } func (m *Summary) String() string { return proto.CompactTextString(m) } func (*Summary) ProtoMessage() {} func (m *Summary) GetSampleCount() uint64 { if m != nil && m.SampleCount != nil { return *m.SampleCount } return 0 } func (m *Summary) GetSampleSum() float64 { if m != nil && m.SampleSum != nil { return *m.SampleSum } return 0 } func (m *Summary) GetQuantile() []*Quantile { if m != nil { return m.Quantile } return nil } type Untyped struct { Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Untyped) Reset() { *m = Untyped{} } func (m *Untyped) String() string { return proto.CompactTextString(m) } func (*Untyped) ProtoMessage() {} func (m *Untyped) GetValue() float64 { if m != nil && m.Value != nil { return *m.Value } return 0 } type Histogram struct { SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Histogram) Reset() { *m = Histogram{} } func (m *Histogram) String() string { return proto.CompactTextString(m) } func (*Histogram) ProtoMessage() {} func (m *Histogram) GetSampleCount() uint64 { if m != nil && m.SampleCount != nil { return *m.SampleCount } return 0 } func (m *Histogram) GetSampleSum() float64 { if m != nil && m.SampleSum != nil { return *m.SampleSum } return 0 } func (m *Histogram) GetBucket() []*Bucket { if m != nil { return m.Bucket } return nil } type Bucket struct { CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count" json:"cumulative_count,omitempty"` UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound" json:"upper_bound,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Bucket) Reset() { *m = Bucket{} } func (m *Bucket) String() string { return proto.CompactTextString(m) } func (*Bucket) ProtoMessage() {} func (m *Bucket) GetCumulativeCount() uint64 { if m != nil && m.CumulativeCount != nil { return *m.CumulativeCount } return 0 } func (m *Bucket) GetUpperBound() float64 { if m != nil && m.UpperBound != nil { return *m.UpperBound } return 0 } type Metric struct { Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"` Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"` Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"` Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"` TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms" json:"timestamp_ms,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Metric) Reset() { *m = Metric{} } func (m *Metric) String() string { return proto.CompactTextString(m) } func (*Metric) ProtoMessage() {} func (m *Metric) GetLabel() []*LabelPair { if m != nil { return m.Label } return nil } func (m *Metric) GetGauge() *Gauge { if m != nil { return m.Gauge } return nil } func (m *Metric) GetCounter() *Counter { if m != nil { return m.Counter } return nil } func (m *Metric) GetSummary() *Summary { if m != nil { return m.Summary } return nil } func (m *Metric) GetUntyped() *Untyped { if m != nil { return m.Untyped } return nil } func (m *Metric) GetHistogram() *Histogram { if m != nil { return m.Histogram } return nil } func (m *Metric) GetTimestampMs() int64 { if m != nil && m.TimestampMs != nil { return *m.TimestampMs } return 0 } type MetricFamily struct { Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"` Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"` Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MetricFamily) Reset() { *m = MetricFamily{} } func (m *MetricFamily) String() string { return proto.CompactTextString(m) } func (*MetricFamily) ProtoMessage() {} func (m *MetricFamily) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *MetricFamily) GetHelp() string { if m != nil && m.Help != nil { return *m.Help } return "" } func (m *MetricFamily) GetType() MetricType { if m != nil && m.Type != nil { return *m.Type } return MetricType_COUNTER } func (m *MetricFamily) GetMetric() []*Metric { if m != nil { return m.Metric } return nil } func init() { proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value) }
{ "pile_set_name": "Github" }
.size 8000 .text@100 jp lbegin .data@143 80 .text@150 lbegin: ld a, 03 ldff(43), a ld b, 91 call lwaitly_b ld a, 11 ldff(40), a ld a, 91 ldff(40), a ld b, 9a call lwait_b_ly_cycles ld a, ff ldff(45), a xor a, a ldff(0f), a ld a, 08 ldff(41), a .text@194 ltest_if: ldff a, (0f) cmp a, e0 jrnz lprint_ly xor a, a ldff(0f), a ld c, 18 lwait_nly: dec c jrnz lwait_nly nop nop nop jr ltest_if lprint_ly: ldff a, (44) jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a ld bc, 7a00 ld hl, 8000 ld d, 00 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles pop af ld b, a swap a and a, 0f ld(9800), a ld a, b and a, 0f ld(9801), a ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .text@7600 lwait_b_ly_cycles: ld c, 1b lwait_b_ly_cycles_wait_nly: dec c jrnz lwait_b_ly_cycles_wait_nly nop dec b jrnz lwait_b_ly_cycles ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f 00 00 08 08 22 22 41 41 7f 7f 41 41 41 41 41 41 00 00 7e 7e 41 41 41 41 7e 7e 41 41 41 41 7e 7e 00 00 3e 3e 41 41 40 40 40 40 40 40 41 41 3e 3e 00 00 7e 7e 41 41 41 41 41 41 41 41 41 41 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 40 40 40 40 7f 7f 40 40 40 40 40 40
{ "pile_set_name": "Github" }
--- name: 'rsync' runner_type: 'remote-shell-cmd' description: 'Copy file(s) from one place to another w/ rsync' enabled: true entry_point: '' parameters: source: type: 'string' description: 'List of files/directories to to be copied' required: true dest_server: type: 'string' description: "Destination server for rsync'd files" required: true destination: type: 'string' description: 'Destination of files/directories on target server' required: true cmd: immutable: true default: 'rsync {{args}} {{source}} {{dest_server}}:{{destination}}' connect_timeout: type: 'integer' description: 'SSH connect timeout in seconds' default: 30 args: description: 'Command line arguments passed to rysnc' default: '-avz -e "ssh -o ConnectTimeout={{connect_timeout}}"'
{ "pile_set_name": "Github" }
/* the norm */ #gritter-notice-wrapper { position:fixed; top:20px; right:20px; width:301px; z-index:9999; } #gritter-notice-wrapper.top-left { left: 20px; right: auto; } #gritter-notice-wrapper.bottom-right { top: auto; left: auto; bottom: 20px; right: 20px; } #gritter-notice-wrapper.bottom-left { top: auto; right: auto; bottom: 20px; left: 20px; } .gritter-item-wrapper { position:relative; margin:0 0 10px 0; background:url('../images/ie-spacer.gif'); /* ie7/8 fix */ } .gritter-top { background:url("..images/gritter.png") no-repeat left -30px; height:10px; } .hover .gritter-top { background-position:right -30px; } .gritter-bottom { background:url("../images/gritter.png") no-repeat left bottom; height:8px; margin:0; } .hover .gritter-bottom { background-position: bottom right; } .gritter-item { display:block; background:url("../images/gritter.png") no-repeat left -40px; color:#eee; padding:2px 11px 8px 11px; font-size: 11px; font-family:verdana; } .hover .gritter-item { background-position:right -40px; } .gritter-item p { padding:0; margin:0; word-wrap:break-word; } .gritter-close { display:none; position:absolute; top:5px; left:3px; background:url("../images/gritter.png") no-repeat left top; cursor:pointer; width:30px; height:30px; } .gritter-title { font-size:14px; font-weight:bold; padding:0 0 7px 0; display:block; text-shadow:1px 1px 0 #000; /* Not supported by IE :( */ } .gritter-image { width:48px; height:48px; float:left; } .gritter-with-image, .gritter-without-image { padding:0; } .gritter-with-image { width:220px; float:right; } /* for the light (white) version of the gritter notice */ .gritter-light .gritter-item, .gritter-light .gritter-bottom, .gritter-light .gritter-top, .gritter-light .gritter-close { background-image: url("../images/gritter-light.png"); color: #222; } .gritter-light .gritter-title { text-shadow: none; }
{ "pile_set_name": "Github" }
package com.replaymod.extras.advancedscreenshots; import com.replaymod.core.versions.MCVer; import com.replaymod.render.RenderSettings; import com.replaymod.render.blend.BlendState; import com.replaymod.render.capturer.RenderInfo; import com.replaymod.render.rendering.Pipelines; import de.johni0702.minecraft.gui.utils.lwjgl.Dimension; import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension; import net.minecraft.client.MinecraftClient; import net.minecraft.util.crash.CrashReport; //#if MC>=11400 import com.replaymod.render.mixin.MainWindowAccessor; import static com.replaymod.core.versions.MCVer.getWindow; //#endif //#if MC>=10800 import com.replaymod.render.hooks.ChunkLoadingRenderGlobal; //#endif import static com.replaymod.core.versions.MCVer.getRenderPartialTicks; public class ScreenshotRenderer implements RenderInfo { private final MinecraftClient mc = MCVer.getMinecraft(); private final RenderSettings settings; private int framesDone; public ScreenshotRenderer(RenderSettings settings) { this.settings = settings; } public boolean renderScreenshot() throws Throwable { try { //#if MC>=11400 int displayWidthBefore = getWindow(mc).getFramebufferWidth(); int displayHeightBefore = getWindow(mc).getFramebufferHeight(); //#else //$$ int displayWidthBefore = mc.displayWidth; //$$ int displayHeightBefore = mc.displayHeight; //#endif boolean hideGUIBefore = mc.options.hudHidden; mc.options.hudHidden = true; //#if MC>=10800 ChunkLoadingRenderGlobal clrg = new ChunkLoadingRenderGlobal(mc.worldRenderer); //#endif if (settings.getRenderMethod() == RenderSettings.RenderMethod.BLEND) { BlendState.setState(new BlendState(settings.getOutputFile())); Pipelines.newBlendPipeline(this).run(); } else { Pipelines.newPipeline(settings.getRenderMethod(), this, new ScreenshotWriter(settings.getOutputFile())).run(); } //#if MC>=10800 clrg.uninstall(); //#endif mc.options.hudHidden = hideGUIBefore; //#if MC>=11400 //noinspection ConstantConditions MainWindowAccessor acc = (MainWindowAccessor) (Object) getWindow(mc); acc.setFramebufferWidth(displayWidthBefore); acc.setFramebufferHeight(displayHeightBefore); mc.getFramebuffer().resize(displayWidthBefore, displayHeightBefore //#if MC>=11400 , false //#endif ); //#if MC>=11500 mc.gameRenderer.onResized(displayWidthBefore, displayHeightBefore); //#endif //#else //$$ mc.resize(displayWidthBefore, displayHeightBefore); //#endif return true; } catch (OutOfMemoryError e) { e.printStackTrace(); CrashReport report = CrashReport.create(e, "Creating Equirectangular Screenshot"); MCVer.getMinecraft().setCrashReport(report); } return false; } @Override public ReadableDimension getFrameSize() { return new Dimension(settings.getVideoWidth(), settings.getVideoHeight()); } @Override public int getFramesDone() { return framesDone; } @Override public int getTotalFrames() { // render 2 frames, because only the second contains all frames fully loaded return 2; } @Override public float updateForNextFrame() { framesDone++; return getRenderPartialTicks(); } @Override public RenderSettings getRenderSettings() { return settings; } }
{ "pile_set_name": "Github" }
.. include:: ../../common/contacts.rst
{ "pile_set_name": "Github" }
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- #ifndef __gnu_CORBA_GIOP_CancelHeader__ #define __gnu_CORBA_GIOP_CancelHeader__ #pragma interface #include <java/lang/Object.h> extern "Java" { namespace gnu { namespace CORBA { namespace GIOP { class CancelHeader; } } } namespace org { namespace omg { namespace CORBA { namespace portable { class InputStream; class OutputStream; } } } } } class gnu::CORBA::GIOP::CancelHeader : public ::java::lang::Object { public: CancelHeader(); virtual void read(::org::omg::CORBA::portable::InputStream *) = 0; virtual void write(::org::omg::CORBA::portable::OutputStream *) = 0; jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) request_id; static ::java::lang::Class class$; }; #endif // __gnu_CORBA_GIOP_CancelHeader__
{ "pile_set_name": "Github" }
<?xml version='1.0' encoding='utf-8'?> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> <Profiles> <Profile Name="(Default)" /> </Profiles> <Settings /> </SettingsFile>
{ "pile_set_name": "Github" }
app_trace_util.o: \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/app_trace/app_trace_util.c \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/FreeRTOS.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/reent.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/_ansi.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/newlib.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/config.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/ieeefp.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/features.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core-isa.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/_types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/_types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/_default_types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/lock.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdint.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/_intsup.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/FreeRTOSConfig.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/app/build/include/sdkconfig.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_config.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/hal.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtensa-versions.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core-matmap.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/tie.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/system.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_context.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/corebits.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime-frames.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdlib.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/_ansi.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/cdefs.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/stdlib.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/alloca.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/ets_sys.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/soc.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_assert.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/platform_include/assert.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/assert.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/projdefs.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portable.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/deprecated_definitions.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portmacro.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/tie/xt_core.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/specreg.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime-core-state.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_crosscore_int.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_timer.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdio.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/sched.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/stdio.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_err.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/heap/include/esp_heap_caps.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/heap/include/multi_heap.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/include/soc/soc_memory_layout.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_attr.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portbenchmark.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/mpu_wrappers.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_system.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_sleep.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/driver/include/driver/gpio.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_types.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_reg.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/soc.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_struct.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/rtc_io_reg.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/io_mux_reg.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_sig_map.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/gpio.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_intr_alloc.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/driver/include/driver/touch_pad.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_intr.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/ets_sys.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_api.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/touch_channel.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/task.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/limits.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/list.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/app_trace/include/esp_app_trace_util.h \ D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_clk.h D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/FreeRTOS.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/reent.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/_ansi.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/newlib.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/config.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/ieeefp.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/features.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core-isa.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/_types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/_types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/_default_types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/lock.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdint.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/_intsup.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/FreeRTOSConfig.h: D:/Project/ESP32/sdk/esp-idf-v3.0/app/build/include/sdkconfig.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_config.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/hal.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtensa-versions.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/core-matmap.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/tie.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/system.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_context.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/corebits.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime-frames.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdlib.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/_ansi.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/cdefs.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/stdlib.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/alloca.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/ets_sys.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/soc.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_assert.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/platform_include/assert.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/assert.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/projdefs.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portable.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/deprecated_definitions.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portmacro.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/tie/xt_core.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/config/specreg.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/xtensa/xtruntime-core-state.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_crosscore_int.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_timer.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/stdio.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/machine/types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/sched.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/sys/stdio.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_err.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/heap/include/esp_heap_caps.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/heap/include/multi_heap.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/include/soc/soc_memory_layout.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_attr.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/portbenchmark.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/mpu_wrappers.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_system.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_sleep.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/driver/include/driver/gpio.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_types.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_reg.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/soc.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_struct.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/rtc_io_reg.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/io_mux_reg.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/gpio_sig_map.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/gpio.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_intr_alloc.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/driver/include/driver/touch_pad.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_intr.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/rom/ets_sys.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/xtensa_api.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/soc/esp32/include/soc/touch_channel.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/task.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/newlib/include/limits.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/freertos/include/freertos/list.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/app_trace/include/esp_app_trace_util.h: D:/Project/ESP32/sdk/esp-idf-v3.0/components/esp32/include/esp_clk.h: /d/Project/ESP32/sdk/esp-idf-v3.0/components/app_trace/./app_trace_util.c:
{ "pile_set_name": "Github" }
.redactor_box { position: relative; /*border: 1px solid #ddd;*/ overflow: visible; } /*.redactor_box, .redactor_box textarea { background-color: #fff; }*/ body .redactor_air { position: absolute; border: 1px solid #ddd; border-bottom: none; z-index: 10002; } /* Fullscreen */ body .redactor_box_fullscreen { left: 0; position: fixed; overflow: hidden; top: 0; width: 100%; z-index: 2000; } .redactor_box textarea { font-family: Menlo, Monaco, monospace, sans-serif; font-size: 13px; overflow: auto; resize: none; margin: 0; padding: 0; display: block; position: relative; z-index: 1004; outline: none; border: none; width: 100%; } .redactor_editor, .redactor_editor:focus, .redactor_editor div, .redactor_editor p, .redactor_editor ul, .redactor_editor ol, .redactor_editor table, .redactor_editor dl, .redactor_editor blockquote, .redactor_editor pre, .redactor_editor h1, .redactor_editor h2, .redactor_editor h3, .redactor_editor h4, .redactor_editor h5 { font-family: 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,'Hiragino Sans GB',sans-serif,"Microsoft YaHei",微软雅黑,"Microsoft JhengHei",华文细黑,STHeiti,MingLiu; /*font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important;*/ } .redactor_editor code, .redactor_editor pre { font-family: Menlo, Monaco, monospace, sans-serif !important; } /*.redactor_editor, .redactor_editor:focus, .redactor_editor div, .redactor_editor p, .redactor_editor ul, .redactor_editor ol, .redactor_editor table, .redactor_editor dl, .redactor_editor blockquote, .redactor_editor pre { font-size: 15px !important; line-height: 1.45em !important; }*/ .redactor_editor, .redactor_editor:focus { position: relative; outline: none; box-shadow: none !important; /*padding: 15px !important;*/ margin: 0 !important; background: none; /*background: #fff !important;*/ overflow: auto; white-space: normal; } .redactor_editor a { /*color: #15c !important;*/ /*text-decoration: underline !important;*/ } .redactor_editor object, .redactor_editor embed, .redactor_editor video, .redactor_editor img { /*width: auto;*/ max-width: 100%; } .redactor_editor video, .redactor_editor img { height: auto; } /*.redactor_editor div, .redactor_editor p, .redactor_editor ul, .redactor_editor ol, .redactor_editor table, .redactor_editor dl, .redactor_editor blockquote, .redactor_editor pre { box-shadow: none !important; background: none !important; margin: 0 !important; margin-bottom: 15px !important; border: none; }*/ .redactor_editor iframe, .redactor_editor object, .redactor_editor hr { margin-bottom: 15px !important; } .redactor_editor blockquote { margin-left: 3em !important; font-style: italic !important; color: #777; } .redactor_editor ul, .redactor_editor ol { padding-left: 2em !important; } .redactor_editor ul ul, .redactor_editor ol ol, .redactor_editor ul ol, .redactor_editor ol ul { border: none; margin: 2px !important; padding: 0 !important; padding-left: 2em !important; } .redactor_editor dl dt { font-weight: bold; } .redactor_editor dd { margin-left: 1em;} .redactor_editor table { border-collapse: collapse; font-size: 1em !important; } .redactor_editor table td { border: 1px solid #ddd; padding: 5px !important; vertical-align: top; } .redactor_editor table thead td { border-bottom: 2px solid #000 !important; font-weight: bold !important; } .redactor_editor code { background-color: #d8d7d7 !important; } .redactor_editor pre { font-size: 90% !important; background: #f8f8f8 !important; border: 1px solid #ddd !important; border-radius: 3px !important; padding: 1em !important; white-space: pre; overflow: auto; } .redactor_editor hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; } .redactor_editor h1, .redactor_editor h2, .redactor_editor h3, .redactor_editor h4, .redactor_editor h5 { color: #000; background: none; margin: 0 !important; padding: 0 !important; font-weight: bold; } .redactor_editor h1 { font-size: 36px !important; line-height: 40px !important; margin-bottom: 10px !important; } .redactor_editor h2 { font-size: 30px !important; line-height: 38px !important; margin-bottom: 15px !important; } .redactor_editor h3 { font-size: 24px !important; line-height: 30px !important; margin-bottom: 10px !important; } .redactor_editor h4 { font-size: 18px !important; line-height: 24px !important; margin-bottom: 10px !important; } .redactor_editor h5 { font-size: 1em !important; margin-bottom: 10px !important; } .redactor_editor.redactor_editor_wym { background: #f6f6f6 !important; padding: 5px 15px !important; } .redactor_editor_wym div, .redactor_editor_wym p, .redactor_editor_wym ul, .redactor_editor_wym ol, .redactor_editor_wym table, .redactor_editor_wym dl, .redactor_editor_wym pre, .redactor_editor_wym h1, .redactor_editor_wym h2, .redactor_editor_wym h3, .redactor_editor_wym h4, .redactor_editor_wym h5, .redactor_editor_wym blockquote { background-color: #fff !important; border: 1px solid #e4e4e4 !important; padding: 10px !important; margin: 10px 0 !important; } .redactor_editor_wym ul, .redactor_editor_wym ol { padding-left: 2em !important; } /* TOOLBAR */ .redactor_toolbar { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif !important; position: relative; left: 0; top: 0; margin: 0 !important; padding: 0 !important; padding-left: 2px !important; line-height: 0 !important; list-style: none !important; font-size: 0; background: #f1f1f1; background: -moz-linear-gradient(top, #f1f1f1 0%, #e2e2e2 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1f1f1), color-stop(100%,#e2e2e2)); background: -webkit-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: -o-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: -ms-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: linear-gradient(to bottom, #f1f1f1 0%,#e2e2e2 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f1f1', endColorstr='#e2e2e2',GradientType=0 ); overflow: hidden !important; height: 32px !important; border-bottom: 1px solid #bbb; } body .redactor_air .redactor_toolbar { padding-right: 2px !important; } .redactor_toolbar li { float: left !important; margin: 0 !important; padding: 3px 1px; padding-right: 0; list-style: none !important; outline: none; } .redactor_toolbar li.redactor_separator { float: left; height: 34px; border-left: 1px solid #d3d3d3; border-right: 1px solid #f1f1f1; padding: 0; margin: 0 2px 0 3px !important; } .redactor_toolbar li a { width: 25px; height: 25px; border: 1px solid transparent; * border: 1px solid #eee; display: block; line-height: 0; font-size: 0; cursor: pointer; zoom: 1; outline: none; text-decoration: none; } .redactor_toolbar li.redactor_btn_right { float: none; float: right !important; } .redactor_toolbar li a { display: block; text-indent: -9999px; background-image: url(data:image/png;base64,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); background-repeat: no-repeat; background-position: 0; } @media all and (-webkit-min-device-pixel-ratio: 1.5) { .redactor_toolbar li a { background-image: url(data:image/png;base64,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); background-size: auto 25px; } } .redactor_toolbar li a:hover { border-color: #98a6ba; background-color: #dde4ef; outline: none; } .redactor_toolbar li a:active, .redactor_toolbar li a.redactor_act { border-color: #b5b5b5; background-color: #ddd; outline: none; } /* BUTTONS step 25px */ body .redactor_toolbar li a.redactor_btn_html { background-position: 0px; } body .redactor_toolbar li a.redactor_btn_formatting { background-position: -25px; } body .redactor_toolbar li a.redactor_btn_bold { background-position: -50px; } body .redactor_toolbar li a.redactor_btn_italic { background-position: -75px; } body .redactor_toolbar li a.redactor_btn_deleted { background-position: -500px; } body .redactor_toolbar li a.redactor_btn_unorderedlist { background-position: -100px; } body .redactor_toolbar li a.redactor_btn_orderedlist { background-position: -125px; } body .redactor_toolbar li a.redactor_btn_outdent { background-position: -150px; } body .redactor_toolbar li a.redactor_btn_indent { background-position: -175px; } body .redactor_toolbar li a.redactor_btn_image { background-position: -200px; } body .redactor_toolbar li a.redactor_btn_video { background-position: -225px; } body .redactor_toolbar li a.redactor_btn_file { background-position: -250px; } body .redactor_toolbar li a.redactor_btn_table { background-position: -275px; } body .redactor_toolbar li a.redactor_btn_link { background-position: -300px; } body .redactor_toolbar li a.redactor_btn_fontcolor { background-position: -325px; } body .redactor_toolbar li a.redactor_btn_backcolor { background-position: -350px; } body .redactor_toolbar li a.redactor_btn_alignleft { background-position: -375px; } body .redactor_toolbar li a.redactor_btn_aligncenter { background-position: -400px; } body .redactor_toolbar li a.redactor_btn_alignright { background-position: -425px; } body .redactor_toolbar li a.redactor_btn_justify { background-position: -450px; } body .redactor_toolbar li a.redactor_btn_horizontalrule { background-position: -475px; } body .redactor_toolbar li a.redactor_btn_underline { background-position: -525px; } body .redactor_toolbar li a.redactor_btn_fullscreen { background-position: -550px; } body .redactor_toolbar li a.redactor_btn_normalscreen { background-position: -575px; } body .redactor_toolbar li a.redactor_btn_clips { background-position: -600px; } body .redactor_toolbar li a.redactor_btn_alignment { background-position: -625px; } /* Toolbar classes */ .redactor_format_blockquote { font-style: italic; color: #666 !important; padding-left: 10px; } .redactor_format_pre { font-family: monospace, sans-serif; } .redactor_format_h1, .redactor_format_h2, .redactor_format_h3, .redactor_format_h4 { font-weight: bold; } .redactor_format_h1 { font-size: 30px; line-height: 36px; } .redactor_format_h2 { font-size: 24px; line-height: 36px; } .redactor_format_h3 { font-size: 20px; line-height: 30px; } .redactor_format_h4 { font-size: 16px; line-height: 26px; } /* DROPDOWN */ .redactor_dropdown { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; top: 28px; left: 0; z-index: 2004; position: absolute; width: 200px; background-color: #fff; border: 1px solid #ccc; font-size: 13px; -webkit-box-shadow: 0 2px 4px #ccc; -moz-box-shadow: 0 2px 4px #ccc; box-shadow: 0 2px 4px #ccc; line-height: 21px; padding: 10px; } .redactor_separator_drop { border-top: 1px solid #ddd; padding: 0 !important; line-height: 0; font-size: 0; } .redactor_dropdown a { display: block; color: #000; padding: 3px 5px; text-decoration: none; } .redactor_dropdown a:hover { color: #444 !important; text-decoration: none; background-color: #dde4ef; } /* ColorPicker */ .redactor_color_link { padding: 0 !important; width: 15px !important; height: 15px !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .2) inset !important; border-radius: 4px !important; float: left !important; border: 2px solid #fff !important; font-size: 0; } .redactor_color_none { font-size: 11px; } /* MODAL */ #redactor_modal_overlay { position: fixed; margin: auto; top: 0; left: 0; width: 100%; height: 100%; z-index: 50000; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter:alpha(opacity=50); opacity: 0.50; background-color: #333 !important; } #redactor_modal { background: #f7f7f7; background: -moz-linear-gradient(top, #f7f7f7 0%, #e2e2e2 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e2e2e2)); background: -webkit-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: -o-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: -ms-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: linear-gradient(to bottom, #f7f7f7 0%,#e2e2e2 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#e2e2e2',GradientType=0 ); text-shadow: 0 1px 0 #fff; padding: 0; position: fixed; top: 50%; left: 50%; box-shadow: 0px 5px 60px #000; border-radius: 3px; z-index: 50001; font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; font-size: 12px !important; color: #000; } #redactor_modal_header { padding: 11px 30px 0 15px; font-size: 12px; border-radius: 3px 3px 0 0; font-weight: bold; } #redactor_modal_content { padding: 20px 30px; } #redactor_modal_close { position: absolute; right: 5px; top: 5px; font-size: 20px; width: 20px; height: 20px; color: #777; cursor: pointer; } #redactor_modal_close:hover { color: #000; } #redactor_modal label { margin: 10px 0 3px 0 !important; padding: 0 !important; float: none !important; display: block !important; } #redactor_modal textarea { margin-top: 4px; display: block; } .redactor_input { width: 99%; font-size: 14px; } .redactor_modal_box { height: 350px; overflow: auto; margin-bottom: 10px; } #redactor_image_box { height: 270px; overflow: auto; margin-bottom: 10px; } #redactor_image_box_select { display: block; width: 200px; margin-bottom: 15px; } #redactor_image_box img { margin-right: 10px; margin-bottom: 10px; cursor: pointer; max-width: 100px; } #redactor_tabs { margin-bottom: 18px; } #redactor_tabs a { display: inline-block; border: 1px solid #d2d2d2; padding: 4px 14px; font-size: 12px; background-color: #fff; text-decoration: none; color: #000; line-height: 1; border-radius: 10px; margin-right: 5px; } #redactor_tabs a:hover, #redactor_tabs a.redactor_tabs_act { background-color: #ddd; padding: 5px 15px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4) inset; border: none; text-shadow: 0 1px 0 #eee; color: #777 !important; text-decoration: none !important; } #redactor_modal_footer { padding: 9px 30px 20px 30px; border-radius: 0 0 3px 3px; text-align: right; } #redactor_modal input[type="radio"], #redactor_modal input[type="checkbox"] { position: relative; top: -1px; } #redactor_modal input[type="text"], #redactor_modal input[type="password"], #redactor_modal input[type="email"], #redactor_modal textarea { position: relative; z-index: 2; font-family: Helvetica, Arial, Tahoma, sans-serif; height: 23px; border: 1px solid #ccc; margin: 0; padding: 1px 2px; background-color: white; color: #333; font-size: 13px; line-height: 1; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; -webkit-transition: border 0.3s ease-in; -moz-transition: border 0.3s ease-in; -ms-transition: border 0.3s ease-in; -o-transition: border 0.3s ease-in; transition: border 0.3s ease-in; } #redactor_modal textarea { line-height: 1.4em; } #redactor_modal input:focus, #redactor_modal textarea:focus { outline: none; border-color: #5ca9e4; box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; } .redactor_modal_btn { margin-left: 8px; position: relative; cursor: pointer; outline: none; display: inline-block; text-align: center; text-decoration: none; font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; line-height: 1; font-size: 12px; font-weight: normal; padding: 6px 16px 5px 16px; border-radius: 4px; background-color: #f3f3f3; background-image: -moz-linear-gradient(top, #ffffff, #e1e1e1); background-image: -ms-linear-gradient(top, #ffffff, #e1e1e1); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e1e1e1)); background-image: -webkit-linear-gradient(top, #ffffff, #e1e1e1); background-image: -o-linear-gradient(top, #ffffff, #e1e1e1); background-image: linear-gradient(top, #ffffff, #e1e1e1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e1e1e1', GradientType=0); border: 1px solid #ccc; border-bottom-color: #aaa; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); text-shadow: 0 1px 0px #ffffff; color: #000; } .redactor_modal_btn:hover { color: #555; } .redactor_modal_btn:hover { filter: none; background: none; background: #f3f3f3; text-shadow: 0 1px 0px rgba(255, 255, 255, 0.8); text-decoration: none; } /* Drag and Drop Area */ .redactor_droparea { position: relative; width: 100%; margin: auto; margin-bottom: 5px; } .redactor_droparea .redactor_dropareabox { z-index: 1; position: relative; text-align: center; width: 99%; background-color: #fff; padding: 60px 0; border: 2px dashed #bbb; } .redactor_droparea .redactor_dropareabox, .redactor_dropalternative { color: #555; font-size: 12px; } .redactor_dropalternative { margin: 4px 0 2px 0; } .redactor_dropareabox.hover { background: #efe3b8; border-color: #aaa; } .redactor_dropareabox.error { background: #f7e5e5; border-color: #dcc3c3; } .redactor_dropareabox.drop { background: #f4f4ee; border-color: #e0e5d6; } /*Biu curtom fixed*/ #post_form_1 .input-xxlarge{width: 700px;} #post_form_1 .input-mlarge{width: 400px;} .new_post_template_4 #post_form_1 .post_caption textarea.input-xxlarge{width: 350px;} .redactor_box{margin: 0 auto;display: inline-block;} .redactor_editor{width: 700px;text-align: left;min-height: 200px;} .redactor_editor h1 {text-align: left;margin-top: 10px!important;} .redactor_editor ul li{list-style: disc;} .redactor_editor ol li{list-style: decimal;} .new_post_template_5 #post_form_1 .input-xxlarge{width: 400px;} .new_post_template_5 .redactor_box{display: block;width: 400px;margin-left: 0;} .new_post_template_5 .redactor_editor{width: 400px;} .new_post_template_5 .post_article{position: relative;} .new_post_template_5 .post_article .Validform_checktip{top: 0;left: 410px;} /*片段名称*/ .new_post_template_1 .post_name input, .new_post_template_2 .post_name input, .new_post_template_5 .post_name input{ height: auto; border: none; box-shadow: none; border-radius: 0; background:#fafaf5; color: #303239; font-size: 34px; font-weight: 700; line-height: 1.1; transition:none; } .new_post_template_3 .post_name input{ height: auto; border-radius: 0; border: none; box-shadow: none; background: #fff; font-size: 22px; color: #333332; } .post_name input:focus{ border: none; box-shadow: none; background:#f7f7f2; } .new_post_template_3 .post_name input:focus{ background: #fff; color: #332; } /*片段摘要*/ .post_caption textarea{ border: none; box-shadow: none; background:#fafaf5; border-radius: 0; color: #9D9D9D; font-size: 24px; line-height: 36px; } .post_caption textarea:focus{ background: #f7f7f2; } .new_post_template_4 .post_caption textarea:focus{ background: rgba(0, 0, 0, 0.4); } .redactor_editor{ /*border: 2px dashed #ddd;*/ background: #fafaf5; padding:4px 6px; color: #444444; font-size: 18px; line-height: 30px; cursor: text; } .redactor_editor:focus{ border: none; background: #f7f7f2; } body .redactor_air{border: none;box-shadow: 0 1px 3px rgba(0,0,0,0.2);overflow: hidden;border-radius: 5px;} .redactor_toolbar{background: rgba(255,255,255,0.95);border: none;border-radius: 5px;height: auto!important;} body .redactor_air .redactor_toolbar {padding: 0 5px 0 4px!important} .redactor_toolbar li{padding: 5px 0 5px 3px;} .redactor_toolbar li a:hover { background-color: #58AD69; border-color: #58AD69; } .redactor_toolbar li.redactor_separator { border-left: 1px solid #e3e3e3; border-right: 1px solid #fff; float: left; height: 37px; margin: 0 2px 0 5px !important; padding: 0; }
{ "pile_set_name": "Github" }
package catdata; import java.util.List; import java.util.Map; public interface Raw { public Map<String, List<InteriorLabel<Object>>> raw(); public default int find(String section, Object o) { for (InteriorLabel<Object> il : raw().get(section)) { if (il.s.equals(o)) { return il.loc; } } throw new RuntimeException("For section " + section + ", cannot find " + o); } }
{ "pile_set_name": "Github" }
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2008 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP #define BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP #include <boost/units/derived_dimension.hpp> #include <boost/units/physical_dimensions/length.hpp> #include <boost/units/physical_dimensions/time.hpp> namespace boost { namespace units { /// derived dimension for velocity : L T^-1 typedef derived_dimension<length_base_dimension,1, time_base_dimension,-1>::type velocity_dimension; } // namespace units } // namespace boost #endif // BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP
{ "pile_set_name": "Github" }
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// 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. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Simon Grätzer //////////////////////////////////////////////////////////////////////////////// #ifndef ARANGOD_AQL_CLUSTER_QUERY_H #define ARANGOD_AQL_CLUSTER_QUERY_H 1 #include "Aql/Query.h" #include "Cluster/ClusterTypes.h" #include "Futures/Future.h" namespace arangodb { namespace aql { // additonally contains TraversalEngines class ClusterQuery final : public arangodb::aql::Query { public: /// Used to construct a full query ClusterQuery(std::shared_ptr<arangodb::transaction::Context> const& ctx, QueryOptions&& options); ~ClusterQuery(); traverser::GraphEngineList const& traversers() const { return _traversers; } void prepareClusterQuery(arangodb::velocypack::Slice querySlice, arangodb::velocypack::Slice collections, arangodb::velocypack::Slice variables, arangodb::velocypack::Slice snippets, arangodb::velocypack::Slice traversals, arangodb::velocypack::Builder& answer, arangodb::QueryAnalyzerRevisions const& analyzersRevision); arangodb::futures::Future<Result> finalizeClusterQuery(int errorCode); private: /// @brief first one should be the local one arangodb::traverser::GraphEngineList _traversers; }; } // namespace aql } // namespace arangodb #endif // ARANGOD_AQL_CLUSTER_QUERY_H
{ "pile_set_name": "Github" }
Neighand: Neighborhood Handling library Version 0.2, June 2007. Nicolas Brodu <nicolas.brodu@free.fr> Presentation: ------------- The goal of this library is to find 3D neighbors efficiently. It stores the position of objects in 3D. The user can then ask what are the neighbor objects for any given point, within a radius. You may either ask for all the objects or only the K-nearest neighbors. This problem of finding neighbors is also known as a locality query, or a neighborhood search. This library has been designed for performance and ease of use. It consists of various query methods adapted to dynamic environments where the objects may move. These methods are explained in the article "Query Sphere Indexing for Neighborhood Requests". A short tutorial is presented below, followed by the full API documentation. Organisation: ------------- - The "src" subdirectory contains the sources. You may copy the content wherever you wish, it is self-contained (it uses only the standard C and C++ libraries). Each source file contains a description of what it does, and the functions are well documented. See below for the file list. - The "tests" subdirectory contains example programs and a Makefile. These are not meant to be tutorials, but rather useful tools. However, learning how to use the library from them is possible too. See below for the file list. - The file "QuerySphereIndexing.pdf" is a copy of the aforementioned article. It explains the rationale of the library. Usage (project setup): ---------------------- - Copy the src/ directory anywhere in your include path - Include the "neighand.h" file where you need it. - That's all. The library is header-only, no link is required. Usage (Programming): -------------------- - Check that your compiler supports partial template specializations. The library was tested with g++ 3.4 and g++ 4.1.2 on Debian/Linux. - Include the "neighand.h" file. Use the neighand namespace if you wish. - Define one NeighborhoodHandler object with the parameters you need. The possible template and function arguments are explained below. - Use the "insert" method to insert objects in the region of interest, the "update" method to move them, and the "remove" method to remove them if needed. - You may then either: - Find the neighbors of a given point, either all of them or only the K-nearest ones. The "findNeighbors", "findNearestNeighbors", and "findNearestNeighbor" methods are what you need then. - Provide a functor or a callback, that will be called on all the neighbors found around a given center. The "applyToNeighbors" method is what you need in this case. - Please look at the API below for other useful functions. In particular, you may find the "squaredDistance" method handy for cyclic worlds. Tutorial: --------- struct Agent { int number; // put your fields and methods here ObjectProxy<Agent>* proxy; // handy reference, this Agent ID }; ... // Define a non-cyclic world with a 16x16x16 discretization typedef NeighborhoodHandler<Agent,4,4,4,false,false,false> NH; // Make to world cover the region of interest from 0 to 100 in each dimension NH nh(0,0,0,6.25); // Insert a few objects ... agent1.proxy = nh.insert(x1, y1, z1, &agent1, ProxiedObjectRemapper<Agent>()); agent2.proxy = nh.insert(x2, y2, z2, &agent2, ProxiedObjectRemapper<Agent>()); ... // Find all objects within distance d from the point at (x,y,z) vector<Agent*> neighbors; nh.findNeighbors(x, y, z, d, neighbors); // Find the closest object from agent1 (but not itself), within d max. distance NearestNeighbor<Agent> neighbor; nh.findNearestNeighbor(agent1.proxy, d, &neighbor); cout << "The nearest neighbor of agent1 is the agent number " << neighbor.object->number << endl; cout << "It is at d^2=" << neighbor.squaredDistance << " away from agent1" << endl; API documentation (see also neighand.h for details): ---------------------------------------------------- - Template arguments: UserObject: The user type, like Agent in the tutorial exp2div(x/y/z): The power-of-two for the number of cells in each dimension. Ex: 4 => 16 cells wrap(X/Y/Z): Whether the world is cyclic or not in each dimension. layerZ: Ignored, reserved for a future extension _Allocator: A C++ allocator for getting memory. Defaults to the standard allocator. template <typename UserObject, int exp2divx, int exp2divy, int exp2divz, bool wrapX, bool wrapY, bool wrapZ, bool layerZ = false, class _Allocator = std::allocator<ObjectProxy<UserObject> > > NeighborhoodHandler - Constructor: min(x|y|z): The corner of the region of interest in world coordinates. It is especially important in case there is no wrapping along at least one direction. cellSize: The edge size of the cubic cells (the same for each direction). Thus, for non-cyclic worlds, min[xyz] + cellSize * 2^exp2div[xyz] is the corner with maximum coordinate for the region of interest. objectInitCapacity: Initial capacity in number of objects. Memory is reserved to hold that max amount of objects, and will be increased if necessary. Use this parameter to avoid run-time memory allocation on further inserts if you know in advance how many objects will be stored at most in the database. precompFile: The name of a binary file that can be used to cache the precomputations from one run to the other. Default is empty, so the precomputations are not cached. This should be a valid file name. Valid files are read, invalid files are overwritten by a valid one. The file is ONLY used for initialization, and not accessed anymore after the constructor returns. NeighborhoodHandler(float minx, float miny, float minz, float cellSize, uint32_t objectInitCapacity = 1024, const char* precompFile = "") - Inserting an object x/y/z: The position of the object object: A pointer to the object remapperFunctor: A functor with the (UserObject*, ObjectProxy<UserObject>*) signature. It is called when a user object is given a new proxy. See the rationale in neighand.h and why this leads to important optimizations. Return: A proxy = a key identifier for this object template<typename RemapperFunctor> ObjectProxy<UserObject>* insert(float x, float y, float z, UserObject* object, RemapperFunctor remapperFunctor) - Removing an object proxy: The proxy of the object to remove remapperFunctor: See the insert function template<typename RemapperFunctor> void remove(ObjectProxy<UserObject>* proxy, RemapperFunctor remapperFunctor) - Updating the position of an object proxy: The proxy of the object to move x/y/z: The new position of the object void update(ObjectProxy<UserObject>* proxy, float x, float y, float z) - Finding all the neighbors of a given point x/y/z: The query center d: The maximum distance to look for neighbors p: An object proxy used as the query center. In that case the object itself is excluded from the neighbors. Call the function with p->x,p->y,p->z if you wish to include this object. neighbors: A vector of object pointers filled with the neighbors that are found. Note: The neighbors distances are not provided here simply because thay are not always computed, and perhaps not necessary as well in the user application. Use the squaredDistance function (see below) if you need it. void findNeighbors(float x, float y, float z, float d, std::vector<UserObject*>& neighbors) void findNeighbors(ObjectProxy<UserObject>* p, float d, std::vector<UserObject*>& neighbors) - Finding (at most) the K nearest neighbors of a given point x/y/z: The query center d: The maximum distance to look for neighbors K: The maximum number of neighbors to return. p: An object proxy used as the query center. See findNeighbors. neighbor: A vector or an array of objects that holds the neighbors that were found. The distances are provided in addition to the objects because they were necessarily already computed. Return: The number of objects that were found, in case an array was provided. Use the vector size() method otherwise. void findNearestNeighbors(float x, float y, float z, float d, std::vector<NearestNeighbor<UserObject> >& neighbor, unsigned int K) void findNearestNeighbors(ObjectProxy<UserObject>* p, float d, std::vector<NearestNeighbor<UserObject> >& neighbor, unsigned int K) int findNearestNeighbors(float x, float y, float z, float d, NearestNeighbor<UserObject>* neighbor, unsigned int K) int findNearestNeighbors(ObjectProxy<UserObject>* p, float d, NearestNeighbor<UserObject>* neighbor, unsigned int K) - Finding the nearest neighbor of a given point x/y/z: The query center d: The maximum distance to look for the neighbor p: An object proxy used as the query center. See findNeighbors. neighbor: A pointer to an object for holding the neighbor that is found together with its squared distance to the query center. Return: 1 if a neighbor was found, 0 otherwise. int findNearestNeighbor(float x, float y, float z, float d, NearestNeighbor<UserObject>* neighbor) int findNearestNeighbor(ObjectProxy<UserObject>* p, float d, NearestNeighbor<UserObject>* neighbor) - Applying a functor to all the objects in the viciny of a given point x/y/z: The query center d: The maximum distance to look for neighbors f: The functor or callback to call on each neighbor p: An object proxy used as the query center. See findNeighbors. Return: The functor object (which might have an internal state, useful for ex. to count the number of neighbors). template<typename Functor> Functor applyToNeighbors(ObjectProxy<UserObject>* p, float d, Functor f) template<typename Functor> Functor applyToNeighbors(float x, float y, float z, FloatType d, Functor f) typedef void (*Callback)(UserObject* object, void* userData); void applyToNeighbors(ObjectProxy<UserObject>* p, float d, Callback f, void* userData) void applyToNeighbors(float x, float y, float z, float d, Callback f, void* userData) - Applying a functor to all the objects whatever their position f: The functor or callback to call on each object Return: The functor object template<typename Functor> Functor applyToAll(Functor f) void applyToAll(Callback f, void* userData) - Compute the squared distance from point differences dx/dy/dz: The difference between the points along each dimension: x2-x1, etc. Return: Simply dx*dx+dy*dy+dz*dz when there is no wrapping. However when a dimension is wrapping it is taken into account, so you'll probably find this function very convenient in wrapping worlds. float squaredDistance(float dx, float dy, float dz) - Get/Set the query method and method auto-detection parameters method: One of Auto, Sphere, Cube, NonEmpty, or Brute. See the article for what this means. The default is Auto, that will try to select the best method for you, but you may force one of them is the Auto detection does not give the best results (some user applications are better suited to some methods). weight: Additional weight factors to help the auto-detection routine. For example your architecture may be advantageous to the Brute-force method and in that case give it a weight <1.0 Return: The current method and weights void setQueryMethod(QueryMethod method); QueryMethod getQueryMethod() void setWeightSphere(float weight); float getWeightSphere() void setWeightCube(float weight); float getWeightCube() void setWeightNonEmpty(float weight); float getWeightNonEmpty() void setWeightBrute(float weight); float getWeightBrute() - Get the automatic selection routine estimated cost factors x/y/z: The query center d: The maximum distance to look for neighbors factorX: Will hold the estimated cost of the method X on return Return: The method that would be chosen by the automatic selection routine in this situation. If you don't like this choice then you may weight the methods using the setWeight functions. QueryMethod getAutoFactors(float x, float y, float z, float d, float& factorSphere, float& factorCube, float& factorNonEmpty, float& factorBrute) QueryMethod getAutoFactorsClosest(float x, float y, float z, float d, int N, float& factorSphere, float& factorCube, float& factorNonEmpty, float& factorBrute) - Get statistics (only available if NEIGHAND_SELECT_METHOD_STAT is defined) These counters are incremented each time the corresponding method is used. uint32_t statSphere, statCube, statNonEmpty, statBrute; void resetStat(); Source files: ------------- neighand.h: The main header file and the only one you need to include neighand_structures.hpp: Declare the types like ObjectProxy, QueryMethod, etc. neighand_apply.hpp: Main query routine, applies a functor to neighbors neighand_apply_all.hpp: Implements the corresponding function neighand_apply_checkdist.hpp: Subroutine for neighand_apply.hpp neighand_apply_processlines_cond.hpp: Subroutine, conditional object inclusion neighand_apply_processlines_uncond.hpp: Unconditional object inclusion neighand_closest.hpp: Similar to neighand_apply but for K nearest neighbors neighand_closest_processlines.hpp: Subroutine for neighand_closest.hpp neighand.hpp: Implements the other declarations of the main header neighand_helpers.hpp: Common utilities to all wrapping cases neighand_wraphelper_ffff.hpp: Specialized routines for the no wrapping case neighand_wraphelper_tttf.hpp: Specialized routines for the all-wrapping case neighand_wraphelper_ttff.hpp: Specialized routines for wrapping along X and Y Test files: ----------- consistencyTest.cpp: Checks that the library gives correct results. It's probably a good idea to call this test at least once for each set of compilation options you're using. perfTest.cpp: Used to generate the histograms in the article. Might be useful too to get an idea how the automatic selection routine performs on your system, though you should instead really call the getAutoFactors for a representative case of your application distknn.cpp: Used to generate the plot in the article lq.c/lq.h: Locality query routine from the OpenSteer project. Similar to the Cube query method in the non-wrapping case. lq.c.diff: Change from the OpenSteer version so as to make lq.c compile independently. Also contains a bug correction not yet in the OpenSteer CVS, as of 07 June 07. libkdtree++: Slighly patched 0.2.1 version of the library providing a kd-tree C++ implementation with an interface similar to the STL. libkdtree++-0.2.1.diff: The exact changes operated on the library kdtree++: Symbolic link, so the kdtree++ library is "installed" here. KDLQConsistencyTest.cpp: Checks that the kd-tree and the lq bin-lattice files work as intended. Makefile: Instructions for compiling the test programs, and in particular the compiler optimization options (default is -O3). Can also run the consistency and performance tests automatically for all wrapping cases, just type "make consistencyTest" for example. History: -------- v0.2: - Added support for directly calling the different query methods (sphere indexing, bin-lattice cube, non-empty cell list, brute-force). - Improved the algorithm for automatically selecting the best method. - API improvements and modifications. - Made the library compatible with user-defined memory allocators. - Made the library compatible with the aliasing rule. - Removed support for separate CPP specialization. That feature was a maintenance nightmare and it was (and still is) simpler to just specialize the templates in the user project CPP files anyway. v0.1: - Initial public release Happy hacking! Nicolas Brodu, 2007 Code released according to the GNU LGPL, v2 or above.
{ "pile_set_name": "Github" }
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" version="7"> <module> <java>JPAAppClient.jar</java> </module> </application>
{ "pile_set_name": "Github" }
import inherits from 'inherits'; import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; import { is } from '../../../util/ModelUtil'; import { filter, forEach } from 'min-dash'; /** * BPMN specific boundary event behavior */ export default function BoundaryEventBehavior(eventBus, modeling) { CommandInterceptor.call(this, eventBus); function getBoundaryEvents(element) { return filter(element.attachers, function(attacher) { return is(attacher, 'bpmn:BoundaryEvent'); }); } // remove after connecting to event-based gateway this.postExecute('connection.create', function(event) { var source = event.context.source, target = event.context.target, boundaryEvents = getBoundaryEvents(target); if ( is(source, 'bpmn:EventBasedGateway') && is(target, 'bpmn:ReceiveTask') && boundaryEvents.length > 0 ) { modeling.removeElements(boundaryEvents); } }); // remove after replacing connected gateway with event-based gateway this.postExecute('connection.reconnect', function(event) { var oldSource = event.context.oldSource, newSource = event.context.newSource; if (is(oldSource, 'bpmn:Gateway') && is(newSource, 'bpmn:EventBasedGateway')) { forEach(newSource.outgoing, function(connection) { var target = connection.target, attachedboundaryEvents = getBoundaryEvents(target); if (is(target, 'bpmn:ReceiveTask') && attachedboundaryEvents.length > 0) { modeling.removeElements(attachedboundaryEvents); } }); } }); } BoundaryEventBehavior.$inject = [ 'eventBus', 'modeling' ]; inherits(BoundaryEventBehavior, CommandInterceptor);
{ "pile_set_name": "Github" }
config_set alias.column Aliases.real_name [[0,0.0,0.0],true] table_create Aliases TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] column_create Aliases real_name COLUMN_SCALAR ShortText [[0,0.0,0.0],true] table_create Memos TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] load --table Memos [ {"_key": "Groonga"} ] [[0,0.0,0.0],1] select Memos --filter 'caption == "Groonga"' [ [ [ -63, 0.0, 0.0 ], "Syntax error: <caption| |== \"Groonga\">: [expr][parse] unknown identifier: <caption>" ] ] #|e| [expr][parse] unknown identifier: <caption> #|e| Syntax error: <caption| |== "Groonga">: [expr][parse] unknown identifier: <caption> load --table Aliases [ {"_key": "Memos.caption", "real_name": "_key"} ] [[0,0.0,0.0],1] select Memos --filter 'caption == "Groonga"' [[0,0.0,0.0],[[[1],[["_id","UInt32"],["_key","ShortText"]],[1,"Groonga"]]]]
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Flot Examples: Time Axes</title> <link href="../examples.css" rel="stylesheet" type="text/css"> <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]--> <script language="javascript" type="text/javascript" src="../../jquery.js"></script> <script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script> <script language="javascript" type="text/javascript" src="../../jquery.flot.time.js"></script> <script type="text/javascript"> $(function() { var d = [[-373597200000, 315.71], [-370918800000, 317.45], [-368326800000, 317.50], [-363056400000, 315.86], [-360378000000, 314.93], [-357699600000, 313.19], [-352429200000, 313.34], [-349837200000, 314.67], [-347158800000, 315.58], [-344480400000, 316.47], [-342061200000, 316.65], [-339382800000, 317.71], [-336790800000, 318.29], [-334112400000, 318.16], [-331520400000, 316.55], [-328842000000, 314.80], [-326163600000, 313.84], [-323571600000, 313.34], [-320893200000, 314.81], [-318301200000, 315.59], [-315622800000, 316.43], [-312944400000, 316.97], [-310438800000, 317.58], [-307760400000, 319.03], [-305168400000, 320.03], [-302490000000, 319.59], [-299898000000, 318.18], [-297219600000, 315.91], [-294541200000, 314.16], [-291949200000, 313.83], [-289270800000, 315.00], [-286678800000, 316.19], [-284000400000, 316.89], [-281322000000, 317.70], [-278902800000, 318.54], [-276224400000, 319.48], [-273632400000, 320.58], [-270954000000, 319.78], [-268362000000, 318.58], [-265683600000, 316.79], [-263005200000, 314.99], [-260413200000, 315.31], [-257734800000, 316.10], [-255142800000, 317.01], [-252464400000, 317.94], [-249786000000, 318.56], [-247366800000, 319.69], [-244688400000, 320.58], [-242096400000, 321.01], [-239418000000, 320.61], [-236826000000, 319.61], [-234147600000, 317.40], [-231469200000, 316.26], [-228877200000, 315.42], [-226198800000, 316.69], [-223606800000, 317.69], [-220928400000, 318.74], [-218250000000, 319.08], [-215830800000, 319.86], [-213152400000, 321.39], [-210560400000, 322.24], [-207882000000, 321.47], [-205290000000, 319.74], [-202611600000, 317.77], [-199933200000, 316.21], [-197341200000, 315.99], [-194662800000, 317.07], [-192070800000, 318.36], [-189392400000, 319.57], [-178938000000, 322.23], [-176259600000, 321.89], [-173667600000, 320.44], [-170989200000, 318.70], [-168310800000, 316.70], [-165718800000, 316.87], [-163040400000, 317.68], [-160448400000, 318.71], [-157770000000, 319.44], [-155091600000, 320.44], [-152672400000, 320.89], [-149994000000, 322.13], [-147402000000, 322.16], [-144723600000, 321.87], [-142131600000, 321.21], [-139453200000, 318.87], [-136774800000, 317.81], [-134182800000, 317.30], [-131504400000, 318.87], [-128912400000, 319.42], [-126234000000, 320.62], [-123555600000, 321.59], [-121136400000, 322.39], [-118458000000, 323.70], [-115866000000, 324.07], [-113187600000, 323.75], [-110595600000, 322.40], [-107917200000, 320.37], [-105238800000, 318.64], [-102646800000, 318.10], [-99968400000, 319.79], [-97376400000, 321.03], [-94698000000, 322.33], [-92019600000, 322.50], [-89600400000, 323.04], [-86922000000, 324.42], [-84330000000, 325.00], [-81651600000, 324.09], [-79059600000, 322.55], [-76381200000, 320.92], [-73702800000, 319.26], [-71110800000, 319.39], [-68432400000, 320.72], [-65840400000, 321.96], [-63162000000, 322.57], [-60483600000, 323.15], [-57978000000, 323.89], [-55299600000, 325.02], [-52707600000, 325.57], [-50029200000, 325.36], [-47437200000, 324.14], [-44758800000, 322.11], [-42080400000, 320.33], [-39488400000, 320.25], [-36810000000, 321.32], [-34218000000, 322.90], [-31539600000, 324.00], [-28861200000, 324.42], [-26442000000, 325.64], [-23763600000, 326.66], [-21171600000, 327.38], [-18493200000, 326.70], [-15901200000, 325.89], [-13222800000, 323.67], [-10544400000, 322.38], [-7952400000, 321.78], [-5274000000, 322.85], [-2682000000, 324.12], [-3600000, 325.06], [2674800000, 325.98], [5094000000, 326.93], [7772400000, 328.13], [10364400000, 328.07], [13042800000, 327.66], [15634800000, 326.35], [18313200000, 324.69], [20991600000, 323.10], [23583600000, 323.07], [26262000000, 324.01], [28854000000, 325.13], [31532400000, 326.17], [34210800000, 326.68], [36630000000, 327.18], [39308400000, 327.78], [41900400000, 328.92], [44578800000, 328.57], [47170800000, 327.37], [49849200000, 325.43], [52527600000, 323.36], [55119600000, 323.56], [57798000000, 324.80], [60390000000, 326.01], [63068400000, 326.77], [65746800000, 327.63], [68252400000, 327.75], [70930800000, 329.72], [73522800000, 330.07], [76201200000, 329.09], [78793200000, 328.05], [81471600000, 326.32], [84150000000, 324.84], [86742000000, 325.20], [89420400000, 326.50], [92012400000, 327.55], [94690800000, 328.54], [97369200000, 329.56], [99788400000, 330.30], [102466800000, 331.50], [105058800000, 332.48], [107737200000, 332.07], [110329200000, 330.87], [113007600000, 329.31], [115686000000, 327.51], [118278000000, 327.18], [120956400000, 328.16], [123548400000, 328.64], [126226800000, 329.35], [128905200000, 330.71], [131324400000, 331.48], [134002800000, 332.65], [136594800000, 333.16], [139273200000, 332.06], [141865200000, 330.99], [144543600000, 329.17], [147222000000, 327.41], [149814000000, 327.20], [152492400000, 328.33], [155084400000, 329.50], [157762800000, 330.68], [160441200000, 331.41], [162860400000, 331.85], [165538800000, 333.29], [168130800000, 333.91], [170809200000, 333.40], [173401200000, 331.78], [176079600000, 329.88], [178758000000, 328.57], [181350000000, 328.46], [184028400000, 329.26], [189298800000, 331.71], [191977200000, 332.76], [194482800000, 333.48], [197161200000, 334.78], [199753200000, 334.78], [202431600000, 334.17], [205023600000, 332.78], [207702000000, 330.64], [210380400000, 328.95], [212972400000, 328.77], [215650800000, 330.23], [218242800000, 331.69], [220921200000, 332.70], [223599600000, 333.24], [226018800000, 334.96], [228697200000, 336.04], [231289200000, 336.82], [233967600000, 336.13], [236559600000, 334.73], [239238000000, 332.52], [241916400000, 331.19], [244508400000, 331.19], [247186800000, 332.35], [249778800000, 333.47], [252457200000, 335.11], [255135600000, 335.26], [257554800000, 336.60], [260233200000, 337.77], [262825200000, 338.00], [265503600000, 337.99], [268095600000, 336.48], [270774000000, 334.37], [273452400000, 332.27], [276044400000, 332.41], [278722800000, 333.76], [281314800000, 334.83], [283993200000, 336.21], [286671600000, 336.64], [289090800000, 338.12], [291769200000, 339.02], [294361200000, 339.02], [297039600000, 339.20], [299631600000, 337.58], [302310000000, 335.55], [304988400000, 333.89], [307580400000, 334.14], [310258800000, 335.26], [312850800000, 336.71], [315529200000, 337.81], [318207600000, 338.29], [320713200000, 340.04], [323391600000, 340.86], [325980000000, 341.47], [328658400000, 341.26], [331250400000, 339.29], [333928800000, 337.60], [336607200000, 336.12], [339202800000, 336.08], [341881200000, 337.22], [344473200000, 338.34], [347151600000, 339.36], [349830000000, 340.51], [352249200000, 341.57], [354924000000, 342.56], [357516000000, 343.01], [360194400000, 342.47], [362786400000, 340.71], [365464800000, 338.52], [368143200000, 336.96], [370738800000, 337.13], [373417200000, 338.58], [376009200000, 339.89], [378687600000, 340.93], [381366000000, 341.69], [383785200000, 342.69], [389052000000, 344.30], [391730400000, 343.43], [394322400000, 341.88], [397000800000, 339.89], [399679200000, 337.95], [402274800000, 338.10], [404953200000, 339.27], [407545200000, 340.67], [410223600000, 341.42], [412902000000, 342.68], [415321200000, 343.46], [417996000000, 345.10], [420588000000, 345.76], [423266400000, 345.36], [425858400000, 343.91], [428536800000, 342.05], [431215200000, 340.00], [433810800000, 340.12], [436489200000, 341.33], [439081200000, 342.94], [441759600000, 343.87], [444438000000, 344.60], [446943600000, 345.20], [452210400000, 347.36], [454888800000, 346.74], [457480800000, 345.41], [460159200000, 343.01], [462837600000, 341.23], [465433200000, 341.52], [468111600000, 342.86], [470703600000, 344.41], [473382000000, 345.09], [476060400000, 345.89], [478479600000, 347.49], [481154400000, 348.00], [483746400000, 348.75], [486424800000, 348.19], [489016800000, 346.54], [491695200000, 344.63], [494373600000, 343.03], [496969200000, 342.92], [499647600000, 344.24], [502239600000, 345.62], [504918000000, 346.43], [507596400000, 346.94], [510015600000, 347.88], [512690400000, 349.57], [515282400000, 350.35], [517960800000, 349.72], [520552800000, 347.78], [523231200000, 345.86], [525909600000, 344.84], [528505200000, 344.32], [531183600000, 345.67], [533775600000, 346.88], [536454000000, 348.19], [539132400000, 348.55], [541551600000, 349.52], [544226400000, 351.12], [546818400000, 351.84], [549496800000, 351.49], [552088800000, 349.82], [554767200000, 347.63], [557445600000, 346.38], [560041200000, 346.49], [562719600000, 347.75], [565311600000, 349.03], [567990000000, 350.20], [570668400000, 351.61], [573174000000, 352.22], [575848800000, 353.53], [578440800000, 354.14], [581119200000, 353.62], [583711200000, 352.53], [586389600000, 350.41], [589068000000, 348.84], [591663600000, 348.94], [594342000000, 350.04], [596934000000, 351.29], [599612400000, 352.72], [602290800000, 353.10], [604710000000, 353.65], [607384800000, 355.43], [609976800000, 355.70], [612655200000, 355.11], [615247200000, 353.79], [617925600000, 351.42], [620604000000, 349.81], [623199600000, 350.11], [625878000000, 351.26], [628470000000, 352.63], [631148400000, 353.64], [633826800000, 354.72], [636246000000, 355.49], [638920800000, 356.09], [641512800000, 357.08], [644191200000, 356.11], [646783200000, 354.70], [649461600000, 352.68], [652140000000, 351.05], [654735600000, 351.36], [657414000000, 352.81], [660006000000, 354.22], [662684400000, 354.85], [665362800000, 355.66], [667782000000, 357.04], [670456800000, 358.40], [673048800000, 359.00], [675727200000, 357.99], [678319200000, 356.00], [680997600000, 353.78], [683676000000, 352.20], [686271600000, 352.22], [688950000000, 353.70], [691542000000, 354.98], [694220400000, 356.09], [696898800000, 356.85], [699404400000, 357.73], [702079200000, 358.91], [704671200000, 359.45], [707349600000, 359.19], [709941600000, 356.72], [712620000000, 354.79], [715298400000, 352.79], [717894000000, 353.20], [720572400000, 354.15], [723164400000, 355.39], [725842800000, 356.77], [728521200000, 357.17], [730940400000, 358.26], [733615200000, 359.16], [736207200000, 360.07], [738885600000, 359.41], [741477600000, 357.44], [744156000000, 355.30], [746834400000, 353.87], [749430000000, 354.04], [752108400000, 355.27], [754700400000, 356.70], [757378800000, 358.00], [760057200000, 358.81], [762476400000, 359.68], [765151200000, 361.13], [767743200000, 361.48], [770421600000, 360.60], [773013600000, 359.20], [775692000000, 357.23], [778370400000, 355.42], [780966000000, 355.89], [783644400000, 357.41], [786236400000, 358.74], [788914800000, 359.73], [791593200000, 360.61], [794012400000, 361.58], [796687200000, 363.05], [799279200000, 363.62], [801957600000, 363.03], [804549600000, 361.55], [807228000000, 358.94], [809906400000, 357.93], [812502000000, 357.80], [815180400000, 359.22], [817772400000, 360.44], [820450800000, 361.83], [823129200000, 362.95], [825634800000, 363.91], [828309600000, 364.28], [830901600000, 364.94], [833580000000, 364.70], [836172000000, 363.31], [838850400000, 361.15], [841528800000, 359.40], [844120800000, 359.34], [846802800000, 360.62], [849394800000, 361.96], [852073200000, 362.81], [854751600000, 363.87], [857170800000, 364.25], [859845600000, 366.02], [862437600000, 366.46], [865116000000, 365.32], [867708000000, 364.07], [870386400000, 361.95], [873064800000, 360.06], [875656800000, 360.49], [878338800000, 362.19], [880930800000, 364.12], [883609200000, 364.99], [886287600000, 365.82], [888706800000, 366.95], [891381600000, 368.42], [893973600000, 369.33], [896652000000, 368.78], [899244000000, 367.59], [901922400000, 365.84], [904600800000, 363.83], [907192800000, 364.18], [909874800000, 365.34], [912466800000, 366.93], [915145200000, 367.94], [917823600000, 368.82], [920242800000, 369.46], [922917600000, 370.77], [925509600000, 370.66], [928188000000, 370.10], [930780000000, 369.08], [933458400000, 366.66], [936136800000, 364.60], [938728800000, 365.17], [941410800000, 366.51], [944002800000, 367.89], [946681200000, 369.04], [949359600000, 369.35], [951865200000, 370.38], [954540000000, 371.63], [957132000000, 371.32], [959810400000, 371.53], [962402400000, 369.75], [965080800000, 368.23], [967759200000, 366.87], [970351200000, 366.94], [973033200000, 368.27], [975625200000, 369.64], [978303600000, 370.46], [980982000000, 371.44], [983401200000, 372.37], [986076000000, 373.33], [988668000000, 373.77], [991346400000, 373.09], [993938400000, 371.51], [996616800000, 369.55], [999295200000, 368.12], [1001887200000, 368.38], [1004569200000, 369.66], [1007161200000, 371.11], [1009839600000, 372.36], [1012518000000, 373.09], [1014937200000, 373.81], [1017612000000, 374.93], [1020204000000, 375.58], [1022882400000, 375.44], [1025474400000, 373.86], [1028152800000, 371.77], [1030831200000, 370.73], [1033423200000, 370.50], [1036105200000, 372.18], [1038697200000, 373.70], [1041375600000, 374.92], [1044054000000, 375.62], [1046473200000, 376.51], [1049148000000, 377.75], [1051740000000, 378.54], [1054418400000, 378.20], [1057010400000, 376.68], [1059688800000, 374.43], [1062367200000, 373.11], [1064959200000, 373.10], [1067641200000, 374.77], [1070233200000, 375.97], [1072911600000, 377.03], [1075590000000, 377.87], [1078095600000, 378.88], [1080770400000, 380.42], [1083362400000, 380.62], [1086040800000, 379.70], [1088632800000, 377.43], [1091311200000, 376.32], [1093989600000, 374.19], [1096581600000, 374.47], [1099263600000, 376.15], [1101855600000, 377.51], [1104534000000, 378.43], [1107212400000, 379.70], [1109631600000, 380.92], [1112306400000, 382.18], [1114898400000, 382.45], [1117576800000, 382.14], [1120168800000, 380.60], [1122847200000, 378.64], [1125525600000, 376.73], [1128117600000, 376.84], [1130799600000, 378.29], [1133391600000, 380.06], [1136070000000, 381.40], [1138748400000, 382.20], [1141167600000, 382.66], [1143842400000, 384.69], [1146434400000, 384.94], [1149112800000, 384.01], [1151704800000, 382.14], [1154383200000, 380.31], [1157061600000, 378.81], [1159653600000, 379.03], [1162335600000, 380.17], [1164927600000, 381.85], [1167606000000, 382.94], [1170284400000, 383.86], [1172703600000, 384.49], [1175378400000, 386.37], [1177970400000, 386.54], [1180648800000, 385.98], [1183240800000, 384.36], [1185919200000, 381.85], [1188597600000, 380.74], [1191189600000, 381.15], [1193871600000, 382.38], [1196463600000, 383.94], [1199142000000, 385.44]]; $.plot("#placeholder", [d], { xaxis: { mode: "time" } }); $("#whole").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time" } }); }); $("#nineties").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", min: (new Date(1990, 0, 1)).getTime(), max: (new Date(2000, 0, 1)).getTime() } }); }); $("#latenineties").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", minTickSize: [1, "year"], min: (new Date(1996, 0, 1)).getTime(), max: (new Date(2000, 0, 1)).getTime() } }); }); $("#ninetyninequarters").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", minTickSize: [1, "quarter"], min: (new Date(1999, 0, 1)).getTime(), max: (new Date(2000, 0, 1)).getTime() } }); }); $("#ninetynine").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", minTickSize: [1, "month"], min: (new Date(1999, 0, 1)).getTime(), max: (new Date(2000, 0, 1)).getTime() } }); }); $("#lastweekninetynine").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", minTickSize: [1, "day"], min: (new Date(1999, 11, 25)).getTime(), max: (new Date(2000, 0, 1)).getTime(), timeformat: "%a" } }); }); $("#lastdayninetynine").click(function () { $.plot("#placeholder", [d], { xaxis: { mode: "time", minTickSize: [1, "hour"], min: (new Date(1999, 11, 31)).getTime(), max: (new Date(2000, 0, 1)).getTime(), twelveHourClock: true } }); }); // Add the Flot version string to the footer $("#footer").prepend("Flot " + $.plot.version + " &ndash; "); }); </script> </head> <body> <div id="header"> <h2>Time Axes</h2> </div> <div id="content"> <div class="demo-container"> <div id="placeholder" class="demo-placeholder"></div> </div> <p>Monthly mean atmospheric CO<sub>2</sub> in PPM at Mauna Loa, Hawaii (source: <a href="http://www.esrl.noaa.gov/gmd/ccgg/trends/">NOAA/ESRL</a>).</p> <p>If you tell Flot that an axis represents time, the data will be interpreted as timestamps and the ticks adjusted and formatted accordingly.</p> <p>Zoom to: <button id="whole">Whole period</button> <button id="nineties">1990-2000</button> <button id="latenineties">1996-2000</button></p> <p>Zoom to: <button id="ninetyninequarters">1999 by quarter</button> <button id="ninetynine">1999 by month</button> <button id="lastweekninetynine">Last week of 1999</button> <button id="lastdayninetynine">Dec. 31, 1999</button></p> <p>The timestamps must be specified as Javascript timestamps, as milliseconds since January 1, 1970 00:00. This is like Unix timestamps, but in milliseconds instead of seconds (remember to multiply with 1000!).</p> <p>As an extra caveat, the timestamps are interpreted according to UTC and, by default, displayed as such. You can set the axis "timezone" option to "browser" to display the timestamps in the user's timezone, or, if you use timezoneJS, you can specify a time zone.</p> </div> <div id="footer"> Copyright &copy; 2007 - 2014 IOLA and Ole Laursen </div> </body> </html>
{ "pile_set_name": "Github" }
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package csv import ( "io" "reflect" "strings" "testing" "unicode/utf8" ) func TestRead(t *testing.T) { tests := []struct { Name string Input string Output [][]string Error error // These fields are copied into the Reader Comma rune Comment rune UseFieldsPerRecord bool // false (default) means FieldsPerRecord is -1 FieldsPerRecord int LazyQuotes bool TrimLeadingSpace bool ReuseRecord bool }{{ Name: "Simple", Input: "a,b,c\n", Output: [][]string{{"a", "b", "c"}}, }, { Name: "CRLF", Input: "a,b\r\nc,d\r\n", Output: [][]string{{"a", "b"}, {"c", "d"}}, }, { Name: "BareCR", Input: "a,b\rc,d\r\n", Output: [][]string{{"a", "b\rc", "d"}}, }, { Name: "RFC4180test", Input: `#field1,field2,field3 "aaa","bb b","ccc" "a,a","b""bb","ccc" zzz,yyy,xxx `, Output: [][]string{ {"#field1", "field2", "field3"}, {"aaa", "bb\nb", "ccc"}, {"a,a", `b"bb`, "ccc"}, {"zzz", "yyy", "xxx"}, }, UseFieldsPerRecord: true, FieldsPerRecord: 0, }, { Name: "NoEOLTest", Input: "a,b,c", Output: [][]string{{"a", "b", "c"}}, }, { Name: "Semicolon", Input: "a;b;c\n", Output: [][]string{{"a", "b", "c"}}, Comma: ';', }, { Name: "MultiLine", Input: `"two line","one line","three line field"`, Output: [][]string{{"two\nline", "one line", "three\nline\nfield"}}, }, { Name: "BlankLine", Input: "a,b,c\n\nd,e,f\n\n", Output: [][]string{ {"a", "b", "c"}, {"d", "e", "f"}, }, }, { Name: "BlankLineFieldCount", Input: "a,b,c\n\nd,e,f\n\n", Output: [][]string{ {"a", "b", "c"}, {"d", "e", "f"}, }, UseFieldsPerRecord: true, FieldsPerRecord: 0, }, { Name: "TrimSpace", Input: " a, b, c\n", Output: [][]string{{"a", "b", "c"}}, TrimLeadingSpace: true, }, { Name: "LeadingSpace", Input: " a, b, c\n", Output: [][]string{{" a", " b", " c"}}, }, { Name: "Comment", Input: "#1,2,3\na,b,c\n#comment", Output: [][]string{{"a", "b", "c"}}, Comment: '#', }, { Name: "NoComment", Input: "#1,2,3\na,b,c", Output: [][]string{{"#1", "2", "3"}, {"a", "b", "c"}}, }, { Name: "LazyQuotes", Input: `a "word","1"2",a","b`, Output: [][]string{{`a "word"`, `1"2`, `a"`, `b`}}, LazyQuotes: true, }, { Name: "BareQuotes", Input: `a "word","1"2",a"`, Output: [][]string{{`a "word"`, `1"2`, `a"`}}, LazyQuotes: true, }, { Name: "BareDoubleQuotes", Input: `a""b,c`, Output: [][]string{{`a""b`, `c`}}, LazyQuotes: true, }, { Name: "BadDoubleQuotes", Input: `a""b,c`, Error: &ParseError{StartLine: 1, Line: 1, Column: 1, Err: ErrBareQuote}, }, { Name: "TrimQuote", Input: ` "a"," b",c`, Output: [][]string{{"a", " b", "c"}}, TrimLeadingSpace: true, }, { Name: "BadBareQuote", Input: `a "word","b"`, Error: &ParseError{StartLine: 1, Line: 1, Column: 2, Err: ErrBareQuote}, }, { Name: "BadTrailingQuote", Input: `"a word",b"`, Error: &ParseError{StartLine: 1, Line: 1, Column: 10, Err: ErrBareQuote}, }, { Name: "ExtraneousQuote", Input: `"a "word","b"`, Error: &ParseError{StartLine: 1, Line: 1, Column: 3, Err: ErrQuote}, }, { Name: "BadFieldCount", Input: "a,b,c\nd,e", Error: &ParseError{StartLine: 2, Line: 2, Err: ErrFieldCount}, UseFieldsPerRecord: true, FieldsPerRecord: 0, }, { Name: "BadFieldCount1", Input: `a,b,c`, Error: &ParseError{StartLine: 1, Line: 1, Err: ErrFieldCount}, UseFieldsPerRecord: true, FieldsPerRecord: 2, }, { Name: "FieldCount", Input: "a,b,c\nd,e", Output: [][]string{{"a", "b", "c"}, {"d", "e"}}, }, { Name: "TrailingCommaEOF", Input: "a,b,c,", Output: [][]string{{"a", "b", "c", ""}}, }, { Name: "TrailingCommaEOL", Input: "a,b,c,\n", Output: [][]string{{"a", "b", "c", ""}}, }, { Name: "TrailingCommaSpaceEOF", Input: "a,b,c, ", Output: [][]string{{"a", "b", "c", ""}}, TrimLeadingSpace: true, }, { Name: "TrailingCommaSpaceEOL", Input: "a,b,c, \n", Output: [][]string{{"a", "b", "c", ""}}, TrimLeadingSpace: true, }, { Name: "TrailingCommaLine3", Input: "a,b,c\nd,e,f\ng,hi,", Output: [][]string{{"a", "b", "c"}, {"d", "e", "f"}, {"g", "hi", ""}}, TrimLeadingSpace: true, }, { Name: "NotTrailingComma3", Input: "a,b,c, \n", Output: [][]string{{"a", "b", "c", " "}}, }, { Name: "CommaFieldTest", Input: `x,y,z,w x,y,z, x,y,, x,,, ,,, "x","y","z","w" "x","y","z","" "x","y","","" "x","","","" "","","","" `, Output: [][]string{ {"x", "y", "z", "w"}, {"x", "y", "z", ""}, {"x", "y", "", ""}, {"x", "", "", ""}, {"", "", "", ""}, {"x", "y", "z", "w"}, {"x", "y", "z", ""}, {"x", "y", "", ""}, {"x", "", "", ""}, {"", "", "", ""}, }, }, { Name: "TrailingCommaIneffective1", Input: "a,b,\nc,d,e", Output: [][]string{ {"a", "b", ""}, {"c", "d", "e"}, }, TrimLeadingSpace: true, }, { Name: "ReadAllReuseRecord", Input: "a,b\nc,d", Output: [][]string{ {"a", "b"}, {"c", "d"}, }, ReuseRecord: true, }, { Name: "StartLine1", // Issue 19019 Input: "a,\"b\nc\"d,e", Error: &ParseError{StartLine: 1, Line: 2, Column: 1, Err: ErrQuote}, }, { Name: "StartLine2", Input: "a,b\n\"d\n\n,e", Error: &ParseError{StartLine: 2, Line: 5, Column: 0, Err: ErrQuote}, }, { Name: "CRLFInQuotedField", // Issue 21201 Input: "A,\"Hello\r\nHi\",B\r\n", Output: [][]string{ {"A", "Hello\nHi", "B"}, }, }, { Name: "BinaryBlobField", // Issue 19410 Input: "x09\x41\xb4\x1c,aktau", Output: [][]string{{"x09A\xb4\x1c", "aktau"}}, }, { Name: "TrailingCR", Input: "field1,field2\r", Output: [][]string{{"field1", "field2"}}, }, { Name: "QuotedTrailingCR", Input: "\"field\"\r", Output: [][]string{{"field"}}, }, { Name: "QuotedTrailingCRCR", Input: "\"field\"\r\r", Error: &ParseError{StartLine: 1, Line: 1, Column: 6, Err: ErrQuote}, }, { Name: "FieldCR", Input: "field\rfield\r", Output: [][]string{{"field\rfield"}}, }, { Name: "FieldCRCR", Input: "field\r\rfield\r\r", Output: [][]string{{"field\r\rfield\r"}}, }, { Name: "FieldCRCRLF", Input: "field\r\r\nfield\r\r\n", Output: [][]string{{"field\r"}, {"field\r"}}, }, { Name: "FieldCRCRLFCR", Input: "field\r\r\n\rfield\r\r\n\r", Output: [][]string{{"field\r"}, {"\rfield\r"}}, }, { Name: "FieldCRCRLFCRCR", Input: "field\r\r\n\r\rfield\r\r\n\r\r", Output: [][]string{{"field\r"}, {"\r\rfield\r"}, {"\r"}}, }, { Name: "MultiFieldCRCRLFCRCR", Input: "field1,field2\r\r\n\r\rfield1,field2\r\r\n\r\r,", Output: [][]string{ {"field1", "field2\r"}, {"\r\rfield1", "field2\r"}, {"\r\r", ""}, }, }, { Name: "NonASCIICommaAndComment", Input: "a£b,c£ \td,e\n€ comment\n", Output: [][]string{{"a", "b,c", "d,e"}}, TrimLeadingSpace: true, Comma: '£', Comment: '€', }, { Name: "NonASCIICommaAndCommentWithQuotes", Input: "a€\" b,\"€ c\nλ comment\n", Output: [][]string{{"a", " b,", " c"}}, Comma: '€', Comment: 'λ', }, { // λ and θ start with the same byte. // This tests that the parser doesn't confuse such characters. Name: "NonASCIICommaConfusion", Input: "\"abθcd\"λefθgh", Output: [][]string{{"abθcd", "efθgh"}}, Comma: 'λ', Comment: '€', }, { Name: "NonASCIICommentConfusion", Input: "λ\nλ\nθ\nλ\n", Output: [][]string{{"λ"}, {"λ"}, {"λ"}}, Comment: 'θ', }, { Name: "QuotedFieldMultipleLF", Input: "\"\n\n\n\n\"", Output: [][]string{{"\n\n\n\n"}}, }, { Name: "MultipleCRLF", Input: "\r\n\r\n\r\n\r\n", }, { // The implementation may read each line in several chunks if it doesn't fit entirely // in the read buffer, so we should test the code to handle that condition. Name: "HugeLines", Input: strings.Repeat("#ignore\n", 10000) + strings.Repeat("@", 5000) + "," + strings.Repeat("*", 5000), Output: [][]string{{strings.Repeat("@", 5000), strings.Repeat("*", 5000)}}, Comment: '#', }, { Name: "QuoteWithTrailingCRLF", Input: "\"foo\"bar\"\r\n", Error: &ParseError{StartLine: 1, Line: 1, Column: 4, Err: ErrQuote}, }, { Name: "LazyQuoteWithTrailingCRLF", Input: "\"foo\"bar\"\r\n", Output: [][]string{{`foo"bar`}}, LazyQuotes: true, }, { Name: "DoubleQuoteWithTrailingCRLF", Input: "\"foo\"\"bar\"\r\n", Output: [][]string{{`foo"bar`}}, }, { Name: "EvenQuotes", Input: `""""""""`, Output: [][]string{{`"""`}}, }, { Name: "OddQuotes", Input: `"""""""`, Error: &ParseError{StartLine: 1, Line: 1, Column: 7, Err: ErrQuote}, }, { Name: "LazyOddQuotes", Input: `"""""""`, Output: [][]string{{`"""`}}, LazyQuotes: true, }, { Name: "BadComma1", Comma: '\n', Error: errInvalidDelim, }, { Name: "BadComma2", Comma: '\r', Error: errInvalidDelim, }, { Name: "BadComma3", Comma: '"', Error: errInvalidDelim, }, { Name: "BadComma4", Comma: utf8.RuneError, Error: errInvalidDelim, }, { Name: "BadComment1", Comment: '\n', Error: errInvalidDelim, }, { Name: "BadComment2", Comment: '\r', Error: errInvalidDelim, }, { Name: "BadComment3", Comment: utf8.RuneError, Error: errInvalidDelim, }, { Name: "BadCommaComment", Comma: 'X', Comment: 'X', Error: errInvalidDelim, }} for _, tt := range tests { t.Run(tt.Name, func(t *testing.T) { r := NewReader(strings.NewReader(tt.Input)) if tt.Comma != 0 { r.Comma = tt.Comma } r.Comment = tt.Comment if tt.UseFieldsPerRecord { r.FieldsPerRecord = tt.FieldsPerRecord } else { r.FieldsPerRecord = -1 } r.LazyQuotes = tt.LazyQuotes r.TrimLeadingSpace = tt.TrimLeadingSpace r.ReuseRecord = tt.ReuseRecord out, err := r.ReadAll() if !reflect.DeepEqual(err, tt.Error) { t.Errorf("ReadAll() error:\ngot %v\nwant %v", err, tt.Error) } else if !reflect.DeepEqual(out, tt.Output) { t.Errorf("ReadAll() output:\ngot %q\nwant %q", out, tt.Output) } }) } } // nTimes is an io.Reader which yields the string s n times. type nTimes struct { s string n int off int } func (r *nTimes) Read(p []byte) (n int, err error) { for { if r.n <= 0 || r.s == "" { return n, io.EOF } n0 := copy(p, r.s[r.off:]) p = p[n0:] n += n0 r.off += n0 if r.off == len(r.s) { r.off = 0 r.n-- } if len(p) == 0 { return } } } // benchmarkRead measures reading the provided CSV rows data. // initReader, if non-nil, modifies the Reader before it's used. func benchmarkRead(b *testing.B, initReader func(*Reader), rows string) { b.ReportAllocs() r := NewReader(&nTimes{s: rows, n: b.N}) if initReader != nil { initReader(r) } for { _, err := r.Read() if err == io.EOF { break } if err != nil { b.Fatal(err) } } } const benchmarkCSVData = `x,y,z,w x,y,z, x,y,, x,,, ,,, "x","y","z","w" "x","y","z","" "x","y","","" "x","","","" "","","","" ` func BenchmarkRead(b *testing.B) { benchmarkRead(b, nil, benchmarkCSVData) } func BenchmarkReadWithFieldsPerRecord(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.FieldsPerRecord = 4 }, benchmarkCSVData) } func BenchmarkReadWithoutFieldsPerRecord(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.FieldsPerRecord = -1 }, benchmarkCSVData) } func BenchmarkReadLargeFields(b *testing.B) { benchmarkRead(b, nil, strings.Repeat(`xxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvv ,,zzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv `, 3)) } func BenchmarkReadReuseRecord(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.ReuseRecord = true }, benchmarkCSVData) } func BenchmarkReadReuseRecordWithFieldsPerRecord(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.ReuseRecord = true; r.FieldsPerRecord = 4 }, benchmarkCSVData) } func BenchmarkReadReuseRecordWithoutFieldsPerRecord(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.ReuseRecord = true; r.FieldsPerRecord = -1 }, benchmarkCSVData) } func BenchmarkReadReuseRecordLargeFields(b *testing.B) { benchmarkRead(b, func(r *Reader) { r.ReuseRecord = true }, strings.Repeat(`xxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvv ,,zzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww,vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv `, 3)) }
{ "pile_set_name": "Github" }
var CC = require('../index.js').ConfigChain var test = require('tap').test var f1 = '/tmp/f1.ini' var f2 = '/tmp/f2.json' var ini = require('ini') var f1data = {foo: {bar: 'baz'}, bloo: 'jaus'} var f2data = {oof: {rab: 'zab'}, oolb: 'suaj'} var fs = require('fs') fs.writeFileSync(f1, ini.stringify(f1data), 'utf8') fs.writeFileSync(f2, JSON.stringify(f2data), 'utf8') test('test saving and loading ini files', function (t) { new CC() .add({grelb:'blerg'}, 'opt') .addFile(f1, 'ini', 'inifile') .addFile(f2, 'json', 'jsonfile') .on('load', function (cc) { t.same(cc.snapshot, { grelb: 'blerg', bloo: 'jaus', foo: { bar: 'baz' }, oof: { rab: 'zab' }, oolb: 'suaj' }) t.same(cc.list, [ { grelb: 'blerg' }, { bloo: 'jaus', foo: { bar: 'baz' } }, { oof: { rab: 'zab' }, oolb: 'suaj' } ]) cc.set('grelb', 'brelg', 'opt') .set('foo', 'zoo', 'inifile') .set('oof', 'ooz', 'jsonfile') .save('inifile') .save('jsonfile') .on('save', function () { t.equal(fs.readFileSync(f1, 'utf8'), "bloo = jaus\nfoo = zoo\n") t.equal(fs.readFileSync(f2, 'utf8'), "{\"oof\":\"ooz\",\"oolb\":\"suaj\"}") t.same(cc.snapshot, { grelb: 'brelg', bloo: 'jaus', foo: 'zoo', oof: 'ooz', oolb: 'suaj' }) t.same(cc.list, [ { grelb: 'brelg' }, { bloo: 'jaus', foo: 'zoo' }, { oof: 'ooz', oolb: 'suaj' } ]) t.pass('ok') t.end() }) }) })
{ "pile_set_name": "Github" }
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.wasp.ipc; /** * Interface for receiving asynchronous callbacks. * For each request with an asynchronous callback, * either {@link #handleResult(Object)} or {@link #handleError(Exception)} * will be invoked. */ public interface Callback<T> { /** * Receives a callback result. * @param result the result returned in the callback. */ void handleResult(T result); /** * Receives an error. * @param error the error returned in the callback. */ void handleError(Throwable error); }
{ "pile_set_name": "Github" }
/* Copyright © 2001-2004 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. This work is distributed under the W3C® Software License [1] 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. [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 */ /** * Gets URI that identifies the test. * @return uri identifier of test */ function getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level1/html/HTMLElement101"; } var docsLoaded = -1000000; var builder = null; // // This function is called by the testing framework before // running the test suite. // // If there are no configuration exceptions, asynchronous // document loading is started. Otherwise, the status // is set to complete and the exception is immediately // raised when entering the body of the test. // function setUpPage() { setUpPageStatus = 'running'; try { // // creates test document builder, may throw exception // builder = createConfiguredBuilder(); docsLoaded = 0; var docRef = null; if (typeof(this.doc) != 'undefined') { docRef = this.doc; } docsLoaded += preload(docRef, "doc", "element"); if (docsLoaded == 1) { setUpPageStatus = 'complete'; } } catch(ex) { catchInitializationError(builder, ex); setUpPageStatus = 'complete'; } } // // This method is called on the completion of // each asychronous load started in setUpTests. // // When every synchronous loaded document has completed, // the page status is changed which allows the // body of the test to be executed. function loadComplete() { if (++docsLoaded == 1) { setUpPageStatus = 'complete'; } } /** * The dir attribute specifies the base direction of directionally neutral text and the directionality of tables. Retrieve the dir attribute of the EM element and examine its value. * @author NIST * @author Mary Brady * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740 */ function HTMLElement101() { var success; if(checkInitialization(builder, "HTMLElement101") != null) return; var nodeList; var testNode; var vdir; var doc; var docRef = null; if (typeof(this.doc) != 'undefined') { docRef = this.doc; } doc = load(docRef, "doc", "element"); nodeList = doc.getElementsByTagName("em"); assertSize("Asize",1,nodeList); testNode = nodeList.item(0); vdir = testNode.dir; assertEquals("dirLink","ltr",vdir); } function runTest() { HTMLElement101(); }
{ "pile_set_name": "Github" }
1 00:02:03,478 --> 00:02:06,478 ≪すみません。 (さくら)はい。 2 00:02:11,536 --> 00:02:14,536 (峰子)御代川と 申します。 3 00:02:16,524 --> 00:02:19,524 (さくら)さっきまで お嬢さん 来てたんですよ。 ここに。 4 00:02:25,516 --> 00:02:27,568 (さくら)ああ。 5 00:02:27,568 --> 00:02:29,520 (峰子)あのう。 (さくら)はい。 6 00:02:29,520 --> 00:02:31,522 (峰子)娘のクラスの 子供たちは? 7 00:02:31,522 --> 00:02:33,474 (さくら)今日は 来てませんよ。 8 00:02:33,474 --> 00:02:36,461 (峰子)じゃあ 何で 娘は ここに? 9 00:02:36,461 --> 00:02:39,480 (さくら)ただ 親子丼 食べに来ただけですよ。 10 00:02:39,480 --> 00:02:45,470 親子丼を? どうして? ああ。 さあ? 11 00:02:45,470 --> 00:02:47,472 (峰子)あの子ったら➡ 12 00:02:47,472 --> 00:02:50,491 どうして こんな 吹きだまりみたいなところに。 13 00:02:50,491 --> 00:02:52,477 吹きだまり? あの子から 聞いたんです。 14 00:02:52,477 --> 00:02:58,483 この辺の 不良とか 落ちこぼれが 集まる場所だって。 15 00:02:58,483 --> 00:03:04,489 (玄)吹きだまりだよ。 ここは 吹きだまりだよ。 16 00:03:04,489 --> 00:03:06,491 (峰子)えっ? (雅弘)ばばあ。➡ 17 00:03:06,491 --> 00:03:08,509 調子 乗ってんじゃねえぞ。 こら。 (峰子)ばばあ? 18 00:03:08,509 --> 00:03:10,511 (あざみ)すげえ ムカつくんだけど。 19 00:03:10,511 --> 00:03:12,497 (あざみ)この くそばばあ。 まあ 嫌ですわ。 20 00:03:12,497 --> 00:03:14,515 あざみちゃんったら。 冗談ばっかり 言っちゃってね。 21 00:03:14,515 --> 00:03:16,517 ≪(龍生・大樹・春彦)こんばんは! はい。 22 00:03:16,517 --> 00:03:19,487 (春彦)さくらさん。 聞いてよ。 御代川 最悪。 23 00:03:19,487 --> 00:03:21,539 御代川? (龍生)マジ くそだぜ。 御代川。 24 00:03:21,539 --> 00:03:24,525 (大樹)あいつ マジで アホ。 あれ? それ 何の話でしょう? 25 00:03:24,525 --> 00:03:27,512 (大樹)担任だよ。 俺たちの。 (春彦)あいつ 教師 失格じゃね? 26 00:03:27,512 --> 00:03:30,515 (龍生)首だよ。 首。 あの どブス。 (峰子)どブス? 27 00:03:30,515 --> 00:03:32,466 何を しゃべってんの? ねえねえ。 手 洗った? 28 00:03:32,466 --> 00:03:37,455 (由希)九十九堂に 行ったの? (峰子)ええ。 29 00:03:37,455 --> 00:03:42,460 (由希)どうして? (峰子)ちょっと 気になってね。➡ 30 00:03:42,460 --> 00:03:46,480 親子丼 食べてるそうね。 31 00:03:46,480 --> 00:03:49,467 (由希)クラスの生徒が 食べに 行ってるから➡ 32 00:03:49,467 --> 00:03:51,469 どんな感じか 確かめようと 思って。 33 00:03:51,469 --> 00:03:53,469 (峰子)そう。 34 00:03:56,490 --> 00:04:00,478 (峰子)もう 行っちゃ 駄目よ。 あそこには。 35 00:04:00,478 --> 00:04:06,478 分かったわね? (由希)はい。 36 00:04:08,486 --> 00:04:11,505 (由希)ママ。 (峰子)うん? 37 00:04:11,505 --> 00:04:15,509 トイレ 行っていい? (峰子)どうぞ。 38 00:04:15,509 --> 00:04:28,506 ♬~ 39 00:04:28,506 --> 00:04:30,506 (鍵を掛ける音) 40 00:04:37,465 --> 00:04:41,469 (俊太)ちわ! 鳥八っす! はい。 ご苦労さん。 41 00:04:41,469 --> 00:04:43,471 (俊太)冷蔵庫 入れとくよ。 ありがとね。 42 00:04:43,471 --> 00:04:45,456 いつも 悪いわね。 (俊太)いやいや いやいや。➡ 43 00:04:45,456 --> 00:04:47,475 大変でしょう。 44 00:04:47,475 --> 00:04:49,477 おっ? 何 これ? (俊太)あっ。 ちょっと。 駄目駄目。 45 00:04:49,477 --> 00:04:51,479 あら。 やだ。 俊太。 エッチな本でしょ? 46 00:04:51,479 --> 00:04:53,481 (俊太)いや。 違うって。 ちょっ ちょっ。 いいから。 47 00:04:53,481 --> 00:04:56,484 いいから いいから。 48 00:04:56,484 --> 00:05:00,471 あら。 これ 恭子んとこの 雑誌じゃない。 49 00:05:00,471 --> 00:05:04,471 (俊太)うん。 へえー。 50 00:05:14,468 --> 00:05:22,510 ハァー。 きつい話ね。 胸が 苦しくなるわ。 51 00:05:22,510 --> 00:05:35,439 ♬~ 52 00:05:35,439 --> 00:05:38,459 ≪(ドアの開く音) 53 00:05:38,459 --> 00:05:46,450 ♬~ 54 00:05:46,450 --> 00:05:48,436 リエ。 55 00:05:48,436 --> 00:05:59,463 ♬~ 56 00:05:59,463 --> 00:06:04,463 (リエ)うちさ どうしたらいい? 57 00:06:06,487 --> 00:06:10,491 (リエ)少年院 行って➡ 58 00:06:10,491 --> 00:06:14,512 あのことは もう 終わったんだと 思ってた。 59 00:06:14,512 --> 00:06:28,492 ♬~ 60 00:06:28,492 --> 00:06:30,511 (リエ)知らなかったんだよ。➡ 61 00:06:30,511 --> 00:06:35,433 相手の子が まだ こんなんだなんて。➡ 62 00:06:35,433 --> 00:06:40,433 もう 元気になって 普通にしてんだと 思ってた。 63 00:06:45,459 --> 00:06:50,498 リエの気持ち 分かるよ。 64 00:06:50,498 --> 00:06:53,467 (リエ)分かる? 分かる。 65 00:06:53,467 --> 00:06:56,487 (リエ)何が 分かんだよ? だから…。 66 00:06:56,487 --> 00:06:59,457 (リエ)終わってんなら 何で こんなん なってんだよ? 67 00:06:59,457 --> 00:07:01,475 (リエ)やっちまったもんは しょうがねえじゃねえか! 68 00:07:01,475 --> 00:07:03,477 リエ。 分かってんなら 何か 答えろよ。 69 00:07:03,477 --> 00:07:06,480 どうすりゃ いいんだよ! 70 00:07:06,480 --> 00:07:11,469 うちの気持ち 分かんねえくせに 言ってんじゃねえよ! 71 00:07:11,469 --> 00:07:13,471 リエ! 放せよ! 72 00:07:13,471 --> 00:07:16,471 やめろ。 やめろ…。 73 00:07:18,509 --> 00:07:20,509 分かるんだよ。 74 00:07:23,497 --> 00:07:29,497 うちの母親 人 殺したんだ。 75 00:07:33,424 --> 00:07:38,429 殺された人の家族 恨んでる。 76 00:07:38,429 --> 00:07:48,456 私の母親も。 私のことも。 77 00:07:48,456 --> 00:07:51,456 何で 生きてんだよって。 78 00:07:54,512 --> 00:08:03,454 だからさ 私は 絶対に➡ 79 00:08:03,454 --> 00:08:09,493 幸せになっちゃ いけないって そう 決めて 生きてきた。 80 00:08:09,493 --> 00:08:13,464 いつ 死んでも いいって。 81 00:08:13,464 --> 00:08:22,464 だから リエの気持ち 分かるんだよ。 82 00:08:32,416 --> 00:08:38,439 (玄)いらない色は ありません。 みんな 大事です。 83 00:08:38,439 --> 00:08:42,426 いらない色か…。 84 00:08:42,426 --> 00:08:46,426 あるんじゃない? いらない色って。 85 00:08:48,449 --> 00:08:50,449 ほら。 86 00:08:52,453 --> 00:08:55,453 例えば これ。 87 00:08:58,442 --> 00:09:05,442 塗っても 意味ないじゃん。 ねっ。 いらない色って あるんだよ。 88 00:09:10,471 --> 00:09:12,456 あっ…。 89 00:09:12,456 --> 00:09:21,465 (玄)いらない色は ありません。 みんな 大事です。 90 00:09:21,465 --> 00:09:24,468 みんな 大事か。 91 00:09:24,468 --> 00:09:26,468 (恭子)こんにちは。 92 00:09:28,489 --> 00:09:30,491 (恭子)正木リエの 居場所 教えてよ。 93 00:09:30,491 --> 00:09:32,409 知らない。 (恭子)待って。 94 00:09:32,409 --> 00:09:35,412 あんたさ リエに どうしろって いうんだよ? 95 00:09:35,412 --> 00:09:37,412 死ねとでも いうのかよ? 96 00:09:42,436 --> 00:09:45,436 待って。 (恭子)分かった。 97 00:09:48,442 --> 00:09:54,448 知ってても 教えないわよ。 あんな記事 見たら。 98 00:09:54,448 --> 00:09:58,435 (恭子)読んだんだ? うん。 99 00:09:58,435 --> 00:10:03,440 (恭子)どうだった? そうね…。 100 00:10:03,440 --> 00:10:08,445 私も あざみちゃんと 同じかな。 101 00:10:08,445 --> 00:10:10,464 いや。 恭子は➡ 102 00:10:10,464 --> 00:10:14,464 あの加害者の 女の子に どうしろって 言いたいの? 103 00:10:16,470 --> 00:10:20,470 (恭子)人生を懸けて 罪を 償うべきよ。 104 00:10:23,494 --> 00:10:27,494 今度の事件 取材してて 思ったの。 105 00:10:29,466 --> 00:10:35,466 「お兄ちゃんを 殺した女 今 何やってるんだろう?」って。 106 00:10:39,426 --> 00:10:45,432 (恭子)きっと 楽しく やってるんじゃないかなって。 107 00:10:45,432 --> 00:10:51,438 もしかして 再婚とかして 新しい家庭を 持って。 108 00:10:51,438 --> 00:10:55,442 あのときの 赤ちゃんだって もう 大きくなってるわよね。 109 00:10:55,442 --> 00:11:00,447 私 そんなの 絶対 許せない。 だからって➡ 110 00:11:00,447 --> 00:11:03,434 加害者を 不幸にする権利は 私たちには ないのよ。 111 00:11:03,434 --> 00:11:06,437 分かってるよ。 そんなこと。 112 00:11:06,437 --> 00:11:13,460 悠平の命を奪った 犯人は 許せないわよ。 113 00:11:13,460 --> 00:11:16,463 一生 許すこと ないと思う。 114 00:11:16,463 --> 00:11:26,463 だけどね 犯人を憎んで 生きていくのは 苦し過ぎるわ。 115 00:11:28,459 --> 00:11:35,466 だから 私は あの事件を 引きずって 生きるのは やめたの。 116 00:11:35,466 --> 00:11:38,466 じゃあ この部屋は 何? 117 00:11:41,488 --> 00:11:43,474 お母さんだって➡ 118 00:11:43,474 --> 00:11:46,474 めちゃくちゃ お兄ちゃんのこと 引きずってるじゃない。 119 00:11:48,495 --> 00:11:50,481 私だって➡ 120 00:11:50,481 --> 00:11:54,485 何度も お兄ちゃんのこと 忘れようとしたわ。 121 00:11:54,485 --> 00:12:01,475 小さいときから あの事件のこと 何度も 忘れようとしたの。 122 00:12:01,475 --> 00:12:10,517 でもね この家に 帰ってきて この部屋を 見ると➡ 123 00:12:10,517 --> 00:12:13,520 どうしても 忘れられなかった。 124 00:12:13,520 --> 00:12:21,528 この部屋 見るたびに 苦しかった。 125 00:12:21,528 --> 00:12:24,498 お母さんはさ➡ 126 00:12:24,498 --> 00:12:28,535 死んだ お兄ちゃんのことばっかり 見てたのよ。 127 00:12:28,535 --> 00:12:32,473 私のことなんか 何も 見てなかったじゃない。 128 00:12:32,473 --> 00:12:36,473 それが 嫌で お父さん 出てったんだよ。 129 00:12:41,465 --> 00:12:45,465 ごめん。 言い過ぎた。 130 00:12:49,506 --> 00:12:57,498 でも 私には 重過ぎるわ。 この部屋。 131 00:12:57,498 --> 00:13:15,498 ♬~ 132 00:13:35,452 --> 00:13:37,452 こんにちは。 133 00:15:42,462 --> 00:15:45,465 (由希)奇麗な お花ね。 玄さん。 134 00:15:45,465 --> 00:15:52,489 (玄)花。 花。 花。➡ 135 00:15:52,489 --> 00:15:58,489 花は 誰のために 咲きますか? 136 00:16:00,464 --> 00:16:03,464 誰のため…。 137 00:16:06,486 --> 00:16:11,491 お待ち遠さま。 (由希)ありがとうございます。➡ 138 00:16:11,491 --> 00:16:14,478 いただきます。 どうぞ。 139 00:16:14,478 --> 00:16:32,446 ♬~ 140 00:16:32,446 --> 00:16:34,431 (由希)ごちそうさまでした。➡ 141 00:16:34,431 --> 00:16:37,431 お手洗い お借りします。 142 00:16:42,422 --> 00:16:44,474 吐いちゃ 駄目。 143 00:16:44,474 --> 00:16:48,445 えっ? 駄目。 144 00:16:48,445 --> 00:16:52,449 どいてください。 駄目。 145 00:16:52,449 --> 00:16:55,469 (由希)どうして? 146 00:16:55,469 --> 00:17:03,477 花は 自分のために 咲くのよ。 お母さんのためじゃないわ。 147 00:17:03,477 --> 00:17:08,465 これ以上 自分を 傷つけちゃ 駄目。 148 00:17:08,465 --> 00:17:11,468 どいて。 駄目! 149 00:17:11,468 --> 00:17:14,488 (由希)どいてください! 我慢できるって。 150 00:17:14,488 --> 00:17:16,473 (俊太)さくらさん? 151 00:17:16,473 --> 00:17:18,475 (由希)ほっといて! (俊太)ちょっと。 どうしたの?➡ 152 00:17:18,475 --> 00:17:20,494 ちょっと。 何? 落ち着いて。 153 00:17:20,494 --> 00:17:23,494 あっ。 由希さん。 大丈夫? 154 00:17:27,501 --> 00:17:30,501 (俊太)どしたの? どしたの? 由希さん。 155 00:17:34,441 --> 00:17:36,443 (俊太)摂食障がい? うん。 156 00:17:36,443 --> 00:17:39,429 きっかけは 人それぞれみたいね。 157 00:17:39,429 --> 00:17:44,451 食べる快感で 嫌なことを 忘れる。 158 00:17:44,451 --> 00:17:48,438 吐く快感で その瞬間だけ ストレスを 忘れる。 159 00:17:48,438 --> 00:17:52,438 そうやって 自分を痛めつけて 壊そうとするのね。 160 00:17:54,461 --> 00:18:01,461 そうすることで 誰かの気を 引こうとするのかも。 161 00:18:07,457 --> 00:18:13,480 《花は 自分のために 咲くのよ。 お母さんのためじゃないわ》 162 00:18:13,480 --> 00:18:15,465 《これ以上 自分を 傷つけちゃ 駄目よ》 163 00:18:15,465 --> 00:18:17,467 (峰子)由希ちゃん? 由希ちゃん?➡ 164 00:18:17,467 --> 00:18:19,469 どうしたの? ぼうっとしちゃって。 165 00:18:19,469 --> 00:18:22,456 (由希)えっ? (峰子)何か あった? 166 00:18:22,456 --> 00:18:25,525 (由希)ううん。 (峰子)そういえば。➡ 167 00:18:25,525 --> 00:18:29,529 今日の授業中も 何か 元気 なかったわね。 168 00:18:29,529 --> 00:18:31,465 (由希)えっ? 169 00:18:31,465 --> 00:18:33,433 廊下から 見てたのよ。➡ 170 00:18:33,433 --> 00:18:37,421 校長先生に ご挨拶に 行ったついでに ちょっとだけね。 171 00:18:37,421 --> 00:18:40,457 校長先生に? 172 00:18:40,457 --> 00:18:43,427 (峰子)校長先生が 前に あなたに お話があるって 言ってたでしょ。 173 00:18:43,427 --> 00:18:46,430 (峰子)ママ。 ちょっと 気になっちゃってね。 174 00:18:46,430 --> 00:18:50,434 (由希)《お願い。 誰か 助けて》 175 00:18:50,434 --> 00:18:52,452 (峰子)でも 何にも 心配いらないわ。➡ 176 00:18:52,452 --> 00:18:55,455 子供たちなんてね ちょっとぐらい 怒鳴りつけたり➡ 177 00:18:55,455 --> 00:18:58,425 体罰が あるくらいで ちょうどいいの。➡ 178 00:18:58,425 --> 00:19:02,446 大丈夫だからね。 ママが ちゃんと フォローしておきました。 179 00:19:02,446 --> 00:19:05,449 (由希)《助けて》 180 00:19:05,449 --> 00:19:09,469 (峰子)駄目じゃないの。 修学旅行の積立金。➡ 181 00:19:09,469 --> 00:19:11,455 集金したら ちゃんと 経理に 渡しておかないと。➡ 182 00:19:11,455 --> 00:19:14,491 ママが お支払いしておきました。➡ 183 00:19:14,491 --> 00:19:18,478 じゃあ いただきましょうか。 いただき…。 184 00:19:18,478 --> 00:19:31,508 ♬~ 185 00:19:31,508 --> 00:19:46,423 ♬~ 186 00:19:46,423 --> 00:19:57,434 ♬~ 187 00:20:01,454 --> 00:20:03,456 (由希)ママ?➡ 188 00:20:03,456 --> 00:20:06,443 うん。 校長先生も 分かってくださったわ。➡ 189 00:20:06,443 --> 00:20:10,443 ママの おかげ。 ありがとう。 190 00:20:12,465 --> 00:20:15,435 (由希)ママ。 授業 始まっちゃうから。 191 00:20:15,435 --> 00:20:18,435 電話 切るね。 192 00:22:08,465 --> 00:22:11,484 (峰子)カードローン。➡ 193 00:22:11,484 --> 00:22:13,484 120万円!? 194 00:22:15,488 --> 00:22:18,475 ☎ 195 00:22:18,475 --> 00:22:21,494 (峰子)はい。 御代川でございます。 196 00:22:21,494 --> 00:22:24,497 ☎(松山)ニチマルローンの 松山と 申します。 197 00:22:24,497 --> 00:22:27,484 ニチマルローン? 198 00:22:27,484 --> 00:22:41,431 ♬~ 199 00:22:41,431 --> 00:22:58,465 ♬~ 200 00:22:58,465 --> 00:23:01,434 (由希)ただいま。 (峰子)座りなさい。 201 00:23:01,434 --> 00:23:03,434 (由希)はい。 202 00:23:13,496 --> 00:23:17,484 (峰子)これは 何?➡ 203 00:23:17,484 --> 00:23:24,491 120万も 銀行から借りて。 何に使ったの? あなた。 204 00:23:24,491 --> 00:23:31,481 大丈夫よ。 心配しないで。 ママ。 205 00:23:31,481 --> 00:23:33,416 (峰子)待ちなさい。➡ 206 00:23:33,416 --> 00:23:35,435 他の ローン会社からも 電話があったのよ。➡ 207 00:23:35,435 --> 00:23:39,456 由希ちゃん。 ママ 心配で 今日 学校に 電話したの。➡ 208 00:23:39,456 --> 00:23:41,424 そしたら あなた 学校 休んでるっていうじゃない。 209 00:23:41,424 --> 00:23:46,446 (由希)お願い。 私に 構わないで。 210 00:23:46,446 --> 00:23:50,446 (峰子)由希ちゃん? (由希)私の好きに させてよ! 211 00:23:52,452 --> 00:23:55,452 ≪(ドアの開閉音) 212 00:23:58,475 --> 00:24:01,461 無断欠勤? 由希先生が? 213 00:24:01,461 --> 00:24:04,464 (大樹)よく 分かんないけど ずっと 来ない。 214 00:24:04,464 --> 00:24:06,449 そう。 215 00:24:06,449 --> 00:24:08,468 (龍生)まっ その方が 平和で いいけどね。 216 00:24:08,468 --> 00:24:10,487 (春彦)このまま 来ないと 超 うれしいよな。 217 00:24:10,487 --> 00:24:13,456 (一同)いただきます。 218 00:24:13,456 --> 00:24:31,474 ♬~ 219 00:24:31,474 --> 00:24:33,426 (俊太)いつも ありがとうございます。 220 00:24:33,426 --> 00:24:38,426 (女性)ありがとう。 (俊太)また お願いします。 221 00:24:44,454 --> 00:24:47,440 よっ! 222 00:24:47,440 --> 00:24:49,426 (恭子)うん。 223 00:24:49,426 --> 00:24:51,444 (俊太)恭子ちゃんが 言いたいことは 分かるよ。➡ 224 00:24:51,444 --> 00:24:54,414 「人を 傷つけちゃったやつが 楽しく やってて➡ 225 00:24:54,414 --> 00:24:58,435 それで いいのか?」って。 だけどさ…。➡ 226 00:24:58,435 --> 00:25:00,453 だから どうしろっていうの?➡ 227 00:25:00,453 --> 00:25:02,439 その加害者の子を もっと 重い罪にすれば➡ 228 00:25:02,439 --> 00:25:05,442 それで いいのか? 死刑にするとか? 229 00:25:05,442 --> 00:25:09,462 みんな おんなじこと 言う。 230 00:25:09,462 --> 00:25:13,462 母さんも あの あざみって子も。 231 00:25:15,452 --> 00:25:22,492 (俊太)でも 恭子ちゃんの気持ち 俺は分かる。 232 00:25:22,492 --> 00:25:28,465 悠平のこと。 やっぱ 引きずっちゃうよ。 誰だって。 233 00:25:28,465 --> 00:25:41,478 ♬~ 234 00:25:41,478 --> 00:25:56,459 ♬~ 235 00:25:56,459 --> 00:25:58,428 (恭子)《お母さんはさ➡ 236 00:25:58,428 --> 00:26:02,448 死んだ お兄ちゃんのことばっかり 見てたのよ》➡ 237 00:26:02,448 --> 00:26:06,448 《私のことなんか 何も 見てなかったじゃない》 238 00:26:10,456 --> 00:26:12,425 ≪(ノック) ≪さくらさん? 239 00:26:12,425 --> 00:26:14,444 どうぞ。 240 00:26:14,444 --> 00:26:17,444 電話。 警察から。 241 00:26:21,467 --> 00:26:25,488 あのう。 どうして 私の名前を? 242 00:26:25,488 --> 00:26:29,459 (刑事)さあ? 九十九堂の さくらさんに 連絡してほしい。➡ 243 00:26:29,459 --> 00:26:32,478 それだけしか 言わんのです。 はあ。 244 00:26:32,478 --> 00:26:35,415 (刑事)最近 風営法に 違反する 行為をさせる➡ 245 00:26:35,415 --> 00:26:37,417 デリヘル業者が 増えてましてね。➡ 246 00:26:37,417 --> 00:26:41,404 そこで 摘発した中に 彼女が いたわけです。 247 00:26:41,404 --> 00:26:44,424 あっ。 あのう。 それで 彼女は? 248 00:26:44,424 --> 00:26:47,424 (刑事)今日のところは 証拠不十分と いうことで。 249 00:29:07,450 --> 00:29:13,473 (由希)母は 私を産んだ後に 体調 崩して➡ 250 00:29:13,473 --> 00:29:21,481 そのまま 教師を 辞めたんです。 お父さまは? 251 00:29:21,481 --> 00:29:27,487 ≪(由希)教師でしたけど 退職して トラックの運転手に。➡ 252 00:29:27,487 --> 00:29:31,474 保護者や 同僚との 人間関係が うまくいかなくて。 253 00:29:31,474 --> 00:29:40,474 だから 母は 私を どうしても 教師にしたかった。 254 00:29:43,436 --> 00:29:48,458 小さいころから ありと あらゆる 習い事を やらされてました。➡ 255 00:29:48,458 --> 00:29:54,447 分刻みの スケジュールで 毎日毎日 急いでいました。➡ 256 00:29:54,447 --> 00:29:58,434 雑踏の中を 何も考えず 何も見ず➡ 257 00:29:58,434 --> 00:30:02,438 ただ ひたすら 習い事を こなすために➡ 258 00:30:02,438 --> 00:30:05,441 私は 急いでいました。 259 00:30:05,441 --> 00:30:09,462 で ご飯は? どうしてたの? 260 00:30:09,462 --> 00:30:13,449 ほとんど コンビニの お弁当でした。 261 00:30:13,449 --> 00:30:16,436 それを 母と 2人で➡ 262 00:30:16,436 --> 00:30:20,436 夜の公園の ベンチとかに座って 食べました。 263 00:30:22,492 --> 00:30:31,492 気が付くと 母は 私の中に 完全に 忍び込んでいました。 264 00:30:35,404 --> 00:30:41,410 私の生活の 全てを 母が 決めていたんです。 265 00:30:41,410 --> 00:30:50,410 食べるもの。 着るもの。 読む本。 聴く音楽。 266 00:30:52,405 --> 00:30:55,441 そして 未来まで。 267 00:30:55,441 --> 00:30:57,460 (由希)《私 決めたの》➡ 268 00:30:57,460 --> 00:31:00,429 《大きくなったら イラストレーターになる》 269 00:31:00,429 --> 00:31:03,449 (峰子)《由希ちゃんは 学校の先生になるの》 270 00:31:03,449 --> 00:31:08,454 (由希)いつしか 私自身も➡ 271 00:31:08,454 --> 00:31:10,439 母の決めたとおりに していれば 安心と➡ 272 00:31:10,439 --> 00:31:13,439 思うように なっていたんです。 273 00:31:15,444 --> 00:31:25,444 だから トイレに行くことさえ 母に 決めてもらっていました。 274 00:31:27,507 --> 00:31:33,507 私は それが 母の愛だと思って 育った。 275 00:31:35,464 --> 00:31:38,484 母に言われたとおりの 大学に入り➡ 276 00:31:38,484 --> 00:31:43,489 言われたとおりに 教員になった。 277 00:31:43,489 --> 00:31:49,478 あるとき 母が 私を見て 言ったんです。 278 00:31:49,478 --> 00:31:54,483 (峰子)《由希ちゃん。 ちょっと 太ったんじゃない?》 279 00:31:54,483 --> 00:31:57,503 その 一言で ダイエットを 始めました。 280 00:31:57,503 --> 00:32:01,507 太ると 母に 叱られる。 281 00:32:01,507 --> 00:32:04,527 思ったとおり 体重は 落ちたけど➡ 282 00:32:04,527 --> 00:32:08,514 拒食症に なってました。 すると 今度は…。 283 00:32:08,514 --> 00:32:13,519 (峰子)《由希ちゃん。 大丈夫? そんなに 痩せて》 284 00:32:13,519 --> 00:32:17,540 《どこか 具合 悪いんじゃない?》 285 00:32:17,540 --> 00:32:23,496 母に 心配をかけては いけない。 太らなくては。 286 00:32:23,496 --> 00:32:29,496 今度は 食べて 食べて 食べまくりました。 287 00:32:33,472 --> 00:32:37,460 そして 食べ吐き…。 288 00:32:37,460 --> 00:32:41,480 そうすることで 安心感を 得ることが できたんです。 289 00:32:41,480 --> 00:32:45,468 どうしてだか 分かりません。 290 00:32:45,468 --> 00:32:49,468 もう 私が 私で なくなってしまったんです。 291 00:32:52,491 --> 00:32:56,479 私は ホントは…。 292 00:32:56,479 --> 00:33:00,499 教師になんか なりたくなかった。 293 00:33:00,499 --> 00:33:06,505 母は 私を支配し 私の人生に 乗り移ったんです。 294 00:33:06,505 --> 00:33:12,511 自分が挫折した 教師という夢を 私を使って 果たそうとした。 295 00:33:12,511 --> 00:33:14,511 だから…。 296 00:33:17,516 --> 00:33:23,516 だから 私は 母を裏切りたかった。 297 00:33:25,541 --> 00:33:28,511 あの人を 失望させたかった。 298 00:33:28,511 --> 00:33:31,530 だから 私は…。 もう いいわ。 299 00:33:31,530 --> 00:33:39,455 もう いい。 まだ あなた 若いんだから。 ねっ。 300 00:33:39,455 --> 00:33:42,455 これから やり直せるわよ。 301 00:33:47,463 --> 00:33:53,469 お母さんから 離れて 一人で やり直すの。 302 00:33:53,469 --> 00:33:56,469 母と? ええ。 303 00:34:00,459 --> 00:34:06,499 そんなの 無理です。 えっ? 304 00:34:06,499 --> 00:34:09,485 母が いないと 生きていけないんです。 305 00:34:09,485 --> 00:34:13,522 ねえ。 しっかりして。 由希さん。 306 00:34:21,530 --> 00:34:23,532 駄目。 出ちゃ。 でも…。 307 00:34:23,532 --> 00:34:25,501 今 お母さん 断ち切らないと➡ 308 00:34:25,501 --> 00:34:28,504 あなた 一生 人生 駄目になるわよ。 ねっ。 309 00:34:28,504 --> 00:34:30,523 返して! 駄目! 310 00:34:30,523 --> 00:34:32,441 返して! 311 00:34:32,441 --> 00:34:35,444 ちょっと 離して。 駄目! 312 00:34:39,465 --> 00:34:41,450 由希さん。 何…。 313 00:34:41,450 --> 00:34:45,471 助けて。 お願い。 314 00:35:14,500 --> 00:35:19,500 (由希)あざみちゃん。 何? 315 00:35:21,490 --> 00:35:25,490 あなたの お母さん。 どんな人? 316 00:35:29,498 --> 00:35:32,498 優しい人? 317 00:35:37,440 --> 00:35:44,480 <正直 言って 私は この人の 気持ちが よく 分からなかった> 318 00:35:44,480 --> 00:35:46,465 <だけど…> 319 00:35:46,465 --> 00:35:49,468 <下で 酔っぱらっている さくらさんの気持ちは➡ 320 00:35:49,468 --> 00:35:51,437 何となく 分かった> 321 00:35:51,437 --> 00:36:02,481 ♬「狭いながらも 楽しい 我が家」 322 00:36:02,481 --> 00:36:08,481 ♬「愛の火影の さすところ」 323 00:36:11,490 --> 00:36:18,481 ♬「恋しい家こそ」 324 00:36:18,481 --> 00:36:21,481 ♬「私の」 325 00:36:26,505 --> 00:36:31,494 (打つ音) 326 00:36:31,494 --> 00:36:46,458 ♬~ 327 00:36:46,458 --> 00:36:48,427 何 これ? 328 00:36:48,427 --> 00:36:50,429 ≪(チャイム) 329 00:36:50,429 --> 00:36:52,448 (峰子)由希ちゃん! 330 00:36:52,448 --> 00:36:54,466 突然 お邪魔して 申し訳ありません。 あのう。 331 00:36:54,466 --> 00:36:56,485 いいとこで 会った。 手伝って。 は… はい。 332 00:36:56,485 --> 00:36:58,454 (峰子)娘が 昨日から 帰ってこないんです。 333 00:36:58,454 --> 00:37:00,472 電話にも 全然 出てくれないし。 334 00:37:00,472 --> 00:37:02,474 どこか 立ち寄りそうなところ 捜してるんです。 335 00:37:02,474 --> 00:37:04,476 手伝ってください。 336 00:37:04,476 --> 00:37:12,468 ♬~ 337 00:37:12,468 --> 00:37:15,468 あのう。 これ。 338 00:37:17,489 --> 00:37:20,476 これ 幼稚園のときの 記録です。 339 00:37:20,476 --> 00:37:24,480 お友達の名前とか 電話番号とか あと 連絡網とか 捜してください。 340 00:37:24,480 --> 00:37:27,483 あのう。 お母さま。 実は…。 341 00:37:27,483 --> 00:37:30,502 私は 小学校時代を 捜しますから。 342 00:37:30,502 --> 00:37:41,447 ♬~ 343 00:37:41,447 --> 00:37:55,461 ♬~ 344 00:37:55,461 --> 00:38:01,467 (由希)《分刻みの スケジュールで 毎日毎日 急いでいました》 345 00:38:01,467 --> 00:38:08,440 ♬~ 346 00:38:08,440 --> 00:38:13,479 そっか。 そうだったのね。 347 00:38:13,479 --> 00:38:17,466 何か 分かりました? いえ。 348 00:38:17,466 --> 00:38:19,485 やっぱり 警察に 電話します。 349 00:38:19,485 --> 00:38:21,470 何か 事件に 巻き込まれたのかも しれない。 350 00:38:21,470 --> 00:38:23,472 あのう。 ごめんなさい。 351 00:38:23,472 --> 00:38:28,477 由希さん。 うちに いるんです。 352 00:38:28,477 --> 00:38:30,477 えっ!? 353 00:40:04,456 --> 00:40:07,459 (峰子)売春? ええ。 354 00:40:07,459 --> 00:40:15,451 嘘です。 あの子が そんな。 汚らわしい。 355 00:40:15,451 --> 00:40:19,455 そうね。 由希さんは 自分を 汚してしまったわ。 356 00:40:19,455 --> 00:40:23,459 何て バカなことを。 357 00:40:23,459 --> 00:40:26,462 でもね お母さん。 358 00:40:26,462 --> 00:40:31,467 そうさせてしまったのは あなたなんですよ。 359 00:40:31,467 --> 00:40:35,404 私が? 由希さんは➡ 360 00:40:35,404 --> 00:40:41,443 小さなときから 何でも あなたに 決められてきた。 361 00:40:41,443 --> 00:40:49,435 食べるもの。 着るもの。 トイレ。 そして 未来まで。 362 00:40:49,435 --> 00:40:52,438 それが 母親の愛って いうもんです。 363 00:40:52,438 --> 00:40:55,407 愛? 母親の愛は➡ 364 00:40:55,407 --> 00:40:58,410 子供にとって 空気みたいなもんなんです。 365 00:40:58,410 --> 00:41:02,464 目には 見えないけど いつでも 子供を包んで➡ 366 00:41:02,464 --> 00:41:05,434 なくては 生きては いけないようなものなんです。 367 00:41:05,434 --> 00:41:10,456 その空気が 濃過ぎたら 子供は 息が詰まるわ。 368 00:41:10,456 --> 00:41:13,459 息が詰まる? だから 由希さんは➡ 369 00:41:13,459 --> 00:41:18,447 食べては吐き 食べては吐き➡ 370 00:41:18,447 --> 00:41:21,467 そうやって 自分を 壊そうとしてるんです。 371 00:41:21,467 --> 00:41:24,486 あなたに 何が分かるの? 私と 由希ちゃんはね…。 372 00:41:24,486 --> 00:41:27,486 分かってないのは あなたでしょ! 373 00:41:32,478 --> 00:41:36,465 あなた 由希さんの手首に➡ 374 00:41:36,465 --> 00:41:42,488 一筋の傷痕が あるのは 知ってますか? 375 00:41:42,488 --> 00:41:44,488 傷? 376 00:41:46,508 --> 00:41:50,479 そんなに 古くない傷よ。 377 00:41:50,479 --> 00:41:53,482 まさか…。 あなた。 378 00:41:53,482 --> 00:41:57,486 ねえ? 由希さんの 何 見てきたの? 379 00:41:57,486 --> 00:42:00,506 あなたは 由希さんの全てを 知ってる。 380 00:42:00,506 --> 00:42:03,509 ありと あらゆることを 知ってる。 381 00:42:03,509 --> 00:42:09,498 こうやって 彼女の人生を 狭い部屋の中に 閉じ込めて➡ 382 00:42:09,498 --> 00:42:12,501 全てを 分かってるつもりでいる。 383 00:42:12,501 --> 00:42:19,491 でも 誰でも 気が付くような傷を あなた 見てない。 384 00:42:19,491 --> 00:42:25,514 そんな人間に 由希さんの 心の傷が 見えるはずが ないわ。 385 00:42:25,514 --> 00:42:32,454 何度も 死のうって 考えてたそうよ。 386 00:42:32,454 --> 00:42:34,473 でも 死ねなかった。 387 00:42:34,473 --> 00:42:39,461 だって そんなことしたら あなたが 悲しむから。 388 00:42:39,461 --> 00:42:42,464 「お母さんを 悲しませたくない」 389 00:42:42,464 --> 00:42:49,488 だから 由希さんは 必死で 生きてきたんです。 390 00:42:49,488 --> 00:42:54,476 死なないために。 自分を 死に追い込まないために。 391 00:42:54,476 --> 00:42:59,476 彼女は 摂食障がいに なったんです。 392 00:43:02,484 --> 00:43:05,521 あのう。 393 00:43:05,521 --> 00:43:08,521 これ 見てください。 394 00:43:13,529 --> 00:43:16,498 私の息子です。 395 00:43:16,498 --> 00:43:22,504 この写真を撮った 次の日に…。 もう。 死んじゃったんですよ。 396 00:43:22,504 --> 00:43:25,504 バイト先で 事件に遭ってね。 397 00:43:27,526 --> 00:43:32,526 明るくて 正義感の強い子でした。 398 00:43:36,451 --> 00:43:44,493 この子の部屋 16年前のまんまなんです。 399 00:43:44,493 --> 00:43:49,481 そうしておけば いつも 息子と 生きてるような気がして。 400 00:43:49,481 --> 00:43:56,471 いやぁ。 でも この前 娘に 言われちゃったんです。 401 00:43:56,471 --> 00:44:00,471 それが 自分には とっても 重かったって。 402 00:44:07,499 --> 00:44:13,488 私 息子から 巣立とうと 思います。 403 00:44:13,488 --> 00:44:20,529 巣立つ? よかったら 一緒に どうです? 404 00:44:20,529 --> 00:44:25,517 私も? はい。 405 00:44:25,517 --> 00:44:36,461 ♬~ 406 00:44:36,461 --> 00:44:40,465 (カヨ子・キミ子)ちょっと ちょっと…。 ちょっと待って。 407 00:44:40,465 --> 00:44:43,452 (キミ子)あの人 あれ 学校の先生よね?➡ 408 00:44:43,452 --> 00:44:45,470 いつか 補導に 来てたわよね? 409 00:44:45,470 --> 00:44:49,474 (カヨ子)朝から ずっと この家に いるわよね? どういうこと? 410 00:44:49,474 --> 00:44:53,474 うるせえ。 死ね。 この どブス。 411 00:44:56,481 --> 00:45:00,481 (由希)いただきます。 いただきます。 412 00:45:12,464 --> 00:45:14,499 これ…。 413 00:45:14,499 --> 00:45:19,504 何か いつもと 味が違う。 そう? 414 00:45:19,504 --> 00:45:23,504 いつもより 甘い。 そう? 415 00:45:27,496 --> 00:45:31,500 ずっと 疑問に思ってたの。 416 00:45:31,500 --> 00:45:37,456 何で 由希さん。 ここの親子丼 食べに来たのかって。 417 00:45:37,456 --> 00:45:44,463 初めは クラスの子供たちを 見張るためかなと 思った。 418 00:45:44,463 --> 00:45:48,463 その理由が やっと 分かったの。 419 00:45:55,440 --> 00:45:58,460 これ…。 420 00:45:58,460 --> 00:46:03,460 あなたの 子供のころの 予定表よ。 421 00:46:05,467 --> 00:46:14,509 ホント 毎日毎日 過密スケジュールだったわね。 422 00:46:14,509 --> 00:46:20,509 でもね ここ。 見て。 423 00:46:22,484 --> 00:46:26,488 毎日 習い事で 晩ご飯は コンビニ弁当だったけど➡ 424 00:46:26,488 --> 00:46:30,509 水曜の夜だけは 塾に行くまでに 時間があって➡ 425 00:46:30,509 --> 00:46:34,446 おうちで 晩ご飯 食べてたの。 426 00:46:34,446 --> 00:46:40,446 その ご飯が いつも 親子丼だった。 427 00:46:42,437 --> 00:46:45,424 お母さん 言ってたわ。 428 00:46:45,424 --> 00:46:52,464 短い時間で 作れるから いつも 親子丼にしてたって。 429 00:46:52,464 --> 00:46:54,464 母が? 430 00:46:56,468 --> 00:47:06,478 週に一度の お母さんの味。 それが 親子丼だったのね。 431 00:47:06,478 --> 00:47:10,478 あなたは それが とっても 楽しみだった。 432 00:47:18,490 --> 00:47:23,478 あのう。 もしかして これ…。 433 00:47:23,478 --> 00:47:29,468 お母さんに 作り方 教わったの。 どう? 434 00:47:29,468 --> 00:47:46,468 ♬~ 435 00:47:46,468 --> 00:48:01,466 ♬~ 436 00:48:01,466 --> 00:48:08,466 母の味です。 あのときの 母の。 437 00:48:12,444 --> 00:48:14,479 (由希)《おいしい》 438 00:48:14,479 --> 00:48:29,477 ♬~ 439 00:48:29,477 --> 00:48:32,430 ≪ゆっくり食べて ゆっくり。 ≪(由希)はい。 440 00:48:32,430 --> 00:48:46,411 ♬~ 441 00:48:46,411 --> 00:49:01,459 ♬~ 442 00:49:01,459 --> 00:49:15,490 ♬~ 443 00:49:15,490 --> 00:49:20,490 これで 最後だけど。 ありがとう。 444 00:49:23,465 --> 00:49:28,465 ホントに いいの? お願い。 445 00:50:03,438 --> 00:50:05,457 さくらさん。 446 00:50:05,457 --> 00:50:14,466 ♬~ 447 00:50:14,466 --> 00:50:16,466 来たわね。 448 00:50:18,470 --> 00:50:20,470 大丈夫? 449 00:50:22,457 --> 00:50:24,476 たぶん。 450 00:50:24,476 --> 00:50:35,420 ♬~ 451 00:50:35,420 --> 00:50:42,460 <2人の母親は 何も話さずに ずっと 炎を見ていた> 452 00:50:42,460 --> 00:50:47,432 <子供から 離れることは とても 難しい> 453 00:50:47,432 --> 00:50:51,432 <母親にとって 一番の試練なのかもしれない> 454 00:50:55,440 --> 00:51:00,440 <私の母親は どうだったのだろう?> 455 00:51:02,430 --> 00:51:07,452 <由希さんが 家に帰ると お母さんは いなかった> 456 00:51:07,452 --> 00:51:13,458 <「お父さんと 2人で 古里の新潟で 暮らす」> 457 00:51:13,458 --> 00:51:17,462 <そんな 書き置きが あったそうだ> 458 00:51:17,462 --> 00:51:20,465 <由希さんは 教師を辞めて➡ 459 00:51:20,465 --> 00:51:25,470 小さいころの夢だった イラストレーターを 目指すらしい> 460 00:51:25,470 --> 00:51:41,469 ♬~ 461 00:51:41,469 --> 00:51:47,469 ♬~
{ "pile_set_name": "Github" }
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package release import ( "context" "os" "os/user" "path/filepath" "strings" "cloud.google.com/go/storage" "github.com/pkg/errors" "github.com/sirupsen/logrus" "k8s.io/release/pkg/gcp/gcs" "k8s.io/release/pkg/util" "k8s.io/utils/pointer" ) // PushBuild is the main structure for pushing builds. type PushBuild struct { opts *PushBuildOptions } // PushBuildOptions are the main options to pass to `PushBuild`. type PushBuildOptions struct { // Specify an alternate bucket for pushes (normally 'devel' or 'ci'). Bucket string // Specify an alternate build directory (defaults to '_output'). BuildDir string // If set, push docker images to specified registry/project. DockerRegistry string // Comma separated list which can be used to upload additional version // files to GCS. The path is relative and is append to a GCS path. (--ci // only). ExtraVersionMarkers string // Specify a suffix to append to the upload destination on GCS. GCSSuffix string // Specify an alternate bucket for pushes (normally 'devel' or 'ci'). ReleaseType string // Append suffix to version name if set. VersionSuffix string // Do not exit error if the build already exists on the gcs path. AllowDup bool // Used when called from Jenkins (for ci runs). CI bool // Do not update the latest file. NoUpdateLatest bool // Do not mark published bits on GCS as publicly readable. PrivateBucket bool // Specifies a fast build (linux amd64 only). Fast bool // Specifies if we should push to the bucket or the user suffixed one. NoMock bool } type stageFile struct { srcPath string dstPath string required bool } var gcpStageFiles = []stageFile{ { srcPath: filepath.Join(GCEPath, "configure-vm.sh"), dstPath: filepath.Join(GCSStagePath, "extra/gce"), required: false, }, { srcPath: filepath.Join(GCIPath, "node.yaml"), dstPath: filepath.Join(GCSStagePath, "extra/gce"), required: true, }, { srcPath: filepath.Join(GCIPath, "master.yaml"), dstPath: filepath.Join(GCSStagePath, "extra/gce"), required: true, }, { srcPath: filepath.Join(GCIPath, "configure.sh"), dstPath: filepath.Join(GCSStagePath, "extra/gce"), required: true, }, { srcPath: filepath.Join(GCIPath, "shutdown.sh"), dstPath: filepath.Join(GCSStagePath, "extra/gce"), required: false, }, } var windowsStageFiles = []stageFile{ { srcPath: filepath.Join(WindowsLocalPath, "configure.ps1"), dstPath: WindowsGCSPath, required: true, }, { srcPath: filepath.Join(WindowsLocalPath, "common.psm1"), dstPath: WindowsGCSPath, required: true, }, { srcPath: filepath.Join(WindowsLocalPath, "k8s-node-setup.psm1"), dstPath: WindowsGCSPath, required: true, }, { srcPath: filepath.Join(WindowsLocalPath, "testonly/install-ssh.psm1"), dstPath: WindowsGCSPath, required: true, }, { srcPath: filepath.Join(WindowsLocalPath, "testonly/user-profile.psm1"), dstPath: WindowsGCSPath, required: true, }, } // NewPushBuild can be used to create a new PushBuild instnace. func NewPushBuild(opts *PushBuildOptions) *PushBuild { return &PushBuild{opts} } // Push pushes the build by taking the internal options into account. func (p *PushBuild) Push() error { var latest string // Check if latest build uses bazel dir, err := os.Getwd() if err != nil { return errors.Wrap(err, "get working directory") } isBazel, err := BuiltWithBazel(dir) if err != nil { return errors.Wrap(err, "identify if release built with Bazel") } if isBazel { logrus.Info("Using Bazel build version") version, err := ReadBazelVersion(dir) if err != nil { return errors.Wrap(err, "read Bazel build version") } latest = version } else { logrus.Info("Using Dockerized build version") version, err := ReadDockerizedVersion(dir) if err != nil { return errors.Wrap(err, "read Dockerized build version") } latest = version } logrus.Infof("Found build version: %s", latest) valid, err := IsValidReleaseBuild(latest) if err != nil { return errors.Wrap(err, "determine if release build version is valid") } if !valid { return errors.Errorf("build version %s is not valid for release", latest) } if p.opts.CI && IsDirtyBuild(latest) { return errors.New("refusing to push dirty build with --ci flag given") } if p.opts.VersionSuffix != "" { latest += "-" + p.opts.VersionSuffix } logrus.Infof("Latest version is %s", latest) releaseBucket := p.opts.Bucket if p.opts.NoMock { logrus.Infof("Running a *REAL* push with bucket %s", releaseBucket) } else { u, err := user.Current() if err != nil { return errors.Wrap(err, "identify current user") } releaseBucket += "-" + u.Username } client, err := storage.NewClient(context.Background()) if err != nil { return errors.Wrap(err, "fetching gcloud credentials, try running \"gcloud auth application-default login\"") } bucket := client.Bucket(releaseBucket) if bucket == nil { return errors.Errorf( "identify specified bucket for artifacts: %s", releaseBucket, ) } // Check if bucket exists and user has permissions requiredGCSPerms := []string{"storage.objects.create"} perms, err := bucket.IAM().TestPermissions( context.Background(), requiredGCSPerms, ) if err != nil { return errors.Wrap(err, "find release artifact bucket") } if len(perms) != 1 { return errors.Errorf( "GCP user must have at least %s permissions on bucket %s", requiredGCSPerms, releaseBucket, ) } buildDir := p.opts.BuildDir if err = util.RemoveAndReplaceDir( filepath.Join(buildDir, GCSStagePath), ); err != nil { return errors.Wrap(err, "remove and replace GCS staging directory") } // Copy release tarballs to local GCS staging directory for push if err = util.CopyDirContentsLocal( filepath.Join(buildDir, ReleaseTarsPath), filepath.Join(buildDir, GCSStagePath), ); err != nil { return errors.Wrap(err, "copy source directory into destination") } // Copy helpful GCP scripts to local GCS staging directory for push for _, file := range gcpStageFiles { if err := util.CopyFileLocal( filepath.Join(buildDir, file.srcPath), filepath.Join(buildDir, file.dstPath), file.required, ); err != nil { return errors.Wrap(err, "copy GCP stage files") } } // Copy helpful Windows scripts to local GCS staging directory for push for _, file := range windowsStageFiles { if err := util.CopyFileLocal( filepath.Join(buildDir, file.srcPath), filepath.Join(buildDir, file.dstPath), file.required, ); err != nil { return errors.Wrap(err, "copy Windows stage files") } } // Copy the "naked" binaries to GCS. This is useful for install scripts // that download the binaries directly and don't need tars. if err := CopyBinaries( filepath.Join(buildDir, ReleaseStagePath), ); err != nil { return errors.Wrap(err, "stage binaries") } // Write the release checksums gcsStagePath := filepath.Join(buildDir, GCSStagePath, latest) if err := WriteChecksums(gcsStagePath); err != nil { return errors.Wrap(err, "write checksums") } // Publish container images gcsDest := p.opts.ReleaseType if p.opts.CI { gcsDest = "ci" } gcsDest += p.opts.GCSSuffix if p.opts.Fast { gcsDest = filepath.Join(gcsDest, "fast") } logrus.Infof("GCS destination is %s", gcsDest) copyOpts := gcs.DefaultGCSCopyOptions copyOpts.NoClobber = pointer.BoolPtr(p.opts.AllowDup) if err := gcs.CopyToGCS( gcsStagePath, filepath.Join(releaseBucket, gcsDest, latest), copyOpts, ); err != nil { return errors.Wrap(err, "copy artifacts to GCS") } if p.opts.DockerRegistry != "" { if err := NewImages().Publish( p.opts.DockerRegistry, strings.ReplaceAll(latest, "+", "_"), buildDir, ); err != nil { return errors.Wrap(err, "publish container images") } } if !p.opts.CI { logrus.Info("No CI flag set, we're done") return nil } // Publish release to GCS versionMarkers := strings.Split(p.opts.ExtraVersionMarkers, ",") if err := NewPublisher().PublishVersion( gcsDest, latest, buildDir, releaseBucket, versionMarkers, p.opts.PrivateBucket, p.opts.NoMock, ); err != nil { return errors.Wrap(err, "publish release") } return nil }
{ "pile_set_name": "Github" }
{ "id": "overlay_male_worn_glasses_eye", "fg": ["glasses_eye_m"], "bg": [] }
{ "pile_set_name": "Github" }
# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_python_devel.html # =========================================================================== # # SYNOPSIS # # AX_PYTHON_DEVEL([version]) # # DESCRIPTION # # Note: Defines as a precious variable "PYTHON_VERSION". Don't override it # in your configure.ac. # # This macro checks for Python and tries to get the include path to # 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) # output variables. It also exports $(PYTHON_EXTRA_LIBS) and # $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. # # You can search for some particular version of Python by passing a # parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please # note that you *have* to pass also an operator along with the version to # match, and pay special attention to the single quotes surrounding the # version number. Don't use "PYTHON_VERSION" for this: that environment # variable is declared as precious and thus reserved for the end-user. # # This macro should work for all versions of Python >= 2.1.0. As an end # user, you can disable the check for the python version by setting the # PYTHON_NOVERSIONCHECK environment variable to something else than the # empty string. # # If you need to use this macro for an older Python version, please # contact the authors. We're always open for feedback. # # LICENSE # # Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de> # Copyright (c) 2009 Alan W. Irwin # Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net> # Copyright (c) 2009 Andrew Collier # Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org> # Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org> # Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 17 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ # # Allow the use of a (user set) custom python version # AC_ARG_VAR([PYTHON_VERSION],[The installed Python version to use, for example '2.3'. This string will be appended to the Python interpreter canonical name.]) AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) PYTHON_VERSION="" fi # # Check for a version of Python >= 2.1.0 # AC_MSG_CHECKING([for a version of Python >= '2.1.0']) ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[[0]]; \ print (ver >= '2.1.0')"` if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then AC_MSG_RESULT([no]) AC_MSG_FAILURE([ This version of the AC@&t@_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. ]) else AC_MSG_RESULT([skip at user request]) fi else AC_MSG_RESULT([yes]) fi # # if the macro parameter ``version'' is set, honour it # if test -n "$1"; then AC_MSG_CHECKING([for a version of Python $1]) ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[[0]]; \ print (ver $1)"` if test "$ac_supports_python_ver" = "True"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([this package requires Python $1. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference. ]) PYTHON_VERSION="" fi fi # # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` if test -z "$ac_distutils_result"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot import Python module "distutils". Please check your Python installation. The error was: $ac_distutils_result]) PYTHON_VERSION="" fi # # Check for Python include path # AC_MSG_CHECKING([for Python include path]) if test -z "$PYTHON_CPPFLAGS"; then python_path=`$PYTHON -c "import distutils.sysconfig; \ print (distutils.sysconfig.get_python_inc ());"` plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ print (distutils.sysconfig.get_python_inc (plat_specific=1));"` if test -n "${python_path}"; then if test "${plat_python_path}" != "${python_path}"; then python_path="-I$python_path -I$plat_python_path" else python_path="-I$python_path" fi fi PYTHON_CPPFLAGS=$python_path fi AC_MSG_RESULT([$PYTHON_CPPFLAGS]) AC_SUBST([PYTHON_CPPFLAGS]) # # Check for Python library path # AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) ac_python_version=`cat<<EOD | $PYTHON - # join all versioning strings, on some systems # major/minor numbers could be in different list elements from distutils.sysconfig import * e = get_config_var('VERSION') if e is not None: print(e) EOD` if test -z "$ac_python_version"; then if test -n "$PYTHON_VERSION"; then ac_python_version=$PYTHON_VERSION else ac_python_version=`$PYTHON -c "import sys; \ print (sys.version[[:3]])"` fi fi # Make the versioning information available to the compiler AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"], [If available, contains the Python version number currently in use.]) # First, the library directory: ac_python_libdir=`cat<<EOD | $PYTHON - # There should be only one import distutils.sysconfig e = distutils.sysconfig.get_config_var('LIBDIR') if e is not None: print (e) EOD` # Now, for the library: ac_python_library=`cat<<EOD | $PYTHON - import distutils.sysconfig c = distutils.sysconfig.get_config_vars() if 'LDVERSION' in c: print ('python'+c[['LDVERSION']]) else: print ('python'+c[['VERSION']]) EOD` # This small piece shamelessly adapted from PostgreSQL python macro; # credits goes to momjian, I think. I'd like to put the right name # in the credits, if someone can point me in the right direction... ? # if test -n "$ac_python_libdir" -a -n "$ac_python_library" then # use the official shared library ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"` PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library" else # old way: use libpython from python_configdir ac_python_libdir=`$PYTHON -c \ "from distutils.sysconfig import get_python_lib as f; \ import os; \ print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version" fi if test -z "PYTHON_LDFLAGS"; then AC_MSG_ERROR([ Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand. ]) fi fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) # # Check for site packages # AC_MSG_CHECKING([for Python site-packages path]) if test -z "$PYTHON_SITE_PKG"; then PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ print (distutils.sysconfig.get_python_lib(0,0));"` fi AC_MSG_RESULT([$PYTHON_SITE_PKG]) AC_SUBST([PYTHON_SITE_PKG]) # # libraries which must be linked in when embedding # AC_MSG_CHECKING(python extra libraries) if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` fi AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) AC_SUBST(PYTHON_EXTRA_LIBS) # # linking flags needed when embedding # AC_MSG_CHECKING(python extra linking flags) if test -z "$PYTHON_EXTRA_LDFLAGS"; then PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ print (conf('LINKFORSHARED'))"` fi AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) AC_SUBST(PYTHON_EXTRA_LDFLAGS) # # final check to see if everything compiles alright # AC_MSG_CHECKING([consistency of all components of python development environment]) # save current global flags ac_save_LIBS="$LIBS" ac_save_CPPFLAGS="$CPPFLAGS" LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" AC_LANG_PUSH([C]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([[#include <Python.h>]], [[Py_Initialize();]]) ],[pythonexists=yes],[pythonexists=no]) AC_LANG_POP([C]) # turn back to default flags CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" AC_MSG_RESULT([$pythonexists]) if test ! "x$pythonexists" = "xyes"; then AC_MSG_FAILURE([ Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LDFLAGS environment variable. Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" ============================================================================ ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. ============================================================================ ]) PYTHON_VERSION="" fi # # all done! # ])
{ "pile_set_name": "Github" }
CREATE TABLE fruits ( id int, items jsonb ); INSERT INTO fruits VALUES (1, '{"apple": true}'); INSERT INTO fruits VALUES (2, '{"banana": false}'); INSERT INTO fruits VALUES (3, '{"peach": true}'); SET enable_seqscan = on; SET enable_indexscan = off; SET enable_bitmapscan = off; SELECT id, items FROM fruits WHERE items &` 'boolean == true' ORDER BY id; id | items ----+----------------- 1 | {"apple": true} 3 | {"peach": true} (2 rows) DROP TABLE fruits;
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: org.springframework:spring-beans:4.1.7.RELEASE"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.1.7.RELEASE/spring-beans-4.1.7.RELEASE.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.1.7.RELEASE/spring-beans-4.1.7.RELEASE-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.1.7.RELEASE/spring-beans-4.1.7.RELEASE-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Tools; using LocalizableStrings = Microsoft.DotNet.Tools.Sln.LocalizableStrings; namespace Microsoft.DotNet.Cli { internal static class SlnCommandParser { public static Command Sln() => Create.Command( "sln", LocalizableStrings.AppFullName, Accept.ExactlyOneArgument() .DefaultToCurrentDirectory() .With(name: LocalizableStrings.SolutionArgumentName, description: LocalizableStrings.SolutionArgumentDescription), CommonOptions.HelpOption(), SlnAddParser.SlnAdd(), SlnListParser.SlnList(), SlnRemoveParser.SlnRemove()); } }
{ "pile_set_name": "Github" }
Ext.Loader.setConfig({enabled: true}); Ext.Loader.setPath('Ext.ux', '../ux/'); Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.grid.plugin.BufferedRenderer', 'Ext.ux.form.SearchField' ]); Ext.onReady(function(){ Ext.define('ForumThread', { extend: 'Ext.data.Model', fields: [{ name: 'title', mapping: 'topic_title' }, { name: 'forumtitle', mapping: 'forum_title' }, { name: 'forumid', type: 'int' }, { name: 'username', mapping: 'author' }, { name: 'replycount', mapping: 'reply_count', type: 'int' }, { name: 'lastpost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp' }, 'lastposter', 'excerpt', 'topic_id' ], idProperty: 'post_id' }); // create the Data Store var store = Ext.create('Ext.data.Store', { id: 'store', model: 'ForumThread', // allow the grid to interact with the paging scroller by buffering buffered: true, // The topics-remote.php script appears to be hardcoded to use 50, and ignores this parameter, so we // are forced to use 50 here instead of a possibly more efficient value. pageSize: 50, // This web service seems slow, so keep lots of data in the pipeline ahead! leadingBufferZone: 1000, proxy: { // load using script tags for cross domain, if the data in on the same domain as // this page, an HttpProxy would be better type: 'jsonp', url: 'http://www.sencha.com/forum/topics-remote.php', reader: { root: 'topics', totalProperty: 'totalCount' }, // sends single sort as multi parameter simpleSortMode: true, // Parameter name to send filtering information in filterParam: 'query', // The PHP script just use query=<whatever> encodeFilters: function(filters) { return filters[0].value; } }, listeners: { totalcountchange: onStoreSizeChange }, remoteFilter: true, autoLoad: true }); function onStoreSizeChange() { grid.down('#status').update({count: store.getTotalCount()}); } function renderTopic(value, p, record) { return Ext.String.format( '<a href="http://sencha.com/forum/showthread.php?p={1}" target="_blank">{0}</a>', value, record.getId() ); } var grid = Ext.create('Ext.grid.Panel', { width: 700, height: 500, collapsible: true, title: 'ExtJS.com - Browse Forums', store: store, loadMask: true, dockedItems: [{ dock: 'top', xtype: 'toolbar', items: [{ width: 400, fieldLabel: 'Search', labelWidth: 50, xtype: 'searchfield', store: store }, '->', { xtype: 'component', itemId: 'status', tpl: 'Matching threads: {count}', style: 'margin-right:5px' }] }], selModel: { pruneRemoved: false }, multiSelect: true, viewConfig: { trackOver: false, emptyText: '<h1 style="margin:20px">No matching results</h1>' }, // grid columns columns:[{ xtype: 'rownumberer', width: 50, sortable: false },{ tdCls: 'x-grid-cell-topic', text: "Topic", dataIndex: 'title', flex: 1, renderer: renderTopic, sortable: false },{ text: "Author", dataIndex: 'username', width: 100, hidden: true, sortable: false },{ text: "Replies", dataIndex: 'replycount', align: 'center', width: 70, sortable: false },{ id: 'last', text: "Last Post", dataIndex: 'lastpost', width: 130, renderer: Ext.util.Format.dateRenderer('n/j/Y g:i A'), sortable: false }], renderTo: Ext.getBody() }); });
{ "pile_set_name": "Github" }
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.firebase.crashlytics.internal.unity; public interface UnityVersionProvider { /** * Get the Crashlytics Unity package version. * * @return {@link String} Crashlytics Unity package version if available, or <code>null</code> if * the Crashlytics Unity package is not installed. */ String getUnityVersion(); }
{ "pile_set_name": "Github" }