text
stringlengths
2
99k
meta
dict
/******************************************************************************* * This file is part of OpenNMS(R). * * Copyright (C) 2009-2014 The OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc. * * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. * * OpenNMS(R) is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, * or (at your option) any later version. * * OpenNMS(R) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with OpenNMS(R). If not, see: * http://www.gnu.org/licenses/ * * For more information contact: * OpenNMS(R) Licensing <license@opennms.org> * http://www.opennms.org/ * http://www.opennms.com/ *******************************************************************************/ package org.opennms.web.controller.outage; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.opennms.core.utils.WebSecurityUtils; import org.opennms.web.filter.Filter; import org.opennms.web.outage.Outage; import org.opennms.web.outage.SortStyle; import org.opennms.web.outage.WebOutageRepository; import org.opennms.web.outage.filter.NodeFilter; import org.opennms.web.outage.filter.OutageCriteria; import org.opennms.web.outage.filter.PerspectiveLocationFilter; import org.opennms.web.outage.filter.RecentOutagesFilter; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; /** * <p>NodeOutagesController class.</p> * * @author ranger * @version $Id: $ * @since 1.8.1 */ public class NodeOutagesController extends AbstractController implements InitializingBean { private String m_successView; private WebOutageRepository m_webOutageRepository; /** {@inheritDoc} */ @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { String nodeIdString = request.getParameter("node"); int nodeId = -1; if (nodeIdString != null ) nodeId = WebSecurityUtils.safeParseInt(nodeIdString); Outage[] outages = new Outage[0]; if (nodeId > 0) { List<Filter> filters = new ArrayList<>(); filters.add(new NodeFilter(nodeId, getServletContext())); filters.add(new RecentOutagesFilter()); filters.add(new PerspectiveLocationFilter(null)); OutageCriteria criteria = new OutageCriteria(filters.toArray(new Filter[0]), SortStyle.ID, null, -1, -1); outages = m_webOutageRepository.getMatchingOutages(criteria); } ModelAndView modelAndView = new ModelAndView(getSuccessView()); modelAndView.addObject("nodeId", nodeId); modelAndView.addObject("outages", outages); return modelAndView; } /** * <p>afterPropertiesSet</p> * * @throws java.lang.Exception if any. */ @Override public void afterPropertiesSet() throws Exception { Assert.notNull(m_successView, "property successView must be set"); Assert.notNull(m_webOutageRepository, "webOutageRepository must be set"); } private String getSuccessView() { return m_successView; } /** * <p>setSuccessView</p> * * @param successView a {@link java.lang.String} object. */ public void setSuccessView(String successView) { m_successView = successView; } /** * <p>setWebOutageRepository</p> * * @param webOutageRepository a {@link org.opennms.web.outage.WebOutageRepository} object. */ public void setWebOutageRepository(WebOutageRepository webOutageRepository) { m_webOutageRepository = webOutageRepository; } }
{ "pile_set_name": "Github" }
/******************************************************************** * 2014 - * open source under Apache License Version 2.0 ********************************************************************/ /** * 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. */ #ifndef _HDFS_LIBHDFS3_CLIENT_TOKEN_H_ #define _HDFS_LIBHDFS3_CLIENT_TOKEN_H_ #include <string> namespace Hdfs { namespace Internal { class Token { public: const std::string & getIdentifier() const { return identifier; } void setIdentifier(const std::string & identifier) { this->identifier = identifier; } const std::string & getKind() const { return kind; } void setKind(const std::string & kind) { this->kind = kind; } const std::string & getPassword() const { return password; } void setPassword(const std::string & password) { this->password = password; } const std::string & getService() const { return service; } void setService(const std::string & service) { this->service = service; } bool operator ==(const Token & other) const { return identifier == other.identifier && password == other.password && kind == other.kind && service == other.service; } std::string toString() const; Token & fromString(const std::string & str); size_t hash_value() const; private: std::string identifier; std::string password; std::string kind; std::string service; }; } } #endif /* _HDFS_LIBHDFS3_CLIENT_TOKEN_H_ */
{ "pile_set_name": "Github" }
/* * UVD_6_0 Register documentation * * Copyright (C) 2014 Advanced Micro Devices, Inc. * * 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 COPYRIGHT HOLDER(S) 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. */ #ifndef UVD_6_0_ENUM_H #define UVD_6_0_ENUM_H typedef enum UVDFirmwareCommand { UVDFC_FENCE = 0x0, UVDFC_TRAP = 0x1, UVDFC_DECODED_ADDR = 0x2, UVDFC_MBLOCK_ADDR = 0x3, UVDFC_ITBUF_ADDR = 0x4, UVDFC_DISPLAY_ADDR = 0x5, UVDFC_EOD = 0x6, UVDFC_DISPLAY_PITCH = 0x7, UVDFC_DISPLAY_TILING = 0x8, UVDFC_BITSTREAM_ADDR = 0x9, UVDFC_BITSTREAM_SIZE = 0xa, } UVDFirmwareCommand; typedef enum DebugBlockId { DBG_BLOCK_ID_RESERVED = 0x0, DBG_BLOCK_ID_DBG = 0x1, DBG_BLOCK_ID_VMC = 0x2, DBG_BLOCK_ID_PDMA = 0x3, DBG_BLOCK_ID_CG = 0x4, DBG_BLOCK_ID_SRBM = 0x5, DBG_BLOCK_ID_GRBM = 0x6, DBG_BLOCK_ID_RLC = 0x7, DBG_BLOCK_ID_CSC = 0x8, DBG_BLOCK_ID_SEM = 0x9, DBG_BLOCK_ID_IH = 0xa, DBG_BLOCK_ID_SC = 0xb, DBG_BLOCK_ID_SQ = 0xc, DBG_BLOCK_ID_UVDU = 0xd, DBG_BLOCK_ID_SQA = 0xe, DBG_BLOCK_ID_SDMA0 = 0xf, DBG_BLOCK_ID_SDMA1 = 0x10, DBG_BLOCK_ID_SPIM = 0x11, DBG_BLOCK_ID_GDS = 0x12, DBG_BLOCK_ID_VC0 = 0x13, DBG_BLOCK_ID_VC1 = 0x14, DBG_BLOCK_ID_PA0 = 0x15, DBG_BLOCK_ID_PA1 = 0x16, DBG_BLOCK_ID_CP0 = 0x17, DBG_BLOCK_ID_CP1 = 0x18, DBG_BLOCK_ID_CP2 = 0x19, DBG_BLOCK_ID_XBR = 0x1a, DBG_BLOCK_ID_UVDM = 0x1b, DBG_BLOCK_ID_VGT0 = 0x1c, DBG_BLOCK_ID_VGT1 = 0x1d, DBG_BLOCK_ID_IA = 0x1e, DBG_BLOCK_ID_SXM0 = 0x1f, DBG_BLOCK_ID_SXM1 = 0x20, DBG_BLOCK_ID_SCT0 = 0x21, DBG_BLOCK_ID_SCT1 = 0x22, DBG_BLOCK_ID_SPM0 = 0x23, DBG_BLOCK_ID_SPM1 = 0x24, DBG_BLOCK_ID_UNUSED0 = 0x25, DBG_BLOCK_ID_UNUSED1 = 0x26, DBG_BLOCK_ID_TCAA = 0x27, DBG_BLOCK_ID_TCAB = 0x28, DBG_BLOCK_ID_TCCA = 0x29, DBG_BLOCK_ID_TCCB = 0x2a, DBG_BLOCK_ID_MCC0 = 0x2b, DBG_BLOCK_ID_MCC1 = 0x2c, DBG_BLOCK_ID_MCC2 = 0x2d, DBG_BLOCK_ID_MCC3 = 0x2e, DBG_BLOCK_ID_SXS0 = 0x2f, DBG_BLOCK_ID_SXS1 = 0x30, DBG_BLOCK_ID_SXS2 = 0x31, DBG_BLOCK_ID_SXS3 = 0x32, DBG_BLOCK_ID_SXS4 = 0x33, DBG_BLOCK_ID_SXS5 = 0x34, DBG_BLOCK_ID_SXS6 = 0x35, DBG_BLOCK_ID_SXS7 = 0x36, DBG_BLOCK_ID_SXS8 = 0x37, DBG_BLOCK_ID_SXS9 = 0x38, DBG_BLOCK_ID_BCI0 = 0x39, DBG_BLOCK_ID_BCI1 = 0x3a, DBG_BLOCK_ID_BCI2 = 0x3b, DBG_BLOCK_ID_BCI3 = 0x3c, DBG_BLOCK_ID_MCB = 0x3d, DBG_BLOCK_ID_UNUSED6 = 0x3e, DBG_BLOCK_ID_SQA00 = 0x3f, DBG_BLOCK_ID_SQA01 = 0x40, DBG_BLOCK_ID_SQA02 = 0x41, DBG_BLOCK_ID_SQA10 = 0x42, DBG_BLOCK_ID_SQA11 = 0x43, DBG_BLOCK_ID_SQA12 = 0x44, DBG_BLOCK_ID_UNUSED7 = 0x45, DBG_BLOCK_ID_UNUSED8 = 0x46, DBG_BLOCK_ID_SQB00 = 0x47, DBG_BLOCK_ID_SQB01 = 0x48, DBG_BLOCK_ID_SQB10 = 0x49, DBG_BLOCK_ID_SQB11 = 0x4a, DBG_BLOCK_ID_SQ00 = 0x4b, DBG_BLOCK_ID_SQ01 = 0x4c, DBG_BLOCK_ID_SQ10 = 0x4d, DBG_BLOCK_ID_SQ11 = 0x4e, DBG_BLOCK_ID_CB00 = 0x4f, DBG_BLOCK_ID_CB01 = 0x50, DBG_BLOCK_ID_CB02 = 0x51, DBG_BLOCK_ID_CB03 = 0x52, DBG_BLOCK_ID_CB04 = 0x53, DBG_BLOCK_ID_UNUSED9 = 0x54, DBG_BLOCK_ID_UNUSED10 = 0x55, DBG_BLOCK_ID_UNUSED11 = 0x56, DBG_BLOCK_ID_CB10 = 0x57, DBG_BLOCK_ID_CB11 = 0x58, DBG_BLOCK_ID_CB12 = 0x59, DBG_BLOCK_ID_CB13 = 0x5a, DBG_BLOCK_ID_CB14 = 0x5b, DBG_BLOCK_ID_UNUSED12 = 0x5c, DBG_BLOCK_ID_UNUSED13 = 0x5d, DBG_BLOCK_ID_UNUSED14 = 0x5e, DBG_BLOCK_ID_TCP0 = 0x5f, DBG_BLOCK_ID_TCP1 = 0x60, DBG_BLOCK_ID_TCP2 = 0x61, DBG_BLOCK_ID_TCP3 = 0x62, DBG_BLOCK_ID_TCP4 = 0x63, DBG_BLOCK_ID_TCP5 = 0x64, DBG_BLOCK_ID_TCP6 = 0x65, DBG_BLOCK_ID_TCP7 = 0x66, DBG_BLOCK_ID_TCP8 = 0x67, DBG_BLOCK_ID_TCP9 = 0x68, DBG_BLOCK_ID_TCP10 = 0x69, DBG_BLOCK_ID_TCP11 = 0x6a, DBG_BLOCK_ID_TCP12 = 0x6b, DBG_BLOCK_ID_TCP13 = 0x6c, DBG_BLOCK_ID_TCP14 = 0x6d, DBG_BLOCK_ID_TCP15 = 0x6e, DBG_BLOCK_ID_TCP16 = 0x6f, DBG_BLOCK_ID_TCP17 = 0x70, DBG_BLOCK_ID_TCP18 = 0x71, DBG_BLOCK_ID_TCP19 = 0x72, DBG_BLOCK_ID_TCP20 = 0x73, DBG_BLOCK_ID_TCP21 = 0x74, DBG_BLOCK_ID_TCP22 = 0x75, DBG_BLOCK_ID_TCP23 = 0x76, DBG_BLOCK_ID_TCP_RESERVED0 = 0x77, DBG_BLOCK_ID_TCP_RESERVED1 = 0x78, DBG_BLOCK_ID_TCP_RESERVED2 = 0x79, DBG_BLOCK_ID_TCP_RESERVED3 = 0x7a, DBG_BLOCK_ID_TCP_RESERVED4 = 0x7b, DBG_BLOCK_ID_TCP_RESERVED5 = 0x7c, DBG_BLOCK_ID_TCP_RESERVED6 = 0x7d, DBG_BLOCK_ID_TCP_RESERVED7 = 0x7e, DBG_BLOCK_ID_DB00 = 0x7f, DBG_BLOCK_ID_DB01 = 0x80, DBG_BLOCK_ID_DB02 = 0x81, DBG_BLOCK_ID_DB03 = 0x82, DBG_BLOCK_ID_DB04 = 0x83, DBG_BLOCK_ID_UNUSED15 = 0x84, DBG_BLOCK_ID_UNUSED16 = 0x85, DBG_BLOCK_ID_UNUSED17 = 0x86, DBG_BLOCK_ID_DB10 = 0x87, DBG_BLOCK_ID_DB11 = 0x88, DBG_BLOCK_ID_DB12 = 0x89, DBG_BLOCK_ID_DB13 = 0x8a, DBG_BLOCK_ID_DB14 = 0x8b, DBG_BLOCK_ID_UNUSED18 = 0x8c, DBG_BLOCK_ID_UNUSED19 = 0x8d, DBG_BLOCK_ID_UNUSED20 = 0x8e, DBG_BLOCK_ID_TCC0 = 0x8f, DBG_BLOCK_ID_TCC1 = 0x90, DBG_BLOCK_ID_TCC2 = 0x91, DBG_BLOCK_ID_TCC3 = 0x92, DBG_BLOCK_ID_TCC4 = 0x93, DBG_BLOCK_ID_TCC5 = 0x94, DBG_BLOCK_ID_TCC6 = 0x95, DBG_BLOCK_ID_TCC7 = 0x96, DBG_BLOCK_ID_SPS00 = 0x97, DBG_BLOCK_ID_SPS01 = 0x98, DBG_BLOCK_ID_SPS02 = 0x99, DBG_BLOCK_ID_SPS10 = 0x9a, DBG_BLOCK_ID_SPS11 = 0x9b, DBG_BLOCK_ID_SPS12 = 0x9c, DBG_BLOCK_ID_UNUSED21 = 0x9d, DBG_BLOCK_ID_UNUSED22 = 0x9e, DBG_BLOCK_ID_TA00 = 0x9f, DBG_BLOCK_ID_TA01 = 0xa0, DBG_BLOCK_ID_TA02 = 0xa1, DBG_BLOCK_ID_TA03 = 0xa2, DBG_BLOCK_ID_TA04 = 0xa3, DBG_BLOCK_ID_TA05 = 0xa4, DBG_BLOCK_ID_TA06 = 0xa5, DBG_BLOCK_ID_TA07 = 0xa6, DBG_BLOCK_ID_TA08 = 0xa7, DBG_BLOCK_ID_TA09 = 0xa8, DBG_BLOCK_ID_TA0A = 0xa9, DBG_BLOCK_ID_TA0B = 0xaa, DBG_BLOCK_ID_UNUSED23 = 0xab, DBG_BLOCK_ID_UNUSED24 = 0xac, DBG_BLOCK_ID_UNUSED25 = 0xad, DBG_BLOCK_ID_UNUSED26 = 0xae, DBG_BLOCK_ID_TA10 = 0xaf, DBG_BLOCK_ID_TA11 = 0xb0, DBG_BLOCK_ID_TA12 = 0xb1, DBG_BLOCK_ID_TA13 = 0xb2, DBG_BLOCK_ID_TA14 = 0xb3, DBG_BLOCK_ID_TA15 = 0xb4, DBG_BLOCK_ID_TA16 = 0xb5, DBG_BLOCK_ID_TA17 = 0xb6, DBG_BLOCK_ID_TA18 = 0xb7, DBG_BLOCK_ID_TA19 = 0xb8, DBG_BLOCK_ID_TA1A = 0xb9, DBG_BLOCK_ID_TA1B = 0xba, DBG_BLOCK_ID_UNUSED27 = 0xbb, DBG_BLOCK_ID_UNUSED28 = 0xbc, DBG_BLOCK_ID_UNUSED29 = 0xbd, DBG_BLOCK_ID_UNUSED30 = 0xbe, DBG_BLOCK_ID_TD00 = 0xbf, DBG_BLOCK_ID_TD01 = 0xc0, DBG_BLOCK_ID_TD02 = 0xc1, DBG_BLOCK_ID_TD03 = 0xc2, DBG_BLOCK_ID_TD04 = 0xc3, DBG_BLOCK_ID_TD05 = 0xc4, DBG_BLOCK_ID_TD06 = 0xc5, DBG_BLOCK_ID_TD07 = 0xc6, DBG_BLOCK_ID_TD08 = 0xc7, DBG_BLOCK_ID_TD09 = 0xc8, DBG_BLOCK_ID_TD0A = 0xc9, DBG_BLOCK_ID_TD0B = 0xca, DBG_BLOCK_ID_UNUSED31 = 0xcb, DBG_BLOCK_ID_UNUSED32 = 0xcc, DBG_BLOCK_ID_UNUSED33 = 0xcd, DBG_BLOCK_ID_UNUSED34 = 0xce, DBG_BLOCK_ID_TD10 = 0xcf, DBG_BLOCK_ID_TD11 = 0xd0, DBG_BLOCK_ID_TD12 = 0xd1, DBG_BLOCK_ID_TD13 = 0xd2, DBG_BLOCK_ID_TD14 = 0xd3, DBG_BLOCK_ID_TD15 = 0xd4, DBG_BLOCK_ID_TD16 = 0xd5, DBG_BLOCK_ID_TD17 = 0xd6, DBG_BLOCK_ID_TD18 = 0xd7, DBG_BLOCK_ID_TD19 = 0xd8, DBG_BLOCK_ID_TD1A = 0xd9, DBG_BLOCK_ID_TD1B = 0xda, DBG_BLOCK_ID_UNUSED35 = 0xdb, DBG_BLOCK_ID_UNUSED36 = 0xdc, DBG_BLOCK_ID_UNUSED37 = 0xdd, DBG_BLOCK_ID_UNUSED38 = 0xde, DBG_BLOCK_ID_LDS00 = 0xdf, DBG_BLOCK_ID_LDS01 = 0xe0, DBG_BLOCK_ID_LDS02 = 0xe1, DBG_BLOCK_ID_LDS03 = 0xe2, DBG_BLOCK_ID_LDS04 = 0xe3, DBG_BLOCK_ID_LDS05 = 0xe4, DBG_BLOCK_ID_LDS06 = 0xe5, DBG_BLOCK_ID_LDS07 = 0xe6, DBG_BLOCK_ID_LDS08 = 0xe7, DBG_BLOCK_ID_LDS09 = 0xe8, DBG_BLOCK_ID_LDS0A = 0xe9, DBG_BLOCK_ID_LDS0B = 0xea, DBG_BLOCK_ID_UNUSED39 = 0xeb, DBG_BLOCK_ID_UNUSED40 = 0xec, DBG_BLOCK_ID_UNUSED41 = 0xed, DBG_BLOCK_ID_UNUSED42 = 0xee, DBG_BLOCK_ID_LDS10 = 0xef, DBG_BLOCK_ID_LDS11 = 0xf0, DBG_BLOCK_ID_LDS12 = 0xf1, DBG_BLOCK_ID_LDS13 = 0xf2, DBG_BLOCK_ID_LDS14 = 0xf3, DBG_BLOCK_ID_LDS15 = 0xf4, DBG_BLOCK_ID_LDS16 = 0xf5, DBG_BLOCK_ID_LDS17 = 0xf6, DBG_BLOCK_ID_LDS18 = 0xf7, DBG_BLOCK_ID_LDS19 = 0xf8, DBG_BLOCK_ID_LDS1A = 0xf9, DBG_BLOCK_ID_LDS1B = 0xfa, DBG_BLOCK_ID_UNUSED43 = 0xfb, DBG_BLOCK_ID_UNUSED44 = 0xfc, DBG_BLOCK_ID_UNUSED45 = 0xfd, DBG_BLOCK_ID_UNUSED46 = 0xfe, } DebugBlockId; typedef enum DebugBlockId_BY2 { DBG_BLOCK_ID_RESERVED_BY2 = 0x0, DBG_BLOCK_ID_VMC_BY2 = 0x1, DBG_BLOCK_ID_UNUSED0_BY2 = 0x2, DBG_BLOCK_ID_GRBM_BY2 = 0x3, DBG_BLOCK_ID_CSC_BY2 = 0x4, DBG_BLOCK_ID_IH_BY2 = 0x5, DBG_BLOCK_ID_SQ_BY2 = 0x6, DBG_BLOCK_ID_UVD_BY2 = 0x7, DBG_BLOCK_ID_SDMA0_BY2 = 0x8, DBG_BLOCK_ID_SPIM_BY2 = 0x9, DBG_BLOCK_ID_VC0_BY2 = 0xa, DBG_BLOCK_ID_PA_BY2 = 0xb, DBG_BLOCK_ID_CP0_BY2 = 0xc, DBG_BLOCK_ID_CP2_BY2 = 0xd, DBG_BLOCK_ID_PC0_BY2 = 0xe, DBG_BLOCK_ID_BCI0_BY2 = 0xf, DBG_BLOCK_ID_SXM0_BY2 = 0x10, DBG_BLOCK_ID_SCT0_BY2 = 0x11, DBG_BLOCK_ID_SPM0_BY2 = 0x12, DBG_BLOCK_ID_BCI2_BY2 = 0x13, DBG_BLOCK_ID_TCA_BY2 = 0x14, DBG_BLOCK_ID_TCCA_BY2 = 0x15, DBG_BLOCK_ID_MCC_BY2 = 0x16, DBG_BLOCK_ID_MCC2_BY2 = 0x17, DBG_BLOCK_ID_MCD_BY2 = 0x18, DBG_BLOCK_ID_MCD2_BY2 = 0x19, DBG_BLOCK_ID_MCD4_BY2 = 0x1a, DBG_BLOCK_ID_MCB_BY2 = 0x1b, DBG_BLOCK_ID_SQA_BY2 = 0x1c, DBG_BLOCK_ID_SQA02_BY2 = 0x1d, DBG_BLOCK_ID_SQA11_BY2 = 0x1e, DBG_BLOCK_ID_UNUSED8_BY2 = 0x1f, DBG_BLOCK_ID_SQB_BY2 = 0x20, DBG_BLOCK_ID_SQB10_BY2 = 0x21, DBG_BLOCK_ID_UNUSED10_BY2 = 0x22, DBG_BLOCK_ID_UNUSED12_BY2 = 0x23, DBG_BLOCK_ID_CB_BY2 = 0x24, DBG_BLOCK_ID_CB02_BY2 = 0x25, DBG_BLOCK_ID_CB10_BY2 = 0x26, DBG_BLOCK_ID_CB12_BY2 = 0x27, DBG_BLOCK_ID_SXS_BY2 = 0x28, DBG_BLOCK_ID_SXS2_BY2 = 0x29, DBG_BLOCK_ID_SXS4_BY2 = 0x2a, DBG_BLOCK_ID_SXS6_BY2 = 0x2b, DBG_BLOCK_ID_DB_BY2 = 0x2c, DBG_BLOCK_ID_DB02_BY2 = 0x2d, DBG_BLOCK_ID_DB10_BY2 = 0x2e, DBG_BLOCK_ID_DB12_BY2 = 0x2f, DBG_BLOCK_ID_TCP_BY2 = 0x30, DBG_BLOCK_ID_TCP2_BY2 = 0x31, DBG_BLOCK_ID_TCP4_BY2 = 0x32, DBG_BLOCK_ID_TCP6_BY2 = 0x33, DBG_BLOCK_ID_TCP8_BY2 = 0x34, DBG_BLOCK_ID_TCP10_BY2 = 0x35, DBG_BLOCK_ID_TCP12_BY2 = 0x36, DBG_BLOCK_ID_TCP14_BY2 = 0x37, DBG_BLOCK_ID_TCP16_BY2 = 0x38, DBG_BLOCK_ID_TCP18_BY2 = 0x39, DBG_BLOCK_ID_TCP20_BY2 = 0x3a, DBG_BLOCK_ID_TCP22_BY2 = 0x3b, DBG_BLOCK_ID_TCP_RESERVED0_BY2 = 0x3c, DBG_BLOCK_ID_TCP_RESERVED2_BY2 = 0x3d, DBG_BLOCK_ID_TCP_RESERVED4_BY2 = 0x3e, DBG_BLOCK_ID_TCP_RESERVED6_BY2 = 0x3f, DBG_BLOCK_ID_TCC_BY2 = 0x40, DBG_BLOCK_ID_TCC2_BY2 = 0x41, DBG_BLOCK_ID_TCC4_BY2 = 0x42, DBG_BLOCK_ID_TCC6_BY2 = 0x43, DBG_BLOCK_ID_SPS_BY2 = 0x44, DBG_BLOCK_ID_SPS02_BY2 = 0x45, DBG_BLOCK_ID_SPS11_BY2 = 0x46, DBG_BLOCK_ID_UNUSED14_BY2 = 0x47, DBG_BLOCK_ID_TA_BY2 = 0x48, DBG_BLOCK_ID_TA02_BY2 = 0x49, DBG_BLOCK_ID_TA04_BY2 = 0x4a, DBG_BLOCK_ID_TA06_BY2 = 0x4b, DBG_BLOCK_ID_TA08_BY2 = 0x4c, DBG_BLOCK_ID_TA0A_BY2 = 0x4d, DBG_BLOCK_ID_UNUSED20_BY2 = 0x4e, DBG_BLOCK_ID_UNUSED22_BY2 = 0x4f, DBG_BLOCK_ID_TA10_BY2 = 0x50, DBG_BLOCK_ID_TA12_BY2 = 0x51, DBG_BLOCK_ID_TA14_BY2 = 0x52, DBG_BLOCK_ID_TA16_BY2 = 0x53, DBG_BLOCK_ID_TA18_BY2 = 0x54, DBG_BLOCK_ID_TA1A_BY2 = 0x55, DBG_BLOCK_ID_UNUSED24_BY2 = 0x56, DBG_BLOCK_ID_UNUSED26_BY2 = 0x57, DBG_BLOCK_ID_TD_BY2 = 0x58, DBG_BLOCK_ID_TD02_BY2 = 0x59, DBG_BLOCK_ID_TD04_BY2 = 0x5a, DBG_BLOCK_ID_TD06_BY2 = 0x5b, DBG_BLOCK_ID_TD08_BY2 = 0x5c, DBG_BLOCK_ID_TD0A_BY2 = 0x5d, DBG_BLOCK_ID_UNUSED28_BY2 = 0x5e, DBG_BLOCK_ID_UNUSED30_BY2 = 0x5f, DBG_BLOCK_ID_TD10_BY2 = 0x60, DBG_BLOCK_ID_TD12_BY2 = 0x61, DBG_BLOCK_ID_TD14_BY2 = 0x62, DBG_BLOCK_ID_TD16_BY2 = 0x63, DBG_BLOCK_ID_TD18_BY2 = 0x64, DBG_BLOCK_ID_TD1A_BY2 = 0x65, DBG_BLOCK_ID_UNUSED32_BY2 = 0x66, DBG_BLOCK_ID_UNUSED34_BY2 = 0x67, DBG_BLOCK_ID_LDS_BY2 = 0x68, DBG_BLOCK_ID_LDS02_BY2 = 0x69, DBG_BLOCK_ID_LDS04_BY2 = 0x6a, DBG_BLOCK_ID_LDS06_BY2 = 0x6b, DBG_BLOCK_ID_LDS08_BY2 = 0x6c, DBG_BLOCK_ID_LDS0A_BY2 = 0x6d, DBG_BLOCK_ID_UNUSED36_BY2 = 0x6e, DBG_BLOCK_ID_UNUSED38_BY2 = 0x6f, DBG_BLOCK_ID_LDS10_BY2 = 0x70, DBG_BLOCK_ID_LDS12_BY2 = 0x71, DBG_BLOCK_ID_LDS14_BY2 = 0x72, DBG_BLOCK_ID_LDS16_BY2 = 0x73, DBG_BLOCK_ID_LDS18_BY2 = 0x74, DBG_BLOCK_ID_LDS1A_BY2 = 0x75, DBG_BLOCK_ID_UNUSED40_BY2 = 0x76, DBG_BLOCK_ID_UNUSED42_BY2 = 0x77, } DebugBlockId_BY2; typedef enum DebugBlockId_BY4 { DBG_BLOCK_ID_RESERVED_BY4 = 0x0, DBG_BLOCK_ID_UNUSED0_BY4 = 0x1, DBG_BLOCK_ID_CSC_BY4 = 0x2, DBG_BLOCK_ID_SQ_BY4 = 0x3, DBG_BLOCK_ID_SDMA0_BY4 = 0x4, DBG_BLOCK_ID_VC0_BY4 = 0x5, DBG_BLOCK_ID_CP0_BY4 = 0x6, DBG_BLOCK_ID_UNUSED1_BY4 = 0x7, DBG_BLOCK_ID_SXM0_BY4 = 0x8, DBG_BLOCK_ID_SPM0_BY4 = 0x9, DBG_BLOCK_ID_TCAA_BY4 = 0xa, DBG_BLOCK_ID_MCC_BY4 = 0xb, DBG_BLOCK_ID_MCD_BY4 = 0xc, DBG_BLOCK_ID_MCD4_BY4 = 0xd, DBG_BLOCK_ID_SQA_BY4 = 0xe, DBG_BLOCK_ID_SQA11_BY4 = 0xf, DBG_BLOCK_ID_SQB_BY4 = 0x10, DBG_BLOCK_ID_UNUSED10_BY4 = 0x11, DBG_BLOCK_ID_CB_BY4 = 0x12, DBG_BLOCK_ID_CB10_BY4 = 0x13, DBG_BLOCK_ID_SXS_BY4 = 0x14, DBG_BLOCK_ID_SXS4_BY4 = 0x15, DBG_BLOCK_ID_DB_BY4 = 0x16, DBG_BLOCK_ID_DB10_BY4 = 0x17, DBG_BLOCK_ID_TCP_BY4 = 0x18, DBG_BLOCK_ID_TCP4_BY4 = 0x19, DBG_BLOCK_ID_TCP8_BY4 = 0x1a, DBG_BLOCK_ID_TCP12_BY4 = 0x1b, DBG_BLOCK_ID_TCP16_BY4 = 0x1c, DBG_BLOCK_ID_TCP20_BY4 = 0x1d, DBG_BLOCK_ID_TCP_RESERVED0_BY4 = 0x1e, DBG_BLOCK_ID_TCP_RESERVED4_BY4 = 0x1f, DBG_BLOCK_ID_TCC_BY4 = 0x20, DBG_BLOCK_ID_TCC4_BY4 = 0x21, DBG_BLOCK_ID_SPS_BY4 = 0x22, DBG_BLOCK_ID_SPS11_BY4 = 0x23, DBG_BLOCK_ID_TA_BY4 = 0x24, DBG_BLOCK_ID_TA04_BY4 = 0x25, DBG_BLOCK_ID_TA08_BY4 = 0x26, DBG_BLOCK_ID_UNUSED20_BY4 = 0x27, DBG_BLOCK_ID_TA10_BY4 = 0x28, DBG_BLOCK_ID_TA14_BY4 = 0x29, DBG_BLOCK_ID_TA18_BY4 = 0x2a, DBG_BLOCK_ID_UNUSED24_BY4 = 0x2b, DBG_BLOCK_ID_TD_BY4 = 0x2c, DBG_BLOCK_ID_TD04_BY4 = 0x2d, DBG_BLOCK_ID_TD08_BY4 = 0x2e, DBG_BLOCK_ID_UNUSED28_BY4 = 0x2f, DBG_BLOCK_ID_TD10_BY4 = 0x30, DBG_BLOCK_ID_TD14_BY4 = 0x31, DBG_BLOCK_ID_TD18_BY4 = 0x32, DBG_BLOCK_ID_UNUSED32_BY4 = 0x33, DBG_BLOCK_ID_LDS_BY4 = 0x34, DBG_BLOCK_ID_LDS04_BY4 = 0x35, DBG_BLOCK_ID_LDS08_BY4 = 0x36, DBG_BLOCK_ID_UNUSED36_BY4 = 0x37, DBG_BLOCK_ID_LDS10_BY4 = 0x38, DBG_BLOCK_ID_LDS14_BY4 = 0x39, DBG_BLOCK_ID_LDS18_BY4 = 0x3a, DBG_BLOCK_ID_UNUSED40_BY4 = 0x3b, } DebugBlockId_BY4; typedef enum DebugBlockId_BY8 { DBG_BLOCK_ID_RESERVED_BY8 = 0x0, DBG_BLOCK_ID_CSC_BY8 = 0x1, DBG_BLOCK_ID_SDMA0_BY8 = 0x2, DBG_BLOCK_ID_CP0_BY8 = 0x3, DBG_BLOCK_ID_SXM0_BY8 = 0x4, DBG_BLOCK_ID_TCA_BY8 = 0x5, DBG_BLOCK_ID_MCD_BY8 = 0x6, DBG_BLOCK_ID_SQA_BY8 = 0x7, DBG_BLOCK_ID_SQB_BY8 = 0x8, DBG_BLOCK_ID_CB_BY8 = 0x9, DBG_BLOCK_ID_SXS_BY8 = 0xa, DBG_BLOCK_ID_DB_BY8 = 0xb, DBG_BLOCK_ID_TCP_BY8 = 0xc, DBG_BLOCK_ID_TCP8_BY8 = 0xd, DBG_BLOCK_ID_TCP16_BY8 = 0xe, DBG_BLOCK_ID_TCP_RESERVED0_BY8 = 0xf, DBG_BLOCK_ID_TCC_BY8 = 0x10, DBG_BLOCK_ID_SPS_BY8 = 0x11, DBG_BLOCK_ID_TA_BY8 = 0x12, DBG_BLOCK_ID_TA08_BY8 = 0x13, DBG_BLOCK_ID_TA10_BY8 = 0x14, DBG_BLOCK_ID_TA18_BY8 = 0x15, DBG_BLOCK_ID_TD_BY8 = 0x16, DBG_BLOCK_ID_TD08_BY8 = 0x17, DBG_BLOCK_ID_TD10_BY8 = 0x18, DBG_BLOCK_ID_TD18_BY8 = 0x19, DBG_BLOCK_ID_LDS_BY8 = 0x1a, DBG_BLOCK_ID_LDS08_BY8 = 0x1b, DBG_BLOCK_ID_LDS10_BY8 = 0x1c, DBG_BLOCK_ID_LDS18_BY8 = 0x1d, } DebugBlockId_BY8; typedef enum DebugBlockId_BY16 { DBG_BLOCK_ID_RESERVED_BY16 = 0x0, DBG_BLOCK_ID_SDMA0_BY16 = 0x1, DBG_BLOCK_ID_SXM_BY16 = 0x2, DBG_BLOCK_ID_MCD_BY16 = 0x3, DBG_BLOCK_ID_SQB_BY16 = 0x4, DBG_BLOCK_ID_SXS_BY16 = 0x5, DBG_BLOCK_ID_TCP_BY16 = 0x6, DBG_BLOCK_ID_TCP16_BY16 = 0x7, DBG_BLOCK_ID_TCC_BY16 = 0x8, DBG_BLOCK_ID_TA_BY16 = 0x9, DBG_BLOCK_ID_TA10_BY16 = 0xa, DBG_BLOCK_ID_TD_BY16 = 0xb, DBG_BLOCK_ID_TD10_BY16 = 0xc, DBG_BLOCK_ID_LDS_BY16 = 0xd, DBG_BLOCK_ID_LDS10_BY16 = 0xe, } DebugBlockId_BY16; typedef enum SurfaceEndian { ENDIAN_NONE = 0x0, ENDIAN_8IN16 = 0x1, ENDIAN_8IN32 = 0x2, ENDIAN_8IN64 = 0x3, } SurfaceEndian; typedef enum ArrayMode { ARRAY_LINEAR_GENERAL = 0x0, ARRAY_LINEAR_ALIGNED = 0x1, ARRAY_1D_TILED_THIN1 = 0x2, ARRAY_1D_TILED_THICK = 0x3, ARRAY_2D_TILED_THIN1 = 0x4, ARRAY_PRT_TILED_THIN1 = 0x5, ARRAY_PRT_2D_TILED_THIN1 = 0x6, ARRAY_2D_TILED_THICK = 0x7, ARRAY_2D_TILED_XTHICK = 0x8, ARRAY_PRT_TILED_THICK = 0x9, ARRAY_PRT_2D_TILED_THICK = 0xa, ARRAY_PRT_3D_TILED_THIN1 = 0xb, ARRAY_3D_TILED_THIN1 = 0xc, ARRAY_3D_TILED_THICK = 0xd, ARRAY_3D_TILED_XTHICK = 0xe, ARRAY_PRT_3D_TILED_THICK = 0xf, } ArrayMode; typedef enum PipeTiling { CONFIG_1_PIPE = 0x0, CONFIG_2_PIPE = 0x1, CONFIG_4_PIPE = 0x2, CONFIG_8_PIPE = 0x3, } PipeTiling; typedef enum BankTiling { CONFIG_4_BANK = 0x0, CONFIG_8_BANK = 0x1, } BankTiling; typedef enum GroupInterleave { CONFIG_256B_GROUP = 0x0, CONFIG_512B_GROUP = 0x1, } GroupInterleave; typedef enum RowTiling { CONFIG_1KB_ROW = 0x0, CONFIG_2KB_ROW = 0x1, CONFIG_4KB_ROW = 0x2, CONFIG_8KB_ROW = 0x3, CONFIG_1KB_ROW_OPT = 0x4, CONFIG_2KB_ROW_OPT = 0x5, CONFIG_4KB_ROW_OPT = 0x6, CONFIG_8KB_ROW_OPT = 0x7, } RowTiling; typedef enum BankSwapBytes { CONFIG_128B_SWAPS = 0x0, CONFIG_256B_SWAPS = 0x1, CONFIG_512B_SWAPS = 0x2, CONFIG_1KB_SWAPS = 0x3, } BankSwapBytes; typedef enum SampleSplitBytes { CONFIG_1KB_SPLIT = 0x0, CONFIG_2KB_SPLIT = 0x1, CONFIG_4KB_SPLIT = 0x2, CONFIG_8KB_SPLIT = 0x3, } SampleSplitBytes; typedef enum NumPipes { ADDR_CONFIG_1_PIPE = 0x0, ADDR_CONFIG_2_PIPE = 0x1, ADDR_CONFIG_4_PIPE = 0x2, ADDR_CONFIG_8_PIPE = 0x3, } NumPipes; typedef enum PipeInterleaveSize { ADDR_CONFIG_PIPE_INTERLEAVE_256B = 0x0, ADDR_CONFIG_PIPE_INTERLEAVE_512B = 0x1, } PipeInterleaveSize; typedef enum BankInterleaveSize { ADDR_CONFIG_BANK_INTERLEAVE_1 = 0x0, ADDR_CONFIG_BANK_INTERLEAVE_2 = 0x1, ADDR_CONFIG_BANK_INTERLEAVE_4 = 0x2, ADDR_CONFIG_BANK_INTERLEAVE_8 = 0x3, } BankInterleaveSize; typedef enum NumShaderEngines { ADDR_CONFIG_1_SHADER_ENGINE = 0x0, ADDR_CONFIG_2_SHADER_ENGINE = 0x1, } NumShaderEngines; typedef enum ShaderEngineTileSize { ADDR_CONFIG_SE_TILE_16 = 0x0, ADDR_CONFIG_SE_TILE_32 = 0x1, } ShaderEngineTileSize; typedef enum NumGPUs { ADDR_CONFIG_1_GPU = 0x0, ADDR_CONFIG_2_GPU = 0x1, ADDR_CONFIG_4_GPU = 0x2, } NumGPUs; typedef enum MultiGPUTileSize { ADDR_CONFIG_GPU_TILE_16 = 0x0, ADDR_CONFIG_GPU_TILE_32 = 0x1, ADDR_CONFIG_GPU_TILE_64 = 0x2, ADDR_CONFIG_GPU_TILE_128 = 0x3, } MultiGPUTileSize; typedef enum RowSize { ADDR_CONFIG_1KB_ROW = 0x0, ADDR_CONFIG_2KB_ROW = 0x1, ADDR_CONFIG_4KB_ROW = 0x2, } RowSize; typedef enum NumLowerPipes { ADDR_CONFIG_1_LOWER_PIPES = 0x0, ADDR_CONFIG_2_LOWER_PIPES = 0x1, } NumLowerPipes; typedef enum ColorTransform { DCC_CT_AUTO = 0x0, DCC_CT_NONE = 0x1, ABGR_TO_A_BG_G_RB = 0x2, BGRA_TO_BG_G_RB_A = 0x3, } ColorTransform; typedef enum CompareRef { REF_NEVER = 0x0, REF_LESS = 0x1, REF_EQUAL = 0x2, REF_LEQUAL = 0x3, REF_GREATER = 0x4, REF_NOTEQUAL = 0x5, REF_GEQUAL = 0x6, REF_ALWAYS = 0x7, } CompareRef; typedef enum ReadSize { READ_256_BITS = 0x0, READ_512_BITS = 0x1, } ReadSize; typedef enum DepthFormat { DEPTH_INVALID = 0x0, DEPTH_16 = 0x1, DEPTH_X8_24 = 0x2, DEPTH_8_24 = 0x3, DEPTH_X8_24_FLOAT = 0x4, DEPTH_8_24_FLOAT = 0x5, DEPTH_32_FLOAT = 0x6, DEPTH_X24_8_32_FLOAT = 0x7, } DepthFormat; typedef enum ZFormat { Z_INVALID = 0x0, Z_16 = 0x1, Z_24 = 0x2, Z_32_FLOAT = 0x3, } ZFormat; typedef enum StencilFormat { STENCIL_INVALID = 0x0, STENCIL_8 = 0x1, } StencilFormat; typedef enum CmaskMode { CMASK_CLEAR_NONE = 0x0, CMASK_CLEAR_ONE = 0x1, CMASK_CLEAR_ALL = 0x2, CMASK_ANY_EXPANDED = 0x3, CMASK_ALPHA0_FRAG1 = 0x4, CMASK_ALPHA0_FRAG2 = 0x5, CMASK_ALPHA0_FRAG4 = 0x6, CMASK_ALPHA0_FRAGS = 0x7, CMASK_ALPHA1_FRAG1 = 0x8, CMASK_ALPHA1_FRAG2 = 0x9, CMASK_ALPHA1_FRAG4 = 0xa, CMASK_ALPHA1_FRAGS = 0xb, CMASK_ALPHAX_FRAG1 = 0xc, CMASK_ALPHAX_FRAG2 = 0xd, CMASK_ALPHAX_FRAG4 = 0xe, CMASK_ALPHAX_FRAGS = 0xf, } CmaskMode; typedef enum QuadExportFormat { EXPORT_UNUSED = 0x0, EXPORT_32_R = 0x1, EXPORT_32_GR = 0x2, EXPORT_32_AR = 0x3, EXPORT_FP16_ABGR = 0x4, EXPORT_UNSIGNED16_ABGR = 0x5, EXPORT_SIGNED16_ABGR = 0x6, EXPORT_32_ABGR = 0x7, } QuadExportFormat; typedef enum QuadExportFormatOld { EXPORT_4P_32BPC_ABGR = 0x0, EXPORT_4P_16BPC_ABGR = 0x1, EXPORT_4P_32BPC_GR = 0x2, EXPORT_4P_32BPC_AR = 0x3, EXPORT_2P_32BPC_ABGR = 0x4, EXPORT_8P_32BPC_R = 0x5, } QuadExportFormatOld; typedef enum ColorFormat { COLOR_INVALID = 0x0, COLOR_8 = 0x1, COLOR_16 = 0x2, COLOR_8_8 = 0x3, COLOR_32 = 0x4, COLOR_16_16 = 0x5, COLOR_10_11_11 = 0x6, COLOR_11_11_10 = 0x7, COLOR_10_10_10_2 = 0x8, COLOR_2_10_10_10 = 0x9, COLOR_8_8_8_8 = 0xa, COLOR_32_32 = 0xb, COLOR_16_16_16_16 = 0xc, COLOR_RESERVED_13 = 0xd, COLOR_32_32_32_32 = 0xe, COLOR_RESERVED_15 = 0xf, COLOR_5_6_5 = 0x10, COLOR_1_5_5_5 = 0x11, COLOR_5_5_5_1 = 0x12, COLOR_4_4_4_4 = 0x13, COLOR_8_24 = 0x14, COLOR_24_8 = 0x15, COLOR_X24_8_32_FLOAT = 0x16, COLOR_RESERVED_23 = 0x17, } ColorFormat; typedef enum SurfaceFormat { FMT_INVALID = 0x0, FMT_8 = 0x1, FMT_16 = 0x2, FMT_8_8 = 0x3, FMT_32 = 0x4, FMT_16_16 = 0x5, FMT_10_11_11 = 0x6, FMT_11_11_10 = 0x7, FMT_10_10_10_2 = 0x8, FMT_2_10_10_10 = 0x9, FMT_8_8_8_8 = 0xa, FMT_32_32 = 0xb, FMT_16_16_16_16 = 0xc, FMT_32_32_32 = 0xd, FMT_32_32_32_32 = 0xe, FMT_RESERVED_4 = 0xf, FMT_5_6_5 = 0x10, FMT_1_5_5_5 = 0x11, FMT_5_5_5_1 = 0x12, FMT_4_4_4_4 = 0x13, FMT_8_24 = 0x14, FMT_24_8 = 0x15, FMT_X24_8_32_FLOAT = 0x16, FMT_RESERVED_33 = 0x17, FMT_11_11_10_FLOAT = 0x18, FMT_16_FLOAT = 0x19, FMT_32_FLOAT = 0x1a, FMT_16_16_FLOAT = 0x1b, FMT_8_24_FLOAT = 0x1c, FMT_24_8_FLOAT = 0x1d, FMT_32_32_FLOAT = 0x1e, FMT_10_11_11_FLOAT = 0x1f, FMT_16_16_16_16_FLOAT = 0x20, FMT_3_3_2 = 0x21, FMT_6_5_5 = 0x22, FMT_32_32_32_32_FLOAT = 0x23, FMT_RESERVED_36 = 0x24, FMT_1 = 0x25, FMT_1_REVERSED = 0x26, FMT_GB_GR = 0x27, FMT_BG_RG = 0x28, FMT_32_AS_8 = 0x29, FMT_32_AS_8_8 = 0x2a, FMT_5_9_9_9_SHAREDEXP = 0x2b, FMT_8_8_8 = 0x2c, FMT_16_16_16 = 0x2d, FMT_16_16_16_FLOAT = 0x2e, FMT_4_4 = 0x2f, FMT_32_32_32_FLOAT = 0x30, FMT_BC1 = 0x31, FMT_BC2 = 0x32, FMT_BC3 = 0x33, FMT_BC4 = 0x34, FMT_BC5 = 0x35, FMT_BC6 = 0x36, FMT_BC7 = 0x37, FMT_32_AS_32_32_32_32 = 0x38, FMT_APC3 = 0x39, FMT_APC4 = 0x3a, FMT_APC5 = 0x3b, FMT_APC6 = 0x3c, FMT_APC7 = 0x3d, FMT_CTX1 = 0x3e, FMT_RESERVED_63 = 0x3f, } SurfaceFormat; typedef enum BUF_DATA_FORMAT { BUF_DATA_FORMAT_INVALID = 0x0, BUF_DATA_FORMAT_8 = 0x1, BUF_DATA_FORMAT_16 = 0x2, BUF_DATA_FORMAT_8_8 = 0x3, BUF_DATA_FORMAT_32 = 0x4, BUF_DATA_FORMAT_16_16 = 0x5, BUF_DATA_FORMAT_10_11_11 = 0x6, BUF_DATA_FORMAT_11_11_10 = 0x7, BUF_DATA_FORMAT_10_10_10_2 = 0x8, BUF_DATA_FORMAT_2_10_10_10 = 0x9, BUF_DATA_FORMAT_8_8_8_8 = 0xa, BUF_DATA_FORMAT_32_32 = 0xb, BUF_DATA_FORMAT_16_16_16_16 = 0xc, BUF_DATA_FORMAT_32_32_32 = 0xd, BUF_DATA_FORMAT_32_32_32_32 = 0xe, BUF_DATA_FORMAT_RESERVED_15 = 0xf, } BUF_DATA_FORMAT; typedef enum IMG_DATA_FORMAT { IMG_DATA_FORMAT_INVALID = 0x0, IMG_DATA_FORMAT_8 = 0x1, IMG_DATA_FORMAT_16 = 0x2, IMG_DATA_FORMAT_8_8 = 0x3, IMG_DATA_FORMAT_32 = 0x4, IMG_DATA_FORMAT_16_16 = 0x5, IMG_DATA_FORMAT_10_11_11 = 0x6, IMG_DATA_FORMAT_11_11_10 = 0x7, IMG_DATA_FORMAT_10_10_10_2 = 0x8, IMG_DATA_FORMAT_2_10_10_10 = 0x9, IMG_DATA_FORMAT_8_8_8_8 = 0xa, IMG_DATA_FORMAT_32_32 = 0xb, IMG_DATA_FORMAT_16_16_16_16 = 0xc, IMG_DATA_FORMAT_32_32_32 = 0xd, IMG_DATA_FORMAT_32_32_32_32 = 0xe, IMG_DATA_FORMAT_RESERVED_15 = 0xf, IMG_DATA_FORMAT_5_6_5 = 0x10, IMG_DATA_FORMAT_1_5_5_5 = 0x11, IMG_DATA_FORMAT_5_5_5_1 = 0x12, IMG_DATA_FORMAT_4_4_4_4 = 0x13, IMG_DATA_FORMAT_8_24 = 0x14, IMG_DATA_FORMAT_24_8 = 0x15, IMG_DATA_FORMAT_X24_8_32 = 0x16, IMG_DATA_FORMAT_RESERVED_23 = 0x17, IMG_DATA_FORMAT_RESERVED_24 = 0x18, IMG_DATA_FORMAT_RESERVED_25 = 0x19, IMG_DATA_FORMAT_RESERVED_26 = 0x1a, IMG_DATA_FORMAT_RESERVED_27 = 0x1b, IMG_DATA_FORMAT_RESERVED_28 = 0x1c, IMG_DATA_FORMAT_RESERVED_29 = 0x1d, IMG_DATA_FORMAT_RESERVED_30 = 0x1e, IMG_DATA_FORMAT_RESERVED_31 = 0x1f, IMG_DATA_FORMAT_GB_GR = 0x20, IMG_DATA_FORMAT_BG_RG = 0x21, IMG_DATA_FORMAT_5_9_9_9 = 0x22, IMG_DATA_FORMAT_BC1 = 0x23, IMG_DATA_FORMAT_BC2 = 0x24, IMG_DATA_FORMAT_BC3 = 0x25, IMG_DATA_FORMAT_BC4 = 0x26, IMG_DATA_FORMAT_BC5 = 0x27, IMG_DATA_FORMAT_BC6 = 0x28, IMG_DATA_FORMAT_BC7 = 0x29, IMG_DATA_FORMAT_RESERVED_42 = 0x2a, IMG_DATA_FORMAT_RESERVED_43 = 0x2b, IMG_DATA_FORMAT_FMASK8_S2_F1 = 0x2c, IMG_DATA_FORMAT_FMASK8_S4_F1 = 0x2d, IMG_DATA_FORMAT_FMASK8_S8_F1 = 0x2e, IMG_DATA_FORMAT_FMASK8_S2_F2 = 0x2f, IMG_DATA_FORMAT_FMASK8_S4_F2 = 0x30, IMG_DATA_FORMAT_FMASK8_S4_F4 = 0x31, IMG_DATA_FORMAT_FMASK16_S16_F1 = 0x32, IMG_DATA_FORMAT_FMASK16_S8_F2 = 0x33, IMG_DATA_FORMAT_FMASK32_S16_F2 = 0x34, IMG_DATA_FORMAT_FMASK32_S8_F4 = 0x35, IMG_DATA_FORMAT_FMASK32_S8_F8 = 0x36, IMG_DATA_FORMAT_FMASK64_S16_F4 = 0x37, IMG_DATA_FORMAT_FMASK64_S16_F8 = 0x38, IMG_DATA_FORMAT_4_4 = 0x39, IMG_DATA_FORMAT_6_5_5 = 0x3a, IMG_DATA_FORMAT_1 = 0x3b, IMG_DATA_FORMAT_1_REVERSED = 0x3c, IMG_DATA_FORMAT_32_AS_8 = 0x3d, IMG_DATA_FORMAT_32_AS_8_8 = 0x3e, IMG_DATA_FORMAT_32_AS_32_32_32_32 = 0x3f, } IMG_DATA_FORMAT; typedef enum BUF_NUM_FORMAT { BUF_NUM_FORMAT_UNORM = 0x0, BUF_NUM_FORMAT_SNORM = 0x1, BUF_NUM_FORMAT_USCALED = 0x2, BUF_NUM_FORMAT_SSCALED = 0x3, BUF_NUM_FORMAT_UINT = 0x4, BUF_NUM_FORMAT_SINT = 0x5, BUF_NUM_FORMAT_RESERVED_6 = 0x6, BUF_NUM_FORMAT_FLOAT = 0x7, } BUF_NUM_FORMAT; typedef enum IMG_NUM_FORMAT { IMG_NUM_FORMAT_UNORM = 0x0, IMG_NUM_FORMAT_SNORM = 0x1, IMG_NUM_FORMAT_USCALED = 0x2, IMG_NUM_FORMAT_SSCALED = 0x3, IMG_NUM_FORMAT_UINT = 0x4, IMG_NUM_FORMAT_SINT = 0x5, IMG_NUM_FORMAT_RESERVED_6 = 0x6, IMG_NUM_FORMAT_FLOAT = 0x7, IMG_NUM_FORMAT_RESERVED_8 = 0x8, IMG_NUM_FORMAT_SRGB = 0x9, IMG_NUM_FORMAT_RESERVED_10 = 0xa, IMG_NUM_FORMAT_RESERVED_11 = 0xb, IMG_NUM_FORMAT_RESERVED_12 = 0xc, IMG_NUM_FORMAT_RESERVED_13 = 0xd, IMG_NUM_FORMAT_RESERVED_14 = 0xe, IMG_NUM_FORMAT_RESERVED_15 = 0xf, } IMG_NUM_FORMAT; typedef enum TileType { ARRAY_COLOR_TILE = 0x0, ARRAY_DEPTH_TILE = 0x1, } TileType; typedef enum NonDispTilingOrder { ADDR_SURF_MICRO_TILING_DISPLAY = 0x0, ADDR_SURF_MICRO_TILING_NON_DISPLAY = 0x1, } NonDispTilingOrder; typedef enum MicroTileMode { ADDR_SURF_DISPLAY_MICRO_TILING = 0x0, ADDR_SURF_THIN_MICRO_TILING = 0x1, ADDR_SURF_DEPTH_MICRO_TILING = 0x2, ADDR_SURF_ROTATED_MICRO_TILING = 0x3, ADDR_SURF_THICK_MICRO_TILING = 0x4, } MicroTileMode; typedef enum TileSplit { ADDR_SURF_TILE_SPLIT_64B = 0x0, ADDR_SURF_TILE_SPLIT_128B = 0x1, ADDR_SURF_TILE_SPLIT_256B = 0x2, ADDR_SURF_TILE_SPLIT_512B = 0x3, ADDR_SURF_TILE_SPLIT_1KB = 0x4, ADDR_SURF_TILE_SPLIT_2KB = 0x5, ADDR_SURF_TILE_SPLIT_4KB = 0x6, } TileSplit; typedef enum SampleSplit { ADDR_SURF_SAMPLE_SPLIT_1 = 0x0, ADDR_SURF_SAMPLE_SPLIT_2 = 0x1, ADDR_SURF_SAMPLE_SPLIT_4 = 0x2, ADDR_SURF_SAMPLE_SPLIT_8 = 0x3, } SampleSplit; typedef enum PipeConfig { ADDR_SURF_P2 = 0x0, ADDR_SURF_P2_RESERVED0 = 0x1, ADDR_SURF_P2_RESERVED1 = 0x2, ADDR_SURF_P2_RESERVED2 = 0x3, ADDR_SURF_P4_8x16 = 0x4, ADDR_SURF_P4_16x16 = 0x5, ADDR_SURF_P4_16x32 = 0x6, ADDR_SURF_P4_32x32 = 0x7, ADDR_SURF_P8_16x16_8x16 = 0x8, ADDR_SURF_P8_16x32_8x16 = 0x9, ADDR_SURF_P8_32x32_8x16 = 0xa, ADDR_SURF_P8_16x32_16x16 = 0xb, ADDR_SURF_P8_32x32_16x16 = 0xc, ADDR_SURF_P8_32x32_16x32 = 0xd, ADDR_SURF_P8_32x64_32x32 = 0xe, ADDR_SURF_P8_RESERVED0 = 0xf, ADDR_SURF_P16_32x32_8x16 = 0x10, ADDR_SURF_P16_32x32_16x16 = 0x11, } PipeConfig; typedef enum NumBanks { ADDR_SURF_2_BANK = 0x0, ADDR_SURF_4_BANK = 0x1, ADDR_SURF_8_BANK = 0x2, ADDR_SURF_16_BANK = 0x3, } NumBanks; typedef enum BankWidth { ADDR_SURF_BANK_WIDTH_1 = 0x0, ADDR_SURF_BANK_WIDTH_2 = 0x1, ADDR_SURF_BANK_WIDTH_4 = 0x2, ADDR_SURF_BANK_WIDTH_8 = 0x3, } BankWidth; typedef enum BankHeight { ADDR_SURF_BANK_HEIGHT_1 = 0x0, ADDR_SURF_BANK_HEIGHT_2 = 0x1, ADDR_SURF_BANK_HEIGHT_4 = 0x2, ADDR_SURF_BANK_HEIGHT_8 = 0x3, } BankHeight; typedef enum BankWidthHeight { ADDR_SURF_BANK_WH_1 = 0x0, ADDR_SURF_BANK_WH_2 = 0x1, ADDR_SURF_BANK_WH_4 = 0x2, ADDR_SURF_BANK_WH_8 = 0x3, } BankWidthHeight; typedef enum MacroTileAspect { ADDR_SURF_MACRO_ASPECT_1 = 0x0, ADDR_SURF_MACRO_ASPECT_2 = 0x1, ADDR_SURF_MACRO_ASPECT_4 = 0x2, ADDR_SURF_MACRO_ASPECT_8 = 0x3, } MacroTileAspect; typedef enum GATCL1RequestType { GATCL1_TYPE_NORMAL = 0x0, GATCL1_TYPE_SHOOTDOWN = 0x1, GATCL1_TYPE_BYPASS = 0x2, } GATCL1RequestType; typedef enum TCC_CACHE_POLICIES { TCC_CACHE_POLICY_LRU = 0x0, TCC_CACHE_POLICY_STREAM = 0x1, } TCC_CACHE_POLICIES; typedef enum MTYPE { MTYPE_NC_NV = 0x0, MTYPE_NC = 0x1, MTYPE_CC = 0x2, MTYPE_UC = 0x3, } MTYPE; typedef enum PERFMON_COUNTER_MODE { PERFMON_COUNTER_MODE_ACCUM = 0x0, PERFMON_COUNTER_MODE_ACTIVE_CYCLES = 0x1, PERFMON_COUNTER_MODE_MAX = 0x2, PERFMON_COUNTER_MODE_DIRTY = 0x3, PERFMON_COUNTER_MODE_SAMPLE = 0x4, PERFMON_COUNTER_MODE_CYCLES_SINCE_FIRST_EVENT = 0x5, PERFMON_COUNTER_MODE_CYCLES_SINCE_LAST_EVENT = 0x6, PERFMON_COUNTER_MODE_CYCLES_GE_HI = 0x7, PERFMON_COUNTER_MODE_CYCLES_EQ_HI = 0x8, PERFMON_COUNTER_MODE_INACTIVE_CYCLES = 0x9, PERFMON_COUNTER_MODE_RESERVED = 0xf, } PERFMON_COUNTER_MODE; typedef enum PERFMON_SPM_MODE { PERFMON_SPM_MODE_OFF = 0x0, PERFMON_SPM_MODE_16BIT_CLAMP = 0x1, PERFMON_SPM_MODE_16BIT_NO_CLAMP = 0x2, PERFMON_SPM_MODE_32BIT_CLAMP = 0x3, PERFMON_SPM_MODE_32BIT_NO_CLAMP = 0x4, PERFMON_SPM_MODE_RESERVED_5 = 0x5, PERFMON_SPM_MODE_RESERVED_6 = 0x6, PERFMON_SPM_MODE_RESERVED_7 = 0x7, PERFMON_SPM_MODE_TEST_MODE_0 = 0x8, PERFMON_SPM_MODE_TEST_MODE_1 = 0x9, PERFMON_SPM_MODE_TEST_MODE_2 = 0xa, } PERFMON_SPM_MODE; typedef enum SurfaceTiling { ARRAY_LINEAR = 0x0, ARRAY_TILED = 0x1, } SurfaceTiling; typedef enum SurfaceArray { ARRAY_1D = 0x0, ARRAY_2D = 0x1, ARRAY_3D = 0x2, ARRAY_3D_SLICE = 0x3, } SurfaceArray; typedef enum ColorArray { ARRAY_2D_ALT_COLOR = 0x0, ARRAY_2D_COLOR = 0x1, ARRAY_3D_SLICE_COLOR = 0x3, } ColorArray; typedef enum DepthArray { ARRAY_2D_ALT_DEPTH = 0x0, ARRAY_2D_DEPTH = 0x1, } DepthArray; typedef enum ENUM_NUM_SIMD_PER_CU { NUM_SIMD_PER_CU = 0x4, } ENUM_NUM_SIMD_PER_CU; typedef enum MEM_PWR_FORCE_CTRL { NO_FORCE_REQUEST = 0x0, FORCE_LIGHT_SLEEP_REQUEST = 0x1, FORCE_DEEP_SLEEP_REQUEST = 0x2, FORCE_SHUT_DOWN_REQUEST = 0x3, } MEM_PWR_FORCE_CTRL; typedef enum MEM_PWR_FORCE_CTRL2 { NO_FORCE_REQ = 0x0, FORCE_LIGHT_SLEEP_REQ = 0x1, } MEM_PWR_FORCE_CTRL2; typedef enum MEM_PWR_DIS_CTRL { ENABLE_MEM_PWR_CTRL = 0x0, DISABLE_MEM_PWR_CTRL = 0x1, } MEM_PWR_DIS_CTRL; typedef enum MEM_PWR_SEL_CTRL { DYNAMIC_SHUT_DOWN_ENABLE = 0x0, DYNAMIC_DEEP_SLEEP_ENABLE = 0x1, DYNAMIC_LIGHT_SLEEP_ENABLE = 0x2, } MEM_PWR_SEL_CTRL; typedef enum MEM_PWR_SEL_CTRL2 { DYNAMIC_DEEP_SLEEP_EN = 0x0, DYNAMIC_LIGHT_SLEEP_EN = 0x1, } MEM_PWR_SEL_CTRL2; #endif /* UVD_6_0_ENUM_H */
{ "pile_set_name": "Github" }
// @ts-check // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts const { SpecReporter } = require('jasmine-spec-reporter'); /** * @type { import("protractor").Config } */ exports.config = { allScriptsTimeout: 11000, specs: [ './src/**/*.e2e-spec.ts' ], capabilities: { browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, print: function() {} }, onPrepare() { require('ts-node').register({ project: require('path').join(__dirname, './tsconfig.json') }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } };
{ "pile_set_name": "Github" }
/* File: startup_lpc11xx.S, derived from startup_ARMCM0.S * Purpose: startup file for Cortex-M0 devices. Should use with * GCC for ARM Embedded Processors * Version: V1.4 * Date: 09 July 2012 * * Copyright (c) 2011, 2012, ARM Limited * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the ARM Limited 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 ARM LIMITED 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. */ .syntax unified .arch armv6-m .section .stack .align 3 #ifdef __STACK_SIZE .equ Stack_Size, __STACK_SIZE #else .equ Stack_Size, 0xc00 #endif .globl __StackTop .globl __StackLimit __StackLimit: .space Stack_Size .size __StackLimit, . - __StackLimit __StackTop: .size __StackTop, . - __StackTop .section .heap .align 3 #ifdef __HEAP_SIZE .equ Heap_Size, __HEAP_SIZE #else .equ Heap_Size, 0 #endif .globl __HeapBase .globl __HeapLimit __HeapBase: .if Heap_Size .space Heap_Size .endif .size __HeapBase, . - __HeapBase __HeapLimit: .size __HeapLimit, . - __HeapLimit .section .isr_vector .align 2 .globl __isr_vector __isr_vector: .long __StackTop /* Top of Stack */ .long Reset_Handler /* Reset Handler */ .long NMI_Handler /* NMI Handler */ .long HardFault_Handler /* Hard Fault Handler */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long SVC_Handler /* SVCall Handler */ .long 0 /* Reserved */ .long 0 /* Reserved */ .long PendSV_Handler /* PendSV Handler */ .long SysTick_Handler /* SysTick Handler */ /* External interrupts */ /* .long Default_Handler */ .long WAKEUP0_Handler /*!< All I/O pins can be used as wakeup source. */ .long WAKEUP1_Handler /*!< There are 13 pins in total for LPC11xx */ .long WAKEUP2_Handler .long WAKEUP3_Handler .long WAKEUP4_Handler .long WAKEUP5_Handler .long WAKEUP6_Handler .long WAKEUP7_Handler .long WAKEUP8_Handler .long WAKEUP9_Handler .long WAKEUP10_Handler .long WAKEUP11_Handler .long I2C_Handler /*!< I2C Interrupt */ .long TIMER_16_0_Handler /*!< 16-bit Timer0 Interrupt */ .long TIMER_16_1_Handler /*!< 16-bit Timer1 Interrupt */ .long TIMER_32_0_Handler /*!< 32-bit Timer0 Interrupt */ .long TIMER_32_1_Handler /*!< 32-bit Timer1 Interrupt */ .long SSP_Handler /*!< SSP Interrupt */ .long UART0_Handler /*!< UART Interrupt */ .long UART1_Handler /*!< UART Interrupt */ .long CMP_Handler /*!< CMP Interrupt */ .long ADC_Handler /*!< A/D Converter Interrupt */ .long WDT_Handler /*!< Watchdog timer Interrupt */ .long BOD_Handler /*!< Brown Out Detect(BOD) Interrupt */ .long EINT0_Handler /*!< External Interrupt 0 Interrupt */ .long EINT1_Handler /*!< External Interrupt 1 Interrupt */ .long EINT2_Handler /*!< External Interrupt 2 Interrupt */ .long 0 .long DMA_Handler .long RTC_Handler .size __isr_vector, . - __isr_vector .text .thumb .thumb_func .align 1 .globl Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Loop to copy data from read only memory to RAM. The ranges * of copy from/to are specified by following symbols evaluated in * linker script. * __etext: End of code section, i.e., begin of data sections to copy from. * __data_start__/__data_end__: RAM address range that data should be * copied to. Both must be aligned to 4 bytes boundary. */ ldr r1, =__etext ldr r2, =__data_start__ ldr r3, =__data_end__ subs r3, r2 ble .LC0 .LC1: subs r3, 4 ldr r0, [r1,r3] str r0, [r2,r3] bgt .LC1 .LC0: #ifdef __STARTUP_CLEAR_BSS /* This part of work usually is done in C library startup code. Otherwise, * define this macro to enable it in this startup. * * Loop to zero out BSS section, which uses following symbols * in linker script: * __bss_start__: start of BSS section. Must align to 4 * __bss_end__: end of BSS section. Must align to 4 */ ldr r1, =__bss_start__ ldr r2, =__bss_end__ subs r2, r1 ble .LC3 movs r0, 0 .LC2: str r0, [r1, r2] subs r2, 4 bge .LC2 .LC3: #endif #ifndef __NO_SYSTEM_INIT bl SystemInit #endif #ifndef __START #define __START _start #endif bl __START .pool .size Reset_Handler, . - Reset_Handler /* Macro to define default handlers. Default handler * will be weak symbol and just dead loops. They can be * overwritten by other handlers */ .macro def_default_handler handler_name .align 1 .thumb_func .weak \handler_name .type \handler_name, %function \handler_name : b . .size \handler_name, . - \handler_name .endm def_default_handler NMI_Handler def_default_handler HardFault_Handler def_default_handler SVC_Handler def_default_handler PendSV_Handler def_default_handler SysTick_Handler def_default_handler WAKEUP0_Handler /*!< All I/O pins can be used as wakeup source. */ def_default_handler WAKEUP1_Handler /*!< There are 13 pins in total for LPC11xx */ def_default_handler WAKEUP2_Handler def_default_handler WAKEUP3_Handler def_default_handler WAKEUP4_Handler def_default_handler WAKEUP5_Handler def_default_handler WAKEUP6_Handler def_default_handler WAKEUP7_Handler def_default_handler WAKEUP8_Handler def_default_handler WAKEUP9_Handler def_default_handler WAKEUP10_Handler def_default_handler WAKEUP11_Handler def_default_handler I2C_Handler /*!< I2C Interrupt */ def_default_handler TIMER_16_0_Handler /*!< 16-bit Timer0 Interrupt */ def_default_handler TIMER_16_1_Handler /*!< 16-bit Timer1 Interrupt */ def_default_handler TIMER_32_0_Handler /*!< 32-bit Timer0 Interrupt */ def_default_handler TIMER_32_1_Handler /*!< 32-bit Timer1 Interrupt */ def_default_handler SSP_Handler /*!< SSP Interrupt */ def_default_handler UART0_Handler /*!< UART Interrupt */ def_default_handler UART1_Handler /*!< UART Interrupt */ def_default_handler CMP_Handler /*!< CMP Interrupt */ def_default_handler ADC_Handler /*!< A/D Converter Interrupt */ def_default_handler WDT_Handler /*!< Watchdog timer Interrupt */ def_default_handler BOD_Handler /*!< Brown Out Detect(BOD) Interrupt */ def_default_handler EINT0_Handler /*!< External Interrupt 0 Interrupt */ def_default_handler EINT1_Handler /*!< External Interrupt 1 Interrupt */ def_default_handler EINT2_Handler /*!< External Interrupt 2 Interrupt */ def_default_handler DMA_Handler def_default_handler RTC_Handler def_default_handler Default_Handler .weak DEF_IRQHandler .set DEF_IRQHandler, Default_Handler .end
{ "pile_set_name": "Github" }
StartChar: uni04EF Encoding: 1263 1263 695 Width: 1060 VWidth: 14 Flags: W HStem: -376 202<126.917 325.973> -52 20G<22 57> 751 262<153 289.078> 1271 194<501.574 967.216> VStem: 466 538 838 256<822.65 1013> LayerCount: 2 Fore Refer: 326 772 N 1 0 0 1 19 -192 2 Refer: 557 1091 N 1 0 0 1 0 0 3 Validated: 1 EndChar
{ "pile_set_name": "Github" }
import urllib, tarfile, gzip, os, shutil, pandas as pd dataname = 'abalone.pickle' if not os.path.exists(dataname): filename = 'abalone.tar.gz' # Download tmp data: urllib.urlretrieve('ftp://ftp.cs.toronto.edu/pub/neuron/delve/data/tarfiles/abalone.tar.gz', filename) # Extract data folder: with tarfile.open(filename, mode='r:gz') as t: t.extract('abalone/Dataset.data.gz') t.extract('abalone/Dataset.spec') # Extract data with gzip.open('abalone/Dataset.data.gz') as t: data = pd.read_csv(t, sep=' ', header=None) with open('abalone/Dataset.spec') as f: start_reading = False columns = [] for line in f.readlines(): if start_reading: columns.append(line[6:26].strip(' ')) if 'Attributes:' in line: start_reading = True data.columns = columns data.to_pickle('abalone.pickle') shutil.rmtree('abalone') if os.path.exists(filename): os.remove(filename) else: data = pd.read_pickle('abalone.pickle')
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> @class NSMutableArray, NSMutableSet; @interface WFWhitelistSiteBuffer : NSObject { NSMutableSet *_siteSet; NSMutableArray *_siteBuffer; unsigned long long maxSize; } @property(retain) NSMutableArray *siteBuffer; // @synthesize siteBuffer=_siteBuffer; @property(retain) NSMutableSet *siteSet; // @synthesize siteSet=_siteSet; - (void)trimToSize:(unsigned long long)arg1; - (id)description; - (unsigned long long)count; @property unsigned long long maxSize; - (BOOL)containsMetasitePrefixOfURLString:(id)arg1; - (BOOL)containsURLString:(id)arg1; - (void)addURLString:(id)arg1; - (void)dealloc; - (id)init; @end
{ "pile_set_name": "Github" }
/** * Copyright 2017 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-103191999-1', 'auto'); ga('send', 'pageview'); _pubsubhub.subscribe('navigation', ({address}) => { ga('set', 'page', new URL(address).pathname); ga('send', 'pageview'); });
{ "pile_set_name": "Github" }
var anObject = require('./$.an-object') , get = require('./core.get-iterator-method'); module.exports = require('./$.core').getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); };
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Nikse.SubtitleEdit.Core.ContainerFormats.TransportStream { public class ProgramMapTableStream { public const int StreamTypePrivateData = 6; public List<ProgramMapTableDescriptor> Descriptors; public int StreamType { get; set; } public int ElementaryPid { get; set; } public int Size { get; set; } public ProgramMapTableStream(byte[] data, int index) { StreamType = data[index]; // 13 bytes (skip first 3) ElementaryPid = (data[index + 1] & 0b00011111) * 256 + // first 5 bytes data[index + 2]; // last 8 bytes var esInfoLength = (data[index + 3] & 0b00001111) * 256 + // first 5 bytes data[index + 4]; // last 8 bytes Descriptors = ProgramMapTableDescriptor.ReadDescriptors(data, esInfoLength, index + 5); Size = 5 + Descriptors.Sum(p => p.Size); } public string GetStreamTypeString() { switch (StreamType) { case 0x00: return "ITU-T | ISO/IEC Reserved"; case 0x01: return "ISO/IEC 11172 Video"; case 0x02: return "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream"; case 0x03: return "ISO/IEC 11172 Audio"; case 0x04: return "ISO/IEC 13818-3 Audio"; case 0x05: return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections"; case 0x06: return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data"; case 0x07: return "ISO/IEC 13522 MHEG"; case 0x08: return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC"; case 0x09: return "ITU-T Rec. H.222.1"; case 0x0A: return "ISO/IEC 13818-6 type A"; case 0x0B: return "ISO/IEC 13818-6 type B"; case 0x0C: return "ISO/IEC 13818-6 type C"; case 0x0D: return "ISO/IEC 13818-6 type D"; case 0x0E: return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary"; case 0x0F: return "ISO/IEC 13818-7 Audio with ADTS transport syntax"; case 0x10: return "ISO/IEC 14496-2 Visual"; case 0x11: return "ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1"; case 0x12: return "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets"; case 0x13: return "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections"; case 0x14: return "ISO/IEC 13818-6 Synchronized Download Protocol"; case int n when n > 0x15 && n <= 0x7F: return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved"; default: return "User Private"; } } internal string GetLanguage() { foreach (var descriptor in Descriptors) { if (descriptor.Tag != ProgramMapTableDescriptor.TagCaDescriptor) { var sb = new StringBuilder(); foreach (var b in descriptor.Content) { if (b >= 32) { sb.Append(Convert.ToChar(b)); } else { break; } } var l = sb.ToString().TrimEnd(' ', '$', '(', ')'); return l.Length > 3 ? l.Substring(0, 3) : l; } } return string.Empty; } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="Javadoc API documentation." /> <link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> <title> KSYMVFrameInfo </title> <link href="../../../../../../assets/doclava-developer-docs.css" rel="stylesheet" type="text/css" /> <link href="../../../../../../assets/customizations.css" rel="stylesheet" type="text/css" /> <script src="../../../../../../assets/search_autocomplete.js" type="text/javascript"></script> <script src="../../../../../../assets/jquery-resizable.min.js" type="text/javascript"></script> <script src="../../../../../../assets/doclava-developer-docs.js" type="text/javascript"></script> <script src="../../../../../../assets/prettify.js" type="text/javascript"></script> <script type="text/javascript"> setToRoot("../../../../../", "../../../../../../assets/"); </script> <script src="../../../../../../assets/doclava-developer-reference.js" type="text/javascript"></script> <script src="../../../../../../assets/navtree_data.js" type="text/javascript"></script> <script src="../../../../../../assets/customizations.js" type="text/javascript"></script> <noscript> <style type="text/css"> html,body{overflow:auto;} #body-content{position:relative; top:0;} #doc-content{overflow:visible;border-left:3px solid #666;} #side-nav{padding:0;} #side-nav .toggle-list ul {display:block;} #resize-packages-nav{border-bottom:3px solid #666;} </style> </noscript> </head> <body class=""> <div id="header"> <div id="headerLeft"> </div> <div id="headerRight"> <div id="search" > <div id="searchForm"> <form accept-charset="utf-8" class="gsc-search-box" onsubmit="return submit_search()"> <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody> <tr> <td class="gsc-input"> <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off" title="search developer docs" name="q" value="search developer docs" onFocus="search_focus_changed(this, true)" onBlur="search_focus_changed(this, false)" onkeydown="return search_changed(event, true, '../../../../../')" onkeyup="return search_changed(event, false, '../../../../../')" /> <div id="search_filtered_div" class="no-display"> <table id="search_filtered" cellspacing=0> </table> </div> </td> <td class="gsc-search-button"> <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" /> </td> <td class="gsc-clear-button"> <div title="clear results" class="gsc-clear-button">&nbsp;</div> </td> </tr></tbody> </table> </form> </div><!-- searchForm --> </div><!-- search --> </div> </div><!-- header --> <div class="g-section g-tpl-240" id="body-content"> <div class="g-unit g-first side-nav-resizable" id="side-nav"> <div id="swapper"> <div id="nav-panels"> <div id="resize-packages-nav"> <div id="packages-nav"> <div id="index-links"> <a href="../../../../../packages.html" >Package Index</a> | <a href="../../../../../classes.html" >Class Index</a> </div> <ul> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/capture/package-summary.html">com.ksyun.media.shortvideo.capture</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/filter/package-summary.html">com.ksyun.media.shortvideo.filter</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/kit/package-summary.html">com.ksyun.media.shortvideo.kit</a></li> <li class="selected api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/mv/package-summary.html">com.ksyun.media.shortvideo.mv</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/sticker/package-summary.html">com.ksyun.media.shortvideo.sticker</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/timereffect/package-summary.html">com.ksyun.media.shortvideo.timereffect</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/transition/package-summary.html">com.ksyun.media.shortvideo.transition</a></li> <li class="api apilevel-"> <a href="../../../../../com/ksyun/media/shortvideo/utils/package-summary.html">com.ksyun.media.shortvideo.utils</a></li> </ul><br/> </div> <!-- end packages --> </div> <!-- end resize-packages --> <div id="classes-nav"> <ul> <li><h2>Classes</h2> <ul> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVAVInfo.html">KSYMVAVInfo</a></li> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFilterInfo.html">KSYMVFilterInfo</a></li> <li class="selected api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html">KSYMVFrameInfo</a></li> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVInfo.html">KSYMVInfo</a></li> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVMgt.html">KSYMVMgt</a></li> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/MVImgTexFilterBase.html">MVImgTexFilterBase</a></li> <li class="api apilevel-"><a href="../../../../../com/ksyun/media/shortvideo/mv/MVScreenTexFilter.html">MVScreenTexFilter</a></li> </ul> </li> </ul><br/> </div><!-- end classes --> </div><!-- end nav-panels --> <div id="nav-tree" style="display:none"> <div id="index-links"> <a href="../../../../../packages.html" >Package Index</a> | <a href="../../../../../classes.html" >Class Index</a> </div> </div><!-- end nav-tree --> </div><!-- end swapper --> </div> <!-- end side-nav --> <script> if (!isMobile) { $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav"); chooseDefaultNav(); if ($("#nav-tree").is(':visible')) { init_default_navtree("../../../../../"); } else { addLoadEvent(function() { scrollIntoView("packages-nav"); scrollIntoView("classes-nav"); }); } $("#swapper").css({borderBottom:"2px solid #aaa"}); } else { swapNav(); // tree view should be used on mobile } </script> <div class="g-unit" id="doc-content"> <div id="api-info-block"> <div class="sum-details-links"> Summary: <a href="#constants">Constants</a> &#124; <a href="#lfields">Fields</a> &#124; <a href="#pubctors">Ctors</a> &#124; <a href="#inhmethods">Inherited Methods</a> &#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> </div><!-- end sum-details-links --> <div class="api-level"> </div> </div><!-- end api-info-block --> <!-- ======== START OF CLASS DATA ======== --> <div id="jd-header"> public class <h1>KSYMVFrameInfo</h1> extends Object<br/> </div><!-- end header --> <div id="naMessage"></div> <div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> <tr> <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="1" class="jd-inheritance-class-cell">com.ksyun.media.shortvideo.mv.KSYMVFrameInfo</td> </tr> </table> <div class="jd-descr"> <h2>Class Overview</h2> <p>frame info for mv </p> </div><!-- jd-descr --> <div class="jd-descr"> <h2>Summary</h2> <!-- =========== ENUM CONSTANT SUMMARY =========== --> <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol">long</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#DEFAULT_FILTER_TIME_DURATION">DEFAULT_FILTER_TIME_DURATION</a></td> <td class="jd-descrcol" width="100%"></td> </tr> </table> <!-- =========== FIELD SUMMARY =========== --> <table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> public int</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#eid">eid</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class=" api apilevel-" > <td class="jd-typecol"> public long</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#fdur">fdur</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> public int</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#fid">fid</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class=" api apilevel-" > <td class="jd-typecol"> public ImgFilterBase</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#filter">filter</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> public boolean</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#fs">fs</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class=" api apilevel-" > <td class="jd-typecol"> public long</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#t">t</a></td> <td class="jd-descrcol" width="100%"></td> </tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> public String</td> <td class="jd-linkcol"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#vtrack">vtrack</a></td> <td class="jd-descrcol" width="100%"></td> </tr> </table> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#KSYMVFrameInfo(int, int, long, java.lang.String, boolean)">KSYMVFrameInfo</a></span>(int eid, int fid, long t, String vtrack, boolean fs) </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../../com/ksyun/media/shortvideo/mv/KSYMVFrameInfo.html#KSYMVFrameInfo(int, int, long, java.lang.String, boolean, long)">KSYMVFrameInfo</a></span>(int eid, int fid, long t, String vtrack, boolean fs, long fdur) </td></tr> </table> <!-- ========== METHOD SUMMARY =========== --> <table id="inhmethods" class="jd-sumtable"><tr><th> <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Methods</div></th></tr> <tr class="api apilevel-" > <td colspan="12"> <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" ><img id="inherited-methods-java.lang.Object-trigger" src="../../../../../../assets/images/triangle-closed.png" class="jd-expando-trigger-img" /></a> From class java.lang.Object <div id="inherited-methods-java.lang.Object"> <div id="inherited-methods-java.lang.Object-list" class="jd-inheritedlinks"> </div> <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> <table class="jd-sumtable-expando"> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> Object </td> <td class="jd-linkcol" width="100%"> <span class="sympad">clone</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad">equals</span>(Object arg0) </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">finalize</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final Class&lt;?&gt; </td> <td class="jd-linkcol" width="100%"> <span class="sympad">getClass</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> int </td> <td class="jd-linkcol" width="100%"> <span class="sympad">hashCode</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">notify</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">notifyAll</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> String </td> <td class="jd-linkcol" width="100%"> <span class="sympad">toString</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>(long arg0, int arg1) </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>(long arg0) </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>() </td></tr> </table> </div> </div> </td></tr> </table> </div><!-- jd-descr (summary) --> <!-- Details --> <!-- XML Attributes --> <!-- Enum Values --> <!-- Constants --> <!-- ========= ENUM CONSTANTS DETAIL ======== --> <h2>Constants</h2> <a id="DEFAULT_FILTER_TIME_DURATION"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public static final long </span> DEFAULT_FILTER_TIME_DURATION </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> <div class="jd-tagdata"> <span class="jd-tagtitle">Constant Value: </span> <span> 1000 (0x00000000000003e8) </span> </div> </div> </div> <!-- Fields --> <!-- ========= FIELD DETAIL ======== --> <h2>Fields</h2> <a id="eid"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public int </span> eid </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="fdur"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public long </span> fdur </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="fid"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public int </span> fid </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="filter"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public ImgFilterBase </span> filter </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="fs"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> fs </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="t"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public long </span> t </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="vtrack"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public String </span> vtrack </h4> <div class="api-level"> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <!-- Public ctors --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <h2>Public Constructors</h2> <a id="KSYMVFrameInfo(int, int, long, java.lang.String, boolean)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public </span> <span class="sympad">KSYMVFrameInfo</span> <span class="normal">(int eid, int fid, long t, String vtrack, boolean fs)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="KSYMVFrameInfo(int, int, long, java.lang.String, boolean, long)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public </span> <span class="sympad">KSYMVFrameInfo</span> <span class="normal">(int eid, int fid, long t, String vtrack, boolean fs, long fdur)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- Protected ctors --> <!-- ========= METHOD DETAIL ======== --> <!-- Public methdos --> <!-- ========= METHOD DETAIL ======== --> <!-- ========= END OF CLASS DATA ========= --> <a id="navbar_top"></a> <div id="footer"> Generated by <a href="http://code.google.com/p/doclava/">Doclava</a>. </div> <!-- end footer --> </div> <!-- jd-content --> </div><!-- end doc-content --> </div> <!-- end body-content --> <script type="text/javascript"> init(); /* initialize doclava-developer-docs.js */ </script> </body> </html>
{ "pile_set_name": "Github" }
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This 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 software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.xwiki.rendering.signature.internal; import java.io.IOException; import java.security.GeneralSecurityException; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; import org.xwiki.component.annotation.Component; import org.xwiki.crypto.pkix.CertificateProvider; import org.xwiki.crypto.signer.CMSSignedDataVerifier; import org.xwiki.crypto.signer.param.CMSSignedDataVerified; import org.xwiki.rendering.block.Block; import org.xwiki.rendering.block.MacroBlock; import org.xwiki.rendering.block.MacroMarkerBlock; import org.xwiki.rendering.signature.BlockSignatureVerifier; /** * Verify signature of {@link org.xwiki.rendering.block.MacroBlock} * and {@link org.xwiki.rendering.block.MacroMarkerBlock}. * * @version $Id: 04201baa08356d31a57107c2255018b253c1512a $ * @since 6.1M2 */ @Component @Named("macro") @Singleton public class MacroBlockSignatureVerifier implements BlockSignatureVerifier { @Inject @Named("macro") private BlockDumper dumper; @Inject private CMSSignedDataVerifier verifier; @Override public CMSSignedDataVerified verify(byte[] signature, Block block, CertificateProvider certificateProvider) throws GeneralSecurityException, IOException { if (!isSupported(block)) { throw new IllegalArgumentException("Unsupported block [" + block.getClass().getName() + "]."); } return verifier.verify(signature, dumper.dump(block), certificateProvider); } @Override public boolean isSupported(Block block) { return (block instanceof MacroBlock || block instanceof MacroMarkerBlock); } }
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * at91-sama5d27_wlsom1_ek-u-boot.dts - Device Tree file for SAMA5D27 WLSOM1 EK * * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries * * Author: Eugen Hristev <eugen.hristev@microchip.com> */ / { chosen { u-boot,dm-pre-reloc; }; }; &hlcdc { u-boot,dm-pre-reloc; }; &qspi1 { u-boot,dm-pre-reloc; }; &qspi1_flash { u-boot,dm-pre-reloc; }; &sdmmc0 { u-boot,dm-pre-reloc; }; &uart0 { u-boot,dm-pre-reloc; }; &sfr { u-boot,dm-pre-reloc; }; &pinctrl_sdmmc0_cmd_dat_default { u-boot,dm-pre-reloc; }; &pinctrl_sdmmc0_ck_cd_default { u-boot,dm-pre-reloc; }; &pinctrl_uart0_default { u-boot,dm-pre-reloc; }; &pinctrl_qspi1_default { u-boot,dm-pre-reloc; };
{ "pile_set_name": "Github" }
#ifndef __MY_HBINARYTREE #define __MY_HBINARYTREE /******************************************************************* HBTreeBase - b-tree object has: Parent,Left,Right virtuals: maCmp Cmp( .. ) - compare leath\value|leath. Must be overriden for new b-tree type PHBTreeBase DoCreate( HANDLE Param ) - create new b-tree of self type Must be overrided on each new descendants void DoDeleteLeath( PHBTreeBase& p ) - call on every b-tree item deletion HBNumTree - DWORD-indexed b-tree has: ID HBNumPtrTree - template DWORD-indexed b-tree, that holds an object pointer deleted on leath destroy has: Object HBNumObjectTree - template DWORD-indexed b-tree, that holds an object reference has: Object HBNameTree - name-indexed b-tree has: Name HBNamePtrTree - template name-indexed b-tree, that holds an object pointer deleted on leath destroy has: Object HBNameObjectTree - template DWORD-indexed b-tree, that holds an object reference has: Object *******************************************************************/ CLASS( HBTreeBase ) public: typedef BOOL (RTL_CALLBACK *HBTreeEnum)( PHBTreeBase tree,int Level,HANDLE UserPtr ); #if defined(__BCWIN32__) typedef BOOL __fastcall (__closure *HBTreeEnumCL)( PHBTreeBase tree,int Level ); #endif public: PHBTreeBase Parent, Left, Right; private: BOOL DoEnum( void ) const; BOOL DoEnumSort( void ) const; #if defined(__BCWIN32__) BOOL DoEnumCL( void ) const; BOOL DoEnumSortCL( void ) const; #endif protected: virtual maCmp Cmp( PHBTreeBase p ) = 0; virtual maCmp Cmp( HANDLE Param ) = 0; virtual PHBTreeBase DoCreate( HANDLE Param ) = 0; virtual void DoDeleteLeath( PHBTreeBase& p ); public: HBTreeBase( void ); virtual ~HBTreeBase(); BOOL isLeath( void ) const { return Left == NULL && Right == NULL; } BOOL isRoot( void ) const { return Parent == NULL; } BOOL Enum( HBTreeEnum CB,HANDLE Ptr = NULL ) const; //Enumerate all sub-leath except self in creation order BOOL EnumSort( HBTreeEnum CB,HANDLE Ptr = NULL ) const; //Enumerate all sub-leath except self in sort-inserted order #if defined(__BCWIN32__) BOOL EnumCL( HBTreeEnumCL CB ) const; BOOL EnumSortCL( HBTreeEnumCL CB ) const; #endif void Clear( void ) { DoDeleteLeath(Left); DoDeleteLeath(Right); } void UnlinkSubtree( void ); //Remove self from b-tree, all sub-leath stay intact void UnlinkSelf( void ); //Remove self from b-tree, all sub-leath are inserted into parent tree BOOL Insert( PHBTreeBase p ); //Insert `p` as sub-leath PHBTreeBase Add( HANDLE nm ); //Create and add new `nm` leath. If `nm` exist returns NULL PHBTreeBase Locate( HANDLE nm ); //Locate a `nm` leath. If `nm` not exist returns NULL }; //--------------------------------------------------------------------------- CLASSBASE( HBNumTree, public HBTreeBase ) public: HANDLE ID; protected: virtual maCmp Cmp( HANDLE Param ); virtual maCmp Cmp( PHBTreeBase p ); virtual PHBTreeBase DoCreate( HANDLE Param ); public: HBNumTree( HANDLE id ) { ID = id; } }; template <class T> class HBNumPtrTree : public HBNumTree { protected: virtual PHBTreeBase DoCreate( HANDLE Param ) { return new HBNumPtrTree<T>((HANDLE)Param); } public: T Object; public: HBNumPtrTree( HANDLE id = NULL ) : HBNumTree(id) { Object = NULL; } ~HBNumPtrTree() { FreePtr(Object); } }; template <class T> class HBNumObjectTree : public HBNumTree { protected: virtual PHBTreeBase DoCreate( HANDLE Param ) { return new HBNumObjectTree<T>((HANDLE)Param); } public: T Object; public: HBNumObjectTree( HANDLE id ) : HBNumTree(id) {} }; //--------------------------------------------------------------------------- template <class NameT> class HBNameTree : public HBTreeBase { protected: virtual maCmp Cmp( PHBTreeBase p ) { return Cmp( (HANDLE)((HBNameTree<NameT>*)p)->Name.Text() ); } virtual maCmp Cmp( HANDLE Param ) { return Int2Cmp(StrCmp(Name.Text(),(CONSTSTR)Param)); } virtual PHBTreeBase DoCreate( HANDLE Param ) { return new HBNameTree<NameT>((CONSTSTR)Param); } public: NameT Name; public: HBNameTree( CONSTSTR nm = NULL ) : Name(nm) {} }; template <class T,class NameT> class HBNamePtrTree : public HBNameTree<NameT> { protected: virtual PHBTreeBase DoCreate( HANDLE Param ) { return new HBNamePtrTree<T,NameT>((CONSTSTR)Param); } public: T Object; public: HBNamePtrTree( CONSTSTR nm = NULL ) : HBNameTree<NameT>(nm) { Object = NULL; } ~HBNamePtrTree() { FreePtr(Object); } }; template <class T,class NameT> class HBNameObjectTree : public HBNameTree<NameT> { protected: virtual PHBTreeBase DoCreate( HANDLE Param ) { return new HBNameObjectTree<T,NameT>((CONSTSTR)Param); } public: T Object; public: HBNameObjectTree( CONSTSTR nm = NULL ) : HBNameTree<NameT>(nm){} }; #endif
{ "pile_set_name": "Github" }
// Generated from D:/ZStack/zstack/search/src/main/antlr4\ZQL.g4 by ANTLR 4.7 package org.zstack.zql.antlr4; import org.antlr.v4.runtime.tree.ParseTreeVisitor; /** * This interface defines a complete generic visitor for a parse tree produced * by {@link ZQLParser}. * * @param <T> The return type of the visit operation. Use {@link Void} for * operations with no return type. */ public interface ZQLVisitor<T> extends ParseTreeVisitor<T> { /** * Visit a parse tree produced by {@link ZQLParser#zqls}. * @param ctx the parse tree * @return the visitor result */ T visitZqls(ZQLParser.ZqlsContext ctx); /** * Visit a parse tree produced by the {@code queryGrammar} * labeled alternative in {@link ZQLParser#zql}. * @param ctx the parse tree * @return the visitor result */ T visitQueryGrammar(ZQLParser.QueryGrammarContext ctx); /** * Visit a parse tree produced by the {@code countGrammar} * labeled alternative in {@link ZQLParser#zql}. * @param ctx the parse tree * @return the visitor result */ T visitCountGrammar(ZQLParser.CountGrammarContext ctx); /** * Visit a parse tree produced by the {@code sumGrammar} * labeled alternative in {@link ZQLParser#zql}. * @param ctx the parse tree * @return the visitor result */ T visitSumGrammar(ZQLParser.SumGrammarContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#entity}. * @param ctx the parse tree * @return the visitor result */ T visitEntity(ZQLParser.EntityContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#field}. * @param ctx the parse tree * @return the visitor result */ T visitField(ZQLParser.FieldContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#multiFields}. * @param ctx the parse tree * @return the visitor result */ T visitMultiFields(ZQLParser.MultiFieldsContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#operator}. * @param ctx the parse tree * @return the visitor result */ T visitOperator(ZQLParser.OperatorContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#value}. * @param ctx the parse tree * @return the visitor result */ T visitValue(ZQLParser.ValueContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#logicalOperator}. * @param ctx the parse tree * @return the visitor result */ T visitLogicalOperator(ZQLParser.LogicalOperatorContext ctx); /** * Visit a parse tree produced by the {@code simpleValue} * labeled alternative in {@link ZQLParser#complexValue}. * @param ctx the parse tree * @return the visitor result */ T visitSimpleValue(ZQLParser.SimpleValueContext ctx); /** * Visit a parse tree produced by the {@code subQueryValue} * labeled alternative in {@link ZQLParser#complexValue}. * @param ctx the parse tree * @return the visitor result */ T visitSubQueryValue(ZQLParser.SubQueryValueContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#expr}. * @param ctx the parse tree * @return the visitor result */ T visitExpr(ZQLParser.ExprContext ctx); /** * Visit a parse tree produced by the {@code nestCondition} * labeled alternative in {@link ZQLParser#condition}. * @param ctx the parse tree * @return the visitor result */ T visitNestCondition(ZQLParser.NestConditionContext ctx); /** * Visit a parse tree produced by the {@code simpleCondition} * labeled alternative in {@link ZQLParser#condition}. * @param ctx the parse tree * @return the visitor result */ T visitSimpleCondition(ZQLParser.SimpleConditionContext ctx); /** * Visit a parse tree produced by the {@code parenthesisCondition} * labeled alternative in {@link ZQLParser#condition}. * @param ctx the parse tree * @return the visitor result */ T visitParenthesisCondition(ZQLParser.ParenthesisConditionContext ctx); /** * Visit a parse tree produced by the {@code onlyEntity} * labeled alternative in {@link ZQLParser#queryTarget}. * @param ctx the parse tree * @return the visitor result */ T visitOnlyEntity(ZQLParser.OnlyEntityContext ctx); /** * Visit a parse tree produced by the {@code withSingleField} * labeled alternative in {@link ZQLParser#queryTarget}. * @param ctx the parse tree * @return the visitor result */ T visitWithSingleField(ZQLParser.WithSingleFieldContext ctx); /** * Visit a parse tree produced by the {@code withMultiFields} * labeled alternative in {@link ZQLParser#queryTarget}. * @param ctx the parse tree * @return the visitor result */ T visitWithMultiFields(ZQLParser.WithMultiFieldsContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#function}. * @param ctx the parse tree * @return the visitor result */ T visitFunction(ZQLParser.FunctionContext ctx); /** * Visit a parse tree produced by the {@code withoutFunction} * labeled alternative in {@link ZQLParser#queryTargetWithFunction}. * @param ctx the parse tree * @return the visitor result */ T visitWithoutFunction(ZQLParser.WithoutFunctionContext ctx); /** * Visit a parse tree produced by the {@code withFunction} * labeled alternative in {@link ZQLParser#queryTargetWithFunction}. * @param ctx the parse tree * @return the visitor result */ T visitWithFunction(ZQLParser.WithFunctionContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#orderByExpr}. * @param ctx the parse tree * @return the visitor result */ T visitOrderByExpr(ZQLParser.OrderByExprContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#orderBy}. * @param ctx the parse tree * @return the visitor result */ T visitOrderBy(ZQLParser.OrderByContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#limit}. * @param ctx the parse tree * @return the visitor result */ T visitLimit(ZQLParser.LimitContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#offset}. * @param ctx the parse tree * @return the visitor result */ T visitOffset(ZQLParser.OffsetContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#restrictByExpr}. * @param ctx the parse tree * @return the visitor result */ T visitRestrictByExpr(ZQLParser.RestrictByExprContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#restrictBy}. * @param ctx the parse tree * @return the visitor result */ T visitRestrictBy(ZQLParser.RestrictByContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#returnWithExprBlock}. * @param ctx the parse tree * @return the visitor result */ T visitReturnWithExprBlock(ZQLParser.ReturnWithExprBlockContext ctx); /** * Visit a parse tree produced by the {@code returnWithExprId} * labeled alternative in {@link ZQLParser#returnWithExpr}. * @param ctx the parse tree * @return the visitor result */ T visitReturnWithExprId(ZQLParser.ReturnWithExprIdContext ctx); /** * Visit a parse tree produced by the {@code returnWithExprFunction} * labeled alternative in {@link ZQLParser#returnWithExpr}. * @param ctx the parse tree * @return the visitor result */ T visitReturnWithExprFunction(ZQLParser.ReturnWithExprFunctionContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#returnWith}. * @param ctx the parse tree * @return the visitor result */ T visitReturnWith(ZQLParser.ReturnWithContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#groupByExpr}. * @param ctx the parse tree * @return the visitor result */ T visitGroupByExpr(ZQLParser.GroupByExprContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#groupBy}. * @param ctx the parse tree * @return the visitor result */ T visitGroupBy(ZQLParser.GroupByContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#subQueryTarget}. * @param ctx the parse tree * @return the visitor result */ T visitSubQueryTarget(ZQLParser.SubQueryTargetContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#subQuery}. * @param ctx the parse tree * @return the visitor result */ T visitSubQuery(ZQLParser.SubQueryContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#filterByExprBlock}. * @param ctx the parse tree * @return the visitor result */ T visitFilterByExprBlock(ZQLParser.FilterByExprBlockContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#filterByExpr}. * @param ctx the parse tree * @return the visitor result */ T visitFilterByExpr(ZQLParser.FilterByExprContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#filterBy}. * @param ctx the parse tree * @return the visitor result */ T visitFilterBy(ZQLParser.FilterByContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#namedAsValue}. * @param ctx the parse tree * @return the visitor result */ T visitNamedAsValue(ZQLParser.NamedAsValueContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#namedAs}. * @param ctx the parse tree * @return the visitor result */ T visitNamedAs(ZQLParser.NamedAsContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#query}. * @param ctx the parse tree * @return the visitor result */ T visitQuery(ZQLParser.QueryContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#count}. * @param ctx the parse tree * @return the visitor result */ T visitCount(ZQLParser.CountContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#sumByValue}. * @param ctx the parse tree * @return the visitor result */ T visitSumByValue(ZQLParser.SumByValueContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#sumBy}. * @param ctx the parse tree * @return the visitor result */ T visitSumBy(ZQLParser.SumByContext ctx); /** * Visit a parse tree produced by {@link ZQLParser#sum}. * @param ctx the parse tree * @return the visitor result */ T visitSum(ZQLParser.SumContext ctx); }
{ "pile_set_name": "Github" }
/* * Copyright (c) 1999, 2010, 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. * */ #ifndef JAVA_MD_H #define JAVA_MD_H #include <limits.h> #include <unistd.h> #include <sys/param.h> #ifndef GAMMA #include "manifest_info.h" #endif #include "jli_util.h" #define PATH_SEPARATOR ':' #define FILESEP "/" #define FILE_SEPARATOR '/' #define IS_FILE_SEPARATOR(c) ((c) == '/') #ifndef MAXNAMELEN #define MAXNAMELEN PATH_MAX #endif #ifdef JAVA_ARGS /* * ApplicationHome is prepended to each of these entries; the resulting * strings are concatenated (separated by PATH_SEPARATOR) and used as the * value of -cp option to the launcher. */ #ifndef APP_CLASSPATH #define APP_CLASSPATH { "/lib/tools.jar", "/classes" } #endif #endif #ifdef HAVE_GETHRTIME /* * Support for doing cheap, accurate interval timing. */ #include <sys/time.h> #define CounterGet() (gethrtime()/1000) #define Counter2Micros(counts) (counts) #else #define CounterGet() (0) #define Counter2Micros(counts) (1) #endif /* HAVE_GETHRTIME */ /* * Function prototypes. */ #ifndef GAMMA char *LocateJRE(manifest_info *info); void ExecJRE(char *jre, char **argv); #endif int UnsetEnv(char *name); #endif
{ "pile_set_name": "Github" }
<?php $CHMOD_FOLDERS = array( 'data/backup-tool/import/', 'data/backup-tool/backup/', 'data/cache', 'data/import/', 'data/log/', 'data/sessions/', 'var/cache/', 'var/logs/' );
{ "pile_set_name": "Github" }
package jsoniter import ( "strconv" ) type floatAny struct { baseAny val float64 } func (any *floatAny) Parse() *Iterator { return nil } func (any *floatAny) ValueType() ValueType { return NumberValue } func (any *floatAny) MustBeValid() Any { return any } func (any *floatAny) LastError() error { return nil } func (any *floatAny) ToBool() bool { return any.ToFloat64() != 0 } func (any *floatAny) ToInt() int { return int(any.val) } func (any *floatAny) ToInt32() int32 { return int32(any.val) } func (any *floatAny) ToInt64() int64 { return int64(any.val) } func (any *floatAny) ToUint() uint { if any.val > 0 { return uint(any.val) } return 0 } func (any *floatAny) ToUint32() uint32 { if any.val > 0 { return uint32(any.val) } return 0 } func (any *floatAny) ToUint64() uint64 { if any.val > 0 { return uint64(any.val) } return 0 } func (any *floatAny) ToFloat32() float32 { return float32(any.val) } func (any *floatAny) ToFloat64() float64 { return any.val } func (any *floatAny) ToString() string { return strconv.FormatFloat(any.val, 'E', -1, 64) } func (any *floatAny) WriteTo(stream *Stream) { stream.WriteFloat64(any.val) } func (any *floatAny) GetInterface() interface{} { return any.val }
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /Users/bobomee/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
{ "pile_set_name": "Github" }
import { Aggregate } from '../../../../lib/common/elements/Aggregate'; import { assert } from 'assertthat'; import { CustomError } from 'defekt'; import { errors } from '../../../../lib/common/errors'; import { State } from '../../../../lib/common/elements/State'; import { validateAggregateDefinition } from '../../../../lib/common/validators/validateAggregateDefinition'; suite('validateAggregateDefinition', (): void => { /* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/no-useless-constructor */ class AggregateState implements State { public constructor () { // Intentionally left blank. } } /* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/no-useless-constructor */ const aggregateDefinition: Aggregate<AggregateState> = { getInitialState: (): AggregateState => new AggregateState(), commandHandlers: {}, domainEventHandlers: {} }; test('does not throw an error if everything is fine.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition }); }).is.not.throwing(); }); test('throws an error if getInitialState is missing.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, getInitialState: undefined } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Function 'getInitialState' is missing.` ); }); test('throws an error if getInitialState is not a function.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, getInitialState: {} } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Property 'getInitialState' is not a function.` ); }); test('throws an error if the command handlers are missing.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, commandHandlers: undefined } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Object 'commandHandlers' is missing.` ); }); test('throws an error if the command handlers are not an object.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, commandHandlers: false } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Property 'commandHandlers' is not an object.` ); }); test('throws an error if a malformed command handler is found.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, commandHandlers: { sampleCommand: false } } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Command handler 'sampleCommand' is malformed: Property 'commandHandler' is not an object.` ); }); test('throws an error if the domain event handlers are missing.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, domainEventHandlers: undefined } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Object 'domainEventHandlers' is missing.` ); }); test('throws an error if the domain event handlers are not an object.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, domainEventHandlers: false } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Property 'domainEventHandlers' is not an object.` ); }); test('throws an error if a malformed domain event handler is found.', async (): Promise<void> => { assert.that((): void => { validateAggregateDefinition({ aggregateDefinition: { ...aggregateDefinition, domainEventHandlers: { sampleDomainEvent: false } } }); }).is.throwing( (ex): boolean => (ex as CustomError).code === errors.AggregateDefinitionMalformed.code && ex.message === `Domain event handler 'sampleDomainEvent' is malformed: Property 'domainEventHandler' is not an object.` ); }); });
{ "pile_set_name": "Github" }
# How To Minimize Your Application To The System's Notification Area. The ability to minimize the application to the system's notification area, `System Tray` on Windows or `Status Menu Area` on a Mac, can be quite useful in keeping a clean work area. One specific reason to provide this functionality would be when an application needs to run in the background but still be available if the user needs quick access to it. When we minimize the application's main window we normally will remove it from the `Task Bar` on Windows or the `Dock` on Mac OSX. The same goes for when the window is closed but needs to be handled differently on the two platforms. `Electron` allow access to these areas by use of the [Tray object](https://github.com/electron/electron/blob/master/docs/api/tray.md). So let's look at some code. You can start with a new project or follow along with the accompanying code. [Create a new `WebSharp Electron Application`](https://github.com/xamarin/WebSharp/blob/master/docs/getting-started/getting-started-websharp-electron-application.md#generate-a-websharp-electron-application) and open it in you favorite source editor. ## Creating the Tray Open the `src/Main/MainWindow.cs` source file. We will start with the `Tray` code by adding a new `CreateTray` method. ```cs async Task CreateTray (string __dirname) { if (IsWindows) tray = await Tray.Create($"{__dirname}/assets/icons/appicon.ico"); else tray = await Tray.Create($"{__dirname}/assets/icons/appicon_16x16@2x.png"); // Sets the hover text for this tray icon. await tray.SetToolTip("MinimizeToTray Sample Program"); // Sets the title displayed aside of the tray icon in the status bar. //await tray.SetTitle("MinimizeToTray"); // Create a context menu to be displayed on the Tray var menuItemOptions = new MenuItemOptions[] { new MenuItemOptions() { Label = "Show App", Click = new ScriptObjectCallback<MenuItem, BrowserWindow, Event> ( async (ar) => { //await console.Log("Show App"); if (mainWindow != null) { if (await mainWindow.IsMinimized()) await mainWindow.Restore(); if (!await mainWindow.IsVisible()) await mainWindow.Show(); await mainWindow.Focus(); } } ) }, new MenuItemOptions() { Label = "Quit App", Click = new ScriptObjectCallback<MenuItem, BrowserWindow, Event> ( async (ar) => { //await console.Log("Quit App"); // Notify the close event that we will be quitting the app await app.SetProperty("shouldQuit", true); mainWindow = null; await app.Quit(); } ) }, }; var contextMenu = await Menu.BuildFromTemplate(menuItemOptions); // Set our tray context menu await tray.SetContextMenu(contextMenu); // Allow the user to click on the tray icon to show the context menu. await tray.On("click", new ScriptObjectCallback ( async (sr) => { if (mainWindow != null) { await tray.PopUpContextMenu(); } }) ); } ``` The first lines of code in the above method create the `Tray` but we need to know what platform we are targeting so that we can set the icon correctly. It calls the helper property `IsWindows` to determine what platform we are targeting and pass in the correct file to load. ```cs static bool IsWindows { get { // Mac can also return Unix running under mono. return !(System.Environment.OSVersion.Platform == PlatformID.MacOSX || System.Environment.OSVersion.Platform == PlatformID.Unix); } } ``` > :bulb: On Mac using `Mono` the `Platform` will return `PlatformID.Unix`. The code above should be easily understood through the comments provided but here are the steps. - Create and setup a `Tray` instance. - Create an array of `MenuOptions` that will be used to create the context menu. - Create the actual menu with `await Menu.BuildFromTemplate` and attach it to the `Tray` with `SetContextMenu`. - The last step here attaches a listener for the `click` event and when received pops up the context menu. This could also have restored the application window as well. To call the `CreateTray` method we will place it right before we create the main browser window in the main `Invoke` method. ```cs // We use app.IsReady instead of listening for the 'ready'event. // By the time we get here from the main.js module the 'ready' event has // already fired. if (await app.IsReady()) { await CreateTray(__dirname); windowId = await CreateWindow(__dirname); } ``` That should do it. If you now run the code your should see that the tray now appears in the `System Menu area` on Mac and in the `System Tray` on windows. ### Context Menu Items In the above code there was a context menu added to the `Tray` that we created with two menu items. - `Show App` menu item handles toggling of the window's visibility. ```cs new MenuItemOptions() { Label = "Show App", Click = new ScriptObjectCallback<MenuItem, BrowserWindow, Event> ( async (ar) => { //await console.Log("Show App"); if (mainWindow != null) { if (await mainWindow.IsMinimized()) await mainWindow.Restore(); if (!await mainWindow.IsVisible()) await mainWindow.Show(); await mainWindow.Focus(); } } ) } ``` - `Quit App` quits the application and is not as straight forward. What should be pointed out in that code is that a specific property will be added on the `app` called `shouldQuit`. The property will interact with the `close` event processing discussed below and will make a little more sense later. ```cs new MenuItemOptions() { Label = "Quit App", Click = new ScriptObjectCallback<MenuItem, BrowserWindow, Event> ( async (ar) => { //await console.Log("Quit App"); // Notify the close event that we will be quitting the app await app.SetProperty("shouldQuit", true); mainWindow = null; await app.Quit(); } ) }, ``` ## Window Minimize and Close The trick is to catch the window's `close` and `minimize` events in the correct spots in `JavaScript` as well as our managed code. ### Handling the `minimize` event Look for the `CreateWindow` method in the `src/Main/MainWindow.cs` source file. When the `minimize` event is received we will want to hide the main window. ```cs // Listen for window minimize event so that we can hide // the main window. await mainWindow.On("minimize", new ScriptObjectCallback<Event>(async (evt) => { await mainWindow.Hide(); } )); ``` On Windows when the application window is hidden the application icon is removed from the `Task Bar`. With Mac OSX a little more work is needed to handle the `Dock`. Two other events, `show` and `hide`, need to be listened for that will allow us to remove the application icon from the `Dock` on Mac OSX platforms. On `show` we we will need to show the `Dock` again. ```cs // Listen for window show event await mainWindow.On("show", new ScriptObjectCallback<Event>(async (evt) => { //console.Log("Show"); await tray.SetHighlightMode(TrayHighlightMode.Always); // Mac specific // During development this will not work well. // The icon will revert back to the Electron icon. Bug?? var dock = await app.Dock(); if (dock != null) { await dock.Show(); await dock.SetIcon($"{__dirname}/assets/icons/appicon.png"); } } )); ``` The `hide` event will allow the application to hide the `Dock`. ```cs // Listen for window show event await mainWindow.On("hide", new ScriptObjectCallback<Event>(async (evt) => { //console.Log("Hide"); await tray.SetHighlightMode(TrayHighlightMode.Never); // Mac specific var dock = await app.Dock(); if (dock != null) await dock.Hide(); } )); ``` > :bulb: When developing for Mac and the 'Dock' is hidden and then shown again you will see the `Electron` icon instead of the application icon. Once packaged and branded this will not happen. See the tutorial [Setting Application Icon](https://github.com/xamarin/WebSharp/blob/master/docs/tutorials/appicon/README.md) for more information on this. ### Mac specific `Dock` object The `Dock` object is Mac specific and will return `null` when referenced from other platforms. | Method | Description | | --- | --- | | `int` Bounce (DockBounceType) | Can be `DockBoundType.Critical` or `DockBoundType.Informational`. | | CancelBounce(int id) | Cancel the bounce of `id`. | | DownloadFinished(string filePath) | Bounces the Downloads stack if the filePath is inside the Downloads folder.| | `bool` SetBadge(string text) | Sets the string to be displayed in the dock’s badging area. | | `string` GetBadge() | The badge string of the dock. | | Hide () | Hides the dock icon. | | Show() | Shows the dock icon. | | `bool` IsVisible() | Whether the dock icon is visible. | | SetMenu(Menu menu) | Sets the application's [Dock Menu](https://developer.apple.com/macos/human-interface-guidelines/menus/dock-menus/). ## Handling the `close` event Handling the `close` event of the window will need a little extra care. The termination of the application should only happen when the menu option `Quit App` is selected from the `Tray` or when `Cmd-Q` is executed on Mac. Any other attempts at quitting the application on either platform will result in the application window being hidden, removal of the app icon from the `Task Bar` or `Dock` which moves the application into the background accessible only from the `Tray`. To accomplish this the application needs to use the `PreventDefault` of the `close` event handler. > The `Event` interface's `preventDefault()` method tells the user agent that if the event goes unhandled, its default action should not be taken as it normally would be. The event continues to propagate as usual with only the exception that the event does nothing if no event listeners call `stopPropagation()`, which terminates propagation at once. > :exclamation: **Limitation of Manage Code Interface**: Due to the asynchronous nature of the managed code interface, the `Event.PreventDefault` **has to be called before** any other `await/async` commands. By the time the function is executed it will be too late to acually cancel the event itself. This is unfortunately a limitation of the managed code async interface and will need to be handled in `JavaScript` code. ```cs // Emitted when the window is going to be closed. // It's emitted before the beforeunload and unload event of the DOM. await mainWindow.On("close", new ScriptObjectCallback<Event>(async (ar) => { // Check if we should quit if (IsShouldQuit) { // Dereference the window object, usually you would store windows // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. mainWindow = null; } else { // Retrieve our event var evt = ar.CallbackState as Event; // Calling event.PreventDefault() will cancel the close. evt.PreventDefault(); // Then we hide the main window. await mainWindow.Hide(); } } )); ``` The close handler checks for the `IsShouldQuit` property to be `true` and if not then the event's default functionality to close the window is canceled and is instead hidden from view with [Event.preventDefault()](https://developer.mozilla.org/en/docs/Web/API/Event/preventDefault). This prevents the application from terminating only if specifically requested to do so when the `App Quit` menu option is clicked. If the application is run now it should act as expected on both Mac and Windows platforms but one more condition for the `Cmd-Q` situation on Mac needs to be handled. When `Cmd-Q` is executed the the `before-quit` listener is fired on Mac platforms and will need to be handled as well. ```cs // We need this for Mac functionality for Cmd-Q and Quit from app menu. // 'before-quit' is emitted when Electron receives // the signal to exit and wants to start closing windows await app.On("before-quit", new ScriptObjectCallback<Event>(async (evt) => { IsShouldQuit = true; } )); ``` The above code only sets the `IsShouldQuit` property to `true` to notify the `close` handling above that it should quit the application instead of preventing the close. Now when running the application it should work more or less the same on both platforms. ## Summary The trick is to catch the window's `close` and `minimize` events in the correct spots. Some extra care is taken for Mac OSX applications.
{ "pile_set_name": "Github" }
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stdlib.h> #include "third_party/mesa/MesaLib/src/egl/main/egldriver.h" /** * This is an EGL driver that wraps PPAPI. */ /** Subclass of _EGLDriver */ typedef struct _egl_driver_ppapi { _EGLDriver Base; /* base class */ } _EGLDriverPPAPI; static EGLBoolean _eglInitializePPAPI(_EGLDriver *drv, _EGLDisplay *dpy, EGLint *major, EGLint *minor) { return EGL_FALSE; } static EGLBoolean _eglTerminatePPAPI(_EGLDriver *drv, _EGLDisplay *dpy) { return EGL_FALSE; } static _EGLContext *_eglCreateContextPPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, _EGLContext *share, const EGLint *attrib_list) { return NULL; } static EGLBoolean _eglDestroyContextPPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx) { return EGL_FALSE; } static _EGLSurface *_eglCreateWindowSurfacePPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, EGLNativeWindowType window, const EGLint *attrib_list) { return NULL; } static _EGLSurface *_eglCreatePbufferSurfacePPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, const EGLint *attrib_list) { return NULL; } static EGLBoolean _eglDestroySurfacePPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface) { return EGL_FALSE; } static EGLBoolean _eglSwapBuffersPPAPI(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw) { return EGL_FALSE; } static void _unloadPPAPI(_EGLDriver *drv) { free(drv); } /** * This is the main entrypoint into the driver, called by egl dispatch API. * Create a new _EGLDriver object and init its dispatch table. */ _EGLDriver* _eglMain(const char *args) { _EGLDriverPPAPI *drv = (_EGLDriverPPAPI *) calloc(1, sizeof(_EGLDriverPPAPI)); if (!drv) return NULL; _eglInitDriverFallbacks(&drv->Base); drv->Base.API.Initialize = _eglInitializePPAPI; drv->Base.API.Terminate = _eglTerminatePPAPI; drv->Base.API.CreateContext = _eglCreateContextPPAPI; drv->Base.API.DestroyContext = _eglDestroyContextPPAPI; drv->Base.API.CreateWindowSurface = _eglCreateWindowSurfacePPAPI; drv->Base.API.CreatePbufferSurface = _eglCreatePbufferSurfacePPAPI; drv->Base.API.DestroySurface = _eglDestroySurfacePPAPI; drv->Base.API.SwapBuffers = _eglSwapBuffersPPAPI; drv->Base.Name = "PPAPI"; drv->Base.Unload = _unloadPPAPI; return &drv->Base; }
{ "pile_set_name": "Github" }
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library search directories specified with -Ldir * compile handled by 'cc' (or similar) executable with -c option: compiles .c to .o * link static library handled by 'ar' command (possibly with 'ranlib') * link shared library handled by 'cc -shared' """ __revision__ = "$Id$" import os, sys, re from types import StringType, NoneType from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options from distutils.errors import \ DistutilsExecError, CompileError, LibError, LinkError from distutils import log if sys.platform == 'darwin': import _osx_support # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might # have to have a bunch of subclasses GNUCCompiler, SGICCompiler, # SunCCompiler, and I suspect down that road lies madness. # * even if we don't know a warning flag from an optimization flag, # we need some way for outsiders to feed preprocessor/compiler/linker # flags in to us -- eg. a sysadmin might want to mandate certain flags # via a site config file, or a user might want to set something for # compiling this module distribution only via the setup.py command # line, whatever. As long as these options come from something on the # current system, they can be as system-dependent as they like, and we # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. class UnixCCompiler(CCompiler): compiler_type = 'unix' # These are used by CCompiler in two places: the constructor sets # instance attributes 'preprocessor', 'compiler', etc. from them, and # 'set_executable()' allows any of these to be set. The defaults here # are pretty generic; they will probably have to be set by an outsider # (eg. using information discovered by the sysconfig about building # Python extensions). executables = {'preprocessor' : None, 'compiler' : ["cc"], 'compiler_so' : ["cc"], 'compiler_cxx' : ["c++"], # pypy: changed, 'cc' is bogus 'linker_so' : ["cc", "-shared"], 'linker_exe' : ["cc"], 'archiver' : ["ar", "-cr"], 'ranlib' : None, } if sys.platform[:6] == "darwin": import platform if platform.machine() == 'i386': if platform.architecture()[0] == '32bit': arch = 'i386' else: arch = 'x86_64' else: # just a guess arch = platform.machine() executables['ranlib'] = ["ranlib"] executables['linker_so'] += ['-undefined', 'dynamic_lookup'] for k, v in executables.iteritems(): if v and v[0] == 'cc': v += ['-arch', arch] # Needed for the filename generation methods provided by the base # class, CCompiler. NB. whoever instantiates/uses a particular # UnixCCompiler instance should set 'shared_lib_ext' -- we set a # reasonable common default here, but it's not necessarily used on all # Unices! src_extensions = [".c",".C",".cc",".cxx",".cpp",".m"] obj_extension = ".o" static_lib_extension = ".a" shared_lib_extension = ".so" dylib_lib_extension = ".dylib" xcode_stub_lib_extension = ".tbd" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" xcode_stub_lib_format = dylib_lib_format if sys.platform == "cygwin": exe_extension = ".exe" def preprocess(self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): ignore, macros, include_dirs = \ self._fix_compile_args(None, macros, include_dirs) pp_opts = gen_preprocess_options(macros, include_dirs) pp_args = self.preprocessor + pp_opts if output_file: pp_args.extend(['-o', output_file]) if extra_preargs: pp_args[:0] = extra_preargs if extra_postargs: pp_args.extend(extra_postargs) pp_args.append(source) # We need to preprocess: either we're being forced to, or we're # generating output to stdout, or there's a target output file and # the source file is newer than the target (or the target doesn't # exist). if self.force or output_file is None or newer(source, output_file): if output_file: self.mkpath(os.path.dirname(output_file)) try: self.spawn(pp_args) except DistutilsExecError, msg: raise CompileError, msg def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so if sys.platform == 'darwin': compiler_so = _osx_support.compiler_fixup(compiler_so, cc_args + extra_postargs) try: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError, msg: raise CompileError, msg def create_static_lib(self, objects, output_libname, output_dir=None, debug=0, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) output_filename = \ self.library_filename(output_libname, output_dir=output_dir) if self._need_link(objects, output_filename): self.mkpath(os.path.dirname(output_filename)) self.spawn(self.archiver + [output_filename] + objects + self.objects) # Not many Unices required ranlib anymore -- SunOS 4.x is, I # think the only major Unix that does. Maybe we need some # platform intelligence here to skip ranlib if it's not # needed -- or maybe Python's configure script took care of # it for us, hence the check for leading colon. if self.ranlib: try: self.spawn(self.ranlib + [output_filename]) except DistutilsExecError, msg: raise LibError, msg else: log.debug("skipping %s (up-to-date)", output_filename) def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) libraries, library_dirs, runtime_library_dirs = \ self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) if type(output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) if self._need_link(objects, output_filename): ld_args = (objects + self.objects + lib_opts + ['-o', output_filename]) if debug: ld_args[:0] = ['-g'] if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: ld_args.extend(extra_postargs) self.mkpath(os.path.dirname(output_filename)) try: if target_desc == CCompiler.EXECUTABLE: linker = self.linker_exe[:] else: linker = self.linker_so[:] if target_lang == "c++" and self.compiler_cxx: # skip over environment variable settings if /usr/bin/env # is used to set up the linker's environment. # This is needed on OSX. Note: this assumes that the # normal and C++ compiler have the same environment # settings. i = 0 if os.path.basename(linker[0]) == "env": i = 1 while '=' in linker[i]: i = i + 1 linker[i] = self.compiler_cxx[i] if sys.platform == 'darwin': linker = _osx_support.compiler_fixup(linker, ld_args) self.spawn(linker + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: log.debug("skipping %s (up-to-date)", output_filename) # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in # ccompiler.py. def library_dir_option(self, dir): return "-L" + dir def _is_gcc(self, compiler_name): # XXX PyPy workaround, look at the big comment below for more # context. On CPython, the hack below works fine because # `compiler_name` contains the name of the actual compiler which was # used at compile time (e.g. 'x86_64-linux-gnu-gcc' on my machine). # PyPy hardcodes it to 'cc', so the hack doesn't work, and the end # result is that we pass the wrong option to the compiler. # # The workaround is to *always* pretend to be GCC if we are on Linux: # this should cover the vast majority of real systems, including the # ones which use clang (which understands the '-Wl,-rpath' syntax as # well) return (sys.platform == "linux2" or "gcc" in compiler_name or "g++" in compiler_name) def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library # is sought. GCC has to be told to pass the -R option through # to the linker, whereas other compilers just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:7] == "freebsd": return "-Wl,-rpath=" + dir elif sys.platform[:5] == "hp-ux": if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif self._is_gcc(compiler): return "-Wl,-R" + dir else: return "-R" + dir def library_option(self, lib): return "-l" + lib def find_library_file(self, dirs, lib, debug=0): shared_f = self.library_filename(lib, lib_type='shared') dylib_f = self.library_filename(lib, lib_type='dylib') xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub') static_f = self.library_filename(lib, lib_type='static') if sys.platform == 'darwin': # On OSX users can specify an alternate SDK using # '-isysroot', calculate the SDK root if it is specified # (and use it further on) # # Note that, as of Xcode 7, Apple SDKs may contain textual stub # libraries with .tbd extensions rather than the normal .dylib # shared libraries installed in /. The Apple compiler tool # chain handles this transparently but it can cause problems # for programs that are being built with an SDK and searching # for specific libraries. Callers of find_library_file need to # keep in mind that the base filename of the returned SDK library # file might have a different extension from that of the library # file installed on the running system, for example: # /Applications/Xcode.app/Contents/Developer/Platforms/ # MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ # usr/lib/libedit.tbd # vs # /usr/lib/libedit.dylib cflags = sysconfig.get_config_var('CFLAGS') or '' m = re.search(r'-isysroot\s+(\S+)', cflags) if m is None: sysroot = '/' else: sysroot = m.group(1) for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) xcode_stub = os.path.join(dir, xcode_stub_f) if sys.platform == 'darwin' and ( dir.startswith('/System/') or ( dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f) # PyPy extension here: 'shared' usually ends in something # like '.pypy-41.so'. Try without the '.pypy-41' part too. shared_no_pypy = re.sub(r'[.]pypy[^.]+([.][^.]+)$', r'\1', shared) # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm # ignoring even GCC's "-static" option. So sue me. if os.path.exists(dylib): return dylib elif os.path.exists(xcode_stub): return xcode_stub elif os.path.exists(shared): return shared elif os.path.exists(shared_no_pypy): return shared_no_pypy elif os.path.exists(static): return static # Oops, didn't find it in *any* of 'dirs' return None
{ "pile_set_name": "Github" }
/* This Library has been modified from its original form by Brian Aker (brian@tangent.org) See below for original Copyright. */ /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ #include "common.h" #include <string.h> #include <sys/types.h> /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; /* UINT4 defines a four byte word */ typedef unsigned int UINT4; /* MD5 context. */ typedef struct { UINT4 state[4]; /* state (ABCD) */ UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } MD5_CTX; static void MD5Init (MD5_CTX *context); /* context */ static void MD5Update ( MD5_CTX *context, /* context */ const unsigned char *input, /* input block */ unsigned int inputLen); /* length of input block */ static void MD5Final ( unsigned char digest[16], /* message digest */ MD5_CTX *context); /* context */ /* Constants for MD5Transform routine. */ #define S11 7 #define S12 12 #define S13 17 #define S14 22 #define S21 5 #define S22 9 #define S23 14 #define S24 20 #define S31 4 #define S32 11 #define S33 16 #define S34 23 #define S41 6 #define S42 10 #define S43 15 #define S44 21 static void MD5Transform (UINT4 state[4], unsigned char block[64]); static void Encode (unsigned char *output, UINT4 *input, unsigned int len); static void Decode(UINT4 *output, unsigned char *input, unsigned int len); static unsigned char PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* F, G, H and I are basic MD5 functions. */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) #define I(x, y, z) ((y) ^ ((x) | (~z))) /* ROTATE_LEFT rotates x left n bits. */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define GG(a, b, c, d, x, s, ac) { \ (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define HH(a, b, c, d, x, s, ac) { \ (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } #define II(a, b, c, d, x, s, ac) { \ (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } /* Just a simple method for getting the signature result must be == 16 */ void md5_signature(const unsigned char *key, unsigned int length, unsigned char *result) { MD5_CTX my_md5; MD5Init(&my_md5); (void)MD5Update(&my_md5, key, length); MD5Final(result, &my_md5); } /* MD5 initialization. Begins an MD5 operation, writing a new context. */ static void MD5Init (MD5_CTX *context) /* context */ { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; } /* MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context. */ static void MD5Update ( MD5_CTX *context, /* context */ const unsigned char *input, /* input block */ unsigned int inputLen) /* length of input block */ { unsigned int i, idx, partLen; /* Compute number of bytes mod 64 */ idx = (unsigned int)((context->count[0] >> 3) & 0x3F); /* Update number of bits */ if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) context->count[1]++; context->count[1] += ((UINT4)inputLen >> 29); partLen = 64 - idx; /* Transform as many times as possible. */ if (inputLen >= partLen) { memcpy((POINTER)&context->buffer[idx], (POINTER)input, partLen); MD5Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) MD5Transform (context->state, (unsigned char *)&input[i]); idx = 0; } else i = 0; /* Buffer remaining input */ memcpy((POINTER)&context->buffer[idx], (POINTER)&input[i], inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context. */ static void MD5Final ( unsigned char digest[16], /* message digest */ MD5_CTX *context) /* context */ { unsigned char bits[8]; unsigned int idx, padLen; /* Save number of bits */ Encode (bits, context->count, 8); /* Pad out to 56 mod 64. */ idx = (unsigned int)((context->count[0] >> 3) & 0x3f); padLen = (idx < 56) ? (56 - idx) : (120 - idx); MD5Update (context, PADDING, padLen); /* Append length (before padding) */ MD5Update (context, bits, 8); /* Store state in digest */ Encode (digest, context->state, 16); /* Zeroize sensitive information. */ memset((POINTER)context, 0, sizeof (*context)); } /* MD5 basic transformation. Transforms state based on block. */ static void MD5Transform ( UINT4 state[4], unsigned char block[64]) { UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; Decode (x, block, 64); /* Round 1 */ FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ /* Round 2 */ GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ /* Round 3 */ HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ /* Round 4 */ II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; /* Zeroize sensitive information. */ memset((POINTER)x, 0, sizeof (x)); } /* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ static void Encode ( unsigned char *output, UINT4 *input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) { output[j] = (unsigned char)(input[i] & 0xff); output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); } } /* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ static void Decode ( UINT4 *output, unsigned char *input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused))) { unsigned char results[16]; md5_signature((unsigned char*)key, (unsigned int)key_length, results); return ((uint32_t) (results[3] & 0xFF) << 24) | ((uint32_t) (results[2] & 0xFF) << 16) | ((uint32_t) (results[1] & 0xFF) << 8) | (results[0] & 0xFF); }
{ "pile_set_name": "Github" }
class Darkhttpd < Formula desc "Small static webserver without CGI" homepage "http://unix4lyfe.org/darkhttpd/" url "http://unix4lyfe.org/darkhttpd/darkhttpd-1.10.tar.bz2" sha256 "b5a9bcfe6e65a3fc20f96e6badb5da7ba776a792f13fe90015fe9f63b3c2eb63" def install system "make" bin.install "darkhttpd" end test do system "#{bin}/darkhttpd", "--help" end end
{ "pile_set_name": "Github" }
# [2018-04-26 精选博文推荐](http://hao.caibaojian.com/date/2018/04/26) [前端日报](http://caibaojian.com/c/news)栏目数据来自[码农头条](http://hao.caibaojian.com/)(我开发的爬虫),每日分享前端、移动开发、设计、资源和资讯等,为开发者提供动力,点击Star按钮来关注这个项目,点击Watch来收听每日的更新[Github主页](https://github.com/kujian/frontendDaily) * [vue 组件使用中的细节点(你极有可能遇到但却不知所措小问题)](http://hao.caibaojian.com/72212.html) (推酷网) * [Node.js 10.0.0 正式发布,带来大量改进和修复](http://hao.caibaojian.com/72214.html) (推酷网) * [Javascript原型链、作用域、闭包学习笔记](http://hao.caibaojian.com/72209.html) (推酷网) * [JavaScript 工作原理之一-引擎,运行时,调用堆栈(译)](http://hao.caibaojian.com/72244.html) (稀土掘金) * [福昕阅读器曝多个安全漏洞,可导致远程任意代码执行](http://hao.caibaojian.com/72211.html) (推酷网) *** * [Vue项目编译后部署在非网站根目录的解决方案](http://hao.caibaojian.com/72253.html) (稀土掘金) * [前端代码质量(二):圈复杂度那些事儿](http://hao.caibaojian.com/72180.html) (开发者头条) * [你应该知道的前端——缓存](http://hao.caibaojian.com/72245.html) (稀土掘金) * [面试了 8 家公司,他们问了我这些机器学习题目](http://hao.caibaojian.com/72159.html) (开发者头条) * [Webpack必知必会之Loader篇(上)](http://hao.caibaojian.com/72208.html) (推酷网) *** * [写高性能的 Pandas 代码](http://hao.caibaojian.com/72161.html) (开发者头条) * [DingTalk Golang SDK](http://hao.caibaojian.com/72173.html) (开发者头条) * [数组的遍历你都会用了,那Promise版本的呢](http://hao.caibaojian.com/72243.html) (稀土掘金) * [自己动手实现一个极简 Web 框架](http://hao.caibaojian.com/72164.html) (开发者头条) * [5 月南京全球技术周,人工智能、小米生态链、互联网架构、无人驾驶等 20+ 专题论坛](http://hao.caibaojian.com/72166.html) (开发者头条) *** * [Grid Layout 最佳实践](http://hao.caibaojian.com/72238.html) (稀土掘金) * [一个成功的 Git 分支模型(适用于商业应用开发)](http://hao.caibaojian.com/72153.html) (SegmentFault) * [react内联样式使用webpack将px转rem](http://hao.caibaojian.com/72213.html) (推酷网) * [伸缩 Kubernetes 到 2500 个节点中遇到的问题和解决方法](http://hao.caibaojian.com/72167.html) (开发者头条) * [携程 DARE 回归测试实施二三鉴](http://hao.caibaojian.com/72179.html) (开发者头条) *** * [Qone 正式开源,使 javascript 支持 .NET LINQ](http://hao.caibaojian.com/72215.html) (推酷网) * [React 源码分析(1):调用ReactDOM.render后发生了什么](http://hao.caibaojian.com/72240.html) (稀土掘金) * [Dubbo 剖析(四):网络通信之 Client 实现](http://hao.caibaojian.com/72170.html) (开发者头条) * [React Native日期时间选择组件](http://hao.caibaojian.com/72241.html) (稀土掘金) * [炒鸡简单的canvas粒子](http://hao.caibaojian.com/72247.html) (稀土掘金) *** * [快速制作多倍图帧动画方式及原理:gka[–ratio]](http://hao.caibaojian.com/72254.html) (稀土掘金) * [JVM 问题定位典型案例分析](http://hao.caibaojian.com/72160.html) (开发者头条) * [基于Koa2/React的NodeJS全栈开发框架](http://hao.caibaojian.com/72248.html) (稀土掘金) * [Swoole入门到实战(一):PHP7&amp;Swoole源码安装、玩转网络通信引擎、异步非堵塞IO场景](http://hao.caibaojian.com/72154.html) (SegmentFault) * [兼容性问题有没有兴趣一起探讨学习一下呢?](http://hao.caibaojian.com/72249.html) (稀土掘金) 日报维护作者:[前端博客](http://caibaojian.com/) 和 [微博](http://caibaojian.com/go/weibo) ![weixin](https://user-images.githubusercontent.com/3055447/38468989-651132ac-3b80-11e8-8e6b-15122322a9d7.png)
{ "pile_set_name": "Github" }
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translator tool. If making changes by // hand only do so within the body of existing method and function // implementations. See the translator.README.txt file in the tools directory // for more information. // // $hash=b4d9ec1e74a0e91c058e662fbdad6a2678c42812$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ #define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ #pragma once #if !defined(WRAPPING_CEF_SHARED) #error This file can be included wrapper-side only #endif #include "include/capi/cef_v8_capi.h" #include "include/cef_v8.h" #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" // Wrap a C structure with a C++ class. // This class may be instantiated and accessed wrapper-side only. class CefV8ContextCToCpp : public CefCToCppRefCounted<CefV8ContextCToCpp, CefV8Context, cef_v8context_t> { public: CefV8ContextCToCpp(); virtual ~CefV8ContextCToCpp(); // CefV8Context methods. CefRefPtr<CefTaskRunner> GetTaskRunner() OVERRIDE; bool IsValid() OVERRIDE; CefRefPtr<CefBrowser> GetBrowser() OVERRIDE; CefRefPtr<CefFrame> GetFrame() OVERRIDE; CefRefPtr<CefV8Value> GetGlobal() OVERRIDE; bool Enter() OVERRIDE; bool Exit() OVERRIDE; bool IsSame(CefRefPtr<CefV8Context> that) OVERRIDE; bool Eval(const CefString& code, const CefString& script_url, int start_line, CefRefPtr<CefV8Value>& retval, CefRefPtr<CefV8Exception>& exception) OVERRIDE; }; #endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_
{ "pile_set_name": "Github" }
--- layout: base title: 'Statistics of flat:foreign in UD_Galician-TreeGal' udver: '2' --- ## Treebank Statistics: UD_Galician-TreeGal: Relations: `flat:foreign` This relation is a language-specific subtype of <tt><a href="gl_treegal-dep-flat.html">flat</a></tt>. There are also 1 other language-specific subtypes of `flat`: <tt><a href="gl_treegal-dep-flat-name.html">flat:name</a></tt>. 2 nodes (0%) are attached to their parents as `flat:foreign`. 2 instances of `flat:foreign` (100%) are left-to-right (parent precedes child). Average distance between parent and child is 1. The following 2 pairs of parts of speech are connected with `flat:foreign`: <tt><a href="gl_treegal-pos-ADJ.html">ADJ</a></tt>-<tt><a href="gl_treegal-pos-NOUN.html">NOUN</a></tt> (1; 50% instances), <tt><a href="gl_treegal-pos-ADV.html">ADV</a></tt>-<tt><a href="gl_treegal-pos-NOUN.html">NOUN</a></tt> (1; 50% instances). ~~~ conllu # visual-style 43 bgColor:blue # visual-style 43 fgColor:white # visual-style 42 bgColor:blue # visual-style 42 fgColor:white # visual-style 42 43 flat:foreign color:blue 1 De de ADP P AdpType=Prep 4 case _ _ 2 todos todo DET Idmp Gender=Masc|Number=Plur|PronType=Ind 4 det _ _ 3 os o DET Ddmp Definite=Def|Gender=Masc|Number=Plur|PronType=Art 4 det _ _ 4 xeitos xeito NOUN Scmp Gender=Masc|Number=Plur 5 obl _ _ 5 certifican certificar VERB Vpi30p Mood=Ind|Number=Plur|Person=3|Tense=Pres|VerbForm=Fin 0 root _ _ 6 esta este DET Edfs Gender=Fem|Number=Sing|PronType=Dem 7 det _ _ 7 afirmación afirmación NOUN Scfs Gender=Fem|Number=Sing 5 obj _ _ 8 o o DET Ddms Definite=Def|Gender=Masc|Number=Sing|PronType=Art 9 det _ _ 9 número número NOUN Scms Gender=Masc|Number=Sing 5 nsubj _ _ 10 de de ADP P AdpType=Prep 11 case _ _ 11 edicións edición NOUN Scfp Gender=Fem|Number=Plur 9 nmod _ _ 12 de de ADP P AdpType=Prep 15 case _ _ 13 as o DET Ddfp Definite=Def|Gender=Fem|Number=Plur|PronType=Art 15 det _ _ 14 súas seu DET Md3sfp Gender=Fem|Number=Plur|Number[psor]=Sing|Person=3|Poss=Yes|PronType=Prs 15 det _ _ 15 obras obra NOUN Scfp Gender=Fem|Number=Plur 11 nmod _ SpaceAfter=No 16 , , PUNCT Q, _ 11 punct _ _ 17 que que PRON Tnfp Gender=Fem|Number=Plur|PronType=Rel 19 nsubj _ _ 18 o o PRON Raa3ms Case=Acc|Clitic=Yes|Gender=Masc|Number=Sing|Person=3|PronType=Prs 19 obj _ _ 19 converten converter VERB Vpi30p Mood=Ind|Number=Plur|Person=3|Tense=Pres|VerbForm=Fin 11 acl _ _ 20 en en ADP P AdpType=Prep 22 case _ _ 21 un un DET Dims Definite=Ind|Gender=Masc|Number=Sing|PronType=Art 22 det _ _ 22 fito fito NOUN Scms Gender=Masc|Number=Sing 19 obl _ _ 23 dentro dentro ADV Wn _ 26 advmod _ _ 24 de de ADP P AdpType=Prep 26 case _ _ 25 a o DET Ddfs Definite=Def|Gender=Fem|Number=Sing|PronType=Art 26 det _ _ 26 literatura literatura NOUN Scfs Gender=Fem|Number=Sing 22 nmod _ _ 27 de de ADP P AdpType=Prep 28 case _ _ 28 xénero xénero NOUN Scms Gender=Masc|Number=Sing 26 nmod _ _ 29 en en ADP P AdpType=Prep 31 case _ _ 30 o o DET Ddms Definite=Def|Gender=Masc|Number=Sing|PronType=Art 31 det _ _ 31 país país NOUN Scms Gender=Masc|Number=Sing 22 nmod _ SpaceAfter=No 32 , , PUNCT Q, _ 5 punct _ _ 33 podendo poder AUX V0x000 VerbForm=Ger 34 aux _ _ 34 aventurar aventurar VERB V0f000 VerbForm=Inf 5 advcl _ _ 35 nos nos PRON Raa1ap Case=Acc|Clitic=Yes|Gender=Com|Number=Plur|Person=1|PronType=Prs 34 expl _ _ 36 a a ADP P AdpType=Prep 37 mark _ _ 37 falar falar VERB V0f000 VerbForm=Inf 34 xcomp _ _ 38 de de ADP P AdpType=Prep 40 case _ _ 39 un un DET Dims Definite=Ind|Gender=Masc|Number=Sing|PronType=Art 40 det _ _ 40 escritor escritor NOUN Scms Gender=Masc|Number=Sing 37 obl _ _ 41 de de ADP P AdpType=Prep 42 case _ _ 42 best best ADJ A0ap Gender=Com 40 nmod _ _ 43 sellers seller NOUN Scap Gender=Com|Number=Plur 42 flat:foreign _ SpaceAfter=No 44 . . PUNCT Q. _ 5 punct _ _ ~~~ ~~~ conllu # visual-style 19 bgColor:blue # visual-style 19 fgColor:white # visual-style 18 bgColor:blue # visual-style 18 fgColor:white # visual-style 18 19 flat:foreign color:blue 1 Trataba tratar VERB Vii30s Mood=Ind|Number=Sing|Person=3|Tense=Imp|VerbForm=Fin 0 root _ _ 2 de de ADP P AdpType=Prep 3 mark _ _ 3 evitar evitar VERB V0f000 VerbForm=Inf 1 xcomp _ _ 4 o o DET Ddms Definite=Def|Gender=Masc|Number=Sing|PronType=Art 5 det _ _ 5 concello concello NOUN Scms Gender=Masc|Number=Sing 3 obj _ _ 6 con con ADP P AdpType=Prep 8 case _ _ 7 a o DET Ddfs Definite=Def|Gender=Fem|Number=Sing|PronType=Art 8 det _ _ 8 declaración declaración NOUN Scfs Gender=Fem|Number=Sing 3 obl _ _ 9 de de ADP P AdpType=Prep 10 case _ _ 10 supramunicipalidade supramunicipalidade NOUN Scfs Gender=Fem|Number=Sing 8 nmod _ _ 11 que que PRON Tnfs Gender=Fem|Number=Sing|PronType=Rel 12 obj _ _ 12 decretou decretar VERB Vei30s Mood=Ind|Number=Sing|Person=3|Tense=Past|VerbForm=Fin 8 acl _ _ 13 a o DET Ddfs Definite=Def|Gender=Fem|Number=Sing|PronType=Art 14 det _ _ 14 Xunta Xunta PROPN Spfs Gender=Fem|Number=Sing 12 nsubj _ _ 15 e e CCONJ Cc _ 18 cc _ _ 16 que que PRON Tnfs Gender=Fem|Number=Sing|PronType=Rel 18 nsubj _ _ 17 está estar AUX Vpi30s Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin 18 cop _ _ 18 sub sub ADV Wn _ 12 conj _ _ 19 iudice iudice NOUN Scfs Gender=Fem|Number=Sing 18 flat:foreign _ SpaceAfter=No 20 , , PUNCT Q, _ 18 punct _ _ 21 cando cando ADV Wr PronType=Rel 25 advmod _ _ 22 as o DET Ddfp Definite=Def|Gender=Fem|Number=Plur|PronType=Art 23 det _ _ 23 licenzas licenza NOUN Scfp Gender=Fem|Number=Plur 25 nsubj _ _ 24 están estar AUX Vpi30p Mood=Ind|Number=Plur|Person=3|Tense=Pres|VerbForm=Fin 25 cop _ _ 25 reguladas regulado ADJ A0fp Gender=Fem|Number=Plur 1 advcl _ _ 26 e e CCONJ Cc _ 28 cc _ _ 27 deben deber AUX Vpi30p Mood=Ind|Number=Plur|Person=3|Tense=Pres|VerbForm=Fin 28 aux _ _ 28 conceder conceder VERB V0f000 VerbForm=Inf 25 conj _ _ 29 se se PRON Rao3aa Clitic=Yes|Gender=Com|Person=3|PronType=Prs 28 expl _ _ 30 de de ADP P AdpType=Prep 31 mark _ _ 31 adaptar adaptar VERB V0f000 VerbForm=Inf 28 advcl _ _ 32 se se PRON Rao3aa Clitic=Yes|Gender=Com|Person=3|PronType=Prs 31 expl _ _ 33 a a ADP P AdpType=Prep 35 case _ _ 34 uns un DET Dimp Definite=Ind|Gender=Masc|Number=Plur|PronType=Art 35 det _ _ 35 parámetros parámetro NOUN Scmp Gender=Masc|Number=Plur 31 obl _ _ 36 determinados determinado ADJ A0mp Gender=Masc|Number=Plur 35 amod _ SpaceAfter=No 37 . . PUNCT Q. _ 1 punct _ _ ~~~
{ "pile_set_name": "Github" }
var searchData= [ ['aligned_5fbvec1',['aligned_bvec1',['../a00176.html#ga780a35f764020f553a9601a3fcdcd059',1,'glm']]], ['aligned_5fbvec2',['aligned_bvec2',['../a00176.html#gae766b317c5afec852bfb3d74a3c54bc8',1,'glm']]], ['aligned_5fbvec3',['aligned_bvec3',['../a00176.html#gae1964ba70d15915e5b710926decbb3cb',1,'glm']]], ['aligned_5fbvec4',['aligned_bvec4',['../a00176.html#gae164a1f7879f828bc35e50b79d786b05',1,'glm']]], ['aligned_5fdvec1',['aligned_dvec1',['../a00176.html#ga4974f46ae5a19415d91316960a53617a',1,'glm']]], ['aligned_5fdvec2',['aligned_dvec2',['../a00176.html#ga18d859f87122b2b3b2992ffe86dbebc0',1,'glm']]], ['aligned_5fdvec3',['aligned_dvec3',['../a00176.html#gaa37869eea77d28419b2fb0ff70b69bf0',1,'glm']]], ['aligned_5fdvec4',['aligned_dvec4',['../a00176.html#ga8a9f0a4795ccc442fa9901845026f9f5',1,'glm']]], ['aligned_5fhighp_5fbvec2',['aligned_highp_bvec2',['../a00176.html#gac5ffd9396890b64e707ba47c76435dfe',1,'glm']]], ['aligned_5fhighp_5fbvec3',['aligned_highp_bvec3',['../a00176.html#ga3adba191018d2de1dc2834a2ff5597d7',1,'glm']]], ['aligned_5fhighp_5fbvec4',['aligned_highp_bvec4',['../a00176.html#ga903a73cf8ae1f4bc24583b81adf024dc',1,'glm']]], ['aligned_5fhighp_5fdvec2',['aligned_highp_dvec2',['../a00176.html#ga186b90f0ba86724e080d237f3f5f9417',1,'glm']]], ['aligned_5fhighp_5fdvec3',['aligned_highp_dvec3',['../a00176.html#ga54f6765716867706643bde03211d600f',1,'glm']]], ['aligned_5fhighp_5fdvec4',['aligned_highp_dvec4',['../a00176.html#ga8e5a90ed034e9e7414ff71e66a79139e',1,'glm']]], ['aligned_5fhighp_5fivec2',['aligned_highp_ivec2',['../a00176.html#gab6ddd9d1421eb610ddeb32705fed7026',1,'glm']]], ['aligned_5fhighp_5fivec3',['aligned_highp_ivec3',['../a00176.html#gae234a3a1c6288fa5e2d4c78c5e39002e',1,'glm']]], ['aligned_5fhighp_5fivec4',['aligned_highp_ivec4',['../a00176.html#ga1e3286a27b19f25801fb435b6d1225fb',1,'glm']]], ['aligned_5fhighp_5fuvec2',['aligned_highp_uvec2',['../a00176.html#ga7366a38dc888164e623fc10663e97670',1,'glm']]], ['aligned_5fhighp_5fuvec3',['aligned_highp_uvec3',['../a00176.html#ga967485a7e963365642ea17de62fe2a3f',1,'glm']]], ['aligned_5fhighp_5fuvec4',['aligned_highp_uvec4',['../a00176.html#gac56a4ce85b6233998139a7c1ac337440',1,'glm']]], ['aligned_5fhighp_5fvec2',['aligned_highp_vec2',['../a00176.html#gaea854184b9d574fc5e75b5709a4974e8',1,'glm']]], ['aligned_5fhighp_5fvec3',['aligned_highp_vec3',['../a00176.html#ga55fb20d4e73a65c834b5861fc6cf4c36',1,'glm']]], ['aligned_5fhighp_5fvec4',['aligned_highp_vec4',['../a00176.html#gae2938d64c6a46f721681607c2ab3f884',1,'glm']]], ['aligned_5fivec1',['aligned_ivec1',['../a00176.html#ga76298aed82a439063c3d55980c84aa0b',1,'glm']]], ['aligned_5fivec2',['aligned_ivec2',['../a00176.html#gae4f38fd2c86cee6940986197777b3ca4',1,'glm']]], ['aligned_5fivec3',['aligned_ivec3',['../a00176.html#ga32794322d294e5ace7fed4a61896f270',1,'glm']]], ['aligned_5fivec4',['aligned_ivec4',['../a00176.html#ga7f79eae5927c9033d84617e49f6f34e4',1,'glm']]], ['aligned_5flowp_5fbvec2',['aligned_lowp_bvec2',['../a00176.html#ga524c702b82ae7ccaca896d374808c6d7',1,'glm']]], ['aligned_5flowp_5fbvec3',['aligned_lowp_bvec3',['../a00176.html#ga21fb6238997b4a21848411b16bc34e93',1,'glm']]], ['aligned_5flowp_5fbvec4',['aligned_lowp_bvec4',['../a00176.html#ga0b5e3c64f8dbadfc42a2aca5f2da9692',1,'glm']]], ['aligned_5flowp_5fdvec2',['aligned_lowp_dvec2',['../a00176.html#gab70c189b4691715b3f7f0abb35c65b2f',1,'glm']]], ['aligned_5flowp_5fdvec3',['aligned_lowp_dvec3',['../a00176.html#gabeec3d5ec99c196f4c0eb03b58d486ee',1,'glm']]], ['aligned_5flowp_5fdvec4',['aligned_lowp_dvec4',['../a00176.html#gaab365ee7cfd19bab449daa8f7eb0ca71',1,'glm']]], ['aligned_5flowp_5fivec2',['aligned_lowp_ivec2',['../a00176.html#gad69bf7c406a3cec994307473cb3da032',1,'glm']]], ['aligned_5flowp_5fivec3',['aligned_lowp_ivec3',['../a00176.html#gaa8615b4ce4fdf176c631b34d2d31d81b',1,'glm']]], ['aligned_5flowp_5fivec4',['aligned_lowp_ivec4',['../a00176.html#gad744848a2e4ddd2f041e6ec8d13600ae',1,'glm']]], ['aligned_5flowp_5fuvec2',['aligned_lowp_uvec2',['../a00176.html#ga15355ffc7ec7931b81ba76736b65e51a',1,'glm']]], ['aligned_5flowp_5fuvec3',['aligned_lowp_uvec3',['../a00176.html#ga48c85299d98e8248f547a2c07ea609cf',1,'glm']]], ['aligned_5flowp_5fuvec4',['aligned_lowp_uvec4',['../a00176.html#ga40b0e05306f666f835ac97c963302ecb',1,'glm']]], ['aligned_5flowp_5fvec2',['aligned_lowp_vec2',['../a00176.html#ga3cfc38b4ea9b9bd1e9f02dcc14eab367',1,'glm']]], ['aligned_5flowp_5fvec3',['aligned_lowp_vec3',['../a00176.html#gae003f8f3071a8bc734a70c6d4978f968',1,'glm']]], ['aligned_5flowp_5fvec4',['aligned_lowp_vec4',['../a00176.html#ga689f103781a795e919fddfa47d89170d',1,'glm']]], ['aligned_5fmediump_5fbvec2',['aligned_mediump_bvec2',['../a00176.html#ga77d37d7c80c7faa2eecb3eba7677750e',1,'glm']]], ['aligned_5fmediump_5fbvec3',['aligned_mediump_bvec3',['../a00176.html#ga4f78cd6d9c5827771e35921b4a92855a',1,'glm']]], ['aligned_5fmediump_5fbvec4',['aligned_mediump_bvec4',['../a00176.html#ga2cb80e2d4d351abeadac7b1676a91fd9',1,'glm']]], ['aligned_5fmediump_5fdvec2',['aligned_mediump_dvec2',['../a00176.html#gaba56f2b76d320379cdf7c37e0d4b03bd',1,'glm']]], ['aligned_5fmediump_5fdvec3',['aligned_mediump_dvec3',['../a00176.html#ga22efc7f84ab79eef640e00fc59d07478',1,'glm']]], ['aligned_5fmediump_5fdvec4',['aligned_mediump_dvec4',['../a00176.html#gad6f422f8871685ee467a575238e4ece4',1,'glm']]], ['aligned_5fmediump_5fivec2',['aligned_mediump_ivec2',['../a00176.html#ga389d12dcc8d57a444944a72646d17efa',1,'glm']]], ['aligned_5fmediump_5fivec3',['aligned_mediump_ivec3',['../a00176.html#ga5b16f7e81555819bf0f80f4db4bc0b26',1,'glm']]], ['aligned_5fmediump_5fivec4',['aligned_mediump_ivec4',['../a00176.html#gae640082d0ffdb52fb2d658916c5815db',1,'glm']]], ['aligned_5fmediump_5fuvec2',['aligned_mediump_uvec2',['../a00176.html#ga88c56fde67f035d80b2d0d6d568af30b',1,'glm']]], ['aligned_5fmediump_5fuvec3',['aligned_mediump_uvec3',['../a00176.html#gaee29d3a28f634b03f0a20e79e600f5df',1,'glm']]], ['aligned_5fmediump_5fuvec4',['aligned_mediump_uvec4',['../a00176.html#ga717763c480dcf3ecf66121426287d08a',1,'glm']]], ['aligned_5fmediump_5fvec2',['aligned_mediump_vec2',['../a00176.html#ga57549b1281d99ba1825b1ef0dae6227d',1,'glm']]], ['aligned_5fmediump_5fvec3',['aligned_mediump_vec3',['../a00176.html#gaed5d4dd2755cc5141a9533488edd9e82',1,'glm']]], ['aligned_5fmediump_5fvec4',['aligned_mediump_vec4',['../a00176.html#gae4ab68a8c32574bff14e62f95185d295',1,'glm']]], ['aligned_5fuvec1',['aligned_uvec1',['../a00176.html#ga1ff8ed402c93d280ff0597c1c5e7c548',1,'glm']]], ['aligned_5fuvec2',['aligned_uvec2',['../a00176.html#ga074137e3be58528d67041c223d49f398',1,'glm']]], ['aligned_5fuvec3',['aligned_uvec3',['../a00176.html#ga2a8d9c3046f89d854eb758adfa0811c0',1,'glm']]], ['aligned_5fuvec4',['aligned_uvec4',['../a00176.html#gabf842c45eea186170c267a328e3f3b7d',1,'glm']]], ['aligned_5fvec1',['aligned_vec1',['../a00176.html#ga05e6d4c908965d04191c2070a8d0a65e',1,'glm']]], ['aligned_5fvec2',['aligned_vec2',['../a00176.html#ga0682462f8096a226773e20fac993cde5',1,'glm']]], ['aligned_5fvec3',['aligned_vec3',['../a00176.html#ga7cf643b66664e0cd3c48759ae66c2bd0',1,'glm']]], ['aligned_5fvec4',['aligned_vec4',['../a00176.html#ga85d89e83cb8137e1be1446de8c3b643a',1,'glm']]] ];
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; namespace BlazorBoilerplate.Shared.Dto { public class ApiLogItemDto { [Key] public long Id { get; set; } [Required] public DateTime RequestTime { get; set; } [Required] public long ResponseMillis { get; set; } [Required] public int StatusCode { get; set; } [Required] public string Method { get; set; } [Required] public string Path { get; set; } public string QueryString { get; set; } public string RequestBody { get; set; } public string ResponseBody { get; set; } public string IPAddress { get; set; } public Guid ApplicationUserId { get; set; } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2015-2019 OpenCB ~ ~ 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.opencb.opencga</groupId> <artifactId>opencga-storage-hadoop-deps</artifactId> <version>2.0.0-dev</version> <relativePath>../pom.xml</relativePath> </parent> <!--<groupId>org.opencb.opencga</groupId>--> <artifactId>opencga-storage-hadoop-deps-hdp2.6</artifactId> <version>${parent.version}</version> <packaging>jar</packaging> <properties> <opencga-storage-hadoop-deps.artifactId>${artifactId}</opencga-storage-hadoop-deps.artifactId> <hdp.dependencies.version>2.6.5.3007-2</hdp.dependencies.version> <hadoop.version>2.7.3.${hdp.dependencies.version}</hadoop.version> <hbase.version>1.1.2.${hdp.dependencies.version}</hbase.version> <phoenix.version>4.7.0.${hdp.dependencies.version}</phoenix.version> <tephra.version>0.7.0</tephra.version> </properties> <repositories> <repository> <id>hortonworks-releases</id> <url>http://repo.hortonworks.com/content/repositories/releases/</url> </repository> <repository> <id>hortonworks-public</id> <url>http://repo.hortonworks.com/content/groups/public</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>${protobuf2.version}</version> <optional>true</optional> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> <optional>true</optional> </dependency> <!-- =================================================== --> <!-- Dependencies that we WANT. Included in the uber-jar --> <!-- Add <optional>true</optional> to avoid transitivity --> <!-- =================================================== --> <!--Hadoop dependencies--> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>${hadoop.version}</version> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>${hadoop.version}</version> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-azure</artifactId> <version>${hadoop.version}</version> <!-- <optional>true</optional>--> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-azure-datalake</artifactId> <version>${hadoop.version}</version> <!-- <optional>true</optional>--> </dependency> <!--HBase dependencies--> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-server</artifactId> <version>${hbase.version}</version> <optional>true</optional> </dependency> <!-- Phoenix-core dependencies. Coprocessors uses grpc services--> <dependency> <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-core</artifactId> <version>${phoenix.version}</version> <optional>true</optional> </dependency> <!-- ============================================= --> <!-- Test dependencies --> <!-- ============================================= --> <!--Specify Hadoop minicluster version--> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-minicluster</artifactId> <version>${hadoop.version}</version> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-testing-util</artifactId> <version>${hbase.version}</version> <type>test-jar</type> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-it</artifactId> <version>${hbase.version}</version> <type>test-jar</type> <optional>true</optional> </dependency> <!-- ============================================= --> <!-- TRANSITIVE dependencies. Not to be included --> <!-- Needed by some dependencies. --> <!-- Dependency broken due to optional parent --> <!-- ============================================= --> <dependency> <groupId>org.apache.htrace</groupId> <artifactId>htrace-core</artifactId> <version>3.1.0-incubating</version> </dependency> <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> <version>1.2</version> </dependency> <!-- Exclude mortbay from avro --> <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro</artifactId> </dependency> <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro-ipc</artifactId> </dependency> <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro-mapred</artifactId> <classifier>hadoop2</classifier> </dependency> <!--Needed by hadoop-common --> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>${commons-io.version}</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>${commons-net.version}</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>${commons-httpclient.version}</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-recipes</artifactId> <version>${curator.version}</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-client</artifactId> <version>${curator.version}</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> <version>${curator.version}</version> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>${zookeeper.version}</version> </dependency> <!--Needed by hadoop-hdfs --> <dependency> <groupId>org.fusesource.leveldbjni</groupId> <artifactId>leveldbjni-all</artifactId> <version>${leveldbjni-all.version}</version> </dependency> <!--Needed by hadoop-auth --> <dependency> <groupId>org.apache.directory.server</groupId> <artifactId>apacheds-kerberos-codec</artifactId> <scope>compile</scope> <version>${apacheds-kerberos-codec.version}</version> </dependency> <!--Needed by hadoop-azure --> <dependency> <groupId>com.microsoft.azure</groupId> <artifactId>azure-storage</artifactId> <version>2.0.0</version> </dependency> <!-- hadoop-azure uses the class org.mortbay.util.ajax.JSON --> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> <version>${mortbay.jetty.version}</version> </dependency> <!--Needed by hbase-server --> <dependency> <groupId>com.lmax</groupId> <artifactId>disruptor</artifactId> <version>${disruptor.version}</version> </dependency> <dependency> <groupId>com.yammer.metrics</groupId> <artifactId>metrics-core</artifactId> <version>${metrics-core.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-math</artifactId> <version>${commons-math.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>${netty.version}</version> </dependency> <dependency> <groupId>org.jamon</groupId> <artifactId>jamon-runtime</artifactId> <version>${jamon-runtime.version}</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>${codehaus.jackson.version}</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>${codehaus.jackson.version}</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-jaxrs</artifactId> <version>${codehaus.jackson.version}</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-xc</artifactId> <version>${codehaus.jackson.version}</version> </dependency> <!-- Needed by phoenix --> <!-- Make sure we have all the antlr dependencies --> <dependency> <groupId>org.antlr</groupId> <artifactId>antlr-runtime</artifactId> <version>${antlr.version}</version> </dependency> <dependency> <groupId>jline</groupId> <artifactId>jline</artifactId> <version>${jline.version}</version> </dependency> <dependency> <groupId>sqlline</groupId> <artifactId>sqlline</artifactId> <version>${sqlline.version}</version> </dependency> <dependency> <groupId>co.cask.tephra</groupId> <artifactId>tephra-api</artifactId> <version>${tephra.version}</version> </dependency> <dependency> <groupId>co.cask.tephra</groupId> <artifactId>tephra-core</artifactId> <version>${tephra.version}</version> </dependency> <dependency> <groupId>co.cask.tephra</groupId> <artifactId>tephra-hbase-compat-1.1</artifactId> <version>${tephra.version}</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>org.iq80.snappy</groupId> <artifactId>snappy</artifactId> <version>${snappy.version}</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>${commons-codec.version}</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>${collections.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-csv</artifactId> <version>${commons-csv.version}</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> </dependency> </dependencies> </project>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2005, 2012, 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.ext; import java.util.ListResourceBundle; public class CollationData_is extends ListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "Rule", /* for is, accents sorted backwards plus the following: */ "@" /* sort accents bkwd */ /* assuming that in the default collation we add: */ /* thorn, ae ligature, o-diaeresis, and o-slash */ /* ....in this order...and ditto for the uppercase of these.... */ /* to be treated as characters (not accented characters) after z */ /* then we don't have to add anything here. I've just added it here */ /* just in case it gets overlooked. */ + "& A < a\u0301, A\u0301 " // nt : A < a-acute + "& D < \u00f0, \u00d0" // nt : d < eth + "& E < e\u0301, E\u0301 " // nt : e < e-acute + "& I < i\u0301, I\u0301 " // nt : i < i-acute + "& O < o\u0301, O\u0301 " // nt : o < o-acute + "& U < u\u0301, U\u0301 " // nt : u < u-acute + "& Y < y\u0301, Y\u0301 " // nt : y < y-acute + "& Z < \u00fe, \u00de < \u00e6, \u00c6" // nt : z < thron < a-e-ligature + "< o\u0308, O\u0308 ; \u00f8, \u00d8" // nt : o-umlaut ; o-stroke } }; } }
{ "pile_set_name": "Github" }
<?php namespace Sabre\Event\Loop; class FunctionsTest extends \PHPUnit_Framework_TestCase { function setUp() { // Always creating a fresh loop object. instance(new Loop()); } function tearDown() { // Removing the global loop object. instance(null); } function testNextTick() { $check = 0; nextTick(function() use (&$check) { $check++; }); run(); $this->assertEquals(1, $check); } function testTimeout() { $check = 0; setTimeout(function() use (&$check) { $check++; }, 0.02); run(); $this->assertEquals(1, $check); } function testTimeoutOrder() { $check = []; setTimeout(function() use (&$check) { $check[] = 'a'; }, 0.2); setTimeout(function() use (&$check) { $check[] = 'b'; }, 0.1); setTimeout(function() use (&$check) { $check[] = 'c'; }, 0.3); run(); $this->assertEquals(['b', 'a', 'c'], $check); } function testSetInterval() { $check = 0; $intervalId = null; $intervalId = setInterval(function() use (&$check, &$intervalId) { $check++; if ($check > 5) { clearInterval($intervalId); } }, 0.02); run(); $this->assertEquals(6, $check); } function testAddWriteStream() { $h = fopen('php://temp', 'r+'); addWriteStream($h, function() use ($h) { fwrite($h, 'hello world'); removeWriteStream($h); }); run(); rewind($h); $this->assertEquals('hello world', stream_get_contents($h)); } function testAddReadStream() { $h = fopen('php://temp', 'r+'); fwrite($h, 'hello world'); rewind($h); $result = null; addReadStream($h, function() use ($h, &$result) { $result = fgets($h); removeReadStream($h); }); run(); $this->assertEquals('hello world', $result); } function testStop() { $check = 0; setTimeout(function() use (&$check) { $check++; }, 200); nextTick(function() { stop(); }); run(); $this->assertEquals(0, $check); } function testTick() { $check = 0; setTimeout(function() use (&$check) { $check++; }, 1); nextTick(function() use (&$check) { $check++; }); tick(); $this->assertEquals(1, $check); } }
{ "pile_set_name": "Github" }
// SysIconUtils.h #include "StdAfx.h" #include "SysIconUtils.h" #ifndef _UNICODE #include "Common/StringConvert.h" #endif #ifndef _UNICODE extern bool g_IsNT; #endif int GetIconIndexForCSIDL(int csidl) { #ifdef _WIN32 LPITEMIDLIST pidl = 0; SHGetSpecialFolderLocation(NULL, csidl, &pidl); if (pidl) { SHFILEINFO shellInfo; SHGetFileInfo(LPCTSTR(pidl), FILE_ATTRIBUTE_NORMAL, &shellInfo, sizeof(shellInfo), SHGFI_PIDL | SHGFI_SYSICONINDEX); IMalloc *pMalloc; SHGetMalloc(&pMalloc); if(pMalloc) { pMalloc->Free(pidl); pMalloc->Release(); } return shellInfo.iIcon; } #endif // FIXME -1 ? return 0; } DWORD_PTR GetRealIconIndex(LPCTSTR path, DWORD attributes, int &iconIndex) { #ifdef _WIN32 SHFILEINFO shellInfo; DWORD_PTR res = ::SHGetFileInfo(path, FILE_ATTRIBUTE_NORMAL | attributes, &shellInfo, sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX); iconIndex = shellInfo.iIcon; return res; #else return -1; #endif } #ifdef _WIN32 #ifndef _UNICODE typedef int (WINAPI * SHGetFileInfoWP)(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags); struct CSHGetFileInfoInit { SHGetFileInfoWP shGetFileInfoW; CSHGetFileInfoInit() { shGetFileInfoW = (SHGetFileInfoWP) ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHGetFileInfoW"); } } g_SHGetFileInfoInit; #endif DWORD_PTR MySHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags) { #ifdef _UNICODE return SHGetFileInfoW( #else if (g_SHGetFileInfoInit.shGetFileInfoW == 0) return 0; return g_SHGetFileInfoInit.shGetFileInfoW( #endif pszPath, dwFileAttributes, psfi, cbFileInfo, uFlags); } #ifndef _UNICODE // static inline UINT GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; } DWORD_PTR GetRealIconIndex(LPCWSTR path, DWORD attributes, int &iconIndex) { if(g_IsNT) { SHFILEINFOW shellInfo; DWORD_PTR res = ::MySHGetFileInfoW(path, FILE_ATTRIBUTE_NORMAL | attributes, &shellInfo, sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX); iconIndex = shellInfo.iIcon; return res; } else return GetRealIconIndex(UnicodeStringToMultiByte(path), attributes, iconIndex); } #endif DWORD_PTR GetRealIconIndex(const UString &fileName, DWORD attributes, int &iconIndex, UString &typeName) { #ifndef _UNICODE if(!g_IsNT) { SHFILEINFO shellInfo; shellInfo.szTypeName[0] = 0; DWORD_PTR res = ::SHGetFileInfoA(GetSystemString(fileName), FILE_ATTRIBUTE_NORMAL | attributes, &shellInfo, sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME); typeName = GetUnicodeString(shellInfo.szTypeName); iconIndex = shellInfo.iIcon; return res; } else #endif { SHFILEINFOW shellInfo; shellInfo.szTypeName[0] = 0; DWORD_PTR res = ::MySHGetFileInfoW(fileName, FILE_ATTRIBUTE_NORMAL | attributes, &shellInfo, sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME); typeName = shellInfo.szTypeName; iconIndex = shellInfo.iIcon; return res; } } int CExtToIconMap::GetIconIndex(UINT32 attributes, const UString &fileNameSpec, UString &typeName) { UString fileName = fileNameSpec; if ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0) { fileName = L"__Fldr__"; if (_dirIconIndex < 0) GetRealIconIndex(fileName, attributes, _dirIconIndex, _dirTypeName); typeName = _dirTypeName; return _dirIconIndex; } int dotPos = fileName.ReverseFind('.'); if (dotPos < 0) { fileName = L"__File__"; if (_noExtIconIndex < 0) { int iconIndexTemp; GetRealIconIndex(fileName, attributes, iconIndexTemp, _noExtTypeName); } typeName = _noExtTypeName; return _noExtIconIndex; } CExtIconPair extIconPair; extIconPair.Ext = fileName.Mid(dotPos + 1); int anIndex = _map.FindInSorted(extIconPair); if (anIndex >= 0) return _map[anIndex].IconIndex; fileName = fileName.Mid(dotPos); GetRealIconIndex(fileName, attributes, extIconPair.IconIndex, extIconPair.TypeName); _map.AddToSorted(extIconPair); typeName = extIconPair.TypeName; return extIconPair.IconIndex; } int CExtToIconMap::GetIconIndex(UINT32 attributes, const UString &fileName) { UString typeName; return GetIconIndex(attributes, fileName, typeName); } #endif
{ "pile_set_name": "Github" }
sha256:21d34136a2b1f1f258f3d214c00f1cdf28c37c075a87fc143dc3f2253d9f6070
{ "pile_set_name": "Github" }
(.module: [lux #* ["@" target]] [//// [version (#+ Version)]]) (def: #export version Version (for {@.old 00,05,99} 00,06,00))
{ "pile_set_name": "Github" }
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ /* * 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.sun.org.apache.xml.internal.serializer.utils; import java.util.ListResourceBundle; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * An instance of this class is a ListResourceBundle that * has the required getContents() method that returns * an array of message-key/message associations. * <p> * The message keys are defined in {@link MsgKey}. The * messages that those keys map to are defined here. * <p> * The messages in the English version are intended to be * translated. * * This class is not a public API, it is only public because it is * used in com.sun.org.apache.xml.internal.serializer. * * @xsl.usage internal */ public class SerializerMessages_zh_CN extends ListResourceBundle { /* * This file contains error and warning messages related to * Serializer Error Handling. * * General notes to translators: * 1) A stylesheet is a description of how to transform an input XML document * into a resultant XML document (or HTML document or text). The * stylesheet itself is described in the form of an XML document. * * 2) An element is a mark-up tag in an XML document; an attribute is a * modifier on the tag. For example, in <elem attr='val' attr2='val2'> * "elem" is an element name, "attr" and "attr2" are attribute names with * the values "val" and "val2", respectively. * * 3) A namespace declaration is a special attribute that is used to associate * a prefix with a URI (the namespace). The meanings of element names and * attribute names that use that prefix are defined with respect to that * namespace. * * */ /** The lookup table for error messages. */ public Object[][] getContents() { Object[][] contents = new Object[][] { { MsgKey.BAD_MSGKEY, "\u6D88\u606F\u5173\u952E\u5B57 ''{0}'' \u4E0D\u5728\u6D88\u606F\u7C7B ''{1}'' \u4E2D" }, { MsgKey.BAD_MSGFORMAT, "\u6D88\u606F\u7C7B ''{1}'' \u4E2D\u6D88\u606F ''{0}'' \u7684\u683C\u5F0F\u5316\u5931\u8D25\u3002" }, { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, "\u4E32\u884C\u5668\u7C7B ''{0}'' \u4E0D\u5B9E\u73B0 org.xml.sax.ContentHandler\u3002" }, { MsgKey.ER_RESOURCE_COULD_NOT_FIND, "\u627E\u4E0D\u5230\u8D44\u6E90 [ {0} ]\u3002\n {1}" }, { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, "\u8D44\u6E90 [ {0} ] \u65E0\u6CD5\u52A0\u8F7D: {1} \n {2} \t {3}" }, { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, "\u7F13\u51B2\u533A\u5927\u5C0F <=0" }, { MsgKey.ER_INVALID_UTF16_SURROGATE, "\u68C0\u6D4B\u5230\u65E0\u6548\u7684 UTF-16 \u4EE3\u7406: {0}?" }, { MsgKey.ER_OIERROR, "IO \u9519\u8BEF" }, { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, "\u5728\u751F\u6210\u5B50\u8282\u70B9\u4E4B\u540E\u6216\u5728\u751F\u6210\u5143\u7D20\u4E4B\u524D\u65E0\u6CD5\u6DFB\u52A0\u5C5E\u6027 {0}\u3002\u5C06\u5FFD\u7565\u5C5E\u6027\u3002" }, /* * Note to translators: The stylesheet contained a reference to a * namespace prefix that was undefined. The value of the substitution * text is the name of the prefix. */ { MsgKey.ER_NAMESPACE_PREFIX, "\u6CA1\u6709\u8BF4\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 ''{0}''\u3002" }, /* * Note to translators: This message is reported if the stylesheet * being processed attempted to construct an XML document with an * attribute in a place other than on an element. The substitution text * specifies the name of the attribute. */ { MsgKey.ER_STRAY_ATTRIBUTE, "\u5C5E\u6027 ''{0}'' \u5728\u5143\u7D20\u5916\u90E8\u3002" }, /* * Note to translators: As with the preceding message, a namespace * declaration has the form of an attribute and is only permitted to * appear on an element. The substitution text {0} is the namespace * prefix and {1} is the URI that was being used in the erroneous * namespace declaration. */ { MsgKey.ER_STRAY_NAMESPACE, "\u540D\u79F0\u7A7A\u95F4\u58F0\u660E ''{0}''=''{1}'' \u5728\u5143\u7D20\u5916\u90E8\u3002" }, { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, "\u65E0\u6CD5\u52A0\u8F7D ''{0}'' (\u68C0\u67E5 CLASSPATH), \u73B0\u5728\u53EA\u4F7F\u7528\u9ED8\u8BA4\u503C" }, { MsgKey.ER_ILLEGAL_CHARACTER, "\u5C1D\u8BD5\u8F93\u51FA\u672A\u4EE5{1}\u7684\u6307\u5B9A\u8F93\u51FA\u7F16\u7801\u8868\u793A\u7684\u6574\u6570\u503C {0} \u7684\u5B57\u7B26\u3002" }, { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, "\u65E0\u6CD5\u4E3A\u8F93\u51FA\u65B9\u6CD5 ''{1}'' \u52A0\u8F7D\u5C5E\u6027\u6587\u4EF6 ''{0}'' (\u68C0\u67E5 CLASSPATH)" }, { MsgKey.ER_INVALID_PORT, "\u65E0\u6548\u7684\u7AEF\u53E3\u53F7" }, { MsgKey.ER_PORT_WHEN_HOST_NULL, "\u4E3B\u673A\u4E3A\u7A7A\u65F6, \u65E0\u6CD5\u8BBE\u7F6E\u7AEF\u53E3" }, { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, "\u4E3B\u673A\u4E0D\u662F\u683C\u5F0F\u826F\u597D\u7684\u5730\u5740" }, { MsgKey.ER_SCHEME_NOT_CONFORMANT, "\u65B9\u6848\u4E0D\u4E00\u81F4\u3002" }, { MsgKey.ER_SCHEME_FROM_NULL_STRING, "\u65E0\u6CD5\u4ECE\u7A7A\u5B57\u7B26\u4E32\u8BBE\u7F6E\u65B9\u6848" }, { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, "\u8DEF\u5F84\u5305\u542B\u65E0\u6548\u7684\u8F6C\u4E49\u5E8F\u5217" }, { MsgKey.ER_PATH_INVALID_CHAR, "\u8DEF\u5F84\u5305\u542B\u65E0\u6548\u7684\u5B57\u7B26: {0}" }, { MsgKey.ER_FRAG_INVALID_CHAR, "\u7247\u6BB5\u5305\u542B\u65E0\u6548\u7684\u5B57\u7B26" }, { MsgKey.ER_FRAG_WHEN_PATH_NULL, "\u8DEF\u5F84\u4E3A\u7A7A\u65F6, \u65E0\u6CD5\u8BBE\u7F6E\u7247\u6BB5" }, { MsgKey.ER_FRAG_FOR_GENERIC_URI, "\u53EA\u80FD\u4E3A\u4E00\u822C URI \u8BBE\u7F6E\u7247\u6BB5" }, { MsgKey.ER_NO_SCHEME_IN_URI, "\u5728 URI \u4E2D\u627E\u4E0D\u5230\u65B9\u6848" }, { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, "\u65E0\u6CD5\u4EE5\u7A7A\u53C2\u6570\u521D\u59CB\u5316 URI" }, { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, "\u8DEF\u5F84\u548C\u7247\u6BB5\u4E2D\u90FD\u65E0\u6CD5\u6307\u5B9A\u7247\u6BB5" }, { MsgKey.ER_NO_QUERY_STRING_IN_PATH, "\u8DEF\u5F84\u548C\u67E5\u8BE2\u5B57\u7B26\u4E32\u4E2D\u4E0D\u80FD\u6307\u5B9A\u67E5\u8BE2\u5B57\u7B26\u4E32" }, { MsgKey.ER_NO_PORT_IF_NO_HOST, "\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u4E3B\u673A, \u5219\u4E0D\u53EF\u4EE5\u6307\u5B9A\u7AEF\u53E3" }, { MsgKey.ER_NO_USERINFO_IF_NO_HOST, "\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u4E3B\u673A, \u5219\u4E0D\u53EF\u4EE5\u6307\u5B9A Userinfo" }, { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, "\u8B66\u544A: \u8F93\u51FA\u6587\u6863\u7684\u7248\u672C\u5E94\u4E3A ''{0}''\u3002\u4E0D\u652F\u6301\u6B64\u7248\u672C\u7684 XML\u3002\u8F93\u51FA\u6587\u6863\u7684\u7248\u672C\u5C06\u4E3A ''1.0''\u3002" }, { MsgKey.ER_SCHEME_REQUIRED, "\u65B9\u6848\u662F\u5FC5\u9700\u7684!" }, /* * Note to translators: The words 'Properties' and * 'SerializerFactory' in this message are Java class names * and should not be translated. */ { MsgKey.ER_FACTORY_PROPERTY_MISSING, "\u4F20\u9012\u5230 SerializerFactory \u7684 Properties \u5BF9\u8C61\u6CA1\u6709 ''{0}'' \u5C5E\u6027\u3002" }, { MsgKey.ER_ENCODING_NOT_SUPPORTED, "\u8B66\u544A: Java \u8FD0\u884C\u65F6\u4E0D\u652F\u6301\u7F16\u7801 ''{0}''\u3002" }, {MsgKey.ER_FEATURE_NOT_FOUND, "\u672A\u8BC6\u522B\u53C2\u6570 ''{0}''\u3002"}, {MsgKey.ER_FEATURE_NOT_SUPPORTED, "\u5DF2\u8BC6\u522B\u53C2\u6570 ''{0}'', \u4F46\u65E0\u6CD5\u8BBE\u7F6E\u8BF7\u6C42\u7684\u503C\u3002"}, {MsgKey.ER_STRING_TOO_LONG, "\u751F\u6210\u7684\u5B57\u7B26\u4E32\u592A\u957F, \u4E0D\u9002\u5408 DOMString: ''{0}''\u3002"}, {MsgKey.ER_TYPE_MISMATCH_ERR, "\u6B64\u53C2\u6570\u540D\u79F0\u7684\u503C\u7C7B\u578B\u4E0E\u9884\u671F\u7684\u503C\u7C7B\u578B\u4E0D\u517C\u5BB9\u3002"}, {MsgKey.ER_NO_OUTPUT_SPECIFIED, "\u8981\u5C06\u6570\u636E\u5199\u5165\u7684\u8F93\u51FA\u76EE\u6807\u4E3A\u7A7A\u503C\u3002"}, {MsgKey.ER_UNSUPPORTED_ENCODING, "\u9047\u5230\u4E0D\u652F\u6301\u7684\u7F16\u7801\u3002"}, {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, "\u65E0\u6CD5\u5E8F\u5217\u5316\u8282\u70B9\u3002"}, {MsgKey.ER_CDATA_SECTIONS_SPLIT, "CDATA \u8282\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u7EC8\u6B62\u6807\u8BB0 ']]>'\u3002"}, {MsgKey.ER_WARNING_WF_NOT_CHECKED, "\u65E0\u6CD5\u521B\u5EFA\u683C\u5F0F\u5408\u89C4\u6027\u68C0\u67E5\u5668\u7684\u5B9E\u4F8B\u3002\u683C\u5F0F\u5408\u89C4\u6027\u53C2\u6570\u5DF2\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D, \u4F46\u65E0\u6CD5\u6267\u884C\u683C\u5F0F\u5408\u89C4\u6027\u68C0\u67E5\u3002" }, {MsgKey.ER_WF_INVALID_CHARACTER, "\u8282\u70B9 ''{0}'' \u5305\u542B\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002" }, { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, "\u5728\u6CE8\u91CA\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002" }, { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, "\u5728\u5904\u7406\u6307\u4EE4\u6570\u636E\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002" }, { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, "\u5728 CDATA \u8282\u7684\u5185\u5BB9\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002" }, { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, "\u5728\u8282\u70B9\u7684\u5B57\u7B26\u6570\u636E\u5185\u5BB9\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002" }, { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, "\u5728\u540D\u4E3A ''{1}'' \u7684{0}\u8282\u70B9\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002" }, { MsgKey.ER_WF_DASH_IN_COMMENT, "\u6CE8\u91CA\u4E2D\u4E0D\u5141\u8BB8\u51FA\u73B0\u5B57\u7B26\u4E32 \"--\"\u3002" }, {MsgKey.ER_WF_LT_IN_ATTVAL, "\u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684 \"{1}\" \u5C5E\u6027\u503C\u4E0D\u80FD\u5305\u542B ''<'' \u5B57\u7B26\u3002" }, {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, "\u4E0D\u5141\u8BB8\u4F7F\u7528\u672A\u89E3\u6790\u7684\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002" }, {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, "\u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002" }, {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, "\u524D\u7F00 \"{0}\" \u65E0\u6CD5\u7ED1\u5B9A\u5230\u540D\u79F0\u7A7A\u95F4 \"{1}\"\u3002" }, {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, "\u5143\u7D20 \"{0}\" \u7684\u672C\u5730\u540D\u79F0\u4E3A\u7A7A\u503C\u3002" }, {MsgKey.ER_NULL_LOCAL_ATTR_NAME, "\u5C5E\u6027 \"{0}\" \u7684\u672C\u5730\u540D\u79F0\u4E3A\u7A7A\u503C\u3002" }, { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, "\u5B9E\u4F53\u8282\u70B9 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5305\u542B\u5E26\u6709\u672A\u7ED1\u5B9A\u524D\u7F00 \"{2}\" \u7684\u5143\u7D20\u8282\u70B9 \"{1}\"\u3002" }, { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, "\u5B9E\u4F53\u8282\u70B9 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5305\u542B\u5E26\u6709\u672A\u7ED1\u5B9A\u524D\u7F00 \"{2}\" \u7684\u5C5E\u6027\u8282\u70B9 \"{1}\"\u3002" }, { MsgKey.ER_WRITING_INTERNAL_SUBSET, "\u5199\u5165\u5185\u90E8\u5B50\u96C6\u65F6\u51FA\u73B0\u9519\u8BEF\u3002" }, }; return contents; } }
{ "pile_set_name": "Github" }
{ "Entries": [ { "RequestUri": "https://heathskv.vault.azure.net/deletedsecrets/922873626?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Content-Type": "application/json", "traceparent": "00-3c5af8cdd0ef62448195d1f00ce344be-ef808115038eff42-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Secrets/4.1.0-dev.20200729.1", "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "818fb5d891a8ed736a652a61ee6a187a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "87", "Content-Type": "application/json; charset=utf-8", "Date": "Wed, 29 Jul 2020 22:29:06 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000;includeSubDomains", "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://vault.azure.net\u0022", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=67.171.12.239;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus2", "x-ms-keyvault-service-version": "1.1.10.0", "x-ms-request-id": "98e81d38-c1a9-4b90-9668-bda85b01bde6", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "error": { "code": "Unauthorized", "message": "Request is missing a Bearer or PoP token." } } }, { "RequestUri": "https://heathskv.vault.azure.net/deletedsecrets/922873626?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", "traceparent": "00-3c5af8cdd0ef62448195d1f00ce344be-ef808115038eff42-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Secrets/4.1.0-dev.20200729.1", "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "818fb5d891a8ed736a652a61ee6a187a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "306", "Content-Type": "application/json; charset=utf-8", "Date": "Wed, 29 Jul 2020 22:29:06 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000;includeSubDomains", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", "x-ms-keyvault-network-info": "conn_type=Ipv4;addr=67.171.12.239;act_addr_fam=InterNetwork;", "x-ms-keyvault-region": "westus2", "x-ms-keyvault-service-version": "1.1.10.0", "x-ms-request-id": "e89a3cdb-e15d-4870-9f96-59ab45937345", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "error": { "code": "SecretNotFound", "message": "A secret with (name/id) 922873626 was not found in this key vault. If you recently deleted this secret you may be able to recover it using the correct recovery command. For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125182" } } } ], "Variables": { "AZURE_KEYVAULT_URL": "https://heathskv.vault.azure.net", "RandomSeed": "818369658" } }
{ "pile_set_name": "Github" }
{ "Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Debug", "System": "Information", "Microsoft": "Information" } } }
{ "pile_set_name": "Github" }
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\Mail; use Magento\Framework\Mail\Exception\InvalidArgumentException; use Zend\Mime\Part as ZendMimePart; /** * @inheritDoc */ class MimePart implements MimePartInterface { /** * UTF-8 charset */ public const CHARSET_UTF8 = 'utf-8'; /** * @var ZendMimePart */ private $mimePart; /** * MimePart constructor * * @param resource|string $content * @param string|null $type * @param string|null $fileName * @param string|null $disposition * @param string|null $encoding * @param string|null $description * @param array|null $filters * @param string|null $charset * @param string|null $boundary * @param string|null $location * @param string|null $language * @param bool|null $isStream * * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @throws InvalidArgumentException */ public function __construct( $content, ?string $type = MimeInterface::TYPE_HTML, ?string $fileName = null, ?string $disposition = null, ?string $encoding = MimeInterface::ENCODING_QUOTED_PRINTABLE, ?string $description = null, ?array $filters = [], ?string $charset = self::CHARSET_UTF8, ?string $boundary = null, ?string $location = null, ?string $language = null, ?bool $isStream = null ) { try { $this->mimePart = new ZendMimePart($content); } catch (\Exception $e) { throw new InvalidArgumentException($e->getMessage()); } $this->mimePart->setType($type); $this->mimePart->setEncoding($encoding); $this->mimePart->setFilters($filters); if ($charset) { $this->mimePart->setBoundary($boundary); } if ($charset) { $this->mimePart->setCharset($charset); } if ($disposition) { $this->mimePart->setDisposition($disposition); } if ($description) { $this->mimePart->setDescription($description); } if ($fileName) { $this->mimePart->setFileName($fileName); } if ($location) { $this->mimePart->setLocation($location); } if ($language) { $this->mimePart->setLanguage($language); } if ($isStream) { $this->mimePart->setIsStream($isStream); } } /** * @inheritDoc */ public function getType(): string { return $this->mimePart->getType(); } /** * @inheritDoc */ public function getEncoding(): string { return $this->mimePart->getEncoding(); } /** * @inheritDoc */ public function getDisposition(): string { return $this->mimePart->getDisposition(); } /** * @inheritDoc */ public function getDescription(): string { return $this->mimePart->getDescription(); } /** * @inheritDoc */ public function getFileName(): string { return $this->mimePart->getFileName(); } /** * @inheritDoc */ public function getCharset(): string { return $this->mimePart->getCharset(); } /** * @inheritDoc */ public function getBoundary(): string { return $this->mimePart->getBoundary(); } /** * @inheritDoc */ public function getLocation(): string { return $this->mimePart->getLocation(); } /** * @inheritDoc */ public function getLanguage(): string { return $this->mimePart->getLanguage(); } /** * @inheritDoc */ public function getFilters(): array { return $this->mimePart->getFilters(); } /** * @inheritDoc */ public function isStream(): bool { return $this->mimePart->isStream(); } /** * @inheritDoc */ public function getEncodedStream($endOfLine = MimeInterface::LINE_END) { return $this->mimePart->getEncodedStream($endOfLine); } /** * @inheritDoc */ public function getContent($endOfLine = MimeInterface::LINE_END) { return $this->mimePart->getContent($endOfLine); } /** * @inheritDoc */ public function getRawContent(): string { return $this->mimePart->getRawContent(); } /** * @inheritDoc */ public function getHeadersArray($endOfLine = MimeInterface::LINE_END): array { return $this->mimePart->getHeadersArray($endOfLine); } /** * @inheritDoc */ public function getHeaders($endOfLine = MimeInterface::LINE_END): string { return $this->mimePart->getHeaders($endOfLine); } }
{ "pile_set_name": "Github" }
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. // //********************************************************* struct VSInput { float4 position : POSITION; float2 uv : TEXCOORD; }; struct PSInput { float4 position : SV_POSITION; float2 uv : TEXCOORD; }; Texture2D g_renderTargets[6] : register(t0); SamplerState g_sampler : register(s0); cbuffer ShaderConstants : register(b0) { uint currentRenderTarget; uint renderTargetCount; };
{ "pile_set_name": "Github" }
W-Woah, h-hi >///<. Greetings. W-What are you l-looking at... oh... H-Hi. W-Why are you greeting me?!. Hi?. Siema. Holu. Have a good day, sir. Czesc Olá, ¿como estás?. Testing Hello. Hi, lovely flower. H-Hi. Greets. Hola, ¿cómo estas?. Wsh, sisi la famille bien ou bien? H-Hello... H e l l o. Bonjour. Good Day. What's up? Oh.. Bonjour.. J-je te trouve resplendissante aujourd'hui!. Hi, cutie. Elo mordo. Dzien dobry. H-Hello >//<. It- It's not like I wanted to say hello to you, or a-anything, B-B-BAAAAAAAAAAAKAA!!! Bom dia senhor. Heya!. Hola. Hi, my love. Wassup homie, how's it poppin'. Heya! add greeting Good day, mister. Saudações, Vossa Excelência. Hello, master. Hi? Hello. Greetings. Good Day. H-Hi. H-Hello >//<. W-What are you l-looking at... oh... H-Hi. Hi?. Have a good day, sir. H e l l o. W-Why are you greeting me?!. Hi, cutie. Hi, lovely flower. Hi, my love. Good day, mister. Heya!. Hello, master. What's up? Greets. W-Woah, h-hi >///<. Wassup homie, how's it poppin'. Hola, ¿cómo estas?. Bonjour. Oh.. Bonjour.. J-je te trouve resplendissante aujourd'hui!. Olá, ¿como estás?. Bom dia senhor. Wsh, sisi la famille bien ou bien? Saudações, Vossa Excelência. Dzien dobry. Siema. Holu. Czesc Hola. Elo mordo. It- It's not like I wanted to say hello to you, or a-anything, B-B-BAAAAAAAAAAAKAA!!! Heya! H-Hello...
{ "pile_set_name": "Github" }
!: BOLT 4 !: AUTO RESET !: AUTO HELLO !: AUTO GOODBYE C: BEGIN { "mode": "r", "db": "mydatabase" } S: SUCCESS {} C: RUN "MATCH (n) RETURN n.name" {} {} PULL { "n": 1000 } S: SUCCESS {"fields": ["n.name"]} RECORD ["Bob"] RECORD ["Alice"] RECORD ["Tina"] SUCCESS {} C: COMMIT S: SUCCESS { "bookmark": "ABookmark" }
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #include "main.h" void test_eigen2_meta() { typedef float & FloatRef; typedef const float & ConstFloatRef; VERIFY((ei_meta_if<(3<4),ei_meta_true, ei_meta_false>::ret::ret)); VERIFY(( ei_is_same_type<float,float>::ret)); VERIFY((!ei_is_same_type<float,double>::ret)); VERIFY((!ei_is_same_type<float,float&>::ret)); VERIFY((!ei_is_same_type<float,const float&>::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<const float&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<const float*>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<const float*&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<float**>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<float**&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<float* const *&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_cleantype<float* const>::type >::ret)); VERIFY(( ei_is_same_type<float*,ei_unconst<const float*>::type >::ret)); VERIFY(( ei_is_same_type<float&,ei_unconst<const float&>::type >::ret)); VERIFY(( ei_is_same_type<float&,ei_unconst<ConstFloatRef>::type >::ret)); VERIFY(( ei_is_same_type<float&,ei_unconst<float&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_unref<float&>::type >::ret)); VERIFY(( ei_is_same_type<const float,ei_unref<const float&>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_unpointer<float*>::type >::ret)); VERIFY(( ei_is_same_type<const float,ei_unpointer<const float*>::type >::ret)); VERIFY(( ei_is_same_type<float,ei_unpointer<float* const >::type >::ret)); VERIFY(ei_meta_sqrt<1>::ret == 1); #define VERIFY_META_SQRT(X) VERIFY(ei_meta_sqrt<X>::ret == int(ei_sqrt(double(X)))) VERIFY_META_SQRT(2); VERIFY_META_SQRT(3); VERIFY_META_SQRT(4); VERIFY_META_SQRT(5); VERIFY_META_SQRT(6); VERIFY_META_SQRT(8); VERIFY_META_SQRT(9); VERIFY_META_SQRT(15); VERIFY_META_SQRT(16); VERIFY_META_SQRT(17); VERIFY_META_SQRT(255); VERIFY_META_SQRT(256); VERIFY_META_SQRT(257); VERIFY_META_SQRT(1023); VERIFY_META_SQRT(1024); VERIFY_META_SQRT(1025); }
{ "pile_set_name": "Github" }
Clock_rate=2100 Mhz % clock MFLOP ROUTINE/PROBLEM ======= ========= =============== 443.9 9321.7 kgemvN 467.5 9818.4 kgemvT 317.2 6660.8 kger1 605.5 12715.1 kger2 1547.9 32506.2 kgemm
{ "pile_set_name": "Github" }
import { ApplicationRef } from "@angular/core"; // >> router-outlet-example import { Component, NgModule } from "@angular/core"; import { platformNativeScriptDynamic } from "@nativescript/angular/platform"; import { NativeScriptRouterModule } from "@nativescript/angular/router"; import { Router, NavigationStart, NavigationEnd } from "@angular/router"; import { routes } from "./app.routes"; import { FirstComponent, SecondComponent } from "./navigation-common"; @Component({ selector: "navigation-test", template: ` <StackLayout> <StackLayout class="nav"> <Button text="First" [nsRouterLink]="['/first']"></Button> <Button text="Second" [nsRouterLink]="['/second']"></Button> </StackLayout> <router-outlet></router-outlet> </StackLayout> ` }) export class NavigationApp { // >> (hide) public startEvent: any; public endEvent: any; public done: Promise<void>; constructor(public router: Router, public appRef: ApplicationRef) { this.done = new Promise<void>((resolve, reject) => { this.router.events.subscribe((e) => { if (e instanceof NavigationStart) { this.startEvent = e; } if (e instanceof NavigationEnd) { this.endEvent = e; resolve(); } }); }); } // << (hide) } @NgModule({ bootstrap: [NavigationApp], entryComponents: [FirstComponent, SecondComponent], imports: [ NativeScriptRouterModule, NativeScriptRouterModule.forRoot(routes) ] }) export class NavigationAppModule { } // >> (hide) function start_snippet() { // << (hide) platformNativeScriptDynamic().bootstrapModule(NavigationAppModule); // >> (hide) } // << (hide) // << router-outlet-example
{ "pile_set_name": "Github" }
/* * Copyright (c) 2014 Glen Fernandes * * 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_UTILITY_ENABLE_IF_HPP #define BOOST_UTILITY_ENABLE_IF_HPP // The header file at this path is deprecated; // use boost/core/enable_if.hpp instead. #include <boost/core/enable_if.hpp> #endif
{ "pile_set_name": "Github" }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2 # This file is part of Checkmk (https://checkmk.com). It is subject to the terms and # conditions defined in the file COPYING, which is part of this source code package. BONDING_CHECK_DEFAULT_PARAMETERS = { 'ieee_302_3ad_agg_id_missmatch_state': 1, 'expect_active': 'ignore', } def inventory_bonding(parsed): inventory = [] for bond, status in parsed.items(): if status["status"] in ("up", "degraded"): # If no information about primary interface is available # then assume currently active one as primary if "primary" not in status and "active" in status: params = {"primary": status["active"]} else: params = {} inventory.append((bond, params)) return inventory def _check_ieee_302_3ad_specific(params, status): master_id = status.get('aggregator_id') missmatch_state = params['ieee_302_3ad_agg_id_missmatch_state'] for eth, slave in status["interfaces"].items(): slave_id = slave['aggregator_id'] if master_id is None: master_id = slave_id if slave_id != master_id: yield missmatch_state, "Missmatching aggregator ID of %s: %s" % (eth, slave_id) def check_bonding(item, params, parsed): status = parsed.get(item) if not status: return if status["status"] not in ("up", "degraded"): yield 2, "Interface is " + status["status"] return mode = status["mode"] yield 0, "Mode: %s" % mode if "IEEE 802.3ad" in mode: for result in _check_ieee_302_3ad_specific(params, status): yield result speed = status.get('speed') if speed: yield 0, "Speed: %s" % speed for eth, slave in status["interfaces"].items(): state = int(slave["status"] != 'up') if "hwaddr" in slave: yield state, "%s/%s %s" % (eth, slave["hwaddr"], slave["status"]) else: yield state, "%s %s" % (eth, slave["status"]) primary = status.get("primary", params.get("primary")) if primary: yield 0, "Primary: %s" % primary active = status.get("active") if active: state = 0 info = "Active: %s" % active expected_active = None expect = params["expect_active"] if expect == "primary": expected_active = primary elif expect == "lowest": expected_active = min(status["interfaces"]) if expected_active is not None and expected_active != active: state = 1 info += " (expected is %s)" % expected_active yield state, info yield 0 if status["status"] == "up" else 1, "Bond status: %s" % status["status"]
{ "pile_set_name": "Github" }
// // GLShader.h // CeedGL // // Created by Raphael Sebbe on 01/11/10. // Copyright (c) 2010 Creaceed. All rights reserved. // #import <Foundation/Foundation.h> #import <CeedGL/GLObject.h> #define GL_STRINGIFY(A) [NSString stringWithCString:#A encoding:NSUTF8StringEncoding] @interface GLShader : GLObject { GLenum mType; NSString *mSource; } @property (readonly, nonatomic) GLenum type; //@property (readwrite, nonatomic, strong) NSString *source; - (instancetype)initWithType:(GLenum)type; - (instancetype)initVertexShader; - (instancetype)initFragmentShader; + (instancetype)vertexShader; + (instancetype)fragmentShader; - (void)setSource:(NSString*)source; - (BOOL)compile:(NSError**)error; @end
{ "pile_set_name": "Github" }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAttributesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('attributes', function (Blueprint $table) { $table->increments('id'); $table->integer('group_id')->unsigned(); $table->foreign('group_id')->references('id')->on('attribute_groups'); $table->json('name'); $table->string('handle')->unique(); $table->integer('position'); $table->boolean('variant')->default(false); $table->boolean('searchable')->default(false); $table->boolean('filterable')->default(false); $table->boolean('system')->default(false); $table->boolean('channeled')->default(false); $table->boolean('translatable')->default(true); $table->enum( 'type', ['text', 'textarea', 'select', 'radio', 'richtext', 'checkbox', 'date', 'time', 'checkbox_group', 'radio_group', 'toggle', 'number'] )->default('text'); $table->boolean('required')->default(false); $table->json('lookups')->nullable(); $table->timestamps(); $table->index(['handle']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('attributes', function (Blueprint $table) { $table->dropForeign(['group_id']); $table->dropIndex(['handle']); }); Schema::dropIfExists('attributes'); } }
{ "pile_set_name": "Github" }
$(function() { $('.triggers li').hover(function() { var trig = $(this).attr('class').slice(7); if (trig == 1 || trig == 2) { $('.loupe' + trig).show(150); } if (trig == 3) { $('.second-loupe').css({marginLeft: '-50px', marginTop: '-50px'}).show(150); } if (trig == 4) { $('.second-loupe').css({marginLeft: '-50px', marginTop: '0px'}).show(150); } if (trig == 5) { $('.second-loupe').css({marginLeft: '0px', marginTop: '-50px'}).show(150); } if (trig == 6) { $('.second-loupe').css({marginLeft: '-50px', marginTop: '-100px'}).show(150); } if (trig == 7) { $('.second-loupe').css({marginLeft: '-100px', marginTop: '-100px'}).show(150); } if (trig == 8) { $('.third-loupe').show(); } if (trig == 9) { $('.fourth-loupe').show(2000); } var style3 = $('.third-loupe').attr('style'); }, function() { $('.loupe1, .loupe2, .second-loupe, .third-loupe').hide(150); $('.third-loupe, .fourth-loupe').hide(); }); });
{ "pile_set_name": "Github" }
namespace CSharpGL { /// <summary> /// Toggle of color mask. /// </summary> public class ColorMaskSwitch : GLSwitch { /// <summary> /// mask when this switch is turned on. /// </summary> public ColorMask Mask { get; set; } /// <summary> /// mask when this switch is turned off. /// </summary> public ColorMask OriginalMask { get; private set; } // Activator needs a non-parameter constructor. /// <summary> /// Toggle of color mask. /// </summary> public ColorMaskSwitch() : this(ColorMask.GetDefault()) { } /// <summary> /// Toggle of color mask. /// </summary> /// <param name="redWritable">red mask when this switch is turned on</param> /// <param name="greenWritable">green mask when this switch is turned on</param> /// <param name="blueWritable">blue mask when this switch is turned on</param> /// <param name="alphaWritable">alpha mask when this switch is turned on</param> public ColorMaskSwitch(bool redWritable, bool greenWritable, bool blueWritable, bool alphaWritable) { this.Mask = new ColorMask(redWritable, greenWritable, blueWritable, alphaWritable); this.OriginalMask = ColorMask.GetCurrent(); } /// <summary> /// Toggle of color mask. /// </summary> /// <param name="redWritable">red mask when this switch is turned on.</param> /// <param name="greenWritable">green mask when this switch is turned on.</param> /// <param name="blueWritable">blue mask when this switch is turned on.</param> /// <param name="alphaWritable">alpha mask when this switch is turned on.</param> /// <param name="originalAlphaWritable">red mask when this switch is turned off.</param> /// <param name="originalBlueWritable">green mask when this switch is turned off.</param> /// <param name="originalGreenWritable">blue mask when this switch is turned off.</param> /// <param name="originalRedWritable">alpha mask when this switch is turned off.</param> public ColorMaskSwitch(bool redWritable, bool greenWritable, bool blueWritable, bool alphaWritable, bool originalRedWritable, bool originalGreenWritable, bool originalBlueWritable, bool originalAlphaWritable) { this.Mask = new ColorMask(redWritable, greenWritable, blueWritable, alphaWritable); this.OriginalMask = new ColorMask( originalRedWritable, originalGreenWritable, originalBlueWritable, originalAlphaWritable); } /// <summary> /// Toggle of color mask. /// </summary> /// <param name="mask">mask when this switch is turned on.</param> public ColorMaskSwitch(ColorMask mask) { this.Mask = mask; this.OriginalMask = ColorMask.GetCurrent(); } /// <summary> /// Toggle of color mask. /// </summary> /// <param name="mask">mask when this switch is turned on.</param> /// <param name="originalMask">mask when this switch is turned off.</param> public ColorMaskSwitch(ColorMask mask, ColorMask originalMask) { this.Mask = mask; this.OriginalMask = originalMask; } /// <summary> /// /// </summary> public override string ToString() { return string.Format("glColorMask({0});", this.Mask); } /// <summary> /// /// </summary> protected override void StateOn() { ColorMask mask = this.Mask; GL.Instance.ColorMask(mask.redWritable, mask.greenWritable, mask.blueWritable, mask.alphaWritable); } /// <summary> /// /// </summary> protected override void StateOff() { ColorMask mask = this.OriginalMask; GL.Instance.ColorMask(mask.redWritable, mask.greenWritable, mask.blueWritable, mask.alphaWritable); } } /// <summary> /// /// </summary> public struct ColorMask { /// <summary> /// /// </summary> public bool redWritable; /// <summary> /// /// </summary>; public bool greenWritable; /// <summary> /// /// </summary> public bool blueWritable; /// <summary> /// /// </summary> public bool alphaWritable; /// <summary> /// /// </summary> /// <param name="redWritable"></param> /// <param name="greenWritable"></param> /// <param name="blueWritable"></param> /// <param name="alphaWritable"></param> public ColorMask(bool redWritable, bool greenWritable, bool blueWritable, bool alphaWritable) { this.redWritable = redWritable; this.greenWritable = greenWritable; this.blueWritable = blueWritable; this.alphaWritable = alphaWritable; } /// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { return string.Format("r:{0}, g:{1}, b:{2}, a:{3}", redWritable, greenWritable, blueWritable, alphaWritable); } /// <summary> /// Get current color mask. /// </summary> /// <returns></returns> public static ColorMask GetCurrent() { var result = new int[4]; GL.Instance.GetIntegerv((uint)GetTarget.ColorWritemask, result); var current = new ColorMask(result[0] != 0, result[1] != 0, result[2] != 0, result[3] != 0); return current; } /// <summary> /// Gets default color mask in OpenGL. /// </summary> public static ColorMask GetDefault() { var mask = new ColorMask(true, true, true, true); return mask; } } }
{ "pile_set_name": "Github" }
///////////////////////////////////////////////////////////////////////////////// // // Thor C++ Library // Copyright (c) 2011-2019 Jan Haller // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // ///////////////////////////////////////////////////////////////////////////////// /// @file /// @brief Factory functions that create different shapes (concave and convex) #ifndef THOR_SHAPES_HPP #define THOR_SHAPES_HPP #include <Thor/Config.hpp> #include <SFML/System/Vector2.hpp> #include <SFML/Graphics/Color.hpp> #include <cstddef> // std::size_t namespace sf { class Shape; class ConvexShape; } // namespace sf namespace thor { /// @addtogroup Shapes /// @{ /// @brief Namespace for predefined shapes /// @details This namespace contains some functions to create predefined shapes like stars or rounded rectangles. /// The namespace Shapes can be considered an extension to the specific SFML shape classes like sf::CircleShape or sf::RectangleShape. namespace Shapes { /// @brief Converts a specific shape to a general, convex SFML shape. /// @return General shape with the same properties (shape attributes, texture, transform) as the parameter. Note that you lose /// specific information (such as a circle radius) during this conversion. sf::ConvexShape THOR_API toConvexShape(const sf::Shape& shape); /// @brief Creates a line shape. /// @details This is a simple function that returns directly a shape. If you want a more flexible line implementation that can also be /// changed after creation, look at the thor::Arrow class and its Line style. /// @param direction Line direction. /// @param thickness Line thickness (> 0.f). /// @param color Color of the line. /// @return A sf::ConvexShape copy representing the line. sf::ConvexShape THOR_API line(sf::Vector2f direction, const sf::Color& color, float thickness = 1.f); /// @brief Creates a rectangle with radiused corners. /// @param size Width and height of the rectangle. /// @param cornerRadius The radius of the circle at the corners. /// @param fillColor The rounded rectangle's fill color. /// @param outlineThickness The thickness of the outline. /// @param outlineColor Color used for the outline. /// @return A sf::ConvexShape copy containing the rounded rectangle. sf::ConvexShape THOR_API roundedRect(sf::Vector2f size, float cornerRadius, const sf::Color& fillColor, float outlineThickness = 0.f, const sf::Color& outlineColor = sf::Color()); /// @brief Creates a regular, convex polygon shape. /// @param nbPoints The number of polygon points (the smallest possible value is 3 for a triangle). /// @param radius The distance from the center to the points (> 0.f). /// @param fillColor The color which is used to fill the inside of the polygon. /// @param outlineThickness The thickness of the outline. /// @param outlineColor The color used for the outline. /// @return A sf::ConvexShape copy representing the regular polygon. sf::ConvexShape THOR_API polygon(std::size_t nbPoints, float radius, const sf::Color& fillColor, float outlineThickness = 0.f, const sf::Color& outlineColor = sf::Color()); /// @brief Creates a regular star shape. /// @param nbStarPoints The number of points (the smallest possible is a 3-pointed star). /// @param innerRadius The distance from the center to the inner points (> 0.f). /// @param outerRadius The distance from the center to the outer points (> innerRadius). /// @param fillColor The color which is used to fill the star. /// @param outlineThickness The thickness of the outline. /// @param outlineColor The color used for the outline. /// @return A convex shape representing the star. sf::ConvexShape THOR_API star(std::size_t nbStarPoints, float innerRadius, float outerRadius, const sf::Color& fillColor, float outlineThickness = 0.f, const sf::Color& outlineColor = sf::Color()); } // namespace Shapes /// @} } // namespace thor #endif // THOR_SHAPES_HPP
{ "pile_set_name": "Github" }
#ifndef BOOST_MPL_CLEAR_HPP_INCLUDED #define BOOST_MPL_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include <boost/mpl/clear_fwd.hpp> #include <boost/mpl/aux_/clear_impl.hpp> #include <boost/mpl/sequence_tag.hpp> #include <boost/mpl/aux_/na_spec.hpp> #include <boost/mpl/aux_/lambda_support.hpp> namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct clear : clear_impl< typename sequence_tag<Sequence>::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, clear) }} #endif // BOOST_MPL_CLEAR_HPP_INCLUDED
{ "pile_set_name": "Github" }
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /home/marius/workspace/adt-bundle-linux-x86_64-20140702/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
{ "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 System; namespace Microsoft.DotNet.Interactive.Server { public interface IInputTextStream : IObservable<string>, IDisposable { bool IsStarted { get; } } }
{ "pile_set_name": "Github" }
#ifndef UUID_UTILS_H_ #define UUID_UTILS_H_ #include "util/type.h" const int32_t UUID_BYTE_SIZE = 16; const int32_t UUID_STRING_SIZE = 37; typedef uint8_t UUIDValue[UUID_BYTE_SIZE]; struct UUIDUtils { static void generate(UUIDValue &out); static int parse(const char *uuidString, UUIDValue &out); static void unparse(UUIDValue &out, char *uuidString); }; #endif
{ "pile_set_name": "Github" }
// Fonts @import url('https://fonts.googleapis.com/css?family=Nunito'); // Variables @import 'variables'; // Bootstrap @import '~bootstrap/scss/bootstrap';
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp iot"> <Identity Name="fa618fe0-bf75-40c7-9118-32cc8d2b44f8" Publisher="CN=Bombom" Version="1.0.0.0" /> <mp:PhoneIdentity PhoneProductId="fa618fe0-bf75-40c7-9118-32cc8d2b44f8" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> <Properties> <DisplayName>BrofilerDurangoTest</DisplayName> <PublisherDisplayName>Bombom</PublisherDisplayName> <Logo>Assets\StoreLogo.png</Logo> </Properties> <Dependencies> <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> </Dependencies> <Resources> <Resource Language="x-generate" /> </Resources> <Applications> <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="BrofilerDurangoTest.App"> <uap:VisualElements DisplayName="BrofilerDurangoTest" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="BrofilerDurangoTest" BackgroundColor="transparent"> <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"> </uap:DefaultTile> <uap:SplashScreen Image="Assets\SplashScreen.png" /> </uap:VisualElements> </Application> </Applications> <Capabilities> <Capability Name="internetClient" /> <Capability Name="internetClientServer" /> <Capability Name="privateNetworkClientServer" /> <Capability Name="codeGeneration" /> <Capability Name="allJoyn" /> <uap:Capability Name="enterpriseAuthentication" /> <uap:Capability Name="contacts" /> <uap:Capability Name="appointments" /> <uap:Capability Name="blockedChatMessages" /> <uap:Capability Name="objects3D" /> <uap:Capability Name="musicLibrary" /> <uap:Capability Name="phoneCall" /> <uap:Capability Name="picturesLibrary" /> <uap:Capability Name="removableStorage" /> <uap:Capability Name="sharedUserCertificates" /> <uap:Capability Name="userAccountInformation" /> <uap:Capability Name="videosLibrary" /> <DeviceCapability Name="bluetooth" /> <DeviceCapability Name="location" /> <DeviceCapability Name="microphone" /> <DeviceCapability Name="proximity" /> <!--<iot:Capability Name="systemManagement"/> <iot:Capability Name="lowLevelDevices"/>--> </Capabilities> </Package>
{ "pile_set_name": "Github" }
// 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. couchTests.etags_spatial = function(debug) { var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"true"}); db.deleteDb(); db.createDb(); if (debug) debugger; var designDoc = { _id:"_design/etags", language: "javascript", spatial: { basicIndex: stringFun(function(doc) { emit({ type: "Point", coordinates: [doc.loc[0], doc.loc[1]] }, doc.string); }), fooIndex: stringFun(function(doc) { if (doc.foo) { emit({ type: "Point", coordinates: [1, 2] }, 1); } }) } }; T(db.save(designDoc).ok); function makeSpatialDocs(start, end, templateDoc) { var docs = makeDocs(start, end, templateDoc); for (var i=0; i<docs.length; i++) { docs[i].loc = [i-20+docs[i].integer, i+15+docs[i].integer]; } return docs; } var xhr; var url_pre = '/test_suite_db/_design/etags/_spatial/'; var docs = makeSpatialDocs(0, 10); db.bulkSave(docs); var bbox = [-180, -90, 180, 90]; // verify get w/Etag on spatial index xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(",")); T(xhr.status == 200); var etag = xhr.getResponseHeader("etag"); xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(","), { headers: {"if-none-match": etag} }); T(xhr.status == 304); // verify ETag doesn't change when an update // doesn't change the view group's index T(db.save({"_id":"doc1", "foo":"bar"}).ok); xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(",")); var etag1 = xhr.getResponseHeader("etag"); T(etag1 == etag); /* // NOTE vmx (2011-01-13) purging is not yet implemented for the spatial index // Verify that purges affect etags xhr = CouchDB.request("GET", url_pre + "fooIndex?bbox=" + bbox.join(",")); var foo_etag = xhr.getResponseHeader("etag"); var doc1 = db.open("doc1"); xhr = CouchDB.request("POST", "/test_suite_db/_purge", { body: JSON.stringify({"doc1":[doc1._rev]}) }); xhr = CouchDB.request("GET", url_pre + "fooIndex?bbox=" + bbox.join(",")); etag1 = xhr.getResponseHeader("etag"); T(etag1 != foo_etag); // Test that _purge didn't affect the other view etags. xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/basicView"); etag1 = xhr.getResponseHeader("etag"); T(etag1 == etag); */ // verify different views in the same view group may have different ETags xhr = CouchDB.request("GET", url_pre + "fooIndex?bbox=" + bbox.join(",")); etag1 = xhr.getResponseHeader("etag"); xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(",")); var etag2 = xhr.getResponseHeader("etag"); T(etag1 != etag2); // verify ETag changes when an update changes the view group's index. db.bulkSave(makeSpatialDocs(10, 20)); xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(",")); etag1 = xhr.getResponseHeader("etag"); T(etag1 != etag); // verify ETag is the same after a restart restartServer(); xhr = CouchDB.request("GET", url_pre + "basicIndex?bbox=" + bbox.join(",")); etag2 = xhr.getResponseHeader("etag"); T(etag1 == etag2); };
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE----- MIIDzDCCArSgAwIBAgIHBHKqA3oTGzANBgkqhkiG9w0BAQsFADCBnTELMAkGA1UE BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExEjAQBgNVBAcMCUxvcyBHYXRvczEU MBIGA1UECgwLTmV0ZmxpeCBJbmMxLTArBgNVBAsMJFBsYXRmb3JtIFNlY3VyaXR5 ICgxMjUxOTc0Mjg4MzUxMjAwKTEgMB4GA1UEAwwXSW50ZXJtZWRpYXRlIENBIGZv ciA3MTkwHhcNMjAwNzE0MDMxNTEzWhcNMjEwNzE0MDMwOTQ0WjB7MQswCQYDVQQG EwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTESMBAGA1UEBwwJTG9zIEdhdG9zMRQw EgYDVQQKDAtOZXRmbGl4IEluYzEtMCsGA1UECwwkUGxhdGZvcm0gU2VjdXJpdHkg KDEyNTE5NzQ0MzUxNjQ1NzMpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC AQEAmkNUCJB5sHftB5KdxXq7UCHNj3QZ+tSJeoYftfCvqEGLxtPHXpH5HL+GiW2n 8NmxHnyMUVLP2+AIcVgmL27uAEg/k33KaO2Pw9gmLnqRw8k+IA2mLxRCS55uwqkt 1PEhaqYHSzkUDlanlayCf8qTvJ2JL6ex3y1xgT2b+YN3dvu8qjpQgSH0RS0rglxi diVzBN6ks9+yaSByFO+ozUAkTcRSuS8jj5MIPpvBk7o4U2C9nZMxCfiRe5hf6leb crZDoBUkPc4lLY+Wj1CE4Fia7HyI1EzbvEa7W6s9062UuOdTPBM6OfHFagvENBnI Chc+1A3/AkFR+2XOsFxHgvk+6QIDAQABozIwMDAMBgNVHRMBAf8EAjAAMCAGA1Ud EQQZMBeCD2JhZC5leGFtcGxlLmNvbYcErBAAATANBgkqhkiG9w0BAQsFAAOCAQEA GtjE0NaEOon2hNUocMJUfTbK+LNhI/II2LeUb4G3tpwSCOy2us6Z06bNzMsIgVN2 iVFllZRrwbiEkiYztzcTqfpTYbLvWmUdPLzf6tbYopx+/zj0IdZzUAmTEf24O3qX HIVCT2p2fykHCctggyaNao3J3pN5EK5Ido1dml+HU0OGJuwgBtSlJVjC1F20936j AkWZBx8GDXVnjgtnkZaLJY+KN8kc1iC3+NCrrDnZ5VXZ9Gn4BwZKxV1nVGAFCY7T Gye5Vw2zs5riia7ThYju/YaWIh9ADovCSG/QguD5UqAu5zA08aF1bcehFc6Se+EB /NMsmAbYGieZ89uIU6y5wg== -----END CERTIFICATE-----
{ "pile_set_name": "Github" }
#ifndef NO_PROCESS typedef struct LPROC { SOCKET sock; char chan[128]; int threadnum; BOOL full; BOOL notice; BOOL silent; BOOL gotinfo; } LPROC; BOOL AdjustPrivileges(char *pPriv, BOOL add); int listProcesses(SOCKET sock, char *chan, BOOL notice, char *proccess, BOOL killthread=FALSE, BOOL full=false); DWORD WINAPI listProcessesThread(LPVOID param); int killProcess(int pid); #ifndef NO_AVFW_KILL DWORD WINAPI kill_av(LPVOID param); #endif #endif
{ "pile_set_name": "Github" }
SELECT * FROM actor NATURAL RIGHT JOIN film_actor;
{ "pile_set_name": "Github" }
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkPathOpsLine_DEFINED #define SkPathOpsLine_DEFINED #include "SkPathOpsPoint.h" struct SkDLine { SkDPoint fPts[2]; const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < 2); return fPts[n]; } SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < 2); return fPts[n]; } void set(const SkPoint pts[2]) { fPts[0] = pts[0]; fPts[1] = pts[1]; } static SkDLine SubDivide(const SkPoint a[2], double t1, double t2) { SkDLine line; line.set(a); return line.subDivide(t1, t2); } double exactPoint(const SkDPoint& xy) const; static double ExactPointH(const SkDPoint& xy, double left, double right, double y); static double ExactPointV(const SkDPoint& xy, double top, double bottom, double x); double isLeft(const SkDPoint& pt) const; double nearPoint(const SkDPoint& xy, bool* unequal) const; bool nearRay(const SkDPoint& xy) const; static double NearPointH(const SkDPoint& xy, double left, double right, double y); static double NearPointV(const SkDPoint& xy, double top, double bottom, double x); static bool NearRay(double dx1, double dy1, double dx2, double dy2); SkDPoint ptAtT(double t) const; SkDLine subDivide(double t1, double t2) const; void dump() const; private: SkDVector tangent() const { return fPts[0] - fPts[1]; } }; #endif
{ "pile_set_name": "Github" }
// Copyright 2018 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. // +build linux,!gccgo,386 package unix import "syscall" // Underlying system call writes to newoffset via pointer. // Implemented in assembly to avoid allocation. func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
{ "pile_set_name": "Github" }
SET @global_start_value = @@global.myisam_stats_method; SELECT @global_start_value; @global_start_value nulls_unequal SET @session_start_value = @@session.myisam_stats_method; SELECT @session_start_value; @session_start_value nulls_unequal '#--------------------FN_DYNVARS_097_01------------------------#' SET @@global.myisam_stats_method = nulls_equal; SET @@global.myisam_stats_method = DEFAULT; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_unequal SET @@session.myisam_stats_method = nulls_equal; SET @@session.myisam_stats_method = DEFAULT; SELECT @@session.myisam_stats_method; @@session.myisam_stats_method nulls_unequal '#---------------------FN_DYNVARS_097_02-------------------------#' SET @@global.myisam_stats_method = NULL; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'NULL' SET @@global.myisam_stats_method = ''; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '' SET @@session.myisam_stats_method = NULL; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'NULL' SET @@session.myisam_stats_method = ''; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '' '#--------------------FN_DYNVARS_097_03------------------------#' SET @@global.myisam_stats_method = 'nulls_equal'; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_equal SET @@global.myisam_stats_method = 'nulls_unequal'; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_unequal SET @@global.myisam_stats_method = 'nulls_ignored'; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_ignored 'Bug: Value of nulls_ignored is not documented. Its ordinal value is 2' SET @@session.myisam_stats_method = 'nulls_equal'; SELECT @@session.myisam_stats_method; @@session.myisam_stats_method nulls_equal SET @@session.myisam_stats_method = 'nulls_unequal'; SELECT @@session.myisam_stats_method; @@session.myisam_stats_method nulls_unequal SET @@session.myisam_stats_method = 'nulls_ignored'; SELECT @@session.myisam_stats_method; @@session.myisam_stats_method nulls_ignored '#--------------------FN_DYNVARS_097_04-------------------------#' SET @@global.myisam_stats_method = -1; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '-1' SET @@global.myisam_stats_method = unequal; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'unequal' SET @@global.myisam_stats_method = ENABLED; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'ENABLED' SET @@global.myisam_stats_method = 'equal'; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'equal' SET @@global.myisam_stats_method = 'null_equal'; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'null_equal' SET @@global.myisam_stats_method = ' '; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of ' ' '#-------------------FN_DYNVARS_097_05----------------------------#' SELECT @@session.myisam_stats_method = VARIABLE_VALUE FROM performance_schema.session_variables WHERE VARIABLE_NAME='myisam_stats_method'; @@session.myisam_stats_method = VARIABLE_VALUE 1 '#----------------------FN_DYNVARS_097_06------------------------#' SELECT @@global.myisam_stats_method = VARIABLE_VALUE FROM performance_schema.global_variables WHERE VARIABLE_NAME='myisam_stats_method'; @@global.myisam_stats_method = VARIABLE_VALUE 1 '#---------------------FN_DYNVARS_097_07-------------------------#' SET @@global.myisam_stats_method = 0; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_unequal SET @@global.myisam_stats_method = 1; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_equal SET @@global.myisam_stats_method = 2; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_ignored SET @@global.myisam_stats_method = 0.4; ERROR 42000: Incorrect argument type to variable 'myisam_stats_method' SET @@global.myisam_stats_method = 3; ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '3' '#---------------------FN_DYNVARS_097_08----------------------#' SET @@global.myisam_stats_method = TRUE; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_equal SET @@global.myisam_stats_method = FALSE; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_unequal '#---------------------FN_DYNVARS_097_09----------------------#' SET myisam_stats_method = 'nulls_equal'; SET session.myisam_stats_method = 'nulls_equal'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'session.myisam_stats_method = 'nulls_equal'' at line 1 SET global.myisam_stats_method = 'nulls_equal'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'global.myisam_stats_method = 'nulls_equal'' at line 1 SET session myisam_stats_method = 'nulls_equal'; SELECT @@myisam_stats_method; @@myisam_stats_method nulls_equal SET global myisam_stats_method = 'nulls_equal'; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_equal SET @@global.myisam_stats_method = @global_start_value; SELECT @@global.myisam_stats_method; @@global.myisam_stats_method nulls_unequal SET @@session.myisam_stats_method = @session_start_value; SELECT @@session.myisam_stats_method; @@session.myisam_stats_method nulls_unequal
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0 /* * PSC clock descriptions for TI DA830/OMAP-L137/AM17XX * * Copyright (C) 2018 David Lechner <david@lechnology.com> */ #include <linux/clk-provider.h> #include <linux/clk.h> #include <linux/clkdev.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/types.h> #include "psc.h" LPSC_CLKDEV1(aemif_clkdev, NULL, "ti-aemif"); LPSC_CLKDEV1(spi0_clkdev, NULL, "spi_davinci.0"); LPSC_CLKDEV1(mmcsd_clkdev, NULL, "da830-mmc.0"); LPSC_CLKDEV1(uart0_clkdev, NULL, "serial8250.0"); static const struct davinci_lpsc_clk_info da830_psc0_info[] = { LPSC(0, 0, tpcc, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(1, 0, tptc0, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(2, 0, tptc1, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(3, 0, aemif, pll0_sysclk3, aemif_clkdev, LPSC_ALWAYS_ENABLED), LPSC(4, 0, spi0, pll0_sysclk2, spi0_clkdev, 0), LPSC(5, 0, mmcsd, pll0_sysclk2, mmcsd_clkdev, 0), LPSC(6, 0, aintc, pll0_sysclk4, NULL, LPSC_ALWAYS_ENABLED), LPSC(7, 0, arm_rom, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(8, 0, secu_mgr, pll0_sysclk4, NULL, LPSC_ALWAYS_ENABLED), LPSC(9, 0, uart0, pll0_sysclk2, uart0_clkdev, 0), LPSC(10, 0, scr0_ss, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(11, 0, scr1_ss, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(12, 0, scr2_ss, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(13, 0, pruss, pll0_sysclk2, NULL, LPSC_ALWAYS_ENABLED), LPSC(14, 0, arm, pll0_sysclk6, NULL, LPSC_ALWAYS_ENABLED), { } }; static int da830_psc0_init(struct device *dev, void __iomem *base) { return davinci_psc_register_clocks(dev, da830_psc0_info, 16, base); } static struct clk_bulk_data da830_psc0_parent_clks[] = { { .id = "pll0_sysclk2" }, { .id = "pll0_sysclk3" }, { .id = "pll0_sysclk4" }, { .id = "pll0_sysclk6" }, }; const struct davinci_psc_init_data da830_psc0_init_data = { .parent_clks = da830_psc0_parent_clks, .num_parent_clks = ARRAY_SIZE(da830_psc0_parent_clks), .psc_init = &da830_psc0_init, }; LPSC_CLKDEV3(usb0_clkdev, "fck", "da830-usb-phy-clks", NULL, "musb-da8xx", NULL, "cppi41-dmaengine"); LPSC_CLKDEV1(usb1_clkdev, NULL, "ohci-da8xx"); /* REVISIT: gpio-davinci.c should be modified to drop con_id */ LPSC_CLKDEV1(gpio_clkdev, "gpio", NULL); LPSC_CLKDEV2(emac_clkdev, NULL, "davinci_emac.1", "fck", "davinci_mdio.0"); LPSC_CLKDEV1(mcasp0_clkdev, NULL, "davinci-mcasp.0"); LPSC_CLKDEV1(mcasp1_clkdev, NULL, "davinci-mcasp.1"); LPSC_CLKDEV1(mcasp2_clkdev, NULL, "davinci-mcasp.2"); LPSC_CLKDEV1(spi1_clkdev, NULL, "spi_davinci.1"); LPSC_CLKDEV1(i2c1_clkdev, NULL, "i2c_davinci.2"); LPSC_CLKDEV1(uart1_clkdev, NULL, "serial8250.1"); LPSC_CLKDEV1(uart2_clkdev, NULL, "serial8250.2"); LPSC_CLKDEV1(lcdc_clkdev, "fck", "da8xx_lcdc.0"); LPSC_CLKDEV2(pwm_clkdev, "fck", "ehrpwm.0", "fck", "ehrpwm.1"); LPSC_CLKDEV3(ecap_clkdev, "fck", "ecap.0", "fck", "ecap.1", "fck", "ecap.2"); LPSC_CLKDEV2(eqep_clkdev, NULL, "eqep.0", NULL, "eqep.1"); static const struct davinci_lpsc_clk_info da830_psc1_info[] = { LPSC(1, 0, usb0, pll0_sysclk2, usb0_clkdev, 0), LPSC(2, 0, usb1, pll0_sysclk4, usb1_clkdev, 0), LPSC(3, 0, gpio, pll0_sysclk4, gpio_clkdev, 0), LPSC(5, 0, emac, pll0_sysclk4, emac_clkdev, 0), LPSC(6, 0, emif3, pll0_sysclk5, NULL, LPSC_ALWAYS_ENABLED), LPSC(7, 0, mcasp0, pll0_sysclk2, mcasp0_clkdev, 0), LPSC(8, 0, mcasp1, pll0_sysclk2, mcasp1_clkdev, 0), LPSC(9, 0, mcasp2, pll0_sysclk2, mcasp2_clkdev, 0), LPSC(10, 0, spi1, pll0_sysclk2, spi1_clkdev, 0), LPSC(11, 0, i2c1, pll0_sysclk4, i2c1_clkdev, 0), LPSC(12, 0, uart1, pll0_sysclk2, uart1_clkdev, 0), LPSC(13, 0, uart2, pll0_sysclk2, uart2_clkdev, 0), LPSC(16, 0, lcdc, pll0_sysclk2, lcdc_clkdev, 0), LPSC(17, 0, pwm, pll0_sysclk2, pwm_clkdev, 0), LPSC(20, 0, ecap, pll0_sysclk2, ecap_clkdev, 0), LPSC(21, 0, eqep, pll0_sysclk2, eqep_clkdev, 0), { } }; static int da830_psc1_init(struct device *dev, void __iomem *base) { return davinci_psc_register_clocks(dev, da830_psc1_info, 32, base); } static struct clk_bulk_data da830_psc1_parent_clks[] = { { .id = "pll0_sysclk2" }, { .id = "pll0_sysclk4" }, { .id = "pll0_sysclk5" }, }; const struct davinci_psc_init_data da830_psc1_init_data = { .parent_clks = da830_psc1_parent_clks, .num_parent_clks = ARRAY_SIZE(da830_psc1_parent_clks), .psc_init = &da830_psc1_init, };
{ "pile_set_name": "Github" }
package com.sequenceiq.environment.metrics; import com.sequenceiq.cloudbreak.common.metrics.type.Metric; public enum MetricType implements Metric { ENV_CREATION_FINISHED("environment.creation.finished"), ENV_CREATION_FAILED("environment.creation.failed"), ENV_START_FINISHED("environment.start.finished"), ENV_START_FAILED("environment.start.failed"), ENV_STOP_FINISHED("environment.stop.finished"), ENV_STOP_FAILED("environment.stop.failed"), ENV_DELETION_FINISHED("environment.deletion.finished"), ENV_DELETION_FAILED("environment.deletion.failed"), ENV_CLUSTERS_DELETION_FAILED("environment.clusters.deletion.failed"), ENV_STACK_CONFIG_UPDATE_FINISHED("environment.stack.config.update.finished"), ENV_STACK_CONFIG_UPDATE_FAILED("environment.stack.config.update.failed"); private final String metricName; MetricType(String metricName) { this.metricName = metricName; } @Override public String getMetricName() { return metricName; } }
{ "pile_set_name": "Github" }
.CodeMirror-hints { position: absolute; z-index: 10; overflow: hidden; list-style: none; margin: 0; padding: 2px; -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); box-shadow: 2px 3px 5px rgba(0,0,0,.2); border-radius: 3px; border: 1px solid silver; background: white; font-size: 90%; font-family: monospace; max-height: 20em; overflow-y: auto; } .CodeMirror-hint { margin: 0; padding: 0 4px; border-radius: 2px; max-width: 19em; overflow: hidden; white-space: pre; color: black; cursor: pointer; } li.CodeMirror-hint-active { background: #08f; color: white; }
{ "pile_set_name": "Github" }
export const page = state => state.page; export const posts = state => state.posts; export const post = state => state.post; export const category = state => state.category; export const categories = state => state.categories;
{ "pile_set_name": "Github" }
package software.amazon.awscdk.examples; import software.amazon.awscdk.core.Construct; import software.amazon.awscdk.core.Duration; import software.amazon.awscdk.core.Stack; import software.amazon.awscdk.core.StackProps; import software.amazon.awscdk.services.ec2.Vpc; import software.amazon.awscdk.services.autoscaling.AutoScalingGroup; import software.amazon.awscdk.services.ec2.AmazonLinuxImage; import software.amazon.awscdk.services.autoscaling.AutoScalingGroup.Builder; import software.amazon.awscdk.services.ec2.InstanceType; import software.amazon.awscdk.services.ec2.InstanceClass; import software.amazon.awscdk.services.ec2.InstanceSize; import software.amazon.awscdk.services.elasticloadbalancing.LoadBalancer; import software.amazon.awscdk.services.elasticloadbalancing.HealthCheck; import software.amazon.awscdk.services.elasticloadbalancing.LoadBalancerListener; import software.amazon.awscdk.services.elasticloadbalancing.ListenerPort; /** * Classic Load balance CDK example for Java! */ class ClassicLoadBalancerStack extends Stack { public ClassicLoadBalancerStack(final Construct parent, final String name) { super(parent, name, null); } public ClassicLoadBalancerStack(final Construct parent, final String name, final StackProps props) { super(parent, name, props); Vpc vpc = new Vpc(this, "VPC"); AutoScalingGroup asg = AutoScalingGroup.Builder.create(this,"ASG") .vpc(vpc) .instanceType(InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.MICRO)) .machineImage(new AmazonLinuxImage()) .build(); HealthCheck.Builder healthCheckBuilder = new HealthCheck.Builder(); HealthCheck healthCheck = healthCheckBuilder.port(80).build(); LoadBalancer lb = LoadBalancer.Builder.create(this,"LB") .vpc(vpc) .internetFacing(Boolean.TRUE) .healthCheck(healthCheck) .build(); lb.addTarget(asg); ListenerPort listenerPort = lb.addListener(LoadBalancerListener.builder().externalPort(80).build()); listenerPort.getConnections().allowDefaultPortFromAnyIpv4("Open to the world"); } }
{ "pile_set_name": "Github" }
--- title: AsyncTaskMethodBuilder&lt;TResult&gt;.m_task Field | Microsoft Docs ms.date: 11/04/2016 ms.topic: conceptual helpviewer_keywords: - m_task field, AsyncTaskMethodBuilder<TResult> structure [.NET Framework debug engines] ms.assetid: 649abf0e-0fec-49d9-93b2-8953521f7ba5 author: acangialosi ms.author: anthc manager: jillfra ms.workload: - vssdk --- # AsyncTaskMethodBuilder&lt;TResult&gt;.m_task field Represents the lazily initialized built task. **Namespace:** <xref:System.Runtime.CompilerServices?displayProperty=fullName> **Assembly:** mscorlib (in mscorlib.dll) Because you cannot access this internal member from the .NET Framework, the following syntax is provided in Common Intermediate Language (CIL). ## Syntax ```csharp .field private class System.Threading.Tasks.Task`1<!TResult> m_task ``` ## See also - <xref:System.Runtime.CompilerServices.AsyncTaskMethodBuilder%601> - [Parallel extension internals for the .NET Framework](../../extensibility/debugger/parallel-extension-internals-for-the-dotnet-framework.md)
{ "pile_set_name": "Github" }
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK. // This file was modified by Oracle on 2014, 2015, 2016. // Modifications copyright (c) 2014-2016 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_GEOMETRY_HPP #define BOOST_GEOMETRY_GEOMETRY_HPP // Shortcut to include all header files #include <boost/geometry/core/closure.hpp> #include <boost/geometry/core/coordinate_dimension.hpp> #include <boost/geometry/core/coordinate_system.hpp> #include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/core/cs.hpp> #include <boost/geometry/core/interior_type.hpp> #include <boost/geometry/core/point_order.hpp> #include <boost/geometry/core/point_type.hpp> #include <boost/geometry/core/ring_type.hpp> #include <boost/geometry/core/srs.hpp> #include <boost/geometry/core/tag.hpp> #include <boost/geometry/core/tag_cast.hpp> #include <boost/geometry/core/tags.hpp> // Core algorithms #include <boost/geometry/core/access.hpp> #include <boost/geometry/core/exterior_ring.hpp> #include <boost/geometry/core/interior_rings.hpp> #include <boost/geometry/core/radian_access.hpp> #include <boost/geometry/core/radius.hpp> #include <boost/geometry/core/topological_dimension.hpp> #include <boost/geometry/arithmetic/arithmetic.hpp> #include <boost/geometry/arithmetic/dot_product.hpp> #include <boost/geometry/strategies/strategies.hpp> #include <boost/geometry/algorithms/append.hpp> #include <boost/geometry/algorithms/area.hpp> #include <boost/geometry/algorithms/assign.hpp> #include <boost/geometry/algorithms/buffer.hpp> #include <boost/geometry/algorithms/centroid.hpp> #include <boost/geometry/algorithms/clear.hpp> #include <boost/geometry/algorithms/comparable_distance.hpp> #include <boost/geometry/algorithms/convert.hpp> #include <boost/geometry/algorithms/convex_hull.hpp> #include <boost/geometry/algorithms/correct.hpp> #include <boost/geometry/algorithms/covered_by.hpp> #include <boost/geometry/algorithms/crosses.hpp> #include <boost/geometry/algorithms/difference.hpp> #include <boost/geometry/algorithms/disjoint.hpp> #include <boost/geometry/algorithms/distance.hpp> #include <boost/geometry/algorithms/envelope.hpp> #include <boost/geometry/algorithms/equals.hpp> #include <boost/geometry/algorithms/expand.hpp> #include <boost/geometry/algorithms/for_each.hpp> #include <boost/geometry/algorithms/intersection.hpp> #include <boost/geometry/algorithms/intersects.hpp> #include <boost/geometry/algorithms/is_empty.hpp> #include <boost/geometry/algorithms/is_simple.hpp> #include <boost/geometry/algorithms/is_valid.hpp> #include <boost/geometry/algorithms/length.hpp> #include <boost/geometry/algorithms/make.hpp> #include <boost/geometry/algorithms/num_geometries.hpp> #include <boost/geometry/algorithms/num_interior_rings.hpp> #include <boost/geometry/algorithms/num_points.hpp> #include <boost/geometry/algorithms/num_segments.hpp> #include <boost/geometry/algorithms/overlaps.hpp> #include <boost/geometry/algorithms/perimeter.hpp> #include <boost/geometry/algorithms/relate.hpp> #include <boost/geometry/algorithms/relation.hpp> #include <boost/geometry/algorithms/remove_spikes.hpp> #include <boost/geometry/algorithms/reverse.hpp> #include <boost/geometry/algorithms/simplify.hpp> #include <boost/geometry/algorithms/sym_difference.hpp> #include <boost/geometry/algorithms/touches.hpp> #include <boost/geometry/algorithms/transform.hpp> #include <boost/geometry/algorithms/union.hpp> #include <boost/geometry/algorithms/unique.hpp> #include <boost/geometry/algorithms/within.hpp> // check includes all concepts #include <boost/geometry/geometries/concepts/check.hpp> #include <boost/geometry/util/for_each_coordinate.hpp> #include <boost/geometry/util/math.hpp> #include <boost/geometry/util/select_coordinate_type.hpp> #include <boost/geometry/util/select_most_precise.hpp> #include <boost/geometry/views/box_view.hpp> #include <boost/geometry/views/closeable_view.hpp> #include <boost/geometry/views/identity_view.hpp> #include <boost/geometry/views/reversible_view.hpp> #include <boost/geometry/views/segment_view.hpp> #include <boost/geometry/io/io.hpp> #include <boost/geometry/io/dsv/write.hpp> #include <boost/geometry/io/svg/svg_mapper.hpp> #include <boost/geometry/io/svg/write.hpp> #include <boost/geometry/io/wkt/read.hpp> #include <boost/geometry/io/wkt/write.hpp> #endif // BOOST_GEOMETRY_GEOMETRY_HPP
{ "pile_set_name": "Github" }
var CustomControls = function(params){ this.isControl = true; this.onClickFunc = params.onClick || noop; this.onTapFunc = params.onTap || noop; this.onSwipeFunc = params.onSwipe || noop; this.onPinchFunc = params.onPinch || noop; this.onMouseWheelFunc = params.onMouseWheel || noop; this.onUpdateFunc = params.onUpdate || noop; this.onMouseMoveFunc = params.onMouseMove || noop; this.onMouseDownFunc = params.onMouseDown || noop; this.onMouseUpFunc = params.onMouseUp || noop; this.onTouchStartFunc = params.onTouchStart || noop; this.onTouchMoveFunc = params.onTouchMove || noop; this.onTouchEndFunc = params.onTouchEnd || noop; this.onKeyUpFunc = params.onKeyUp || noop; this.onKeyDownFunc = params.onKeyDown || noop; this.onResizeFunc = params.onResize || noop; this.onFullScreenChangeFunc = params.onFullScreenChange || noop; this.onDragFunc = params.onDrag || noop; } CustomControls.prototype.onActivated = noop; CustomControls.prototype.onDeactivated = noop; CustomControls.prototype.onDrag = function(x, y, movementX, movementY){ this.onDragFunc(x, y, movementX, movementY); } CustomControls.prototype.onFullScreenChange = function(isFullScreen){ this.onFullScreenChangeFunc(isFullScreen); } CustomControls.prototype.onResize = function(){ this.onResizeFunc(); } CustomControls.prototype.onClick = function(event){ this.onClickFunc(event); } CustomControls.prototype.onTap = function(event){ this.onTapFunc(event); } CustomControls.prototype.onSwipe = function(x, y, diffX, diffY){ this.onSwipeFunc(x, y, diffX, diffY); } CustomControls.prototype.onPinch = function(diff){ this.onPinchFunc(diff); } CustomControls.prototype.onMouseWheel = function(event){ this.onMouseWheelFunc(event); } CustomControls.prototype.onMouseMove = function(event){ this.onMouseMoveFunc(event); } CustomControls.prototype.onMouseDown = function(event){ this.onMouseDownFunc(event); } CustomControls.prototype.onMouseUp = function(event){ this.onMouseUpFunc(event); } CustomControls.prototype.onTouchStart = function(event){ this.onTouchStartFunc(event); } CustomControls.prototype.onTouchMove = function(event){ this.onTouchMoveFunc(event); } CustomControls.prototype.onTouchEnd = function(event){ this.onTouchEndFunc(event); } CustomControls.prototype.onKeyUp = function(event){ this.onKeyUpFunc(event); } CustomControls.prototype.onKeyDown = function(event){ this.onKeyDownFunc(event); } CustomControls.prototype.update = function(){ this.onUpdateFunc(); }
{ "pile_set_name": "Github" }
/* * Heap string table handling, string interning. */ #include "duk_internal.h" /* Resize checks not needed if minsize == maxsize, typical for low memory * targets. */ #define DUK__STRTAB_RESIZE_CHECK #if (DUK_USE_STRTAB_MINSIZE == DUK_USE_STRTAB_MAXSIZE) #undef DUK__STRTAB_RESIZE_CHECK #endif #if defined(DUK_USE_STRTAB_PTRCOMP) #define DUK__HEAPPTR_ENC16(heap,ptr) DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (ptr)) #define DUK__HEAPPTR_DEC16(heap,val) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (val)) #define DUK__GET_STRTABLE(heap) ((heap)->strtable16) #else #define DUK__HEAPPTR_ENC16(heap,ptr) (ptr) #define DUK__HEAPPTR_DEC16(heap,val) (val) #define DUK__GET_STRTABLE(heap) ((heap)->strtable) #endif #define DUK__STRTAB_U32_MAX_STRLEN 10 /* 4'294'967'295 */ /* * Debug dump stringtable. */ #if defined(DUK_USE_DEBUG) DUK_INTERNAL void duk_heap_strtable_dump(duk_heap *heap) { #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *strtable; #else duk_hstring **strtable; #endif duk_uint32_t i; duk_hstring *h; duk_size_t count_total = 0; duk_size_t count_chain; duk_size_t count_chain_min = DUK_SIZE_MAX; duk_size_t count_chain_max = 0; duk_size_t count_len[8]; /* chain lengths from 0 to 7 */ if (heap == NULL) { DUK_D(DUK_DPRINT("string table, heap=NULL")); return; } strtable = DUK__GET_STRTABLE(heap); if (strtable == NULL) { DUK_D(DUK_DPRINT("string table, strtab=NULL")); return; } DUK_MEMZERO((void *) count_len, sizeof(count_len)); for (i = 0; i < heap->st_size; i++) { h = DUK__HEAPPTR_DEC16(heap, strtable[i]); count_chain = 0; while (h != NULL) { count_chain++; h = h->hdr.h_next; } if (count_chain < sizeof(count_len) / sizeof(duk_size_t)) { count_len[count_chain]++; } count_chain_max = (count_chain > count_chain_max ? count_chain : count_chain_max); count_chain_min = (count_chain < count_chain_min ? count_chain : count_chain_min); count_total += count_chain; } DUK_D(DUK_DPRINT("string table, strtab=%p, count=%lu, chain min=%lu max=%lu avg=%lf: " "counts: %lu %lu %lu %lu %lu %lu %lu %lu ...", (void *) heap->strtable, (unsigned long) count_total, (unsigned long) count_chain_min, (unsigned long) count_chain_max, (double) count_total / (double) heap->st_size, (unsigned long) count_len[0], (unsigned long) count_len[1], (unsigned long) count_len[2], (unsigned long) count_len[3], (unsigned long) count_len[4], (unsigned long) count_len[5], (unsigned long) count_len[6], (unsigned long) count_len[7])); } #endif /* DUK_USE_DEBUG */ /* * Assertion helper to ensure strtable is populated correctly. */ #if defined(DUK_USE_ASSERTIONS) DUK_LOCAL void duk__strtable_assert_checks(duk_heap *heap) { #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *strtable; #else duk_hstring **strtable; #endif duk_uint32_t i; duk_hstring *h; duk_size_t count = 0; DUK_ASSERT(heap != NULL); strtable = DUK__GET_STRTABLE(heap); if (strtable != NULL) { DUK_ASSERT(heap->st_size != 0); DUK_ASSERT(heap->st_mask == heap->st_size - 1); for (i = 0; i < heap->st_size; i++) { h = DUK__HEAPPTR_DEC16(heap, strtable[i]); while (h != NULL) { DUK_ASSERT((DUK_HSTRING_GET_HASH(h) & heap->st_mask) == i); count++; h = h->hdr.h_next; } } } else { DUK_ASSERT(heap->st_size == 0); DUK_ASSERT(heap->st_mask == 0); } #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_ASSERT(count == (duk_size_t) heap->st_count); #endif } #endif /* DUK_USE_ASSERTIONS */ /* * Allocate and initialize a duk_hstring. * * Returns a NULL if allocation or initialization fails for some reason. * * The string won't be inserted into the string table and isn't tracked in * any way (link pointers will be NULL). The caller must place the string * into the string table without any risk of a longjmp, otherwise the string * is leaked. */ DUK_LOCAL duk_hstring *duk__strtable_alloc_hstring(duk_heap *heap, const duk_uint8_t *str, duk_uint32_t blen, duk_uint32_t strhash, const duk_uint8_t *extdata) { duk_hstring *res; const duk_uint8_t *data; #if !defined(DUK_USE_HSTRING_ARRIDX) duk_uarridx_t dummy; #endif DUK_ASSERT(heap != NULL); DUK_UNREF(extdata); #if defined(DUK_USE_STRLEN16) /* If blen <= 0xffffUL, clen is also guaranteed to be <= 0xffffUL. */ if (blen > 0xffffUL) { DUK_D(DUK_DPRINT("16-bit string blen/clen active and blen over 16 bits, reject intern")); goto alloc_error; } #endif /* XXX: Memzeroing the allocated structure is not really necessary * because we could just initialize all fields explicitly (almost * all fields are initialized explicitly anyway). */ #if defined(DUK_USE_HSTRING_EXTDATA) && defined(DUK_USE_EXTSTR_INTERN_CHECK) if (extdata) { res = (duk_hstring *) DUK_ALLOC(heap, sizeof(duk_hstring_external)); if (DUK_UNLIKELY(res == NULL)) { goto alloc_error; } DUK_MEMZERO(res, sizeof(duk_hstring_external)); #if defined(DUK_USE_EXPLICIT_NULL_INIT) DUK_HEAPHDR_STRING_INIT_NULLS(&res->hdr); #endif DUK_HEAPHDR_SET_TYPE_AND_FLAGS(&res->hdr, DUK_HTYPE_STRING, DUK_HSTRING_FLAG_EXTDATA); DUK_ASSERT(extdata[blen] == 0); /* Application responsibility. */ data = extdata; ((duk_hstring_external *) res)->extdata = extdata; } else #endif /* DUK_USE_HSTRING_EXTDATA && DUK_USE_EXTSTR_INTERN_CHECK */ { duk_uint8_t *data_tmp; /* NUL terminate for convenient C access */ DUK_ASSERT(sizeof(duk_hstring) + blen + 1 > blen); /* No wrap, limits ensure. */ res = (duk_hstring *) DUK_ALLOC(heap, sizeof(duk_hstring) + blen + 1); if (DUK_UNLIKELY(res == NULL)) { goto alloc_error; } DUK_MEMZERO(res, sizeof(duk_hstring)); #if defined(DUK_USE_EXPLICIT_NULL_INIT) DUK_HEAPHDR_STRING_INIT_NULLS(&res->hdr); #endif DUK_HEAPHDR_SET_TYPE_AND_FLAGS(&res->hdr, DUK_HTYPE_STRING, 0); data_tmp = (duk_uint8_t *) (res + 1); DUK_MEMCPY(data_tmp, str, blen); data_tmp[blen] = (duk_uint8_t) 0; data = (const duk_uint8_t *) data_tmp; } DUK_HSTRING_SET_BYTELEN(res, blen); DUK_HSTRING_SET_HASH(res, strhash); DUK_ASSERT(!DUK_HSTRING_HAS_ARRIDX(res)); #if defined(DUK_USE_HSTRING_ARRIDX) res->arridx = duk_js_to_arrayindex_string(data, blen); if (res->arridx != DUK_HSTRING_NO_ARRAY_INDEX) { #else dummy = duk_js_to_arrayindex_string(data, blen); if (dummy != DUK_HSTRING_NO_ARRAY_INDEX) { #endif /* Array index strings cannot be symbol strings, * and they're always pure ASCII so blen == clen. */ DUK_HSTRING_SET_ARRIDX(res); DUK_HSTRING_SET_ASCII(res); DUK_ASSERT(duk_unicode_unvalidated_utf8_length(data, (duk_size_t) blen) == blen); } else { /* Because 'data' is NUL-terminated, we don't need a * blen > 0 check here. For NUL (0x00) the symbol * checks will be false. */ if (DUK_UNLIKELY(data[0] >= 0x80U)) { if (data[0] == 0xffU) { DUK_HSTRING_SET_SYMBOL(res); DUK_HSTRING_SET_HIDDEN(res); } else if (data[0] <= 0xbf) { /* Check equivalent to: (data[0] & 0xc0U) == 0x80U. */ DUK_HSTRING_SET_SYMBOL(res); } } /* Using an explicit 'ASCII' flag has larger footprint (one call site * only) but is quite useful for the case when there's no explicit * 'clen' in duk_hstring. * * The flag is set lazily for RAM strings. */ DUK_ASSERT(!DUK_HSTRING_HAS_ASCII(res)); } DUK_DDD(DUK_DDDPRINT("interned string, hash=0x%08lx, blen=%ld, has_arridx=%ld, has_extdata=%ld", (unsigned long) DUK_HSTRING_GET_HASH(res), (long) DUK_HSTRING_GET_BYTELEN(res), (long) (DUK_HSTRING_HAS_ARRIDX(res) ? 1 : 0), (long) (DUK_HSTRING_HAS_EXTDATA(res) ? 1 : 0))); DUK_ASSERT(res != NULL); return res; alloc_error: return NULL; } /* * Grow strtable allocation in-place. */ #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_LOCAL void duk__strtable_grow_inplace(duk_heap *heap) { duk_uint32_t new_st_size; duk_uint32_t old_st_size; duk_uint32_t i; duk_hstring *h; duk_hstring *next; duk_hstring *prev; #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *new_ptr; duk_uint16_t *new_ptr_high; #else duk_hstring **new_ptr; duk_hstring **new_ptr_high; #endif DUK_DD(DUK_DDPRINT("grow in-place: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size * 2)); DUK_ASSERT(heap != NULL); DUK_ASSERT(heap->st_resizing == 1); DUK_ASSERT(heap->st_size >= 2); DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */ DUK_ASSERT(DUK__GET_STRTABLE(heap) != NULL); new_st_size = heap->st_size << 1U; DUK_ASSERT(new_st_size > heap->st_size); /* No overflow. */ /* Reallocate the strtable first and then work in-place to rehash * strings. We don't need an indirect allocation here: even if GC * is triggered to satisfy the allocation, recursive strtable resize * is prevented by flags. This is also why we don't need to use * DUK_REALLOC_INDIRECT(). */ #if defined(DUK_USE_STRTAB_PTRCOMP) new_ptr = (duk_uint16_t *) DUK_REALLOC(heap, heap->strtable16, sizeof(duk_uint16_t) * new_st_size); #else new_ptr = (duk_hstring **) DUK_REALLOC(heap, heap->strtable, sizeof(duk_hstring *) * new_st_size); #endif if (DUK_UNLIKELY(new_ptr == NULL)) { /* If realloc fails we can continue normally: the string table * won't "fill up" although chains will gradually get longer. * When string insertions continue, we'll quite soon try again * with no special handling. */ DUK_D(DUK_DPRINT("string table grow failed, ignoring")); return; } #if defined(DUK_USE_STRTAB_PTRCOMP) heap->strtable16 = new_ptr; #else heap->strtable = new_ptr; #endif /* Rehash a single bucket into two separate ones. When we grow * by x2 the highest 'new' bit determines whether a string remains * in its old position (bit is 0) or goes to a new one (bit is 1). */ old_st_size = heap->st_size; new_ptr_high = new_ptr + old_st_size; for (i = 0; i < old_st_size; i++) { duk_hstring *new_root; duk_hstring *new_root_high; h = DUK__HEAPPTR_DEC16(heap, new_ptr[i]); new_root = h; new_root_high = NULL; prev = NULL; while (h != NULL) { duk_uint32_t mask; DUK_ASSERT((DUK_HSTRING_GET_HASH(h) & heap->st_mask) == i); next = h->hdr.h_next; /* Example: if previous size was 256, previous mask is 0xFF * and size is 0x100 which corresponds to the new bit that * comes into play. */ DUK_ASSERT(heap->st_mask == old_st_size - 1); mask = old_st_size; if (DUK_HSTRING_GET_HASH(h) & mask) { if (prev != NULL) { prev->hdr.h_next = h->hdr.h_next; } else { DUK_ASSERT(h == new_root); new_root = h->hdr.h_next; } h->hdr.h_next = new_root_high; new_root_high = h; } else { prev = h; } h = next; } new_ptr[i] = DUK__HEAPPTR_ENC16(heap, new_root); new_ptr_high[i] = DUK__HEAPPTR_ENC16(heap, new_root_high); } heap->st_size = new_st_size; heap->st_mask = new_st_size - 1; #if defined(DUK_USE_ASSERTIONS) duk__strtable_assert_checks(heap); #endif } #endif /* DUK__STRTAB_RESIZE_CHECK */ /* * Shrink strtable allocation in-place. */ #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_LOCAL void duk__strtable_shrink_inplace(duk_heap *heap) { duk_uint32_t new_st_size; duk_uint32_t i; duk_hstring *h; duk_hstring *other; duk_hstring *root; #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *old_ptr; duk_uint16_t *old_ptr_high; duk_uint16_t *new_ptr; #else duk_hstring **old_ptr; duk_hstring **old_ptr_high; duk_hstring **new_ptr; #endif DUK_DD(DUK_DDPRINT("shrink in-place: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size / 2)); DUK_ASSERT(heap != NULL); DUK_ASSERT(heap->st_resizing == 1); DUK_ASSERT(heap->st_size >= 2); DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */ DUK_ASSERT(DUK__GET_STRTABLE(heap) != NULL); new_st_size = heap->st_size >> 1U; /* Combine two buckets into a single one. When we shrink, one hash * bit (highest) disappears. */ old_ptr = DUK__GET_STRTABLE(heap); old_ptr_high = old_ptr + new_st_size; for (i = 0; i < new_st_size; i++) { h = DUK__HEAPPTR_DEC16(heap, old_ptr[i]); other = DUK__HEAPPTR_DEC16(heap, old_ptr_high[i]); if (h == NULL) { /* First chain is empty, so use second one as is. */ root = other; } else { /* Find end of first chain, and link in the second. */ root = h; while (h->hdr.h_next != NULL) { h = h->hdr.h_next; } h->hdr.h_next = other; } old_ptr[i] = DUK__HEAPPTR_ENC16(heap, root); } heap->st_size = new_st_size; heap->st_mask = new_st_size - 1; /* The strtable is now consistent and we can realloc safely. Even * if side effects cause string interning or removal the strtable * updates are safe. Recursive resize has been prevented by caller. * This is also why we don't need to use DUK_REALLOC_INDIRECT(). * * We assume a realloc() to a smaller size is guaranteed to succeed. * It would be relatively straightforward to handle the error by * essentially performing a "grow" step to recover. */ #if defined(DUK_USE_STRTAB_PTRCOMP) new_ptr = (duk_uint16_t *) DUK_REALLOC(heap, heap->strtable16, sizeof(duk_uint16_t) * new_st_size); DUK_ASSERT(new_ptr != NULL); heap->strtable16 = new_ptr; #else new_ptr = (duk_hstring **) DUK_REALLOC(heap, heap->strtable, sizeof(duk_hstring *) * new_st_size); DUK_ASSERT(new_ptr != NULL); heap->strtable = new_ptr; #endif #if defined(DUK_USE_ASSERTIONS) duk__strtable_assert_checks(heap); #endif } #endif /* DUK__STRTAB_RESIZE_CHECK */ /* * Grow/shrink check. */ #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap) { duk_uint32_t load_factor; /* fixed point */ DUK_ASSERT(heap != NULL); #if defined(DUK_USE_STRTAB_PTRCOMP) DUK_ASSERT(heap->strtable16 != NULL); #else DUK_ASSERT(heap->strtable != NULL); #endif /* Prevent recursive resizing. */ if (DUK_UNLIKELY(heap->st_resizing)) { DUK_D(DUK_DPRINT("prevent recursive strtable resize")); return; } heap->st_resizing = 1; DUK_ASSERT(heap->st_size >= 16U); DUK_ASSERT((heap->st_size >> 4U) >= 1); load_factor = heap->st_count / (heap->st_size >> 4U); DUK_DD(DUK_DDPRINT("resize check string table: size=%lu, count=%lu, load_factor=%lu (fixed point .4; float %lf)", (unsigned long) heap->st_size, (unsigned long) heap->st_count, (unsigned long) load_factor, (double) heap->st_count / (double) heap->st_size)); if (load_factor >= DUK_USE_STRTAB_GROW_LIMIT) { if (heap->st_size >= DUK_USE_STRTAB_MAXSIZE) { DUK_DD(DUK_DDPRINT("want to grow strtable (based on load factor) but already maximum size")); } else { DUK_D(DUK_DPRINT("grow string table: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size * 2)); #if defined(DUK_USE_DEBUG) duk_heap_strtable_dump(heap); #endif duk__strtable_grow_inplace(heap); } } else if (load_factor <= DUK_USE_STRTAB_SHRINK_LIMIT) { if (heap->st_size <= DUK_USE_STRTAB_MINSIZE) { DUK_DD(DUK_DDPRINT("want to shrink strtable (based on load factor) but already minimum size")); } else { DUK_D(DUK_DPRINT("shrink string table: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size / 2)); #if defined(DUK_USE_DEBUG) duk_heap_strtable_dump(heap); #endif duk__strtable_shrink_inplace(heap); } } else { DUK_DD(DUK_DDPRINT("no need for strtable resize")); } heap->st_resizing = 0; } #endif /* DUK__STRTAB_RESIZE_CHECK */ /* * Torture grow/shrink: unconditionally grow and shrink back. */ #if defined(DUK_USE_STRTAB_TORTURE) && defined(DUK__STRTAB_RESIZE_CHECK) DUK_LOCAL void duk__strtable_resize_torture(duk_heap *heap) { duk_uint32_t old_st_size; DUK_ASSERT(heap != NULL); old_st_size = heap->st_size; if (old_st_size >= DUK_USE_STRTAB_MAXSIZE) { return; } heap->st_resizing = 1; duk__strtable_grow_inplace(heap); if (heap->st_size > old_st_size) { duk__strtable_shrink_inplace(heap); } heap->st_resizing = 0; } #endif /* DUK_USE_STRTAB_TORTURE && DUK__STRTAB_RESIZE_CHECK */ /* * Raw intern; string already checked not to be present. */ DUK_LOCAL duk_hstring *duk__strtable_do_intern(duk_heap *heap, const duk_uint8_t *str, duk_uint32_t blen, duk_uint32_t strhash) { duk_hstring *res; const duk_uint8_t *extdata; #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *slot; #else duk_hstring **slot; #endif DUK_DDD(DUK_DDDPRINT("do_intern: heap=%p, str=%p, blen=%lu, strhash=%lx, st_size=%lu, st_count=%lu, load=%lf", (void *) heap, (const void *) str, (unsigned long) blen, (unsigned long) strhash, (unsigned long) heap->st_size, (unsigned long) heap->st_count, (double) heap->st_count / (double) heap->st_size)); DUK_ASSERT(heap != NULL); /* Prevent any side effects on the string table and the caller provided * str/blen arguments while interning is in progress. For example, if * the caller provided str/blen from a dynamic buffer, a finalizer * might resize or modify that dynamic buffer, invalidating the call * arguments. * * While finalizers must be prevented, mark-and-sweep itself is fine. * Recursive string table resize is prevented explicitly here. */ heap->pf_prevent_count++; DUK_ASSERT(heap->pf_prevent_count != 0); /* Wrap. */ #if defined(DUK_USE_STRTAB_TORTURE) && defined(DUK__STRTAB_RESIZE_CHECK) duk__strtable_resize_torture(heap); #endif /* String table grow/shrink check. Because of chaining (and no * accumulation issues as with hash probe chains and DELETED * markers) there's never a mandatory need to resize right now. * Check for the resize only periodically, based on st_count * bit pattern. Because string table removal doesn't do a shrink * check, we do that also here. * * Do the resize and possible grow/shrink before the new duk_hstring * has been allocated. Otherwise we may trigger a GC when the result * duk_hstring is not yet strongly referenced. */ #if defined(DUK__STRTAB_RESIZE_CHECK) if (DUK_UNLIKELY((heap->st_count & DUK_USE_STRTAB_RESIZE_CHECK_MASK) == 0)) { duk__strtable_resize_check(heap); } #endif /* External string check (low memory optimization). */ #if defined(DUK_USE_HSTRING_EXTDATA) && defined(DUK_USE_EXTSTR_INTERN_CHECK) extdata = (const duk_uint8_t *) DUK_USE_EXTSTR_INTERN_CHECK(heap->heap_udata, (void *) DUK_LOSE_CONST(str), (duk_size_t) blen); #else extdata = (const duk_uint8_t *) NULL; #endif /* Allocate and initialize string, not yet linked. This may cause a * GC which may cause other strings to be interned and inserted into * the string table before we insert our string. Finalizer execution * is disabled intentionally to avoid a finalizer from e.g. resizing * a buffer used as a data area for 'str'. */ res = duk__strtable_alloc_hstring(heap, str, blen, strhash, extdata); /* Allow side effects again: GC must be avoided until duk_hstring * result (if successful) has been INCREF'd. */ DUK_ASSERT(heap->pf_prevent_count > 0); heap->pf_prevent_count--; /* Alloc error handling. */ if (DUK_UNLIKELY(res == NULL)) { #if defined(DUK_USE_HSTRING_EXTDATA) && defined(DUK_USE_EXTSTR_INTERN_CHECK) if (extdata != NULL) { DUK_USE_EXTSTR_FREE(heap->heap_udata, (const void *) extdata); } #endif return NULL; } /* Insert into string table. */ #if defined(DUK_USE_STRTAB_PTRCOMP) slot = heap->strtable16 + (strhash & heap->st_mask); #else slot = heap->strtable + (strhash & heap->st_mask); #endif DUK_ASSERT(res->hdr.h_next == NULL); /* This is the case now, but unnecessary zeroing/NULLing. */ res->hdr.h_next = DUK__HEAPPTR_DEC16(heap, *slot); *slot = DUK__HEAPPTR_ENC16(heap, res); /* Update string count only for successful inserts. */ #if defined(DUK__STRTAB_RESIZE_CHECK) heap->st_count++; #endif /* The duk_hstring is in the string table but is not yet strongly * reachable. Calling code MUST NOT make any allocations or other * side effects before the duk_hstring has been INCREF'd and made * reachable. */ return res; } /* * Intern a string from str/blen, returning either an existing duk_hstring * or adding a new one into the string table. The input string does -not- * need to be NUL terminated. * * The input 'str' argument may point to a Duktape managed data area such as * the data area of a dynamic buffer. It's crucial to avoid any side effects * that might affect the data area (e.g. resize the dynamic buffer, or write * to the buffer) before the string is fully interned. */ #if defined(DUK_USE_ROM_STRINGS) DUK_LOCAL duk_hstring *duk__strtab_romstring_lookup(duk_heap *heap, const duk_uint8_t *str, duk_size_t blen, duk_uint32_t strhash) { duk_size_t lookup_hash; duk_hstring *curr; DUK_ASSERT(heap != NULL); DUK_UNREF(heap); lookup_hash = (blen << 4); if (blen > 0) { lookup_hash += str[0]; } lookup_hash &= 0xff; curr = DUK_LOSE_CONST(duk_rom_strings_lookup[lookup_hash]); while (curr != NULL) { if (strhash == DUK_HSTRING_GET_HASH(curr) && blen == DUK_HSTRING_GET_BYTELEN(curr) && DUK_MEMCMP((const void *) str, (const void *) DUK_HSTRING_GET_DATA(curr), blen) == 0) { DUK_DDD(DUK_DDDPRINT("intern check: rom string: %!O, computed hash 0x%08lx, rom hash 0x%08lx", curr, (unsigned long) strhash, (unsigned long) DUK_HSTRING_GET_HASH(curr))); return curr; } curr = curr->hdr.h_next; } return NULL; } #endif /* DUK_USE_ROM_STRINGS */ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uint8_t *str, duk_uint32_t blen) { duk_uint32_t strhash; duk_hstring *h; DUK_DDD(DUK_DDDPRINT("intern check: heap=%p, str=%p, blen=%lu", (void *) heap, (const void *) str, (unsigned long) blen)); /* Preliminaries. */ DUK_ASSERT(heap != NULL); DUK_ASSERT(blen == 0 || str != NULL); DUK_ASSERT(blen <= DUK_HSTRING_MAX_BYTELEN); /* Caller is responsible for ensuring this. */ strhash = duk_heap_hashstring(heap, str, (duk_size_t) blen); /* String table lookup. */ DUK_ASSERT(DUK__GET_STRTABLE(heap) != NULL); DUK_ASSERT(heap->st_size > 0); DUK_ASSERT(heap->st_size == heap->st_mask + 1); #if defined(DUK_USE_STRTAB_PTRCOMP) h = DUK__HEAPPTR_DEC16(heap, heap->strtable16[strhash & heap->st_mask]); #else h = heap->strtable[strhash & heap->st_mask]; #endif while (h != NULL) { if (DUK_HSTRING_GET_HASH(h) == strhash && DUK_HSTRING_GET_BYTELEN(h) == blen && DUK_MEMCMP((const void *) str, (const void *) DUK_HSTRING_GET_DATA(h), (size_t) blen) == 0) { /* Found existing entry. */ return h; } h = h->hdr.h_next; } /* ROM table lookup. Because this lookup is slower, do it only after * RAM lookup. This works because no ROM string is ever interned into * the RAM string table. */ #if defined(DUK_USE_ROM_STRINGS) h = duk__strtab_romstring_lookup(heap, str, blen, strhash); if (h != NULL) { return h; } #endif /* Not found in string table; insert. */ h = duk__strtable_do_intern(heap, str, blen, strhash); return h; /* may be NULL */ } /* * Intern a string from u32. */ /* XXX: Could arrange some special handling because we know that the result * will have an arridx flag and an ASCII flag, won't need a clen check, etc. */ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_u32(duk_heap *heap, duk_uint32_t val) { char buf[DUK__STRTAB_U32_MAX_STRLEN]; char *p; DUK_ASSERT(heap != NULL); /* This is smaller and faster than a %lu sprintf. */ p = buf + sizeof(buf); do { p--; *p = duk_lc_digits[val % 10]; val = val / 10; } while (val != 0); /* For val == 0, emit exactly one '0'. */ DUK_ASSERT(p >= buf); return duk_heap_strtable_intern(heap, (const duk_uint8_t *) p, (duk_uint32_t) ((buf + sizeof(buf)) - p)); } /* * Checked convenience variants. * * XXX: Because the main use case is for the checked variants, make them the * main functionality and provide a safe variant separately (it is only needed * during heap init). The problem with that is that longjmp state and error * creation must already be possible to throw. */ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_checked(duk_hthread *thr, const duk_uint8_t *str, duk_uint32_t blen) { duk_hstring *res; DUK_ASSERT(thr != NULL); DUK_ASSERT(thr->heap != NULL); DUK_ASSERT(blen == 0 || str != NULL); res = duk_heap_strtable_intern(thr->heap, str, blen); if (DUK_UNLIKELY(res == NULL)) { DUK_ERROR_ALLOC_FAILED(thr); } return res; } DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_u32_checked(duk_hthread *thr, duk_uint32_t val) { duk_hstring *res; DUK_ASSERT(thr != NULL); DUK_ASSERT(thr->heap != NULL); res = duk_heap_strtable_intern_u32(thr->heap, val); if (DUK_UNLIKELY(res == NULL)) { DUK_ERROR_ALLOC_FAILED(thr); } return res; } /* * Remove (unlink) a string from the string table. * * Just unlinks the duk_hstring, leaving link pointers as garbage. * Caller must free the string itself. */ #if defined(DUK_USE_REFERENCE_COUNTING) /* Unlink without a 'prev' pointer. */ DUK_INTERNAL void duk_heap_strtable_unlink(duk_heap *heap, duk_hstring *h) { #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *slot; #else duk_hstring **slot; #endif duk_hstring *other; duk_hstring *prev; DUK_DDD(DUK_DDDPRINT("remove: heap=%p, h=%p, blen=%lu, strhash=%lx", (void *) heap, (void *) h, (unsigned long) (h != NULL ? DUK_HSTRING_GET_BYTELEN(h) : 0), (unsigned long) (h != NULL ? DUK_HSTRING_GET_HASH(h) : 0))); DUK_ASSERT(heap != NULL); DUK_ASSERT(h != NULL); #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_ASSERT(heap->st_count > 0); heap->st_count--; #endif #if defined(DUK_USE_STRTAB_PTRCOMP) slot = heap->strtable16 + (DUK_HSTRING_GET_HASH(h) & heap->st_mask); #else slot = heap->strtable + (DUK_HSTRING_GET_HASH(h) & heap->st_mask); #endif other = DUK__HEAPPTR_DEC16(heap, *slot); DUK_ASSERT(other != NULL); /* At least argument string is in the chain. */ prev = NULL; while (other != h) { prev = other; other = other->hdr.h_next; DUK_ASSERT(other != NULL); /* We'll eventually find 'h'. */ } if (prev != NULL) { /* Middle of list. */ prev->hdr.h_next = h->hdr.h_next; } else { /* Head of list. */ *slot = DUK__HEAPPTR_ENC16(heap, h->hdr.h_next); } /* There's no resize check on a string free. The next string * intern will do one. */ } #endif /* DUK_USE_REFERENCE_COUNTING */ /* Unlink with a 'prev' pointer. */ DUK_INTERNAL void duk_heap_strtable_unlink_prev(duk_heap *heap, duk_hstring *h, duk_hstring *prev) { #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *slot; #else duk_hstring **slot; #endif DUK_DDD(DUK_DDDPRINT("remove: heap=%p, prev=%p, h=%p, blen=%lu, strhash=%lx", (void *) heap, (void *) prev, (void *) h, (unsigned long) (h != NULL ? DUK_HSTRING_GET_BYTELEN(h) : 0), (unsigned long) (h != NULL ? DUK_HSTRING_GET_HASH(h) : 0))); DUK_ASSERT(heap != NULL); DUK_ASSERT(h != NULL); DUK_ASSERT(prev == NULL || prev->hdr.h_next == h); #if defined(DUK__STRTAB_RESIZE_CHECK) DUK_ASSERT(heap->st_count > 0); heap->st_count--; #endif if (prev != NULL) { /* Middle of list. */ prev->hdr.h_next = h->hdr.h_next; } else { /* Head of list. */ #if defined(DUK_USE_STRTAB_PTRCOMP) slot = heap->strtable16 + (DUK_HSTRING_GET_HASH(h) & heap->st_mask); #else slot = heap->strtable + (DUK_HSTRING_GET_HASH(h) & heap->st_mask); #endif DUK_ASSERT(DUK__HEAPPTR_DEC16(heap, *slot) == h); *slot = DUK__HEAPPTR_ENC16(heap, h->hdr.h_next); } } /* * Force string table resize check in mark-and-sweep. */ DUK_INTERNAL void duk_heap_strtable_force_resize(duk_heap *heap) { /* Does only one grow/shrink step if needed. The heap->st_resizing * flag protects against recursive resizing. */ DUK_ASSERT(heap != NULL); DUK_UNREF(heap); #if defined(DUK__STRTAB_RESIZE_CHECK) #if defined(DUK_USE_STRTAB_PTRCOMP) if (heap->strtable16 != NULL) { #else if (heap->strtable != NULL) { #endif duk__strtable_resize_check(heap); } #endif } /* * Free strings in the string table and the string table itself. */ DUK_INTERNAL void duk_heap_strtable_free(duk_heap *heap) { #if defined(DUK_USE_STRTAB_PTRCOMP) duk_uint16_t *strtable; duk_uint16_t *st; #else duk_hstring **strtable; duk_hstring **st; #endif duk_hstring *h; DUK_ASSERT(heap != NULL); #if defined(DUK_USE_ASSERTIONS) duk__strtable_assert_checks(heap); #endif /* Strtable can be NULL if heap init fails. However, in that case * heap->st_size is 0, so strtable == strtable_end and we skip the * loop without a special check. */ strtable = DUK__GET_STRTABLE(heap); st = strtable + heap->st_size; DUK_ASSERT(strtable != NULL || heap->st_size == 0); while (strtable != st) { --st; h = DUK__HEAPPTR_DEC16(heap, *st); while (h) { duk_hstring *h_next; h_next = h->hdr.h_next; /* Strings may have inner refs (extdata) in some cases. */ duk_free_hstring(heap, h); h = h_next; } } DUK_FREE(heap, strtable); }
{ "pile_set_name": "Github" }
// { dg-require-namedlocale "ja_JP.eucJP" } // { dg-require-namedlocale "de_DE.ISO8859-15" } // 2001-08-15 Benjamin Kosnik <bkoz@redhat.com> // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. // 22.2.4.1.1 collate members #include <testsuite_hooks.h> #define main discard_main_1 #include "1.cc" #undef main #define main discard_main_2 #include "2.cc" #undef main int main() { using namespace __gnu_test; func_callback two; two.push_back(&test01); two.push_back(&test02); run_tests_wrapped_locale("ja_JP.eucJP", two); return 0; }
{ "pile_set_name": "Github" }
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package flowcontrol import ( "sync" "time" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/utils/integer" ) type backoffEntry struct { backoff time.Duration lastUpdate time.Time } type Backoff struct { sync.RWMutex Clock clock.Clock defaultDuration time.Duration maxDuration time.Duration perItemBackoff map[string]*backoffEntry } func NewFakeBackOff(initial, max time.Duration, tc *clock.FakeClock) *Backoff { return &Backoff{ perItemBackoff: map[string]*backoffEntry{}, Clock: tc, defaultDuration: initial, maxDuration: max, } } func NewBackOff(initial, max time.Duration) *Backoff { return &Backoff{ perItemBackoff: map[string]*backoffEntry{}, Clock: clock.RealClock{}, defaultDuration: initial, maxDuration: max, } } // Get the current backoff Duration func (p *Backoff) Get(id string) time.Duration { p.RLock() defer p.RUnlock() var delay time.Duration entry, ok := p.perItemBackoff[id] if ok { delay = entry.backoff } return delay } // move backoff to the next mark, capping at maxDuration func (p *Backoff) Next(id string, eventTime time.Time) { p.Lock() defer p.Unlock() entry, ok := p.perItemBackoff[id] if !ok || hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { entry = p.initEntryUnsafe(id) } else { delay := entry.backoff * 2 // exponential entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration))) } entry.lastUpdate = p.Clock.Now() } // Reset forces clearing of all backoff data for a given key. func (p *Backoff) Reset(id string) { p.Lock() defer p.Unlock() delete(p.perItemBackoff, id) } // Returns True if the elapsed time since eventTime is smaller than the current backoff window func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool { p.RLock() defer p.RUnlock() entry, ok := p.perItemBackoff[id] if !ok { return false } if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { return false } return p.Clock.Since(eventTime) < entry.backoff } // Returns True if time since lastupdate is less than the current backoff window. func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool { p.RLock() defer p.RUnlock() entry, ok := p.perItemBackoff[id] if !ok { return false } if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { return false } return eventTime.Sub(entry.lastUpdate) < entry.backoff } // Garbage collect records that have aged past maxDuration. Backoff users are expected // to invoke this periodically. func (p *Backoff) GC() { p.Lock() defer p.Unlock() now := p.Clock.Now() for id, entry := range p.perItemBackoff { if now.Sub(entry.lastUpdate) > p.maxDuration*2 { // GC when entry has not been updated for 2*maxDuration delete(p.perItemBackoff, id) } } } func (p *Backoff) DeleteEntry(id string) { p.Lock() defer p.Unlock() delete(p.perItemBackoff, id) } // Take a lock on *Backoff, before calling initEntryUnsafe func (p *Backoff) initEntryUnsafe(id string) *backoffEntry { entry := &backoffEntry{backoff: p.defaultDuration} p.perItemBackoff[id] = entry return entry } // After 2*maxDuration we restart the backoff factor to the beginning func hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool { return eventTime.Sub(lastUpdate) > maxDuration*2 // consider stable if it's ok for twice the maxDuration }
{ "pile_set_name": "Github" }
#ifndef MULTISCALE_ALIGN_H #define MULTISCALE_ALIGN_H #include <common/meshmodel.h> #include <Eigen/Core> #include "Patate/grenaille.h" //#include "localKdTree.h" #include "generic_align.h" #include "struct.h" #ifdef _OPENMP #include <omp.h> #endif #define PI 3.14159265 //////// Number of samples for the first poisson, it defines the size of the models which will be analysed #define SUBSAMPLES 20000 ////// size of the first, second and third points list used for matching #define FIRST_POINTS 10 #define OTHER_POINTS 5 //#define THIRD_POINTS 5 #define MAX_SCALE_MULTIPLIER 1 ////// the alignment treshold (10 ok for mm, not so good for meters... it could be calculated based on the size of the model) //#define ALIGNMENT_THRESHOLD 4.0 ////// This permits to execute only the first search for a matching, for debug reasons //#define ONLY_THE_FIRST_SEARCH ////// This permits to define the first point in the toalign model by hand //#define DEBUG_SINGLE_POINT ////// This permits to compute the multiscale distance between a random seed and all the other points in the reference mesh //#define DEBUG_SIMILARITY_MAP #define MULTIPLIER 1.2 //#define CHECKBORDERS true //#define SAVE_CVS using namespace vcg; namespace MultiscaleAlignNamespace{ template <typename> class KdTree; } class MultiscaleAlign: public GenericAlign { private: public: MultiscaleAlign(); /**************************************************************************/ /* Input Parameters */ /**************************************************************************/ /**************************************************************************/ /* Processing */ /**************************************************************************/ public: void checkBorders(DescriptorBase model, float radius); float process_scale(MeshModel* _reference, float radiusRef, float refCoarse, MeshModel* _toAlign, float radiusToAlign, float toAlignCoarse, float multiplier, unsigned int nbScales, Options opt); float recalcConfidence(DescriptorBase _reference, DescriptorBase _toAlign, float scale, unsigned int nbScales, int referenceID, int toAlignID); private: std::vector < Cand > searchMatches(DescriptorBase toAlign, DescriptorBase reference, int ind, std::vector<float>Scales, bool computeAlignDescr = true); bool searchTranf(const DescriptorBase& toAlign, const DescriptorBase& reference, const std::vector< int >& seeds, const std::vector< std::vector < Cand > >& seedList, const std::vector<float>& Scales, Options opt); std::vector<Cand> getCandidates(const DescriptorBase &toAlign, const DescriptorBase &reference, int ind, const std::vector<std::pair<int, int> > &corrs, float scaleFact, const std::vector<float> &Scales); /*void extractSIFTPoints(const DescriptorBase& mesh, std::vector<SiftPoint> &list);*/ void extractDescriptivePoints(const DescriptorBase& mesh, std::vector<DescrPoint> &list); template <class Fit> void computeSimilarityMap(const DescriptorBase& reference, const DescriptorBase& toAlign, std::vector<Fit>* toAlignDescr, float maxscaleToAl); /**************************************************************************/ /* Results */ /**************************************************************************/ }; #endif // MULTISCALE_ALIGN_H
{ "pile_set_name": "Github" }
/*! * \file COutputFactory.cpp * \brief Main subroutines for output solver information * \author T. Albring * \version 7.0.6 "Blackbird" * * SU2 Project Website: https://su2code.github.io * * The SU2 Project is maintained by the SU2 Foundation * (http://su2foundation.org) * * Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md) * * SU2 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. * * SU2 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 SU2. If not, see <http://www.gnu.org/licenses/>. */ #include "../../include/output/COutputFactory.hpp" #include "../../include/output/COutputLegacy.hpp" #include "../../include/output/COutput.hpp" #include "../../include/output/CMultizoneOutput.hpp" #include "../../include/output/CElasticityOutput.hpp" #include "../../include/output/CAdjElasticityOutput.hpp" #include "../../include/output/CFlowCompOutput.hpp" #include "../../include/output/CAdjFlowOutput.hpp" #include "../../include/output/CFlowCompFEMOutput.hpp" #include "../../include/output/CFlowIncOutput.hpp" #include "../../include/output/CAdjFlowIncOutput.hpp" #include "../../include/output/CHeatOutput.hpp" #include "../../include/output/CAdjHeatOutput.hpp" COutput* COutputFactory::CreateOutput(ENUM_MAIN_SOLVER kindSolver, CConfig* config, int nDim){ COutput* output = nullptr; switch(kindSolver){ case EULER: case NAVIER_STOKES: case RANS: output = new CFlowCompOutput(config, nDim); break; case INC_EULER: case INC_NAVIER_STOKES: case INC_RANS: output = new CFlowIncOutput(config, nDim); break; case HEAT_EQUATION: output = new CHeatOutput(config, nDim); break; case FEM_ELASTICITY: output = new CElasticityOutput(config, nDim); break; case DISC_ADJ_EULER: case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_RANS: case ADJ_EULER: case ADJ_NAVIER_STOKES: case ADJ_RANS: output = new CAdjFlowCompOutput(config, nDim); break; case DISC_ADJ_INC_EULER: case DISC_ADJ_INC_NAVIER_STOKES: case DISC_ADJ_INC_RANS: output = new CAdjFlowIncOutput(config, nDim); break; case DISC_ADJ_FEM: output = new CAdjElasticityOutput(config, nDim); break; case DISC_ADJ_HEAT: output = new CAdjHeatOutput(config, nDim); break; case FEM_EULER: case FEM_LES: case FEM_RANS: case FEM_NAVIER_STOKES: output = new CFlowCompFEMOutput(config, nDim); break; default: output = new COutput(config, nDim, false); break; } return output; } COutput* COutputFactory::CreateMultizoneOutput(CConfig *driverConfig, CConfig** config_container, int nDim){ COutput* output = new CMultizoneOutput(driverConfig, config_container, nDim); return output; } COutputLegacy* COutputFactory::CreateLegacyOutput(CConfig *config){ COutputLegacy* output = new COutputLegacy(config); return output; }
{ "pile_set_name": "Github" }
*> \brief \b ZLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex symmetric matrix. * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly *> Download ZLANSY + dependencies *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlansy.f"> *> [TGZ]</a> *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlansy.f"> *> [ZIP]</a> *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlansy.f"> *> [TXT]</a> *> \endhtmlonly * * Definition: * =========== * * DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK ) * * .. Scalar Arguments .. * CHARACTER NORM, UPLO * INTEGER LDA, N * .. * .. Array Arguments .. * DOUBLE PRECISION WORK( * ) * COMPLEX*16 A( LDA, * ) * .. * * *> \par Purpose: * ============= *> *> \verbatim *> *> ZLANSY returns the value of the one norm, or the Frobenius norm, or *> the infinity norm, or the element of largest absolute value of a *> complex symmetric matrix A. *> \endverbatim *> *> \return ZLANSY *> \verbatim *> *> ZLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm' *> ( *> ( norm1(A), NORM = '1', 'O' or 'o' *> ( *> ( normI(A), NORM = 'I' or 'i' *> ( *> ( normF(A), NORM = 'F', 'f', 'E' or 'e' *> *> where norm1 denotes the one norm of a matrix (maximum column sum), *> normI denotes the infinity norm of a matrix (maximum row sum) and *> normF denotes the Frobenius norm of a matrix (square root of sum of *> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. *> \endverbatim * * Arguments: * ========== * *> \param[in] NORM *> \verbatim *> NORM is CHARACTER*1 *> Specifies the value to be returned in ZLANSY as described *> above. *> \endverbatim *> *> \param[in] UPLO *> \verbatim *> UPLO is CHARACTER*1 *> Specifies whether the upper or lower triangular part of the *> symmetric matrix A is to be referenced. *> = 'U': Upper triangular part of A is referenced *> = 'L': Lower triangular part of A is referenced *> \endverbatim *> *> \param[in] N *> \verbatim *> N is INTEGER *> The order of the matrix A. N >= 0. When N = 0, ZLANSY is *> set to zero. *> \endverbatim *> *> \param[in] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> The symmetric matrix A. If UPLO = 'U', the leading n by n *> upper triangular part of A contains the upper triangular part *> of the matrix A, and the strictly lower triangular part of A *> is not referenced. If UPLO = 'L', the leading n by n lower *> triangular part of A contains the lower triangular part of *> the matrix A, and the strictly upper triangular part of A is *> not referenced. *> \endverbatim *> *> \param[in] LDA *> \verbatim *> LDA is INTEGER *> The leading dimension of the array A. LDA >= max(N,1). *> \endverbatim *> *> \param[out] WORK *> \verbatim *> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)), *> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, *> WORK is not referenced. *> \endverbatim * * Authors: * ======== * *> \author Univ. of Tennessee *> \author Univ. of California Berkeley *> \author Univ. of Colorado Denver *> \author NAG Ltd. * *> \date December 2016 * *> \ingroup complex16SYauxiliary * * ===================================================================== DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK ) * * -- LAPACK auxiliary routine (version 3.7.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * December 2016 * * .. Scalar Arguments .. CHARACTER NORM, UPLO INTEGER LDA, N * .. * .. Array Arguments .. DOUBLE PRECISION WORK( * ) COMPLEX*16 A( LDA, * ) * .. * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. INTEGER I, J DOUBLE PRECISION ABSA, SCALE, SUM, VALUE * .. * .. External Functions .. LOGICAL LSAME, DISNAN EXTERNAL LSAME, DISNAN * .. * .. External Subroutines .. EXTERNAL ZLASSQ * .. * .. Intrinsic Functions .. INTRINSIC ABS, SQRT * .. * .. Executable Statements .. * IF( N.EQ.0 ) THEN VALUE = ZERO ELSE IF( LSAME( NORM, 'M' ) ) THEN * * Find max(abs(A(i,j))). * VALUE = ZERO IF( LSAME( UPLO, 'U' ) ) THEN DO 20 J = 1, N DO 10 I = 1, J SUM = ABS( A( I, J ) ) IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 10 CONTINUE 20 CONTINUE ELSE DO 40 J = 1, N DO 30 I = J, N SUM = ABS( A( I, J ) ) IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 30 CONTINUE 40 CONTINUE END IF ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR. $ ( NORM.EQ.'1' ) ) THEN * * Find normI(A) ( = norm1(A), since A is symmetric). * VALUE = ZERO IF( LSAME( UPLO, 'U' ) ) THEN DO 60 J = 1, N SUM = ZERO DO 50 I = 1, J - 1 ABSA = ABS( A( I, J ) ) SUM = SUM + ABSA WORK( I ) = WORK( I ) + ABSA 50 CONTINUE WORK( J ) = SUM + ABS( A( J, J ) ) 60 CONTINUE DO 70 I = 1, N SUM = WORK( I ) IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 70 CONTINUE ELSE DO 80 I = 1, N WORK( I ) = ZERO 80 CONTINUE DO 100 J = 1, N SUM = WORK( J ) + ABS( A( J, J ) ) DO 90 I = J + 1, N ABSA = ABS( A( I, J ) ) SUM = SUM + ABSA WORK( I ) = WORK( I ) + ABSA 90 CONTINUE IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM 100 CONTINUE END IF ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN * * Find normF(A). * SCALE = ZERO SUM = ONE IF( LSAME( UPLO, 'U' ) ) THEN DO 110 J = 2, N CALL ZLASSQ( J-1, A( 1, J ), 1, SCALE, SUM ) 110 CONTINUE ELSE DO 120 J = 1, N - 1 CALL ZLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM ) 120 CONTINUE END IF SUM = 2*SUM CALL ZLASSQ( N, A, LDA+1, SCALE, SUM ) VALUE = SCALE*SQRT( SUM ) END IF * ZLANSY = VALUE RETURN * * End of ZLANSY * END
{ "pile_set_name": "Github" }
<?php require_once(HTML2PS_DIR.'value.generic.php'); class BorderStyle extends CSSValue { var $left; var $right; var $top; var $bottom; function &copy() { $value =& new BorderStyle($this->top, $this->right, $this->bottom, $this->left); return $value; } function BorderStyle($top, $right, $bottom, $left) { $this->left = $left; $this->right = $right; $this->top = $top; $this->bottom = $bottom; } } ?>
{ "pile_set_name": "Github" }
/* GIMP - The GNU Image Manipulation Program * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * GimpTextTool * Copyright (C) 2002-2010 Sven Neumann <sven@gimp.org> * Daniel Eddeland <danedde@svn.gnome.org> * Michael Natterer <mitch@gimp.org> * * 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 <https://www.gnu.org/licenses/>. */ #ifndef __GIMP_TEXT_TOOL_H__ #define __GIMP_TEXT_TOOL_H__ #include "gimpdrawtool.h" #define GIMP_TYPE_TEXT_TOOL (gimp_text_tool_get_type ()) #define GIMP_TEXT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEXT_TOOL, GimpTextTool)) #define GIMP_IS_TEXT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TEXT_TOOL)) #define GIMP_TEXT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TEXT_TOOL, GimpTextToolClass)) #define GIMP_IS_TEXT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_TEXT_TOOL)) #define GIMP_TEXT_TOOL_GET_OPTIONS(t) (GIMP_TEXT_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t)))) typedef struct _GimpTextTool GimpTextTool; typedef struct _GimpTextToolClass GimpTextToolClass; struct _GimpTextTool { GimpDrawTool parent_instance; GimpText *proxy; GList *pending; guint idle_id; gboolean moving; GimpTextBuffer *buffer; GimpText *text; GimpTextLayer *layer; GimpImage *image; GtkWidget *confirm_dialog; GimpUIManager *ui_manager; gboolean handle_rectangle_change_complete; gboolean text_box_fixed; GimpTextLayout *layout; gint drawing_blocked; GimpToolWidget *widget; GimpToolWidget *grab_widget; /* text editor state: */ GtkWidget *style_overlay; GtkWidget *style_editor; gboolean selecting; GtkTextIter select_start_iter; gboolean select_words; gboolean select_lines; GtkIMContext *im_context; gboolean needs_im_reset; gboolean preedit_active; gchar *preedit_string; gint preedit_cursor; GtkTextMark *preedit_start; GtkTextMark *preedit_end; gboolean overwrite_mode; gint x_pos; GtkWidget *offscreen_window; GtkWidget *proxy_text_view; GtkWidget *editor_dialog; }; struct _GimpTextToolClass { GimpDrawToolClass parent_class; }; void gimp_text_tool_register (GimpToolRegisterCallback callback, gpointer data); GType gimp_text_tool_get_type (void) G_GNUC_CONST; gboolean gimp_text_tool_set_layer (GimpTextTool *text_tool, GimpLayer *layer); gboolean gimp_text_tool_get_has_text_selection (GimpTextTool *text_tool); void gimp_text_tool_delete_selection (GimpTextTool *text_tool); void gimp_text_tool_cut_clipboard (GimpTextTool *text_tool); void gimp_text_tool_copy_clipboard (GimpTextTool *text_tool); void gimp_text_tool_paste_clipboard (GimpTextTool *text_tool); void gimp_text_tool_create_vectors (GimpTextTool *text_tool); void gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool); GimpTextDirection gimp_text_tool_get_direction (GimpTextTool *text_tool); /* only for the text editor */ void gimp_text_tool_clear_layout (GimpTextTool *text_tool); gboolean gimp_text_tool_ensure_layout (GimpTextTool *text_tool); void gimp_text_tool_apply (GimpTextTool *text_tool, gboolean push_undo); #endif /* __GIMP_TEXT_TOOL_H__ */
{ "pile_set_name": "Github" }
/* * Core driver access RC5T583 power management chip. * * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. * Author: Laxman dewangan <ldewangan@nvidia.com> * * Based on code * Copyright (C) 2011 RICOH COMPANY,LTD * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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/>. * */ #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/i2c.h> #include <linux/mfd/core.h> #include <linux/mfd/rc5t583.h> #include <linux/regmap.h> #define RICOH_ONOFFSEL_REG 0x10 #define RICOH_SWCTL_REG 0x5E struct deepsleep_control_data { u8 reg_add; u8 ds_pos_bit; }; #define DEEPSLEEP_INIT(_id, _reg, _pos) \ { \ .reg_add = RC5T583_##_reg, \ .ds_pos_bit = _pos, \ } static struct deepsleep_control_data deepsleep_data[] = { DEEPSLEEP_INIT(DC0, SLPSEQ1, 0), DEEPSLEEP_INIT(DC1, SLPSEQ1, 4), DEEPSLEEP_INIT(DC2, SLPSEQ2, 0), DEEPSLEEP_INIT(DC3, SLPSEQ2, 4), DEEPSLEEP_INIT(LDO0, SLPSEQ3, 0), DEEPSLEEP_INIT(LDO1, SLPSEQ3, 4), DEEPSLEEP_INIT(LDO2, SLPSEQ4, 0), DEEPSLEEP_INIT(LDO3, SLPSEQ4, 4), DEEPSLEEP_INIT(LDO4, SLPSEQ5, 0), DEEPSLEEP_INIT(LDO5, SLPSEQ5, 4), DEEPSLEEP_INIT(LDO6, SLPSEQ6, 0), DEEPSLEEP_INIT(LDO7, SLPSEQ6, 4), DEEPSLEEP_INIT(LDO8, SLPSEQ7, 0), DEEPSLEEP_INIT(LDO9, SLPSEQ7, 4), DEEPSLEEP_INIT(PSO0, SLPSEQ8, 0), DEEPSLEEP_INIT(PSO1, SLPSEQ8, 4), DEEPSLEEP_INIT(PSO2, SLPSEQ9, 0), DEEPSLEEP_INIT(PSO3, SLPSEQ9, 4), DEEPSLEEP_INIT(PSO4, SLPSEQ10, 0), DEEPSLEEP_INIT(PSO5, SLPSEQ10, 4), DEEPSLEEP_INIT(PSO6, SLPSEQ11, 0), DEEPSLEEP_INIT(PSO7, SLPSEQ11, 4), }; #define EXT_PWR_REQ \ (RC5T583_EXT_PWRREQ1_CONTROL | RC5T583_EXT_PWRREQ2_CONTROL) static struct mfd_cell rc5t583_subdevs[] = { {.name = "rc5t583-gpio",}, {.name = "rc5t583-regulator",}, {.name = "rc5t583-rtc", }, {.name = "rc5t583-key", } }; static int __rc5t583_set_ext_pwrreq1_control(struct device *dev, int id, int ext_pwr, int slots) { int ret; uint8_t sleepseq_val = 0; unsigned int en_bit; unsigned int slot_bit; if (id == RC5T583_DS_DC0) { dev_err(dev, "PWRREQ1 is invalid control for rail %d\n", id); return -EINVAL; } en_bit = deepsleep_data[id].ds_pos_bit; slot_bit = en_bit + 1; ret = rc5t583_read(dev, deepsleep_data[id].reg_add, &sleepseq_val); if (ret < 0) { dev_err(dev, "Error in reading reg 0x%x\n", deepsleep_data[id].reg_add); return ret; } sleepseq_val &= ~(0xF << en_bit); sleepseq_val |= BIT(en_bit); sleepseq_val |= ((slots & 0x7) << slot_bit); ret = rc5t583_set_bits(dev, RICOH_ONOFFSEL_REG, BIT(1)); if (ret < 0) { dev_err(dev, "Error in updating the 0x%02x register\n", RICOH_ONOFFSEL_REG); return ret; } ret = rc5t583_write(dev, deepsleep_data[id].reg_add, sleepseq_val); if (ret < 0) { dev_err(dev, "Error in writing reg 0x%x\n", deepsleep_data[id].reg_add); return ret; } if (id == RC5T583_DS_LDO4) { ret = rc5t583_write(dev, RICOH_SWCTL_REG, 0x1); if (ret < 0) dev_err(dev, "Error in writing reg 0x%x\n", RICOH_SWCTL_REG); } return ret; } static int __rc5t583_set_ext_pwrreq2_control(struct device *dev, int id, int ext_pwr) { int ret; if (id != RC5T583_DS_DC0) { dev_err(dev, "PWRREQ2 is invalid control for rail %d\n", id); return -EINVAL; } ret = rc5t583_set_bits(dev, RICOH_ONOFFSEL_REG, BIT(2)); if (ret < 0) dev_err(dev, "Error in updating the ONOFFSEL 0x10 register\n"); return ret; } int rc5t583_ext_power_req_config(struct device *dev, int ds_id, int ext_pwr_req, int deepsleep_slot_nr) { if ((ext_pwr_req & EXT_PWR_REQ) == EXT_PWR_REQ) return -EINVAL; if (ext_pwr_req & RC5T583_EXT_PWRREQ1_CONTROL) return __rc5t583_set_ext_pwrreq1_control(dev, ds_id, ext_pwr_req, deepsleep_slot_nr); if (ext_pwr_req & RC5T583_EXT_PWRREQ2_CONTROL) return __rc5t583_set_ext_pwrreq2_control(dev, ds_id, ext_pwr_req); return 0; } EXPORT_SYMBOL(rc5t583_ext_power_req_config); static int rc5t583_clear_ext_power_req(struct rc5t583 *rc5t583, struct rc5t583_platform_data *pdata) { int ret; int i; uint8_t on_off_val = 0; /* Clear ONOFFSEL register */ if (pdata->enable_shutdown) on_off_val = 0x1; ret = rc5t583_write(rc5t583->dev, RICOH_ONOFFSEL_REG, on_off_val); if (ret < 0) dev_warn(rc5t583->dev, "Error in writing reg %d error: %d\n", RICOH_ONOFFSEL_REG, ret); ret = rc5t583_write(rc5t583->dev, RICOH_SWCTL_REG, 0x0); if (ret < 0) dev_warn(rc5t583->dev, "Error in writing reg %d error: %d\n", RICOH_SWCTL_REG, ret); /* Clear sleep sequence register */ for (i = RC5T583_SLPSEQ1; i <= RC5T583_SLPSEQ11; ++i) { ret = rc5t583_write(rc5t583->dev, i, 0x0); if (ret < 0) dev_warn(rc5t583->dev, "Error in writing reg 0x%02x error: %d\n", i, ret); } return 0; } static bool volatile_reg(struct device *dev, unsigned int reg) { /* Enable caching in interrupt registers */ switch (reg) { case RC5T583_INT_EN_SYS1: case RC5T583_INT_EN_SYS2: case RC5T583_INT_EN_DCDC: case RC5T583_INT_EN_RTC: case RC5T583_INT_EN_ADC1: case RC5T583_INT_EN_ADC2: case RC5T583_INT_EN_ADC3: case RC5T583_GPIO_GPEDGE1: case RC5T583_GPIO_GPEDGE2: case RC5T583_GPIO_EN_INT: return false; case RC5T583_GPIO_MON_IOIN: /* This is gpio input register */ return true; default: /* Enable caching in gpio registers */ if ((reg >= RC5T583_GPIO_IOSEL) && (reg <= RC5T583_GPIO_GPOFUNC)) return false; /* Enable caching in sleep seq registers */ if ((reg >= RC5T583_SLPSEQ1) && (reg <= RC5T583_SLPSEQ11)) return false; /* Enable caching of regulator registers */ if ((reg >= RC5T583_REG_DC0CTL) && (reg <= RC5T583_REG_SR3CTL)) return false; if ((reg >= RC5T583_REG_LDOEN1) && (reg <= RC5T583_REG_LDO9DAC_DS)) return false; break; } return true; } static const struct regmap_config rc5t583_regmap_config = { .reg_bits = 8, .val_bits = 8, .volatile_reg = volatile_reg, .max_register = RC5T583_MAX_REGS, .num_reg_defaults_raw = RC5T583_MAX_REGS, .cache_type = REGCACHE_RBTREE, }; static int rc5t583_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rc5t583 *rc5t583; struct rc5t583_platform_data *pdata = i2c->dev.platform_data; int ret; bool irq_init_success = false; if (!pdata) { dev_err(&i2c->dev, "Err: Platform data not found\n"); return -EINVAL; } rc5t583 = devm_kzalloc(&i2c->dev, sizeof(struct rc5t583), GFP_KERNEL); if (!rc5t583) { dev_err(&i2c->dev, "Memory allocation failed\n"); return -ENOMEM; } rc5t583->dev = &i2c->dev; i2c_set_clientdata(i2c, rc5t583); rc5t583->regmap = devm_regmap_init_i2c(i2c, &rc5t583_regmap_config); if (IS_ERR(rc5t583->regmap)) { ret = PTR_ERR(rc5t583->regmap); dev_err(&i2c->dev, "regmap initialization failed: %d\n", ret); return ret; } ret = rc5t583_clear_ext_power_req(rc5t583, pdata); if (ret < 0) return ret; if (i2c->irq) { ret = rc5t583_irq_init(rc5t583, i2c->irq, pdata->irq_base); /* Still continue with warning, if irq init fails */ if (ret) dev_warn(&i2c->dev, "IRQ init failed: %d\n", ret); else irq_init_success = true; } ret = mfd_add_devices(rc5t583->dev, -1, rc5t583_subdevs, ARRAY_SIZE(rc5t583_subdevs), NULL, 0, NULL); if (ret) { dev_err(&i2c->dev, "add mfd devices failed: %d\n", ret); goto err_add_devs; } return 0; err_add_devs: if (irq_init_success) rc5t583_irq_exit(rc5t583); return ret; } static int rc5t583_i2c_remove(struct i2c_client *i2c) { struct rc5t583 *rc5t583 = i2c_get_clientdata(i2c); mfd_remove_devices(rc5t583->dev); rc5t583_irq_exit(rc5t583); return 0; } static const struct i2c_device_id rc5t583_i2c_id[] = { {.name = "rc5t583", .driver_data = 0}, {} }; MODULE_DEVICE_TABLE(i2c, rc5t583_i2c_id); static struct i2c_driver rc5t583_i2c_driver = { .driver = { .name = "rc5t583", .owner = THIS_MODULE, }, .probe = rc5t583_i2c_probe, .remove = rc5t583_i2c_remove, .id_table = rc5t583_i2c_id, }; static int __init rc5t583_i2c_init(void) { return i2c_add_driver(&rc5t583_i2c_driver); } subsys_initcall(rc5t583_i2c_init); static void __exit rc5t583_i2c_exit(void) { i2c_del_driver(&rc5t583_i2c_driver); } module_exit(rc5t583_i2c_exit); MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>"); MODULE_DESCRIPTION("RICOH RC5T583 power management system device driver"); MODULE_LICENSE("GPL v2");
{ "pile_set_name": "Github" }
<?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // $this->call(UsersTableSeeder::class); } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // ReleaseTest-API.cpp : Defines the entry point for the console application. // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <ctype.h> #include <iostream> /* include API */ #include "isac.h" #include "utility.h" /* Defines */ #define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */ #define MAX_FRAMESAMPLES 960 /* max number of samples per frame (= 60 ms frame & 16 kHz) or (= 30 ms frame & 32 kHz) */ #define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */ #define SWBFRAMESAMPLES_10ms 320 //#define FS 16000 /* sampling frequency (Hz) */ #ifdef WIN32 #define CLOCKS_PER_SEC 1000 /* Runtime statistics */ #endif using namespace std; int main(int argc, char* argv[]) { char inname[100], outname[100], bottleneck_file[100], vadfile[100]; FILE *inp, *outp, *f_bn = NULL, *vadp = NULL, *bandwidthp; int framecnt, endfile; int i, errtype, VADusage = 0, packetLossPercent = 0; int16_t CodingMode; int32_t bottleneck = 0; int16_t framesize = 30; /* ms */ int cur_framesmpls, err; /* Runtime statistics */ double starttime, runtime, length_file; int16_t stream_len = 0; int16_t declen = 0, lostFrame = 0, declenTC = 0; int16_t shortdata[SWBFRAMESAMPLES_10ms]; int16_t vaddata[SWBFRAMESAMPLES_10ms*3]; int16_t decoded[MAX_FRAMESAMPLES << 1]; int16_t decodedTC[MAX_FRAMESAMPLES << 1]; uint16_t streamdata[500]; int16_t speechType[1]; int16_t rateBPS = 0; int16_t fixedFL = 0; int16_t payloadSize = 0; int32_t payloadRate = 0; int setControlBWE = 0; short FL, testNum; char version_number[20]; FILE *plFile; int32_t sendBN; #ifdef _DEBUG FILE *fy; double kbps; #endif /* _DEBUG */ int totalbits =0; int totalsmpls =0; /* If use GNS file */ FILE *fp_gns = NULL; char gns_file[100]; short maxStreamLen30 = 0; short maxStreamLen60 = 0; short sampFreqKHz = 32; short samplesIn10Ms; short useAssign = 0; //FILE logFile; bool doTransCoding = false; int32_t rateTransCoding = 0; uint8_t streamDataTransCoding[1200]; int16_t streamLenTransCoding = 0; FILE* transCodingFile = NULL; FILE* transcodingBitstream = NULL; uint32_t numTransCodingBytes = 0; /* only one structure used for ISAC encoder */ ISACStruct* ISAC_main_inst = NULL; ISACStruct* decoderTransCoding = NULL; BottleNeckModel BN_data; #ifdef _DEBUG fy = fopen("bit_rate.dat", "w"); fclose(fy); fy = fopen("bytes_frames.dat", "w"); fclose(fy); #endif /* _DEBUG */ /* Handling wrong input arguments in the command line */ if((argc<3) || (argc>17)) { printf("\n\nWrong number of arguments or flag values.\n\n"); printf("\n"); WebRtcIsac_version(version_number); printf("iSAC-swb version %s \n\n", version_number); printf("Usage:\n\n"); printf("./kenny.exe [-I] bottleneck_value infile outfile \n\n"); printf("with:\n"); printf("[-FS num] : sampling frequency in kHz, valid values are 16 & 32,\n"); printf(" with 16 as default.\n"); printf("[-I] : if -I option is specified, the coder will use\n"); printf(" an instantaneous Bottleneck value. If not, it\n"); printf(" will be an adaptive Bottleneck value.\n\n"); printf("[-assign] : Use Assign API.\n"); printf("[-B num] : the value of the bottleneck provided either\n"); printf(" as a fixed value in bits/sec (e.g. 25000) or\n"); printf(" read from a file (e.g. bottleneck.txt)\n\n"); printf("[-INITRATE num] : Set a new value for initial rate. Note! Only used in \n"); printf(" adaptive mode.\n\n"); printf("[-FL num] : Set (initial) frame length in msec. Valid length are \n"); printf(" 30 and 60 msec.\n\n"); printf("[-FIXED_FL] : Frame length will be fixed to initial value.\n\n"); printf("[-MAX num] : Set the limit for the payload size of iSAC in bytes. \n"); printf(" Minimum 100 maximum 400.\n\n"); printf("[-MAXRATE num] : Set the maxrate for iSAC in bits per second. \n"); printf(" Minimum 32000, maximum 53400.\n\n"); printf("[-F num] : if -F option is specified, the test function\n"); printf(" will run the iSAC API fault scenario specified by the\n"); printf(" supplied number.\n"); printf(" F 1 - Call encoder prior to init encoder call\n"); printf(" F 2 - Call decoder prior to init decoder call\n"); printf(" F 3 - Call decoder prior to encoder call\n"); printf(" F 4 - Call decoder with a too short coded sequence\n"); printf(" F 5 - Call decoder with a too long coded sequence\n"); printf(" F 6 - Call decoder with random bit stream\n"); printf(" F 7 - Call init encoder/decoder at random during a call\n"); printf(" F 8 - Call encoder/decoder without having allocated memory \n"); printf(" for encoder/decoder instance\n"); printf(" F 9 - Call decodeB without calling decodeA\n"); printf(" F 10 - Call decodeB with garbage data\n"); printf("[-PL num] : if -PL option is specified \n"); printf("[-T rate file] : test trans-coding with target bottleneck 'rate' bits/sec\n"); printf(" the output file is written to 'file'\n"); printf("[-LOOP num] : number of times to repeat coding the input file for stress testing\n"); //printf("[-CE num] : Test of APIs used by Conference Engine.\n"); //printf(" CE 1 - getNewBitstream, getBWE \n"); //printf(" (CE 2 - RESERVED for transcoding)\n"); //printf(" CE 3 - getSendBWE, setSendBWE. \n\n"); //printf("-L filename : write the logging info into file (appending)\n"); printf("infile : Normal speech input file\n\n"); printf("outfile : Speech output file\n\n"); exit(0); } /* Print version number */ printf("-------------------------------------------------\n"); WebRtcIsac_version(version_number); printf("iSAC version %s \n\n", version_number); /* Loop over all command line arguments */ CodingMode = 0; testNum = 0; useAssign = 0; //logFile = NULL; char transCodingFileName[500]; int16_t totFileLoop = 0; int16_t numFileLoop = 0; for (i = 1; i < argc-2;i++) { if(!strcmp("-LOOP", argv[i])) { i++; totFileLoop = (int16_t)atol(argv[i]); if(totFileLoop <= 0) { fprintf(stderr, "Invalid number of runs for the given input file, %d.", totFileLoop); exit(0); } } if(!strcmp("-T", argv[i])) { doTransCoding = true; i++; rateTransCoding = atoi(argv[i]); i++; strcpy(transCodingFileName, argv[i]); } /*Should we use assign API*/ if(!strcmp("-assign", argv[i])) { useAssign = 1; } /* Set Sampling Rate */ if(!strcmp("-FS", argv[i])) { i++; sampFreqKHz = atoi(argv[i]); } /* Instantaneous mode */ if(!strcmp ("-I", argv[i])) { printf("Instantaneous BottleNeck\n"); CodingMode = 1; } /* Set (initial) bottleneck value */ if(!strcmp ("-INITRATE", argv[i])) { rateBPS = atoi(argv[i + 1]); setControlBWE = 1; if((rateBPS < 10000) || (rateBPS > 32000)) { printf("\n%d is not a initial rate. Valid values are in the range 10000 to 32000.\n", rateBPS); exit(0); } printf("New initial rate: %d\n", rateBPS); i++; } /* Set (initial) framelength */ if(!strcmp ("-FL", argv[i])) { framesize = atoi(argv[i + 1]); if((framesize != 30) && (framesize != 60)) { printf("\n%d is not a valid frame length. Valid length are 30 and 60 msec.\n", framesize); exit(0); } setControlBWE = 1; printf("Frame Length: %d\n", framesize); i++; } /* Fixed frame length */ if(!strcmp ("-FIXED_FL", argv[i])) { fixedFL = 1; setControlBWE = 1; printf("Fixed Frame Length\n"); } /* Set maximum allowed payload size in bytes */ if(!strcmp ("-MAX", argv[i])) { payloadSize = atoi(argv[i + 1]); printf("Maximum Payload Size: %d\n", payloadSize); i++; } /* Set maximum rate in bytes */ if(!strcmp ("-MAXRATE", argv[i])) { payloadRate = atoi(argv[i + 1]); printf("Maximum Rate in kbps: %d\n", payloadRate); i++; } /* Test of fault scenarious */ if(!strcmp ("-F", argv[i])) { testNum = atoi(argv[i + 1]); printf("Fault test: %d\n", testNum); if(testNum < 1 || testNum > 10) { printf("\n%d is not a valid Fault Scenario number. Valid Fault Scenarios are numbered 1-10.\n", testNum); exit(0); } i++; } /* Packet loss test */ if(!strcmp ("-PL", argv[i])) { if( isdigit( *argv[i+1] ) ) { packetLossPercent = atoi( argv[i+1] ); if( (packetLossPercent < 0) | (packetLossPercent > 100) ) { printf( "\nInvalid packet loss perentage \n" ); exit( 0 ); } if( packetLossPercent > 0 ) { printf( "Simulating %d %% of independent packet loss\n", packetLossPercent ); } else { printf( "\nNo Packet Loss Is Simulated \n" ); } } else { plFile = fopen( argv[i+1], "rb" ); if( plFile == NULL ) { printf( "\n couldn't open the frameloss file: %s\n", argv[i+1] ); exit( 0 ); } printf( "Simulating packet loss through the given channel file: %s\n", argv[i+1] ); } i++; } /* Random packetlosses */ if(!strcmp ("-rnd", argv[i])) { srand((unsigned int)time(NULL) ); printf( "Random pattern in lossed packets \n" ); } /* Use gns file */ if(!strcmp ("-G", argv[i])) { sscanf(argv[i + 1], "%s", gns_file); fp_gns = fopen(gns_file, "rb"); if(fp_gns == NULL) { printf("Cannot read file %s.\n", gns_file); exit(0); } i++; } // make it with '-B' /* Get Bottleneck value */ if(!strcmp("-B", argv[i])) { i++; bottleneck = atoi(argv[i]); if(bottleneck == 0) { sscanf(argv[i], "%s", bottleneck_file); f_bn = fopen(bottleneck_file, "rb"); if(f_bn == NULL) { printf("Error No value provided for BottleNeck and cannot read file %s.\n", bottleneck_file); exit(0); } else { printf("reading bottleneck rates from file %s\n\n",bottleneck_file); if(fscanf(f_bn, "%d", &bottleneck) == EOF) { /* Set pointer to beginning of file */ fseek(f_bn, 0L, SEEK_SET); if (fscanf(f_bn, "%d", &bottleneck) == EOF) { exit(0); } } /* Bottleneck is a cosine function * Matlab code for writing the bottleneck file: * BottleNeck_10ms = 20e3 + 10e3 * cos((0:5999)/5999*2*pi); * fid = fopen('bottleneck.txt', 'wb'); * fprintf(fid, '%d\n', BottleNeck_10ms); fclose(fid); */ } } else { printf("\nfixed bottleneck rate of %d bits/s\n\n", bottleneck); } } /* Run Conference Engine APIs */ // Do not test it in the first release // // if(!strcmp ("-CE", argv[i])) // { // testCE = atoi(argv[i + 1]); // if(testCE==1) // { // i++; // scale = (float)atof( argv[i+1] ); // } // else if(testCE == 2) // { // printf("\nCE-test 2 (transcoding) not implemented.\n"); // exit(0); // } // else if(testCE < 1 || testCE > 3) // { // printf("\n%d is not a valid CE-test number. Valid CE tests are 1-3.\n", testCE); // exit(0); // } // printf("CE-test number: %d\n", testCE); // i++; // } } if(CodingMode == 0) { printf("\nAdaptive BottleNeck\n"); } switch(sampFreqKHz) { case 16: { printf("iSAC Wideband.\n"); samplesIn10Ms = FRAMESAMPLES_10ms; break; } case 32: { printf("iSAC Supper-Wideband.\n"); samplesIn10Ms = SWBFRAMESAMPLES_10ms; break; } default: printf("Unsupported sampling frequency %d kHz", sampFreqKHz); exit(0); } /* Get Input and Output files */ sscanf(argv[argc-2], "%s", inname); sscanf(argv[argc-1], "%s", outname); printf("\nInput file: %s\n", inname); printf("Output file: %s\n\n", outname); if((inp = fopen(inname,"rb")) == NULL) { printf(" Error iSAC Cannot read file %s.\n", inname); cout << flush; exit(1); } if((outp = fopen(outname,"wb")) == NULL) { printf(" Error iSAC Cannot write file %s.\n", outname); cout << flush; getc(stdin); exit(1); } if(VADusage) { if((vadp = fopen(vadfile,"rb")) == NULL) { printf(" Error iSAC Cannot read file %s.\n", vadfile); cout << flush; exit(1); } } if((bandwidthp = fopen("bwe.pcm","wb")) == NULL) { printf(" Error iSAC Cannot read file %s.\n", "bwe.pcm"); cout << flush; exit(1); } starttime = clock()/(double)CLOCKS_PER_SEC; /* Runtime statistics */ /* Initialize the ISAC and BN structs */ if(testNum != 8) { if(!useAssign) { err =WebRtcIsac_Create(&ISAC_main_inst); WebRtcIsac_SetEncSampRate(ISAC_main_inst, sampFreqKHz * 1000); WebRtcIsac_SetDecSampRate(ISAC_main_inst, sampFreqKHz >= 32 ? 32000 : 16000); } else { /* Test the Assign functions */ int sss; void *ppp; err = WebRtcIsac_AssignSize(&sss); ppp = malloc(sss); err = WebRtcIsac_Assign(&ISAC_main_inst, ppp); WebRtcIsac_SetEncSampRate(ISAC_main_inst, sampFreqKHz * 1000); WebRtcIsac_SetDecSampRate(ISAC_main_inst, sampFreqKHz >= 32 ? 32000 : 16000); } /* Error check */ if(err < 0) { printf("\n\n Error in create.\n\n"); cout << flush; exit(EXIT_FAILURE); } } BN_data.arrival_time = 0; BN_data.sample_count = 0; BN_data.rtp_number = 0; /* Initialize encoder and decoder */ framecnt= 0; endfile = 0; if(doTransCoding) { WebRtcIsac_Create(&decoderTransCoding); WebRtcIsac_SetEncSampRate(decoderTransCoding, sampFreqKHz * 1000); WebRtcIsac_SetDecSampRate(decoderTransCoding, sampFreqKHz >= 32 ? 32000 : 16000); WebRtcIsac_DecoderInit(decoderTransCoding); transCodingFile = fopen(transCodingFileName, "wb"); if(transCodingFile == NULL) { printf("Could not open %s to output trans-coding.\n", transCodingFileName); exit(0); } strcat(transCodingFileName, ".bit"); transcodingBitstream = fopen(transCodingFileName, "wb"); if(transcodingBitstream == NULL) { printf("Could not open %s to write the bit-stream of transcoder.\n", transCodingFileName); exit(0); } } if(testNum != 1) { if(WebRtcIsac_EncoderInit(ISAC_main_inst, CodingMode) < 0) { printf("Error could not initialize the encoder \n"); cout << flush; return 0; } } if(testNum != 2) { if(WebRtcIsac_DecoderInit(ISAC_main_inst) < 0) { printf("Error could not initialize the decoder \n"); cout << flush; return 0; } } if(CodingMode == 1) { err = WebRtcIsac_Control(ISAC_main_inst, bottleneck, framesize); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in initialization (control): %d.\n\n", errtype); cout << flush; if(testNum == 0) { exit(EXIT_FAILURE); } } } if((setControlBWE) && (CodingMode == 0)) { err = WebRtcIsac_ControlBwe(ISAC_main_inst, rateBPS, framesize, fixedFL); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in Control BWE: %d.\n\n", errtype); cout << flush; exit(EXIT_FAILURE); } } if(payloadSize != 0) { err = WebRtcIsac_SetMaxPayloadSize(ISAC_main_inst, payloadSize); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in SetMaxPayloadSize: %d.\n\n", errtype); cout << flush; exit(EXIT_FAILURE); } } if(payloadRate != 0) { err = WebRtcIsac_SetMaxRate(ISAC_main_inst, payloadRate); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in SetMaxRateInBytes: %d.\n\n", errtype); cout << flush; exit(EXIT_FAILURE); } } *speechType = 1; cout << "\n" << flush; length_file = 0; int16_t bnIdxTC = 0; int16_t jitterInfoTC = 0; while (endfile == 0) { /* Call init functions at random, fault test number 7 */ if(testNum == 7 && (rand()%2 == 0)) { err = WebRtcIsac_EncoderInit(ISAC_main_inst, CodingMode); /* Error check */ if(err < 0) { errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in encoderinit: %d.\n\n", errtype); cout << flush; } err = WebRtcIsac_DecoderInit(ISAC_main_inst); /* Error check */ if(err < 0) { errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\n Error in decoderinit: %d.\n\n", errtype); cout << flush; } } cur_framesmpls = 0; while (1) { /* Read 10 ms speech block */ endfile = readframe(shortdata, inp, samplesIn10Ms); if(endfile) { numFileLoop++; if(numFileLoop < totFileLoop) { rewind(inp); framecnt = 0; fprintf(stderr, "\n"); endfile = readframe(shortdata, inp, samplesIn10Ms); } } if(testNum == 7) { srand((unsigned int)time(NULL)); } /* iSAC encoding */ if(!(testNum == 3 && framecnt == 0)) { stream_len = WebRtcIsac_Encode(ISAC_main_inst, shortdata, (uint8_t*)streamdata); if((payloadSize != 0) && (stream_len > payloadSize)) { if(testNum == 0) { printf("\n\n"); } printf("\nError: Streamsize out of range %d\n", stream_len - payloadSize); cout << flush; } WebRtcIsac_GetUplinkBw(ISAC_main_inst, &sendBN); if(stream_len>0) { if(doTransCoding) { int16_t indexStream; uint8_t auxUW8; /************************* Main Transcoding stream *******************************/ WebRtcIsac_GetDownLinkBwIndex(ISAC_main_inst, &bnIdxTC, &jitterInfoTC); streamLenTransCoding = WebRtcIsac_GetNewBitStream( ISAC_main_inst, bnIdxTC, jitterInfoTC, rateTransCoding, streamDataTransCoding, false); if(streamLenTransCoding < 0) { fprintf(stderr, "Error in trans-coding\n"); exit(0); } auxUW8 = (uint8_t)(((streamLenTransCoding & 0xFF00) >> 8) & 0x00FF); if (fwrite(&auxUW8, sizeof(uint8_t), 1, transcodingBitstream) != 1) { return -1; } auxUW8 = (uint8_t)(streamLenTransCoding & 0x00FF); if (fwrite(&auxUW8, sizeof(uint8_t), 1, transcodingBitstream) != 1) { return -1; } if (fwrite(streamDataTransCoding, sizeof(uint8_t), streamLenTransCoding, transcodingBitstream) != static_cast<size_t>(streamLenTransCoding)) { return -1; } WebRtcIsac_ReadBwIndex(streamDataTransCoding, &indexStream); if (indexStream != bnIdxTC) { fprintf(stderr, "Error in inserting Bandwidth index into transcoding stream.\n"); exit(0); } numTransCodingBytes += streamLenTransCoding; } } } else { break; } if(stream_len < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); printf("\n\nError in encoder: %d.\n\n", errtype); cout << flush; } cur_framesmpls += samplesIn10Ms; /* exit encoder loop if the encoder returned a bitstream */ if(stream_len != 0) break; } /* read next bottleneck rate */ if(f_bn != NULL) { if(fscanf(f_bn, "%d", &bottleneck) == EOF) { /* Set pointer to beginning of file */ fseek(f_bn, 0L, SEEK_SET); if (fscanf(f_bn, "%d", &bottleneck) == EOF) { exit(0); } } if(CodingMode == 1) { WebRtcIsac_Control(ISAC_main_inst, bottleneck, framesize); } } length_file += cur_framesmpls; if(cur_framesmpls == (3 * samplesIn10Ms)) { maxStreamLen30 = (stream_len > maxStreamLen30)? stream_len:maxStreamLen30; } else { maxStreamLen60 = (stream_len > maxStreamLen60)? stream_len:maxStreamLen60; } if(!lostFrame) { lostFrame = ((rand()%100) < packetLossPercent); } else { lostFrame = 0; } // RED. if(lostFrame) { stream_len = WebRtcIsac_GetRedPayload( ISAC_main_inst, reinterpret_cast<uint8_t*>(streamdata)); if(doTransCoding) { streamLenTransCoding = WebRtcIsac_GetNewBitStream( ISAC_main_inst, bnIdxTC, jitterInfoTC, rateTransCoding, streamDataTransCoding, true); if(streamLenTransCoding < 0) { fprintf(stderr, "Error in RED trans-coding\n"); exit(0); } } } /* make coded sequence to short be inreasing */ /* the length the decoder expects */ if(testNum == 4) { stream_len += 10; } /* make coded sequence to long be decreasing */ /* the length the decoder expects */ if(testNum == 5) { stream_len -= 10; } if(testNum == 6) { srand((unsigned int)time(NULL)); for(i = 0; i < stream_len; i++) { streamdata[i] = rand(); } } if(VADusage){ readframe(vaddata, vadp, samplesIn10Ms*3); } /* simulate packet handling through NetEq and the modem */ if(!(testNum == 3 && framecnt == 0)) { get_arrival_time(cur_framesmpls, stream_len, bottleneck, &BN_data, sampFreqKHz*1000, sampFreqKHz*1000); } if(VADusage && (framecnt>10 && vaddata[0]==0)) { BN_data.rtp_number--; } else { /* Error test number 10, garbage data */ if(testNum == 10) { /* Test to run decoder with garbage data */ for(i = 0; i < stream_len; i++) { streamdata[i] = (short) (streamdata[i]) + (short) rand(); } } if(testNum != 9) { err = WebRtcIsac_UpdateBwEstimate( ISAC_main_inst, reinterpret_cast<const uint8_t*>(streamdata), stream_len, BN_data.rtp_number, BN_data.sample_count, BN_data.arrival_time); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); if(testNum == 0) { printf("\n\n"); } printf("Error: in decoder: %d.", errtype); cout << flush; if(testNum == 0) { printf("\n\n"); } } } /* Call getFramelen, only used here for function test */ err = WebRtcIsac_ReadFrameLen( ISAC_main_inst, reinterpret_cast<const uint8_t*>(streamdata), &FL); if(err < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); if(testNum == 0) { printf("\n\n"); } printf(" Error: in getFrameLen %d.", errtype); cout << flush; if(testNum == 0) { printf("\n\n"); } } // iSAC decoding if(lostFrame) { declen = WebRtcIsac_DecodeRcu( ISAC_main_inst, reinterpret_cast<const uint8_t*>(streamdata), stream_len, decoded, speechType); if(doTransCoding) { declenTC = WebRtcIsac_DecodeRcu( decoderTransCoding, streamDataTransCoding, streamLenTransCoding, decodedTC, speechType); } } else { declen = WebRtcIsac_Decode( ISAC_main_inst, reinterpret_cast<const uint8_t*>(streamdata), stream_len, decoded, speechType); if(doTransCoding) { declenTC = WebRtcIsac_Decode( decoderTransCoding, streamDataTransCoding, streamLenTransCoding, decodedTC, speechType); } } if(declen < 0) { /* exit if returned with error */ errtype=WebRtcIsac_GetErrorCode(ISAC_main_inst); if(testNum == 0) { printf("\n\n"); } printf(" Error: in decoder %d.", errtype); cout << flush; if(testNum == 0) { printf("\n\n"); } } if(declenTC < 0) { if(testNum == 0) { printf("\n\n"); } printf(" Error: in decoding the transcoded stream"); cout << flush; if(testNum == 0) { printf("\n\n"); } } } /* Write decoded speech frame to file */ if((declen > 0) && (numFileLoop == 0)) { if (fwrite(decoded, sizeof(int16_t), declen, outp) != static_cast<size_t>(declen)) { return -1; } } if((declenTC > 0) && (numFileLoop == 0)) { if (fwrite(decodedTC, sizeof(int16_t), declen, transCodingFile) != static_cast<size_t>(declen)) { return -1; } } fprintf(stderr, "\rframe = %5d ", framecnt); fflush(stderr); framecnt++; /* Error test number 10, garbage data */ //if(testNum == 10) //{ // /* Test to run decoder with garbage data */ // if( (seedfile = fopen(SEED_FILE, "a+t") ) == NULL ) // { // fprintf(stderr, "Error: Could not open file %s\n", SEED_FILE); // } // else // { // fprintf(seedfile, "ok\n\n"); // fclose(seedfile); // } //} /* Error test number 10, garbage data */ //if(testNum == 10) //{ // /* Test to run decoder with garbage data */ // for ( i = 0; i < stream_len; i++) // { // streamdata[i] = (short) (streamdata[i] + (short) rand()); // } //} totalsmpls += declen; totalbits += 8 * stream_len; #ifdef _DEBUG kbps = ((double) sampFreqKHz * 1000.) / ((double) cur_framesmpls) * 8.0 * stream_len / 1000.0;// kbits/s fy = fopen("bit_rate.dat", "a"); fprintf(fy, "Frame %i = %0.14f\n", framecnt, kbps); fclose(fy); #endif /* _DEBUG */ } printf("\n"); printf("total bits = %d bits\n", totalbits); printf("measured average bitrate = %0.3f kbits/s\n", (double)totalbits *(sampFreqKHz) / totalsmpls); if(doTransCoding) { printf("Transcoding average bit-rate = %0.3f kbps\n", (double)numTransCodingBytes * 8.0 *(sampFreqKHz) / totalsmpls); fclose(transCodingFile); } printf("\n"); /* Runtime statistics */ runtime = (double)(clock()/(double)CLOCKS_PER_SEC-starttime); length_file = length_file /(sampFreqKHz * 1000.); printf("\n\nLength of speech file: %.1f s\n", length_file); printf("Time to run iSAC: %.2f s (%.2f %% of realtime)\n\n", runtime, (100*runtime/length_file)); if(maxStreamLen30 != 0) { printf("Maximum payload size 30ms Frames %d bytes (%0.3f kbps)\n", maxStreamLen30, maxStreamLen30 * 8 / 30.); } if(maxStreamLen60 != 0) { printf("Maximum payload size 60ms Frames %d bytes (%0.3f kbps)\n", maxStreamLen60, maxStreamLen60 * 8 / 60.); } //fprintf(stderr, "\n"); fprintf(stderr, " %.1f s", length_file); fprintf(stderr, " %0.1f kbps", (double)totalbits *(sampFreqKHz) / totalsmpls); if(maxStreamLen30 != 0) { fprintf(stderr, " plmax-30ms %d bytes (%0.0f kbps)", maxStreamLen30, maxStreamLen30 * 8 / 30.); } if(maxStreamLen60 != 0) { fprintf(stderr, " plmax-60ms %d bytes (%0.0f kbps)", maxStreamLen60, maxStreamLen60 * 8 / 60.); } if(doTransCoding) { fprintf(stderr, " transcoding rate %.0f kbps", (double)numTransCodingBytes * 8.0 *(sampFreqKHz) / totalsmpls); } fclose(inp); fclose(outp); WebRtcIsac_Free(ISAC_main_inst); exit(0); }
{ "pile_set_name": "Github" }
#ifndef IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H #define IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H #include "IndexIVF_HNSW.h" namespace ivfhnsw{ //======================================= // IVF_HNSW + Grouping( + Pruning) index //======================================= struct IndexIVF_HNSW_Grouping: IndexIVF_HNSW { size_t nsubc; ///< Number of sub-centroids per group bool do_pruning; ///< Turn on/off pruning std::vector<std::vector<idx_t> > nn_centroid_idxs; ///< Indices of the <nsubc> nearest centroids for each centroid std::vector<std::vector<idx_t> > subgroup_sizes; ///< Sizes of sub-groups for each group std::vector<float> alphas; ///< Coefficients that determine the location of sub-centroids public: IndexIVF_HNSW_Grouping(size_t dim, size_t ncentroids, size_t bytes_per_code, size_t nbits_per_idx, size_t nsubcentroids); /** Add <group_size> vectors of dimension <d> from the <group_idx>-th group to the index. * * @param group_idx index of the group * @param group_size number of base vectors in the group * @param x base vectors to add (size: group_size * d) * @param ids ids to store for the vectors (size: groups_size) */ void add_group(size_t group_idx, size_t group_size, const float *x, const idx_t *ids); void search(size_t k, const float *x, float *distances, long *labels); void write(const char *path_index); void read(const char *path_index); void train_pq(size_t n, const float *x); /// Compute distances between the group centroid and its <subc> nearest neighbors in the HNSW graph void compute_inter_centroid_dists(); protected: /// Distances to the coarse centroids. Used for distance computation between a query and base points std::vector<float> query_centroid_dists; /// Distances between coarse centroids and their sub-centroids std::vector<std::vector<float>> inter_centroid_dists; private: void compute_residuals(size_t n, const float *x, float *residuals, const float *subcentroids, const idx_t *keys); void reconstruct(size_t n, float *x, const float *decoded_residuals, const float *subcentroids, const idx_t *keys); void compute_subcentroid_idxs(idx_t *subcentroid_idxs, const float *subcentroids, const float *points, size_t group_size); float compute_alpha(const float *centroid_vectors, const float *points, const float *centroid, const float *centroid_vector_norms_L2sqr, size_t group_size); }; } #endif //IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H
{ "pile_set_name": "Github" }
<?php /* * 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 software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ namespace Doctrine\ORM\Mapping; /** * @Annotation * @Target("CLASS") */ final class Table implements Annotation { /** @var string */ public $name; /** @var string */ public $schema; /** @var array<\Doctrine\ORM\Mapping\Index> */ public $indexes; /** @var array<\Doctrine\ORM\Mapping\UniqueConstraint> */ public $uniqueConstraints; /** @var array */ public $options = array(); }
{ "pile_set_name": "Github" }
import { css } from 'styled-components' export default ({ colors, ns }) => css` .dash-grid { margin: 0 -8px; & > div { margin: 0 0 15px; padding: 0; & > div { margin: 0px 8px; padding-bottom: 15px; background-color: ${colors.layoutHeaderBg}; } } .${ns}Spinner { background-repeat: no-repeat; width: 25px; height: 25px; opacity: 0.5; } } .target-card { .card-info { position: relative; padding: 0px 15px 0; height: 75px; h6 { font-size: 14px; margin: 0; } p { font-size: 24px; } } .tip-icon { position: absolute; right: 15px; top: 0; height: auto; padding: 0; } .card-chart { width: 100%; height: 100px; } } .tabs-card { margin-bottom: 15px; padding: 5px 15px 0px; background-color: ${colors.layoutHeaderBg}; .tab-filter { margin: 15px 0 30px; } .img-carousel { .image { background-size: cover !important; border-radius: 2px; } } } /** 调整主题 */ .${ns}DatePicker { &-toggler::before { line-height: 1.5; } } .${ns}Form { &-item button { background-color: transparent; } &-control { & > div { background-color: transparent; } } } .bar-table { border-color: ${colors.border}; .${ns}Table-contentWrap { background-color: transparent; } .${ns}Table-table { height: 380px; min-width: 300px; thead, tbody { tr { table-layout: fixed; display: table; width: 100%; box-sizing: content-box; } } tbody { /* background-color: ${colors.layoutHeaderBg}; */ display: block; overflow-y: auto; height: 100%; } th { border-right: 0 !important; } tr { border-top: 0; background-color: transparent !important; } } } `
{ "pile_set_name": "Github" }
" File: snipMate.vim " Description: snipMate.vim implements some of TextMate's snippets features in " Vim. A snippet is a piece of often-typed text that you can " insert into your document using a trigger word followed by a "<tab>". " " For more help see snipMate.txt; you can do this by using: " :helptags ~/.vim/doc " :h SnipMate if exists('loaded_snips') || &cp || version < 700 finish endif let loaded_snips = 1 " Save and reset 'cpo' let s:save_cpo = &cpo set cpo&vim try call funcref#Function('') catch /.*/ echoe "you're missing vim-addon-mw-utils. See install instructions at ".expand('<sfile>:h:h').'/README.md' endtry if (!exists('g:snipMateSources')) let g:snipMateSources = {} " Default source: get snippets based on runtimepath let g:snipMateSources['default'] = funcref#Function('snipMate#DefaultPool') endif augroup SnipMateDetect au BufRead,BufNewFile *.snippet,*.snippets setlocal filetype=snippets au FileType snippets if expand('<afile>:e') =~# 'snippet$' \ | setlocal syntax=snippet \ | else \ | setlocal syntax=snippets \ | endif augroup END inoremap <silent> <Plug>snipMateNextOrTrigger <C-R>=snipMate#TriggerSnippet()<CR> snoremap <silent> <Plug>snipMateNextOrTrigger <Esc>a<C-R>=snipMate#TriggerSnippet()<CR> inoremap <silent> <Plug>snipMateTrigger <C-R>=snipMate#TriggerSnippet(1)<CR> inoremap <silent> <Plug>snipMateBack <C-R>=snipMate#BackwardsSnippet()<CR> snoremap <silent> <Plug>snipMateBack <Esc>a<C-R>=snipMate#BackwardsSnippet()<CR> inoremap <silent> <Plug>snipMateShow <C-R>=snipMate#ShowAvailableSnips()<CR> xnoremap <silent> <Plug>snipMateVisual :<C-U>call <SID>grab_visual()<CR>gv"_c " config variables if !exists('g:snips_author') let g:snips_author = 'Me' endif if !exists('g:snipMate') let g:snipMate = {} endif " SnipMate inserts this string when no snippet expansion can be done let g:snipMate['no_match_completion_feedkeys_chars'] = \ get(g:snipMate, 'no_match_completion_feedkeys_chars', "\t") " Add default scope aliases, without overriding user settings let g:snipMate.scope_aliases = get(g:snipMate, 'scope_aliases', {}) if exists('g:snipMate_no_default_aliases') echom 'The g:snipMate_no_default_aliases option has been renamed.' \ 'See :h snipMate-options.' endif if (!exists('g:snipMate_no_default_aliases') || !g:snipMate_no_default_aliases) \ && (!exists('g:snipMate.no_default_aliases') \ || !g:snipMate.no_default_aliases) let g:snipMate.scope_aliases.objc = \ get(g:snipMate.scope_aliases, 'objc', 'c') let g:snipMate.scope_aliases.cpp = \ get(g:snipMate.scope_aliases, 'cpp', 'c') let g:snipMate.scope_aliases.cu = \ get(g:snipMate.scope_aliases, 'cu', 'c') let g:snipMate.scope_aliases.xhtml = \ get(g:snipMate.scope_aliases, 'xhtml', 'html') let g:snipMate.scope_aliases.html = \ get(g:snipMate.scope_aliases, 'html', 'javascript') let g:snipMate.scope_aliases.php = \ get(g:snipMate.scope_aliases, 'php', 'php,html,javascript') let g:snipMate.scope_aliases.ur = \ get(g:snipMate.scope_aliases, 'ur', 'html,javascript') let g:snipMate.scope_aliases.mxml = \ get(g:snipMate.scope_aliases, 'mxml', 'actionscript') let g:snipMate.scope_aliases.eruby = \ get(g:snipMate.scope_aliases, 'eruby', 'eruby-rails,html') let g:snipMate.scope_aliases.scss = \ get(g:snipMate.scope_aliases, 'scss', 'css') let g:snipMate.scope_aliases.less = \ get(g:snipMate.scope_aliases, 'less', 'css') endif let g:snipMate['get_snippets'] = get(g:snipMate, 'get_snippets', funcref#Function("snipMate#GetSnippets")) " List of paths where snippets/ dirs are located if exists('g:snipMate.snippet_dirs') && type(g:snipMate['snippet_dirs']) != type([]) echohl WarningMsg echom "g:snipMate['snippet_dirs'] must be a List" echohl None endif " _ is default scope added always " " &ft honors multiple filetypes and syntax such as in set ft=html.javascript syntax=FOO let g:snipMate['get_scopes'] = get(g:snipMate, 'get_scopes', funcref#Function('return split(&ft,"\\.")+[&syntax, "_"]')) " Modified from Luc Hermitte's function on StackOverflow " <http://stackoverflow.com/a/1534347> function! s:grab_visual() abort let a_save = @a try normal! gv"ay let b:snipmate_visual = @a finally let @a = a_save endtry endfunction " TODO: Allow specifying an arbitrary snippets file function! s:load_scopes(bang, ...) abort let gb = a:bang ? g: : b: let gb.snipMate = get(gb, 'snipMate', {}) let gb.snipMate.scope_aliases = get(gb.snipMate, 'scope_aliases', {}) let gb.snipMate.scope_aliases['_'] = join(split(get(gb.snipMate.scope_aliases, '_', ''), ',') + a:000, ',') endfunction command! -bang -bar -nargs=+ SnipMateLoadScope \ call s:load_scopes(<bang>0, <f-args>) " Edit snippet files command! SnipMateOpenSnippetFiles call snipMate#OpenSnippetFiles() " restore 'cpo' let &cpo = s:save_cpo " vim:noet:sw=4:ts=4:ft=vim
{ "pile_set_name": "Github" }
obj-m:=rbtree.o CU_PATH:=$(shell pwd) LK:=$(shell uname -r) LK_PATH:=/usr/src/linux-headers-$(LK) all: make -C $(LK_PATH) M=$(CU_PATH) modules clean: make -C $(LK_PATH) M=$(CU_PATH) clean
{ "pile_set_name": "Github" }
# Esperanto translation for slingshot # Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 # This file is distributed under the same license as the slingshot package. # FIRST AUTHOR <EMAIL@ADDRESS>, 2011. # msgid "" msgstr "" "Project-Id-Version: slingshot\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2015-06-03 20:59+0200\n" "PO-Revision-Date: 2015-03-24 07:54+0000\n" "Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n" "Language-Team: Esperanto <eo@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2015-11-11 05:05+0000\n" "X-Generator: Launchpad (build 17843)\n" #: ../src/Widgets/SearchView.vala:160 msgid "Other" msgstr "Aliaj" #: ../src/Widgets/SearchView.vala:163 msgid "Text" msgstr "Teksto" #: ../src/Widgets/SearchView.vala:166 msgid "Applications" msgstr "Aplikaĵoj" #: ../src/Widgets/SearchView.vala:169 msgid "Files" msgstr "Dosieroj" #: ../src/Widgets/SearchView.vala:172 msgid "Actions" msgstr "Agoj" #: ../src/Widgets/SearchView.vala:175 msgid "Search" msgstr "Serĉi" #: ../src/Widgets/SearchView.vala:178 msgid "Contacts" msgstr "Kontaktoj" #: ../src/Widgets/SearchView.vala:181 msgid "Internet" msgstr "Interreto" #: ../src/Widgets/SearchView.vala:184 msgid "Settings" msgstr "" #: ../src/Widgets/AppEntry.vala:195 msgid "Remove from _Dock" msgstr "" #: ../src/Widgets/AppEntry.vala:197 msgid "Add to _Dock" msgstr "" #: ../src/Widgets/CategoryView.vala:27 msgid "All Applications" msgstr "Ĉiuj aplikaĵoj" #: ../src/Widgets/CategoryView.vala:28 msgid "Create a new Filter" msgstr "Krei novan filtrilon" #: ../src/Backend/App.vala:108 msgid "Run this command…" msgstr "" #: ../src/SlingshotView.vala:169 msgid "View as Grid" msgstr "" #: ../src/SlingshotView.vala:173 msgid "View by Category" msgstr "" #: ../src/SlingshotView.vala:182 msgid "Search Apps" msgstr "Serĉi aplikaĵoj" #: ../lib/synapse-plugins/system-managment.vala:103 msgid "Suspend" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:104 msgid "Put your computer into suspend mode" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:203 msgid "Hibernate" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:204 msgid "Put your computer into hibernation mode" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:302 msgid "Shut Down" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:303 msgid "Turn your computer off" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:386 msgid "Restart" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:387 msgid "Restart your computer" msgstr "" #: ../lib/synapse-plugins/system-managment.vala:471 msgid "Suspend, hibernate, restart or shutdown your computer." msgstr "" #: ../lib/synapse-plugins/system-managment.vala:476 msgid "ConsoleKit wasn't found" msgstr "" #: ../lib/synapse-plugins/desktop-file-plugin.vala:94 msgid "Search for and run applications on your computer." msgstr "" #: ../lib/synapse-plugins/desktop-file-plugin.vala:283 msgid "Open with %s" msgstr "" #: ../lib/synapse-plugins/desktop-file-plugin.vala:285 msgid "Opens current selection using %s" msgstr "" #: ../lib/synapse-plugins/command-plugin.vala:56 msgid "Execute '%s'" msgstr "" #: ../lib/synapse-plugins/command-plugin.vala:56 msgid "Run command" msgstr "" #: ../lib/synapse-plugins/command-plugin.vala:77 msgid "Find and execute arbitrary commands." msgstr "" #: ../lib/synapse-plugins/calculator-plugin.vala:63 msgid "Calculator" msgstr "Kalkulilo" #: ../lib/synapse-plugins/calculator-plugin.vala:64 msgid "Calculate basic expressions." msgstr "" #: ../lib/synapse-plugins/calculator-plugin.vala:68 msgid "bc is not installed" msgstr "" #: ../lib/synapse-plugins/switchboard-plugin.vala:55 msgid "Open %s settings" msgstr "" #: ../lib/synapse-plugins/switchboard-plugin.vala:71 msgid "Find switchboard plugs and open them." msgstr "" #: ../lib/synapse-core/common-actions.vala:77 msgid "Run" msgstr "" #: ../lib/synapse-core/common-actions.vala:78 msgid "Run an application, action or script" msgstr "" #: ../lib/synapse-core/common-actions.vala:133 msgid "Run in Terminal" msgstr "" #: ../lib/synapse-core/common-actions.vala:134 msgid "Run application or command in terminal" msgstr "" #: ../lib/synapse-core/common-actions.vala:182 msgid "Open" msgstr "" #: ../lib/synapse-core/common-actions.vala:183 msgid "Open using default application" msgstr "" #: ../lib/synapse-core/common-actions.vala:252 msgid "Open folder" msgstr "" #: ../lib/synapse-core/common-actions.vala:253 msgid "Open folder containing this file" msgstr "" #: ../lib/synapse-core/common-actions.vala:293 msgid "Copy to Clipboard" msgstr "" #: ../lib/synapse-core/common-actions.vala:294 msgid "Copy selection to clipboard" msgstr ""
{ "pile_set_name": "Github" }
local combat = {} for i = 1, 20 do combat[i] = Combat() combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) local condition = Condition(CONDITION_ATTRIBUTES) condition:setParameter(CONDITION_PARAM_TICKS, 8000) condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) local area = createCombatArea({ {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} }) combat[i]:setArea(area) combat[i]:addCondition(condition) end function onCastSpell(creature, var) return combat[math.random(1, 20)]:execute(creature, var) end
{ "pile_set_name": "Github" }
# Elastic Elastic is an [Elasticsearch](http://www.elasticsearch.org/) client for the [Go](http://www.golang.org/) programming language. [![Build Status](https://travis-ci.org/olivere/elastic.svg?branch=release-branch.v5)](https://travis-ci.org/olivere/elastic) [![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](http://godoc.org/gopkg.in/olivere/elastic.v5) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/olivere/elastic/master/LICENSE) See the [wiki](https://github.com/olivere/elastic/wiki) for additional information about Elastic. ## Releases **The release branches (e.g. [`release-branch.v5`](https://github.com/olivere/elastic/tree/release-branch.v5)) are actively being worked on and can break at any time. If you want to use stable versions of Elastic, please use the packages released via [gopkg.in](https://gopkg.in).** Here's the version matrix: Elasticsearch version | Elastic version -| Package URL ----------------------|------------------|------------ 5.x | 5.0 | [`gopkg.in/olivere/elastic.v5`](https://gopkg.in/olivere/elastic.v5) ([source](https://github.com/olivere/elastic/tree/release-branch.v5) [doc](http://godoc.org/gopkg.in/olivere/elastic.v5)) 2.x | 3.0 | [`gopkg.in/olivere/elastic.v3`](https://gopkg.in/olivere/elastic.v3) ([source](https://github.com/olivere/elastic/tree/release-branch.v3) [doc](http://godoc.org/gopkg.in/olivere/elastic.v3)) 1.x | 2.0 | [`gopkg.in/olivere/elastic.v2`](https://gopkg.in/olivere/elastic.v2) ([source](https://github.com/olivere/elastic/tree/release-branch.v2) [doc](http://godoc.org/gopkg.in/olivere/elastic.v2)) 0.9-1.3 | 1.0 | [`gopkg.in/olivere/elastic.v1`](https://gopkg.in/olivere/elastic.v1) ([source](https://github.com/olivere/elastic/tree/release-branch.v1) [doc](http://godoc.org/gopkg.in/olivere/elastic.v1)) **Example:** You have installed Elasticsearch 5.0.0 and want to use Elastic. As listed above, you should use Elastic 5.0. So you first install the stable release of Elastic 5.0 from gopkg.in. ```sh $ go get gopkg.in/olivere/elastic.v5 ``` You then import it with this import path: ```go import elastic "gopkg.in/olivere/elastic.v5" ``` ### Elastic 5.0 Elastic 5.0 targets Elasticsearch 5.0.0 and later. Elasticsearch 5.0.0 was [released on 26th October 2016](https://www.elastic.co/blog/elasticsearch-5-0-0-released). Notice that there are will be a lot of [breaking changes in Elasticsearch 5.0](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking-changes-5.0.html) and we used this as an opportunity to [clean up and refactor Elastic](https://github.com/olivere/elastic/blob/release-branch.v5/CHANGELOG-5.0.md) as we did in the transition from Elastic 2.0 (for Elasticsearch 1.x) to Elastic 3.0 (for Elasticsearch 2.x). Furthermore, the jump in version numbers will give us a chance to be in sync with the Elastic Stack. ### Elastic 3.0 Elastic 3.0 targets Elasticsearch 2.x and is published via [`gopkg.in/olivere/elastic.v3`](https://gopkg.in/olivere/elastic.v3). Elastic 3.0 will only get critical bug fixes. You should update to a recent version. ### Elastic 2.0 Elastic 2.0 targets Elasticsearch 1.x and is published via [`gopkg.in/olivere/elastic.v2`](https://gopkg.in/olivere/elastic.v2). Elastic 2.0 will only get critical bug fixes. You should update to a recent version. ### Elastic 1.0 Elastic 1.0 is deprecated. You should really update Elasticsearch and Elastic to a recent version. However, if you cannot update for some reason, don't worry. Version 1.0 is still available. All you need to do is go-get it and change your import path as described above. ## Status We use Elastic in production since 2012. Elastic is stable but the API changes now and then. We strive for API compatibility. However, Elasticsearch sometimes introduces [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes.html) and we sometimes have to adapt. Having said that, there have been no big API changes that required you to rewrite your application big time. More often than not it's renaming APIs and adding/removing features so that Elastic is in sync with Elasticsearch. Elastic has been used in production with the following Elasticsearch versions: 0.90, 1.0-1.7, and 2.0-2.4.1. Furthermore, we use [Travis CI](https://travis-ci.org/) to test Elastic with the most recent versions of Elasticsearch and Go. See the [.travis.yml](https://github.com/olivere/elastic/blob/master/.travis.yml) file for the exact matrix and [Travis](https://travis-ci.org/olivere/elastic) for the results. Elasticsearch has quite a few features. Most of them are implemented by Elastic. I add features and APIs as required. It's straightforward to implement missing pieces. I'm accepting pull requests :-) Having said that, I hope you find the project useful. ## Getting Started The first thing you do is to create a [Client](https://github.com/olivere/elastic/blob/master/client.go). The client connects to Elasticsearch on `http://127.0.0.1:9200` by default. You typically create one client for your app. Here's a complete example of creating a client, creating an index, adding a document, executing a search etc. An example is available [here](https://olivere.github.io/elastic/) Here's a [link to a complete working example for v3](https://gist.github.com/olivere/114347ff9d9cfdca7bdc0ecea8b82263). See the [wiki](https://github.com/olivere/elastic/wiki) for more details. ## API Status ### Document APIs - [x] Index API - [x] Get API - [x] Delete API - [x] Delete By Query API - [x] Update API - [x] Update By Query API - [x] Multi Get API - [x] Bulk API - [x] Reindex API - [x] Term Vectors - [x] Multi termvectors API ### Search APIs - [x] Search - [x] Search Template - [ ] Multi Search Template - [x] Search Shards API - [x] Suggesters - [x] Term Suggester - [x] Phrase Suggester - [x] Completion Suggester - [x] Context Suggester - [x] Multi Search API - [x] Count API - [ ] Search Exists API - [x] Validate API - [x] Explain API - [x] Profile API - [x] Field Capabilities API - [x] Field Stats API ### Aggregations - Metrics Aggregations - [x] Avg - [x] Cardinality - [x] Extended Stats - [x] Geo Bounds - [x] Geo Centroid - [x] Max - [x] Min - [x] Percentiles - [x] Percentile Ranks - [ ] Scripted Metric - [x] Stats - [x] Sum - [x] Top Hits - [x] Value Count - Bucket Aggregations - [x] Adjacency Matrix - [x] Children - [x] Date Histogram - [x] Date Range - [x] Diversified Sampler - [x] Filter - [x] Filters - [x] Geo Distance - [ ] GeoHash Grid - [x] Global - [x] Histogram - [x] IP Range - [x] Missing - [x] Nested - [x] Range - [x] Reverse Nested - [x] Sampler - [x] Significant Terms - [x] Terms - Pipeline Aggregations - [x] Avg Bucket - [x] Derivative - [x] Max Bucket - [x] Min Bucket - [x] Sum Bucket - [x] Stats Bucket - [ ] Extended Stats Bucket - [x] Percentiles Bucket - [x] Moving Average - [x] Cumulative Sum - [x] Bucket Script - [x] Bucket Selector - [x] Serial Differencing - [x] Matrix Aggregations - [x] Matrix Stats - [x] Aggregation Metadata ### Indices APIs - [x] Create Index - [x] Delete Index - [x] Get Index - [x] Indices Exists - [x] Open / Close Index - [x] Shrink Index - [x] Rollover Index - [x] Put Mapping - [x] Get Mapping - [x] Get Field Mapping - [x] Types Exists - [x] Index Aliases - [x] Update Indices Settings - [x] Get Settings - [x] Analyze - [x] Index Templates - [ ] Shadow Replica Indices - [x] Indices Stats - [x] Indices Segments - [ ] Indices Recovery - [ ] Indices Shard Stores - [ ] Clear Cache - [x] Flush - [x] Refresh - [x] Force Merge - [ ] Upgrade ### cat APIs The cat APIs are not implemented as of now. We think they are better suited for operating with Elasticsearch on the command line. - [ ] cat aliases - [ ] cat allocation - [ ] cat count - [ ] cat fielddata - [ ] cat health - [ ] cat indices - [ ] cat master - [ ] cat nodeattrs - [ ] cat nodes - [ ] cat pending tasks - [ ] cat plugins - [ ] cat recovery - [ ] cat repositories - [ ] cat thread pool - [ ] cat shards - [ ] cat segments - [ ] cat snapshots ### Cluster APIs - [x] Cluster Health - [x] Cluster State - [x] Cluster Stats - [ ] Pending Cluster Tasks - [ ] Cluster Reroute - [ ] Cluster Update Settings - [x] Nodes Stats - [x] Nodes Info - [x] Task Management API - [ ] Nodes hot_threads - [ ] Cluster Allocation Explain API ### Query DSL - [x] Match All Query - [x] Inner hits - Full text queries - [x] Match Query - [x] Match Phrase Query - [x] Match Phrase Prefix Query - [x] Multi Match Query - [x] Common Terms Query - [x] Query String Query - [x] Simple Query String Query - Term level queries - [x] Term Query - [x] Terms Query - [x] Range Query - [x] Exists Query - [x] Prefix Query - [x] Wildcard Query - [x] Regexp Query - [x] Fuzzy Query - [x] Type Query - [x] Ids Query - Compound queries - [x] Constant Score Query - [x] Bool Query - [x] Dis Max Query - [x] Function Score Query - [x] Boosting Query - [x] Indices Query - Joining queries - [x] Nested Query - [x] Has Child Query - [x] Has Parent Query - [x] Parent Id Query - Geo queries - [ ] GeoShape Query - [x] Geo Bounding Box Query - [x] Geo Distance Query - [ ] Geo Distance Range Query - [x] Geo Polygon Query - [ ] Geohash Cell Query - Specialized queries - [x] More Like This Query - [x] Template Query - [x] Script Query - [x] Percolate Query - Span queries - [ ] Span Term Query - [ ] Span Multi Term Query - [ ] Span First Query - [ ] Span Near Query - [ ] Span Or Query - [ ] Span Not Query - [ ] Span Containing Query - [ ] Span Within Query - [ ] Span Field Masking Query - [ ] Minimum Should Match - [ ] Multi Term Query Rewrite ### Modules - Snapshot and Restore - [x] Repositories - [ ] Snapshot - [ ] Restore - [ ] Snapshot status - [ ] Monitoring snapshot/restore status - [ ] Stopping currently running snapshot and restore ### Sorting - [x] Sort by score - [x] Sort by field - [x] Sort by geo distance - [x] Sort by script - [x] Sort by doc ### Scrolling Scrolling is supported via a `ScrollService`. It supports an iterator-like interface. The `ClearScroll` API is implemented as well. A pattern for [efficiently scrolling in parallel](https://github.com/olivere/elastic/wiki/ScrollParallel) is described in the [Wiki](https://github.com/olivere/elastic/wiki). ## How to contribute Read [the contribution guidelines](https://github.com/olivere/elastic/blob/master/CONTRIBUTING.md). ## Credits Thanks a lot for the great folks working hard on [Elasticsearch](https://www.elastic.co/products/elasticsearch) and [Go](https://golang.org/). Elastic uses portions of the [uritemplates](https://github.com/jtacoma/uritemplates) library by Joshua Tacoma, [backoff](https://github.com/cenkalti/backoff) by Cenk Altı and [leaktest](https://github.com/fortytw2/leaktest) by Ian Chiles. ## LICENSE MIT-LICENSE. See [LICENSE](http://olivere.mit-license.org/) or the LICENSE file provided in the repository for details.
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <BorlandProject> <Transactions> <Transaction>2013/10/29 18:53:50.000.976,=C:\Users\Administrador\Documents\RAD Studio\Projects\Unit1.pas</Transaction> <Transaction>2013/10/29 18:54:50.000.574,C:\Users\Administrador\Documents\RAD Studio\Projects\VLB_format\uMain.fmx=C:\Users\Administrador\Documents\RAD Studio\Projects\Unit1.fmx</Transaction> <Transaction>2013/10/29 18:54:50.000.574,C:\Users\Administrador\Documents\RAD Studio\Projects\VLB_format\uMain.pas=C:\Users\Administrador\Documents\RAD Studio\Projects\Unit1.pas</Transaction> <Transaction>2013/10/29 18:54:53.000.927,C:\Users\Administrador\Documents\RAD Studio\Projects\VLB_format\VLB_format.dproj=C:\Users\Administrador\Documents\RAD Studio\Projects\Project1.dproj</Transaction> </Transactions> </BorlandProject>
{ "pile_set_name": "Github" }
#ifndef ROSETOLLVM_ROSETOLLVM_HPP #define ROSETOLLVM_ROSETOLLVM_HPP #include <rose.h> #include <rosetollvm/Option.h> #include <rosetollvm/Control.h> #include <rosetollvm/CodeAttributesVisitor.h> #include <rosetollvm/CodeGeneratorVisitor.h> #include "llvm/IR/Module.h" #include <boost/program_options.hpp> class RoseToLLVM { private: Option *options; Control *control; void astVisit(SgProject *); llvm::Module *translate(SgFunctionDeclaration *, bool); public: /** * */ RoseToLLVM(Rose_STL_Container<std::string> &args) : options(new Option(args)), control(new Control(*options)) { } ~RoseToLLVM() { delete options; delete control; } static SgFunctionDeclaration *findEnclosingFunction(SgNode *); static SgFile *findEnclosingFile(SgNode *); static SgProject *findEnclosingProject(SgNode *); llvm::Module *translate(SgForStatement *); llvm::Module *translate(SgFunctionDeclaration *function_decl) { return translate(function_decl, true); } std::vector<llvm::Module *> translate(SgProject *); /// Prints the accepted command line options to standard error. // static void printOptions(); static void addOptionsToDescription( boost::program_options::options_description& desc); static const std::string kTranslateExternals; }; #endif /* ROSETOLLVM_ROSETOLLVM_HPP */
{ "pile_set_name": "Github" }
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LIB_IO_BLOCK_BUILDER_H_ #define TENSORFLOW_LIB_IO_BLOCK_BUILDER_H_ #include <vector> #include <stdint.h> #include "tensorflow/core/lib/core/stringpiece.h" namespace tensorflow { namespace table { struct Options; class BlockBuilder { public: explicit BlockBuilder(const Options* options); // Reset the contents as if the BlockBuilder was just constructed. void Reset(); // REQUIRES: Finish() has not been called since the last call to Reset(). // REQUIRES: key is larger than any previously added key void Add(const StringPiece& key, const StringPiece& value); // Finish building the block and return a slice that refers to the // block contents. The returned slice will remain valid for the // lifetime of this builder or until Reset() is called. StringPiece Finish(); // Returns an estimate of the current (uncompressed) size of the block // we are building. size_t CurrentSizeEstimate() const; // Return true iff no entries have been added since the last Reset() bool empty() const { return buffer_.empty(); } private: const Options* options_; string buffer_; // Destination buffer std::vector<uint32> restarts_; // Restart points int counter_; // Number of entries emitted since restart bool finished_; // Has Finish() been called? string last_key_; // No copying allowed BlockBuilder(const BlockBuilder&); void operator=(const BlockBuilder&); }; } // namespace table } // namespace tensorflow #endif // TENSORFLOW_LIB_IO_BLOCK_BUILDER_H_
{ "pile_set_name": "Github" }
define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var GitignoreHighlightRules = function() { this.$rules = { "start" : [ { token : "comment", regex : /^\s*#.*$/ }, { token : "keyword", // negated patterns regex : /^\s*!.*$/ } ] }; this.normalizeRules(); }; GitignoreHighlightRules.metaData = { fileTypes: ['gitignore'], name: 'Gitignore' }; oop.inherits(GitignoreHighlightRules, TextHighlightRules); exports.GitignoreHighlightRules = GitignoreHighlightRules; }); define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules; var Mode = function() { this.HighlightRules = GitignoreHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$id = "ace/mode/gitignore"; }).call(Mode.prototype); exports.Mode = Mode; });
{ "pile_set_name": "Github" }
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9d1de2691495b304e9843ac3335b626d, type: 3} m_Name: neck_chemistry-trimmed m_EditorClassIdentifier: Variance: - Frames: - sprite: {fileID: 6012491326278511063, guid: 74623106fc3c54840896a9bf4f818004, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: -6359440115043482995, guid: 74623106fc3c54840896a9bf4f818004, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: 6269143183535522893, guid: 74623106fc3c54840896a9bf4f818004, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: 180585940764008723, guid: 74623106fc3c54840896a9bf4f818004, type: 3} secondDelay: 0 IsPalette: 0 setID: 22220
{ "pile_set_name": "Github" }