text
stringlengths
2
100k
meta
dict
// SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2018 Facebook #include <linux/bpf.h> #include <sys/socket.h> #include "bpf_helpers.h" #include "bpf_endian.h" struct bpf_map_def SEC("maps") socket_cookies = { .type = BPF_MAP_TYPE_HASH, .key_size = sizeof(__u64), .value_size = sizeof(__u32), .max_entries = 1 << 8, }; SEC("cgroup/connect6") int set_cookie(struct bpf_sock_addr *ctx) { __u32 cookie_value = 0xFF; __u64 cookie_key; if (ctx->family != AF_INET6 || ctx->user_family != AF_INET6) return 1; cookie_key = bpf_get_socket_cookie(ctx); if (bpf_map_update_elem(&socket_cookies, &cookie_key, &cookie_value, 0)) return 0; return 1; } SEC("sockops") int update_cookie(struct bpf_sock_ops *ctx) { __u32 new_cookie_value; __u32 *cookie_value; __u64 cookie_key; if (ctx->family != AF_INET6) return 1; if (ctx->op != BPF_SOCK_OPS_TCP_CONNECT_CB) return 1; cookie_key = bpf_get_socket_cookie(ctx); cookie_value = bpf_map_lookup_elem(&socket_cookies, &cookie_key); if (!cookie_value) return 1; new_cookie_value = (ctx->local_port << 8) | *cookie_value; bpf_map_update_elem(&socket_cookies, &cookie_key, &new_cookie_value, 0); return 1; } int _version SEC("version") = 1; char _license[] SEC("license") = "GPL";
{ "pile_set_name": "Github" }
/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2016 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. } */ #ifndef XCSOAR_SCREEN_ANTI_FLICKER_WINDOW_HXX #define XCSOAR_SCREEN_ANTI_FLICKER_WINDOW_HXX #if defined(ENABLE_OPENGL) || defined(USE_MEMORY_CANVAS) #include "FakeBufferWindow.hpp" /** * A #PaintWindow implementation that avoids flickering. Some * platforms such as Windows draw directly to the screen, which may * expose the window before drawing has finished. On these, * #AntiFlickerWindow will be buffered. On OpenGL/SDL, which both have * full-screen double-buffering, this class is a simple #PaintWindow * without extra buffering. * * Note that this class is not supposed to reduce the number of * redraws when this is expensive. Use it only when flicker avoidance * is the goal. */ class AntiFlickerWindow : public FakeBufferWindow { }; #else #include "BufferWindow.hpp" class AntiFlickerWindow : public BufferWindow { }; #endif #endif
{ "pile_set_name": "Github" }
<?php // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // check for plugin using plugin name $old_plugin = AMPFORWP_MAIN_PLUGIN_DIR.'amp-category-base-remover/amp-category-base-remover.php'; if ( is_plugin_active( $old_plugin ) ) { //plugin is activated deactivate_plugins($old_plugin); add_action( 'admin_notices', 'ampforwp_catagory_base_removal_admin_notice' ); } function ampforwp_catagory_base_removal_admin_notice(){ ?> <div class="notice notice-success is-dismissible"> <p><?php esc_html_e( 'AMP Category Base URL Remover plugin has De-activated, <br> Category removal option is added in our core plugin <a href="#">Click here to view details</a>', 'accelerated-mobile-pages' ); ?></p> </div> <?php } add_filter( 'init', 'ampforwp_url_base_rewrite_rules', 100 ); function ampforwp_url_base_rewrite_rules(){ global $redux_builder_amp; global $wp_rewrite; $categoryBaseRewrite = 0; $tagBaseRewrite = 0; if( isset($redux_builder_amp['ampforwp-category-base-removel-link']) ) { $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link']; } if( isset($redux_builder_amp['ampforwp-tag-base-removal-link']) ) { $tagBaseRewrite = $redux_builder_amp['ampforwp-tag-base-removal-link']; } if($categoryBaseRewrite === '1'){ add_action( 'created_category', 'amp_flush_rewrite_rules', 999 ); add_action( 'edited_category', 'amp_flush_rewrite_rules', 999 ); add_action( 'delete_category', 'amp_flush_rewrite_rules', 999 ); add_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules'); }elseif($categoryBaseRewrite === '0'){ remove_action( 'created_category', 'amp_flush_rewrite_rules' , 999 ); remove_action( 'edited_category', 'amp_flush_rewrite_rules' , 999 ); remove_action( 'delete_category', 'amp_flush_rewrite_rules' , 999 ); remove_filter( 'category_rewrite_rules', 'ampforwp_category_url_rewrite_rules'); } if( $tagBaseRewrite === '1'){ add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 ); add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 ); add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 ); add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' ); }elseif( $tagBaseRewrite === '0' ) { remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 ); remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 ); remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 ); remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' ); } } function amp_flush_rewrite_rules( $hard=true ) { global $wp_rewrite; $wp_rewrite->flush_rules( $hard ); } function ampforwp_category_url_rewrite_rules( $rewrite ) { global $redux_builder_amp, $wp_rewrite; $categoryBaseRewrite = $redux_builder_amp['ampforwp-category-base-removel-link']; $categories = get_categories( array( 'hide_empty' => false ) ); if(is_array( $categories ) && ! empty( $categories ) ) { foreach ( $categories as $category ) { $category_nicename = $category->slug; if ( $category->parent === $category->cat_ID ) { $category->parent = 0; } elseif ( 0 !== $category->parent ) { $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename; } $category_nicename = trim($category_nicename); $rewrite[ '('.$category_nicename.')'.'/amp/?$' ] = 'index.php?amp&category_name=$matches[1]'; $rewrite[ '('.$category_nicename.')'.'/amp/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?amp&category_name=$matches[1]&paged=$matches[2]'; // Redirect support from Old Category Base $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category'; $old_category_base = trim( $old_category_base, '/' ); $rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]'; } } return $rewrite; } function ampforwp_tag_url_rewrite_rules( $rewrite ) { $tags = get_terms('post_tag', array('hide_empty' => false)); if(is_array( $tags ) && ! empty( $tags ) ) { foreach ( $tags as $tag ) { $tag_nicename = trim($tag->slug); $rewrite[ '('.$tag_nicename.')'.'/amp/?$' ] = 'index.php?amp&tag=$matches[1]'; $rewrite[ '('.$tag_nicename.')'.'/amp/page/?([0-9]{1,})/?$' ] = 'index.php?amp&tag=$matches[1]&paged=$matches[2]'; } } return $rewrite; }
{ "pile_set_name": "Github" }
// RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \ // RUN: llvm-readobj -s -sr -sd | FileCheck %s .syntax unified .eabi_attribute 6, 10 .eabi_attribute 8, 1 .eabi_attribute 9, 2 .fpu neon .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .file "/home/espindola/llvm/llvm/test/CodeGen/ARM/2010-11-30-reloc-movt.ll" .text .globl barf .align 2 .type barf,%function barf: @ @barf @ BB#0: @ %entry push {r11, lr} movw r0, :lower16:a movt r0, :upper16:a bl foo pop {r11, pc} .Ltmp0: .size barf, .Ltmp0-barf // CHECK: Section { // CHECK: Name: .text // CHECK: SectionData ( // CHECK-NEXT: 0000: 00482DE9 000000E3 000040E3 FEFFFFEB // CHECK-NEXT: 0010: 0088BDE8 // CHECK-NEXT: ) // CHECK: Relocations [ // CHECK-NEXT: 0x4 R_ARM_MOVW_ABS_NC a // CHECK-NEXT: 0x8 R_ARM_MOVT_ABS // CHECK-NEXT: 0xC R_ARM_CALL foo // CHECK-NEXT: ]
{ "pile_set_name": "Github" }
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using System.Web.Http.Batch; using System.Web.Http.WebHost.Routing; using System.Web.Routing; using Microsoft.TestCommon; namespace System.Web.Http.WebHost { public class BatchingTest { // Regression test for Codeplex-2103 // // When batching is used in web host, we need to wrap the HttpRequestMessages in an HttpContextBase // adapter and pass system to system.web. In 2103 there were bugs in this wrapper, and we weren't // following the contract with respect to %-encoding. [Fact] public async Task WebHost_Batching_WithSpecialCharactersInUrl() { // Arrange var handler = new SuccessMessageHandler(); var routeCollection = new HostedHttpRouteCollection(new RouteCollection(), "/"); routeCollection.Add("default", routeCollection.CreateRoute( "values/ space", defaults: null, constraints: null, dataTokens: null, handler: handler)); var configuration = new HttpConfiguration(routeCollection); var server = new HttpServer(configuration); var batchHandler = new DefaultHttpBatchHandler(server); var request = new HttpRequestMessage { Content = new MultipartContent("mixed") { new HttpMessageContent(new HttpRequestMessage(HttpMethod.Post, "http://contoso.com/values/ space")) } }; // Arrange var response = await batchHandler.ProcessBatchAsync(request, CancellationToken.None); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.True(handler.IsCalled); } private class SuccessMessageHandler : HttpMessageHandler { public bool IsCalled { get; private set; } protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { IsCalled = true; return Task.FromResult(request.CreateResponse(HttpStatusCode.OK)); } } } }
{ "pile_set_name": "Github" }
/** * Copyright (C) 2002-2020 The FreeCol Team * * This file is part of FreeCol. * * FreeCol is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * FreeCol 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 FreeCol. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.freecol.common.model; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; import javax.xml.stream.XMLStreamException; import net.sf.freecol.common.io.FreeColXMLReader; import net.sf.freecol.common.io.FreeColXMLWriter; import static net.sf.freecol.common.util.CollectionUtils.*; /** * This class implements a simple economic model where a market holds * all goods to be sold and the price of a particular goods type is * determined solely by its availability in that market. */ public final class Market extends FreeColGameObject implements Ownable { private static final Logger logger = Logger.getLogger(Market.class.getName()); public static final String TAG = "market"; /** * European markets are bottomless. Goods present never decrease * below this threshold. */ public static final int MINIMUM_AMOUNT = 100; public static final String PRICE_CHANGE = "priceChange"; /** * Constant for specifying the access to this {@code Market} * when selling goods. */ public static enum Access { EUROPE, CUSTOM_HOUSE, } /** The contents of the market, keyed by goods type. */ private final Map<GoodsType, MarketData> marketData = new HashMap<>(); /** The owning player. */ private Player owner; // Do not serialize below /** Watching listeners. */ private final ArrayList<TransactionListener> transactionListeners = new ArrayList<>(); /** * Main constructor for creating a market for a new player. * * @param game The enclosing {@code Game}. * @param player The {@code Player} to own the market. */ public Market(Game game, Player player) { super(game); this.owner = player; /* * Create the market data containers for each type of goods * and seed these objects with the initial amount of each type * of goods. */ for (GoodsType goodsType : getSpecification().getStorableGoodsTypeList()) { putMarketData(goodsType, new MarketData(game, goodsType)); } } /** * Creates a new {@code Market} with the given identifier. * * The object should be initialized later. * * @param game The enclosing {@code Game}. * @param id The object identifier. */ public Market(Game game, String id) { super(game, id); } /** * Get the market data. * * @return The map of goods type to market data. */ private Map<GoodsType, MarketData> getMarketData() { synchronized (this.marketData) { return this.marketData; } } /** * Get the market data values. * * @return The market data in this market. */ public Collection<MarketData> getMarketDataValues() { synchronized (this.marketData) { return this.marketData.values(); } } /** * Gets the market data for a type of goods. * * Public so the server can send individual MarketData updates. * * @param goodsType The {@code GoodsType} to look for. * @return The corresponding {@code MarketData}, or null if none. */ public MarketData getMarketData(GoodsType goodsType) { synchronized (this.marketData) { return this.marketData.get(goodsType); } } /** * Set the market data for a given goods type. * * @param goodsType The {@code GoodsType} to set the market data for. * @param data The new {@code MarketData}. */ private void putMarketData(GoodsType goodsType, MarketData data) { synchronized (this.marketData) { this.marketData.put(goodsType, data); } } /** * Gets the market data for a specified goods type, creating it * if it does not exist yet. * * @param goodsType The {@code GoodsType} to query. * @return The {@code MarketData} required. */ private MarketData requireMarketData(GoodsType goodsType) { MarketData data = getMarketData(goodsType); if (data == null) { data = new MarketData(getGame(), goodsType); putMarketData(goodsType, data); } return data; } /** * Set the market data. * * @param data The new market data. */ private void setMarketData(Map<GoodsType, MarketData> data) { synchronized (this.marketData) { this.marketData.clear(); this.marketData.putAll(data); } } /** * Clear the market data. */ private void clearMarketData() { synchronized (this.marketData) { this.marketData.clear(); } } /** * Has a type of goods been traded in this market? * * @param type The type of goods to consider. * @return True if the goods type has been traded. */ public boolean hasBeenTraded(GoodsType type) { MarketData data = getMarketData(type); return data != null && data.getTraded(); } /** * Determines the cost to buy a single unit of a particular type of good. * * @param type A {@code GoodsType} value. * @return The cost to buy a single unit of the given type of goods. */ public int getCostToBuy(GoodsType type) { MarketData data = getMarketData(type); return (data == null) ? 0 : data.getCostToBuy(); } /** * Determines the price paid for the sale of a single unit of a particular * type of goods. * * @param type A {@code GoodsType} value. * @return The price for a single unit of the given type of goods * if it is for sale. */ public int getPaidForSale(GoodsType type) { MarketData data = getMarketData(type); return (data == null) ? 0 : data.getPaidForSale(); } /** * Add (or remove) some goods to this market. * * @param goodsType The {@code GoodsType} to add. * @param amount The amount of goods. * @return True if the price changes as a result of this addition. */ public boolean addGoodsToMarket(GoodsType goodsType, int amount) { MarketData data = requireMarketData(goodsType); // Markets are bottomless, amount can not go below the threshold data.setAmountInMarket(Math.max(MINIMUM_AMOUNT, data.getAmountInMarket() + amount)); data.setTraded(true); return data.price(); } /** * Gets the initial price of a given goods type. * * @param goodsType The {@code GoodsType} to get the initial price of. * @return The initial price. */ public int getInitialPrice(GoodsType goodsType) { MarketData data = requireMarketData(goodsType); return data.getInitialPrice(); } /** * Sets the initial price of a given goods type. * * @param goodsType The {@code GoodsType} to set the initial price of. * @param amount The new initial price. */ public void setInitialPrice(GoodsType goodsType, int amount) { MarketData data = requireMarketData(goodsType); data.setInitialPrice(amount); } /** * Gets the price of a given goods when the {@code Player} buys. * * @param type a {@code GoodsType} value * @param amount The amount of goods. * @return The bid price of the given goods. */ public int getBidPrice(GoodsType type, int amount) { MarketData data = getMarketData(type); return (data == null) ? 0 : amount * data.getCostToBuy(); } /** * Gets the price of a given goods when the {@code Player} sells. * * @param type a {@code GoodsType} value * @param amount The amount of goods. * @return The sale price of the given goods. */ public int getSalePrice(GoodsType type, int amount) { MarketData data = getMarketData(type); return (data == null) ? 0 : amount * data.getPaidForSale(); } /** * Gets the price of a given goods when the {@code Player} sells. * * @param <T> The base type of the goods. * @param goods The {@code Goods} to evaluate. * @return The price. */ public <T extends AbstractGoods> int getSalePrice(T goods) { return getSalePrice(goods.getType(), goods.getAmount()); } /** * Gets the arrears for of a given goods type. * * @param goodsType The {@code GoodsType} to get arrears for. * @return The arrears. */ public int getArrears(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return (data == null) ? 0 : data.getArrears(); } /** * Sets the arrears associated with a type of goods. * * @param goodsType The {@code GoodsType} to set the arrears for. * @param value The amount of arrears to set. */ public void setArrears(GoodsType goodsType, int value) { MarketData data = requireMarketData(goodsType); data.setArrears(value); } /** * Gets the sales of a type of goods. * * @param goodsType The {@code GoodsType} to get the sales for. * @return The current sales amount. */ public int getSales(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return (data == null) ? 0 : data.getSales(); } /** * Modifies the sales of a type of goods. * * @param goodsType The {@code GoodsType} to set the sales for. * @param amount The amount of sales to add to the current amount. */ public void modifySales(GoodsType goodsType, int amount) { if (amount != 0) { MarketData data = requireMarketData(goodsType); data.setSales(data.getSales() + amount); data.setTraded(true); } } /** * Gets the income before taxes for a type of goods. * * @param goodsType The {@code GoodsType} to get the income for. * @return The current income before taxes. */ public int getIncomeBeforeTaxes(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return (data == null) ? 0 : data.getIncomeBeforeTaxes(); } /** * Modifies the income before taxes on sales of a type of goods. * * @param goodsType The {@code GoodsType} to set the income for. * @param amount The amount of tax income to add to the current amount. */ public void modifyIncomeBeforeTaxes(GoodsType goodsType, int amount) { MarketData data = requireMarketData(goodsType); data.setIncomeBeforeTaxes(data.getIncomeBeforeTaxes() + amount); } /** * Gets the income after taxes for a type of goods. * * @param goodsType The {@code GoodsType} to get the income for. * @return The current income after taxes. */ public int getIncomeAfterTaxes(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return (data == null) ? 0 : data.getIncomeAfterTaxes(); } /** * Modifies the income after taxes on sales of a type of goods. * * @param goodsType The {@code GoodsType} to set the income for. * @param amount The amount of tax income to add to the current amount. */ public void modifyIncomeAfterTaxes(GoodsType goodsType, int amount) { MarketData data = requireMarketData(goodsType); data.setIncomeAfterTaxes(data.getIncomeAfterTaxes() + amount); } /** * Gets the amount of a goods type in the market. * * @param goodsType The {@code GoodsType} to get the amount of. * @return The current amount of the goods in the market. */ public int getAmountInMarket(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return (data == null) ? 0 : data.getAmountInMarket(); } /** * Has the price of a type of goods changed in this market? * * @param goodsType The type of goods to consider. * @return True if the price has changed. */ public boolean hasPriceChanged(GoodsType goodsType) { MarketData data = getMarketData(goodsType); return data != null && data.getOldPrice() != 0 && data.getOldPrice() != data.getCostToBuy(); } /** * Clear any price changes for a type of goods. * * @param goodsType The type of goods to consider. */ public void flushPriceChange(GoodsType goodsType) { MarketData data = getMarketData(goodsType); if (data != null) { data.setOldPrice(data.getCostToBuy()); } } /** * Make up a {@code ModelMessage} describing the change in this * {@code Market} for a specified type of goods. * * @param goodsType The {@code GoodsType} that has changed price. * @return A message describing the change. */ public ModelMessage makePriceChangeMessage(GoodsType goodsType) { MarketData data = getMarketData(goodsType); int oldPrice = data.getOldPrice(); int newPrice = data.getCostToBuy(); return (oldPrice == newPrice) ? null : new ModelMessage(ModelMessage.MessageType.MARKET_PRICES, ((newPrice > oldPrice) ? "model.market.priceIncrease" : "model.market.priceDecrease"), this, goodsType) .addStringTemplate("%market%", owner.getMarketName()) .addNamed("%goods%", goodsType) .addAmount("%buy%", newPrice) .addAmount("%sell%", data.getPaidForSale()); } /** * Update the price for a type of goods, bypassing the price change * clamping. * * Used to reset the prices when the initial price is randomized. Do * not use during the game, the price change clamping mechanism should * remain in effect. * * @param goodsType The {@code GoodsType} to update. */ public void update(GoodsType goodsType) { MarketData data = requireMarketData(goodsType); data.update(); } /** * Get a sale price comparator for this market. * * @param <T> The {@code AbstractGoods} type to compare. * @return A suitable {@code Comparator}. */ public <T extends AbstractGoods> Comparator<T> getSalePriceComparator() { return Comparator.comparingInt((T t) -> getSalePrice(t.getType(), t.getAmount())).reversed(); } // TransactionListener support /** * Adds a transaction listener for notification of any transaction * * @param listener The {@code TransactionListener} to add. */ public void addTransactionListener(TransactionListener listener) { transactionListeners.add(listener); } /** * Removes a transaction listener * * @param listener The {@code TransactionListener} to remove. */ public void removeTransactionListener(TransactionListener listener) { transactionListeners.remove(listener); } /** * Gets the listeners added to this market. * * @return An array of all the {@code TransactionListener}s * added, or an empty array if none found. */ public TransactionListener[] getTransactionListener() { return transactionListeners.toArray(new TransactionListener[0]); } // Interface Ownable /** * {@inheritDoc} */ @Override public Player getOwner() { return owner; } /** * {@inheritDoc} */ @Override public void setOwner(Player owner) { this.owner = owner; } // Override FreeColGameObject /** * {@inheritDoc} */ @Override public FreeColGameObject getLinkTarget(Player player) { return (player == getOwner()) ? getOwner().getEurope() : null; } // Overide FreeColObject /** * {@inheritDoc} */ @Override public <T extends FreeColObject> boolean copyIn(T other) { Market o = copyInCast(other, Market.class); if (o == null || !super.copyIn(o)) return false; final Game game = getGame(); setMarketData(o.getMarketData()); this.owner = game.updateRef(o.getOwner()); return true; } // Serialization private static final String OWNER_TAG = "owner"; /** * {@inheritDoc} */ @Override protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException { super.writeAttributes(xw); xw.writeAttribute(OWNER_TAG, owner); } /** * {@inheritDoc} */ @Override protected void writeChildren(FreeColXMLWriter xw) throws XMLStreamException { super.writeChildren(xw); if (xw.validFor(owner)) { for (MarketData data : sort(getMarketDataValues())) { data.toXML(xw); } } } /** * {@inheritDoc} */ @Override protected void readAttributes(FreeColXMLReader xr) throws XMLStreamException { super.readAttributes(xr); owner = xr.findFreeColGameObject(getGame(), OWNER_TAG, Player.class, (Player)null, true); } /** * {@inheritDoc} */ @Override protected void readChildren(FreeColXMLReader xr) throws XMLStreamException { // Clear containers. clearMarketData(); super.readChildren(xr); } /** * {@inheritDoc} */ @Override protected void readChild(FreeColXMLReader xr) throws XMLStreamException { final String tag = xr.getLocalName(); if (MarketData.TAG.equals(tag)) { MarketData data = xr.readFreeColObject(getGame(), MarketData.class); putMarketData(data.getGoodsType(), data); } else { super.readChild(xr); } } /** * {@inheritDoc} */ public String getXMLTagName() { return TAG; } // Override Object /** * {@inheritDoc} */ @Override public String toString() { StringBuilder sb = new StringBuilder(64); sb.append('[').append(getId()) .append(" owner=").append((owner==null) ? "null" : owner.getId()); for (MarketData md : sort(getMarketDataValues())) { sb.append(' ').append(md); } sb.append(']'); return sb.toString(); } }
{ "pile_set_name": "Github" }
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """This module is deprecated. Please use `airflow.providers.microsoft.winrm.hooks.winrm`.""" import warnings # pylint: disable=unused-import from airflow.providers.microsoft.winrm.hooks.winrm import WinRMHook # noqa warnings.warn( "This module is deprecated. Please use `airflow.providers.microsoft.winrm.hooks.winrm`.", DeprecationWarning, stacklevel=2 )
{ "pile_set_name": "Github" }
"use strict"; // call preload hooks at the very beginning as they may help require other modules (including commander!) // register will call them again but it shouldn't hurt because require caches. (function() { var i = process.argv.indexOf('--preload') + 1; if (i > 0 && process.argv[i]) process.argv[i].split(',').forEach(function(m) { require(m); }); })(); // handles _node and _coffee command line options var fs = require('fs'); var fsp = require('path'); var util = require('./util'); var register = require('./register'); var Module = require('module'); function parseOptions(argv) { var program = require('commander'); var prog = program.version(require('../package').version, '-v, --version') .usage('[options] [script] [arguments]') .option('-c, --compile', "compile [script] files and save as *.js files") .option('-d, --out-dir <dir>', "save compiled .js files in the given directory") .option('--no-cache', "turns caching off", true) .option('--cache-dir <dir>', "sets the cache directory") .option('-f, --force', "force transformation (even if found in cache)") .option('--runtime <name>', "target runtime") .option('-s, --source-maps <true|false|inline|both>', "(see babel)", /^(true|false|inline|both)$/) .option('--source-map-target <file>', "output file for source map") .option('--only-extensions <exts>', "list of extensions to process (comma-separated)") .option('-q, --quiet', "don't log") .option('--preload <modules>', "hook to preload a specified list of modules (comma-separated)"); // Arguments that follow the script or filename should not be intercepted by commander but passed // verbatim to the script (https://github.com/Sage/streamlinejs/issues/297) // There may be a clever way to do this with commander but the following hack should do for now // I'm handling compat in the same loop to cut correctly if script accepts obsolete streamline options (-o for ex). // commander skips 2 first args, not just first one. var args = argv.slice(0, 2); var cut = 2; while (cut < argv.length) { var arg = argv[cut]; if (arg[0] !== '-') break; cut++; var opt = prog.options.filter(function(o) { return o.short === arg || o.long === arg; })[0]; if (opt) { args.push(arg); if (opt.flags.indexOf('<') >= 0 && cut < argv.length) { args.push(argv[cut++]); } } else { // handle compat options if (arg === '--cache') { // ignore silently - cache is now on by default. } else if (/^(-l(m|i|p)|--(lines-(mark|ignore|preserve)|standalone|fast|old-style-future|promise|cb|aggressive))$/.test(arg)) { util.warn('obsolete option ignored: ' + arg); return; } else if (arg === '--map') { util.warn('obsolete option: --map, use -s or --source-maps instead'); args.push('--source-maps'); args.push('true'); return; } else if (arg === '--source-map') { util.warn('obsolete option: --source-map, use --source-map-target instead'); args.push('--source-map-target'); } else if (/^--(fibers|generators)$/.test(arg)) { util.warn('obsolete option: ' + arg + ', use --runtime ' + arg.substring(2) + ' instead'); args.push('--runtime'); args.push(arg.substring(2)); } else if (/^(-o|--output-dir)$/.test(arg)) { util.warn('obsolete option: ' + arg + ', use -d or --out-dir instead'); args.push('-d'); if (cut < argv.length) args.push(argv[cut++]); } else if (arg === '-v') { util.warn('obsolete option: -v, verbose is on by default, use -q to turn it off'); } else { // push invalid option - commander will deal with it args.push(arg); } } } var options = prog.parse(args); options.args = options.args.concat(argv.slice(cut)); options = Object.keys(options).filter(function(opt) { return !/^([A-Z]|_)/.test(opt); }).reduce(function(opts, key) { opts[key] = options[key]; return opts; }, {}); if (options.onlyExtensions) options.onlyExtensions = options.onlyExtensions.split(','); return util.getOptions(util.extend(util.envOptions(), options)); }; function runScript(options) { var filename = options.args[0]; // We'll make that file the "main" module by reusing the current one. var mainModule = require.main; // Clear the main module's require cache. if (mainModule.moduleCache) { mainModule.moduleCache = {}; } // Set the module's paths and filename. Luckily, Node exposes its native // helper functions to resolve these guys! // https://github.com/joyent/node/blob/master/lib/module.js // Except we need to tell Node that these are paths, not native modules. filename = fsp.resolve(filename || '.'); mainModule.filename = filename = Module._resolveFilename(filename); var localPaths = Module._nodeModulePaths(fsp.join(process.cwd(), 'node_modules')); var globalPaths = Module._nodeModulePaths(fsp.join(__dirname, '../node_modules')); mainModule.paths = localPaths.slice(0, localPaths.length - 1).concat(globalPaths); //process.execPath = filename; // Load the target file and evaluate it as the main module. // The input path should have been resolved to a file, so use its extension. // If the file doesn't have an extension (e.g. scripts with a shebang), // go by what executable this was called as. var ext = fsp.extname(filename); if (!/(\._?(js|coffee)|ts)$/.test(ext)) ext = /^_coffee/.test(fsp.basename(process.argv[1])) ? '._coffee' : '._js'; // Update the process argv and execPath too. process.argv = [process.argv[1], filename].concat(options.args.slice(1)); if (!require.extensions[ext]) throw new Error("unsupported extension: " + ext); require.extensions[ext](mainModule, filename); } exports.run = function() { // require cluster here so that it gets process.argv before we shift it. if (require('cluster').setupMaster) require('cluster').setupMaster(); var argv = process.argv; var prog = /\w*$/.exec(argv[1])[0]; var options = parseOptions(argv); register.register(options); if (options.compile) { require('./compile').compile(function(err) { if (err) { console.error(err.message + "\n" + err.stack); /* eslint-disable no-process-exit */ process.exit(1); } }, options.args, options); } else if (options.args.length === 0) { require("./repl").run(prog, options); } else { runScript(options); } };
{ "pile_set_name": "Github" }
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. 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 resources import ( "testing" "time" "github.com/stretchr/testify/assert" ) func TestGoroutinesChecker(t *testing.T) { block := make(chan struct{}) defer close(block) cases := []struct { title string test func() timeout time.Duration fail bool }{ { title: "no goroutines", test: func() {}, }, { title: "fast goroutine", test: func() { started := make(chan struct{}) go func() { started <- struct{}{} }() <-started }, }, /* Skipped due to flakyness: https://github.com/elastic/beats/issues/12692 { title: "blocked goroutine", test: func() { started := make(chan struct{}) go func() { started <- struct{}{} <-block }() <-started }, timeout: 500 * time.Millisecond, fail: true, }, */ } for _, c := range cases { t.Run(c.title, func(t *testing.T) { goroutines := NewGoroutinesChecker() if c.timeout > 0 { goroutines.FinalizationTimeout = c.timeout } c.test() err := goroutines.check(t) if c.fail { assert.Error(t, err) } else { assert.NoError(t, err) } }) } }
{ "pile_set_name": "Github" }
####################################### # Syntax Coloring Map For M5StickC ####################################### ####################################### # Library (KEYWORD3) ####################################### M5StickC KEYWORD3 M5 KEYWORD3 m5 KEYWORD3 ####################################### # Datatypes (KEYWORD1) ####################################### Lcd KEYWORD1 Speaker KEYWORD1 BtnA KEYWORD1 BtnB KEYWORD1 BtnC KEYWORD1 ####################################### # Methods and Functions (KEYWORD2) ####################################### begin KEYWORD2 update KEYWORD2 isPressed KEYWORD2 wasPressed KEYWORD2 pressedFor KEYWORD2 isReleased KEYWORD2 wasReleased KEYWORD2 releasedFor KEYWORD2 wasReleasefor KEYWORD2 held KEYWORD2 repeat KEYWORD2 timeHeld KEYWORD2 getBuffer KEYWORD2 setContrast KEYWORD2 clear KEYWORD2 update KEYWORD2 fillScreen KEYWORD2 persistence KEYWORD2 setColor KEYWORD2 drawPixel KEYWORD2 getPixel KEYWORD2 drawLine KEYWORD2 drawFastVLine KEYWORD2 drawFastHLine KEYWORD2 drawRect KEYWORD2 fillRect KEYWORD2 drawRoundRect KEYWORD2 fillRoundRect KEYWORD2 drawCircle KEYWORD2 fillCircle KEYWORD2 drawCircleHelper KEYWORD2 fillCircleHelper KEYWORD2 drawTriangle KEYWORD2 fillTriangle KEYWORD2 drawBitmap KEYWORD2 drawChar KEYWORD2 print KEYWORD2 cursorX KEYWORD2 cursorY KEYWORD2 fontSize KEYWORD2 textWrap KEYWORD2 fontWidth KEYWORD2 fontHeight KEYWORD2 setFont KEYWORD2 setTextColor KEYWORD2 setTextSize KEYWORD2 WHITE LITERAL1 BLACK LITERAL1 INVERT LITERAL1 GRAY LITERAL1 RED LITERAL1 BLUE LITERAL1 GREEN LITERAL1
{ "pile_set_name": "Github" }
#pragma once #include "IBGS.h" #include "opencv2/core/version.hpp" #if CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION >= 4 && CV_SUBMINOR_VERSION >= 3 namespace bgslibrary { namespace algorithms { class GMG : public IBGS { private: cv::Ptr<cv::BackgroundSubtractorGMG> fgbg; int initializationFrames; double decisionThreshold; cv::Mat img_segmentation; public: GMG(); ~GMG(); void process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel); private: void save_config(cv::FileStorage &fs); void load_config(cv::FileStorage &fs); }; bgs_register(GMG); } } #endif
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Text; namespace Be.Windows.Forms { /// <summary> /// Specifies the case of hex characters in the HexBox control /// </summary> public enum HexCasing { /// <summary> /// Converts all characters to uppercase. /// </summary> Upper = 0, /// <summary> /// Converts all characters to lowercase. /// </summary> Lower = 1 } }
{ "pile_set_name": "Github" }
set(NoMem2regSources cmd_args.c fread.c growing_example.cpp if_else.cpp operator_shift.cpp printf.c print.cpp read.c source_sink_function_test.c taint_1.cpp taint_2.cpp taint_3.cpp taint_4.cpp taint_5.cpp taint_6.cpp taint_7.cpp taint_8.cpp taint_9.c taint_10.c taint_11.c taint_12.c taint_13.c taint_2_v2.cpp taint_2_v2_1.cpp taint_4_v2.cpp taint_14.cpp taint_14_1.cpp taint_15.cpp taint_15_1.cpp virtual_calls.cpp virtual_calls_v2.cpp struct_member.cpp dynamic_memory.cpp dynamic_memory_simple.cpp ) foreach(TEST_SRC ${NoMem2regSources}) generate_ll_file(FILE ${TEST_SRC}) endforeach(TEST_SRC) add_subdirectory(dummy_source_sink)
{ "pile_set_name": "Github" }
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file eggListTextures.cxx * @author drose * @date 2005-05-23 */ #include "eggListTextures.h" #include "eggTextureCollection.h" #include "pnmImageHeader.h" /** * */ EggListTextures:: EggListTextures() { set_program_brief("list textures referenced by an .egg file"); set_program_description ("egg-list-textures reads an egg file and writes a list of the " "textures it references. It is particularly useful for building " "up the textures.txa file used for egg-palettize, since the output " "format is crafted to be compatible with that file's input format."); } /** * */ void EggListTextures:: run() { if (!do_reader_options()) { exit(1); } EggTextureCollection tc; tc.find_used_textures(_data); EggTextureCollection::TextureReplacement treplace; tc.collapse_equivalent_textures(EggTexture::E_complete_filename, treplace); tc.sort_by_basename(); EggTextureCollection::iterator ti; for (ti = tc.begin(); ti != tc.end(); ++ti) { Filename fullpath = (*ti)->get_fullpath(); PNMImageHeader header; if (header.read_header(fullpath)) { std::cout << fullpath.get_basename() << " : " << header.get_x_size() << " " << header.get_y_size() << "\n"; } else { std::cout << fullpath.get_basename() << " : unknown\n"; } } } int main(int argc, char *argv[]) { EggListTextures prog; prog.parse_command_line(argc, argv); prog.run(); return 0; }
{ "pile_set_name": "Github" }
#N canvas 248 153 807 682 10; #X obj 41 16 inlet note_in; #X obj 86 547 outlet~ left; #X obj 207 546 outlet~ right; #X obj 378 23 inlet assign; #N canvas 0 0 1028 734 make_drums 0; #X obj 470 600 flow.send; #X obj 562 134 f \$0; #X obj 562 192 convert.list2symbol none; #X obj 243 65 t b b; #X msg 459 152 clear; #X obj 281 200 f \$0; #X obj 16 283 flow.iter; #X obj 170 112 t b b b b; #X obj 113 171 sel 0; #X msg 101 198 1; #X obj 189 185 flow.iter; #X obj 193 247 list.build; #X obj 471 410 list trim; #X obj 128 234 t f b f; #X obj 66 383 t f f; #X obj 10 328 t f f f; #X obj 246 12 inlet; #X msg 6 47 loadbang; #X obj 31 251 t f f; #X obj 245 281 t a a; #X obj 491 329 list prepend obj 0 30 route; #X msg 107 304 connect 0 0 4 0 \, connect 1 0 5 0; #X obj -76 341 + 6; #X obj -69 310 * 2; #X obj -76 368 t f f; #X obj -42 396 + 1; #X msg 562 161 list pd- \$1 drums; #X obj 130 148 f 17; #X obj 65 356 * 100; #X obj 262 332 list prepend obj 400 30 route; #X obj -64 427 pack f f f f; #X msg -107 542 connect 4 \$3 \$1 0 \, connect 5 \$3 \$2 1 \, connect \$1 0 \$2 0 \, connect \$2 0 2 0 \, connect \$2 1 3 0 \, connect 5 \$4 \$2 1; #X msg 217 414 obj \$1 200 sample.r; #X msg 44 415 obj \$1 300 sample.play~; #X msg 346 255 obj 0 0 r \$1assign \, obj 120 0 r \$1notes \, obj 0 500 throw~ \$1l \, obj 120 500 throw~ \$1r; #X obj 244 218 + 35; #X connect 1 0 26 0; #X connect 2 0 0 1; #X connect 3 0 7 0; #X connect 3 1 1 0; #X connect 4 0 0 0; #X connect 5 0 34 0; #X connect 6 0 15 0; #X connect 7 0 17 0; #X connect 7 1 27 0; #X connect 7 2 5 0; #X connect 7 3 4 0; #X connect 8 0 9 0; #X connect 8 1 13 0; #X connect 9 0 13 0; #X connect 10 0 35 0; #X connect 10 1 11 0; #X connect 11 0 19 0; #X connect 12 0 0 0; #X connect 13 0 18 0; #X connect 13 1 21 0; #X connect 13 2 10 0; #X connect 14 0 33 0; #X connect 14 1 32 0; #X connect 15 0 23 0; #X connect 15 1 30 2; #X connect 15 2 28 0; #X connect 16 0 3 0; #X connect 17 0 0 0; #X connect 18 0 6 0; #X connect 18 1 30 3; #X connect 19 0 29 0; #X connect 19 1 20 0; #X connect 20 0 12 0; #X connect 21 0 0 0; #X connect 22 0 24 0; #X connect 23 0 22 0; #X connect 24 0 30 0; #X connect 24 1 25 0; #X connect 25 0 30 1; #X connect 26 0 2 0; #X connect 27 0 8 0; #X connect 28 0 14 0; #X connect 29 0 12 0; #X connect 30 0 31 0; #X connect 31 0 0 0; #X connect 32 0 0 0; #X connect 33 0 0 0; #X connect 34 0 0 0; #X connect 35 0 11 1; #X restore 293 632 pd make_drums; #N canvas 33 22 995 687 \$0drums 0; #X obj 0 30 route 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ; #X obj 400 30 route 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51; #X obj 0 200 sample.r; #X obj 0 300 sample.play~; #X obj 100 200 sample.r; #X obj 100 300 sample.play~; #X obj 200 200 sample.r; #X obj 200 300 sample.play~; #X obj 300 200 sample.r; #X obj 300 300 sample.play~; #X obj 400 200 sample.r; #X obj 400 300 sample.play~; #X obj 500 200 sample.r; #X obj 500 300 sample.play~; #X obj 600 200 sample.r; #X obj 600 300 sample.play~; #X obj 700 200 sample.r; #X obj 700 300 sample.play~; #X obj 800 200 sample.r; #X obj 800 300 sample.play~; #X obj 900 200 sample.r; #X obj 900 300 sample.play~; #X obj 1000 200 sample.r; #X obj 1000 300 sample.play~; #X obj 1100 200 sample.r; #X obj 1100 300 sample.play~; #X obj 1200 200 sample.r; #X obj 1200 300 sample.play~; #X obj 1300 200 sample.r; #X obj 1300 300 sample.play~; #X obj 1400 200 sample.r; #X obj 1400 300 sample.play~; #X obj 1500 200 sample.r; #X obj 1500 300 sample.play~; #X obj 1600 200 sample.r; #X obj 1600 300 sample.play~; #X obj 0 500 outlet~; #X obj 120 500 outlet~; #X obj 0 0 inlet; #X obj 120 0 inlet; #X obj 776 506 outlet; #X connect 0 0 2 0; #X connect 0 1 4 0; #X connect 0 2 6 0; #X connect 0 3 8 0; #X connect 0 4 10 0; #X connect 0 5 12 0; #X connect 0 6 14 0; #X connect 0 7 16 0; #X connect 0 8 18 0; #X connect 0 9 20 0; #X connect 0 10 22 0; #X connect 0 11 24 0; #X connect 0 12 26 0; #X connect 0 13 28 0; #X connect 0 14 30 0; #X connect 0 15 32 0; #X connect 0 16 34 0; #X connect 0 17 40 0; #X connect 1 0 3 1; #X connect 1 1 5 1; #X connect 1 2 7 1; #X connect 1 3 9 1; #X connect 1 4 11 1; #X connect 1 5 13 1; #X connect 1 6 15 1; #X connect 1 7 17 1; #X connect 1 8 19 1; #X connect 1 9 21 1; #X connect 1 10 23 1; #X connect 1 11 25 1; #X connect 1 12 27 1; #X connect 1 13 29 1; #X connect 1 14 31 1; #X connect 1 15 33 1; #X connect 1 16 35 1; #X connect 1 17 3 1; #X connect 1 17 5 1; #X connect 1 17 7 1; #X connect 1 17 9 1; #X connect 1 17 11 1; #X connect 1 17 13 1; #X connect 1 17 15 1; #X connect 1 17 17 1; #X connect 1 17 19 1; #X connect 1 17 21 1; #X connect 1 17 23 1; #X connect 1 17 25 1; #X connect 1 17 27 1; #X connect 1 17 29 1; #X connect 1 17 31 1; #X connect 1 17 33 1; #X connect 1 17 35 1; #X connect 2 0 3 0; #X connect 3 0 36 0; #X connect 3 1 37 0; #X connect 4 0 5 0; #X connect 5 0 36 0; #X connect 5 1 37 0; #X connect 6 0 7 0; #X connect 7 0 36 0; #X connect 7 1 37 0; #X connect 8 0 9 0; #X connect 9 0 36 0; #X connect 9 1 37 0; #X connect 10 0 11 0; #X connect 11 0 36 0; #X connect 11 1 37 0; #X connect 12 0 13 0; #X connect 13 0 36 0; #X connect 13 1 37 0; #X connect 14 0 15 0; #X connect 15 0 36 0; #X connect 15 1 37 0; #X connect 16 0 17 0; #X connect 17 0 36 0; #X connect 17 1 37 0; #X connect 18 0 19 0; #X connect 19 0 36 0; #X connect 19 1 37 0; #X connect 20 0 21 0; #X connect 21 0 36 0; #X connect 21 1 37 0; #X connect 22 0 23 0; #X connect 23 0 36 0; #X connect 23 1 37 0; #X connect 24 0 25 0; #X connect 25 0 36 0; #X connect 25 1 37 0; #X connect 26 0 27 0; #X connect 27 0 36 0; #X connect 27 1 37 0; #X connect 28 0 29 0; #X connect 29 0 36 0; #X connect 29 1 37 0; #X connect 30 0 31 0; #X connect 31 0 36 0; #X connect 31 1 37 0; #X connect 32 0 33 0; #X connect 33 0 36 0; #X connect 33 1 37 0; #X connect 34 0 35 0; #X connect 35 0 36 0; #X connect 35 1 37 0; #X connect 38 0 0 0; #X connect 39 0 1 0; #X restore 106 491 pd \$0drums; #X obj 342 155 route assign; #X obj 61 102 unpack f f; #X obj 126 127 sel 0; #X obj 62 171 spigot; #X msg 126 152 0; #X obj 163 153 t b f; #X msg 148 178 1; #X obj 58 234 pack f 60 f; #X obj 3 135 flow.split 35 51; #X obj 427 260 list.length; #X obj 344 216 t a a; #X obj 427 285 == 2; #X obj 327 319 demultiplex 0 1; #X obj 427 348 list.split 1; #X obj 490 435 list append; #X obj 507 375 t b a; #X obj 490 406 init.dollar.zero.top; #X obj 374 453 list append; #X text 294 600 This is an abstraction that helped create [pd \$0drums] \, do not execute it again or you will break sample.drum.machine~. ; #X obj 354 555 print !!!!:sample.drum.machine~; #X msg 355 527 Assignement of \$3 to \$1(35-51) out of range.; #X connect 0 0 7 0; #X connect 3 0 6 0; #X connect 5 0 1 0; #X connect 5 1 2 0; #X connect 5 2 26 0; #X connect 6 0 16 0; #X connect 6 1 16 0; #X connect 7 0 14 0; #X connect 7 1 8 0; #X connect 8 0 10 0; #X connect 8 1 11 0; #X connect 9 0 13 0; #X connect 10 0 9 1; #X connect 11 0 12 0; #X connect 11 1 13 2; #X connect 12 0 9 1; #X connect 13 0 5 1; #X connect 14 0 9 0; #X connect 15 0 17 0; #X connect 16 0 18 0; #X connect 16 1 15 0; #X connect 17 0 18 1; #X connect 18 0 5 0; #X connect 18 1 19 0; #X connect 19 0 23 0; #X connect 19 1 21 0; #X connect 20 0 23 1; #X connect 21 0 22 0; #X connect 21 1 20 1; #X connect 22 0 20 0; #X connect 23 0 5 0; #X connect 26 0 25 0;
{ "pile_set_name": "Github" }
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | Hooks | ------------------------------------------------------------------------- | This file lets you define "hooks" to extend CI without hacking the core | files. Please see the user guide for info: | | http://codeigniter.com/user_guide/general/hooks.html | */ /* End of file hooks.php */ /* Location: ./application/config/hooks.php */
{ "pile_set_name": "Github" }
// Copyright (c) 2012-2015 Andre Martins // All Rights Reserved. // // This file is part of TurboParser 2.3. // // TurboParser 2.3 is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // TurboParser 2.3 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 TurboParser 2.3. If not, see <http://www.gnu.org/licenses/>. #ifndef READER_H_ #define READER_H_ #include "Instance.h" #include <fstream> using namespace std; // Abstract class for the reader. Task-specific parts should derive // from this class and implement the pure virtual methods. // The reader reads instances from a file. class Reader { public: Reader() {}; virtual ~Reader() {}; public: virtual void Open(const std::string &filepath); virtual void Close(); virtual Instance *GetNext() = 0; protected: ifstream is_; }; #endif /* READER_H_ */
{ "pile_set_name": "Github" }
.octicon { display: inline-block; vertical-align: text-top; fill: currentColor; }
{ "pile_set_name": "Github" }
package net.glowstone.net.message.play.player; import com.flowpowered.networking.Message; import lombok.Data; import org.bukkit.inventory.ItemStack; @Data public final class BlockPlacementMessage implements Message { private final int x, y, z, direction; private final ItemStack heldItem; private final int cursorX, cursorY, cursorZ; }
{ "pile_set_name": "Github" }
/** * Author......: See docs/credits.txt * License.....: MIT */ #define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" #include "inc_types.h" #include "inc_platform.cl" #include "inc_common.cl" #include "inc_rp_optimized.h" #include "inc_rp_optimized.cl" #include "inc_simd.cl" #include "inc_hash_sha1.cl" #include "inc_hash_sha256.cl" #endif #if VECT_SIZE == 1 #define uint_to_hex_upper8(i) make_u32x (l_bin2asc[(i)]) #elif VECT_SIZE == 2 #define uint_to_hex_upper8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1]) #elif VECT_SIZE == 4 #define uint_to_hex_upper8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3]) #elif VECT_SIZE == 8 #define uint_to_hex_upper8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7]) #elif VECT_SIZE == 16 #define uint_to_hex_upper8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif KERNEL_FQ void m12600_m04 (KERN_ATTR_RULES ()) { /** * modifier */ const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); /** * bin2asc table */ LOCAL_VK u32 l_bin2asc[256]; for (u32 i = lid; i < 256; i += lsz) { const u32 i0 = (i >> 0) & 15; const u32 i1 = (i >> 4) & 15; l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0; } SYNC_THREADS (); if (gid >= gid_max) return; /** * base */ u32 pw_buf0[4]; u32 pw_buf1[4]; pw_buf0[0] = pws[gid].i[ 0]; pw_buf0[1] = pws[gid].i[ 1]; pw_buf0[2] = pws[gid].i[ 2]; pw_buf0[3] = pws[gid].i[ 3]; pw_buf1[0] = pws[gid].i[ 4]; pw_buf1[1] = pws[gid].i[ 5]; pw_buf1[2] = pws[gid].i[ 6]; pw_buf1[3] = pws[gid].i[ 7]; const u32 pw_len = pws[gid].pw_len & 63; /** * salt */ u32 pc256[8]; pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; /** * loop */ for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) { u32x w0[4] = { 0 }; u32x w1[4] = { 0 }; u32x w2[4] = { 0 }; u32x w3[4] = { 0 }; const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); append_0x80_2x4_VV (w0, w1, out_len); /** * sha1 */ u32x w0_t = hc_swap32 (w0[0]); u32x w1_t = hc_swap32 (w0[1]); u32x w2_t = hc_swap32 (w0[2]); u32x w3_t = hc_swap32 (w0[3]); u32x w4_t = hc_swap32 (w1[0]); u32x w5_t = hc_swap32 (w1[1]); u32x w6_t = hc_swap32 (w1[2]); u32x w7_t = hc_swap32 (w1[3]); u32x w8_t = hc_swap32 (w2[0]); u32x w9_t = hc_swap32 (w2[1]); u32x wa_t = hc_swap32 (w2[2]); u32x wb_t = hc_swap32 (w2[3]); u32x wc_t = hc_swap32 (w3[0]); u32x wd_t = hc_swap32 (w3[1]); u32x we_t = 0; u32x wf_t = out_len * 8; u32x a = SHA1M_A; u32x b = SHA1M_B; u32x c = SHA1M_C; u32x d = SHA1M_D; u32x e = SHA1M_E; u32x f = 0; u32x g = 0; u32x h = 0; #undef K #define K SHA1C00 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t); #undef K #define K SHA1C01 w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t); #undef K #define K SHA1C02 w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t); #undef K #define K SHA1C03 wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t); a += SHA1M_A; b += SHA1M_B; c += SHA1M_C; d += SHA1M_D; e += SHA1M_E; /** * sha256 */ w0_t = uint_to_hex_upper8 ((a >> 24) & 255) << 0 | uint_to_hex_upper8 ((a >> 16) & 255) << 16; w1_t = uint_to_hex_upper8 ((a >> 8) & 255) << 0 | uint_to_hex_upper8 ((a >> 0) & 255) << 16; w2_t = uint_to_hex_upper8 ((b >> 24) & 255) << 0 | uint_to_hex_upper8 ((b >> 16) & 255) << 16; w3_t = uint_to_hex_upper8 ((b >> 8) & 255) << 0 | uint_to_hex_upper8 ((b >> 0) & 255) << 16; w4_t = uint_to_hex_upper8 ((c >> 24) & 255) << 0 | uint_to_hex_upper8 ((c >> 16) & 255) << 16; w5_t = uint_to_hex_upper8 ((c >> 8) & 255) << 0 | uint_to_hex_upper8 ((c >> 0) & 255) << 16; w6_t = uint_to_hex_upper8 ((d >> 24) & 255) << 0 | uint_to_hex_upper8 ((d >> 16) & 255) << 16; w7_t = uint_to_hex_upper8 ((d >> 8) & 255) << 0 | uint_to_hex_upper8 ((d >> 0) & 255) << 16; w8_t = uint_to_hex_upper8 ((e >> 24) & 255) << 0 | uint_to_hex_upper8 ((e >> 16) & 255) << 16; w9_t = uint_to_hex_upper8 ((e >> 8) & 255) << 0 | uint_to_hex_upper8 ((e >> 0) & 255) << 16; w0_t = hc_swap32 (w0_t); w1_t = hc_swap32 (w1_t); w2_t = hc_swap32 (w2_t); w3_t = hc_swap32 (w3_t); w4_t = hc_swap32 (w4_t); w5_t = hc_swap32 (w5_t); w6_t = hc_swap32 (w6_t); w7_t = hc_swap32 (w7_t); w8_t = hc_swap32 (w8_t); w9_t = hc_swap32 (w9_t); wa_t = 0x80000000; wb_t = 0; wc_t = 0; wd_t = 0; we_t = 0; wf_t = (64 + 40) * 8; a = pc256[0]; b = pc256[1]; c = pc256[2]; d = pc256[3]; e = pc256[4]; f = pc256[5]; g = pc256[6]; h = pc256[7]; SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C00); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C01); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C02); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C03); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C04); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C05); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C06); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C07); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C08); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C09); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C0a); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C0b); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C0c); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C0d); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C0e); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C0f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C10); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C11); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C12); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C13); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C14); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C15); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C16); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C17); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C18); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C19); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C1a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C1b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C1c); wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C1d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C1e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C1f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C20); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C21); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C22); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C23); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C24); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C25); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C26); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C27); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C28); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C29); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C2a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C2b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C2c); wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C2d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C2e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C2f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C30); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C31); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C32); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C33); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C34); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C35); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C36); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C37); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C38); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C39); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C3a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C3b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C3c); wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C3d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C3e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C3f); COMPARE_M_SIMD (d, h, c, g); } } KERNEL_FQ void m12600_m08 (KERN_ATTR_RULES ()) { } KERNEL_FQ void m12600_m16 (KERN_ATTR_RULES ()) { } KERNEL_FQ void m12600_s04 (KERN_ATTR_RULES ()) { /** * modifier */ const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); /** * bin2asc table */ LOCAL_VK u32 l_bin2asc[256]; for (u32 i = lid; i < 256; i += lsz) { const u32 i0 = (i >> 0) & 15; const u32 i1 = (i >> 4) & 15; l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0; } SYNC_THREADS (); if (gid >= gid_max) return; /** * base */ u32 pw_buf0[4]; u32 pw_buf1[4]; pw_buf0[0] = pws[gid].i[ 0]; pw_buf0[1] = pws[gid].i[ 1]; pw_buf0[2] = pws[gid].i[ 2]; pw_buf0[3] = pws[gid].i[ 3]; pw_buf1[0] = pws[gid].i[ 4]; pw_buf1[1] = pws[gid].i[ 5]; pw_buf1[2] = pws[gid].i[ 6]; pw_buf1[3] = pws[gid].i[ 7]; const u32 pw_len = pws[gid].pw_len & 63; /** * salt */ u32 pc256[8]; pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; /** * digest */ const u32 search[4] = { digests_buf[digests_offset].digest_buf[DGST_R0], digests_buf[digests_offset].digest_buf[DGST_R1], digests_buf[digests_offset].digest_buf[DGST_R2], digests_buf[digests_offset].digest_buf[DGST_R3] }; /** * loop */ for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) { u32x w0[4] = { 0 }; u32x w1[4] = { 0 }; u32x w2[4] = { 0 }; u32x w3[4] = { 0 }; const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); append_0x80_2x4_VV (w0, w1, out_len); /** * sha1 */ u32x w0_t = hc_swap32 (w0[0]); u32x w1_t = hc_swap32 (w0[1]); u32x w2_t = hc_swap32 (w0[2]); u32x w3_t = hc_swap32 (w0[3]); u32x w4_t = hc_swap32 (w1[0]); u32x w5_t = hc_swap32 (w1[1]); u32x w6_t = hc_swap32 (w1[2]); u32x w7_t = hc_swap32 (w1[3]); u32x w8_t = hc_swap32 (w2[0]); u32x w9_t = hc_swap32 (w2[1]); u32x wa_t = hc_swap32 (w2[2]); u32x wb_t = hc_swap32 (w2[3]); u32x wc_t = hc_swap32 (w3[0]); u32x wd_t = hc_swap32 (w3[1]); u32x we_t = 0; u32x wf_t = out_len * 8; u32x a = SHA1M_A; u32x b = SHA1M_B; u32x c = SHA1M_C; u32x d = SHA1M_D; u32x e = SHA1M_E; u32x f = 0; u32x g = 0; u32x h = 0; #undef K #define K SHA1C00 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t); SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t); SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t); SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t); SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t); SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t); #undef K #define K SHA1C01 w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t); #undef K #define K SHA1C02 w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t); #undef K #define K SHA1C03 wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t); w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t); w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t); w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t); w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t); w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t); w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t); w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t); w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t); w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t); w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t); wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t); wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t); wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t); wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t); we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t); wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t); a += SHA1M_A; b += SHA1M_B; c += SHA1M_C; d += SHA1M_D; e += SHA1M_E; /** * sha256 */ w0_t = uint_to_hex_upper8 ((a >> 24) & 255) << 0 | uint_to_hex_upper8 ((a >> 16) & 255) << 16; w1_t = uint_to_hex_upper8 ((a >> 8) & 255) << 0 | uint_to_hex_upper8 ((a >> 0) & 255) << 16; w2_t = uint_to_hex_upper8 ((b >> 24) & 255) << 0 | uint_to_hex_upper8 ((b >> 16) & 255) << 16; w3_t = uint_to_hex_upper8 ((b >> 8) & 255) << 0 | uint_to_hex_upper8 ((b >> 0) & 255) << 16; w4_t = uint_to_hex_upper8 ((c >> 24) & 255) << 0 | uint_to_hex_upper8 ((c >> 16) & 255) << 16; w5_t = uint_to_hex_upper8 ((c >> 8) & 255) << 0 | uint_to_hex_upper8 ((c >> 0) & 255) << 16; w6_t = uint_to_hex_upper8 ((d >> 24) & 255) << 0 | uint_to_hex_upper8 ((d >> 16) & 255) << 16; w7_t = uint_to_hex_upper8 ((d >> 8) & 255) << 0 | uint_to_hex_upper8 ((d >> 0) & 255) << 16; w8_t = uint_to_hex_upper8 ((e >> 24) & 255) << 0 | uint_to_hex_upper8 ((e >> 16) & 255) << 16; w9_t = uint_to_hex_upper8 ((e >> 8) & 255) << 0 | uint_to_hex_upper8 ((e >> 0) & 255) << 16; w0_t = hc_swap32 (w0_t); w1_t = hc_swap32 (w1_t); w2_t = hc_swap32 (w2_t); w3_t = hc_swap32 (w3_t); w4_t = hc_swap32 (w4_t); w5_t = hc_swap32 (w5_t); w6_t = hc_swap32 (w6_t); w7_t = hc_swap32 (w7_t); w8_t = hc_swap32 (w8_t); w9_t = hc_swap32 (w9_t); wa_t = 0x80000000; wb_t = 0; wc_t = 0; wd_t = 0; we_t = 0; wf_t = (64 + 40) * 8; a = pc256[0]; b = pc256[1]; c = pc256[2]; d = pc256[3]; e = pc256[4]; f = pc256[5]; g = pc256[6]; h = pc256[7]; SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C00); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C01); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C02); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C03); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C04); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C05); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C06); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C07); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C08); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C09); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C0a); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C0b); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C0c); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C0d); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C0e); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C0f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C10); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C11); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C12); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C13); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C14); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C15); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C16); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C17); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C18); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C19); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C1a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C1b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C1c); wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C1d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C1e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C1f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C20); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C21); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C22); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C23); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C24); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C25); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C26); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C27); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C28); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C29); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C2a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C2b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C2c); wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C2d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C2e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C2f); w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, SHA256C30); w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, SHA256C31); w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, SHA256C32); w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, SHA256C33); w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, SHA256C34); w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, SHA256C35); w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, SHA256C36); w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, SHA256C37); w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, SHA256C38); w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, SHA256C39); wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, SHA256C3a); wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, SHA256C3b); wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, SHA256C3c); if (MATCHES_NONE_VS (d, search[0])) continue; wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, SHA256C3d); we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, SHA256C3e); wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, SHA256C3f); COMPARE_S_SIMD (d, h, c, g); } } KERNEL_FQ void m12600_s08 (KERN_ATTR_RULES ()) { } KERNEL_FQ void m12600_s16 (KERN_ATTR_RULES ()) { }
{ "pile_set_name": "Github" }
object FormJsonRead: TFormJsonRead Left = 0 Top = 0 Caption = 'JSON Reading - Delphi 10 "Seattle"' ClientHeight = 480 ClientWidth = 640 FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] DesignerMasterStyle = 0 object ToolBar1: TToolBar Size.Width = 640.000000000000000000 Size.Height = 40.000000000000000000 Size.PlatformDefault = False TabOrder = 0 object ButtonReadTokens: TButton Position.X = 184.000000000000000000 Position.Y = 8.000000000000000000 Size.Width = 97.000000000000000000 Size.Height = 22.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Text = 'Read Tokens' OnClick = ButtonReadTokensClick end object ButtonReadReader: TButton Position.X = 360.000000000000000000 Position.Y = 8.000000000000000000 Size.Width = 121.000000000000000000 Size.Height = 22.000000000000000000 Size.PlatformDefault = False TabOrder = 1 Text = 'Read with Reader' OnClick = ButtonReadReaderClick end object ButtonReadDOM: TButton Position.X = 496.000000000000000000 Position.Y = 8.000000000000000000 Size.Width = 120.000000000000000000 Size.Height = 22.000000000000000000 Size.PlatformDefault = False TabOrder = 3 Text = 'Read with DOM' OnClick = ButtonReadDOMClick end end object MemoSrc: TMemo Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] DataDetectorTypes = [] Lines.Strings = ( '{' ' "Stocks": [' ' {' ' "symbol": "ACME",' ' "price": 75.5' ' },' ' {' ' "symbol": "COOL",' ' "price": 21.7' ' }' ' ]' '}') Align = Left Position.Y = 40.000000000000000000 Size.Width = 177.000000000000000000 Size.Height = 440.000000000000000000 Size.PlatformDefault = False TabOrder = 1 Viewport.Width = 173.000000000000000000 Viewport.Height = 436.000000000000000000 end object ListBoxTokens: TListBox Align = Left Position.X = 177.000000000000000000 Position.Y = 40.000000000000000000 Size.Width = 168.000000000000000000 Size.Height = 440.000000000000000000 Size.PlatformDefault = False TabOrder = 2 DisableFocusEffect = True DefaultItemStyles.ItemStyle = '' DefaultItemStyles.GroupHeaderStyle = '' DefaultItemStyles.GroupFooterStyle = '' Viewport.Width = 164.000000000000000000 Viewport.Height = 436.000000000000000000 end object MemoLog: TMemo Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] DataDetectorTypes = [] Align = Client Size.Width = 295.000000000000000000 Size.Height = 440.000000000000000000 Size.PlatformDefault = False TabOrder = 3 Viewport.Width = 291.000000000000000000 Viewport.Height = 436.000000000000000000 end end
{ "pile_set_name": "Github" }
/* * Copyright (c) 2007, Cameron Rich * * 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 axTLS project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "ssl/ssl_config.h" #ifdef CONFIG_SSL_GENERATE_X509_CERT #include <string.h> #include <stdlib.h> #include "ssl/ssl_os_port.h" #include "ssl/ssl_ssl.h" /** * Generate a basic X.509 certificate */ static uint8_t ICACHE_FLASH_ATTR set_gen_length(int len, uint8_t *buf, int *offset) { if (len < 0x80) /* short form */ { buf[(*offset)++] = len; return 1; } else /* long form */ { int i, length_bytes = 0; if (len & 0x00FF0000) length_bytes = 3; else if (len & 0x0000FF00) length_bytes = 2; else if (len & 0x000000FF) length_bytes = 1; buf[(*offset)++] = 0x80 + length_bytes; for (i = length_bytes-1; i >= 0; i--) { buf[*offset+i] = len & 0xFF; len >>= 8; } *offset += length_bytes; return length_bytes+1; } } static int ICACHE_FLASH_ATTR pre_adjust_with_size(uint8_t type, int *seq_offset, uint8_t *buf, int *offset) { buf[(*offset)++] = type; *seq_offset = *offset; *offset += 4; /* fill in later */ return *offset; } static void ICACHE_FLASH_ATTR adjust_with_size(int seq_size, int seq_start, uint8_t *buf, int *offset) { uint8_t seq_byte_size; int orig_seq_size = seq_size; int orig_seq_start = seq_start; seq_size = *offset-seq_size; seq_byte_size = set_gen_length(seq_size, buf, &seq_start); if (seq_byte_size != 4) { memmove(&buf[orig_seq_start+seq_byte_size], &buf[orig_seq_size], seq_size); *offset -= 4-seq_byte_size; } } static void ICACHE_FLASH_ATTR gen_serial_number(uint8_t *buf, int *offset) { static const uint8_t ser_oid[] = { ASN1_INTEGER, 1, 0x7F }; memcpy(&buf[*offset], ser_oid , sizeof(ser_oid)); *offset += sizeof(ser_oid); } static void ICACHE_FLASH_ATTR gen_signature_alg(uint8_t *buf, int *offset) { /* OBJECT IDENTIFIER sha1withRSAEncryption (1 2 840 113549 1 1 5) */ static const uint8_t sig_oid[] = { ASN1_SEQUENCE, 0x0d, ASN1_OID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, ASN1_NULL, 0x00 }; memcpy(&buf[*offset], sig_oid, sizeof(sig_oid)); *offset += sizeof(sig_oid); } static int ICACHE_FLASH_ATTR gen_dn(const char *name, uint8_t dn_type, uint8_t *buf, int *offset) { int ret = X509_OK; int name_size = strlen(name); if (name_size > 0x70) /* just too big */ { ret = X509_NOT_OK; goto error; } buf[(*offset)++] = ASN1_SET; set_gen_length(9+name_size, buf, offset); buf[(*offset)++] = ASN1_SEQUENCE; set_gen_length(7+name_size, buf, offset); buf[(*offset)++] = ASN1_OID; buf[(*offset)++] = 3; buf[(*offset)++] = 0x55; buf[(*offset)++] = 0x04; buf[(*offset)++] = dn_type; buf[(*offset)++] = ASN1_PRINTABLE_STR; buf[(*offset)++] = name_size; strcpy(&buf[*offset], name); *offset += name_size; error: return ret; } static int ICACHE_FLASH_ATTR gen_issuer(const char * dn[], uint8_t *buf, int *offset) { int ret = X509_OK; int seq_offset; int seq_size = pre_adjust_with_size( ASN1_SEQUENCE, &seq_offset, buf, offset); char fqdn[128]; /* we need the common name, so if not configured, work out the fully * qualified domain name */ if (dn[X509_COMMON_NAME] == NULL || strlen(dn[X509_COMMON_NAME]) == 0) { int fqdn_len; gethostname(fqdn, sizeof(fqdn)); fqdn_len = strlen(fqdn); fqdn[fqdn_len++] = '.'; getdomainname(&fqdn[fqdn_len], sizeof(fqdn)-fqdn_len); fqdn_len = strlen(fqdn); if (fqdn[fqdn_len-1] == '.') /* ensure '.' is not last char */ fqdn[fqdn_len-1] = 0; dn[X509_COMMON_NAME] = fqdn; } if ((ret = gen_dn(dn[X509_COMMON_NAME], 3, buf, offset))) goto error; if (dn[X509_ORGANIZATION] != NULL && strlen(dn[X509_ORGANIZATION]) > 0) { if ((ret = gen_dn(dn[X509_ORGANIZATION], 10, buf, offset))) goto error; } if (dn[X509_ORGANIZATIONAL_UNIT] != NULL && strlen(dn[X509_ORGANIZATIONAL_UNIT]) > 0) { if ((ret = gen_dn(dn[X509_ORGANIZATIONAL_UNIT], 11, buf, offset))) goto error; } adjust_with_size(seq_size, seq_offset, buf, offset); error: return ret; } static void ICACHE_FLASH_ATTR gen_utc_time(uint8_t *buf, int *offset) { static const uint8_t time_seq[] = { ASN1_SEQUENCE, 30, ASN1_UTC_TIME, 13, '0', '7', '0', '1', '0', '1', '0', '0', '0', '0', '0', '0', 'Z', ASN1_UTC_TIME, 13, /* make it good for 30 or so years */ '3', '8', '0', '1', '0', '1', '0', '0', '0', '0', '0', '0', 'Z' }; /* fixed time */ memcpy(&buf[*offset], time_seq, sizeof(time_seq)); *offset += sizeof(time_seq); } static void ICACHE_FLASH_ATTR gen_pub_key2(const RSA_CTX *rsa_ctx, uint8_t *buf, int *offset) { static const uint8_t pub_key_seq[] = { ASN1_INTEGER, 0x03, 0x01, 0x00, 0x01 /* INTEGER 65537 */ }; int seq_offset; int pub_key_size = rsa_ctx->num_octets; uint8_t *block = (uint8_t *)alloca(pub_key_size); int seq_size = pre_adjust_with_size( ASN1_SEQUENCE, &seq_offset, buf, offset); buf[(*offset)++] = ASN1_INTEGER; bi_export(rsa_ctx->bi_ctx, rsa_ctx->m, block, pub_key_size); if (*block & 0x80) /* make integer positive */ { set_gen_length(pub_key_size+1, buf, offset); buf[(*offset)++] = 0; } else set_gen_length(pub_key_size, buf, offset); memcpy(&buf[*offset], block, pub_key_size); *offset += pub_key_size; memcpy(&buf[*offset], pub_key_seq, sizeof(pub_key_seq)); *offset += sizeof(pub_key_seq); adjust_with_size(seq_size, seq_offset, buf, offset); } static void ICACHE_FLASH_ATTR gen_pub_key1(const RSA_CTX *rsa_ctx, uint8_t *buf, int *offset) { int seq_offset; int seq_size = pre_adjust_with_size( ASN1_BIT_STRING, &seq_offset, buf, offset); buf[(*offset)++] = 0; /* bit string is multiple of 8 */ gen_pub_key2(rsa_ctx, buf, offset); adjust_with_size(seq_size, seq_offset, buf, offset); } static void ICACHE_FLASH_ATTR gen_pub_key(const RSA_CTX *rsa_ctx, uint8_t *buf, int *offset) { /* OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1) */ static const uint8_t rsa_enc_oid[] = { ASN1_SEQUENCE, 0x0d, ASN1_OID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, ASN1_NULL, 0x00 }; int seq_offset; int seq_size = pre_adjust_with_size( ASN1_SEQUENCE, &seq_offset, buf, offset); memcpy(&buf[*offset], rsa_enc_oid, sizeof(rsa_enc_oid)); *offset += sizeof(rsa_enc_oid); gen_pub_key1(rsa_ctx, buf, offset); adjust_with_size(seq_size, seq_offset, buf, offset); } static void ICACHE_FLASH_ATTR gen_signature(const RSA_CTX *rsa_ctx, const uint8_t *sha_dgst, uint8_t *buf, int *offset) { static const uint8_t asn1_sig[] = { ASN1_SEQUENCE, 0x21, ASN1_SEQUENCE, 0x09, ASN1_OID, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, /* sha1 (1 3 14 3 2 26) */ ASN1_NULL, 0x00, ASN1_OCTET_STRING, 0x14 }; uint8_t *enc_block = (uint8_t *)alloca(rsa_ctx->num_octets); uint8_t *block = (uint8_t *)alloca(sizeof(asn1_sig) + SHA1_SIZE); int sig_size; /* add the digest as an embedded asn.1 sequence */ memcpy(block, asn1_sig, sizeof(asn1_sig)); memcpy(&block[sizeof(asn1_sig)], sha_dgst, SHA1_SIZE); sig_size = RSA_encrypt(rsa_ctx, block, sizeof(asn1_sig) + SHA1_SIZE, enc_block, 1); buf[(*offset)++] = ASN1_BIT_STRING; set_gen_length(sig_size+1, buf, offset); buf[(*offset)++] = 0; /* bit string is multiple of 8 */ memcpy(&buf[*offset], enc_block, sig_size); *offset += sig_size; } static int ICACHE_FLASH_ATTR gen_tbs_cert(const char * dn[], const RSA_CTX *rsa_ctx, uint8_t *buf, int *offset, uint8_t *sha_dgst) { int ret = X509_OK; SHA1_CTX sha_ctx; int seq_offset; int begin_tbs = *offset; int seq_size = pre_adjust_with_size( ASN1_SEQUENCE, &seq_offset, buf, offset); gen_serial_number(buf, offset); gen_signature_alg(buf, offset); /* CA certicate issuer */ if ((ret = gen_issuer(dn, buf, offset))) goto error; gen_utc_time(buf, offset); /* certificate issuer */ if ((ret = gen_issuer(dn, buf, offset))) goto error; gen_pub_key(rsa_ctx, buf, offset); adjust_with_size(seq_size, seq_offset, buf, offset); SHA1_Init(&sha_ctx); SHA1_Update(&sha_ctx, &buf[begin_tbs], *offset-begin_tbs); SHA1_Final(sha_dgst, &sha_ctx); error: return ret; } /** * Create a new certificate. */ EXP_FUNC int ICACHE_FLASH_ATTR STDCALL ssl_x509_create(SSL_CTX *ssl_ctx, uint32_t options, const char * dn[], uint8_t **cert_data) { int ret = X509_OK, offset = 0, seq_offset; /* allocate enough space to load a new certificate */ uint8_t *buf = (uint8_t *)alloca(ssl_ctx->rsa_ctx->num_octets*2 + 512); uint8_t sha_dgst[SHA1_SIZE]; int seq_size = pre_adjust_with_size(ASN1_SEQUENCE, &seq_offset, buf, &offset); if ((ret = gen_tbs_cert(dn, ssl_ctx->rsa_ctx, buf, &offset, sha_dgst)) < 0) goto error; gen_signature_alg(buf, &offset); gen_signature(ssl_ctx->rsa_ctx, sha_dgst, buf, &offset); adjust_with_size(seq_size, seq_offset, buf, &offset); *cert_data = (uint8_t *)malloc(offset); /* create the exact memory for it */ memcpy(*cert_data, buf, offset); error: return ret < 0 ? ret : offset; } #endif
{ "pile_set_name": "Github" }
/* The MIT License (MIT) Copyright (c) 2017 Microsoft Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ "use strict"; var Base = require("../base") , QueryMetrics = require("../queryMetrics/queryMetrics.js") , ClientSideMetrics = require("../queryMetrics/clientSideMetrics.js") , Constants = require("../constants") , HeaderUtils = require('./headerUtils'); //SCRIPT START var DefaultQueryExecutionContext = Base.defineClass( /** * Provides the basic Query Execution Context. This wraps the internal logic query execution using provided fetch functions * @constructor DefaultQueryExecutionContext * @param {DocumentClient} documentclient - The service endpoint to use to create the client. * @param {SqlQuerySpec | string} query - A SQL query. * @param {FeedOptions} [options] - Represents the feed options. * @param {callback | callback[]} fetchFunctions - A function to retrieve each page of data. An array of functions may be used to query more than one partition. * @ignore */ function(documentclient, query, options, fetchFunctions){ this.documentclient = documentclient; this.query = query; this.resources = []; this.currentIndex = 0; this.currentPartitionIndex = 0; this.fetchFunctions = (Array.isArray(fetchFunctions)) ? fetchFunctions : [fetchFunctions]; this.options = options || {}; this.continuation = this.options.continuation || null; this.state = DefaultQueryExecutionContext.STATES.start; }, { /** * Execute a provided callback on the next element in the execution context. * @memberof DefaultQueryExecutionContext * @instance * @param {callback} callback - Function to execute for each element. the function takes two parameters error, element. */ nextItem: function (callback) { var that = this; this.current(function (err, resources, headers) { ++that.currentIndex; callback(err, resources, headers); }); }, /** * Retrieve the current element on the execution context. * @memberof DefaultQueryExecutionContext * @instance * @param {callback} callback - Function to execute for the current element. the function takes two parameters error, element. */ current: function(callback) { var that = this; if (this.currentIndex < this.resources.length) { return callback(undefined, this.resources[this.currentIndex], HeaderUtils.getInitialHeader()); } if (this._canFetchMore()) { this.fetchMore(function (err, resources, headers) { if (err) { return callback(err, undefined, headers); } that.resources = resources; if (that.resources.length === 0) { if (!that.continuation && that.currentPartitionIndex >= that.fetchFunctions.length) { that.state = DefaultQueryExecutionContext.STATES.ended; callback(undefined, undefined, headers); } else { that.current(callback); } return undefined; } callback(undefined, that.resources[that.currentIndex], headers); }); } else { this.state = DefaultQueryExecutionContext.STATES.ended; callback(undefined, undefined, HeaderUtils.getInitialHeader()); } }, /** * Determine if there are still remaining resources to processs based on the value of the continuation token or the elements remaining on the current batch in the execution context. * @memberof DefaultQueryExecutionContext * @instance * @returns {Boolean} true if there is other elements to process in the DefaultQueryExecutionContext. */ hasMoreResults: function () { return this.state === DefaultQueryExecutionContext.STATES.start || this.continuation !== undefined || this.currentIndex < this.resources.length || this.currentPartitionIndex < this.fetchFunctions.length; }, /** * Fetches the next batch of the feed and pass them as an array to a callback * @memberof DefaultQueryExecutionContext * @instance * @param {callback} callback - Function execute on the feed response, takes two parameters error, resourcesList */ fetchMore: function (callback) { if (this.currentPartitionIndex >= this.fetchFunctions.length) { return callback(undefined, undefined, HeaderUtils.getInitialHeader()); } var that = this; // Keep to the original continuation and to restore the value after fetchFunction call var originalContinuation = this.options.continuation; this.options.continuation = this.continuation; // Return undefined if there is no more results if (this.currentPartitionIndex >= that.fetchFunctions.length) { return callback(undefined, undefined, HeaderUtils.getInitialHeader()); } var fetchFunction = this.fetchFunctions[this.currentPartitionIndex]; fetchFunction(this.options, function(err, resources, responseHeaders){ if(err) { that.state = DefaultQueryExecutionContext.STATES.ended; return callback(err, undefined, responseHeaders); } that.continuation = responseHeaders[Constants.HttpHeaders.Continuation]; if (!that.continuation) { ++that.currentPartitionIndex; } that.state = DefaultQueryExecutionContext.STATES.inProgress; that.currentIndex = 0; that.options.continuation = originalContinuation; // deserializing query metrics so that we aren't working with delimited strings in the rest of the code base if (Constants.HttpHeaders.QueryMetrics in responseHeaders) { var delimitedString = responseHeaders[Constants.HttpHeaders.QueryMetrics]; var queryMetrics = QueryMetrics.createFromDelimitedString(delimitedString); // Add the request charge to the query metrics so that we can have per partition request charge. if (Constants.HttpHeaders.RequestCharge in responseHeaders) { queryMetrics = new QueryMetrics( queryMetrics._getRetrievedDocumentCount(), queryMetrics._getRetrievedDocumentSize(), queryMetrics._getOutputDocumentCount(), queryMetrics._getOutputDocumentSize(), queryMetrics._getIndexHitDocumentCount(), queryMetrics._getTotalQueryExecutionTime(), queryMetrics._getQueryPreparationTimes(), queryMetrics._getIndexLookupTime(), queryMetrics._getDocumentLoadTime(), queryMetrics._getVMExecutionTime(), queryMetrics._getRuntimeExecutionTimes(), queryMetrics._getDocumentWriteTime(), new ClientSideMetrics(responseHeaders[Constants.HttpHeaders.RequestCharge])); } // Wraping query metrics in a object where the key is '0' just so single partition and partition queries have the same response schema responseHeaders[Constants.HttpHeaders.QueryMetrics] = {}; responseHeaders[Constants.HttpHeaders.QueryMetrics]["0"] = queryMetrics; } callback(undefined, resources, responseHeaders); }); }, _canFetchMore: function () { var res = (this.state === DefaultQueryExecutionContext.STATES.start || (this.continuation && this.state === DefaultQueryExecutionContext.STATES.inProgress) || (this.currentPartitionIndex < this.fetchFunctions.length && this.state === DefaultQueryExecutionContext.STATES.inProgress)); return res; } }, { STATES: Object.freeze({ start: "start", inProgress: "inProgress", ended: "ended" }) } ); //SCRIPT END if (typeof exports !== "undefined") { module.exports = DefaultQueryExecutionContext; }
{ "pile_set_name": "Github" }
K 25 svn:wc:ra_dav:version-url V 53 /svn/!svn/ver/1916/toolbox/base/src/java/org/tartarus END
{ "pile_set_name": "Github" }
/** Used to match template delimiters. */ var reEscape = /<%-([\s\S]+?)%>/g; module.exports = reEscape;
{ "pile_set_name": "Github" }
/* * Copyright [2017] Wikimedia Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.o19s.es.ltr.utils; import com.o19s.es.ltr.ranker.LtrRanker; import org.elasticsearch.Assertions; import java.util.Objects; import java.util.function.Supplier; public final class Suppliers { /** * Utility class */ private Suppliers() {} /** * @param supplier the original supplier to store * @param <E> the supplied type * @return a supplier storing and returning the same instance */ public static <E> Supplier<E> memoize(Supplier<E> supplier) { return new MemoizeSupplier<>(supplier); } private static class MemoizeSupplier<E> implements Supplier<E> { private volatile boolean initialized = false; private final Supplier<E> supplier; private E value; MemoizeSupplier(Supplier<E> supplier) { this.supplier = Objects.requireNonNull(supplier); } @Override public E get() { if (!initialized) { synchronized (this) { if (!initialized) { E t = supplier.get(); value = t; initialized = true; return t; } } } return value; } } /** * A mutable supplier */ public static class MutableSupplier<T> implements Supplier<T> { T obj; @Override public T get() { return obj; } public void set(T obj) { this.obj = obj; } } /** * Simple wrapper to make sure we run on the same thread */ public static class FeatureVectorSupplier extends MutableSupplier<LtrRanker.FeatureVector> { private final long threadId = Assertions.ENABLED ? Thread.currentThread().getId() : 0; public LtrRanker.FeatureVector get() { assert threadId == Thread.currentThread().getId(); return super.get(); } @Override public void set(LtrRanker.FeatureVector obj) { assert threadId == Thread.currentThread().getId(); super.set(obj); } } }
{ "pile_set_name": "Github" }
# Config file for running tests in Kokoro # Location of the build script in repository build_file: "protobuf/kokoro/macos/objectivec_cocoapods_integration/build.sh" timeout_mins: 1440
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0-only /* * Clock driver for Hi655x * * Copyright (c) 2017, Linaro Ltd. * * Author: Daniel Lezcano <[email protected]> */ #include <linux/clk-provider.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/mfd/core.h> #include <linux/mfd/hi655x-pmic.h> #define HI655X_CLK_BASE HI655X_BUS_ADDR(0x1c) #define HI655X_CLK_SET BIT(6) struct hi655x_clk { struct hi655x_pmic *hi655x; struct clk_hw clk_hw; }; static unsigned long hi655x_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { return 32768; } static int hi655x_clk_enable(struct clk_hw *hw, bool enable) { struct hi655x_clk *hi655x_clk = container_of(hw, struct hi655x_clk, clk_hw); struct hi655x_pmic *hi655x = hi655x_clk->hi655x; return regmap_update_bits(hi655x->regmap, HI655X_CLK_BASE, HI655X_CLK_SET, enable ? HI655X_CLK_SET : 0); } static int hi655x_clk_prepare(struct clk_hw *hw) { return hi655x_clk_enable(hw, true); } static void hi655x_clk_unprepare(struct clk_hw *hw) { hi655x_clk_enable(hw, false); } static int hi655x_clk_is_prepared(struct clk_hw *hw) { struct hi655x_clk *hi655x_clk = container_of(hw, struct hi655x_clk, clk_hw); struct hi655x_pmic *hi655x = hi655x_clk->hi655x; int ret; uint32_t val; ret = regmap_read(hi655x->regmap, HI655X_CLK_BASE, &val); if (ret < 0) return ret; return val & HI655X_CLK_BASE; } static const struct clk_ops hi655x_clk_ops = { .prepare = hi655x_clk_prepare, .unprepare = hi655x_clk_unprepare, .is_prepared = hi655x_clk_is_prepared, .recalc_rate = hi655x_clk_recalc_rate, }; static int hi655x_clk_probe(struct platform_device *pdev) { struct device *parent = pdev->dev.parent; struct hi655x_pmic *hi655x = dev_get_drvdata(parent); struct hi655x_clk *hi655x_clk; const char *clk_name = "hi655x-clk"; struct clk_init_data init = { .name = clk_name, .ops = &hi655x_clk_ops }; int ret; hi655x_clk = devm_kzalloc(&pdev->dev, sizeof(*hi655x_clk), GFP_KERNEL); if (!hi655x_clk) return -ENOMEM; of_property_read_string_index(parent->of_node, "clock-output-names", 0, &clk_name); hi655x_clk->clk_hw.init = &init; hi655x_clk->hi655x = hi655x; platform_set_drvdata(pdev, hi655x_clk); ret = devm_clk_hw_register(&pdev->dev, &hi655x_clk->clk_hw); if (ret) return ret; return devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, &hi655x_clk->clk_hw); } static struct platform_driver hi655x_clk_driver = { .probe = hi655x_clk_probe, .driver = { .name = "hi655x-clk", }, }; module_platform_driver(hi655x_clk_driver); MODULE_DESCRIPTION("Clk driver for the hi655x series PMICs"); MODULE_AUTHOR("Daniel Lezcano <[email protected]>"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:hi655x-clk");
{ "pile_set_name": "Github" }
/* * arch/arm/kernel/sys_oabi-compat.c * * Compatibility wrappers for syscalls that are used from * old ABI user space binaries with an EABI kernel. * * Author: Nicolas Pitre * Created: Oct 7, 2005 * Copyright: MontaVista Software, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ /* * The legacy ABI and the new ARM EABI have different rules making some * syscalls incompatible especially with structure arguments. * Most notably, Eabi says 64-bit members should be 64-bit aligned instead of * simply word aligned. EABI also pads structures to the size of the largest * member it contains instead of the invariant 32-bit. * * The following syscalls are affected: * * sys_stat64: * sys_lstat64: * sys_fstat64: * sys_fstatat64: * * struct stat64 has different sizes and some members are shifted * Compatibility wrappers are needed for them and provided below. * * sys_fcntl64: * * struct flock64 has different sizes and some members are shifted * A compatibility wrapper is needed and provided below. * * sys_statfs64: * sys_fstatfs64: * * struct statfs64 has extra padding with EABI growing its size from * 84 to 88. This struct is now __attribute__((packed,aligned(4))) * with a small assembly wrapper to force the sz argument to 84 if it is 88 * to avoid copying the extra padding over user space unexpecting it. * * sys_newuname: * * struct new_utsname has no padding with EABI. No problem there. * * sys_epoll_ctl: * sys_epoll_wait: * * struct epoll_event has its second member shifted also affecting the * structure size. Compatibility wrappers are needed and provided below. * * sys_ipc: * sys_semop: * sys_semtimedop: * * struct sembuf loses its padding with EABI. Since arrays of them are * used they have to be copyed to remove the padding. Compatibility wrappers * provided below. * * sys_bind: * sys_connect: * sys_sendmsg: * sys_sendto: * sys_socketcall: * * struct sockaddr_un loses its padding with EABI. Since the size of the * structure is used as a validation test in unix_mkname(), we need to * change the length argument to 110 whenever it is 112. Compatibility * wrappers provided below. */ #include <linux/syscalls.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/fcntl.h> #include <linux/eventpoll.h> #include <linux/sem.h> #include <linux/socket.h> #include <linux/net.h> #include <linux/ipc.h> #include <linux/uaccess.h> #include <linux/slab.h> struct oldabi_stat64 { unsigned long long st_dev; unsigned int __pad1; unsigned long __st_ino; unsigned int st_mode; unsigned int st_nlink; unsigned long st_uid; unsigned long st_gid; unsigned long long st_rdev; unsigned int __pad2; long long st_size; unsigned long st_blksize; unsigned long long st_blocks; unsigned long st_atime; unsigned long st_atime_nsec; unsigned long st_mtime; unsigned long st_mtime_nsec; unsigned long st_ctime; unsigned long st_ctime_nsec; unsigned long long st_ino; } __attribute__ ((packed,aligned(4))); static long cp_oldabi_stat64(struct kstat *stat, struct oldabi_stat64 __user *statbuf) { struct oldabi_stat64 tmp; tmp.st_dev = huge_encode_dev(stat->dev); tmp.__pad1 = 0; tmp.__st_ino = stat->ino; tmp.st_mode = stat->mode; tmp.st_nlink = stat->nlink; tmp.st_uid = stat->uid; tmp.st_gid = stat->gid; tmp.st_rdev = huge_encode_dev(stat->rdev); tmp.st_size = stat->size; tmp.st_blocks = stat->blocks; tmp.__pad2 = 0; tmp.st_blksize = stat->blksize; tmp.st_atime = stat->atime.tv_sec; tmp.st_atime_nsec = stat->atime.tv_nsec; tmp.st_mtime = stat->mtime.tv_sec; tmp.st_mtime_nsec = stat->mtime.tv_nsec; tmp.st_ctime = stat->ctime.tv_sec; tmp.st_ctime_nsec = stat->ctime.tv_nsec; tmp.st_ino = stat->ino; return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } asmlinkage long sys_oabi_stat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) { struct kstat stat; int error = vfs_stat(filename, &stat); if (!error) error = cp_oldabi_stat64(&stat, statbuf); return error; } asmlinkage long sys_oabi_lstat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) { struct kstat stat; int error = vfs_lstat(filename, &stat); if (!error) error = cp_oldabi_stat64(&stat, statbuf); return error; } asmlinkage long sys_oabi_fstat64(unsigned long fd, struct oldabi_stat64 __user * statbuf) { struct kstat stat; int error = vfs_fstat(fd, &stat); if (!error) error = cp_oldabi_stat64(&stat, statbuf); return error; } asmlinkage long sys_oabi_fstatat64(int dfd, const char __user *filename, struct oldabi_stat64 __user *statbuf, int flag) { struct kstat stat; int error; error = vfs_fstatat(dfd, filename, &stat, flag); if (error) return error; return cp_oldabi_stat64(&stat, statbuf); } struct oabi_flock64 { short l_type; short l_whence; loff_t l_start; loff_t l_len; pid_t l_pid; } __attribute__ ((packed,aligned(4))); asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) { struct oabi_flock64 user; struct flock64 kernel; mm_segment_t fs = USER_DS; /* initialized to kill a warning */ unsigned long local_arg = arg; int ret; switch (cmd) { case F_GETLK64: case F_SETLK64: case F_SETLKW64: if (copy_from_user(&user, (struct oabi_flock64 __user *)arg, sizeof(user))) return -EFAULT; kernel.l_type = user.l_type; kernel.l_whence = user.l_whence; kernel.l_start = user.l_start; kernel.l_len = user.l_len; kernel.l_pid = user.l_pid; local_arg = (unsigned long)&kernel; fs = get_fs(); set_fs(KERNEL_DS); } ret = sys_fcntl64(fd, cmd, local_arg); switch (cmd) { case F_GETLK64: if (!ret) { user.l_type = kernel.l_type; user.l_whence = kernel.l_whence; user.l_start = kernel.l_start; user.l_len = kernel.l_len; user.l_pid = kernel.l_pid; if (copy_to_user((struct oabi_flock64 __user *)arg, &user, sizeof(user))) ret = -EFAULT; } case F_SETLK64: case F_SETLKW64: set_fs(fs); } return ret; } struct oabi_epoll_event { __u32 events; __u64 data; } __attribute__ ((packed,aligned(4))); asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, struct oabi_epoll_event __user *event) { struct oabi_epoll_event user; struct epoll_event kernel; mm_segment_t fs; long ret; if (op == EPOLL_CTL_DEL) return sys_epoll_ctl(epfd, op, fd, NULL); if (copy_from_user(&user, event, sizeof(user))) return -EFAULT; kernel.events = user.events; kernel.data = user.data; fs = get_fs(); set_fs(KERNEL_DS); ret = sys_epoll_ctl(epfd, op, fd, &kernel); set_fs(fs); return ret; } asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event __user *events, int maxevents, int timeout) { struct epoll_event *kbuf; mm_segment_t fs; long ret, err, i; if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event))) return -EINVAL; kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL); if (!kbuf) return -ENOMEM; fs = get_fs(); set_fs(KERNEL_DS); ret = sys_epoll_wait(epfd, kbuf, maxevents, timeout); set_fs(fs); err = 0; for (i = 0; i < ret; i++) { __put_user_error(kbuf[i].events, &events->events, err); __put_user_error(kbuf[i].data, &events->data, err); events++; } kfree(kbuf); return err ? -EFAULT : ret; } struct oabi_sembuf { unsigned short sem_num; short sem_op; short sem_flg; unsigned short __pad; }; asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf __user *tsops, unsigned nsops, const struct timespec __user *timeout) { struct sembuf *sops; struct timespec local_timeout; long err; int i; if (nsops < 1 || nsops > SEMOPM) return -EINVAL; sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); if (!sops) return -ENOMEM; err = 0; for (i = 0; i < nsops; i++) { __get_user_error(sops[i].sem_num, &tsops->sem_num, err); __get_user_error(sops[i].sem_op, &tsops->sem_op, err); __get_user_error(sops[i].sem_flg, &tsops->sem_flg, err); tsops++; } if (timeout) { /* copy this as well before changing domain protection */ err |= copy_from_user(&local_timeout, timeout, sizeof(*timeout)); timeout = &local_timeout; } if (err) { err = -EFAULT; } else { mm_segment_t fs = get_fs(); set_fs(KERNEL_DS); err = sys_semtimedop(semid, sops, nsops, timeout); set_fs(fs); } kfree(sops); return err; } asmlinkage long sys_oabi_semop(int semid, struct oabi_sembuf __user *tsops, unsigned nsops) { return sys_oabi_semtimedop(semid, tsops, nsops, NULL); } asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third, void __user *ptr, long fifth) { switch (call & 0xffff) { case SEMOP: return sys_oabi_semtimedop(first, (struct oabi_sembuf __user *)ptr, second, NULL); case SEMTIMEDOP: return sys_oabi_semtimedop(first, (struct oabi_sembuf __user *)ptr, second, (const struct timespec __user *)fifth); default: return sys_ipc(call, first, second, third, ptr, fifth); } } asmlinkage long sys_oabi_bind(int fd, struct sockaddr __user *addr, int addrlen) { sa_family_t sa_family; if (addrlen == 112 && get_user(sa_family, &addr->sa_family) == 0 && sa_family == AF_UNIX) addrlen = 110; return sys_bind(fd, addr, addrlen); } asmlinkage long sys_oabi_connect(int fd, struct sockaddr __user *addr, int addrlen) { sa_family_t sa_family; if (addrlen == 112 && get_user(sa_family, &addr->sa_family) == 0 && sa_family == AF_UNIX) addrlen = 110; return sys_connect(fd, addr, addrlen); } asmlinkage long sys_oabi_sendto(int fd, void __user *buff, size_t len, unsigned flags, struct sockaddr __user *addr, int addrlen) { sa_family_t sa_family; if (addrlen == 112 && get_user(sa_family, &addr->sa_family) == 0 && sa_family == AF_UNIX) addrlen = 110; return sys_sendto(fd, buff, len, flags, addr, addrlen); } asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) { struct sockaddr __user *addr; int msg_namelen; sa_family_t sa_family; if (msg && get_user(msg_namelen, &msg->msg_namelen) == 0 && msg_namelen == 112 && get_user(addr, &msg->msg_name) == 0 && get_user(sa_family, &addr->sa_family) == 0 && sa_family == AF_UNIX) { /* * HACK ALERT: there is a limit to how much backward bending * we should do for what is actually a transitional * compatibility layer. This already has known flaws with * a few ioctls that we don't intend to fix. Therefore * consider this blatent hack as another one... and take care * to run for cover. In most cases it will "just work fine". * If it doesn't, well, tough. */ put_user(110, &msg->msg_namelen); } return sys_sendmsg(fd, msg, flags); } asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args) { unsigned long r = -EFAULT, a[6]; switch (call) { case SYS_BIND: if (copy_from_user(a, args, 3 * sizeof(long)) == 0) r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]); break; case SYS_CONNECT: if (copy_from_user(a, args, 3 * sizeof(long)) == 0) r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]); break; case SYS_SENDTO: if (copy_from_user(a, args, 6 * sizeof(long)) == 0) r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3], (struct sockaddr __user *)a[4], a[5]); break; case SYS_SENDMSG: if (copy_from_user(a, args, 3 * sizeof(long)) == 0) r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]); break; default: r = sys_socketcall(call, args); } return r; }
{ "pile_set_name": "Github" }
{ "name": "@polymer/polymer", "version": "2.6.0", "description": "The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to write", "main": "polymer.html", "directories": { "doc": "docs", "test": "test" }, "devDependencies": { "@polymer/gen-closure-declarations": "^0.4.0", "@polymer/gen-typescript-declarations": "^1.2.0", "@webcomponents/shadycss": "^1.1.0", "@webcomponents/webcomponentsjs": "^1.1.0", "babel-preset-minify": "^0.2.0", "del": "^3.0.0", "dom5": "^3.0.0", "eslint-plugin-html": "^4.0.1", "fs-extra": "^5.0.0", "google-closure-compiler": "^20180204.0.0", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", "gulp-eslint": "^4.0.0", "gulp-if": "^2.0.1", "gulp-replace": "^0.6.1", "gulp-size": "^3.0.0", "gulp-vulcanize": "^7.0.0", "lazypipe": "^1.0.1", "merge-stream": "^1.0.1", "parse5": "^4.0.0", "polymer-build": "^2.1.1", "run-sequence": "^2.2.0", "through2": "^2.0.0", "web-component-tester": "^6.5.0" }, "scripts": { "build": "gulp", "test": "npm run lint && wct", "lint": "gulp lint", "version": "gulp update-version && git add lib/utils/boot.html", "update-types": "gulp update-types" }, "repository": { "type": "git", "url": "https://github.com/Polymer/polymer.git" }, "author": "The Polymer Project Authors", "license": "BSD-3-Clause", "bugs": { "url": "https://github.com/Polymer/polymer/issues" }, "homepage": "https://github.com/Polymer/polymer", "publishConfig": { "access": "public" } }
{ "pile_set_name": "Github" }
package org.apache.lucene.analysis.shingle; /** * 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. */ import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.NoSuchElementException; import java.util.Set; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.miscellaneous.EmptyTokenStream; import org.apache.lucene.analysis.payloads.PayloadHelper; import org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.TypeAttribute; import org.apache.lucene.index.Payload; /** * <p>A ShingleMatrixFilter constructs shingles (token n-grams) from a token stream. * In other words, it creates combinations of tokens as a single token. * * <p>For example, the sentence "please divide this sentence into shingles" * might be tokenized into shingles "please divide", "divide this", * "this sentence", "sentence into", and "into shingles". * * <p>Using a shingle filter at index and query time can in some instances * be used to replace phrase queries, especially them with 0 slop. * * <p>Without a spacer character * it can be used to handle composition and decomposition of words * such as searching for "multi dimensional" instead of "multidimensional". * It is a rather common human problem at query time * in several languages, notably the northern Germanic branch. * * <p>Shingles are amongst many things also known to solve problems * in spell checking, language detection and document clustering. * * <p>This filter is backed by a three dimensional column oriented matrix * used to create permutations of the second dimension, the rows, * and leaves the third, the z-axis, for for multi token synonyms. * * <p>In order to use this filter you need to define a way of positioning * the input stream tokens in the matrix. This is done using a * {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec}. * There are three simple implementations for demonstrational purposes, * see {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec}, * {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec} * and {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec}. * * <p>Consider this token matrix: * <pre> * Token[column][row][z-axis]{ * {{hello}, {greetings, and, salutations}}, * {{world}, {earth}, {tellus}} * }; * </pre> * * It would produce the following 2-3 gram sized shingles: * * <pre> * "hello_world" * "greetings_and" * "greetings_and_salutations" * "and_salutations" * "and_salutations_world" * "salutations_world" * "hello_earth" * "and_salutations_earth" * "salutations_earth" * "hello_tellus" * "and_salutations_tellus" * "salutations_tellus" * </pre> * * <p>This implementation can be rather heap demanding * if (maximum shingle size - minimum shingle size) is a great number and the stream contains many columns, * or if each column contains a great number of rows. * * <p>The problem is that in order avoid producing duplicates * the filter needs to keep track of any shingle already produced and returned to the consumer. * * There is a bit of resource management to handle this * but it would of course be much better if the filter was written * so it never created the same shingle more than once in the first place. * * <p>The filter also has basic support for calculating weights for the shingles * based on the weights of the tokens from the input stream, output shingle size, etc. * See {@link #calculateShingleWeight(org.apache.lucene.analysis.Token, java.util.List, int, java.util.List, java.util.List)}. * <p/> * @deprecated Will be removed in Lucene 4.0. This filter is unmaintained and might not behave * correctly if used with custom Attributes, i.e. Attributes other than * the ones located in <code>org.apache.lucene.analysis.tokenattributes</code>. It also uses * hardcoded payload encoders which makes it not easily adaptable to other use-cases. */ @Deprecated public final class ShingleMatrixFilter extends TokenStream { public static Character defaultSpacerCharacter = Character.valueOf('_'); public static TokenSettingsCodec defaultSettingsCodec = new OneDimensionalNonWeightedTokenSettingsCodec(); public static boolean ignoringSinglePrefixOrSuffixShingleByDefault = false; /** * Strategy used to code and decode meta data of the tokens from the input stream * regarding how to position the tokens in the matrix, set and retreive weight, et c. */ public static abstract class TokenSettingsCodec { /** * Retrieves information on how a {@link org.apache.lucene.analysis.Token} is to be inserted to a {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix}. * @param token * @return {@link ShingleMatrixFilter.TokenPositioner} * @throws IOException */ public abstract TokenPositioner getTokenPositioner(Token token) throws IOException; /** * Sets information on how a {@link org.apache.lucene.analysis.Token} is to be inserted to a {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix}. * * @param token * @param tokenPositioner */ public abstract void setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner); /** * Have this method return 1f in order to 'disable' weights. * @param token * @return the weight of parameter token */ public abstract float getWeight(Token token); /** * Have this method do nothing in order to 'disable' weights. * @param token * @param weight */ public abstract void setWeight(Token token, float weight); } /** * Used to describe how a {@link org.apache.lucene.analysis.Token} is to be inserted to a {@link org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix}. * @see org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec#getTokenPositioner(org.apache.lucene.analysis.Token) * @see org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec#setTokenPositioner(org.apache.lucene.analysis.Token,org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner) */ public static class TokenPositioner { public static final TokenPositioner newColumn = new TokenPositioner(0); public static final TokenPositioner newRow = new TokenPositioner(1); public static final TokenPositioner sameRow = new TokenPositioner(2); private final int index; private TokenPositioner(int index) { this.index = index; } public int getIndex() { return index; } } // filter instance settings variables private TokenSettingsCodec settingsCodec; private int minimumShingleSize; private int maximumShingleSize; private boolean ignoringSinglePrefixOrSuffixShingle = false; private Character spacerCharacter = defaultSpacerCharacter; private TokenStream input; private CharTermAttribute termAtt; private PositionIncrementAttribute posIncrAtt; private PayloadAttribute payloadAtt; private OffsetAttribute offsetAtt; private TypeAttribute typeAtt; private FlagsAttribute flagsAtt; private CharTermAttribute in_termAtt; private PositionIncrementAttribute in_posIncrAtt; private PayloadAttribute in_payloadAtt; private OffsetAttribute in_offsetAtt; private TypeAttribute in_typeAtt; private FlagsAttribute in_flagsAtt; /** * Creates a shingle filter based on a user defined matrix. * * The filter /will/ delete columns from the input matrix! You will not be able to reset the filter if you used this constructor. * todo: don't touch the matrix! use a boolean, set the input stream to null or something, and keep track of where in the matrix we are at. * * @param matrix the input based for creating shingles. Does not need to contain any information until {@link #incrementToken()} is called the first time. * @param minimumShingleSize minimum number of tokens in any shingle. * @param maximumShingleSize maximum number of tokens in any shingle. * @param spacerCharacter character to use between texts of the token parts in a shingle. null for none. * @param ignoringSinglePrefixOrSuffixShingle if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'. * @param settingsCodec codec used to read input token weight and matrix positioning. */ public ShingleMatrixFilter(Matrix matrix, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, TokenSettingsCodec settingsCodec) { this.matrix = matrix; this.minimumShingleSize = minimumShingleSize; this.maximumShingleSize = maximumShingleSize; this.spacerCharacter = spacerCharacter; this.ignoringSinglePrefixOrSuffixShingle = ignoringSinglePrefixOrSuffixShingle; this.settingsCodec = settingsCodec; termAtt = addAttribute(CharTermAttribute.class); posIncrAtt = addAttribute(PositionIncrementAttribute.class); payloadAtt = addAttribute(PayloadAttribute.class); offsetAtt = addAttribute(OffsetAttribute.class); typeAtt = addAttribute(TypeAttribute.class); flagsAtt = addAttribute(FlagsAttribute.class); // set the input to be an empty token stream, we already have the data. this.input = new EmptyTokenStream(); in_termAtt = input.addAttribute(CharTermAttribute.class); in_posIncrAtt = input.addAttribute(PositionIncrementAttribute.class); in_payloadAtt = input.addAttribute(PayloadAttribute.class); in_offsetAtt = input.addAttribute(OffsetAttribute.class); in_typeAtt = input.addAttribute(TypeAttribute.class); in_flagsAtt = input.addAttribute(FlagsAttribute.class); } /** * Creates a shingle filter using default settings. * * @see #defaultSpacerCharacter * @see #ignoringSinglePrefixOrSuffixShingleByDefault * @see #defaultSettingsCodec * * @param input stream from which to construct the matrix * @param minimumShingleSize minimum number of tokens in any shingle. * @param maximumShingleSize maximum number of tokens in any shingle. */ public ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize) { this(input, minimumShingleSize, maximumShingleSize, defaultSpacerCharacter); } /** * Creates a shingle filter using default settings. * * @see #ignoringSinglePrefixOrSuffixShingleByDefault * @see #defaultSettingsCodec * * @param input stream from which to construct the matrix * @param minimumShingleSize minimum number of tokens in any shingle. * @param maximumShingleSize maximum number of tokens in any shingle. * @param spacerCharacter character to use between texts of the token parts in a shingle. null for none. */ public ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter) { this(input, minimumShingleSize, maximumShingleSize, spacerCharacter, ignoringSinglePrefixOrSuffixShingleByDefault); } /** * Creates a shingle filter using the default {@link TokenSettingsCodec}. * * @see #defaultSettingsCodec * * @param input stream from which to construct the matrix * @param minimumShingleSize minimum number of tokens in any shingle. * @param maximumShingleSize maximum number of tokens in any shingle. * @param spacerCharacter character to use between texts of the token parts in a shingle. null for none. * @param ignoringSinglePrefixOrSuffixShingle if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'. */ public ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle) { this(input, minimumShingleSize, maximumShingleSize, spacerCharacter, ignoringSinglePrefixOrSuffixShingle, defaultSettingsCodec); } /** * Creates a shingle filter with ad hoc parameter settings. * * @param input stream from which to construct the matrix * @param minimumShingleSize minimum number of tokens in any shingle. * @param maximumShingleSize maximum number of tokens in any shingle. * @param spacerCharacter character to use between texts of the token parts in a shingle. null for none. * @param ignoringSinglePrefixOrSuffixShingle if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'. * @param settingsCodec codec used to read input token weight and matrix positioning. */ public ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, TokenSettingsCodec settingsCodec) { this.input = input; this.minimumShingleSize = minimumShingleSize; this.maximumShingleSize = maximumShingleSize; this.spacerCharacter = spacerCharacter; this.ignoringSinglePrefixOrSuffixShingle = ignoringSinglePrefixOrSuffixShingle; this.settingsCodec = settingsCodec; termAtt = addAttribute(CharTermAttribute.class); posIncrAtt = addAttribute(PositionIncrementAttribute.class); payloadAtt = addAttribute(PayloadAttribute.class); offsetAtt = addAttribute(OffsetAttribute.class); typeAtt = addAttribute(TypeAttribute.class); flagsAtt = addAttribute(FlagsAttribute.class); in_termAtt = input.addAttribute(CharTermAttribute.class); in_posIncrAtt = input.addAttribute(PositionIncrementAttribute.class); in_payloadAtt = input.addAttribute(PayloadAttribute.class); in_offsetAtt = input.addAttribute(OffsetAttribute.class); in_typeAtt = input.addAttribute(TypeAttribute.class); in_flagsAtt = input.addAttribute(FlagsAttribute.class); } // internal filter instance variables /** iterator over the current matrix row permutations */ private Iterator<Matrix.Column.Row[]> permutations; /** the current permutation of tokens used to produce shingles */ private List<Token> currentPermuationTokens; /** index to what row a token in currentShingleTokens represents*/ private List<Matrix.Column.Row> currentPermutationRows; private int currentPermutationTokensStartOffset; private int currentShingleLength; /** * a set containing shingles that has been the result of a call to {@link #incrementToken()}, * used to avoid producing the same shingle more than once. */ private Set<List<Token>> shinglesSeen = new HashSet<List<Token>>(); @Override public void reset() throws IOException { permutations = null; shinglesSeen.clear(); input.reset(); } private Matrix matrix; private Token reusableToken = new Token(); @Override public final boolean incrementToken() throws IOException { if (matrix == null) { matrix = new Matrix(); // fill matrix with maximumShingleSize columns while (matrix.columns.size() < maximumShingleSize && readColumn()) { // this loop looks ugly } } // this loop exists in order to avoid recursive calls to the next method // as the complexity of a large matrix // then would require a multi gigabyte sized stack. Token token; do { token = produceNextToken(reusableToken); } while (token == request_next_token); if (token == null) return false; clearAttributes(); termAtt.copyBuffer(token.buffer(), 0, token.length()); posIncrAtt.setPositionIncrement(token.getPositionIncrement()); flagsAtt.setFlags(token.getFlags()); offsetAtt.setOffset(token.startOffset(), token.endOffset()); typeAtt.setType(token.type()); payloadAtt.setPayload(token.getPayload()); return true; } private Token getNextInputToken(Token token) throws IOException { if (!input.incrementToken()) return null; token.copyBuffer(in_termAtt.buffer(), 0, in_termAtt.length()); token.setPositionIncrement(in_posIncrAtt.getPositionIncrement()); token.setFlags(in_flagsAtt.getFlags()); token.setOffset(in_offsetAtt.startOffset(), in_offsetAtt.endOffset()); token.setType(in_typeAtt.type()); token.setPayload(in_payloadAtt.getPayload()); return token; } private Token getNextToken(Token token) throws IOException { if (!this.incrementToken()) return null; token.copyBuffer(termAtt.buffer(), 0, termAtt.length()); token.setPositionIncrement(posIncrAtt.getPositionIncrement()); token.setFlags(flagsAtt.getFlags()); token.setOffset(offsetAtt.startOffset(), offsetAtt.endOffset()); token.setType(typeAtt.type()); token.setPayload(payloadAtt.getPayload()); return token; } private static final Token request_next_token = new Token(); /** * This method exists in order to avoid recursive calls to the method * as the complexity of a fairly small matrix then easily would require * a gigabyte sized stack per thread. * * @param reusableToken * @return null if exhausted, instance request_next_token if one more call is required for an answer, or instance parameter resuableToken. * @throws IOException */ private Token produceNextToken(final Token reusableToken) throws IOException { if (currentPermuationTokens != null) { currentShingleLength++; if (currentShingleLength + currentPermutationTokensStartOffset <= currentPermuationTokens.size() && currentShingleLength <= maximumShingleSize) { // it is possible to create at least one more shingle of the current matrix permutation if (ignoringSinglePrefixOrSuffixShingle && currentShingleLength == 1 && ((currentPermutationRows.get(currentPermutationTokensStartOffset)).getColumn().isFirst() || (currentPermutationRows.get(currentPermutationTokensStartOffset)).getColumn().isLast())) { return getNextToken(reusableToken); } int termLength = 0; List<Token> shingle = new ArrayList<Token>(currentShingleLength); for (int i = 0; i < currentShingleLength; i++) { Token shingleToken = currentPermuationTokens.get(i + currentPermutationTokensStartOffset); termLength += shingleToken.length(); shingle.add(shingleToken); } if (spacerCharacter != null) { termLength += currentShingleLength - 1; } // only produce shingles that not already has been created if (!shinglesSeen.add(shingle)) { return request_next_token; } // shingle token factory StringBuilder sb = new StringBuilder(termLength + 10); // paranormal ability to foresee the future. for (Token shingleToken : shingle) { if (spacerCharacter != null && sb.length() > 0) { sb.append(spacerCharacter); } sb.append(shingleToken.buffer(), 0, shingleToken.length()); } reusableToken.setEmpty().append(sb); updateToken(reusableToken, shingle, currentPermutationTokensStartOffset, currentPermutationRows, currentPermuationTokens); return reusableToken; } else { // it is NOT possible to create one more shingles of the current matrix permutation if (currentPermutationTokensStartOffset < currentPermuationTokens.size() - 1) { // reset shingle size and move one step to the right in the current tokens permutation currentPermutationTokensStartOffset++; currentShingleLength = minimumShingleSize - 1; return request_next_token; } if (permutations == null) { // todo does this ever occur? return null; } if (!permutations.hasNext()) { // load more data (if available) to the matrix if (input != null && readColumn()) { // don't really care, we just read it. } // get rid of resources // delete the first column in the matrix Matrix.Column deletedColumn = matrix.columns.remove(0); // remove all shingles seen that include any of the tokens from the deleted column. List<Token> deletedColumnTokens = new ArrayList<Token>(); for (Matrix.Column.Row row : deletedColumn.getRows()) { for (Token token : row.getTokens()) { deletedColumnTokens.add(token); } } for (Iterator<List<Token>> shinglesSeenIterator = shinglesSeen.iterator(); shinglesSeenIterator.hasNext();) { List<Token> shingle = shinglesSeenIterator.next(); for (Token deletedColumnToken : deletedColumnTokens) { if (shingle.contains(deletedColumnToken)) { shinglesSeenIterator.remove(); break; } } } if (matrix.columns.size() < minimumShingleSize) { // exhausted return null; } // create permutations of the matrix it now looks permutations = matrix.permutationIterator(); } nextTokensPermutation(); return request_next_token; } } if (permutations == null) { permutations = matrix.permutationIterator(); } if (!permutations.hasNext()) { return null; } nextTokensPermutation(); return request_next_token; } /** * get next permutation of row combinations, * creates list of all tokens in the row and * an index from each such token to what row they exist in. * finally resets the current (next) shingle size and offset. */ private void nextTokensPermutation() { Matrix.Column.Row[] rowsPermutation = permutations.next(); List<Matrix.Column.Row> currentPermutationRows = new ArrayList<Matrix.Column.Row>(); List<Token> currentPermuationTokens = new ArrayList<Token>(); for (Matrix.Column.Row row : rowsPermutation) { for (Token token : row.getTokens()) { currentPermuationTokens.add(token); currentPermutationRows.add(row); } } this.currentPermuationTokens = currentPermuationTokens; this.currentPermutationRows = currentPermutationRows; currentPermutationTokensStartOffset = 0; currentShingleLength = minimumShingleSize - 1; } /** * Final touch of a shingle token before it is passed on to the consumer from method {@link #incrementToken()}. * * Calculates and sets type, flags, position increment, start/end offsets and weight. * * @param token Shingle token * @param shingle Tokens used to produce the shingle token. * @param currentPermutationStartOffset Start offset in parameter currentPermutationTokens * @param currentPermutationRows index to Matrix.Column.Row from the position of tokens in parameter currentPermutationTokens * @param currentPermuationTokens tokens of the current permutation of rows in the matrix. */ public void updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<Row> currentPermutationRows, List<Token> currentPermuationTokens) { token.setType(ShingleMatrixFilter.class.getName()); token.setFlags(0); token.setPositionIncrement(1); token.setStartOffset(shingle.get(0).startOffset()); token.setEndOffset(shingle.get(shingle.size() - 1).endOffset()); settingsCodec.setWeight(token, calculateShingleWeight(token, shingle, currentPermutationStartOffset, currentPermutationRows, currentPermuationTokens)); } /** * Evaluates the new shingle token weight. * * for (shingle part token in shingle) * weight += shingle part token weight * (1 / sqrt(all shingle part token weights summed)) * * This algorithm gives a slightly greater score for longer shingles * and is rather penalising to great shingle token part weights. * * @param shingleToken token returned to consumer * @param shingle tokens the tokens used to produce the shingle token. * @param currentPermutationStartOffset start offset in parameter currentPermutationRows and currentPermutationTokens. * @param currentPermutationRows an index to what matrix row a token in parameter currentPermutationTokens exist. * @param currentPermuationTokens all tokens in the current row permutation of the matrix. A sub list (parameter offset, parameter shingle.size) equals parameter shingle. * @return weight to be set for parameter shingleToken */ public float calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<Row> currentPermutationRows, List<Token> currentPermuationTokens) { double[] weights = new double[shingle.size()]; double total = 0f; double top = 0d; for (int i=0; i<weights.length; i++) { weights[i] = settingsCodec.getWeight(shingle.get(i)); double tmp = weights[i]; if (tmp > top) { top = tmp; } total += tmp; } double factor = 1d / Math.sqrt(total); double weight = 0d; for (double partWeight : weights) { weight += partWeight * factor; } return (float) weight; } private Token readColumnBuf; /** * Loads one column from the token stream. * * When the last token is read from the token stream it will column.setLast(true); * * @return true if it manage to read one more column from the input token stream * @throws IOException if the matrix source input stream throws an exception */ private boolean readColumn() throws IOException { Token token; if (readColumnBuf != null) { token = readColumnBuf; readColumnBuf = null; } else { token = getNextInputToken(new Token()); } if (token == null) { return false; } Matrix.Column currentReaderColumn = matrix.new Column(); Matrix.Column.Row currentReaderRow = currentReaderColumn.new Row(); currentReaderRow.getTokens().add(token); TokenPositioner tokenPositioner; while ((readColumnBuf = getNextInputToken(new Token())) != null && (tokenPositioner = settingsCodec.getTokenPositioner(readColumnBuf)) != TokenPositioner.newColumn) { if (tokenPositioner == TokenPositioner.sameRow) { currentReaderRow.getTokens().add(readColumnBuf); } else /*if (tokenPositioner == TokenPositioner.newRow)*/ { currentReaderRow = currentReaderColumn.new Row(); currentReaderRow.getTokens().add(readColumnBuf); } readColumnBuf = null; } if (readColumnBuf == null) { readColumnBuf = getNextInputToken(new Token()); if (readColumnBuf == null) { currentReaderColumn.setLast(true); } } return true; } /** * A column focused matrix in three dimensions: * * <pre> * Token[column][row][z-axis] { * {{hello}, {greetings, and, salutations}}, * {{world}, {earth}, {tellus}} * }; * </pre> * * todo consider row groups * to indicate that shingles is only to contain permutations with texts in that same row group. * */ public static class Matrix { private boolean columnsHasBeenCreated = false; private List<Column> columns = new ArrayList<Column>(); public List<Column> getColumns() { return columns; } public class Column { private boolean last; private boolean first; public Matrix getMatrix() { return Matrix.this; } public Column(Token token) { this(); Row row = new Row(); row.getTokens().add(token); } public Column() { synchronized (Matrix.this) { if (!columnsHasBeenCreated) { this.setFirst(true); columnsHasBeenCreated = true; } } Matrix.this.columns.add(this); } private List<Row> rows = new ArrayList<Row>(); public List<Row> getRows() { return rows; } public int getIndex() { return Matrix.this.columns.indexOf(this); } @Override public String toString() { return "Column{" + "first=" + first + ", last=" + last + ", rows=" + rows + '}'; } public boolean isFirst() { return first; } public void setFirst(boolean first) { this.first = first; } public void setLast(boolean last) { this.last = last; } public boolean isLast() { return last; } public class Row { public Column getColumn() { return Column.this; } private List<Token> tokens = new LinkedList<Token>(); public Row() { Column.this.rows.add(this); } public int getIndex() { return Column.this.rows.indexOf(this); } public List<Token> getTokens() { return tokens; } public void setTokens(List<Token> tokens) { this.tokens = tokens; } // public int getStartOffset() { // int ret = tokens[0].startOffset(); // if (getIndex() > 0 && ret == 0) { // ret = Column.this.rows.get(0).getStartOffset(); // } // return ret; // } // // public int getEndOffset() { // int ret = tokens[tokens.length - 1].endOffset(); // if (getIndex() > 0 && ret == 0) { // ret = Column.this.rows.get(0).getEndOffset(); // } // return ret; // } @Override public String toString() { return "Row{" + "index=" + getIndex() + ", tokens=" + (tokens == null ? null : tokens) + '}'; } } } public Iterator<Column.Row[]> permutationIterator() { return new Iterator<Column.Row[]>() { private int[] columnRowCounters = new int[columns.size()]; public void remove() { throw new IllegalStateException("not implemented"); } public boolean hasNext() { int s = columnRowCounters.length; int n = columns.size(); return s != 0 && n >= s && columnRowCounters[s - 1] < (columns.get(s - 1)).getRows().size(); } public Column.Row[] next() { if (!hasNext()) { throw new NoSuchElementException("no more elements"); } Column.Row[] rows = new Column.Row[columnRowCounters.length]; for (int i = 0; i < columnRowCounters.length; i++) { rows[i] = columns.get(i).rows.get(columnRowCounters[i]); } incrementColumnRowCounters(); return rows; } private void incrementColumnRowCounters() { for (int i = 0; i < columnRowCounters.length; i++) { columnRowCounters[i]++; if (columnRowCounters[i] == columns.get(i).rows.size() && i < columnRowCounters.length - 1) { columnRowCounters[i] = 0; } else { break; } } } }; } @Override public String toString() { return "Matrix{" + "columns=" + columns + '}'; } } public int getMinimumShingleSize() { return minimumShingleSize; } public void setMinimumShingleSize(int minimumShingleSize) { this.minimumShingleSize = minimumShingleSize; } public int getMaximumShingleSize() { return maximumShingleSize; } public void setMaximumShingleSize(int maximumShingleSize) { this.maximumShingleSize = maximumShingleSize; } public Matrix getMatrix() { return matrix; } public void setMatrix(Matrix matrix) { this.matrix = matrix; } public Character getSpacerCharacter() { return spacerCharacter; } public void setSpacerCharacter(Character spacerCharacter) { this.spacerCharacter = spacerCharacter; } public boolean isIgnoringSinglePrefixOrSuffixShingle() { return ignoringSinglePrefixOrSuffixShingle; } public void setIgnoringSinglePrefixOrSuffixShingle(boolean ignoringSinglePrefixOrSuffixShingle) { this.ignoringSinglePrefixOrSuffixShingle = ignoringSinglePrefixOrSuffixShingle; } /** * Using this codec makes a {@link ShingleMatrixFilter} act like {@link org.apache.lucene.analysis.shingle.ShingleFilter}. * It produces the most simple sort of shingles, ignoring token position increments, et c. * * It adds each token as a new column. */ public static class OneDimensionalNonWeightedTokenSettingsCodec extends TokenSettingsCodec { @Override public TokenPositioner getTokenPositioner(Token token) throws IOException { return TokenPositioner.newColumn; } @Override public void setTokenPositioner(Token token, TokenPositioner tokenPositioner) { } @Override public float getWeight(Token token) { return 1f; } @Override public void setWeight(Token token, float weight) { } } /** * A codec that creates a two dimensional matrix * by treating tokens from the input stream with 0 position increment * as new rows to the current column. */ public static class TwoDimensionalNonWeightedSynonymTokenSettingsCodec extends TokenSettingsCodec { @Override public TokenPositioner getTokenPositioner(Token token) throws IOException { if (token.getPositionIncrement() == 0) { return TokenPositioner.newRow; } else { return TokenPositioner.newColumn; } } @Override public void setTokenPositioner(Token token, TokenPositioner tokenPositioner) { throw new UnsupportedOperationException(); } @Override public float getWeight(Token token) { return 1f; } @Override public void setWeight(Token token, float weight) { } } /** * A full featured codec not to be used for something serious. * * It takes complete control of * payload for weight * and the bit flags for positioning in the matrix. * * Mainly exist for demonstrational purposes. */ public static class SimpleThreeDimensionalTokenSettingsCodec extends TokenSettingsCodec { /** * @param token * @return the token flags int value as TokenPosition * @throws IOException */ @Override public TokenPositioner getTokenPositioner(Token token) throws IOException { switch (token.getFlags()) { case 0: return TokenPositioner.newColumn; case 1: return TokenPositioner.newRow; case 2: return TokenPositioner.sameRow; } throw new IOException("Unknown matrix positioning of token " + token); } /** * Sets the TokenPositioner as token flags int value. * * @param token * @param tokenPositioner */ @Override public void setTokenPositioner(Token token, TokenPositioner tokenPositioner) { token.setFlags(tokenPositioner.getIndex()); } /** * Returns a 32 bit float from the payload, or 1f it null. * * @param token * @return 32 bit float */ @Override public float getWeight(Token token) { if (token.getPayload() == null || token.getPayload().getData() == null) { return 1f; } else { return PayloadHelper.decodeFloat(token.getPayload().getData()); } } /** * Stores a 32 bit float in the payload, or set it to null if 1f; * @param token * @param weight */ @Override public void setWeight(Token token, float weight) { if (weight == 1f) { token.setPayload(null); } else { token.setPayload(new Payload(PayloadHelper.encodeFloat(weight))); } } } }
{ "pile_set_name": "Github" }
<?php /** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <[email protected]> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Adapter\Product; use Symfony\Component\HttpFoundation\Request; /** * Extracted from Product Controller, used to cleanup the request. * For internal use only. */ final class FilterCategoriesRequestPurifier { const CATEGORY = 'filter_category'; /** * Changes the filter category values in case it is not numeric or signed. * * @param Request $request * * @return Request */ public function purify(Request $request) { if ($request->isMethod('POST')) { $value = $request->request->get(self::CATEGORY); if (null !== $value && (!is_numeric($value) || $value < 0)) { $request->request->set(self::CATEGORY, ''); } } return $request; } }
{ "pile_set_name": "Github" }
-- Copyright 2006-2012 Mitchell mitchell.att.foicica.com. See LICENSE. -- Forth LPeg lexer. local l = lexer local token, style, color, word_match = l.token, l.style, l.color, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'forth'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local line_comment = S('|\\') * l.nonnewline^0 local block_comment = '(*' * (l.any - '*)')^0 * P('*)')^-1 local comment = token(l.COMMENT, line_comment + block_comment) -- Strings. local s_str = 's' * l.delimited_range('"', nil, true, false, '\n') local dot_str = '.' * l.delimited_range('"', nil, true, false, '\n') local f_str = 'f' * l.delimited_range('"', nil, true, false, '\n') local dq_str = l.delimited_range('"', nil, true, false, '\n') local string = token(l.STRING, s_str + dot_str + f_str + dq_str) -- Numbers. local number = token(l.NUMBER, P('-')^-1 * l.digit^1 * (S('./') * l.digit^1)^-1) -- Keywords. local keyword = token(l.KEYWORD, word_match({ 'swap', 'drop', 'dup', 'nip', 'over', 'rot', '-rot', '2dup', '2drop', '2over', '2swap', '>r', 'r>', 'and', 'or', 'xor', '>>', '<<', 'not', 'negate', 'mod', '/mod', '1+', '1-', 'base', 'hex', 'decimal', 'binary', 'octal', '@', '!', 'c@', 'c!', '+!', 'cell+', 'cells', 'char+', 'chars', 'create', 'does>', 'variable', 'variable,', 'literal', 'last', '1,', '2,', '3,', ',', 'here', 'allot', 'parse', 'find', 'compile', -- Operators. 'if', '=if', '<if', '>if', '<>if', 'then', 'repeat', 'until', 'forth', 'macro' }, '2><1-@!+3,=')) -- Identifiers. local identifier = token(l.IDENTIFIER, (l.alnum + S('+-*=<>.?/\'%,_$'))^1) -- Operators. local operator = token(l.OPERATOR, S(':;<>+*-/()[]')) M._rules = { {'whitespace', ws}, {'keyword', keyword}, {'string', string}, {'identifier', identifier}, {'comment', comment}, {'number', number}, {'operator', operator}, {'any_char', l.any_char}, } return M
{ "pile_set_name": "Github" }
// K-3D // Copyright (c) 1995-2009, Timothy M. Shead // // Contact: [email protected] // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public // License along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA /** \file \author Timothy M. Shead ([email protected]) */ #include <k3dsdk/module.h> namespace module { namespace scalar { extern k3d::iplugin_factory& add_factory(); extern k3d::iplugin_factory& divide_factory(); extern k3d::iplugin_factory& expression_factory(); extern k3d::iplugin_factory& double_to_string_factory(); extern k3d::iplugin_factory& modulo_factory(); extern k3d::iplugin_factory& multiply_factory(); extern k3d::iplugin_factory& sine_factory(); extern k3d::iplugin_factory& subtract_factory(); } // namespace scalar } // namespace module K3D_MODULE_START(Registry) Registry.register_factory(module::scalar::add_factory()); Registry.register_factory(module::scalar::divide_factory()); Registry.register_factory(module::scalar::expression_factory()); Registry.register_factory(module::scalar::double_to_string_factory()); Registry.register_factory(module::scalar::modulo_factory()); Registry.register_factory(module::scalar::multiply_factory()); Registry.register_factory(module::scalar::sine_factory()); Registry.register_factory(module::scalar::subtract_factory()); K3D_MODULE_END
{ "pile_set_name": "Github" }
#tb 0: 1/25 #media_type 0: video #codec_id 0: rawvideo #dimensions 0: 352x288 #sar 0: 0/1 0, 0, 0, 1, 152064, 0xdcc4ac76 0, 1, 1, 1, 152064, 0xfde6871a 0, 2, 2, 1, 152064, 0xe8a351b5 0, 3, 3, 1, 152064, 0x0e586608 0, 4, 4, 1, 152064, 0xbe3c2adc 0, 5, 5, 1, 152064, 0x244a5b3c 0, 6, 6, 1, 152064, 0x7cad919e 0, 7, 7, 1, 152064, 0x24c452c0 0, 8, 8, 1, 152064, 0x089dc7f0 0, 9, 9, 1, 152064, 0x6ee5d1dd 0, 10, 10, 1, 152064, 0x177430f0 0, 11, 11, 1, 152064, 0xf2af65f6 0, 12, 12, 1, 152064, 0x4c4626a7 0, 13, 13, 1, 152064, 0x897af1da 0, 14, 14, 1, 152064, 0xf16199b1 0, 15, 15, 1, 152064, 0x2979a469 0, 16, 16, 1, 152064, 0x5ce345a0 0, 17, 17, 1, 152064, 0x1a044ff3 0, 18, 18, 1, 152064, 0x9075241f 0, 19, 19, 1, 152064, 0xd1457558 0, 20, 20, 1, 152064, 0xdfe3669f 0, 21, 21, 1, 152064, 0x4961fc7a 0, 22, 22, 1, 152064, 0xb84daee5 0, 23, 23, 1, 152064, 0xc4efe5c3 0, 24, 24, 1, 152064, 0x35f73410 0, 25, 25, 1, 152064, 0xf99a2c73 0, 26, 26, 1, 152064, 0xe5c12391 0, 27, 27, 1, 152064, 0xc2056236 0, 28, 28, 1, 152064, 0xce2bff90 0, 29, 29, 1, 152064, 0x01d92bb1 0, 30, 30, 1, 152064, 0xc55eb558 0, 31, 31, 1, 152064, 0xf02ef0ff 0, 32, 32, 1, 152064, 0x069dd1c6 0, 33, 33, 1, 152064, 0x49718229 0, 34, 34, 1, 152064, 0x0e9ea401 0, 35, 35, 1, 152064, 0x307e7f8b 0, 36, 36, 1, 152064, 0xf5071e31 0, 37, 37, 1, 152064, 0xac2c2ad0 0, 38, 38, 1, 152064, 0x5586d665 0, 39, 39, 1, 152064, 0xa62a6a2b 0, 40, 40, 1, 152064, 0xff167d1b 0, 41, 41, 1, 152064, 0x02d225c2 0, 42, 42, 1, 152064, 0x868ccb0b 0, 43, 43, 1, 152064, 0x36edfa29 0, 44, 44, 1, 152064, 0xb6244864 0, 45, 45, 1, 152064, 0xd891b5dc 0, 46, 46, 1, 152064, 0x9246b763 0, 47, 47, 1, 152064, 0xea240b61 0, 48, 48, 1, 152064, 0x2d985877 0, 49, 49, 1, 152064, 0xe6b92603 0, 50, 50, 1, 152064, 0x102ac84f 0, 51, 51, 1, 152064, 0xddaf709b 0, 52, 52, 1, 152064, 0x48dfb25e 0, 53, 53, 1, 152064, 0xf2acadbb 0, 54, 54, 1, 152064, 0x647685f5 0, 55, 55, 1, 152064, 0x893874c9 0, 56, 56, 1, 152064, 0xdfd7ed77 0, 57, 57, 1, 152064, 0x97b36277 0, 58, 58, 1, 152064, 0x59f33282 0, 59, 59, 1, 152064, 0xba5c6a0e 0, 60, 60, 1, 152064, 0x7856ddf0 0, 61, 61, 1, 152064, 0x74e5f095 0, 62, 62, 1, 152064, 0x76167a60 0, 63, 63, 1, 152064, 0xa6cf2255 0, 64, 64, 1, 152064, 0x9f8b1446 0, 65, 65, 1, 152064, 0xa775aa79 0, 66, 66, 1, 152064, 0x5662a698 0, 67, 67, 1, 152064, 0xe6321e5b 0, 68, 68, 1, 152064, 0xdaea9a83 0, 69, 69, 1, 152064, 0xd89d835f 0, 70, 70, 1, 152064, 0x0b1503e2 0, 71, 71, 1, 152064, 0x7fef6395 0, 72, 72, 1, 152064, 0xc27273f2 0, 73, 73, 1, 152064, 0xff9288fd 0, 74, 74, 1, 152064, 0xb76aee35 0, 75, 75, 1, 152064, 0xbd0dc4b2 0, 76, 76, 1, 152064, 0x3085598e 0, 77, 77, 1, 152064, 0x22e408f6 0, 78, 78, 1, 152064, 0xc054866d 0, 79, 79, 1, 152064, 0x881377f8 0, 80, 80, 1, 152064, 0x0dd7311e 0, 81, 81, 1, 152064, 0x627ea688 0, 82, 82, 1, 152064, 0x95bbe693 0, 83, 83, 1, 152064, 0x806c480f 0, 84, 84, 1, 152064, 0x6feb3d47 0, 85, 85, 1, 152064, 0x639f0a72 0, 86, 86, 1, 152064, 0x4922909d 0, 87, 87, 1, 152064, 0x44bbc195 0, 88, 88, 1, 152064, 0xf119ca8f 0, 89, 89, 1, 152064, 0x6f46e9c8 0, 90, 90, 1, 152064, 0xd68e222a 0, 91, 91, 1, 152064, 0xedc716eb 0, 92, 92, 1, 152064, 0x090a7702 0, 93, 93, 1, 152064, 0xc94eac7a 0, 94, 94, 1, 152064, 0x629d8823 0, 95, 95, 1, 152064, 0x30a51f8c 0, 96, 96, 1, 152064, 0x4265666b 0, 97, 97, 1, 152064, 0x766dfd25 0, 98, 98, 1, 152064, 0x7dc37c52 0, 99, 99, 1, 152064, 0x07c65fbe
{ "pile_set_name": "Github" }
using System; using System.IO; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.Date; namespace Org.BouncyCastle.Bcpg.OpenPgp { /// <remarks>A PGP signature object.</remarks> public class PgpSignature { public const int BinaryDocument = 0x00; public const int CanonicalTextDocument = 0x01; public const int StandAlone = 0x02; public const int DefaultCertification = 0x10; public const int NoCertification = 0x11; public const int CasualCertification = 0x12; public const int PositiveCertification = 0x13; public const int SubkeyBinding = 0x18; public const int PrimaryKeyBinding = 0x19; public const int DirectKey = 0x1f; public const int KeyRevocation = 0x20; public const int SubkeyRevocation = 0x28; public const int CertificationRevocation = 0x30; public const int Timestamp = 0x40; private readonly SignaturePacket sigPck; private readonly int signatureType; private readonly TrustPacket trustPck; private ISigner sig; private byte lastb; // Initial value anything but '\r' internal PgpSignature( BcpgInputStream bcpgInput) : this((SignaturePacket)bcpgInput.ReadPacket()) { } internal PgpSignature( SignaturePacket sigPacket) : this(sigPacket, null) { } internal PgpSignature( SignaturePacket sigPacket, TrustPacket trustPacket) { if (sigPacket == null) throw new ArgumentNullException("sigPacket"); this.sigPck = sigPacket; this.signatureType = sigPck.SignatureType; this.trustPck = trustPacket; } private void GetSig() { this.sig = SignerUtilities.GetSigner( PgpUtilities.GetSignatureName(sigPck.KeyAlgorithm, sigPck.HashAlgorithm)); } /// <summary>The OpenPGP version number for this signature.</summary> public int Version { get { return sigPck.Version; } } /// <summary>The key algorithm associated with this signature.</summary> public PublicKeyAlgorithmTag KeyAlgorithm { get { return sigPck.KeyAlgorithm; } } /// <summary>The hash algorithm associated with this signature.</summary> public HashAlgorithmTag HashAlgorithm { get { return sigPck.HashAlgorithm; } } /// <summary>Return true if this signature represents a certification.</summary> public bool IsCertification() { return IsCertification(SignatureType); } public void InitVerify( PgpPublicKey pubKey) { lastb = 0; if (sig == null) { GetSig(); } try { sig.Init(false, pubKey.GetKey()); } catch (InvalidKeyException e) { throw new PgpException("invalid key.", e); } } public void Update( byte b) { if (signatureType == CanonicalTextDocument) { doCanonicalUpdateByte(b); } else { sig.Update(b); } } private void doCanonicalUpdateByte( byte b) { if (b == '\r') { doUpdateCRLF(); } else if (b == '\n') { if (lastb != '\r') { doUpdateCRLF(); } } else { sig.Update(b); } lastb = b; } private void doUpdateCRLF() { sig.Update((byte)'\r'); sig.Update((byte)'\n'); } public void Update( params byte[] bytes) { Update(bytes, 0, bytes.Length); } public void Update( byte[] bytes, int off, int length) { if (signatureType == CanonicalTextDocument) { int finish = off + length; for (int i = off; i != finish; i++) { doCanonicalUpdateByte(bytes[i]); } } else { sig.BlockUpdate(bytes, off, length); } } public bool Verify() { byte[] trailer = GetSignatureTrailer(); sig.BlockUpdate(trailer, 0, trailer.Length); return sig.VerifySignature(GetSignature()); } private void UpdateWithIdData( int header, byte[] idBytes) { this.Update( (byte) header, (byte)(idBytes.Length >> 24), (byte)(idBytes.Length >> 16), (byte)(idBytes.Length >> 8), (byte)(idBytes.Length)); this.Update(idBytes); } private void UpdateWithPublicKey( PgpPublicKey key) { byte[] keyBytes = GetEncodedPublicKey(key); this.Update( (byte) 0x99, (byte)(keyBytes.Length >> 8), (byte)(keyBytes.Length)); this.Update(keyBytes); } /// <summary> /// Verify the signature as certifying the passed in public key as associated /// with the passed in user attributes. /// </summary> /// <param name="userAttributes">User attributes the key was stored under.</param> /// <param name="key">The key to be verified.</param> /// <returns>True, if the signature matches, false otherwise.</returns> public bool VerifyCertification( PgpUserAttributeSubpacketVector userAttributes, PgpPublicKey key) { UpdateWithPublicKey(key); // // hash in the userAttributes // try { MemoryStream bOut = new MemoryStream(); foreach (UserAttributeSubpacket packet in userAttributes.ToSubpacketArray()) { packet.Encode(bOut); } UpdateWithIdData(0xd1, bOut.ToArray()); } catch (IOException e) { throw new PgpException("cannot encode subpacket array", e); } this.Update(sigPck.GetSignatureTrailer()); return sig.VerifySignature(this.GetSignature()); } /// <summary> /// Verify the signature as certifying the passed in public key as associated /// with the passed in ID. /// </summary> /// <param name="id">ID the key was stored under.</param> /// <param name="key">The key to be verified.</param> /// <returns>True, if the signature matches, false otherwise.</returns> public bool VerifyCertification( string id, PgpPublicKey key) { UpdateWithPublicKey(key); // // hash in the id // UpdateWithIdData(0xb4, Strings.ToUtf8ByteArray(id)); Update(sigPck.GetSignatureTrailer()); return sig.VerifySignature(GetSignature()); } /// <summary>Verify a certification for the passed in key against the passed in master key.</summary> /// <param name="masterKey">The key we are verifying against.</param> /// <param name="pubKey">The key we are verifying.</param> /// <returns>True, if the certification is valid, false otherwise.</returns> public bool VerifyCertification( PgpPublicKey masterKey, PgpPublicKey pubKey) { UpdateWithPublicKey(masterKey); UpdateWithPublicKey(pubKey); Update(sigPck.GetSignatureTrailer()); return sig.VerifySignature(GetSignature()); } /// <summary>Verify a key certification, such as revocation, for the passed in key.</summary> /// <param name="pubKey">The key we are checking.</param> /// <returns>True, if the certification is valid, false otherwise.</returns> public bool VerifyCertification( PgpPublicKey pubKey) { if (SignatureType != KeyRevocation && SignatureType != SubkeyRevocation) { throw new InvalidOperationException("signature is not a key signature"); } UpdateWithPublicKey(pubKey); Update(sigPck.GetSignatureTrailer()); return sig.VerifySignature(GetSignature()); } public int SignatureType { get { return sigPck.SignatureType; } } /// <summary>The ID of the key that created the signature.</summary> public long KeyId { get { return sigPck.KeyId; } } [Obsolete("Use 'CreationTime' property instead")] public DateTime GetCreationTime() { return CreationTime; } /// <summary>The creation time of this signature.</summary> public DateTime CreationTime { get { return DateTimeUtilities.UnixMsToDateTime(sigPck.CreationTime); } } public byte[] GetSignatureTrailer() { return sigPck.GetSignatureTrailer(); } /// <summary> /// Return true if the signature has either hashed or unhashed subpackets. /// </summary> public bool HasSubpackets { get { return sigPck.GetHashedSubPackets() != null || sigPck.GetUnhashedSubPackets() != null; } } public PgpSignatureSubpacketVector GetHashedSubPackets() { return createSubpacketVector(sigPck.GetHashedSubPackets()); } public PgpSignatureSubpacketVector GetUnhashedSubPackets() { return createSubpacketVector(sigPck.GetUnhashedSubPackets()); } private PgpSignatureSubpacketVector createSubpacketVector(SignatureSubpacket[] pcks) { return pcks == null ? null : new PgpSignatureSubpacketVector(pcks); } public byte[] GetSignature() { MPInteger[] sigValues = sigPck.GetSignature(); byte[] signature; if (sigValues != null) { if (sigValues.Length == 1) // an RSA signature { signature = sigValues[0].Value.ToByteArrayUnsigned(); } else { try { signature = new DerSequence( new DerInteger(sigValues[0].Value), new DerInteger(sigValues[1].Value)).GetEncoded(); } catch (IOException e) { throw new PgpException("exception encoding DSA sig.", e); } } } else { signature = sigPck.GetSignatureBytes(); } return signature; } // TODO Handle the encoding stuff by subclassing BcpgObject? public byte[] GetEncoded() { MemoryStream bOut = new MemoryStream(); Encode(bOut); return bOut.ToArray(); } public void Encode( Stream outStream) { BcpgOutputStream bcpgOut = BcpgOutputStream.Wrap(outStream); bcpgOut.WritePacket(sigPck); if (trustPck != null) { bcpgOut.WritePacket(trustPck); } } private byte[] GetEncodedPublicKey( PgpPublicKey pubKey) { try { return pubKey.publicPk.GetEncodedContents(); } catch (IOException e) { throw new PgpException("exception preparing key.", e); } } /// <summary> /// Return true if the passed in signature type represents a certification, false if the signature type is not. /// </summary> /// <param name="signatureType"></param> /// <returns>true if signatureType is a certification, false otherwise.</returns> public static bool IsCertification(int signatureType) { switch (signatureType) { case DefaultCertification: case NoCertification: case CasualCertification: case PositiveCertification: return true; default: return false; } } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <spirit:design xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <spirit:vendor>xilinx.com</spirit:vendor> <spirit:library>xci</spirit:library> <spirit:name>unknown</spirit:name> <spirit:version>1.0</spirit:version> <spirit:componentInstances> <spirit:componentInstance> <spirit:instanceName>clk_d100_100_200_40MHz</spirit:instanceName> <spirit:componentRef spirit:vendor="xilinx.com" spirit:library="ip" spirit:name="clk_wiz" spirit:version="6.0"/> <spirit:configurableElementValues> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLKFB_IN_D.CAN_DEBUG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLKFB_IN_D.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLKFB_OUT_D.CAN_DEBUG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLKFB_OUT_D.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK_IN1_D.CAN_DEBUG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK_IN1_D.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK_IN2_D.CAN_DEBUG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK_IN2_D.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT1.ASSOCIATED_BUSIF"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT1.ASSOCIATED_RESET"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT1.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT1.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT1.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT2.ASSOCIATED_BUSIF"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT2.ASSOCIATED_RESET"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT2.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT2.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT2.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT3.ASSOCIATED_BUSIF"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT3.ASSOCIATED_RESET"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT3.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT3.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT3.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT4.ASSOCIATED_BUSIF"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT4.ASSOCIATED_RESET"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT4.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT4.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLOCK_CLK_OUT4.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.INTR.PortWidth">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.INTR.SENSITIVITY">LEVEL_HIGH</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.REF_CLK.ASSOCIATED_BUSIF"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.REF_CLK.ASSOCIATED_RESET"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.REF_CLK.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.REF_CLK.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.REF_CLK.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_ACLK.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_ACLK.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_ACLK.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.ADDR_WIDTH">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.ARUSER_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.AWUSER_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.BUSER_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.CLK_DOMAIN"/> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.DATA_WIDTH">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.FREQ_HZ">100000000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_BRESP">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_BURST">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_CACHE">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_LOCK">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_PROT">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_QOS">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_REGION">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_RRESP">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.HAS_WSTRB">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.ID_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.MAX_BURST_LENGTH">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.NUM_READ_OUTSTANDING">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.NUM_READ_THREADS">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.NUM_WRITE_OUTSTANDING">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.NUM_WRITE_THREADS">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.PROTOCOL">AXI4LITE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.READ_WRITE_MODE">READ_WRITE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.RUSER_BITS_PER_BYTE">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.RUSER_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.SUPPORTS_NARROW_BURST">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.WUSER_BITS_PER_BYTE">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.S_AXI_LITE.WUSER_WIDTH">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_AUTO_PRIMITIVE">MMCM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CDDCDONE_PORT">cddcdone</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CDDCREQ_PORT">cddcreq</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFBOUT_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFBOUT_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_IN_N_PORT">clkfb_in_n</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_IN_PORT">clkfb_in</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_IN_P_PORT">clkfb_in_p</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_IN_SIGNALING">SINGLE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_OUT_N_PORT">clkfb_out_n</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_OUT_PORT">clkfb_out</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_OUT_P_PORT">clkfb_out_p</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKFB_STOPPED_PORT">clkfb_stopped</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKIN1_JITTER_PS">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKIN2_JITTER_PS">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT0_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT0_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT0_ACTUAL_FREQ">200.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_ACTUAL_FREQ">40.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_DUTY_CYCLE">50.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_OUT_FREQ">200.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_REQUESTED_OUT_FREQ">200.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT1_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_ACTUAL_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_DUTY_CYCLE">50.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_OUT_FREQ">40.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_REQUESTED_OUT_FREQ">40.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT2_USED">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_ACTUAL_FREQ">83.333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_DUTY_CYCLE">50.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT3_USED">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_ACTUAL_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_DUTY_CYCLE">50.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_OUT_FREQ">83.333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_REQUESTED_OUT_FREQ">83.333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT4_USED">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_ACTUAL_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT5_USED">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_ACTUAL_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT6_USED">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_USED">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUTPHY_MODE">VCO</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_IN_SEL_PORT">clk_in_sel</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT1_PORT">clk_200M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT2_PORT">clk_40M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT3_PORT">clk_100M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT4_PORT">clk_83M333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT5_PORT">clk_out5</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT6_PORT">clk_out6</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT7_PORT">clk_out7</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_VALID_PORT">CLK_VALID</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLOCK_MGR_TYPE">NA</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DADDR_PORT">daddr</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DCLK_PORT">dclk</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DEN_PORT">den</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIN_PORT">din</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVCLK">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE1_AUTO">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE2_AUTO">5.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE3_AUTO">2.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE4_AUTO">2.4000096000384</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE5_AUTO">2.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE6_AUTO">2.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DIVIDE7_AUTO">2.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DOUT_PORT">dout</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DRDY_PORT">drdy</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_DWE_PORT">dwe</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_CLKOUTPHY">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_CLOCK_MONITOR">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_USER_CLOCK0">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_USER_CLOCK1">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_USER_CLOCK2">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ENABLE_USER_CLOCK3">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_Enable_PLL0">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_Enable_PLL1">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_FEEDBACK_SOURCE">FDBK_AUTO</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_FILTER_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_FILTER_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_HAS_CDDC">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_INCLK_SUM_ROW0">Input Clock Freq (MHz) Input Jitter (UI)</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_INCLK_SUM_ROW1">__primary_________100.000____________0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_INCLK_SUM_ROW2">no_secondary_input_clock </spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_INPUT_CLK_STOPPED_PORT">input_clk_stopped</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_INTERFACE_SELECTION">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_IN_FREQ_UNITS">Units_MHz</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_JITTER_SEL">No_Jitter</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_LOCKED_PORT">locked</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_LOCK_1">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_LOCK_2">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_LOCK_3">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV1">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV2">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV3">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV4">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV5">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV6">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCMBUFGCEDIV7">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_BANDWIDTH">OPTIMIZED</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKFBOUT_MULT_F">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKFBOUT_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKFBOUT_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKIN1_PERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKIN2_PERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT0_DIVIDE_F">5.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT0_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT0_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT0_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT1_DIVIDE">25</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT1_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT1_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT1_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT2_DIVIDE">10</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT2_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT2_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT2_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT3_DIVIDE">12</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT3_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT3_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT3_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT4_CASCADE">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT4_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT4_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT4_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT4_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT5_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT5_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT5_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT5_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT6_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT6_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT6_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLKOUT6_USE_FINE_PS">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_CLOCK_HOLD">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_COMPENSATION">ZHOLD</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_DIVCLK_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_NOTES">None</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_REF_JITTER1">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_REF_JITTER2">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MMCM_STARTUP_WAIT">FALSE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_NUM_OUT_CLKS">4</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW0A"> Output Output Phase Duty Cycle Pk-to-Pk Phase</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW0B"> Clock Freq (MHz) (degrees) (%) Jitter (ps) Error (ps)</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW1">clk_200M___200.000______0.000______50.0______114.829_____98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW2">_clk_40M____40.000______0.000______50.0______159.371_____98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW3">clk_100M___100.000______0.000______50.0______130.958_____98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW4">clk_83M333____83.333______0.000______50.0______135.981_____98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW5">no_CLK_OUT5_output</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW6">no_CLK_OUT6_output</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW7">no_CLK_OUT7_output</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OVERRIDE_MMCM">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OVERRIDE_PLL">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PHASESHIFT_MODE">WAVEFORM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLATFORM">UNKNOWN</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLLBUFGCEDIV">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLLBUFGCEDIV1">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLLBUFGCEDIV2">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLLBUFGCEDIV3">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLLBUFGCEDIV4">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_BANDWIDTH">OPTIMIZED</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKFBOUT_MULT">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKFBOUT_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKIN_PERIOD">1.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT0_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT0_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT0_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT1_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT1_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT1_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT2_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT2_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT2_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT3_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT3_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT3_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT4_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT4_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT4_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT5_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT5_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLKOUT5_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_CLK_FEEDBACK">CLKFBOUT</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_COMPENSATION">SYSTEM_SYNCHRONOUS</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_DIVCLK_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_NOTES">No notes</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PLL_REF_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_POWER_DOWN_PORT">power_down</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_POWER_REG">0000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRECISION">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIMARY_PORT">clk_in1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIMITIVE">MMCM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIMTYPE_SEL">AUTO</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_IN_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_IN_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_IN_TIMEPERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_SOURCE">Differential_clock_capable_pin</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PSCLK_PORT">psclk</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PSDONE_PORT">psdone</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PSEN_PORT">psen</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PSINCDEC_PORT">psincdec</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_REF_CLK_FREQ">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_RESET_LOW">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_RESET_PORT">reset</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SECONDARY_IN_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SECONDARY_IN_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SECONDARY_IN_TIMEPERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SECONDARY_PORT">clk_in2</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SECONDARY_SOURCE">Single_ended_clock_capable_pin</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SS_MODE">CENTER_HIGH</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SS_MOD_PERIOD">4000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_SS_MOD_TIME">0.004</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_STATUS_PORT">STATUS</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_S_AXI_ADDR_WIDTH">11</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_S_AXI_DATA_WIDTH">32</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USER_CLK_FREQ0">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USER_CLK_FREQ1">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USER_CLK_FREQ2">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USER_CLK_FREQ3">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLKFB_STOPPED">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLKOUT1_BAR">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLKOUT2_BAR">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLKOUT3_BAR">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLKOUT4_BAR">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLK_VALID">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_CLOCK_SEQUENCING">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_DYN_PHASE_SHIFT">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_DYN_RECONFIG">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_FAST_SIMULATION">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_FREEZE">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_FREQ_SYNTH">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_INCLK_STOPPED">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_INCLK_SWITCHOVER">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_LOCKED">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_MAX_I_JITTER">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_MIN_O_JITTER">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_MIN_POWER">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_PHASE_ALIGNMENT">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_POWER_DOWN">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_RESET">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_SAFE_CLOCK_STARTUP">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_SPREAD_SPECTRUM">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_STATUS">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.c_component_name">clk_d100_100_200_40MHz</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.AUTO_PRIMITIVE">MMCM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.AXI_DRP">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CALC_DONE">empty</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CDDCDONE_PORT">cddcdone</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CDDCREQ_PORT">cddcreq</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_IN_N_PORT">clkfb_in_n</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_IN_PORT">clkfb_in</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_IN_P_PORT">clkfb_in_p</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_IN_SIGNALING">SINGLE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_OUT_N_PORT">clkfb_out_n</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_OUT_PORT">clkfb_out</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_OUT_P_PORT">clkfb_out_p</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKFB_STOPPED_PORT">clkfb_stopped</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKIN1_JITTER_PS">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKIN1_UI_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKIN2_JITTER_PS">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKIN2_UI_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_JITTER">114.829</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_PHASE_ERROR">98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_REQUESTED_OUT_FREQ">200.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT1_USED">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_JITTER">159.371</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_PHASE_ERROR">98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_REQUESTED_OUT_FREQ">40.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT2_USED">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_JITTER">130.958</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_PHASE_ERROR">98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT3_USED">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_JITTER">135.981</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_PHASE_ERROR">98.575</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_REQUESTED_OUT_FREQ">83.333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT4_USED">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_JITTER">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_PHASE_ERROR">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT5_USED">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_JITTER">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_PHASE_ERROR">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT6_USED">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_DRIVES">BUFG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_JITTER">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_MATCHED_ROUTING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_PHASE_ERROR">0.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_REQUESTED_DUTY_CYCLE">50.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_REQUESTED_OUT_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_REQUESTED_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_SEQUENCE_NUMBER">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUT7_USED">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLKOUTPHY_REQUESTED_FREQ">600.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN1_BOARD_INTERFACE">Custom</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN2_BOARD_INTERFACE">Custom</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN_SEL_PORT">clk_in_sel</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT1_PORT">clk_200M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT1_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT2_PORT">clk_40M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT2_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT3_PORT">clk_100M</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT3_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT4_PORT">clk_83M333</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT4_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT5_PORT">clk_out5</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT5_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT6_PORT">clk_out6</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT6_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT7_PORT">clk_out7</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT7_USE_FINE_PS_GUI">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_VALID_PORT">CLK_VALID</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLOCK_MGR_TYPE">auto</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Component_Name">clk_d100_100_200_40MHz</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DADDR_PORT">daddr</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DCLK_PORT">dclk</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DEN_PORT">den</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DIFF_CLK_IN1_BOARD_INTERFACE">Custom</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DIFF_CLK_IN2_BOARD_INTERFACE">Custom</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DIN_PORT">din</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DOUT_PORT">dout</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DRDY_PORT">drdy</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.DWE_PORT">dwe</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_CDDC">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_CLKOUTPHY">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_CLOCK_MONITOR">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_USER_CLOCK0">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_USER_CLOCK1">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_USER_CLOCK2">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ENABLE_USER_CLOCK3">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Enable_PLL0">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Enable_PLL1">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.FEEDBACK_SOURCE">FDBK_AUTO</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.INPUT_CLK_STOPPED_PORT">input_clk_stopped</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.INPUT_MODE">frequency</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.INTERFACE_SELECTION">Enable_AXI</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.IN_FREQ_UNITS">Units_MHz</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.IN_JITTER_UNITS">Units_UI</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.JITTER_OPTIONS">UI</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.JITTER_SEL">No_Jitter</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.LOCKED_PORT">locked</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_BANDWIDTH">OPTIMIZED</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKFBOUT_MULT_F">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKFBOUT_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKFBOUT_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKIN1_PERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKIN2_PERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT0_DIVIDE_F">5.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT0_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT0_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT0_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT1_DIVIDE">25</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT1_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT1_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT1_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT2_DIVIDE">10</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT2_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT2_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT2_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT3_DIVIDE">12</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT3_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT3_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT3_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT4_CASCADE">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT4_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT4_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT4_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT4_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT5_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT5_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT5_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT5_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT6_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT6_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT6_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLKOUT6_USE_FINE_PS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_CLOCK_HOLD">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_COMPENSATION">ZHOLD</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_DIVCLK_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_NOTES">None</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_REF_JITTER1">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_REF_JITTER2">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.MMCM_STARTUP_WAIT">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.NUM_OUT_CLKS">4</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.OVERRIDE_MMCM">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.OVERRIDE_PLL">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PHASESHIFT_MODE">WAVEFORM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PHASE_DUTY_CONFIG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLATFORM">UNKNOWN</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_BANDWIDTH">OPTIMIZED</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKFBOUT_MULT">4</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKFBOUT_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKIN_PERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT0_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT0_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT0_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT1_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT1_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT1_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT2_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT2_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT2_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT3_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT3_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT3_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT4_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT4_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT4_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT5_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT5_DUTY_CYCLE">0.500</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLKOUT5_PHASE">0.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_CLK_FEEDBACK">CLKFBOUT</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_COMPENSATION">SYSTEM_SYNCHRONOUS</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_DIVCLK_DIVIDE">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_NOTES">None</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PLL_REF_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.POWER_DOWN_PORT">power_down</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRECISION">1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIMARY_PORT">clk_in1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIMITIVE">MMCM</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIMTYPE_SEL">mmcm_adv</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIM_IN_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIM_IN_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIM_IN_TIMEPERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PRIM_SOURCE">Differential_clock_capable_pin</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PSCLK_PORT">psclk</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PSDONE_PORT">psdone</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PSEN_PORT">psen</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.PSINCDEC_PORT">psincdec</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.REF_CLK_FREQ">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.RELATIVE_INCLK">REL_PRIMARY</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.RESET_BOARD_INTERFACE">Custom</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.RESET_PORT">reset</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.RESET_TYPE">ACTIVE_HIGH</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SECONDARY_IN_FREQ">100.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SECONDARY_IN_JITTER">0.010</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SECONDARY_IN_TIMEPERIOD">10.000</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SECONDARY_PORT">clk_in2</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SECONDARY_SOURCE">Single_ended_clock_capable_pin</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SS_MODE">CENTER_HIGH</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SS_MOD_FREQ">250</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SS_MOD_TIME">0.004</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.STATUS_PORT">STATUS</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.SUMMARY_STRINGS">empty</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USER_CLK_FREQ0">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USER_CLK_FREQ1">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USER_CLK_FREQ2">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USER_CLK_FREQ3">100.0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_BOARD_FLOW">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_CLKFB_STOPPED">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_CLK_VALID">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_CLOCK_SEQUENCING">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_DYN_PHASE_SHIFT">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_DYN_RECONFIG">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_FREEZE">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_FREQ_SYNTH">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_INCLK_STOPPED">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_INCLK_SWITCHOVER">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_LOCKED">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_MAX_I_JITTER">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_MIN_O_JITTER">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_MIN_POWER">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_PHASE_ALIGNMENT">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_POWER_DOWN">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_RESET">true</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_SAFE_CLOCK_STARTUP">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_SPREAD_SPECTRUM">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.USE_STATUS">false</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.ARCHITECTURE">artix7</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.BOARD"/> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.DEVICE">xc7a100t</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.PACKAGE">fgg484</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.PREFHDL">VERILOG</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.SILICON_REVISION"/> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.SIMULATOR_LANGUAGE">MIXED</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.SPEEDGRADE">-2</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.TEMPERATURE_GRADE"/> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.USE_RDI_CUSTOMIZATION">TRUE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="PROJECT_PARAM.USE_RDI_GENERATION">TRUE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.IPCONTEXT">IP_Flow</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.IPREVISION">0</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.MANAGED">TRUE</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.OUTPUTDIR">.</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.SELECTEDSIMMODEL"/> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.SHAREDDIR">.</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.SWVERSION">2018.1</spirit:configurableElementValue> <spirit:configurableElementValue spirit:referenceId="RUNTIME_PARAM.SYNTHESISFLOW">OUT_OF_CONTEXT</spirit:configurableElementValue> </spirit:configurableElementValues> <spirit:vendorExtensions> <xilinx:componentInstanceExtensions> <xilinx:configElementInfos> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKIN1_JITTER_PS" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT1_JITTER" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT1_PHASE_ERROR" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT1_REQUESTED_OUT_FREQ" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_JITTER" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_PHASE_ERROR" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_REQUESTED_OUT_FREQ" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_USED" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT3_JITTER" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT3_PHASE_ERROR" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT3_USED" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT4_JITTER" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT4_PHASE_ERROR" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT4_REQUESTED_OUT_FREQ" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT4_USED" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT1_PORT" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT2_PORT" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT3_PORT" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT4_PORT" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKFBOUT_MULT_F" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKIN1_PERIOD" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKIN2_PERIOD" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT0_DIVIDE_F" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT1_DIVIDE" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT2_DIVIDE" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT3_DIVIDE" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_DIVCLK_DIVIDE" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.NUM_OUT_CLKS" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.PRIMARY_PORT" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.PRIM_IN_FREQ" xilinx:valueSource="user"/> <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.PRIM_SOURCE" xilinx:valueSource="user"/> </xilinx:configElementInfos> </xilinx:componentInstanceExtensions> </spirit:vendorExtensions> </spirit:componentInstance> </spirit:componentInstances> </spirit:design>
{ "pile_set_name": "Github" }
from __future__ import unicode_literals try: from urllib.parse import quote except: from urllib import quote from django.core.urlresolvers import RegexURLResolver, Resolver404 from django.http.request import QueryDict from django.utils import six class ModuleMatchName(str): """Dump str wrapper. Just to keep module reference over django url resolve calling hierarchy. """ class ModuleURLResolver(RegexURLResolver): """Module URL Resolver. A wrapper around RegexURLResolver that check the module installed state. And allows access to the resolved current module at runtime. Django reads url config once at the start. Installation and uninstallation the module at runtime don't produce change in the django url-conf. Url access check happens at the resolve time. """ def __init__(self, *args, **kwargs): # noqa D102 self._module = kwargs.pop('module') super(ModuleURLResolver, self).__init__(*args, **kwargs) def resolve(self, *args, **kwargs): # noqa D102 result = super(ModuleURLResolver, self).resolve(*args, **kwargs) if result and not getattr(self._module, 'installed', True): raise Resolver404({'message': 'Module not installed'}) result.url_name = ModuleMatchName(result.url_name) result.url_name.module = self._module return result def frontend_url(request, url=None, back_link=None, absolute=True): """Construct an url for a frontend view. :keyword back: type of the back link to be added to the query string - here: link to the current request page - here_if_none: add link only if there is no `back` parameter :keyword absolute: construct absolute url, including host name namespace = self.ns_map[task.process.flow_class] return frontend_url( self.request, flow_url(namespace, task, 'index', user=request.user), back='here') """ params = QueryDict(mutable=True) for key, value in six.iterlists(request.GET): if not key.startswith('datatable-') and key != '_': params.setlist(key, value) if back_link == 'here_if_none' and 'back' in params: # Do nothing pass elif back_link is not None: if params: back = "{}?{}".format(quote(request.path), quote(params.urlencode())) else: back = "{}".format(quote(request.path)) params['back'] = back if url is not None: location = '{}?{}'.format(url, params.urlencode()) return request.build_absolute_uri(location) if absolute else location else: return params.urlencode()
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/local/lib/python3.4/dist-packages/pandas/io/excel.py:626: UserWarning: Installed openpyxl is not supported at this time. Use >=1.6.1 and <2.0.0.\n", " .format(openpyxl_compat.start_ver, openpyxl_compat.stop_ver))\n" ] } ], "source": [ "import os\n", "import pandas as pd\n", "data_folder = os.path.join(os.path.expanduser(\"~\"), \"Data\", \"Adult\")\n", "adult_filename = os.path.join(data_folder, \"adult.data\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "adult = pd.read_csv(adult_filename, header=None, names=[\"Age\", \"Work-Class\", \"fnlwgt\", \"Education\",\n", " \"Education-Num\", \"Marital-Status\", \"Occupation\",\n", " \"Relationship\", \"Race\", \"Sex\", \"Capital-gain\",\n", " \"Capital-loss\", \"Hours-per-week\", \"Native-Country\",\n", " \"Earnings-Raw\"])" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "adult.dropna(how='all', inplace=True)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "Index(['Age', 'Work-Class', 'fnlwgt', 'Education', 'Education-Num', 'Marital-Status', 'Occupation', 'Relationship', 'Race', 'Sex', 'Capital-gain', 'Capital-loss', 'Hours-per-week', 'Native-Country', 'Earnings-Raw'], dtype='object')" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "adult.columns" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "count 32561.000000\n", "mean 40.437456\n", "std 12.347429\n", "min 1.000000\n", "25% 40.000000\n", "50% 40.000000\n", "75% 45.000000\n", "max 99.000000\n", "dtype: float64" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "adult[\"Hours-per-week\"].describe()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "10.0" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "adult[\"Education-Num\"].median()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([' State-gov', ' Self-emp-not-inc', ' Private', ' Federal-gov',\n", " ' Local-gov', ' ?', ' Self-emp-inc', ' Without-pay', ' Never-worked'], dtype=object)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "adult[\"Work-Class\"].unique()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "X = np.arange(30).reshape((10, 3))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0, 1, 2],\n", " [ 3, 4, 5],\n", " [ 6, 7, 8],\n", " [ 9, 10, 11],\n", " [12, 13, 14],\n", " [15, 16, 17],\n", " [18, 19, 20],\n", " [21, 22, 23],\n", " [24, 25, 26],\n", " [27, 28, 29]])" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [], "source": [ "X[:,1] = 1" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0, 1, 2],\n", " [ 3, 1, 5],\n", " [ 6, 1, 8],\n", " [ 9, 1, 11],\n", " [12, 1, 14],\n", " [15, 1, 17],\n", " [18, 1, 20],\n", " [21, 1, 23],\n", " [24, 1, 26],\n", " [27, 1, 29]])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from sklearn.feature_selection import VarianceThreshold" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [], "source": [ "vt = VarianceThreshold()\n", "Xt = vt.fit_transform(X)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0, 2],\n", " [ 3, 5],\n", " [ 6, 8],\n", " [ 9, 11],\n", " [12, 14],\n", " [15, 17],\n", " [18, 20],\n", " [21, 23],\n", " [24, 26],\n", " [27, 29]])" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Xt" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ 74.25 0. 74.25]\n" ] } ], "source": [ "print(vt.variances_)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [], "source": [ "X = adult[[\"Age\", \"Education-Num\", \"Capital-gain\", \"Capital-loss\", \"Hours-per-week\"]].values\n", "y = (adult[\"Earnings-Raw\"] == ' >50K').values" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from sklearn.feature_selection import SelectKBest\n", "from sklearn.feature_selection import chi2\n", "transformer = SelectKBest(score_func=chi2, k=3)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ 8.60061182e+03 2.40142178e+03 8.21924671e+07 1.37214589e+06\n", " 6.47640900e+03]\n" ] } ], "source": [ "Xt_chi2 = transformer.fit_transform(X, y)\n", "print(transformer.scores_)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from scipy.stats import pearsonr\n", "\n", "def multivariate_pearsonr(X, y):\n", " scores, pvalues = [], []\n", " for column in range(X.shape[1]):\n", " cur_score, cur_p = pearsonr(X[:,column], y)\n", " scores.append(abs(cur_score))\n", " pvalues.append(cur_p)\n", " return (np.array(scores), np.array(pvalues))" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ 0.2340371 0.33515395 0.22332882 0.15052631 0.22968907]\n" ] } ], "source": [ "transformer = SelectKBest(score_func=multivariate_pearsonr, k=3)\n", "Xt_pearson = transformer.fit_transform(X, y)\n", "print(transformer.scores_)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.cross_validation import cross_val_score\n", "clf = DecisionTreeClassifier(random_state=14)\n", "scores_chi2 = cross_val_score(clf, Xt_chi2, y, scoring='accuracy')\n", "scores_pearson = cross_val_score(clf, Xt_pearson, y, scoring='accuracy')" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Chi2 performance: 0.829\n", "Pearson performance: 0.771\n" ] } ], "source": [ "print(\"Chi2 performance: {0:.3f}\".format(scores_chi2.mean()))\n", "print(\"Pearson performance: {0:.3f}\".format(scores_pearson.mean()))" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from sklearn.base import TransformerMixin\n", "from sklearn.utils import as_float_array\n", "\n", "class MeanDiscrete(TransformerMixin):\n", " def fit(self, X, y=None):\n", " X = as_float_array(X)\n", " self.mean = np.mean(X, axis=0)\n", " return self\n", "\n", " def transform(self, X):\n", " X = as_float_array(X)\n", " assert X.shape[1] == self.mean.shape[0]\n", " return X > self.mean" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [], "source": [ "mean_discrete = MeanDiscrete()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [], "source": [ "X_mean = mean_discrete.fit_transform(X)" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Overwriting adult_tests.py\n" ] } ], "source": [ "%%file adult_tests.py\n", "import numpy as np\n", "from numpy.testing import assert_array_equal\n", "\n", "def test_meandiscrete():\n", " X_test = np.array([[ 0, 2],\n", " [ 3, 5],\n", " [ 6, 8],\n", " [ 9, 11],\n", " [12, 14],\n", " [15, 17],\n", " [18, 20],\n", " [21, 23],\n", " [24, 26],\n", " [27, 29]])\n", " mean_discrete = MeanDiscrete()\n", " mean_discrete.fit(X_test)\n", " assert_array_equal(mean_discrete.mean, np.array([13.5, 15.5]))\n", " X_transformed = mean_discrete.transform(X_test)\n", " X_expected = np.array([[ 0, 0],\n", " [ 0, 0],\n", " [ 0, 0],\n", " [ 0, 0],\n", " [ 0, 0],\n", " [ 1, 1],\n", " [ 1, 1],\n", " [ 1, 1],\n", " [ 1, 1],\n", " [ 1, 1]])\n", " assert_array_equal(X_transformed, X_expected)" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "collapsed": false }, "outputs": [ { "ename": "NameError", "evalue": "name 'test_meandiscrete' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m<ipython-input-29-cbf134d89aa0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtest_meandiscrete\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[1;31mNameError\u001b[0m: name 'test_meandiscrete' is not defined" ] } ], "source": [ "test_meandiscrete()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from sklearn.pipeline import Pipeline\n", "\n", "pipeline = Pipeline([('mean_discrete', MeanDiscrete()),\n", " ('classifier', DecisionTreeClassifier(random_state=14))])\n", "scores_mean_discrete = cross_val_score(pipeline, X, y, scoring='accuracy')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "print(\"Mean Discrete performance: {0:.3f}\".format(scores_mean_discrete.mean()))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.0" } }, "nbformat": 4, "nbformat_minor": 0 }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.props')" /> <PropertyGroup> <SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir> </PropertyGroup> <PropertyGroup Label="Globals"> <CppWinRTEnabled>true</CppWinRTEnabled> <MinimalCoreWin>true</MinimalCoreWin> <ProjectGuid>{0E3E4E04-B98C-5DAF-B555-09B210518345}</ProjectGuid> <ProjectName>FileThumbnails</ProjectName> <RootNamespace>SDKTemplate</RootNamespace> <DefaultLanguage>en-US</DefaultLanguage> <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> <AppContainerApplication>true</AppContainerApplication> <ApplicationType>Windows Store</ApplicationType> <ApplicationTypeRevision>10.0</ApplicationTypeRevision> <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformMinVersion>$(WindowsTargetPlatformVersion)</WindowsTargetPlatformMinVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|ARM"> <Configuration>Debug</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|ARM"> <Configuration>Release</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> <UseDebugLibraries>true</UseDebugLibraries> <LinkIncremental>true</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);$(SharedContentDir)\cppwinrt</IncludePath> <CppWinRTOptimized>true</CppWinRTOptimized> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <WarningLevel>Level4</WarningLevel> <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> </ClCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'"> <ClCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'"> <ClCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> <ItemGroup> <ClInclude Include="$(SharedContentDir)\cppwinrt\App.h"> <DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon> </ClInclude> <ClInclude Include="$(SharedContentDir)\cppwinrt\MainPage.h"> <DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> </ClInclude> <ClInclude Include="SampleConfiguration.h" /> <ClInclude Include="pch.h" /> <ClInclude Include="Scenario1.h"> <DependentUpon>Scenario1.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> <ClInclude Include="Scenario2.h"> <DependentUpon>Scenario2.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> <ClInclude Include="Scenario3.h"> <DependentUpon>Scenario3.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> <ClInclude Include="Scenario4.h"> <DependentUpon>Scenario4.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> <ClInclude Include="Scenario5.h"> <DependentUpon>Scenario5.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> <ClInclude Include="Scenario6.h"> <DependentUpon>Scenario6.xaml</DependentUpon> <SubType>Code</SubType> </ClInclude> </ItemGroup> <ItemGroup> <ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml"> <SubType>Designer</SubType> </ApplicationDefinition> <Page Include="$(SharedContentDir)\xaml\MainPage.xaml"> <SubType>Designer</SubType> </Page> <Page Include="$(SharedContentDir)\xaml\Styles.xaml"> <Link>Styles\Styles.xaml</Link> </Page> <Page Include="Scenario1.xaml"> <SubType>Designer</SubType> </Page> <Page Include="Scenario2.xaml"> <SubType>Designer</SubType> </Page> <Page Include="Scenario3.xaml"> <SubType>Designer</SubType> </Page> <Page Include="Scenario4.xaml"> <SubType>Designer</SubType> </Page> <Page Include="Scenario5.xaml"> <SubType>Designer</SubType> </Page> <Page Include="Scenario6.xaml"> <SubType>Designer</SubType> </Page> </ItemGroup> <ItemGroup> <ClCompile Include="$(SharedContentDir)\cppwinrt\App.cpp"> <DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon> </ClCompile> <ClCompile Include="$(SharedContentDir)\cppwinrt\MainPage.cpp"> <DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> </ClCompile> <ClCompile Include="$(GeneratedFilesDir)module.g.cpp"> <DependentUpon>Project.idl</DependentUpon> </ClCompile> <ClCompile Include="pch.cpp"> <PrecompiledHeader>Create</PrecompiledHeader> <DependentUpon>pch.h</DependentUpon> </ClCompile> <ClCompile Include="SampleConfiguration.cpp"> <DependentUpon>SampleConfiguration.h</DependentUpon> </ClCompile> <ClCompile Include="Scenario1.cpp"> <DependentUpon>Scenario1.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> <ClCompile Include="Scenario2.cpp"> <DependentUpon>Scenario2.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> <ClCompile Include="Scenario3.cpp"> <DependentUpon>Scenario3.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> <ClCompile Include="Scenario4.cpp"> <DependentUpon>Scenario4.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> <ClCompile Include="Scenario5.cpp"> <DependentUpon>Scenario5.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> <ClCompile Include="Scenario6.cpp"> <DependentUpon>Scenario6.xaml</DependentUpon> <SubType>Code</SubType> </ClCompile> </ItemGroup> <ItemGroup> <Midl Include="$(SharedContentDir)\cppwinrt\MainPage.idl"> <DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> </Midl> <Midl Include="Project.idl" /> </ItemGroup> <ItemGroup> <AppxManifest Include="Package.appxmanifest"> <SubType>Designer</SubType> </AppxManifest> </ItemGroup> <ItemGroup> <Image Include="$(SharedContentDir)\media\microsoft-sdk.png"> <Link>Assets\microsoft-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\placeholder-sdk.png"> <Link>Assets\placeholder-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\smalltile-sdk.png"> <Link>Assets\smallTile-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\splash-sdk.png"> <Link>Assets\splash-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\squaretile-sdk.png"> <Link>Assets\squareTile-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\storelogo-sdk.png"> <Link>Assets\storeLogo-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\tile-sdk.png"> <Link>Assets\tile-sdk.png</Link> </Image> <Image Include="$(SharedContentDir)\media\windows-sdk.png"> <Link>Assets\windows-sdk.png</Link> </Image> </ItemGroup> <ItemGroup> <None Include="packages.config" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> <Import Project="packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.targets')" /> </ImportGroup> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.props'))" /> <Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.190506.1\build\native\Microsoft.Windows.CppWinRT.targets'))" /> </Target> </Project>
{ "pile_set_name": "Github" }
version: 2 jobs: build: environment: GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError" _JAVA_OPTIONS: -Xms512m -Xmx1024m docker: - image: circleci/android:api-28 steps: - checkout - restore_cache: keys: - v1-dep-{{ .Branch }}- - run: ./gradlew clean test jacocoTestReport --console=plain - save_cache: key: v1-dep-{{ .Branch }}-{{ epoch }} paths: - ~/.gradle - ~/.android - /usr/local/android-sdk-linux/extras - run: name: Upload Coverage when: on_success command: bash <(curl -s https://codecov.io/bash) -Z -C $CIRCLE_SHA1
{ "pile_set_name": "Github" }
/* * Copyright (C) 2008 The Android Open Source Project * * 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 android.test.suitebuilder.annotation; import android.test.suitebuilder.TestMethod; import junit.framework.TestCase; import java.lang.annotation.Annotation; import java.lang.reflect.Method; public class HasMethodAnnotationTest extends TestCase { public void testMethodWithSpecifiedAttribute() throws Exception { assertTrue(methodHasAnnotation(AnnotatedMethodExample.class, "testThatIsAnnotated", Smoke.class)); } public void testMethodWithoutSpecifiedAttribute() throws Exception { assertFalse(methodHasAnnotation(AnnotatedMethodExample.class, "testThatIsNotAnnotated", Smoke.class)); } private boolean methodHasAnnotation(Class<? extends TestCase> aClass, String methodName, Class<? extends Annotation> expectedClassification ) throws NoSuchMethodException { Method method = aClass.getMethod(methodName); TestMethod testMethod = new TestMethod(method, aClass); return new HasMethodAnnotation(expectedClassification).apply(testMethod); } static class AnnotatedMethodExample extends TestCase { @Smoke public void testThatIsAnnotated() { } public void testThatIsNotAnnotated() { } } }
{ "pile_set_name": "Github" }
RIOTBASE ?= $(CURDIR)/../.. # Instrumend code with AFL by default TOOLCHAIN ?= afl # Automatically set application to a sensible default APPLICATION ?= fuzzing_$(notdir $(patsubst %/,%,$(CURDIR))) # Fuzzing is only supported on native BOARD ?= native FEATURES_REQUIRED += arch_native CFLAGS += -ggdb # Make ASAN output more useful error messages CFLAGS += -D_FORTIFY_SOURCE=2 # Compiler hardening # Various utilitiy modules USEMODULE += fuzzing USEMODULE += ssp # Enable DEVELHELP by default DEVELHELP ?= 1
{ "pile_set_name": "Github" }
// +build !static_build package dbus import ( "os/user" ) func lookupHomeDir() string { u, err := user.Current() if err != nil { return "/" } return u.HomeDir }
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -Wcast-align -verify %s // Simple casts. void test0(char *P) { char *a; short *b; int *c; a = (char*) P; a = static_cast<char*>(P); a = reinterpret_cast<char*>(P); typedef char *CharPtr; a = CharPtr(P); b = (short*) P; // expected-warning {{cast from 'char *' to 'short *' increases required alignment from 1 to 2}} b = reinterpret_cast<short*>(P); typedef short *ShortPtr; b = ShortPtr(P); // expected-warning {{cast from 'char *' to 'ShortPtr' (aka 'short *') increases required alignment from 1 to 2}} c = (int*) P; // expected-warning {{cast from 'char *' to 'int *' increases required alignment from 1 to 4}} c = reinterpret_cast<int*>(P); typedef int *IntPtr; c = IntPtr(P); // expected-warning {{cast from 'char *' to 'IntPtr' (aka 'int *') increases required alignment from 1 to 4}} } // Casts from void* are a special case. void test1(void *P) { char *a; short *b; int *c; a = (char*) P; a = static_cast<char*>(P); a = reinterpret_cast<char*>(P); typedef char *CharPtr; a = CharPtr(P); b = (short*) P; b = static_cast<short*>(P); b = reinterpret_cast<short*>(P); typedef short *ShortPtr; b = ShortPtr(P); c = (int*) P; c = static_cast<int*>(P); c = reinterpret_cast<int*>(P); typedef int *IntPtr; c = IntPtr(P); }
{ "pile_set_name": "Github" }
{ "name": "node-firebird", "version": "0.9.8", "description": "Pure JavaScript and Asynchronous Firebird client for Node.js.", "keywords": [ "firebird", "database", "rdbms", "sql" ], "homepage": "https://github.com/hgourvest/node-firebird", "repository": { "type": "git", "url": "https://github.com/hgourvest/node-firebird" }, "author": { "name": "Henri Gourvest", "email": "[email protected]" }, "contributors": [ "Popa Marius Adrian <[email protected]>", "Peter Širka <[email protected]>" ], "main": "./lib", "types": "./lib/index.d.ts", "licenses": [ { "type": "MPL-2.0", "url": "https://github.com/hgourvest/node-firebird/blob/master/LICENSE" } ], "scripts": { "test": "mocha" }, "dependencies": { "long": "^4.0.0" }, "devDependencies": { "coveralls": "^3.0.1", "mocha": "^8.0.1", "nyc": "^15.0.1" } }
{ "pile_set_name": "Github" }
# Copyright 2013, Michael H. Goldwasser # # Developed for use with the book: # # Data Structures and Algorithms in Python # Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser # John Wiley & Sons, 2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import collections def sum(values): if not isinstance(values, collections.Iterable): raise TypeError('parameter must be an iterable type') total = 0 for v in values: if not isinstance(v, (int, float)): raise TypeError('elements must be numeric') total = total+ v return total
{ "pile_set_name": "Github" }
{ "$schema": "http://json-schema.org/schema", "id": "timepicker-scrollto", "title": "timepicker-scrollto", "type": "object", "properties": { "path": { "type": "string", "format": "path", "description": "The path to create the component.", "visible": false }, "project": { "type": "string", "description": "The name of the project.", "$default": { "$source": "projectName" } }, "name": { "type": "string", "description": "The name of the component.", "$default": { "$source": "argv", "index": 0 } }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false, "alias": "s" }, "inlineTemplate": { "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false, "alias": "t" }, "viewEncapsulation": { "description": "Specifies the view encapsulation strategy.", "enum": [ "Emulated", "Native", "None", "ShadowDom" ], "type": "string", "alias": "v" }, "changeDetection": { "description": "Specifies the change detection strategy.", "enum": [ "Default", "OnPush" ], "type": "string", "default": "Default", "alias": "c" }, "prefix": { "type": "string", "description": "The prefix to apply to generated selectors.", "alias": "p", "oneOf": [ { "maxLength": 0 }, { "minLength": 1, "format": "html-selector" } ] }, "styleext": { "description": "The file extension to be used for style files.", "type": "string", "default": "css" }, "spec": { "type": "boolean", "description": "Specifies if a spec file is generated.", "default": true }, "flat": { "type": "boolean", "description": "Flag to indicate if a dir is created.", "default": false }, "skipImport": { "type": "boolean", "description": "Flag to skip the module import.", "default": false }, "selector": { "type": "string", "format": "html-selector", "description": "The selector to use for the component." }, "module": { "type": "string", "description": "Allows specification of the declaring module.", "alias": "m" }, "export": { "type": "boolean", "default": false, "description": "Specifies if declaring module exports the component." }, "entryComponent": { "type": "boolean", "default": false, "description": "Specifies if the component is an entry component of declaring module." }, "lintFix": { "type": "boolean", "default": false, "description": "Specifies whether to apply lint fixes after generating the component." } }, "required": [ "name" ] }
{ "pile_set_name": "Github" }
===================================== The PDB Global Symbol Stream =====================================
{ "pile_set_name": "Github" }
version: 2 jobs: build: docker: - image: circleci/python:3.7.4 working_directory: ~/gensim steps: - checkout - restore_cache: key: pip-cache - run: name: Apt install (for latex render) command: | sudo apt-get -yq update sudo apt-get -yq remove texlive-binaries --purge sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended latexmk sudo apt-get -yq install build-essential python3.7-dev - run: name: Basic installation (tox) command: | python3.7 -m virtualenv venv source venv/bin/activate pip install tox --progress-bar off - run: name: Build documentation environment: TOX_PARALLEL_NO_SPINNER: 1 TOX_PIP_OPTS: --progress-bar=off command: | source venv/bin/activate tox -e compile,docs -vv - store_artifacts: path: docs/src/_build destination: documentation - save_cache: key: pip-cache paths: - "~/.cache/pip" - "~/.ccache" - "~/.pip-cache"
{ "pile_set_name": "Github" }
@media screen, 3D { P { color:green; } } @media print { body { font-size:10pt; } } @media screen { body { font-size:13px; } } @media screen, print { body { line-height:1.2; } } @media all and (min-width: 0px) { body { line-height:1.2; } } @media all and (min-width: 0) { body { line-height:1.2; } } @media screen and (min-width: 102.5em) and (max-width: 117.9375em), screen and (min-width: 150em) { body { color:blue; } }
{ "pile_set_name": "Github" }
# locally computed sha256 d5d81a78046b4c228d29ba88d9950e0f63858e5fcf601e3d0f8bf107fbaadc03 python-rtslib-fb-v2.1.fb57.tar.gz
{ "pile_set_name": "Github" }
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from xml.sax.handler import ContentHandler from lib.core.common import Backend from lib.core.common import parseXmlFile from lib.core.common import sanitizeStr from lib.core.data import kb from lib.core.data import paths from lib.core.enums import DBMS from lib.parse.handler import FingerprintHandler class MSSQLBannerHandler(ContentHandler): """ This class defines methods to parse and extract information from the given Microsoft SQL Server banner based upon the data in XML file """ def __init__(self, banner, info): ContentHandler.__init__(self) self._banner = sanitizeStr(banner) self._inVersion = False self._inServicePack = False self._release = None self._version = "" self._versionAlt = None self._servicePack = "" self._info = info def _feedInfo(self, key, value): value = sanitizeStr(value) if value in (None, "None"): return self._info[key] = value def startElement(self, name, attrs): if name == "signatures": self._release = sanitizeStr(attrs.get("release")) elif name == "version": self._inVersion = True elif name == "servicepack": self._inServicePack = True def characters(self, data): if self._inVersion: self._version += sanitizeStr(data) elif self._inServicePack: self._servicePack += sanitizeStr(data) def endElement(self, name): if name == "signature": for version in (self._version, self._versionAlt): if version and re.search(r" %s[\.\ ]+" % re.escape(version), self._banner): self._feedInfo("dbmsRelease", self._release) self._feedInfo("dbmsVersion", self._version) self._feedInfo("dbmsServicePack", self._servicePack) break self._version = "" self._versionAlt = None self._servicePack = "" elif name == "version": self._inVersion = False self._version = self._version.replace(" ", "") match = re.search(r"\A(?P<major>\d+)\.00\.(?P<build>\d+)\Z", self._version) self._versionAlt = "%s.0.%s.0" % (match.group('major'), match.group('build')) if match else None elif name == "servicepack": self._inServicePack = False self._servicePack = self._servicePack.replace(" ", "") def bannerParser(banner): """ This function calls a class to extract information from the given DBMS banner based upon the data in XML file """ xmlfile = None if Backend.isDbms(DBMS.MSSQL): xmlfile = paths.MSSQL_XML elif Backend.isDbms(DBMS.MYSQL): xmlfile = paths.MYSQL_XML elif Backend.isDbms(DBMS.ORACLE): xmlfile = paths.ORACLE_XML elif Backend.isDbms(DBMS.PGSQL): xmlfile = paths.PGSQL_XML if not xmlfile: return if Backend.isDbms(DBMS.MSSQL): handler = MSSQLBannerHandler(banner, kb.bannerFp) parseXmlFile(xmlfile, handler) handler = FingerprintHandler(banner, kb.bannerFp) parseXmlFile(paths.GENERIC_XML, handler) else: handler = FingerprintHandler(banner, kb.bannerFp) parseXmlFile(xmlfile, handler) parseXmlFile(paths.GENERIC_XML, handler)
{ "pile_set_name": "Github" }
/* * Copyright 2020 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.thoughtworks.go.spark.spring; import com.thoughtworks.go.spark.RerouteLatestApis; import com.thoughtworks.go.spark.RoutesHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import spark.globalstate.ServletFlag; import spark.servlet.SparkApplication; @Component public class Application implements SparkApplication { @Autowired public Application(RouteInformationProvider routeInformationProvider, RerouteLatestApis rerouteLatestApis, SparkSpringController... controllers) { ServletFlag.runFromServlet(); RoutesHelper routesHelper = new RoutesHelper(controllers); routesHelper.init(); routeInformationProvider.cacheRouteInformation(); rerouteLatestApis.registerLatest(); } @Override public void init() { } }
{ "pile_set_name": "Github" }
/**************************************************************************** * * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2019 by Inria. All rights reserved. * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file LICENSE.txt at the root directory of this source * distribution for additional information about the GNU GPL. * * For using ViSP with software that can not be combined with the GNU * GPL, please contact Inria about acquiring a ViSP Professional * Edition License. * * See http://visp.inria.fr for more information. * * This software was developed at: * Inria Rennes - Bretagne Atlantique * Campus Universitaire de Beaulieu * 35042 Rennes Cedex * France * * If you have questions regarding the use of this file, please contact * Inria at [email protected] * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * Description: * Template tracker. * * Authors: * Amaury Dame * Aurelien Yol * Fabien Spindler * *****************************************************************************/ #include <visp3/tt/vpTemplateTrackerWarpAffine.h> vpTemplateTrackerWarpAffine::vpTemplateTrackerWarpAffine() { nbParam = 6; dW.resize(2, nbParam); } // get the parameter corresponding to the lower level of a gaussian pyramid void vpTemplateTrackerWarpAffine::getParamPyramidDown(const vpColVector &p, vpColVector &pdown) { pdown = p; pdown[4] = p[4] / 2.; pdown[5] = p[5] / 2.; } void vpTemplateTrackerWarpAffine::getParamPyramidUp(const vpColVector &p, vpColVector &pup) { pup = p; pup[4] = p[4] * 2.; pup[5] = p[5] * 2.; } /*calcul de di*dw(x,p0)/dp */ void vpTemplateTrackerWarpAffine::getdW0(const int &i, const int &j, const double &dy, const double &dx, double *dIdW) { dIdW[0] = j * dx; dIdW[1] = j * dy; dIdW[2] = i * dx; dIdW[3] = i * dy; dIdW[4] = dx; dIdW[5] = dy; } /*calcul de dw(x,p0)/dp */ void vpTemplateTrackerWarpAffine::getdWdp0(const int &i, const int &j, double *dIdW) { dIdW[0] = j; dIdW[1] = 0; dIdW[2] = i; dIdW[3] = 0; dIdW[4] = 1.; dIdW[5] = 0; dIdW[6] = 0; dIdW[7] = j; dIdW[8] = 0; dIdW[9] = i; dIdW[10] = 0; dIdW[11] = 1.; } void vpTemplateTrackerWarpAffine::warpX(const int &i, const int &j, double &i2, double &j2, const vpColVector &ParamM) { j2 = (1 + ParamM[0]) * j + ParamM[2] * i + ParamM[4]; i2 = ParamM[1] * j + (1 + ParamM[3]) * i + ParamM[5]; } void vpTemplateTrackerWarpAffine::warpX(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM) { vXres[0] = (1.0 + ParamM[0]) * vX[0] + ParamM[2] * vX[1] + ParamM[4]; vXres[1] = ParamM[1] * vX[0] + (1.0 + ParamM[3]) * vX[1] + ParamM[5]; } void vpTemplateTrackerWarpAffine::dWarp(const vpColVector &X1, const vpColVector & /*X2*/, const vpColVector & /*ParamM*/, vpMatrix &dW_) { double j = X1[0]; double i = X1[1]; dW_ = 0; dW_[0][0] = j; dW_[0][2] = i; dW_[0][4] = 1; dW_[1][1] = j; dW_[1][3] = i; dW_[1][5] = 1; } /*compute dw=dw/dx*dw/dp */ void vpTemplateTrackerWarpAffine::dWarpCompo(const vpColVector & /*X1*/, const vpColVector & /*X2*/, const vpColVector &ParamM, const double *dwdp0, vpMatrix &dW_) { for (unsigned int i = 0; i < nbParam; i++) { dW_[0][i] = (1. + ParamM[0]) * dwdp0[i] + ParamM[2] * dwdp0[i + nbParam]; dW_[1][i] = ParamM[1] * dwdp0[i] + (1. + ParamM[3]) * dwdp0[i + nbParam]; } } void vpTemplateTrackerWarpAffine::warpXInv(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM) { vXres[0] = (1 + ParamM[0]) * vX[0] + ParamM[2] * vX[1] + ParamM[4]; vXres[1] = ParamM[1] * vX[0] + (1 + ParamM[3]) * vX[1] + ParamM[5]; } void vpTemplateTrackerWarpAffine::getParamInverse(const vpColVector &ParamM, vpColVector &ParamMinv) const { vpColVector Trans(2); vpMatrix MWrap(2, 2); Trans[0] = ParamM[4]; Trans[1] = ParamM[5]; MWrap[0][0] = 1 + ParamM[0]; MWrap[0][1] = ParamM[2]; MWrap[1][0] = ParamM[1]; MWrap[1][1] = 1 + ParamM[3]; vpMatrix MWrapInv(2, 2); MWrapInv = MWrap.inverseByLU(); vpColVector TransInv(2); TransInv = -1 * MWrapInv * Trans; ParamMinv.resize(getNbParam(), false); ParamMinv[0] = MWrapInv[0][0] - 1; ParamMinv[2] = MWrapInv[0][1]; ParamMinv[1] = MWrapInv[1][0]; ParamMinv[3] = MWrapInv[1][1] - 1; ParamMinv[4] = TransInv[0]; ParamMinv[5] = TransInv[1]; } void vpTemplateTrackerWarpAffine::pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &pres) const { vpColVector Trans1(2); vpMatrix MWrap1(2, 2); Trans1[0] = p1[4]; Trans1[1] = p1[5]; MWrap1[0][0] = 1 + p1[0]; MWrap1[0][1] = p1[2]; MWrap1[1][0] = p1[1]; MWrap1[1][1] = 1 + p1[3]; vpColVector Trans2(2); vpMatrix MWrap2(2, 2); Trans2[0] = p2[4]; Trans2[1] = p2[5]; MWrap2[0][0] = 1 + p2[0]; MWrap2[0][1] = p2[2]; MWrap2[1][0] = p2[1]; MWrap2[1][1] = 1 + p2[3]; vpColVector TransRes(2); vpMatrix MWrapRes(2, 2); TransRes = MWrap1 * Trans2 + Trans1; MWrapRes = MWrap1 * MWrap2; if (pres.size() != p1.size()) { pres.resize(p1.size(), false); } pres[0] = MWrapRes[0][0] - 1; pres[2] = MWrapRes[0][1]; pres[1] = MWrapRes[1][0]; pres[3] = MWrapRes[1][1] - 1; pres[4] = TransRes[0]; pres[5] = TransRes[1]; }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012-2015 VMware, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, without * warranties or conditions of any kind, EITHER EXPRESS OR IMPLIED. See the * License for the specific language governing permissions and limitations * under the License. */ package com.vmware.identity.service; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import com.vmware.certificate.VMCAException; import com.vmware.identity.diagnostics.DiagnosticsLoggerFactory; import com.vmware.identity.diagnostics.IDiagnosticsLogger; import com.vmware.identity.heartbeat.VmAfdHeartbeat; import com.vmware.certificate.VMCAAdapter2; import com.vmware.identity.idm.server.IdentityManager; public class StsApplicationListener implements ServletContextListener { private static final int port = 443; private static final String serviceName = "Security Token Service"; private static final IDiagnosticsLogger log = DiagnosticsLoggerFactory.getLogger(StsApplicationListener.class); private VmAfdHeartbeat heartbeat = new VmAfdHeartbeat(serviceName, port); private STSHealthChecker healthChecker = STSHealthChecker.getInstance(); @Override public void contextInitialized(ServletContextEvent arg0) { try { heartbeat.startBeating(); log.info("Heartbeat started for {} port {}", serviceName, port); VMCAAdapter2.VMCAInitOpenSSL(); log.info("Starting health check thread"); (new Thread(healthChecker)).start(); } catch (VMCAException e) { log.error("Failed to init VMCA SSL library", e); } catch (Exception e) { log.error("Error when initializing context", e); throw new IllegalStateException(e); } } @Override public void contextDestroyed(ServletContextEvent arg0) { try { heartbeat.stopBeating(); log.info("Heartbeat stopped for {} port {}", serviceName, port); IdentityManager.getIdmInstance().notifyAppStopping(); log.info("Idm notified of app stop"); VMCAAdapter2.VMCACleanupOpenSSL(); log.info("VMCA cleaned up"); healthChecker.stop(); log.info("Stopped health check thread"); } catch (VMCAException e) { log.error("Failed to cleanup VMCA SSL library", e); } catch (Exception e) { log.error("Error when destroying context", e); } } }
{ "pile_set_name": "Github" }
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build s390x,linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [44]byte } type Time_t int64 type Tms struct { Utime int64 Stime int64 Cutime int64 Cstime int64 } type Utimbuf struct { Actime int64 Modtime int64 } type Rusage struct { Utime Timeval Stime Timeval Maxrss int64 Ixrss int64 Idrss int64 Isrss int64 Minflt int64 Majflt int64 Nswap int64 Inblock int64 Oublock int64 Msgsnd int64 Msgrcv int64 Nsignals int64 Nvcsw int64 Nivcsw int64 } type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize int64 Blocks int64 _ [3]int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } const ( FADV_DONTNEED = 0x6 FADV_NOREUSE = 0x7 ) type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } const ( SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Psw PtracePsw Gprs [16]uint64 Acrs [16]uint32 Orig_gpr2 uint64 Fp_regs PtraceFpregs Per_info PtracePer Ieee_instruction_pointer uint64 } type PtracePsw struct { Mask uint64 Addr uint64 } type PtraceFpregs struct { Fpc uint32 Fprs [16]float64 } type PtracePer struct { _ [0]uint64 _ [32]byte Starting_addr uint64 Ending_addr uint64 Perc_atmid uint16 Address uint64 Access_id uint8 _ [7]byte } type FdSet struct { Bits [16]int64 } type Sysinfo_t struct { Uptime int64 Loads [3]uint64 Totalram uint64 Freeram uint64 Sharedram uint64 Bufferram uint64 Totalswap uint64 Freeswap uint64 Procs uint16 Pad uint16 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 _ [118]int8 _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint64 } type Statfs_t struct { Type uint32 Bsize uint32 Blocks uint64 Bfree uint64 Bavail uint64 Files uint64 Ffree uint64 Fsid Fsid Namelen uint32 Frsize uint32 Flags uint32 Spare [4]uint32 _ [4]byte } type TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 Flags uint32 _ [4]byte } type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint16 Inode uint64 Rdevice uint16 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ use dataverse fuzzy1; declare type DBLPType as open { id: int32, dblpid: string, title: string, authors: string, misc: string } declare nodegroup group1 on asterix_nc1, asterix_nc2; declare dataset DBLP(DBLPType) primary key id on group1; write output to asterix_nc1:'/tmp/dblp.adm'; // // -- - Stage 3 - -- // for $ridpair in // // -- - Stage 2 - -- // for $paperR in dataset('DBLP') let $tokensR := for $word in counthashed-word-tokens($paperR.title) for $token at $i in // // -- - Stage 1 - -- // for $paper in dataset('DBLP') for $word in counthashed-word-tokens($paper.title) group by $item := $word with $paper order by count($paper) return $item where $word = $token order by $i return $i for $prefix_tokenR in subset-collection( $tokensR, 0, prefix-len( len($tokensR), 'Jaccard', .5)) for $paperS in dataset('DBLP') let $tokensS := for $word in counthashed-word-tokens($paperS.title) for $token at $i in // // -- - Stage 1 - -- // for $paper in dataset('DBLP') for $word in counthashed-word-tokens($paper.title) group by $item := $word with $paper order by count($paper) return $item where $word = $token order by $i return $i for $prefix_tokenS in subset-collection( $tokensS, 0, prefix-len( len($tokensS), 'Jaccard', .5)) where $prefix_tokenR = $prefix_tokenS let $sim := similarity( len(counthashed-word-tokens($paperR.title)), $tokensR, len(counthashed-word-tokens($paperS.title)), $tokensS, $prefix_tokenR, 'Jaccard', .5) where $sim >= .5 and $paperR.id < $paperS.id group by $idR := $paperR.id, $idS := $paperS.id with $sim return {'idR': $idR, 'idS': $idS, 'sim': $sim[0]} for $paperR in dataset('DBLP') for $paperS in dataset('DBLP') where $ridpair.idR = $paperR.id and $ridpair.idS = $paperS.id return { 'R': { 'dblpid': $paperR.dblpid, 'title': $paperR.title }, 'S': { 'dblpid': $paperS.dblpid, 'title': $paperS.title }, 'sim': $ridpair.sim }
{ "pile_set_name": "Github" }
/* Task_2 * * This routine serves as a test task. It calls the * top command and forces an exit if the user requests it. * * Input parameters: * argument - task argument * * Output parameters: NONE * * COPYRIGHT (c) 2014. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.org/license/LICENSE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "system.h" #include <rtems/cpuuse.h> rtems_task Task_2( rtems_task_argument argument ) { rtems_cpu_usage_top(); TEST_END(); rtems_test_exit( 0 ); }
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- # irb/lc/ja/help-message.rb - # $Release Version: 0.9.6$ # $Revision$ # by Keiju ISHITSUKA([email protected]) # # -- # # # Usage: irb.rb [options] [programfile] [arguments] -f ~/.irbrc を読み込まない. -d $DEBUG をtrueにする(ruby -d と同じ) -r load-module ruby -r と同じ. -I path $LOAD_PATH に path を追加する. -U ruby -U と同じ. -E enc ruby -E と同じ. -w ruby -w と同じ. -W[level=2] ruby -W と同じ. --context-mode n 新しいワークスペースを作成した時に関連する Binding オブジェクトの作成方法を 0 から 3 のいずれかに設定する. --echo 実行結果を表示する(デフォルト). --noecho 実行結果を表示しない. --inspect 結果出力にinspectを用いる(bcモード以外はデフォルト). --noinspect 結果出力にinspectを用いない. --readline readlineライブラリを利用する. --noreadline readlineライブラリを利用しない. --prompt prompt-mode/--prompt-mode prompt-mode プロンプトモードを切替えます. 現在定義されているプ ロンプトモードは, default, simple, xmp, inf-rubyが 用意されています. --inf-ruby-mode emacsのinf-ruby-mode用のプロンプト表示を行なう. 特 に指定がない限り, readlineライブラリは使わなくなる. --sample-book-mode/--simple-prompt 非常にシンプルなプロンプトを用いるモードです. --noprompt プロンプト表示を行なわない. --single-irb irb 中で self を実行して得られるオブジェクトをサ ブ irb と共有する. --tracer コマンド実行時にトレースを行なう. --back-trace-limit n バックトレース表示をバックトレースの頭から n, 後ろ からnだけ行なう. デフォルトは16 --irb_debug n irbのデバッグレベルをnに設定する(非推奨). --verbose 詳細なメッセージを出力する. --noverbose 詳細なメッセージを出力しない(デフォルト). -v, --version irbのバージョンを表示する. -h, --help irb のヘルプを表示する. -- 以降のコマンドライン引数をオプションとして扱わない. # vim:fileencoding=utf-8
{ "pile_set_name": "Github" }
<div> <h1>foo</h1> <div.body include("./include-target.marko", {name: 'Frank', count: 10})/> </div>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{43C8E51E-6C60-47BF-97AA-D20D664B9698}</ProjectGuid> <RootNamespace>TestForAvalon</RootNamespace> <AssemblyName>TestForAvalon</AssemblyName> <WarningLevel>4</WarningLevel> <OutputType>Exe</OutputType> <!-- Most people will use Publish dialog in Visual Studio to increment this --> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <FileUpgradeFlags> </FileUpgradeFlags> <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <IsWebBootstrapper>false</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>.\bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugSymbols>false</DebugSymbols> <Optimize>true</Optimize> <OutputPath>.\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <PlatformTarget>AnyCPU</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugSurface|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\DebugSurface\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWithoutRebuild|AnyCPU' "> <OutputPath>bin\DebugWithoutRebuild\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <Optimize>false</Optimize> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugDevTrace|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\DebugDevTrace\</OutputPath> <DefineConstants>TRACE;DEBUG;DEVTRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <OutputPath>bin\x86\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <Optimize>true</Optimize> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugSurface|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\DebugSurface\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWithoutRebuild|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\DebugWithoutRebuild\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugDevTrace|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\DebugDevTrace\</OutputPath> <DefineConstants>TRACE;DEBUG;DEVTRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> </PropertyGroup> <PropertyGroup> <StartupObject /> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x64\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <OutputPath>bin\x64\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <Optimize>true</Optimize> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugSurface|x64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x64\DebugSurface\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWithoutRebuild|x64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x64\DebugWithoutRebuild\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugDevTrace|x64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x64\DebugDevTrace\</OutputPath> <DefineConstants>TRACE;DEBUG;DEVTRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Xaml" /> <Reference Include="System.Xml" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="UIAutomationProvider" /> <Reference Include="UIAutomationTypes" /> <Reference Include="ReachFramework" /> <Reference Include="System.Printing" /> </ItemGroup> <ItemGroup> <ApplicationDefinition Include="MyApp.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </ApplicationDefinition> <Page Include="Details.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="EdgeDetails.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Styles.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Window1.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Compile Include="Animator.xaml.cs" /> <Compile Include="PolygonManager.cs" /> <Compile Include="MyApp.xaml.cs"> <DependentUpon>MyApp.xaml</DependentUpon> <SubType>Code</SubType> </Compile> <Compile Include="Window1.xaml.cs"> <DependentUpon>Window1.xaml</DependentUpon> <SubType>Code</SubType> </Compile> </ItemGroup> <ItemGroup> <Compile Include="..\version.cs"> <Link>version.cs</Link> </Compile> <Compile Include="Details.xaml.cs"> <SubType>Code</SubType> <DependentUpon>Details.xaml</DependentUpon> </Compile> <Compile Include="EdgeDetails.xaml.cs"> <SubType>Code</SubType> <DependentUpon>EdgeDetails.xaml</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> <Resource Include="data\undo.bmp" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <SubType>Designer</SubType> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <None Include="app.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DesignTimeSharedInput>True</DesignTimeSharedInput> <DependentUpon>Settings.settings</DependentUpon> </Compile> <Compile Include="ReadingXSD.cs" /> <AppDesigner Include="Properties\" /> </ItemGroup> <ItemGroup> <Resource Include="data\back.bmp" /> <Resource Include="data\forward.bmp" /> <Resource Include="data\HAND.BMP" /> <Resource Include="data\zoomwindow.BMP" /> </ItemGroup> <ItemGroup> <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> </ItemGroup> <ItemGroup> <Resource Include="data\redo.bmp" /> </ItemGroup> <ItemGroup> <Resource Include="data\disabledRedo.bmp" /> <Resource Include="data\disabledUndo.bmp" /> </ItemGroup> <ItemGroup> <Resource Include="data\uncheckedZoomWindow.bmp" /> </ItemGroup> <ItemGroup> <Resource Include="data\uncheckedPan.bmp" /> </ItemGroup> <ItemGroup> <Resource Include="data\icon.ico" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\DebugCurveViewer\DebugCurveViewer.csproj"> <Project>{5767AA9A-B6F6-46F1-B3E6-4E76FA049263}</Project> <Name>DebugCurveViewer</Name> </ProjectReference> <ProjectReference Include="..\Dot2Graph\Dot2Graph.csproj"> <Project>{BA8FED53-458E-4CB3-8EB3-CBFCADD87E5D}</Project> <Name>Dot2Graph</Name> </ProjectReference> <ProjectReference Include="..\Drawing\drawing.csproj"> <Project>{B76F8F71-4B00-4242-BE36-C9F0732511F7}</Project> <Name>drawing</Name> </ProjectReference> <ProjectReference Include="..\GraphViewerAvalon\GraphViewerAvalonObsolete.csproj"> <Project>{e288052a-6746-4d28-93c0-f7837e919013}</Project> <Name>GraphViewerAvalonObsolete</Name> </ProjectReference> <ProjectReference Include="..\GraphViewerGDI\GraphViewerGDI.csproj"> <Project>{725CD2CB-CF37-414E-A5A6-F1D87D4D6EDE}</Project> <Name>GraphViewerGDI</Name> </ProjectReference> <ProjectReference Include="..\MSAGL\Msagl.csproj"> <Project>{415D3E3F-7105-46C1-84D2-7ECB34213D92}</Project> <Name>Msagl</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2010 The Android Open Source Project * * 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 A_ATOMIZER_H_ #define A_ATOMIZER_H_ #include <stdint.h> #include <media/stagefright/foundation/ABase.h> #include <media/stagefright/foundation/AString.h> #include <utils/List.h> #include <utils/Vector.h> #include <utils/threads.h> namespace android { struct AAtomizer { static const char *Atomize(const char *name); private: static AAtomizer gAtomizer; Mutex mLock; Vector<List<AString> > mAtoms; AAtomizer(); const char *atomize(const char *name); static uint32_t Hash(const char *s); DISALLOW_EVIL_CONSTRUCTORS(AAtomizer); }; } // namespace android #endif // A_ATOMIZER_H_
{ "pile_set_name": "Github" }
From e382015913fb2d7f0edc669409252028b719cf97 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev <[email protected]> Date: Sun, 10 Feb 2019 15:28:36 -0500 Subject: [PATCH 1/5] Replace Atomic impl with std::atomic --- include/OpenThreads/Atomic | 169 ++---------------------------- src/OpenThreads/common/Atomic.cpp | 2 + 2 files changed, 11 insertions(+), 160 deletions(-) diff --git a/include/OpenThreads/Atomic b/include/OpenThreads/Atomic index ba6723354..da8db7227 100644 --- a/include/OpenThreads/Atomic +++ b/include/OpenThreads/Atomic @@ -17,21 +17,7 @@ #include <OpenThreads/Config> #include <OpenThreads/Exports> -#if defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) -# include <libkern/OSAtomic.h> -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__) -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) -# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) -# include <atomic.h> -# include "Mutex" -# include "ScopedLock" -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) -# include "Mutex" -# include "ScopedLock" -#endif +#include <atomic> #if defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) #define _OPENTHREADS_ATOMIC_INLINE @@ -61,19 +47,7 @@ class OPENTHREAD_EXPORT_DIRECTIVE Atomic { Atomic(const Atomic&); Atomic& operator=(const Atomic&); -#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - mutable Mutex _mutex; -#endif -#if defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED) - volatile long _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) - volatile int32_t _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - volatile uint_t _value; - mutable Mutex _mutex; // needed for xor -#else - volatile unsigned _value; -#endif + std::atomic<unsigned> _value; }; /** @@ -95,10 +69,7 @@ private: AtomicPtr(const AtomicPtr&); AtomicPtr& operator=(const AtomicPtr&); -#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - mutable Mutex _mutex; -#endif - void* volatile _ptr; + std::atomic<void*> _ptr; }; #if !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) @@ -106,178 +77,56 @@ private: _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::operator++() { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_add_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __add_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_inc_uint_nv(&_value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); return ++_value; -#else - return ++_value; -#endif } _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::operator--() { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_sub_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __sub_and_fetch(&_value, 1); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_dec_uint_nv(&_value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - return --_value; -#else return --_value; -#endif } _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::AND(unsigned value) { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_and(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __and_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_and_uint_nv(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - _value &= value; - return _value; -#else - _value &= value; - return _value; -#endif + return (_value &= value); } _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::OR(unsigned value) { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_or(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __or_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_or_uint_nv(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - _value |= value; - return _value; -#else - _value |= value; - return _value; -#endif + return (_value |= value); } _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::XOR(unsigned value) { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_fetch_and_xor(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __xor_and_fetch(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - ScopedLock<Mutex> lock(_mutex); - _value ^= value; - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - _value ^= value; - return _value; -#else - _value ^= value; - return _value; -#endif + return (_value ^= value); } _OPENTHREADS_ATOMIC_INLINE unsigned Atomic::exchange(unsigned value) { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_lock_test_and_set(&_value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap(&_value, _value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return atomic_cas_uint(&_value, _value, value); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - unsigned oldval = _value; - _value = value; - return oldval; -#else - unsigned oldval = _value; - _value = value; - return oldval; -#endif + return _value.exchange(value); } _OPENTHREADS_ATOMIC_INLINE Atomic::operator unsigned() const { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - __sync_synchronize(); - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - __synchronize(); - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - membar_consumer(); // Hmm, do we need??? - return _value; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - return _value; -#else return _value; -#endif } _OPENTHREADS_ATOMIC_INLINE bool AtomicPtr::assign(void* ptrNew, const void* const ptrOld) { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - return __sync_bool_compare_and_swap(&_ptr, (void *)ptrOld, ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - return __compare_and_swap((unsigned long*)&_ptr, (unsigned long)ptrOld, (unsigned long)ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - return ptrOld == atomic_cas_ptr(&_ptr, const_cast<void*>(ptrOld), ptrNew); -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - if (_ptr != ptrOld) - return false; - _ptr = ptrNew; - return true; -#else - if (_ptr != ptrOld) - return false; - _ptr = ptrNew; - return true; -#endif + void *old = (void*) ptrOld; + return _ptr.compare_exchange_strong(old, ptrNew); } _OPENTHREADS_ATOMIC_INLINE void* AtomicPtr::get() const { -#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) - __sync_synchronize(); - return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS) - __synchronize(); return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_SUN) - membar_consumer(); // Hmm, do we need??? - return _ptr; -#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX) - ScopedLock<Mutex> lock(_mutex); - return _ptr; -#else - return _ptr; -#endif } #endif // !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) diff --git a/src/OpenThreads/common/Atomic.cpp b/src/OpenThreads/common/Atomic.cpp index 21c336435..84fec8e78 100644 --- a/src/OpenThreads/common/Atomic.cpp +++ b/src/OpenThreads/common/Atomic.cpp @@ -25,6 +25,8 @@ namespace OpenThreads { #if defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES) + #error Not supported. + // Non inline implementations for two special cases: // * win32 // * i386 gcc -- 2.19.2
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_09) on Fri Mar 15 22:09:10 GMT 2013 --> <title>Uses of Class uk.co.spudsoft.birt.emitters.excel.ExcelEmitter</title> <meta name="date" content="2013-03-15"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class uk.co.spudsoft.birt.emitters.excel.ExcelEmitter"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/ExcelEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?uk/co/spudsoft/birt/emitters/excel/class-use/ExcelEmitter.html" target="_top">Frames</a></li> <li><a href="ExcelEmitter.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class uk.co.spudsoft.birt.emitters.excel.ExcelEmitter" class="title">Uses of Class<br>uk.co.spudsoft.birt.emitters.excel.ExcelEmitter</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/ExcelEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">ExcelEmitter</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#uk.co.spudsoft.birt.emitters.excel">uk.co.spudsoft.birt.emitters.excel</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="uk.co.spudsoft.birt.emitters.excel"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/ExcelEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">ExcelEmitter</a> in <a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/package-summary.html">uk.co.spudsoft.birt.emitters.excel</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> <caption><span>Subclasses of <a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/ExcelEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">ExcelEmitter</a> in <a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/package-summary.html">uk.co.spudsoft.birt.emitters.excel</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/XlsEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">XlsEmitter</a></strong></code> <div class="block">XlsEmitter is the leaf class for implementing the ExcelEmitter with HSSFWorkbook.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/XlsxEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">XlsxEmitter</a></strong></code> <div class="block">XlsxEmitter is the leaf class for implementing the ExcelEmitter with XSSFWorkbook.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../uk/co/spudsoft/birt/emitters/excel/ExcelEmitter.html" title="class in uk.co.spudsoft.birt.emitters.excel">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?uk/co/spudsoft/birt/emitters/excel/class-use/ExcelEmitter.html" target="_top">Frames</a></li> <li><a href="ExcelEmitter.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "pile_set_name": "Github" }
#pragma once #include "OpenDatabaseDialog.h" class DecryptDatabaseDialog7 : public Dialog { private: OpenDatabaseStruct &openDatabaseStruct; void selectDatabaseFile(); void selectKeyFile(); void clickOk(WPARAM wParam); protected: virtual INT_PTR callback(HWND dialog, UINT message, WPARAM wParam, LPARAM lParam); public: DecryptDatabaseDialog7(HWND parent, OpenDatabaseStruct &openDatabaseStruct); ~DecryptDatabaseDialog7(); const std::string &getFilename(); const std::string &getKeyFilename(); };
{ "pile_set_name": "Github" }
{ "pages":[ "pages/index/index", "pages/recommend/recommend", "pages/search/search", "pages/detail/detail" ], "window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#2B2B2B", "navigationBarTitleText": "豆瓣电影", "navigationBarTextStyle":"white", "backgroundColor": "#060606" }, "tabBar":{ "color": "#fff", "selectedColor": "#379D31", "backgroundColor": "#2B2B2B", "borderStyle": "black", "list": [ { "pagePath": "pages/index/index", "text": "影院热映", "iconPath": "pages/assets/img/dy-1.png", "selectedIconPath": "pages/assets/img/dy.png" },{ "pagePath": "pages/recommend/recommend", "text": "电影推荐", "iconPath": "pages/assets/img/tj-1.png", "selectedIconPath": "pages/assets/img/tj.png" }, { "pagePath": "pages/search/search", "text": "查询电影", "iconPath": "pages/assets/img/search-1.png", "selectedIconPath": "pages/assets/img/search.png" } ] } }
{ "pile_set_name": "Github" }
-- Unit Test T_CipherOFB starting -- Unit Test T_CipherOFB finished
{ "pile_set_name": "Github" }
<?php ?>
{ "pile_set_name": "Github" }
<?php /** * Chunk English lexicon topic * * @language en * @package modx * @subpackage lexicon */ $_lang['chunk'] = '模板片段'; $_lang['chunk_desc_category'] = '该模板片段所属类别'; $_lang['chunk_desc_description'] = '该模板片段简述'; $_lang['chunk_desc_name'] = '该模板片段名称,对应标签[[$nameOfChunk]] '; $_lang['chunk_code'] = '模板片段代码(html)'; $_lang['chunk_desc'] = '描述'; $_lang['chunk_delete_confirm'] = '确认删除该模板片段?'; $_lang['chunk_duplicate_confirm'] = '确认复制该模板片段?'; $_lang['chunk_err_create'] = 'An error occurred while creating new chunk.'; $_lang['chunk_err_duplicate'] = '复制模板片段错误。'; $_lang['chunk_err_ae'] = '已存在同名模板片段"[[+name]]"。'; $_lang['chunk_err_invalid_name'] = '模板片段名称无效。'; $_lang['chunk_err_locked'] = '模板片段已被锁定。'; $_lang['chunk_err_remove'] = '移除模板片段时出错。'; $_lang['chunk_err_save'] = '保存模板片段时报错。'; $_lang['chunk_err_nf'] = '模板片段未找到!'; $_lang['chunk_err_nfs'] = 'id为[[+id]]的模板片段未找到'; $_lang['chunk_err_ns'] = '未指定模板片段。'; $_lang['chunk_err_ns_name'] = '请指定一个名称。'; $_lang['chunk_lock'] = '锁定模板片段'; $_lang['chunk_lock_msg'] = '用户必须具有 edit_locked 属性,才能编辑此模板片段。'; $_lang['chunk_msg'] = '在此添加/编辑模板片段。请记住: 模板片段是原生的 HTML 代码,任何 PHP 代码将不会被处理。'; $_lang['chunk_name'] = '模板片段名称'; $_lang['chunk_new'] = '新建模板片段'; $_lang['chunk_properties'] = '默认属性'; $_lang['chunk_title'] = '创建/编辑模板片段'; $_lang['chunk_untitled'] = '无标题模板片段'; $_lang['chunks'] = '模板片段';
{ "pile_set_name": "Github" }
body { background-color: #fff; color: #333; } body, p, ol, ul, td { font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; } pre { background-color: #eee; padding: 10px; font-size: 11px; } a { color: #000; } a:visited { color: #666; } a:hover { color: #fff; background-color:#000; } div.field, div.actions { margin-bottom: 10px; } #notice { color: green; } .field_with_errors { padding: 2px; background-color: red; display: table; } #error_explanation { width: 450px; border: 2px solid red; padding: 7px; padding-bottom: 0; margin-bottom: 20px; background-color: #f0f0f0; } #error_explanation h2 { text-align: left; font-weight: bold; padding: 5px 5px 5px 15px; font-size: 12px; margin: -7px; margin-bottom: 0px; background-color: #c00; color: #fff; } #error_explanation ul li { font-size: 12px; list-style: square; }
{ "pile_set_name": "Github" }
#ifndef __LIBS_ATOMIC_H__ #define __LIBS_ATOMIC_H__ /* Atomic operations that C can't guarantee us. Useful for resource counting etc.. */ static inline void set_bit(int nr, volatile void *addr) __attribute__((always_inline)); static inline void clear_bit(int nr, volatile void *addr) __attribute__((always_inline)); static inline void change_bit(int nr, volatile void *addr) __attribute__((always_inline)); static inline bool test_bit(int nr, volatile void *addr) __attribute__((always_inline)); /* * * set_bit - Atomically set a bit in memory * @nr: the bit to set * @addr: the address to start counting from * * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. * */ static inline void set_bit(int nr, volatile void *addr) { asm volatile ("btsl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr)); } /* * * clear_bit - Atomically clears a bit in memory * @nr: the bit to clear * @addr: the address to start counting from * */ static inline void clear_bit(int nr, volatile void *addr) { asm volatile ("btrl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr)); } /* * * change_bit - Atomically toggle a bit in memory * @nr: the bit to change * @addr: the address to start counting from * */ static inline void change_bit(int nr, volatile void *addr) { asm volatile ("btcl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr)); } /* * * test_bit - Determine whether a bit is set * @nr: the bit to test * @addr: the address to count from * */ static inline bool test_bit(int nr, volatile void *addr) { int oldbit; asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr)); return oldbit != 0; } #endif /* !__LIBS_ATOMIC_H__ */
{ "pile_set_name": "Github" }
# Masonry [![Build Status](https://travis-ci.org/SnapKit/Masonry.svg?branch=master)](https://travis-ci.org/SnapKit/Masonry) [![Coverage Status](https://img.shields.io/coveralls/SnapKit/Masonry.svg?style=flat-square)](https://coveralls.io/r/SnapKit/Masonry) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Pod Version](https://img.shields.io/cocoapods/v/Masonry.svg?style=flat) **Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Masonry supports iOS and Mac OS X. For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading. ## What's wrong with NSLayoutConstraints? Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive. Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side ```obj-c UIView *superview = self.view; UIView *view1 = [[UIView alloc] init]; view1.translatesAutoresizingMaskIntoConstraints = NO; view1.backgroundColor = [UIColor greenColor]; [superview addSubview:view1]; UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [superview addConstraints:@[ //view1 constraints [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeTop multiplier:1.0 constant:padding.top], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeLeft multiplier:1.0 constant:padding.left], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-padding.bottom], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeRight multiplier:1 constant:-padding.right], ]]; ``` Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views. Another option is to use Visual Format Language (VFL), which is a bit less long winded. However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array. ## Prepare to meet your Maker! Heres the same constraints created using MASConstraintMaker ```obj-c UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler make.left.equalTo(superview.mas_left).with.offset(padding.left); make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom); make.right.equalTo(superview.mas_right).with.offset(-padding.right); }]; ``` Or even shorter ```obj-c [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(superview).with.insets(padding); }]; ``` Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`. Masonry however will automagically add constraints to the appropriate view. Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you. ## Not all things are created equal > `.equalTo` equivalent to **NSLayoutRelationEqual** > `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual** > `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual** These three equality constraints accept one argument which can be any of the following: #### 1. MASViewAttribute ```obj-c make.centerX.lessThanOrEqualTo(view2.mas_left); ``` MASViewAttribute | NSLayoutAttribute ------------------------- | -------------------------- view.mas_left | NSLayoutAttributeLeft view.mas_right | NSLayoutAttributeRight view.mas_top | NSLayoutAttributeTop view.mas_bottom | NSLayoutAttributeBottom view.mas_leading | NSLayoutAttributeLeading view.mas_trailing | NSLayoutAttributeTrailing view.mas_width | NSLayoutAttributeWidth view.mas_height | NSLayoutAttributeHeight view.mas_centerX | NSLayoutAttributeCenterX view.mas_centerY | NSLayoutAttributeCenterY view.mas_baseline | NSLayoutAttributeBaseline #### 2. UIView/NSView if you want view.left to be greater than or equal to label.left : ```obj-c //these two constraints are exactly the same make.left.greaterThanOrEqualTo(label); make.left.greaterThanOrEqualTo(label.mas_left); ``` #### 3. NSNumber Auto Layout allows width and height to be set to constant values. if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks: ```obj-c //width >= 200 && width <= 400 make.width.greaterThanOrEqualTo(@200); make.width.lessThanOrEqualTo(@400) ``` However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values. So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view&rsquo;s superview ie: ```obj-c //creates view.left = view.superview.left + 10 make.left.lessThanOrEqualTo(@10) ``` Instead of using NSNumber, you can use primitives and structs to build your constraints, like so: ```obj-c make.top.mas_equalTo(42); make.height.mas_equalTo(20); make.size.mas_equalTo(CGSizeMake(50, 100)); make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0)); make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0)); ``` By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry. #### 4. NSArray An array of a mixture of any of the previous types ```obj-c make.height.equalTo(@[view1.mas_height, view2.mas_height]); make.height.equalTo(@[view1, view2]); make.left.equalTo(@[view1, @100, view3.right]); ```` ## Learn to prioritize > `.priority` allows you to specify an exact priority > `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh** > `.priorityMedium` is half way between high and low > `.priorityLow` equivalent to **UILayoutPriorityDefaultLow** Priorities are can be tacked on to the end of a constraint chain like so: ```obj-c make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow(); make.top.equalTo(label.mas_top).with.priority(600); ``` ## Composition, composition, composition Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints #### edges ```obj-c // make top, left, bottom, right equal view2 make.edges.equalTo(view2); // make top = superview.top + 5, left = superview.left + 10, // bottom = superview.bottom - 15, right = superview.right - 20 make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20)) ``` #### size ```obj-c // make width and height greater than or equal to titleLabel make.size.greaterThanOrEqualTo(titleLabel) // make width = superview.width + 100, height = superview.height - 50 make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50)) ``` #### center ```obj-c // make centerX and centerY = button1 make.center.equalTo(button1) // make centerX = superview.centerX - 5, centerY = superview.centerY + 10 make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10)) ``` You can chain view attributes for increased readability: ```obj-c // All edges but the top should equal those of the superview make.left.right.and.bottom.equalTo(superview); make.top.equalTo(otherView); ``` ## Hold on for dear life Sometimes you need modify existing constraints in order to animate or remove/replace constraints. In Masonry there are a few different approaches to updating constraints. #### 1. References You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property. You could also reference multiple constraints by storing them away in an array. ```obj-c // in public/private interface @property (nonatomic, strong) MASConstraint *topConstraint; ... // when making constraints [view1 mas_makeConstraints:^(MASConstraintMaker *make) { self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top); make.left.equalTo(superview.mas_left).with.offset(padding.left); }]; ... // then later you can call [self.topConstraint uninstall]; ``` #### 2. mas_updateConstraints Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints` ```obj-c // this is Apple's recommended place for adding/updating constraints // this method can get called multiple times in response to setNeedsUpdateConstraints // which can be called by UIKit internally or in your code if you need to trigger an update to your constraints - (void)updateConstraints { [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self); make.width.equalTo(@(self.buttonSize.width)).priorityLow(); make.height.equalTo(@(self.buttonSize.height)).priorityLow(); make.width.lessThanOrEqualTo(self); make.height.lessThanOrEqualTo(self); }]; //according to apple super should be called at end of method [super updateConstraints]; } ``` ### 3. mas_remakeConstraints `mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in. `mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove. ```obj-c - (void)changeButtonPosition { [self.button mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.equalTo(self.buttonSize); if (topLeft) { make.top.and.left.offset(10); } else { make.bottom.and.right.offset(-10); } }]; } ``` You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project. ## When the ^&*!@ hits the fan! Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this: ```obj-c Unable to simultaneously satisfy constraints.....blah blah blah.... ( "<NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]>", "<NSAutoresizingMaskLayoutConstraint:0x839ea20 h=--& v=--& V:[MASExampleDebuggingView:0x7186560(416)]>", "<NSLayoutConstraint:0x7189c70 UILabel:0x7186980.bottom == MASExampleDebuggingView:0x7186560.bottom - 10>", "<NSLayoutConstraint:0x7189560 V:|-(1)-[UILabel:0x7186980] (Names: '|':MASExampleDebuggingView:0x7186560 )>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]> ``` Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`. Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry. which means your console output can now look like this: ```obj-c Unable to simultaneously satisfy constraints......blah blah blah.... ( "<NSAutoresizingMaskLayoutConstraint:0x8887740 MASExampleDebuggingView:superview.height == 416>", "<MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000>", "<MASLayoutConstraint:BottomConstraint UILabel:messageLabel.bottom == MASExampleDebuggingView:superview.bottom - 10>", "<MASLayoutConstraint:ConflictingConstraint[0] UILabel:messageLabel.top == MASExampleDebuggingView:superview.top + 1>" ) Will attempt to recover by breaking constraint <MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000> ``` For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace. ## Where should I create my constraints? ```objc @implementation DIYCustomView - (id)init { self = [super init]; if (!self) return nil; // --- Create your views here --- self.button = [[UIButton alloc] init]; return self; } // tell UIKit that you are using AutoLayout + (BOOL)requiresConstraintBasedLayout { return YES; } // this is Apple's recommended place for adding/updating constraints - (void)updateConstraints { // --- remake/update constraints here [self.button remakeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(self.buttonSize.width)); make.height.equalTo(@(self.buttonSize.height)); }]; //according to apple super should be called at end of method [super updateConstraints]; } - (void)didTapButton:(UIButton *)button { // --- Do your changes ie change variables that affect your layout etc --- self.buttonSize = CGSize(200, 200); // tell constraints they need updating [self setNeedsUpdateConstraints]; } @end ``` ## Installation Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods). In your Podfile >`pod 'Masonry'` If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry >`#define MAS_SHORTHAND` Get busy Masoning >`#import "Masonry.h"` ## Code Snippets Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! `mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) { <#code#> }];` ## Features * Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! * Great debug support, give your views and constraints meaningful names. * Constraints read like sentences. * No crazy macro magic. Masonry won't pollute the global namespace with macros. * Not string or dictionary based and hence you get compile time checking. ## TODO * Eye candy * Mac example project * More tests and examples
{ "pile_set_name": "Github" }
package servergroups import ( "github.com/TeaWeb/build/internal/teaconfigs" "github.com/iwind/TeaGo/actions" "net/http" ) type UpdateAction actions.Action func (this *UpdateAction) RunGet(params struct { GroupId string }) { group := teaconfigs.SharedServerGroupList().Find(params.GroupId) if group == nil { this.Error("not found", http.StatusNotFound) return } this.Data["group"] = group this.Show() } func (this *UpdateAction) RunPost(params struct { GroupId string Name string Must *actions.Must }) { params.Must. Field("name", params.Name). Require("请输入分组名称") groupList := teaconfigs.SharedServerGroupList() group := groupList.Find(params.GroupId) if group == nil { this.Fail("找不到要修改的分组") } group.Name = params.Name err := groupList.Save() if err != nil { this.Fail("保存失败:" + err.Error()) } this.Success() }
{ "pile_set_name": "Github" }
/** * file : bs_url.h * author : bushaofeng * create : 2014-10-06 23:00 * func : * history: */ #ifndef __BS_URL_H_ #define __BS_URL_H_ #include "bs_type.h" #include "bs_common.h" #include "bs_conf.h" #include "bs_object.h" #include "bs_data.h" #define URL_SIZE 1024 #define HTTP_INVALID -1 #define HTTP_OK 200 #define HTTP_NOTFOUND 404 #ifdef __cplusplus extern "C"{ #endif typedef enum{ HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_DELETE }http_method_t; typedef struct url_t{ object_t base; uint16_t port; //char url[URL_SIZE]; data_t url; data_t protocal; data_t host; data_t domain; data_t path; data_t query; }url_t; void* url_init(void* p); void url_destroy(void* p); state_t url_parse(url_t* url, const char* url_str); void url_print(url_t* url); typedef struct http_res_t http_res_t; typedef struct http_t{ url_t url; // url中已经有base,不需要再有 data_t req; char* body; uint32_t body_size; }http_t; void* http_init(void* p); void http_destroy(void* p); /// 创建http http_t* http_create(const char* url, const char* method); /// 设置http头 void http_set_header(http_t* http, const char* key, const char* value); /// 设置http body void http_set_body(http_t* http, const char* body, uint32_t body_size); /// 执行http,内部会delete http结构体 http_res_t* http_perform(http_t* http); /// 下载文件到本地. return ==0:正确;>0:http错误码 <0:连接http失败 state_t http_download(http_t* http, const char* file); struct http_res_t{ data_t response; int response_code; char* body; uint32_t body_size; }; void* http_res_init(void * p); void http_res_destroy(void* p); state_t http_response_parse(http_res_t* res, const char* buffer, uint32_t size); #ifdef __cplusplus } #endif #endif
{ "pile_set_name": "Github" }
/* global expect:true */ expect = require('./lib/').clone(); expect.output.preferredWidth = 80; require('./test/promisePolyfill');
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2017 Intel Corporation */ #include <math.h> #include <string.h> #include <rte_malloc.h> #include <rte_memory.h> #include <rte_errno.h> #include <rte_log.h> #include "rte_member.h" #include "rte_member_vbf.h" /* * vBF currently implemented as a big array. * The BFs have a vertical layout. Bits in same location of all bfs will stay * in the same cache line. * For example, if we have 32 bloom filters, we use a uint32_t array to * represent all of them. array[0] represent the first location of all the * bloom filters, array[1] represents the second location of all the * bloom filters, etc. The advantage of this layout is to minimize the average * number of memory accesses to test all bloom filters. * * Currently the implementation supports vBF containing 1,2,4,8,16,32 BFs. */ int rte_member_create_vbf(struct rte_member_setsum *ss, const struct rte_member_parameters *params) { if (params->num_set > RTE_MEMBER_MAX_BF || !rte_is_power_of_2(params->num_set) || params->num_keys == 0 || params->false_positive_rate == 0 || params->false_positive_rate > 1) { rte_errno = EINVAL; RTE_MEMBER_LOG(ERR, "Membership vBF create with invalid parameters\n"); return -EINVAL; } /* We assume expected keys evenly distribute to all BFs */ uint32_t num_keys_per_bf = 1 + (params->num_keys - 1) / ss->num_set; /* * Note that the false positive rate is for all BFs in the vBF * such that the single BF's false positive rate needs to be * calculated. * Assume each BF's False positive rate is fp_one_bf. The total false * positive rate is fp = 1-(1-fp_one_bf)^n. * => fp_one_bf = 1 - (1-fp)^(1/n) */ float fp_one_bf = 1 - pow((1 - params->false_positive_rate), 1.0 / ss->num_set); if (fp_one_bf == 0) { rte_errno = EINVAL; RTE_MEMBER_LOG(ERR, "Membership BF false positive rate is too small\n"); return -EINVAL; } uint32_t bits = ceil((num_keys_per_bf * log(fp_one_bf)) / log(1.0 / (pow(2.0, log(2.0))))); /* We round to power of 2 for performance during lookup */ ss->bits = rte_align32pow2(bits); ss->num_hashes = (uint32_t)(log(2.0) * bits / num_keys_per_bf); ss->bit_mask = ss->bits - 1; /* * Since we round the bits to power of 2, the final false positive * rate will probably not be same as the user specified. We log the * new value as debug message. */ float new_fp = pow((1 - pow((1 - 1.0 / ss->bits), num_keys_per_bf * ss->num_hashes)), ss->num_hashes); new_fp = 1 - pow((1 - new_fp), ss->num_set); /* * Reduce hash function count, until we approach the user specified * false-positive rate. Otherwise it is too conservative */ int tmp_num_hash = ss->num_hashes; while (tmp_num_hash > 1) { float tmp_fp = new_fp; tmp_num_hash--; new_fp = pow((1 - pow((1 - 1.0 / ss->bits), num_keys_per_bf * tmp_num_hash)), tmp_num_hash); new_fp = 1 - pow((1 - new_fp), ss->num_set); if (new_fp > params->false_positive_rate) { new_fp = tmp_fp; tmp_num_hash++; break; } } ss->num_hashes = tmp_num_hash; /* * To avoid multiplication and division: * mul_shift is used for multiplication shift during bit test * div_shift is used for division shift, to be divided by number of bits * represented by a uint32_t variable */ ss->mul_shift = __builtin_ctzl(ss->num_set); ss->div_shift = __builtin_ctzl(32 >> ss->mul_shift); RTE_MEMBER_LOG(DEBUG, "vector bloom filter created, " "each bloom filter expects %u keys, needs %u bits, %u hashes, " "with false positive rate set as %.5f, " "The new calculated vBF false positive rate is %.5f\n", num_keys_per_bf, ss->bits, ss->num_hashes, fp_one_bf, new_fp); ss->table = rte_zmalloc_socket(NULL, ss->num_set * (ss->bits >> 3), RTE_CACHE_LINE_SIZE, ss->socket_id); if (ss->table == NULL) return -ENOMEM; return 0; } static inline uint32_t test_bit(uint32_t bit_loc, const struct rte_member_setsum *ss) { uint32_t *vbf = ss->table; uint32_t n = ss->num_set; uint32_t div_shift = ss->div_shift; uint32_t mul_shift = ss->mul_shift; /* * a is how many bits in one BF are represented by one 32bit * variable. */ uint32_t a = 32 >> mul_shift; /* * x>>b is the divide, x & (a-1) is the mod, & (1<<n-1) to mask out bits * we do not need */ return (vbf[bit_loc >> div_shift] >> ((bit_loc & (a - 1)) << mul_shift)) & ((1ULL << n) - 1); } static inline void set_bit(uint32_t bit_loc, const struct rte_member_setsum *ss, int32_t set) { uint32_t *vbf = ss->table; uint32_t div_shift = ss->div_shift; uint32_t mul_shift = ss->mul_shift; uint32_t a = 32 >> mul_shift; vbf[bit_loc >> div_shift] |= 1UL << (((bit_loc & (a - 1)) << mul_shift) + set - 1); } int rte_member_lookup_vbf(const struct rte_member_setsum *ss, const void *key, member_set_t *set_id) { uint32_t j; uint32_t h1 = MEMBER_HASH_FUNC(key, ss->key_len, ss->prim_hash_seed); uint32_t h2 = MEMBER_HASH_FUNC(&h1, sizeof(uint32_t), ss->sec_hash_seed); uint32_t mask = ~0; uint32_t bit_loc; for (j = 0; j < ss->num_hashes; j++) { bit_loc = (h1 + j * h2) & ss->bit_mask; mask &= test_bit(bit_loc, ss); } if (mask) { *set_id = __builtin_ctzl(mask) + 1; return 1; } *set_id = RTE_MEMBER_NO_MATCH; return 0; } uint32_t rte_member_lookup_bulk_vbf(const struct rte_member_setsum *ss, const void **keys, uint32_t num_keys, member_set_t *set_ids) { uint32_t i, k; uint32_t num_matches = 0; uint32_t mask[RTE_MEMBER_LOOKUP_BULK_MAX]; uint32_t h1[RTE_MEMBER_LOOKUP_BULK_MAX], h2[RTE_MEMBER_LOOKUP_BULK_MAX]; uint32_t bit_loc; for (i = 0; i < num_keys; i++) h1[i] = MEMBER_HASH_FUNC(keys[i], ss->key_len, ss->prim_hash_seed); for (i = 0; i < num_keys; i++) h2[i] = MEMBER_HASH_FUNC(&h1[i], sizeof(uint32_t), ss->sec_hash_seed); for (i = 0; i < num_keys; i++) { mask[i] = ~0; for (k = 0; k < ss->num_hashes; k++) { bit_loc = (h1[i] + k * h2[i]) & ss->bit_mask; mask[i] &= test_bit(bit_loc, ss); } } for (i = 0; i < num_keys; i++) { if (mask[i]) { set_ids[i] = __builtin_ctzl(mask[i]) + 1; num_matches++; } else set_ids[i] = RTE_MEMBER_NO_MATCH; } return num_matches; } uint32_t rte_member_lookup_multi_vbf(const struct rte_member_setsum *ss, const void *key, uint32_t match_per_key, member_set_t *set_id) { uint32_t num_matches = 0; uint32_t j; uint32_t h1 = MEMBER_HASH_FUNC(key, ss->key_len, ss->prim_hash_seed); uint32_t h2 = MEMBER_HASH_FUNC(&h1, sizeof(uint32_t), ss->sec_hash_seed); uint32_t mask = ~0; uint32_t bit_loc; for (j = 0; j < ss->num_hashes; j++) { bit_loc = (h1 + j * h2) & ss->bit_mask; mask &= test_bit(bit_loc, ss); } while (mask) { uint32_t loc = __builtin_ctzl(mask); set_id[num_matches] = loc + 1; num_matches++; if (num_matches >= match_per_key) return num_matches; mask &= ~(1UL << loc); } return num_matches; } uint32_t rte_member_lookup_multi_bulk_vbf(const struct rte_member_setsum *ss, const void **keys, uint32_t num_keys, uint32_t match_per_key, uint32_t *match_count, member_set_t *set_ids) { uint32_t i, k; uint32_t num_matches = 0; uint32_t match_cnt_t; uint32_t mask[RTE_MEMBER_LOOKUP_BULK_MAX]; uint32_t h1[RTE_MEMBER_LOOKUP_BULK_MAX], h2[RTE_MEMBER_LOOKUP_BULK_MAX]; uint32_t bit_loc; for (i = 0; i < num_keys; i++) h1[i] = MEMBER_HASH_FUNC(keys[i], ss->key_len, ss->prim_hash_seed); for (i = 0; i < num_keys; i++) h2[i] = MEMBER_HASH_FUNC(&h1[i], sizeof(uint32_t), ss->sec_hash_seed); for (i = 0; i < num_keys; i++) { mask[i] = ~0; for (k = 0; k < ss->num_hashes; k++) { bit_loc = (h1[i] + k * h2[i]) & ss->bit_mask; mask[i] &= test_bit(bit_loc, ss); } } for (i = 0; i < num_keys; i++) { match_cnt_t = 0; while (mask[i]) { uint32_t loc = __builtin_ctzl(mask[i]); set_ids[i * match_per_key + match_cnt_t] = loc + 1; match_cnt_t++; if (match_cnt_t >= match_per_key) break; mask[i] &= ~(1UL << loc); } match_count[i] = match_cnt_t; if (match_cnt_t != 0) num_matches++; } return num_matches; } int rte_member_add_vbf(const struct rte_member_setsum *ss, const void *key, member_set_t set_id) { uint32_t i, h1, h2; uint32_t bit_loc; if (set_id > ss->num_set || set_id == RTE_MEMBER_NO_MATCH) return -EINVAL; h1 = MEMBER_HASH_FUNC(key, ss->key_len, ss->prim_hash_seed); h2 = MEMBER_HASH_FUNC(&h1, sizeof(uint32_t), ss->sec_hash_seed); for (i = 0; i < ss->num_hashes; i++) { bit_loc = (h1 + i * h2) & ss->bit_mask; set_bit(bit_loc, ss, set_id); } return 0; } void rte_member_free_vbf(struct rte_member_setsum *ss) { rte_free(ss->table); } void rte_member_reset_vbf(const struct rte_member_setsum *ss) { uint32_t *vbf = ss->table; memset(vbf, 0, (ss->num_set * ss->bits) >> 3); }
{ "pile_set_name": "Github" }
/// @ref ext_vector_common /// @file glm/ext/vector_common.hpp /// /// @defgroup ext_vector_common GLM_EXT_vector_common /// @ingroup ext /// /// Exposes min and max functions for 3 to 4 vector parameters. /// /// Include <glm/ext/vector_common.hpp> to use the features of this extension. /// /// @see core_common /// @see ext_scalar_common #pragma once // Dependency: #include "../ext/scalar_common.hpp" #include "../common.hpp" #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_EXT_vector_common extension included") #endif namespace glm { /// @addtogroup ext_vector_common /// @{ /// Return the minimum component-wise values of 3 inputs /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point or integer scalar types /// @tparam Q Value from qualifier enum template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c); /// Return the minimum component-wise values of 4 inputs /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point or integer scalar types /// @tparam Q Value from qualifier enum template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d); /// Return the maximum component-wise values of 3 inputs /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point or integer scalar types /// @tparam Q Value from qualifier enum template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z); /// Return the maximum component-wise values of 4 inputs /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point or integer scalar types /// @tparam Q Value from qualifier enum template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max( vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z, vec<L, T, Q> const& w); /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, T y); /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, vec<L, T, Q> const& y); /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c); /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d); /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b); /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b); /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c); /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam T Floating-point scalar types /// @tparam Q Value from qualifier enum /// /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> template<length_t L, typename T, qualifier Q> GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d); /// @} }//namespace glm #include "vector_common.inl"
{ "pile_set_name": "Github" }
{ "name": "BuySellAds", "displayName": "BuySellAds", "properties": [ "buysellads.com", "buysellads.net", "carbonads.com", "carbonads.net", "servedby-buysellads.com" ], "prevalence": { "tracking": 0.00217, "nonTracking": 0.000934, "total": 0.0031 } }
{ "pile_set_name": "Github" }
{ "images": [ { "filename": "ic_today_36pt.png", "idiom": "universal", "scale": "1x" }, { "filename": "ic_today_36pt_2x.png", "idiom": "universal", "scale": "2x" }, { "filename": "ic_today_36pt_3x.png", "idiom": "universal", "scale": "3x" } ], "info": { "author": "xcode", "version": 1 } }
{ "pile_set_name": "Github" }
openssl genrsa 2048 -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEA0UFAb8slBdkp0KPH/i/wU61GNhmqsR8/eqLg+wMrd2Vqeevz oxYTNIM7Qt6iu+K/2NJ1PUg4hrsqfRSjiPd8APQKa2uqm0QkYv7bo0JVFWcqMv+y TYCT0ITvG9x8rFYtVAgC9hhutYCod1IfuCwJbcz4HASRYm4e3R2JsvEjC01MbNpJ PWGDcg9mNhI/8/9TUnNToco4vcNIv3ovExnXwijhbzIAXmSsSwV6d2JXValZg9Xt oy4oNHF5L7nDnt+zKrFZzQQAHYsRVq7GZ/ZPHVgHZeCwL+9Xbd7BoHxuOKhFJiGW 4PbvDijPAXBX3CAVCK3o45h0jFQywSgX4N6hiwIDAQABAoIBAQCfjcSHOXtyWSLE Ho3Y6E60TvOxPqLjSTNK3DT10HXtJRwp+Nqd6LAeI04lb8LfxkaIGfkhEBdhzAba tsj3H9WimHH1dHPyzeN8xF1Ov75GgpIvrr4S0E5k+Wekc9twQIlxgGZZpUmNBZvu 12SuNo299kLcgjMkvVi1OteK5MjWzOiqEw8BJPDBXJlmdPo0YIOxTR2+H+xHpuwo aMf7siXmryJ1uh7gOo8N6U1X0GpQ5UzmirU1vfauV81YYjc7EreenqvDye2D50wA tWTLpv36txOwWrpUJiEk2a2SlkTlAFOb3vDbYwrvf7XHkX4YKEt4d4jjbB9GlTOD al4OsJZJAoGBAPs9xCqsnhecW4JlQYxpMZ4bPRCn2dxI14aDUoterDSg25r12E38 Ph9fM9FGBB2pprLGj+nJxfHocLcmLCzBAfblky14wafm7F2Xp9IyprcB5Jri/FXI FGckOD9iFzF+3UzzGnnUdpNJyqRhOpsrCk636Ut6T9DWhq8/szM9vP+/AoGBANU3 5jq9pBBksCletuiuU+IdRSyjkTxabdOqsDnjK2ol7C8ajpvgW54tlKuumGAeQ8vL a4bWEOYtWtjVZfsA//AeK+qG/6b1nEJK+Cat9T4Bg1LRQDb7IMihgVL2ZJWJRFWv +refYKP3qnyzE5A/I0+8PNlld5KUmS6aylJEvhE1AoGBAKKqmxgGK1WeJqGGbao7 caSsfh0KkEPP5btxyz/xTA3HGGh8RFA5wP8O5L3aV0/dR9D4PrVfromxtUjfrjpL vLneaixGwxuyp9bxGfc+VDKpRxoBXN8tbAhbqw9esyWYvi/UNpAqv5sda9aCHS/Z 7hKJgMMdrg/I1eshkyTaFESBAoGBAL9H2MmV3BvA2LEkgV8ZFbPiom47h03nqmOb 22DzRb2Cq/JOFuYMTuUG6zth9N02CYhIw/xBCwQUaE3ilAyshu85ghhyZ+O2sCpg 62J36W1pGhEwHDW28WBMU6LD3NSyQpXEvF4DI0W2KEKavNBJdDpSGxzFBJKBsTK4 Nw27EfCJAoGActUtucQW5DM9EG3IaHBMM8jl/TBX3Le8UrKbnDpzglkbBeqw8WIa pwol7FbBpgkjF2F5fqF+Sd5OWCyHVglzrDSPPc72v8oDnJmX+708Z6YftHRLW4Z4 m4YhijjwjfCLBFgtNLAh4dRM+t5qPjTA5hyyh8hb9UvuSv5Fd23aKTI= -----END RSA PRIVATE KEY-----
{ "pile_set_name": "Github" }
module HAD.Y2014.M04.D02.Solution where import Control.Monad (mfilter) -- | update update the nth element of a list -- if the index is not a valid index, it leaves the list unchanged -- -- Examples -- -- >>> update (-2) 10 [0..4] -- [0,1,2,3,4] -- -- >>> update 6 10 [0..4] -- [0,1,2,3,4] -- -- >>> update 2 10 [0..4] -- [0,1,10,3,4] -- update :: Int -> a -> [a] -> [a] update i v = zipWith (maybe (const v) (const id) . mfilter (/= i) . Just) [0..]
{ "pile_set_name": "Github" }
version https://git-lfs.github.com/spec/v1 oid sha256:7506c77760a966ed4e65bd161f99b59599cfcf72634ea8097b300ff574c952c6 size 8485
{ "pile_set_name": "Github" }
/* copyright(C) 2003 H.Kawai (under KL-01). */ #if (!defined(STDARG_H)) #define STDARG_H 1 #if (defined(__cplusplus)) extern "C" { #endif #define va_start(v,l) __builtin_stdarg_start((v),l) #define va_end __builtin_va_end #define va_arg __builtin_va_arg #define va_copy(d,s) __builtin_va_copy((d),(s)) #define va_list __builtin_va_list #if (defined(__cplusplus)) } #endif #endif
{ "pile_set_name": "Github" }
<?php namespace Drupal\Tests\file\Unit\Plugin\migrate\cckfield\d6; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\Tests\UnitTestCase; use Drupal\file\Plugin\migrate\cckfield\d6\FileField; use Prophecy\Argument; /** * @coversDefaultClass \Drupal\file\Plugin\migrate\cckfield\d6\FileField * @group file * @group legacy */ class FileCckTest extends UnitTestCase { /** * @var \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface */ protected $plugin; /** * @var \Drupal\migrate\Plugin\MigrationInterface */ protected $migration; /** * {@inheritdoc} */ protected function setUp() { $this->plugin = new FileField([], 'file', []); $migration = $this->prophesize(MigrationInterface::class); // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) ->will(function ($arguments) use ($migration) { $migration->getProcess()->willReturn($arguments[1]); }); $this->migration = $migration->reveal(); } /** * @covers ::processCckFieldValues */ public function testProcessCckFieldValues() { $this->plugin->processCckFieldValues($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'd6_cck_file', 'source' => 'somefieldname', ]; $this->assertSame($expected, $this->migration->getProcess()); } /** * Data provider for testGetFieldType(). */ public function getFieldTypeProvider() { return [ ['image', 'imagefield_widget'], ['file', 'filefield_widget'], ['file', 'x_widget'], ]; } /** * @covers ::getFieldType * @dataProvider getFieldTypeProvider */ public function testGetFieldType($expected_type, $widget_type, array $settings = []) { $row = new Row(); $row->setSourceProperty('widget_type', $widget_type); $row->setSourceProperty('global_settings', $settings); $this->assertSame($expected_type, $this->plugin->getFieldType($row)); } }
{ "pile_set_name": "Github" }
<?php declare(strict_types=1); namespace AsyncAws\Core\Tests\Unit\Stream; use AsyncAws\Core\Stream\CallableStream; use PHPUnit\Framework\TestCase; class CallableStreamTest extends TestCase { /** * @dataProvider provideLengths */ public function testLength(callable $content, ?int $expected): void { $stream = CallableStream::create($content); self::assertSame($expected, $stream->length()); } /** * @dataProvider provideStrings */ public function testStringify(callable $content, string $expected): void { $stream = CallableStream::create($content); self::assertSame($expected, $stream->stringify()); } /** * @dataProvider provideChunks */ public function testChunk(callable $content, array $expected): void { $stream = CallableStream::create($content); self::assertSame($expected, \iterator_to_array($stream)); } public function provideLengths(): iterable { yield [(function () { return 'Hello world'; }), null]; } public function provideStrings(): iterable { $f = static function (string ...$items) { return static function () use (&$items) { return \array_shift($items) ?? ''; }; }; yield [$f('Hello world'), 'Hello world']; yield [$f('Hello', ' ', 'world'), 'Hello world']; yield [$f('Hello', ' ', '', 'world'), 'Hello ']; } public function provideChunks(): iterable { $f = static function (string ...$items) { return static function () use (&$items) { return \array_shift($items) ?? ''; }; }; yield [$f('Hello world'), ['Hello world']]; yield [$f('Hello', ' ', 'world'), ['Hello', ' ', 'world']]; yield [$f('Hello', ' ', '', 'world'), ['Hello', ' ']]; } }
{ "pile_set_name": "Github" }
/*********************************************************************** * Copyright (c) 2015 by Regents of the University of Minnesota. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is available at * http://www.opensource.org/licenses/apache2.0.php. * *************************************************************************/ package edu.umn.cs.spatialHadoop.core; import java.awt.Graphics; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.hadoop.io.Text; import edu.umn.cs.spatialHadoop.io.TextSerializerHelper; /** * A class that holds coordinates of a point. * @author aseldawy * */ public class Point implements Shape, Comparable<Point> { public double x; public double y; public Point() { this(0, 0); } public Point(double x, double y) { set(x, y); } /** * A copy constructor from any shape of type Point (or subclass of Point) * @param s */ public Point(Point s) { this.x = s.x; this.y = s.y; } public void set(double x, double y) { this.x = x; this.y = y; } public void write(DataOutput out) throws IOException { out.writeDouble(x); out.writeDouble(y); } public void readFields(DataInput in) throws IOException { this.x = in.readDouble(); this.y = in.readDouble(); } public int compareTo(Shape s) { Point pt2 = (Point) s; // Sort by id double difference = this.x - pt2.x; if (difference == 0) { difference = this.y - pt2.y; } if (difference == 0) return 0; return difference > 0 ? 1 : -1; } public boolean equals(Object obj) { if (obj == null) return false; Point r2 = (Point) obj; return this.x == r2.x && this.y == r2.y; } @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(this.y); result = 31 * result + (int) (temp ^ temp >>> 32); return result; } public double distanceTo(Point s) { double dx = s.x - this.x; double dy = s.y - this.y; return Math.sqrt(dx*dx+dy*dy); } @Override public Point clone() { return new Point(this.x, this.y); } /** * Returns the minimal bounding rectangle of this point. This method returns * the smallest rectangle that contains this point. For consistency with * other methods such as {@link Rectangle#isIntersected(Shape)}, the rectangle * cannot have a zero width or height. Thus, we use the method * {@link Math#ulp(double)} to compute the smallest non-zero rectangle that * contains this point. In other words, for a point <code>p</code> the * following statement should return true. * <code>p.getMBR().isIntersected(p);</code> */ @Override public Rectangle getMBR() { return new Rectangle(x, y, x + Math.ulp(x), y + Math.ulp(y)); } @Override public double distanceTo(double px, double py) { double dx = x - px; double dy = y - py; return Math.sqrt(dx * dx + dy * dy); } public Shape getIntersection(Shape s) { return getMBR().getIntersection(s); } @Override public boolean isIntersected(Shape s) { return getMBR().isIntersected(s); } @Override public String toString() { return "Point: ("+x+","+y+")"; } @Override public Text toText(Text text) { TextSerializerHelper.serializeDouble(x, text, ','); TextSerializerHelper.serializeDouble(y, text, '\0'); return text; } @Override public void fromText(Text text) { x = TextSerializerHelper.consumeDouble(text, ','); y = TextSerializerHelper.consumeDouble(text, '\0'); } @Override public int compareTo(Point o) { if (x < o.x) return -1; if (x > o.x) return 1; if (y < o.y) return -1; if (y > o.y) return 1; return 0; } @Override public void draw(Graphics g, Rectangle fileMBR, int imageWidth, int imageHeight, double scale) { int imageX = (int) Math.floor((this.x - fileMBR.x1) * imageWidth / fileMBR.getWidth()); int imageY = (int) Math.floor((this.y - fileMBR.y1) * imageHeight / fileMBR.getHeight()); g.fillRect(imageX, imageY, 1, 1); } @Override public void draw(Graphics g, double xscale, double yscale) { int imgx = (int) Math.floor(x * xscale); int imgy = (int) Math.floor(y * yscale); g.fillRect(imgx, imgy, 1, 1); } }
{ "pile_set_name": "Github" }
auto: true url: "https://google.github.io" baseurl: '/flogger' markdown: kramdown repository: google/flogger title: Flogger description: Flogger is a fluent logging API for Java. It supports a wide variety of features, and has many benefits over existing logging APIs. themeColor: teal exclude: - CHANGELOG.md - Gemfile - Gemfile.lock - LICENSE - README.md - _site - node_modules - vendor sass: style: compressed googleAnalyticsId: UA-43772875-11 nav: - item: name: Home url: / - item: name: "Benefits" url: /benefits - item: name: "Best Practices" url: /best_practice - item: name: "Anatomy" url: /anatomy
{ "pile_set_name": "Github" }
# OpenXPKI::Server::Workflow::Activity::NICE::RenewCertificate # Written by Oliver Welter for the OpenXPKI Project 2011 # Copyright (c) 2011 by The OpenXPKI Project package OpenXPKI::Server::Workflow::Activity::NICE::RenewCertificate; use strict; use base qw( OpenXPKI::Server::Workflow::Activity ); use OpenXPKI::Server::Context qw( CTX ); use OpenXPKI::Exception; use OpenXPKI::Debug; use OpenXPKI::Serialization::Simple; use OpenXPKI::Server::Database::Legacy; use OpenXPKI::Server::NICE::Factory; use Data::Dumper; sub execute { OpenXPKI::Exception->throw( message => 'NICE::RenewCertificate is depreacted - please use NICE::IssueCertificate instead', ); } 1; __END__ =head1 Name OpenXPKI::Server::Workflow::Activity::NICE::RenewCertificate; =head1 Description Deprecated / Removed - please use IssueCertificate and set the renewal_cert_identifier paramater
{ "pile_set_name": "Github" }
// #Regression #Attributes #Assemblies // AssemblyAttributes // See FSHARP1.0:832,1674,1675 and 2290 // Attribute under test: AssemblyAlgorithmId //<Expects status="success"></Expects> #light open System open System.Reflection; open System.Configuration.Assemblies let CheckAssemblyAttribute () = if AssemblyHashAlgorithm.MD5 = Assembly.GetExecutingAssembly().GetName().HashAlgorithm then 0 else 1 [<assembly:AssemblyAlgorithmId(AssemblyHashAlgorithm.MD5)>] do CheckAssemblyAttribute () |> exit
{ "pile_set_name": "Github" }
package scala.meta.internal.metals import org.eclipse.lsp4j.MessageParams import org.eclipse.lsp4j.MessageType import scribe.LogRecord import scribe.output.LogOutput import scribe.writer.Writer /** * Scribe logging handler that forwards logging messages to the LSP editor client. */ object LanguageClientLogger extends Writer { var languageClient: Option[MetalsLanguageClient] = None override def write[M](record: LogRecord[M], output: LogOutput): Unit = { languageClient.foreach { client => client.logMessage(new MessageParams(MessageType.Log, output.plainText)) } } }
{ "pile_set_name": "Github" }
PASS | <!-- | Copyright 2015 The AMP HTML 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. | --> | <!-- | Test Description: | Tests support for the amp-facebook tag. | --> | <!doctype html> | <html ⚡> | <head> | <meta charset="utf-8"> | <link rel="canonical" href="./regular-html-version.html"> | <meta name="viewport" content="width=device-width,minimum-scale=1"> | <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | <script async src="https://cdn.ampproject.org/v0.js"></script> | <script async custom-element="amp-facebook" src="https://cdn.ampproject.org/v0/amp-facebook-0.1.js"></script> | </head> | <body> | <!-- Example of a valid amp-facebook (embedded post) --> | <amp-facebook | width=486 | height=657 | layout="responsive" | data-href="https://www.facebook.com/zuck/posts/10102593740125791"> | </amp-facebook> | <!-- Example of a valid amp-facebook (embedded post) with data-locale specified --> | <amp-facebook | width=486 | height=657 | layout="responsive" | data-href="https://www.facebook.com/zuck/posts/10102593740125791" | data-locale="fr_FR"> | </amp-facebook> | <!-- Example of a valid amp-facebook (embedded video) --> | <amp-facebook | width=552 | height=574 | layout="responsive" | data-embed-as="video" | data-allowfullscreen="true" | data-href="https://www.facebook.com/zuck/videos/10102509264909801/"> | </amp-facebook> | <!-- Example of a valid amp-facebook (embedded video) --> | <amp-facebook | width=552 | height=574 | layout="responsive" | data-href="https://www.facebook.com/zuck/videos/10102509264909801/"> | </amp-facebook> | <!-- Example of a valid amp-facebook (embedded comment) --> | <amp-facebook | width=552 | height=200 | layout="responsive" | data-embed-as="comment" | data-include-parent="true" | data-href="https://www.facebook.com/zuck/posts/10102735452532991?comment_id=717538375088203"> | </amp-facebook> | </body> | </html>
{ "pile_set_name": "Github" }
<?php /** * PHPExcel * * Copyright (c) 2006 - 2014 PHPExcel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * @category PHPExcel * @package PHPExcel_Shared * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @version ##VERSION##, ##DATE## */ /** * PHPExcel_Shared_File * * @category PHPExcel * @package PHPExcel_Shared * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Shared_File { /* * Use Temp or File Upload Temp for temporary files * * @protected * @var boolean */ protected static $_useUploadTempDirectory = FALSE; /** * Set the flag indicating whether the File Upload Temp directory should be used for temporary files * * @param boolean $useUploadTempDir Use File Upload Temporary directory (true or false) */ public static function setUseUploadTempDirectory($useUploadTempDir = FALSE) { self::$_useUploadTempDirectory = (boolean) $useUploadTempDir; } // function setUseUploadTempDirectory() /** * Get the flag indicating whether the File Upload Temp directory should be used for temporary files * * @return boolean Use File Upload Temporary directory (true or false) */ public static function getUseUploadTempDirectory() { return self::$_useUploadTempDirectory; } // function getUseUploadTempDirectory() /** * Verify if a file exists * * @param string $pFilename Filename * @return bool */ public static function file_exists($pFilename) { // Sick construction, but it seems that // file_exists returns strange values when // doing the original file_exists on ZIP archives... if ( strtolower(substr($pFilename, 0, 3)) == 'zip' ) { // Open ZIP file and verify if the file exists $zipFile = substr($pFilename, 6, strpos($pFilename, '#') - 6); $archiveFile = substr($pFilename, strpos($pFilename, '#') + 1); $zip = new ZipArchive(); if ($zip->open($zipFile) === true) { $returnValue = ($zip->getFromName($archiveFile) !== false); $zip->close(); return $returnValue; } else { return false; } } else { // Regular file_exists return file_exists($pFilename); } } /** * Returns canonicalized absolute pathname, also for ZIP archives * * @param string $pFilename * @return string */ public static function realpath($pFilename) { // Returnvalue $returnValue = ''; // Try using realpath() if (file_exists($pFilename)) { $returnValue = realpath($pFilename); } // Found something? if ($returnValue == '' || ($returnValue === NULL)) { $pathArray = explode('/' , $pFilename); while(in_array('..', $pathArray) && $pathArray[0] != '..') { for ($i = 0; $i < count($pathArray); ++$i) { if ($pathArray[$i] == '..' && $i > 0) { unset($pathArray[$i]); unset($pathArray[$i - 1]); break; } } } $returnValue = implode('/', $pathArray); } // Return return $returnValue; } /** * Get the systems temporary directory. * * @return string */ public static function sys_get_temp_dir() { if (self::$_useUploadTempDirectory) { // use upload-directory when defined to allow running on environments having very restricted // open_basedir configs if (ini_get('upload_tmp_dir') !== FALSE) { if ($temp = ini_get('upload_tmp_dir')) { if (file_exists($temp)) return realpath($temp); } } } // sys_get_temp_dir is only available since PHP 5.2.1 // http://php.net/manual/en/function.sys-get-temp-dir.php#94119 if ( !function_exists('sys_get_temp_dir')) { if ($temp = getenv('TMP') ) { if ((!empty($temp)) && (file_exists($temp))) { return realpath($temp); } } if ($temp = getenv('TEMP') ) { if ((!empty($temp)) && (file_exists($temp))) { return realpath($temp); } } if ($temp = getenv('TMPDIR') ) { if ((!empty($temp)) && (file_exists($temp))) { return realpath($temp); } } // trick for creating a file in system's temporary dir // without knowing the path of the system's temporary dir $temp = tempnam(__FILE__, ''); if (file_exists($temp)) { unlink($temp); return realpath(dirname($temp)); } return null; } // use ordinary built-in PHP function // There should be no problem with the 5.2.4 Suhosin realpath() bug, because this line should only // be called if we're running 5.2.1 or earlier return realpath(sys_get_temp_dir()); } }
{ "pile_set_name": "Github" }
package registry import ( "os" "path/filepath" "strings" "github.com/spf13/pflag" ) // CertsDir is the directory where certificates are stored var CertsDir = os.Getenv("programdata") + `\docker\certs.d` // cleanPath is used to ensure that a directory name is valid on the target // platform. It will be passed in something *similar* to a URL such as // https:\index.docker.io\v1. Not all platforms support directory names // which contain those characters (such as : on Windows) func cleanPath(s string) string { return filepath.FromSlash(strings.Replace(s, ":", "", -1)) } // installCliPlatformFlags handles any platform specific flags for the service. func (options *ServiceOptions) installCliPlatformFlags(flags *pflag.FlagSet) { // No Windows specific flags. }
{ "pile_set_name": "Github" }
# How to become a contributor and submit your own code ## Contributor License Agreements We'd love to accept your sample apps and patches! Before we can take them, we have to jump a couple of legal hurdles. Please fill out either the individual or corporate Contributor License Agreement (CLA). * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA] (https://developers.google.com/open-source/cla/individual). * If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA] (https://developers.google.com/open-source/cla/corporate). Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. ## Contributing A Patch 1. Submit an issue describing your proposed change to the repo in question. 1. The repo owner will respond to your issue promptly. 1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above). 1. Fork the desired repo, develop and test your code changes. 1. Ensure that your code adheres to the existing style in the sample to which you are contributing. Refer to the [Android Code Style Guide] (https://source.android.com/source/code-style.html) for the recommended coding standards for this organization. 1. Ensure that your code has an appropriate set of unit tests which all pass. 1. Submit a pull request.
{ "pile_set_name": "Github" }
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * lib/crypto/old/old_aead.c * * Copyright 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ #include "k5-int.h" #include "old.h" #include "aead.h" unsigned int krb5int_old_crypto_length(const struct krb5_keytypes *ktp, krb5_cryptotype type) { switch (type) { case KRB5_CRYPTO_TYPE_HEADER: return ktp->enc->block_size + ktp->hash->hashsize; case KRB5_CRYPTO_TYPE_PADDING: return ktp->enc->block_size; case KRB5_CRYPTO_TYPE_TRAILER: return 0; case KRB5_CRYPTO_TYPE_CHECKSUM: return ktp->hash->hashsize; default: assert(0 && "invalid cryptotype passed to krb5int_old_crypto_length"); return 0; } } krb5_error_code krb5int_old_encrypt(const struct krb5_keytypes *ktp, krb5_key key, krb5_keyusage usage, const krb5_data *ivec, krb5_crypto_iov *data, size_t num_data) { const struct krb5_enc_provider *enc = ktp->enc; const struct krb5_hash_provider *hash = ktp->hash; krb5_error_code ret; krb5_crypto_iov *header, *trailer, *padding; krb5_data checksum, confounder, crcivec = empty_data(); unsigned int plainlen, padsize; size_t i; /* E(Confounder | Checksum | Plaintext | Pad) */ plainlen = enc->block_size + hash->hashsize; for (i = 0; i < num_data; i++) { krb5_crypto_iov *iov = &data[i]; if (iov->flags == KRB5_CRYPTO_TYPE_DATA) plainlen += iov->data.length; } header = krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_HEADER); if (header == NULL || header->data.length < enc->block_size + hash->hashsize) return KRB5_BAD_MSIZE; /* Trailer may be absent. */ trailer = krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_TRAILER); if (trailer != NULL) trailer->data.length = 0; /* Check that the input data is correctly padded. */ padsize = krb5_roundup(plainlen, enc->block_size) - plainlen; padding = krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_PADDING); if (padsize > 0 && (padding == NULL || padding->data.length < padsize)) return KRB5_BAD_MSIZE; if (padding) { padding->data.length = padsize; memset(padding->data.data, 0, padsize); } /* Generate a confounder in the header block. */ confounder = make_data(header->data.data, enc->block_size); ret = krb5_c_random_make_octets(0, &confounder); if (ret != 0) goto cleanup; checksum = make_data(header->data.data + enc->block_size, hash->hashsize); memset(checksum.data, 0, hash->hashsize); /* Checksum the plaintext with zeroed checksum and padding. */ ret = hash->hash(data, num_data, &checksum); if (ret != 0) goto cleanup; /* Use the key as the ivec for des-cbc-crc if none was provided. */ if (key->keyblock.enctype == ENCTYPE_DES_CBC_CRC && ivec == NULL) { ret = alloc_data(&crcivec, key->keyblock.length); memcpy(crcivec.data, key->keyblock.contents, key->keyblock.length); ivec = &crcivec; } ret = enc->encrypt(key, ivec, data, num_data); if (ret != 0) goto cleanup; cleanup: zapfree(crcivec.data, crcivec.length); return ret; } krb5_error_code krb5int_old_decrypt(const struct krb5_keytypes *ktp, krb5_key key, krb5_keyusage usage, const krb5_data *ivec, krb5_crypto_iov *data, size_t num_data) { const struct krb5_enc_provider *enc = ktp->enc; const struct krb5_hash_provider *hash = ktp->hash; krb5_error_code ret; krb5_crypto_iov *header, *trailer; krb5_data checksum, crcivec = empty_data(); char *saved_checksum = NULL; size_t i; unsigned int cipherlen = 0; /* Check that the input data is correctly padded. */ for (i = 0; i < num_data; i++) { const krb5_crypto_iov *iov = &data[i]; if (ENCRYPT_IOV(iov)) cipherlen += iov->data.length; } if (cipherlen % enc->block_size != 0) return KRB5_BAD_MSIZE; header = krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_HEADER); if (header == NULL || header->data.length != enc->block_size + hash->hashsize) return KRB5_BAD_MSIZE; trailer = krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_TRAILER); if (trailer != NULL && trailer->data.length != 0) return KRB5_BAD_MSIZE; /* Use the key as the ivec for des-cbc-crc if none was provided. */ if (key->keyblock.enctype == ENCTYPE_DES_CBC_CRC && ivec == NULL) { ret = alloc_data(&crcivec, key->keyblock.length); memcpy(crcivec.data, key->keyblock.contents, key->keyblock.length); ivec = &crcivec; } /* Decrypt the ciphertext. */ ret = enc->decrypt(key, ivec, data, num_data); if (ret != 0) goto cleanup; /* Save the checksum, then zero it out in the plaintext. */ checksum = make_data(header->data.data + enc->block_size, hash->hashsize); saved_checksum = k5alloc(hash->hashsize, &ret); if (saved_checksum == NULL) goto cleanup; memcpy(saved_checksum, checksum.data, checksum.length); memset(checksum.data, 0, checksum.length); /* * Checksum the plaintext (with zeroed checksum field), storing the result * back into the plaintext field we just zeroed out. Then compare it to * the saved checksum. */ ret = hash->hash(data, num_data, &checksum); if (memcmp(checksum.data, saved_checksum, checksum.length) != 0) { ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; goto cleanup; } cleanup: zapfree(crcivec.data, crcivec.length); zapfree(saved_checksum, hash->hashsize); return ret; }
{ "pile_set_name": "Github" }
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 ALL_TESTS="match_dst_mac_test match_src_mac_test match_dst_ip_test \ match_src_ip_test match_ip_flags_test match_pcp_test match_vlan_test \ match_ip_tos_test match_indev_test" NUM_NETIFS=2 source tc_common.sh source lib.sh tcflags="skip_hw" h1_create() { simple_if_init $h1 192.0.2.1/24 198.51.100.1/24 } h1_destroy() { simple_if_fini $h1 192.0.2.1/24 198.51.100.1/24 } h2_create() { simple_if_init $h2 192.0.2.2/24 198.51.100.2/24 tc qdisc add dev $h2 clsact } h2_destroy() { tc qdisc del dev $h2 clsact simple_if_fini $h2 192.0.2.2/24 198.51.100.2/24 } match_dst_mac_test() { local dummy_mac=de:ad:be:ef:aa:aa RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags dst_mac $dummy_mac action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags dst_mac $h2mac action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower log_test "dst_mac match ($tcflags)" } match_src_mac_test() { local dummy_mac=de:ad:be:ef:aa:aa RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags src_mac $dummy_mac action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags src_mac $h1mac action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower log_test "src_mac match ($tcflags)" } match_dst_ip_test() { RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags dst_ip 198.51.100.2 action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags dst_ip 192.0.2.2 action drop tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \ $tcflags dst_ip 192.0.2.0/24 action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 103 1 check_err $? "Did not match on correct filter with mask" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 3 handle 103 flower log_test "dst_ip match ($tcflags)" } match_src_ip_test() { RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags src_ip 198.51.100.1 action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags src_ip 192.0.2.1 action drop tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \ $tcflags src_ip 192.0.2.0/24 action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 103 1 check_err $? "Did not match on correct filter with mask" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 3 handle 103 flower log_test "src_ip match ($tcflags)" } match_ip_flags_test() { RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags ip_flags frag action continue tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags ip_flags firstfrag action continue tc filter add dev $h2 ingress protocol ip pref 3 handle 103 flower \ $tcflags ip_flags nofirstfrag action continue tc filter add dev $h2 ingress protocol ip pref 4 handle 104 flower \ $tcflags ip_flags nofrag action drop $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip "frag=0" -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on wrong frag filter (nofrag)" tc_check_packets "dev $h2 ingress" 102 1 check_fail $? "Matched on wrong firstfrag filter (nofrag)" tc_check_packets "dev $h2 ingress" 103 1 check_err $? "Did not match on nofirstfrag filter (nofrag) " tc_check_packets "dev $h2 ingress" 104 1 check_err $? "Did not match on nofrag filter (nofrag)" $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip "frag=0,mf" -q tc_check_packets "dev $h2 ingress" 101 1 check_err $? "Did not match on frag filter (1stfrag)" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match fistfrag filter (1stfrag)" tc_check_packets "dev $h2 ingress" 103 1 check_err $? "Matched on wrong nofirstfrag filter (1stfrag)" tc_check_packets "dev $h2 ingress" 104 1 check_err $? "Match on wrong nofrag filter (1stfrag)" $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip "frag=256,mf" -q $MZ $h1 -c 1 -p 1000 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip "frag=256" -q tc_check_packets "dev $h2 ingress" 101 3 check_err $? "Did not match on frag filter (no1stfrag)" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Matched on wrong firstfrag filter (no1stfrag)" tc_check_packets "dev $h2 ingress" 103 3 check_err $? "Did not match on nofirstfrag filter (no1stfrag)" tc_check_packets "dev $h2 ingress" 104 1 check_err $? "Matched on nofrag filter (no1stfrag)" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower tc filter del dev $h2 ingress protocol ip pref 3 handle 103 flower tc filter del dev $h2 ingress protocol ip pref 4 handle 104 flower log_test "ip_flags match ($tcflags)" } match_pcp_test() { RET=0 vlan_create $h2 85 v$h2 192.0.2.11/24 tc filter add dev $h2 ingress protocol 802.1q pref 1 handle 101 \ flower vlan_prio 6 $tcflags dst_mac $h2mac action drop tc filter add dev $h2 ingress protocol 802.1q pref 2 handle 102 \ flower vlan_prio 7 $tcflags dst_mac $h2mac action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 7:85 -t ip -q $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 0:85 -t ip -q tc_check_packets "dev $h2 ingress" 101 0 check_err $? "Matched on specified PCP when should not" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on specified PCP" tc filter del dev $h2 ingress protocol 802.1q pref 2 handle 102 flower tc filter del dev $h2 ingress protocol 802.1q pref 1 handle 101 flower vlan_destroy $h2 85 log_test "PCP match ($tcflags)" } match_vlan_test() { RET=0 vlan_create $h2 85 v$h2 192.0.2.11/24 vlan_create $h2 75 v$h2 192.0.2.10/24 tc filter add dev $h2 ingress protocol 802.1q pref 1 handle 101 \ flower vlan_id 75 $tcflags action drop tc filter add dev $h2 ingress protocol 802.1q pref 2 handle 102 \ flower vlan_id 85 $tcflags action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -B 192.0.2.11 -Q 0:85 -t ip -q tc_check_packets "dev $h2 ingress" 101 0 check_err $? "Matched on specified VLAN when should not" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on specified VLAN" tc filter del dev $h2 ingress protocol 802.1q pref 2 handle 102 flower tc filter del dev $h2 ingress protocol 802.1q pref 1 handle 101 flower vlan_destroy $h2 75 vlan_destroy $h2 85 log_test "VLAN match ($tcflags)" } match_ip_tos_test() { RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags dst_ip 192.0.2.2 ip_tos 0x20 action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags dst_ip 192.0.2.2 ip_tos 0x18 action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip tos=18 -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter (0x18)" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter (0x18)" $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip tos=20 -q tc_check_packets "dev $h2 ingress" 102 2 check_fail $? "Matched on a wrong filter (0x20)" tc_check_packets "dev $h2 ingress" 101 1 check_err $? "Did not match on correct filter (0x20)" tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower log_test "ip_tos match ($tcflags)" } match_indev_test() { RET=0 tc filter add dev $h2 ingress protocol ip pref 1 handle 101 flower \ $tcflags indev $h1 dst_mac $h2mac action drop tc filter add dev $h2 ingress protocol ip pref 2 handle 102 flower \ $tcflags indev $h2 dst_mac $h2mac action drop $MZ $h1 -c 1 -p 64 -a $h1mac -b $h2mac -A 192.0.2.1 -B 192.0.2.2 \ -t ip -q tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" tc_check_packets "dev $h2 ingress" 102 1 check_err $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower log_test "indev match ($tcflags)" } setup_prepare() { h1=${NETIFS[p1]} h2=${NETIFS[p2]} h1mac=$(mac_get $h1) h2mac=$(mac_get $h2) vrf_prepare h1_create h2_create } cleanup() { pre_cleanup h2_destroy h1_destroy vrf_cleanup } trap cleanup EXIT setup_prepare setup_wait tests_run tc_offload_check if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" tests_run fi exit $EXIT_STATUS
{ "pile_set_name": "Github" }
<a href="https://www.flickr.com/{{ include.username }}"> <span class="icon icon--flickr">{% include icon-flickr.svg %}</span> <span class="label">{{ include.label | default: include.username }}</span> </a>
{ "pile_set_name": "Github" }
driverClassName = com.mysql.jdbc.Driver url = jdbc:mysql://10.0.3.12/zer0mqtt username = root password = root #初始化连接数量 initialSize = 10 #最大并发连接数 maxActive = 200 #最小空闲连接数 minIdle = 5 #配置获取连接等待超时的时间 maxWait = 60000 #超过时间限制是否回收 removeAbandoned = true #超过时间限制多长 removeAbandonedTimeout = 180 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis = 60000 #配置一个连接在池中最小生存的时间,单位是毫秒 minEvictableIdleTimeMillis = 300000 #用来检测连接是否有效的sql,要求是一个查询语句 validationQuery = SELECT 1 FROM DUAL #申请连接的时候检测 testWhileIdle = true #申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 testOnBorrow = false #归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 testOnReturn = false #打开PSCache,并且指定每个连接上PSCache的大小 poolPreparedStatements = false maxPoolPreparedStatementPerConnectionSize = 50 #属性类型是字符串,通过别名的方式配置扩展插件, #常用的插件有: #日志用的filter:log4j #防御sql注入的filter:wall filter:wall
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> <string>17D102</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>BT4LEContinuityFixup</string> <key>CFBundleIdentifier</key> <string>as.lvs1974.BT4LEContinuityFixup</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>BT4LEContinuityFixup</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>1.1.4</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>1.1.4</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string>9F2000</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>17E189</string> <key>DTSDKName</key> <string>macosx10.13</string> <key>DTXcode</key> <string>0941</string> <key>DTXcodeBuild</key> <string>9F2000</string> <key>IOKitPersonalities</key> <dict> <key>as.lvs1974.BT4LEContinuityFixup</key> <dict> <key>CFBundleIdentifier</key> <string>as.lvs1974.BT4LEContinuityFixup</string> <key>IOClass</key> <string>BT4LEContinuityFixup</string> <key>IOMatchCategory</key> <string>BT4LEContinuityFixup</string> <key>IOProviderClass</key> <string>IOResources</string> <key>IOResourceMatch</key> <string>IOKit</string> </dict> </dict> <key>NSHumanReadableCopyright</key> <string>Copyright © 2017 lvs1974. All rights reserved.</string> <key>OSBundleCompatibleVersion</key> <string>1.0</string> <key>OSBundleLibraries</key> <dict> <key>as.vit9696.Lilu</key> <string>1.2.0</string> <key>com.apple.kpi.bsd</key> <string>12.0.0</string> <key>com.apple.kpi.dsep</key> <string>12.0.0</string> <key>com.apple.kpi.iokit</key> <string>12.0.0</string> <key>com.apple.kpi.libkern</key> <string>12.0.0</string> <key>com.apple.kpi.mach</key> <string>12.0.0</string> <key>com.apple.kpi.unsupported</key> <string>12.0.0</string> </dict> <key>OSBundleRequired</key> <string>Root</string> </dict> </plist>
{ "pile_set_name": "Github" }