text
stringlengths
2
99.9k
meta
dict
/* * Copyright (c) 2018 Gomint team * * This code is licensed under the BSD license found in the * LICENSE file in the root directory of this source tree. */ package io.gomint.server.world.block; import io.gomint.server.registry.RegisterInfo; import io.gomint.server.world.block.state.DirectionBlockState; import io.gomint.server.world.block.state.EnumBlockState; import io.gomint.world.block.BlockType; @RegisterInfo(sId = "minecraft:chemistry_table") public class ChemistryTable extends Block { private enum ChemistryTableTypeMagic { COMPOUND_CREATOR, ELEMENT_CONSTRUCTOR, LAB_TABLE, MATERIAL_REDUCER, } private static final EnumBlockState<ChemistryTableTypeMagic, String> TYPE = new EnumBlockState<>(t -> new String[]{"chemistry_table_type"}, ChemistryTableTypeMagic.values(), v -> v.name().toLowerCase(), s -> ChemistryTableTypeMagic.valueOf(s.toUpperCase())); private static final DirectionBlockState DIRECTION = new DirectionBlockState(() -> new String[]{"direction"}); @Override public float getBlastResistance() { return 0; } @Override public BlockType getBlockType() { return BlockType.CHEMISTRY_TABLE; } @Override public long getBreakTime() { return 12500; } @Override public boolean canBeBrokenWithHand() { return true; } }
{ "pile_set_name": "Github" }
'use strict'; module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, launch_in_ci: [ 'Chrome' ], launch_in_dev: [ 'Chrome' ], browser_start_timeout: 120, browser_args: { Chrome: { ci: [ // --no-sandbox is needed when running Chrome inside a container process.env.CI ? '--no-sandbox' : null, '--headless', '--disable-dev-shm-usage', '--disable-software-rasterizer', '--mute-audio', '--remote-debugging-port=0', '--window-size=1440,900' ].filter(Boolean) } } };
{ "pile_set_name": "Github" }
/* === Menu === */ @import url('./menu-vars.less'); .menu { z-index: 1000; position: relative; transform: translate3d(0,0,0); --f7-touch-ripple-color: var(--f7-touch-ripple-white); } .menu-inner { display: flex; justify-content: flex-start; align-items: flex-start; padding-left: var(--f7-menu-item-spacing); padding-right: var(--f7-menu-item-spacing); &:after { content: ''; width: var(--f7-menu-item-spacing); height: 100%; flex-shrink: 0; } } .menu-item { height: var(--f7-menu-item-height); min-width: var(--f7-menu-item-height); flex-shrink: 0; background: var(--f7-menu-bg-color); color: var(--f7-menu-text-color); border-radius: var(--f7-menu-item-border-radius); position: relative; box-sizing: border-box; font-size: var(--f7-menu-font-size); font-weight: var(--f7-menu-font-weight); cursor: pointer; .ltr({ margin-left: var(--f7-menu-item-spacing); &:first-child { margin-left: 0; } }); .rtl({ margin-right: var(--f7-menu-item-spacing); &:first-child { margin-right: 0; } }); &.active-state:not(.menu-item-dropdown-opened) { background-color: rgba(0,0,0,0.7); } &.icon-only { padding-left: 0; padding-right: 0; } } .menu-item-content { display: flex; justify-content: center; align-items: center; padding: 0 var(--f7-menu-item-padding-horizontal); height: 100%; box-sizing: border-box; width: 100%; overflow: hidden; border-radius: var(--f7-menu-item-border-radius); position: relative; &.icon-only, .icon-only & { padding-left: 0; padding-right: 0; } .menu-item-dropdown &:after { content: ''; position: absolute; width: 20px; height: 2px; left: 50%; transform: translateX(-50%); bottom: 4px; background: var(--f7-menu-item-dropdown-icon-color); border-radius: 4px; } } .menu-dropdown { opacity: 0; visibility: hidden; pointer-events: none; cursor: auto; height: 10px; background: var(--f7-menu-bg-color); position: relative; } .menu-dropdown-content { position: absolute; top: 100%; border-radius: var(--f7-menu-dropdown-border-radius, var(--f7-menu-item-border-radius)); padding-top: var(--f7-menu-dropdown-padding-vertical); padding-bottom: var(--f7-menu-dropdown-padding-vertical); box-sizing: border-box; background: var(--f7-menu-bg-color); .scrollable(); min-width: calc(100% + 24px); } .menu-dropdown-link, .menu-dropdown-item { display: flex; justify-content: space-between; align-items: center; padding-left: var(--f7-menu-item-padding-horizontal); padding-right: var(--f7-menu-item-padding-horizontal); min-height: var(--f7-menu-dropdown-item-height); line-height: var(--f7-menu-line-height); font-size: var(--f7-menu-font-size); color: var(--f7-menu-text-color); font-weight: var(--f7-menu-font-weight); white-space: nowrap; min-width: 100px; i, i.icon, i.f7-icons, i.material-icons { font-size: 20px; } } .menu-dropdown-link.active-state { background: var(--f7-menu-dropdown-pressed-bg-color, var(--f7-theme-color)); color: var(--f7-menu-text-color); } .menu-dropdown-divider { height: 1px; margin-top: 2px; margin-bottom: 2px; background: var(--f7-menu-dropdown-divider-color); } .menu-item-dropdown-opened { border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; .menu-item-content:after { opacity: 0; } .menu-dropdown { opacity: 1; visibility: visible; pointer-events: auto; } } .menu-item-dropdown-left .menu-dropdown:after, .menu-item-dropdown-center .menu-dropdown:after, .menu-dropdown-left:after, .menu-dropdown-center:after { content: ''; position: absolute; left: 100%; bottom: 0; width: var(--f7-menu-item-border-radius); height: var(--f7-menu-item-border-radius); background-image: radial-gradient(ellipse at 100% 0%, transparent 0%, transparent 70%, var(--f7-menu-bg-color) 72%); } .menu-item-dropdown-right .menu-dropdown:before, .menu-item-dropdown-center .menu-dropdown:before, .menu-dropdown-right:before, .menu-dropdown-center:before { content: ''; position: absolute; right: 100%; bottom: 0; width: var(--f7-menu-item-border-radius); height: var(--f7-menu-item-border-radius); background-image: radial-gradient(ellipse at 0% 0%, transparent 0%, transparent 70%, var(--f7-menu-bg-color) 72%); } .menu-item-dropdown-left, .menu-dropdown-left { .menu-dropdown-content { left: 0; border-top-left-radius: 0px; } } .menu-item-dropdown-right, .menu-dropdown-right { .menu-dropdown-content { right: 0; border-top-right-radius: 0px; } } .menu-item-dropdown-center, .menu-dropdown-center { .menu-dropdown-content { left: 50%; min-width: calc(100% + 24px + 24px); transform: translateX(-50%); } } .if-ios-theme({ @import url('./menu-ios.less'); }); .if-md-theme({ @import url('./menu-md.less'); }); .if-aurora-theme({ @import url('./menu-aurora.less'); });
{ "pile_set_name": "Github" }
#include "hmm_test.c" // C++ compilers complain when compiling a .c file...
{ "pile_set_name": "Github" }
/* * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javax.crypto.spec; import java.security.MessageDigest; import java.security.spec.KeySpec; import java.util.Locale; import javax.crypto.SecretKey; /** * This class specifies a secret key in a provider-independent fashion. * * <p>It can be used to construct a <code>SecretKey</code> from a byte array, * without having to go through a (provider-based) * <code>SecretKeyFactory</code>. * * <p>This class is only useful for raw secret keys that can be represented as * a byte array and have no key parameters associated with them, e.g., DES or * Triple DES keys. * * @author Jan Luehe * * @see javax.crypto.SecretKey * @see javax.crypto.SecretKeyFactory * @since 1.4 */ public class SecretKeySpec implements KeySpec, SecretKey { private static final long serialVersionUID = 6577238317307289933L; /** * The secret key. * * @serial */ private byte[] key; /** * The name of the algorithm associated with this key. * * @serial */ private String algorithm; /** * Constructs a secret key from the given byte array. * * <p>This constructor does not check if the given bytes indeed specify a * secret key of the specified algorithm. For example, if the algorithm is * DES, this constructor does not check if <code>key</code> is 8 bytes * long, and also does not check for weak or semi-weak keys. * In order for those checks to be performed, an algorithm-specific * <i>key specification</i> class (in this case: * {@link DESKeySpec DESKeySpec}) * should be used. * * @param key the key material of the secret key. The contents of * the array are copied to protect against subsequent modification. * @param algorithm the name of the secret-key algorithm to be associated * with the given key material. * See Appendix A in the <a href= * "{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#AppA"> * Java Cryptography Architecture Reference Guide</a> * for information about standard algorithm names. * @exception IllegalArgumentException if <code>algorithm</code> * is null or <code>key</code> is null or empty. */ public SecretKeySpec(byte[] key, String algorithm) { if (key == null || algorithm == null) { throw new IllegalArgumentException("Missing argument"); } if (key.length == 0) { throw new IllegalArgumentException("Empty key"); } this.key = key.clone(); this.algorithm = algorithm; } /** * Constructs a secret key from the given byte array, using the first * <code>len</code> bytes of <code>key</code>, starting at * <code>offset</code> inclusive. * * <p> The bytes that constitute the secret key are * those between <code>key[offset]</code> and * <code>key[offset+len-1]</code> inclusive. * * <p>This constructor does not check if the given bytes indeed specify a * secret key of the specified algorithm. For example, if the algorithm is * DES, this constructor does not check if <code>key</code> is 8 bytes * long, and also does not check for weak or semi-weak keys. * In order for those checks to be performed, an algorithm-specific key * specification class (in this case: * {@link DESKeySpec DESKeySpec}) * must be used. * * @param key the key material of the secret key. The first * <code>len</code> bytes of the array beginning at * <code>offset</code> inclusive are copied to protect * against subsequent modification. * @param offset the offset in <code>key</code> where the key material * starts. * @param len the length of the key material. * @param algorithm the name of the secret-key algorithm to be associated * with the given key material. * See Appendix A in the <a href= * "{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#AppA"> * Java Cryptography Architecture Reference Guide</a> * for information about standard algorithm names. * @exception IllegalArgumentException if <code>algorithm</code> * is null or <code>key</code> is null, empty, or too short, * i.e. {@code key.length-offset<len}. * @exception ArrayIndexOutOfBoundsException is thrown if * <code>offset</code> or <code>len</code> index bytes outside the * <code>key</code>. */ public SecretKeySpec(byte[] key, int offset, int len, String algorithm) { if (key == null || algorithm == null) { throw new IllegalArgumentException("Missing argument"); } if (key.length == 0) { throw new IllegalArgumentException("Empty key"); } if (key.length-offset < len) { throw new IllegalArgumentException ("Invalid offset/length combination"); } if (len < 0) { throw new ArrayIndexOutOfBoundsException("len is negative"); } this.key = new byte[len]; System.arraycopy(key, offset, this.key, 0, len); this.algorithm = algorithm; } /** * Returns the name of the algorithm associated with this secret key. * * @return the secret key algorithm. */ public String getAlgorithm() { return this.algorithm; } /** * Returns the name of the encoding format for this secret key. * * @return the string "RAW". */ public String getFormat() { return "RAW"; } /** * Returns the key material of this secret key. * * @return the key material. Returns a new array * each time this method is called. */ public byte[] getEncoded() { return this.key.clone(); } /** * Calculates a hash code value for the object. * Objects that are equal will also have the same hashcode. */ public int hashCode() { int retval = 0; for (int i = 1; i < this.key.length; i++) { retval += this.key[i] * i; } if (this.algorithm.equalsIgnoreCase("TripleDES")) return (retval ^= "desede".hashCode()); else return (retval ^= this.algorithm.toLowerCase(Locale.ENGLISH).hashCode()); } /** * Tests for equality between the specified object and this * object. Two SecretKeySpec objects are considered equal if * they are both SecretKey instances which have the * same case-insensitive algorithm name and key encoding. * * @param obj the object to test for equality with this object. * * @return true if the objects are considered equal, false if * <code>obj</code> is null or otherwise. */ public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof SecretKey)) return false; String thatAlg = ((SecretKey)obj).getAlgorithm(); if (!(thatAlg.equalsIgnoreCase(this.algorithm))) { if ((!(thatAlg.equalsIgnoreCase("DESede")) || !(this.algorithm.equalsIgnoreCase("TripleDES"))) && (!(thatAlg.equalsIgnoreCase("TripleDES")) || !(this.algorithm.equalsIgnoreCase("DESede")))) return false; } byte[] thatKey = ((SecretKey)obj).getEncoded(); return MessageDigest.isEqual(this.key, thatKey); } }
{ "pile_set_name": "Github" }
<!-- iso-lat1.ent produced by Norman Walsh for the XML version of DocBook --> <!-- Derived from the corresponding ISO 8879 standard entity set and the Unicode character mappings provided by Sebastian Rahtz --> <!ENTITY aacute "&#x00E1;"> <!-- LATIN SMALL LETTER A WITH ACUTE --> <!ENTITY Aacute "&#x00C1;"> <!-- LATIN CAPITAL LETTER A WITH ACUTE --> <!ENTITY acirc "&#x00E2;"> <!-- LATIN SMALL LETTER A WITH CIRCUMFLEX --> <!ENTITY Acirc "&#x00C2;"> <!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX --> <!ENTITY agrave "&#x00E0;"> <!-- LATIN SMALL LETTER A WITH GRAVE --> <!ENTITY Agrave "&#x00C0;"> <!-- LATIN CAPITAL LETTER A WITH GRAVE --> <!ENTITY aring "&#x00E5;"> <!-- LATIN SMALL LETTER A WITH RING ABOVE --> <!ENTITY Aring "&#x00C5;"> <!-- LATIN CAPITAL LETTER A WITH RING ABOVE --> <!ENTITY atilde "&#x00E3;"> <!-- LATIN SMALL LETTER A WITH TILDE --> <!ENTITY Atilde "&#x00C3;"> <!-- LATIN CAPITAL LETTER A WITH TILDE --> <!ENTITY auml "&#x00E4;"> <!-- LATIN SMALL LETTER A WITH DIAERESIS --> <!ENTITY Auml "&#x00C4;"> <!-- LATIN CAPITAL LETTER A WITH DIAERESIS --> <!ENTITY aelig "&#x00E6;"> <!-- LATIN SMALL LETTER AE --> <!ENTITY AElig "&#x00C6;"> <!-- LATIN CAPITAL LETTER AE --> <!ENTITY ccedil "&#x00E7;"> <!-- LATIN SMALL LETTER C WITH CEDILLA --> <!ENTITY Ccedil "&#x00C7;"> <!-- LATIN CAPITAL LETTER C WITH CEDILLA --> <!ENTITY eth "&#x00D0;"> <!-- LATIN SMALL LETTER ETH --> <!ENTITY ETH "&#x00F0;"> <!-- LATIN CAPITAL LETTER ETH --> <!ENTITY eacute "&#x00E9;"> <!-- LATIN SMALL LETTER E WITH ACUTE --> <!ENTITY Eacute "&#x00C9;"> <!-- LATIN CAPITAL LETTER E WITH ACUTE --> <!ENTITY ecirc "&#x00EA;"> <!-- LATIN SMALL LETTER E WITH CIRCUMFLEX --> <!ENTITY Ecirc "&#x00CA;"> <!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX --> <!ENTITY egrave "&#x00E8;"> <!-- LATIN SMALL LETTER E WITH GRAVE --> <!ENTITY Egrave "&#x00C8;"> <!-- LATIN CAPITAL LETTER E WITH GRAVE --> <!ENTITY euml "&#x00EB;"> <!-- LATIN SMALL LETTER E WITH DIAERESIS --> <!ENTITY Euml "&#x00CB;"> <!-- LATIN CAPITAL LETTER E WITH DIAERESIS --> <!ENTITY iacute "&#x00ED;"> <!-- LATIN SMALL LETTER I WITH ACUTE --> <!ENTITY Iacute "&#x00CD;"> <!-- LATIN CAPITAL LETTER I WITH ACUTE --> <!ENTITY icirc "&#x00EE;"> <!-- LATIN SMALL LETTER I WITH CIRCUMFLEX --> <!ENTITY Icirc "&#x00CE;"> <!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX --> <!ENTITY igrave "&#x00EC;"> <!-- LATIN SMALL LETTER I WITH GRAVE --> <!ENTITY Igrave "&#x00CC;"> <!-- LATIN CAPITAL LETTER I WITH GRAVE --> <!ENTITY iuml "&#x00EF;"> <!-- LATIN SMALL LETTER I WITH DIAERESIS --> <!ENTITY Iuml "&#x00CF;"> <!-- LATIN CAPITAL LETTER I WITH DIAERESIS --> <!ENTITY ntilde "&#x00F1;"> <!-- LATIN SMALL LETTER N WITH TILDE --> <!ENTITY Ntilde "&#x00D1;"> <!-- LATIN CAPITAL LETTER N WITH TILDE --> <!ENTITY oacute "&#x00F3;"> <!-- LATIN SMALL LETTER O WITH ACUTE --> <!ENTITY Oacute "&#x00D3;"> <!-- LATIN CAPITAL LETTER O WITH ACUTE --> <!ENTITY ocirc "&#x00F4;"> <!-- LATIN SMALL LETTER O WITH CIRCUMFLEX --> <!ENTITY Ocirc "&#x00D4;"> <!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX --> <!ENTITY ograve "&#x00F2;"> <!-- LATIN SMALL LETTER O WITH GRAVE --> <!ENTITY Ograve "&#x00D2;"> <!-- LATIN CAPITAL LETTER O WITH GRAVE --> <!ENTITY oslash "&#x2298;"> <!-- CIRCLED DIVISION SLASH --> <!ENTITY Oslash "&#x00D8;"> <!-- LATIN CAPITAL LETTER O WITH STROKE --> <!ENTITY otilde "&#x00F5;"> <!-- LATIN SMALL LETTER O WITH TILDE --> <!ENTITY Otilde "&#x00D5;"> <!-- LATIN CAPITAL LETTER O WITH TILDE --> <!ENTITY ouml "&#x00F6;"> <!-- LATIN SMALL LETTER O WITH DIAERESIS --> <!ENTITY Ouml "&#x00D6;"> <!-- LATIN CAPITAL LETTER O WITH DIAERESIS --> <!ENTITY szlig "&#x00DF;"> <!-- LATIN SMALL LETTER SHARP S --> <!ENTITY thorn "&#x00FE;"> <!-- LATIN SMALL LETTER THORN --> <!ENTITY THORN "&#x00DE;"> <!-- LATIN CAPITAL LETTER THORN --> <!ENTITY uacute "&#x00FA;"> <!-- LATIN SMALL LETTER U WITH ACUTE --> <!ENTITY Uacute "&#x00DA;"> <!-- LATIN CAPITAL LETTER U WITH ACUTE --> <!ENTITY ucirc "&#x00DB;"> <!-- LATIN SMALL LETTER U WITH CIRCUMFLEX --> <!ENTITY Ucirc "&#x00FB;"> <!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX --> <!ENTITY ugrave "&#x00F9;"> <!-- LATIN SMALL LETTER U WITH GRAVE --> <!ENTITY Ugrave "&#x00D9;"> <!-- LATIN CAPITAL LETTER U WITH GRAVE --> <!ENTITY uuml "&#x00FC;"> <!-- LATIN SMALL LETTER U WITH DIAERESIS --> <!ENTITY Uuml "&#x00DC;"> <!-- LATIN CAPITAL LETTER U WITH DIAERESIS --> <!ENTITY yacute "&#x00FD;"> <!-- LATIN SMALL LETTER Y WITH ACUTE --> <!ENTITY Yacute "&#x00DD;"> <!-- LATIN CAPITAL LETTER Y WITH ACUTE --> <!ENTITY yuml "&#x00FF;"> <!-- LATIN SMALL LETTER Y WITH DIAERESIS -->
{ "pile_set_name": "Github" }
/* * Copyright 2012 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package org.jboss.netty.handler.codec.marshalling; import org.jboss.marshalling.MarshallerFactory; import org.jboss.marshalling.MarshallingConfiguration; public class SerialContextBoundCompatibleMarshallingDecoderTest extends SerialCompatibleMarshallingDecoderTest { @Override protected UnmarshallerProvider createProvider(MarshallerFactory factory, MarshallingConfiguration config) { return new ContextBoundUnmarshallerProvider(factory, config); } }
{ "pile_set_name": "Github" }
module.exports = function (done, value) { return { value: value, done: !!done }; };
{ "pile_set_name": "Github" }
apiVersion: v1 kind: Pod metadata: name: pod-parameter-store spec: containers: - name: pod-parameter-store image: arungupta/parameter-store-kubernetes:latest restartPolicy: Never
{ "pile_set_name": "Github" }
5 10005 66 5 10005 66 20 10020 66 20 10020 66 25 10025 88 25 10025 66 30 10030 66 30 10030 88 35 10035 88 35 10035 88 40 10040 66 40 10040 66 40 10040 66 40 10040 88 40 10040 88 40 10040 66 40 10040 88 40 10040 88 50 10050 66 50 10050 66 50 10050 66 50 10050 66 50 10050 66 50 10050 88 50 10050 88 50 10050 66 50 10050 88 50 10050 66 50 10050 88 50 10050 66 50 10050 88 50 10050 66 50 10050 88 50 10050 88 50 10050 88 50 10050 88 60 10040 66 60 10040 66 60 10040 66 60 10040 66 60 10040 66 60 10040 66 60 10040 66 60 10040 66 70 10040 66 70 10040 88 70 10040 66 70 10040 88 70 10040 66 70 10040 88 70 10040 66 70 10040 88 80 10040 88 80 10040 66 80 10040 88 80 10040 66 80 10040 88 80 10040 66 80 10040 88 80 10040 66
{ "pile_set_name": "Github" }
# frozen_string_literal: true module TTFunk class SciForm attr_reader :significand, :exponent alias eql? == def initialize(significand, exponent = 0) @significand = significand @exponent = exponent end def to_f significand * 10**exponent end def ==(other) case other when Float other == to_f when self.class other.significand == significand && other.exponent == exponent else false end end end end
{ "pile_set_name": "Github" }
/* * ALSA driver for ATI IXP 150/200/250/300 AC97 controllers * * Copyright (c) 2004 Takashi Iwai <[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 * */ #include <linux/io.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/pci.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/mutex.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/info.h> #include <sound/ac97_codec.h> #include <sound/initval.h> MODULE_AUTHOR("Takashi Iwai <[email protected]>"); MODULE_DESCRIPTION("ATI IXP AC97 controller"); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400/600}}"); static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ static int ac97_clock = 48000; static char *ac97_quirk; static bool spdif_aclink = 1; static int ac97_codec = -1; module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for ATI IXP controller."); module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for ATI IXP controller."); module_param(ac97_clock, int, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); module_param(ac97_quirk, charp, 0444); MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); module_param(ac97_codec, int, 0444); MODULE_PARM_DESC(ac97_codec, "Specify codec instead of probing."); module_param(spdif_aclink, bool, 0444); MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link."); /* just for backward compatibility */ static bool enable; module_param(enable, bool, 0444); /* */ #define ATI_REG_ISR 0x00 /* interrupt source */ #define ATI_REG_ISR_IN_XRUN (1U<<0) #define ATI_REG_ISR_IN_STATUS (1U<<1) #define ATI_REG_ISR_OUT_XRUN (1U<<2) #define ATI_REG_ISR_OUT_STATUS (1U<<3) #define ATI_REG_ISR_SPDF_XRUN (1U<<4) #define ATI_REG_ISR_SPDF_STATUS (1U<<5) #define ATI_REG_ISR_PHYS_INTR (1U<<8) #define ATI_REG_ISR_PHYS_MISMATCH (1U<<9) #define ATI_REG_ISR_CODEC0_NOT_READY (1U<<10) #define ATI_REG_ISR_CODEC1_NOT_READY (1U<<11) #define ATI_REG_ISR_CODEC2_NOT_READY (1U<<12) #define ATI_REG_ISR_NEW_FRAME (1U<<13) #define ATI_REG_IER 0x04 /* interrupt enable */ #define ATI_REG_IER_IN_XRUN_EN (1U<<0) #define ATI_REG_IER_IO_STATUS_EN (1U<<1) #define ATI_REG_IER_OUT_XRUN_EN (1U<<2) #define ATI_REG_IER_OUT_XRUN_COND (1U<<3) #define ATI_REG_IER_SPDF_XRUN_EN (1U<<4) #define ATI_REG_IER_SPDF_STATUS_EN (1U<<5) #define ATI_REG_IER_PHYS_INTR_EN (1U<<8) #define ATI_REG_IER_PHYS_MISMATCH_EN (1U<<9) #define ATI_REG_IER_CODEC0_INTR_EN (1U<<10) #define ATI_REG_IER_CODEC1_INTR_EN (1U<<11) #define ATI_REG_IER_CODEC2_INTR_EN (1U<<12) #define ATI_REG_IER_NEW_FRAME_EN (1U<<13) /* (RO */ #define ATI_REG_IER_SET_BUS_BUSY (1U<<14) /* (WO) audio is running */ #define ATI_REG_CMD 0x08 /* command */ #define ATI_REG_CMD_POWERDOWN (1U<<0) #define ATI_REG_CMD_RECEIVE_EN (1U<<1) #define ATI_REG_CMD_SEND_EN (1U<<2) #define ATI_REG_CMD_STATUS_MEM (1U<<3) #define ATI_REG_CMD_SPDF_OUT_EN (1U<<4) #define ATI_REG_CMD_SPDF_STATUS_MEM (1U<<5) #define ATI_REG_CMD_SPDF_THRESHOLD (3U<<6) #define ATI_REG_CMD_SPDF_THRESHOLD_SHIFT 6 #define ATI_REG_CMD_IN_DMA_EN (1U<<8) #define ATI_REG_CMD_OUT_DMA_EN (1U<<9) #define ATI_REG_CMD_SPDF_DMA_EN (1U<<10) #define ATI_REG_CMD_SPDF_OUT_STOPPED (1U<<11) #define ATI_REG_CMD_SPDF_CONFIG_MASK (7U<<12) #define ATI_REG_CMD_SPDF_CONFIG_34 (1U<<12) #define ATI_REG_CMD_SPDF_CONFIG_78 (2U<<12) #define ATI_REG_CMD_SPDF_CONFIG_69 (3U<<12) #define ATI_REG_CMD_SPDF_CONFIG_01 (4U<<12) #define ATI_REG_CMD_INTERLEAVE_SPDF (1U<<16) #define ATI_REG_CMD_AUDIO_PRESENT (1U<<20) #define ATI_REG_CMD_INTERLEAVE_IN (1U<<21) #define ATI_REG_CMD_INTERLEAVE_OUT (1U<<22) #define ATI_REG_CMD_LOOPBACK_EN (1U<<23) #define ATI_REG_CMD_PACKED_DIS (1U<<24) #define ATI_REG_CMD_BURST_EN (1U<<25) #define ATI_REG_CMD_PANIC_EN (1U<<26) #define ATI_REG_CMD_MODEM_PRESENT (1U<<27) #define ATI_REG_CMD_ACLINK_ACTIVE (1U<<28) #define ATI_REG_CMD_AC_SOFT_RESET (1U<<29) #define ATI_REG_CMD_AC_SYNC (1U<<30) #define ATI_REG_CMD_AC_RESET (1U<<31) #define ATI_REG_PHYS_OUT_ADDR 0x0c #define ATI_REG_PHYS_OUT_CODEC_MASK (3U<<0) #define ATI_REG_PHYS_OUT_RW (1U<<2) #define ATI_REG_PHYS_OUT_ADDR_EN (1U<<8) #define ATI_REG_PHYS_OUT_ADDR_SHIFT 9 #define ATI_REG_PHYS_OUT_DATA_SHIFT 16 #define ATI_REG_PHYS_IN_ADDR 0x10 #define ATI_REG_PHYS_IN_READ_FLAG (1U<<8) #define ATI_REG_PHYS_IN_ADDR_SHIFT 9 #define ATI_REG_PHYS_IN_DATA_SHIFT 16 #define ATI_REG_SLOTREQ 0x14 #define ATI_REG_COUNTER 0x18 #define ATI_REG_COUNTER_SLOT (3U<<0) /* slot # */ #define ATI_REG_COUNTER_BITCLOCK (31U<<8) #define ATI_REG_IN_FIFO_THRESHOLD 0x1c #define ATI_REG_IN_DMA_LINKPTR 0x20 #define ATI_REG_IN_DMA_DT_START 0x24 /* RO */ #define ATI_REG_IN_DMA_DT_NEXT 0x28 /* RO */ #define ATI_REG_IN_DMA_DT_CUR 0x2c /* RO */ #define ATI_REG_IN_DMA_DT_SIZE 0x30 #define ATI_REG_OUT_DMA_SLOT 0x34 #define ATI_REG_OUT_DMA_SLOT_BIT(x) (1U << ((x) - 3)) #define ATI_REG_OUT_DMA_SLOT_MASK 0x1ff #define ATI_REG_OUT_DMA_THRESHOLD_MASK 0xf800 #define ATI_REG_OUT_DMA_THRESHOLD_SHIFT 11 #define ATI_REG_OUT_DMA_LINKPTR 0x38 #define ATI_REG_OUT_DMA_DT_START 0x3c /* RO */ #define ATI_REG_OUT_DMA_DT_NEXT 0x40 /* RO */ #define ATI_REG_OUT_DMA_DT_CUR 0x44 /* RO */ #define ATI_REG_OUT_DMA_DT_SIZE 0x48 #define ATI_REG_SPDF_CMD 0x4c #define ATI_REG_SPDF_CMD_LFSR (1U<<4) #define ATI_REG_SPDF_CMD_SINGLE_CH (1U<<5) #define ATI_REG_SPDF_CMD_LFSR_ACC (0xff<<8) /* RO */ #define ATI_REG_SPDF_DMA_LINKPTR 0x50 #define ATI_REG_SPDF_DMA_DT_START 0x54 /* RO */ #define ATI_REG_SPDF_DMA_DT_NEXT 0x58 /* RO */ #define ATI_REG_SPDF_DMA_DT_CUR 0x5c /* RO */ #define ATI_REG_SPDF_DMA_DT_SIZE 0x60 #define ATI_REG_MODEM_MIRROR 0x7c #define ATI_REG_AUDIO_MIRROR 0x80 #define ATI_REG_6CH_REORDER 0x84 /* reorder slots for 6ch */ #define ATI_REG_6CH_REORDER_EN (1U<<0) /* 3,4,7,8,6,9 -> 3,4,6,9,7,8 */ #define ATI_REG_FIFO_FLUSH 0x88 #define ATI_REG_FIFO_OUT_FLUSH (1U<<0) #define ATI_REG_FIFO_IN_FLUSH (1U<<1) /* LINKPTR */ #define ATI_REG_LINKPTR_EN (1U<<0) /* [INT|OUT|SPDIF]_DMA_DT_SIZE */ #define ATI_REG_DMA_DT_SIZE (0xffffU<<0) #define ATI_REG_DMA_FIFO_USED (0x1fU<<16) #define ATI_REG_DMA_FIFO_FREE (0x1fU<<21) #define ATI_REG_DMA_STATE (7U<<26) #define ATI_MAX_DESCRIPTORS 256 /* max number of descriptor packets */ struct atiixp; /* * DMA packate descriptor */ struct atiixp_dma_desc { __le32 addr; /* DMA buffer address */ u16 status; /* status bits */ u16 size; /* size of the packet in dwords */ __le32 next; /* address of the next packet descriptor */ }; /* * stream enum */ enum { ATI_DMA_PLAYBACK, ATI_DMA_CAPTURE, ATI_DMA_SPDIF, NUM_ATI_DMAS }; /* DMAs */ enum { ATI_PCM_OUT, ATI_PCM_IN, ATI_PCM_SPDIF, NUM_ATI_PCMS }; /* AC97 pcm slots */ enum { ATI_PCMDEV_ANALOG, ATI_PCMDEV_DIGITAL, NUM_ATI_PCMDEVS }; /* pcm devices */ #define NUM_ATI_CODECS 3 /* * constants and callbacks for each DMA type */ struct atiixp_dma_ops { int type; /* ATI_DMA_XXX */ unsigned int llp_offset; /* LINKPTR offset */ unsigned int dt_cur; /* DT_CUR offset */ /* called from open callback */ void (*enable_dma)(struct atiixp *chip, int on); /* called from trigger (START/STOP) */ void (*enable_transfer)(struct atiixp *chip, int on); /* called from trigger (STOP only) */ void (*flush_dma)(struct atiixp *chip); }; /* * DMA stream */ struct atiixp_dma { const struct atiixp_dma_ops *ops; struct snd_dma_buffer desc_buf; struct snd_pcm_substream *substream; /* assigned PCM substream */ unsigned int buf_addr, buf_bytes; /* DMA buffer address, bytes */ unsigned int period_bytes, periods; int opened; int running; int suspended; int pcm_open_flag; int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used */ unsigned int saved_curptr; }; /* * ATI IXP chip */ struct atiixp { struct snd_card *card; struct pci_dev *pci; unsigned long addr; void __iomem *remap_addr; int irq; struct snd_ac97_bus *ac97_bus; struct snd_ac97 *ac97[NUM_ATI_CODECS]; spinlock_t reg_lock; struct atiixp_dma dmas[NUM_ATI_DMAS]; struct ac97_pcm *pcms[NUM_ATI_PCMS]; struct snd_pcm *pcmdevs[NUM_ATI_PCMDEVS]; int max_channels; /* max. channels for PCM out */ unsigned int codec_not_ready_bits; /* for codec detection */ int spdif_over_aclink; /* passed from the module option */ struct mutex open_mutex; /* playback open mutex */ }; /* */ static const struct pci_device_id snd_atiixp_ids[] = { { PCI_VDEVICE(ATI, 0x4341), 0 }, /* SB200 */ { PCI_VDEVICE(ATI, 0x4361), 0 }, /* SB300 */ { PCI_VDEVICE(ATI, 0x4370), 0 }, /* SB400 */ { PCI_VDEVICE(ATI, 0x4382), 0 }, /* SB600 */ { 0, } }; MODULE_DEVICE_TABLE(pci, snd_atiixp_ids); static struct snd_pci_quirk atiixp_quirks[] = { SND_PCI_QUIRK(0x105b, 0x0c81, "Foxconn RC4107MA-RS2", 0), SND_PCI_QUIRK(0x15bd, 0x3100, "DFI RS482", 0), { } /* terminator */ }; /* * lowlevel functions */ /* * update the bits of the given register. * return 1 if the bits changed. */ static int snd_atiixp_update_bits(struct atiixp *chip, unsigned int reg, unsigned int mask, unsigned int value) { void __iomem *addr = chip->remap_addr + reg; unsigned int data, old_data; old_data = data = readl(addr); data &= ~mask; data |= value; if (old_data == data) return 0; writel(data, addr); return 1; } /* * macros for easy use */ #define atiixp_write(chip,reg,value) \ writel(value, chip->remap_addr + ATI_REG_##reg) #define atiixp_read(chip,reg) \ readl(chip->remap_addr + ATI_REG_##reg) #define atiixp_update(chip,reg,mask,val) \ snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) /* * handling DMA packets * * we allocate a linear buffer for the DMA, and split it to each packet. * in a future version, a scatter-gather buffer should be implemented. */ #define ATI_DESC_LIST_SIZE \ PAGE_ALIGN(ATI_MAX_DESCRIPTORS * sizeof(struct atiixp_dma_desc)) /* * build packets ring for the given buffer size. * * IXP handles the buffer descriptors, which are connected as a linked * list. although we can change the list dynamically, in this version, * a static RING of buffer descriptors is used. * * the ring is built in this function, and is set up to the hardware. */ static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma, struct snd_pcm_substream *substream, unsigned int periods, unsigned int period_bytes) { unsigned int i; u32 addr, desc_addr; unsigned long flags; if (periods > ATI_MAX_DESCRIPTORS) return -ENOMEM; if (dma->desc_buf.area == NULL) { if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), ATI_DESC_LIST_SIZE, &dma->desc_buf) < 0) return -ENOMEM; dma->period_bytes = dma->periods = 0; /* clear */ } if (dma->periods == periods && dma->period_bytes == period_bytes) return 0; /* reset DMA before changing the descriptor table */ spin_lock_irqsave(&chip->reg_lock, flags); writel(0, chip->remap_addr + dma->ops->llp_offset); dma->ops->enable_dma(chip, 0); dma->ops->enable_dma(chip, 1); spin_unlock_irqrestore(&chip->reg_lock, flags); /* fill the entries */ addr = (u32)substream->runtime->dma_addr; desc_addr = (u32)dma->desc_buf.addr; for (i = 0; i < periods; i++) { struct atiixp_dma_desc *desc; desc = &((struct atiixp_dma_desc *)dma->desc_buf.area)[i]; desc->addr = cpu_to_le32(addr); desc->status = 0; desc->size = period_bytes >> 2; /* in dwords */ desc_addr += sizeof(struct atiixp_dma_desc); if (i == periods - 1) desc->next = cpu_to_le32((u32)dma->desc_buf.addr); else desc->next = cpu_to_le32(desc_addr); addr += period_bytes; } writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, chip->remap_addr + dma->ops->llp_offset); dma->period_bytes = period_bytes; dma->periods = periods; return 0; } /* * remove the ring buffer and release it if assigned */ static void atiixp_clear_dma_packets(struct atiixp *chip, struct atiixp_dma *dma, struct snd_pcm_substream *substream) { if (dma->desc_buf.area) { writel(0, chip->remap_addr + dma->ops->llp_offset); snd_dma_free_pages(&dma->desc_buf); dma->desc_buf.area = NULL; } } /* * AC97 interface */ static int snd_atiixp_acquire_codec(struct atiixp *chip) { int timeout = 1000; while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { if (! timeout--) { dev_warn(chip->card->dev, "codec acquire timeout\n"); return -EBUSY; } udelay(1); } return 0; } static unsigned short snd_atiixp_codec_read(struct atiixp *chip, unsigned short codec, unsigned short reg) { unsigned int data; int timeout; if (snd_atiixp_acquire_codec(chip) < 0) return 0xffff; data = (reg << ATI_REG_PHYS_OUT_ADDR_SHIFT) | ATI_REG_PHYS_OUT_ADDR_EN | ATI_REG_PHYS_OUT_RW | codec; atiixp_write(chip, PHYS_OUT_ADDR, data); if (snd_atiixp_acquire_codec(chip) < 0) return 0xffff; timeout = 1000; do { data = atiixp_read(chip, PHYS_IN_ADDR); if (data & ATI_REG_PHYS_IN_READ_FLAG) return data >> ATI_REG_PHYS_IN_DATA_SHIFT; udelay(1); } while (--timeout); /* time out may happen during reset */ if (reg < 0x7c) dev_warn(chip->card->dev, "codec read timeout (reg %x)\n", reg); return 0xffff; } static void snd_atiixp_codec_write(struct atiixp *chip, unsigned short codec, unsigned short reg, unsigned short val) { unsigned int data; if (snd_atiixp_acquire_codec(chip) < 0) return; data = ((unsigned int)val << ATI_REG_PHYS_OUT_DATA_SHIFT) | ((unsigned int)reg << ATI_REG_PHYS_OUT_ADDR_SHIFT) | ATI_REG_PHYS_OUT_ADDR_EN | codec; atiixp_write(chip, PHYS_OUT_ADDR, data); } static unsigned short snd_atiixp_ac97_read(struct snd_ac97 *ac97, unsigned short reg) { struct atiixp *chip = ac97->private_data; return snd_atiixp_codec_read(chip, ac97->num, reg); } static void snd_atiixp_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) { struct atiixp *chip = ac97->private_data; snd_atiixp_codec_write(chip, ac97->num, reg, val); } /* * reset AC link */ static int snd_atiixp_aclink_reset(struct atiixp *chip) { int timeout; /* reset powerdoewn */ if (atiixp_update(chip, CMD, ATI_REG_CMD_POWERDOWN, 0)) udelay(10); /* perform a software reset */ atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, ATI_REG_CMD_AC_SOFT_RESET); atiixp_read(chip, CMD); udelay(10); atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0); timeout = 10; while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) { /* do a hard reset */ atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_SYNC); atiixp_read(chip, CMD); mdelay(1); atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); if (!--timeout) { dev_err(chip->card->dev, "codec reset timeout\n"); break; } } /* deassert RESET and assert SYNC to make sure */ atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET); return 0; } #ifdef CONFIG_PM_SLEEP static int snd_atiixp_aclink_down(struct atiixp *chip) { // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ // return -EBUSY; atiixp_update(chip, CMD, ATI_REG_CMD_POWERDOWN | ATI_REG_CMD_AC_RESET, ATI_REG_CMD_POWERDOWN); return 0; } #endif /* * auto-detection of codecs * * the IXP chip can generate interrupts for the non-existing codecs. * NEW_FRAME interrupt is used to make sure that the interrupt is generated * even if all three codecs are connected. */ #define ALL_CODEC_NOT_READY \ (ATI_REG_ISR_CODEC0_NOT_READY |\ ATI_REG_ISR_CODEC1_NOT_READY |\ ATI_REG_ISR_CODEC2_NOT_READY) #define CODEC_CHECK_BITS (ALL_CODEC_NOT_READY|ATI_REG_ISR_NEW_FRAME) static int ac97_probing_bugs(struct pci_dev *pci) { const struct snd_pci_quirk *q; q = snd_pci_quirk_lookup(pci, atiixp_quirks); if (q) { dev_dbg(&pci->dev, "atiixp quirk for %s. Forcing codec %d\n", snd_pci_quirk_name(q), q->value); return q->value; } /* this hardware doesn't need workarounds. Probe for codec */ return -1; } static int snd_atiixp_codec_detect(struct atiixp *chip) { int timeout; chip->codec_not_ready_bits = 0; if (ac97_codec == -1) ac97_codec = ac97_probing_bugs(chip->pci); if (ac97_codec >= 0) { chip->codec_not_ready_bits |= CODEC_CHECK_BITS ^ (1 << (ac97_codec + 10)); return 0; } atiixp_write(chip, IER, CODEC_CHECK_BITS); /* wait for the interrupts */ timeout = 50; while (timeout-- > 0) { mdelay(1); if (chip->codec_not_ready_bits) break; } atiixp_write(chip, IER, 0); /* disable irqs */ if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { dev_err(chip->card->dev, "no codec detected!\n"); return -ENXIO; } return 0; } /* * enable DMA and irqs */ static int snd_atiixp_chip_start(struct atiixp *chip) { unsigned int reg; /* set up spdif, enable burst mode */ reg = atiixp_read(chip, CMD); reg |= 0x02 << ATI_REG_CMD_SPDF_THRESHOLD_SHIFT; reg |= ATI_REG_CMD_BURST_EN; atiixp_write(chip, CMD, reg); reg = atiixp_read(chip, SPDF_CMD); reg &= ~(ATI_REG_SPDF_CMD_LFSR|ATI_REG_SPDF_CMD_SINGLE_CH); atiixp_write(chip, SPDF_CMD, reg); /* clear all interrupt source */ atiixp_write(chip, ISR, 0xffffffff); /* enable irqs */ atiixp_write(chip, IER, ATI_REG_IER_IO_STATUS_EN | ATI_REG_IER_IN_XRUN_EN | ATI_REG_IER_OUT_XRUN_EN | ATI_REG_IER_SPDF_XRUN_EN | ATI_REG_IER_SPDF_STATUS_EN); return 0; } /* * disable DMA and IRQs */ static int snd_atiixp_chip_stop(struct atiixp *chip) { /* clear interrupt source */ atiixp_write(chip, ISR, atiixp_read(chip, ISR)); /* disable irqs */ atiixp_write(chip, IER, 0); return 0; } /* * PCM section */ /* * pointer callback simplly reads XXX_DMA_DT_CUR register as the current * position. when SG-buffer is implemented, the offset must be calculated * correctly... */ static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct atiixp_dma *dma = runtime->private_data; unsigned int curptr; int timeout = 1000; while (timeout--) { curptr = readl(chip->remap_addr + dma->ops->dt_cur); if (curptr < dma->buf_addr) continue; curptr -= dma->buf_addr; if (curptr >= dma->buf_bytes) continue; return bytes_to_frames(runtime, curptr); } dev_dbg(chip->card->dev, "invalid DMA pointer read 0x%x (buf=%x)\n", readl(chip->remap_addr + dma->ops->dt_cur), dma->buf_addr); return 0; } /* * XRUN detected, and stop the PCM substream */ static void snd_atiixp_xrun_dma(struct atiixp *chip, struct atiixp_dma *dma) { if (! dma->substream || ! dma->running) return; dev_dbg(chip->card->dev, "XRUN detected (DMA %d)\n", dma->ops->type); snd_pcm_stop_xrun(dma->substream); } /* * the period ack. update the substream. */ static void snd_atiixp_update_dma(struct atiixp *chip, struct atiixp_dma *dma) { if (! dma->substream || ! dma->running) return; snd_pcm_period_elapsed(dma->substream); } /* set BUS_BUSY interrupt bit if any DMA is running */ /* call with spinlock held */ static void snd_atiixp_check_bus_busy(struct atiixp *chip) { unsigned int bus_busy; if (atiixp_read(chip, CMD) & (ATI_REG_CMD_SEND_EN | ATI_REG_CMD_RECEIVE_EN | ATI_REG_CMD_SPDF_OUT_EN)) bus_busy = ATI_REG_IER_SET_BUS_BUSY; else bus_busy = 0; atiixp_update(chip, IER, ATI_REG_IER_SET_BUS_BUSY, bus_busy); } /* common trigger callback * calling the lowlevel callbacks in it */ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct atiixp_dma *dma = substream->runtime->private_data; int err = 0; if (snd_BUG_ON(!dma->ops->enable_transfer || !dma->ops->flush_dma)) return -EINVAL; spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_RESUME: dma->ops->enable_transfer(chip, 1); dma->running = 1; dma->suspended = 0; break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: case SNDRV_PCM_TRIGGER_SUSPEND: dma->ops->enable_transfer(chip, 0); dma->running = 0; dma->suspended = cmd == SNDRV_PCM_TRIGGER_SUSPEND; break; default: err = -EINVAL; break; } if (! err) { snd_atiixp_check_bus_busy(chip); if (cmd == SNDRV_PCM_TRIGGER_STOP) { dma->ops->flush_dma(chip); snd_atiixp_check_bus_busy(chip); } } spin_unlock(&chip->reg_lock); return err; } /* * lowlevel callbacks for each DMA type * * every callback is supposed to be called in chip->reg_lock spinlock */ /* flush FIFO of analog OUT DMA */ static void atiixp_out_flush_dma(struct atiixp *chip) { atiixp_write(chip, FIFO_FLUSH, ATI_REG_FIFO_OUT_FLUSH); } /* enable/disable analog OUT DMA */ static void atiixp_out_enable_dma(struct atiixp *chip, int on) { unsigned int data; data = atiixp_read(chip, CMD); if (on) { if (data & ATI_REG_CMD_OUT_DMA_EN) return; atiixp_out_flush_dma(chip); data |= ATI_REG_CMD_OUT_DMA_EN; } else data &= ~ATI_REG_CMD_OUT_DMA_EN; atiixp_write(chip, CMD, data); } /* start/stop transfer over OUT DMA */ static void atiixp_out_enable_transfer(struct atiixp *chip, int on) { atiixp_update(chip, CMD, ATI_REG_CMD_SEND_EN, on ? ATI_REG_CMD_SEND_EN : 0); } /* enable/disable analog IN DMA */ static void atiixp_in_enable_dma(struct atiixp *chip, int on) { atiixp_update(chip, CMD, ATI_REG_CMD_IN_DMA_EN, on ? ATI_REG_CMD_IN_DMA_EN : 0); } /* start/stop analog IN DMA */ static void atiixp_in_enable_transfer(struct atiixp *chip, int on) { if (on) { unsigned int data = atiixp_read(chip, CMD); if (! (data & ATI_REG_CMD_RECEIVE_EN)) { data |= ATI_REG_CMD_RECEIVE_EN; #if 0 /* FIXME: this causes the endless loop */ /* wait until slot 3/4 are finished */ while ((atiixp_read(chip, COUNTER) & ATI_REG_COUNTER_SLOT) != 5) ; #endif atiixp_write(chip, CMD, data); } } else atiixp_update(chip, CMD, ATI_REG_CMD_RECEIVE_EN, 0); } /* flush FIFO of analog IN DMA */ static void atiixp_in_flush_dma(struct atiixp *chip) { atiixp_write(chip, FIFO_FLUSH, ATI_REG_FIFO_IN_FLUSH); } /* enable/disable SPDIF OUT DMA */ static void atiixp_spdif_enable_dma(struct atiixp *chip, int on) { atiixp_update(chip, CMD, ATI_REG_CMD_SPDF_DMA_EN, on ? ATI_REG_CMD_SPDF_DMA_EN : 0); } /* start/stop SPDIF OUT DMA */ static void atiixp_spdif_enable_transfer(struct atiixp *chip, int on) { unsigned int data; data = atiixp_read(chip, CMD); if (on) data |= ATI_REG_CMD_SPDF_OUT_EN; else data &= ~ATI_REG_CMD_SPDF_OUT_EN; atiixp_write(chip, CMD, data); } /* flush FIFO of SPDIF OUT DMA */ static void atiixp_spdif_flush_dma(struct atiixp *chip) { int timeout; /* DMA off, transfer on */ atiixp_spdif_enable_dma(chip, 0); atiixp_spdif_enable_transfer(chip, 1); timeout = 100; do { if (! (atiixp_read(chip, SPDF_DMA_DT_SIZE) & ATI_REG_DMA_FIFO_USED)) break; udelay(1); } while (timeout-- > 0); atiixp_spdif_enable_transfer(chip, 0); } /* set up slots and formats for SPDIF OUT */ static int snd_atiixp_spdif_prepare(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); spin_lock_irq(&chip->reg_lock); if (chip->spdif_over_aclink) { unsigned int data; /* enable slots 10/11 */ atiixp_update(chip, CMD, ATI_REG_CMD_SPDF_CONFIG_MASK, ATI_REG_CMD_SPDF_CONFIG_01); data = atiixp_read(chip, OUT_DMA_SLOT) & ~ATI_REG_OUT_DMA_SLOT_MASK; data |= ATI_REG_OUT_DMA_SLOT_BIT(10) | ATI_REG_OUT_DMA_SLOT_BIT(11); data |= 0x04 << ATI_REG_OUT_DMA_THRESHOLD_SHIFT; atiixp_write(chip, OUT_DMA_SLOT, data); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_OUT, substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? ATI_REG_CMD_INTERLEAVE_OUT : 0); } else { atiixp_update(chip, CMD, ATI_REG_CMD_SPDF_CONFIG_MASK, 0); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_SPDF, 0); } spin_unlock_irq(&chip->reg_lock); return 0; } /* set up slots and formats for analog OUT */ static int snd_atiixp_playback_prepare(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); unsigned int data; spin_lock_irq(&chip->reg_lock); data = atiixp_read(chip, OUT_DMA_SLOT) & ~ATI_REG_OUT_DMA_SLOT_MASK; switch (substream->runtime->channels) { case 8: data |= ATI_REG_OUT_DMA_SLOT_BIT(10) | ATI_REG_OUT_DMA_SLOT_BIT(11); /* fallthru */ case 6: data |= ATI_REG_OUT_DMA_SLOT_BIT(7) | ATI_REG_OUT_DMA_SLOT_BIT(8); /* fallthru */ case 4: data |= ATI_REG_OUT_DMA_SLOT_BIT(6) | ATI_REG_OUT_DMA_SLOT_BIT(9); /* fallthru */ default: data |= ATI_REG_OUT_DMA_SLOT_BIT(3) | ATI_REG_OUT_DMA_SLOT_BIT(4); break; } /* set output threshold */ data |= 0x04 << ATI_REG_OUT_DMA_THRESHOLD_SHIFT; atiixp_write(chip, OUT_DMA_SLOT, data); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_OUT, substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? ATI_REG_CMD_INTERLEAVE_OUT : 0); /* * enable 6 channel re-ordering bit if needed */ atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN, substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0); spin_unlock_irq(&chip->reg_lock); return 0; } /* set up slots and formats for analog IN */ static int snd_atiixp_capture_prepare(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); spin_lock_irq(&chip->reg_lock); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_IN, substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? ATI_REG_CMD_INTERLEAVE_IN : 0); spin_unlock_irq(&chip->reg_lock); return 0; } /* * hw_params - allocate the buffer and set up buffer descriptors */ static int snd_atiixp_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct atiixp_dma *dma = substream->runtime->private_data; int err; err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); if (err < 0) return err; dma->buf_addr = substream->runtime->dma_addr; dma->buf_bytes = params_buffer_bytes(hw_params); err = atiixp_build_dma_packets(chip, dma, substream, params_periods(hw_params), params_period_bytes(hw_params)); if (err < 0) return err; if (dma->ac97_pcm_type >= 0) { struct ac97_pcm *pcm = chip->pcms[dma->ac97_pcm_type]; /* PCM is bound to AC97 codec(s) * set up the AC97 codecs */ if (dma->pcm_open_flag) { snd_ac97_pcm_close(pcm); dma->pcm_open_flag = 0; } err = snd_ac97_pcm_open(pcm, params_rate(hw_params), params_channels(hw_params), pcm->r[0].slots); if (err >= 0) dma->pcm_open_flag = 1; } return err; } static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct atiixp_dma *dma = substream->runtime->private_data; if (dma->pcm_open_flag) { struct ac97_pcm *pcm = chip->pcms[dma->ac97_pcm_type]; snd_ac97_pcm_close(pcm); dma->pcm_open_flag = 0; } atiixp_clear_dma_packets(chip, dma, substream); snd_pcm_lib_free_pages(substream); return 0; } /* * pcm hardware definition, identical for all DMA types */ static const struct snd_pcm_hardware snd_atiixp_pcm_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, .channels_min = 2, .channels_max = 2, .buffer_bytes_max = 256 * 1024, .period_bytes_min = 32, .period_bytes_max = 128 * 1024, .periods_min = 2, .periods_max = ATI_MAX_DESCRIPTORS, }; static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream, struct atiixp_dma *dma, int pcm_type) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int err; if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) return -EINVAL; if (dma->opened) return -EBUSY; dma->substream = substream; runtime->hw = snd_atiixp_pcm_hw; dma->ac97_pcm_type = pcm_type; if (pcm_type >= 0) { runtime->hw.rates = chip->pcms[pcm_type]->rates; snd_pcm_limit_hw_rates(runtime); } else { /* direct SPDIF */ runtime->hw.formats = SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE; } if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) return err; runtime->private_data = dma; /* enable DMA bits */ spin_lock_irq(&chip->reg_lock); dma->ops->enable_dma(chip, 1); spin_unlock_irq(&chip->reg_lock); dma->opened = 1; return 0; } static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream, struct atiixp_dma *dma) { struct atiixp *chip = snd_pcm_substream_chip(substream); /* disable DMA bits */ if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) return -EINVAL; spin_lock_irq(&chip->reg_lock); dma->ops->enable_dma(chip, 0); spin_unlock_irq(&chip->reg_lock); dma->substream = NULL; dma->opened = 0; return 0; } /* */ static int snd_atiixp_playback_open(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); int err; mutex_lock(&chip->open_mutex); err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0); mutex_unlock(&chip->open_mutex); if (err < 0) return err; substream->runtime->hw.channels_max = chip->max_channels; if (chip->max_channels > 2) /* channels must be even */ snd_pcm_hw_constraint_step(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 2); return 0; } static int snd_atiixp_playback_close(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); int err; mutex_lock(&chip->open_mutex); err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); mutex_unlock(&chip->open_mutex); return err; } static int snd_atiixp_capture_open(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); return snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_CAPTURE], 1); } static int snd_atiixp_capture_close(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); return snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_CAPTURE]); } static int snd_atiixp_spdif_open(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); int err; mutex_lock(&chip->open_mutex); if (chip->spdif_over_aclink) /* share DMA_PLAYBACK */ err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 2); else err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_SPDIF], -1); mutex_unlock(&chip->open_mutex); return err; } static int snd_atiixp_spdif_close(struct snd_pcm_substream *substream) { struct atiixp *chip = snd_pcm_substream_chip(substream); int err; mutex_lock(&chip->open_mutex); if (chip->spdif_over_aclink) err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); else err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_SPDIF]); mutex_unlock(&chip->open_mutex); return err; } /* AC97 playback */ static const struct snd_pcm_ops snd_atiixp_playback_ops = { .open = snd_atiixp_playback_open, .close = snd_atiixp_playback_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_atiixp_pcm_hw_params, .hw_free = snd_atiixp_pcm_hw_free, .prepare = snd_atiixp_playback_prepare, .trigger = snd_atiixp_pcm_trigger, .pointer = snd_atiixp_pcm_pointer, }; /* AC97 capture */ static const struct snd_pcm_ops snd_atiixp_capture_ops = { .open = snd_atiixp_capture_open, .close = snd_atiixp_capture_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_atiixp_pcm_hw_params, .hw_free = snd_atiixp_pcm_hw_free, .prepare = snd_atiixp_capture_prepare, .trigger = snd_atiixp_pcm_trigger, .pointer = snd_atiixp_pcm_pointer, }; /* SPDIF playback */ static const struct snd_pcm_ops snd_atiixp_spdif_ops = { .open = snd_atiixp_spdif_open, .close = snd_atiixp_spdif_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_atiixp_pcm_hw_params, .hw_free = snd_atiixp_pcm_hw_free, .prepare = snd_atiixp_spdif_prepare, .trigger = snd_atiixp_pcm_trigger, .pointer = snd_atiixp_pcm_pointer, }; static const struct ac97_pcm atiixp_pcm_defs[] = { /* front PCM */ { .exclusive = 1, .r = { { .slots = (1 << AC97_SLOT_PCM_LEFT) | (1 << AC97_SLOT_PCM_RIGHT) | (1 << AC97_SLOT_PCM_CENTER) | (1 << AC97_SLOT_PCM_SLEFT) | (1 << AC97_SLOT_PCM_SRIGHT) | (1 << AC97_SLOT_LFE) } } }, /* PCM IN #1 */ { .stream = 1, .exclusive = 1, .r = { { .slots = (1 << AC97_SLOT_PCM_LEFT) | (1 << AC97_SLOT_PCM_RIGHT) } } }, /* S/PDIF OUT (optional) */ { .exclusive = 1, .spdif = 1, .r = { { .slots = (1 << AC97_SLOT_SPDIF_LEFT2) | (1 << AC97_SLOT_SPDIF_RIGHT2) } } }, }; static const struct atiixp_dma_ops snd_atiixp_playback_dma_ops = { .type = ATI_DMA_PLAYBACK, .llp_offset = ATI_REG_OUT_DMA_LINKPTR, .dt_cur = ATI_REG_OUT_DMA_DT_CUR, .enable_dma = atiixp_out_enable_dma, .enable_transfer = atiixp_out_enable_transfer, .flush_dma = atiixp_out_flush_dma, }; static const struct atiixp_dma_ops snd_atiixp_capture_dma_ops = { .type = ATI_DMA_CAPTURE, .llp_offset = ATI_REG_IN_DMA_LINKPTR, .dt_cur = ATI_REG_IN_DMA_DT_CUR, .enable_dma = atiixp_in_enable_dma, .enable_transfer = atiixp_in_enable_transfer, .flush_dma = atiixp_in_flush_dma, }; static const struct atiixp_dma_ops snd_atiixp_spdif_dma_ops = { .type = ATI_DMA_SPDIF, .llp_offset = ATI_REG_SPDF_DMA_LINKPTR, .dt_cur = ATI_REG_SPDF_DMA_DT_CUR, .enable_dma = atiixp_spdif_enable_dma, .enable_transfer = atiixp_spdif_enable_transfer, .flush_dma = atiixp_spdif_flush_dma, }; static int snd_atiixp_pcm_new(struct atiixp *chip) { struct snd_pcm *pcm; struct snd_pcm_chmap *chmap; struct snd_ac97_bus *pbus = chip->ac97_bus; int err, i, num_pcms; /* initialize constants */ chip->dmas[ATI_DMA_PLAYBACK].ops = &snd_atiixp_playback_dma_ops; chip->dmas[ATI_DMA_CAPTURE].ops = &snd_atiixp_capture_dma_ops; if (! chip->spdif_over_aclink) chip->dmas[ATI_DMA_SPDIF].ops = &snd_atiixp_spdif_dma_ops; /* assign AC97 pcm */ if (chip->spdif_over_aclink) num_pcms = 3; else num_pcms = 2; err = snd_ac97_pcm_assign(pbus, num_pcms, atiixp_pcm_defs); if (err < 0) return err; for (i = 0; i < num_pcms; i++) chip->pcms[i] = &pbus->pcms[i]; chip->max_channels = 2; if (pbus->pcms[ATI_PCM_OUT].r[0].slots & (1 << AC97_SLOT_PCM_SLEFT)) { if (pbus->pcms[ATI_PCM_OUT].r[0].slots & (1 << AC97_SLOT_LFE)) chip->max_channels = 6; else chip->max_channels = 4; } /* PCM #0: analog I/O */ err = snd_pcm_new(chip->card, "ATI IXP AC97", ATI_PCMDEV_ANALOG, 1, 1, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_atiixp_capture_ops); pcm->private_data = chip; strcpy(pcm->name, "ATI IXP AC97"); chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 64*1024, 128*1024); err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_pcm_alt_chmaps, chip->max_channels, 0, &chmap); if (err < 0) return err; chmap->channel_mask = SND_PCM_CHMAP_MASK_2468; chip->ac97[0]->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap; /* no SPDIF support on codec? */ if (chip->pcms[ATI_PCM_SPDIF] && ! chip->pcms[ATI_PCM_SPDIF]->rates) return 0; /* FIXME: non-48k sample rate doesn't work on my test machine with AD1888 */ if (chip->pcms[ATI_PCM_SPDIF]) chip->pcms[ATI_PCM_SPDIF]->rates = SNDRV_PCM_RATE_48000; /* PCM #1: spdif playback */ err = snd_pcm_new(chip->card, "ATI IXP IEC958", ATI_PCMDEV_DIGITAL, 1, 0, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_spdif_ops); pcm->private_data = chip; if (chip->spdif_over_aclink) strcpy(pcm->name, "ATI IXP IEC958 (AC97)"); else strcpy(pcm->name, "ATI IXP IEC958 (Direct)"); chip->pcmdevs[ATI_PCMDEV_DIGITAL] = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 64*1024, 128*1024); /* pre-select AC97 SPDIF slots 10/11 */ for (i = 0; i < NUM_ATI_CODECS; i++) { if (chip->ac97[i]) snd_ac97_update_bits(chip->ac97[i], AC97_EXTENDED_STATUS, 0x03 << 4, 0x03 << 4); } return 0; } /* * interrupt handler */ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id) { struct atiixp *chip = dev_id; unsigned int status; status = atiixp_read(chip, ISR); if (! status) return IRQ_NONE; /* process audio DMA */ if (status & ATI_REG_ISR_OUT_XRUN) snd_atiixp_xrun_dma(chip, &chip->dmas[ATI_DMA_PLAYBACK]); else if (status & ATI_REG_ISR_OUT_STATUS) snd_atiixp_update_dma(chip, &chip->dmas[ATI_DMA_PLAYBACK]); if (status & ATI_REG_ISR_IN_XRUN) snd_atiixp_xrun_dma(chip, &chip->dmas[ATI_DMA_CAPTURE]); else if (status & ATI_REG_ISR_IN_STATUS) snd_atiixp_update_dma(chip, &chip->dmas[ATI_DMA_CAPTURE]); if (! chip->spdif_over_aclink) { if (status & ATI_REG_ISR_SPDF_XRUN) snd_atiixp_xrun_dma(chip, &chip->dmas[ATI_DMA_SPDIF]); else if (status & ATI_REG_ISR_SPDF_STATUS) snd_atiixp_update_dma(chip, &chip->dmas[ATI_DMA_SPDIF]); } /* for codec detection */ if (status & CODEC_CHECK_BITS) { unsigned int detected; detected = status & CODEC_CHECK_BITS; spin_lock(&chip->reg_lock); chip->codec_not_ready_bits |= detected; atiixp_update(chip, IER, detected, 0); /* disable the detected irqs */ spin_unlock(&chip->reg_lock); } /* ack */ atiixp_write(chip, ISR, status); return IRQ_HANDLED; } /* * ac97 mixer section */ static const struct ac97_quirk ac97_quirks[] = { { .subvendor = 0x103c, .subdevice = 0x006b, .name = "HP Pavilion ZV5030US", .type = AC97_TUNE_MUTE_LED }, { .subvendor = 0x103c, .subdevice = 0x308b, .name = "HP nx6125", .type = AC97_TUNE_MUTE_LED }, { .subvendor = 0x103c, .subdevice = 0x3091, .name = "unknown HP", .type = AC97_TUNE_MUTE_LED }, { } /* terminator */ }; static int snd_atiixp_mixer_new(struct atiixp *chip, int clock, const char *quirk_override) { struct snd_ac97_bus *pbus; struct snd_ac97_template ac97; int i, err; int codec_count; static struct snd_ac97_bus_ops ops = { .write = snd_atiixp_ac97_write, .read = snd_atiixp_ac97_read, }; static unsigned int codec_skip[NUM_ATI_CODECS] = { ATI_REG_ISR_CODEC0_NOT_READY, ATI_REG_ISR_CODEC1_NOT_READY, ATI_REG_ISR_CODEC2_NOT_READY, }; if (snd_atiixp_codec_detect(chip) < 0) return -ENXIO; if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) return err; pbus->clock = clock; chip->ac97_bus = pbus; codec_count = 0; for (i = 0; i < NUM_ATI_CODECS; i++) { if (chip->codec_not_ready_bits & codec_skip[i]) continue; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; ac97.pci = chip->pci; ac97.num = i; ac97.scaps = AC97_SCAP_SKIP_MODEM | AC97_SCAP_POWER_SAVE; if (! chip->spdif_over_aclink) ac97.scaps |= AC97_SCAP_NO_SPDIF; if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { chip->ac97[i] = NULL; /* to be sure */ dev_dbg(chip->card->dev, "codec %d not available for audio\n", i); continue; } codec_count++; } if (! codec_count) { dev_err(chip->card->dev, "no codec available\n"); return -ENODEV; } snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override); return 0; } #ifdef CONFIG_PM_SLEEP /* * power management */ static int snd_atiixp_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct atiixp *chip = card->private_data; int i; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); for (i = 0; i < NUM_ATI_PCMDEVS; i++) if (chip->pcmdevs[i]) { struct atiixp_dma *dma = &chip->dmas[i]; if (dma->substream && dma->running) dma->saved_curptr = readl(chip->remap_addr + dma->ops->dt_cur); snd_pcm_suspend_all(chip->pcmdevs[i]); } for (i = 0; i < NUM_ATI_CODECS; i++) snd_ac97_suspend(chip->ac97[i]); snd_atiixp_aclink_down(chip); snd_atiixp_chip_stop(chip); return 0; } static int snd_atiixp_resume(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct atiixp *chip = card->private_data; int i; snd_atiixp_aclink_reset(chip); snd_atiixp_chip_start(chip); for (i = 0; i < NUM_ATI_CODECS; i++) snd_ac97_resume(chip->ac97[i]); for (i = 0; i < NUM_ATI_PCMDEVS; i++) if (chip->pcmdevs[i]) { struct atiixp_dma *dma = &chip->dmas[i]; if (dma->substream && dma->suspended) { dma->ops->enable_dma(chip, 1); dma->substream->ops->prepare(dma->substream); writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, chip->remap_addr + dma->ops->llp_offset); writel(dma->saved_curptr, chip->remap_addr + dma->ops->dt_cur); } } snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume); #define SND_ATIIXP_PM_OPS &snd_atiixp_pm #else #define SND_ATIIXP_PM_OPS NULL #endif /* CONFIG_PM_SLEEP */ /* * proc interface for register dump */ static void snd_atiixp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct atiixp *chip = entry->private_data; int i; for (i = 0; i < 256; i += 4) snd_iprintf(buffer, "%02x: %08x\n", i, readl(chip->remap_addr + i)); } static void snd_atiixp_proc_init(struct atiixp *chip) { struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "atiixp", &entry)) snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); } /* * destructor */ static int snd_atiixp_free(struct atiixp *chip) { if (chip->irq < 0) goto __hw_end; snd_atiixp_chip_stop(chip); __hw_end: if (chip->irq >= 0) free_irq(chip->irq, chip); iounmap(chip->remap_addr); pci_release_regions(chip->pci); pci_disable_device(chip->pci); kfree(chip); return 0; } static int snd_atiixp_dev_free(struct snd_device *device) { struct atiixp *chip = device->device_data; return snd_atiixp_free(chip); } /* * constructor for chip instance */ static int snd_atiixp_create(struct snd_card *card, struct pci_dev *pci, struct atiixp **r_chip) { static struct snd_device_ops ops = { .dev_free = snd_atiixp_dev_free, }; struct atiixp *chip; int err; if ((err = pci_enable_device(pci)) < 0) return err; chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (chip == NULL) { pci_disable_device(pci); return -ENOMEM; } spin_lock_init(&chip->reg_lock); mutex_init(&chip->open_mutex); chip->card = card; chip->pci = pci; chip->irq = -1; if ((err = pci_request_regions(pci, "ATI IXP AC97")) < 0) { pci_disable_device(pci); kfree(chip); return err; } chip->addr = pci_resource_start(pci, 0); chip->remap_addr = pci_ioremap_bar(pci, 0); if (chip->remap_addr == NULL) { dev_err(card->dev, "AC'97 space ioremap problem\n"); snd_atiixp_free(chip); return -EIO; } if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) { dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); snd_atiixp_free(chip); return -EBUSY; } chip->irq = pci->irq; pci_set_master(pci); synchronize_irq(chip->irq); if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_atiixp_free(chip); return err; } *r_chip = chip; return 0; } static int snd_atiixp_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { struct snd_card *card; struct atiixp *chip; int err; err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); if (err < 0) return err; strcpy(card->driver, spdif_aclink ? "ATIIXP" : "ATIIXP-SPDMA"); strcpy(card->shortname, "ATI IXP"); if ((err = snd_atiixp_create(card, pci, &chip)) < 0) goto __error; card->private_data = chip; if ((err = snd_atiixp_aclink_reset(chip)) < 0) goto __error; chip->spdif_over_aclink = spdif_aclink; if ((err = snd_atiixp_mixer_new(chip, ac97_clock, ac97_quirk)) < 0) goto __error; if ((err = snd_atiixp_pcm_new(chip)) < 0) goto __error; snd_atiixp_proc_init(chip); snd_atiixp_chip_start(chip); snprintf(card->longname, sizeof(card->longname), "%s rev %x with %s at %#lx, irq %i", card->shortname, pci->revision, chip->ac97[0] ? snd_ac97_get_short_name(chip->ac97[0]) : "?", chip->addr, chip->irq); if ((err = snd_card_register(card)) < 0) goto __error; pci_set_drvdata(pci, card); return 0; __error: snd_card_free(card); return err; } static void snd_atiixp_remove(struct pci_dev *pci) { snd_card_free(pci_get_drvdata(pci)); } static struct pci_driver atiixp_driver = { .name = KBUILD_MODNAME, .id_table = snd_atiixp_ids, .probe = snd_atiixp_probe, .remove = snd_atiixp_remove, .driver = { .pm = SND_ATIIXP_PM_OPS, }, }; module_pci_driver(atiixp_driver);
{ "pile_set_name": "Github" }
๏ปฟ<!DOCTYPE html> <!--[if IE]><![endif]--> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Class VerticalAligmentExtensions </title> <meta name="viewport" content="width=device-width"> <meta name="title" content="Class VerticalAligmentExtensions "> <meta name="generator" content="docfx 2.48.0.0"> <link rel="shortcut icon" href="../images/favicon.ico"> <link rel="stylesheet" href="../styles/docfx.vendor.css"> <link rel="stylesheet" href="../styles/docfx.css"> <link rel="stylesheet" href="../styles/main.css"> <meta property="docfx:navrel" content="../toc.html"> <meta property="docfx:tocrel" content="toc.html"> <meta property="docfx:rel" content="../"> </head> <body data-spy="scroll" data-target="#affix" data-offset="120"> <div id="wrapper"> <header> <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"> <img id="logo" class="svg" src="../images/logo.svg" alt=""> </a> </div> <div class="collapse navbar-collapse" id="navbar"> <form class="navbar-form navbar-right" role="search" id="search"> <div class="form-group"> <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> </div> </form> </div> </div> </nav> <div class="subnav navbar navbar-default"> <div class="container hide-when-search" id="breadcrumb"> <ul class="breadcrumb"> <li></li> </ul> </div> </div> </header> <div class="container body-content"> <div id="search-results"> <div class="search-list"></div> <div class="sr-items"> <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> </div> <ul id="pagination"></ul> </div> </div> <div role="main" class="container body-content hide-when-search"> <div class="sidenav hide-when-search"> <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> <div class="sidetoggle collapse" id="sidetoggle"> <div id="sidetoc"></div> </div> </div> <div class="article row grid-right"> <div class="col-md-10"> <article class="content wrap" id="_content" data-uid="Mapsui.Rendering.Xaml.VerticalAligmentExtensions"> <h1 id="Mapsui_Rendering_Xaml_VerticalAligmentExtensions" data-uid="Mapsui.Rendering.Xaml.VerticalAligmentExtensions" class="text-break">Class VerticalAligmentExtensions </h1> <div class="markdown level0 summary"></div> <div class="markdown level0 conceptual"></div> <div class="inheritance"> <h5>Inheritance</h5> <div class="level0"><span class="xref">System.Object</span></div> <div class="level1"><span class="xref">VerticalAligmentExtensions</span></div> </div> <div class="inheritedMembers"> <h5>Inherited Members</h5> <div> <span class="xref">System.Object.ToString()</span> </div> <div> <span class="xref">System.Object.Equals(System.Object)</span> </div> <div> <span class="xref">System.Object.Equals(System.Object, System.Object)</span> </div> <div> <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span> </div> <div> <span class="xref">System.Object.GetHashCode()</span> </div> <div> <span class="xref">System.Object.GetType()</span> </div> <div> <span class="xref">System.Object.MemberwiseClone()</span> </div> </div> <h6><strong>Namespace</strong>: <a class="xref" href="Mapsui.Rendering.Xaml.html">Mapsui.Rendering.Xaml</a></h6> <h6><strong>Assembly</strong>: Mapsui.Rendering.Xaml.dll</h6> <h5 id="Mapsui_Rendering_Xaml_VerticalAligmentExtensions_syntax">Syntax</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public static class VerticalAligmentExtensions</code></pre> </div> <h3 id="methods">Methods </h3> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Rendering_Xaml_VerticalAligmentExtensions_ToXaml_Mapsui_Widgets_VerticalAlignment_.md&amp;value=---%0Auid%3A%20Mapsui.Rendering.Xaml.VerticalAligmentExtensions.ToXaml(Mapsui.Widgets.VerticalAlignment)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Rendering.Xaml/ExtensionMethods/VerticalAlignment.cs/#L8">View Source</a> </span> <a id="Mapsui_Rendering_Xaml_VerticalAligmentExtensions_ToXaml_" data-uid="Mapsui.Rendering.Xaml.VerticalAligmentExtensions.ToXaml*"></a> <h4 id="Mapsui_Rendering_Xaml_VerticalAligmentExtensions_ToXaml_Mapsui_Widgets_VerticalAlignment_" data-uid="Mapsui.Rendering.Xaml.VerticalAligmentExtensions.ToXaml(Mapsui.Widgets.VerticalAlignment)">ToXaml(VerticalAlignment)</h4> <div class="markdown level1 summary"></div> <div class="markdown level1 conceptual"></div> <h5 class="decalaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public static VerticalAlignment ToXaml(this VerticalAlignment verticalAlignment)</code></pre> </div> <h5 class="parameters">Parameters</h5> <table class="table table-bordered table-striped table-condensed"> <thead> <tr> <th>Type</th> <th>Name</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="Mapsui.Widgets.VerticalAlignment.html">VerticalAlignment</a></td> <td><span class="parametername">verticalAlignment</span></td> <td></td> </tr> </tbody> </table> <h5 class="returns">Returns</h5> <table class="table table-bordered table-striped table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><span class="xref">System.Windows.VerticalAlignment</span></td> <td></td> </tr> </tbody> </table> </article> </div> <div class="hidden-sm col-md-2" role="complementary"> <div class="sideaffix"> <div class="contribution"> <ul class="nav"> <li> <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=Mapsui_Rendering_Xaml_VerticalAligmentExtensions.md&amp;value=---%0Auid%3A%20Mapsui.Rendering.Xaml.VerticalAligmentExtensions%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a> </li> <li> <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui.Rendering.Xaml/ExtensionMethods/VerticalAlignment.cs/#L6" class="contribution-link">View Source</a> </li> </ul> </div> <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> </nav> </div> </div> </div> </div> <footer> <div class="grad-bottom"></div> <div class="footer"> <div class="container"> <span class="pull-right"> <a href="#top">Back to top</a> </span> <span>Generated by <strong>DocFX</strong></span> </div> </div> </footer> </div> <script type="text/javascript" src="../styles/docfx.vendor.js"></script> <script type="text/javascript" src="../styles/docfx.js"></script> <script type="text/javascript" src="../styles/main.js"></script> </body> </html>
{ "pile_set_name": "Github" }
{ "name": "c-component", "repo": "webpack/c-component", "version": "0.0.1", "scripts": ["main.js"], "main": "main.js", "dependencies": { "webpack/a-component": "*" }, "license": "MIT" }
{ "pile_set_name": "Github" }
# 2010 April 13 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing the operation of "blocking-checkpoint" # operations. # set testdir [file dirname $argv0] source $testdir/tester.tcl source $testdir/lock_common.tcl source $testdir/wal_common.tcl ifcapable !wal {finish_test ; return } do_not_use_codec set testprefix wal5 proc db_page_count {{file test.db}} { expr [file size $file] / 1024 } proc wal_page_count {{file test.db}} { wal_frame_count ${file}-wal 1024 } # A checkpoint may be requested either using the C API or by executing # an SQL PRAGMA command. To test both methods, all tests in this file are # run twice - once using each method to request checkpoints. # foreach {testprefix do_wal_checkpoint} { wal5-pragma { proc do_wal_checkpoint { dbhandle args } { array set a $args foreach key [array names a] { if {[lsearch {-mode -db} $key]<0} { error "unknown switch: $key" } } set sql "PRAGMA " if {[info exists a(-db)]} { append sql "$a(-db)." } append sql "wal_checkpoint" if {[info exists a(-mode)]} { append sql " = $a(-mode)" } uplevel [list $dbhandle eval $sql] } } wal5-capi { proc do_wal_checkpoint { dbhandle args } { set a(-mode) passive array set a $args foreach key [array names a] { if {[lsearch {-mode -db} $key]<0} { error "unknown switch: $key" } } set vals {restart full truncate} if {[lsearch -exact $vals $a(-mode)]<0} { set a(-mode) passive } set cmd [list sqlite3_wal_checkpoint_v2 $dbhandle $a(-mode)] if {[info exists a(-db)]} { lappend sql $a(-db) } uplevel $cmd } } } { eval $do_wal_checkpoint do_multiclient_test tn { set ::nBusyHandler 0 set ::busy_handler_script "" proc busyhandler {n} { incr ::nBusyHandler eval $::busy_handler_script return 0 } proc reopen_all {} { code1 {db close} code2 {db2 close} code3 {db3 close} code1 {sqlite3 db test.db} code2 {sqlite3 db2 test.db} code3 {sqlite3 db3 test.db} sql1 { PRAGMA synchronous = NORMAL } code1 { db busy busyhandler } } do_test 1.$tn.1 { reopen_all sql1 { PRAGMA page_size = 1024; PRAGMA auto_vacuum = 0; CREATE TABLE t1(x, y); PRAGMA journal_mode = WAL; INSERT INTO t1 VALUES(1, zeroblob(1200)); INSERT INTO t1 VALUES(2, zeroblob(1200)); INSERT INTO t1 VALUES(3, zeroblob(1200)); } expr [file size test.db] / 1024 } {2} # Have connection 2 grab a read-lock on the current snapshot. do_test 1.$tn.2 { sql2 { BEGIN; SELECT x FROM t1 } } {1 2 3} # Attempt a checkpoint. do_test 1.$tn.3 { code1 { do_wal_checkpoint db } list [db_page_count] [wal_page_count] } {5 9} # Write to the db again. The log cannot wrap because of the lock still # held by connection 2. The busy-handler has not yet been invoked. do_test 1.$tn.4 { sql1 { INSERT INTO t1 VALUES(4, zeroblob(1200)) } list [db_page_count] [wal_page_count] $::nBusyHandler } {5 12 0} # Now do a blocking-checkpoint. Set the busy-handler up so that connection # 2 releases its lock on the 6th invocation. The checkpointer should then # proceed to checkpoint the entire log file. Next write should go to the # start of the log file. # set ::busy_handler_script { if {$n==5} { sql2 COMMIT } } do_test 1.$tn.5 { code1 { do_wal_checkpoint db -mode restart } list [db_page_count] [wal_page_count] $::nBusyHandler } {6 12 6} do_test 1.$tn.6 { set ::nBusyHandler 0 sql1 { INSERT INTO t1 VALUES(5, zeroblob(1200)) } list [db_page_count] [wal_page_count] $::nBusyHandler } {6 12 0} do_test 1.$tn.7 { reopen_all list [db_page_count] [wal_page_count] $::nBusyHandler } [expr {[nonzero_reserved_bytes]?"/# # 0/":"7 0 0"}] do_test 1.$tn.8 { sql2 { BEGIN ; SELECT x FROM t1 } } {1 2 3 4 5} do_test 1.$tn.9 { sql1 { INSERT INTO t1 VALUES(6, zeroblob(1200)) } list [db_page_count] [wal_page_count] $::nBusyHandler } [expr {[nonzero_reserved_bytes]?"/# # #/":"7 5 0"}] do_test 1.$tn.10 { sql3 { BEGIN ; SELECT x FROM t1 } } {1 2 3 4 5 6} set ::busy_handler_script { if {$n==5} { sql2 COMMIT } if {$n==6} { set ::db_file_size [db_page_count] } if {$n==7} { sql3 COMMIT } } do_test 1.$tn.11 { code1 { do_wal_checkpoint db -mode restart } list [db_page_count] [wal_page_count] $::nBusyHandler } [expr {[nonzero_reserved_bytes]?"/# # #/":"10 5 8"}] do_test 1.$tn.12 { set ::db_file_size } 10 } #------------------------------------------------------------------------- # This block of tests explores checkpoint operations on more than one # database file. # proc setup_and_attach_aux {} { sql1 { ATTACH 'test.db2' AS aux } sql2 { ATTACH 'test.db2' AS aux } sql3 { ATTACH 'test.db2' AS aux } sql1 { PRAGMA aux.auto_vacuum = 0; PRAGMA main.auto_vacuum = 0; PRAGMA main.page_size=1024; PRAGMA main.journal_mode=WAL; PRAGMA aux.page_size=1024; PRAGMA aux.journal_mode=WAL; } } proc file_page_counts {} { list [db_page_count test.db ] \ [wal_page_count test.db ] \ [db_page_count test.db2] \ [wal_page_count test.db2] } # Test that executing "PRAGMA wal_checkpoint" checkpoints all attached # databases, not just the main db. In capi mode, check that this is # true if a NULL pointer is passed to wal_checkpoint_v2() in place of a # database name. do_multiclient_test tn { setup_and_attach_aux do_test 2.1.$tn.1 { sql1 { CREATE TABLE t1(a, b); INSERT INTO t1 VALUES(1, 2); CREATE TABLE aux.t2(a, b); INSERT INTO t2 VALUES(1, 2); } } {} do_test 2.2.$tn.2 { file_page_counts } {1 3 1 3} do_test 2.1.$tn.3 { code1 { do_wal_checkpoint db } } {0 3 3} do_test 2.1.$tn.4 { file_page_counts } {2 3 2 3} } do_multiclient_test tn { setup_and_attach_aux do_test 2.2.$tn.1 { execsql { CREATE TABLE t1(a, b); INSERT INTO t1 VALUES(1, 2); CREATE TABLE aux.t2(a, b); INSERT INTO t2 VALUES(1, 2); INSERT INTO t2 VALUES(3, 4); } } {} do_test 2.2.$tn.2 { file_page_counts } {1 3 1 4} do_test 2.2.$tn.3 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2} do_test 2.2.$tn.4 { code1 { do_wal_checkpoint db -mode restart } } {1 3 3} do_test 2.2.$tn.5 { file_page_counts } {2 3 2 4} } do_multiclient_test tn { setup_and_attach_aux do_test 2.3.$tn.1 { execsql { CREATE TABLE t1(a, b); INSERT INTO t1 VALUES(1, 2); CREATE TABLE aux.t2(a, b); INSERT INTO t2 VALUES(1, 2); } } {} do_test 2.3.$tn.2 { file_page_counts } {1 3 1 3} do_test 2.3.$tn.3 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2} do_test 2.3.$tn.4 { sql1 { INSERT INTO t1 VALUES(3, 4) } } {} do_test 2.3.$tn.5 { sql1 { INSERT INTO t2 VALUES(3, 4) } } {} do_test 2.3.$tn.6 { file_page_counts } {1 4 1 4} do_test 2.3.$tn.7 { code1 { do_wal_checkpoint db -mode full } } {1 4 3} # The checkpoint above only writes page 1 of the db file. The other # page (page 2) is locked by the read-transaction opened by the # [sql2] commmand above. So normally, the db is 1 page in size here. # However, in mmap() mode, the db is pre-allocated to 2 pages at the # start of the checkpoint, even though page 2 cannot be written. set nDb 2 if {[permutation]!="mmap"} {set nDb 1} ifcapable !mmap {set nDb 1} do_test 2.3.$tn.8 { file_page_counts } [list $nDb 4 2 4] } # Check that checkpoints block on the correct locks. And respond correctly # if they cannot obtain those locks. There are three locks that a checkpoint # may block on (in the following order): # # 1. The writer lock: FULL and RESTART checkpoints block until any writer # process releases its lock. # # 2. Readers using part of the log file. FULL and RESTART checkpoints block # until readers using part (but not all) of the log file have finished. # # 3. Readers using any of the log file. After copying data into the # database file, RESTART checkpoints block until readers using any part # of the log file have finished. # # This test case involves running a checkpoint while there exist other # processes holding all three types of locks. # foreach {tn1 checkpoint busy_on ckpt_expected expected} { 1 PASSIVE - {0 3 3} - 2 TYPO - {0 3 3} - 3 FULL - {0 4 4} 2 4 FULL 1 {1 3 3} 1 5 FULL 2 {1 4 3} 2 6 FULL 3 {0 4 4} 2 7 RESTART - {0 4 4} 3 8 RESTART 1 {1 3 3} 1 9 RESTART 2 {1 4 3} 2 10 RESTART 3 {1 4 4} 3 11 TRUNCATE - {0 0 0} 3 12 TRUNCATE 1 {1 3 3} 1 13 TRUNCATE 2 {1 4 3} 2 14 TRUNCATE 3 {1 4 4} 3 } { do_multiclient_test tn { setup_and_attach_aux proc busyhandler {x} { set ::max_busyhandler $x if {$::busy_on!="-" && $x==$::busy_on} { return 1 } switch -- $x { 1 { sql2 "COMMIT ; BEGIN ; SELECT * FROM t1" } 2 { sql3 "COMMIT" } 3 { sql2 "COMMIT" } } return 0 } set ::max_busyhandler - do_test 2.4.$tn1.$tn.1 { sql1 { CREATE TABLE t1(a, b); INSERT INTO t1 VALUES(1, 2); } sql2 { BEGIN; INSERT INTO t1 VALUES(3, 4) } sql3 { BEGIN; SELECT * FROM t1 } } {1 2} do_test 2.4.$tn1.$tn.2 { code1 { db busy busyhandler } code1 { do_wal_checkpoint db -mode [string tolower $checkpoint] } } $ckpt_expected do_test 2.4.$tn1.$tn.3 { set ::max_busyhandler } $expected } } do_multiclient_test tn { code1 $do_wal_checkpoint code2 $do_wal_checkpoint code3 $do_wal_checkpoint do_test 3.$tn.1 { sql1 { PRAGMA auto_vacuum = 0; PRAGMA journal_mode = WAL; PRAGMA synchronous = normal; CREATE TABLE t1(x, y); } sql2 { PRAGMA journal_mode } sql3 { PRAGMA journal_mode } } {wal} do_test 3.$tn.2 { code2 { do_wal_checkpoint db2 } } {0 2 2} do_test 3.$tn.3 { code2 { do_wal_checkpoint db2 } } {0 2 2} do_test 3.$tn.4 { code3 { do_wal_checkpoint db3 } } {0 2 2} code1 {db close} code2 {db2 close} code3 {db3 close} code1 {sqlite3 db test.db} code2 {sqlite3 db2 test.db} code3 {sqlite3 db3 test.db} do_test 3.$tn.5 { sql3 { PRAGMA journal_mode } } {wal} do_test 3.$tn.6 { code3 { do_wal_checkpoint db3 } } {0 0 0} } # Test SQLITE_CHECKPOINT_TRUNCATE. # do_multiclient_test tn { code1 $do_wal_checkpoint code2 $do_wal_checkpoint code3 $do_wal_checkpoint do_test 4.$tn.1 { sql1 { PRAGMA page_size = 1024; PRAGMA auto_vacuum = 0; PRAGMA journal_mode = WAL; PRAGMA synchronous = normal; CREATE TABLE t1(x, y); CREATE INDEX i1 ON t1(x, y); INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(3, 4); } file size test.db-wal } [wal_file_size 8 1024] do_test 4.$tn.2 { do_wal_checkpoint db -mode truncate } {0 0 0} do_test 4.$tn.3 { file size test.db-wal } 0 do_test 4.$tn.4 { sql2 { SELECT * FROM t1 } } {1 2 3 4} do_test 4.$tn.5 { sql2 { INSERT INTO t1 VALUES('a', 'b') } file size test.db-wal } [wal_file_size 2 1024] } # Test that FULL, RESTART and TRUNCATE callbacks block on other clients # and truncate the wal file as required even if the entire wal file has # already been checkpointed when they are invoked. # do_multiclient_test tn { code1 $do_wal_checkpoint code2 $do_wal_checkpoint code3 $do_wal_checkpoint do_test 5.$tn.1 { sql1 { PRAGMA page_size = 1024; PRAGMA auto_vacuum = 0; PRAGMA journal_mode = WAL; PRAGMA synchronous = normal; CREATE TABLE t1(x, y); CREATE INDEX i1 ON t1(x, y); INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(3, 4); INSERT INTO t1 VALUES(5, 6); } file size test.db-wal } [wal_file_size 10 1024] do_test 5.$tn.2 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2 3 4 5 6} do_test 5.$tn.3 { do_wal_checkpoint db -mode passive } {0 10 10} do_test 5.$tn.4 { sql3 { BEGIN; INSERT INTO t1 VALUES(7, 8); } } {} do_test 5.$tn.5 { do_wal_checkpoint db -mode passive } {0 10 10} do_test 5.$tn.6 { do_wal_checkpoint db -mode full } {1 10 10} do_test 5.$tn.7 { sql3 { ROLLBACK } } {} do_test 5.$tn.8 { do_wal_checkpoint db -mode full } {0 10 10} do_test 5.$tn.9 { do_wal_checkpoint db -mode truncate } {1 10 10} do_test 5.$tn.10 { file size test.db-wal } [wal_file_size 10 1024] proc xBusyHandler {n} { sql2 { COMMIT } ; return 0 } db busy xBusyHandler do_test 5.$tn.11 { do_wal_checkpoint db -mode truncate } {0 0 0} do_test 5.$tn.12 { file size test.db-wal } 0 do_test 5.$tn.13 { sql1 { INSERT INTO t1 VALUES(7, 8); INSERT INTO t1 VALUES(9, 10); SELECT * FROM t1; } } {1 2 3 4 5 6 7 8 9 10} do_test 5.$tn.14 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2 3 4 5 6 7 8 9 10} proc xBusyHandler {n} { return 1 } do_test 5.$tn.15 { do_wal_checkpoint db -mode truncate } {1 4 4} do_test 5.$tn.16 { file size test.db-wal } [wal_file_size 4 1024] do_test 5.$tn.17 { do_wal_checkpoint db -mode restart } {1 4 4} proc xBusyHandler {n} { sql2 { COMMIT } ; return 0 } db busy xBusyHandler do_test 5.$tn.18 { do_wal_checkpoint db -mode restart } {0 4 4} do_test 5.$tn.19 { file size test.db-wal } [wal_file_size 4 1024] do_test 5.$tn.20 { do_wal_checkpoint db -mode truncate } {0 0 0} do_test 5.$tn.21 { file size test.db-wal } 0 } } finish_test
{ "pile_set_name": "Github" }
function Resolve-PathEx { <# .SYNOPSIS Resolves the wildcard characters in a path, and displays the path contents, ignoring non-existent paths. .DESCRIPTION The Resolve-Path cmdlet interprets the wildcard characters in a path and displays the items and containers at the location specified by the path, such as the files and folders or registry keys and subkeys. #> [CmdletBinding()] [OutputType([System.String])] param ( [Parameter(Mandatory)] [System.String] $Path ) process { try { $expandedPath = [System.Environment]::ExpandEnvironmentVariables($Path); $resolvedPath = Resolve-Path -Path $expandedPath -ErrorAction Stop; $Path = $resolvedPath.ProviderPath; } catch [System.Management.Automation.ItemNotFoundException] { $Path = [System.Environment]::ExpandEnvironmentVariables($_.TargetObject); $Error.Remove($Error[-1]); } return $Path; } #end process } #end function
{ "pile_set_name": "Github" }
github: wooorm
{ "pile_set_name": "Github" }
import IdeaPermissions from "../../web/static/js/services/idea_permissions" describe("IdeaPermissions", () => { describe(".canUserEditContents", () => { context("when the user authored the idea", () => { context("and is not the facilitator", () => { const user = { id: 56, is_facilitator: false, } const idea = { user_id: 56, } it("returns true", () => { expect( IdeaPermissions.canUserEditContents(idea, user) ).to.be.true }) }) }) context("when the user didn't author the idea", () => { context("and isn't the facilitator", () => { const user = { id: 56, is_facilitator: false, } const idea = { user_id: 61, } it("returns false", () => { expect( IdeaPermissions.canUserEditContents(idea, user) ).to.be.false }) }) context("but is the facilitator", () => { const user = { id: 56, is_facilitator: true, } const idea = { user_id: 61, } it("returns true", () => { expect( IdeaPermissions.canUserEditContents(idea, user) ).to.be.true }) }) }) }) })
{ "pile_set_name": "Github" }
package com.zdcf.dao; import com.zdcf.model.TwitterUser; import com.zdcf.model.TwitterUserExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface TwitterUserMapper { int countByExample(TwitterUserExample example); int deleteByExample(TwitterUserExample example); int deleteByPrimaryKey(Long id); int insert(TwitterUser record); int insertSelective(TwitterUser record); List<TwitterUser> selectByExample(TwitterUserExample example); TwitterUser selectByPrimaryKey(Long id); int updateByExampleSelective(@Param("record") TwitterUser record, @Param("example") TwitterUserExample example); int updateByExample(@Param("record") TwitterUser record, @Param("example") TwitterUserExample example); int updateByPrimaryKeySelective(TwitterUser record); int updateByPrimaryKey(TwitterUser record); }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. * * You may not modify, use, reproduce, or distribute this software except in * compliance with the terms of the License at: * https://github.com/javaee/tutorial-examples/LICENSE.txt */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaeetutorial.dukestutoring.ejb; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javaeetutorial.dukestutoring.entity.Guardian; import javaeetutorial.dukestutoring.entity.Guardian_; import javaeetutorial.dukestutoring.entity.StatusEntry; import javaeetutorial.dukestutoring.entity.StatusEntry_; import javaeetutorial.dukestutoring.entity.Student; import javaeetutorial.dukestutoring.entity.Student_; import javaeetutorial.dukestutoring.entity.TutoringSession; import javaeetutorial.dukestutoring.entity.TutoringSession_; import javaeetutorial.dukestutoring.events.StatusEvent; import javaeetutorial.dukestutoring.util.CalendarUtil; import javaeetutorial.dukestutoring.util.StatusType; import javax.annotation.PostConstruct; import javax.annotation.Resource; import javax.annotation.security.RolesAllowed; import javax.ejb.SessionContext; import javax.ejb.Stateless; import javax.enterprise.event.Event; import javax.inject.Inject; import javax.inject.Named; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Join; import javax.persistence.criteria.Root; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; /** * * @author ian */ @Stateless @Named @Path("/status") public class RequestBean { @PersistenceContext private EntityManager em; private static final Logger logger = Logger.getLogger("dukestutoring.ejb.RequestBean"); private CriteriaBuilder cb; private TutoringSession todaysSession; @Resource SessionContext ctx; @Inject Event<StatusEvent> statusEvent; @PostConstruct private void init() { cb = em.getCriteriaBuilder(); } public String checkIn(Student student) { String result; if (student == null) { logger.warning("Student is null!"); result = "failedToCheckIn"; } else { // get today's session from the convenience method TutoringSession tutoringSession = this.getTodaysSession(); List<Student> students = tutoringSession.getStudents(); if (!students.contains(student)) { logger.info("Adding student to session."); tutoringSession.getStudents().add(student); logger.info("Adding today's tutoring session to student."); List<TutoringSession> sessions = student.getSessions(); if (sessions.isEmpty()) { logger.info("Student's sessions list is empty."); sessions = new ArrayList<>(); } sessions.add(tutoringSession); } // set the status logger.log(Level.INFO, "Setting {0}''s status to IN", student.getFirstName()); student.setStatus(StatusType.IN); statusEvent.fire(new StatusEvent(student)); // create a new status entry logger.info("Creating a new status entry"); StatusEntry entry = new StatusEntry(StatusType.IN, student, tutoringSession); // add the status entry to the tutoring session logger.info("Adding status entry to tutoring session"); tutoringSession.getStatusEntries().add(entry); // persist the status entry logger.info("Persisting status entry"); em.persist(entry); // modify the student logger.log(Level.INFO, "Merging status change to {0}", student.getFirstName()); em.merge(student); // modify the tutoring session logger.info("Merging the status entry to tutoring session"); em.merge(tutoringSession); result = "checkinSucceeded"; } return result; } public String checkOut(Student student) { String result; // get today's session from the convenience method TutoringSession tutoringSession = this.getTodaysSession(); logger.log(Level.INFO, "Setting {0}''s status to OUT", student.getFirstName()); student.setStatus(StatusType.OUT); statusEvent.fire(new StatusEvent(student)); logger.log(Level.INFO, "Student {0} is {1}", new Object[]{student.getFirstName(), student.getStatus()}); StatusEntry entry = new StatusEntry(StatusType.OUT, student, tutoringSession); // add the status entry to the tutoring session tutoringSession.getStatusEntries().add(entry); // persist the status entry logger.info("Persisting status entry"); em.persist(entry); // modify the student logger.log(Level.INFO, "Merging status change to {0}", student.getFirstName()); em.merge(student); // modify the tutoring session logger.info("Merging the status entry to tutoring session"); em.merge(tutoringSession); result = "checkoutSucceeded"; return result; } public void checkOutAllStudents() { List<Student> students = this.getCheckedInStudents(); for (Student s: students) { this.checkOut(s); } } public String atPark(Student student) { String result; // get today's session from the convenience method TutoringSession tutoringSession = this.getTodaysSession(); logger.log(Level.INFO, "Setting {0}''s status to PLAYGROUND", student.getFirstName()); student.setStatus(StatusType.PARK); statusEvent.fire(new StatusEvent(student)); StatusEntry entry = new StatusEntry(StatusType.PARK, student, tutoringSession); // add the status entry to the tutoring session tutoringSession.getStatusEntries().add(entry); // persist the status entry logger.info("Persisting status entry"); em.persist(entry); // modify the student logger.log(Level.INFO, "Merging status change to {0}", student.getFirstName()); em.merge(student); // modify the tutoring session logger.info("Merging the status entry to tutoring session"); em.merge(tutoringSession); result = "atParkSucceeded"; return result; } public String backFromPark(Student student) { String result; // get today's session from the convenience method TutoringSession tutoringSession = this.getTodaysSession(); student.setStatus(StatusType.IN); statusEvent.fire(new StatusEvent(student)); StatusEntry entry = new StatusEntry(StatusType.IN, student, tutoringSession); // add the status entry to the tutoring session tutoringSession.getStatusEntries().add(entry); // persist the status entry logger.info("Persisting status entry"); em.persist(entry); // modify the student logger.info("Merging status change to student"); em.merge(student); // modify the tutoring session logger.info("Merging the status entry to tutoring session"); em.merge(tutoringSession); result = "backFromParkSucceeded"; return result; } public List<Student> getAllStudents() { CriteriaQuery<Student> cq = em.getCriteriaBuilder().createQuery(Student.class); Root<Student> student = cq.from(Student.class); cq.select(student); cq.where(cb.isTrue(student.get(Student_.active))); cq.distinct(true); TypedQuery<Student> q = em.createQuery(cq); return q.getResultList(); } public List<Student> getStudentsAtPark() { return this.getStudentsByStatus(StatusType.PARK); } public List<Student> getCheckedInStudents() { return this.getStudentsByStatus(StatusType.IN); } public List<Student> getCheckedOutStudents() { return this.getStudentsByStatus(StatusType.OUT); } public Student getStudentByName(String lastName, String firstName) { CriteriaQuery<Student> cq = em.getCriteriaBuilder().createQuery(Student.class); Root<Student> student = cq.from(Student.class); cq.select(student); cq.where(cb.equal(student.get(Student_.lastName), lastName)); cq.where(cb.equal(student.get(Student_.firstName), firstName)); cq.distinct(true); TypedQuery<Student> q = em.createQuery(cq); return q.getSingleResult(); } public List<TutoringSession> getAllTutoringSessions() { CriteriaQuery<TutoringSession> cq = cb.createQuery(TutoringSession.class); Root<TutoringSession> session = cq.from(TutoringSession.class); cq.select(session); cq.distinct(true); TypedQuery<TutoringSession> q = em.createQuery(cq); List<TutoringSession> sessions = q.getResultList(); logger.log(Level.INFO, "Total number of sessions: {0}", sessions.size()); return sessions; } public void createTutoringSession() { try { todaysSession = new TutoringSession(); // Create a formatter to pretty print the date. SimpleDateFormat formatter = new SimpleDateFormat("E, MMM d, yyyy"); logger.log(Level.INFO, "Creating new tutoring session for {0}.", formatter.format(todaysSession.getSessionDate().getTime())); // Store it in the database em.persist(todaysSession); } catch (Exception e) { logger.warning("Couldn't create a new session!"); } } // convenience method for getting the current session public TutoringSession getTodaysSession() { // get today's date and trim the time information Calendar today = Calendar.getInstance(); CalendarUtil.stripTime(today); // find today's session SimpleDateFormat formatter = new SimpleDateFormat("E, MMM d, yyyy"); logger.log(Level.INFO, "Finding tutoring session for {0}", formatter.format(today.getTime())); CriteriaQuery<TutoringSession> cq = cb.createQuery(TutoringSession.class); Root<TutoringSession> tutoringSession = cq.from(TutoringSession.class); cq.select(tutoringSession); cq.where(cb.equal(tutoringSession.get(TutoringSession_.sessionDate), today)); cq.distinct(true); TypedQuery<TutoringSession> q = em.createQuery(cq); TutoringSession session; try { session = q.getSingleResult(); logger.info("Found session for today."); } catch (NoResultException e) { logger.info("Today's session not found. Creating a new session."); session = new TutoringSession(); em.persist(session); } return session; } public List<StatusEntry> getStatusEntriesByDate(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); CriteriaQuery<StatusEntry> cq = cb.createQuery(StatusEntry.class); Root<StatusEntry> statusEntry = cq.from(StatusEntry.class); cq.select(statusEntry); cq.where(cb.equal(statusEntry.get(StatusEntry_.statusDate), cal)); cq.distinct(true); TypedQuery<StatusEntry> q = em.createQuery(cq); return q.getResultList(); } public List<StatusEntry> getCurrentStatusEntries() { CriteriaQuery<StatusEntry> cq = cb.createQuery(StatusEntry.class); Root<StatusEntry> statusEntry = cq.from(StatusEntry.class); cq.select(statusEntry); cq.where(cb.equal(statusEntry.get(StatusEntry_.tutoringSession), this.getTodaysSession())); cq.distinct(true); TypedQuery<StatusEntry> q = em.createQuery(cq); return q.getResultList(); } @GET @Path("/guardian/{guardianEmail}") @Produces({"application/xml", "application/json"}) @RolesAllowed({"Guardian", "Administrator"}) public Guardian getGuardianByEmail(@PathParam("guardianEmail") String email) { logger.log(Level.INFO, "Principal is: {0}", ctx.getCallerPrincipal().getName()); CriteriaQuery<Guardian> cq = cb.createQuery(Guardian.class); Root<Guardian> guardian = cq.from(Guardian.class); cq.select(guardian); cq.where(cb.equal(guardian.get(Guardian_.email), email)); cq.distinct(true); TypedQuery<Guardian> q = em.createQuery(cq); return q.getSingleResult(); } @GET @Path("email/{guardianEmail}") @Produces({"application/xml", "application/json"}) @RolesAllowed({"Guardian", "Administrator"}) public List<Student> getStatusByGuardianEmail(@PathParam("guardianEmail") String email) { logger.log(Level.INFO, "Principal is: {0}", ctx.getCallerPrincipal().getName()); CriteriaQuery<Student> cq = cb.createQuery(Student.class); Root<Student> student = cq.from(Student.class); Join<Student, Guardian> guardian = student.join(Student_.guardians); cq.select(student); cq.where(cb.equal(guardian.get(Guardian_.email), email)); cq.distinct(true); TypedQuery<Student> q = em.createQuery(cq); List<Student> results = q.getResultList(); logger.log(Level.INFO, "Guardian {0}has {1} students.", new Object[]{email, results.size()}); return results; } @GET @Path("id/{guardianId}") @Produces({"application/xml", "application/json"}) public List<Student> getStatusByGuardianId(@PathParam("guardianId") Long id) { logger.log(Level.INFO, "Principal is: {0}", ctx.getCallerPrincipal().getName()); CriteriaQuery<Student> cq = cb.createQuery(Student.class); Root<Student> student = cq.from(Student.class); Join<Student, Guardian> guardian = student.join(Student_.guardians); cq.select(student); cq.where(cb.equal(guardian.get(Guardian_.id), id)); cq.distinct(true); TypedQuery<Student> q = em.createQuery(cq); return q.getResultList(); } // convenience method for getting students by status private List<Student> getStudentsByStatus(StatusType statusType) { CriteriaQuery<Student> cq = cb.createQuery(Student.class); Root<Student> student = cq.from(Student.class); cq.select(student); cq.where(cb.equal(student.get(Student_.status), statusType)); cq.distinct(true); TypedQuery<Student> q = em.createQuery(cq); return q.getResultList(); } }
{ "pile_set_name": "Github" }
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package socket const ( sysRECVMMSG = 0xf3 sysSENDMMSG = 0x10d )
{ "pile_set_name": "Github" }
define("dojox/highlight/languages/pygments/xml", ["../../_base", "../xml"], function(dh){ var dxml = dh.languages.xml = { defaultMode: { contains: [ "name entity", "comment", "comment preproc", "_tag" ] }, modes: [ // comments { className: "comment", begin: "<!--", end: "-->" }, { className: "comment preproc", begin: "\\<\\!\\[CDATA\\[", end: "\\]\\]\\>" }, { className: "comment preproc", begin: "\\<\\!", end: "\\>" }, { className: "comment preproc", begin: "\\<\\?", end: "\\?\\>", relevance: 5 }, // strings { className: "string", begin: "'", end: "'", illegal: "\\n", relevance: 0 }, { className: "string", begin: '"', end: '"', illegal: "\\n", relevance: 0 }, // names { className: "name entity", begin: "\\&[a-z]+;", end: "^" }, { className: "name tag", begin: "\\b[a-z0-9_\\:\\-]+\\b", end: "^" }, { className: "name attribute", begin: "\\b[a-z0-9_\\:\\-]+=", end: "^", relevance: 0 }, { className: "_tag", begin: "\\<", end: "\\>", contains: ["name tag", "name attribute", "string"] }, { className: "_tag", begin: "\\</", end: "\\>", contains: ["name tag"] } ] }; return dxml; });
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="ssdk_weibo_oauth_regiseter">ๅบ”็”จๆŽˆๆƒ</string> <string name="ssdk_website">http://www.mob.com</string> <string name="ssdk_weibo_upload_content">ๅˆ†ไบซๅ›พ็‰‡</string> <string name="ssdk_wechat_client_inavailable">็›ฎๅ‰ๆ‚จ็š„ๅพฎไฟก็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…ๅพฎไฟก๏ผŒ้œ€่ฆๅฎ‰่ฃ…ๅพฎไฟกๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_google_plus_client_inavailable">Google+ ็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–่€…ๆฒกๆœ‰ๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅ‡็บงๆˆ–ๅฎ‰่ฃ…Google+ๆ‰่ƒฝไฝฟ็”จ๏ผ</string> <string name="ssdk_qq_client_inavailable">QQ ็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–่€…ๆฒกๆœ‰ๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅ‡็บงๆˆ–ๅฎ‰่ฃ…QQๆ‰่ƒฝไฝฟ็”จ๏ผ</string> <string name="ssdk_pinterest_client_inavailable">Pinterest็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–่€…ๆฒกๆœ‰ๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅ‡็บงๆˆ–ๅฎ‰่ฃ…Pinterestๆ‰่ƒฝไฝฟ็”จ๏ผ</string> <string name="ssdk_instagram_client_inavailable">Instagram็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–่€…ๆฒกๆœ‰ๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅ‡็บงๆˆ–ๅฎ‰่ฃ…Instagramๆ‰่ƒฝไฝฟ็”จ๏ผ</string> <string name="ssdk_yixin_client_inavailable">็›ฎๅ‰ๆ‚จ็š„ๆ˜“ไฟก็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…ๆ˜“ไฟกๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_line_client_inavailable">็›ฎๅ‰ๆ‚จ็š„Line็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…Lineๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_kakaotalk_client_inavailable">็›ฎๅ‰ๆ‚จ็š„KakaoTalk็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…KakaoTalkๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_kakaostory_client_inavailable">็›ฎๅ‰ๆ‚จ็š„KakaoStory็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…KakaoStoryๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_whatsapp_client_inavailable">็›ฎๅ‰ๆ‚จ็š„WhatsApp็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…WhatsAppๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_laiwang_client_inavailable">็›ฎๅ‰ๆ‚จ็š„ๆฅๅพ€็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…ๆฅๅพ€ๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_alipay_client_inavailable">็›ฎๅ‰ๆ‚จ็š„ๆ”ฏไป˜ๅฎ็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…ๆ”ฏไป˜ๅฎๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_facebookmessenger_client_inavailable">็›ฎๅ‰ๆ‚จ็š„FacebookMessenger็‰ˆๆœฌ่ฟ‡ไฝŽๆˆ–ๆœชๅฎ‰่ฃ…๏ผŒ้œ€่ฆๅฎ‰่ฃ…ๆ‰่ƒฝไฝฟ็”จ</string> <string name="ssdk_sinaweibo">ๆ–ฐๆตชๅพฎๅš</string> <string name="ssdk_tencentweibo">่…พ่ฎฏๅพฎๅš</string> <string name="ssdk_qzone">QQ็ฉบ้—ด</string> <string name="ssdk_wechat">ๅพฎไฟกๅฅฝๅ‹</string> <string name="ssdk_wechatmoments">ๅพฎไฟกๆœ‹ๅ‹ๅœˆ</string> <string name="ssdk_wechatfavorite">ๅพฎไฟกๆ”ถ่—</string> <string name="ssdk_facebook">Facebook</string> <string name="ssdk_twitter">Twitter</string> <string name="ssdk_renren">ไบบไบบ็ฝ‘</string> <string name="ssdk_kaixin">ๅผ€ๅฟƒ็ฝ‘</string> <string name="ssdk_email">้‚ฎไปถ</string> <string name="ssdk_shortmessage">ไฟกๆฏ</string> <string name="ssdk_sohumicroblog">ๆœ็‹ๅพฎๅš</string> <string name="ssdk_sohusuishenkan">ๆœ็‹้š่บซ็œ‹</string> <string name="ssdk_neteasemicroblog">็ฝ‘ๆ˜“ๅพฎๅš</string> <string name="ssdk_douban">่ฑ†็“ฃ</string> <string name="ssdk_youdao">ๆœ‰้“ไบ‘็ฌ”่ฎฐ</string> <string name="ssdk_evernote">ๅฐ่ฑก็ฌ”่ฎฐ</string> <string name="ssdk_linkedin">้ข†่‹ฑ</string> <string name="ssdk_googleplus">Google+</string> <string name="ssdk_foursquare">FourSquare</string> <string name="ssdk_qq">QQ</string> <string name="ssdk_pinterest">Pinterest</string> <string name="ssdk_flickr">Flickr</string> <string name="ssdk_tumblr">Tumblr</string> <string name="ssdk_dropbox">Dropbox</string> <string name="ssdk_vkontakte">VK</string> <string name="ssdk_instagram">Instagram</string> <string name="ssdk_yixin">ๆ˜“ไฟก</string> <string name="ssdk_yixinmoments">ๆ˜“ไฟกๆœ‹ๅ‹ๅœˆ</string> <string name="ssdk_mingdao">ๆ˜Ž้“</string> <string name="ssdk_kakaotalk">KakaoTalk</string> <string name="ssdk_kakaostory">KakaoStory</string> <string name="ssdk_line">Line</string> <string name="ssdk_bluetooth">่“็‰™</string> <string name="ssdk_whatsapp">WhatsApp</string> <string name="ssdk_pocket">Pocket</string> <string name="ssdk_instapaper">Instapaper</string> <string name="ssdk_instapaper_email">้‚ฎ็ฎฑ</string> <string name="ssdk_instapaper_pwd">ๅฏ†็ </string> <string name="ssdk_instapaper_login">็™ปๅฝ•</string> <string name="ssdk_instapaper_logining">็™ปๅฝ•ไธญโ€ฆ</string> <string name="ssdk_instapager_email_or_password_incorrect">Emailๆˆ–ๅฏ†็ ไธๆญฃ็กฎ</string> <string name="ssdk_facebookmessenger">Facebook Messenger</string> <string name="ssdk_laiwang">ๆฅๅพ€</string> <string name="ssdk_laiwangmoments">ๆฅๅพ€ๅŠจๆ€</string> <string name="ssdk_alipay">ๆ”ฏไป˜ๅฎๅฅฝๅ‹</string> <string name="ssdk_alipaymoments">ๆ”ฏไป˜ๅฎ็”Ÿๆดปๅœˆ</string> <string name="ssdk_plurk">Plurk</string> <string name="ssdk_youtube">Youtube</string> <string name="ssdk_dingding">้’‰้’‰</string> <string name="ssdk_meipai">็พŽๆ‹</string> <string name="ssdk_share_to_qzone">ๅˆ†ไบซๅˆฐQQ็ฉบ้—ด</string> <string name="ssdk_share_to_qq">ๅˆ†ไบซๅˆฐQQ</string> <string name="ssdk_share_to_facebook">ๅˆ†ไบซๅˆฐFacebook</string> <string name="ssdk_mingdao_share_content">็ฝ‘้กตๅˆ†ไบซ</string> <string name="ssdk_share_to_mingdao">ๅˆ†ไบซๅˆฐๆ˜Ž้“</string> <string name="ssdk_share_to_googleplus">ๅˆ†ไบซๅˆฐGoogle+</string> <string name="ssdk_share_to_qzone_default">ๆฅ่‡ช%s็š„ๅˆ†ไบซ</string> <string name="ssdk_use_login_button">่ฏทๆ”น็”จโ€œ็™ปๅฝ•โ€ๆŒ‰้’ฎ</string> <string name="ssdk_share_to_youtube">ๅˆ†ไบซๅˆฐYoutube</string> <string name="ssdk_gender_male">็”ท</string> <string name="ssdk_gender_female">ๅฅณ</string> <string name="ssdk_symbol_ellipsis">...</string> </resources>
{ "pile_set_name": "Github" }
package timesync; struct update_t { // the IP address of the requester int64_t requester_id; // unique identifier generated by requester to // disambiguate multiple responses int64_t requester_nonce; // the IP address of the responder, or zeros if this is a request int64_t responder_id; // the time at the responder, or 0 for a request int64_t responder_utime; }
{ "pile_set_name": "Github" }
/* This files contains card eeprom (93c46 or 93c56) programming routines, memory is addressed by 16 bits words. This is part of rtl8180 OpenSource driver. Copyright (C) Andrea Merello 2004 <[email protected]> Released under the terms of GPL (General Public Licence) Parts of this driver are based on the GPL part of the official realtek driver. Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon. Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver. We want to tanks the Authors of those projects and the Ndiswrapper project Authors. */ #include "r8180_93cx6.h" void eprom_cs(struct net_device *dev, short bit) { if(bit) write_nic_byte_E(dev, EPROM_CMD, (1<<EPROM_CS_SHIFT) | \ read_nic_byte_E(dev, EPROM_CMD)); //enable EPROM else write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev, EPROM_CMD)\ &~(1<<EPROM_CS_SHIFT)); //disable EPROM force_pci_posting(dev); udelay(EPROM_DELAY); } void eprom_ck_cycle(struct net_device *dev) { write_nic_byte_E(dev, EPROM_CMD, (1<<EPROM_CK_SHIFT) | read_nic_byte_E(dev,EPROM_CMD)); force_pci_posting(dev); udelay(EPROM_DELAY); write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev, EPROM_CMD) &~ (1<<EPROM_CK_SHIFT)); force_pci_posting(dev); udelay(EPROM_DELAY); } void eprom_w(struct net_device *dev,short bit) { if(bit) write_nic_byte_E(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \ read_nic_byte_E(dev,EPROM_CMD)); else write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev,EPROM_CMD)\ &~(1<<EPROM_W_SHIFT)); force_pci_posting(dev); udelay(EPROM_DELAY); } short eprom_r(struct net_device *dev) { short bit; bit=(read_nic_byte_E(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT) ); udelay(EPROM_DELAY); if(bit) return 1; return 0; } void eprom_send_bits_string(struct net_device *dev, short b[], int len) { int i; for(i=0; i<len; i++){ eprom_w(dev, b[i]); eprom_ck_cycle(dev); } } u32 eprom_read(struct net_device *dev, u32 addr) { struct r8192_priv *priv = ieee80211_priv(dev); short read_cmd[]={1,1,0}; short addr_str[8]; int i; int addr_len; u32 ret; ret=0; //enable EPROM programming write_nic_byte_E(dev, EPROM_CMD, (EPROM_CMD_PROGRAM<<EPROM_CMD_OPERATING_MODE_SHIFT)); force_pci_posting(dev); udelay(EPROM_DELAY); if (priv->epromtype==EPROM_93c56){ addr_str[7]=addr & 1; addr_str[6]=addr & (1<<1); addr_str[5]=addr & (1<<2); addr_str[4]=addr & (1<<3); addr_str[3]=addr & (1<<4); addr_str[2]=addr & (1<<5); addr_str[1]=addr & (1<<6); addr_str[0]=addr & (1<<7); addr_len=8; }else{ addr_str[5]=addr & 1; addr_str[4]=addr & (1<<1); addr_str[3]=addr & (1<<2); addr_str[2]=addr & (1<<3); addr_str[1]=addr & (1<<4); addr_str[0]=addr & (1<<5); addr_len=6; } eprom_cs(dev, 1); eprom_ck_cycle(dev); eprom_send_bits_string(dev, read_cmd, 3); eprom_send_bits_string(dev, addr_str, addr_len); //keep chip pin D to low state while reading. //I'm unsure if it is necessary, but anyway shouldn't hurt eprom_w(dev, 0); for(i=0;i<16;i++){ //eeprom needs a clk cycle between writing opcode&adr //and reading data. (eeprom outs a dummy 0) eprom_ck_cycle(dev); ret |= (eprom_r(dev)<<(15-i)); } eprom_cs(dev, 0); eprom_ck_cycle(dev); //disable EPROM programming write_nic_byte_E(dev, EPROM_CMD, (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT)); return ret; }
{ "pile_set_name": "Github" }
desc_be=ะ—ะผะตะฝะฐ ะฟะฐั€ะพะปััž ะบะปะฐัั‚ะฐั€ะฐ longdesc_be=ะ—ะผะตะฝั–ั†ะต ะฟะฐั€ะพะปั– ะฝะฐ ะฝะตะบะฐะปัŒะบั–ั… ัั–ัั‚ัะผะฐั… ะบะปะฐัั‚ะฐั€ะฐ Webmin ะฐะดะฝะฐั‡ะฐัะพะฒะฐ.
{ "pile_set_name": "Github" }
(define (cubic a b c) (lambda (x) (+ (* x x x) (* a x x) (* b x) c))) (define (derive g) (define dx 0.00001) (lambda (x) (/ (- (g (+ x dx)) (g x)) dx))) (define (newton-transform g) (lambda (x) (- x (/ (g x) ((derive g) x))))) (define (fixed-point f first-guess) (define tolerance 0.00001) (define (close-enough? v1 v2) (< (abs (- v1 v2)) tolerance)) (define (try guess) (let ((next (f guess))) (if (close-enough? guess next) next (try next)))) (try first-guess)) (define (newton-method g guss) (fixed-point (newton-transform g) guss)) (define (zero-cubic a b c) (newton-method (cubic a b c) 1))
{ "pile_set_name": "Github" }
๏ปฟusing System; using System.Collections.Generic; using System.Linq; using System.Data.Entity.Validation; using System.Security.Claims; using System.Threading.Tasks; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using Microsoft.Owin.Security; namespace UI.AspNetMvc.Controllers { [Authorize] public class TaskController : Controller { public TaskController() : this(IdentityConfig.Secrets, IdentityConfig.Logins, IdentityConfig.Users, IdentityConfig.Roles) { } public TaskController(IUserSecretStore secrets, IUserLoginStore logins, IUserStore users, IRoleStore roles) { Secrets = secrets; Logins = logins; Users = users; Roles = roles; } public IUserSecretStore Secrets { get; private set; } public IUserLoginStore Logins { get; private set; } public IUserStore Users { get; private set; } public IRoleStore Roles { get; private set; } // // GET: /Account/Login [AllowAnonymous] public ActionResult Login(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return View(); } // // POST: /Account/Login [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task<ActionResult> Login(LoginViewModel model, string returnUrl) { if (ModelState.IsValid) { // Validate the user password if (await Secrets.Validate(model.UserName, model.Password)) { string userId = await Logins.GetUserId(IdentityConfig.LocalLoginProvider, model.UserName); await SignIn(userId, model.RememberMe); return RedirectToLocal(returnUrl); } } // If we got this far, something failed, redisplay form ModelState.AddModelError(String.Empty, "The user name or password provided is incorrect."); return View(model); } // // GET: /Account/Register [AllowAnonymous] public ActionResult Register() { return View(); } // // POST: /Account/Register [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task<ActionResult> Register(RegisterViewModel model) { if (ModelState.IsValid) { try { // Create a profile, password, and link the local login before signing in the user User user = new User(model.UserName); if (await Users.Create(user) && await Secrets.Create(new UserSecret(model.UserName, model.Password)) && await Logins.Add(new UserLogin(user.Id, IdentityConfig.LocalLoginProvider, model.UserName))) { await SignIn(user.Id, isPersistent: false); return RedirectToAction("Index", "Home"); } else { ModelState.AddModelError(String.Empty, "Failed to create login for: " + model.UserName); } } catch (DbEntityValidationException e) { ModelState.AddModelError("", e.EntityValidationErrors.First().ValidationErrors.First().ErrorMessage); } } // If we got this far, something failed, redisplay form return View(model); } // // POST: /Account/Disassociate [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> Disassociate(string loginProvider, string providerKey) { ManageMessageId? message = null; string userId = User.Identity.GetUserId(); if (await UnlinkAccountForUser(userId, loginProvider, providerKey)) { // If you remove a local login, need to delete the login as well if (loginProvider == IdentityConfig.LocalLoginProvider) { await Secrets.Delete(providerKey); } message = ManageMessageId.RemoveLoginSuccess; } return RedirectToAction("Manage", new { Message = message }); } // // GET: /Account/Manage public async Task<ActionResult> Manage(ManageMessageId? message) { ViewBag.StatusMessage = message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed." : message == ManageMessageId.SetPasswordSuccess ? "Your password has been set." : message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed." : String.Empty; string localUserName = await Logins.GetProviderKey(User.Identity.GetUserId(), IdentityConfig.LocalLoginProvider); ViewBag.UserName = localUserName; ViewBag.HasLocalPassword = localUserName != null; ViewBag.ReturnUrl = Url.Action("Manage"); return View(); } // // POST: /Account/Manage [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> Manage(ManageUserViewModel model) { string userId = User.Identity.GetUserId(); string localUserName = await Logins.GetProviderKey(User.Identity.GetUserId(), IdentityConfig.LocalLoginProvider); bool hasLocalLogin = localUserName != null; ViewBag.HasLocalPassword = hasLocalLogin; ViewBag.ReturnUrl = Url.Action("Manage"); if (hasLocalLogin) { if (ModelState.IsValid) { bool changePasswordSucceeded = await ChangePassword(localUserName, model.OldPassword, model.NewPassword); if (changePasswordSucceeded) { return RedirectToAction("Manage", new { Message = ManageMessageId.ChangePasswordSuccess }); } else { ModelState.AddModelError(String.Empty, "The current password is incorrect or the new password is invalid."); } } } else { // User does not have a local password so remove any validation errors caused by a missing OldPassword field ModelState state = ModelState["OldPassword"]; if (state != null) { state.Errors.Clear(); } if (ModelState.IsValid) { try { // Create the local login info and link the local account to the user localUserName = User.Identity.GetUserName(); if (await Secrets.Create(new UserSecret(localUserName, model.NewPassword)) && await Logins.Add(new UserLogin(userId, IdentityConfig.LocalLoginProvider, localUserName))) { return RedirectToAction("Manage", new { Message = ManageMessageId.SetPasswordSuccess }); } else { ModelState.AddModelError(String.Empty, "Failed to set password"); } } catch (Exception e) { ModelState.AddModelError(String.Empty, e); } } } // If we got this far, something failed, redisplay form return View(model); } // // POST: /Account/ExternalLogin [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult ExternalLogin(string provider, string returnUrl) { // Request a redirect to the external login provider return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { loginProvider = provider, ReturnUrl = returnUrl })); } // // GET: /Account/ExternalLoginCallback [AllowAnonymous] public async Task<ActionResult> ExternalLoginCallback(string loginProvider, string returnUrl) { // Get the information about the user from the external login provider ClaimsIdentity id = await HttpContext.GetExternalIdentity(); if (id == null) { return View("ExternalLoginFailure"); } // Make sure the external identity is from the loginProvider we expect Claim providerKeyClaim = id.FindFirst(ClaimTypes.NameIdentifier); if (providerKeyClaim == null || providerKeyClaim.Issuer != loginProvider) { return View("ExternalLoginFailure"); } // Succeeded so we should be able to lookup the local user name and sign them in string providerKey = providerKeyClaim.Value; string userId = await Logins.GetUserId(loginProvider, providerKey); if (!String.IsNullOrEmpty(userId)) { await SignIn(userId, id.Claims, isPersistent: false); } else { // No local user for this account if (User.Identity.IsAuthenticated) { // If the current user is logged in, just add the new account await Logins.Add(new UserLogin(User.Identity.GetUserId(), loginProvider, providerKey)); } else { ViewBag.ReturnUrl = returnUrl; return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { UserName = id.Name, LoginProvider = loginProvider }); } } return RedirectToLocal(returnUrl); } // // POST: /Account/ExternalLoginConfirmation [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl) { if (User.Identity.IsAuthenticated) { return RedirectToAction("Manage"); } if (ModelState.IsValid) { // Get the information about the user from the external login provider ClaimsIdentity id = await HttpContext.GetExternalIdentity(); if (id == null) { return View("ExternalLoginFailure"); } try { // Create a local user and sign in var user = new User(model.UserName); if (await Users.Create(user) && await Logins.Add(new UserLogin(user.Id, model.LoginProvider, id.FindFirstValue(ClaimTypes.NameIdentifier)))) { await SignIn(user.Id, id.Claims, isPersistent: false); return RedirectToLocal(returnUrl); } else { return View("ExternalLoginFailure"); } } catch (DbEntityValidationException e) { ModelState.AddModelError("", e.EntityValidationErrors.First().ValidationErrors.First().ErrorMessage); } } ViewBag.ReturnUrl = returnUrl; return View(model); } // // POST: /Account/LogOff [HttpPost] [ValidateAntiForgeryToken] public ActionResult LogOff() { HttpContext.SignOut(); return RedirectToAction("Index", "Home"); } // // GET: /Account/ExternalLoginFailure [AllowAnonymous] public ActionResult ExternalLoginFailure() { return View(); } [AllowAnonymous] [ChildActionOnly] public ActionResult ExternalLoginsList(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return (ActionResult)PartialView("_ExternalLoginsListPartial", new List<AuthenticationDescription>(HttpContext.GetExternalAuthenticationTypes())); } [ChildActionOnly] public ActionResult RemoveAccountList() { return Task.Run(async () => { var linkedAccounts = await Logins.GetLogins(User.Identity.GetUserId()); ViewBag.ShowRemoveButton = linkedAccounts.Count > 1; return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts); }).Result; } #region Helpers private ActionResult RedirectToLocal(string returnUrl) { if (Url.IsLocalUrl(returnUrl)) { return Redirect(returnUrl); } else { return RedirectToAction("Index", "Home"); } } private async Task<bool> UnlinkAccountForUser(string userId, string loginProvider, string providerKey) { string ownerAccount = await Logins.GetUserId(loginProvider, providerKey); if (ownerAccount == userId) { if ((await Logins.GetLogins(userId)).Count > 1) { await Logins.Remove(userId, loginProvider, providerKey); return true; } } return false; } private async Task<bool> ChangePassword(string userName, string oldPassword, string newPassword) { bool changePasswordSucceeded = false; if (await Secrets.Validate(userName, oldPassword)) { changePasswordSucceeded = await Secrets.UpdateSecret(userName, newPassword); } return changePasswordSucceeded; } private Task SignIn(string userId, bool isPersistent) { return SignIn(userId, new Claim[0], isPersistent); } private async Task SignIn(string userId, IEnumerable<Claim> claims, bool isPersistent) { User user = await Users.Find(userId) as User; if (user != null) { // Replace UserIdentity claims with the application specific claims IList<Claim> userClaims = IdentityConfig.RemoveUserIdentityClaims(claims); IdentityConfig.AddUserIdentityClaims(userId, user.UserName, userClaims); IdentityConfig.AddRoleClaims(await Roles.GetRolesForUser(userId), userClaims); IdentityConfig.SignIn(HttpContext, userClaims, isPersistent); } } private class ChallengeResult : HttpUnauthorizedResult { public ChallengeResult(string provider, string redirectUrl) { LoginProvider = provider; RedirectUrl = redirectUrl; } public string LoginProvider { get; set; } public string RedirectUrl { get; set; } public override void ExecuteResult(ControllerContext context) { context.HttpContext.Challenge(LoginProvider, new AuthenticationExtra() { RedirectUrl = RedirectUrl }); } } public enum ManageMessageId { ChangePasswordSuccess, SetPasswordSuccess, RemoveLoginSuccess, } #endregion } }
{ "pile_set_name": "Github" }
# md5 from https://pypi.python.org/pypi/argh/json, sha256 locally computed md5 edda25f3f0164a963dd89c0e3c619973 argh-0.26.2.tar.gz sha256 e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65 argh-0.26.2.tar.gz
{ "pile_set_name": "Github" }
// 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = require('./$.export'); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
{ "pile_set_name": "Github" }
#include "stdafx.h" CNPCObject::CNPCObject() : CCharObject(NULL) { m_dwRunNextTick = 250; m_dwSearchTick = 3000; m_btLight = 6; }
{ "pile_set_name": "Github" }
:107C000001C0F6C011248FEF98E09EBF8DBF84B7EE :107C100090E89093610010926100882369F0982F9A :107C20009A70923049F081FF02C097EF94BF282EDE :107C300080E001D10C94000085E08093810082E017 :107C40008093C00088E18093C1008BE98093C400D9 :107C500086E08093C2008EE0EED0259A84E024E294 :107C60003DEF91E0309385002093840096BBB09B5C :107C7000FECF1D9AA8954091C00047FD02C08150DB :107C800089F7CDD0813479F4CAD0C82FDAD0C23880 :107C900011F480E004C088E0C13809F083E0B8D076 :107CA00080E1B6D0EECF823419F484E1D2D0F8CF9F :107CB000853411F485E0FACF853581F4B0D0E82E13 :107CC000AED0F82E87FF07C08BB781608BBFEE0C5C :107CD000FF1CB7D0E5CF8BB78E7FF8CF863579F410 :107CE0009ED08D3451F49BD0CBB799D0C170880F02 :107CF0008C2B8BBF81E0ADD0CCCF83E0FCCF843622 :107D000009F045C08CD0C82FD0E0DC2FCC2787D01D :107D1000C82B85D0D82E5E01B39400E011E0480155 :107D2000EFEF8E1A9E0A7BD0F801808384018A14BB :107D30009B04A9F786D0F5E410E000E0DF1609F116 :107D400050E040E063E0C70153D08701C12CDD243F :107D5000D394F601419151916F0161E0C80148D07F :107D60000E5F1F4F2297A9F750E040E065E0C70182 :107D70003FD096CF6081C8018E0D9F1D79D00F5FD7 :107D80001F4FF801F395C017D107A1F789CF8437AA :107D900001F545D0C82FD0E0DC2FCC2740D0C82B30 :107DA0003ED0D82E4ED08701F5E4DF120BC0CE0DA9 :107DB000DF1DC80155D02CD00F5F1F4FC017D10752 :107DC000C1F76ECFF80187918F0122D02197D1F7AB :107DD00067CF853739F435D08EE11AD085E918D0D0 :107DE00081E85DCF813509F074CF88E024D071CF70 :107DF000FC010A0167BFE895112407B600FCFDCF1E :107E0000667029F0452B19F481E187BFE895089544 :107E10009091C00095FFFCCF8093C600089580919B :107E2000C00087FFFCCF8091C00084FD01C0A895F1 :107E30008091C6000895E0E6F0E098E190838083A9 :107E40000895EDDF803219F088E0F5DFFFCF84E19F :107E5000DFCFCF93C82FE3DFC150E9F7CF91F1CF48 :107E6000F999FECF92BD81BDF89A992780B5089502 :107E7000262FF999FECF92BD81BD20BD0FB6F89493 :0A7E8000FA9AF99A0FBE01960895D0 :027FFE00000879 :0400000300007C007D :00000001FF
{ "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>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>${PRODUCT_NAME}</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>${CURRENT_PROJECT_VERSION}</string> <key>NSHumanReadableCopyright</key> <string>Copyright ยฉ 2014 Jeff Hui. All rights reserved.</string> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
{ "pile_set_name": "Github" }
import torch from torch.autograd import Variable from dataset import Video from spatial_transforms import (Compose, Normalize, Scale, CenterCrop, ToTensor) from temporal_transforms import LoopPadding def classify_video(video_dir, video_name, class_names, model, opt): assert opt.mode in ['score', 'feature'] spatial_transform = Compose([Scale(opt.sample_size), CenterCrop(opt.sample_size), ToTensor(), Normalize(opt.mean, [1, 1, 1])]) temporal_transform = LoopPadding(opt.sample_duration) data = Video(video_dir, spatial_transform=spatial_transform, temporal_transform=temporal_transform, sample_duration=opt.sample_duration) data_loader = torch.utils.data.DataLoader(data, batch_size=opt.batch_size, shuffle=False, num_workers=opt.n_threads, pin_memory=True) video_outputs = [] video_segments = [] for i, (inputs, segments) in enumerate(data_loader): inputs = Variable(inputs, volatile=True) outputs = model(inputs) video_outputs.append(outputs.cpu().data) video_segments.append(segments) video_outputs = torch.cat(video_outputs) video_segments = torch.cat(video_segments) results = { 'video': video_name, 'clips': [] } _, max_indices = video_outputs.max(dim=1) for i in range(video_outputs.size(0)): clip_results = { 'segment': video_segments[i].tolist(), } if opt.mode == 'score': clip_results['label'] = class_names[max_indices[i]] clip_results['scores'] = video_outputs[i].tolist() elif opt.mode == 'feature': clip_results['features'] = video_outputs[i].tolist() results['clips'].append(clip_results) return results
{ "pile_set_name": "Github" }
;****************************************************************************** ;* optimized bswap buffer functions ;* Copyright (c) 2008 Loren Merritt ;* Copyright (c) 2003-2013 Michael Niedermayer ;* Copyright (c) 2013 Daniel Kang ;* ;* This file is part of FFmpeg. ;* ;* FFmpeg 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. ;* ;* FFmpeg 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 FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "libavutil/x86/x86util.asm" SECTION_RODATA pb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 cextern pb_80 SECTION .text ; %1 = aligned/unaligned %macro BSWAP_LOOPS 1 mov r3d, r2d sar r2d, 3 jz .left4_%1 %if cpuflag(avx2) sar r2d, 1 jz .left8_%1 %endif .loop8_%1: mov%1 m0, [r1 + 0] mov%1 m1, [r1 + mmsize] %if cpuflag(ssse3)||cpuflag(avx2) pshufb m0, m2 pshufb m1, m2 mov%1 [r0 + 0], m0 mov%1 [r0 + mmsize], m1 %else pshuflw m0, m0, 10110001b pshuflw m1, m1, 10110001b pshufhw m0, m0, 10110001b pshufhw m1, m1, 10110001b mova m2, m0 mova m3, m1 psllw m0, 8 psllw m1, 8 psrlw m2, 8 psrlw m3, 8 por m2, m0 por m3, m1 mov%1 [r0 + 0], m2 mov%1 [r0 + 16], m3 %endif add r0, mmsize*2 add r1, mmsize*2 dec r2d jnz .loop8_%1 %if cpuflag(avx2) .left8_%1: mov r2d, r3d test r3d, 8 jz .left4_%1 mov%1 m0, [r1] pshufb m0, m2 mov%1 [r0 + 0], m0 add r1, mmsize add r0, mmsize %endif .left4_%1: mov r2d, r3d test r3d, 4 jz .left mov%1 xm0, [r1] %if cpuflag(ssse3) pshufb xm0, xm2 mov%1 [r0], xm0 %else pshuflw m0, m0, 10110001b pshufhw m0, m0, 10110001b mova m2, m0 psllw m0, 8 psrlw m2, 8 por m2, m0 mov%1 [r0], m2 %endif add r1, 16 add r0, 16 %endmacro ; void ff_bswap_buf(uint32_t *dst, const uint32_t *src, int w); %macro BSWAP32_BUF 0 %if cpuflag(ssse3)||cpuflag(avx2) cglobal bswap32_buf, 3,4,3 mov r3, r1 VBROADCASTI128 m2, [pb_bswap32] %else cglobal bswap32_buf, 3,4,5 mov r3, r1 %endif or r3, r0 test r3, mmsize - 1 jz .start_align BSWAP_LOOPS u jmp .left .start_align: BSWAP_LOOPS a .left: %if cpuflag(ssse3) test r2d, 2 jz .left1 movq xm0, [r1] pshufb xm0, xm2 movq [r0], xm0 add r1, 8 add r0, 8 .left1: test r2d, 1 jz .end mov r2d, [r1] bswap r2d mov [r0], r2d %else and r2d, 3 jz .end .loop2: mov r3d, [r1] bswap r3d mov [r0], r3d add r1, 4 add r0, 4 dec r2d jnz .loop2 %endif .end: RET %endmacro INIT_XMM sse2 BSWAP32_BUF INIT_XMM ssse3 BSWAP32_BUF %if HAVE_AVX2_EXTERNAL INIT_YMM avx2 BSWAP32_BUF %endif
{ "pile_set_name": "Github" }
Use this ``` X:7 T:Qui Tolis (Trio) C:Andrรฉ Raison M:3/4 L:1/4 Q:1/4=92 %%staves {(Pos1 Pos2) Trompette} K:F % V:Pos1 %%MIDI program 78 "Positif"x3 |x3 |c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | V:Pos2 %%MIDI program 78 Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | V:Trompette %%MIDI program 56 "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| ``` to get ```abc X:7 T:Qui Tolis (Trio) C:Andrรฉ Raison M:3/4 L:1/4 Q:1/4=92 %%staves {(Pos1 Pos2) Trompette} K:F % V:Pos1 %%MIDI program 78 "Positif"x3 |x3 |c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | V:Pos2 %%MIDI program 78 Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | V:Trompette %%MIDI program 56 "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| ``` See [(this is a link to whatever)](#whatever) for an example with options `{.abc #whatever caption="this is the caption" width=50%}`. ```{.abc #whatever caption="this is the caption" width=50%} X:7 T:Qui Tolis (Trio) C:Andrรฉ Raison M:3/4 L:1/4 Q:1/4=92 %%staves {(Pos1 Pos2) Trompette} K:F % V:Pos1 %%MIDI program 78 "Positif"x3 |x3 |c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | V:Pos2 %%MIDI program 78 Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | V:Trompette %%MIDI program 56 "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| ```
{ "pile_set_name": "Github" }
(***********************************************************************) (* *) (* OCaml *) (* *) (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* *) (* Copyright 1996 Institut National de Recherche en Informatique et *) (* en Automatique. All rights reserved. This file is distributed *) (* under the terms of the Q Public License version 1.0. *) (* *) (***********************************************************************) (* From lambda to assembly code *) open Format open Config open Clflags open Misc open Cmm type error = Assembler_error of string exception Error of error let liveness ppf phrase = Liveness.fundecl ppf phrase; phrase let dump_if ppf flag message phrase = if !flag then Printmach.phase message ppf phrase let pass_dump_if ppf flag message phrase = dump_if ppf flag message phrase; phrase let pass_dump_linear_if ppf flag message phrase = if !flag then fprintf ppf "*** %s@.%a@." message Printlinear.fundecl phrase; phrase let clambda_dump_if ppf ulambda = if !dump_clambda then Printclambda.clambda ppf ulambda; ulambda let rec regalloc ppf round fd = if round > 50 then fatal_error(fd.Mach.fun_name ^ ": function too complex, cannot complete register allocation"); dump_if ppf dump_live "Liveness analysis" fd; Interf.build_graph fd; if !dump_interf then Printmach.interferences ppf (); if !dump_prefer then Printmach.preferences ppf (); Coloring.allocate_registers(); dump_if ppf dump_regalloc "After register allocation" fd; let (newfd, redo_regalloc) = Reload.fundecl fd in dump_if ppf dump_reload "After insertion of reloading code" newfd; if redo_regalloc then begin Reg.reinit(); Liveness.fundecl ppf newfd; regalloc ppf (round + 1) newfd end else newfd let (++) x f = f x let compile_fundecl (ppf : formatter) fd_cmm = Proc.init (); Reg.reset(); fd_cmm ++ Selection.fundecl ++ pass_dump_if ppf dump_selection "After instruction selection" ++ Comballoc.fundecl ++ pass_dump_if ppf dump_combine "After allocation combining" ++ CSE.fundecl ++ pass_dump_if ppf dump_cse "After CSE" ++ liveness ppf ++ Deadcode.fundecl ++ pass_dump_if ppf dump_live "Liveness analysis" ++ Spill.fundecl ++ liveness ppf ++ pass_dump_if ppf dump_spill "After spilling" ++ Split.fundecl ++ pass_dump_if ppf dump_split "After live range splitting" ++ liveness ppf ++ regalloc ppf 1 ++ Linearize.fundecl ++ pass_dump_linear_if ppf dump_linear "Linearized code" ++ Scheduling.fundecl ++ pass_dump_linear_if ppf dump_scheduling "After instruction scheduling" ++ Emit.fundecl let compile_phrase ppf p = if !dump_cmm then fprintf ppf "%a@." Printcmm.phrase p; match p with | Cfunction fd -> compile_fundecl ppf fd | Cdata dl -> Emit.data dl (* For the native toplevel: generates generic functions unless they are already available in the process *) let compile_genfuns ppf f = List.iter (function | (Cfunction {fun_name = name}) as ph when f name -> compile_phrase ppf ph | _ -> ()) (Cmmgen.generic_functions true [Compilenv.current_unit_infos ()]) let compile_implementation ?toplevel prefixname ppf (size, lam) = let asmfile = if !keep_asm_file then prefixname ^ ext_asm else Filename.temp_file "camlasm" ext_asm in let oc = open_out asmfile in begin try Emitaux.output_channel := oc; Emit.begin_assembly(); Closure.intro size lam ++ clambda_dump_if ppf ++ Cmmgen.compunit size ++ List.iter (compile_phrase ppf) ++ (fun () -> ()); (match toplevel with None -> () | Some f -> compile_genfuns ppf f); (* We add explicit references to external primitive symbols. This is to ensure that the object files that define these symbols, when part of a C library, won't be discarded by the linker. This is important if a module that uses such a symbol is later dynlinked. *) compile_phrase ppf (Cmmgen.reference_symbols (List.filter (fun s -> s <> "" && s.[0] <> '%') (List.map Primitive.native_name !Translmod.primitive_declarations)) ); Emit.end_assembly(); close_out oc with x -> close_out oc; if !keep_asm_file then () else remove_file asmfile; raise x end; if Proc.assemble_file asmfile (prefixname ^ ext_obj) <> 0 then raise(Error(Assembler_error asmfile)); if !keep_asm_file then () else remove_file asmfile (* Error report *) let report_error ppf = function | Assembler_error file -> fprintf ppf "Assembler error, input left in file %a" Location.print_filename file let () = Location.register_error_of_exn (function | Error err -> Some (Location.error_of_printer_file report_error err) | _ -> None )
{ "pile_set_name": "Github" }
// { dg-options "-std=gnu++17" } // { dg-do run { target c++17 } } // Copyright (C) 2011-2020 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. // NOTE: This makes use of the fact that we know how moveable // is implemented on string (via swap). If the implementation changed // this test may begin to fail. #include <string> #include <utility> #include <testsuite_hooks.h> class tstring : public std::basic_string<char> { public: tstring() : std::basic_string<char>() {} tstring(tstring&& s) : std::basic_string<char>(std::move(s)) {} tstring& operator=(tstring&& s) = default; }; void test01() { tstring a, b; a.push_back('1'); b = std::move(a); VERIFY( b.size() == 1 && b[0] == '1' && a.size() == 0 ); tstring c(std::move(b)); VERIFY( c.size() == 1 && c[0] == '1' ); VERIFY( b.size() == 0 ); } int main() { test01(); return 0; }
{ "pile_set_name": "Github" }
/** * Install plugin. */ import Url from './url/index'; import Http from './http/index'; import Promise from './promise'; import Resource from './resource'; import Util, {options} from './util'; function plugin(Vue) { if (plugin.installed) { return; } Util(Vue); Vue.url = Url; Vue.http = Http; Vue.resource = Resource; Vue.Promise = Promise; Object.defineProperties(Vue.prototype, { $url: { get() { return options(Vue.url, this, this.$options.url); } }, $http: { get() { return options(Vue.http, this, this.$options.http); } }, $resource: { get() { return Vue.resource.bind(this); } }, $promise: { get() { return (executor) => new Vue.Promise(executor, this); } } }); } if (typeof window !== 'undefined' && window.Vue) { window.Vue.use(plugin); } export default plugin;
{ "pile_set_name": "Github" }
/*! @file Defines `BOOST_HANA_DISPATCH_IF`. @copyright Louis Dionne 2013-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_DETAIL_DISPATCH_IF_HPP #define BOOST_HANA_DETAIL_DISPATCH_IF_HPP #include <boost/hana/config.hpp> #include <type_traits> BOOST_HANA_NAMESPACE_BEGIN struct deleted_implementation { template <typename ...T> static constexpr auto apply(T&& ...) = delete; }; //! @ingroup group-details //! Dispatch to the given implementation method only when a condition is //! satisfied. //! //! If the condition is satisfied, this macro is equivalent to the type //! `IMPL`. Otherwise, it is equivalent to a type with a deleted static //! function named `apply`. When a tag-dispatching error happens, the //! condition should be false and the deleted static function `apply` //! will prevent the compiler from generating too much garbage. //! //! @note //! When `BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS` is defined, the //! condition is always ignored and this macro expands to the //! implementation only. //! //! @remark //! This must be implemented as a macro, because we don't want the //! condition to be evaluated at all when //! `BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS` is defined. #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS #define BOOST_HANA_DISPATCH_IF(IMPL, ...) \ ::std::conditional_t< \ (__VA_ARGS__), \ IMPL, \ ::boost::hana::deleted_implementation \ > \ /**/ #else #define BOOST_HANA_DISPATCH_IF(IMPL, ...) IMPL #endif BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_DETAIL_DISPATCH_IF_HPP
{ "pile_set_name": "Github" }
# ๅญ—็ฌฆไธฒ๏ค…็š„ๅŸบๆœฌๅค„็†๏งค Sample_text = ''' The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambxiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! ''' #1 ๅฐ†ๅญ—็ฌฆไธฒ๏ค…ๆ ทๆœฌ text โพฅ้‡Œ๏งฉ็š„ better ๅ…จ้ƒจๆ›ฟๆขๆˆ worse text = Sample_text.replace('better','worse') print ('ๅฐ†ๅญ—็ฌฆไธฒไธญๆ‰€ๆœ‰โ€betterโ€œๆ›ฟๆขๆˆโ€worse"', text) #2 ไปŽ็ฌฌ 2 ๆญฅ็š„็ป“ๆžœโพฅ้‡Œ๏งฉ๏ผŒๅฐ†ๅ•่ฏไธญๅŒ…ๅซ ea ็š„ๅ•่ฏๅ‰”้™ค words = text.split() # print (words) filtered_words = [] for word in words: if word.find('ea') < 0: filtered_words.append(word) print('ๅ‰”้™คๅŒ…ๅซea็š„ๅ•่ฏๅŽ็š„ๅญ—็ฌฆไธฒ', filtered_words) #3 ๅฐ†็ฌฌ3ๆญฅ็š„็ป“ๆžœโพฅ้‡Œ๏งฉ็š„ๅญ—โบŸๆฏ่ฟ›โพโผคโผฉๅ†™็ฟป่ฝฌ switched_words = [] for word in filtered_words: switched_words.append(word.swapcase()) print('ๅฐ†ๅคงๅฐๅ†™็ฟป่ฝฌๅŽ็ป“ๆžœ', switched_words) #4 ๅฐ†็ฌฌ4ๆญฅ็š„็ป“ๆžœโพฅๆ‰€ๆœ‰ๅ•่ฏๆŒ‰ aโ€ฆz ๅ‡ๅบๆŽ’ๅˆ—๏ฆœ print('ๆŒ‰ aโ€ฆzๅ‡ๅบๆŽ’ๅˆ—', sorted(switched_words)) #print('ๆŒ‰ aโ€ฆzๅ‡ๅบๆŽ’ๅˆ—', sorted(switched_words, reverse=True))
{ "pile_set_name": "Github" }
package com.sihai.wx.config; /** * * @Title: Config.java * @Package com.sihai.wx.util * @Description: ๅพฎไฟกๆ”ฏไป˜็š„ไธ€ไบ›ๅ‚ๆ•ฐ้…็ฝฎ * Copyright: Copyright (c) 2016 * Company:FURUIBOKE.SCIENCE.AND.TECHNOLOGY * * @author leechenxiang * @date 2017ๅนด8ๆœˆ31ๆ—ฅ ไธ‹ๅˆ2:54:50 * @version V1.0 */ public class WeChatConfig { // public static final String APPID = "xxxxxxxxxxxxxxxx"; // ๅ…ฌไผ—่ดฆๅทID // public static final String MCH_ID = "yyyyyyyyyyyyyyy"; // ๅ•†ๆˆทๅท // public static final String KEY = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"; // ๅ•†ๆˆทๅฏ†้’ฅ // APPๅ’Œ็ฝ‘้กตๆ”ฏไป˜ๆไบค็”จๆˆท็ซฏip, Nativeๆ”ฏไป˜ๅกซ่ฐƒ็”จๅพฎไฟกๆ”ฏไป˜API็š„ๆœบๅ™จIP, ๅณ๏ผšๆœๅŠกๅ™จipๅœฐๅ€ public static final String SPBILL_CREATE_IP = "127.0.0.1"; // ๆŽฅๆ”ถๅพฎไฟกๆ”ฏไป˜ๅผ‚ๆญฅ้€š็Ÿฅๅ›ž่ฐƒๅœฐๅ€๏ผŒ้€š็Ÿฅurlๅฟ…้กปไธบ็›ดๆŽฅๅฏ่ฎฟ้—ฎ็š„url๏ผŒไธ่ƒฝๆบๅธฆๅ‚ๆ•ฐใ€‚๏ผˆ้œ€่ฆ้…็ฝฎ๏ผ‰ public static final String NOTIFY_URL = "http://1s7p978583.iok.la/wxpay/notify.action"; // ๆ”ฏไป˜ๆ–นๅผ๏ผŒๅ–ๅ€ผๅฆ‚ไธ‹๏ผšJSAPI๏ผŒNATIVE๏ผŒAPP public static final String TRADE_TYPE = "NATIVE"; // ๅพฎไฟกๆ”ฏไป˜ - ็ปŸไธ€ไธ‹ๅ•ๅœฐๅ€ public static final String PLACEANORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder"; }
{ "pile_set_name": "Github" }
package extracells.integration.buildcraft.tools import extracells.api.ECApi object BuildcraftTools { def init: Unit = { ECApi.instance.registerWrenchHandler(WrenchHandler) } }
{ "pile_set_name": "Github" }
// // Copyright (c) 2004-2020 Jaroslaw Kowalski <[email protected]>, Kim Christensen, Julian Verdurmen // // 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 Jaroslaw Kowalski 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. // namespace NLog.Targets.Wrappers { /// <summary> /// The action to be taken when the queue overflows. /// </summary> public enum AsyncTargetWrapperOverflowAction { /// <summary> /// Grow the queue. /// </summary> Grow, /// <summary> /// Discard the overflowing item. /// </summary> Discard, /// <summary> /// Block until there's more room in the queue. /// </summary> Block, } }
{ "pile_set_name": "Github" }
/* * scrollgrid1D.c - 1D scroll grid attractor * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* 1D scroll grid attractor for more information see: Yalcin M., Ozoguz S., Suykens J.A.K., Vandewalle J., ``Families of Scroll Grid Attractors'', International Journal of Bifurcation and Chaos, vol. 12, no. 1, Jan. 2002, pp. 23-41. this file implements a digital variant of the method introduced in the paper, so that it can be used as a parametrizable, bounded chatotic oscillator. in short it is a switched linear system, with some added hard limiting to convert unstable oscillations into stable ones. */ #include "m_pd.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "filters.h" typedef struct scrollgrid1Dctl { t_float c_x, c_y, c_z; /* state */ } t_scrollgrid1Dctl; typedef struct scrollgrid1D { t_object x_obj; t_float x_f; t_scrollgrid1Dctl x_ctl; } t_scrollgrid1D; static inline t_float _fixedpoint(t_float x, int n) { int ix = (x + 0.5); if (ix < 0) ix = 0; else if (ix >= n) ix = n-1; return (t_float)ix; } static inline t_float _sat(t_float x, t_float upper) { t_float lower = -1.0; if (x < lower) x = lower; else if (x > upper) x = upper; return x; } static t_int *scrollgrid1D_perform(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *t1 = (t_float *)(w[4]); t_float *t2 = (t_float *)(w[5]); t_float *order = (t_float *)(w[6]); t_float *outx = (t_float *)(w[7]); t_float *outy = (t_float *)(w[8]); t_float *outz = (t_float *)(w[9]); t_scrollgrid1Dctl *ctl = (t_scrollgrid1Dctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float inv_sr = 1.0 /sys_getsr(); t_float state[3] = {ctl->c_x, ctl->c_y, ctl->c_z}; t_float c,f; t_float pole[2], r1, r2; t_int o; t_float x,y,z; for (i=0; i<n; i++){ /* get params */ r1 = exp(1000.0 * inv_sr / (0.01 + fabs(*t1++))); r2 = exp(-1000.0 * inv_sr / (0.01 + fabs(*t2++))); f = *freq++; o = (int)(*order++); if (o < 2) o = 2; pole[0] = r1 * cos(2.0 * M_PI * inv_sr * f); pole[1] = r1 * sin(2.0 * M_PI * inv_sr * f); /* debug */ //post("%f", r1); /* base transform + clipping to prevent blowup */ /* projection onto axis containing fixed */ x = _sat(0.5 * (state[0] - state[2]), (t_float)o); /* the "pure" oscillation axis */ y = _sat(0.5 * state[1], 1.0); /* orthogonal complement of x */ z = _sat(0.5 * (state[0] + state[2]), 1.0); /* output */ *outx++ = x; *outy++ = y; *outz++ = z; /* calculate fixed point location (c, 0, -c) */ c = _fixedpoint(x, o); /* inverse base transform */ state[0] = x + z; state[1] = 2.0 * y; state[2] = -x + z; /* update transformed linear system around unstable fixed point */ state[0] -= c; state[2] += c; vcmul2(state, pole); state[2] *= r2; state[0] += c; state[2] -= c; } ctl->c_x = state[0]; ctl->c_y = state[1]; ctl->c_z = state[2]; return (w+10); } static void scrollgrid1D_dsp(t_scrollgrid1D *x, t_signal **sp) { int n = sp[0]->s_n; int k; dsp_add(scrollgrid1D_perform, 9, &x->x_ctl, (t_int)sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, sp[5]->s_vec, sp[6]->s_vec); } static void scrollgrid1D_free(t_scrollgrid1D *x) { } static void scrollgrid1D_reset(t_scrollgrid1D *x) { x->x_ctl.c_x = 1; x->x_ctl.c_y = 1; x->x_ctl.c_z = 1; } t_class *scrollgrid1D_class; static void *scrollgrid1D_new(t_floatarg algotype) { t_scrollgrid1D *x = (t_scrollgrid1D *)pd_new(scrollgrid1D_class); /* ins */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); /* outs */ outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); /* init data */ scrollgrid1D_reset(x); return (void *)x; } void scrollgrid1D_tilde_setup(void) { //post("scrollgrid1D~ v0.1"); scrollgrid1D_class = class_new(gensym("scrollgrid1D~"), (t_newmethod)scrollgrid1D_new, (t_method)scrollgrid1D_free, sizeof(t_scrollgrid1D), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(scrollgrid1D_class, t_scrollgrid1D, x_f); class_addmethod(scrollgrid1D_class, (t_method)scrollgrid1D_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(scrollgrid1D_class, (t_method)scrollgrid1D_reset, gensym("reset"), 0); }
{ "pile_set_name": "Github" }
/* * Gopher protocol * * Copyright (c) 2009 Toshimitsu Kimura * * based on libavformat/http.c, Copyright (c) 2000, 2001 Fabrice Bellard * * This file is part of FFmpeg. * * FFmpeg 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. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/avstring.h" #include "avformat.h" #include "internal.h" #include "network.h" typedef struct { URLContext *hd; } GopherContext; static int gopher_write(URLContext *h, const uint8_t *buf, int size) { GopherContext *s = h->priv_data; return url_write(s->hd, buf, size); } static int gopher_connect(URLContext *h, const char *path) { char buffer[1024]; if (!*path) return AVERROR(EINVAL); switch (*++path) { case '5': case '9': path = strchr(path, '/'); if (!path) return AVERROR(EINVAL); break; default: av_log(NULL, AV_LOG_WARNING, "Gopher protocol type '%c' not supported yet!\n", *path); return AVERROR(EINVAL); } /* send gopher sector */ snprintf(buffer, sizeof(buffer), "%s\r\n", path); if (gopher_write(h, buffer, strlen(buffer)) < 0) return AVERROR(EIO); return 0; } static int gopher_close(URLContext *h) { GopherContext *s = h->priv_data; if (s->hd) { url_close(s->hd); s->hd = NULL; } av_freep(&h->priv_data); return 0; } static int gopher_open(URLContext *h, const char *uri, int flags) { GopherContext *s; char hostname[1024], auth[1024], path[1024], buf[1024]; int port, err; h->is_streamed = 1; s = av_malloc(sizeof(GopherContext)); if (!s) { return AVERROR(ENOMEM); } h->priv_data = s; /* needed in any case to build the host string */ ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, path, sizeof(path), uri); if (port < 0) port = 70; ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); s->hd = NULL; err = url_open(&s->hd, buf, URL_RDWR); if (err < 0) goto fail; if ((err = gopher_connect(h, path)) < 0) goto fail; return 0; fail: gopher_close(h); return err; } static int gopher_read(URLContext *h, uint8_t *buf, int size) { GopherContext *s = h->priv_data; int len = url_read(s->hd, buf, size); return len; } URLProtocol gopher_protocol = { "gopher", gopher_open, gopher_read, gopher_write, NULL, /*seek*/ gopher_close, };
{ "pile_set_name": "Github" }
.modal .modal-dialog { position: absolute; top: 45%; left: 50%; -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%) } .add-self .modal-body,.requests .modal-body { height: 500px; overflow: auto; padding: 0; } .add-self .modal-body ul,.requests .modal-body ul { margin: 0; list-style: none; padding: 5px; } .add-self .modal-body ul .default,.requests .modal-body ul .default { padding-top: 200px; font-size: 15px; color: #999; text-align: center } .add-self .modal-body ul .default a,.requests .modal-body ul .default a { color: #3194d0 } .add-self .modal-body li,.requests .modal-body li { position: relative; padding: 20px; border-bottom: 1px solid #f0f0f0; line-height: normal } .add-self .modal-body .avatar-collection,.requests .modal-body .avatar-collection { margin-right: 5px; vertical-align: middle; display: inline-block } .add-self .modal-body .collection-info,.requests .modal-body .collection-info { vertical-align: middle; display: inline-block } .add-self .modal-body .collection-name,.requests .modal-body .collection-name { font-size: 15px; font-weight: 700; color: #333; display: block } .add-self .modal-body .collection-name:hover,.requests .modal-body .collection-name:hover { color: #2f2f2f } .add-self .modal-body .meta,.requests .modal-body .meta { font-size: 12px; color: #969696; display: inline-block } .add-self .modal-body .author-name,.add-self .modal-body .author-name:hover,.requests .modal-body .author-name,.requests .modal-body .author-name:hover { color: #3194d0 } .add-self .modal-body .follow,.add-self .modal-body .follow-cancel,.add-self .modal-body .follow-each,.add-self .modal-body .following,.requests .modal-body .follow,.requests .modal-body .follow-cancel,.requests .modal-body .follow-each,.requests .modal-body .following { float: right; margin-top: 12.5px; padding: 5px 20px; width: 100px; font-size: 15px } .add-self .modal-body .search,.requests .modal-body .search { padding: 20px 22px 0 } .add-self .modal-body .search input,.requests .modal-body .search input { width: 100%; padding: 7px 18px; background-color: hsla(0,0%,71%,.25); border: none; border-radius: 40px; font-size: 15px; outline: none; } .add-self .modal-body .search a,.requests .modal-body .search a { position: absolute; top: 25px; right: 37px; color: #969696; cursor: pointer; } .add-self .modal-body .status,.requests .modal-body .status { font-size: 12px; vertical-align: middle } .add-self .modal-body span.has-add,.requests .modal-body span.has-add { color: #42c02e } .add-self .modal-body .action-btn,.requests .modal-body .action-btn { position: absolute; top: 50%; right: 20px; margin-top: -12px; padding: 2px 8px; font-size: 13px; border-radius: 12px; line-height: normal; cursor: pointer; } .add-self .modal-body .push,.add-self .modal-body .repush,.requests .modal-body .push,.requests .modal-body .repush { color: #42c02e; border: 1px solid #42c02e } .add-self .modal-body .push:hover,.add-self .modal-body .repush:hover,.requests .modal-body .push:hover,.requests .modal-body .repush:hover { background-color: rgba(66,192,46,.05) } .add-self .modal-body .revoke,.requests .modal-body .revoke { color: #969696; border: 1px solid #969696 } .add-self .modal-body .revoke:hover,.requests .modal-body .revoke:hover { background-color: hsla(0,0%,71%,.05) } .add-self .modal-body .remove,.requests .modal-body .remove { color: #ea6f5a; border: 1px solid #ea6f5a } .add-self .modal-body .remove:hover,.requests .modal-body .remove:hover { background-color: rgba(236,97,73,.05) } .add-self .modal-footer,.requests .modal-footer { display: none } .add-self .load-more,.requests .load-more { width: 200px; margin-bottom: 30px } .add-self .new-collection-btn,.requests .new-collection-btn { padding-left: 10px; font-size: 13px; font-weight: 400; vertical-align: middle } .add-self .new-collection-btn a,.requests .new-collection-btn a { color: #42c02e } .add-self a:hover { text-decoration: none; } .avatar-collection { width: 48px; height: 48px; display: block; cursor: pointer } .avatar-collection img { width: 100%; height: 100%; border: 1px solid #ddd; border-radius: 10% } .modal .modal-content { box-shadow: 0 5px 25px rgba(0,0,0,.1); -webkit-box-shadow: 0 5px 25px rgba(0,0,0,.1); border: 1px solid rgba(0,0,0,.1) } .modal,.modal-open { overflow: hidden } .modal { background-color: hsla(0,0%,100%,.7); } .modal.fade .modal-dialog { -webkit-transform: translateY(-25%); transform: translateY(-25%); transition: -webkit-transform .3s ease-out; transition: transform .3s ease-out; transition: transform .3s ease-out,-webkit-transform .3s ease-out } .modal.in .modal-dialog { -webkit-transform: translate(0); transform: translate(0) } .modal-dialog { position: relative; width: auto; margin: 10px } .modal-content { position: relative; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; box-shadow: 0 3px 9px rgba(0,0,0,.5); background-clip: padding-box; outline: 0 } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000 } .modal-backdrop.fade { opacity: 0; filter: alpha(opacity=0) } .modal-backdrop.in { opacity: .5; filter: alpha(opacity=50) } .modal-header { padding: 15px; border-bottom: 1px solid #e5e5e5 } .modal-header:after,.modal-header:before { content: " "; display: table } .modal-header:after { clear: both } .modal-header .close { margin-top: -2px; color: #000; opacity: .2; outline: none; } .modal-header .close:hover { opacity: .4; } .modal-title { margin: 0; line-height: 1.42857 } .modal-body { position: relative; padding: 15px } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5 } .modal-footer:after,.modal-footer:before { content: " "; display: table } .modal-footer:after { clear: both } .modal-footer .btn+.btn { margin-left: 5px; margin-bottom: 0 } .modal-footer .btn-group .btn+.btn { margin-left: -1px } .modal-footer .btn-block+.btn-block { margin-left: 0 } .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll } .contribute-modal .modal-header .notice,.follow-list .modal-header .notice { font-size: 13px; vertical-align: middle; color: #969696 } .contribute-modal .modal-header div,.follow-list .modal-header div { margin: 20px 0 0; position: relative } .contribute-modal .modal-header div .search-input,.follow-list .modal-header div .search-input { padding: 0 40px 0 20px; width: 100%; height: 35px; font-size: 14px; background-color: hsla(0,0%,71%,.2); border: none; border-radius: 40px; outline: none; } .contribute-modal .modal-header div .search-btn,.follow-list .modal-header div .search-btn { position: absolute; top: 2px; right: 6px; width: 30px; height: 30px; color: #969696; text-align: center; cursor: pointer; text-decoration: none; } .contribute-modal .modal-header div .ic-search,.follow-list .modal-header div .ic-search { margin: 4px -1px 0 0; display: block } .contribute-modal .modal-body,.follow-list .modal-body { padding: 0; height: 460px; overflow: auto } .contribute-modal .modal-body ul,.follow-list .modal-body ul { margin: 0; list-style: none; padding-left: 0; } .contribute-modal .modal-body ul .default,.follow-list .modal-body ul .default { padding-top: 200px; font-size: 15px; color: #999; text-align: center } .contribute-modal .modal-body ul .default a,.follow-list .modal-body ul .default a { color: #3194d0 } .contribute-modal .modal-body li,.follow-list .modal-body li { display: block!important; position: relative; padding: 20px 100px 20px 25px; font-size: 15px; border-bottom: 1px solid #e6e6e6 } .contribute-modal .modal-body .note-name,.follow-list .modal-body .note-name { display: inherit; vertical-align: middle; max-width: 85% } .contribute-modal .modal-body .status,.follow-list .modal-body .status { font-size: 13px; vertical-align: middle } .contribute-modal .modal-body span.has-add,.contribute-modal .modal-body span.reject,.contribute-modal .modal-body span.waiting,.follow-list .modal-body span.has-add,.follow-list .modal-body span.reject,.follow-list .modal-body span.waiting { color: #969696 } .contribute-modal .modal-body .action-btn,.follow-list .modal-body .action-btn { position: absolute; top: 50%; right: 20px; margin-top: -12px; padding: 2px 8px; font-size: 13px; border-radius: 20px; line-height: normal; text-decoration: none; cursor: pointer; } .contribute-modal .modal-body .push,.contribute-modal .modal-body .repush,.follow-list .modal-body .push,.follow-list .modal-body .repush { color: #42c02e; border: 1px solid #42c02e } .contribute-modal .modal-body .push:hover,.contribute-modal .modal-body .repush:hover,.follow-list .modal-body .push:hover,.follow-list .modal-body .repush:hover { background-color: rgba(66,192,46,.05) } .contribute-modal .modal-body .revoke,.follow-list .modal-body .revoke { color: #969696; border: 1px solid #969696 } .contribute-modal .modal-body .revoke:hover,.follow-list .modal-body .revoke:hover { background-color: hsla(0,0%,71%,.05) } .contribute-modal .modal-body .remove,.follow-list .modal-body .remove { color: #ea6f5a; border: 1px solid #ea6f5a } .contribute-modal .modal-body .remove:hover,.follow-list .modal-body .remove:hover { background-color: rgba(236,97,73,.05) } .contribute-modal .modal-footer,.follow-list .modal-footer { display: none } .contribute-modal .new-note-btn,.follow-list .new-note-btn { padding-left: 10px; font-size: 13px; font-weight: 400; color: #42c02e; vertical-align: middle } .modal-notes-placeholder { padding: 25px 20px 25px 25px; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; } .modal-notes-placeholder .text { width: 40%; height: 15px; background-color: #eaeaea; animation: shortLoading 1s ease-in-out -.5s infinite; -webkit-animation: shortLoading 1s ease-in-out -.5s infinite; -moz-animation: shortLoading 1s ease-in-out -.5s infinite; -o-animation: shortLoading 1s ease-in-out -.5s infinite; -ms-animation: shortLoading 1s ease-in-out -.5s infinite } .modal-notes-placeholder .btn { cursor: default!important; margin: -18px 0 0!important; float: right; width: 44px; height: 24px; background-color: #eaeaea; border-radius: 20px } .modal-collections-placeholder { padding-bottom: 20px } .modal-collections-placeholder .avatar { position: absolute; cursor: default!important; margin: 20px 0 0 20px; width: 48px; height: 48px; background-color: #eaeaea; border-radius: 5px } .modal-collections-placeholder .wrap { padding: 28px 20px 20px 78px!important; border-bottom: 1px solid #f0f0f0 } .modal-collections-placeholder .wrap .btn { cursor: default!important; margin-top: 5px; float: right; width: 38px; height: 24px; background-color: #eaeaea; border-radius: 4px } .modal-collections-placeholder .wrap .name { position: inherit!important; width: 30px; height: 15px; background-color: #eaeaea } .modal-collections-placeholder .wrap .text { margin: 7px 0; width: 40%; height: 12px; background-color: #eaeaea; animation: shortLoading 1s ease-in-out -.5s infinite; -webkit-animation: shortLoading 1s ease-in-out -.5s infinite; -moz-animation: shortLoading 1s ease-in-out -.5s infinite; -o-animation: shortLoading 1s ease-in-out -.5s infinite; -ms-animation: shortLoading 1s ease-in-out -.5s infinite } @media (max-width: 768px) { .modal-dialog { width: 340px; } } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { box-shadow: 0 5px 15px rgba(0,0,0,.5) } .modal-sm { width: 300px } } @media (min-width: 992px) { .modal-lg { width:900px } }
{ "pile_set_name": "Github" }
#include "Cursors.h" #include "Laptop.h" #include "AIMLinks.h" #include "AIM.h" #include "VObject.h" #include "WordWrap.h" #include "Text.h" #include "Multi_Language_Graphic_Utils.h" #include "Button_System.h" #include "Video.h" #include "VSurface.h" #include "Font_Control.h" #define AIM_LINK_TITLE_FONT FONT14ARIAL #define AIM_LINK_TITLE_COLOR AIM_GREEN #define AIM_LINK_NUM_LINKS 3 #define AIM_LINK_LINK_OFFSET_X 94 #define AIM_LINK_LINK_OFFSET_Y 94//90 #define AIM_LINK_LINK_WIDTH 420 #define AIM_LINK_LINK_HEIGHT 70 #define AIM_LINK_BOBBY_LINK_X LAPTOP_SCREEN_UL_X + 40 #define AIM_LINK_BOBBY_LINK_Y LAPTOP_SCREEN_WEB_UL_Y + 91 #define AIM_LINK_FUNERAL_LINK_X AIM_LINK_BOBBY_LINK_X #define AIM_LINK_FUNERAL_LINK_Y AIM_LINK_BOBBY_LINK_Y + AIM_LINK_LINK_OFFSET_Y #define AIM_LINK_INSURANCE_LINK_X AIM_LINK_BOBBY_LINK_X #define AIM_LINK_INSURANCE_LINK_Y AIM_LINK_FUNERAL_LINK_Y + AIM_LINK_LINK_OFFSET_Y #define AIM_LINK_TITLE_X IMAGE_OFFSET_X + 149 #define AIM_LINK_TITLE_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 10 #define AIM_LINK_TITLE_WIDTH AIM_SYMBOL_WIDTH static SGPVObject* guiBobbyLink; static SGPVObject* guiFuneralLink; static SGPVObject* guiInsuranceLink; static UINT8 const gubLinkPages[] = { BOBBYR_BOOKMARK, FUNERAL_BOOKMARK, INSURANCE_BOOKMARK }; //Clicking on guys Face static MOUSE_REGION gSelectedLinkRegion[AIM_LINK_NUM_LINKS]; static void SelectLinkRegionCallBack(MOUSE_REGION* pRegion, INT32 iReason); void EnterAimLinks() { InitAimDefaults(); InitAimMenuBar(); // Load the Bobby link graphic. guiBobbyLink = AddVideoObjectFromFile(GetMLGFilename(MLG_BOBBYRAYLINK)); // Load the Funeral graphic. guiFuneralLink = AddVideoObjectFromFile(GetMLGFilename(MLG_MORTUARYLINK)); // Load the Insurance graphic. guiInsuranceLink = AddVideoObjectFromFile(GetMLGFilename(MLG_INSURANCELINK)); UINT16 const x = STD_SCREEN_X + AIM_LINK_LINK_OFFSET_X; UINT16 y = AIM_LINK_BOBBY_LINK_Y; UINT8 const* page = gubLinkPages; FOR_EACHX(MOUSE_REGION, i, gSelectedLinkRegion, y += AIM_LINK_LINK_OFFSET_Y) { MOUSE_REGION& r = *i; MSYS_DefineRegion(&r, x, y, x + AIM_LINK_LINK_WIDTH, y + AIM_LINK_LINK_HEIGHT, MSYS_PRIORITY_HIGH, CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack); MSYS_SetRegionUserData(&r, 0, *page++); } RenderAimLinks(); } void ExitAimLinks() { RemoveAimDefaults(); DeleteVideoObject(guiBobbyLink); DeleteVideoObject(guiFuneralLink); DeleteVideoObject(guiInsuranceLink); FOR_EACH(MOUSE_REGION, i, gSelectedLinkRegion) MSYS_RemoveRegion(&*i); ExitAimMenuBar(); } void RenderAimLinks() { DrawAimDefaults(); DisableAimButton(); BltVideoObject(FRAME_BUFFER, guiBobbyLink, 0, AIM_LINK_BOBBY_LINK_X, AIM_LINK_BOBBY_LINK_Y); BltVideoObject(FRAME_BUFFER, guiFuneralLink, 0, AIM_LINK_FUNERAL_LINK_X, AIM_LINK_FUNERAL_LINK_Y); BltVideoObject(FRAME_BUFFER, guiInsuranceLink, 0, AIM_LINK_INSURANCE_LINK_X, AIM_LINK_INSURANCE_LINK_Y); //Draw Link Title DrawTextToScreen(AimLinkText, AIM_LINK_TITLE_X, AIM_LINK_TITLE_Y, AIM_LINK_TITLE_WIDTH, AIM_LINK_TITLE_FONT, AIM_LINK_TITLE_COLOR, FONT_MCOLOR_BLACK, CENTER_JUSTIFIED); MarkButtonsDirty( ); RenderWWWProgramTitleBar( ); InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y); } static void SelectLinkRegionCallBack(MOUSE_REGION* pRegion, INT32 iReason) { if (iReason & MSYS_CALLBACK_REASON_LBUTTON_UP) { UINT32 gNextLaptopPage; gNextLaptopPage = MSYS_GetRegionUserData( pRegion, 0 ); GoToWebPage( gNextLaptopPage ); } }
{ "pile_set_name": "Github" }
๏ปฟusing Xamarin.Forms; namespace Xamarin.Platform { public interface ITextInput : IText { Keyboard Keyboard { get; } bool IsSpellCheckEnabled { get; } int MaxLength { get; } string Placeholder { get; } Color PlaceholderColor { get; } bool IsReadOnly { get; } } }
{ "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_25) on Thu Jan 01 17:43:59 PST 2015 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>Uses of Class com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.Builder (jackson-databind 2.5.0 API)</title> <meta name="date" content="2015-01-01"> <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 com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.Builder (jackson-databind 2.5.0 API)"; } //--> </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="../../../../../../../com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.Builder.html" title="class in com.fasterxml.jackson.databind.deser.impl">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-all.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?com/fasterxml/jackson/databind/deser/impl/class-use/ExternalTypeHandler.Builder.html" target="_top">Frames</a></li> <li><a href="ExternalTypeHandler.Builder.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 com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.Builder" class="title">Uses of Class<br>com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.Builder</h2> </div> <div class="classUseContainer">No usage of com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.Builder</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="../../../../../../../com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.Builder.html" title="class in com.fasterxml.jackson.databind.deser.impl">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-all.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?com/fasterxml/jackson/databind/deser/impl/class-use/ExternalTypeHandler.Builder.html" target="_top">Frames</a></li> <li><a href="ExternalTypeHandler.Builder.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 ======= --> <p class="legalCopy"><small>Copyright &#169; 2014-2015 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> </body> </html>
{ "pile_set_name": "Github" }
// ISOTOPE GRID var IsotopeGrid = function() { var _init = function() { // BEGIN: ISOTOPE GALLERY 1 INIT // init isotope gallery var $grid1 = $('.c-content-isotope-grid.c-opt-1').imagesLoaded( function() { // init Isotope after all images have loaded $grid1.isotope({ // options... itemSelector: '.c-content-isotope-item', layoutMode: 'packery', fitWidth: true, percentPosition: true, }); }); // END: ISOTOPE GALLERY 1 // BEGIN: ISOTOPE GALLERY 2 INIT // init isotope gallery var $grid2 = $('.c-content-isotope-grid.c-opt-2').imagesLoaded( function() { // init Isotope after all images have loaded $grid2.isotope({ // options... itemSelector: '.c-content-isotope-item', layoutMode: 'packery', fitWidth: true, percentPosition: true, }); }); // END: ISOTOPE GALLERY 2 // BEGIN: ISOTOPE GALLERY 3 INIT // init isotope gallery var $grid3 = $('.c-content-isotope-grid.c-opt-3').imagesLoaded( function() { // init Isotope after all images have loaded $grid3.isotope({ // options... itemSelector: '.c-content-isotope-item', layoutMode: 'packery', fitWidth: true, percentPosition: true, }); }); // END: ISOTOPE GALLERY 3 } return { //main function to initiate the module init: function() { _init(); } }; }(); $(document).ready(function() { IsotopeGrid.init(); });
{ "pile_set_name": "Github" }
// name: Modelica.Electrical.Digital.Examples.DLATREGSRL // teardown_command: rm -f Modelica.Electrical.Digital.Examples.DLATREGSRL_*.mat // keywords: simulation MSL Examples // status: correct // cflags: +simCodeTarget=Cpp // // Simulation Results // Modelica Standard Library // loadModel(Modelica,{"3.2.1"}); simulate(Modelica.Electrical.Digital.Examples.DLATREGSRL, outputFormat="mat"); getErrorString(); res := OpenModelica.Scripting.compareSimulationResults("Modelica.Electrical.Digital.Examples.DLATREGSRL_res.mat", getEnvironmentVar("REFERENCEFILES")+"/msl32/Modelica.Electrical.Digital.Examples.DLATREGSRL.mat", "Modelica.Electrical.Digital.Examples.DLATREGSRL_diff.csv",0.01,0.0001, {"set.y", "data_1.y", "data_0.y", "enable.y", "reset.y", "dLATREGSRL.dataOut[1]", "dLATREGSRL.dataOut[2]"}); // Result: // true // record SimulationResult // resultFile = "Modelica.Electrical.Digital.Examples.DLATREGSRL_res.mat", // simulationOptions = "startTime = 0.0, stopTime = 25.0, numberOfIntervals = 500, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Digital.Examples.DLATREGSRL', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", // messages = "" // end SimulationResult; // "" // {"Files Equal!"} // endResult
{ "pile_set_name": "Github" }
// Radio buttons & checkboxes // By default, multiple choice inputs stack vertically .multiple-choice { display: block; float: none; clear: left; position: relative; padding: 0 0 0 38px; margin-bottom: $gutter-one-third; @include media(tablet) { float: left; } // Absolutely position inputs within label, to allow text to wrap input { position: absolute; cursor: pointer; left: 0; top: 0; width: 38px; height: 38px; z-index: 1; // IE8 doesnโ€™t support pseudoelements, so we donโ€™t want to hide native elements there. @if ($is-ie == false) or ($ie-version == 9) { margin: 0; @include opacity(0); } } label { cursor: pointer; padding: 8px $gutter-one-third 9px 12px; display: block; // remove 300ms pause on mobile -ms-touch-action: manipulation; touch-action: manipulation; @include media(tablet) { float: left; padding-top: 7px; padding-bottom: 7px; } } [type=radio] + label::before { content: ""; border: 2px solid; background: transparent; width: 34px; height: 34px; position: absolute; top: 0; left: 0; @include border-radius(50%); } [type=radio] + label::after { content: ""; border: 10px solid; width: 0; height: 0; position: absolute; top: 9px; left: 9px; @include border-radius(50%); @include opacity(0); } [type=checkbox] + label::before { content: ""; border: 2px solid; background: transparent; width: 34px; height: 34px; position: absolute; top: 0; left: 0; } [type=checkbox] + label::after { content: ""; border: solid; border-width: 0 0 5px 5px; background: transparent; border-top-color: transparent; width: 17px; height: 7px; position: absolute; top: 10px; left: 8px; -moz-transform: rotate(-45deg); // Firefox 15 compatibility -o-transform: rotate(-45deg); // Opera 12.0 compatibility -webkit-transform: rotate(-45deg); // Safari 8 compatibility -ms-transform: rotate(-45deg); // IE9 compatibility transform: rotate(-45deg); @include opacity(0); } // Focused state [type=radio]:focus + label::before { @include box-shadow(0 0 0 4px $focus-colour); } [type=checkbox]:focus + label::before { @include box-shadow(0 0 0 3px $focus-colour); } // Selected state input:checked + label::after { @include opacity(1); } // Disabled state input:disabled { cursor: default; } input:disabled + label { @include opacity(0.5); cursor: default; } &:last-child, &:last-of-type { margin-bottom: 0; } } // To sit multiple choice inputs next to each other, use .inline on parent .inline .multiple-choice { clear: none; @include media (tablet) { margin-bottom: 0; margin-right: $gutter; } }
{ "pile_set_name": "Github" }
package com.jsoniter.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface JsonIgnore { boolean ignoreDecoding() default true; boolean ignoreEncoding() default true; }
{ "pile_set_name": "Github" }
// // VROCameraTextureiOS.cpp // ViroRenderer // // Created by Raj Advani on 3/22/17. // Copyright ยฉ 2017 Viro Media. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "VROCameraTextureiOS.h" #include "VRORenderContext.h" #include "VROFrameSynchronizer.h" #include "VROTextureSubstrate.h" #include "VROLog.h" #include "VROVideoTextureCache.h" #include "VRODriver.h" #include "VROConvert.h" #include "VRODriverOpenGLiOS.h" #include "VROAVCaptureController.h" VROCameraTextureiOS::VROCameraTextureiOS(VROTextureType type) : VROCameraTexture(type) { } VROCameraTextureiOS::~VROCameraTextureiOS() { } bool VROCameraTextureiOS::initCamera(VROCameraPosition position, VROCameraOrientation orientation, std::shared_ptr<VRODriver> driver) { _videoTextureCache = driver->newVideoTextureCache(); _controller = std::make_shared<VROAVCaptureController>(); _controller->initCapture(position, orientation, false, driver); pause(); std::weak_ptr<VROCameraTextureiOS> shared_w = std::dynamic_pointer_cast<VROCameraTextureiOS>(shared_from_this()); std::weak_ptr<VRODriver> driver_w = driver; _controller->setUpdateListener([shared_w, driver_w] (CMSampleBufferRef sampleBuffer, std::vector<float> intrinsics) { std::shared_ptr<VROCameraTextureiOS> texture = shared_w.lock(); std::shared_ptr<VROVideoTextureCache> cache = texture->_videoTextureCache; std::shared_ptr<VRODriver> driver = driver_w.lock(); if (cache && driver) { texture->setSubstrate(0, cache->createTextureSubstrate(sampleBuffer, driver->getColorRenderingMode() != VROColorRenderingMode::NonLinear)); } }); return true; } float VROCameraTextureiOS::getHorizontalFOV() const { return _controller->getHorizontalFOV(); } VROVector3f VROCameraTextureiOS::getImageSize() const { return _controller->getImageSize(); } void VROCameraTextureiOS::pause() { _controller->pause(); } void VROCameraTextureiOS::play() { _controller->play(); } bool VROCameraTextureiOS::isPaused() { return _controller->isPaused(); } CMSampleBufferRef VROCameraTextureiOS::getSampleBuffer() const { return _controller->getSampleBuffer(); } std::vector<float> VROCameraTextureiOS::getCameraIntrinsics() const { return _controller->getCameraIntrinsics(); }
{ "pile_set_name": "Github" }
๏ปฟ//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.239 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace TemperatureLoggerHostApp.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
{ "pile_set_name": "Github" }
; SICP exercise 3.32 ; ; The procedures to be run during each time segment of the agenda are kept in ; a queue. Thus, the procedures for each segment are called in the order in ; which they were added to the agenda (first-in, first-out). Explain why this ; order must be used. In particular, trace the behavior of an and-gate whose ; inputs change from 0, 1 to 1, 0 in the same segment and say how the behavior ; would differ if we stored a segment's procedures in an ordinary list, adding ; and removing procedures only at the front (last in, first out). ; Each action calculates the new result to be set before it is added to the ; queue. If we change 0, 1 to 1, 0, we will add two actions to the queue: ; ; a1: set output to 1 ; a2: set output to 0 ; ; The reason that we set those outputs is because the gate reads the wire ; signals before it puts the action after a specific delay. When we change ; from (0, 1) to (1, 1) it will determine that the output should be 1. We ; immediatelly change (1, 1) to (1, 0) and the action will set the output to ; 0. ; ; That is, assuming, we use a queue. If we use a stack (last in, first out), ; those actions will get executed in reverse order. That is, a2 will set the ; output to 0, after which a1 will set it to 1. In the end, the and gate will ; output erroneous result. ; ; You can run this file to verify. (require r5rs/init) ; Primitive function boxes (define (and-gate a1 a2 output) (define (and-action-procedure) (let ((new-value (logical-and (get-signal a1) (get-signal a2)))) (after-delay and-gate-delay (lambda () (set-signal! output new-value))))) (add-action! a1 and-action-procedure) (add-action! a2 and-action-procedure) 'ok) ; Logical functions (define (logical-and a b) (cond ((and (= a 0) (= b 0)) 0) ((and (= a 0) (= b 1)) 0) ((and (= a 1) (= b 0)) 0) ((and (= a 1) (= b 1)) 1) (else (error "Invalid signals" a b)))) ; Wires (define (make-wire) (let ((signal-value 0) (action-procedures '())) (define (set-my-signal! new-value) (if (not (= signal-value new-value)) (begin (set! signal-value new-value) (call-each action-procedures)) 'done)) (define (accept-action-procedure! proc) (set! action-procedures (cons proc action-procedures))) (define (dispatch m) (cond ((eq? m 'get-signal) signal-value) ((eq? m 'set-signal!) set-my-signal!) ((eq? m 'add-action!) accept-action-procedure!) (else (error "Unknown operation -- WIRE" m)))) dispatch)) (define (call-each procedures) (if (null? procedures) 'done (begin ((car procedures)) (call-each (cdr procedures))))) (define (get-signal wire) (wire 'get-signal)) (define (set-signal! wire new-value) ((wire 'set-signal!) new-value)) (define (add-action! wire action-procedure) ((wire 'add-action!) action-procedure)) ; The agenda (define (make-time-segment time actions) (cons time actions)) (define (segment-time s) (car s)) (define (segment-actions s) (cdr s)) (define (set-segment-actions! s actions) (set-cdr! s actions)) (define (make-agenda) (list 0)) (define (current-time agenda) (car agenda)) (define (set-current-time! agenda time) (set-car! agenda time)) (define (segments agenda) (cdr agenda)) (define (set-segments! agenda segments) (set-cdr! agenda segments)) (define (first-segment agenda) (car (segments agenda))) (define (rest-segments agenda) (cdr (segments agenda))) (define (empty-agenda? agenda) (null? (segments agenda))) (define (add-to-agenda! time action agenda) (define (belongs-before? segments) (or (null? segments) (< time (segment-time (car segments))))) (define (make-new-time-segment time action) (make-time-segment time (list action))) (define (add-to-segments! segments) (if (= (segment-time (car segments)) time) (set-segment-actions! (car segments) (cons action (segment-actions (car segments)))) (let ((rest (cdr segments))) (if (belongs-before? rest) (set-cdr! segments (cons (make-new-time-segment time action) rest)) (add-to-segments! rest))))) (let ((segments (segments agenda))) (if (belongs-before? segments) (set-segments! agenda (cons (make-new-time-segment time action) segments)) (add-to-segments! segments)))) (define (remove-first-agenda-item! agenda) (set-segment-actions! (first-segment agenda) (cdr (segment-actions (first-segment agenda)))) (if (null? (segment-actions (first-segment agenda))) (set-segments! agenda (rest-segments agenda)) 'done)) (define (first-agenda-item agenda) (if (empty-agenda? agenda) (error "Agenda is empty -- FIRST-AGENDA-ITEM") (let ((first-seg (first-segment agenda))) (set-current-time! agenda (segment-time first-seg)) (car (segment-actions first-seg))))) ; Delays (define inverter-delay 2) (define and-gate-delay 3) (define or-gate-delay 5) ; Simulation infrastructure (define the-agenda (make-agenda)) (define (after-delay delay action) (add-to-agenda! (+ delay (current-time the-agenda)) action the-agenda)) (define (propagate) (if (empty-agenda? the-agenda) 'done (let ((first-item (first-agenda-item the-agenda))) (first-item) (remove-first-agenda-item! the-agenda) (propagate)))) (define (probe name wire) (add-action! wire (lambda () (display name) (display " ") (display (current-time the-agenda)) (display " New-value = ") (display (get-signal wire)) (newline)))) (define input-1 (make-wire)) (define input-2 (make-wire)) (define output (make-wire)) (define carry (make-wire)) (probe 'output output) (and-gate input-1 input-2 output) (set-signal! input-1 0) (set-signal! input-2 1) (propagate) (set-signal! input-1 1) (set-signal! input-2 0) (propagate)
{ "pile_set_name": "Github" }
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> <object> <spriteName>spr_sledgebro</spriteName> <solid>0</solid> <visible>-1</visible> <depth>0</depth> <persistent>0</persistent> <parentName>obj_deactenemyparent</parentName> <maskName>spr_enemymasktall</maskName> <events> <event eventtype="0" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Heavy duty hammer throwing dude //How vulnerable is this enemy to various items? hardness = 0 //How vulnerable is this enemy to Mario? stomp = 0 //Facing direction direct = -1 //Animate image_speed = 0.15 //Move left hspeed = -0.5 //Move back and forth alarm[0] = 70 //Jump alarm[1] = 150 //Fire projectiles alarm[2] = 25 //Whether he can go through solids throughsolid = 0 //Whether the thwomp sound should be played ready = 0 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="5"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Stop jumping through solids throughsolid = 0 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="4"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Jump through solids throughsolid = 1 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="3"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Throw hammers with instance_create(x,y,obj_brohammer) hspeed = 1.5*other.direct //Play throw sound audio_play_sound(snd_hammer,0,0) //Change sprite back sprite_index = spr_sledgebro //Throw more alarm[2] = 75 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="2"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Get ready to throw hammers //If he is on the ground, prepare to throw if gravity = 0 { sprite_index = spr_sledgebro_throw alarm[3] = 25 } //Otherwise, wait else alarm[2] = 1 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="1"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Jump //Jump higher if a block is above if collision_rectangle(bbox_left,bbox_top-24,bbox_right,bbox_top-24,obj_blockparent,0,0) { vspeed = -7 alarm[4] = 2 alarm[5] = 16 } else vspeed = -4 //Boost jump y-- //Gravity gravity = 0.25 //If a block is below, jump through it if collision_rectangle(bbox_left,bbox_bottom+8,bbox_right,bbox_bottom+8,obj_blockparent,0,0) { alarm[4] = 28 alarm[5] = 45 } ///Play thwomp sound after landing ready = 1 //Jump again alarm[1] = 150 </string> </argument> </arguments> </action> </event> <event eventtype="2" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Move back and forth hspeed = -hspeed alarm[0] = 70 </string> </argument> </arguments> </action> </event> <event eventtype="3" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Bro logic //Floor collisions if he is not jumping through if throughsolid = 0 event_user(4) //Cap fall speed else if vspeed &gt; 4 vspeed = 4 //Play thwomp sound when landing if ready = 1 and gravity = 0 { audio_play_sound(snd_thwomp,0,0) ready = 0 } //Face Mario if instance_exists(obj_mario) { if x &gt; obj_mario.x direct = -1 else direct = 1 } </string> </argument> </arguments> </action> </event> <event eventtype="8" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Draw Sledge Bro draw_sprite_ext(sprite_index,image_index,round(x),y,direct,1,0,c_white,1) </string> </argument> </arguments> </action> </event> </events> <PhysicsObject>0</PhysicsObject> <PhysicsObjectSensor>0</PhysicsObjectSensor> <PhysicsObjectShape>0</PhysicsObjectShape> <PhysicsObjectDensity>0.5</PhysicsObjectDensity> <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution> <PhysicsObjectGroup>0</PhysicsObjectGroup> <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping> <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping> <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction> <PhysicsObjectAwake>-1</PhysicsObjectAwake> <PhysicsObjectKinematic>0</PhysicsObjectKinematic> <PhysicsShapePoints> <point>12,0</point> <point>16,16</point> </PhysicsShapePoints> </object>
{ "pile_set_name": "Github" }
// to see it compile #include "CondFormats/CastorObjects/interface/CastorSaturationCorrs.h"
{ "pile_set_name": "Github" }
import { Locale } from './constructor'; var proto = Locale.prototype; import { calendar } from './calendar'; import { longDateFormat } from './formats'; import { invalidDate } from './invalid'; import { ordinal } from './ordinal'; import { preParsePostFormat } from './pre-post-format'; import { relativeTime, pastFuture } from './relative'; import { set } from './set'; proto.calendar = calendar; proto.longDateFormat = longDateFormat; proto.invalidDate = invalidDate; proto.ordinal = ordinal; proto.preparse = preParsePostFormat; proto.postformat = preParsePostFormat; proto.relativeTime = relativeTime; proto.pastFuture = pastFuture; proto.set = set; // Month import { localeMonthsParse, localeMonths, localeMonthsShort, monthsRegex, monthsShortRegex } from '../units/month'; proto.months = localeMonths; proto.monthsShort = localeMonthsShort; proto.monthsParse = localeMonthsParse; proto.monthsRegex = monthsRegex; proto.monthsShortRegex = monthsShortRegex; // Week import { localeWeek, localeFirstDayOfYear, localeFirstDayOfWeek } from '../units/week'; proto.week = localeWeek; proto.firstDayOfYear = localeFirstDayOfYear; proto.firstDayOfWeek = localeFirstDayOfWeek; // Day of Week import { localeWeekdaysParse, localeWeekdays, localeWeekdaysMin, localeWeekdaysShort, weekdaysRegex, weekdaysShortRegex, weekdaysMinRegex } from '../units/day-of-week'; proto.weekdays = localeWeekdays; proto.weekdaysMin = localeWeekdaysMin; proto.weekdaysShort = localeWeekdaysShort; proto.weekdaysParse = localeWeekdaysParse; proto.weekdaysRegex = weekdaysRegex; proto.weekdaysShortRegex = weekdaysShortRegex; proto.weekdaysMinRegex = weekdaysMinRegex; // Hours import { localeIsPM, localeMeridiem } from '../units/hour'; proto.isPM = localeIsPM; proto.meridiem = localeMeridiem;
{ "pile_set_name": "Github" }
// +build !linux,!freebsd freebsd,!cgo package mount // These flags are unsupported. const ( BIND = 0 DIRSYNC = 0 MANDLOCK = 0 NOATIME = 0 NODEV = 0 NODIRATIME = 0 NOEXEC = 0 NOSUID = 0 UNBINDABLE = 0 RUNBINDABLE = 0 PRIVATE = 0 RPRIVATE = 0 SHARED = 0 RSHARED = 0 SLAVE = 0 RSLAVE = 0 RBIND = 0 RELATIME = 0 RELATIVE = 0 REMOUNT = 0 STRICTATIME = 0 SYNCHRONOUS = 0 RDONLY = 0 )
{ "pile_set_name": "Github" }
# The MIT License # # Copyright (c) 2018 suren <[email protected]> # # 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. Apply=Zastosuj
{ "pile_set_name": "Github" }
""" This plot displays the audio spectrum from the microphone. Based on updating_plot.py """ # Major library imports import pyaudio from numpy import zeros, linspace, short, fromstring, transpose, array from scipy import fft # Enthought library imports from enable.api import Window, Component, ComponentEditor from traits.api import HasTraits, Instance, List from traitsui.api import Item, Group, View, Handler from pyface.timer.api import Timer # Chaco imports from chaco.api import (Plot, ArrayPlotData, HPlotContainer, VPlotContainer, AbstractMapper, LinePlot, LinearMapper, DataRange1D) NUM_SAMPLES = 1024 SAMPLING_RATE = 11025 SPECTROGRAM_LENGTH = 50 class WaterfallRenderer(LinePlot): # numpy arrays of the same length values = List(args=[]) # Maps each array in values into a contrained, short screen space y2_mapper = Instance(AbstractMapper) _cached_data_pts = List() _cached_screen_pts = List() def _gather_points(self): if not self._cache_valid: if not self.index or len(self.values) == 0: return index = self.index.get_data() values = self.values numindex = len(index) if numindex == 0 or all(len(v)==0 for v in values) or all(numindex != len(v) for v in values): self._cached_data_pts = [] self._cache_valid = True self._cached_data_pts = [transpose(array((index, v))) for v in values] self._cache_value = True return def get_screen_points(self): self._gather_points() return [self.map_screen(pts, i) for i, pts in enumerate(self._cached_data_pts)] def map_screen(self, data_array, data_offset=None): """ data_offset, if provided, is a float that will be mapped into screen space using self.value_mapper and then added to mapping data_array with y2_mapper. If data_offset is not provided, then y2_mapper is used. """ if len(data_array) == 0: return [] x_ary, y_ary = transpose(data_array) sx = self.index_mapper.map_screen(x_ary) if data_offset is not None: dy = self.value_mapper.map_screen(data_offset) sy = self.y2_mapper.map_screen(y_ary) + dy else: sy = self.value_mapper.map_screen(y_ary) if self.orientation == "h": return transpose(array((sx, sy))) else: return transpose(array((sy, sx))) #============================================================================ # Create the Chaco plot. #============================================================================ def _create_plot_component(obj): # Setup the spectrum plot frequencies = linspace(0.0, float(SAMPLING_RATE)/2, num=NUM_SAMPLES/2) obj.spectrum_data = ArrayPlotData(frequency=frequencies) empty_amplitude = zeros(NUM_SAMPLES/2) obj.spectrum_data.set_data('amplitude', empty_amplitude) obj.spectrum_plot = Plot(obj.spectrum_data) spec_renderer = obj.spectrum_plot.plot(("frequency", "amplitude"), name="Spectrum", color="red")[0] obj.spectrum_plot.padding = 50 obj.spectrum_plot.title = "Spectrum" spec_range = list(obj.spectrum_plot.plots.values())[0][0].value_mapper.range spec_range.low = 0.0 spec_range.high = 5.0 obj.spectrum_plot.index_axis.title = 'Frequency (hz)' obj.spectrum_plot.value_axis.title = 'Amplitude' # Time Series plot times = linspace(0.0, float(NUM_SAMPLES)/SAMPLING_RATE, num=NUM_SAMPLES) obj.time_data = ArrayPlotData(time=times) empty_amplitude = zeros(NUM_SAMPLES) obj.time_data.set_data('amplitude', empty_amplitude) obj.time_plot = Plot(obj.time_data) obj.time_plot.plot(("time", "amplitude"), name="Time", color="blue") obj.time_plot.padding = 50 obj.time_plot.title = "Time" obj.time_plot.index_axis.title = 'Time (seconds)' obj.time_plot.value_axis.title = 'Amplitude' time_range = list(obj.time_plot.plots.values())[0][0].value_mapper.range time_range.low = -0.2 time_range.high = 0.2 # Spectrogram plot values = [zeros(NUM_SAMPLES/2) for i in range(SPECTROGRAM_LENGTH)] p = WaterfallRenderer(index = spec_renderer.index, values = values, index_mapper = LinearMapper(range = obj.spectrum_plot.index_mapper.range), value_mapper = LinearMapper(range = DataRange1D(low=0, high=SPECTROGRAM_LENGTH)), y2_mapper = LinearMapper(low_pos=0, high_pos=8, range=DataRange1D(low=0, high=15)), ) spectrogram_plot = p obj.spectrogram_plot = p dummy = Plot() dummy.padding = 50 dummy.index_axis.mapper.range = p.index_mapper.range dummy.index_axis.title = "Frequency (hz)" dummy.add(p) container = HPlotContainer() container.add(obj.spectrum_plot) container.add(obj.time_plot) c2 = VPlotContainer() c2.add(dummy) c2.add(container) return c2 def get_audio_data(): pa = pyaudio.PyAudio() stream = pa.open(format=pyaudio.paInt16, channels=1, rate=SAMPLING_RATE, input=True, frames_per_buffer=NUM_SAMPLES) audio_data = fromstring(stream.read(NUM_SAMPLES), dtype=short) stream.close() normalized_data = audio_data / 32768.0 return (abs(fft(normalized_data))[:NUM_SAMPLES/2], normalized_data) # HasTraits class that supplies the callable for the timer event. class TimerController(HasTraits): def onTimer(self, *args): spectrum, time = get_audio_data() self.spectrum_data.set_data('amplitude', spectrum) self.time_data.set_data('amplitude', time) spec_data = self.spectrogram_plot.values[1:] + [spectrum] self.spectrogram_plot.values = spec_data self.spectrum_plot.request_redraw() return #============================================================================ # Attributes to use for the plot view. size = (900,850) title = "Audio Spectrum Waterfall" #============================================================================ # Demo class that is used by the demo.py application. #============================================================================ class DemoHandler(Handler): def closed(self, info, is_ok): """ Handles a dialog-based user interface being closed by the user. Overridden here to stop the timer once the window is destroyed. """ info.object.timer.Stop() return class Demo(HasTraits): plot = Instance(Component) controller = Instance(TimerController, ()) timer = Instance(Timer) traits_view = View( Group( Item('plot', editor=ComponentEditor(size=size), show_label=False), orientation = "vertical"), resizable=True, title=title, width=size[0], height=size[1]+25, handler=DemoHandler ) def __init__(self, **traits): super(Demo, self).__init__(**traits) self.plot = _create_plot_component(self.controller) def edit_traits(self, *args, **kws): # Start up the timer! We should do this only when the demo actually # starts and not when the demo object is created. self.timer = Timer(20, self.controller.onTimer) return super(Demo, self).edit_traits(*args, **kws) def configure_traits(self, *args, **kws): # Start up the timer! We should do this only when the demo actually # starts and not when the demo object is created. self.timer = Timer(20, self.controller.onTimer) return super(Demo, self).configure_traits(*args, **kws) popup = Demo() if __name__ == "__main__": popup.configure_traits()
{ "pile_set_name": "Github" }
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * 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 Ajax.org B.V. 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 AJAX.ORG B.V. 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. * * ***** END LICENSE BLOCK ***** */ define(function(require, exports, module) { "use strict"; var MockRenderer = exports.MockRenderer = function(visibleRowCount) { if (typeof document == "object") { this.container = document.createElement("div"); this.scroller = document.createElement("div"); } this.visibleRowCount = visibleRowCount || 20; this.layerConfig = { firstVisibleRow : 0, lastVisibleRow : this.visibleRowCount }; this.isMockRenderer = true; this.$gutter = {}; }; MockRenderer.prototype.getFirstVisibleRow = function() { return this.layerConfig.firstVisibleRow; }; MockRenderer.prototype.getLastVisibleRow = function() { return this.layerConfig.lastVisibleRow; }; MockRenderer.prototype.getFirstFullyVisibleRow = function() { return this.layerConfig.firstVisibleRow; }; MockRenderer.prototype.getLastFullyVisibleRow = function() { return this.layerConfig.lastVisibleRow; }; MockRenderer.prototype.getContainerElement = function() { return this.container; }; MockRenderer.prototype.getMouseEventTarget = function() { return this.container; }; MockRenderer.prototype.getTextAreaContainer = function() { return this.container; }; MockRenderer.prototype.addGutterDecoration = function() { }; MockRenderer.prototype.removeGutterDecoration = function() { }; MockRenderer.prototype.moveTextAreaToCursor = function() { }; MockRenderer.prototype.setSession = function(session) { this.session = session; }; MockRenderer.prototype.getSession = function(session) { return this.session; }; MockRenderer.prototype.setTokenizer = function() { }; MockRenderer.prototype.on = function() { }; MockRenderer.prototype.updateCursor = function() { }; MockRenderer.prototype.animateScrolling = function(fromValue, callback) { callback && callback(); }; MockRenderer.prototype.scrollToX = function(scrollTop) {}; MockRenderer.prototype.scrollToY = function(scrollLeft) {}; MockRenderer.prototype.scrollToLine = function(line, center) { var lineHeight = 16; var row = 0; for (var l = 1; l < line; l++) { row += this.session.getRowLength(l-1); } if (center) { row -= this.visibleRowCount / 2; } this.scrollToRow(row); }; MockRenderer.prototype.scrollSelectionIntoView = function() { }; MockRenderer.prototype.scrollCursorIntoView = function() { var cursor = this.session.getSelection().getCursor(); if (cursor.row < this.layerConfig.firstVisibleRow) { this.scrollToRow(cursor.row); } else if (cursor.row > this.layerConfig.lastVisibleRow) { this.scrollToRow(cursor.row); } }; MockRenderer.prototype.scrollToRow = function(row) { var row = Math.min(this.session.getLength() - this.visibleRowCount, Math.max(0, row)); this.layerConfig.firstVisibleRow = row; this.layerConfig.lastVisibleRow = row + this.visibleRowCount; }; MockRenderer.prototype.getScrollTopRow = function() { return this.layerConfig.firstVisibleRow; }; MockRenderer.prototype.draw = function() { }; MockRenderer.prototype.onChangeTabSize = function(startRow, endRow) { }; MockRenderer.prototype.updateLines = function(startRow, endRow) { }; MockRenderer.prototype.updateBackMarkers = function() { }; MockRenderer.prototype.updateFrontMarkers = function() { }; MockRenderer.prototype.updateBreakpoints = function() { }; MockRenderer.prototype.onResize = function() { }; MockRenderer.prototype.updateFull = function() { }; MockRenderer.prototype.updateText = function() { }; MockRenderer.prototype.showCursor = function() { }; MockRenderer.prototype.visualizeFocus = function() { }; MockRenderer.prototype.setAnnotations = function() { }; MockRenderer.prototype.setStyle = function() { }; MockRenderer.prototype.unsetStyle = function() { }; MockRenderer.prototype.textToScreenCoordinates = function() { return { pageX: 0, pageY: 0 } }; MockRenderer.prototype.screenToTextCoordinates = function() { return { row: 0, column: 0 } }; MockRenderer.prototype.adjustWrapLimit = function () { }; });
{ "pile_set_name": "Github" }
@charset "UTF-8"; /// Mixes a color with white. /// /// @param {Color} $color /// /// @param {Number (Percentage)} $percent /// The amount of white to be mixed in. /// /// @example scss - Usage /// .element { /// background-color: tint(#6ecaa6, 40%); /// } /// /// @example css - CSS Output /// .element { /// background-color: #a8dfc9; /// } /// /// @return {Color} @function tint($color, $percent) { @return mix(#fff, $color, $percent); }
{ "pile_set_name": "Github" }
record FooMap2 { fieldIsMap: map[string, Bar] }
{ "pile_set_name": "Github" }
from pip._vendor.packaging.version import parse as parse_version from pip._internal.utils.models import KeyBasedCompareMixin from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from pip._vendor.packaging.version import _BaseVersion # noqa: F401 from pip._internal.models.link import Link # noqa: F401 from typing import Any, Union # noqa: F401 class InstallationCandidate(KeyBasedCompareMixin): """Represents a potential "candidate" for installation. """ def __init__(self, project, version, location): # type: (Any, str, Link) -> None self.project = project self.version = parse_version(version) # type: _BaseVersion self.location = location super(InstallationCandidate, self).__init__( key=(self.project, self.version, self.location), defining_class=InstallationCandidate ) def __repr__(self): # type: () -> str return "<InstallationCandidate({!r}, {!r}, {!r})>".format( self.project, self.version, self.location, )
{ "pile_set_name": "Github" }
; ; TG3 Makefile Auto Create Script ; ; ่ฏดๆ˜Ž๏ผš ; 1.ๅœจ็ญ‰ๅทๅทฆ่พนไธ่ฆๆœ‰็ฉบๆ ผ ; 2.ๆ‰€ๆœ‰็š„่ทฏๅพ„่ฏทไฝฟ็”จ"/"ๆฅๅˆ†้š” ; 3.ๆ‰€ๆœ‰็š„ๆ–‡ไปถๅไธๅฏไปฅๆœ‰็ฉบๆ ผ ; 4.ๅช่ƒฝๅฏนๅฝ“ๅ‰็›ฎๅฝ•ๅŠๅ…ถๅญ็›ฎๅฝ•ไธ‹็š„.cใ€.cpp็”ŸๆˆMakefile ;ๆœฌTMK3ๆ–‡ไปถ็›ฎๅฝ•ไฝ็ฝฎๅˆฐ้กน็›ฎๆ น็›ฎๅฝ•ไน‹้—ด็š„่ฝฌๆข๏ผŒไธๆ”ฏๆŒๅคšไธชไธฒ๏ผŒๅฆ‚ๆžœๆœ‰ๅคšไธช๏ผŒไปฅๆœ€ๅŽไธ€ไธชไธบๅ‡† ;ๅณ ./$(TO_PROJECT_ROOT)/ ๅฐฑๆ˜ฏ้กน็›ฎ็š„ๆ น็›ฎๅฝ• TO_PROJECT_ROOT=../../PRJ_TG3 ;่พ“ๅ‡บ็›ฎๆ ‡็š„ๅๅญ—๏ผŒไธๆ”ฏๆŒๅคšไธชไธฒ๏ผŒๅฆ‚ๆžœๆœ‰ๅคšไธช๏ผŒไปฅๆœ€ๅŽไธ€ไธชไธบๅ‡† OUTPUT_FILENAME=libNdNetwork.a ;ๅŒ…ๅซ็š„ๅ…ถไป–็š„TMK3ๆ–‡ไปถ๏ผŒๆญคๆ–‡ไปถๅ’Œๆœฌๆ–‡ไปถไธ€่ตทๆž„ๆˆMakeFile็š„ๅ†…ๅฎน ;ๆญค้กนๅฏไปฅๅ‡บ็ŽฐๅœจTMK3ๆ–‡ไปถๅ†…็š„ไปปๆ„ๅœฐๆ–น๏ผŒไธŽๅทฒ็ปๅญ˜ๅœจ็š„้กนไพๆฌก็ป„ๅˆ ;ๆณจๆ„๏ผšๆญค้กนไธๆ”ฏๆŒ็ปๅฏน่ทฏๅพ„๏ผŒไฝ†ๆ˜ฏๅฏไปฅไฝฟ็”จ$(TO_PROJECT_ROOT)ๆž„ๆˆๆ–‡ไปถๅ INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPSๆ ‡ๅ‡†ๅบ”็”จ๏ผŒๅŒ…ๆ‹ฌๅŠจๆ€ๅบ“็ญ‰ ;้ข„ๅฎšไน‰ไธฒ๏ผŒ็”ŸๆˆMakeFile็š„ๆ—ถๅ€™็›ดๆŽฅๆ”พๅœจMakeFile็š„ๅ‰้ข ;ๆ ผๅผ๏ผšPRE_DEFINE=STRING๏ผŒ็”ŸๆˆMakeFile็š„ๆ—ถๅ€™๏ผŒ"PRE_DEFINE="ๅŽ้ข็š„ๆ‰€ๆœ‰้žๆณจ้‡Š้ž็ปญ่กŒๅญ—็ฌฆ้ƒฝไผšๆ”พๅœจMakeFileๅ‰้ข ;ไพ‹ๅฆ‚๏ผšPRE_DEFINE=AAA=BBB๏ผŒไผšๆ”พๅ…ฅAAA=BBBๅˆฐMakeFileไธญ ;ๅฏไปฅไฝฟ็”จๅคšไธชPRE_DEFINEไธฒ๏ผŒไนŸๅฏไปฅไฝฟ็”จPRE_DEFINE1ใ€PRE_DEFINE2็ญ‰ๆ–นๅผ๏ผŒMakeFileไธญไพๆฎๅ‡บ็Žฐ้กบๅบ(ไธๆ˜ฏๆ•ฐๅญ—ๅคงๅฐ)ๆŽ’ๅˆ— ;PRE_DEFINE=USE_IMAGEKIT=1 ;ไฝฟ็”จ ImageToolKit ๅบ“๏ผŒๆญคๆ—ถ็”Ÿๆˆ็š„ Makefile ไผš่‡ชๅŠจ่ฟžๆŽฅๆœ‰ๅ…ณ็š„LIB ;PRE_DEFINE=USE_ICU=1 ;ไฝฟ็”จ ICU ๅบ“๏ผŒๆญคๆ—ถ็”Ÿๆˆ็š„ Makefile ไผš่‡ชๅŠจ่ฟžๆŽฅๆœ‰ๅ…ณ็š„LIB ;PRE_DEFINE=USE_MTAPI=1 ;ไฝฟ็”จ MTAPI ๅบ“๏ผŒๆญคๆ—ถ็”Ÿๆˆ็š„ Makefile ไผš่‡ชๅŠจ่ฟžๆŽฅๆœ‰ๅ…ณ็š„LIB ;Cใ€C++้ข„ๅฎšไน‰ๅฎ๏ผŒๅฏไปฅไฝฟ็”จๅคšไธชDEFINESไธฒ๏ผŒไนŸๅฏไปฅไฝฟ็”จDEFINES1ใ€DEFINES2็ญ‰ๆ–นๅผ๏ผŒMakeFileไธญไพๆฎๅ‡บ็Žฐ้กบๅบ(ไธๆ˜ฏๆ•ฐๅญ—ๅคงๅฐ)ๆŽ’ๅˆ— ;DEFINES=-D_MY_MARCO_ ;่ฟ™้‡Œๅกซๅ…ฅๅบ”็”จ็š„่‡ชๅฎšไน‰ๅฎใ€‚ๆณจๆ„๏ผšITOPS่‡ชๅทฑ็š„ๆ‰€้œ€ๅฎšไน‰ไผš่‡ชๅŠจๅŒ…ๅซ๏ผŒๆ•…ๆญค่ฟ™้‡Œไป…ไป…ๅŒ…ๅซๅบ”็”จ่‡ชๅทฑ็‰นๆœ‰็š„ๅฎšไน‰ๅณๅฏ ;DEFINES=-D__TG3_PURE_DLL__ ;็”Ÿๆˆ็š„ๆ˜ฏ็บฏๅŠจๆ€ๅบ“๏ผˆๆ„ๆ€ๆ˜ฏ๏ผšๆ—ขไธๆ˜ฏTOPSๅบ”็”จ๏ผŒไนŸไธๆ˜ฏTCOM็ป„ไปถ๏ผ‰ ;DEFINES=-D__TCOM_SUPPORT__ ;็”Ÿๆˆ็š„ๆ˜ฏTCOM็ป„ไปถ๏ผˆๆณจๆ„๏ผšTOPSๅบ”็”จไนŸๅฏไปฅๅŒๆ—ถๆ˜ฏTCOM็ป„ไปถ๏ผ‰ DEFINES1=-DLINUX -D_DEBUG -DNU_DEBUG -D_TRANZDA_VM_ -DSS_SHARED -DND_UPHONE ;ๅŒ…ๅซ่ทฏๅพ„๏ผŒๆ”ฏๆŒๆข่กŒ๏ผŒๅŽ้ขไธ่ฆๅŠ ็ปญ่กŒ็ฌฆ๏ผŒ่ฏท่ฟž็ปญไฝฟ็”จINCLUDE_PATH1ใ€INCLUDE_PATH2็ญ‰ๆ ‡ๆ˜Žๅคš่กŒ ;่กŒๅท้œ€่ฆ่ฟž็ปญ๏ผŒไธๅฏ่ทณ่ทƒ INCLUDE_PATH=-I./ -I./Res -I./include -I../NdSystem ;่ฟžๆŽฅ็š„ๅบ“ๆ–‡ไปถ๏ผŒๅฏไปฅไฝฟ็”จๅคšไธชLIBSไธฒ๏ผŒไนŸๅฏไปฅไฝฟ็”จLIBS1ใ€LIBS2็ญ‰ๆ–นๅผ๏ผŒMakeFileไธญไพๆฎๅ‡บ็Žฐ้กบๅบ(ไธๆ˜ฏๆ•ฐๅญ—ๅคงๅฐ)ๆŽ’ๅˆ— ;LIBS=-lMyLib ;ๅบ”็”จ้ขๅค–็š„่ฟžๆŽฅๅบ“ใ€‚ๆณจๆ„๏ผšITOPS่‡ชๅทฑ็š„ๆ‰€้œ€ๅบ“่‡ชๅŠจๅŒ…ๅซ๏ผŒ่€Œไธ”ๅบ“ๅŒ…ๅซ่ทฏๅพ„ไนŸๅทฒ็ปๅŒ…ๅซ๏ผŒๆ•…ๆญค่ฟ™้‡Œไป…ไป…ๅŒ…ๅซๅบ”็”จ่‡ชๅทฑ็‰นๆœ‰็š„ๅบ“็š„ๅๅญ—ๅณๅฏ LIBS= ;ๅผบๅˆถๅŒ…ๅซๆ–‡ไปถ็š„ๅๅญ—๏ผŒไธ่ƒฝไฝฟ็”จ้€š้…็ฌฆ๏ผŒไธ€ๅฎš่ฆไฝฟ็”จ็›ธๅฏนๆˆ–่€…็ปๅฏน่ทฏๅพ„ ;ๆžๅŠ›่ฆๆฑ‚ไฝฟ็”จ็›ธๅฏน่ทฏๅพ„๏ผŒๅคšไธชๆ–‡ไปถไน‹้—ดไฝฟ็”จโ€œ|โ€ๅˆ†้š” ;ๅผบๅˆถๅŒ…ๅซๆ–‡ไปถๆŒ‡็š„ๆ˜ฏไธๅœจๆœฌๆ–‡ไปถๅคนๅŠๅ…ถๅญๆ–‡ไปถๅคนไธ‹็š„.cใ€.cppใ€.oๆ–‡ไปถ ;ๅฏไปฅไฝฟ็”จๅคšไธชINCLUDEFILEไธฒ๏ผŒไนŸๅฏไปฅไฝฟ็”จINCLUDEFILE1ใ€INCLUDEFILE2็ญ‰ๆ–นๅผ๏ผŒMakeFileไธญไพๆฎๅ‡บ็Žฐ้กบๅบ(ไธๆ˜ฏๆ•ฐๅญ—ๅคงๅฐ)ๆŽ’ๅˆ— INCLUDEFILE= ;ๅผบๅˆถๆŽ’้™คๆ–‡ไปถ๏ผŒไธ่ƒฝไฝฟ็”จ้€š้…็ฌฆ๏ผŒไธ€ๅฎš่ฆไฝฟ็”จ็›ธๅฏน่ทฏๅพ„ ;ๅคšไธชๆ–‡ไปถไน‹้—ดไฝฟ็”จโ€œ|โ€ๅˆ†้š”๏ผŒ่ทฏๅพ„ๅฟ…้กปไปฅ"./"๏ผŒ"../"ๅผ€ๅง‹ ;ๅช่ƒฝๅฏน.cใ€.cppๆ–‡ไปถ่ฟ›่กŒๆŽ’้™ค ;ๅฆ‚ๆžœ่ฆๆŽ’้™คๆœฌ็›ฎๅฝ•็š„ๆ–‡ไปถไนŸ่ฆๅŠ ๅ…ฅ"./" ;ๅฏไปฅไฝฟ็”จๅคšไธชEXCLUDEFILEไธฒ๏ผŒไนŸๅฏไปฅไฝฟ็”จEXCLUDEFILE1ใ€EXCLUDEFILE2็ญ‰ๆ–นๅผ๏ผŒMakeFileไธญไพๆฎๅ‡บ็Žฐ้กบๅบ(ไธๆ˜ฏๆ•ฐๅญ—ๅคงๅฐ)ๆŽ’ๅˆ— EXCLUDEFILE=
{ "pile_set_name": "Github" }
rows = {[1.312119e+002 5.237206e+002 ]; [1.202256e+002 1.731594e+002 1.821481e+002 1.911369e+002 2.021231e+002 2.260931e+002 2.400756e+002 2.550569e+002 2.710369e+002 2.870169e+002 3.209744e+002 3.559306e+002 3.729094e+002 4.038706e+002 4.328344e+002 4.568044e+002 4.667919e+002 4.757806e+002 4.847694e+002 4.917606e+002 4.967544e+002 5.057431e+002 5.087394e+002 5.097381e+002 5.107369e+002 ]; [3.679156e+002 3.729094e+002 3.699131e+002 3.639206e+002 3.609244e+002 3.599256e+002 3.549319e+002 3.529344e+002 3.519356e+002 3.509369e+002 3.479406e+002 3.469419e+002 3.469419e+002 3.449444e+002 3.449444e+002 ]; }; cols = {[2.601756e+002 2.501881e+002 ]; [5.128594e+002 5.008744e+002 4.998756e+002 4.988769e+002 4.978781e+002 4.948819e+002 4.928844e+002 4.918856e+002 4.898881e+002 4.878906e+002 4.848944e+002 4.828969e+002 4.818981e+002 4.808994e+002 4.808994e+002 4.818981e+002 4.828969e+002 4.838956e+002 4.848944e+002 4.858931e+002 4.868919e+002 4.888894e+002 4.898881e+002 4.898881e+002 4.898881e+002 ]; [2.441956e+002 2.971294e+002 3.161056e+002 3.460681e+002 3.660431e+002 3.760306e+002 4.119856e+002 4.269669e+002 4.339581e+002 4.399506e+002 4.559306e+002 4.599256e+002 4.639206e+002 4.669169e+002 4.689144e+002 ]; };
{ "pile_set_name": "Github" }
<?php class Kint_Parsers_Microtime extends kintParser { private static $_times = array(); private static $_laps = array(); protected function _parse( & $variable ) { if ( !is_string( $variable ) || !preg_match( '[0\.[0-9]{8} [0-9]{10}]', $variable ) ) { return false; } list( $usec, $sec ) = explode( " ", microtime() ); $time = (float)$usec + (float)$sec; $size = memory_get_usage( true ); $this->value = @date( 'Y-m-d H:i:s', $sec ) . '.' . substr( $usec, 2, 4 ); $numberOfCalls = count( self::$_times ); if ( $numberOfCalls > 0 ) { # meh, faster than count($times) > 1 $lap = $time - end( self::$_times ); self::$_laps[] = $lap; $this->value .= "\n<strong>SINCE LAST CALL:</strong> " . round( $lap, 4 ) . 's.'; if ( $numberOfCalls > 1 ) { $this->value .= "\n<strong>SINCE START:</strong> " . round( $time - self::$_times[0], 4 ) . 's.'; $this->value .= "\n<strong>AVERAGE DURATION:</strong> " . round( array_sum( self::$_laps ) / $numberOfCalls, 4 ) . 's.'; } } $unit = array( 'B', 'KB', 'MB', 'GB', 'TB' ); $this->value .= "\n<strong>MEMORY USAGE:</strong> " . $size . " bytes (" . round( $size / pow( 1024, ( $i = floor( log( $size, 1024 ) ) ) ), 3 ) . ' ' . $unit[$i] . ")"; self::$_times[] = $time; $this->type = 'Stats'; } /* function test() { $x = ''; d( microtime() ); for ( $i = 0; $i < 10; $i++ ) { $x .= str_repeat( 'x', mt_rand( 128 * 1024, 5 * 1024 * 1024 ) ); usleep( mt_rand( 0, 1000 * 1000 ) ); d( microtime() ); } unset( $x ); dd( microtime() ); } */ }
{ "pile_set_name": "Github" }
--- - nzup - nzurx - nzur - nzyt - nzyx - nzy - nzyp - nzyrx - nzyr - sit - six - si - sip - siex - sie - siep - sat - sax - sa - sap - suox - suo - suop - sot - sox - so - sop - sex - se - sep - sut - sux - su - sup - surx - sur - syt - syx - sy - syp - syrx - syr - ssit - ssix - ssi - ssip - ssiex - ssie - ssiep - ssat - ssax - ssa - ssap - ssot - ssox - sso - ssop - ssex - sse - ssep - ssut - ssux - ssu - ssup - ssyt - ssyx - ssy - ssyp - ssyrx - ssyr - zhat - zhax - zha - zhap - zhuox - zhuo - zhuop - zhot - zhox - zho - zhop - zhet - zhex - zhe - zhep - zhut - zhux - zhu - zhup - zhurx - zhur - zhyt - zhyx - zhy - zhyp - zhyrx - zhyr - chat - chax - cha - chap - chuot - chuox - chuo - chuop - chot - chox - cho - chop - chet - chex - che - chep - chux - chu - chup - churx - chur - chyt - chyx - chy - chyp - chyrx - chyr - rrax - rra - rruox - rruo - rrot - rrox - rro - rrop - rret - rrex - rre - rrep - rrut - rrux - rru - rrup - rrurx - rrur - rryt - rryx - rry - rryp - rryrx - rryr - nrat - nrax - nra - nrap - nrox - nro - nrop - nret - nrex - nre - nrep - nrut - nrux - nru - nrup - nrurx - nrur - nryt - nryx - nry - nryp - nryrx - nryr - shat - shax - sha - shap - shuox - shuo - shuop - shot - shox - sho - shop - shet - shex - she - shep - shut - shux - shu - shup - shurx - shur - shyt - shyx - shy - shyp - shyrx - shyr - rat - rax - ra - rap - ruox - ruo - ruop - rot - rox - ro - rop - rex - re - rep - rut - rux - ru - rup - rurx - rur - ryt - ryx - ry - ryp - ryrx - ryr - jit - jix - ji - jip - jiet - jiex - jie - jiep - juot - juox - juo - juop - jot - jox - jo - jop - jut - jux - ju - jup - jurx - jur - jyt - jyx - jy - jyp - jyrx - jyr - qit - qix - qi - qip
{ "pile_set_name": "Github" }
using Avalonia.Data.Converters; using Avalonia.Media; using System; using System.Globalization; using WalletWasabi.CoinJoin.Common.Models; using WalletWasabi.Gui.Models; namespace WalletWasabi.Gui.Converters { public class PhaseColorConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (!Enum.TryParse(typeof(RoundPhase), parameter.ToString(), false, out var p)) { throw new ArgumentException($"Unknown '{parameter}' value"); } var phaseState = (RoundPhaseState)value; return (RoundPhase)p <= phaseState.Phase ? phaseState.Error ? Brushes.IndianRed : Brushes.Green : Brushes.Gray; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new InvalidOperationException(); } } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: c70751eb9a4a4872b711b9d9ea27b3d8 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
<div class="wrap"> <h1> <?php esc_html_e( 'HRM Help', 'erp' ); ?> <a href="https://wperp.com/docs/hr/" target="_blank" class="page-title-action"> <?php esc_html_e( 'View all Documentations', 'erp' ); ?> </a> </h1> <?php $erp_doc_sections = [ __( 'General', 'erp' ) => [ __( 'How to setup my company details in WP ERP?', 'erp' ) => 'https://wperp.com/docs/erp-core/settings/company/', __( 'How to disable any module (like-HRM, CRM or Accounting)?', 'erp' ) => 'https://wperp.com/docs/erp-core/settings/modules-management/', __( 'How to setup basic erp settings?', 'erp' ) => 'https://wperp.com/docs/erp-core/settings/global-settings/', __( 'How to translate WP ERP?', 'erp' ) => 'https://wperp.com/docs/erp-core/how-to-translate-wp-erp-plugin/', __( 'How to install developed version of WP ERP (github)?', 'erp' ) => 'https://wperp.com/docs/erp-core/installation/', ], __( 'Employee Management', 'erp' ) => [ __( 'How to add an employee?', 'erp' ) => 'https://wperp.com/docs/hr/managing-employee/adding-employees/', __( 'How to add and manage departments?', 'erp' ) => 'https://wperp.com/docs/hr/managing-employee/create-manage-department-hrm/', __( 'How to add and manage designation?', 'erp' ) => 'https://wperp.com/docs/hr/managing-employee/creating-designations/', __( 'How to assign Department & Designation to employees?', 'erp' ) => 'https://wperp.com/docs/hr/managing-employee/add-department-designation-employee/', __( 'How to manage permissions for the employees?', 'erp' ) => 'https://wperp.com/docs/hr/managing-employee/permission-management/', ], __( 'Leave Management', 'erp' ) => [ __( 'How to create Leave Policy?', 'erp' ) => 'https://wperp.com/docs/hr/leave-management/create-leave-policy/', __( 'How to create Leave Entitlement?', 'erp' ) => 'https://wperp.com/docs/hr/leave-management/leave-entitlements/', __( 'How to create Leave Request?', 'erp' ) => 'https://wperp.com/docs/hr/leave-management/creating-leave-requests/', __( 'How to Manage (Accept / Reject) Leave Requests?', 'erp' ) => 'https://wperp.com/docs/hr/leave-management/managing-requests/', ], __( 'Miscellaneous', 'erp' ) => [ __( 'How to create announcement?', 'erp' ) => 'https://wperp.com/docs/hr/announcement/', __( 'How to setup working days for the employees?', 'erp' ) => 'https://wperp.com/docs/hr/settings/work-days/', __( 'How to generate reports?', 'erp' ) => 'https://wperp.com/docs/hr/reporting/', __( 'Do you have any video tutorial on HRM?', 'erp' ) => 'https://wperp.com/tv/category/hr/', ], ]; $sections = apply_filters( 'erp_hr_help_docs', $erp_doc_sections ); if ( ! empty( $sections ) ) { ?> <div id="dashboard-widgets-wrap"> <div id="dashboard-widgets" class="metabox-holder"> <?php foreach ( $sections as $section_title => $docs ) { ?> <div class="erp-help-section postbox-container"> <div class="metabox-holder"> <div class="meta-box-sortables"> <div class="postbox"> <h2 class="hndle"><?php echo esc_html( $section_title ); ?></h2> <?php if ( !empty( $docs ) ) { ?> <div class="erp-help-questions"> <ul> <?php foreach ( $docs as $title => $link ) { ?> <?php $tracking_url = add_query_arg( [ 'utm_source' => 'doc', 'utm_medium' => 'erp', 'utm_campaign' => 'manik', 'utm_content' => 'aion', ], untrailingslashit( $link ) ); ?> <li><a href="<?php echo esc_url_raw( $tracking_url ); ?>" target="_blank"><?php echo esc_html( $title ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a></li> <?php } ?> </ul> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> </div> </div> <?php } else { ?> <?php } ?> </div> <style type="text/css" media="screen"> .erp-help-questions li { margin: 0; border-bottom: 1px solid #eee; } .erp-help-questions li a { padding: 10px 15px; display: block; } .erp-help-questions li a:hover { background-color: #F5F5F5; } .erp-help-questions li:last-child { border-bottom: none; } .erp-help-questions li .dashicons { float: right; color: #ccc; margin-top: -3px; } @media screen and (min-width: 960px) { .erp-help-section .postbox-container{ width: 100% !important; } .erp-help-section:nth-child(odd){ clear:both !important; } } </style>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf8"?> <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="zh_TW" xml:id="example_1_function_1"> <refnamediv> <refname>example_1_function_1</refname> <refpurpose>"example_1_function_1" รจยชยชรฆย˜ยŽ</refpurpose> </refnamediv> <refsynopsisdiv> <title>รจยชยžรฆยณย•</title> <synopsis>a = example_1_function_1(b,c)</synopsis> </refsynopsisdiv> <refsection> <title>รฅยยƒรฆย•ยธ</title> <variablelist> <varlistentry> <term>b</term> <listitem> <para> "b" รฅยยƒรฆย•ยธรจยชยชรฆย˜ยŽ </para> </listitem> </varlistentry> <varlistentry> <term>c</term> <listitem> <para> "c" รฅยยƒรฆย•ยธรจยชยชรฆย˜ยŽ </para> </listitem> </varlistentry> <varlistentry> <term>a</term> <listitem> <para> "a" รฅยยƒรฆย•ยธรจยชยชรฆย˜ยŽ </para> </listitem> </varlistentry> </variablelist> </refsection> <refsection> <title>รจยชยชรฆย˜ยŽ</title> <itemizedlist> <listitem> <para> example_1_function_1 รฅยฎยŒรฆย•ยดรจยชยชรฆย˜ยŽ </para> </listitem> </itemizedlist> </refsection> <refsection> <title>รงยฏย„รคยพย‹</title> <programlisting role="example"><![CDATA[ // รจยจยปรจยงยฃ b = 2; c = 3; a = example_1_function_1(b,c); ]]></programlisting> </refsection> <refsection> <title>รฅย…ยถรคยปย–รฅยยƒรจย€ยƒ</title> <simplelist type="inline"> <member> <link linkend="example_1_function_2">example_1_function_2</link> </member> <member> <link linkend="example_1_function_3">example_1_function_3</link> </member> </simplelist> </refsection> <refsection> <title>รคยฝยœรจย€ย…</title> <simplelist type="vert"> <member> Scilab รฅยœย˜รฉยšยŠ </member> </simplelist> </refsection> <refsection> <title>รงยฟยปรจยญยฏ</title> <simplelist type="vert"> <member> รคยธยญรฆย–ย‡รงยฟยปรจยญยฏรงยพยค </member> </simplelist> </refsection> </refentry>
{ "pile_set_name": "Github" }
VERSION 5.7 ; DIVIDERCHAR "/" ; BUSBITCHARS "[]" ; DESIGN gcd ; UNITS DISTANCE MICRONS 2000 ; DIEAREA ( 0 0 ) ( 200260 201600 ) ; ROW ROW_0 FreePDK45_38x28_10R_NP_162NW_34O 20140 22400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_1 FreePDK45_38x28_10R_NP_162NW_34O 20140 25200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_2 FreePDK45_38x28_10R_NP_162NW_34O 20140 28000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_3 FreePDK45_38x28_10R_NP_162NW_34O 20140 30800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_4 FreePDK45_38x28_10R_NP_162NW_34O 20140 33600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_5 FreePDK45_38x28_10R_NP_162NW_34O 20140 36400 N DO 422 BY 1 STEP 380 0 ; ROW ROW_6 FreePDK45_38x28_10R_NP_162NW_34O 20140 39200 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_7 FreePDK45_38x28_10R_NP_162NW_34O 20140 42000 N DO 422 BY 1 STEP 380 0 ; ROW ROW_8 FreePDK45_38x28_10R_NP_162NW_34O 20140 44800 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_9 FreePDK45_38x28_10R_NP_162NW_34O 20140 47600 N DO 422 BY 1 STEP 380 0 ; ROW ROW_10 FreePDK45_38x28_10R_NP_162NW_34O 20140 50400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_11 FreePDK45_38x28_10R_NP_162NW_34O 20140 53200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_12 FreePDK45_38x28_10R_NP_162NW_34O 20140 56000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_13 FreePDK45_38x28_10R_NP_162NW_34O 20140 58800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_14 FreePDK45_38x28_10R_NP_162NW_34O 20140 61600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_15 FreePDK45_38x28_10R_NP_162NW_34O 20140 64400 N DO 422 BY 1 STEP 380 0 ; ROW ROW_16 FreePDK45_38x28_10R_NP_162NW_34O 20140 67200 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_17 FreePDK45_38x28_10R_NP_162NW_34O 20140 70000 N DO 422 BY 1 STEP 380 0 ; ROW ROW_18 FreePDK45_38x28_10R_NP_162NW_34O 20140 72800 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_19 FreePDK45_38x28_10R_NP_162NW_34O 20140 75600 N DO 422 BY 1 STEP 380 0 ; ROW ROW_20 FreePDK45_38x28_10R_NP_162NW_34O 20140 78400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_21 FreePDK45_38x28_10R_NP_162NW_34O 20140 81200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_22 FreePDK45_38x28_10R_NP_162NW_34O 20140 84000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_23 FreePDK45_38x28_10R_NP_162NW_34O 20140 86800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_24 FreePDK45_38x28_10R_NP_162NW_34O 20140 89600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_25 FreePDK45_38x28_10R_NP_162NW_34O 20140 92400 N DO 422 BY 1 STEP 380 0 ; ROW ROW_26 FreePDK45_38x28_10R_NP_162NW_34O 20140 95200 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_27 FreePDK45_38x28_10R_NP_162NW_34O 20140 98000 N DO 422 BY 1 STEP 380 0 ; ROW ROW_28 FreePDK45_38x28_10R_NP_162NW_34O 20140 100800 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_29 FreePDK45_38x28_10R_NP_162NW_34O 20140 103600 N DO 422 BY 1 STEP 380 0 ; ROW ROW_30 FreePDK45_38x28_10R_NP_162NW_34O 20140 106400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_31 FreePDK45_38x28_10R_NP_162NW_34O 20140 109200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_32 FreePDK45_38x28_10R_NP_162NW_34O 20140 112000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_33 FreePDK45_38x28_10R_NP_162NW_34O 20140 114800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_34 FreePDK45_38x28_10R_NP_162NW_34O 20140 117600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_35 FreePDK45_38x28_10R_NP_162NW_34O 20140 120400 N DO 422 BY 1 STEP 380 0 ; ROW ROW_36 FreePDK45_38x28_10R_NP_162NW_34O 20140 123200 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_37 FreePDK45_38x28_10R_NP_162NW_34O 20140 126000 N DO 422 BY 1 STEP 380 0 ; ROW ROW_38 FreePDK45_38x28_10R_NP_162NW_34O 20140 128800 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_39 FreePDK45_38x28_10R_NP_162NW_34O 20140 131600 N DO 422 BY 1 STEP 380 0 ; ROW ROW_40 FreePDK45_38x28_10R_NP_162NW_34O 20140 134400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_41 FreePDK45_38x28_10R_NP_162NW_34O 20140 137200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_42 FreePDK45_38x28_10R_NP_162NW_34O 20140 140000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_43 FreePDK45_38x28_10R_NP_162NW_34O 20140 142800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_44 FreePDK45_38x28_10R_NP_162NW_34O 20140 145600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_45 FreePDK45_38x28_10R_NP_162NW_34O 20140 148400 N DO 422 BY 1 STEP 380 0 ; ROW ROW_46 FreePDK45_38x28_10R_NP_162NW_34O 20140 151200 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_47 FreePDK45_38x28_10R_NP_162NW_34O 20140 154000 N DO 422 BY 1 STEP 380 0 ; ROW ROW_48 FreePDK45_38x28_10R_NP_162NW_34O 20140 156800 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_49 FreePDK45_38x28_10R_NP_162NW_34O 20140 159600 N DO 422 BY 1 STEP 380 0 ; ROW ROW_50 FreePDK45_38x28_10R_NP_162NW_34O 20140 162400 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_51 FreePDK45_38x28_10R_NP_162NW_34O 20140 165200 N DO 422 BY 1 STEP 380 0 ; ROW ROW_52 FreePDK45_38x28_10R_NP_162NW_34O 20140 168000 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_53 FreePDK45_38x28_10R_NP_162NW_34O 20140 170800 N DO 422 BY 1 STEP 380 0 ; ROW ROW_54 FreePDK45_38x28_10R_NP_162NW_34O 20140 173600 FS DO 422 BY 1 STEP 380 0 ; ROW ROW_55 FreePDK45_38x28_10R_NP_162NW_34O 20140 176400 N DO 422 BY 1 STEP 380 0 ; TRACKS X 190 DO 527 STEP 380 LAYER metal1 ; TRACKS Y 140 DO 720 STEP 280 LAYER metal1 ; TRACKS X 190 DO 527 STEP 380 LAYER metal2 ; TRACKS Y 140 DO 720 STEP 280 LAYER metal2 ; TRACKS X 190 DO 527 STEP 380 LAYER metal3 ; TRACKS Y 140 DO 720 STEP 280 LAYER metal3 ; TRACKS X 190 DO 358 STEP 560 LAYER metal4 ; TRACKS Y 140 DO 360 STEP 560 LAYER metal4 ; TRACKS X 190 DO 358 STEP 560 LAYER metal5 ; TRACKS Y 140 DO 360 STEP 560 LAYER metal5 ; TRACKS X 190 DO 358 STEP 560 LAYER metal6 ; TRACKS Y 140 DO 360 STEP 560 LAYER metal6 ; TRACKS X 190 DO 126 STEP 1600 LAYER metal7 ; TRACKS Y 140 DO 126 STEP 1600 LAYER metal7 ; TRACKS X 190 DO 126 STEP 1600 LAYER metal8 ; TRACKS Y 140 DO 126 STEP 1600 LAYER metal8 ; TRACKS X 190 DO 63 STEP 3200 LAYER metal9 ; TRACKS Y 140 DO 63 STEP 3200 LAYER metal9 ; TRACKS X 190 DO 63 STEP 3200 LAYER metal10 ; TRACKS Y 140 DO 63 STEP 3200 LAYER metal10 ; COMPONENTS 676 ; - PHY_1 FILLCELL_X1 + FIXED ( 100320 22400 ) FS + SOURCE DIST ; - PHY_10 FILLCELL_X1 + FIXED ( 100320 47600 ) N + SOURCE DIST ; - PHY_100 FILLCELL_X1 + FIXED ( 180120 81200 ) FN + SOURCE DIST ; - PHY_101 FILLCELL_X1 + FIXED ( 20140 84000 ) FS + SOURCE DIST ; - PHY_102 FILLCELL_X1 + FIXED ( 180120 84000 ) S + SOURCE DIST ; - PHY_103 FILLCELL_X1 + FIXED ( 20140 86800 ) N + SOURCE DIST ; - PHY_104 FILLCELL_X1 + FIXED ( 180120 86800 ) FN + SOURCE DIST ; - PHY_105 FILLCELL_X1 + FIXED ( 20140 89600 ) FS + SOURCE DIST ; - PHY_106 FILLCELL_X1 + FIXED ( 180120 89600 ) S + SOURCE DIST ; - PHY_107 FILLCELL_X1 + FIXED ( 20140 92400 ) N + SOURCE DIST ; - PHY_108 FILLCELL_X1 + FIXED ( 180120 92400 ) FN + SOURCE DIST ; - PHY_109 FILLCELL_X1 + FIXED ( 20140 95200 ) FS + SOURCE DIST ; - PHY_11 FILLCELL_X1 + FIXED ( 100320 50400 ) FS + SOURCE DIST ; - PHY_110 FILLCELL_X1 + FIXED ( 180120 95200 ) S + SOURCE DIST ; - PHY_111 FILLCELL_X1 + FIXED ( 20140 98000 ) N + SOURCE DIST ; - PHY_112 FILLCELL_X1 + FIXED ( 180120 98000 ) FN + SOURCE DIST ; - PHY_113 FILLCELL_X1 + FIXED ( 20140 100800 ) FS + SOURCE DIST ; - PHY_114 FILLCELL_X1 + FIXED ( 180120 100800 ) S + SOURCE DIST ; - PHY_115 FILLCELL_X1 + FIXED ( 20140 103600 ) N + SOURCE DIST ; - PHY_116 FILLCELL_X1 + FIXED ( 180120 103600 ) FN + SOURCE DIST ; - PHY_117 FILLCELL_X1 + FIXED ( 20140 106400 ) FS + SOURCE DIST ; - PHY_118 FILLCELL_X1 + FIXED ( 180120 106400 ) S + SOURCE DIST ; - PHY_119 FILLCELL_X1 + FIXED ( 20140 109200 ) N + SOURCE DIST ; - PHY_12 FILLCELL_X1 + FIXED ( 100320 53200 ) N + SOURCE DIST ; - PHY_120 FILLCELL_X1 + FIXED ( 180120 109200 ) FN + SOURCE DIST ; - PHY_121 FILLCELL_X1 + FIXED ( 20140 112000 ) FS + SOURCE DIST ; - PHY_122 FILLCELL_X1 + FIXED ( 180120 112000 ) S + SOURCE DIST ; - PHY_123 FILLCELL_X1 + FIXED ( 20140 114800 ) N + SOURCE DIST ; - PHY_124 FILLCELL_X1 + FIXED ( 180120 114800 ) FN + SOURCE DIST ; - PHY_125 FILLCELL_X1 + FIXED ( 20140 117600 ) FS + SOURCE DIST ; - PHY_126 FILLCELL_X1 + FIXED ( 180120 117600 ) S + SOURCE DIST ; - PHY_127 FILLCELL_X1 + FIXED ( 20140 120400 ) N + SOURCE DIST ; - PHY_128 FILLCELL_X1 + FIXED ( 180120 120400 ) FN + SOURCE DIST ; - PHY_129 FILLCELL_X1 + FIXED ( 20140 123200 ) FS + SOURCE DIST ; - PHY_13 FILLCELL_X1 + FIXED ( 100320 56000 ) FS + SOURCE DIST ; - PHY_130 FILLCELL_X1 + FIXED ( 180120 123200 ) S + SOURCE DIST ; - PHY_131 FILLCELL_X1 + FIXED ( 20140 126000 ) N + SOURCE DIST ; - PHY_132 FILLCELL_X1 + FIXED ( 180120 126000 ) FN + SOURCE DIST ; - PHY_133 FILLCELL_X1 + FIXED ( 20140 128800 ) FS + SOURCE DIST ; - PHY_134 FILLCELL_X1 + FIXED ( 180120 128800 ) S + SOURCE DIST ; - PHY_135 FILLCELL_X1 + FIXED ( 20140 131600 ) N + SOURCE DIST ; - PHY_136 FILLCELL_X1 + FIXED ( 180120 131600 ) FN + SOURCE DIST ; - PHY_137 FILLCELL_X1 + FIXED ( 20140 134400 ) FS + SOURCE DIST ; - PHY_138 FILLCELL_X1 + FIXED ( 180120 134400 ) S + SOURCE DIST ; - PHY_139 FILLCELL_X1 + FIXED ( 20140 137200 ) N + SOURCE DIST ; - PHY_14 FILLCELL_X1 + FIXED ( 100320 58800 ) N + SOURCE DIST ; - PHY_140 FILLCELL_X1 + FIXED ( 180120 137200 ) FN + SOURCE DIST ; - PHY_141 FILLCELL_X1 + FIXED ( 20140 140000 ) FS + SOURCE DIST ; - PHY_142 FILLCELL_X1 + FIXED ( 180120 140000 ) S + SOURCE DIST ; - PHY_143 FILLCELL_X1 + FIXED ( 20140 142800 ) N + SOURCE DIST ; - PHY_144 FILLCELL_X1 + FIXED ( 180120 142800 ) FN + SOURCE DIST ; - PHY_145 FILLCELL_X1 + FIXED ( 20140 145600 ) FS + SOURCE DIST ; - PHY_146 FILLCELL_X1 + FIXED ( 180120 145600 ) S + SOURCE DIST ; - PHY_147 FILLCELL_X1 + FIXED ( 20140 148400 ) N + SOURCE DIST ; - PHY_148 FILLCELL_X1 + FIXED ( 180120 148400 ) FN + SOURCE DIST ; - PHY_149 FILLCELL_X1 + FIXED ( 20140 151200 ) FS + SOURCE DIST ; - PHY_15 FILLCELL_X1 + FIXED ( 100320 61600 ) FS + SOURCE DIST ; - PHY_150 FILLCELL_X1 + FIXED ( 180120 151200 ) S + SOURCE DIST ; - PHY_151 FILLCELL_X1 + FIXED ( 20140 154000 ) N + SOURCE DIST ; - PHY_152 FILLCELL_X1 + FIXED ( 180120 154000 ) FN + SOURCE DIST ; - PHY_153 FILLCELL_X1 + FIXED ( 20140 156800 ) FS + SOURCE DIST ; - PHY_154 FILLCELL_X1 + FIXED ( 180120 156800 ) S + SOURCE DIST ; - PHY_155 FILLCELL_X1 + FIXED ( 20140 159600 ) N + SOURCE DIST ; - PHY_156 FILLCELL_X1 + FIXED ( 180120 159600 ) FN + SOURCE DIST ; - PHY_157 FILLCELL_X1 + FIXED ( 20140 162400 ) FS + SOURCE DIST ; - PHY_158 FILLCELL_X1 + FIXED ( 180120 162400 ) S + SOURCE DIST ; - PHY_159 FILLCELL_X1 + FIXED ( 20140 165200 ) N + SOURCE DIST ; - PHY_16 FILLCELL_X1 + FIXED ( 100320 64400 ) N + SOURCE DIST ; - PHY_160 FILLCELL_X1 + FIXED ( 180120 165200 ) FN + SOURCE DIST ; - PHY_161 FILLCELL_X1 + FIXED ( 20140 168000 ) FS + SOURCE DIST ; - PHY_162 FILLCELL_X1 + FIXED ( 180120 168000 ) S + SOURCE DIST ; - PHY_163 FILLCELL_X1 + FIXED ( 20140 170800 ) N + SOURCE DIST ; - PHY_164 FILLCELL_X1 + FIXED ( 180120 170800 ) FN + SOURCE DIST ; - PHY_165 FILLCELL_X1 + FIXED ( 20140 173600 ) FS + SOURCE DIST ; - PHY_166 FILLCELL_X1 + FIXED ( 180120 173600 ) S + SOURCE DIST ; - PHY_167 FILLCELL_X1 + FIXED ( 20140 176400 ) N + SOURCE DIST ; - PHY_168 FILLCELL_X1 + FIXED ( 180120 176400 ) FN + SOURCE DIST ; - PHY_17 FILLCELL_X1 + FIXED ( 100320 67200 ) FS + SOURCE DIST ; - PHY_18 FILLCELL_X1 + FIXED ( 100320 70000 ) N + SOURCE DIST ; - PHY_19 FILLCELL_X1 + FIXED ( 100320 72800 ) FS + SOURCE DIST ; - PHY_2 FILLCELL_X1 + FIXED ( 100320 25200 ) N + SOURCE DIST ; - PHY_20 FILLCELL_X1 + FIXED ( 100320 75600 ) N + SOURCE DIST ; - PHY_21 FILLCELL_X1 + FIXED ( 100320 78400 ) FS + SOURCE DIST ; - PHY_22 FILLCELL_X1 + FIXED ( 100320 81200 ) N + SOURCE DIST ; - PHY_23 FILLCELL_X1 + FIXED ( 100320 84000 ) FS + SOURCE DIST ; - PHY_24 FILLCELL_X1 + FIXED ( 100320 86800 ) N + SOURCE DIST ; - PHY_25 FILLCELL_X1 + FIXED ( 100320 89600 ) FS + SOURCE DIST ; - PHY_26 FILLCELL_X1 + FIXED ( 100320 92400 ) N + SOURCE DIST ; - PHY_27 FILLCELL_X1 + FIXED ( 100320 95200 ) FS + SOURCE DIST ; - PHY_28 FILLCELL_X1 + FIXED ( 100320 98000 ) N + SOURCE DIST ; - PHY_29 FILLCELL_X1 + FIXED ( 100320 100800 ) FS + SOURCE DIST ; - PHY_3 FILLCELL_X1 + FIXED ( 100320 28000 ) FS + SOURCE DIST ; - PHY_30 FILLCELL_X1 + FIXED ( 100320 103600 ) N + SOURCE DIST ; - PHY_31 FILLCELL_X1 + FIXED ( 100320 106400 ) FS + SOURCE DIST ; - PHY_32 FILLCELL_X1 + FIXED ( 100320 109200 ) N + SOURCE DIST ; - PHY_33 FILLCELL_X1 + FIXED ( 100320 112000 ) FS + SOURCE DIST ; - PHY_34 FILLCELL_X1 + FIXED ( 100320 114800 ) N + SOURCE DIST ; - PHY_35 FILLCELL_X1 + FIXED ( 100320 117600 ) FS + SOURCE DIST ; - PHY_36 FILLCELL_X1 + FIXED ( 100320 120400 ) N + SOURCE DIST ; - PHY_37 FILLCELL_X1 + FIXED ( 100320 123200 ) FS + SOURCE DIST ; - PHY_38 FILLCELL_X1 + FIXED ( 100320 126000 ) N + SOURCE DIST ; - PHY_39 FILLCELL_X1 + FIXED ( 100320 128800 ) FS + SOURCE DIST ; - PHY_4 FILLCELL_X1 + FIXED ( 100320 30800 ) N + SOURCE DIST ; - PHY_40 FILLCELL_X1 + FIXED ( 100320 131600 ) N + SOURCE DIST ; - PHY_41 FILLCELL_X1 + FIXED ( 100320 134400 ) FS + SOURCE DIST ; - PHY_42 FILLCELL_X1 + FIXED ( 100320 137200 ) N + SOURCE DIST ; - PHY_43 FILLCELL_X1 + FIXED ( 100320 140000 ) FS + SOURCE DIST ; - PHY_44 FILLCELL_X1 + FIXED ( 100320 142800 ) N + SOURCE DIST ; - PHY_45 FILLCELL_X1 + FIXED ( 100320 145600 ) FS + SOURCE DIST ; - PHY_46 FILLCELL_X1 + FIXED ( 100320 148400 ) N + SOURCE DIST ; - PHY_47 FILLCELL_X1 + FIXED ( 100320 151200 ) FS + SOURCE DIST ; - PHY_48 FILLCELL_X1 + FIXED ( 100320 154000 ) N + SOURCE DIST ; - PHY_49 FILLCELL_X1 + FIXED ( 100320 156800 ) FS + SOURCE DIST ; - PHY_5 FILLCELL_X1 + FIXED ( 100320 33600 ) FS + SOURCE DIST ; - PHY_50 FILLCELL_X1 + FIXED ( 100320 159600 ) N + SOURCE DIST ; - PHY_51 FILLCELL_X1 + FIXED ( 100320 162400 ) FS + SOURCE DIST ; - PHY_52 FILLCELL_X1 + FIXED ( 100320 165200 ) N + SOURCE DIST ; - PHY_53 FILLCELL_X1 + FIXED ( 100320 168000 ) FS + SOURCE DIST ; - PHY_54 FILLCELL_X1 + FIXED ( 100320 170800 ) N + SOURCE DIST ; - PHY_55 FILLCELL_X1 + FIXED ( 100320 173600 ) FS + SOURCE DIST ; - PHY_56 FILLCELL_X1 + FIXED ( 100320 176400 ) N + SOURCE DIST ; - PHY_57 FILLCELL_X1 + FIXED ( 20140 22400 ) FS + SOURCE DIST ; - PHY_58 FILLCELL_X1 + FIXED ( 180120 22400 ) S + SOURCE DIST ; - PHY_59 FILLCELL_X1 + FIXED ( 20140 25200 ) N + SOURCE DIST ; - PHY_6 FILLCELL_X1 + FIXED ( 100320 36400 ) N + SOURCE DIST ; - PHY_60 FILLCELL_X1 + FIXED ( 180120 25200 ) FN + SOURCE DIST ; - PHY_61 FILLCELL_X1 + FIXED ( 20140 28000 ) FS + SOURCE DIST ; - PHY_62 FILLCELL_X1 + FIXED ( 180120 28000 ) S + SOURCE DIST ; - PHY_63 FILLCELL_X1 + FIXED ( 20140 30800 ) N + SOURCE DIST ; - PHY_64 FILLCELL_X1 + FIXED ( 180120 30800 ) FN + SOURCE DIST ; - PHY_65 FILLCELL_X1 + FIXED ( 20140 33600 ) FS + SOURCE DIST ; - PHY_66 FILLCELL_X1 + FIXED ( 180120 33600 ) S + SOURCE DIST ; - PHY_67 FILLCELL_X1 + FIXED ( 20140 36400 ) N + SOURCE DIST ; - PHY_68 FILLCELL_X1 + FIXED ( 180120 36400 ) FN + SOURCE DIST ; - PHY_69 FILLCELL_X1 + FIXED ( 20140 39200 ) FS + SOURCE DIST ; - PHY_7 FILLCELL_X1 + FIXED ( 100320 39200 ) FS + SOURCE DIST ; - PHY_70 FILLCELL_X1 + FIXED ( 180120 39200 ) S + SOURCE DIST ; - PHY_71 FILLCELL_X1 + FIXED ( 20140 42000 ) N + SOURCE DIST ; - PHY_72 FILLCELL_X1 + FIXED ( 180120 42000 ) FN + SOURCE DIST ; - PHY_73 FILLCELL_X1 + FIXED ( 20140 44800 ) FS + SOURCE DIST ; - PHY_74 FILLCELL_X1 + FIXED ( 180120 44800 ) S + SOURCE DIST ; - PHY_75 FILLCELL_X1 + FIXED ( 20140 47600 ) N + SOURCE DIST ; - PHY_76 FILLCELL_X1 + FIXED ( 180120 47600 ) FN + SOURCE DIST ; - PHY_77 FILLCELL_X1 + FIXED ( 20140 50400 ) FS + SOURCE DIST ; - PHY_78 FILLCELL_X1 + FIXED ( 180120 50400 ) S + SOURCE DIST ; - PHY_79 FILLCELL_X1 + FIXED ( 20140 53200 ) N + SOURCE DIST ; - PHY_8 FILLCELL_X1 + FIXED ( 100320 42000 ) N + SOURCE DIST ; - PHY_80 FILLCELL_X1 + FIXED ( 180120 53200 ) FN + SOURCE DIST ; - PHY_81 FILLCELL_X1 + FIXED ( 20140 56000 ) FS + SOURCE DIST ; - PHY_82 FILLCELL_X1 + FIXED ( 180120 56000 ) S + SOURCE DIST ; - PHY_83 FILLCELL_X1 + FIXED ( 20140 58800 ) N + SOURCE DIST ; - PHY_84 FILLCELL_X1 + FIXED ( 180120 58800 ) FN + SOURCE DIST ; - PHY_85 FILLCELL_X1 + FIXED ( 20140 61600 ) FS + SOURCE DIST ; - PHY_86 FILLCELL_X1 + FIXED ( 180120 61600 ) S + SOURCE DIST ; - PHY_87 FILLCELL_X1 + FIXED ( 20140 64400 ) N + SOURCE DIST ; - PHY_88 FILLCELL_X1 + FIXED ( 180120 64400 ) FN + SOURCE DIST ; - PHY_89 FILLCELL_X1 + FIXED ( 20140 67200 ) FS + SOURCE DIST ; - PHY_9 FILLCELL_X1 + FIXED ( 100320 44800 ) FS + SOURCE DIST ; - PHY_90 FILLCELL_X1 + FIXED ( 180120 67200 ) S + SOURCE DIST ; - PHY_91 FILLCELL_X1 + FIXED ( 20140 70000 ) N + SOURCE DIST ; - PHY_92 FILLCELL_X1 + FIXED ( 180120 70000 ) FN + SOURCE DIST ; - PHY_93 FILLCELL_X1 + FIXED ( 20140 72800 ) FS + SOURCE DIST ; - PHY_94 FILLCELL_X1 + FIXED ( 180120 72800 ) S + SOURCE DIST ; - PHY_95 FILLCELL_X1 + FIXED ( 20140 75600 ) N + SOURCE DIST ; - PHY_96 FILLCELL_X1 + FIXED ( 180120 75600 ) FN + SOURCE DIST ; - PHY_97 FILLCELL_X1 + FIXED ( 20140 78400 ) FS + SOURCE DIST ; - PHY_98 FILLCELL_X1 + FIXED ( 180120 78400 ) S + SOURCE DIST ; - PHY_99 FILLCELL_X1 + FIXED ( 20140 81200 ) N + SOURCE DIST ; - _438_ INV_X2 + PLACED ( 81320 106400 ) FS ; - _439_ AND3_X1 + PLACED ( 66500 109200 ) N ; - _440_ XOR2_X1 + PLACED ( 104880 134400 ) FS ; - _441_ NOR4_X1 + PLACED ( 137940 103600 ) N ; - _442_ INV_X1 + PLACED ( 126160 128800 ) FS ; - _443_ INV_X1 + PLACED ( 113240 131600 ) N ; - _444_ NOR2_X1 + PLACED ( 108300 120400 ) N ; - _445_ NAND4_X1 + PLACED ( 113240 117600 ) FS ; - _446_ NOR4_X1 + PLACED ( 76760 72800 ) FS ; - _447_ NOR4_X1 + PLACED ( 95760 61600 ) FS ; - _448_ NAND2_X1 + PLACED ( 80560 70000 ) N ; - _449_ NOR2_X1 + PLACED ( 82460 120400 ) N ; - _450_ INV_X1 + PLACED ( 69920 114800 ) N ; - _451_ INV_X1 + PLACED ( 81700 117600 ) FS ; - _452_ NAND3_X1 + PLACED ( 74480 120400 ) N ; - _453_ AND2_X1 + PLACED ( 65740 123200 ) FS ; - _454_ OR3_X1 + PLACED ( 65360 120400 ) N ; - _455_ NAND2_X1 + PLACED ( 69160 117600 ) FS ; - _456_ OAI211_X1 + PLACED ( 78280 120400 ) N ; - _457_ INV_X2 + PLACED ( 69920 103600 ) N ; - _458_ BUF_X2 + PLACED ( 84360 109200 ) N ; - _459_ BUF_X2 + PLACED ( 112480 95200 ) FS ; - _460_ NAND4_X1 + PLACED ( 79040 123200 ) FS ; - _461_ NAND2_X1 + PLACED ( 78280 117600 ) FS ; - _462_ NAND3_X1 + PLACED ( 69540 120400 ) N ; - _463_ NOR2_X1 + PLACED ( 65740 117600 ) FS ; - _464_ AOI211_X1 + PLACED ( 69920 112000 ) FS ; - _465_ OR3_X1 + PLACED ( 65740 112000 ) FS ; - _466_ BUF_X2 + PLACED ( 88920 106400 ) FS ; - _467_ OAI21_X1 + PLACED ( 145160 134400 ) FS ; - _468_ INV_X1 + PLACED ( 101080 84000 ) FS ; - _469_ NAND2_X1 + PLACED ( 100700 86800 ) N ; - _470_ XNOR2_X2 + PLACED ( 132620 106400 ) FS ; - _471_ XNOR2_X1 + PLACED ( 130720 89600 ) FS ; - _472_ AND2_X1 + PLACED ( 132240 98000 ) N ; - _473_ XNOR2_X1 + PLACED ( 121600 128800 ) FS ; - _474_ XNOR2_X1 + PLACED ( 109440 134400 ) FS ; - _475_ AND2_X1 + PLACED ( 114380 126000 ) N ; - _476_ XNOR2_X2 + PLACED ( 148200 103600 ) N ; - _477_ XNOR2_X1 + PLACED ( 144400 86800 ) N ; - _478_ AND2_X1 + PLACED ( 139080 92400 ) N ; - _479_ NAND3_X1 + PLACED ( 112480 103600 ) N ; - _480_ INV_X1 + PLACED ( 93480 112000 ) FS ; - _481_ AND2_X1 + PLACED ( 100700 114800 ) N ; - _482_ NOR2_X1 + PLACED ( 104500 114800 ) N ; - _483_ INV_X1 + PLACED ( 107160 126000 ) N ; - _484_ NOR3_X1 + PLACED ( 106400 117600 ) FS ; - _485_ OR3_X1 + PLACED ( 107920 112000 ) FS ; - _486_ INV_X1 + PLACED ( 149720 92400 ) N ; - _487_ AND3_X1 + PLACED ( 147060 98000 ) N ; - _488_ INV_X1 + PLACED ( 147440 106400 ) FS ; - _489_ AND2_X1 + PLACED ( 142500 103600 ) N ; - _490_ OAI21_X1 + PLACED ( 139080 100800 ) FS ; - _491_ INV_X1 + PLACED ( 133380 109200 ) N ; - _492_ NOR2_X1 + PLACED ( 128060 106400 ) FS ; - _493_ INV_X1 + PLACED ( 123120 109200 ) N ; - _494_ INV_X1 + PLACED ( 118940 92400 ) N ; - _495_ NAND3_X1 + PLACED ( 123120 100800 ) FS ; - _496_ AND3_X1 + PLACED ( 121980 106400 ) FS ; - _497_ NOR2_X1 + PLACED ( 117800 114800 ) N ; - _498_ AOI211_X1 + PLACED ( 115520 123200 ) FS ; - _499_ OAI211_X1 + PLACED ( 116280 109200 ) N ; - _500_ NAND3_X1 + PLACED ( 113240 106400 ) FS ; - _501_ XNOR2_X1 + PLACED ( 74480 67200 ) FS ; - _502_ XNOR2_X1 + PLACED ( 101080 67200 ) FS ; - _503_ AND2_X1 + PLACED ( 81700 72800 ) FS ; - _504_ XNOR2_X2 + PLACED ( 63460 78400 ) FS ; - _505_ XNOR2_X1 + PLACED ( 69920 92400 ) N ; - _506_ AND3_X1 + PLACED ( 81700 86800 ) N ; - _507_ XNOR2_X1 + PLACED ( 81700 53200 ) N ; - _508_ XNOR2_X2 + PLACED ( 94240 67200 ) FS ; - _509_ NAND2_X1 + PLACED ( 92340 56000 ) FS ; - _510_ XNOR2_X2 + PLACED ( 100700 39200 ) FS ; - _511_ INV_X1 + PLACED ( 96900 44800 ) FS ; - _512_ XNOR2_X1 + PLACED ( 107160 53200 ) N ; - _513_ INV_X1 + PLACED ( 101460 50400 ) FS ; - _514_ NOR3_X1 + PLACED ( 96520 56000 ) FS ; - _515_ AND2_X1 + PLACED ( 104500 95200 ) FS ; - _516_ NAND2_X1 + PLACED ( 104120 98000 ) N ; - _517_ INV_X1 + PLACED ( 67640 89600 ) FS ; - _518_ AND3_X1 + PLACED ( 71440 84000 ) FS ; - _519_ INV_X1 + PLACED ( 66500 75600 ) N ; - _520_ AND2_X1 + PLACED ( 72200 78400 ) FS ; - _521_ OAI21_X1 + PLACED ( 78280 78400 ) FS ; - _522_ INV_X1 + PLACED ( 117420 67200 ) FS ; - _523_ NOR2_X1 + PLACED ( 93860 72800 ) FS ; - _524_ INV_X1 + PLACED ( 83600 67200 ) FS ; - _525_ AOI22_X1 + PLACED ( 87780 70000 ) N ; - _526_ OAI21_X1 + PLACED ( 93100 78400 ) FS ; - _527_ NAND2_X1 + PLACED ( 94240 86800 ) N ; - _528_ INV_X1 + PLACED ( 82840 56000 ) FS ; - _529_ NAND3_X1 + PLACED ( 91200 61600 ) FS ; - _530_ AND4_X1 + PLACED ( 95000 89600 ) FS ; - _531_ AND2_X1 + PLACED ( 86260 103600 ) N ; - _532_ INV_X1 + PLACED ( 104500 50400 ) FS ; - _533_ NOR2_X1 + PLACED ( 104880 58800 ) N ; - _534_ INV_X1 + PLACED ( 107540 56000 ) FS ; - _535_ AOI22_X1 + PLACED ( 102600 56000 ) FS ; - _536_ OR3_X1 + PLACED ( 100700 58800 ) N ; - _537_ NAND4_X1 + PLACED ( 100700 106400 ) FS ; - _538_ AND2_X1 + PLACED ( 114760 100800 ) FS ; - _539_ NAND4_X1 + PLACED ( 104500 100800 ) FS ; - _540_ XNOR2_X2 + PLACED ( 94240 117600 ) FS ; - _541_ INV_X1 + PLACED ( 102980 109200 ) N ; - _542_ NOR3_X1 + PLACED ( 100700 103600 ) N ; - _543_ AOI21_X1 + PLACED ( 95380 103600 ) N ; - _544_ NAND2_X1 + PLACED ( 87780 100800 ) FS ; - _545_ OR2_X2 + PLACED ( 87400 95200 ) FS ; - _546_ BUF_X2 + PLACED ( 100700 95200 ) FS ; - _547_ OAI211_X1 + PLACED ( 141360 126000 ) N ; - _548_ OR2_X1 + PLACED ( 80940 103600 ) N ; - _549_ BUF_X2 + PLACED ( 77140 103600 ) N ; - _550_ BUF_X2 + PLACED ( 124260 75600 ) N ; - _551_ MUX2_X1 + PLACED ( 145160 128800 ) FS ; - _552_ OAI21_X1 + PLACED ( 108680 100800 ) FS ; - _553_ INV_X1 + PLACED ( 93480 100800 ) FS ; - _554_ NOR2_X2 + PLACED ( 93100 98000 ) N ; - _555_ CLKBUF_X2 + PLACED ( 81700 92400 ) N ; - _556_ NAND2_X1 + PLACED ( 105260 123200 ) FS ; - _557_ XOR2_X1 + PLACED ( 100700 123200 ) FS ; - _558_ NAND2_X1 + PLACED ( 96900 128800 ) FS ; - _559_ OAI211_X1 + PLACED ( 100700 126000 ) N ; - _560_ MUX2_X1 + PLACED ( 95380 131600 ) N ; - _561_ OAI21_X1 + PLACED ( 91200 137200 ) N ; - _562_ AOI21_X1 + PLACED ( 101460 120400 ) N ; - _563_ XNOR2_X1 + PLACED ( 105640 128800 ) FS ; - _564_ NAND2_X1 + PLACED ( 100700 131600 ) N ; - _565_ OAI211_X1 + PLACED ( 100700 137200 ) N ; - _566_ MUX2_X1 + PLACED ( 100700 140000 ) FS ; - _567_ OAI21_X1 + PLACED ( 135280 137200 ) N ; - _568_ INV_X1 + PLACED ( 109440 123200 ) FS ; - _569_ AND2_X1 + PLACED ( 113620 128800 ) FS ; - _570_ AND2_X1 + PLACED ( 117420 128800 ) FS ; - _571_ NOR2_X1 + PLACED ( 120460 126000 ) N ; - _572_ XNOR2_X1 + PLACED ( 124260 126000 ) N ; - _573_ NAND2_X1 + PLACED ( 131100 128800 ) FS ; - _574_ OAI211_X1 + PLACED ( 130720 134400 ) FS ; - _575_ MUX2_X1 + PLACED ( 129200 137200 ) N ; - _576_ OAI21_X1 + PLACED ( 139840 78400 ) FS ; - _577_ AND2_X1 + PLACED ( 120460 123200 ) FS ; - _578_ AOI21_X1 + PLACED ( 119700 117600 ) FS ; - _579_ NAND2_X1 + PLACED ( 113240 114800 ) N ; - _580_ NAND2_X1 + PLACED ( 117420 112000 ) FS ; - _581_ XOR2_X1 + PLACED ( 138700 86800 ) N ; - _582_ NAND2_X1 + PLACED ( 140220 81200 ) N ; - _583_ OAI211_X1 + PLACED ( 143640 81200 ) N ; - _584_ MUX2_X1 + PLACED ( 145920 78400 ) FS ; - _585_ OAI21_X1 + PLACED ( 147060 120400 ) N ; - _586_ AND2_X1 + PLACED ( 140600 89600 ) FS ; - _587_ NOR2_X1 + PLACED ( 148200 95200 ) FS ; - _588_ NOR3_X1 + PLACED ( 142880 92400 ) N ; - _589_ AOI221_X4 + PLACED ( 140980 95200 ) FS ; - _590_ NAND2_X1 + PLACED ( 146300 109200 ) N ; - _591_ OAI211_X1 + PLACED ( 147440 112000 ) FS ; - _592_ MUX2_X1 + PLACED ( 147820 114800 ) N ; - _593_ OAI21_X1 + PLACED ( 139460 75600 ) N ; - _594_ NAND2_X1 + PLACED ( 142880 98000 ) N ; - _595_ OAI21_X1 + PLACED ( 142880 100800 ) FS ; - _596_ AOI21_X1 + PLACED ( 136040 98000 ) N ; - _597_ XNOR2_X1 + PLACED ( 130340 92400 ) N ; - _598_ NAND2_X1 + PLACED ( 132620 81200 ) N ; - _599_ OAI211_X1 + PLACED ( 133380 78400 ) FS ; - _600_ MUX2_X1 + PLACED ( 129960 72800 ) FS ; - _601_ OAI21_X1 + PLACED ( 92340 114800 ) N ; - _602_ AND2_X1 + PLACED ( 124640 95200 ) FS ; - _603_ NOR2_X1 + PLACED ( 121220 98000 ) N ; - _604_ NOR3_X1 + PLACED ( 126540 98000 ) N ; - _605_ NOR2_X1 + PLACED ( 125780 103600 ) N ; - _606_ XNOR2_X1 + PLACED ( 126160 109200 ) N ; - _607_ NAND2_X1 + PLACED ( 128820 120400 ) N ; - _608_ OAI211_X1 + PLACED ( 127300 114800 ) N ; - _609_ MUX2_X1 + PLACED ( 128060 117600 ) FS ; - _610_ OAI21_X1 + PLACED ( 80560 95200 ) FS ; - _611_ NAND2_X1 + PLACED ( 117420 98000 ) N ; - _612_ AND2_X1 + PLACED ( 127680 100800 ) FS ; - _613_ AOI221_X1 + PLACED ( 129960 103600 ) N ; - _614_ NAND2_X1 + PLACED ( 114000 98000 ) N ; - _615_ XOR2_X1 + PLACED ( 76000 95200 ) FS ; - _616_ NAND2_X1 + PLACED ( 76380 98000 ) N ; - _617_ OAI211_X1 + PLACED ( 71820 95200 ) FS ; - _618_ MUX2_X1 + PLACED ( 62320 92400 ) N ; - _619_ OAI21_X1 + PLACED ( 63460 86800 ) N ; - _620_ AND3_X1 + PLACED ( 77520 86800 ) N ; - _621_ AND2_X1 + PLACED ( 77520 89600 ) FS ; - _622_ NOR2_X1 + PLACED ( 70300 86800 ) N ; - _623_ NOR3_X1 + PLACED ( 73720 86800 ) N ; - _624_ AOI211_X1 + PLACED ( 76380 84000 ) FS ; - _625_ NAND2_X1 + PLACED ( 75620 81200 ) N ; - _626_ OAI211_X1 + PLACED ( 65360 84000 ) FS ; - _627_ MUX2_X1 + PLACED ( 60800 75600 ) N ; - _628_ OAI21_X1 + PLACED ( 65360 53200 ) N ; - _629_ NOR2_X1 + PLACED ( 70300 75600 ) N ; - _630_ AOI21_X1 + PLACED ( 71820 81200 ) N ; - _631_ INV_X1 + PLACED ( 74100 75600 ) N ; - _632_ NOR2_X1 + PLACED ( 73340 72800 ) FS ; - _633_ XNOR2_X1 + PLACED ( 70680 70000 ) N ; - _634_ NAND2_X1 + PLACED ( 69920 67200 ) FS ; - _635_ OAI211_X1 + PLACED ( 65740 58800 ) N ; - _636_ MUX2_X1 + PLACED ( 64600 61600 ) FS ; - _637_ OAI21_X1 + PLACED ( 114760 84000 ) FS ; - _638_ OAI21_X1 + PLACED ( 116660 78400 ) FS ; - _639_ OAI21_X1 + PLACED ( 80560 75600 ) N ; - _640_ NOR2_X1 + PLACED ( 86640 67200 ) FS ; - _641_ INV_X1 + PLACED ( 96520 70000 ) N ; - _642_ AND2_X1 + PLACED ( 92720 70000 ) N ; - _643_ XNOR2_X1 + PLACED ( 100700 70000 ) N ; - _644_ AND2_X1 + PLACED ( 120460 78400 ) FS ; - _645_ OAI21_X1 + PLACED ( 120080 75600 ) N ; - _646_ OAI21_X1 + PLACED ( 118940 72800 ) FS ; - _647_ AND2_X1 + PLACED ( 88920 89600 ) FS ; - _648_ INV_X1 + PLACED ( 89680 84000 ) FS ; - _649_ NAND2_X1 + PLACED ( 83220 78400 ) FS ; - _650_ AOI21_X1 + PLACED ( 90060 72800 ) FS ; - _651_ AND3_X1 + PLACED ( 88920 78400 ) FS ; - _652_ XNOR2_X1 + PLACED ( 104500 47600 ) N ; - _653_ NAND2_X1 + PLACED ( 104500 44800 ) FS ; - _654_ OAI21_X1 + PLACED ( 83600 42000 ) N ; - _655_ OAI211_X1 + PLACED ( 105260 42000 ) N ; - _656_ MUX2_X1 + PLACED ( 109440 44800 ) FS ; - _657_ NOR2_X1 + PLACED ( 96900 47600 ) N ; - _658_ NOR2_X1 + PLACED ( 101460 53200 ) N ; - _659_ NOR2_X1 + PLACED ( 100700 44800 ) FS ; - _660_ XNOR2_X1 + PLACED ( 95760 39200 ) FS ; - _661_ NAND2_X1 + PLACED ( 93480 36400 ) N ; - _662_ OAI21_X1 + PLACED ( 86260 39200 ) FS ; - _663_ OAI211_X1 + PLACED ( 90440 39200 ) FS ; - _664_ MUX2_X1 + PLACED ( 88160 36400 ) N ; - _665_ OR3_X1 + PLACED ( 93860 50400 ) FS ; - _666_ INV_X1 + PLACED ( 86640 50400 ) FS ; - _667_ AOI22_X1 + PLACED ( 95000 42000 ) N ; - _668_ AND3_X1 + PLACED ( 88160 47600 ) N ; - _669_ AOI21_X1 + PLACED ( 84360 47600 ) N ; - _670_ NOR2_X1 + PLACED ( 87020 44800 ) FS ; - _671_ NAND2_X1 + PLACED ( 78280 42000 ) N ; - _672_ OAI21_X1 + PLACED ( 65740 50400 ) FS ; - _673_ OAI211_X1 + PLACED ( 69920 44800 ) FS ; - _674_ MUX2_X1 + PLACED ( 70300 42000 ) N ; - _675_ NOR2_X1 + PLACED ( 85880 58800 ) N ; - _676_ NOR2_X1 + PLACED ( 86640 56000 ) FS ; - _677_ XNOR2_X1 + PLACED ( 89680 58800 ) N ; - _678_ AND2_X1 + PLACED ( 96520 75600 ) N ; - _679_ OAI21_X1 + PLACED ( 114000 134400 ) FS ; - _680_ OAI21_X1 + PLACED ( 110960 84000 ) FS ; - _681_ OAI21_X1 + PLACED ( 105640 81200 ) N ; - _682_ OAI21_X1 + PLACED ( 104120 84000 ) FS ; - _683_ MUX2_X1 + PLACED ( 148580 137200 ) N ; - _684_ NAND2_X2 + PLACED ( 83980 98000 ) N ; - _685_ BUF_X2 + PLACED ( 91200 92400 ) N ; - _686_ MUX2_X1 + PLACED ( 140600 137200 ) N ; - _687_ MUX2_X1 + PLACED ( 87400 114800 ) N ; - _688_ MUX2_X1 + PLACED ( 87780 117600 ) FS ; - _689_ MUX2_X1 + PLACED ( 115140 145600 ) FS ; - _690_ MUX2_X1 + PLACED ( 112860 142800 ) N ; - _691_ MUX2_X1 + PLACED ( 117800 142800 ) N ; - _692_ MUX2_X1 + PLACED ( 120460 140000 ) FS ; - _693_ MUX2_X1 + PLACED ( 155420 95200 ) FS ; - _694_ MUX2_X1 + PLACED ( 153140 92400 ) N ; - _695_ MUX2_X1 + PLACED ( 155800 98000 ) N ; - _696_ MUX2_X1 + PLACED ( 154280 100800 ) FS ; - _697_ MUX2_X1 + PLACED ( 118560 89600 ) FS ; - _698_ MUX2_X1 + PLACED ( 121220 86800 ) N ; - _699_ MUX2_X1 + PLACED ( 141360 120400 ) N ; - _700_ MUX2_X1 + PLACED ( 140220 117600 ) FS ; - _701_ MUX2_X1 + PLACED ( 55860 100800 ) FS ; - _702_ MUX2_X1 + PLACED ( 57760 98000 ) N ; - _703_ MUX2_X1 + PLACED ( 55100 78400 ) FS ; - _704_ MUX2_X1 + PLACED ( 59660 84000 ) FS ; - _705_ MUX2_X1 + PLACED ( 83220 64400 ) N ; - _706_ MUX2_X1 + PLACED ( 80560 61600 ) FS ; - _707_ MUX2_X1 + PLACED ( 106020 61600 ) FS ; - _708_ MUX2_X1 + PLACED ( 106780 67200 ) FS ; - _709_ MUX2_X1 + PLACED ( 113240 61600 ) FS ; - _710_ MUX2_X1 + PLACED ( 111720 58800 ) N ; - _711_ MUX2_X1 + PLACED ( 109060 36400 ) N ; - _712_ MUX2_X1 + PLACED ( 106780 39200 ) FS ; - _713_ MUX2_X1 + PLACED ( 71820 39200 ) FS ; - _714_ MUX2_X1 + PLACED ( 77520 44800 ) FS ; - _715_ MUX2_X1 + PLACED ( 94620 84000 ) FS ; - _716_ MUX2_X1 + PLACED ( 100700 78400 ) FS ; - _717_ CLKBUF_X1 + PLACED ( 56240 109200 ) N ; - _718_ CLKBUF_X1 + PLACED ( 80180 109200 ) N ; - _719_ CLKBUF_X1 + PLACED ( 62320 112000 ) FS ; - _720_ BUF_X1 + PLACED ( 63460 106400 ) FS ; - _721_ CLKBUF_X1 + PLACED ( 74860 56000 ) FS ; - _722_ CLKBUF_X1 + PLACED ( 60800 128800 ) FS ; - _723_ CLKBUF_X1 + PLACED ( 109820 86800 ) N ; - _724_ BUF_X1 + PLACED ( 105640 72800 ) FS ; - _725_ CLKBUF_X1 + PLACED ( 79420 39200 ) FS ; - _726_ BUF_X1 + PLACED ( 78280 50400 ) FS ; - _727_ BUF_X1 + PLACED ( 93100 33600 ) FS ; - _728_ CLKBUF_X2 + PLACED ( 105640 33600 ) FS ; - _729_ CLKBUF_X1 + PLACED ( 117040 47600 ) N ; - _730_ BUF_X1 + PLACED ( 118560 56000 ) FS ; - _731_ CLKBUF_X1 + PLACED ( 122360 61600 ) FS ; - _732_ BUF_X1 + PLACED ( 111340 72800 ) FS ; - _733_ CLKBUF_X1 + PLACED ( 66880 64400 ) N ; - _734_ BUF_X1 + PLACED ( 77140 64400 ) N ; - _735_ CLKBUF_X1 + PLACED ( 63460 72800 ) FS ; - _736_ BUF_X1 + PLACED ( 57760 81200 ) N ; - _737_ CLKBUF_X1 + PLACED ( 58520 92400 ) N ; - _738_ CLKBUF_X1 + PLACED ( 71440 98000 ) N ; - _739_ BUF_X1 + PLACED ( 139460 123200 ) FS ; - _740_ BUF_X1 + PLACED ( 142880 112000 ) FS ; - _741_ CLKBUF_X1 + PLACED ( 136040 72800 ) FS ; - _742_ BUF_X1 + PLACED ( 131480 86800 ) N ; - _743_ CLKBUF_X1 + PLACED ( 156560 114800 ) N ; - _744_ BUF_X1 + PLACED ( 158460 109200 ) N ; - _745_ CLKBUF_X1 + PLACED ( 154660 78400 ) FS ; - _746_ CLKBUF_X1 + PLACED ( 157320 86800 ) N ; - _747_ BUF_X1 + PLACED ( 130720 142800 ) N ; - _748_ CLKBUF_X1 + PLACED ( 123880 134400 ) FS ; - _749_ CLKBUF_X1 + PLACED ( 105260 145600 ) FS ; - _750_ CLKBUF_X1 + PLACED ( 110960 140000 ) FS ; - _751_ BUF_X1 + PLACED ( 90440 128800 ) FS ; - _752_ BUF_X1 + PLACED ( 91200 120400 ) N ; - _753_ CLKBUF_X1 + PLACED ( 151620 134400 ) FS ; - _754_ BUF_X1 + PLACED ( 139460 134400 ) FS ; - _755_ CLKBUF_X1 + PLACED ( 95000 137200 ) N ; - _756_ CLKBUF_X1 + PLACED ( 78660 114800 ) N ; - _757_ CLKBUF_X1 + PLACED ( 61560 120400 ) N ; - _758_ CLKBUF_X1 + PLACED ( 58140 120400 ) N ; - _759_ BUF_X2 + PLACED ( 52060 100800 ) FS ; - _760_ CLKBUF_X1 + PLACED ( 80560 128800 ) FS ; - _761_ CLKBUF_X1 + PLACED ( 74860 117600 ) FS ; - _762_ CLKBUF_X1 + PLACED ( 60420 109200 ) N ; - _763_ CLKBUF_X1 + PLACED ( 141740 128800 ) FS ; - _764_ CLKBUF_X1 + PLACED ( 150480 173600 ) FS ; - _765_ CLKBUF_X1 + PLACED ( 150100 128800 ) FS ; - _766_ CLKBUF_X1 + PLACED ( 92720 126000 ) N ; - _767_ CLKBUF_X1 + PLACED ( 174040 92400 ) N ; - _768_ CLKBUF_X1 + PLACED ( 90060 134400 ) FS ; - _769_ CLKBUF_X1 + PLACED ( 105640 140000 ) FS ; - _770_ CLKBUF_X1 + PLACED ( 73720 142800 ) N ; - _771_ CLKBUF_X1 + PLACED ( 100700 145600 ) FS ; - _772_ CLKBUF_X1 + PLACED ( 127300 134400 ) FS ; - _773_ CLKBUF_X1 + PLACED ( 137940 145600 ) FS ; - _774_ CLKBUF_X1 + PLACED ( 130340 140000 ) FS ; - _775_ CLKBUF_X1 + PLACED ( 149340 81200 ) N ; - _776_ CLKBUF_X1 + PLACED ( 36100 72800 ) FS ; - _777_ CLKBUF_X1 + PLACED ( 149340 72800 ) FS ; - _778_ CLKBUF_X1 + PLACED ( 154660 109200 ) N ; - _779_ CLKBUF_X1 + PLACED ( 175180 123200 ) FS ; - _780_ CLKBUF_X1 + PLACED ( 152760 114800 ) N ; - _781_ CLKBUF_X1 + PLACED ( 129200 81200 ) N ; - _782_ CLKBUF_X1 + PLACED ( 144400 70000 ) N ; - _783_ CLKBUF_X1 + PLACED ( 132620 67200 ) FS ; - _784_ CLKBUF_X1 + PLACED ( 133000 117600 ) FS ; - _785_ CLKBUF_X1 + PLACED ( 85500 173600 ) FS ; - _786_ CLKBUF_X1 + PLACED ( 132240 120400 ) N ; - _787_ CLKBUF_X1 + PLACED ( 69540 100800 ) FS ; - _788_ CLKBUF_X1 + PLACED ( 173280 98000 ) N ; - _789_ CLKBUF_X1 + PLACED ( 55480 95200 ) FS ; - _790_ CLKBUF_X1 + PLACED ( 60040 86800 ) N ; - _791_ CLKBUF_X1 + PLACED ( 55480 112000 ) FS ; - _792_ CLKBUF_X1 + PLACED ( 58900 70000 ) N ; - _793_ CLKBUF_X1 + PLACED ( 69540 61600 ) FS ; - _794_ CLKBUF_X1 + PLACED ( 61560 47600 ) N ; - _795_ CLKBUF_X1 + PLACED ( 61180 61600 ) FS ; - _796_ CLKBUF_X1 + PLACED ( 115900 75600 ) N ; - _797_ CLKBUF_X1 + PLACED ( 112480 173600 ) FS ; - _798_ CLKBUF_X1 + PLACED ( 120460 67200 ) FS ; - _799_ CLKBUF_X1 + PLACED ( 114380 50400 ) FS ; - _800_ CLKBUF_X1 + PLACED ( 22040 33600 ) FS ; - _801_ CLKBUF_X1 + PLACED ( 114380 42000 ) N ; - _802_ CLKBUF_X1 + PLACED ( 100700 33600 ) FS ; - _803_ CLKBUF_X1 + PLACED ( 87020 28000 ) FS ; - _804_ CLKBUF_X1 + PLACED ( 88160 33600 ) FS ; - _805_ CLKBUF_X1 + PLACED ( 70680 47600 ) N ; - _806_ CLKBUF_X1 + PLACED ( 42180 173600 ) FS ; - _807_ CLKBUF_X1 + PLACED ( 68400 39200 ) FS ; - _808_ CLKBUF_X1 + PLACED ( 110580 78400 ) FS ; - _809_ CLKBUF_X1 + PLACED ( 117420 173600 ) FS ; - _810_ CLKBUF_X1 + PLACED ( 106400 86800 ) N ; - _811_ CLKBUF_X1 + PLACED ( 155420 137200 ) N ; - _812_ CLKBUF_X1 + PLACED ( 136040 134400 ) FS ; - _813_ CLKBUF_X1 + PLACED ( 81320 25200 ) N ; - _814_ CLKBUF_X1 + PLACED ( 87400 120400 ) N ; - _815_ CLKBUF_X1 + PLACED ( 165300 151200 ) FS ; - _816_ CLKBUF_X1 + PLACED ( 109440 145600 ) FS ; - _817_ CLKBUF_X1 + PLACED ( 22040 170800 ) N ; - _818_ CLKBUF_X1 + PLACED ( 122740 142800 ) N ; - _819_ CLKBUF_X1 + PLACED ( 164540 100800 ) FS ; - _820_ CLKBUF_X1 + PLACED ( 153900 86800 ) N ; - _821_ CLKBUF_X1 + PLACED ( 164540 25200 ) N ; - _822_ CLKBUF_X1 + PLACED ( 156560 103600 ) N ; - _823_ CLKBUF_X1 + PLACED ( 23180 61600 ) FS ; - _824_ CLKBUF_X1 + PLACED ( 123880 81200 ) N ; - _825_ CLKBUF_X1 + PLACED ( 175180 128800 ) FS ; - _826_ CLKBUF_X1 + PLACED ( 139460 112000 ) FS ; - _827_ CLKBUF_X1 + PLACED ( 50160 103600 ) N ; - _828_ CLKBUF_X1 + PLACED ( 62700 100800 ) FS ; - _829_ CLKBUF_X1 + PLACED ( 22040 75600 ) N ; - _830_ CLKBUF_X1 + PLACED ( 53960 81200 ) N ; - _831_ CLKBUF_X1 + PLACED ( 120840 173600 ) FS ; - _832_ CLKBUF_X1 + PLACED ( 76760 61600 ) FS ; - _833_ CLKBUF_X1 + PLACED ( 105640 25200 ) N ; - _834_ CLKBUF_X1 + PLACED ( 111720 67200 ) FS ; - _835_ CLKBUF_X1 + PLACED ( 119320 165200 ) N ; - _836_ CLKBUF_X1 + PLACED ( 115140 56000 ) FS ; - _837_ CLKBUF_X1 + PLACED ( 114760 33600 ) FS ; - _838_ CLKBUF_X1 + PLACED ( 109440 33600 ) FS ; - _839_ CLKBUF_X1 + PLACED ( 66120 33600 ) FS ; - _840_ CLKBUF_X1 + PLACED ( 76000 47600 ) N ; - _841_ CLKBUF_X1 + PLACED ( 22040 86800 ) N ; - _842_ CLKBUF_X1 + PLACED ( 105640 78400 ) FS ; - _843_ CLKBUF_X1 + PLACED ( 91960 140000 ) FS ; - _844_ CLKBUF_X1 + PLACED ( 80560 131600 ) N ; - _845_ CLKBUF_X1 + PLACED ( 151240 123200 ) FS ; - _846_ CLKBUF_X1 + PLACED ( 135660 61600 ) FS ; - _847_ CLKBUF_X1 + PLACED ( 159600 92400 ) N ; - _848_ CLKBUF_X1 + PLACED ( 126540 72800 ) FS ; - _849_ CLKBUF_X1 + PLACED ( 157320 123200 ) FS ; - _850_ CLKBUF_X1 + PLACED ( 71060 106400 ) FS ; - _851_ CLKBUF_X1 + PLACED ( 83980 81200 ) N ; - _852_ CLKBUF_X1 + PLACED ( 49400 75600 ) N ; - _853_ CLKBUF_X1 + PLACED ( 128060 67200 ) FS ; - _854_ CLKBUF_X1 + PLACED ( 114000 36400 ) N ; - _855_ CLKBUF_X1 + PLACED ( 100700 25200 ) N ; - _856_ CLKBUF_X1 + PLACED ( 125780 39200 ) FS ; - _857_ CLKBUF_X1 + PLACED ( 87400 25200 ) N ; - _858_ DFF_X1 + PLACED ( 54340 106400 ) FS ; - _859_ DFF_X1 + PLACED ( 55100 117600 ) FS ; - _860_ DFF_X1 + PLACED ( 74100 112000 ) FS ; - _861_ DFF_X1 + PLACED ( 148200 131600 ) N ; - _862_ DFF_X1 + PLACED ( 84740 131600 ) N ; - _863_ DFF_X1 + PLACED ( 100700 148400 ) N ; - _864_ DFF_X1 + PLACED ( 128060 145600 ) FS ; - _865_ DFF_X1 + PLACED ( 149720 75600 ) N ; - _866_ DFF_X1 + PLACED ( 152000 117600 ) FS ; - _867_ DFF_X1 + PLACED ( 132240 70000 ) N ; - _868_ DFF_X1 + PLACED ( 130720 123200 ) FS ; - _869_ DFF_X1 + PLACED ( 49780 92400 ) N ; - _870_ DFF_X1 + PLACED ( 54720 72800 ) FS ; - _871_ DFF_X1 + PLACED ( 58140 64400 ) N ; - _872_ DFF_X1 + PLACED ( 119700 64400 ) N ; - _873_ DFF_X1 + PLACED ( 114380 44800 ) FS ; - _874_ DFF_X1 + PLACED ( 86640 30800 ) N ; - _875_ DFF_X1 + PLACED ( 73340 36400 ) N ; - _876_ DFF_X1 + PLACED ( 107160 89600 ) FS ; - _877_ DFF_X1 + PLACED ( 135280 131600 ) N ; - _878_ DFF_X1 + PLACED ( 85120 123200 ) FS ; - _879_ DFF_X1 + PLACED ( 104120 142800 ) N ; - _880_ DFF_X1 + PLACED ( 119700 137200 ) N ; - _881_ DFF_X1 + PLACED ( 150100 84000 ) FS ; - _882_ DFF_X1 + PLACED ( 154660 106400 ) FS ; - _883_ DFF_X1 + PLACED ( 124260 84000 ) FS ; - _884_ DFF_X1 + PLACED ( 134520 114800 ) N ; - _885_ DFF_X1 + PLACED ( 62700 98000 ) N ; - _886_ DFF_X1 + PLACED ( 50920 84000 ) FS ; - _887_ DFF_X1 + PLACED ( 69920 58800 ) N ; - _888_ DFF_X1 + PLACED ( 109060 70000 ) N ; - _889_ DFF_X1 + PLACED ( 113620 53200 ) N ; - _890_ DFF_X1 + PLACED ( 100700 30800 ) N ; - _891_ DFF_X1 + PLACED ( 69540 50400 ) FS ; - _892_ DFF_X1 + PLACED ( 103360 75600 ) N ; - buffer1 BUF_X4 + PLACED ( 165300 176400 ) N ; - buffer10 BUF_X4 + PLACED ( 170240 22400 ) FS ; - buffer11 BUF_X4 + PLACED ( 175180 126000 ) N ; - buffer12 BUF_X4 + PLACED ( 30400 22400 ) FS ; - buffer13 BUF_X4 + PLACED ( 139840 176400 ) N ; - buffer14 BUF_X4 + PLACED ( 66120 176400 ) N ; - buffer15 BUF_X4 + PLACED ( 175180 81200 ) N ; - buffer16 BUF_X4 + PLACED ( 155800 176400 ) N ; - buffer17 BUF_X4 + PLACED ( 25460 176400 ) N ; - buffer18 BUF_X4 + PLACED ( 43700 22400 ) FS ; - buffer19 BUF_X4 + PLACED ( 147820 22400 ) FS ; - buffer2 BUF_X4 + PLACED ( 35720 176400 ) N ; - buffer20 BUF_X4 + PLACED ( 175180 170800 ) N ; - buffer21 BUF_X4 + PLACED ( 104120 22400 ) FS ; - buffer22 BUF_X4 + PLACED ( 125400 176400 ) N ; - buffer23 BUF_X4 + PLACED ( 20520 72800 ) FS ; - buffer24 BUF_X4 + PLACED ( 30400 176400 ) N ; - buffer25 BUF_X4 + PLACED ( 175180 156800 ) FS ; - buffer26 BUF_X4 + PLACED ( 20520 58800 ) N ; - buffer27 BUF_X4 + PLACED ( 175180 28000 ) FS ; - buffer28 BUF_X4 + PLACED ( 175180 112000 ) FS ; - buffer29 BUF_X4 + PLACED ( 20520 173600 ) FS ; - buffer3 BUF_X4 + PLACED ( 88540 22400 ) FS ; - buffer30 BUF_X4 + PLACED ( 150860 176400 ) N ; - buffer31 BUF_X4 + PLACED ( 74100 22400 ) FS ; - buffer32 BUF_X4 + PLACED ( 175180 140000 ) FS ; - buffer33 BUF_X4 + PLACED ( 170240 176400 ) N ; - buffer34 BUF_X4 + PLACED ( 20520 103600 ) N ; - buffer35 BUF_X4 + PLACED ( 20520 176400 ) N ; - buffer36 BUF_X4 + PLACED ( 20520 22400 ) FS ; - buffer37 BUF_X4 + PLACED ( 20520 25200 ) N ; - buffer38 BUF_X4 + PLACED ( 133380 22400 ) FS ; - buffer39 BUF_X4 + PLACED ( 175180 22400 ) FS ; - buffer4 BUF_X4 + PLACED ( 20520 28000 ) FS ; - buffer40 BUF_X4 + PLACED ( 175180 25200 ) N ; - buffer41 BUF_X4 + PLACED ( 175180 67200 ) FS ; - buffer42 BUF_X4 + PLACED ( 20520 89600 ) FS ; - buffer43 BUF_X4 + PLACED ( 118560 22400 ) FS ; - buffer44 BUF_X4 + PLACED ( 20520 117600 ) FS ; - buffer45 BUF_X4 + PLACED ( 175180 176400 ) N ; - buffer46 BUF_X4 + PLACED ( 20520 44800 ) FS ; - buffer47 BUF_X4 + PLACED ( 175180 36400 ) N ; - buffer48 BUF_X4 + PLACED ( 25460 22400 ) FS ; - buffer49 BUF_X4 + PLACED ( 163400 22400 ) FS ; - buffer5 BUF_X4 + PLACED ( 110960 176400 ) N ; - buffer50 BUF_X4 + PLACED ( 20520 134400 ) FS ; - buffer51 BUF_X4 + PLACED ( 20520 148400 ) N ; - buffer52 BUF_X4 + PLACED ( 20520 162400 ) FS ; - buffer53 BUF_X4 + PLACED ( 175180 53200 ) N ; - buffer6 BUF_X4 + PLACED ( 59280 22400 ) FS ; - buffer7 BUF_X4 + PLACED ( 51680 176400 ) N ; - buffer8 BUF_X4 + PLACED ( 175180 95200 ) FS ; - buffer9 BUF_X4 + PLACED ( 80560 176400 ) N ; END COMPONENTS PINS 54 ; - clk + NET clk + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 95390 201600 ) S ; - req_msg[31] + NET req_msg[31] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 184990 201600 ) S ; - req_msg[30] + NET req_msg[30] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 36030 201600 ) S ; - req_msg[29] + NET req_msg[29] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 88670 0 ) N ; - req_msg[28] + NET req_msg[28] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 29260 ) E ; - req_msg[27] + NET req_msg[27] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 111070 201600 ) S ; - req_msg[26] + NET req_msg[26] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 59550 0 ) N ; - req_msg[25] + NET req_msg[25] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 51710 201600 ) S ; - req_msg[24] + NET req_msg[24] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 96460 ) W ; - req_msg[23] + NET req_msg[23] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 80830 201600 ) S ; - req_msg[22] + NET req_msg[22] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 7980 ) W ; - req_msg[21] + NET req_msg[21] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 126700 ) W ; - req_msg[20] + NET req_msg[20] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 29310 0 ) N ; - req_msg[19] + NET req_msg[19] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 140190 201600 ) S ; - req_msg[18] + NET req_msg[18] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 66270 201600 ) S ; - req_msg[17] + NET req_msg[17] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 81900 ) W ; - req_msg[16] + NET req_msg[16] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 155870 201600 ) S ; - req_msg[15] + NET req_msg[15] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 6910 201600 ) S ; - req_msg[14] + NET req_msg[14] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 43870 0 ) N ; - req_msg[13] + NET req_msg[13] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 148030 0 ) N ; - req_msg[12] + NET req_msg[12] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 171500 ) W ; - req_msg[11] + NET req_msg[11] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 104350 0 ) N ; - req_msg[10] + NET req_msg[10] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 125630 201600 ) S ; - req_msg[9] + NET req_msg[9] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 74060 ) E ; - req_msg[8] + NET req_msg[8] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 21470 201600 ) S ; - req_msg[7] + NET req_msg[7] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 156940 ) W ; - req_msg[6] + NET req_msg[6] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 59500 ) E ; - req_msg[5] + NET req_msg[5] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 178270 0 ) N ; - req_msg[4] + NET req_msg[4] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 112140 ) W ; - req_msg[3] + NET req_msg[3] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 178220 ) E ; - req_msg[2] + NET req_msg[2] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 170430 201600 ) S ; - req_msg[1] + NET req_msg[1] + DIRECTION INPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 74110 0 ) N ; - req_msg[0] + NET req_msg[0] + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 141260 ) W ; - req_rdy + NET req_rdy + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 190 0 ) N ; - req_val + NET req_val + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 186060 ) W ; - reset + NET reset + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 104300 ) E ; - resp_msg[15] + NET resp_msg[15] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 14750 0 ) N ; - resp_msg[14] + NET resp_msg[14] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 133470 0 ) N ; - resp_msg[13] + NET resp_msg[13] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 22540 ) W ; - resp_msg[12] + NET resp_msg[12] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 192830 0 ) N ; - resp_msg[11] + NET resp_msg[11] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 67340 ) W ; - resp_msg[10] + NET resp_msg[10] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 88620 ) E ; - resp_msg[9] + NET resp_msg[9] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 118910 0 ) N ; - resp_msg[8] + NET resp_msg[8] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 118860 ) E ; - resp_msg[7] + NET resp_msg[7] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 199550 201600 ) S ; - resp_msg[6] + NET resp_msg[6] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 43820 ) E ; - resp_msg[5] + NET resp_msg[5] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 37100 ) W ; - resp_msg[4] + NET resp_msg[4] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 14700 ) E ; - resp_msg[3] + NET resp_msg[3] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal6 ( -140 0 ) ( 140 280 ) + FIXED ( 163710 0 ) N ; - resp_msg[2] + NET resp_msg[2] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 133420 ) E ; - resp_msg[1] + NET resp_msg[1] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 147980 ) E ; - resp_msg[0] + NET resp_msg[0] + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 163660 ) E ; - resp_rdy + NET resp_rdy + DIRECTION INPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 0 192780 ) E ; - resp_val + NET resp_val + DIRECTION OUTPUT + USE SIGNAL + LAYER metal5 ( -140 0 ) ( 140 280 ) + FIXED ( 200260 52780 ) W ; END PINS NETS 87 ; - _000_ ( _762_ Z ) ( _858_ D ) ; - _001_ ( _758_ Z ) ( _859_ D ) ; - _002_ ( _761_ Z ) ( _860_ D ) ; - _003_ ( _757_ A ) ( _859_ QN ) ; - _004_ ( _756_ A ) ( _860_ QN ) ; - _005_ ( _720_ A ) ( _858_ QN ) ; - _059_ ( _439_ A3 ) ( _457_ A ) ( _464_ B ) ( _531_ A2 ) ( _684_ A2 ) ( _720_ Z ) ; - _073_ ( _663_ C1 ) ( _667_ B2 ) ( _802_ Z ) ; - _109_ ( _438_ A ) ( _531_ A1 ) ( _544_ A2 ) ( _548_ A1 ) ( _718_ Z ) ; - _110_ ( _440_ A ) ( _483_ A ) ( _551_ A ) ( _683_ A ) ( _753_ Z ) ; - _111_ ( _501_ A ) ( _524_ A ) ( _636_ A ) ( _705_ A ) ( _733_ Z ) ; - _112_ ( _502_ A ) ( _522_ A ) ( _707_ A ) ( _731_ Z ) ; - _113_ ( _512_ A ) ( _534_ A ) ( _656_ A ) ( _709_ A ) ( _729_ Z ) ; - _114_ ( _510_ A ) ( _532_ A ) ( _664_ A ) ( _667_ B1 ) ( _711_ A ) ( _727_ Z ) ; - _115_ ( _507_ A ) ( _528_ A ) ( _674_ A ) ( _713_ A ) ( _725_ Z ) ; - _116_ ( _468_ A ) ( _508_ A ) ( _715_ A ) ( _723_ Z ) ; - _117_ ( _481_ A2 ) ( _482_ A2 ) ( _540_ A ) ( _560_ A ) ( _687_ A ) ( _751_ Z ) ; - _118_ ( _474_ A ) ( _498_ A ) ( _566_ A ) ( _570_ A2 ) ( _689_ A ) ( _749_ Z ) ; - _119_ ( _473_ A ) ( _497_ A2 ) ( _498_ C1 ) ( _575_ A ) ( _578_ B1 ) ( _691_ A ) ( _747_ Z ) ; - _120_ ( _477_ A ) ( _486_ A ) ( _584_ A ) ( _693_ A ) ( _745_ Z ) ; - _121_ ( _476_ A ) ( _488_ A ) ( _592_ A ) ( _695_ A ) ( _743_ Z ) ; - _122_ ( _471_ A ) ( _494_ A ) ( _600_ A ) ( _697_ A ) ( _741_ Z ) ; - _123_ ( _470_ A ) ( _492_ A2 ) ( _609_ A ) ( _613_ B1 ) ( _699_ A ) ( _739_ Z ) ; - _124_ ( _505_ A ) ( _517_ A ) ( _618_ A ) ( _701_ A ) ( _737_ Z ) ; - _125_ ( _504_ A ) ( _519_ A ) ( _627_ A ) ( _703_ A ) ( _735_ Z ) ; - _126_ ( _440_ B ) ( _444_ A2 ) ( _484_ A3 ) ( _556_ A2 ) ( _686_ A ) ( _754_ Z ) ; - _127_ ( _446_ A2 ) ( _501_ B ) ( _525_ B2 ) ( _640_ A2 ) ( _706_ A ) ( _734_ Z ) ; - _128_ ( _446_ A1 ) ( _502_ B ) ( _523_ A2 ) ( _525_ A2 ) ( _708_ A ) ( _732_ Z ) ; - _129_ ( _447_ A4 ) ( _512_ B ) ( _535_ B2 ) ( _658_ A2 ) ( _710_ A ) ( _730_ Z ) ; - _130_ ( _447_ A3 ) ( _510_ B ) ( _533_ A2 ) ( _535_ A2 ) ( _712_ A ) ( _728_ Z ) ; - _131_ ( _447_ A2 ) ( _507_ B ) ( _529_ A3 ) ( _675_ A2 ) ( _714_ A ) ( _726_ Z ) ; - _132_ ( _447_ A1 ) ( _469_ A2 ) ( _508_ B ) ( _716_ A ) ( _724_ Z ) ; - _253_ ( _555_ Z ) ( _558_ A1 ) ( _564_ A1 ) ( _573_ A1 ) ( _582_ A1 ) ( _590_ A1 ) ( _598_ A1 ) ( _607_ A1 ) ( _616_ A1 ) ( _644_ A2 ) ( _678_ A2 ) ; - clk ( PIN clk ) ( _858_ CK ) ( _859_ CK ) ( _860_ CK ) ( _861_ CK ) ( _862_ CK ) ( _863_ CK ) ( _864_ CK ) ( _865_ CK ) ( _866_ CK ) ( _867_ CK ) ( _868_ CK ) ( _869_ CK ) ( _870_ CK ) ( _871_ CK ) ( _872_ CK ) ( _873_ CK ) ( _874_ CK ) ( _875_ CK ) ( _876_ CK ) ( _877_ CK ) ( _878_ CK ) ( _879_ CK ) ( _880_ CK ) ( _881_ CK ) ( _882_ CK ) ( _883_ CK ) ( _884_ CK ) ( _885_ CK ) ( _886_ CK ) ( _887_ CK ) ( _888_ CK ) ( _889_ CK ) ( _890_ CK ) ( _891_ CK ) ( _892_ CK ) ; - req_msg[0] ( PIN req_msg[0] ) ( buffer32 A ) ; - req_msg[10] ( PIN req_msg[10] ) ( buffer22 A ) ; - req_msg[11] ( PIN req_msg[11] ) ( buffer21 A ) ; - req_msg[12] ( PIN req_msg[12] ) ( buffer20 A ) ; - req_msg[13] ( PIN req_msg[13] ) ( buffer19 A ) ; - req_msg[14] ( PIN req_msg[14] ) ( buffer18 A ) ; - req_msg[15] ( PIN req_msg[15] ) ( buffer17 A ) ; - req_msg[16] ( PIN req_msg[16] ) ( buffer16 A ) ; - req_msg[17] ( PIN req_msg[17] ) ( buffer15 A ) ; - req_msg[18] ( PIN req_msg[18] ) ( buffer14 A ) ; - req_msg[19] ( PIN req_msg[19] ) ( buffer13 A ) ; - req_msg[1] ( PIN req_msg[1] ) ( buffer31 A ) ; - req_msg[20] ( PIN req_msg[20] ) ( buffer12 A ) ; - req_msg[21] ( PIN req_msg[21] ) ( buffer11 A ) ; - req_msg[22] ( PIN req_msg[22] ) ( buffer10 A ) ; - req_msg[23] ( PIN req_msg[23] ) ( buffer9 A ) ; - req_msg[24] ( PIN req_msg[24] ) ( buffer8 A ) ; - req_msg[25] ( PIN req_msg[25] ) ( buffer7 A ) ; - req_msg[26] ( PIN req_msg[26] ) ( buffer6 A ) ; - req_msg[27] ( PIN req_msg[27] ) ( buffer5 A ) ; - req_msg[28] ( PIN req_msg[28] ) ( buffer4 A ) ; - req_msg[29] ( PIN req_msg[29] ) ( buffer3 A ) ; - req_msg[2] ( PIN req_msg[2] ) ( buffer30 A ) ; - req_msg[30] ( PIN req_msg[30] ) ( buffer2 A ) ; - req_msg[31] ( PIN req_msg[31] ) ( buffer1 A ) ; - req_msg[3] ( PIN req_msg[3] ) ( buffer29 A ) ; - req_msg[4] ( PIN req_msg[4] ) ( buffer28 A ) ; - req_msg[5] ( PIN req_msg[5] ) ( buffer27 A ) ; - req_msg[6] ( PIN req_msg[6] ) ( buffer26 A ) ; - req_msg[7] ( PIN req_msg[7] ) ( buffer25 A ) ; - req_msg[8] ( PIN req_msg[8] ) ( buffer24 A ) ; - req_msg[9] ( PIN req_msg[9] ) ( buffer23 A ) ; - req_rdy ( PIN req_rdy ) ( buffer36 Z ) ; - req_val ( PIN req_val ) ( buffer33 A ) ; - reset ( PIN reset ) ( buffer34 A ) ; - resp_msg[0] ( PIN resp_msg[0] ) ( buffer52 Z ) ; - resp_msg[10] ( PIN resp_msg[10] ) ( buffer42 Z ) ; - resp_msg[11] ( PIN resp_msg[11] ) ( buffer41 Z ) ; - resp_msg[12] ( PIN resp_msg[12] ) ( buffer40 Z ) ; - resp_msg[13] ( PIN resp_msg[13] ) ( buffer39 Z ) ; - resp_msg[14] ( PIN resp_msg[14] ) ( buffer38 Z ) ; - resp_msg[15] ( PIN resp_msg[15] ) ( buffer37 Z ) ; - resp_msg[1] ( PIN resp_msg[1] ) ( buffer51 Z ) ; - resp_msg[2] ( PIN resp_msg[2] ) ( buffer50 Z ) ; - resp_msg[3] ( PIN resp_msg[3] ) ( buffer49 Z ) ; - resp_msg[4] ( PIN resp_msg[4] ) ( buffer48 Z ) ; - resp_msg[5] ( PIN resp_msg[5] ) ( buffer47 Z ) ; - resp_msg[6] ( PIN resp_msg[6] ) ( buffer46 Z ) ; - resp_msg[7] ( PIN resp_msg[7] ) ( buffer45 Z ) ; - resp_msg[8] ( PIN resp_msg[8] ) ( buffer44 Z ) ; - resp_msg[9] ( PIN resp_msg[9] ) ( buffer43 Z ) ; - resp_rdy ( PIN resp_rdy ) ( buffer35 A ) ; - resp_val ( PIN resp_val ) ( buffer53 Z ) ; END NETS END DESIGN
{ "pile_set_name": "Github" }
------------------------------------------------------------------------------- -- Spine Runtimes Software License v2.5 -- -- Copyright (c) 2013-2016, Esoteric Software -- All rights reserved. -- -- You are granted a perpetual, non-exclusive, non-sublicensable, and -- non-transferable license to use, install, execute, and perform the Spine -- Runtimes software and derivative works solely for personal or internal -- use. Without the written permission of Esoteric Software (see Section 2 of -- the Spine Software License Agreement), you may not (a) modify, translate, -- adapt, or develop new applications using the Spine Runtimes or otherwise -- create derivative works or improvements of the Spine Runtimes or (b) remove, -- delete, alter, or obscure any trademarks or any copyright, trademark, patent, -- or other intellectual property or proprietary rights notices on or in the -- Software, including any copy thereof. Redistributions in binary or source -- form must include this license and terms. -- -- THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "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 ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF -- USE, DATA, OR PROFITS) 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. ------------------------------------------------------------------------------- local AttachmentType = require "spine-lua.attachments.AttachmentType" local VertexAttachment = require "spine-lua.attachments.VertexAttachment" local Color = require "spine-lua.Color" local BoundingBoxAttachment = {} BoundingBoxAttachment.__index = BoundingBoxAttachment setmetatable(BoundingBoxAttachment, { __index = VertexAttachment }) function BoundingBoxAttachment.new (name) if not name then error("name cannot be nil", 2) end local self = VertexAttachment.new(name, AttachmentType.boundingbox) self.color = Color.newWith(1, 1, 1, 1) setmetatable(self, BoundingBoxAttachment) return self end return BoundingBoxAttachment
{ "pile_set_name": "Github" }
cam0: cam_bl: 1.0 cam_width: 640 cam_height: 480 cam_model: Pinhole cam_fx: 570.3422241210938 cam_fy: 570.3422241210938 cam_cx: 319.5 cam_cy: 239.5 cam_d0: 0.0 cam_d1: 0.0 cam_d2: 0.0 cam_d3: 0.0 images_subfolder_l: image_l/ images_subfolder_r: image_r/
{ "pile_set_name": "Github" }
{ "CVE_data_meta": { "ASSIGNER": "[email protected]", "ID": "CVE-2018-3989", "STATE": "PUBLIC" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "n/a", "version": { "version_data": [ { "version_value": "n/a" } ] } } ] }, "vendor_name": "n/a" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "An exploitable kernel memory disclosure vulnerability exists in the 0x8200E804 IOCTL handler functionality of WIBU-SYSTEMS WibuKey.sys Version 6.40 (Build 2400).A specially crafted IRP request can cause the driver to return uninitialized memory, resulting in kernel memory disclosure. An attacker can send an IRP request to trigger this vulnerability." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "n/a" } ] } ] }, "references": { "reference_data": [ { "name": "https://talosintelligence.com/vulnerability_reports/TALOS-2018-0657", "refsource": "MISC", "url": "https://talosintelligence.com/vulnerability_reports/TALOS-2018-0657" }, { "name": "107005", "refsource": "BID", "url": "http://www.securityfocus.com/bid/107005" }, { "name": "https://cert-portal.siemens.com/productcert/pdf/ssa-844562.pdf", "refsource": "CONFIRM", "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-844562.pdf" }, { "name": "https://cert-portal.siemens.com/productcert/pdf/ssa-760124.pdf", "refsource": "CONFIRM", "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-760124.pdf" }, { "refsource": "CONFIRM", "name": "https://cert-portal.siemens.com/productcert/pdf/ssa-902727.pdf", "url": "https://cert-portal.siemens.com/productcert/pdf/ssa-902727.pdf" } ] } }
{ "pile_set_name": "Github" }
MANIFEST.in README.txt setup.cfg setup.py doc/Makefile doc/changelog.rst doc/commandline.rst doc/conf.py doc/find_modules.rst doc/index.rst doc/license.rst doc/modulegraph.rst doc/util.rst doc/zipio.rst doc/_build/doctrees/changelog.doctree doc/_build/doctrees/commandline.doctree doc/_build/doctrees/environment.pickle doc/_build/doctrees/find_modules.doctree doc/_build/doctrees/index.doctree doc/_build/doctrees/license.doctree doc/_build/doctrees/modulegraph.doctree doc/_build/doctrees/util.doctree doc/_build/doctrees/zipio.doctree doc/_build/html/.buildinfo doc/_build/html/changelog.html doc/_build/html/commandline.html doc/_build/html/find_modules.html doc/_build/html/genindex.html doc/_build/html/index.html doc/_build/html/license.html doc/_build/html/modulegraph.html doc/_build/html/objects.inv doc/_build/html/py-modindex.html doc/_build/html/search.html doc/_build/html/searchindex.js doc/_build/html/util.html doc/_build/html/zipio.html doc/_build/html/_sources/changelog.txt doc/_build/html/_sources/commandline.txt doc/_build/html/_sources/find_modules.txt doc/_build/html/_sources/index.txt doc/_build/html/_sources/license.txt doc/_build/html/_sources/modulegraph.txt doc/_build/html/_sources/util.txt doc/_build/html/_sources/zipio.txt doc/_build/html/_static/ajax-loader.gif doc/_build/html/_static/basic.css doc/_build/html/_static/comment-bright.png doc/_build/html/_static/comment-close.png doc/_build/html/_static/comment.png doc/_build/html/_static/doctools.js doc/_build/html/_static/down-pressed.png doc/_build/html/_static/down.png doc/_build/html/_static/file.png doc/_build/html/_static/jquery-1.11.1.js doc/_build/html/_static/jquery.js doc/_build/html/_static/minus.png doc/_build/html/_static/nature.css doc/_build/html/_static/plus.png doc/_build/html/_static/pygments.css doc/_build/html/_static/searchtools.js doc/_build/html/_static/underscore-1.3.1.js doc/_build/html/_static/underscore.js doc/_build/html/_static/up-pressed.png doc/_build/html/_static/up.png doc/_build/html/_static/websupport.js modulegraph/__init__.py modulegraph/__main__.py modulegraph/_compat.py modulegraph/find_modules.py modulegraph/modulegraph.py modulegraph/util.py modulegraph/zipio.py modulegraph.egg-info/PKG-INFO modulegraph.egg-info/SOURCES.txt modulegraph.egg-info/dependency_links.txt modulegraph.egg-info/entry_points.txt modulegraph.egg-info/requires.txt modulegraph.egg-info/top_level.txt modulegraph.egg-info/zip-safe modulegraph_tests/__init__.py modulegraph_tests/test_basic.py modulegraph_tests/test_edge_data.py modulegraph_tests/test_explicit_packages.py modulegraph_tests/test_implies.py modulegraph_tests/test_import_from_init.py modulegraph_tests/test_imports.py modulegraph_tests/test_modulegraph.py modulegraph_tests/test_pep420_nspkg.py modulegraph_tests/test_pycompat_pkg.py modulegraph_tests/test_relimport2.py modulegraph_tests/test_setuptools_nspkg.py modulegraph_tests/test_util.py modulegraph_tests/test_zipio.py modulegraph_tests/testdata/script modulegraph_tests/testdata/syspath.egg modulegraph_tests/testdata/syspath.zip modulegraph_tests/testdata/test.egg modulegraph_tests/testdata/test.txt modulegraph_tests/testdata/zipped.egg modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6-nspkg.pth modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/namedpkg/slave.py modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6-nspkg.pth modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg/parent.py modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5-nspkg.pth modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5-nspkg.pth modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg/parent.py modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5-nspkg.pth modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/namedpkg/slave.py modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5-nspkg.pth modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg/parent.py modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/src/install.py modulegraph_tests/testdata/nspkg/src/child/setup.py modulegraph_tests/testdata/nspkg/src/child/namedpkg/__init__.py modulegraph_tests/testdata/nspkg/src/child/namedpkg/slave.py modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/top_level.txt modulegraph_tests/testdata/nspkg/src/parent/setup.py modulegraph_tests/testdata/nspkg/src/parent/namedpkg/__init__.py modulegraph_tests/testdata/nspkg/src/parent/namedpkg/parent.py modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/PKG-INFO modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/SOURCES.txt modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/dependency_links.txt modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/namespace_packages.txt modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/top_level.txt modulegraph_tests/testdata/subdir/file1.txt modulegraph_tests/testdata/subdir/file2.txt modulegraph_tests/testdata/syspath/myext.pyd modulegraph_tests/testdata/syspath/mymodule.py modulegraph_tests/testdata/syspath/mymodule3.py modulegraph_tests/testdata/syspath/mypkg/__init__.py modulegraph_tests/testpkg-compatmodule/pkg/__init__.py modulegraph_tests/testpkg-compatmodule/pkg/api.py modulegraph_tests/testpkg-compatmodule/pkg/api2.py modulegraph_tests/testpkg-compatmodule/pkg/api3.py modulegraph_tests/testpkg-edgedata/function_class_existing.py modulegraph_tests/testpkg-edgedata/function_conditional_existing.py modulegraph_tests/testpkg-edgedata/function_conditional_import2_existing.py modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py modulegraph_tests/testpkg-edgedata/function_existing.py modulegraph_tests/testpkg-edgedata/function_import2_existing.py modulegraph_tests/testpkg-edgedata/function_import_existing.py modulegraph_tests/testpkg-edgedata/script.py modulegraph_tests/testpkg-edgedata/script_from_import.py modulegraph_tests/testpkg-edgedata/script_multi_import.py modulegraph_tests/testpkg-edgedata/toplevel_class_existing.py modulegraph_tests/testpkg-edgedata/toplevel_conditional_existing.py modulegraph_tests/testpkg-edgedata/toplevel_conditional_import2_existing.py modulegraph_tests/testpkg-edgedata/toplevel_conditional_import_existing.py modulegraph_tests/testpkg-edgedata/toplevel_existing.py modulegraph_tests/testpkg-edgedata/toplevel_import2_existing.py modulegraph_tests/testpkg-edgedata/toplevel_import_existing.py modulegraph_tests/testpkg-edgedata/pkg/__init__.py modulegraph_tests/testpkg-edgedata/pkg/function_class_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_conditional_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_import2_existing.py modulegraph_tests/testpkg-edgedata/pkg/function_import_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_class_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import2_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_import2_existing.py modulegraph_tests/testpkg-edgedata/pkg/toplevel_import_existing.py modulegraph_tests/testpkg-import-from-init/script.py modulegraph_tests/testpkg-import-from-init/pkg/__init__.py modulegraph_tests/testpkg-import-from-init/pkg/subpkg/__init__.py modulegraph_tests/testpkg-import-from-init/pkg/subpkg/_collections.py modulegraph_tests/testpkg-import-from-init/pkg/subpkg/compat.py modulegraph_tests/testpkg-import-from-init/pkg2/__init__.py modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/__init__.py modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/_collections.py modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/compat.py modulegraph_tests/testpkg-packages/main_script.py modulegraph_tests/testpkg-packages/pkg/__init__.py modulegraph_tests/testpkg-packages/pkg/sub3.py modulegraph_tests/testpkg-packages/pkg/sub1/__init__.py modulegraph_tests/testpkg-packages/pkg/sub1/modA.py modulegraph_tests/testpkg-packages/pkg/sub2/__init__.py modulegraph_tests/testpkg-packages/pkg/sub2/mod.py modulegraph_tests/testpkg-pep420-namespace/path1/package/sub2.py modulegraph_tests/testpkg-pep420-namespace/path2/package/sub1.py modulegraph_tests/testpkg-pep420-namespace/path2/package/nspkg/mod.py modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/__init__.py modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/sub.py modulegraph_tests/testpkg-regr1/main_script.py modulegraph_tests/testpkg-regr1/pkg/__init__.py modulegraph_tests/testpkg-regr1/pkg/a.py modulegraph_tests/testpkg-regr1/pkg/b.py modulegraph_tests/testpkg-regr2/main_script.py modulegraph_tests/testpkg-regr2/pkg/__init__.py modulegraph_tests/testpkg-regr2/pkg/base.py modulegraph_tests/testpkg-regr2/pkg/pkg.py modulegraph_tests/testpkg-regr3/script.py modulegraph_tests/testpkg-regr3/mypkg/__init__.py modulegraph_tests/testpkg-regr3/mypkg/distutils/__init__.py modulegraph_tests/testpkg-regr3/mypkg/distutils/ccompiler.py modulegraph_tests/testpkg-regr4/script.py modulegraph_tests/testpkg-regr4/pkg/__init__.py modulegraph_tests/testpkg-regr4/pkg/core/__init__.py modulegraph_tests/testpkg-regr4/pkg/core/callables.py modulegraph_tests/testpkg-regr4/pkg/core/listener.py modulegraph_tests/testpkg-regr4/pkg/core/listenerimpl.py modulegraph_tests/testpkg-regr5/__init__.py modulegraph_tests/testpkg-regr5/script.py modulegraph_tests/testpkg-regr6/module.py modulegraph_tests/testpkg-regr6/script.py modulegraph_tests/testpkg-relimport/mod.py modulegraph_tests/testpkg-relimport/script.py modulegraph_tests/testpkg-relimport/pkg/__init__.py modulegraph_tests/testpkg-relimport/pkg/mod.py modulegraph_tests/testpkg-relimport/pkg/oldstyle.py modulegraph_tests/testpkg-relimport/pkg/relative.py modulegraph_tests/testpkg-relimport/pkg/relimport.py modulegraph_tests/testpkg-relimport/pkg/toplevel.py modulegraph_tests/testpkg-relimport/pkg/sub2/__init__.py modulegraph_tests/testpkg-relimport/pkg/sub2/mod.py modulegraph_tests/testpkg-relimport/pkg/subpkg/__init__.py modulegraph_tests/testpkg-relimport/pkg/subpkg/mod2.py modulegraph_tests/testpkg-relimport/pkg/subpkg/relative.py modulegraph_tests/testpkg-relimport/pkg/subpkg/relative2.py modulegraph_tests/testpkg-relimport2/toplevel.py modulegraph_tests/testpkg-relimport2/pkg/__init__.py modulegraph_tests/testpkg-relimport2/pkg/mod1.py modulegraph_tests/testpkg-relimport2/pkg/mod2.py modulegraph_tests/testpkg-relimport2/pkg/mod3.py modulegraph_tests/testpkg-relimport2/pkg/sub/__init__.py modulegraph_tests/testpkg-setuptools-namespace/setup.py modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/__init__.py modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/module.py modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/__init__.py modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/sub.py modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/__init__.py modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/module.py modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/PKG-INFO modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/SOURCES.txt modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/dependency_links.txt modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/namespace_packages.txt modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/not-zip-safe modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/top_level.txt modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/__init__.py modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/sub.py scripts/extract_implies.py
{ "pile_set_name": "Github" }
/* * WorldEdit, a Minecraft world manipulation toolkit * Copyright (C) sk89q <http://www.sk89q.com> * Copyright (C) WorldEdit team and contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package com.sk89q.worldedit.function.factory; import com.sk89q.worldedit.function.Contextual; import com.sk89q.worldedit.function.EditContext; import com.sk89q.worldedit.function.RegionFunction; import com.sk89q.worldedit.function.biome.BiomeReplace; import com.sk89q.worldedit.function.pattern.BiomePattern; public class BiomeFactory implements Contextual<RegionFunction> { private final BiomePattern biomeType; public BiomeFactory(BiomePattern biomeType) { this.biomeType = biomeType; } @Override public RegionFunction createFromContext(EditContext context) { return new BiomeReplace(context.getDestination(), this.biomeType); } @Override public String toString() { return "set biome"; } }
{ "pile_set_name": "Github" }
/* * (C) Copyright 2016 Kurento (http://kurento.org/) * * 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 org.kurento.client.internal.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.kurento.client.internal.client.RomManager; import org.kurento.client.internal.test.model.client.ComplexParam; import org.kurento.client.internal.test.model.client.SampleClass; import org.kurento.client.internal.test.model.client.SampleEnum; import org.kurento.client.internal.transport.jsonrpc.RomClientJsonRpcClient; import org.kurento.client.internal.transport.jsonrpc.RomServerJsonRpcHandler; import org.kurento.jsonrpc.client.JsonRpcClientLocal; import com.google.common.collect.Maps; public class SyncConstMethodsTest { private static RomManager manager; @BeforeClass public static void initFactory() { manager = new RomManager(new RomClientJsonRpcClient(new JsonRpcClientLocal( new RomServerJsonRpcHandler("org.kurento.client.internal.test.model.server", "Impl")))); } private SampleClass obj; @Before public void initObject() { obj = new SampleClass.Builder("XXX", false, manager).withAtt3(0.5f).withAtt4(22).build(); } @Test public void constructionTest() { assertEquals(obj.getAtt1(), "XXX"); assertFalse(obj.getAtt2()); assertEquals(obj.getAtt3(), 0.5f, 0.01); assertEquals(obj.getAtt4(), 22); } @Test public void echoEnumTest() { assertEquals(SampleEnum.CONSTANT_1, obj.echoEnum(SampleEnum.CONSTANT_1)); } @Test public void echoRegisterTest() { ComplexParam returnValue = obj.echoRegister(new ComplexParam("prop1", 33)); assertEquals(returnValue.getProp1(), "prop1"); assertEquals(returnValue.getProp2(), 33); } @Test public void echoEnumListTest() { List<SampleEnum> result = obj .echoListEnum(Arrays.asList(SampleEnum.CONSTANT_1, SampleEnum.CONSTANT_2)); assertEquals(SampleEnum.CONSTANT_1, result.get(0)); assertEquals(SampleEnum.CONSTANT_2, result.get(1)); } @Test public void echoRegisterListTest() { List<ComplexParam> params = new ArrayList<>(); params.add(new ComplexParam("prop1_1", 33)); params.add(new ComplexParam("prop1_2", 44)); List<ComplexParam> returnParams = obj.echoListRegister(params); ComplexParam value1 = returnParams.get(0); ComplexParam value2 = returnParams.get(1); assertEquals(value1.getProp1(), "prop1_1"); assertEquals(value1.getProp2(), 33); assertEquals(value2.getProp1(), "prop1_2"); assertEquals(value2.getProp2(), 44); } @Test public void echoEnumMapTest() { Map<String, SampleEnum> init = new HashMap<String, SampleEnum>(); init.put("value1", SampleEnum.CONSTANT_1); init.put("value2", SampleEnum.CONSTANT_2); Map<String, SampleEnum> result = obj.echoMapEnum(Maps.newHashMap(init)); assertEquals(SampleEnum.CONSTANT_1, result.get("value1")); assertEquals(SampleEnum.CONSTANT_2, result.get("value2")); } @Test public void echoRegisterMapTest() { Map<String, ComplexParam> params = new HashMap<String, ComplexParam>(); params.put("value1", new ComplexParam("prop1_1", 33)); params.put("value2", new ComplexParam("prop1_2", 44)); Map<String, ComplexParam> returnParams = obj.echoMapRegister(params); ComplexParam value1 = returnParams.get("value1"); ComplexParam value2 = returnParams.get("value2"); assertEquals(value1.getProp1(), "prop1_1"); assertEquals(value1.getProp2(), 33); assertEquals(value2.getProp1(), "prop1_2"); assertEquals(value2.getProp2(), 44); } }
{ "pile_set_name": "Github" }
# ะŸั€ะฐะบั‚ะธั‡ะตัะบะพะต ะทะฐะฝัั‚ะธะต: ะ“ะตะฝะตั€ะฐั†ะธั Javadoc ะธะท ะฟั€ะธะผะตั€ะฐ ะฟั€ะพะตะบั‚ะฐ Javadoc ัะฒะปัะตั‚ัั ัั‚ะฐะฝะดะฐั€ั‚ะฝั‹ะผ ะฒั‹ะฒะพะดะพะผ ะดะปั API Java. ะกะพะทะดะฐะฝะธะต Javadoc ะดะพะฒะพะปัŒะฝะพ ะฟั€ะพัั‚ะพะต. Javadoc ะณะตะฝะตั€ะธั€ัƒะตั‚ัั ั ะฟะพะผะพั‰ัŒัŽ ั‚ะฐะบ ะฝะฐะทั‹ะฒะฐะตะผะพะณะพ ยซะดะพะบะปะตั‚ะฐยป. ะ ะฐะทะปะธั‡ะฝั‹ะต ะดะพะบะปะตั‚ั‹ ะผะพะณัƒั‚ ะฟะพ-ั€ะฐะทะฝะพะผัƒ ะฐะฝะฐะปะธะทะธั€ะพะฒะฐั‚ัŒ ะฐะฝะฝะพั‚ะฐั†ะธะธ Java ะธ ัะพะทะดะฐะฒะฐั‚ัŒ ั€ะฐะทะฝั‹ะต ะฒั‹ั…ะพะดะฝั‹ะต ะดะฐะฝะฝั‹ะต. ะะพ ะฟะพ ะฑะพะปัŒัˆะพะผัƒ ัั‡ะตั‚ัƒ ะฟะพั‡ั‚ะธ ะบะฐะถะดะฐั ะดะพะบัƒะผะตะฝั‚ะฐั†ะธั ะฟะพ Java ะธัะฟะพะปัŒะทัƒะตั‚ ัั‚ะฐะฝะดะฐั€ั‚ะฝั‹ะน ะดะพะบะปะตั‚. ะ’ั‹ั…ะพะดะฝั‹ะต ะดะฐะฝะฝั‹ะต Javadoc ะทะฝะฐะบะพะผั‹ ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะฐะผ Java ะธ ะฟั€ะธะฒะตั‚ัั‚ะฒัƒัŽั‚ัั ะธะผะธ. Javadoc ะฟะพะดะดะตั€ะถะธะฒะฐะตั‚ัั Oracle. ะ ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ะผะพะณัƒั‚ ะธะฝั‚ะตะณั€ะธั€ะพะฒะฐั‚ัŒ ะฒั‹ะฒะพะด Javadoc ะฝะตะฟะพัั€ะตะดัั‚ะฒะตะฝะฝะพ ะฒ ัะฒะพัŽ IDE, ั‡ั‚ะพ ะดะตะปะฐะตั‚ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ัƒะดะพะฑะฝะพะน ะธ ะปะตะณะบะพ ะดะพัั‚ัƒะฟะฝะพะน. ะคะฐะบั‚ะธั‡ะตัะบะธ, Javadoc ั‡ะฐัั‚ะพ ะดะพัั‚ะฐะฒะปัะตั‚ัั ั‚ะฐะบะธะผ ะพะฑั€ะฐะทะพะผ, ะฐ ะฝะต ั€ะฐะทะฒะพั€ะฐั‡ะธะฒะฐะตั‚ัั ะธ ะทะฐะณั€ัƒะถะฐะตั‚ัั ะฝะฐ ัะตั€ะฒะตั€. Javadoc ัะพะดะตั€ะถะธั‚ ั‚ะพะปัŒะบะพ ัะฟั€ะฐะฒะพั‡ะฝัƒัŽ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ. ะ’ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะฝะตะปัŒะทั ะดะพะฑะฐะฒะปัั‚ัŒ ะบะฐะบะธะต-ะปะธะฑะพ ะบะพะฝั†ะตะฟั‚ัƒะฐะปัŒะฝั‹ะต ั„ะฐะนะปั‹ ัะฟั€ะฐะฒะบะธ ะธะปะธ ะธะทะผะตะฝัั‚ัŒ ะผะฐะบะตั‚. [ะ“ะตะฝะตั€ะฐั†ะธั Javadoc](#generate) [Javadoc ะธ ะฟั€ะพะฒะตั€ะบะฐ ะพัˆะธะฑะพะบ](#error) [ะ˜ะทัƒั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะพะฒ Javadoc](#parameters) [ะะฒั‚ะพะผะฐั‚ะธั‡ะตัะบะพะต ัะพะทะดะฐะฝะธะต Javadoc](#build) <a name="generate"></a> ## ๐Ÿ‘จโ€๐Ÿ’ป ะ“ะตะฝะตั€ะฐั†ะธั Javadoc ะ’ ัั‚ะพะผ ัƒะฟั€ะฐะถะฝะตะฝะธะธ ัะพะทะดะฐะดะธะผ Javadoc ะธะท ะทะฐะณั€ัƒะถะตะฝะฝะพะณะพ ั€ะฐะฝะตะต [ะฟั€ะธะผะตั€ะฐ ะฟั€ะพะตะบั‚ะฐ Java](Get-the-sample-Java-project.md). ะŸะพัะผะพั‚ั€ะตั‚ัŒ ะธั‚ะพะณะพะฒั‹ะน [ะฒั‹ะฒะพะด Javadoc ะผะพะถะฝะพ ะทะดะตััŒ](https://idratherbewriting.com/learnapidoc/assets/files/javadoc/index.html). 1. ะ’ Eclipse ะฟะตั€ะตั…ะพะดะธะผ ะฒ **File > Export**; 2. ะ ะฐัะบั€ะพะตะผ **Java** ะธ ะฒั‹ะฑะตั€ะตะผ **Javadoc**. ะ˜ ะฝะฐะถะผะตะผ ะบะฝะพะฟะบัƒ **Next**; 3. ะ’ั‹ะฑะธั€ะฐะตะผ ัะฒะพะน ะฟั€ะพะตะบั‚ ะธ ะฟะฐะบะตั‚. ะŸะพัะปะต, ะฒ ะฟั€ะฐะฒะพะน ะฟะฐะฝะตะปะธ ะบะปะฐััั‹, ะบะพั‚ะพั€ั‹ะต ะฝัƒะถะฝะพ ะฒะบะปัŽั‡ะธั‚ัŒ ะฒ Javadoc: ะฒ ัั‚ะพะผ ะฟั€ะธะผะตั€ะต ัั‚ะพ ะฑัƒะดัƒั‚ **Dynamite.java** ะธ **ACMESmartphone.java**. ![generate](img/7.png) ะ’ั‹ะฑะธั€ะฐั‚ัŒ ะบะปะฐัั `App.java`, ะบะพั‚ะพั€ั‹ะน ัะพะดะตั€ะถะธั‚ ะผะตั‚ะพะด `main` ะฝะต ะฝัƒะถะฝะพ, ะฟะพั‚ะพะผัƒ ั‡ั‚ะพ ะฝะต ะฝัƒะถะฝะพ ะฟั€ะตะดะพัั‚ะฐะฒะปัั‚ัŒ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะฟะพ Java ะดะปั ะฒะฐัˆะตะน ะฟั€ะพะณั€ะฐะผะผั‹. Javadoc ะฟั€ะตะดะพัั‚ะฐะฒะธั‚ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะดะปั ะบะปะฐััะพะฒ, ะบะพั‚ะพั€ั‹ะต ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ะผะพะณัƒั‚ ะธัะฟะพะปัŒะทะพะฒะฐั‚ัŒ ะฒ ัะฒะพะธั… ะฟั€ะพะณั€ะฐะผะผะฐั…. ะ’ ัั‚ะพะผ ะฟั€ะธะผะตั€ะต ะฟั€ะพะตะบั‚ะฐ ะพัะฝะพะฒะฝะพะน ะผะตั‚ะพะด ะฒะบะปัŽั‡ะตะฝ ะฒ App.java, ะฝะพ ะพะฝ ะผะพะณ ะฑั‹ ะฑั‹ั‚ัŒ ะฒะบะปัŽั‡ะตะฝ ะฒ ั„ะฐะนะป ะธ ั ะดั€ัƒะณะธะผ ะธะผะตะฝะตะผ. 4. ะ’ั‹ะฑะธั€ะฐะตะผ ะฒะฐั€ะธะฐะฝั‚ ะฒะธะดะธะผะพัั‚ะธ: Private, Package, Protected, ะธะปะธ Public. ะšะฐะบ ะฟั€ะฐะฒะธะปะพ ะฒั‹ะฑะธั€ะฐัŽั‚ **Public**. API, ะผะพะถะตั‚ ะธะผะตั‚ัŒ ะผะฝะพะถะตัั‚ะฒะพ ะฒัะฟะพะผะพะณะฐั‚ะตะปัŒะฝั‹ั… ะธะปะธ ัะปัƒะถะตะฑะฝั‹ั… ะบะปะฐััะพะฒ, ะธัะฟะพะปัŒะทัƒะตะผั‹ั… ะฒ ะฑัะบัะฝะดะต, ะฝะพ ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะฐะผะธ ะฑัƒะดะตั‚ ะธัะฟะพะปัŒะทะพะฒะฐั‚ัŒัั ั‚ะพะปัŒะบะพ ะพะฟั€ะตะดะตะปะตะฝะฝะพะต ะบะพะปะธั‡ะตัั‚ะฒะพ ะบะปะฐััะพะฒ. ะญั‚ะธ ะบะปะฐััั‹ ัะพะทะดะฐะฝั‹ public. ะšะปะฐััั‹, ะบะพั‚ะพั€ั‹ะต ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ะฑัƒะดัƒั‚ ะธัะฟะพะปัŒะทะพะฒะฐั‚ัŒ, ั„ะพั€ะผะธั€ัƒัŽั‚ ะฐัะฟะตะบั‚ API ะฑะธะฑะปะธะพั‚ะตะบะธ ะบะปะฐััะพะฒ. 5. ะฃะฑะตะดะธะผัั, ั‡ั‚ะพ ั€ะฐะดะธะพะฑะฐั‚ั‚ะพะฝ **Use standard doclet** ะฒั‹ะฑั€ะฐะฝ (ะ’ั‹ะฑะธั€ะฐะตั‚ัั ะฟะพ ัƒะผะพะปั‡ะฐะฝะธัŽ). 6. ะะฐะถะธะผะฐะตะผ ะบะฝะพะฟะบัƒ **Browse** ะธ ะฒั‹ะฑะธั€ะฐะตะผ ะผะตัั‚ะพ, ะบัƒะดะฐ ะฒั‹ะฒะพะดะธั‚ัŒ ัะณะตะฝะตั€ะธั€ะพะฒะฐะฝะฝั‹ะน Javadoc. ะŸะพ ัƒะผะพะปั‡ะฐะฝะธัŽ ะพะฝ ะฑัƒะดะตั‚ ะณะตะฝะตั€ะธั€ะพะฒะฐั‚ัŒัั ะฒ ะฟะพะดะฟะฐะฟะบะต `doc`, ัะพะทะดะฐะฝะฝะพะน ะฒ ั‚ะพะน ะถะต ะฟะฐะฟะบะต, ะณะดะต ั…ั€ะฐะฝะธั‚ัั ะบะพะด. ะขะฐะบะธะผ ะพะฑั€ะฐะทะพะผ, ะฟั€ะพัะผะฐั‚ั€ะธะฒะฐั‚ัŒ Javadoc ะผะพะถะฝะพ ะฝะตะฟะพัั€ะตะดัั‚ะฒะตะฝะฝะพ ะฒ Eclipse IDE. ะะฐ ัั‚ะพะผ ะทะฐะฝัั‚ะธะธ ะฒั‹ะฑะตั€ะตะผ ะดั€ัƒะณะพะต ะผะตัั‚ะพ ะฒั‹ะฒะพะดะฐ (ะฝะฐะฟั€ะธะผะตั€, ะฟะฐะฟะบัƒ ะฝะฐ ั€ะฐะฑะพั‡ะตะผ ัั‚ะพะปะต ะธะปะธ ะฒ ะดะพะบัƒะผะตะฝั‚ะฐั…), ะพั‚ะปะธั‡ะฝะพะต ะพั‚ ะธัะฟะพะปัŒะทัƒะตะผะพะณะพ ะฟะพ ัƒะผะพะปั‡ะฐะฝะธัŽ. ะŸั€ะธั‡ะธะฝะฐ ะฒ ั‚ะพะผ, ั‡ั‚ะพ ะฟั€ะพะตะบั‚ ัƒะถะต ะธะผะตะตั‚ ัะณะตะฝะตั€ะธั€ะพะฒะฐะฝะฝั‹ะน Javadoc ะฒ ะฟะฐะฟะบะต ั ะดะพะบัƒะผะตะฝั‚ะฐะผะธ, ะฟะพัั‚ะพะผัƒ ะผะพะถะฝะพ ะดะฐะถะต ะฝะต ะฟะพะฝัั‚ัŒ, ั‡ั‚ะพ ั„ะฐะนะป Javadoc ัะพะทะดะฐะฝ, ั‚.ะบ. ะฝะพะฒั‹ะน ะฒั‹ะฒะพะด ะฟั€ะพัั‚ะพ ะฟะตั€ะตะทะฐะฟะธัˆะตั‚ ััƒั‰ะตัั‚ะฒัƒัŽั‰ะธะต ั„ะฐะนะปั‹ ะดะพะบัƒะผะตะฝั‚ะพะฒ. > ะšะพะณะดะฐ ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ะฟั€ะตะดะพัั‚ะฐะฒะปััŽั‚ ะฑะธะฑะปะธะพั‚ะตะบะธ Java, ะพะฝะธ ั‡ะฐัั‚ะพ ะดะพะฑะฐะฒะปััŽั‚ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะฝะตะฟะพัั€ะตะดัั‚ะฒะตะฝะฝะพ ะฒ JAR-ั„ะฐะนะป. ะŸะพะปัŒะทะพะฒะฐั‚ะตะปะธ ะฟั€ะธะฒั‹ะบะปะธ ะธัะบะฐั‚ัŒ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะฒ ะฟะฐะฟะบะต doc. 7. ะะฐะถะธะผะฐะตะผ **Next** ะธ ะฒะธะดะธะผ ะพะบะฝะพ ั ะดะพะฟะพะปะฝะธั‚ะตะปัŒะฝั‹ะผะธ ะฝะฐัั‚ั€ะพะนะบะฐะผะธ ะบะพะฝั„ะธะณัƒั€ะฐั†ะธะน. ![next screen javadoc](img/8.png) ะ—ะดะตััŒ ะฒั‹ ะผะพะถะตั‚ะต ะฒั‹ะฑั€ะฐั‚ัŒ ะฟั€ะพะฟัƒัะบะธ ั‚ะตะณะพะฒ, ั‚ะฐะบะธะต ะบะฐะบ @author ะธ @deprecated. ะšะฐะบ ะฟั€ะฐะฒะธะปะพ, ะธัะบะปัŽั‡ะฐะตั‚ัั ั‚ะตะณ @author, ะฟะพัะบะพะปัŒะบัƒ ะพะฝ ะผะพะถะตั‚ ะฑั‹ั‚ัŒ ะฒะฐะถะตะฝ ั‚ะพะปัŒะบะพ ะฒะฝัƒั‚ั€ะธ, ะฐ ะฝะต ัะฝะฐั€ัƒะถะธ. ะœะพะถะฝะพ ะฒั‹ะฑั€ะฐั‚ัŒ ั€ะฐะทะปะธั‡ะฝั‹ะต ะฟะฐั€ะฐะผะตั‚ั€ั‹ ะฒะพ ั„ั€ะตะนะผะต Javadoc. ะ•ัะปะธ ะตัั‚ัŒ ะบะฐัั‚ะพะผะธะทะธั€ะพะฒะฐะฝะฝะฐั ั‚ะฐะฑะปะธั†ะฐ ัั‚ะธะปะตะน, ั‚ะพ ัƒะบะฐะทะฐั‚ัŒ ะตะต ะผะพะถะฝะพ ะทะดะตััŒ. ะกะบะพั€ะตะต ะฒัะตะณะพ, ะธะทะผะตะฝะตะฝะธั ัั‚ะธะปั ะฑัƒะดัƒั‚ ั‚ะพะปัŒะบะพ ะฟะพะฒะตั€ั…ะฝะพัั‚ะฝั‹ะผะธ, ะฝะฐะฟั€ะธะผะตั€, ั ั†ะฒะตั‚ะฐะผะธ. 8. ะะฐะถะธะผะฐะตะผ **Next** ![overview](img/9.png) ะ—ะดะตััŒ ะผะพะถะฝะพ ะฒั‹ะฑั€ะฐั‚ัŒ HTML-ัั‚ั€ะฐะฝะธั†ัƒ, ะบะพั‚ะพั€ะฐั ะฑัƒะดะตั‚ [ะพะฑะทะพั€ะฝะพะน ัั‚ั€ะฐะฝะธั†ะตะน ะฒ Javadoc](https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#overviewcomment). ะœะพะถะฝะพ ะฒั‹ะฑั€ะฐั‚ัŒ ะปัŽะฑัƒัŽ HTML-ัั‚ั€ะฐะฝะธั†ัƒ, ะธ ะพะฝะฐ ะฑัƒะดะตั‚ ะฒะบะปัŽั‡ะตะฝะฐ ะฒ ะธะฝะดะตะบั. 9. ะะฐะถะธะผะฐะตะผ ะบะฝะพะฟะบัƒ **Finish** ะ•ัะปะธ ะบะฝะพะฟะบะฐ **Finish** ะฝะตะฐะบั‚ะธะฒะฝะฐ, ัั‚ะพ ะผะพะถะตั‚ ะฑั‹ั‚ัŒ ัะฒัะทะฐะฝะพ ั ั‚ะตะผ, ั‡ั‚ะพ Eclipse ะฝะต ะผะพะถะตั‚ ะฝะฐะนั‚ะธ ะฝัƒะถะฝั‹ะน ะธัะฟะพะปะฝัะตะผั‹ะน ั„ะฐะนะป Javadoc. ะœะพะถะฝะพ ะฝะฐะถะฐั‚ัŒ **Configure** ะธ ะฝะฐะนั‚ะธ ั„ะฐะนะป ะฒั€ัƒั‡ะฝัƒัŽ. ะะฐ MacBook Pro ั„ะฐะนะป Javadoc ะฝะฐั…ะพะดะธั‚ัั ะฟะพ ะฐะดั€ะตััƒ `/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/javadoc`. ะ•ัะปะธ ะฑัƒะดะตั‚ ะฟั€ะตะดะปะพะถะตะฝะพ ะพะฑะฝะพะฒะธั‚ัŒ ะผะตัั‚ะพะฟะพะปะพะถะตะฝะธะต Javadoc (ะบะพั‚ะพั€ะพะต, ะฒะตั€ะพัั‚ะฝะพ, ะพั‚ะปะธั‡ะฐะตั‚ัั ะพั‚ ะผะตัั‚ะพะฟะพะปะพะถะตะฝะธั ั€ะฐะฑะพั‡ะตะณะพ ะฟั€ะพัั‚ั€ะฐะฝัั‚ะฒะฐ Eclipse), ัั‚ะพะธั‚ ัั‚ะพ ัะดะตะปะฐั‚ัŒ, ะฝะฐะถะฐะฒ **Yes to all**. ะŸะตั€ะตะนะดะธั‚ะต ะบ ะผะตัั‚ัƒ ะฝะฐะทะฝะฐั‡ะตะฝะธั ะธ ะพั‚ะบั€ะพะนั‚ะต ั„ะฐะนะป index.html ะฒ ะฑั€ะฐัƒะทะตั€ะต, ั‡ั‚ะพะฑั‹ ะฟั€ะพัะผะพั‚ั€ะตั‚ัŒ ั„ะฐะนะปั‹. > ะ•ัะปะธ ะฒะพะทะฝะธะบะปะธ ะฟั€ะพะฑะปะตะผั‹ ัะพ ัะฑะพั€ะบะพะน Javadoc, ะฟะพะปัƒั‡ะธะฒัˆัƒัŽัั ะดะพะบัƒะผะตะฝั‚ะฐั†ะธัŽ ะผะพะถะฝะพ ะฟะพัะผะพั‚ั€ะตั‚ัŒ [ะทะดะตััŒ](https://idratherbewriting.com/learnapidoc/assets/files/javadoc/index.html). <a name="error"></a> ## Javadoc ะธ ะฟั€ะพะฒะตั€ะบะฐ ะพัˆะธะฑะพะบ Javadoc ั‚ะฐะบะถะต ะฟั€ะพะฒะตั€ัะตั‚ ั‚ะตะณะธ ะฟะพ ั„ะฐะบั‚ะธั‡ะตัะบะพะผัƒ ะบะพะดัƒ. ะ•ัะปะธ ะตัั‚ัŒ ะฟะฐั€ะฐะผะตั‚ั€ั‹, ะธัะบะปัŽั‡ะตะฝะธั ะธะปะธ ะฒะพะทะฒั€ะฐั‚ั‹, ะบะพั‚ะพั€ั‹ะต ะฝะต ัะพะพั‚ะฒะตั‚ัั‚ะฒัƒัŽั‚ ะฟะฐั€ะฐะผะตั‚ั€ะฐะผ, ะธัะบะปัŽั‡ะตะฝะธัะผ ะธะปะธ ะฒะพะทะฒั€ะฐั‚ะฐะผ ะฒ ั„ะฐะบั‚ะธั‡ะตัะบะพะผ ะบะพะดะต, ั‚ะพ Javadoc ะฑัƒะดะตั‚ ะฟะพะบะฐะทั‹ะฒะฐั‚ัŒ ะฟั€ะตะดัƒะฟั€ะตะถะดะตะฝะธั. ![error](img/10.png) <a name="parameters"></a> ## ๐Ÿ‘จโ€๐Ÿ’ป ะ˜ะทัƒั‡ะตะฝะธะต ะฟะฐั€ะฐะผะตั‚ั€ะพะฒ Javadoc ะœะพะถะฝะพ ะฟะพะฟั€ะพะฑะพะฒะฐั‚ัŒ ัƒะดะฐะปัั‚ัŒ ะฝะตะบะพั‚ะพั€ั‹ะต ะฟะฐั€ะฐะผะตั‚ั€ั‹ ะธะท ะผะตั‚ะพะดะฐ ะธ ัะฝะพะฒะฐ ะณะตะฝะตั€ะธั€ะพะฒะฐั‚ัŒ Javadoc. ะŸะตั€ะตะด ัั‚ะธะผ ะฝัƒะถะฝะพ ัƒะฑะตะดะธั‚ัŒัั, ั‡ั‚ะพ ะพะบะฝะพ ะบะพะฝัะพะปะธ ะพั‚ะบั€ั‹ั‚ะพ, ั‡ั‚ะพะฑั‹ ะผะพะถะฝะพ ะฑั‹ะปะพ ะฒะธะดะตั‚ัŒ ะฟั€ะตะดัƒะฟั€ะตะถะดะตะฝะธั ะพะฑ ะพัˆะธะฑะบะฐั…. <a name="build"></a> ## ะะฒั‚ะพะผะฐั‚ะธั‡ะตัะบะพะต ัะพะทะดะฐะฝะธะต Javadoc ะ’ ะฑะพะปัŒัˆะธะฝัั‚ะฒะต ะฟั€ะพะตะบั‚ะพะฒ ั„ะฐะนะป Javadoc ะฝะธะบะพะณะดะฐ ะฝะต ัะพะทะดะฐะตั‚ัั ะฒั€ัƒั‡ะฝัƒัŽ, ะบะฐะบ ะพะฟะธัะฐะฝะพ ะทะดะตััŒ. Javadoc ะฟะพะทะฒะพะปัะตั‚ ัั‚ั€ะพะธั‚ัŒ ะตะณะพ ะธะท ะบะพะผะฐะฝะดะฝะพะน ัั‚ั€ะพะบะธ, ะฟะตั€ะตะดะฐะฒะฐั ะตะผัƒ ั„ะฐะนะป ะบะพะฝั„ะธะณัƒั€ะฐั†ะธะธ. ะฃ ะฑะพะปัŒัˆะธะฝัั‚ะฒะฐ ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะพะฒ ะตัั‚ัŒ ะธะฝัั‚ั€ัƒะผะตะฝั‚ ัƒะฟั€ะฐะฒะปะตะฝะธั ัะฑะพั€ะบะพะน, ะณะดะต ะพะฝะธ ะผะพะณัƒั‚ ะฝะฐัั‚ั€ะฐะธะฒะฐั‚ัŒ ะฒั‹ั…ะพะดะฝั‹ะต ะดะฐะฝะฝั‹ะต ะธะท ัะฒะพะตะณะพ ะบะพะดะฐ, ะฒะบะปัŽั‡ะฐั Javadoc. ะ•ัะปะธ ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ะฟะพะฟั€ะพััั‚ ัะพะฑั€ะฐั‚ัŒ Javadoc, ัะบะพั€ะตะต ะฒัะตะณะพ, ะธั… ัะธัั‚ะตะผะฐ ัƒะฟั€ะฐะฒะปะตะฝะธั ัะฑะพั€ะบะพะน ะผะพะถะตั‚ ะฑั‹ั‚ัŒ ะฝะตัะบะพะปัŒะบะพ ะฟั€ะธะผะธั‚ะธะฒะฝะพะน. ะขะตะผ ะฝะต ะผะตะฝะตะต, ะผะพะถะตั‚ ะฑั‹ั‚ัŒ ะฟะพะปะตะทะฝะพ ัะพะทะดะฐั‚ัŒ ะฒั‹ั…ะพะดะฝั‹ะต ะดะฐะฝะฝั‹ะต Javadoc ัะฐะผะพัั‚ะพัั‚ะตะปัŒะฝะพ (ะบะฐะบ ะพะฟะธัะฐะฝะพ ะทะดะตััŒ), ั‡ั‚ะพะฑั‹ ะฟั€ะพั‚ะตัั‚ะธั€ะพะฒะฐั‚ัŒ ะธ ะฟั€ะพัะผะพั‚ั€ะตั‚ัŒ ะฒั‹ั…ะพะดะฝั‹ะต ะดะฐะฝะฝั‹ะต, ะฟั€ะตะถะดะต ั‡ะตะผ ัะพะทะดะฐะฒะฐั‚ัŒ ะธั… ั ะฟะพะผะพั‰ัŒัŽ ะธะฝัั‚ั€ัƒะผะตะฝั‚ะฐ ัƒะฟั€ะฐะฒะปะตะฝะธั ัะฑะพั€ะบะพะน.
{ "pile_set_name": "Github" }
/*! * depd * Copyright(c) 2014 Douglas Christopher Wilson * MIT Licensed */ /** * Module exports. */ lazyProperty(module.exports, 'bufferConcat', function bufferConcat() { return Buffer.concat || require('./buffer-concat') }) lazyProperty(module.exports, 'callSiteToString', function callSiteToString() { var limit = Error.stackTraceLimit var obj = {} var prep = Error.prepareStackTrace function prepareObjectStackTrace(obj, stack) { return stack } Error.prepareStackTrace = prepareObjectStackTrace Error.stackTraceLimit = 2 // capture the stack Error.captureStackTrace(obj) // slice the stack var stack = obj.stack.slice() Error.prepareStackTrace = prep Error.stackTraceLimit = limit return stack[0].toString ? toString : require('./callsite-tostring') }) /** * Define a lazy property. */ function lazyProperty(obj, prop, getter) { function get() { var val = getter() Object.defineProperty(obj, prop, { configurable: true, enumerable: true, value: val }) return val } Object.defineProperty(obj, prop, { configurable: true, enumerable: true, get: get }) } /** * Call toString() on the obj */ function toString(obj) { return obj.toString() }
{ "pile_set_name": "Github" }
// Copyright 2018-present 650 Industries. All rights reserved. #import <ABI39_0_0EXDocumentPicker/ABI39_0_0EXDocumentPickerModule.h> #import <ABI39_0_0UMCore/ABI39_0_0UMUtilitiesInterface.h> #import <ABI39_0_0UMFileSystemInterface/ABI39_0_0UMFileSystemInterface.h> #import <UIKit/UIKit.h> #import <MobileCoreServices/MobileCoreServices.h> #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 #import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> #endif #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 API_AVAILABLE(ios(14.0)) static UTType* ABI39_0_0EXConvertMimeTypeToUTType(NSString *mimeType) { // UTType#typeWithMIMEType doesn't work with wildcard mimetypes // so support common top level types with wildcards here. if ([mimeType isEqualToString:@"*/*"]) { return UTTypeData; } else if ([mimeType isEqualToString:@"image/*"]) { return UTTypeImage; } else if ([mimeType isEqualToString:@"video/*"]) { return UTTypeMovie; } else if ([mimeType isEqualToString:@"audio/*"]) { return UTTypeAudio; } else if ([mimeType isEqualToString:@"text/*"]) { return UTTypeText; } else { return [UTType typeWithMIMEType:mimeType]; } } #endif // Deprecated in iOS 14 static NSString * ABI39_0_0EXConvertMimeTypeToUTI(NSString *mimeType) { CFStringRef uti; // UTTypeCreatePreferredIdentifierForTag doesn't work with wildcard mimetypes // so support common top level types with wildcards here. if ([mimeType isEqualToString:@"*/*"]) { uti = kUTTypeData; } else if ([mimeType isEqualToString:@"image/*"]) { uti = kUTTypeImage; } else if ([mimeType isEqualToString:@"video/*"]) { uti = kUTTypeMovie; } else if ([mimeType isEqualToString:@"audio/*"]) { uti = kUTTypeAudio; } else if ([mimeType isEqualToString:@"text/*"]) { uti = kUTTypeText; } else { CFStringRef mimeTypeRef = (__bridge CFStringRef)mimeType; uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mimeTypeRef, NULL); } return (__bridge_transfer NSString *)uti; } @interface ABI39_0_0EXDocumentPickerModule () <UIDocumentPickerDelegate, UIAdaptivePresentationControllerDelegate> @property (nonatomic, weak) ABI39_0_0UMModuleRegistry *moduleRegistry; @property (nonatomic, weak) id<ABI39_0_0UMFileSystemInterface> fileSystem; @property (nonatomic, weak) id<ABI39_0_0UMUtilitiesInterface> utilities; @property (nonatomic, strong) ABI39_0_0UMPromiseResolveBlock resolve; @property (nonatomic, strong) ABI39_0_0UMPromiseRejectBlock reject; @property (nonatomic, assign) BOOL shouldCopyToCacheDirectory; @end @implementation ABI39_0_0EXDocumentPickerModule ABI39_0_0UM_EXPORT_MODULE(ExpoDocumentPicker); - (void)setModuleRegistry:(ABI39_0_0UMModuleRegistry *)moduleRegistry { _moduleRegistry = moduleRegistry; if (_moduleRegistry != nil) { _fileSystem = [moduleRegistry getModuleImplementingProtocol:@protocol(ABI39_0_0UMFileSystemInterface)]; _utilities = [moduleRegistry getModuleImplementingProtocol:@protocol(ABI39_0_0UMUtilitiesInterface)]; } } ABI39_0_0UM_EXPORT_METHOD_AS(getDocumentAsync, options:(NSDictionary *)options resolve:(ABI39_0_0UMPromiseResolveBlock)resolve reject:(ABI39_0_0UMPromiseRejectBlock)reject) { if (_resolve != nil) { return reject(@"E_DOCUMENT_PICKER", @"Different document picking in progress. Await other document picking first.", nil); } _resolve = resolve; _reject = reject; NSString *mimeType = options[@"type"] ?: @"*/*"; _shouldCopyToCacheDirectory = options[@"copyToCacheDirectory"] && [options[@"copyToCacheDirectory"] boolValue] == YES; ABI39_0_0UM_WEAKIFY(self); dispatch_async(dispatch_get_main_queue(), ^{ ABI39_0_0UM_ENSURE_STRONGIFY(self); UIDocumentPickerViewController *documentPickerVC; @try { // TODO: drop #if macro once Xcode is updated to 12 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 if (@available(iOS 14, *)) { UTType* utType = ABI39_0_0EXConvertMimeTypeToUTType(mimeType); documentPickerVC = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:@[utType] asCopy:YES]; } else { #endif NSString* type = ABI39_0_0EXConvertMimeTypeToUTI(mimeType); documentPickerVC = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[type] inMode:UIDocumentPickerModeImport]; // TODO: drop #if macro once Xcode is updated to 12 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 } #endif } @catch (NSException *exception) { reject(@"E_PICKER_ICLOUD", @"DocumentPicker requires the iCloud entitlement. If you are using ExpoKit, you need to add this capability to your App Id. See `https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics#using-documentpicker` for more info.", nil); self->_resolve = nil; self->_reject = nil; return; } documentPickerVC.delegate = self; documentPickerVC.presentationController.delegate = self; // Because of the way IPad works with Actionsheets such as this one, we need to provide a source view and set it's position. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { documentPickerVC.popoverPresentationController.sourceRect = CGRectMake(CGRectGetMidX([self->_utilities.currentViewController.view frame]), CGRectGetMaxY([self->_utilities.currentViewController.view frame]), 0, 0); documentPickerVC.popoverPresentationController.sourceView = self->_utilities.currentViewController.view; documentPickerVC.modalPresentationStyle = UIModalPresentationPageSheet; } [self->_utilities.currentViewController presentViewController:documentPickerVC animated:YES completion:nil]; }); } - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url { NSError *fileSizeError = nil; unsigned long long fileSize = [ABI39_0_0EXDocumentPickerModule getFileSize:[url path] error:&fileSizeError]; if (fileSizeError) { _reject(@"E_INVALID_FILE", @"Unable to get file size", fileSizeError); _resolve = nil; _reject = nil; return; } NSURL *newUrl = url; if (_shouldCopyToCacheDirectory) { if (!_fileSystem) { _reject(@"E_CANNOT_PICK_FILE", @"No FileSystem module.", nil); return; } NSString *directory = [_fileSystem.cachesDirectory stringByAppendingPathComponent:@"DocumentPicker"]; NSString *extension = [url pathExtension]; NSString *path = [_fileSystem generatePathInDirectory:directory withExtension:[extension isEqualToString:@""] ? extension : [@"." stringByAppendingString:extension]]; NSError *error = nil; newUrl = [NSURL fileURLWithPath:path]; [[NSFileManager defaultManager] copyItemAtURL:url toURL:newUrl error:&error]; if (error != nil) { self.reject(@"E_CANNOT_PICK_FILE", @"File could not be saved to app storage", error); return; } } _resolve(@{ @"type": @"success", @"uri": [newUrl absoluteString], @"name": [url lastPathComponent], @"size": @(fileSize), }); _resolve = nil; _reject = nil; } // Document picker view controller has been cancelled with a button - (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller { _resolve(@{@"type": @"cancel"}); _resolve = nil; _reject = nil; } // Document picker view controller has been dismissed by gesture - (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController { [self documentPickerWasCancelled:presentationController.presentedViewController]; } + (unsigned long long)getFileSize:(NSString *)path error:(NSError **)error { NSDictionary<NSFileAttributeKey, id> *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:error]; if (*error) { return 0; } if (fileAttributes.fileType != NSFileTypeDirectory) { return fileAttributes.fileSize; } // The path is pointing to the folder NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:error]; if (*error) { return 0; } NSEnumerator *contentsEnumurator = [contents objectEnumerator]; NSString *file; unsigned long long folderSize = 0; while (file = [contentsEnumurator nextObject]) { folderSize += [ABI39_0_0EXDocumentPickerModule getFileSize:[path stringByAppendingPathComponent:file] error:error]; if (*error) { return 0; } } return folderSize; } @end
{ "pile_set_name": "Github" }
/* Copyright (C) 2016-2020 Andreas Shimokawa, Carsten Pfeiffer, Daniele Gobbetti This file is part of Gadgetbridge. Gadgetbridge is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Gadgetbridge is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble; import java.util.UUID; import nodomain.freeyourgadget.gadgetbridge.GBApplication; import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; import nodomain.freeyourgadget.gadgetbridge.util.Prefs; abstract class DatalogSessionPebbleHealth extends DatalogSession { private final GBDevice mDevice; DatalogSessionPebbleHealth(byte id, UUID uuid, int timestamp, int tag, byte itemType, short itemSize, GBDevice device) { super(id, uuid, timestamp, tag, itemType, itemSize); mDevice = device; } public GBDevice getDevice() { return mDevice; } boolean isPebbleHealthEnabled() { Prefs prefs = GBApplication.getPrefs(); return prefs.getBoolean("pebble_sync_health", true); } boolean storePebbleHealthRawRecord() { Prefs prefs = GBApplication.getPrefs(); return prefs.getBoolean("pebble_health_store_raw", true); } }
{ "pile_set_name": "Github" }
diff --git libs/CMakeLists.txt libs/CMakeLists.txt index c0576fe..1a34bca 100644 --- libs/CMakeLists.txt +++ libs/CMakeLists.txt @@ -6,14 +6,12 @@ add_subdirectory(plasmaclock) if(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop") add_subdirectory(kdm) add_subdirectory(plasmagenericshell) - if(NOT WIN32) + if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin) add_subdirectory(taskmanager) - endif(NOT WIN32) + endif(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin) endif(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop") -if(NOT WIN32) - if (NOT CMAKE_SYSTEM_NAME MATCHES Darwin) - add_subdirectory(ksysguard) - endif (NOT CMAKE_SYSTEM_NAME MATCHES Darwin) -endif(NOT WIN32) +if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin) + add_subdirectory(ksysguard) +endif(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: joda-time:joda-time:2.3"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.3/joda-time-2.3.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.3/joda-time-2.3-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.3/joda-time-2.3-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. 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 OPEN GROUP 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. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _SECURITY_H #define _SECURITY_H #define _XAUTH_STRUCT_ONLY #include <X11/Xauth.h> #include <X11/extensions/secur.h> _XFUNCPROTOBEGIN Status XSecurityQueryExtension ( Display *dpy, int *major_version_return, int *minor_version_return); Xauth *XSecurityAllocXauth(void); void XSecurityFreeXauth(Xauth *auth); /* type for returned auth ids */ typedef unsigned long XSecurityAuthorization; typedef struct { unsigned int timeout; unsigned int trust_level; XID group; long event_mask; } XSecurityAuthorizationAttributes; Xauth *XSecurityGenerateAuthorization( Display *dpy, Xauth *auth_in, unsigned long valuemask, XSecurityAuthorizationAttributes *attributes, XSecurityAuthorization *auth_id_return); Status XSecurityRevokeAuthorization( Display *dpy, XSecurityAuthorization auth_id); _XFUNCPROTOEND typedef struct { int type; /* event base + XSecurityAuthorizationRevoked */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ XSecurityAuthorization auth_id; /* revoked authorization id */ } XSecurityAuthorizationRevokedEvent; #endif /* _SECURITY_H */
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <MetalPerformanceShaders/MPSCNNFullyConnectedNode.h> @class TCMPSConvolutionWeights; @interface MPSCNNFullyConnectedNode (TCMPSLayerHelper) + (id)createFullyConnected:(id)arg1 inputFeatureChannels:(unsigned long long)arg2 outputFeatureChannels:(unsigned long long)arg3 inputHeight:(unsigned long long)arg4 inputWidth:(unsigned long long)arg5 weights:(id)arg6 biases:(id)arg7 label:(id)arg8 updateWeights:(BOOL)arg9 device:(id)arg10 cmdQueue:(id)arg11; @property(retain, nonatomic) TCMPSConvolutionWeights *tc_weightsData; // @dynamic tc_weightsData; @end
{ "pile_set_name": "Github" }
const figlet = require('figlet'); const chalk = require('chalk'); const path = require('path'); const fs = require('fs'); const handlebars = require('handlebars'); const replace = require('replace-in-file'); const router = require('../../routes'); const modules = {}; modules.config = { appDir: './', pagesDir: './pages', componentsDir: './components', containersDir: './containers', librariesDir: './libraries', templatesDir: './helper_scripts/templates', routeFile: './routes.js', serverFile: './server.js' }; modules.writeRan = function writeRan(callback) { chalk.yellow( figlet.text( 'RAN!', { verticalLayout: 'full' }, (err, data) => { process.stdout.write('\n'); process.stdout.write(data); process.stdout.write('\n'); if (callback) callback(); } ) ); }; modules.isUsedOnDir = function isUsedOnDir( startPath, filter, onlyDirectories = false ) { if (!fs.existsSync(startPath)) { return false; } if (onlyDirectories) { return fs.existsSync(`${startPath}/${filter}`); } const files = fs.readdirSync(startPath); let isFound = false; for (let i = 0; i < files.length; i += 1) { const filename = path.join(startPath, files[i]); const stat = fs.lstatSync(filename); if (stat.isDirectory()) { isUsedOnDir(filename, filter); // recurse } else if (filename.indexOf(filter) >= 0) { isFound = true; } } return isFound; }; modules.getFilesOnDir = function getFilesOnDir(startPath) { if (!fs.existsSync(startPath)) { return []; } const files = fs.readdirSync(startPath); const isFound = []; for (let i = 0; i < files.length; i += 1) { const filename = path.join(startPath, files[i]); const stat = fs.lstatSync(filename); if (stat.isDirectory()) { isFound.concat(getFilesOnDir(filename)); // recurse } else { const pagename = files[i].replace('.js', ''); if (pagename !== '_document') isFound.push(pagename); } } return isFound; }; modules.isUsedOnRoutes = function isUsedOnRoutes(url) { let isFound = false; router.routes.forEach(route => { if (route.pattern.indexOf(url) !== -1) { isFound = true; } }); return isFound; }; modules.getTempfromHandlebar = function getTempfromHandlebar( tempPath, data, callback ) { fs.readFile(tempPath, 'utf-8', (err, source) => { if (err) throw err; const template = handlebars.compile(source); const exportCode = template(data); callback(exportCode); }); }; modules.addTexttoFile = function addTexttoFile( filePath, from, text, cb, before = true ) { const matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; const re = new RegExp(from.replace(matchOperatorsRe, '\\$&')); replace( { encoding: 'utf8', files: filePath, from: re, to: before ? `${text}${from}` : `${from}\n${text}` }, error => { if (error) { throw error; } cb(); } ); }; modules.createPageFromTemplate = function createPageFromTemplate( filename, callback ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/page.hbs`, { filename }, code => { fs.writeFile( `${modules.config.pagesDir}/${filename}.js`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.createContainerFromTemplate = function createContainerFromTemplate( filename, callback ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/container.hbs`, { filename }, code => { fs.writeFile( `${modules.config.containersDir}/${filename}.js`, code, { flag: 'w' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.createComponentFromTemplate = function createComponentFromTemplate( options, callback = () => {} ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/component.hbs`, options, code => { if ( !fs.existsSync(`${modules.config.componentsDir}/${options.filename}`) ) { fs.mkdirSync(`${modules.config.componentsDir}/${options.filename}`); } fs.writeFile( `${modules.config.componentsDir}/${options.filename}/index.js`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.createStoreFromTemplate = function createStoreFromTemplate( options, callback = () => {} ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/component_store.hbs`, options, code => { fs.writeFile( `${modules.config.componentsDir}/${options.filename}/store.js`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.createStyleFromTemplate = function createStyleFromTemplate( options, callback = () => {} ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/component_style.hbs`, options, code => { fs.writeFile( `${modules.config.componentsDir}/${options.filename}/styles.js`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.createGraphqlFromTemplate = function createGraphqlFromTemplate( options, callback = () => {} ) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/component_graphql.hbs`, options, code => { fs.writeFile( `${modules.config.componentsDir}/${options.filename}/${ options.graphqlName }.gql`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.clearReducerList = function clearReducerList(callback) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/reducer.hbs`, {}, code => { fs.writeFile( `${modules.config.librariesDir}/reducer.js`, code, { flag: 'w' }, _err => { if (_err) throw _err; callback(); } ); } ); }; modules.clearRoutes = function clearRoutes(callback) { const re = /^(routes.)[A-Za-z(', /:);_]*/gm; replace( { encoding: 'utf8', files: `${modules.config.routeFile}`, from: re, to: '' }, error => { if (error) { throw error; } callback(); } ); }; modules.updateReadme = function updateReadme(projectname, callback) { modules.getTempfromHandlebar( `${modules.config.templatesDir}/readme.hbs`, { projectname }, code => { fs.writeFile( `${modules.config.appDir}README.md`, code, { flag: 'wx' }, _err => { if (_err) throw _err; callback(); } ); } ); }; module.exports = modules;
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @protocol WXGMigrationClientLogicDelegate <NSObject> - (void)onClientLogicCurrentTransferSpeed:(float)arg1; - (void)onClientProcessCurrentCount:(unsigned long long)arg1 totalCount:(unsigned long long)arg2; - (void)onClientProcessCurrentReceiveSize:(unsigned long long)arg1 totalSize:(unsigned long long)arg2; - (void)onClientFirstPacketOK:(_Bool)arg1; - (void)onClientLogicAlertCode:(unsigned long long)arg1; - (void)onClientLogicNotifyCode:(unsigned long long)arg1; @end
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Address</title> <link href="css/base.css" rel="stylesheet"> <link href="css/checkout.css" rel="stylesheet"> <link href="css/modal.css" rel="stylesheet"> <style type="text/css"> .quantity input { width: 40px; padding: 5px 10px; text-align: center; } </style> </head> <body> <div class="address"> <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <symbol id="icon-add" viewBox="0 0 32 32"> <title>add2</title> <path class="path1" d="M15 17h-13.664c-0.554 0-1.002-0.446-1.002-1 0-0.552 0.452-1 1.002-1h13.664v-13.664c0-0.554 0.446-1.002 1-1.002 0.552 0 1 0.452 1 1.002v13.664h13.664c0.554 0 1.002 0.446 1.002 1 0 0.552-0.452 1-1.002 1h-13.664v13.664c0 0.554-0.446 1.002-1 1.002-0.552 0-1-0.452-1-1.002v-13.664z"></path> </symbol> <symbol id="icon-ok" viewBox="0 0 39 32"> <title>ok</title> <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path> </symbol> <symbol id="icon-edit" viewBox="0 0 32 32"> <title>edit</title> <path class="path1" d="M25.599 11.292l-4.892-4.892 3.825-3.825 4.892 4.892-3.825 3.825zM4.732 23.308l3.959 3.959-5.939 1.98 1.98-5.939zM10.666 26.225l-4.892-4.892 13.425-13.425 4.892 4.892-13.425 13.425zM31.687 6.713l-6.4-6.4c-0.417-0.417-1.091-0.417-1.508 0l-20.267 20.267c-0.114 0.115-0.191 0.25-0.242 0.393-0.003 0.009-0.012 0.015-0.015 0.025l-3.2 9.6c-0.128 0.383-0.029 0.806 0.257 1.091 0.203 0.204 0.476 0.313 0.754 0.313 0.112 0 0.227-0.017 0.337-0.054l9.6-3.2c0.011-0.003 0.017-0.013 0.027-0.016 0.142-0.052 0.276-0.128 0.39-0.242l20.267-20.267c0.417-0.416 0.417-1.091 0-1.508v0z"></path> </symbol> <symbol id="icon-del" viewBox="0 0 26 32"> <title>delete</title> <path class="path1" d="M17.723 28c0.543 0 0.984-0.448 0.984-1v-12c0-0.552-0.441-1-0.984-1s-0.985 0.448-0.985 1v12c0 0.552 0.441 1 0.985 1v0zM7.877 28c0.543 0 0.984-0.448 0.984-1v-12c0-0.552-0.441-1-0.984-1s-0.985 0.448-0.985 1v12c0 0.552 0.441 1 0.985 1v0zM12.8 28c0.543 0 0.985-0.448 0.985-1v-12c0-0.552-0.441-1-0.985-1s-0.984 0.448-0.984 1v12c0 0.552 0.441 1 0.984 1v0zM23.631 4h-5.908v-2c0-1.104-0.882-2-1.969-2h-5.908c-1.087 0-1.969 0.896-1.969 2v2h-5.908c-1.087 0-1.969 0.896-1.969 2v2c0 1.104 0.882 2 1.969 2v18c0 2.208 1.765 4 3.939 4h13.784c2.174 0 3.938-1.792 3.938-4v-18c1.087 0 1.969-0.896 1.969-2v-2c0-1.104-0.882-2-1.969-2v0zM9.846 3c0-0.552 0.441-1 0.984-1h3.938c0.544 0 0.985 0.448 0.985 1v1h-5.908v-1zM21.662 28c0 1.104-0.882 2-1.969 2h-13.784c-1.087 0-1.97-0.896-1.97-2v-18h17.723v18zM22.646 8h-19.692c-0.543 0-0.985-0.448-0.985-1s0.441-1 0.985-1h19.692c0.543 0 0.984 0.448 0.984 1s-0.441 1-0.984 1v0z"></path> </symbol> <symbol id="icon-clock" viewBox="0 0 32 32"> <title>clock</title> <path class="path1" d="M29.333 16c0-7.364-5.97-13.333-13.333-13.333s-13.333 5.97-13.333 13.333c0 7.364 5.97 13.333 13.333 13.333s13.333-5.97 13.333-13.333v0 0 0 0 0 0zM0 16c0-8.837 7.163-16 16-16s16 7.163 16 16c0 8.837-7.163 16-16 16s-16-7.163-16-16zM14.667 14.667v1.333h2.667v-10.667h-2.667v9.333zM24 18.667h1.333v-2.667h-10.667v2.667h9.333z"></path> </symbol> </defs> </svg> <div class="container"> <div class="checkout-addr"> <!-- process step --> <div class="check-step"> <ul> <li class="cur">ๅœฐๅ€็กฎ่ฎค</li> <li>ๆŸฅ็œ‹่ฎขๅ•</li> <li>ๆ”ฏไป˜</li> <li>่ฎขๅ•็กฎ่ฎค</li> </ul> </div> <!-- address list --> <div class="checkout-title"> <span>้…้€ๅœฐๅ€</span> </div> <div class="addr-list-wrap"> <div class="addr-list"> <ul> <li v-for="(item,index) in filterAddress" v-bind:class="{'check': index == currentIndex}" @click="currentIndex=index"> <dl> <dt>{{item.userName}}</dt> <dd class="address">{{item.streetName}}</dd> <dd class="tel">{{item.tel}}</dd> </dl> <div class="addr-opration addr-edit"> <a href="javascript:;" class="addr-edit-btn"> <svg class="icon icon-edit"> <use xlink:href="#icon-edit"></use> </svg> </a> </div> <div class="addr-opration addr-del"> <a href="javascript:;" class="addr-del-btn"> <svg class="icon icon-del"> <use xlink:href="#icon-del"></use> </svg> </a> </div> <div class="addr-opration addr-set-default" v-if="!item.isDefault"> <a href="javascript:;" class="addr-set-default-btn" @click="setDefault(item.addressId)"><i>่ฎพไธบ้ป˜่ฎค</i></a> </div> <div class="addr-opration addr-default" v-if="item.isDefault">้ป˜่ฎคๅœฐๅ€</div> </li> <li class="addr-new"> <div class="add-new-inner"> <i class="icon-add"> <svg class="icon icon-add"><use xlink:href="#icon-add"></use></svg> </i> <p>ๆทปๅŠ ๆ–ฐๅœฐๅ€</p> </div> </li> </ul> </div> <div class="shipping-addr-more"> <!--<a class="addr-more-btn up-down-btn" href="javascript:" @click="limitNum=addressList.length">--> <a class="addr-more-btn up-down-btn" href="javascript:" @click="(limitNum == 3) ? limitNum=addressList.length : limitNum=3"> more <i class="i-up-down"> <i class="i-up-down-l"></i> <i class="i-up-down-r"></i> </i> </a> </div> </div> <!-- shipping method--> <div class="checkout-title"> <span>้…้€ๆ–นๅผ</span> </div> <div class="shipping-method-wrap"> <div class="shipping-method"> <ul> <li v-bind:class="{'check': shippingMethod == 1}" @click="shippingMethod = 1"> <div class="name">ๆ ‡ๅ‡†้…้€</div> <div class="price">Free</div> </li> <li v-bind:class="{'check': shippingMethod == 2}" @click="shippingMethod = 2"> <div class="name">้ซ˜็บง้…้€</div> <div class="price">180</div> </li> </ul> </div> </div> <div class="next-btn-wrap"> <a href="javascript:;" class="btn btn--red">ไธ‹ไธ€ๆญฅ</a> </div> <div class="md-modal modal-msg md-modal-transition" id="showModal"> <div class="md-modal-inner"> <div class="md-top"> <button class="md-close">ๅ…ณ้—ญ</button> </div> <div class="md-content"> <div class="confirm-tips"> <p id="cusLanInfo">ไฝ ็กฎ่ฎคๅˆ ้™คๆญค้…้€ๅœฐๅ€ไฟกๆฏๅ—?</p> </div> <div class="btn-wrap col-2"> <button class="btn btn--m" id="btnModalConfirm">Yes</button> <button class="btn btn--m btn--red" id="btnModalCancel">No</button> </div> </div> </div> </div> <div class="md-modal modal-msg md-modal-transition" id="showModalw"> <div class="md-modal-inner"> <div class="md-top"> <button class="md-close">ๅ…ณ้—ญ</button> </div> <div class="md-content"> <div class="confirm-tips"> <div class="md-form-item"> <label class="md-form-item__label" style="width: 80px;"> ๅง“ๅ </label> <div class="md-form-item__content" style="margin-left: 80px;"> <div class="el-input"> <input type="text" autocomplete="off" class="md-input__inner"> </div> </div> </div> <div class="md-form-item"> <label class="md-form-item__label" style="width: 80px;"> ๅœฐๅ€ </label> <div class="md-form-item__content" style="margin-left: 80px;"> <div class="el-input"> <input type="text" autocomplete="off" class="md-input__inner"> </div> </div> </div> <div class="md-form-item"> <label class="md-form-item__label" style="width: 80px;"> ็”ต่ฏๅท็  </label> <div class="md-form-item__content" style="margin-left: 80px;"> <div class="el-input"> <input type="text" autocomplete="off" class="md-input__inner"> </div> </div> </div> </div> <div class="btn-wrap col-2"> <button class="btn btn--s" id="btnModalConfirms">ไฟๅญ˜</button> <button class="btn btn--s btn--red" id="btnModalCancels">ๅ–ๆถˆ</button> </div> </div> </div> </div> </div> </div> </div> <script src="https://unpkg.com/vue"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> <script src="js/address01.js"></script> </body> </html>
{ "pile_set_name": "Github" }
/* apcats-mib.c - subdriver to monitor apcats SNMP devices with NUT * * Copyright (C) * 2011 - 2012 Arnaud Quette <[email protected]> * 2016 Arnaud Quette <[email protected]> * * Note: this subdriver was initially generated as a "stub" by the * gen-snmp-subdriver script. It must be customized! * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "apc-ats-mib.h" #define APC_ATS_MIB_VERSION "0.3" #define APC_ATS_SYSOID ".1.3.6.1.4.1.318.1.3.11" static info_lkp_t ats_sensitivity_info[] = { { 1, "high" }, { 2, "low" }, { 0, NULL } }; static info_lkp_t ats_output_status_info[] = { { 1, "OFF" }, /* fail */ { 2, "OL" }, /* ok */ { 0, NULL } }; static info_lkp_t ats_outletgroups_name_info[] = { { 1, "total" }, { 2, "bank1" }, { 3, "bank2" }, { 0, NULL } }; static info_lkp_t ats_outletgroups_status_info[] = { { 1, "OL" }, /* normal */ { 2, "" }, /* lowload */ { 3, "" }, /* nearoverload */ { 4, "OVER" }, /* overload */ { 0, NULL } }; /* APC ATS Snmp2NUT lookup table */ static snmp_info_t apc_ats_mib[] = { /* Device collection */ { "device.type", ST_FLAG_STRING, SU_INFOSIZE, NULL, "ats", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, /* ats2IdentManufacturer.0 = STRING: EATON */ { "device.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "APC", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, /* atsIdentModelNumber.0 = STRING: "AP7724" */ { "device.model", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.5.0", NULL, SU_FLAG_OK, NULL }, /* FIXME: RFC for device.firmware! */ /* atsIdentHardwareRev.0 = STRING: "R01" */ { "ups.firmware", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.1.0", NULL, SU_FLAG_OK, NULL }, /* FIXME: RFC for device.firmware.aux! */ /* atsIdentFirmwareRev.0 = STRING: "3.0.5" */ { "ups.firmware.aux", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.2.0", NULL, SU_FLAG_OK, NULL }, /* atsIdentFirmwareDate.0 = STRING: "09/13/11" */ /*{ "unmapped.atsIdentFirmwareDate", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.3.0", NULL, SU_FLAG_OK, NULL },*/ /* atsIdentSerialNumber.0 = STRING: "5A1516T15268" */ { "device.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.6.0", NULL, SU_FLAG_OK, NULL }, /* FIXME: RFC for device.mfr.date! */ /* atsIdentDateOfManufacture.0 = STRING: "04/18/2015" */ { "ups.mfr.date", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.1.4.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigProductName.0 = STRING: "m-ups-04" */ { "ups.id", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.4.1.0", NULL, SU_FLAG_OK, NULL }, /* Input collection */ /* atsIdentNominalLineVoltage.0 = INTEGER: 230 */ { "input.voltage.nominal", 0, 1, ".1.3.6.1.4.1.318.1.1.8.1.7.0", NULL, SU_FLAG_OK, NULL }, /* atsIdentNominalLineFrequency.0 = INTEGER: 50 */ { "input.frequency.nominal", 0, 1, ".1.3.6.1.4.1.318.1.1.8.1.8.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusSelectedSource.0 = INTEGER: sourceB(2) */ { "input.source", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.2.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigPreferredSource.0 = INTEGER: sourceB(2) */ { "input.source.preferred", ST_FLAG_RW, 1, ".1.3.6.1.4.1.318.1.1.8.4.2.0", NULL, SU_FLAG_OK, NULL }, /* atsInputVoltage.1.1.1 = INTEGER: 216 */ { "input.1.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.3.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputVoltage.2.1.1 = INTEGER: 215 */ { "input.2.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.3.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputFrequency.1 = INTEGER: 50 */ { "input.1.frequency", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.4.1", NULL, SU_FLAG_OK, NULL }, /* atsInputFrequency.2 = INTEGER: 50 */ { "input.2.frequency", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.4.2", NULL, SU_FLAG_OK, NULL }, /* atsConfigVoltageSensitivity.0 = INTEGER: high(1) */ { "input.sensitivity", ST_FLAG_RW, 1, ".1.3.6.1.4.1.318.1.1.8.4.4.0", NULL, SU_FLAG_OK, &ats_sensitivity_info[0] }, /* FIXME: RFC for input.count! */ /* atsNumInputs.0 = INTEGER: 2 */ { "input.count", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.1.0", NULL, SU_FLAG_OK, NULL }, /* Output collection */ /* atsOutputFrequency.1 = INTEGER: 50 */ { "output.frequency", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.2.1.4.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankOutputVoltage.1 = INTEGER: 215 */ { "output.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.6.1", NULL, SU_FLAG_OK, NULL }, /* UPS collection */ /* FIXME: RFC for device.status! */ /* atsStatusVoltageOutStatus.0 = INTEGER: ok(2) */ { "ups.status", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.15.0", NULL, SU_FLAG_OK, &ats_output_status_info[0] }, /* Outlet groups collection */ /* Note: prefer the OutputBank data to the ConfigBank ones */ /* atsConfigBankTableSize.0 = INTEGER: 3 */ /*{ "outlet.group.count", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.13.0", NULL, SU_FLAG_OK, NULL },*/ /* atsOutputBankTableSize.0 = INTEGER: 3 */ { "outlet.group.count", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.4.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankTableIndex.%i = INTEGER: %i */ /*{ "outlet.group.%i.id", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.4.14.1.1.%i", NULL, SU_FLAG_OK, NULL },*/ /* atsOutputBankTableIndex.%i = INTEGER: %i */ { "outlet.group.%i.id", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.1.%i", NULL, SU_FLAG_OK | SU_OUTLET_GROUP, NULL }, /* atsConfigBank.%i = INTEGER: total(1) */ /*{ "outlet.group.%i.name", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.2.%i", NULL, SU_FLAG_STATIC | SU_OUTLET_GROUP, &ats_group_name_info[0] },*/ /* atsOutputBank.1 = INTEGER: total(1) */ { "outlet.group.%i.name", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.3.%i", NULL, SU_FLAG_STATIC | SU_OUTLET_GROUP, &ats_outletgroups_name_info[0] }, /* atsOutputBankCurrent.%i = Gauge32: 88 */ { "outlet.group.%i.current", 0, 0.1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.4.%i", NULL, SU_OUTLET_GROUP, NULL }, /* atsOutputBankState.%i = INTEGER: normal(1) */ { "outlet.group.%i.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.5.%i", NULL, SU_OUTLET_GROUP, &ats_outletgroups_status_info[0] }, /* atsOutputBankOutputVoltage.%i = INTEGER: 215 */ { "outlet.group.%i.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.6.%i", NULL, SU_OUTLET_GROUP, NULL }, /* atsOutputBankPower.1 = INTEGER: 1883 */ { "outlet.group.%i.realpower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.15.%i", NULL, SU_FLAG_NEGINVALID | SU_OUTLET_GROUP, NULL }, #if 0 /* FIXME: Remaining data to be processed */ /* atsIdentDeviceRating.0 = INTEGER: 32 */ { "unmapped.atsIdentDeviceRating", 0, 1, ".1.3.6.1.4.1.318.1.1.8.1.9.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationNumInputs.0 = INTEGER: 2 */ { "unmapped.atsCalibrationNumInputs", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.1.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationNumInputPhases.0 = INTEGER: 1 */ { "unmapped.atsCalibrationNumInputPhases", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.2.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationInputTableIndex.1.1.1 = INTEGER: 1 */ { "unmapped.atsCalibrationInputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.1.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationInputTableIndex.2.1.1 = INTEGER: 2 */ { "unmapped.atsCalibrationInputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.1.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationInputPhaseTableIndex.1.1.1 = INTEGER: 1 */ { "unmapped.atsCalibrationInputPhaseTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationInputPhaseTableIndex.2.1.1 = INTEGER: 1 */ { "unmapped.atsCalibrationInputPhaseTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.2.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsLineVoltageCalibrationFactor.1.1.1 = INTEGER: 487 */ { "unmapped.atsLineVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.3.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsLineVoltageCalibrationFactor.2.1.1 = INTEGER: 488 */ { "unmapped.atsLineVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.1.3.1.3.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltages.0 = INTEGER: 5 */ { "unmapped.atsCalibrationPowerSupplyVoltages", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.1.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltageTableIndex.1 = INTEGER: 1 */ { "unmapped.atsCalibrationPowerSupplyVoltageTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltageTableIndex.2 = INTEGER: 2 */ { "unmapped.atsCalibrationPowerSupplyVoltageTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.1.2", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltageTableIndex.3 = INTEGER: 3 */ { "unmapped.atsCalibrationPowerSupplyVoltageTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.1.3", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltageTableIndex.4 = INTEGER: 4 */ { "unmapped.atsCalibrationPowerSupplyVoltageTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.1.4", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltageTableIndex.5 = INTEGER: 5 */ { "unmapped.atsCalibrationPowerSupplyVoltageTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.1.5", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltage.1 = INTEGER: powerSupply24V(1) */ { "unmapped.atsCalibrationPowerSupplyVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.2.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltage.2 = INTEGER: powerSupply12V(2) */ { "unmapped.atsCalibrationPowerSupplyVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.2.2", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltage.3 = INTEGER: powerSupply(3) */ { "unmapped.atsCalibrationPowerSupplyVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.2.3", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltage.4 = INTEGER: powerSupply24VSourceB(4) */ { "unmapped.atsCalibrationPowerSupplyVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.2.4", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationPowerSupplyVoltage.5 = INTEGER: powerSupplyMinus12V(5) */ { "unmapped.atsCalibrationPowerSupplyVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.2.5", NULL, SU_FLAG_OK, NULL }, /* atsPowerSupplyVoltageCalibrationFactor.1 = INTEGER: 521 */ { "unmapped.atsPowerSupplyVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.3.1", NULL, SU_FLAG_OK, NULL }, /* atsPowerSupplyVoltageCalibrationFactor.2 = INTEGER: 1076 */ { "unmapped.atsPowerSupplyVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.3.2", NULL, SU_FLAG_OK, NULL }, /* atsPowerSupplyVoltageCalibrationFactor.3 = INTEGER: 2560 */ { "unmapped.atsPowerSupplyVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.3.3", NULL, SU_FLAG_OK, NULL }, /* atsPowerSupplyVoltageCalibrationFactor.4 = INTEGER: 521 */ { "unmapped.atsPowerSupplyVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.3.4", NULL, SU_FLAG_OK, NULL }, /* atsPowerSupplyVoltageCalibrationFactor.5 = INTEGER: 975 */ { "unmapped.atsPowerSupplyVoltageCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.2.2.1.3.5", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationNumOutputs.0 = INTEGER: 1 */ { "unmapped.atsCalibrationNumOutputs", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.3.1.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationNumOutputPhases.0 = INTEGER: 1 */ { "unmapped.atsCalibrationNumOutputPhases", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.3.2.0", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationOutputTableIndex.1.phase1.1 = INTEGER: 1 */ { "unmapped.atsCalibrationOutputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.3.3.1.1.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsCalibrationOutputPhasesTableIndex.1.phase1.1 = INTEGER: phase1(1) */ { "unmapped.atsCalibrationOutputPhasesTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.3.3.1.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputCurrentCalibrationFactor.1.phase1.1 = INTEGER: 487 */ { "unmapped.atsOutputCurrentCalibrationFactor", 0, 1, ".1.3.6.1.4.1.318.1.1.8.2.3.3.1.3.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsControlResetATS.0 = INTEGER: none(1) */ { "unmapped.atsControlResetATS", 0, 1, ".1.3.6.1.4.1.318.1.1.8.3.1.0", NULL, SU_FLAG_OK, NULL }, /* atsControlClearAllAlarms.0 = INTEGER: -1 */ { "unmapped.atsControlClearAllAlarms", 0, 1, ".1.3.6.1.4.1.318.1.1.8.3.2.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigFrontPanelLockout.0 = INTEGER: enableFrontPanel(2) */ { "unmapped.atsConfigFrontPanelLockout", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.3.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigTransferVoltageRange.0 = INTEGER: medium(2) */ { "unmapped.atsConfigTransferVoltageRange", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.5.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigCurrentLimit.0 = INTEGER: 32 */ { "unmapped.atsConfigCurrentLimit", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.6.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigResetValues.0 = INTEGER: -1 */ { "unmapped.atsConfigResetValues", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.7.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigLineVRMS.0 = INTEGER: 230 */ { "unmapped.atsConfigLineVRMS", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.8.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigLineVRMSNarrowLimit.0 = INTEGER: 16 */ { "unmapped.atsConfigLineVRMSNarrowLimit", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.9.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigLineVRMSMediumLimit.0 = INTEGER: 23 */ { "unmapped.atsConfigLineVRMSMediumLimit", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.10.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigLineVRMSWideLimit.0 = INTEGER: 30 */ { "unmapped.atsConfigLineVRMSWideLimit", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.11.0", NULL, SU_FLAG_OK, NULL }, /* atsConfigFrequencyDeviation.0 = INTEGER: two(2) */ { "unmapped.atsConfigFrequencyDeviation", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.12.0", NULL, SU_FLAG_OK, NULL }, /* Outlet groups collection */ /* atsConfigBankLowLoadThreshold.1 = INTEGER: 0 */ { "unmapped.atsConfigBankLowLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.3.1", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankLowLoadThreshold.2 = INTEGER: 0 */ { "unmapped.atsConfigBankLowLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.3.2", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankLowLoadThreshold.3 = INTEGER: 0 */ { "unmapped.atsConfigBankLowLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.3.3", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankNearOverLoadThreshold.1 = INTEGER: 28 */ { "unmapped.atsConfigBankNearOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.4.1", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankNearOverLoadThreshold.2 = INTEGER: 12 */ { "unmapped.atsConfigBankNearOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.4.2", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankNearOverLoadThreshold.3 = INTEGER: 12 */ { "unmapped.atsConfigBankNearOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.4.3", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankOverLoadThreshold.1 = INTEGER: 32 */ { "unmapped.atsConfigBankOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.5.1", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankOverLoadThreshold.2 = INTEGER: 16 */ { "unmapped.atsConfigBankOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.5.2", NULL, SU_FLAG_OK, NULL }, /* atsConfigBankOverLoadThreshold.3 = INTEGER: 16 */ { "unmapped.atsConfigBankOverLoadThreshold", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.14.1.5.3", NULL, SU_FLAG_OK, NULL }, /* atsConfigPhaseTableSize.0 = INTEGER: 0 */ { "unmapped.atsConfigPhaseTableSize", 0, 1, ".1.3.6.1.4.1.318.1.1.8.4.15.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusCommStatus.0 = INTEGER: atsCommEstablished(2) */ { "unmapped.atsStatusCommStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.1.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusRedundancyState.0 = INTEGER: atsFullyRedundant(2) */ { "unmapped.atsStatusRedundancyState", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.3.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusOverCurrentState.0 = INTEGER: atsCurrentOK(2) */ { "unmapped.atsStatusOverCurrentState", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.4.0", NULL, SU_FLAG_OK, NULL }, /* atsStatus5VPowerSupply.0 = INTEGER: atsPowerSupplyOK(2) */ { "unmapped.atsStatus5VPowerSupply", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.5.0", NULL, SU_FLAG_OK, NULL }, /* atsStatus24VPowerSupply.0 = INTEGER: atsPowerSupplyOK(2) */ { "unmapped.atsStatus24VPowerSupply", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.6.0", NULL, SU_FLAG_OK, NULL }, /* atsStatus24VSourceBPowerSupply.0 = INTEGER: atsPowerSupplyOK(2) */ { "unmapped.atsStatus24VSourceBPowerSupply", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.7.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusPlus12VPowerSupply.0 = INTEGER: atsPowerSupplyOK(2) */ { "unmapped.atsStatusPlus12VPowerSupply", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.8.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusMinus12VPowerSupply.0 = INTEGER: atsPowerSupplyOK(2) */ { "unmapped.atsStatusMinus12VPowerSupply", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.9.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusSwitchStatus.0 = INTEGER: ok(2) */ { "unmapped.atsStatusSwitchStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.10.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusFrontPanel.0 = INTEGER: unlocked(2) */ { "unmapped.atsStatusFrontPanel", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.11.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusSourceAStatus.0 = INTEGER: ok(2) */ { "unmapped.atsStatusSourceAStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.12.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusSourceBStatus.0 = INTEGER: ok(2) */ { "unmapped.atsStatusSourceBStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.13.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusPhaseSyncStatus.0 = INTEGER: inSync(1) */ { "unmapped.atsStatusPhaseSyncStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.14.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusHardwareStatus.0 = INTEGER: ok(2) */ { "unmapped.atsStatusHardwareStatus", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.1.16.0", NULL, SU_FLAG_OK, NULL }, /* atsStatusResetMaxMinValues.0 = INTEGER: -1 */ { "unmapped.atsStatusResetMaxMinValues", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.2.1.0", NULL, SU_FLAG_OK, NULL }, /* atsInputTableIndex.1 = INTEGER: 1 */ { "unmapped.atsInputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputTableIndex.2 = INTEGER: 2 */ { "unmapped.atsInputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.1.2", NULL, SU_FLAG_OK, NULL }, /* atsNumInputPhases.1 = INTEGER: 1 */ { "unmapped.atsNumInputPhases", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.2.1", NULL, SU_FLAG_OK, NULL }, /* atsNumInputPhases.2 = INTEGER: 1 */ { "unmapped.atsNumInputPhases", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.2.2", NULL, SU_FLAG_OK, NULL }, /* atsInputVoltageOrientation.1 = INTEGER: singlePhase(2) */ { "unmapped.atsInputVoltageOrientation", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.3.1", NULL, SU_FLAG_OK, NULL }, /* atsInputVoltageOrientation.2 = INTEGER: singlePhase(2) */ { "unmapped.atsInputVoltageOrientation", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.3.2", NULL, SU_FLAG_OK, NULL }, /* atsInputType.1 = INTEGER: main(2) */ { "unmapped.atsInputType", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.5.1", NULL, SU_FLAG_OK, NULL }, /* atsInputType.2 = INTEGER: main(2) */ { "unmapped.atsInputType", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.5.2", NULL, SU_FLAG_OK, NULL }, /* atsInputName.1 = STRING: "Source A" */ { "unmapped.atsInputName", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.6.1", NULL, SU_FLAG_OK, NULL }, /* atsInputName.2 = STRING: "Source B" */ { "unmapped.atsInputName", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.8.5.3.2.1.6.2", NULL, SU_FLAG_OK, NULL }, /* atsInputPhaseTableIndex.1.1.1 = INTEGER: 1 */ { "unmapped.atsInputPhaseTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.1.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputPhaseTableIndex.2.1.1 = INTEGER: 2 */ { "unmapped.atsInputPhaseTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.1.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputPhaseIndex.1.1.1 = INTEGER: 1 */ { "unmapped.atsInputPhaseIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputPhaseIndex.2.1.1 = INTEGER: 1 */ { "unmapped.atsInputPhaseIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.2.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxVoltage.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.4.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxVoltage.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.4.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinVoltage.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.5.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinVoltage.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinVoltage", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.5.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputCurrent.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.6.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputCurrent.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.6.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxCurrent.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.7.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxCurrent.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.7.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinCurrent.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.8.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinCurrent.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.8.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputPower.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.9.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputPower.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.9.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxPower.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.10.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMaxPower.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMaxPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.10.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinPower.1.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.11.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsInputMinPower.2.1.1 = INTEGER: -1 */ { "unmapped.atsInputMinPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.3.3.1.11.2.1.1", NULL, SU_FLAG_OK, NULL }, /* atsNumOutputs.0 = INTEGER: 1 */ { "unmapped.atsNumOutputs", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.1.0", NULL, SU_FLAG_OK, NULL }, /* atsOutputTableIndex.1 = INTEGER: 1 */ { "unmapped.atsOutputTableIndex", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.2.1.1.1", NULL, SU_FLAG_OK, NULL }, /* atsNumOutputPhases.1 = INTEGER: 1 */ { "unmapped.atsNumOutputPhases", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.2.1.2.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputVoltageOrientation.1 = INTEGER: singlePhase(2) */ { "unmapped.atsOutputVoltageOrientation", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.2.1.3.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputPhase.1 = INTEGER: phase1(1) */ { "unmapped.atsOutputPhase", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.2.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputPhase.2 = INTEGER: phase1(1) */ { "unmapped.atsOutputPhase", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.2.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputPhase.3 = INTEGER: phase1(1) */ { "unmapped.atsOutputPhase", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.2.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxCurrent.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.7.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxCurrent.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.7.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxCurrent.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.7.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinCurrent.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMinCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.8.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinCurrent.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMinCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.8.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinCurrent.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMinCurrent", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.8.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankLoad.1 = INTEGER: 1883 */ { "unmapped.atsOutputBankLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.9.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankLoad.2 = INTEGER: 984 */ { "unmapped.atsOutputBankLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.9.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankLoad.3 = INTEGER: 898 */ { "unmapped.atsOutputBankLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.9.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxLoad.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.10.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxLoad.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.10.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxLoad.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.10.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinLoad.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMinLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.11.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinLoad.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMinLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.11.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinLoad.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMinLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.11.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentLoad.1 = INTEGER: 25 */ { "unmapped.atsOutputBankPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.12.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentLoad.2 = INTEGER: 13 */ { "unmapped.atsOutputBankPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.12.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentLoad.3 = INTEGER: 12 */ { "unmapped.atsOutputBankPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.12.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentLoad.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.13.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentLoad.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.13.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentLoad.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.13.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentLoad.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.14.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentLoad.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.14.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentLoad.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentLoad", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.14.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPower.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.16.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPower.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.16.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPower.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.16.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPower.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.17.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPower.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.17.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPower.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.17.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentPower.1 = INTEGER: 25 */ { "unmapped.atsOutputBankPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.18.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentPower.2 = INTEGER: 13 */ { "unmapped.atsOutputBankPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.18.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankPercentPower.3 = INTEGER: 12 */ { "unmapped.atsOutputBankPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.18.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentPower.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.19.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentPower.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.19.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMaxPercentPower.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMaxPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.19.3", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentPower.1 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.20.1", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentPower.2 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.20.2", NULL, SU_FLAG_OK, NULL }, /* atsOutputBankMinPercentPower.3 = INTEGER: -1 */ { "unmapped.atsOutputBankMinPercentPower", 0, 1, ".1.3.6.1.4.1.318.1.1.8.5.4.5.1.20.3", NULL, SU_FLAG_OK, NULL }, #endif /* 0 */ /* end of structure. */ { NULL, 0, 0, NULL, NULL, 0, NULL } }; mib2nut_info_t apc_ats = { "apc_ats", APC_ATS_MIB_VERSION, NULL, ".1.3.6.1.4.1.318.1.1.8.1.5.0", apc_ats_mib, APC_ATS_SYSOID };
{ "pile_set_name": "Github" }
--- id: version-11.6.0-database title: Supported databases original_id: database --- Botpress comes with support for SQL databases out-the-box and can be accessed by: 1. The key-value store - This can be accessed via functions like `bp.kvs.get('key')` and `bp.kvs.set('key', 'value', 'path')` 2. A knex-instance - This allows you to work with the DB directly via `bp.db.get()` ## Introduction By default Botpress uses SQLite as its database. This will be fine for local development and for self-hosted installations, but you may run into issues when hosting using services like Heroku (which have an ephemeral storage, which means that your SQLite database will be erased at random intervals). To address these kind of issues and make your bot production-ready, we also support Postgres out of the box. ## How to switch from SQLite to Postgres The database configuration is considered as Infrastructure, which means that it needs to be setup before the softare is executed. In this case, that means that you need to configure some of your Botpress configurations using environment variables. Here are the two variables you need to change: - `DATABASE=postgres` - `DATABASE_URL=postgres://login:[email protected]:5432/your-db-name`. Please make sure you are using Postgres 9.5 or higher. If you don't want to type those variables each time you start Botpress, we also supports `.env` files. Check out our [configuration section](../../manage/configuration) for more information about that
{ "pile_set_name": "Github" }
6dc8be44882bee594803df6f5ec5b238c740e48990bcbb3a9120f7a668edd92feb29be86102427978adaf3e76873942f23db36957b719354bd12f5bc653d0397
{ "pile_set_name": "Github" }
/* * Copyright (C) 2020 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 com.android.systemui.controls.ui import android.content.ComponentName import android.service.controls.Control import android.service.controls.actions.ControlAction import android.view.ViewGroup interface ControlsUiController { val available: Boolean companion object { public const val TAG = "ControlsUiController" public const val EXTRA_ANIMATE = "extra_animate" } fun show(parent: ViewGroup, dismissGlobalActions: Runnable) fun hide() /** * Request all open dialogs be closed. Set [immediately] to true to dismiss without * animations. */ fun closeDialogs(immediately: Boolean) fun onRefreshState(componentName: ComponentName, controls: List<Control>) fun onActionResponse( componentName: ComponentName, controlId: String, @ControlAction.ResponseResult response: Int ) }
{ "pile_set_name": "Github" }
// // New Relic for Mobile -- iOS edition // // See: // https://docs.newrelic.com/docs/mobile-apps for information // https://docs.newrelic.com/docs/releases/ios for release notes // // Copyright (c) 2014 New Relic. All rights reserved. // See https://docs.newrelic.com/docs/licenses/ios-agent-licenses for license details // /******************************************************************************* * When using NSURLSession with a delegate, the delegate property of NSURLSession * will return an NRURLSessionTaskDelegateBase. To access the original delegate * use the realDelegate property on the NRURLSessionTaskDelegateBase. * Apologies for the inconvenience. *******************************************************************************/ @interface NRURLSessionTaskDelegateBase : NSObject <NSURLSessionTaskDelegate,NSURLSessionDataDelegate> @property (nonatomic, retain, readonly) id<NSURLSessionDataDelegate> realDelegate; @end
{ "pile_set_name": "Github" }
//// This PROCEDURE module included in the following assemblies: - rhbjaeger-deploying.adoc //// [id="jaeger-deploy-production_{context}"] = Deploying the Jaeger production strategy from the web console The `production` deployment strategy is intended for production environments, where long term storage of trace data is important, as well as a more scalable and highly available architecture is required. .Prerequisites * The Elasticsearch Operator must be installed. * The Jaeger Operator must be installed. * Review the instructions for how to customize the Jaeger installation. * An account with the `cluster-admin` role. .Procedure . Log in to the {product-title} web console as a user with the `cluster-admin` role. . Create a new project, for example `jaeger-system`. .. Navigate to *Home* -> *Projects*. .. Click *Create Project*. .. Enter `jaeger-system` in the *Name* field. .. Click *Create*. . Navigate to *Operators* -> *Installed Operators*. . If necessary, select `jaeger-system` from the Project menu. You may have to wait a few moments for the Operators to be copied to the new project. . Click the Jaeger Operator. On the *Overview* tab, under *Provided APIs*, the Operator provides a single link. . Under *Jaeger* click *Create Instance*. . On the *Create Jaeger* page, replace the default `all-in-one` yaml text with your production YAML configuration, for example: + .Example jaeger-production.yaml file with Elasticsearch [source,yaml] ---- apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-production namespace: spec: strategy: production ingress: security: oauth-proxy storage: type: elasticsearch elasticsearch: nodeCount: 3 redundancyPolicy: SingleRedundancy esIndexCleaner: enabled: true numberOfDays: 7 schedule: 55 23 * * * esRollover: schedule: '*/30 * * * *' ---- + . Click *Create* to create the Jaeger instance. . On the *Jaegers* page, click the name of the Jaeger instance, for example, `jaeger-prod-elasticsearch`. . On the *Jaeger Details* page, click the *Resources* tab. Wait until all the pods have a status of "Running" before continuing. [id="jaeger-deploy-production-cli_{context}"] == Deploying Jaeger production from the CLI Follow this procedure to create an instance of Jaeger from the command line. .Prerequisites * An installed, verified {ProductName} Operator. * Access to the OpenShift CLI (`oc`). * An account with the `cluster-admin` role. .Procedure . Log in to the {product-title} CLI as a user with the `cluster-admin` role. + [source,terminal] ---- $ oc login https://{HOSTNAME}:8443 ---- . Create a new project named `jaeger-system`. + [source,terminal] ---- $ oc new-project jaeger-system ---- . Create a custom resource file named `jaeger-production.yaml` that contains the text of the example file in the previous procedure. . Run the following command to deploy Jaeger: + [source,terminal] ---- $ oc create -n jaeger-system -f jaeger-production.yaml ---- + . Run the following command to watch the progress of the Pods during the installation process: + [source,terminal] ---- $ oc get pods -n jaeger-system -w ---- + Once the installation process has completed, you should see output similar to the following: + [source,terminal] ---- NAME READY STATUS RESTARTS AGE elasticsearch-cdm-jaegersystemjaegerproduction-1-6676cf568gwhlw 2/2 Running 0 10m elasticsearch-cdm-jaegersystemjaegerproduction-2-bcd4c8bf5l6g6w 2/2 Running 0 10m elasticsearch-cdm-jaegersystemjaegerproduction-3-844d6d9694hhst 2/2 Running 0 10m jaeger-production-collector-94cd847d-jwjlj 1/1 Running 3 8m32s jaeger-production-query-5cbfbd499d-tv8zf 3/3 Running 3 8m32s ----
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- u"""PatchLogger for SecureTea Auto Server Patcher. Project: โ•”โ•โ•—โ”Œโ”€โ”โ”Œโ”€โ”โ”ฌ โ”ฌโ”ฌโ”€โ”โ”Œโ”€โ”โ•”โ•ฆโ•—โ”Œโ”€โ”โ”Œโ”€โ” โ•šโ•โ•—โ”œโ”ค โ”‚ โ”‚ โ”‚โ”œโ”ฌโ”˜โ”œโ”ค โ•‘ โ”œโ”ค โ”œโ”€โ”ค โ•šโ•โ•โ””โ”€โ”˜โ””โ”€โ”˜โ””โ”€โ”˜โ”ดโ””โ”€โ””โ”€โ”˜ โ•ฉ โ””โ”€โ”˜โ”ด โ”ด Author: Abhishek Sharma <[email protected]> , Jun 20 2019 Version: 1.4 Module: SecureTea """ from securetea import logger import time class PatchLogger(logger.SecureTeaLogger): """PatchLogger Class.""" def __init__(self, modulename, debug=False): """ Initialize PatchLogger. Args: modulename (str): Name of the module debug (bool): Log on terminal or not Raises: None Returns: None """ self._PATH = "/etc/securetea/auto_patch.log" # Call the parent class logger.SecureTeaLogger.__init__(self, modulename, debug) def write_data(self, data): """ Write data to the log file. Args: data (str): Data to write Raises: None Returns: None """ with open(self._PATH, "a") as f: LEGEND = '[' + self.modulename + ']' + ' [' + \ str(time.strftime("%Y-%m-%d %H:%M")) + '] ' message = LEGEND + data + "\n" f.write(message) def printinfo(self, message): """ Over-ride the parent class printinfo method. Args: message (str): Message to log Raises: None Returns: None """ # Call the parent method super().printinfo(message) self.write_data(message) def printerror(self, message): """ Over-ride the parent class printerror method. Args: message (str): Message to log Raises: None Returns: None """ # Call the parent method super().printerror(message) self.write_data(message) def printwarning(self, message): """ Over-ride the parent class printwarning method. Args: message (str): Message to log Raises: None Returns: None """ # Call the parent method super().printwarning(message) self.write_data(message)
{ "pile_set_name": "Github" }