text
stringlengths
2
99.9k
meta
dict
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; using System.Globalization; using System.Net.Http; using System.Web.Http.Controllers; namespace System.Web.Http.Routing { // This is static description of an action and can be shared across requests. // Direct routes may cache a list of these. [DebuggerDisplay("{DebuggerToString()}")] internal class CandidateAction { public HttpActionDescriptor ActionDescriptor { get; set; } public int Order { get; set; } public decimal Precedence { get; set; } public bool MatchName(string actionName) { return String.Equals(ActionDescriptor.ActionName, actionName, StringComparison.OrdinalIgnoreCase); } public bool MatchVerb(HttpMethod method) { return ActionDescriptor.SupportedHttpMethods.Contains(method); } internal string DebuggerToString() { return String.Format(CultureInfo.CurrentCulture, "{0}, Order={1}, Prec={2}", ActionDescriptor.ActionName, Order, Precedence); } } }
{ "pile_set_name": "Github" }
///////////// Copyright © 2008, Killer Monkey. All rights reserved. ///////////// // // File: weapon_moonraker.cpp // Description: // Implementation of the Moonraker Laser // // Created On: 12/5/09 // Created By: Killer Monkey ///////////////////////////////////////////////////////////////////////////// #include "cbase.h" #include "npcevent.h" #include "in_buttons.h" #ifdef CLIENT_DLL #include "r_efx.h" #include "ivrenderview.h" #include "dlight.h" #include "c_ge_player.h" #else #include "ge_player.h" #endif #include "ge_weaponpistol.h" #ifdef CLIENT_DLL #define CWeaponMoonraker C_WeaponMoonraker #endif //----------------------------------------------------------------------------- // CWeaponMoonraker //----------------------------------------------------------------------------- class CWeaponMoonraker : public CGEWeaponPistol { public: DECLARE_CLASS( CWeaponMoonraker, CGEWeaponPistol ); CWeaponMoonraker(void); DECLARE_NETWORKCLASS(); DECLARE_PREDICTABLE(); virtual void Precache( void ); virtual void Equip( CBaseCombatCharacter *pOwner ); virtual void MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int iTracerType ); #ifdef CLIENT_DLL virtual void ProcessMuzzleFlashEvent(); #else virtual int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; } // NPC Functions virtual void FireNPCPrimaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ); #endif virtual void PrimaryAttack( void ); virtual GEWeaponID GetWeaponID( void ) const { return WEAPON_MOONRAKER; } DECLARE_ACTTABLE(); private: CWeaponMoonraker( const CWeaponMoonraker& ); }; IMPLEMENT_NETWORKCLASS_ALIASED( WeaponMoonraker, DT_WeaponMoonraker ) BEGIN_NETWORK_TABLE( CWeaponMoonraker, DT_WeaponMoonraker ) #ifdef CLIENT_DLL RecvPropInt( RECVINFO( m_nMuzzleFlashParity )), #else SendPropInt( SENDINFO( m_nMuzzleFlashParity ), EF_MUZZLEFLASH_BITS, SPROP_UNSIGNED ), #endif END_NETWORK_TABLE() #ifdef CLIENT_DLL BEGIN_PREDICTION_DATA( CWeaponMoonraker ) END_PREDICTION_DATA() #endif LINK_ENTITY_TO_CLASS( weapon_moonraker, CWeaponMoonraker ); PRECACHE_WEAPON_REGISTER( weapon_moonraker ); acttable_t CWeaponMoonraker::m_acttable[] = { { ACT_MP_STAND_IDLE, ACT_GES_IDLE_PISTOL, false }, { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_PISTOL, false }, { ACT_MP_RUN, ACT_GES_RUN_PISTOL, false }, { ACT_MP_WALK, ACT_GES_WALK_PISTOL, false }, { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_PISTOL, false }, { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_GES_GESTURE_RANGE_ATTACK_PISTOL, false }, { ACT_GES_ATTACK_RUN_PRIMARYFIRE, ACT_GES_GESTURE_RANGE_ATTACK_PISTOL, false }, { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_GES_GESTURE_RANGE_ATTACK_PISTOL, false }, { ACT_GES_DRAW, ACT_GES_GESTURE_DRAW_PISTOL, false }, { ACT_GES_DRAW_RUN, ACT_GES_GESTURE_DRAW_PISTOL_RUN, false }, { ACT_MP_RELOAD_STAND, ACT_GES_GESTURE_RELOAD_PISTOL, false }, { ACT_MP_RELOAD_CROUCH, ACT_GES_GESTURE_RELOAD_PISTOL, false }, { ACT_MP_JUMP, ACT_GES_JUMP_PISTOL, false }, { ACT_GES_CJUMP, ACT_GES_CJUMP_PISTOL, false }, }; IMPLEMENT_ACTTABLE( CWeaponMoonraker ); //----------------------------------------------------------------------------- // Purpose: Constructor //----------------------------------------------------------------------------- CWeaponMoonraker::CWeaponMoonraker( void ) { } void CWeaponMoonraker::Precache( void ) { PrecacheModel("models/weapons/moonraker/v_moonraker.mdl"); PrecacheModel("models/weapons/moonraker/w_moonraker.mdl"); PrecacheMaterial("sprites/hud/weaponicons/moonraker"); PrecacheMaterial("sprites/hud/ammoicons/ammo_moonraker"); PrecacheScriptSound("Weapon_moonraker.Single"); PrecacheScriptSound("Weapon_moonraker.NPC_Single"); BaseClass::Precache(); PrecacheParticleSystem( "tracer_laser" ); } void CWeaponMoonraker::Equip( CBaseCombatCharacter *pOwner ) { BaseClass::Equip( pOwner ); GetOwner()->SetAmmoCount( AMMO_MOONRAKER_MAX, m_iPrimaryAmmoType ); } void CWeaponMoonraker::MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int iTracerType ) { CBaseEntity *pOwner = GetOwner(); if ( pOwner == NULL ) { BaseClass::MakeTracer( vecTracerSrc, tr, iTracerType ); return; } Vector vNewSrc = vecTracerSrc; int iEntIndex = pOwner->entindex(); if ( g_pGameRules->IsMultiplayer() ) { iEntIndex = entindex(); } int iAttachment = GetTracerAttachment(); UTIL_ParticleTracer( "tracer_laser", vNewSrc, tr.endpos, iEntIndex, iAttachment, false ); } #ifdef CLIENT_DLL extern ConVar muzzleflash_light; extern void FormatViewModelAttachment( Vector &vOrigin, bool bInverse ); void CWeaponMoonraker::ProcessMuzzleFlashEvent() { // If we have an attachment, then stick a light on it. if ( muzzleflash_light.GetBool() ) { Vector vAttachment; QAngle dummyAngles; if ( !GetAttachment( "muzzle", vAttachment, dummyAngles ) ) vAttachment = GetAbsOrigin(); // Format the position for first person view if ( GetOwner() == CBasePlayer::GetLocalPlayer() ) ::FormatViewModelAttachment( vAttachment, true ); // Make an elight (entities) dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + index ); el->origin = vAttachment; el->radius = random->RandomInt( 64, 80 ); el->decay = el->radius / 0.05f; el->die = gpGlobals->curtime + 0.05f; el->color.r = 83; el->color.g = 169; el->color.b = 255; el->color.exponent = 5; // Make a dlight (world) dlight_t *dl = effects->CL_AllocDlight( LIGHT_INDEX_MUZZLEFLASH + index ); dl->origin = vAttachment; dl->radius = random->RandomInt( 64, 80 ); dl->decay = el->radius / 0.05f; dl->flags |= DLIGHT_NO_MODEL_ILLUMINATION; dl->die = gpGlobals->curtime + 0.05f; dl->color.r = 83; dl->color.g = 169; dl->color.b = 255; dl->color.exponent = 5; } } #endif void CWeaponMoonraker::PrimaryAttack( void ) { BaseClass::PrimaryAttack(); GetOwner()->SetAmmoCount( AMMO_MOONRAKER_MAX, m_iPrimaryAmmoType ); } #ifdef GAME_DLL void CWeaponMoonraker::FireNPCPrimaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ) { BaseClass::FireNPCPrimaryAttack( pOperator, bUseWeaponAngles ); GetOwner()->SetAmmoCount( AMMO_MOONRAKER_MAX, m_iPrimaryAmmoType ); } #endif
{ "pile_set_name": "Github" }
94e2c25a08522071ca4d2314ddb2a4a1 *tests/data/fate/vsynth_lena-ffvhuff444p16.avi 26360720 tests/data/fate/vsynth_lena-ffvhuff444p16.avi 05ccd9a38f9726030b3099c0c99d3a13 *tests/data/fate/vsynth_lena-ffvhuff444p16.out.rawvideo stddev: 0.45 PSNR: 55.06 MAXDIFF: 7 bytes: 7603200/ 7603200
{ "pile_set_name": "Github" }
/* * Copyright 2016-present Open Networking Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.onosproject.ui; /** * Defines constants for standard glyph identifiers. * <p> * See also: * <ul> * <li> * https://wiki.onosproject.org/display/ONOS/UI+Service+-+GlyphService * </li> * </ul> */ public final class GlyphConstants { public static final String BIRD = "bird"; public static final String UNKNOWN = "m_unknown"; public static final String QUERY = "query"; public static final String NODE = "node"; public static final String SWITCH = "m_switch"; public static final String ROUTER = "router"; public static final String ROADM = "m_roadm"; public static final String OTN = "otn"; public static final String ROADM_OTN = "roadm_otn"; public static final String FIBER_SWITCH = "fiber_switch"; public static final String MICROWAVE = "microwave"; public static final String ENDSTATION = "m_endstation"; public static final String BGP_SPEAKER = "bgpSpeaker"; public static final String CHAIN = "chain"; public static final String CROWN = "crown"; public static final String LOCK = "lock"; public static final String TOPO = "topo"; public static final String REFRESH = "refresh"; public static final String GARBAGE = "garbage"; public static final String FLOW_TABLE = "flowTable"; public static final String PORT_TABLE = "portTable"; public static final String GROUP_TABLE = "groupTable"; public static final String METER_TABLE = "meterTable"; public static final String PIPECONF_TABLE = "pipeconfTable"; public static final String SUMMARY = "m_summary"; public static final String DETAILS = "m_details"; public static final String PORTS = "m_ports"; public static final String MAP = "m_map"; public static final String CYCLE_LABELS = "m_cycleLabels"; public static final String OBLIQUE = "m_oblique"; public static final String FILTERS = "m_filters"; public static final String RESET_ZOOM = "m_resetZoom"; public static final String RELATED_INTENTS = "m_relatedIntents"; public static final String NEXT = "m_next"; public static final String PREV = "m_prev"; public static final String INTENT_TRAFFIC = "m_intentTraffic"; public static final String ALL_TRAFFIC = "m_allTraffic"; public static final String FLOWS = "m_flows"; public static final String EQ_MASTER = "m_eqMaster"; public static final String UI_ATTACHED = "m_uiAttached"; public static final String CHECK_MARK = "checkMark"; public static final String X_MARK = "m_xMark"; public static final String TRIANGLE_UP = "triangleUp"; public static final String TRIANGLE_DOWN = "triangleDown"; public static final String PLUS = "plus"; public static final String MINUS = "minus"; public static final String PLAY = "play"; public static final String STOP = "stop"; public static final String CLOUD = "m_cloud"; public static final String ID = "id"; public static final String VIEWBOX = "viewbox"; public static final String PATH = "path"; // non-instantiable private GlyphConstants() { } }
{ "pile_set_name": "Github" }
// // IRPropertyAccess.swift // IRGen // // Created by Hails, Daniel R on 29/08/2018. // import AST import YUL /// Generates code for a property access. struct IRPropertyAccess { var lhs: AST.Expression var rhs: AST.Expression var asLValue: Bool func rendered(functionContext: FunctionContext) -> YUL.Expression { let environment = functionContext.environment let scopeContext = functionContext.scopeContext let enclosingTypeName = functionContext.enclosingTypeName let isInStructFunction = functionContext.isInStructFunction var isMemoryAccess: Bool = false let lhsType = environment.type(of: lhs, enclosingType: enclosingTypeName, scopeContext: scopeContext) if case .identifier(let enumIdentifier) = lhs, case .identifier(let propertyIdentifier) = rhs, environment.isEnumDeclared(enumIdentifier.name), let propertyInformation = environment.property(propertyIdentifier.name, enumIdentifier.name) { return IRExpression(expression: propertyInformation.property.value!).rendered(functionContext: functionContext) } let rhsOffset: YUL.Expression // Special cases. switch lhsType { case .fixedSizeArrayType(_, let size): if case .identifier(let identifier) = rhs, identifier.name == "size" { return .literal(.num(size)) } else { fatalError() } case .arrayType: if case .identifier(let identifier) = rhs, identifier.name == "size" { rhsOffset = .literal(.num(0)) } else { fatalError() } case .dictionaryType: if case .identifier(let identifier) = rhs, identifier.name == "size" { rhsOffset = .literal(.num(0)) } else { fatalError() } default: rhsOffset = IRPropertyOffset(expression: rhs, enclosingType: lhsType).rendered(functionContext: functionContext) } let offset: YUL.Expression if isInStructFunction { let enclosingName: String if let enclosingParameter = functionContext.scopeContext.enclosingParameter(expression: lhs, enclosingTypeName: functionContext.enclosingTypeName) { enclosingName = enclosingParameter } else { enclosingName = "flintSelf" } // For struct parameters, access the property by an offset to _flintSelf (the receiver's address). offset = IRRuntimeFunction.addOffset(base: .identifier(enclosingName.mangled), offset: rhsOffset, inMemory: Mangler.isMem(for: enclosingName).mangled) } else { let lhsOffset: YUL.Expression if case .identifier(let lhsIdentifier) = lhs { if let enclosingType = lhsIdentifier.enclosingType, let offset = environment.propertyOffset(for: lhsIdentifier.name, enclosingType: enclosingType) { lhsOffset = .literal(.num(offset)) } else if functionContext.scopeContext.containsVariableDeclaration(for: lhsIdentifier.name) { lhsOffset = .identifier(lhsIdentifier.name.mangled) isMemoryAccess = true } else { lhsOffset = .literal(.num(environment.propertyOffset(for: lhsIdentifier.name, enclosingType: enclosingTypeName)!)) } } else { lhsOffset = IRExpression(expression: lhs, asLValue: true).rendered(functionContext: functionContext) } offset = IRRuntimeFunction.addOffset(base: lhsOffset, offset: rhsOffset, inMemory: isMemoryAccess) } if asLValue { return offset } if isInStructFunction, !isMemoryAccess { let lhsEnclosingIdentifier = lhs.enclosingIdentifier?.name.mangled ?? "flintSelf".mangled return IRRuntimeFunction.load(address: offset, inMemory: Mangler.isMem(for: lhsEnclosingIdentifier)) } return IRRuntimeFunction.load(address: offset, inMemory: isMemoryAccess) } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2003, 2008, 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 java.lang.management; /** * The management interface for the class loading system of * the Java virtual machine. * * <p> A Java virtual machine has a single instance of the implementation * class of this interface. This instance implementing this interface is * an <a href="ManagementFactory.html#MXBean">MXBean</a> * that can be obtained by calling * the {@link ManagementFactory#getClassLoadingMXBean} method or * from the {@link ManagementFactory#getPlatformMBeanServer * platform <tt>MBeanServer</tt>}. * * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for * the class loading system within an <tt>MBeanServer</tt> is: * <blockquote> * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME * <tt>java.lang:type=ClassLoading</tt>} * </blockquote> * * It can be obtained by calling the * {@link PlatformManagedObject#getObjectName} method. * * @see ManagementFactory#getPlatformMXBeans(Class) * @see <a href="../../../javax/management/package-summary.html"> * JMX Specification.</a> * @see <a href="package-summary.html#examples"> * Ways to Access MXBeans</a> * * @author Mandy Chung * @since 1.5 */ public interface ClassLoadingMXBean extends PlatformManagedObject { /** * Returns the total number of classes that have been loaded since * the Java virtual machine has started execution. * * @return the total number of classes loaded. * */ public long getTotalLoadedClassCount(); /** * Returns the number of classes that are currently loaded in the * Java virtual machine. * * @return the number of currently loaded classes. */ public int getLoadedClassCount(); /** * Returns the total number of classes unloaded since the Java virtual machine * has started execution. * * @return the total number of unloaded classes. */ public long getUnloadedClassCount(); /** * Tests if the verbose output for the class loading system is enabled. * * @return <tt>true</tt> if the verbose output for the class loading * system is enabled; <tt>false</tt> otherwise. */ public boolean isVerbose(); /** * Enables or disables the verbose output for the class loading * system. The verbose output information and the output stream * to which the verbose information is emitted are implementation * dependent. Typically, a Java virtual machine implementation * prints a message each time a class file is loaded. * * <p>This method can be called by multiple threads concurrently. * Each invocation of this method enables or disables the verbose * output globally. * * @param value <tt>true</tt> to enable the verbose output; * <tt>false</tt> to disable. * * @exception java.lang.SecurityException if a security manager * exists and the caller does not have * ManagementPermission("control"). */ public void setVerbose(boolean value); }
{ "pile_set_name": "Github" }
/* Copyright © 2012 Clint Bellanger This file is part of FLARE. FLARE 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. FLARE 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 FLARE. If not, see http://www.gnu.org/licenses/ */ /** * class EnemyBehavior * * Interface for enemy behaviors. * The behavior object is a component of Enemy. * Make AI decisions (movement, actions) for enemies. */ #ifndef ENEMY_BEHAVIOR_H #define ENEMY_BEHAVIOR_H class Enemy; class EnemyBehavior { protected: Enemy *e; public: explicit EnemyBehavior(Enemy *_e); virtual ~EnemyBehavior(); virtual void logic(); }; #endif
{ "pile_set_name": "Github" }
package mapper type Schema struct { ID string `json:"id,omitempty"` CodeName string `json:"-"` CodeNamePlural string `json:"-"` PkgName string `json:"-"` Type string `json:"type,omitempty"` Links map[string]string `json:"links"` PluralName string `json:"pluralName,omitempty"` ResourceFields map[string]Field `json:"resourceFields"` NonNamespaced bool `json:"-"` Object bool `json:"-"` InternalSchema *Schema `json:"-"` Mapper Mapper `json:"-"` } type Field struct { Type string `json:"type,omitempty"` Default interface{} `json:"default,omitempty"` Nullable bool `json:"nullable,omitempty"` Create bool `json:"create"` WriteOnly bool `json:"writeOnly,omitempty"` Required bool `json:"required,omitempty"` Update bool `json:"update"` MinLength *int64 `json:"minLength,omitempty"` MaxLength *int64 `json:"maxLength,omitempty"` Min *int64 `json:"min,omitempty"` Max *int64 `json:"max,omitempty"` Options []string `json:"options,omitempty"` ValidChars string `json:"validChars,omitempty"` InvalidChars string `json:"invalidChars,omitempty"` Description string `json:"description,omitempty"` CodeName string `json:"-"` DynamicField bool `json:"dynamicField,omitempty"` }
{ "pile_set_name": "Github" }
// Alphabetical order. export { IsPasteEnabled } from './is-paste-enabled';
{ "pile_set_name": "Github" }
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or (at your option) the GNU General ** Public license version 3 or any later version approved by the KDE Free ** Qt Foundation. The licenses are as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-2.0.html and ** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QABSTRACTANIMATION_P_H #define QABSTRACTANIMATION_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. // This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include <QtCore/qbasictimer.h> #include <QtCore/qdatetime.h> #include <QtCore/qtimer.h> #include <QtCore/qelapsedtimer.h> #include <private/qobject_p.h> #include <qabstractanimation.h> QT_REQUIRE_CONFIG(animation); QT_BEGIN_NAMESPACE class QAnimationGroup; class QAbstractAnimation; class QAbstractAnimationPrivate : public QObjectPrivate { public: QAbstractAnimationPrivate() : state(QAbstractAnimation::Stopped), direction(QAbstractAnimation::Forward), totalCurrentTime(0), currentTime(0), loopCount(1), currentLoop(0), deleteWhenStopped(false), hasRegisteredTimer(false), isPause(false), isGroup(false), group(0) { } virtual ~QAbstractAnimationPrivate() {} static QAbstractAnimationPrivate *get(QAbstractAnimation *q) { return q->d_func(); } QAbstractAnimation::State state; QAbstractAnimation::Direction direction; void setState(QAbstractAnimation::State state); int totalCurrentTime; int currentTime; int loopCount; int currentLoop; bool deleteWhenStopped; bool hasRegisteredTimer; bool isPause; bool isGroup; QAnimationGroup *group; private: Q_DECLARE_PUBLIC(QAbstractAnimation) }; class QUnifiedTimer; class QDefaultAnimationDriver : public QAnimationDriver { Q_OBJECT public: QDefaultAnimationDriver(QUnifiedTimer *timer); void timerEvent(QTimerEvent *e) override; private Q_SLOTS: void startTimer(); void stopTimer(); private: QBasicTimer m_timer; QUnifiedTimer *m_unified_timer; }; class Q_CORE_EXPORT QAnimationDriverPrivate : public QObjectPrivate { public: QAnimationDriverPrivate() : running(false) {} QElapsedTimer timer; bool running; }; class Q_CORE_EXPORT QAbstractAnimationTimer : public QObject { Q_OBJECT public: QAbstractAnimationTimer() : isRegistered(false), isPaused(false), pauseDuration(0) {} virtual void updateAnimationsTime(qint64 delta) = 0; virtual void restartAnimationTimer() = 0; virtual int runningAnimationCount() = 0; bool isRegistered; bool isPaused; int pauseDuration; }; class Q_CORE_EXPORT QUnifiedTimer : public QObject { Q_OBJECT private: QUnifiedTimer(); public: static QUnifiedTimer *instance(); static QUnifiedTimer *instance(bool create); static void startAnimationTimer(QAbstractAnimationTimer *timer); static void stopAnimationTimer(QAbstractAnimationTimer *timer); static void pauseAnimationTimer(QAbstractAnimationTimer *timer, int duration); static void resumeAnimationTimer(QAbstractAnimationTimer *timer); //defines the timing interval. Default is DEFAULT_TIMER_INTERVAL void setTimingInterval(int interval); /* this allows to have a consistent timer interval at each tick from the timer not taking the real time that passed into account. */ void setConsistentTiming(bool consistent) { consistentTiming = consistent; } //these facilitate fine-tuning of complex animations void setSlowModeEnabled(bool enabled) { slowMode = enabled; } void setSlowdownFactor(qreal factor) { slowdownFactor = factor; } void installAnimationDriver(QAnimationDriver *driver); void uninstallAnimationDriver(QAnimationDriver *driver); bool canUninstallAnimationDriver(QAnimationDriver *driver); void restart(); void maybeUpdateAnimationsToCurrentTime(); void updateAnimationTimers(qint64 currentTick); //useful for profiling/debugging int runningAnimationCount(); void registerProfilerCallback(void (*cb)(qint64)); void startAnimationDriver(); void stopAnimationDriver(); qint64 elapsed() const; protected: void timerEvent(QTimerEvent *) override; private Q_SLOTS: void startTimers(); void stopTimer(); private: friend class QDefaultAnimationDriver; friend class QAnimationDriver; QAnimationDriver *driver; QDefaultAnimationDriver defaultDriver; QBasicTimer pauseTimer; QElapsedTimer time; qint64 lastTick; int timingInterval; int currentAnimationIdx; bool insideTick; bool insideRestart; bool consistentTiming; bool slowMode; bool startTimersPending; bool stopTimerPending; // This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick // when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16) // stops all animations. qreal slowdownFactor; QList<QAbstractAnimationTimer*> animationTimers, animationTimersToStart; QList<QAbstractAnimationTimer*> pausedAnimationTimers; void localRestart(); int closestPausedAnimationTimerTimeToFinish(); void (*profilerCallback)(qint64); qint64 driverStartTime; // The time the animation driver was started qint64 temporalDrift; // The delta between animation driver time and wall time. }; class QAnimationTimer : public QAbstractAnimationTimer { Q_OBJECT private: QAnimationTimer(); public: static QAnimationTimer *instance(); static QAnimationTimer *instance(bool create); static void registerAnimation(QAbstractAnimation *animation, bool isTopLevel); static void unregisterAnimation(QAbstractAnimation *animation); /* this is used for updating the currentTime of all animations in case the pause timer is active or, otherwise, only of the animation passed as parameter. */ static void ensureTimerUpdate(); /* this will evaluate the need of restarting the pause timer in case there is still some pause animations running. */ static void updateAnimationTimer(); void restartAnimationTimer() override; void updateAnimationsTime(qint64 delta) override; //useful for profiling/debugging int runningAnimationCount() override { return animations.count(); } private Q_SLOTS: void startAnimations(); void stopTimer(); private: qint64 lastTick; int currentAnimationIdx; bool insideTick; bool startAnimationPending; bool stopTimerPending; QList<QAbstractAnimation*> animations, animationsToStart; // this is the count of running animations that are not a group neither a pause animation int runningLeafAnimations; QList<QAbstractAnimation*> runningPauseAnimations; void registerRunningAnimation(QAbstractAnimation *animation); void unregisterRunningAnimation(QAbstractAnimation *animation); int closestPauseAnimationTimeToFinish(); }; QT_END_NAMESPACE #endif //QABSTRACTANIMATION_P_H
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="charset" content="ISO-8859-1" /> <meta http-equiv="content-language" content="English" /> <meta http-equiv="vw96.object type" content="Document" /> <meta name="resource-type" content="document" /> <meta name="distribution" content="Global" /> <meta name="rating" content="General" /> <meta name="robots" content="all" /> <meta name="revist-after" content="2 days" /> <link rel="shortcut icon" href="../../../favicon.ico" /> <title>The Original Hip-Hop (Rap) Lyrics Archive</title> <!-- link rel="stylesheet" type="text/css" href="http://ohhla.com/files/main.css" / --> <!-- BEGIN SITE ANALYTICS //--> <script type="text/javascript"> if (typeof siteanalytics == 'undefined') { siteanalytics = {}; }; siteanalytics.gn_tracking_defaults = {google: '',comscore: {},quantcast:''}; siteanalytics.website_id = 180; siteanalytics.cdn_hostname = 'cdn.siteanalytics.evolvemediametrics.com'; </script> <script type="text/javascript" src='http://cdn.siteanalytics.evolvemediametrics.com/js/siteanalytics.js'></script> <!-- END SITE ANALYTICS //--> </head> <body> <a href="javascript: history.go(-1)">Back to the previous page</a> <div> </div> <div style="width: 720px; text-align: center; color: #ff0000; font-weight: bold; font-size: 1em;"> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style" style="margin: auto 0 auto 0; padding-left: 185px;"> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_google_plusone" g:plusone:size="medium"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e8ea9f77f69af2f"></script> <!-- AddThis Button END --> </div> <br /> <div style="float: left; min-width: 560px;"> <pre> Artist: Nas Album: I Am Song: Dr. Knockboot Typed by: OHHLA Webmaster DJ Flash Hell yeah Check it check it check, check check Yo, when it come to sex advice, I'm the one to call if you a virgin with blue balls or you tear down walls Not Dr. Ruth, call me Dr. Knockboot Pimped out hats, rock fashionable suits A class for the youth, Sex Ed for your head The do's and don'ts, that should happen in the bed First, DON'T: run up in her raw cause you get burned for sure, fuckin with the typical whore, because DO: rock a Rough Ryder, whenever you inside her Your local bodega is your supplier And DON'T: take the pussy, if she fightin Cause you saw what happened to Tupac and Mike Tyson 'Specially if you large, some hoes is trife Get you on a rape charge, have you servin your life Yo, DO: get a yes confirmation before penetration You wind up in a police station DON'T: get with no young bitch and hit it She PG-13, you rated R, she not permitted DO: check for ID, whenever chillin V.I.P. with fly shorty P.Y.T. Yo, DON'T: lie about the cars you got or who you hang with, frontin when you borrowed your watch Yo, DO: play your game right, if the G's tight then you can fuck shorty the same night Yo, DON'T: trick when you don't have to You think you ballin? You turn your back they laffin at you You don't gotta keep repeatin you a thug, she heard you In fact, she attracted to your man that herbed you DO: spend a lil' dough, only if you know the bitch gross a lil' somethin too bro DON'T: eat the pussy the first night Maker her bless you, we call that shit gesundheit DO: set the mood right, Bailey's with ice A cup of Thug Passion'll make everything right Yo, DON'T: pop shit like you Daddy Longdick when you come fast like Fed-Ex and bust too quick DO: hit positions she will find interest in DON'T: hit the pussy if that shit's blisterin Hope you're listenin, turn up your transisterin Hot 97, KISS-FM or B-L-S, with your hand up her dress Chillin with your girl while you thinkin bout ya ex Not too easy not too complex I break it down, how to adress, the opposite sex Problems or questions, I can answer them best Signin off Dr. Knockboot at your request, peace Rest havens Fuck y'all bitches Y'all niggaz get y'all shit tight Dr. Knockboot gotta come take y'all bitches from ya! AIGHT?! We out!</pre> </div> <div style="float: left;"> </div> </body></html>
{ "pile_set_name": "Github" }
Chet Ramey <chet at po.cwru.edu>: author of the amazing readline library, around which rlwrap is but a thin wrapper. Hans Lub [email protected]: most of the rlwrap code, except for: - ptytty.c, wich was taken practically unchanged from rxvt (currently maintained by Geoff C. Wing <[email protected]>), together with the corresponding part of configure.ac - completion.c which contains the redblack tree implementation written by Damian Ivereigh <[email protected]> (with contributions by Ben Woodard, Eric S. Raymond and Matthias Andree) Jon Olsson (jon at vexed.se) contributed patches to weed out unsafe strcat and strcpy calls Hisanobu Okuda ported the RlwrapFilter.pm perl module (and a number of example filters) to python, and contributed a new way of handling multi-part filter messages. Robert Kroeger contributed code to keep track of the rlwrapped command's working directory under OS X
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd"> <!-- Copyright © 1991-2013 Unicode, Inc. CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/) For terms of use, see http://www.unicode.org/copyright.html --> <supplementalData> <version number="$Revision$"/> <transforms> <transform source="uz_Cyrl" target="uz" variant="BGN" direction="forward" draft="contributed" alias="Uzbek-Latin/BGN uz-t-uz-cyrl-m0-bgn"> <tRule><![CDATA[ # ######################################################################## # BGN/PCGN 1979 System # # The BGN/PCGN system for Uzbek was designed for use in # romanizing names written in the Uzbek alphabet. # The Uzbek alphabet contains four letters not present # in the Russian alphabet: Ўў, Ққ, Ғғ, and Ҳҳ. # # The Uzbek Alphabet as defined by the BGN (Page 107): # # АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЪЬЭЮЯЎҚҒҲ # абвгдеёжзийклмнопрстуфхцчшъьэюяўқғҳ # # Originally prepared by Michael Everson <[email protected]> ######################################################################## # # MINIMAL FILTER: Uzbek-Latin # :: [АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЪЬЭЮЯЎҚҒҲабвгдеёжзийклмнопрстуфхцчшъьэюяўқғҳ] ; :: NFD (NFC) ; # # ######################################################################## # ######################################################################## # # Define All Transformation Variables # ######################################################################## # $prime = ʹ ; $doublePrime = ʺ ; $upperConsonants = [БВГДЖЗЙКЛМНПРСТФХЦЧШЪЬҚҒҲ] ; $lowerConsonants = [бвгджзйклмнпрстфхцчшъьқғҳ] ; $consonants = [$upperConsonants $lowerConsonants] ; $upperVowels = [АЕЁИОУЭЮЯЎ] ; $lowerVowels = [аеёиоуэюяў] ; $vowels = [$upperVowels $lowerVowels] ; $lower = [$lowerConsonants $lowerVowels] ; # # # Use this $wordBoundary until bug 2034 is fixed in ICU: # http://bugs.icu-project.org/cgi-bin/icu-bugs/transliterate?id=2034;expression=boundary;user=guest # $wordBoundary = [^[:L:][:M:][:N:]] ; # # ######################################################################## # ######################################################################## # # Rules moved to front to avoid masking # ######################################################################## # $lowerVowels ы → y ; $upperVowels[Ыы] → Y ; # # ######################################################################## # # Start of Alphabetic Transformations # ######################################################################## # А → A ; # CYRILLIC CAPITAL LETTER A а → a ; # CYRILLIC SMALL LETTER A Б → B ; # CYRILLIC CAPITAL LETTER BE б → b ; # CYRILLIC SMALL LETTER BE В → W ; # CYRILLIC CAPITAL LETTER VE в → w ; # CYRILLIC SMALL LETTER VE # # ######################################################################## # # BGN Page 108 Rule 2 # # The character sequences гҳ, кҳ, сҳ, and цҳ may be romanized g·h, # k·h, s·h, and ts·h in order to differentiate those romanizations from # the digraphs gh, kh, sh, and the letter sequence tsh, which are used # to render the chаracters г, х, ш, and the character sequence тш. # ######################################################################## # ГҲ → G·H ; # CYRILLIC CAPITAL LETTER GHE Гҳ → G·h ; # CYRILLIC CAPITAL LETTER GHE гҳ → g·h ; # CYRILLIC SMALL LETTER GHE Г → G ; # CYRILLIC CAPITAL LETTER GHE г → g ; # CYRILLIC SMALL LETTER GHE # # ######################################################################## # # End Rule 2 # ######################################################################## # Д → D ; # CYRILLIC CAPITAL LETTER DE д → d ; # CYRILLIC SMALL LETTER DE # # ######################################################################## # # BGN Page 108 Rule 1: # # The character e should be romanized ye initially, after the vowel # characters a, e, ё, и, о, у, э, ю, я, and ў, and after й and ь. # In all other instances, it should be romanized e. # ######################################################################## # Е}[$upperVowels [ЙЬ]] → YE ; # CYRILLIC CAPITAL LETTER IE Е}[$lowerVowels [йь]] → Ye ; # CYRILLIC CAPITAL LETTER IE $wordBoundary{Е → Ye ; # CYRILLIC CAPITAL LETTER IE Е → E ; # CYRILLIC CAPITAL LETTER IE е}[$upperVowels $lowerVowels [ЙйЬь]] → ye ; # CYRILLIC SMALL LETTER IE $wordBoundary{е → ye ; # CYRILLIC SMALL LETTER IE е → e ; # CYRILLIC SMALL LETTER IE # # ######################################################################## # # End of Rule 1 # ######################################################################## # Ё} $lower → Yo ; # CYRILLIC CAPITAL LETTER IO Ё → YO ; # CYRILLIC CAPITAL LETTER IO ё → yo ; # CYRILLIC SMALL LETTER IO Ж → J ; # CYRILLIC CAPITAL LETTER ZHE ж → j ; # CYRILLIC SMALL LETTER ZHE З → Z ; # CYRILLIC CAPITAL LETTER ZE з → z ; # CYRILLIC SMALL LETTER ZE И → I ; # CYRILLIC CAPITAL LETTER I и → i ; # CYRILLIC SMALL LETTER I Й → Y ; # CYRILLIC CAPITAL LETTER I й → y ; # CYRILLIC SMALL LETTER I # # ######################################################################## # # BGN Page 108 Rule 2 # # кҳ becomes k·h # ######################################################################## # КҲ → K·H ; # CYRILLIC CAPITAL LETTER KA Кҳ → K·h ; # CYRILLIC CAPITAL LETTER KA кҳ → k·h ; # CYRILLIC SMALL LETTER KA К → K ; # CYRILLIC CAPITAL LETTER KA к → k ; # CYRILLIC SMALL LETTER KA # # ######################################################################## # # End Rule 2 # ######################################################################## # Л → L ; # CYRILLIC CAPITAL LETTER EL л → l ; # CYRILLIC SMALL LETTER EL М → M ; # CYRILLIC CAPITAL LETTER EM м → m ; # CYRILLIC SMALL LETTER EM Н → N ; # CYRILLIC CAPITAL LETTER EN н → n ; # CYRILLIC SMALL LETTER EN О → O ; # CYRILLIC CAPITAL LETTER O о → o ; # CYRILLIC SMALL LETTER O П → P ; # CYRILLIC CAPITAL LETTER PE п → p ; # CYRILLIC SMALL LETTER PE Р → R ; # CYRILLIC CAPITAL LETTER ER р → r ; # CYRILLIC SMALL LETTER ER # # ######################################################################## # # BGN Page 108 Rule 2 # # сҳ becomes s·h # ######################################################################## # СҲ → S·H ; # CYRILLIC CAPITAL LETTER ES Сҳ → S·h ; # CYRILLIC CAPITAL LETTER ES сҳ → s·h ; # CYRILLIC SMALL LETTER ES С → S ; # CYRILLIC CAPITAL LETTER ES с → s ; # CYRILLIC SMALL LETTER ES # # ######################################################################## # # End Rule 2 # ######################################################################## # Т → T ; # CYRILLIC CAPITAL LETTER TE т → t ; # CYRILLIC SMALL LETTER TE У → Ū ; # CYRILLIC CAPITAL LETTER U у → ū ; # CYRILLIC SMALL LETTER U Ф → F ; # CYRILLIC CAPITAL LETTER EF ф → f ; # CYRILLIC SMALL LETTER EF Х} $lower → Kh ; # CYRILLIC CAPITAL LETTER HA Х → KH ; # CYRILLIC CAPITAL LETTER HA х → kh ; # CYRILLIC SMALL LETTER HA # # ######################################################################## # # BGN Page 108 Rule 2 # # цҳ becomes ts·h # ######################################################################## # ЦҲ → TS·H ; # CYRILLIC CAPITAL LETTER GHE Цҳ → Ts·h ; # CYRILLIC CAPITAL LETTER GHE цҳ → ts·h ; # CYRILLIC SMALL LETTER GHE Ц} $lower → Ts ; # CYRILLIC CAPITAL LETTER TSE Ц → TS ; # CYRILLIC CAPITAL LETTER TSE ц → ts ; # CYRILLIC SMALL LETTER TSE # # ######################################################################## # # End Rule 2 # ######################################################################## # Ч} $lower → Ch ; # CYRILLIC CAPITAL LETTER CHE Ч → CH ; # CYRILLIC CAPITAL LETTER CHE ч → ch ; # CYRILLIC SMALL LETTER CHE Ш} $lower → Sh ; # CYRILLIC CAPITAL LETTER SHA Ш → SH ; # CYRILLIC CAPITAL LETTER SHA ш → sh ; # CYRILLIC SMALL LETTER SHA Ъ → $prime ; # CYRILLIC CAPITAL LETTER HARD SIGN ъ → $prime ; # CYRILLIC SMALL LETTER HARD SIGN Ь → $prime ; # CYRILLIC CAPITAL LETTER SOFT SIGN ь → $prime ; # CYRILLIC SMALL LETTER SOFT SIGN Э → e ; # CYRILLIC CAPITAL LETTER E э → e ; # CYRILLIC SMALL LETTER E Ю} $lower → Yu ; # CYRILLIC CAPITAL LETTER YU Ю → YU ; # CYRILLIC CAPITAL LETTER YU ю → yu ; # CYRILLIC SMALL LETTER YU Я} $lower → Ya ; # CYRILLIC CAPITAL LETTER YA Я → YA ; # CYRILLIC CAPITAL LETTER YA я → ya ; # CYRILLIC SMALL LETTER YA Ў → Ŭ ; # CYRILLIC CAPITAL LETTER SHORT U ў → ŭ ; # CYRILLIC SMALL LETTER SHORT U Қ → Q ; # CYRILLIC CAPITAL LETTER KA WITH DESCENDER қ → q ; # CYRILLIC SMALL LETTER KA WITH DESCENDER Ғ} $lower → Gh ; # CYRILLIC CAPITAL LETTER GHE WITH STROKE Ғ → GH ; # CYRILLIC CAPITAL LETTER GHE WITH STROKE ғ → gh ; # CYRILLIC SMALL LETTER GHE WITH STROKE Ҳ → H ; # CYRILLIC CAPITAL LETTER HA WITH DESCENDER ҳ → h ; # CYRILLIC SMALL LETTER HA WITH DESCENDER # # ######################################################################## ]]></tRule> </transform> </transforms> </supplementalData>
{ "pile_set_name": "Github" }
/* * Copyright (c) Mirth Corporation. All rights reserved. * * http://www.mirthcorp.com * * The software in this package is published under the terms of the MPL license a copy of which has * been included with this distribution in the LICENSE.txt file. */ package com.mirth.connect.connectors.jdbc; public class DatabaseReceiverException extends Exception { public DatabaseReceiverException(String message) { super(message); } public DatabaseReceiverException(Throwable cause) { super(cause); } public DatabaseReceiverException(String message, Throwable cause) { super(message, cause); } }
{ "pile_set_name": "Github" }
var Rotator = IgeEntity.extend({ classId:'Rotator', init: function (speed) { IgeEntity.prototype.init.call(this); if (speed !== undefined) { this._rSpeed = speed; } else { this._rSpeed = 0; } }, /** * Called every frame by the engine when this entity is mounted to the scenegraph. * @param ctx The canvas context to render to. */ tick: function (ctx) { // Rotate this entity by 0.1 degrees. this.rotateBy(0, 0, (this._rSpeed * ige._tickDelta) * Math.PI / 180); // Call the IgeEntity (super-class) tick() method IgeEntity.prototype.tick.call(this, ctx); } }); if (typeof(module) !== 'undefined' && typeof(module.exports) !== 'undefined') { module.exports = Rotator; }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard. // #import <Foundation/NSScriptCommand.h> @interface OpenVerb : NSScriptCommand { } - (id)performDefaultImplementation; - (id)openItem:(id)arg1; @end
{ "pile_set_name": "Github" }
// Package printer implements printing of AST nodes to HCL format. package printer import ( "bytes" "io" "text/tabwriter" "github.com/hashicorp/hcl/hcl/ast" "github.com/hashicorp/hcl/hcl/parser" ) var DefaultConfig = Config{ SpacesWidth: 2, } // A Config node controls the output of Fprint. type Config struct { SpacesWidth int // if set, it will use spaces instead of tabs for alignment } func (c *Config) Fprint(output io.Writer, node ast.Node) error { p := &printer{ cfg: *c, comments: make([]*ast.CommentGroup, 0), standaloneComments: make([]*ast.CommentGroup, 0), // enableTrace: true, } p.collectComments(node) if _, err := output.Write(p.unindent(p.output(node))); err != nil { return err } // flush tabwriter, if any var err error if tw, _ := output.(*tabwriter.Writer); tw != nil { err = tw.Flush() } return err } // Fprint "pretty-prints" an HCL node to output // It calls Config.Fprint with default settings. func Fprint(output io.Writer, node ast.Node) error { return DefaultConfig.Fprint(output, node) } // Format formats src HCL and returns the result. func Format(src []byte) ([]byte, error) { node, err := parser.Parse(src) if err != nil { return nil, err } var buf bytes.Buffer if err := DefaultConfig.Fprint(&buf, node); err != nil { return nil, err } // Add trailing newline to result buf.WriteString("\n") return buf.Bytes(), nil }
{ "pile_set_name": "Github" }
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1 &195068 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 495068} - component: {fileID: 21295068} - component: {fileID: 9595068} - component: {fileID: 5095068} m_Layer: 8 m_Name: Enemy1 m_TagString: Enemy m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!4 &495068 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 195068} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 2, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!50 &5095068 Rigidbody2D: serializedVersion: 4 m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 195068} m_BodyType: 1 m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 0 m_Mass: 1 m_LinearDrag: 0 m_AngularDrag: 0.05 m_GravityScale: 1 m_Material: {fileID: 0} m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 --- !u!95 &9595068 Animator: serializedVersion: 3 m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 195068} m_Enabled: 1 m_Avatar: {fileID: 0} m_Controller: {fileID: 9100000, guid: d2980f4165a534b529ce669cbe3e8246, type: 2} m_CullingMode: 0 m_UpdateMode: 0 m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 --- !u!212 &21295068 SpriteRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 195068} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 m_MotionVectors: 1 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 m_Materials: - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 0 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: -900995045 m_SortingLayer: 3 m_SortingOrder: 0 m_Sprite: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 m_Size: {x: 1, y: 1} m_AdaptiveModeThreshold: 0.5 m_SpriteTileMode: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 0} propertyPath: m_Enabled value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 195068} m_IsPrefabParent: 1
{ "pile_set_name": "Github" }
//**************************************************************************** //* MODULE: Sk/Components //* FILENAME: SkaterMatrixQueriesComponent.h //* OWNER: Dan //* CREATION DATE: 3/12/3 //**************************************************************************** #include <sk/components/skatermatrixqueriescomponent.h> #include <sk/components/skatercorephysicscomponent.h> #include <gel/object/compositeobject.h> #include <gel/scripting/checksum.h> #include <gel/scripting/script.h> #include <gel/scripting/struct.h> #include <sk/modules/skate/skate.h> namespace Obj { /******************************************************************/ /* */ /* */ /******************************************************************/ CBaseComponent* CSkaterMatrixQueriesComponent::s_create() { return static_cast< CBaseComponent* >( new CSkaterMatrixQueriesComponent ); } /******************************************************************/ /* */ /* */ /******************************************************************/ CSkaterMatrixQueriesComponent::CSkaterMatrixQueriesComponent() : CBaseComponent() { SetType( CRC_SKATERMATRIXQUERIES ); mp_core_physics_component = NULL; } /******************************************************************/ /* */ /* */ /******************************************************************/ CSkaterMatrixQueriesComponent::~CSkaterMatrixQueriesComponent() { } /******************************************************************/ /* */ /* */ /******************************************************************/ void CSkaterMatrixQueriesComponent::InitFromStructure( Script::CStruct* pParams ) { Dbg_MsgAssert(GetObject()->GetType() == SKATE_TYPE_SKATER, ("CSkaterMatrixQueriesComponent added to non-skater composite object")); } /******************************************************************/ /* */ /* */ /******************************************************************/ void CSkaterMatrixQueriesComponent::RefreshFromStructure( Script::CStruct* pParams ) { InitFromStructure(pParams); } /******************************************************************/ /* */ /* */ /******************************************************************/ void CSkaterMatrixQueriesComponent::Finalize ( ) { mp_core_physics_component = GetSkaterCorePhysicsComponentFromObject(GetObject()); Dbg_Assert(mp_core_physics_component); } /******************************************************************/ /* */ /* */ /******************************************************************/ void CSkaterMatrixQueriesComponent::Update() { // Store the matrix from the last frame. Used by script functions for measuring angles & stuff. Has to use the last frame's matrix // because the landing physics snaps the orientation to the ground, yet the land script (which executes just after) needs to measure // the angles on impact to maybe trigger bails and such. m_latest_matrix = mp_core_physics_component->m_lerping_display_matrix; } /******************************************************************/ /* */ /* */ /******************************************************************/ CBaseComponent::EMemberFunctionResult CSkaterMatrixQueriesComponent::CallMemberFunction( uint32 Checksum, Script::CStruct* pParams, Script::CScript* pScript ) { switch ( Checksum ) { // @script | YawBetween | yaw between the two specified angles // @uparm (45, 135) | angle range values case CRCC(0xb992f3cc, "YawBetween"): { // if (CHEAT_SNOWBOARD) // { // return false; // } Script::CPair Pair; if (!pParams->GetPair(NO_NAME, &Pair, Script::ASSERT)) Dbg_MsgAssert(Pair.mX < Pair.mY,("\n%s\n1st angle must be less than the 2nd angle", pScript->GetScriptInfo())); Mth::Vector a = GetSkater()->m_vel; a.RotateToPlane(m_latest_matrix[Y]); return (Mth::AngleBetweenGreaterThan(a, m_latest_matrix[Z], Pair.mX) && !Mth::AngleBetweenGreaterThan(a, m_latest_matrix[Z], Pair.mY)) ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } // @script | YawingLeft | true if currently yawing left case CRCC(0xa745c080, "YawingLeft"): { Mth::Vector a = GetSkater()->m_vel; a.RotateToPlane(m_latest_matrix[Y]); return Mth::CrossProduct(a, m_latest_matrix[Z])[Y] > 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } // @script | YawingRight | true if currently yawing right case CRCC(0xc8c4d2f4, "YawingRight"): { Mth::Vector a = GetSkater()->m_vel; a.RotateToPlane(m_latest_matrix[Y]); return Mth::CrossProduct(a, m_latest_matrix[Z])[Y] < 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } // @script | PitchGreaterThan | true if the pitch is greater // than the specified value // @uparm 0.0 | test angle case CRCC(0xa0551543, "PitchGreaterThan"): { float TestAngle = 0.0f; pParams->GetFloat(NO_NAME, &TestAngle, Script::ASSERT); return Mth::DotProduct(m_latest_matrix[Y], mp_core_physics_component->m_last_display_normal) < cosf(Mth::DegToRad(TestAngle)) ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } case CRCC(0x5e269b2b, "AbsolutePitchGreaterThan"): { float TestAngle = 0.0f; pParams->GetFloat(NO_NAME, &TestAngle, Script::ASSERT); return m_latest_matrix[Y][Y] < cosf(Mth::DegToRad(TestAngle)) ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } /* // @script | PitchingForward | true if pitching forward case CRCC(0xdaeda59c, "PitchingForward"): { Mth::Vector b = Mth::CrossProduct(m_latest_matrix[Y], mp_core_physics_component->m_last_display_normal); return Mth::DotProduct(b, m_latest_matrix[X]) < 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } // @script | PitchingBackward | true if pitching backward case CRCC(0x7dd9e92c, "PitchingBackward"): { Mth::Vector b = Mth::CrossProduct(m_latest_matrix[Y], mp_core_physics_component->m_last_display_normal); return Mth::DotProduct(b, m_latest_matrix[X]) > 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } */ // @script | RollGreaterThan | true if the roll is greater than // the specified angle value // @uparm 0.0 | angle value case CRCC(0xd3313e92, "RollGreaterThan"): { float TestAngle = 0.0f; pParams->GetFloat(NO_NAME, &TestAngle, Script::ASSERT); Mth::Vector a = m_latest_matrix[X]; a.RotateToPlane(mp_core_physics_component->m_last_display_normal); return Mth::AngleBetweenGreaterThan(a, m_latest_matrix[X], TestAngle) ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } /* // @script | RollingLeft | true if rolling left case CRCC(0x7328c9ad, "RollingLeft"): { Mth::Vector b = Mth::CrossProduct(m_latest_matrix[Y], mp_core_physics_component->m_last_display_normal); return Mth::DotProduct(b, m_latest_matrix[Z]) > 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } // @script | RollingRight | true if rolling right case CRCC(0x8dcfe388, "RollingRight"): { Mth::Vector b = Mth::CrossProduct(m_latest_matrix[Y], mp_core_physics_component->m_last_display_normal); return Mth::DotProduct(b, m_latest_matrix[Z]) < 0.0f ? CBaseComponent::MF_TRUE : CBaseComponent::MF_FALSE; } */ // @script | GetSlope | Puts the angle of the slope into a param called Slope. // Units are degrees. Zero is horizontal, positive is up, negative is down. // The change in slope since the last call to GetSlope is put in a parameter // called ChangeInSlope case CRCC(0x97201739, "GetSlope"): { Mth::Vector v = GetObject()->m_matrix[Z]; v[Y] = 0.0f; float slope = Mth::GetAngle(GetObject()->m_matrix[Z], v); if (GetObject()->m_matrix[Z][Y] < 0.0f) { slope = -slope; } pScript->GetParams()->AddFloat(CRCD(0xa733ba7a, "Slope"), slope); pScript->GetParams()->AddFloat(CRCD(0x21afff16, "ChangeInSlope"), slope - m_last_slope); m_last_slope = slope; break; } case CRCC(0x8e7833be, "GetHeading"): { float heading = Mth::RadToDeg(cosf(GetObject()->m_matrix[Z][X])); if (GetObject()->m_matrix[Z][Z] < 0.0f) { heading = 360.0f - heading; } pScript->GetParams()->AddFloat(CRCD(0xfd4bc03e, "heading"), heading); pScript->GetParams()->AddFloat(CRCD(0x2315ef17, "cosine"), GetObject()->m_matrix[Z][X]); pScript->GetParams()->AddFloat(CRCD(0x26910cc0, "sine"), GetObject()->m_matrix[Z][Z]); break; } default: return CBaseComponent::MF_NOT_EXECUTED; } return CBaseComponent::MF_TRUE; } /******************************************************************/ /* */ /* */ /******************************************************************/ void CSkaterMatrixQueriesComponent::GetDebugInfo(Script::CStruct *p_info) { #ifdef __DEBUG_CODE__ Dbg_MsgAssert(p_info,("NULL p_info sent to CSkaterMatrixQueriesComponent::GetDebugInfo")); CBaseComponent::GetDebugInfo(p_info); #endif } }
{ "pile_set_name": "Github" }
#ifndef __ASM_POWERPC_CPUTABLE_H #define __ASM_POWERPC_CPUTABLE_H #define PPC_FEATURE_32 0x80000000 #define PPC_FEATURE_64 0x40000000 #define PPC_FEATURE_601_INSTR 0x20000000 #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 #define PPC_FEATURE_HAS_FPU 0x08000000 #define PPC_FEATURE_HAS_MMU 0x04000000 #define PPC_FEATURE_HAS_4xxMAC 0x02000000 #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 #define PPC_FEATURE_HAS_SPE 0x00800000 #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 #define PPC_FEATURE_NO_TB 0x00100000 #define PPC_FEATURE_POWER4 0x00080000 #define PPC_FEATURE_POWER5 0x00040000 #define PPC_FEATURE_POWER5_PLUS 0x00020000 #define PPC_FEATURE_CELL 0x00010000 #define PPC_FEATURE_BOOKE 0x00008000 #define PPC_FEATURE_SMT 0x00004000 #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 #define PPC_FEATURE_ARCH_2_05 0x00001000 #define PPC_FEATURE_PA6T 0x00000800 #define PPC_FEATURE_HAS_DFP 0x00000400 #define PPC_FEATURE_POWER6_EXT 0x00000200 #define PPC_FEATURE_ARCH_2_06 0x00000100 #define PPC_FEATURE_HAS_VSX 0x00000080 #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ 0x00000040 #define PPC_FEATURE_TRUE_LE 0x00000002 #define PPC_FEATURE_PPC_LE 0x00000001 #ifdef __KERNEL__ #include <asm/asm-compat.h> #include <asm/feature-fixups.h> #ifndef __ASSEMBLY__ /* This structure can grow, it's real size is used by head.S code * via the mkdefs mechanism. */ struct cpu_spec; typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); typedef void (*cpu_restore_t)(void); enum powerpc_oprofile_type { PPC_OPROFILE_INVALID = 0, PPC_OPROFILE_RS64 = 1, PPC_OPROFILE_POWER4 = 2, PPC_OPROFILE_G4 = 3, PPC_OPROFILE_FSL_EMB = 4, PPC_OPROFILE_CELL = 5, PPC_OPROFILE_PA6T = 6, }; enum powerpc_pmc_type { PPC_PMC_DEFAULT = 0, PPC_PMC_IBM = 1, PPC_PMC_PA6T = 2, PPC_PMC_G4 = 3, }; struct pt_regs; extern int machine_check_generic(struct pt_regs *regs); extern int machine_check_4xx(struct pt_regs *regs); extern int machine_check_440A(struct pt_regs *regs); extern int machine_check_e500mc(struct pt_regs *regs); extern int machine_check_e500(struct pt_regs *regs); extern int machine_check_e200(struct pt_regs *regs); extern int machine_check_47x(struct pt_regs *regs); /* NOTE WELL: Update identify_cpu() if fields are added or removed! */ struct cpu_spec { /* CPU is matched via (PVR & pvr_mask) == pvr_value */ unsigned int pvr_mask; unsigned int pvr_value; char *cpu_name; unsigned long cpu_features; /* Kernel features */ unsigned int cpu_user_features; /* Userland features */ unsigned int mmu_features; /* MMU features */ /* cache line sizes */ unsigned int icache_bsize; unsigned int dcache_bsize; /* number of performance monitor counters */ unsigned int num_pmcs; enum powerpc_pmc_type pmc_type; /* this is called to initialize various CPU bits like L1 cache, * BHT, SPD, etc... from head.S before branching to identify_machine */ cpu_setup_t cpu_setup; /* Used to restore cpu setup on secondary processors and at resume */ cpu_restore_t cpu_restore; /* Used by oprofile userspace to select the right counters */ char *oprofile_cpu_type; /* Processor specific oprofile operations */ enum powerpc_oprofile_type oprofile_type; /* Bit locations inside the mmcra change */ unsigned long oprofile_mmcra_sihv; unsigned long oprofile_mmcra_sipr; /* Bits to clear during an oprofile exception */ unsigned long oprofile_mmcra_clear; /* Name of processor class, for the ELF AT_PLATFORM entry */ char *platform; /* Processor specific machine check handling. Return negative * if the error is fatal, 1 if it was fully recovered and 0 to * pass up (not CPU originated) */ int (*machine_check)(struct pt_regs *regs); }; extern struct cpu_spec *cur_cpu_spec; extern unsigned int __start___ftr_fixup, __stop___ftr_fixup; extern struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr); extern void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end); extern const char *powerpc_base_platform; #endif /* __ASSEMBLY__ */ /* CPU kernel features */ /* Retain the 32b definitions all use bottom half of word */ #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000000000000001) #define CPU_FTR_L2CR ASM_CONST(0x0000000000000002) #define CPU_FTR_SPEC7450 ASM_CONST(0x0000000000000004) #define CPU_FTR_ALTIVEC ASM_CONST(0x0000000000000008) #define CPU_FTR_TAU ASM_CONST(0x0000000000000010) #define CPU_FTR_CAN_DOZE ASM_CONST(0x0000000000000020) #define CPU_FTR_USE_TB ASM_CONST(0x0000000000000040) #define CPU_FTR_L2CSR ASM_CONST(0x0000000000000080) #define CPU_FTR_601 ASM_CONST(0x0000000000000100) #define CPU_FTR_DBELL ASM_CONST(0x0000000000000200) #define CPU_FTR_CAN_NAP ASM_CONST(0x0000000000000400) #define CPU_FTR_L3CR ASM_CONST(0x0000000000000800) #define CPU_FTR_L3_DISABLE_NAP ASM_CONST(0x0000000000001000) #define CPU_FTR_NAP_DISABLE_L2_PR ASM_CONST(0x0000000000002000) #define CPU_FTR_DUAL_PLL_750FX ASM_CONST(0x0000000000004000) #define CPU_FTR_NO_DPM ASM_CONST(0x0000000000008000) #define CPU_FTR_476_DD2 ASM_CONST(0x0000000000010000) #define CPU_FTR_NEED_COHERENT ASM_CONST(0x0000000000020000) #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) #define CPU_FTR_DEBUG_LVL_EXC ASM_CONST(0x0000000000080000) #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) #define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000) #define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x0000000001000000) #define CPU_FTR_SPE ASM_CONST(0x0000000002000000) #define CPU_FTR_NEED_PAIRED_STWCX ASM_CONST(0x0000000004000000) #define CPU_FTR_LWSYNC ASM_CONST(0x0000000008000000) #define CPU_FTR_NOEXECUTE ASM_CONST(0x0000000010000000) #define CPU_FTR_INDEXED_DCR ASM_CONST(0x0000000020000000) /* * Add the 64-bit processor unique features in the top half of the word; * on 32-bit, make the names available but defined to be 0. */ #ifdef __powerpc64__ #define LONG_ASM_CONST(x) ASM_CONST(x) #else #define LONG_ASM_CONST(x) 0 #endif #define CPU_FTR_HVMODE LONG_ASM_CONST(0x0000000200000000) #define CPU_FTR_ARCH_201 LONG_ASM_CONST(0x0000000400000000) #define CPU_FTR_ARCH_206 LONG_ASM_CONST(0x0000000800000000) #define CPU_FTR_CFAR LONG_ASM_CONST(0x0000001000000000) #define CPU_FTR_IABR LONG_ASM_CONST(0x0000002000000000) #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000004000000000) #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000008000000000) #define CPU_FTR_SMT LONG_ASM_CONST(0x0000010000000000) #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) #define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) #define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) #define CPU_FTR_VSX LONG_ASM_CONST(0x0010000000000000) #define CPU_FTR_SAO LONG_ASM_CONST(0x0020000000000000) #define CPU_FTR_CP_USE_DCBTZ LONG_ASM_CONST(0x0040000000000000) #define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0080000000000000) #define CPU_FTR_ASYM_SMT LONG_ASM_CONST(0x0100000000000000) #define CPU_FTR_STCX_CHECKS_ADDRESS LONG_ASM_CONST(0x0200000000000000) #define CPU_FTR_POPCNTB LONG_ASM_CONST(0x0400000000000000) #define CPU_FTR_POPCNTD LONG_ASM_CONST(0x0800000000000000) #define CPU_FTR_ICSWX LONG_ASM_CONST(0x1000000000000000) #define CPU_FTR_VMX_COPY LONG_ASM_CONST(0x2000000000000000) #ifndef __ASSEMBLY__ #define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN) #define MMU_FTR_PPCAS_ARCH_V2 (MMU_FTR_SLB | MMU_FTR_TLBIEL | \ MMU_FTR_16M_PAGE) /* We only set the altivec features if the kernel was compiled with altivec * support */ #ifdef CONFIG_ALTIVEC #define CPU_FTR_ALTIVEC_COMP CPU_FTR_ALTIVEC #define PPC_FEATURE_HAS_ALTIVEC_COMP PPC_FEATURE_HAS_ALTIVEC #else #define CPU_FTR_ALTIVEC_COMP 0 #define PPC_FEATURE_HAS_ALTIVEC_COMP 0 #endif /* We only set the VSX features if the kernel was compiled with VSX * support */ #ifdef CONFIG_VSX #define CPU_FTR_VSX_COMP CPU_FTR_VSX #define PPC_FEATURE_HAS_VSX_COMP PPC_FEATURE_HAS_VSX #else #define CPU_FTR_VSX_COMP 0 #define PPC_FEATURE_HAS_VSX_COMP 0 #endif /* We only set the spe features if the kernel was compiled with spe * support */ #ifdef CONFIG_SPE #define CPU_FTR_SPE_COMP CPU_FTR_SPE #define PPC_FEATURE_HAS_SPE_COMP PPC_FEATURE_HAS_SPE #define PPC_FEATURE_HAS_EFP_SINGLE_COMP PPC_FEATURE_HAS_EFP_SINGLE #define PPC_FEATURE_HAS_EFP_DOUBLE_COMP PPC_FEATURE_HAS_EFP_DOUBLE #else #define CPU_FTR_SPE_COMP 0 #define PPC_FEATURE_HAS_SPE_COMP 0 #define PPC_FEATURE_HAS_EFP_SINGLE_COMP 0 #define PPC_FEATURE_HAS_EFP_DOUBLE_COMP 0 #endif /* We need to mark all pages as being coherent if we're SMP or we have a * 74[45]x and an MPC107 host bridge. Also 83xx and PowerQUICC II * require it for PCI "streaming/prefetch" to work properly. * This is also required by 52xx family. */ #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \ || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260) \ || defined(CONFIG_PPC_MPC52xx) #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT #else #define CPU_FTR_COMMON 0 #endif /* The powersave features NAP & DOZE seems to confuse BDI when debugging. So if a BDI is used, disable theses */ #ifndef CONFIG_BDI_SWITCH #define CPU_FTR_MAYBE_CAN_DOZE CPU_FTR_CAN_DOZE #define CPU_FTR_MAYBE_CAN_NAP CPU_FTR_CAN_NAP #else #define CPU_FTR_MAYBE_CAN_DOZE 0 #define CPU_FTR_MAYBE_CAN_NAP 0 #endif #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4) && \ !defined(CONFIG_BOOKE)) #define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | \ CPU_FTR_COHERENT_ICACHE | CPU_FTR_UNIFIED_ID_CACHE) #define CPU_FTRS_603 (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) #define CPU_FTRS_604 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_PPC_LE) #define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) #define CPU_FTRS_740 (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_PPC_LE) #define CPU_FTRS_750 (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_PPC_LE) #define CPU_FTRS_750CL (CPU_FTRS_750) #define CPU_FTRS_750FX1 (CPU_FTRS_750 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM) #define CPU_FTRS_750FX2 (CPU_FTRS_750 | CPU_FTR_NO_DPM) #define CPU_FTRS_750FX (CPU_FTRS_750 | CPU_FTR_DUAL_PLL_750FX) #define CPU_FTRS_750GX (CPU_FTRS_750FX) #define CPU_FTRS_7400_NOTAU (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) #define CPU_FTRS_7400 (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) #define CPU_FTRS_7450_20 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7450_21 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7450_23 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) #define CPU_FTRS_7455_1 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \ CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \ CPU_FTR_SPEC7450 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) #define CPU_FTRS_7455_20 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) #define CPU_FTRS_7455 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7447_10 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | CPU_FTR_PPC_LE | \ CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7447 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7447A (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_7448 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) #define CPU_FTRS_82XX (CPU_FTR_COMMON | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB) #define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_COMMON) #define CPU_FTRS_E300C2 (CPU_FTR_MAYBE_CAN_DOZE | \ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE) #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_USE_TB) #define CPU_FTRS_8XX (CPU_FTR_USE_TB) #define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_440x6 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE | \ CPU_FTR_INDEXED_DCR) #define CPU_FTRS_47X (CPU_FTRS_440x6) #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \ CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500_2 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500MC (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ CPU_FTR_DBELL) #define CPU_FTRS_E5500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_DEBUG_LVL_EXC) #define CPU_FTRS_E6500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_DEBUG_LVL_EXC) #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) /* 64-bit CPUs */ #define CPU_FTRS_POWER3 (CPU_FTR_USE_TB | \ CPU_FTR_IABR | CPU_FTR_PPC_LE) #define CPU_FTRS_RS64 (CPU_FTR_USE_TB | \ CPU_FTR_IABR | \ CPU_FTR_MMCRA | CPU_FTR_CTRL) #define CPU_FTRS_POWER4 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_MMCRA | CPU_FTR_CP_USE_DCBTZ | \ CPU_FTR_STCX_CHECKS_ADDRESS) #define CPU_FTRS_PPC970 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_201 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA | \ CPU_FTR_CP_USE_DCBTZ | CPU_FTR_STCX_CHECKS_ADDRESS | \ CPU_FTR_HVMODE) #define CPU_FTRS_POWER5 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | CPU_FTR_PURR | \ CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB) #define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | \ CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \ CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_CFAR) #define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | \ CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \ CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY) #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_PAUSE_ZERO | CPU_FTR_CELL_TB_BUG | CPU_FTR_CP_USE_DCBTZ | \ CPU_FTR_UNALIGNED_LD_STD) #define CPU_FTRS_PA6T (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_PURR | CPU_FTR_REAL_LE) #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) #define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \ CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | CPU_FTR_ICSWX) #ifdef __powerpc64__ #ifdef CONFIG_PPC_BOOK3E #define CPU_FTRS_POSSIBLE (CPU_FTRS_E6500 | CPU_FTRS_E5500 | CPU_FTRS_A2) #else #define CPU_FTRS_POSSIBLE \ (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ CPU_FTR_VSX) #endif #else enum { CPU_FTRS_POSSIBLE = #if CLASSIC_PPC CPU_FTRS_PPC601 | CPU_FTRS_603 | CPU_FTRS_604 | CPU_FTRS_740_NOTAU | CPU_FTRS_740 | CPU_FTRS_750 | CPU_FTRS_750FX1 | CPU_FTRS_750FX2 | CPU_FTRS_750FX | CPU_FTRS_750GX | CPU_FTRS_7400_NOTAU | CPU_FTRS_7400 | CPU_FTRS_7450_20 | CPU_FTRS_7450_21 | CPU_FTRS_7450_23 | CPU_FTRS_7455_1 | CPU_FTRS_7455_20 | CPU_FTRS_7455 | CPU_FTRS_7447_10 | CPU_FTRS_7447 | CPU_FTRS_7447A | CPU_FTRS_82XX | CPU_FTRS_G2_LE | CPU_FTRS_E300 | CPU_FTRS_E300C2 | CPU_FTRS_CLASSIC32 | #else CPU_FTRS_GENERIC_32 | #endif #ifdef CONFIG_8xx CPU_FTRS_8XX | #endif #ifdef CONFIG_40x CPU_FTRS_40X | #endif #ifdef CONFIG_44x CPU_FTRS_44X | CPU_FTRS_440x6 | #endif #ifdef CONFIG_PPC_47x CPU_FTRS_47X | CPU_FTR_476_DD2 | #endif #ifdef CONFIG_E200 CPU_FTRS_E200 | #endif #ifdef CONFIG_E500 CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC | CPU_FTRS_E5500 | CPU_FTRS_E6500 | #endif 0, }; #endif /* __powerpc64__ */ #ifdef __powerpc64__ #ifdef CONFIG_PPC_BOOK3E #define CPU_FTRS_ALWAYS (CPU_FTRS_E6500 & CPU_FTRS_E5500 & CPU_FTRS_A2) #else #define CPU_FTRS_ALWAYS \ (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) #endif #else enum { CPU_FTRS_ALWAYS = #if CLASSIC_PPC CPU_FTRS_PPC601 & CPU_FTRS_603 & CPU_FTRS_604 & CPU_FTRS_740_NOTAU & CPU_FTRS_740 & CPU_FTRS_750 & CPU_FTRS_750FX1 & CPU_FTRS_750FX2 & CPU_FTRS_750FX & CPU_FTRS_750GX & CPU_FTRS_7400_NOTAU & CPU_FTRS_7400 & CPU_FTRS_7450_20 & CPU_FTRS_7450_21 & CPU_FTRS_7450_23 & CPU_FTRS_7455_1 & CPU_FTRS_7455_20 & CPU_FTRS_7455 & CPU_FTRS_7447_10 & CPU_FTRS_7447 & CPU_FTRS_7447A & CPU_FTRS_82XX & CPU_FTRS_G2_LE & CPU_FTRS_E300 & CPU_FTRS_E300C2 & CPU_FTRS_CLASSIC32 & #else CPU_FTRS_GENERIC_32 & #endif #ifdef CONFIG_8xx CPU_FTRS_8XX & #endif #ifdef CONFIG_40x CPU_FTRS_40X & #endif #ifdef CONFIG_44x CPU_FTRS_44X & CPU_FTRS_440x6 & #endif #ifdef CONFIG_E200 CPU_FTRS_E200 & #endif #ifdef CONFIG_E500 CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC & CPU_FTRS_E5500 & CPU_FTRS_E6500 & #endif CPU_FTRS_POSSIBLE, }; #endif /* __powerpc64__ */ static inline int cpu_has_feature(unsigned long feature) { return (CPU_FTRS_ALWAYS & feature) || (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature); } #ifdef CONFIG_HAVE_HW_BREAKPOINT #define HBP_NUM 1 #endif /* CONFIG_HAVE_HW_BREAKPOINT */ #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_CPUTABLE_H */
{ "pile_set_name": "Github" }
1.0.1 03-02-2016 ================ * Fix dependency resolution issue when a component in peerOptionalDependencies is installed at the level of the module declaring in peerOptionalDependencies. 1.0.0 03-02-2016 ================ * Initial release allowing us to optionally resolve dependencies in the package.json file under the peerOptionalDependencies tag.
{ "pile_set_name": "Github" }
msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-09-17 20:27+0000\n" "PO-Revision-Date: 2018-12-09 16:28+0000\n" "Language-Team: LANGUAGE <[email protected]>\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Pootle 2.8\n" "X-POOTLE-MTIME: 1544372910.797957\n" #: SettingsResources.resx$Dpi_100$Message msgid "100 dpi" msgstr "100 dpi" #: SettingsResources.resx$Dpi_1200$Message msgid "1200 dpi" msgstr "1200 dpi" #: SettingsResources.resx$Dpi_150$Message msgid "150 dpi" msgstr "150 dpi" #: SettingsResources.resx$Dpi_200$Message msgid "200 dpi" msgstr "200 dpi" #: SettingsResources.resx$BitDepth_24Color$Message msgid "24-bit Color" msgstr "24-bittinen väri" #: SettingsResources.resx$Dpi_300$Message msgid "300 dpi" msgstr "300 dpi" #: SettingsResources.resx$Dpi_400$Message msgid "400 dpi" msgstr "800 dpi" #: SettingsResources.resx$Dpi_600$Message msgid "600 dpi" msgstr "600 dpi" #: SettingsResources.resx$Dpi_800$Message msgid "800 dpi" msgstr "800 dpi" #: SettingsResources.resx$PageSize_A3$Message msgid "A3 (297x420 mm)" msgstr "A3 (297x420 mm)" #: SettingsResources.resx$PageSize_A4$Message msgid "A4 (210x297 mm)" msgstr "A4 (210x297 mm)" #: SettingsResources.resx$PageSize_A5$Message msgid "A5 (148x210 mm)" msgstr "A5 (148x210 mm)" #: FAbout.resx$$this.Text$Message #: FDesktop.resx$tsAbout.Text$Message msgid "About" msgstr "Tietoja" #: FScanProgress.resx$$this.Text$Message msgid "Acquiring data" msgstr "Haetaan tietoja" #: FEditProfile.resx$btnAdvanced.Text$Message msgid "Advanced" msgstr "Edistyneet" #: FAdvancedScanSettings.resx$$this.Text$Message msgid "Advanced Profile Settings" msgstr "Profiilin lisäasetukset" #: FDesktop.resx$tsEmailPDFAll.Text$Message #: FDesktop.resx$tsReverseAll.Text$Message #: FDesktop.resx$tsSaveImagesAll.Text$Message #: FDesktop.resx$tsSavePDFAll.Text$Message #: MiscResources.resx$AllCount$Message msgid "All ({0})" msgstr "Kaikki ({0})" #: MiscResources.resx$FileTypeAllFiles$Message msgid "All Files" msgstr "Kaikki tiedostot" #: FPdfSettings.resx$clbPerms.Items6$Message msgid "Allow Annotations" msgstr "Salli kommentit" #: FPdfSettings.resx$clbPerms.Items4$Message msgid "Allow Content Copying" msgstr "Salli sisällön kopiointi" #: FPdfSettings.resx$clbPerms.Items5$Message msgid "Allow Content Copying for Accessibility" msgstr "Salli sisällön kopioiminen helppokäyttötoimintoja varten" #: FPdfSettings.resx$clbPerms.Items3$Message msgid "Allow Document Assembly" msgstr "Salli asiakirjan kokoaminen" #: FPdfSettings.resx$clbPerms.Items2$Message msgid "Allow Document Modification" msgstr "Salli asiakirjan muokkaus" #: FPdfSettings.resx$clbPerms.Items7$Message msgid "Allow Form Filling" msgstr "Salli lomakkeiden täyttäminen" #: FPdfSettings.resx$clbPerms.Items1$Message msgid "Allow Full Quality Printing" msgstr "Salli korkealaatuinen tulostus" #: FPdfSettings.resx$clbPerms.Items$Message msgid "Allow Printing" msgstr "Salli tulostaminen" #: FDesktop.resx$tsAltDeinterleave.Text$Message msgid "Alternate Deinterleave" msgstr "Vaihtoehtoinen lomituksen poisto" #: FDesktop.resx$tsAltInterleave.Text$Message msgid "Alternate Interleave" msgstr "Vaihtoehtoinen lomitus" #: SettingsResources.resx$TwainImpl_MemXfer$Message msgid "Alternative Transfer" msgstr "Vaihtoehtoinen muunnos" #: MiscResources.resx$PdfImportComponentNeeded$Message msgid "" "An additional component is needed to import this PDF file. Would you like to " "download it now?" msgstr "" "Tämän PDF-tiedoston tuomiseen tarvitaan lisäkomponentti. Haluatko ladata sen " "nyt?" #: MiscResources.resx$UpdateError$Message msgid "An error occured when trying to install the update" msgstr "Virhe päivityksen asennuksessa" #: MiscResources.resx$AuthError$Message msgid "An error occurred when trying to authorize" msgstr "Virhe yritettäessä valtuuttaa" #: MiscResources.resx$AutoSaveError$Message msgid "An error occurred when trying to auto save" msgstr "Virhe automaattisessa tallennuksessa" #: MiscResources.resx$ErrorSaving$Message msgid "An error occurred when trying to save the file" msgstr "Virhe tiedoston tallennuksessa" #: MiscResources.resx$ErrorEmailing$Message msgid "An error occurred when trying to send the email" msgstr "Virhe sähköpostin lähetykessa" #: MiscResources.resx$EmailError$Message msgid "An error occurred while trying to send an email" msgstr "Virhe lähetettäessä sähköpostia" #: MiscResources.resx$UnknownDriverError$Message msgid "An error occurred with the scanning driver" msgstr "Virhe skannausajurissa" #: MiscResources.resx$ExitWithActiveOperations$Message msgid "" "An operation is in progress. Are you sure you want to exit and cancel the " "operation?" msgstr "" "Toiminto on käynnissä. Haluatko varmasti poistua ja peruuttaa toiminnon?" #: MiscResources.resx$BatchError$Message msgid "An unknown error ocurred during the batch scan" msgstr "Tuntematon virhe sarjaskannauksessa" #: MiscResources.resx$UpdateAvailable$Message msgid "An update is available" msgstr "Päivitys on saatavilla" #: MiscResources.resx$OcrUpdateAvailable$Message msgid "An update to OCR is available" msgstr "OCR-päivitys on saatavana" #: FAdvancedScanSettings.resx$cbBrightnessContrastAfterScan.Text$Message msgid "Apply brightness/contrast after scan" msgstr "Käytä kirkkautta/kontrastia skannauksen jälkeen" #: ImageForm.resx$checkboxApplyToSelected.Text$Message msgid "Apply to all {0} selected images" msgstr "Käytä kaikissa {0} valitussa kuvassa" #: MiscResources.resx$ConfirmCancelBatch$Message msgid "Are you sure you want to cancel the batch scan?" msgstr "Haluatko varmasti peruuttaa sarjaskannauksen?" #: MiscResources.resx$ConfirmClearItems$Message msgid "Are you sure you want to clear {0} item(s)?" msgstr "Haluatko varmasti tyhjentää {0} valintaa?" #: MiscResources.resx$ConfirmDelete$Message msgid "Are you sure you want to delete \"{0}\"?" msgstr "Haluatko varmasti poistaa {0}?" #: MiscResources.resx$ConfirmDeleteSingleProfile$Message msgid "Are you sure you want to delete the profile {0}?" msgstr "Haluatko varmasti poistaa profiilin {0}?" #: MiscResources.resx$ConfirmDeleteItems$Message msgid "Are you sure you want to delete {0} item(s)?" msgstr "Haluatko varmasti poistaa {0} tiedostoa?" #: MiscResources.resx$ConfirmDeleteMultipleProfiles$Message msgid "Are you sure you want to delete {0} profiles?" msgstr "Haluatko varmasti poistaa {0} profiilia?" #: MiscResources.resx$ConfirmResetImages$Message msgid "Are you sure you want undo your changes to {0} image(s)?" msgstr "Haluatko varmasti peruuttaa kuvien ( {0} ) muutokset?" #: FEmailSettings.resx$label1.Text$Message msgid "Attachment Name" msgstr "Liitteen nimi" #: FPdfSettings.resx$label3.Text$Message msgid "Author" msgstr "Tekijä" #: FAuthorize.resx$$this.Text$Message msgid "Authorize" msgstr "Valtuuta" #: SettingsResources.resx$TiffComp_Auto$Message msgid "Auto" msgstr "Automaattinen" #: FAutoSaveSettings.resx$$this.Text$Message #: FEditProfile.resx$linkAutoSaveSettings.Text$Message msgid "Auto Save Settings" msgstr "Automaattisen tallennuksen asetukset" #: FPlaceholders.resx$label13.Text$Message msgid "Auto-incrementing number (1 digit)" msgstr "Automaattinen lisäys (1 numero)" #: FPlaceholders.resx$label12.Text$Message msgid "Auto-incrementing number (2 digits)" msgstr "Automaattinen lisäys (2 numeroa)" #: FPlaceholders.resx$label11.Text$Message msgid "Auto-incrementing number (3 digits)" msgstr "Automaattinen lisäys (3 numeroa)" #: FPlaceholders.resx$label10.Text$Message msgid "Auto-incrementing number (4 digits)" msgstr "Automaattinen lisäys (4 numeroa)" #: FOcrSetup.resx$checkBoxRunInBG.Text$Message msgid "Automatically run OCR after scanning" msgstr "Tunnista teksti optisesti automaattisesti skannauksen jälkeen" #: SettingsResources.resx$PageSize_B4$Message msgid "B4 (250x353 mm)" msgstr "B4 (250x353 mm)" #: SettingsResources.resx$PageSize_B5$Message msgid "B5 (176x250 mm)" msgstr "B5 (176x250 mm)" #: FBatchScan.resx$$this.Text$Message #: FDesktop.resx$tsBatchScan.Text$Message msgid "Batch Scan" msgstr "Sarjaskannaus" #: MiscResources.resx$BatchStatusCancelled$Message msgid "Batch cancelled" msgstr "Sarjaskannaus peruutettu" #: MiscResources.resx$BatchStatusComplete$Message msgid "Batch completed successfully" msgstr "Sarjaskannaus tehty onnistuneesti" #: MiscResources.resx$BatchStatusError$Message msgid "Batch scan stopped due to error" msgstr "Sarjaskannaus pysäytetty virheen takia" #: FEditProfile.resx$label3.Text$Message msgid "Bit depth" msgstr "Bittisyvyys" #: MiscResources.resx$FileTypeBmp$Message msgid "Bitmap Files (*.bmp)" msgstr "Bittikarttatiedosto (.bmp)" #: SettingsResources.resx$BitDepth_1BlackAndWhite$Message msgid "Black & White" msgstr "Mustavalkoinen" #: FBlackWhite.resx$$this.Text$Message #: FDesktop.resx$tsBlackWhite.Text$Message #: FViewer.resx$tsBlackWhite.Text$Message msgid "Black and White" msgstr "Mustavalkoinen" #: FAdvancedScanSettings.resx$groupBox3.Text$Message msgid "Blank Pages" msgstr "Tyhjät sivut" #: FEditProfile.resx$label6.Text$Message msgid "Brightness" msgstr "Kirkkaus" #: FBrightnessContrast.resx$$this.Text$Message #: FDesktop.resx$tsBrightnessContrast.Text$Message #: FViewer.resx$tsBrightnessContrast.Text$Message msgid "Brightness / Contrast" msgstr "Kirkkaus / kontrasti" #: SettingsResources.resx$TiffComp_Ccitt4$Message msgid "CCITT4" msgstr "CCITT4" #: FAdvancedScanSettings.resx$btnCancel.Text$Message #: FAuthorize.resx$btnCancel.Text$Message #: FAutoSaveSettings.resx$btnCancel.Text$Message #: FBatchScan.resx$btnCancel.Text$Message #: FDownloadProgress.resx$btnCancel.Text$Message #: FEditProfile.resx$btnCancel.Text$Message #: FEmailSettings.resx$btnCancel.Text$Message #: FImageSettings.resx$btnCancel.Text$Message #: FOcrLanguageDownload.resx$btnCancel.Text$Message #: FOcrSetup.resx$btnCancel.Text$Message #: FPageSize.resx$btnCancel.Text$Message #: FPdfPassword.resx$btnCancel.Text$Message #: FPdfSettings.resx$btnCancel.Text$Message #: FPlaceholders.resx$btnCancel.Text$Message #: FProgress.resx$btnCancel.Text$Message #: FScanProgress.resx$btnCancel.Text$Message #: FSelectDevice.resx$btnCancel.Text$Message #: ImageForm.resx$btnCancel.Text$Message #: MiscResources.resx$Cancel$Message #: OperationProgressNotifyWidget.resx$cancelToolStripMenuItem.Text$Message msgid "Cancel" msgstr "Peruuta" #: MiscResources.resx$CancelBatch$Message msgid "Cancel Batch" msgstr "Peruuta sarjaskannaus" #: MiscResources.resx$BatchStatusCancelling$Message msgid "Cancelling" msgstr "Peruutetaan" #: SettingsResources.resx$HorizontalAlign_Center$Message msgid "Center" msgstr "Keskitä" #: FEmailSettings.resx$btnChangeProvider.Text$Message msgid "Change" msgstr "Muuta" #: FAbout.resx$cbCheckForUpdates.Text$Message msgid "Check for updates" msgstr "Tarkista päivitykset" #: MiscResources.resx$CheckingForUpdates$Message msgid "Checking" msgstr "Tarkistetaan" #: FEmailProvider.resx$$this.Text$Message msgid "Choose Email Provider" msgstr "Valitse sähköpostin lähetystapa" #: MiscResources.resx$ChooseProfile$Message msgid "Choose Profile" msgstr "Valitse profiili" #: FEditProfile.resx$btnChooseDevice.Text$Message msgid "Choose device" msgstr "Valitse laite" #: FDesktop.resx$tsClear.Text$Message #: MiscResources.resx$Clear$Message msgid "Clear" msgstr "Tyhjennä" #: FAutoSaveSettings.resx$cbClearAfterSave.Text$Message msgid "Clear images after saving" msgstr "Pyyhi kuvat tallennukset jälkeen" #: MiscResources.resx$Close$Message msgid "Close" msgstr "Sulje" #: FAdvancedScanSettings.resx$groupBox2.Text$Message #: FPdfSettings.resx$groupCompat.Text$Message msgid "Compatibility" msgstr "Yhteensopivuus" #: FImageSettings.resx$label3.Text$Message msgid "Compression" msgstr "Pakkaus" #: FEditProfile.resx$label7.Text$Message msgid "Contrast" msgstr "Kontrasti" #: FDesktop.resx$ctxCopy.Text$Message #: FProfiles.resx$ctxCopy.Text$Message msgid "Copy" msgstr "Kopioi" #: MiscResources.resx$CopyProgress$Message msgid "Copy Progress" msgstr "Kopioinnin edistyminen" #: MiscResources.resx$Copying$Message msgid "Copying" msgstr "Kopioidaan" #: FAbout.resx$labelCopyright.Text$Message msgid "Copyright 2009, 2012-2018 NAPS2 Contributors" msgstr "Copyright 2009, 2012-2018 NAPS2 Contributors" #: FAdvancedScanSettings.resx$label3.Text$Message msgid "Coverage Threshold" msgstr "Peitto" #: FCrop.resx$$this.Text$Message #: FDesktop.resx$tsCrop.Text$Message #: FViewer.resx$tsCrop.Text$Message msgid "Crop" msgstr "Rajaa" #: FAdvancedScanSettings.resx$cbForcePageSizeCrop.Text$Message msgid "Crop to page size" msgstr "Rajaa sivun kokoon" #: SettingsResources.resx$PageSize_Custom$Message msgid "Custom" msgstr "Mukautett" #: MiscResources.resx$CustomPageSizeFormat$Message msgid "Custom ({0}x{1} {2})" msgstr "Mukautettu ({0}x{1} {2})" #: FPageSize.resx$$this.Text$Message msgid "Custom Page Size" msgstr "Mukautettu sivun koko" #: FDesktop.resx$tsCustomRotation.Text$Message #: FViewer.resx$tsCustomRotation.Text$Message msgid "Custom Rotation" msgstr "Mukautettu kääntäminen" #: SettingsResources.resx$EmailProviderType_CustomSmtp$Message msgid "Custom SMTP" msgstr "Mukautettu SMTP" #: FPlaceholders.resx$label6.Text$Message msgid "Day (01-31)" msgstr "Päivä (01-31)" #: SettingsResources.resx$PdfCompat_Default$Message #: SettingsResources.resx$TwainImpl_Default$Message msgid "Default" msgstr "Oletus" #: FImageSettings.resx$label1.Text$Message #: FPdfSettings.resx$label1.Text$Message msgid "Default File Path" msgstr "Oletuspolku" #: FDesktop.resx$tsDeinterleave.Text$Message msgid "Deinterleave" msgstr "Lomituksen poisto" #: FAdvancedScanSettings.resx$cbWiaDelayBetweenScans.Text$Message msgid "Delay between scans (WIA)" msgstr "Viive skannausten välillä (WIA)" #: FDesktop.resx$ctxDelete.Text$Message #: FDesktop.resx$tsDelete.Text$Message #: FProfiles.resx$btnDelete.Text$Message #: FProfiles.resx$ctxDelete.Text$Message #: FRecover.resx$btnDelete.Text$Message #: FViewer.resx$tsDelete.Text$Message #: MiscResources.resx$Delete$Message msgid "Delete" msgstr "Poista" #: FDesktop.resx$tsDeskew.Text$Message #: FViewer.resx$tsDeskew.Text$Message msgid "Deskew" msgstr "Suorista" #: MiscResources.resx$AutoDeskewProgress$Message msgid "Deskew Progress" msgstr "Suoristuksen eteneminen" #: FAdvancedScanSettings.resx$cbAutoDeskew.Text$Message msgid "Deskew scanned pages" msgstr "Suorista skannatut sivut" #: MiscResources.resx$AutoDeskewing$Message msgid "Deskewing" msgstr "Suoristetaan" #: FEditProfile.resx$label1.Text$Message msgid "Device" msgstr "Laite" #: FPageSize.resx$label2.Text$Message msgid "Dimensions" msgstr "Mittasuhteet" #: FEditProfile.resx$label8.Text$Message msgid "Display name" msgstr "Näyttönimi" #: MiscResources.resx$Donate$Message msgid "Donate" msgstr "Lahjoita" #: FBatchPrompt.resx$btnDone.Text$Message #: FProfiles.resx$btnDone.Text$Message msgid "Done" msgstr "Valmis" #: FOcrLanguageDownload.resx$btnDownload.Text$Message msgid "Download" msgstr "Lataa" #: MiscResources.resx$DownloadError$Message msgid "Download Error" msgstr "Latausvirhe" #: MiscResources.resx$DownloadNeeded$Message msgid "Download Needed" msgstr "Tarvitaan lataus" #: FDownloadProgress.resx$$this.Text$Message msgid "Download Progress" msgstr "Latauksen eteneminen" #: SettingsResources.resx$Source_Duplex$Message msgid "Duplex" msgstr "Kaksipuoleinen" #: FProfiles.resx$btnEdit.Text$Message #: FProfiles.resx$ctxEdit.Text$Message msgid "Edit" msgstr "Muokkaa" #: FDesktop.resx$tsdEmailPDF.Text$Message msgid "Email PDF" msgstr "Liitä PDF sähköpostiin" #: MiscResources.resx$EmailPdfProgress$Message msgid "Email PDF Progress" msgstr "PDF - postituksen eteneminen" #: FDesktop.resx$tsEmailSettings.Text$Message #: FEmailSettings.resx$$this.Text$Message msgid "Email Settings" msgstr "Sähköpostiasetukset" #: FEditProfile.resx$cbAutoSave.Text$Message msgid "Enable Auto Save" msgstr "Salli automaattinen tallennus" #: FPdfSettings.resx$cbEncryptPdf.Text$Message msgid "Encrypt PDF" msgstr "Salaa PDF" #: FPdfSettings.resx$groupProtection.Text$Message msgid "Encryption" msgstr "Salaus" #: MiscResources.resx$FileTypeEmf$Message msgid "Enhanced Windows MetaFile (*.emf)" msgstr "Edistynyt Windows-metatiedosto (*.emf)" #: FError.resx$$this.Text$Message #: MiscResources.resx$Error$Message msgid "Error" msgstr "Virhe" #: FOcrLanguageDownload.resx$labelSizeEstimate.Text$Message #: MiscResources.resx$EstimatedDownloadSize$Message msgid "Estimated download size: {0} MB" msgstr "Arvioitu latauskoko {0} MB" #: MiscResources.resx$FileTypeExif$Message msgid "Exchangeable Image File (*.exif)" msgstr "Exchangeable Image File (*.exif)" #: FAdvancedScanSettings.resx$cbExcludeBlankPages.Text$Message msgid "Exclude blank pages" msgstr "Ohita tyhjät sivut" #: SettingsResources.resx$Source_Feeder$Message msgid "Feeder" msgstr "Syöttölaite" #: FPlaceholders.resx$label1.Text$Message msgid "File Name" msgstr "Tiedoston nimi" #: FAutoSaveSettings.resx$lblFilePath.Text$Message #: FBatchScan.resx$lblFilePath.Text$Message msgid "File path" msgstr "Tiedostopolku" #: FDesktop.resx$tsFlip.Text$Message #: FViewer.resx$tsFlip.Text$Message msgid "Flip" msgstr "Käännä" #: FAdvancedScanSettings.resx$cbFlipDuplex.Text$Message msgid "Flip duplexed pages" msgstr "Käännä kaksipuoleiset sivut" #: FImageSettings.resx$lblWarning.Text$Message msgid "" "For high JPEG qualities (80+), also increase Image Quality in your profile " "for best results" msgstr "" "Lisää myös kuvan laatua profiilissasi laadukkaita JPEG (80+) kuvia varten" #: MiscResources.resx$FileTypeGif$Message msgid "GIF File (*.gif)" msgstr "GIF-tiedosto (*.gif)" #: FOcrSetup.resx$linkGetLanguages.Text$Message msgid "Get more languages" msgstr "Hae lisää kieliä" #: SettingsResources.resx$Source_Glass$Message msgid "Glass" msgstr "Lasi" #: SettingsResources.resx$EmailProviderType_Gmail$Message msgid "Gmail" msgstr "Gmail" #: SettingsResources.resx$BitDepth_8Grayscale$Message msgid "Grayscale" msgstr "Harmaasävy" #: FEditProfile.resx$label9.Text$Message msgid "Horizontal align" msgstr "Vaaka-asettelu" #: FPlaceholders.resx$label7.Text$Message msgid "Hour (0-23)" msgstr "Tunti (0-23)" #: FDesktop.resx$tsHueSaturation.Text$Message #: FHueSaturation.resx$$this.Text$Message #: FViewer.resx$tsHueSaturation.Text$Message msgid "Hue / Saturation" msgstr "Sävy / kylläisyys" #: FAbout.resx$label1.Text$Message msgid "Icons from" msgstr "Käytettyjen kuvakkeiden lähde" #: FDesktop.resx$tsdImage.Text$Message msgid "Image" msgstr "Kuva" #: MiscResources.resx$FileTypeImageFiles$Message msgid "Image Files" msgstr "Kuvatiedostot" #: FAdvancedScanSettings.resx$groupBox1.Text$Message msgid "Image Quality" msgstr "Kuvan laatu" #: FDesktop.resx$tsImageSettings.Text$Message #: FImageSettings.resx$$this.Text$Message msgid "Image Settings" msgstr "Kuva-asetukset" #: MiscResources.resx$ImageSaved$Message msgid "Image saved" msgstr "Kuva lalletettu" #: FDesktop.resx$tsImport.Text$Message msgid "Import" msgstr "Tuo" #: MiscResources.resx$ImportProgress$Message msgid "Import Progress" msgstr "Tuonnin eteneminen" #: MiscResources.resx$Importing$Message msgid "Importing" msgstr "Tuodaan" #: MiscResources.resx$ImportingFormat$Message msgid "Importing {0}" msgstr "Tuodaan {0}" #: MiscResources.resx$Install$Message msgid "Install {0}" msgstr "Asenna {0}" #: MiscResources.resx$InstallComplete$Message msgid "Installation Complete" msgstr "Asennettu" #: MiscResources.resx$InstallFailedTitle$Message msgid "Installation Failed" msgstr "Asennus epäonnistui" #: MiscResources.resx$InstallCompletePromptRestart$Message msgid "Installation complete. Do you want to restart NAPS2 now?" msgstr "Asennus on valmis. Halutatko käynnistään NAPS2:n uudelleen?" #: MiscResources.resx$InstallFailed$Message msgid "Installation failed" msgstr "Asennus epäonnistui" #: FDesktop.resx$tsInterleave.Text$Message msgid "Interleave" msgstr "Lomita" #: MiscResources.resx$FileTypeJpeg$Message msgid "JPEG File (*.jpg, *.jpeg)" msgstr "JPEG-tiedosto (*.jpg, *.jpeg)" #: FImageSettings.resx$groupJpeg.Text$Message msgid "Jpeg Quality" msgstr "Jpeg - laatu" #: FPdfSettings.resx$label6.Text$Message msgid "Keywords" msgstr "Avainsanat" #: SettingsResources.resx$TiffComp_Lzw$Message msgid "LZW" msgstr "LZW" #: FDesktop.resx$toolStripDropDownButton1.Text$Message msgid "Language" msgstr "Kieli" #: SettingsResources.resx$HorizontalAlign_Left$Message msgid "Left" msgstr "Vasen" #: SettingsResources.resx$TwainImpl_Legacy$Message msgid "Legacy (native UI only)" msgstr "Perinteinen (vain natiivikäyttöliittymä)" #: FBatchScan.resx$rdLoadIntoNaps2.Text$Message msgid "Load images into NAPS2" msgstr "Lataa kuvia NAPS2:een" #: FDesktop.resx$tStrip.Text$Message msgid "Main toolbar" msgstr "Työkalupalkki" #: FOcrSetup.resx$checkBoxEnableOcr.Text$Message msgid "Make PDFs searchable using OCR" msgstr "Mahdollista haku PDF:issä optisen tekstintunnistuksen avulla" #: FAdvancedScanSettings.resx$cbHighQuality.Text$Message msgid "Maximum quality (large files)" msgstr "Korkein laatu (suuret tiedostot)" #: FPdfSettings.resx$groupMetadata.Text$Message msgid "Metadata" msgstr "Metatiedot" #: FPlaceholders.resx$label8.Text$Message msgid "Minute (00-59)" msgstr "Minuutti (00-59)" #: FPlaceholders.resx$label5.Text$Message msgid "Month (01-12)" msgstr "Kuukausi (01-12)" #: FAutoSaveSettings.resx$linkPatchCodeInfo.Text$Message #: FBatchScan.resx$linkPatchCodeInfo.Text$Message msgid "More info" msgstr "Lisätietoja" #: FDesktop.resx$tsMove.SecondText$Message msgid "Move Down" msgstr "Siirrä alas" #: FDesktop.resx$tsMove.FirstText$Message msgid "Move Up" msgstr "Siirrä ylös" #: FBatchScan.resx$rdMultipleScansDelay.Text$Message msgid "Multiple scans (fixed delay between scans)" msgstr "Monta skannausta (vakioviive skannausten välillä)" #: FBatchScan.resx$rdMultipleScansPrompt.Text$Message msgid "Multiple scans (prompt between scans)" msgstr "Monta skannausta (kysy skannausten välillä)" #: MiscResources.resx$NAPS2$Message msgid "NAPS2" msgstr "NAPS2" #: MiscResources.resx$DonatePrompt$Message msgid "NAPS2 is completely free. Consider making a donation" msgstr "NAPS2 on täysin ilmainen. Harkitsethan lahjoitusta" #: FPageSize.resx$label1.Text$Message msgid "Name (optional)" msgstr "Nimi (valinnainen)" #: MiscResources.resx$NameMissing$Message msgid "Name missing" msgstr "Nimi puuttuu" #: FProfiles.resx$btnAdd.Text$Message msgid "New" msgstr "Uusi" #: FDesktop.resx$tsNewProfile.Text$Message msgid "New Profile" msgstr "Uusi profiili" #: FViewer.resx$tsNext.Text$Message msgid "Next" msgstr "Seuraava" #: FBatchPrompt.resx$$this.Text$Message msgid "Next Scan" msgstr "Seuraava skannaus" #: MiscResources.resx$NoDeviceSelected$Message msgid "No device selected" msgstr "Laitetta ei valittu" #: MiscResources.resx$NoPagesInFeeder$Message msgid "No pages are in the feeder" msgstr "Syöttölaite on tyjä" #: FEmailSettings.resx$lblProvider.Text$Message #: SettingsResources.resx$EmailProvider_NotSelected$Message msgid "No provider selected" msgstr "Tapaa ei ole valittu" #: MiscResources.resx$NoDevicesFound$Message msgid "No scanning device was found" msgstr "Skannauslaitetta ei löydy" #: MiscResources.resx$NoUpdates$Message msgid "No updates available" msgstr "Ei päivityksiä" #: SettingsResources.resx$TiffComp_None$Message msgid "None" msgstr "Ei mitään" #: FDesktop.resx$$this.Text$Message msgid "Not Another PDF Scanner 2" msgstr "Not Another PDF Scanner 2" #: FRecover.resx$btnCancel.Text$Message msgid "Not Now" msgstr "Ei nyt" #: FBatchScan.resx$lblNumberOfScans.Text$Message msgid "Number of scans" msgstr "Skannauksia" #: FDesktop.resx$tsOcr.Text$Message msgid "OCR" msgstr "OCR" #: FOcrLanguageDownload.resx$$this.Text$Message msgid "OCR Download" msgstr "OCR lataus" #: MiscResources.resx$OcrProgress$Message msgid "OCR Progress" msgstr "OCR edistyminen" #: FOcrSetup.resx$$this.Text$Message msgid "OCR Setup" msgstr "OCR asetus" #: FOcrSetup.resx$label1.Text$Message msgid "OCR language" msgstr "OCR kieli" #: FOcrSetup.resx$labelOcrMode.Text$Message msgid "OCR mode" msgstr "OCR muoto" #: FAbout.resx$okButton.Text$Message #: FAdvancedScanSettings.resx$btnOK.Text$Message #: FAutoSaveSettings.resx$btnOK.Text$Message #: FEditProfile.resx$btnOK.Text$Message #: FEmailSettings.resx$btnOK.Text$Message #: FError.resx$btnOK.Text$Message #: FImageSettings.resx$btnOK.Text$Message #: FOcrSetup.resx$btnOK.Text$Message #: FPageSize.resx$btnOK.Text$Message #: FPdfPassword.resx$btnOK.Text$Message #: FPdfSettings.resx$btnOK.Text$Message #: FPlaceholders.resx$btnOK.Text$Message #: ImageForm.resx$btnOK.Text$Message msgid "OK" msgstr "OK" #: FAdvancedScanSettings.resx$cbWiaOffsetWidth.Text$Message msgid "Offset width based on alignment (WIA)" msgstr "Siirtymän suurus kohdistuksen perusteella (WIA)" #: SettingsResources.resx$TwainImpl_OldDsm$Message msgid "Old DSM" msgstr "Vanha DSM" #: FAutoSaveSettings.resx$rdFilePerPage.Text$Message #: FBatchScan.resx$rdFilePerPage.Text$Message msgid "One file per page" msgstr "Tiedosto joka sivusta" #: FAutoSaveSettings.resx$rdFilePerScan.Text$Message #: FBatchScan.resx$rdFilePerScan.Text$Message msgid "One file per scan" msgstr "Skannauksesta yksi tiedosto" #: MiscResources.resx$FilesCouldNotBeDownloaded$Message msgid "One or more files could not be downloaded" msgstr "Tiedosto(j)a ei voitu ladata" #: NotifyWidget.resx$openFolderToolStripMenuItem.Text$Message msgid "Open Folder" msgstr "Avaa kansio" #: MiscResources.resx$ActiveOperations$Message msgid "Operation in Progress" msgstr "Toiminto käynnissä" #: SettingsResources.resx$EmailProviderType_OutlookWeb$Message msgid "Outlook Web Access" msgstr "Outlook Web Access" #: FBatchScan.resx$groupboxOutput.Text$Message msgid "Output" msgstr "Tulos" #: MiscResources.resx$OverwriteFile$Message msgid "Overwrite File" msgstr "Korvaa tiedosto" #: FPdfSettings.resx$lblOwnerPassword.Text$Message msgid "Owner Password" msgstr "Omistajan salasana" #: MiscResources.resx$FileTypePdf$Message msgid "PDF Document (*.pdf)" msgstr "PDF-tiedosto (*.pdf)" #: FDesktop.resx$tsPDFSettings.Text$Message #: FDesktop.resx$tsPdfSettings2.Text$Message #: FPdfSettings.resx$$this.Text$Message msgid "PDF Settings" msgstr "PDF - asetukset" #: MiscResources.resx$PdfSaved$Message msgid "PDF saved" msgstr "PDF talletettu" #: SettingsResources.resx$PdfCompat_PdfA1B$Message msgid "PDF/A-1b" msgstr "PDF/A-1b" #: SettingsResources.resx$PdfCompat_PdfA2B$Message msgid "PDF/A-2b" msgstr "PDF/A-2b" #: SettingsResources.resx$PdfCompat_PdfA3B$Message msgid "PDF/A-3b" msgstr "PDF/A-3b" #: SettingsResources.resx$PdfCompat_PdfA3U$Message msgid "PDF/A-3u" msgstr "PDF/A-3u" #: MiscResources.resx$FileTypePng$Message msgid "PNG File (*.png)" msgstr "PNG-tiedosto (*.png)" #: FEditProfile.resx$label4.Text$Message msgid "Page size" msgstr "Sivun koko" #: FEditProfile.resx$label2.Text$Message msgid "Paper source" msgstr "Paperilähde" #: FPdfPassword.resx$$this.Text$Message msgid "Password" msgstr "Salasana" #: FDesktop.resx$ctxPaste.Text$Message #: FProfiles.resx$ctxPaste.Text$Message msgid "Paste" msgstr "Liitä" #: FAutoSaveSettings.resx$linkPlaceholders.Text$Message #: FBatchScan.resx$linkPlaceholders.Text$Message #: FEmailSettings.resx$linkPlaceholders.Text$Message #: FImageSettings.resx$linkPlaceholders.Text$Message #: FPdfSettings.resx$linkPlaceholders.Text$Message #: FPlaceholders.resx$$this.Text$Message #: FPlaceholders.resx$gboxPlaceholders.Text$Message msgid "Placeholders" msgstr "Varaukset" #: FAdvancedScanSettings.resx$groupBox4.Text$Message msgid "Post-processing" msgstr "Jälkikäsittely" #: FBatchScan.resx$lblStatus.Text$Message msgid "Press Start when ready" msgstr "Paina Start, kun olet vlamis" #: FPlaceholders.resx$label2.Text$Message #: FViewer.resx$$this.Text$Message msgid "Preview" msgstr "Esikatsele" #: FViewer.resx$tsPrev.Text$Message msgid "Previous" msgstr "Edellinen" #: FDesktop.resx$tsPrint.Text$Message msgid "Print" msgstr "Tulosta" #: FBatchScan.resx$lblProfile.Text$Message msgid "Profile" msgstr "Profiilit" #: FEditProfile.resx$$this.Text$Message msgid "Profile Settings" msgstr "Profiiliasetukset" #: FDesktop.resx$tsProfiles.Text$Message #: FProfiles.resx$$this.Text$Message msgid "Profiles" msgstr "Profiilit" #: FAutoSaveSettings.resx$cbPromptForFilePath.Text$Message msgid "Prompt for file path" msgstr "Kysy tiedostopolkua" #: FEmailSettings.resx$groupBox1.Text$Message msgid "Provider" msgstr "Palveluntarjoaja" #: FBatchPrompt.resx$lblStatus.Text$Message msgid "Ready for scan {0}" msgstr "Valmis skannaamaan {0}" #: FRecover.resx$btnRecover.Text$Message msgid "Recover" msgstr "Palauta" #: FRecover.resx$$this.Text$Message msgid "Recover Scanned Images" msgstr "Palauta skannatut kuvat" #: MiscResources.resx$Recovering$Message msgid "Recovering" msgstr "Palautetaan" #: MiscResources.resx$RecoveryProgress$Message msgid "Recovery Progress" msgstr "Palauttamisen eteneminen" #: FEmailSettings.resx$cbRememberSettings.Text$Message #: FImageSettings.resx$cbRememberSettings.Text$Message #: FPdfSettings.resx$cbRememberSettings.Text$Message msgid "Remember these settings" msgstr "Muista asetukset" #: FDesktop.resx$tsdReorder.Text$Message msgid "Reorder" msgstr "Järjestä uudelleen" #: FDesktop.resx$tsReset.Text$Message msgid "Reset" msgstr "Palauta" #: MiscResources.resx$ResetImage$Message msgid "Reset Image" msgstr "Palauta kuva" #: FEditProfile.resx$label5.Text$Message msgid "Resolution" msgstr "Tarkkuus" #: FAdvancedScanSettings.resx$btnRestoreDefaults.Text$Message #: FEmailSettings.resx$btnRestoreDefaults.Text$Message #: FImageSettings.resx$btnRestoreDefaults.Text$Message #: FPdfSettings.resx$btnRestoreDefaults.Text$Message msgid "Restore Defaults" msgstr "Palauta oletusarvoihin" #: FAdvancedScanSettings.resx$cbWiaRetryOnFailure.Text$Message msgid "Retry on failure (WIA)" msgstr "Yritä uudelleen virhetilanteessa (WIA)" #: FDesktop.resx$tsReverse.Text$Message msgid "Reverse" msgstr "Taaksepäin" #: ImageForm.resx$btnRevert.Text$Message msgid "Revert" msgstr "Käännä" #: SettingsResources.resx$HorizontalAlign_Right$Message msgid "Right" msgstr "oikealle" #: FDesktop.resx$tsdRotate.Text$Message #: FRotate.resx$$this.Text$Message #: FViewer.resx$tsdRotate.Text$Message msgid "Rotate" msgstr "Käännä" #: FDesktop.resx$tsRotateLeft.Text$Message #: FViewer.resx$tsRotateLeft.Text$Message msgid "Rotate Left" msgstr "Käännä vasemmalle" #: FDesktop.resx$tsRotateRight.Text$Message #: FViewer.resx$tsRotateRight.Text$Message msgid "Rotate Right" msgstr "Käännä oikealle" #: FProgress.resx$btnRunInBG.Text$Message msgid "Run in Background" msgstr "Aja taustalla" #: MiscResources.resx$RunningOcr$Message msgid "Running OCR" msgstr "Optinen tunnistus meneillään" #: FEditProfile.resx$rdSANE.Text$Message msgid "SANE Driver" msgstr "SANE - ajuri" #: FViewer.resx$tsSaveImage.Text$Message msgid "Save Image" msgstr "Tallenna kuva" #: FDesktop.resx$tsdSaveImages.Text$Message msgid "Save Images" msgstr "Tallenna kuvat" #: MiscResources.resx$SaveImagesProgress$Message msgid "Save Images Progress" msgstr "Kuvien tallennuksen eteneminen" #: FDesktop.resx$tsdSavePDF.Text$Message #: FViewer.resx$tsSavePDF.Text$Message msgid "Save PDF" msgstr "Tallenna PDF" #: MiscResources.resx$SavePdfProgress$Message msgid "Save PDF Progress" msgstr "PDF:n tallennuksen eteneminen" #: FBatchScan.resx$rdSaveToSingleFile.Text$Message msgid "Save to a single file" msgstr "Tallenna yhteen tiedostoon" #: FBatchScan.resx$rdSaveToMultipleFiles.Text$Message msgid "Save to multiple files" msgstr "Tallenna useaan tiedostoon" #: MiscResources.resx$BatchStatusSaving$Message msgid "Saving batch results" msgstr "Tallennetaan sarjaskannauksen tuloksia" #: MiscResources.resx$SavingFormat$Message msgid "Saving {0}" msgstr "Tallennetaan {0}" #: FEditProfile.resx$label10.Text$Message msgid "Scale" msgstr "Kuvasuhde" #: TiffViewerCtl.resx$tsStretch.ToolTipText$Message msgid "Scale With Window" msgstr "Skaalaa ikkunan mukaan" #: FBatchPrompt.resx$btnScan.Text$Message #: FDesktop.resx$tsScan.Text$Message #: FProfiles.resx$btnScan.Text$Message #: FProfiles.resx$ctxScan.Text$Message #: MiscResources.resx$Scan$Message msgid "Scan" msgstr "Skannaa" #: FBatchScan.resx$groupboxScanConfig.Text$Message msgid "Scan Configuration" msgstr "Skannausasetukset" #: MiscResources.resx$ScannedImage$Message msgid "Scanned Image" msgstr "Skannattu kuva" #: FScanProgress.resx$labelPage.Text$Message #: MiscResources.resx$BatchStatusPage$Message #: MiscResources.resx$ScanPageProgress$Message msgid "Scanning page {0}" msgstr "Skannataan kuvaa {0}" #: MiscResources.resx$BatchStatusScanPage$Message msgid "Scanning page {0} (scan {1})" msgstr "Skannataan sivua {0} (skannaus {1})" #: FPlaceholders.resx$label9.Text$Message msgid "Second (00-59)" msgstr "Sekunti (00-59)" #: FSelectDevice.resx$btnSelect.Text$Message msgid "Select" msgstr "Valitse" #: FDesktop.resx$ctxSelectAll.Text$Message msgid "Select All" msgstr "Valitse kaikki" #: FSelectDevice.resx$$this.Text$Message msgid "Select Source" msgstr "Valitse mistä" #: MiscResources.resx$SelectProfileBeforeScan$Message msgid "Select a profile before clicking Scan" msgstr "Valitse profiili ennen kuin painat Skannaa" #: FOcrLanguageDownload.resx$label3.Text$Message msgid "Select one or more languages" msgstr "Valitse yksi tai useampi kieli" #: FDesktop.resx$tsEmailPDFSelected.Text$Message #: FDesktop.resx$tsReverseSelected.Text$Message #: FDesktop.resx$tsSaveImagesSelected.Text$Message #: FDesktop.resx$tsSavePDFSelected.Text$Message #: MiscResources.resx$SelectedCount$Message msgid "Selected ({0})" msgstr "Valittu ({0})" #: FAutoSaveSettings.resx$rdSeparateByPatchT.Text$Message #: FBatchScan.resx$rdSeparateByPatchT.Text$Message msgid "Separate files by Patch-T" msgstr "Erota sivut Patch-T - koodilla" #: FProfiles.resx$ctxSetDefault.Text$Message msgid "Set Default" msgstr "Asetta oletus" #: FDesktop.resx$tsSharpen.Text$Message #: FSharpen.resx$$this.Text$Message #: FViewer.resx$tsSharpen.Text$Message msgid "Sharpen" msgstr "Terävöitä" #: FPdfSettings.resx$cbShowOwnerPassword.Text$Message #: FPdfSettings.resx$cbShowUserPassword.Text$Message msgid "Show" msgstr "Näytä" #: FImageSettings.resx$cbSinglePageTiff.Text$Message msgid "Single page files" msgstr "Yhden sivun tiedostot" #: FBatchScan.resx$rdSingleScan.Text$Message msgid "Single scan" msgstr "Yksittäisskannaus" #: FImageSettings.resx$cbSkipSavePrompt.Text$Message #: FPdfSettings.resx$cbSkipSavePrompt.Text$Message msgid "Skip save prompt" msgstr "Ohita talleta - kysymys" #: FBatchScan.resx$btnStart.Text$Message msgid "Start" msgstr "Aloita" #: FAdvancedScanSettings.resx$cbForcePageSize.Text$Message msgid "Stretch to page size" msgstr "Venytä sivun kokoon" #: FPdfSettings.resx$label5.Text$Message msgid "Subject" msgstr "Aihe" #: MiscResources.resx$FileTypeTiff$Message msgid "TIFF File (*.tiff, *.tif)" msgstr "TIFF-tiedosto (*.tiff, *.tif)" #: FEditProfile.resx$rdTWAIN.Text$Message msgid "TWAIN Driver" msgstr "TWAIN-ajuri" #: FError.resx$linkDetails.Text$Message msgid "Technical Details" msgstr "Tekniset yksityiskohdat" #: MiscResources.resx$TesseractNotAvailable$Message msgid "" "The OCR engine is not available. Make sure to install the required package" msgstr "OCR - moottori ei ole käytettävissä. Asenna tarvittava osat" #: MiscResources.resx$SaneNotAvailable$Message msgid "" "The SANE driver is not available. Make sure to install the required packages" msgstr "SANE - ajuri ei ole käytettävissä. Asenna tarvittava osat" #: MiscResources.resx$ImportErrorCouldNot$Message msgid "The file '{0}' could not be imported" msgstr "Tiedostoa '{0}' ei voitu tuoda" #: MiscResources.resx$ImportErrorNAPS2Pdf$Message msgid "" "The file '{0}' could not be imported. Only PDF files generated by NAPS2 can " "be imported" msgstr "" "Tiedostoa '{0}' ei voitu tuoda. Vain NAPS2:lla luotuja PDF - tiedostoja " "voidaan tuoda" #: MiscResources.resx$FileInUse$Message msgid "The file could not be overwritten because it is currently in use" msgstr "Tiedostoa ei voitu korvata, koska se on käytössä" #: MiscResources.resx$ConfirmOverwriteFile$Message msgid "The file {0} already exists. Do you want to overwrite it?" msgstr "Tiedosto {0} on jo olemassa. Haluatko korvata tiedoston?" #: FPdfPassword.resx$lblPrompt.Text$Message msgid "The following file is encrypted and requires a password to open: {0}" msgstr "Seuraava tiedosto on salattu ja tarvitsee salasanan avaukseen: {0}" #: MiscResources.resx$DevicePaperJam$Message msgid "The scanner has a paper jam" msgstr "Skannerissa on paperitukos" #: MiscResources.resx$DeviceWarmingUp$Message msgid "The scanner is warming up" msgstr "Skanneri lämpiää" #: MiscResources.resx$DeviceCoverOpen$Message msgid "The scanner's cover is open" msgstr "Skannerin kansi on auki" #: MiscResources.resx$DriverNotSupported$Message msgid "The selected driver is not supported on this system" msgstr "Valittua ajuria ei tueta tässä järjestelmässä" #: MiscResources.resx$DeviceNotFound$Message msgid "The selected scanner could not be found" msgstr "Valittua skanneria ei löydy" #: MiscResources.resx$NoFeederSupport$Message msgid "" "The selected scanner does not support using a feeder. If your scanner does " "have a feeder, try using a different driver" msgstr "" "Valittu skanneri ei tue syöttölaitetta. Jos skannerissasi on syöttölaite, " "kokeile toista ajuria" #: MiscResources.resx$NoDuplexSupport$Message msgid "" "The selected scanner does not support using duplex. If your scanner is " "supposed to support duplex, try using a different driver" msgstr "" "Valittu skanneri ei tue monipuoleisuutta. Jos skannerisi luultavasti tukee " "sitä, kokeile toista ajuria" #: MiscResources.resx$DeviceBusy$Message msgid "The selected scanner is busy" msgstr "Valittu skanneri on varattu" #: MiscResources.resx$DeviceOffline$Message msgid "The selected scanner is offline" msgstr "Valittu skanneri on offline-tilassa" #: FImageSettings.resx$groupTiff.Text$Message msgid "Tiff Options" msgstr "Tiff - vaihtoehdot" #: FBatchScan.resx$lblTimeBetweenScans.Text$Message msgid "Time between scans (seconds)" msgstr "Aika skannausten välillä (sekuntia)" #: FPdfSettings.resx$label4.Text$Message msgid "Title" msgstr "Otsikko" #: FAdvancedScanSettings.resx$label1.Text$Message msgid "Twain Implementation" msgstr "Twain - toteutus" #: SettingsResources.resx$PageSize_Legal$Message msgid "US Legal (8.5x14 in)" msgstr "US Legal (8.5x14 in)" #: SettingsResources.resx$PageSize_Letter$Message msgid "US Letter (8.5x11 in)" msgstr "US Letter (8.5x11 in)" #: MiscResources.resx$UnsavedChanges$Message msgid "Unsaved Changes" msgstr "Tallentamattomia muutoksia" #: MiscResources.resx$UpdateProgress$Message msgid "Update Progress" msgstr "Päivityksen eteneminen" #: MiscResources.resx$Updating$Message msgid "Updating" msgstr "Päivitetään" #: MiscResources.resx$UploadingEmail$Message msgid "Uploading email" msgstr "Lähetään sähköpostia" #: FEditProfile.resx$rdbNative.Text$Message msgid "Use native UI" msgstr "Käytä laiitteen käyttöliittymää" #: FEditProfile.resx$rdbConfig.Text$Message msgid "Use predefined settings" msgstr "Käytä esimääritettyjä asetuksia" #: FPdfSettings.resx$lblUserPassword.Text$Message msgid "User Password" msgstr "Käyttäjän salasana" #: FOcrLanguageDownload.resx$label1.Text$Message msgid "Using OCR requires you to download each language you want to scan" msgstr "" "OCR:n käyttäminen vaatii, että lataat kaikki kielet, joilla haluat skannata" #: MiscResources.resx$Version$Message msgid "Version {0}" msgstr "Versio {0}" #: FDesktop.resx$ctxView.Text$Message #: FDesktop.resx$tsView.Text$Message msgid "View" msgstr "Näytä" #: FEditProfile.resx$rdWIA.Text$Message msgid "WIA Driver" msgstr "WIA-ajuri" #: FTwainGui.resx$label1.Text$Message msgid "Waiting for TWAIN to complete" msgstr "Odotetaan TWAINin valmistumista" #: FAuthorize.resx$lblWaiting.Text$Message msgid "Waiting for authorization" msgstr "Odotetaan valtuutusta" #: MiscResources.resx$BatchStatusWaitingForScan$Message msgid "Waiting for scan {0}" msgstr "Odotetaan skannausta {0}" #: FAdvancedScanSettings.resx$label2.Text$Message msgid "White Threshold" msgstr "Valkoisen raja" #: FPageSize.resx$labelX.Text$Message msgid "X" msgstr "X" #: FPlaceholders.resx$label3.Text$Message msgid "Year" msgstr "Vuosi" #: FPlaceholders.resx$label4.Text$Message msgid "Year (00-99)" msgstr "Vuosi (00-99)" #: MiscResources.resx$PdfNoPermissionToExtractContent$Message msgid "You do not have permission to copy content from the file '{0}'" msgstr "Sinulla ei ole oikeuksia kopioida tiedoston '{0}' sisältöä" #: MiscResources.resx$DontHavePermission$Message msgid "You don't have permission to save files at this location" msgstr "Sinulla ei ole oikeuksia tallentaa tiedostoja tänne" #: MiscResources.resx$ExitWithUnsavedChanges$Message msgid "" "You have unsaved changes. Are you sure you want to exit and discard those " "changes?" msgstr "" "Sinulla on tallentamattomia muutoksia. Oletko varma, että haluat lopettaa ja " "menettää muutokset?" #: TiffViewerCtl.resx$tsZoom.ToolTipText$Message msgid "Zoom" msgstr "Muuta kokoa" #: TiffViewerCtl.resx$tsZoomActual.ToolTipText$Message msgid "Zoom Actual" msgstr "Alkuperäiseen kokoon" #: TiffViewerCtl.resx$tsZoomPlus.ToolTipText$Message msgid "Zoom In" msgstr "Suurenna" #: TiffViewerCtl.resx$tsZoomOut.ToolTipText$Message msgid "Zoom Out" msgstr "Pienennä" #: SettingsResources.resx$PageSizeUnit_Centimetre$Message msgid "cm" msgstr "cm" #: FAbout.resx$linkLabel2.Text$Message msgid "http://www.fatcow.com/free-icons" msgstr "http://www.fatcow.com/free-icons" #: FAbout.resx$linkLabel1.Text$Message msgid "http://www.naps2.com" msgstr "http://www.naps2.com" #: SettingsResources.resx$PageSizeUnit_Inch$Message msgid "in" msgstr "tuuma" #: SettingsResources.resx$PageSizeUnit_Millimetre$Message msgid "mm" msgstr "mm" #: FViewer.resx$lblPageTotal.Text$Message #: MiscResources.resx$OfN$Message msgid "of {0}" msgstr "{0}:sta" #: SettingsResources.resx$TwainImpl_X64$Message msgid "x64" msgstr "x64" #: MiscResources.resx$NamedPageSizeFormat$Message msgid "{0} ({1}x{2} {3})" msgstr "{0} ({1}x{2} {3})" #: FDownloadProgress.resx$labelSub.Text$Message #: MiscResources.resx$SizeProgress$Message msgid "{0} / {1} MB" msgstr "{0} / {1} MB" #: FDownloadProgress.resx$labelTop.Text$Message #: MiscResources.resx$FilesProgressFormat$Message msgid "{0} / {1} files" msgstr "{0} / {1} tiedostoa" #: FRecover.resx$lblPrompt.Text$Message msgid "" "{0} image(s) scanned on {1} at {2} may not have been saved, and are " "recoverable. Do you want to recover them?" msgstr "" "{0} kuva(a) skannattu {1} {2} ei ehkä ole tallennettu ja voidaan palauttaa. " "Haluatko palauttaa?" #: MiscResources.resx$ImagesSaved$Message msgid "{0} images saved" msgstr "{0} kuva(a) tallennettu" #: MiscResources.resx$PdfStatus$Message msgid "{0} of {1}" msgstr "{0} / {1}"
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>Uses of Class javax.xml.xpath.XPathEvaluationResult.XPathResultType (Java SE 12 &amp; JDK 12 )</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script> <script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script> <script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class javax.xml.xpath.XPathEvaluationResult.XPathResultType (Java SE 12 & JDK 12 )"; } } catch(err) { } //--> var pathtoroot = "../../../../../"; var useModuleDirectories = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="../../../../module-summary.html">Module</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div> </div> <div class="subNav"> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> </div> <a id="skip.navbar.top"> <!-- --> </a> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <main role="main"> <div class="header"> <h2 title="Uses of Class javax.xml.xpath.XPathEvaluationResult.XPathResultType" class="title">Uses of Class<br>javax.xml.xpath.XPathEvaluationResult.XPathResultType</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <div class="useSummary"> <table> <caption><span>Packages that use <a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <th class="colFirst" scope="row"><a href="#javax.xml.xpath">javax.xml.xpath</a></th> <td class="colLast"> <div class="block">Provides an <em>object-model neutral</em> API for the evaluation of XPath expressions and access to the evaluation environment.</div> </td> </tr> </tbody> </table> </div> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"> <section role="region"><a id="javax.xml.xpath"> <!-- --> </a> <h3>Uses of <a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a> in <a href="../package-summary.html">javax.xml.xpath</a></h3> <div class="useSummary"> <table> <caption><span>Methods in <a href="../package-summary.html">javax.xml.xpath</a> that return <a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">XPathEvaluationResult.</span><code><span class="memberNameLink"><a href="../XPathEvaluationResult.html#type()">type</a></span>()</code></th> <td class="colLast"> <div class="block">Return the result type as an enum specified by <code>XPathResultType</code></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">XPathEvaluationResult.XPathResultType.</span><code><span class="memberNameLink"><a href="../XPathEvaluationResult.XPathResultType.html#valueOf(java.lang.String)">valueOf</a></span>&#8203;(<a href="../../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;name)</code></th> <td class="colLast"> <div class="block">Returns the enum constant of this type with the specified name.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">XPathEvaluationResult.XPathResultType</a>[]</code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">XPathEvaluationResult.XPathResultType.</span><code><span class="memberNameLink"><a href="../XPathEvaluationResult.XPathResultType.html#values()">values</a></span>()</code></th> <td class="colLast"> <div class="block">Returns an array containing the constants of this enum type, in the order they are declared.</div> </td> </tr> </tbody> </table> </div> </section> </li> </ul> </li> </ul> </div> </main> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="../../../../module-summary.html">Module</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../XPathEvaluationResult.XPathResultType.html" title="enum in javax.xml.xpath">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div> </div> <a id="skip.navbar.bottom"> <!-- --> </a> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&amp;id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../../../legal/copyright.html">Copyright</a> &copy; 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved. Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>. <!-- Version 12.0.2+10 --></small></p> </footer> </body> </html>
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> @interface IASCountryCodesArray : NSObject { } + (id)countryCodesArray; + (id)continentsDictionary; @end
{ "pile_set_name": "Github" }
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaskDirective } from './mask.directive'; @NgModule({ declarations: [MaskDirective], imports: [CommonModule], exports: [MaskDirective], }) export class MaskModule {}
{ "pile_set_name": "Github" }
commandlinefu_id: 16768 translator: weibo: '' hide: true command: |- AAA Replica Patek Philippe watches, Complicated Watches summary: |- Read and write to TCP or UDP sockets with common bash tools
{ "pile_set_name": "Github" }
/* * Copyright (c) 1999, 2014, 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 com.sun.naming.internal; import java.io.InputStream; import java.io.IOException; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.Hashtable; import java.util.Map; import java.util.Properties; import java.util.StringTokenizer; import java.util.List; import java.util.ArrayList; import java.util.WeakHashMap; import javax.naming.*; /** * The ResourceManager class facilitates the reading of JNDI resource files. * * @author Rosanna Lee * @author Scott Seligman */ public final class ResourceManager { /* * Name of provider resource files (without the package-name prefix.) */ private static final String PROVIDER_RESOURCE_FILE_NAME = "jndiprovider.properties"; /* * Name of application resource files. */ private static final String APP_RESOURCE_FILE_NAME = "jndi.properties"; /* * Name of properties file in <java.home>/conf. */ private static final String JRE_CONF_PROPERTY_FILE_NAME = "jndi.properties"; /* * Internal environment property, that when set to "true", disables * application resource files lookup to prevent recursion issues * when validating signed JARs. */ private static final String DISABLE_APP_RESOURCE_FILES = "com.sun.naming.disable.app.resource.files"; /* * The standard JNDI properties that specify colon-separated lists. */ private static final String[] listProperties = { Context.OBJECT_FACTORIES, Context.URL_PKG_PREFIXES, Context.STATE_FACTORIES, // The following shouldn't create a runtime dependence on ldap package. javax.naming.ldap.LdapContext.CONTROL_FACTORIES }; private static final VersionHelper helper = VersionHelper.getVersionHelper(); /* * A cache of the properties that have been constructed by * the ResourceManager. A Hashtable from a provider resource * file is keyed on a class in the resource file's package. * One from application resource files is keyed on the thread's * context class loader. */ // WeakHashMap<Class | ClassLoader, Hashtable> private static final WeakHashMap<Object, Hashtable<? super String, Object>> propertiesCache = new WeakHashMap<>(11); /* * A cache of factory objects (ObjectFactory, StateFactory, ControlFactory). * * A two-level cache keyed first on context class loader and then * on propValue. Value is a list of class or factory objects, * weakly referenced so as not to prevent GC of the class loader. * Used in getFactories(). */ private static final WeakHashMap<ClassLoader, Map<String, List<NamedWeakReference<Object>>>> factoryCache = new WeakHashMap<>(11); /* * A cache of URL factory objects (ObjectFactory). * * A two-level cache keyed first on context class loader and then * on classSuffix+propValue. Value is the factory itself (weakly * referenced so as not to prevent GC of the class loader) or * NO_FACTORY if a previous search revealed no factory. Used in * getFactory(). */ private static final WeakHashMap<ClassLoader, Map<String, WeakReference<Object>>> urlFactoryCache = new WeakHashMap<>(11); private static final WeakReference<Object> NO_FACTORY = new WeakReference<>(null); // There should be no instances of this class. private ResourceManager() { } // ---------- Public methods ---------- /** * Given the environment parameter passed to the initial context * constructor, returns the full environment for that initial * context (never null). This is based on the environment * parameter, the system properties, and all application resource files. * * <p> This method will modify {@code env} and save * a reference to it. The caller may no longer modify it. * * @param env environment passed to initial context constructor. * Null indicates an empty environment. * * @throws NamingException if an error occurs while reading a * resource file */ @SuppressWarnings("unchecked") public static Hashtable<?, ?> getInitialEnvironment(Hashtable<?, ?> env) throws NamingException { String[] props = VersionHelper.PROPS; // system properties if (env == null) { env = new Hashtable<>(11); } // Merge property values from env param, and system properties. // The first value wins: there's no concatenation of // colon-separated lists. // Read system properties by first trying System.getProperties(), // and then trying System.getProperty() if that fails. The former // is more efficient due to fewer permission checks. // String[] jndiSysProps = helper.getJndiProperties(); for (int i = 0; i < props.length; i++) { Object val = env.get(props[i]); if (val == null) { // Read system property. val = (jndiSysProps != null) ? jndiSysProps[i] : helper.getJndiProperty(i); } if (val != null) { ((Hashtable<String, Object>)env).put(props[i], val); } } // Return without merging if application resource files lookup // is disabled. String disableAppRes = (String)env.get(DISABLE_APP_RESOURCE_FILES); if (disableAppRes != null && disableAppRes.equalsIgnoreCase("true")) { return env; } // Merge the above with the values read from all application // resource files. Colon-separated lists are concatenated. mergeTables((Hashtable<Object, Object>)env, getApplicationResources()); return env; } /** * Retrieves the property from the environment, or from the provider * resource file associated with the given context. The environment * may in turn contain values that come from system properties, * or application resource files. * * If {@code concat} is true and both the environment and the provider * resource file contain the property, the two values are concatenated * (with a ':' separator). * * Returns null if no value is found. * * @param propName The non-null property name * @param env The possibly null environment properties * @param ctx The possibly null context * @param concat True if multiple values should be concatenated * @return the property value, or null is there is none. * @throws NamingException if an error occurs while reading the provider * resource file. */ public static String getProperty(String propName, Hashtable<?,?> env, Context ctx, boolean concat) throws NamingException { String val1 = (env != null) ? (String)env.get(propName) : null; if ((ctx == null) || ((val1 != null) && !concat)) { return val1; } String val2 = (String)getProviderResource(ctx).get(propName); if (val1 == null) { return val2; } else if ((val2 == null) || !concat) { return val1; } else { return (val1 + ":" + val2); } } /** * Retrieves an enumeration of factory classes/object specified by a * property. * * The property is gotten from the environment and the provider * resource file associated with the given context and concatenated. * See getProperty(). The resulting property value is a list of class names. *<p> * This method then loads each class using the current thread's context * class loader and keeps them in a list. Any class that cannot be loaded * is ignored. The resulting list is then cached in a two-level * hash table, keyed first by the context class loader and then by * the property's value. * The next time threads of the same context class loader call this * method, they can use the cached list. *<p> * After obtaining the list either from the cache or by creating one from * the property value, this method then creates and returns a * FactoryEnumeration using the list. As the FactoryEnumeration is * traversed, the cached Class object in the list is instantiated and * replaced by an instance of the factory object itself. Both class * objects and factories are wrapped in weak references so as not to * prevent GC of the class loader. *<p> * Note that multiple threads can be accessing the same cached list * via FactoryEnumeration, which locks the list during each next(). * The size of the list will not change, * but a cached Class object might be replaced by an instantiated factory * object. * * @param propName The non-null property name * @param env The possibly null environment properties * @param ctx The possibly null context * @return An enumeration of factory classes/objects; null if none. * @exception NamingException If encounter problem while reading the provider * property file. * @see javax.naming.spi.NamingManager#getObjectInstance * @see javax.naming.spi.NamingManager#getStateToBind * @see javax.naming.spi.DirectoryManager#getObjectInstance * @see javax.naming.spi.DirectoryManager#getStateToBind * @see javax.naming.ldap.ControlFactory#getControlInstance */ public static FactoryEnumeration getFactories(String propName, Hashtable<?,?> env, Context ctx) throws NamingException { String facProp = getProperty(propName, env, ctx, true); if (facProp == null) return null; // no classes specified; return null // Cache is based on context class loader and property val ClassLoader loader = helper.getContextClassLoader(); Map<String, List<NamedWeakReference<Object>>> perLoaderCache = null; synchronized (factoryCache) { perLoaderCache = factoryCache.get(loader); if (perLoaderCache == null) { perLoaderCache = new HashMap<>(11); factoryCache.put(loader, perLoaderCache); } } synchronized (perLoaderCache) { List<NamedWeakReference<Object>> factories = perLoaderCache.get(facProp); if (factories != null) { // Cached list return factories.size() == 0 ? null : new FactoryEnumeration(factories, loader); } else { // Populate list with classes named in facProp; skipping // those that we cannot load StringTokenizer parser = new StringTokenizer(facProp, ":"); factories = new ArrayList<>(5); while (parser.hasMoreTokens()) { try { // System.out.println("loading"); String className = parser.nextToken(); Class<?> c = helper.loadClass(className, loader); factories.add(new NamedWeakReference<Object>(c, className)); } catch (Exception e) { // ignore ClassNotFoundException, IllegalArgumentException } } // System.out.println("adding to cache: " + factories); perLoaderCache.put(facProp, factories); return new FactoryEnumeration(factories, loader); } } } /** * Retrieves a factory from a list of packages specified in a * property. * * The property is gotten from the environment and the provider * resource file associated with the given context and concatenated. * classSuffix is added to the end of this list. * See getProperty(). The resulting property value is a list of package * prefixes. *<p> * This method then constructs a list of class names by concatenating * each package prefix with classSuffix and attempts to load and * instantiate the class until one succeeds. * Any class that cannot be loaded is ignored. * The resulting object is then cached in a two-level hash table, * keyed first by the context class loader and then by the property's * value and classSuffix. * The next time threads of the same context class loader call this * method, they use the cached factory. * If no factory can be loaded, NO_FACTORY is recorded in the table * so that next time it'll return quickly. * * @param propName The non-null property name * @param env The possibly null environment properties * @param ctx The possibly null context * @param classSuffix The non-null class name * (e.g. ".ldap.ldapURLContextFactory). * @param defaultPkgPrefix The non-null default package prefix. * (e.g., "com.sun.jndi.url"). * @return An factory object; null if none. * @exception NamingException If encounter problem while reading the provider * property file, or problem instantiating the factory. * * @see javax.naming.spi.NamingManager#getURLContext * @see javax.naming.spi.NamingManager#getURLObject */ public static Object getFactory(String propName, Hashtable<?,?> env, Context ctx, String classSuffix, String defaultPkgPrefix) throws NamingException { // Merge property with provider property and supplied default String facProp = getProperty(propName, env, ctx, true); if (facProp != null) facProp += (":" + defaultPkgPrefix); else facProp = defaultPkgPrefix; // Cache factory based on context class loader, class name, and // property val ClassLoader loader = helper.getContextClassLoader(); String key = classSuffix + " " + facProp; Map<String, WeakReference<Object>> perLoaderCache = null; synchronized (urlFactoryCache) { perLoaderCache = urlFactoryCache.get(loader); if (perLoaderCache == null) { perLoaderCache = new HashMap<>(11); urlFactoryCache.put(loader, perLoaderCache); } } synchronized (perLoaderCache) { Object factory = null; WeakReference<Object> factoryRef = perLoaderCache.get(key); if (factoryRef == NO_FACTORY) { return null; } else if (factoryRef != null) { factory = factoryRef.get(); if (factory != null) { // check if weak ref has been cleared return factory; } } // Not cached; find first factory and cache StringTokenizer parser = new StringTokenizer(facProp, ":"); String className; while (factory == null && parser.hasMoreTokens()) { className = parser.nextToken() + classSuffix; try { // System.out.println("loading " + className); @SuppressWarnings("deprecation") // Class.newInstance Object tmp = helper.loadClass(className, loader).newInstance(); factory = tmp; } catch (InstantiationException e) { NamingException ne = new NamingException("Cannot instantiate " + className); ne.setRootCause(e); throw ne; } catch (IllegalAccessException e) { NamingException ne = new NamingException("Cannot access " + className); ne.setRootCause(e); throw ne; } catch (Exception e) { // ignore ClassNotFoundException, IllegalArgumentException, // etc. } } // Cache it. perLoaderCache.put(key, (factory != null) ? new WeakReference<>(factory) : NO_FACTORY); return factory; } } // ---------- Private methods ---------- /* * Returns the properties contained in the provider resource file * of an object's package. Returns an empty hash table if the * object is null or the resource file cannot be found. The * results are cached. * * @throws NamingException if an error occurs while reading the file. */ private static Hashtable<? super String, Object> getProviderResource(Object obj) throws NamingException { if (obj == null) { return (new Hashtable<>(1)); } synchronized (propertiesCache) { Class<?> c = obj.getClass(); Hashtable<? super String, Object> props = propertiesCache.get(c); if (props != null) { return props; } props = new Properties(); InputStream istream = helper.getResourceAsStream(c, PROVIDER_RESOURCE_FILE_NAME); if (istream != null) { try { ((Properties)props).load(istream); } catch (IOException e) { NamingException ne = new ConfigurationException( "Error reading provider resource file for " + c); ne.setRootCause(e); throw ne; } } propertiesCache.put(c, props); return props; } } /* * Returns the Hashtable (never null) that results from merging * all application resource files available to this thread's * context class loader. The properties file in <java.home>/conf * is also merged in. The results are cached. * * SECURITY NOTES: * 1. JNDI needs permission to read the application resource files. * 2. Any class will be able to use JNDI to view the contents of * the application resource files in its own classpath. Give * careful consideration to this before storing sensitive * information there. * * @throws NamingException if an error occurs while reading a resource * file. */ private static Hashtable<? super String, Object> getApplicationResources() throws NamingException { ClassLoader cl = helper.getContextClassLoader(); synchronized (propertiesCache) { Hashtable<? super String, Object> result = propertiesCache.get(cl); if (result != null) { return result; } try { NamingEnumeration<InputStream> resources = helper.getResources(cl, APP_RESOURCE_FILE_NAME); try { while (resources.hasMore()) { Properties props = new Properties(); InputStream istream = resources.next(); try { props.load(istream); } finally { istream.close(); } if (result == null) { result = props; } else { mergeTables(result, props); } } } finally { while (resources.hasMore()) { resources.next().close(); } } // Merge in properties from file in <java.home>/conf. InputStream istream = helper.getJavaHomeConfStream(JRE_CONF_PROPERTY_FILE_NAME); if (istream != null) { try { Properties props = new Properties(); props.load(istream); if (result == null) { result = props; } else { mergeTables(result, props); } } finally { istream.close(); } } } catch (IOException e) { NamingException ne = new ConfigurationException( "Error reading application resource file"); ne.setRootCause(e); throw ne; } if (result == null) { result = new Hashtable<>(11); } propertiesCache.put(cl, result); return result; } } /* * Merge the properties from one hash table into another. Each * property in props2 that is not in props1 is added to props1. * For each property in both hash tables that is one of the * standard JNDI properties that specify colon-separated lists, * the values are concatenated and stored in props1. */ private static void mergeTables(Hashtable<? super String, Object> props1, Hashtable<? super String, Object> props2) { for (Object key : props2.keySet()) { String prop = (String)key; Object val1 = props1.get(prop); if (val1 == null) { props1.put(prop, props2.get(prop)); } else if (isListProperty(prop)) { String val2 = (String)props2.get(prop); props1.put(prop, ((String)val1) + ":" + val2); } } } /* * Is a property one of the standard JNDI properties that specify * colon-separated lists? */ private static boolean isListProperty(String prop) { prop = prop.intern(); for (int i = 0; i < listProperties.length; i++) { if (prop == listProperties[i]) { return true; } } return false; } }
{ "pile_set_name": "Github" }
<?php namespace Illuminate\Http; use Illuminate\Contracts\Support\MessageProvider; use Illuminate\Session\Store as SessionStore; use Illuminate\Support\MessageBag; use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; use Illuminate\Support\Traits\Macroable; use Illuminate\Support\ViewErrorBag; use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile; use Symfony\Component\HttpFoundation\RedirectResponse as BaseRedirectResponse; class RedirectResponse extends BaseRedirectResponse { use ForwardsCalls, ResponseTrait, Macroable { Macroable::__call as macroCall; } /** * The request instance. * * @var \Illuminate\Http\Request */ protected $request; /** * The session store instance. * * @var \Illuminate\Session\Store */ protected $session; /** * Flash a piece of data to the session. * * @param string|array $key * @param mixed $value * @return $this */ public function with($key, $value = null) { $key = is_array($key) ? $key : [$key => $value]; foreach ($key as $k => $v) { $this->session->flash($k, $v); } return $this; } /** * Add multiple cookies to the response. * * @param array $cookies * @return $this */ public function withCookies(array $cookies) { foreach ($cookies as $cookie) { $this->headers->setCookie($cookie); } return $this; } /** * Flash an array of input to the session. * * @param array|null $input * @return $this */ public function withInput(array $input = null) { $this->session->flashInput($this->removeFilesFromInput( ! is_null($input) ? $input : $this->request->input() )); return $this; } /** * Remove all uploaded files form the given input array. * * @param array $input * @return array */ protected function removeFilesFromInput(array $input) { foreach ($input as $key => $value) { if (is_array($value)) { $input[$key] = $this->removeFilesFromInput($value); } if ($value instanceof SymfonyUploadedFile) { unset($input[$key]); } } return $input; } /** * Flash an array of input to the session. * * @return $this */ public function onlyInput() { return $this->withInput($this->request->only(func_get_args())); } /** * Flash an array of input to the session. * * @return $this */ public function exceptInput() { return $this->withInput($this->request->except(func_get_args())); } /** * Flash a container of errors to the session. * * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider * @param string $key * @return $this */ public function withErrors($provider, $key = 'default') { $value = $this->parseErrors($provider); $errors = $this->session->get('errors', new ViewErrorBag); if (! $errors instanceof ViewErrorBag) { $errors = new ViewErrorBag; } $this->session->flash( 'errors', $errors->put($key, $value) ); return $this; } /** * Add a fragment identifier to the URL. * * @param string $fragment * @return $this */ public function withFragment($fragment) { return $this->withoutFragment() ->setTargetUrl($this->getTargetUrl().'#'.Str::after($fragment, '#')); } /** * Remove any fragment identifier from the response URL. * * @return $this */ public function withoutFragment() { return $this->setTargetUrl(Str::before($this->getTargetUrl(), '#')); } /** * Parse the given errors into an appropriate value. * * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider * @return \Illuminate\Support\MessageBag */ protected function parseErrors($provider) { if ($provider instanceof MessageProvider) { return $provider->getMessageBag(); } return new MessageBag((array) $provider); } /** * Get the original response content. * * @return null */ public function getOriginalContent() { // } /** * Get the request instance. * * @return \Illuminate\Http\Request|null */ public function getRequest() { return $this->request; } /** * Set the request instance. * * @param \Illuminate\Http\Request $request * @return void */ public function setRequest(Request $request) { $this->request = $request; } /** * Get the session store instance. * * @return \Illuminate\Session\Store|null */ public function getSession() { return $this->session; } /** * Set the session store instance. * * @param \Illuminate\Session\Store $session * @return void */ public function setSession(SessionStore $session) { $this->session = $session; } /** * Dynamically bind flash data in the session. * * @param string $method * @param array $parameters * @return mixed * * @throws \BadMethodCallException */ public function __call($method, $parameters) { if (static::hasMacro($method)) { return $this->macroCall($method, $parameters); } if (Str::startsWith($method, 'with')) { return $this->with(Str::snake(substr($method, 4)), $parameters[0]); } static::throwBadMethodCallException($method); } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: e5e1889878a0860499fbe746cd58a4df TextureImporter: internalIDToNameTable: [] externalObjects: {} serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 mipMapsPreserveCoverage: 0 alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 textureFormat: 1 maxTextureSize: 2048 textureSettings: serializedVersion: 2 filterMode: 1 aniso: 1 mipBias: -100 wrapU: 1 wrapV: 1 wrapW: 1 nPOTScale: 2 lightmap: 0 compressionQuality: 50 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 32 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone maxTextureSize: 32 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] physicsShape: [] bones: [] spriteID: internalID: 0 vertices: [] indices: edges: [] weights: [] secondaryTextures: [] spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* * Copyright (C) 2010 Igalia S.L * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef ImageGStreamer_h #define ImageGStreamer_h #if ENABLE(VIDEO) && USE(GSTREAMER) #include "BitmapImage.h" #include <gst/gst.h> #include <gst/video/video.h> #include <wtf/PassRefPtr.h> #if USE(CAIRO) #include <cairo.h> #endif namespace WebCore { class IntSize; class ImageGStreamer : public RefCounted<ImageGStreamer> { public: static PassRefPtr<ImageGStreamer> createImage(GstBuffer*); ~ImageGStreamer(); PassRefPtr<BitmapImage> image() { ASSERT(m_image); return m_image.get(); } private: RefPtr<BitmapImage> m_image; #if USE(CAIRO) ImageGStreamer(GstBuffer*&, IntSize, cairo_format_t&); #endif #if PLATFORM(QT) ImageGStreamer(GstBuffer*&, IntSize, QImage::Format); #endif #if PLATFORM(MAC) ImageGStreamer(GstBuffer*&, IntSize); #endif }; } #endif // USE(GSTREAMER) #endif
{ "pile_set_name": "Github" }
using FrameWork.GuideSystem; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; using UnityEditor; using UnityEditorInternal; using UnityEngine; public class GuideSystemEditor { [MenuItem("Tools/新手引导/增加Guide引导层")] public static void ShowAllMethod() { //增加Guide引导层 EditorExpand.AddSortLayerIfNotExist("Guide"); } [MenuItem("Tools/新手引导/初始化")] public static void InitGuideSystem() { if(!GetGuideIsInit()) { //创建数据表 SaveDataTable(); //创建脚本 CreateGuideWindowScript(); //增加Guide引导层 EditorExpand.AddSortLayerIfNotExist("Guide"); //添加引导开关 RecordManager.SaveRecord(GuideSystemBase.c_guideRecordName, GuideSystemBase.c_guideSwitchName, true); } else { Debug.Log("新手引导已经初始化"); } } [MenuItem("Tools/新手引导/创建新手引导预设")] public static void CreateGuideSystemWidnow() { if (GetGuideIsInit()) { if(!GetGuideIsCreate()) { //创建预设 UICreateService.CreateGuideWindow(); } else { Debug.LogError("新手引导预设已经创建"); } } else { Debug.LogError("新手引导没有初始化"); } } static bool GetGuideIsInit() { string path = Application.dataPath + "/Resources/"+ DataManager .c_directoryName + "/" + GuideSystemBase.c_guideDataName + "." + DataManager.c_expandName; return File.Exists(path); } static bool GetGuideIsCreate() { string path = Application.dataPath + "/Resources/UI/GuideWindow/GuideWindow.perfab" ; return File.Exists(path); } static void SaveDataTable() { DataTable data = new DataTable(); data.TableKeys.Add("GuideID"); data.TableKeys.Add(GuideSystemBase.c_guideStartPoint); data.SetDefault(GuideSystemBase.c_guideStartPoint, "False"); data.SetNote(GuideSystemBase.c_guideStartPoint, "引导开始点"); data.SetFieldType(GuideSystemBase.c_guideStartPoint, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_guideEndPoint); data.SetDefault(GuideSystemBase.c_guideEndPoint, "False"); data.SetNote(GuideSystemBase.c_guideEndPoint, "引导结束点"); data.SetFieldType(GuideSystemBase.c_guideEndPoint, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_guideClosePoint); data.SetDefault(GuideSystemBase.c_guideEndPoint, "False"); data.SetNote(GuideSystemBase.c_guideEndPoint, "引导关闭点"); data.SetFieldType(GuideSystemBase.c_guideClosePoint, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_PremiseKey); data.SetDefault(GuideSystemBase.c_PremiseKey, "Null"); data.SetNote(GuideSystemBase.c_PremiseKey, "前提条件"); data.SetFieldType(GuideSystemBase.c_PremiseKey, FieldType.String, null); data.TableKeys.Add(GuideSystemBase.c_NextGuideNameKey); data.SetDefault(GuideSystemBase.c_NextGuideNameKey, "Null"); data.SetNote(GuideSystemBase.c_NextGuideNameKey, "下一步引导,如果为空,则为下一条记录"); data.SetFieldType(GuideSystemBase.c_NextGuideNameKey, FieldType.String, null); data.TableKeys.Add(GuideSystemBase.c_ClickToNextKey); data.SetDefault(GuideSystemBase.c_ClickToNextKey, "False"); data.SetNote(GuideSystemBase.c_ClickToNextKey, "是否接收点击去下一步引导"); data.SetFieldType(GuideSystemBase.c_ClickToNextKey, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_CallToNextKey); data.SetDefault(GuideSystemBase.c_CallToNextKey, "False"); data.SetNote(GuideSystemBase.c_CallToNextKey, "是否接收调用去下一步引导"); data.SetFieldType(GuideSystemBase.c_CallToNextKey, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_CustomEventKey); data.SetDefault(GuideSystemBase.c_CustomEventKey, "Null"); data.SetNote(GuideSystemBase.c_CustomEventKey, "自定义事件名称"); data.SetFieldType(GuideSystemBase.c_CustomEventKey, FieldType.StringArray, null); data.TableKeys.Add(GuideSystemBase.c_ConditionToNextKey); data.SetDefault(GuideSystemBase.c_ConditionToNextKey, "False"); data.SetNote(GuideSystemBase.c_ConditionToNextKey, "是否自动判断条件去下一步引导"); data.SetFieldType(GuideSystemBase.c_ConditionToNextKey, FieldType.Bool, null); data.TableKeys.Add(GuideSystemBase.c_GuideWindowNameKey); data.SetDefault(GuideSystemBase.c_GuideWindowNameKey, "Null"); data.SetNote(GuideSystemBase.c_GuideWindowNameKey, "引导的界面名字"); data.SetFieldType(GuideSystemBase.c_GuideWindowNameKey, FieldType.String, null); data.TableKeys.Add(GuideSystemBase.c_GuideObjectNameKey); data.SetDefault(GuideSystemBase.c_GuideObjectNameKey, "Null"); data.SetNote(GuideSystemBase.c_GuideObjectNameKey, "高亮显示的对象名字"); data.SetFieldType(GuideSystemBase.c_GuideObjectNameKey, FieldType.StringArray, null); data.TableKeys.Add(GuideSystemBase.c_GuideItemNameKey); data.SetDefault(GuideSystemBase.c_GuideItemNameKey, "Null"); data.SetNote(GuideSystemBase.c_GuideItemNameKey, "高亮的Item名字"); data.SetFieldType(GuideSystemBase.c_GuideItemNameKey, FieldType.StringArray, null); data.TableKeys.Add(GuideSystemBase.c_TipContentKey); data.SetDefault(GuideSystemBase.c_TipContentKey, "Null"); data.SetNote(GuideSystemBase.c_TipContentKey, "提示文本内容"); data.SetFieldType(GuideSystemBase.c_TipContentKey, FieldType.String, null); data.TableKeys.Add(GuideSystemBase.c_TipContentPosKey); data.SetDefault(GuideSystemBase.c_TipContentPosKey, "0,0,0"); data.SetNote(GuideSystemBase.c_TipContentPosKey, "提示文本位置"); data.SetFieldType(GuideSystemBase.c_TipContentPosKey, FieldType.Vector3, null); data.TableKeys.Add(GuideSystemBase.c_MaskAlphaKey); data.SetDefault(GuideSystemBase.c_MaskAlphaKey, "0.75"); data.SetNote(GuideSystemBase.c_MaskAlphaKey, "遮罩Alpha"); data.SetFieldType(GuideSystemBase.c_MaskAlphaKey, FieldType.Float, null); TableDataEditor.SaveData(GuideSystemBase.c_guideDataName, data); } static void CreateGuideWindowScript() { string LoadPath = Application.dataPath + "/Script/Core/Editor/res/UIGuideWindowClassTemplate.txt"; string SavePath = Application.dataPath + "/Script/UI/" + GuideSystemBase.c_guideWindowName + "/" + GuideSystemBase.c_guideWindowName + ".cs"; string UItemplate = ResourceIOTool.ReadStringByFile(LoadPath); EditorUtil.WriteStringByFile(SavePath, UItemplate); LoadPath = Application.dataPath + "/Script/Core/Editor/res/GuideSyetemTemplate.txt"; SavePath = Application.dataPath + "/Script/GuideSystem/GuideSyetem.cs"; UItemplate = ResourceIOTool.ReadStringByFile(LoadPath); EditorUtil.WriteStringByFile(SavePath, UItemplate); AssetDatabase.Refresh(); } public string[] GetSortingLayerNames() { Type internalEditorUtilityType = typeof(InternalEditorUtility); PropertyInfo sortingLayersProperty = internalEditorUtilityType.GetProperty("sortingLayerNames", BindingFlags.Static | BindingFlags.NonPublic); return (string[])sortingLayersProperty.GetValue(null, new object[0]); } }
{ "pile_set_name": "Github" }
#!/bin/bash #### https://github.com/Yangqing/mincepie/wiki/Launch-Your-Mapreducer # If you encounter error that the address already in use, kill the process. # 11235 is the port of server process # https://github.com/Yangqing/mincepie/blob/master/mincepie/mince.py # sudo netstat -ap | grep 11235 # The last column of the output is PID/Program name # kill -9 PID # Second solution: # nmap localhost # fuser -k 11235/tcp # Or just wait a few seconds. ## Launch your Mapreduce locally # num_clients: number of processes # image_lib: OpenCV or PIL, case insensitive. The default value is the faster OpenCV. # input: the file containing one image path relative to input_folder each line # input_folder: where are the original images # output_folder: where to save the resized and cropped images ./resize_and_crop_images.py --num_clients=8 --image_lib=opencv --input=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images.txt --input_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train/ --output_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train_resized/ ## Launch your Mapreduce with MPI # mpirun -n 8 --launch=mpi resize_and_crop_images.py --image_lib=opencv --input=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images.txt --input_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train/ --output_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train_resized/
{ "pile_set_name": "Github" }
# Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. [ ############################################################################## ['system == macos and asan', { # BUG(820416). 'BitsDeathTest*': [SKIP], 'LiveRangeUnitTest*': [SKIP], 'LoggingDeathTest*': [SKIP], 'LoggingTest.CompareClassTypes': [SKIP], 'LoggingTest.CompareWithDifferentSignedness': [SKIP], 'LoggingTest.CompareWithReferenceType': [SKIP], 'RandomNumberGenerator.NextSampleInvalidParam': [SKIP], 'RandomNumberGenerator.NextSampleSlowInvalidParam1': [SKIP], 'RandomNumberGenerator.NextSampleSlowInvalidParam2': [SKIP], }], # system == macos and asan ############################################################################## ['lite_mode or variant == jitless', { # TODO(v8:7777): Re-enable once wasm is supported in jitless mode. 'ValueSerializerTestWithSharedArrayBufferClone.RoundTripWebAssemblyMemory': [SKIP], 'ValueSerializerTestWithWasm.*': [SKIP], }], # lite_mode or variant == jitless ############################################################################## ['system == windows and asan', { # BUG(893437). 'Torque*': [SKIP], }], # system == windows and asan ['system == windows and arch == x64 and mode == release', { # BUG(992783). 'Torque.ConditionalFields': [SKIP], 'Torque.UsingUnderscorePrefixedIdentifierError': [SKIP], }], # system == windows and arch == x64 and mode == release ['tsan == True', { # https://crbug.com/v8/9380 # The test is broken and needs to be fixed to use separate isolates. 'BackingStoreTest.RacyGrowWasmMemoryInPlace': [SKIP], }], # tsan == True ############################################################################## ['not pointer_compression', { # Tests are irrelevant without pointer compression 'DecompressionOptimizerTest.*': [SKIP], }], # not pointer_compression ################################################################################ ['variant == stress_snapshot', { '*': [SKIP], # only relevant for mjsunit tests. }], ]
{ "pile_set_name": "Github" }
"use strict"; var _utils = _interopRequireWildcard(require("./utils")); var _placeholders = require("./placeholders"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } (0, _utils.default)("Noop", { visitor: [] }); (0, _utils.default)("Placeholder", { visitor: [], builder: ["expectedNode", "name"], fields: { name: { validate: (0, _utils.assertNodeType)("Identifier") }, expectedNode: { validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) } } });
{ "pile_set_name": "Github" }
from __future__ import print_function __authors__ = "Heng Luo" from pylearn2.testing.skip import skip_if_no_gpu skip_if_no_gpu() import numpy as np from theano.compat.six.moves import xrange from theano import shared from theano.tensor import grad, constant from pylearn2.sandbox.cuda_convnet.filter_acts import FilterActs from theano.sandbox.cuda import gpu_from_host from theano.sandbox.cuda import host_from_gpu from theano.sandbox.rng_mrg import MRG_RandomStreams from theano.tensor.nnet.conv import conv2d from theano import function from theano import tensor as T import warnings from theano.sandbox import cuda from theano.sandbox.cuda.var import float32_shared_constructor def FilterActs_python(images, filters, stride=1, ): if int(stride) != stride: raise TypeError('stride must be an int', stride) stride = int(stride) channels, rows, cols, batch_size = images.shape _channels, filter_rows, filter_cols, num_filters = filters.shape assert rows >= filter_rows assert cols >= filter_cols assert filter_cols == filter_rows assert channels == _channels assert stride <= filter_rows and stride >= 1 if stride > 1: if (rows - filter_rows)%stride == 0: stride_padding_rows = 0 else: stride_padding_rows = ((rows - filter_rows)/stride + 1)*stride + filter_rows - rows idx_rows = (rows + stride_padding_rows - filter_rows)/stride if (cols - filter_cols)%stride == 0: stride_padding_cols = 0 else: stride_padding_cols = ((cols - filter_cols)/stride + 1)*stride + filter_cols - cols idx_cols = (cols + stride_padding_cols - filter_cols)/stride new_rows = rows + stride_padding_rows new_cols = cols + stride_padding_cols idx_rows = (new_rows - filter_rows)/stride idx_cols = (new_cols - filter_cols)/stride new_images = np.zeros((channels, new_rows, new_cols, batch_size),dtype='float32') new_images[:,:rows,:cols,:] = images h_shape = (num_filters, idx_rows+1, idx_cols+1, batch_size ) else: new_images = images h_shape = (num_filters, rows - filter_rows + 1, cols - filter_cols + 1, batch_size ) h = np.zeros(h_shape,dtype='float32') n_dim_filter = channels*filter_rows*filter_cols vector_filters = filters.reshape(n_dim_filter,num_filters).T for idx_h_rows in xrange(h_shape[1]): for idx_h_cols in xrange(h_shape[2]): rc_images = new_images[:, idx_h_rows*stride:idx_h_rows*stride+filter_rows, idx_h_cols*stride:idx_h_cols*stride+filter_cols, :] rc_hidacts = np.dot( vector_filters, rc_images.reshape(n_dim_filter, batch_size)) h[:,idx_h_rows,idx_h_cols,:] = rc_hidacts #import pdb;pdb.set_trace() return h def test_filter_acts_strided(): # Tests that FilterActs with all possible strides rng = np.random.RandomState([2012,10,9]) #Each list in shape_list : #[img_shape,filter_shape] #[(channels, rows, cols, batch_size),(channels, filter_rows, filter_cols, num_filters)] shape_list = [[(1, 7, 8, 5), (1, 2, 2, 16)], [(3, 7, 8, 5), (3, 3, 3, 16)], [(16, 11, 11, 4), (16, 4, 4, 16)], [(3, 20, 20, 3), (3, 5, 5, 16)], [(3, 21, 21, 3), (3, 6, 6, 16)], ] for test_idx in xrange(len(shape_list)): images = rng.uniform(-1., 1., shape_list[test_idx][0]).astype('float32') filters = rng.uniform(-1., 1., shape_list[test_idx][1]).astype('float32') gpu_images = float32_shared_constructor(images,name='images') gpu_filters = float32_shared_constructor(filters,name='filters') print("test case %d..."%(test_idx+1)) for ii in xrange(filters.shape[1]): stride = ii + 1 output = FilterActs(stride=stride)(gpu_images, gpu_filters) output = host_from_gpu(output) f = function([], output) output_val = f() output_python = FilterActs_python(images,filters,stride) if np.abs(output_val - output_python).max() > 8.6e-6: assert type(output_val) == type(output_python) assert output_val.dtype == output_python.dtype if output_val.shape != output_python.shape: print('cuda-convnet shape: ',output_val.shape) print('python conv shape: ',output_python.shape) assert False err = np.abs(output_val - output_python) print('stride %d'%stride) print('absolute error range: ', (err.min(), err.max())) print('mean absolute error: ', err.mean()) print('cuda-convnet value range: ', (output_val.min(), output_val.max())) print('python conv value range: ', (output_python.min(), output_python.max())) #assert False #print "pass" if __name__ == '__main__': test_filter_acts_strided()
{ "pile_set_name": "Github" }
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // 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. // ----------------------------------------------------------------------------- // Original code from SlimMath project. http://code.google.com/p/slimmath/ // Greetings to SlimDX Group. Original code published with the following license: // ----------------------------------------------------------------------------- /* * Copyright (c) 2007-2011 SlimDX Group * * 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. */ // Original source and license: https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.Mathematics/MathUtil.cs using System; namespace SharpDX { internal static class MathUtil { /// <summary> /// The value for which all absolute numbers smaller than are considered equal to zero. /// </summary> public const float ZeroTolerance = 1e-6f; // Value a 8x higher than 1.19209290E-07F /// <summary> /// A value specifying the approximation of π which is 180 degrees. /// </summary> public const float Pi = (float)Math.PI; /// <summary> /// A value specifying the approximation of 2π which is 360 degrees. /// </summary> public const float TwoPi = (float)(2 * Math.PI); /// <summary> /// A value specifying the approximation of π/2 which is 90 degrees. /// </summary> public const float PiOverTwo = (float)(Math.PI / 2); /// <summary> /// A value specifying the approximation of π/4 which is 45 degrees. /// </summary> public const float PiOverFour = (float)(Math.PI / 4); /// <summary> /// Checks if a and b are almost equals, taking into account the magnitude of floating point numbers (unlike <see cref="WithinEpsilon"/> method). See Remarks. /// See remarks. /// </summary> /// <param name="a">The left value to compare.</param> /// <param name="b">The right value to compare.</param> /// <returns><c>true</c> if a almost equal to b, <c>false</c> otherwise</returns> /// <remarks> /// The code is using the technique described by Bruce Dawson in /// <a href="http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/">Comparing Floating point numbers 2012 edition</a>. /// </remarks> public static bool NearEqual(float a, float b) { // Check if the numbers are really close -- needed // when comparing numbers near zero. if (IsZero(a - b)) return true; // Original from Bruce Dawson: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ int aInt = BitConverter.ToInt32(BitConverter.GetBytes(a), 0); int bInt = BitConverter.ToInt32(BitConverter.GetBytes(b), 0); // Different signs means they do not match. if ((aInt < 0) != (bInt < 0)) return false; // Find the difference in ULPs. int ulp = Math.Abs(aInt - bInt); // Choose of maxUlp = 4 // according to http://code.google.com/p/googletest/source/browse/trunk/include/gtest/internal/gtest-internal.h const int maxUlp = 4; return ulp <= maxUlp; } /// <summary> /// Determines whether the specified value is close to zero (0.0f). /// </summary> /// <param name="a">The floating value.</param> /// <returns><c>true</c> if the specified value is close to zero (0.0f); otherwise, <c>false</c>.</returns> public static bool IsZero(float a) { return Math.Abs(a) < ZeroTolerance; } /// <summary> /// Determines whether the specified value is close to one (1.0f). /// </summary> /// <param name="a">The floating value.</param> /// <returns><c>true</c> if the specified value is close to one (1.0f); otherwise, <c>false</c>.</returns> public static bool IsOne(float a) { return IsZero(a - 1.0f); } /// <summary> /// Checks if a - b are almost equals within a float epsilon. /// </summary> /// <param name="a">The left value to compare.</param> /// <param name="b">The right value to compare.</param> /// <param name="epsilon">Epsilon value</param> /// <returns><c>true</c> if a almost equal to b within a float epsilon, <c>false</c> otherwise</returns> public static bool WithinEpsilon(float a, float b, float epsilon) { float num = a - b; return (-epsilon <= num) && (num <= epsilon); } /// <summary> /// Converts revolutions to degrees. /// </summary> /// <param name="revolution">The value to convert.</param> /// <returns>The converted value.</returns> public static float RevolutionsToDegrees(float revolution) { return revolution * 360.0f; } /// <summary> /// Converts revolutions to radians. /// </summary> /// <param name="revolution">The value to convert.</param> /// <returns>The converted value.</returns> public static float RevolutionsToRadians(float revolution) { return revolution * TwoPi; } /// <summary> /// Converts revolutions to gradians. /// </summary> /// <param name="revolution">The value to convert.</param> /// <returns>The converted value.</returns> public static float RevolutionsToGradians(float revolution) { return revolution * 400.0f; } /// <summary> /// Converts degrees to revolutions. /// </summary> /// <param name="degree">The value to convert.</param> /// <returns>The converted value.</returns> public static float DegreesToRevolutions(float degree) { return degree / 360.0f; } /// <summary> /// Converts degrees to radians. /// </summary> /// <param name="degree">The value to convert.</param> /// <returns>The converted value.</returns> public static float DegreesToRadians(float degree) { return degree * (Pi / 180.0f); } /// <summary> /// Converts radians to revolutions. /// </summary> /// <param name="radian">The value to convert.</param> /// <returns>The converted value.</returns> public static float RadiansToRevolutions(float radian) { return radian / TwoPi; } /// <summary> /// Converts radians to gradians. /// </summary> /// <param name="radian">The value to convert.</param> /// <returns>The converted value.</returns> public static float RadiansToGradians(float radian) { return radian * (200.0f / Pi); } /// <summary> /// Converts gradians to revolutions. /// </summary> /// <param name="gradian">The value to convert.</param> /// <returns>The converted value.</returns> public static float GradiansToRevolutions(float gradian) { return gradian / 400.0f; } /// <summary> /// Converts gradians to degrees. /// </summary> /// <param name="gradian">The value to convert.</param> /// <returns>The converted value.</returns> public static float GradiansToDegrees(float gradian) { return gradian * (9.0f / 10.0f); } /// <summary> /// Converts gradians to radians. /// </summary> /// <param name="gradian">The value to convert.</param> /// <returns>The converted value.</returns> public static float GradiansToRadians(float gradian) { return gradian * (Pi / 200.0f); } /// <summary> /// Converts radians to degrees. /// </summary> /// <param name="radian">The value to convert.</param> /// <returns>The converted value.</returns> public static float RadiansToDegrees(float radian) { return radian * (180.0f / Pi); } /// <summary> /// Clamps the specified value. /// </summary> /// <param name="value">The value.</param> /// <param name="min">The min.</param> /// <param name="max">The max.</param> /// <returns>The result of clamping a value between min and max</returns> public static float Clamp(float value, float min, float max) { return value < min ? min : value > max ? max : value; } /// <summary> /// Clamps the specified value. /// </summary> /// <param name="value">The value.</param> /// <param name="min">The min.</param> /// <param name="max">The max.</param> /// <returns>The result of clamping a value between min and max</returns> public static int Clamp(int value, int min, int max) { return value < min ? min : value > max ? max : value; } /// <summary> /// Interpolates between two values using a linear function by a given amount. /// </summary> /// <remarks> /// See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and /// http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ /// </remarks> /// <param name="from">Value to interpolate from.</param> /// <param name="to">Value to interpolate to.</param> /// <param name="amount">Interpolation amount.</param> /// <returns>The result of linear interpolation of values based on the amount.</returns> public static double Lerp(double from, double to, double amount) { return ((1 - amount) * from) + (amount * to); } /// <summary> /// Interpolates between two values using a linear function by a given amount. /// </summary> /// <remarks> /// See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and /// http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ /// </remarks> /// <param name="from">Value to interpolate from.</param> /// <param name="to">Value to interpolate to.</param> /// <param name="amount">Interpolation amount.</param> /// <returns>The result of linear interpolation of values based on the amount.</returns> public static float Lerp(float from, float to, float amount) { return ((1 - amount) * from) + (amount * to); } /// <summary> /// Interpolates between two values using a linear function by a given amount. /// </summary> /// <remarks> /// See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and /// http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ /// </remarks> /// <param name="from">Value to interpolate from.</param> /// <param name="to">Value to interpolate to.</param> /// <param name="amount">Interpolation amount.</param> /// <returns>The result of linear interpolation of values based on the amount.</returns> public static byte Lerp(byte from, byte to, float amount) { return (byte)Lerp((float)from, (float)to, amount); } /// <summary> /// Performs smooth (cubic Hermite) interpolation between 0 and 1. /// </summary> /// <remarks> /// See https://en.wikipedia.org/wiki/Smoothstep /// </remarks> /// <param name="amount">Value between 0 and 1 indicating interpolation amount.</param> public static float SmoothStep(float amount) { return (amount <= 0) ? 0 : (amount >= 1) ? 1 : amount * amount * (3 - (2 * amount)); } /// <summary> /// Performs a smooth(er) interpolation between 0 and 1 with 1st and 2nd order derivatives of zero at endpoints. /// </summary> /// <remarks> /// See https://en.wikipedia.org/wiki/Smoothstep /// </remarks> /// <param name="amount">Value between 0 and 1 indicating interpolation amount.</param> public static float SmootherStep(float amount) { return (amount <= 0) ? 0 : (amount >= 1) ? 1 : amount * amount * amount * ((amount * ((amount * 6) - 15)) + 10); } /// <summary> /// Calculates the modulo of the specified value. /// </summary> /// <param name="value">The value.</param> /// <param name="modulo">The modulo.</param> /// <returns>The result of the modulo applied to value</returns> public static float Mod(float value, float modulo) { if (modulo == 0.0f) { return value; } return value % modulo; } /// <summary> /// Calculates the modulo 2*PI of the specified value. /// </summary> /// <param name="value">The value.</param> /// <returns>The result of the modulo applied to value</returns> public static float Mod2PI(float value) { return Mod(value, TwoPi); } /// <summary> /// Wraps the specified value into a range [min, max] /// </summary> /// <param name="value">The value to wrap.</param> /// <param name="min">The min.</param> /// <param name="max">The max.</param> /// <returns>Result of the wrapping.</returns> /// <exception cref="ArgumentException">Is thrown when <paramref name="min"/> is greater than <paramref name="max"/>.</exception> public static int Wrap(int value, int min, int max) { if (min > max) throw new ArgumentException(string.Format("min {0} should be less than or equal to max {1}", min, max), nameof(min)); // Code from http://stackoverflow.com/a/707426/1356325 int range_size = max - min + 1; if (value < min) value += range_size * (((min - value) / range_size) + 1); return min + ((value - min) % range_size); } /// <summary> /// Wraps the specified value into a range [min, max[ /// </summary> /// <param name="value">The value.</param> /// <param name="min">The min.</param> /// <param name="max">The max.</param> /// <returns>Result of the wrapping.</returns> /// <exception cref="ArgumentException">Is thrown when <paramref name="min"/> is greater than <paramref name="max"/>.</exception> public static float Wrap(float value, float min, float max) { if (NearEqual(min, max)) return min; double mind = min; double maxd = max; double valued = value; if (mind > maxd) throw new ArgumentException(string.Format("min {0} should be less than or equal to max {1}", min, max), nameof(min)); var range_size = maxd - mind; return (float)(mind + (valued - mind) - (range_size * Math.Floor((valued - mind) / range_size))); } /// <summary> /// Gauss function. /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function /// </summary> /// <param name="amplitude">Curve amplitude.</param> /// <param name="x">Position X.</param> /// <param name="y">Position Y</param> /// <param name="centerX">Center X.</param> /// <param name="centerY">Center Y.</param> /// <param name="sigmaX">Curve sigma X.</param> /// <param name="sigmaY">Curve sigma Y.</param> /// <returns>The result of Gaussian function.</returns> public static float Gauss(float amplitude, float x, float y, float centerX, float centerY, float sigmaX, float sigmaY) { return (float)Gauss((double)amplitude, x, y, centerX, centerY, sigmaX, sigmaY); } /// <summary> /// Gauss function. /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function /// </summary> /// <param name="amplitude">Curve amplitude.</param> /// <param name="x">Position X.</param> /// <param name="y">Position Y</param> /// <param name="centerX">Center X.</param> /// <param name="centerY">Center Y.</param> /// <param name="sigmaX">Curve sigma X.</param> /// <param name="sigmaY">Curve sigma Y.</param> /// <returns>The result of Gaussian function.</returns> public static double Gauss(double amplitude, double x, double y, double centerX, double centerY, double sigmaX, double sigmaY) { var cx = x - centerX; var cy = y - centerY; var componentX = (cx * cx) / (2 * sigmaX * sigmaX); var componentY = (cy * cy) / (2 * sigmaY * sigmaY); return amplitude * Math.Exp(-(componentX + componentY)); } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Root.Holo"> <item name="android:layout_gravity">bottom|center_horizontal</item> <item name="android:layout_marginLeft">24dp</item> <item name="android:layout_marginRight">24dp</item> <item name="android:layout_marginBottom">24dp</item> <item name="android:maxWidth">500dp</item> <item name="android:background">@drawable/root_background_holo</item> </style> <style name="Message.Holo"> <item name="android:gravity">center_vertical</item> <item name="android:paddingLeft">16dp</item> <item name="android:paddingRight">16dp</item> <item name="android:textAppearance">?android:textAppearanceMedium</item> <item name="android:textColor">@android:color/white</item> <item name="android:maxLines">1</item> <item name="android:singleLine">true</item> <item name="android:ellipsize">end</item> </style> <style name="Button.Holo" parent="Message.Holo"> <item name="android:drawableLeft">@drawable/ic_undo</item> <item name="android:drawablePadding">12dp</item> <item name="android:textAppearance">?android:textAppearanceSmall</item> <item name="android:textColor">#acacac</item> <item name="android:textStyle">bold</item> <item name="android:background">@drawable/button_background_holo</item> </style> </resources>
{ "pile_set_name": "Github" }
/* * HCS API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 2.1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package hcsschema type ModifySettingRequest struct { ResourcePath string `json:"ResourcePath,omitempty"` RequestType string `json:"RequestType,omitempty"` Settings interface{} `json:"Settings,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated GuestRequest interface{} `json:"GuestRequest,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated }
{ "pile_set_name": "Github" }
/* * Copyright 2004-2020 Sandboxie Holdings, LLC * * 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/>. */ //--------------------------------------------------------------------------- // Lock //--------------------------------------------------------------------------- #include "common/defines.h" #include "common/lock.h" //--------------------------------------------------------------------------- // Defines //--------------------------------------------------------------------------- #define LOCK_WAIT_DIVISOR 25 //--------------------------------------------------------------------------- // Lock_Delay //--------------------------------------------------------------------------- ALIGNED void Lock_Delay(const WCHAR *Operation, const WCHAR *LockName) { #ifdef KERNEL_MODE LARGE_INTEGER time; /* DbgPrint("Waiting (%S) in pid %d for lock %S\n", Operation, PsGetCurrentProcessId(), LockName); */ // DbgPrint("KERNEL WAITING FOR LOCK ==> %S\n", LockName); time.QuadPart = -(SECONDS(1) / LOCK_WAIT_DIVISOR); KeDelayExecutionThread(KernelMode, FALSE, &time); #else /* printf("Waiting (%S) in pid %d for lock %S\n", Operation, GetCurrentProcessId(), LockName); */ // OutputDebugString(L"USER WAITING FOR LOCK ==>\n");OutputDebugString(LockName);OutputDebugString(L"\n"); SleepEx(1000 / LOCK_WAIT_DIVISOR, TRUE); #endif } //--------------------------------------------------------------------------- // Lock_Exclusive //--------------------------------------------------------------------------- ALIGNED void Lock_Exclusive(LOCK *lockword, const WCHAR *LockName) { LONG oldval, newval; while (1) { // exclusive lock expects the exclusive bit to be clear oldval = (*lockword) & (~LOCK_EXCLUSIVE); // and sets the exclusive bit in the incremented count newval = LOCK_EXCLUSIVE | (oldval + 1); if (InterlockedCompareExchange(lockword, newval, oldval) == oldval) break; Lock_Delay(L"exc1", LockName); } while (1) { // now we wait for all share holders to unlock oldval = LOCK_EXCLUSIVE | 1; newval = LOCK_EXCLUSIVE | 1; if (InterlockedCompareExchange(lockword, newval, oldval) == oldval) break; Lock_Delay(L"exc2", LockName); } } //--------------------------------------------------------------------------- // Lock_Share //--------------------------------------------------------------------------- ALIGNED void Lock_Share(LOCK *lockword, const WCHAR *LockName) { LONG oldval, newval; while (1) { // share lock expects the count to have the exclusive bit clear oldval = (*lockword) & (~LOCK_EXCLUSIVE); // and keeps the exclusive bit clear in the incremented count newval = oldval + 1; if (InterlockedCompareExchange(lockword, newval, oldval) == oldval) break; Lock_Delay(L"shr", LockName); } } //--------------------------------------------------------------------------- // Lock_Unlock //--------------------------------------------------------------------------- ALIGNED void Lock_Unlock(LOCK *lockword, const WCHAR *LockName) { LONG oldval, newval; while (1) { oldval = *lockword; if (oldval == (LOCK_EXCLUSIVE | 1)) { // if the count indicates a single exclusive holder, // then clear the exclusive bit in the decremented count newval = LOCK_FREE; } else { // otherwise keep the exclusive bit as is // (either set or clear) in the decremented count newval = ((oldval & (~LOCK_EXCLUSIVE)) - 1) | (oldval & LOCK_EXCLUSIVE); } if (InterlockedCompareExchange(lockword, newval, oldval) == oldval) break; Lock_Delay(L"unlk", LockName); } }
{ "pile_set_name": "Github" }
/* * Nextcloud Talk application * * @author Mario Danic * Copyright (C) 2017-2018 Mario Danic <[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 3 of the License, or * at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.nextcloud.talk.models.json.websocket; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; import org.parceler.Parcel; import lombok.Data; @Data @JsonObject @Parcel public class BaseWebSocketMessage { @JsonField(name = "type") public String type; }
{ "pile_set_name": "Github" }
number_of_cats = 100 cats_with_hats = [] number_of_laps = 100 # We want the laps to be from 1 to 100 instead of 0 to 99 for lap in range(1, number_of_laps + 1): for cat in range(1, number_of_cats + 1): # Only look at cats that are divisible by the lap if cat % lap == 0: if cat in cats_with_hats: cats_with_hats.remove(cat) else: cats_with_hats.append(cat) print(cats_with_hats)
{ "pile_set_name": "Github" }
module.exports = inspectorLog; // black hole const nullStream = new (require('stream').Writable)(); nullStream._write = () => {}; /** * Outputs a `console.log()` to the Node.js Inspector console *only*. */ function inspectorLog() { const stdout = console._stdout; console._stdout = nullStream; console.log.apply(console, arguments); console._stdout = stdout; }
{ "pile_set_name": "Github" }
(function ($) { var Task = Wind.Async.Task; $.ajaxAsync = function (options) { return Task.create(function (t) { options.success = function (data, textStatus, jqXHR) { t.complete("success", { data: data, textStatus: textStatus, jqXHR: jqXHR }); } options.error = function (jqXHR, textStatus, errorThrow) { t.complete("failure", { jqXHR: jqXHR, textStatus: textStatus, errorThrow: errorThrow }); }; $.ajax(options); }); }; $.fn.readyAsync = function () { var _this = this; return Task.create(function (t) { _this.ready(function () { t.complete("success"); }); }); } if ($.fn.dialog) { $.fn.dialogAsync = function (options) { var _this = this; return Task.create(function (t) { options.close = function () { t.complete("success"); } _this.dialog(options); }); } } })(jQuery);
{ "pile_set_name": "Github" }
/* crypto/sha/sha256t.c */ /* ==================================================================== * Copyright (c) 2004 The OpenSSL Project. All rights reserved. * ==================================================================== */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <openssl/sha.h> #include <openssl/evp.h> #if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA256) int main(int argc, char *argv[]) { printf("No SHA256 support\n"); return (0); } #else unsigned char app_b1[SHA256_DIGEST_LENGTH] = { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad }; unsigned char app_b2[SHA256_DIGEST_LENGTH] = { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39, 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 }; unsigned char app_b3[SHA256_DIGEST_LENGTH] = { 0xcd, 0xc7, 0x6e, 0x5c, 0x99, 0x14, 0xfb, 0x92, 0x81, 0xa1, 0xc7, 0xe2, 0x84, 0xd7, 0x3e, 0x67, 0xf1, 0x80, 0x9a, 0x48, 0xa4, 0x97, 0x20, 0x0e, 0x04, 0x6d, 0x39, 0xcc, 0xc7, 0x11, 0x2c, 0xd0 }; unsigned char addenum_1[SHA224_DIGEST_LENGTH] = { 0x23, 0x09, 0x7d, 0x22, 0x34, 0x05, 0xd8, 0x22, 0x86, 0x42, 0xa4, 0x77, 0xbd, 0xa2, 0x55, 0xb3, 0x2a, 0xad, 0xbc, 0xe4, 0xbd, 0xa0, 0xb3, 0xf7, 0xe3, 0x6c, 0x9d, 0xa7 }; unsigned char addenum_2[SHA224_DIGEST_LENGTH] = { 0x75, 0x38, 0x8b, 0x16, 0x51, 0x27, 0x76, 0xcc, 0x5d, 0xba, 0x5d, 0xa1, 0xfd, 0x89, 0x01, 0x50, 0xb0, 0xc6, 0x45, 0x5c, 0xb4, 0xf5, 0x8b, 0x19, 0x52, 0x52, 0x25, 0x25 }; unsigned char addenum_3[SHA224_DIGEST_LENGTH] = { 0x20, 0x79, 0x46, 0x55, 0x98, 0x0c, 0x91, 0xd8, 0xbb, 0xb4, 0xc1, 0xea, 0x97, 0x61, 0x8a, 0x4b, 0xf0, 0x3f, 0x42, 0x58, 0x19, 0x48, 0xb2, 0xee, 0x4e, 0xe7, 0xad, 0x67 }; int main(int argc, char **argv) { unsigned char md[SHA256_DIGEST_LENGTH]; int i; EVP_MD_CTX evp; fprintf(stdout, "Testing SHA-256 "); EVP_Digest("abc", 3, md, NULL, EVP_sha256(), NULL); if (memcmp(md, app_b1, sizeof(app_b1))) { fflush(stdout); fprintf(stderr, "\nTEST 1 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); EVP_Digest("abcdbcde" "cdefdefg" "efghfghi" "ghijhijk" "ijkljklm" "klmnlmno" "mnopnopq", 56, md, NULL, EVP_sha256(), NULL); if (memcmp(md, app_b2, sizeof(app_b2))) { fflush(stdout); fprintf(stderr, "\nTEST 2 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); EVP_MD_CTX_init(&evp); EVP_DigestInit_ex(&evp, EVP_sha256(), NULL); for (i = 0; i < 1000000; i += 160) EVP_DigestUpdate(&evp, "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa", (1000000 - i) < 160 ? 1000000 - i : 160); EVP_DigestFinal_ex(&evp, md, NULL); EVP_MD_CTX_cleanup(&evp); if (memcmp(md, app_b3, sizeof(app_b3))) { fflush(stdout); fprintf(stderr, "\nTEST 3 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); fprintf(stdout, " passed.\n"); fflush(stdout); fprintf(stdout, "Testing SHA-224 "); EVP_Digest("abc", 3, md, NULL, EVP_sha224(), NULL); if (memcmp(md, addenum_1, sizeof(addenum_1))) { fflush(stdout); fprintf(stderr, "\nTEST 1 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); EVP_Digest("abcdbcde" "cdefdefg" "efghfghi" "ghijhijk" "ijkljklm" "klmnlmno" "mnopnopq", 56, md, NULL, EVP_sha224(), NULL); if (memcmp(md, addenum_2, sizeof(addenum_2))) { fflush(stdout); fprintf(stderr, "\nTEST 2 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); EVP_MD_CTX_init(&evp); EVP_DigestInit_ex(&evp, EVP_sha224(), NULL); for (i = 0; i < 1000000; i += 64) EVP_DigestUpdate(&evp, "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa", (1000000 - i) < 64 ? 1000000 - i : 64); EVP_DigestFinal_ex(&evp, md, NULL); EVP_MD_CTX_cleanup(&evp); if (memcmp(md, addenum_3, sizeof(addenum_3))) { fflush(stdout); fprintf(stderr, "\nTEST 3 of 3 failed.\n"); return 1; } else fprintf(stdout, "."); fflush(stdout); fprintf(stdout, " passed.\n"); fflush(stdout); return 0; } #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name">SMS Backup+</string> <string name="app_description"> Brug Gmail til at lave backup af dine SMS\'er. Dette er en forbedret version af applicationen "SMS Backup" af Christoph Studer, som understøtter genetablering af backuppen. Den er fuld bagudkompatibel med SMS Backup. </string> <string name="ui_sync_button_label_idle">Backup</string> <string name="ui_sync_button_label_canceling">Stopper</string> <string name="ui_sync_button_label_syncing">Stop</string> <string name="ui_restore_button_label_idle">Genetabler</string> <string name="ui_restore_button_label_restoring">Stop</string> <string name="status_idle">Venter</string> <string name="status_idle_details">Sidste backup tidspunkt: <xliff:g id="last_backup_date">%1$s</xliff:g></string> <string name="status_idle_details_never">aldrig</string> <string name="status_working">Arbejder</string> <string name="status_backup">Backup igang</string> <string name="status_restore">Genetablerer</string> <string name="status_backup_details"><xliff:g id="backed_up_items">%1$d</xliff:g>/<xliff:g id="total_items">%2$d</xliff:g> emner kopieret\u2026</string> <string name="status_restore_details">Genetablerede <xliff:g id="backed_up_items">%1$d</xliff:g>/<xliff:g id="total_items">%2$d</xliff:g> emner\u2026</string> <string name="status_login_details">Logger ind\u2026</string> <string name="status_updating_threads">Opdaterer tråde\u2026</string> <string name="status_done">Færdig</string> <string name="status_backup_done_details_max_per_sync">Det maksimale antal på %1$d emner per backup er nået. Genstart backup fo at fortsætte.</string> <string name="status_backup_done_details_noitems">Ingen emner at kopiere.</string> <plurals name="status_backup_done_details"> <item quantity="one">Kopierede <xliff:g id="total_items">%1$d</xliff:g> emne.</item> <item quantity="other">Kopierede <xliff:g id="total_items">%1$d</xliff:g> emner.</item> </plurals> <plurals name="status_restore_done_details"> <item quantity="one">Genetablerede <xliff:g id="total_items">%1$d</xliff:g> item (%2$d dups).</item> <item quantity="other">Genetablerede <xliff:g id="total_items">%1$d</xliff:g> items (%2$d dups).</item> </plurals> <string name="status_restore_canceled_details">%1$d/%2$d emner genetableret.</string> <string name="status_unknown_error">Fejl</string> <string name="notification_general_error">SMSBackup+ fejl</string> <string name="status_unknown_error_details">Fejl under backup/genetablering:\n<xliff:g id="error_description">%1$s</xliff:g></string> <string name="status_auth_failure">Login fejl</string> <string name="notification_auth_failure">SMSBackup+ login fejl</string> <string name="status_auth_failure_details_xoauth">XOAuth autorisations fejl. Kontroller at IMAP er aktiveret under dine Gmail konto indstillinger.</string> <string name="status_auth_failure_details_plain">IMAP autorisations fejl. Kontroller at login og password er korrekt.</string> <string name="status_calc_details">Beregner\u2026</string> <string name="status_canceled">Anulleret</string> <string name="status_canceled_details">%1$d/%2$d emner kopieret.</string> <string name="status_gmail_temp_error">Midlertidig Gmail IMAP fejl. Prøv igen senere.</string> <string name="ui_settings_advanced_label">Avancerede indstillinger</string> <string name="ui_settings_advanced_desc">Indstil avancerede indstillinger.</string> <string name="imap_settings">IMAP indstillinger</string> <string name="ui_login_label">Brugernavn</string> <string name="ui_login_desc">Din IMAP konto/e-mail adresse.</string> <string name="ui_password_label">Password</string> <string name="ui_password_desc">Dit IMAP konto password. Bruges kun når XOAuth er deaktiveret.</string> <string name="ui_password_dialog_msg">Kodeordet er kun lagret på denne enhed og bruges kun login.</string> <string name="ui_server_label">Server adresse</string> <string name="ui_server_desc">Adressen og porten på den server der skal sync\'es til.</string> <string name="ui_protocol_label">Sikkerhed</string> <string name="ui_authentication_label">Autentificering</string> <string name="plain">Klar tekst</string> <string name="ui_imap_folder_label">Gmail label</string> <string name="ui_imap_folder_label_dialog_msg">SMS beskeder der er backed op bliver tagged med denne label i Gmail.</string> <string name="ui_mail_subject_prefix_label">E-mail emne prefix</string> <string name="ui_mail_subject_prefix_desc">Brug IMAP folder navn som prefix i e-mail emne feltet.</string> <string name="ui_max_items_per_sync_label">Emner per backup</string> <string name="ui_max_items_per_sync_desc">Max antal af emner per backup.</string> <string name="ui_max_items_per_restore_label">Emner per genskabelse</string> <string name="ui_max_items_per_restore_desc">Max antal af emner per genskabelse.</string> <string name="ui_restore_starred_only_label">Stjerne markerede emner</string> <string name="ui_restore_starred_only_desc">Genskab kun emner der er markeret med stjerne.</string> <string name="ui_backup_mms_label">Backup MMS</string> <string name="ui_backup_mms_desc">Aktiver MMS backup</string> <string name="ui_backup_calllog_label">Backup opkalds log</string> <string name="ui_backup_calllog_desc">Aktiver opkalds log backup</string> <string name="ui_backup_calllog_sync_calendar_enabled_label">Kalender sync</string> <string name="ui_backup_calllog_sync_calendar_enabled_desc">Tilføj opkald til kalender</string> <string name="ui_backup_calllog_types_label">Opkalds typer</string> <string name="ui_backup_calllog_types_desc">Hvilke opkalds typer skal logges</string> <string name="ui_backup_calllog_sync_calendar_label">Ingen</string> <string name="ui_backup_calllog_sync_calendar_desc">Hvilken kalender der bruges til opkalds logs</string> <string name="ui_imap_folder_calllog_label">Opkalds log etiket</string> <string name="ui_imap_folder_calllog_label_dialog_msg">Opkald vil få denne etiket når de backes op til Gmail.</string> <string name="ui_mark_as_read_label">Marker som læst (emails)</string> <string name="ui_mark_as_read_desc">Skal beskeder i Gmail markeres som læst eller ej.</string> <string name="ui_mark_as_read_restore_label">Marker som læst (SMS)</string> <string name="ui_mark_as_read_restore_desc">Skal genskabte beskeder markeres som læst eller ej.</string> <string name="ui_email_address_style_label">Email adresse stil</string> <string name="ui_email_address_style_desc">Formatet på email adresser</string> <string name="ui_enable_auto_sync_label">Auto backup</string> <string name="ui_enable_auto_sync_desc">Aktiver automatisk backup af SMS\'er eller ej</string> <string name="ui_enable_auto_sync_summary">Automatisk backup %1$s.</string> <string name="ui_enable_auto_sync_no_enabled_summary">Ingen emne typer valgt.</string> <string name="sd_card_disclaimer">Automatisk backup vil sikkert ikke virke når app\'en er installeret på SD kortet.</string> <string name="ui_auto_backup_schedule_label">Almindeligt interval</string> <string name="ui_auto_backup_schedule_desc">Hvor ofte bliver der backed op</string> <string name="ui_auto_backup_incoming_schedule_label">Interval for indkomne beskeder</string> <string name="ui_auto_backup_incoming_schedule_desc">Hvor hurtigt skal der indkomne beskeder backes op</string> <string name="ui_wifi_only_label">WiFi krævet</string> <string name="ui_wifi_only_desc">Aktiver kun backup over WiFi</string> <string name="ui_notifications_label">Notifikationer</string> <string name="ui_notifications_desc">Baggrunds notifikationer</string> <string name="error_wifi_only_no_connection">Ingen WiFi forbindelse</string> <string name="error_no_connection">Ingen internet forbindelse</string> <string name="error_sms_provider_not_writable">Kan ikke skrive til SMS provider</string> <string name="ui_dialog_missing_credentials_title">Login information</string> <string name="ui_dialog_missing_credentials_msg_plain">Du skal først sætte brugernavn og password.</string> <string name="ui_dialog_invalid_imap_folder_title">Ugyldigt etiket navn</string> <string name="ui_dialog_invalid_imap_folder_msg">Etiketten må ikke indeholde mellemrum i starten eller slutningen.</string> <string name="ui_dialog_first_sync_title">Første backup</string> <string name="ui_dialog_first_sync_msg">Foretag backup af de SMS\'er der er på telefonen nu, eller spring over?</string> <string name="ui_dialog_first_sync_msg_batched">Foretag backup af de SMS\'er der er på telefonen nu, eller spring over?\n\nBemærk: Backuppen vil blive splittet op i bunker af %1$d beskeder.</string> <string name="ui_dialog_access_token_msg">Forespørger om adgang…</string> <string name="ui_dialog_access_token_error_title">Kunne ikke få adgang</string> <string name="ui_dialog_access_token_error_msg">Kunne ikke få adgang. Husk at vælg \"Tillad adgang\".</string> <string name="ui_dialog_connect_msg">Et browser vindue vil blive åbnet. Du vil blive bedt om at logge ind på din Gmail konto, for at give %1$s adgang til dine emails</string> <string name="ui_dialog_disconnect_msg">Er du sikker? Du skal bagefter gen-autorisere kontoen og dine synkroniseringen vil blive nulstillet.</string> <!--<string name="ui_dialog_upgrade_title">Opgraderings information</string>--> <string name="ui_sync">Backup</string> <string name="ui_skip">Spring over</string> <string name="err_sync_requires_login_info">Kan ikke tage backup uden login information.</string> <string name="menu_info">Om</string> <string name="menu_reset">Nulstil</string> <string name="ui_dialog_reset_title">Nulstil synkronisering</string> <string name="ui_dialog_reset_message">Vil du nulstille synkroniseringen? Du kan stadig vælge at springe beskeder over senere. </string> <string name="all_messages">Alle</string> <string name="gmail_needs_connecting">Tryk for at forbinde til din Gmail konto (påkrævet).</string> <string name="gmail_already_connected">Forbundet som %1$s.</string> <string name="ui_connected_label">Forbind</string> <string name="call_incoming">indkomne opkald</string> <string name="call_outgoing">udgående opkald</string> <string name="call_missed">ubesvarede opkald</string> <string name="call_missed_text">Ubesvaret opkald fra %1$s</string> <string name="call_incoming_text">Opkald fra %1$s</string> <string name="call_outgoing_text">Opkald til %1$s</string> <string name="call_number_field">Nummer: %1$s</string> <string name="call_duration_field">Varighed: %1$s</string> <string name="sms_with_field">SMS med %1$s</string> <!-- the subject line needs to be identical otherwise threading will be messed up --> <string name="call_with_field">Opkald med %1$s</string> <string name="ui_backup_contact_group_label">Backup af følgende kontakter</string> <string name="ui_backup_contact_group_desc">Tag kun backup af en specifik gruppe</string> <string name="everybody">Alle</string> <string name="call_type_everything">Alt</string> <string name="call_type_incoming">Kun indgående opkald</string> <string name="call_type_outgoing">Kun udgående opkald</string> <string name="call_type_incoming_outgoing">Indkomne &amp; Udgående</string> <string name="call_type_missed">Kun ubesvarede opkald</string> <string name="email_address_style_name">Navn</string> <string name="email_address_style_name_and_number">Navn (+00 123456)</string> <string name="email_address_style_number">+00 123456</string> <string name="_1h">1 t</string> <string name="_2h">2 t</string> <string name="_6h">6 t</string> <string name="_24h">24 t</string> <string name="never">Aldrig</string> <string name="_1min">1 min</string> <string name="_3mins">3 min</string> <string name="_30mins">30 min</string> <string name="security_none">Ingen</string> <string name="ui_third_party_integration_label">3. parts integration</string> <string name="ui_third_party_integration_desc">Tillad andre apps at trigge backup via Broadcast intents.</string> <!-- new ui --> <string name="ui_backup_settings_label">Backup indstillinger</string> <!-- <string name="ui_backup_settings_desc">Backup settings</string> --> <string name="ui_backup_calllog_settings_label">Opkalds log indstillinger</string> <!-- <string name="ui_backup_calllog_settings_desc">Call log settings</string> --> <string name="auto_backup_settings">Auto backup indstillinger</string> <string name="ui_restore_settings_label">Genetabler indstillinger</string> <!-- <string name="ui_restore_settings_desc">Restore settings</string> --> <string name="ui_backup_sms_label">Backup SMS</string> <string name="ui_backup_sms_desc">Aktiver SMS backup</string> <string name="ui_restore_sms_label">Genetabler SMS</string> <string name="ui_restore_calllog_label">Genetabler opkalds log</string> <string name="sms">SMS</string> <string name="mms">MMS</string> <string name="calllog">Opkalds log</string> <string name="app_log_skip_backup_already_running">Sprunget over fordi backup allerede er igang</string> <string name="app_log_skip_backup_skip_messages">Spring alle beskeder over</string> <string name="app_log_skip_backup_no_items">Sprunget over (ingen emner fundet)</string> <string name="app_log_missing_credentials">Sprunget over (mangler login info)</string> <string name="app_log_backup_requested">Backup aktiveret (%1$s)</string> <string name="app_log_start_backup">Starter backup (%1$s)</string> <string name="app_log_backup_messages">Backer op (%1$d SMS, %2$d MMS, %3$d opkalds log)</string> <string name="app_log_backup_messages_with_config">Bruger konfiguration: %1$s</string> <string name="app_log_backup_canceled">Backup anulleret</string> <string name="app_log_backup_finished">Backup færdig</string> <string name="app_log_backup_failed_authentication">Autentifiserings fejl: %1$s</string> <string name="app_log_backup_failed_general_error">Generel fejl: %1$s</string> <string name="app_log_backup_failed_connectivity">Ingen forbindelse. Backup sprunget over</string> <string name="app_log_scheduled_next_sync">Næste backup er planlagt til: %1$s</string> <string name="app_log_no_next_sync">Ingen ny backup planlagt</string> <string name="menu_view_log">Vis log</string> <string name="app_log_empty">Loggen er tom. Aktiver den i \"Avancerede indstillinger\".</string> <string name="pref_app_log">Synk log</string> <string name="pref_app_log_enabled">Loggen er gemt på SD kortet som \"sms_backup_plus.log\".</string> <string name="pref_app_log_disabled">Deaktiveret</string> <string name="pref_app_log_debug">Ekstra debug information</string> <string name="pref_app_log_debug_summary">Aktiverer ekstra debug logning i loggen.</string> <string name="source_incoming">indkomne</string> <string name="source_regular">almindelig</string> <string name="source_3rd_party">3. parts</string> <string name="source_manual">manuel</string> <string name="source_unknown">ukendt</string> <string name="ui_confirm_action_label">Bekræft handlinger</string> <string name="ui_confirm_action_desc">Spørg for backup og genetablering</string> <string name="ui_dialog_confirm_action_title">Bekræft handling</string> <string name="ui_dialog_confirm_action_msg">Er du sikker på at du vil udføre denne handling?</string> <string name="ui_dialog_account_manager_token_error"> Kunne ikke få en token fra systemet. Vil du prøve at autentifisere igennem browseren? </string> <string name="select_google_account">Vælg en google konto</string> <!-- donation related --> <string name="donate">Donering</string> <string name="donate_summary">Ved brug af sikker betaling gennem Google Play.</string> <string name="ui_dialog_donate_message">Vælg beløb:</string> <string name="ui_donation_success_message">Donationen er gennemført. Tak for hjælpen!</string> <string name="ui_donation_failure_message">Donationen fejlede: %1$s</string> <!-- purchase errors --> <string name="donation_error_iab_unavailable">I-app køb er ikke tilgængelig</string> <string name="donation_error_unavailable">ikke tilgængelig</string> <string name="donation_error_canceled">anulleret</string> <string name="donation_error_already_owned">du har allerede doneret</string> <string name="ui_dark_theme_label">Mørkt tema</string> <string name="status_permission_problem">Problem med tilladelser</string> <string name="permission_read_sms">Adgang til SMS beskeder</string> <string name="permission_read_call_log">Adgang til opkalds lister</string> <string name="permission_read_contacts">Adgang til kontakter</string> <string name="permission_unknown">Ukendt</string> <string name="ui_protocol_trust_all_certificates_label">Stol på alle certifikater</string> <string name="ui_protocol_trust_all_certificates_desc">Ikke anbefalet. Aktiver hvis der bruges en server med selv signeret certifikat.</string> <string name="ui_backup_calllog_after_call_label">Backup efter et opkald</string> <string name="ui_backup_calllog_after_call_desc">Backup automatisk efter et indgående/udgående opkald med same interval som indgående SMS</string> <string name="mark_as_read_always_read">Marker altid som læst</string> <string name="mark_as_read_always_unread">Marker altid som ulæst</string> <string name="mark_as_read_message_status">Brug besked status</string> <string name="custom_imap_not_configured">IMAP (ikke konfigureret)</string> <string name="call_rejected">indgående opkald, afvist</string> <string name="call_voicemail">indgående opkald, telefonsvarer</string> <string name="call_rejected_text">Afvist opkald fra %1$s</string> <string name="call_voicemail_text">Opkald fra %1$s (telefonsvarer)</string> <string name="pref_use_old_scheduler">Gammel skedulerings metode</string> <string name="pref_use_old_scheduler_summary">Gennemtving brug af gammel skedulerings metode</string> <string name="pref_use_old_scheduler_no_gcm_summary">Google Play Services er ikke tilgængelig</string> <string name="donation_unspecified_error">uspecifieret fejl: %1$d</string> <string name="error_no_sms_default_package">Der er sat en standard SMS pakke.</string> <string name="ui_dialog_sms_default_package_change_title">Påkrævet app ændring</string> <string name="ui_dialog_sms_default_package_change_msg"> "SMS Backup+ er nødt til at være din standard SMS app under genskabelses processen. Efter den er færdig bliver du bedt om at ændre indstillingen tilbage igen. Indkomne SMS'er undervejs bliver stadig modtaget og gemt, men der kommer ingen notifikatione." </string> </resources>
{ "pile_set_name": "Github" }
<?php /** * DO NOT EDIT THIS FILE! * * This file was automatically generated from external sources. * * Any manual change here will be lost the next time the SDK * is updated. You've been warned! */ namespace DTS\eBaySDK\Metadata\Types; /** * * @property \DTS\eBaySDK\Metadata\Types\Sel:ReturnsPolicy[] $returnPolicies * @property \DTS\eBaySDK\Metadata\Types\ErrorDetailV3[] $warnings */ class ReturnPolicyResponse extends \DTS\eBaySDK\Types\BaseType { /** * @var array Properties belonging to objects of this class. */ private static $propertyTypes = [ 'returnPolicies' => [ 'type' => 'DTS\eBaySDK\Metadata\Types\Sel:ReturnsPolicy', 'repeatable' => true, 'attribute' => false, 'elementName' => 'returnPolicies' ], 'warnings' => [ 'type' => 'DTS\eBaySDK\Metadata\Types\ErrorDetailV3', 'repeatable' => true, 'attribute' => false, 'elementName' => 'warnings' ] ]; /** * @param array $values Optional properties and values to assign to the object. */ public function __construct(array $values = []) { list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); parent::__construct($parentValues); if (!array_key_exists(__CLASS__, self::$properties)) { self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); } $this->setValues(__CLASS__, $childValues); } }
{ "pile_set_name": "Github" }
define(function (require) { require('./chord/ChordSeries'); require('./chord/ChordView'); var echarts = require('../echarts'); var zrUtil = require('zrender/core/util'); echarts.registerLayout(require('./chord/chordCircularLayout')); echarts.registerVisualCoding( 'chart', zrUtil.curry(require('../visual/dataColor'), 'chord') ); echarts.registerProcessor( 'filter', zrUtil.curry(require('../processor/dataFilter'), 'pie') ); });
{ "pile_set_name": "Github" }
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * 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.pentaho.di.ui.spoon.job; import org.pentaho.di.i18n.BaseMessages; public class XulMessages implements org.pentaho.xul.Messages { private static Class<?> PKG = XulMessages.class; // for i18n purposes, needed by Translator2!! public String getString( String key, String... parameters ) { return BaseMessages.getString( PKG, key, parameters ); } }
{ "pile_set_name": "Github" }
/* ------------------------------------------------------------------------------ * * # D3.js - donut chart entry animation * * Demo d3.js donut chart setup with .csv data source and loading animation * * Version: 1.0 * Latest update: August 1, 2015 * * ---------------------------------------------------------------------------- */ $(function () { // Initialize chart donutEntryAnimation('#d3-donut-entry-animation', 120); // Chart setup function donutEntryAnimation(element, radius) { // Basic setup // ------------------------------ // Colors var color = d3.scale.category20(); // Create chart // ------------------------------ // Add SVG element var container = d3.select(element).append("svg"); // Add SVG group var svg = container .attr("width", radius * 2) .attr("height", radius * 2) .append("g") .attr("transform", "translate(" + radius + "," + radius + ")"); // Construct chart layout // ------------------------------ // Arc var arc = d3.svg.arc() .outerRadius(radius) .innerRadius(radius / 1.75); // Pie var pie = d3.layout.pie() .sort(null) .value(function(d) { return d.population; }); // Load data // ------------------------------ d3.csv("assets/demo_data/d3/pies/pies_basic.csv", function(error, data) { // Pull out values data.forEach(function(d) { d.population = +d.population; }); // // Append chart elements // // Bind data var g = svg.selectAll(".d3-arc") .data(pie(data)) .enter() .append("g") .attr("class", "d3-arc"); // Add arc path g.append("path") .attr("d", arc) .style("stroke", "#fff") .style("fill", function(d) { return color(d.data.age); }) .transition() .ease("linear") .duration(1000) .attrTween("d", tweenPie); // Add text labels g.append("text") .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; }) .attr("dy", ".35em") .style("opacity", 0) .style("fill", "#fff") .style("text-anchor", "middle") .text(function(d) { return d.data.age; }) .transition() .ease("linear") .delay(1000) .duration(500) .style("opacity", 1); // Tween function tweenPie(b) { b.innerRadius = 0; var i = d3.interpolate({startAngle: 0, endAngle: 0}, b); return function(t) { return arc(i(t)); }; } // Animate donut // ------------------------------ $('.donut-animation').on('click', function (b) { // Remove old paths svg.selectAll("path").remove(); // Arc path g.append("path") .attr("d", arc) .style("stroke", "#fff") .style("fill", function(d) { return color(d.data.age); }) .transition() .ease("linear") .duration(1000) .attrTween("d", tweenPie); // Text labels g.append("text") .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; }) .style("opacity", 0) .style("fill", "#fff") .attr("dy", ".35em") .style("text-anchor", "middle") .text(function(d) { return d.data.age; }) .transition() .ease("linear") .delay(1000) .duration(500) .style("opacity", 1); }); }); } });
{ "pile_set_name": "Github" }
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <DVTKit/DVTLibraryDetailController.h> @class QLPreviewView; @interface DVTQuickLookLibraryDetailController : DVTLibraryDetailController { QLPreviewView *_previewView; struct { unsigned int delegateImplementsShouldScaleToFit:1; unsigned int _reserved:7; } _flags; } - (void).cxx_destruct; - (void)sizeToFitSuggestedSize:(struct CGSize)arg1 forAsset:(id)arg2; - (void)refreshWithAsset:(id)arg1 representedObject:(id)arg2; - (void)setDelegate:(id)arg1; @end
{ "pile_set_name": "Github" }
/* * Copyright (c) 1997, 2007, 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. */ /* Generated By:JJTree: Do not edit this line. JDMIpAddress.java */ package com.sun.jmx.snmp.IPAcl; import java.lang.StringBuffer; import java.net.UnknownHostException; class JDMIpAddress extends Host { private static final long serialVersionUID = 849729919486384484L; protected StringBuffer address= new StringBuffer(); JDMIpAddress(int id) { super(id); } JDMIpAddress(Parser p, int id) { super(p, id); } public static Node jjtCreate(int id) { return new JDMIpAddress(id); } public static Node jjtCreate(Parser p, int id) { return new JDMIpAddress(p, id); } protected String getHname() { return address.toString(); } protected PrincipalImpl createAssociatedPrincipal() throws UnknownHostException { return new PrincipalImpl(address.toString()); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="margin_fab_button">16dp</dimen> <dimen name="margin_top_fab_button">24dp</dimen> </resources>
{ "pile_set_name": "Github" }
/******************** (C) COPYRIGHT 2010 STMicroelectronics ******************** * File Name : usb_type.h * Author : MCD Application Team * Version : V3.2.1 * Date : 07/05/2010 * Description : Type definitions used by the USB Library ******************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. *******************************************************************************/ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __USB_TYPE_H #define __USB_TYPE_H /* Includes ------------------------------------------------------------------*/ #include "usb_conf.h" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ #ifndef NULL #define NULL ((void *)0) #endif #ifndef __STM32F10x_H typedef signed long s32; typedef signed short s16; typedef signed char s8; typedef volatile signed long vs32; typedef volatile signed short vs16; typedef volatile signed char vs8; typedef unsigned long u32; typedef unsigned short u16; typedef unsigned char u8; typedef unsigned long const uc32; /* Read Only */ typedef unsigned short const uc16; /* Read Only */ typedef unsigned char const uc8; /* Read Only */ typedef volatile unsigned long vu32; typedef volatile unsigned short vu16; typedef volatile unsigned char vu8; typedef volatile unsigned long const vuc32; /* Read Only */ typedef volatile unsigned short const vuc16; /* Read Only */ typedef volatile unsigned char const vuc8; /* Read Only */ typedef enum { FALSE = 0, TRUE = !FALSE } bool; typedef enum { RESET = 0, SET = !RESET } FlagStatus, ITStatus; typedef enum { DISABLE = 0, ENABLE = !DISABLE} FunctionalState; typedef enum { ERROR = 0, SUCCESS = !ERROR} ErrorStatus; #endif /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ /* External variables --------------------------------------------------------*/ #endif /* __USB_TYPE_H */ /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 104af59ab05c1f84aa1a290924291f68 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.hibernate.jsr303.tck.tests.constraints.constraintcomposition; import com.google.gwt.junit.client.GWTTestCase; /** * Wraps {@link ConstraintCompositionTest}. */ public class ConstraintCompositionGwtTest extends GWTTestCase { private final ConstraintCompositionTest delegate = new ConstraintCompositionTest(); @Override public String getModuleName() { return "org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.TckTest"; } public void testAttributesDefinedOnComposingConstraints() { delegate.testAttributesDefinedOnComposingConstraints(); } public void testComposedConstraints() { delegate.testComposedConstraints(); } public void testComposedConstraintsAreRecursive() { delegate.testComposedConstraintsAreRecursive(); } public void testEachFailingConstraintCreatesConstraintViolation() { delegate.testEachFailingConstraintCreatesConstraintViolation(); } public void testGroupsDefinedOnMainAnnotationAreInherited() { delegate.testGroupsDefinedOnMainAnnotationAreInherited(); } public void testOnlySingleConstraintViolation() { delegate.testOnlySingleConstraintViolation(); } public void testPayloadPropagationInComposedConstraints() { delegate.testPayloadPropagationInComposedConstraints(); } public void testValidationOfMainAnnotationIsAlsoApplied() { delegate.testValidationOfMainAnnotationIsAlsoApplied(); } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <!-- Copyright 2010 and onwards Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="browser_action.css" type="text/css"> <script src="lib/jquery.min.js"></script> <script src="lib/moment+langs.min.js"></script> <script src="constants.js"></script> <script src="options.js"></script> <script src="utils.js"></script> <script src="browser_action.js"></script> </head> <body> <header> <div id="action-bar"> <img src="icons/ic_add_white_24dp.png" id="show_quick_add" class="i18n"> <img src="icons/ic_refresh_white_24dp.png" id="sync_now" class="i18n"> <img src="icons/ic_settings_white_24dp.png" id="show_options" class="i18n"> </div> <div class="popup-title"> <a data-href="calendar_ui_url" target="_blank"> <span class="i18n" id="logo_text">Google Calendar</span> </a> </div> </header> <div class="section-container"> <section> <div id="info_bar"></div> <div id="error"> <p class="i18n" id="authorization_explanation"></p> <p><button class="button i18n" id="authorization_required"></button></p> <p> <a class="i18n" id="problems" target="_blank" href="https://github.com/manastungare/google-calendar-crx/wiki/Troubleshooting">Problems?</a> </p> </div> <div id="quick-add"> <h2 class="i18n" id="add_an_event">Add an Event</h2> <select id="quick-add-calendar-list"/> <textarea id="quick-add-event-title" rows="5" tabindex="1"></textarea> <div class="quick-add-buttons"> <button id="quick_add_button" class="button i18n" tabindex="2">Quick Add</button> </div> </div> <div id="calendar-events"></div> </section> </div> </body> </html>
{ "pile_set_name": "Github" }
// Validation errors messages for Parsley import Parsley from '../parsley'; Parsley.addMessages('el', { dateiso: "Η τιμή πρέπει να είναι μια έγκυρη ημερομηνία (YYYY-MM-DD).", minwords: "Το κείμενο είναι πολύ μικρό. Πρέπει να έχει %s ή και περισσότερες λέξεις.", maxwords: "Το κείμενο είναι πολύ μεγάλο. Πρέπει να έχει %s ή και λιγότερες λέξεις.", words: "Το μήκος του κειμένου είναι μη έγκυρο. Πρέπει να είναι μεταξύ %s και %s λεξεων.", gt: "Η τιμή πρέπει να είναι μεγαλύτερη.", gte: "Η τιμή πρέπει να είναι μεγαλύτερη ή ίση.", lt: "Η τιμή πρέπει να είναι μικρότερη.", lte: "Η τιμή πρέπει να είναι μικρότερη ή ίση.", notequalto: "Η τιμή πρέπει να είναι διαφορετική." });
{ "pile_set_name": "Github" }
map_header NameRatersHouse, NAME_RATERS_HOUSE, HOUSE, 0 end_map_header
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // <auto-generated> // このコードはツールによって生成されました。 // ランタイム バージョン:2.0.50727.8745 // // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 // コードが再生成されるときに損失したりします。 // </auto-generated> //------------------------------------------------------------------------------ namespace MsgPack.Serialization.GeneratedSerializers { [System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.9.0.0")] [System.Diagnostics.DebuggerNonUserCodeAttribute()] public class MsgPack_Serialization_PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFieldSerializer : MsgPack.Serialization.MessagePackSerializer<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField> { private MsgPack.Serialization.MessagePackSerializer<MsgPack.Serialization.FileSystemEntry> _serializer0; private System.Collections.Generic.IList<System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>> _packOperationList; private System.Collections.Generic.IDictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>> _packOperationTable; private System.Collections.Generic.IDictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, bool>> _nullCheckersTable; private System.Action<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, MsgPack.Serialization.FileSystemEntry> this_SetUnpackedValueOfPolymorphicDelegate; private System.Collections.Generic.IList<string> _memberNames; private System.Collections.Generic.IList<System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>> _unpackOperationList; private System.Collections.Generic.IDictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>> _unpackOperationTable; public MsgPack_Serialization_PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFieldSerializer(MsgPack.Serialization.SerializationContext context) : base(context, (MsgPack.Serialization.SerializerCapabilities.PackTo | MsgPack.Serialization.SerializerCapabilities.UnpackFrom)) { MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema); schema0 = MsgPack.Serialization.PolymorphismSchema.ForPolymorphicObject(typeof(MsgPack.Serialization.FileSystemEntry)); this._serializer0 = context.GetSerializer<MsgPack.Serialization.FileSystemEntry>(schema0); System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>[] packOperationList = default(System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>[]); packOperationList = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>[1]; packOperationList[0] = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>(this.PackValueOfPolymorphic); this._packOperationList = packOperationList; System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>> packOperationTable = default(System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>>); packOperationTable = new System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>>(1); packOperationTable["Polymorphic"] = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>(this.PackValueOfPolymorphic); this._packOperationTable = packOperationTable; System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, bool>> nullCheckerTable = default(System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, bool>>); nullCheckerTable = new System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, bool>>(1); nullCheckerTable["Polymorphic"] = new System.Func<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, bool>(this.IsPolymorphicNull); this._nullCheckersTable = nullCheckerTable; System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>[] unpackOperationList = default(System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>[]); unpackOperationList = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>[1]; unpackOperationList[0] = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>(this.UnpackValueOfPolymorphic); this._unpackOperationList = unpackOperationList; System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>> unpackOperationTable = default(System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>>); unpackOperationTable = new System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>>(1); unpackOperationTable["Polymorphic"] = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, int, int>(this.UnpackValueOfPolymorphic); this._unpackOperationTable = unpackOperationTable; this._memberNames = new string[] { "Polymorphic"}; this.this_SetUnpackedValueOfPolymorphicDelegate = new System.Action<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, MsgPack.Serialization.FileSystemEntry>(this.SetUnpackedValueOfPolymorphic); } private void PackValueOfPolymorphic(MsgPack.Packer packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField objectTree) { this._serializer0.PackTo(packer, objectTree.Polymorphic); } private bool IsPolymorphicNull(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField objectTree) { return (objectTree.Polymorphic == null); } protected internal override void PackToCore(MsgPack.Packer packer, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField objectTree) { MsgPack.Serialization.PackToArrayParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField> packHelperParameters = default(MsgPack.Serialization.PackToArrayParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>); packHelperParameters.Packer = packer; packHelperParameters.Target = objectTree; packHelperParameters.Operations = this._packOperationList; MsgPack.Serialization.PackToMapParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField> packHelperParameters0 = default(MsgPack.Serialization.PackToMapParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>); packHelperParameters0.Packer = packer; packHelperParameters0.Target = objectTree; packHelperParameters0.Operations = this._packOperationTable; packHelperParameters0.SerializationContext = this.OwnerContext; packHelperParameters0.NullCheckers = this._nullCheckersTable; if ((this.OwnerContext.SerializationMethod == MsgPack.Serialization.SerializationMethod.Array)) { MsgPack.Serialization.PackHelpers.PackToArray(ref packHelperParameters); } else { MsgPack.Serialization.PackHelpers.PackToMap(ref packHelperParameters0); } } private void SetUnpackedValueOfPolymorphic(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField unpackingContext, MsgPack.Serialization.FileSystemEntry unpackedValue) { unpackingContext.Polymorphic = unpackedValue; } private void UnpackValueOfPolymorphic(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField unpackingContext, int indexOfItem, int itemsCount) { MsgPack.Serialization.UnpackReferenceTypeValueParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, MsgPack.Serialization.FileSystemEntry> unpackHelperParameters = default(MsgPack.Serialization.UnpackReferenceTypeValueParameters<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField, MsgPack.Serialization.FileSystemEntry>); unpackHelperParameters.Unpacker = unpacker; unpackHelperParameters.UnpackingContext = unpackingContext; unpackHelperParameters.Serializer = this._serializer0; unpackHelperParameters.ItemsCount = itemsCount; unpackHelperParameters.Unpacked = indexOfItem; unpackHelperParameters.TargetObjectType = typeof(MsgPack.Serialization.FileSystemEntry); unpackHelperParameters.MemberName = "Polymorphic"; unpackHelperParameters.NilImplication = MsgPack.Serialization.NilImplication.MemberDefault; unpackHelperParameters.DirectRead = null; unpackHelperParameters.Setter = this.this_SetUnpackedValueOfPolymorphicDelegate; MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(ref unpackHelperParameters); } protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField(); if (unpacker.IsArrayHeader) { return MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>(), this._memberNames, this._unpackOperationList); } else { return MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity<MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField>(), this._unpackOperationTable); } } } }
{ "pile_set_name": "Github" }
MtMoon3Script_4a325: ; pikachu-related function? ld a, [wd472] bit 7, a ret z ld a, [wWalkBikeSurfState] and a ret nz push hl push bc callab GetPikachuFacingDirectionAndReturnToE pop bc pop hl ld a, b cp e ret nz push hl ld a, [wUpdateSpritesEnabled] push af ld a, $ff ld [wUpdateSpritesEnabled], a callab LoadPikachuShadowIntoVRAM pop af ld [wUpdateSpritesEnabled], a pop hl call ApplyPikachuMovementData ret
{ "pile_set_name": "Github" }
import numpy as np from matplotlib import cbook, rcParams from matplotlib.axes import Axes import matplotlib.axis as maxis from matplotlib.patches import Circle from matplotlib.path import Path import matplotlib.spines as mspines from matplotlib.ticker import ( Formatter, NullLocator, FixedLocator, NullFormatter) from matplotlib.transforms import Affine2D, BboxTransformTo, Transform class GeoAxes(Axes): """An abstract base class for geographic projections.""" class ThetaFormatter(Formatter): """ Used to format the theta tick labels. Converts the native unit of radians into degrees and adds a degree symbol. """ def __init__(self, round_to=1.0): self._round_to = round_to def __call__(self, x, pos=None): degrees = (x / np.pi) * 180.0 degrees = np.round(degrees / self._round_to) * self._round_to if rcParams['text.usetex'] and not rcParams['text.latex.unicode']: return r"$%0.0f^\circ$" % degrees else: return "%0.0f\N{DEGREE SIGN}" % degrees RESOLUTION = 75 def _init_axis(self): self.xaxis = maxis.XAxis(self) self.yaxis = maxis.YAxis(self) # Do not register xaxis or yaxis with spines -- as done in # Axes._init_axis() -- until GeoAxes.xaxis.cla() works. # self.spines['geo'].register_axis(self.yaxis) self._update_transScale() def cla(self): Axes.cla(self) self.set_longitude_grid(30) self.set_latitude_grid(15) self.set_longitude_grid_ends(75) self.xaxis.set_minor_locator(NullLocator()) self.yaxis.set_minor_locator(NullLocator()) self.xaxis.set_ticks_position('none') self.yaxis.set_ticks_position('none') self.yaxis.set_tick_params(label1On=True) # Why do we need to turn on yaxis tick labels, but # xaxis tick labels are already on? self.grid(rcParams['axes.grid']) Axes.set_xlim(self, -np.pi, np.pi) Axes.set_ylim(self, -np.pi / 2.0, np.pi / 2.0) def _set_lim_and_transforms(self): # A (possibly non-linear) projection on the (already scaled) data self.transProjection = self._get_core_transform(self.RESOLUTION) self.transAffine = self._get_affine_transform() self.transAxes = BboxTransformTo(self.bbox) # The complete data transformation stack -- from data all the # way to display coordinates self.transData = \ self.transProjection + \ self.transAffine + \ self.transAxes # This is the transform for longitude ticks. self._xaxis_pretransform = \ Affine2D() \ .scale(1, self._longitude_cap * 2) \ .translate(0, -self._longitude_cap) self._xaxis_transform = \ self._xaxis_pretransform + \ self.transData self._xaxis_text1_transform = \ Affine2D().scale(1, 0) + \ self.transData + \ Affine2D().translate(0, 4) self._xaxis_text2_transform = \ Affine2D().scale(1, 0) + \ self.transData + \ Affine2D().translate(0, -4) # This is the transform for latitude ticks. yaxis_stretch = Affine2D().scale(np.pi * 2, 1).translate(-np.pi, 0) yaxis_space = Affine2D().scale(1, 1.1) self._yaxis_transform = \ yaxis_stretch + \ self.transData yaxis_text_base = \ yaxis_stretch + \ self.transProjection + \ (yaxis_space + \ self.transAffine + \ self.transAxes) self._yaxis_text1_transform = \ yaxis_text_base + \ Affine2D().translate(-8, 0) self._yaxis_text2_transform = \ yaxis_text_base + \ Affine2D().translate(8, 0) def _get_affine_transform(self): transform = self._get_core_transform(1) xscale, _ = transform.transform_point((np.pi, 0)) _, yscale = transform.transform_point((0, np.pi / 2)) return Affine2D() \ .scale(0.5 / xscale, 0.5 / yscale) \ .translate(0.5, 0.5) def get_xaxis_transform(self, which='grid'): cbook._check_in_list(['tick1', 'tick2', 'grid'], which=which) return self._xaxis_transform def get_xaxis_text1_transform(self, pad): return self._xaxis_text1_transform, 'bottom', 'center' def get_xaxis_text2_transform(self, pad): return self._xaxis_text2_transform, 'top', 'center' def get_yaxis_transform(self, which='grid'): cbook._check_in_list(['tick1', 'tick2', 'grid'], which=which) return self._yaxis_transform def get_yaxis_text1_transform(self, pad): return self._yaxis_text1_transform, 'center', 'right' def get_yaxis_text2_transform(self, pad): return self._yaxis_text2_transform, 'center', 'left' def _gen_axes_patch(self): return Circle((0.5, 0.5), 0.5) def _gen_axes_spines(self): return {'geo': mspines.Spine.circular_spine(self, (0.5, 0.5), 0.5)} def set_yscale(self, *args, **kwargs): if args[0] != 'linear': raise NotImplementedError set_xscale = set_yscale def set_xlim(self, *args, **kwargs): raise TypeError("It is not possible to change axes limits " "for geographic projections. Please consider " "using Basemap or Cartopy.") set_ylim = set_xlim def format_coord(self, lon, lat): 'return a format string formatting the coordinate' lon, lat = np.rad2deg([lon, lat]) if lat >= 0.0: ns = 'N' else: ns = 'S' if lon >= 0.0: ew = 'E' else: ew = 'W' return ('%f\N{DEGREE SIGN}%s, %f\N{DEGREE SIGN}%s' % (abs(lat), ns, abs(lon), ew)) def set_longitude_grid(self, degrees): """ Set the number of degrees between each longitude grid. """ # Skip -180 and 180, which are the fixed limits. grid = np.arange(-180 + degrees, 180, degrees) self.xaxis.set_major_locator(FixedLocator(np.deg2rad(grid))) self.xaxis.set_major_formatter(self.ThetaFormatter(degrees)) def set_latitude_grid(self, degrees): """ Set the number of degrees between each latitude grid. """ # Skip -90 and 90, which are the fixed limits. grid = np.arange(-90 + degrees, 90, degrees) self.yaxis.set_major_locator(FixedLocator(np.deg2rad(grid))) self.yaxis.set_major_formatter(self.ThetaFormatter(degrees)) def set_longitude_grid_ends(self, degrees): """ Set the latitude(s) at which to stop drawing the longitude grids. """ self._longitude_cap = np.deg2rad(degrees) self._xaxis_pretransform \ .clear() \ .scale(1.0, self._longitude_cap * 2.0) \ .translate(0.0, -self._longitude_cap) def get_data_ratio(self): ''' Return the aspect ratio of the data itself. ''' return 1.0 ### Interactive panning def can_zoom(self): """ Return *True* if this axes supports the zoom box button functionality. This axes object does not support interactive zoom box. """ return False def can_pan(self) : """ Return *True* if this axes supports the pan/zoom button functionality. This axes object does not support interactive pan/zoom. """ return False def start_pan(self, x, y, button): pass def end_pan(self): pass def drag_pan(self, button, key, x, y): pass class _GeoTransform(Transform): # Factoring out some common functionality. input_dims = 2 output_dims = 2 is_separable = False def __init__(self, resolution): """ Create a new geographical transform. Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space. """ Transform.__init__(self) self._resolution = resolution def __str__(self): return "{}({})".format(type(self).__name__, self._resolution) def transform_path_non_affine(self, path): # docstring inherited ipath = path.interpolated(self._resolution) return Path(self.transform(ipath.vertices), ipath.codes) class AitoffAxes(GeoAxes): name = 'aitoff' class AitoffTransform(_GeoTransform): """The base Aitoff transform.""" def transform_non_affine(self, ll): # docstring inherited longitude = ll[:, 0] latitude = ll[:, 1] # Pre-compute some values half_long = longitude / 2.0 cos_latitude = np.cos(latitude) alpha = np.arccos(cos_latitude * np.cos(half_long)) # Avoid divide-by-zero errors using same method as NumPy. alpha[alpha == 0.0] = 1e-20 # We want unnormalized sinc. numpy.sinc gives us normalized sinc_alpha = np.sin(alpha) / alpha xy = np.empty_like(ll, float) xy[:, 0] = (cos_latitude * np.sin(half_long)) / sinc_alpha xy[:, 1] = np.sin(latitude) / sinc_alpha return xy def inverted(self): # docstring inherited return AitoffAxes.InvertedAitoffTransform(self._resolution) class InvertedAitoffTransform(_GeoTransform): def transform_non_affine(self, xy): # docstring inherited # MGDTODO: Math is hard ;( return xy def inverted(self): # docstring inherited return AitoffAxes.AitoffTransform(self._resolution) def __init__(self, *args, **kwargs): self._longitude_cap = np.pi / 2.0 GeoAxes.__init__(self, *args, **kwargs) self.set_aspect(0.5, adjustable='box', anchor='C') self.cla() def _get_core_transform(self, resolution): return self.AitoffTransform(resolution) class HammerAxes(GeoAxes): name = 'hammer' class HammerTransform(_GeoTransform): """The base Hammer transform.""" def transform_non_affine(self, ll): # docstring inherited longitude = ll[:, 0:1] latitude = ll[:, 1:2] # Pre-compute some values half_long = longitude / 2.0 cos_latitude = np.cos(latitude) sqrt2 = np.sqrt(2.0) alpha = np.sqrt(1.0 + cos_latitude * np.cos(half_long)) x = (2.0 * sqrt2) * (cos_latitude * np.sin(half_long)) / alpha y = (sqrt2 * np.sin(latitude)) / alpha return np.concatenate((x, y), 1) def inverted(self): # docstring inherited return HammerAxes.InvertedHammerTransform(self._resolution) class InvertedHammerTransform(_GeoTransform): def transform_non_affine(self, xy): # docstring inherited x, y = xy.T z = np.sqrt(1 - (x / 4) ** 2 - (y / 2) ** 2) longitude = 2 * np.arctan((z * x) / (2 * (2 * z ** 2 - 1))) latitude = np.arcsin(y*z) return np.column_stack([longitude, latitude]) def inverted(self): # docstring inherited return HammerAxes.HammerTransform(self._resolution) def __init__(self, *args, **kwargs): self._longitude_cap = np.pi / 2.0 GeoAxes.__init__(self, *args, **kwargs) self.set_aspect(0.5, adjustable='box', anchor='C') self.cla() def _get_core_transform(self, resolution): return self.HammerTransform(resolution) class MollweideAxes(GeoAxes): name = 'mollweide' class MollweideTransform(_GeoTransform): """The base Mollweide transform.""" def transform_non_affine(self, ll): # docstring inherited def d(theta): delta = (-(theta + np.sin(theta) - pi_sin_l) / (1 + np.cos(theta))) return delta, np.abs(delta) > 0.001 longitude = ll[:, 0] latitude = ll[:, 1] clat = np.pi/2 - np.abs(latitude) ihigh = clat < 0.087 # within 5 degrees of the poles ilow = ~ihigh aux = np.empty(latitude.shape, dtype=float) if ilow.any(): # Newton-Raphson iteration pi_sin_l = np.pi * np.sin(latitude[ilow]) theta = 2.0 * latitude[ilow] delta, large_delta = d(theta) while np.any(large_delta): theta[large_delta] += delta[large_delta] delta, large_delta = d(theta) aux[ilow] = theta / 2 if ihigh.any(): # Taylor series-based approx. solution e = clat[ihigh] d = 0.5 * (3 * np.pi * e**2) ** (1.0/3) aux[ihigh] = (np.pi/2 - d) * np.sign(latitude[ihigh]) xy = np.empty(ll.shape, dtype=float) xy[:, 0] = (2.0 * np.sqrt(2.0) / np.pi) * longitude * np.cos(aux) xy[:, 1] = np.sqrt(2.0) * np.sin(aux) return xy def inverted(self): # docstring inherited return MollweideAxes.InvertedMollweideTransform(self._resolution) class InvertedMollweideTransform(_GeoTransform): def transform_non_affine(self, xy): # docstring inherited x = xy[:, 0:1] y = xy[:, 1:2] # from Equations (7, 8) of # http://mathworld.wolfram.com/MollweideProjection.html theta = np.arcsin(y / np.sqrt(2)) lon = (np.pi / (2 * np.sqrt(2))) * x / np.cos(theta) lat = np.arcsin((2 * theta + np.sin(2 * theta)) / np.pi) return np.concatenate((lon, lat), 1) def inverted(self): # docstring inherited return MollweideAxes.MollweideTransform(self._resolution) def __init__(self, *args, **kwargs): self._longitude_cap = np.pi / 2.0 GeoAxes.__init__(self, *args, **kwargs) self.set_aspect(0.5, adjustable='box', anchor='C') self.cla() def _get_core_transform(self, resolution): return self.MollweideTransform(resolution) class LambertAxes(GeoAxes): name = 'lambert' class LambertTransform(_GeoTransform): """The base Lambert transform.""" def __init__(self, center_longitude, center_latitude, resolution): """ Create a new Lambert transform. Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved Lambert space. """ _GeoTransform.__init__(self, resolution) self._center_longitude = center_longitude self._center_latitude = center_latitude def transform_non_affine(self, ll): # docstring inherited longitude = ll[:, 0:1] latitude = ll[:, 1:2] clong = self._center_longitude clat = self._center_latitude cos_lat = np.cos(latitude) sin_lat = np.sin(latitude) diff_long = longitude - clong cos_diff_long = np.cos(diff_long) inner_k = np.maximum( # Prevent divide-by-zero problems 1 + np.sin(clat)*sin_lat + np.cos(clat)*cos_lat*cos_diff_long, 1e-15) k = np.sqrt(2 / inner_k) x = k * cos_lat*np.sin(diff_long) y = k * (np.cos(clat)*sin_lat - np.sin(clat)*cos_lat*cos_diff_long) return np.concatenate((x, y), 1) def inverted(self): # docstring inherited return LambertAxes.InvertedLambertTransform( self._center_longitude, self._center_latitude, self._resolution) class InvertedLambertTransform(_GeoTransform): def __init__(self, center_longitude, center_latitude, resolution): _GeoTransform.__init__(self, resolution) self._center_longitude = center_longitude self._center_latitude = center_latitude def transform_non_affine(self, xy): # docstring inherited x = xy[:, 0:1] y = xy[:, 1:2] clong = self._center_longitude clat = self._center_latitude p = np.maximum(np.hypot(x, y), 1e-9) c = 2 * np.arcsin(0.5 * p) sin_c = np.sin(c) cos_c = np.cos(c) lat = np.arcsin(cos_c*np.sin(clat) + ((y*sin_c*np.cos(clat)) / p)) lon = clong + np.arctan( (x*sin_c) / (p*np.cos(clat)*cos_c - y*np.sin(clat)*sin_c)) return np.concatenate((lon, lat), 1) def inverted(self): # docstring inherited return LambertAxes.LambertTransform( self._center_longitude, self._center_latitude, self._resolution) def __init__(self, *args, center_longitude=0, center_latitude=0, **kwargs): self._longitude_cap = np.pi / 2 self._center_longitude = center_longitude self._center_latitude = center_latitude GeoAxes.__init__(self, *args, **kwargs) self.set_aspect('equal', adjustable='box', anchor='C') self.cla() def cla(self): GeoAxes.cla(self) self.yaxis.set_major_formatter(NullFormatter()) def _get_core_transform(self, resolution): return self.LambertTransform( self._center_longitude, self._center_latitude, resolution) def _get_affine_transform(self): return Affine2D() \ .scale(0.25) \ .translate(0.5, 0.5)
{ "pile_set_name": "Github" }
require 'test_helper' require 'zip/filesystem' class ZipFsFileStatTest < MiniTest::Test def setup @zip_file = ::Zip::File.new('test/data/zipWithDirs.zip') end def teardown @zip_file.close if @zip_file end def test_blocks assert_nil(@zip_file.file.stat('file1').blocks) end def test_ino assert_equal(0, @zip_file.file.stat('file1').ino) end def test_uid assert_equal(0, @zip_file.file.stat('file1').uid) end def test_gid assert_equal(0, @zip_file.file.stat('file1').gid) end def test_ftype assert_equal('file', @zip_file.file.stat('file1').ftype) assert_equal('directory', @zip_file.file.stat('dir1').ftype) end def test_mode assert_equal(0o600, @zip_file.file.stat('file1').mode & 0o777) assert_equal(0o600, @zip_file.file.stat('file1').mode & 0o777) assert_equal(0o755, @zip_file.file.stat('dir1').mode & 0o777) assert_equal(0o755, @zip_file.file.stat('dir1').mode & 0o777) end def test_dev assert_equal(0, @zip_file.file.stat('file1').dev) end def test_rdev assert_equal(0, @zip_file.file.stat('file1').rdev) end def test_rdev_major assert_equal(0, @zip_file.file.stat('file1').rdev_major) end def test_rdev_minor assert_equal(0, @zip_file.file.stat('file1').rdev_minor) end def test_nlink assert_equal(1, @zip_file.file.stat('file1').nlink) end def test_blksize assert_nil(@zip_file.file.stat('file1').blksize) end end
{ "pile_set_name": "Github" }
// // RACStringSequence.h // ReactiveCocoa // // Created by Justin Spahr-Summers on 2012-10-29. // Copyright (c) 2012 GitHub. All rights reserved. // #import "RACSequence.h" // Private class that adapts a string to the RACSequence interface. @interface RACStringSequence : RACSequence // Returns a sequence for enumerating over the given string, starting from the // given character offset. The string will be copied to prevent mutation. + (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset; @end
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.royale.framework</groupId> <artifactId>themes</artifactId> <version>0.9.8-SNAPSHOT</version> </parent> <artifactId>Jewel-Light-NoFlat-Primary-Green-Theme</artifactId> <version>0.9.8-SNAPSHOT</version> <packaging>swc</packaging> <name>Apache Royale: Framework: Themes: Jewel-Light-NoFlat-Primary-Green-Theme</name> <build> <sourceDirectory>src/main/royale</sourceDirectory> <plugins> <plugin> <groupId>org.apache.royale.compiler</groupId> <artifactId>royale-maven-plugin</artifactId> <version>${royale.compiler.version}</version> <extensions>true</extensions> <configuration> <includeFiles> <include-file> <name>assets/*</name> <path>../../JewelTheme/src/main/resources/assets/*</path> </include-file> <include-file> <name>defaults.css</name> <path>../src/main/resources/defaults.css</path> </include-file> </includeFiles> </configuration> </plugin> </plugins> </build> <properties /></project>
{ "pile_set_name": "Github" }
/* * test_iaf_ps_psp_poisson_spike_accuracy.sli * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST 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. * * NEST 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 NEST. If not, see <http://www.gnu.org/licenses/>. * */ /** @BeginDocumentation Name: testsuite::test_iaf_ps_psp_poisson_spike_accuracy - test precise poisson spike input to neuron model Synopsis: (test_iaf_ps_psp_poisson_spike_accuracy) run -> compare with analytical solution Description: The tests generates a poisson spike train using a random number generator and random number distribution available in the SLI programming language. In a second step this spike train is supplied to a neuron model and the resulting subthreshold membrane potential fluctuations are compared to the analytical solution. Thus, in contrast to the more advanced test_iaf_ps_psp_poisson_accuracy, this test does not require the interaction of the generator and the neuron model to work and does not require the availability of a parrot neuron. In contrast to test_iaf_ps_psp_poisson_accuracy the DC required to maintain a subthreshold membrane potential is generated by a dc generator not a property of the neuron model. The spike_generator used to supply the neuron model with spikes, constraints spike times to the tic grid of the simulation kernel. This is the temporal resolution in which the computation step size and simulation times are expressed. Therefore, the results of simulations at different computation step sizes only differ because of limited machine precision. The difference between the analytical result and the simulation, however, is dictated by the number of tics per millisecond. Author: May 2005, April 2009 Diesmann SeeAlso: testsuite::test_iaf_ps_psp_poisson_accuracy, testsuite::test_iaf_ps_psp_poisson_generator_accuracy */ (unittest) run /unittest using M_ERROR setverbosity %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Parameters of simulation schedule. % -10 /min_exponent Set 1.0 /delay Set % in ms 65.0 /weight Set % in pA -530.0 /I0 Set % in pA [-4 min_exponent -2] Range /hlist Set 1e-12 /tolerance Set % in mV 1e-4 /tic_tolerance Set % in mV 100.0 /T Set %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Parameters of neuron model. % << /E_L 0.0 % resting potential in mV /V_m 0.0 % initial membrane potential in mV /V_reset 0.0 /V_th 1000.0 % spike threshold in mV /tau_m 10.0 % membrane time constant in ms /tau_syn_ex 0.3 % PSC rise time in ms /tau_syn_in 0.3 /C_m 250.0 % membrane capacity in pF >> /params Set /rate 16.0 def % in spikes/ms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Reference value % % The function /potential computes the exact value of the membrane % potential at the end of the simulation for a given input spike train. % /psp [/t] ( UnitStep(t)*weight * E/tau_syn_ex * 1/C_m * ( (exp(-t/tau_m)-exp(-t/tau_syn_ex))/(1/tau_syn_ex - 1/tau_m)^2 - t*exp(-t/tau_syn_ex)/(1/tau_syn_ex - 1/tau_m) ) ) Function def /dc [/t] ( I0*tau_m/C_m*(1-exp(-t/tau_m)) ) Function def /potential { % argument is the input spike train params begin ( psp(T-t-delay) ) /t Function Map Sort Total % the present Total does not control accuracy ( dc(T-2*delay) ) ExecMath add end } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Create the Poisson input spike train % /CreateSpikeTrain { << >> begin rngdict/knuthlfg :: 200 CreateRNG /rng Set rng rdevdict/poisson :: CreateRDV /poiss Set poiss << /lambda rate T mul >> SetStatus poiss 1 RandomArray /n Set % random number of spikes % method 1: draw n random numbers uniformly distributed % over the interval (0,T]. % n { pop rng drand 1.0 exch sub T mul} Table Sort % method 2: draw n intervals from an exponential % distribution. The parameter of the distribution % is the mean interval of the Poisson process %/mean_interval rate inv def % in ms %rng rdevdict /exponential get CreateRDV /expdist Set %expdist n [1] Part RandomArray /s Set %s {mean_interval mul } Map /s Set %0.0 s {add} FoldList Rest /s Set end } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Simulation for a given computation step size % /AlignedImpact [/i /model /s] { i dexp /h Set % computation step size in ms ResetKernel << /tics_per_ms min_exponent neg dexp /resolution h >> SetKernelStatus /dc_generator Create /dc Set dc << /start 1.0 % in ms /amplitude I0 % in pA >> SetStatus /spike_generator Create /sg Set sg << /start 0.0 % in ms /spike_times s % in ms /precise_times true % interpret times as precise points >> SetStatus model Create /n Set n params SetStatus sg n weight delay Connect dc n Connect T Simulate n /V_m get % potential in mV at end of simulation } Function def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Perform simulations at all resolutions and collect results % CreateSpikeTrain /s Set s potential /V Set % potential from closed form expression [/iaf_psc_alpha_ps] /models Set { hlist { /i Set [ i models { i exch s AlignedImpact dup V sub abs } forall ] } Map % dup print_details % uncomment for debugging Transpose Rest 2 Partition dup [/All 1] Part Flatten dup Rest exch First sub % check whether simulation results are {tolerance lt} Map % identical for all resolutions true exch {and} Fold exch [/All 2] Part Flatten % check whether individual simulation results {tic_tolerance lt} Map % are identical to analytical solution true exch {and} Fold and } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % print results % /print_details { cout default 15 setprecision endl endl (Exact value of membrane potential after ) <- T <- ( ms is ) <- V <- ( mV.) <- endl endl ( h in ms ) <- ( simul. potential [mV]) <- ( error [mV]) <- ( simul. potential [mV]) <- ( error [mV]) <- endl (--------------------------) <- (--------------------------) <- (--------------------------) <- (--------------------------) <- (--------------------------) <- endl r { { exch 24 setw exch <- ( ) <- } forall endl } forall ; } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % RPN expression for the reference value % % Below is the code used to compute the reference value before % the compiler for infix mathematical notation became available. % % V is the exact value of the membrane potential at the end % of the simulation. % %params begin %userdict begin % << >> begin % % s % { % T exch sub delay sub /t Set % % t 0.0 geq % { % TauSyn inv Tau inv sub /dti Set % weight C inv mul % E TauSyn div mul % t neg Tau div exp t neg TauSyn div exp sub % dti dup mul div % t t neg TauSyn div exp mul % dti div % sub mul % } % { 0.0 } % ifelse % } Map % % Sort % 0 exch {add} forall % % % I0 Tau/C (1 -e^-T/Tau) % % I0 Tau C div mul 1.0 T 2.0 sub neg Tau div exp sub mul % add % % end %end %end % %/V Set assert_or_die
{ "pile_set_name": "Github" }
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportHeight="20.0" android:viewportWidth="20.0"> <path android:fillColor="#FF2F343D" android:fillType="evenOdd" android:pathData="M12.4,7.6m-1.2,0a1.2,1.2 0,1 1,2.4 0a1.2,1.2 0,1 1,-2.4 0" /> <path android:fillColor="#FF2F343D" android:fillType="evenOdd" android:pathData="M7.6,7.6m-1.2,0a1.2,1.2 0,1 1,2.4 0a1.2,1.2 0,1 1,-2.4 0" /> <path android:pathData="M10,10m-8.4,0a8.4,8.4 0,1 1,16.8 0a8.4,8.4 0,1 1,-16.8 0" android:strokeColor="#FF2F343D" android:strokeWidth="1.5" /> <path android:pathData="M6.606,12.794L6.606,12.794C8.48,14.669 11.52,14.669 13.394,12.794" android:strokeColor="#FF2F343D" android:strokeWidth="1.5" /> </vector>
{ "pile_set_name": "Github" }
import React from 'react'; import { Row, Col, Select, } from 'antd'; import ModalContainer from '../../../components/ModalContainer'; import FontFamily from './fontFamily'; import './index.scss'; import { getFontFamilyOptions } from '../../../core/config'; function onFontChange(onChange, setVisible) { return (e) => { if (e === 'more') { setVisible(true); } else if (e === '') { onChange(''); } }; } export default function StyleFontFamily(props) { const [visible, setVisible] = React.useState(false); const { data, onChange, attrs, label, } = props; const fonts = getFontFamilyOptions(); const curentFont = fonts.find(it => it.key === data); return ( <Row align="middle" type="flex" gutter={8}> <Col span={8}>{label}</Col> <Col span={16}> <Select value={data} style={{ width: '100%' }} onChange={onFontChange(onChange, setVisible)}> <Select.Option value="">默认字体</Select.Option> { curentFont && <Select.Option value={curentFont.key}>{curentFont.text}</Select.Option> } <Select.Option value="more">更多字体</Select.Option> </Select> </Col> <ModalContainer className="modal-resource-text-font-family" onCancel={() => setVisible(false)} maskClosable visible={visible} title="字体库" options={[{ title: '字体列表', comp: <FontFamily onChange={onChange} setVisible={setVisible} /> }]} /> </Row> ); }
{ "pile_set_name": "Github" }
<div class="row text-center"> <div class="medium-4 columns"> <img src="https://world.openfoodfacts.org/files/presskit/PressKit/ios/numbers-appstore.png" alt="" style="height: 140px;"> <h3>An Apple a Day</h3> <p>Apple stands for fibers, vitamins and are NutriScore A. That said, we strive to get a best in class, bug-free experience that works well on all iPhone and iPad devices, and degrades gracefully on legacy ones that are still being used. </p> </div> <div class="medium-4 columns"> <img src="https://world.openfoodfacts.org/files/presskit/PressKit/developers/coderswanted.png" alt="" style="height: 140px;"> <h3>Join the iOS team on Slack and GitHub</h3> <p> All the volunteer engineering teams of Open Food Facts are waiting to onboard you and make your first pull-request. There's no such thing as a small bug, and your commits will be making a massive impact in days, not weeks. </p> <p> We synchronize on Slack and GitHub. Join the conversation <a href="https://slack.openfoodfacts.org"> on the Open Food Facts slack</a> (you can self invite) and on the <a href="https://github.com/openfoodfacts/openfoodfacts-ios">openfoodfacts-ios</a> repository on GitHub. </p> </div> <div class="medium-4 columns"></div> </div>
{ "pile_set_name": "Github" }
#include <dirent.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> int run_part (char *script_path, char *name, char *action) { int pid; int wait_status; int pid_status; char *args[] = { script_path, NULL }; pid=fork(); if (pid==-1){ perror ("Could not fork"); return 1; } if (pid==0) { setenv ("ACTION",action,1); setenv ("SUBJECT",name,1); execv (script_path,args); perror ("execv"); exit(1); } pid_status = wait (&wait_status); if (pid_status == pid) { return (wait_status); } perror ("waitpid"); return (1); } int run_parts (char *directory, char *name, char *action) { struct dirent **namelist; int scanlist; int n; int execute_result; scanlist = scandir (directory, &namelist, 0, alphasort); if (scanlist<0) { return (0); } for (n=0; n<scanlist; n++) { int path_length; struct stat sb; path_length=strlen(directory) + strlen(namelist[n]->d_name) + 2; char *s = (char*)malloc(path_length); if (!s) { printf ("could not allocate memory\n"); for (; n<scanlist; n++) { free (namelist[n]); } free (namelist); return (1); } snprintf (s, path_length, "%s/%s", directory, namelist[n]->d_name); execute_result = 0; if (stat (s, &sb) == -1) { perror ("stat"); free (s); for (; n<scanlist; n++) { free (namelist[n]); } free (namelist); return (1); } if (S_ISREG (sb.st_mode) || S_ISLNK (sb.st_mode)) { execute_result = run_part (s, name, action); } free (s); if (execute_result!=0) { fprintf (stderr, "%s: did not exit cleanly.\n", namelist[n]->d_name); for (; n<scanlist; n++) { free (namelist[n]); } break; } free (namelist[n]); } free (namelist); return (execute_result); }
{ "pile_set_name": "Github" }
<table> <tr> <td><img width="40" src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/issue-reopened.svg" alt="inviting new maintainers" /></td> <td><strong>Archived Repository</strong><br /> This code is no longer maintained. If you're interested in taking over the code and its maintenance, please <a href="mailto:[email protected]?subject=Repo maintenance transfer">contact marmelab</a>. </td> </tr> </table> [![Build Status](https://travis-ci.org/marmelab/sedy.svg?branch=master)](https://travis-ci.org/marmelab/sedy) # What's Sedy Sedy is a GitHub webhook which allows pull-request reviewers to fix typos themselves by typing sed-like commands on review comments. ![commit example](./.github/sedy_commit_example.png) ### How it works After installing Sedy on your repository, just type a sed-like command (`s/[old text]/[new text]/`) in a single comment or in a code review, and Sedy will quickly commit the fix. # Installation Go to [https://github.com/apps/sedy](https://github.com/apps/sedy) and follow the instructions. That's it. # Contributing Whether it's for a bug or a suggestion, your feedback is precious. Feel free to [fill an issue](https://github.com/marmelab/sedy/issues/new). Be sure that it will be considered. If you want to open a PR, all you need to know is written on the [CONTRIBUTING.md](./.github/CONTRIBUTING.md). # License [sedy](https://marmelab.com/sedy/) is licensed under the [MIT License](./LICENSE), and sponsored by [marmelab](https://marmelab.com).
{ "pile_set_name": "Github" }
'use strict'; function threatmodellocator() { var service = { getModelLocation: getModelLocation, getModelPath: getModelPath, getModelPathFromRouteParams: getModelPath, willMoveModel: willMoveModel, newModelLocation: '/new/threatmodel' }; return service; function getModelLocation(params) { return { organisation: params.organisation, repo: params.repo, branch: params.branch, model: params.model }; } function getModelPath(params) { var path = ''; path += params.organisation + '/'; path += params.repo + '/'; path += params.branch + '/'; path += params.model; return path; } function willMoveModel(params, changes) { return changes.model != params.model; } } module.exports = threatmodellocator;
{ "pile_set_name": "Github" }
/* * ProgressImages.java * * Copyright (C) 2020 by RStudio, PBC * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ package org.rstudio.core.client.widget.images; import com.google.gwt.user.client.ui.Image; import org.rstudio.core.client.resources.CoreResources; public class ProgressImages { public static Image createSmall() { return new Image(CoreResources.INSTANCE.progress()); } public static Image createSmallGray() { return new Image(CoreResources.INSTANCE.progress_gray()); } public static Image createLarge() { return new Image(CoreResources.INSTANCE.progress_large()); } public static Image createLargeGray() { return new Image(CoreResources.INSTANCE.progress_large_gray()); } }
{ "pile_set_name": "Github" }
# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) > Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) ## Install ``` $ npm install strip-ansi ``` ## Usage ```js const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' ``` ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right ## Maintainers - [Sindre Sorhus](https://github.com/sindresorhus) - [Josh Junon](https://github.com/qix-) ## License MIT
{ "pile_set_name": "Github" }
#FIG 3.2 Produced by xfig version 3.2.5b Landscape Center Metric A4 100.00 Single -2 1200 2 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 2792 1775 2792 1926 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 1610 593 1459 593 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 0 0 1.00 83.84 67.07 25 1850 3044 1850 2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 1283 2102 3044 341 2 3 0 2 0 0 51 -1 3 0.000 0 0 -1 0 0 4 1534 1850 1845 593 2792 593 1534 1850 2 1 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 3044 467 25 1976 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 277 1775 277 1926 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 0 0 1.00 83.84 67.07 1534 2102 1534 367 4 0 0 50 -1 0 11 0.0000 2 135 150 226 2052 -1\001 4 0 0 50 -1 0 11 0.0000 2 135 90 2767 2052 1\001 4 0 0 50 -1 0 11 0.0000 2 195 2445 2113 1398 $\\bar{c}_{f_k}=\\bar{c}_{c_k}$\001 4 0 0 50 -1 0 11 0.0000 2 135 90 1308 618 1\001 4 0 0 50 -1 0 11 0.0000 2 180 2355 0 165 (b) ULTIMATE Limiter - NVD\001 4 0 0 50 -1 0 11 0.0000 2 195 1275 2918 2052 $\\bar{c}_{c_k}$\001 4 0 0 50 -1 0 11 0.0000 2 195 1440 2160 495 $\\bar{c}_{f_k}=1$\001 4 0 0 50 -1 0 11 0.0000 2 195 4365 -495 1485 $\\bar{c}_{f_k}=\\frac{1}{2}\\left(\\bar{c}_{c_k}+1\\right)$\001 4 0 0 50 -1 0 11 0.0000 2 195 1245 1260 405 $\\bar{c}_{f_k}$\001 4 0 0 50 -1 0 11 0.0000 2 195 4245 990 855 $\\bar{c}_{f_k}=\\frac{\\bar{c}_{c_k}}{\\gamma_{c_f}}$\001
{ "pile_set_name": "Github" }
const EARTH_RADIUS = 6378.137 function GetLocation(){ let available = $location.available; if (available) { $location.fetch({ handler: function (resp) { var lat = resp.lat var lng = resp.lng GetNearestLoc(lat, lng) } } ) } else { ui.toast("获取位置信息失败!") } } function rad(data){ return data * Math.PI / 180.0 } function GetNearestLoc(lat, lng){ $http.get({ url: "https://nnextbus.nus.edu.sg/BusStops", header: { "Authorization": "Basic TlVTbmV4dGJ1czoxM2RMP3pZLDNmZVdSXiJU", }, handler: function (resp) { let data = resp.data; let name = "" let distance = 0; if (data.errmsg) { alert(data.errmsg); return; } data = resp.data.BusStopsResult.busstops // console.log(data) count = data.length for( let i = 0; i < count; i++){ tmp_lat = data[i].latitude tmp_lng = data[i].longitude radLat1 = rad(tmp_lat); radLat2 = rad(lat); a = radLat1 - radLat2; b = rad(tmp_lng) - rad(lng); s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))); s = s * EARTH_RADIUS; tmp_distance = Math.round(s * 10000) / 10000; if (i == 0) distance = tmp_distance; if (tmp_distance < distance){ distance = tmp_distance; name = data[i].name; caption = data[i].caption; } } GetInfo(name, caption) } }); } function GetInfo(name, caption){ $http.get({ url: "https://nnextbus.nus.edu.sg/ShuttleService?busstopname=" + name, header: { "Authorization": "Basic TlVTbmV4dGJ1czoxM2RMP3pZLDNmZVdSXiJU", }, handler: function (resp) { if (resp.data.errmsg) { alert(data.errmsg); return; } let time = resp.data.ShuttleServiceResult.TimeStamp; time = time.substring(11, 19) data = resp.data.ShuttleServiceResult.shuttles count = data.length $("BusList").data = []; $("BusList").hidden = false; $("BusList").data = $("BusList").data.concat({ label: { text: caption.padEnd(40) + time, } }); for (let i = 0; i < count; i++) { // A1 33min 63min name = data[i].name; arrivalTime = data[i].arrivalTime; nextArrivalTime = data[i].nextArrivalTime string = name.padEnd(25, " ") + arrivalTime.padEnd(2) + " mins " + nextArrivalTime.padEnd(2) + " mins" $("BusList").data = $("BusList").data.concat({ label: { text: string, } }); } } }); } const template = { views: [{ type: "label", props: { id: "label", textColor: $color("black"), align: $align.left, font: $font("San Francisco", 13) }, layout: function (make, view) { make.right.top.bottom.inset(0); make.left.inset(15); }, events: { tapped: function (sender) { GetLocation(); } } } ] }; function nusList(temp) { return { type: "list", props: { id: "BusList", template: temp, //data:options bgcolor: $color("clear"), hidden: true, rowHeight: 35 }, layout: function (make, view) { make.top.equalTo(0); make.left.right.top.inset(5); make.bottom.inset(0); } }; } function show() { $ui.render({ props: { title: "NUS NextBus", id: "NUS NextBus" // navBarHidden:true, }, views: [nusList(template)] }); } function run() { show(); //getHotSearch(); GetLocation(); } run();
{ "pile_set_name": "Github" }
<?php $option_value = $this->getOptionValue(); ?> <?php $application = $this->getApplication(); ?> <?php $twitter = $option_value->getObject(); ?> <div id="list" class="edit_page twitter"> <form id="twitterForm" name="twitterForm" method="post" action="<?php echo $this->getUrl('twitter/application_twitter/editpost') ?>" class="form-horizontal"> <h3 class="title-editor no-border-radius title-feature-indent"> <?php echo __('twitter'); ?> </h3> <div class="container-fluid content-feature"> <input type="hidden" name="value_id" value="<?php echo $option_value->getId(); ?>" /> <div class="form-group first-row-feature"> <div class="col-sm-12"> <label><?php echo __('Enter your twitter handle/url') ?> *:</label> </div> </div> <div class="form-group"> <div class="col-sm-6"> <input type="text" id="twitter_user" name="twitter_user" value="<?php echo $twitter->getTwitterUser()?>" placeholder="<?php echo __("Enter your twitter handle") ?>" class="required input-flat" /> </div> <div class="col-sm-2"> <button class="btn color-blue" type="submit"> <?php echo __('Save'); ?> </button> </div> <div class="col-sm-4"> <i id="fb_valid_username" class="fa fa-ok" style="display:none;"></i> <i id="fb_invalid_username" class="fa fa-remove" style="display:none;"></i> <input type="hidden" name="option_value_id" value="<?php echo $option_value->getId(); ?>" /> <input type="hidden" name="id" value="<?php echo $twitter->getId(); ?>" /> </div> </div> </div> </form> <?php echo $this->importBackground($option_value); ?> </div> <script type="text/javascript"> $(document).ready(function () { bindForms('#list'); }); page.setCallback('didappear', function() { $('#twitterForm').submit(function() { if(!$(this).valid()) return false; reload(this, this.action, true, function(datas) { if(datas.success) { iframe.f.reload(); } }); return false; }); $('#twitterVerifyForm').submit(function() { if(!$(this).valid()) return false; if($("#twitter_user").val()) { $("#user").val($("#twitter_user").val()); reload(this, this.action, true, function (datas) {}); } return false; }); }); page.setCallback('willdisappear', function() { $('#twitterForm').unbind('submit'); }); try { background_image .setCallback('cropDidFinish', function() { iframe.content.find('.news').addClass('no-background'); iframe.content.find('.comments').addClass('no-background'); }).setCallback('imageDidRemove', function(datas) { if(!datas.background_image_url) { iframe.content.find('.news').removeClass('no-background'); iframe.content.find('.comments').removeClass('no-background'); } }); } catch (e) { console.error('skip, nope.'); } </script>
{ "pile_set_name": "Github" }
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_PLATFORM_TRACING_H_ #define TENSORFLOW_PLATFORM_TRACING_H_ // Tracing interface #include <atomic> #include <map> #include <memory> #include "tensorflow/core/lib/core/stringpiece.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/platform.h" #include "tensorflow/core/platform/types.h" namespace tensorflow { namespace port { class Tracing { public: // This enumeration contains the identifiers of all TensorFlow // threadscape events and code regions. Threadscape assigns its // own identifiers at runtime when we register our events and we // cannot know in advance what IDs it will choose. The "RecordEvent" // method and "ScopedActivity" use these event IDs for consistency // and remap them to threadscape IDs at runtime. This enum is limited // to 64 values since we use a bitmask to configure which events are // enabled. It must also be kept in step with the code in // "Tracing::EventCategoryString". enum EventCategory { kScheduleClosure = 0, kRunClosure = 1, kCompute = 2, kEventCategoryMax = 3 // sentinel - keep last }; // Note: We currently only support up to 64 categories. static_assert(kEventCategoryMax <= 64, "only support up to 64 events"); // Called by main programs to initialize tracing facilities static void Initialize(); // Return the pathname of the directory where we are writing log files. static const char* LogDir(); // Returns a non-zero identifier which can be used to correlate // related events. static inline uint64 UniqueId(); // Returns true if a trace is in progress. Can be used to reduce tracing // overheads in fast-path code. static inline bool IsActive(); // Associate name with the current thread. static void RegisterCurrentThread(const char* name); // Posts an event with the supplied category and arg. static void RecordEvent(EventCategory category, uint64 arg); // Traces a region of code. Posts a tracing "EnterCodeRegion" event // when created and an "ExitCodeRegion" event when destroyed. class ScopedActivity { public: explicit ScopedActivity(EventCategory category, uint64 arg); ~ScopedActivity(); private: #if defined(PLATFORM_GOOGLE) const bool enabled_; const int32 region_id_; #endif TF_DISALLOW_COPY_AND_ASSIGN(ScopedActivity); }; // Trace collection engine can be registered with this module. // If no engine is registered, ScopedAnnotation and TraceMe are no-ops. class Engine; static void RegisterEngine(Engine*); // Forward declaration of the GPU utility classes. class ScopedAnnotation; class TraceMe; private: friend class TracingTest; friend class ScopedAnnotation; friend class TraceMe; static std::atomic<Tracing::Engine*> tracing_engine_; static Tracing::Engine* engine() { return tracing_engine_.load(std::memory_order_acquire); } static void RegisterEvent(EventCategory id, const char* name); static const char* EventCategoryString(EventCategory category); // // Parses event mask expressions in 'value' of the form: // expr ::= <term> (,<term>)* // term ::= <event> | "!" <event> // event ::= "ALL" | <wait_event> | <other_event> // wait_event ::= "ENewSession" | "ECloseSession" | ... // other_event ::= "Send" | "Wait" | ... // ALL denotes all events, <event> turns on tracing for this event, and // !<event> turns off tracing for this event. // If the expression can be parsed correctly it returns true and sets // the event_mask_. Otherwise it returns false and the event_mask_ is left // unchanged. static bool ParseEventMask(const char* flagname, const string& value); // Bit mask of enabled trace categories. static uint64 event_mask_; // Records the mappings between Threadscape IDs and the "EventCategory" enum. static int32 category_id_[kEventCategoryMax]; static std::map<string, int32>* name_map_; }; // Trace collection engine that actually implements collection. class Tracing::Engine { public: Engine() {} virtual ~Engine(); // Returns true if Tracing is currently enabled. virtual bool IsEnabled() const = 0; // Represents an active annotation. class Annotation { public: Annotation() {} virtual ~Annotation(); }; // Represents an active trace. class Tracer { public: Tracer() {} virtual ~Tracer(); }; private: friend class ScopedAnnotation; friend class TraceMe; // Register the specified name as an annotation on the current thread. // Caller should delete the result to remove the annotation. // Annotations from the same thread are destroyed in a LIFO manner. // May return nullptr if annotations are not supported. virtual Annotation* PushAnnotation(StringPiece name) = 0; // Start tracing under the specified label. Caller should delete the // result to stop tracing. // May return nullptr if tracing is not supported. virtual Tracer* StartTracing(StringPiece label) = 0; }; // This class permits a user to apply annotation on kernels and memcpys // when launching them. While an annotation is in scope, all activities // within that scope get their names replaced by the annotation. The kernel // name replacement is done when constructing the protobuf for sending out to // a client (e.g., the stubby requestor) for both API and Activity records. // // Ownership: The creator of ScopedAnnotation assumes ownership of the object. // // Usage: { // ScopedAnnotation annotation("first set of kernels"); // Kernel1<<<x,y>>>; // LaunchKernel2(); // Which eventually launches a cuda kernel. // } // In the above scenario, the GPUProf UI would show 2 kernels with the name // "first set of kernels" executing -- they will appear as the same kernel. class Tracing::ScopedAnnotation { public: explicit ScopedAnnotation(StringPiece name); // If tracing is enabled, set up an annotation with a label of // "<name_part1>:<name_part2>". Can be cheaper than the // single-argument constructor because the concatenation of the // label string is only done if tracing is enabled. ScopedAnnotation(StringPiece name_part1, StringPiece name_part2); private: std::unique_ptr<Engine::Annotation> annotation_; }; // TODO(opensource): clean up the scoped classes for GPU tracing. // This class permits user-specified (CPU) tracing activities. A trace // activity is started when an object of this class is created and stopped // when the object is destroyed. class Tracing::TraceMe { public: explicit TraceMe(StringPiece name); private: std::unique_ptr<Engine::Tracer> tracer_; }; inline Tracing::ScopedAnnotation::ScopedAnnotation(StringPiece name) { auto e = Tracing::engine(); if (e && e->IsEnabled()) { annotation_.reset(e->PushAnnotation(name)); } } inline Tracing::ScopedAnnotation::ScopedAnnotation(StringPiece name_part1, StringPiece name_part2) { auto e = Tracing::engine(); if (e && e->IsEnabled()) { annotation_.reset( e->PushAnnotation(strings::StrCat(name_part1, ":", name_part2))); } } inline Tracing::TraceMe::TraceMe(StringPiece name) { auto e = Tracing::engine(); if (e && e->IsEnabled()) { tracer_.reset(e->StartTracing(name)); } } } // namespace port } // namespace tensorflow #if defined(PLATFORM_GOOGLE) #include "tensorflow/core/platform/google/tracing_impl.h" #else #include "tensorflow/core/platform/default/tracing_impl.h" #endif #endif // TENSORFLOW_PLATFORM_TRACING_H_
{ "pile_set_name": "Github" }
[D3.js in Action 2nd Edition](https://www.manning.com/books/d3js-in-action-second-edition) code and examples. [d3.js](https://d3js.org) Everything is a self-contained example except for Chapter 9, which requires Node and NPM. Table of Contents Chapter 1 * [1_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_11.html) * [1_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_16.html) * [1_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_17.html) * [1_20.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_20.html) * [1_21.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_21.html) * [1_22.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_22.html) * [1_25.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_25.html) * [1_31.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_31.html) * [1_32.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_32.html) * [1_33.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_33.html) * [1_34.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter1/1_34.html) Chapter 2 * [2_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_11.html) * [2_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_12.html) * [2_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_13.html) * [2_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_14.html) * [2_15.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_15.html) * [2_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_16.html) * [2_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_17.html) * [2_18.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_18.html) * [2_19.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_19.html) * [2_20.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_20.html) * [2_21.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_21.html) * [2_22.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_22.html) * [2_23.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_23.html) * [2_25.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_25.html) * [2_27.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter2/2_27.html) Chapter 3 * [3_2.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_2.html) * [3_3.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_3.html) * [3_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_5.html) * [3_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_6.html) * [3_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_9.html) * [3_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_10.html) * [3_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_11.html) * [3_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_12.html) * [3_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_13.html) * [3_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_14.html) * [3_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_15.html) * [3_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_16.html) * [3_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_17.html) * [3_18.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_18.html) * [3_19.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_19.html) * [3_20.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_20.html) * [3_21.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_21.html) * [3_22.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_22.html) * [3_23.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_23.html) * [3_24.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter3/3_24.html) Chapter 4 * [4_3.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_3.html) * [4_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_4.html) * [4_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_5.html) * [4_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_7.html) * [4_8.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_8.html) * [4_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_9.html) * [4_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_12.html) * [4_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_13.html) * [4_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_14.html) * [4_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_16.html) * [4_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_17.html) * [4_18.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_18.html) * [4_19.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_19.html) * [4_20.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_20.html) * [4_22.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_22.html) * [4_23.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_23.html) * [4_24.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_24.html) * [4_25.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter4/4_25.html) Chapter 5 * [5_2.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_2.html) * [5_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_4.html) * [5_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_5.html) * [5_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_6.html) * [5_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_7.html) * [5_8_tween.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_8_tween.html) * [5_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_9.html) * [5_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_10.html) * [5_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_11.html) * [5_24.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_24.html) * [5_25.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_25.html) * [5_26.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_26.html) * [5_28.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_28.html) * [5_29.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_29.html) * [5_30.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter5/5_30.html) Chapter 6 * [6_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_10.html) * [6_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_11.html) * [6_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_12.html) * [6_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_14.html) * [6_15.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_15.html) * [6_16_zoom.html](chapter6/6_16_zoom.html) * [6_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_16.html) * [6_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_17.html) * [6_20.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_20.html) * [6_21.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_21.html) * [6_22.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_22.html) * [6_23.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_23.html) * [6_24.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter6/6_24.html) Chapter 7 * [7_3.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_3.html) * [7_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_4.html) * [7_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_5.html) * [7_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_6.html) * [7_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_7.html) * [7_8.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_8.html) * [7_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_9.html) * [7_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_10.html) * [7_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_11.html) * [7_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_13.html) * [7_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_14.html) * [7_15.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_15.html) * [7_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_16.html) * [7_17.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_17.html) * [7_18.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_18.html) * [7_19.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter7/7_19.html) Chapter 8 * [8_3.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_3.html) * [8_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_4.html) * [8_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_5.html) * [8_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_6.html) * [8_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_7.html) * [8_8.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_8.html) * [8_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_9.html) * [8_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_10.html) * [8_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_11.html) * [8_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_12.html) * [8_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_13.html) * [8_14.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_14.html) * [8_15.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_15.html) * [8_16.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter8/8_16.html) [Chapter 9](chapter9) Chapter 10 * [10_1.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_1.html) * [10_2.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_2.html) * [10_3.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_3.html) * [10_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_4.html) * [10_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_5.html) * [10_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_6.html) * [10_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_7.html) * [10_8.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_8.html) * [10_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_9.html) * [10_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_10.html) * [10_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_11.html) * [10_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter10/10_12.html) Chapter 11 * [11_2.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_2.html) * [11_4.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_4.html) * [11_5.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_5.html) * [11_6.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_6.html) * [11_7.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_7.html) * [11_8.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_8.html) * [11_9.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_9.html) * [11_10.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_10.html) * [11_11.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_11.html) * [11_12.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_12.html) * [11_13.html](https://github.com/kthotav/d3_in_action_2/tree/master/chapter11/11_13.html)
{ "pile_set_name": "Github" }
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import <React/RCTBridgeDelegate.h> #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate> @property (nonatomic, strong) UIWindow *window; @end
{ "pile_set_name": "Github" }
import IPy import DNS import string import socket import sys class dns_reverse(): def __init__(self,range,verbose=True): self.range= range self.iplist='' self.results=[] self.verbose=verbose try: DNS.ParseResolvConf("/etc/resolv.conf") nameserver=DNS.defaults['server'][0] except: print "Error in DNS resolvers" sys.exit() def run(self,host): a=string.split(host, '.') a.reverse() b=string.join(a,'.')+'.in-addr.arpa' nameserver=DNS.defaults['server'][0] if self.verbose: ESC=chr(27) sys.stdout.write(ESC + '[2K' + ESC+'[G') sys.stdout.write("\r\t" + host) sys.stdout.flush() try: name=DNS.Base.DnsRequest(b,qtype='ptr').req().answers[0]['data'] return host+":"+name except: pass def get_ip_list(self,ips): """Generates the list of ips to reverse""" try: list=IPy.IP(ips) except: print "Error in IP format, check the input and try again. (Eg. 192.168.1.0/24)" sys.exit() name=[] for x in list: name.append(str(x)) return name def list(self): self.iplist=self.get_ip_list(self.range) return self.iplist def process(self): for x in self.iplist: host=self.run(x) if host!=None: self.results.append(host) return self.results class dns_force(): def __init__(self,domain,dnsserver,verbose=False): self.domain=domain self.nameserver = dnsserver self.file="dns-names.txt" self.subdo = False self.verbose = verbose try: f = open(self.file,"r") except: print "Error opening dns dictionary file" sys.exit() self.list = f.readlines() def getdns(self,domain): DNS.ParseResolvConf("/etc/resolv.conf") nameserver=DNS.defaults['server'][0] dom=domain if self.subdo == True: dom=domain.split(".") dom.pop(0) rootdom=".".join(dom) else: rootdom=dom if self.nameserver == False: r=DNS.Request(rootdom,qtype='SOA').req() primary,email,serial,refresh,retry,expire,minimum = r.answers[0]['data'] test=DNS.Request(rootdom,qtype='NS',server=primary,aa=1).req() if test.header['status'] != "NOERROR": print "Error" sys.exit() self.nameserver= test.answers[0]['data'] elif self.nameserver == "local": self.nameserver=nameserver return self.nameserver def run(self,host): if self.nameserver == "": self.nameserver = self.getdns(self.domain) hostname=str(host.split("\n")[0])+"."+str(self.domain) if self.verbose: ESC=chr(27) sys.stdout.write(ESC + '[2K' + ESC+'[G') sys.stdout.write("\r" + hostname) sys.stdout.flush() try: test=DNS.Request(hostname,qtype='a',server=self.nameserver).req() hostip=test.answers[0]['data'] return hostip+":"+hostname except Exception,e: pass def process(self): results=[] for x in self.list: host=self.run(x) if host!=None: results.append(host) return results class dns_tld(): def __init__(self,domain,dnsserver,verbose=False): self.domain=domain self.nameserver = dnsserver self.subdo = False self.verbose = verbose self.tlds = ["com", "org", "net", "edu", "mil", "gov", "uk", "af", "al", "dz", "as", "ad", "ao", "ai", "aq", "ag", "ar", "am", "aw", "ac","au", "at", "az", "bs", "bh", "bd", "bb", "by", "be", "bz", "bj", "bm", "bt", "bo", "ba", "bw", "bv", "br", "io", "bn", "bg", "bf", "bi", "kh", "cm", "ca", "cv", "ky", "cf", "td", "cl", "cn", "cx", "cc", "co", "km", "cd", "cg", "ck", "cr", "ci", "hr", "cu", "cy", "cz", "dk", "dj", "dm", "do", "tp", "ec", "eg", "sv", "gq", "er", "ee", "et", "fk", "fo", "fj", "fi", "fr", "gf", "pf", "tf", "ga", "gm", "ge", "de", "gh", "gi", "gr", "gl", "gd", "gp", "gu", "gt", "gg", "gn", "gw", "gy", "ht", "hm", "va", "hn", "hk", "hu", "is", "in", "id", "ir", "iq", "ie", "im", "il", "it", "jm", "jp", "je", "jo", "kz", "ke", "ki", "kp", "kr", "kw", "kg", "la", "lv", "lb", "ls", "lr", "ly", "li", "lt", "lu", "mo", "mk", "mg", "mw", "my", "mv", "ml", "mt", "mh", "mq", "mr", "mu", "yt", "mx", "fm", "md", "mc", "mn", "ms", "ma", "mz", "mm", "na", "nr", "np", "nl", "an", "nc", "nz", "ni", "ne", "ng", "nu", "nf", "mp", "no", "om", "pk", "pw", "pa", "pg", "py", "pe", "ph", "pn", "pl", "pt", "pr", "qa", "re", "ro", "ru", "rw", "kn", "lc", "vc", "ws", "sm", "st", "sa", "sn", "sc", "sl", "sg", "sk", "si", "sb", "so", "za", "gz", "es", "lk", "sh", "pm", "sd", "sr", "sj", "sz", "se", "ch", "sy", "tw", "tj", "tz", "th", "tg", "tk", "to", "tt", "tn", "tr", "tm", "tc", "tv", "ug", "ua", "ae", "gb", "us", "um", "uy", "uz", "vu", "ve", "vn", "vg", "vi", "wf", "eh", "ye", "yu", "za", "zr", "zm", "zw", "int", "gs", "info", "biz", "su", "name", "coop", "aero" ] def getdns(self,domain): DNS.ParseResolvConf("/etc/resolv.conf") nameserver=DNS.defaults['server'][0] dom=domain if self.subdo == True: dom=domain.split(".") dom.pop(0) rootdom=".".join(dom) else: rootdom=dom if self.nameserver == False: r=DNS.Request(rootdom,qtype='SOA').req() primary,email,serial,refresh,retry,expire,minimum = r.answers[0]['data'] test=DNS.Request(rootdom,qtype='NS',server=primary,aa=1).req() if test.header['status'] != "NOERROR": print "Error" sys.exit() self.nameserver= test.answers[0]['data'] elif self.nameserver == "local": self.nameserver=nameserver return self.nameserver def run(self,tld): self.nameserver = self.getdns(self.domain) hostname=self.domain.split(".")[0]+"."+tld if self.verbose: ESC=chr(27) sys.stdout.write(ESC + '[2K' + ESC+'[G') sys.stdout.write("\r\tSearching for: " + hostname) sys.stdout.flush() try: test=DNS.Request(hostname,qtype='a',server=self.nameserver).req() hostip=test.answers[0]['data'] return hostip+":"+hostname except Exception,e: pass def process(self): results=[] for x in self.tlds: host=self.run(x) if host!=None: results.append(host) return results
{ "pile_set_name": "Github" }
custom: ['https://www.buymeacoffee.com/UJGejcNli']
{ "pile_set_name": "Github" }
/* * ------------------------------------------ * 需要平台适配的接口实现文件 * @version 1.0 * @author genify([email protected]) * ------------------------------------------ */ NEJ.define(function(p){ /** * 关联file的label点击事件 * @return {Void} */ p.__handleFileLabelClick = function(){ //do nothing }; return p; });
{ "pile_set_name": "Github" }
/** * Copyright (C) 2009-2014 BIMserver.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.bimserver.models.ifc4; /****************************************************************************** * Copyright (C) 2009-2019 BIMserver.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see {@literal<http://www.gnu.org/licenses/>}. *****************************************************************************/ import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * <!-- begin-user-doc --> * A representation of the literals of the enumeration '<em><b>Ifc Element Composition Enum</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.bimserver.models.ifc4.Ifc4Package#getIfcElementCompositionEnum() * @model * @generated */ public enum IfcElementCompositionEnum implements Enumerator { /** * The '<em><b>NULL</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #NULL_VALUE * @generated * @ordered */ NULL(0, "NULL", "NULL"), /** * The '<em><b>COMPLEX</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #COMPLEX_VALUE * @generated * @ordered */ COMPLEX(1, "COMPLEX", "COMPLEX"), /** * The '<em><b>ELEMENT</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ELEMENT_VALUE * @generated * @ordered */ ELEMENT(2, "ELEMENT", "ELEMENT"), /** * The '<em><b>PARTIAL</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #PARTIAL_VALUE * @generated * @ordered */ PARTIAL(3, "PARTIAL", "PARTIAL"); /** * The '<em><b>NULL</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>NULL</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #NULL * @model * @generated * @ordered */ public static final int NULL_VALUE = 0; /** * The '<em><b>COMPLEX</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>COMPLEX</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #COMPLEX * @model * @generated * @ordered */ public static final int COMPLEX_VALUE = 1; /** * The '<em><b>ELEMENT</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>ELEMENT</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ELEMENT * @model * @generated * @ordered */ public static final int ELEMENT_VALUE = 2; /** * The '<em><b>PARTIAL</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>PARTIAL</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #PARTIAL * @model * @generated * @ordered */ public static final int PARTIAL_VALUE = 3; /** * An array of all the '<em><b>Ifc Element Composition Enum</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final IfcElementCompositionEnum[] VALUES_ARRAY = new IfcElementCompositionEnum[] { NULL, COMPLEX, ELEMENT, PARTIAL, }; /** * A public read-only list of all the '<em><b>Ifc Element Composition Enum</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<IfcElementCompositionEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Ifc Element Composition Enum</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param literal the literal. * @return the matching enumerator or <code>null</code>. * @generated */ public static IfcElementCompositionEnum get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { IfcElementCompositionEnum result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Ifc Element Composition Enum</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param name the name. * @return the matching enumerator or <code>null</code>. * @generated */ public static IfcElementCompositionEnum getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { IfcElementCompositionEnum result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Ifc Element Composition Enum</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the integer value. * @return the matching enumerator or <code>null</code>. * @generated */ public static IfcElementCompositionEnum get(int value) { switch (value) { case NULL_VALUE: return NULL; case COMPLEX_VALUE: return COMPLEX; case ELEMENT_VALUE: return ELEMENT; case PARTIAL_VALUE: return PARTIAL; } return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final int value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String name; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String literal; /** * Only this class can construct instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private IfcElementCompositionEnum(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public int getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { return literal; } } //IfcElementCompositionEnum
{ "pile_set_name": "Github" }
h1 =title link-to 'posts.index' | Back to posts list
{ "pile_set_name": "Github" }
ace.define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssText = ".ace-crimson-editor .ace_gutter {\ background: #ebebeb;\ color: #333;\ overflow : hidden;\ }\ .ace-crimson-editor .ace_gutter-layer {\ width: 100%;\ text-align: right;\ }\ .ace-crimson-editor .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-crimson-editor {\ background-color: #FFFFFF;\ color: rgb(64, 64, 64);\ }\ .ace-crimson-editor .ace_cursor {\ color: black;\ }\ .ace-crimson-editor .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-crimson-editor .ace_identifier {\ color: black;\ }\ .ace-crimson-editor .ace_keyword {\ color: blue;\ }\ .ace-crimson-editor .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-crimson-editor .ace_constant.ace_language {\ color: rgb(255, 156, 0);\ }\ .ace-crimson-editor .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-crimson-editor .ace_invalid {\ text-decoration: line-through;\ color: rgb(224, 0, 0);\ }\ .ace-crimson-editor .ace_fold {\ }\ .ace-crimson-editor .ace_support.ace_function {\ color: rgb(192, 0, 0);\ }\ .ace-crimson-editor .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-crimson-editor .ace_support.ace_type,\ .ace-crimson-editor .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-crimson-editor .ace_keyword.ace_operator {\ color: rgb(49, 132, 149);\ }\ .ace-crimson-editor .ace_string {\ color: rgb(128, 0, 128);\ }\ .ace-crimson-editor .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-crimson-editor .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-crimson-editor .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-crimson-editor .ace_constant.ace_numeric {\ color: rgb(0, 0, 64);\ }\ .ace-crimson-editor .ace_variable {\ color: rgb(0, 64, 128);\ }\ .ace-crimson-editor .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-crimson-editor .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-crimson-editor .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-crimson-editor .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-crimson-editor .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-crimson-editor .ace_marker-layer .ace_active-line {\ background: rgb(232, 242, 254);\ }\ .ace-crimson-editor .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-crimson-editor .ace_meta.ace_tag {\ color:rgb(28, 2, 255);\ }\ .ace-crimson-editor .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-crimson-editor .ace_string.ace_regex {\ color: rgb(192, 0, 192);\ }\ .ace-crimson-editor .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }"; exports.cssClass = "ace-crimson-editor"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); });
{ "pile_set_name": "Github" }
<?php //============================================================+ // File name : tcpdf_images.php // Version : 1.0.005 // Begin : 2002-08-03 // Last Update : 2014-11-15 // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected] // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // ------------------------------------------------------------------- // Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD // // This file is part of TCPDF software library. // // TCPDF is free software: you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // TCPDF 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 License // along with TCPDF. If not, see // <http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>. // // See LICENSE.TXT file for more information. // ------------------------------------------------------------------- // // Description : // Static image methods used by the TCPDF class. // //============================================================+ /** * @file * This is a PHP class that contains static image methods for the TCPDF class.<br> * @package com.tecnick.tcpdf * @author Nicola Asuni * @version 1.0.005 */ /** * @class TCPDF_IMAGES * Static image methods used by the TCPDF class. * @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. * @version 1.0.005 * @author Nicola Asuni - [email protected] */ class TCPDF_IMAGES { /** * Array of hinheritable SVG properties. * @since 5.0.000 (2010-05-02) * @public static */ public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode'); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** * Return the image type given the file name or array returned by getimagesize() function. * @param $imgfile (string) image file name * @param $iminfo (array) array of image information returned by getimagesize() function. * @return string image type * @since 4.8.017 (2009-11-27) * @public static */ public static function getImageFileType($imgfile, $iminfo=array()) { $type = ''; if (isset($iminfo['mime']) AND !empty($iminfo['mime'])) { $mime = explode('/', $iminfo['mime']); if ((count($mime) > 1) AND ($mime[0] == 'image') AND (!empty($mime[1]))) { $type = strtolower(trim($mime[1])); } } if (empty($type)) { $fileinfo = pathinfo($imgfile); if (isset($fileinfo['extension']) AND (!TCPDF_STATIC::empty_string($fileinfo['extension']))) { $type = strtolower(trim($fileinfo['extension'])); } } if ($type == 'jpg') { $type = 'jpeg'; } return $type; } /** * Set the transparency for the given GD image. * @param $new_image (image) GD image object * @param $image (image) GD image object. * return GD image object. * @since 4.9.016 (2010-04-20) * @public static */ public static function setGDImageTransparency($new_image, $image) { // default transparency color (white) $tcol = array('red' => 255, 'green' => 255, 'blue' => 255); // transparency index $tid = imagecolortransparent($image); $palletsize = imagecolorstotal($image); if (($tid >= 0) AND ($tid < $palletsize)) { // get the colors for the transparency index $tcol = imagecolorsforindex($image, $tid); } $tid = imagecolorallocate($new_image, $tcol['red'], $tcol['green'], $tcol['blue']); imagefill($new_image, 0, 0, $tid); imagecolortransparent($new_image, $tid); return $new_image; } /** * Convert the loaded image to a PNG and then return a structure for the PDF creator. * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. * @param $image (image) Image object. * @param $tempfile (string) Temporary file name. * return image PNG image object. * @since 4.9.016 (2010-04-20) * @public static */ public static function _toPNG($image, $tempfile) { // turn off interlaced mode imageinterlace($image, 0); // create temporary PNG image imagepng($image, $tempfile); // remove image from memory imagedestroy($image); // get PNG image data $retvars = self::_parsepng($tempfile); // tidy up by removing temporary image unlink($tempfile); return $retvars; } /** * Convert the loaded image to a JPEG and then return a structure for the PDF creator. * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. * @param $image (image) Image object. * @param $quality (int) JPEG quality. * @param $tempfile (string) Temporary file name. * return image JPEG image object. * @public static */ public static function _toJPEG($image, $quality, $tempfile) { imagejpeg($image, $tempfile, $quality); imagedestroy($image); $retvars = self::_parsejpeg($tempfile); // tidy up by removing temporary image unlink($tempfile); return $retvars; } /** * Extract info from a JPEG file without using the GD library. * @param $file (string) image file to parse * @return array structure containing the image data * @public static */ public static function _parsejpeg($file) { // check if is a local file if (!@TCPDF_STATIC::file_exists($file)) { return false; } $a = getimagesize($file); if (empty($a)) { //Missing or incorrect image file return false; } if ($a[2] != 2) { // Not a JPEG file return false; } // bits per pixel $bpc = isset($a['bits']) ? intval($a['bits']) : 8; // number of image channels if (!isset($a['channels'])) { $channels = 3; } else { $channels = intval($a['channels']); } // default colour space switch ($channels) { case 1: { $colspace = 'DeviceGray'; break; } case 3: { $colspace = 'DeviceRGB'; break; } case 4: { $colspace = 'DeviceCMYK'; break; } default: { $channels = 3; $colspace = 'DeviceRGB'; break; } } // get file content $data = file_get_contents($file); // check for embedded ICC profile $icc = array(); $offset = 0; while (($pos = strpos($data, "ICC_PROFILE\0", $offset)) !== false) { // get ICC sequence length $length = (TCPDF_STATIC::_getUSHORT($data, ($pos - 2)) - 16); // marker sequence number $msn = max(1, ord($data[($pos + 12)])); // number of markers (total of APP2 used) $nom = max(1, ord($data[($pos + 13)])); // get sequence segment $icc[($msn - 1)] = substr($data, ($pos + 14), $length); // move forward to next sequence $offset = ($pos + 14 + $length); } // order and compact ICC segments if (count($icc) > 0) { ksort($icc); $icc = implode('', $icc); if ((ord($icc[36]) != 0x61) OR (ord($icc[37]) != 0x63) OR (ord($icc[38]) != 0x73) OR (ord($icc[39]) != 0x70)) { // invalid ICC profile $icc = false; } } else { $icc = false; } return array('w' => $a[0], 'h' => $a[1], 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'DCTDecode', 'data' => $data); } /** * Extract info from a PNG file without using the GD library. * @param $file (string) image file to parse * @return array structure containing the image data * @public static */ public static function _parsepng($file) { $f = @fopen($file, 'rb'); if ($f === false) { // Can't open image file return false; } //Check signature if (fread($f, 8) != chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) { // Not a PNG file return false; } //Read header chunk fread($f, 4); if (fread($f, 4) != 'IHDR') { //Incorrect PNG file return false; } $w = TCPDF_STATIC::_freadint($f); $h = TCPDF_STATIC::_freadint($f); $bpc = ord(fread($f, 1)); $ct = ord(fread($f, 1)); if ($ct == 0) { $colspace = 'DeviceGray'; } elseif ($ct == 2) { $colspace = 'DeviceRGB'; } elseif ($ct == 3) { $colspace = 'Indexed'; } else { // alpha channel fclose($f); return 'pngalpha'; } if (ord(fread($f, 1)) != 0) { // Unknown compression method fclose($f); return false; } if (ord(fread($f, 1)) != 0) { // Unknown filter method fclose($f); return false; } if (ord(fread($f, 1)) != 0) { // Interlacing not supported fclose($f); return false; } fread($f, 4); $channels = ($ct == 2 ? 3 : 1); $parms = '/DecodeParms << /Predictor 15 /Colors '.$channels.' /BitsPerComponent '.$bpc.' /Columns '.$w.' >>'; //Scan chunks looking for palette, transparency and image data $pal = ''; $trns = ''; $data = ''; $icc = false; $n = TCPDF_STATIC::_freadint($f); do { $type = fread($f, 4); if ($type == 'PLTE') { // read palette $pal = TCPDF_STATIC::rfread($f, $n); fread($f, 4); } elseif ($type == 'tRNS') { // read transparency info $t = TCPDF_STATIC::rfread($f, $n); if ($ct == 0) { // DeviceGray $trns = array(ord($t[1])); } elseif ($ct == 2) { // DeviceRGB $trns = array(ord($t[1]), ord($t[3]), ord($t[5])); } else { // Indexed if ($n > 0) { $trns = array(); for ($i = 0; $i < $n; ++ $i) { $trns[] = ord($t[$i]); } } } fread($f, 4); } elseif ($type == 'IDAT') { // read image data block $data .= TCPDF_STATIC::rfread($f, $n); fread($f, 4); } elseif ($type == 'iCCP') { // skip profile name $len = 0; while ((ord(fread($f, 1)) != 0) AND ($len < 80)) { ++$len; } // get compression method if (ord(fread($f, 1)) != 0) { // Unknown filter method fclose($f); return false; } // read ICC Color Profile $icc = TCPDF_STATIC::rfread($f, ($n - $len - 2)); // decompress profile $icc = gzuncompress($icc); fread($f, 4); } elseif ($type == 'IEND') { break; } else { TCPDF_STATIC::rfread($f, $n + 4); } $n = TCPDF_STATIC::_freadint($f); } while ($n); if (($colspace == 'Indexed') AND (empty($pal))) { // Missing palette fclose($f); return false; } fclose($f); return array('w' => $w, 'h' => $h, 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $data); } } // END OF TCPDF_IMAGES CLASS //============================================================+ // END OF FILE //============================================================+
{ "pile_set_name": "Github" }
Copyright SpryMedia Limited and other contributors http://datatables.net Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "pile_set_name": "Github" }
; RUN: opt < %s -simplifycfg -S | FileCheck %s ; Test basic folding to a conditional branch. define i32 @foo(i64 %x, i64 %y) nounwind { ; CHECK-LABEL: @foo( entry: %eq = icmp eq i64 %x, %y br i1 %eq, label %b, label %switch switch: %lt = icmp slt i64 %x, %y ; CHECK: br i1 %lt, label %a, label %b %qux = select i1 %lt, i32 0, i32 2 switch i32 %qux, label %bees [ i32 0, label %a i32 1, label %b i32 2, label %b ] a: tail call void @bees.a() nounwind ret i32 1 ; CHECK: b: ; CHECK-NEXT: %retval = phi i32 [ 0, %switch ], [ 2, %entry ] b: %retval = phi i32 [0, %switch], [0, %switch], [2, %entry] tail call void @bees.b() nounwind ret i32 %retval ; CHECK-NOT: bees: bees: tail call void @llvm.trap() nounwind unreachable } ; Test basic folding to an unconditional branch. define i32 @bar(i64 %x, i64 %y) nounwind { ; CHECK-LABEL: @bar( entry: ; CHECK-NEXT: entry: ; CHECK-NEXT: tail call void @bees.a() [[NUW:#[0-9]+]] ; CHECK-NEXT: ret i32 0 %lt = icmp slt i64 %x, %y %qux = select i1 %lt, i32 0, i32 2 switch i32 %qux, label %bees [ i32 0, label %a i32 1, label %b i32 2, label %a ] a: %retval = phi i32 [0, %entry], [0, %entry], [1, %b] tail call void @bees.a() nounwind ret i32 0 b: tail call void @bees.b() nounwind br label %a bees: tail call void @llvm.trap() nounwind unreachable } ; Test the edge case where both values from the select are the default case. define void @bazz(i64 %x, i64 %y) nounwind { ; CHECK-LABEL: @bazz( entry: ; CHECK-NEXT: entry: ; CHECK-NEXT: tail call void @bees.b() [[NUW]] ; CHECK-NEXT: ret void %lt = icmp slt i64 %x, %y %qux = select i1 %lt, i32 10, i32 12 switch i32 %qux, label %b [ i32 0, label %a i32 1, label %bees i32 2, label %bees ] a: tail call void @bees.a() nounwind ret void b: tail call void @bees.b() nounwind ret void bees: tail call void @llvm.trap() unreachable } ; Test the edge case where both values from the select are equal. define void @quux(i64 %x, i64 %y) nounwind { ; CHECK-LABEL: @quux( entry: ; CHECK-NEXT: entry: ; CHECK-NEXT: tail call void @bees.a() [[NUW]] ; CHECK-NEXT: ret void %lt = icmp slt i64 %x, %y %qux = select i1 %lt, i32 0, i32 0 switch i32 %qux, label %b [ i32 0, label %a i32 1, label %bees i32 2, label %bees ] a: tail call void @bees.a() nounwind ret void b: tail call void @bees.b() nounwind ret void bees: tail call void @llvm.trap() unreachable } ; A final test, for phi node munging. define i32 @xyzzy(i64 %x, i64 %y) { ; CHECK-LABEL: @xyzzy( entry: %eq = icmp eq i64 %x, %y br i1 %eq, label %r, label %cont cont: ; CHECK: %lt = icmp slt i64 %x, %y %lt = icmp slt i64 %x, %y ; CHECK-NEXT: select i1 %lt, i32 -1, i32 1 %qux = select i1 %lt, i32 0, i32 2 switch i32 %qux, label %bees [ i32 0, label %a i32 1, label %r i32 2, label %r ] r: %val = phi i32 [0, %entry], [1, %cont], [1, %cont] ret i32 %val a: ret i32 -1 ; CHECK-NOT: bees: bees: tail call void @llvm.trap() unreachable } declare void @llvm.trap() nounwind noreturn declare void @bees.a() nounwind declare void @bees.b() nounwind ; CHECK: attributes [[NUW]] = { nounwind } ; CHECK: attributes #1 = { noreturn nounwind }
{ "pile_set_name": "Github" }
import re import nltk.tokenize from cakechat.utils.text_processing.config import SPECIAL_TOKENS _END_CHARS = '.?!' _tokenizer = nltk.tokenize.RegexpTokenizer(pattern='\w+|[^\w\s]') def get_tokens_sequence(text, lower=True, check_unicode=True): if check_unicode and not isinstance(text, str): raise TypeError('Text object should be unicode type. Got instead "{}" of type {}'.format(text, type(text))) if not text.strip(): return [] if lower: text = text.lower() tokens = _tokenizer.tokenize(text) return tokens def replace_out_of_voc_tokens(tokens, tokens_voc): return [t if t in tokens_voc else SPECIAL_TOKENS.UNKNOWN_TOKEN for t in tokens] def _capitalize_first_chars(text): if not text: return text chars_pos_to_capitalize = [0] + [m.end() - 1 for m in re.finditer('[{}] \w'.format(_END_CHARS), text)] for char_pos in chars_pos_to_capitalize: text = text[:char_pos] + text[char_pos].upper() + text[char_pos + 1:] return text def prettify_response(response): """ Prettify chatbot's answer removing excessive characters and capitalizing first words of sentences. Before: "hello world ! nice to meet you , buddy . do you like me ? I ' ve been missing you for a while . . ." After: "Hello world! Nice to meet you, buddy. Do you like me? I've been missing you for a while..." """ response = response.replace(' \' ', '\'') for ch in set(_END_CHARS) | {','}: response = response.replace(' ' + ch, ch) response = _capitalize_first_chars(response) response = response.strip() return response
{ "pile_set_name": "Github" }
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2010, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.filter.function; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.geotools.factory.CommonFactoryFinder; import org.geotools.feature.NameImpl; import org.geotools.filter.FunctionFactory; import org.geotools.filter.FunctionImpl; import org.geotools.filter.capability.FunctionNameImpl; import org.geotools.util.factory.FactoryIteratorProvider; import org.geotools.util.factory.GeoTools; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.opengis.feature.type.Name; import org.opengis.filter.FilterFactory; import org.opengis.filter.capability.FunctionName; import org.opengis.filter.expression.Expression; import org.opengis.filter.expression.Function; import org.opengis.filter.expression.Literal; public class FunctionFactoryTest { static FactoryIteratorProvider ffIteratorProvider; @BeforeClass public static void setUp() { ffIteratorProvider = new FactoryIteratorProvider() { public <T> Iterator<T> iterator(Class<T> category) { if (FunctionFactory.class == category) { List<FunctionFactory> l = new ArrayList<FunctionFactory>(); l.add( new FunctionFactory() { @SuppressWarnings("unchecked") public List<FunctionName> getFunctionNames() { return (List) Arrays.asList( new FunctionNameImpl( "foo", new String[] {"bar", "baz"})); } public Function function( String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); } public Function function( Name name, List<Expression> args, Literal fallback) { if ("foo".equals(name.getLocalPart())) { return new FunctionImpl() { @Override public Object evaluate( Object object, Class context) { return "theResult"; } }; } return null; } }); return (Iterator<T>) l.iterator(); } return null; } }; GeoTools.addFactoryIteratorProvider(ffIteratorProvider); CommonFactoryFinder.reset(); } @AfterClass public static void tearDown() { GeoTools.removeFactoryIteratorProvider(ffIteratorProvider); } @Test public void testLookup() { Set<FunctionFactory> factories = CommonFactoryFinder.getFunctionFactories(null); FunctionFactory factory = null; for (FunctionFactory ff : factories) { for (FunctionName fn : ff.getFunctionNames()) { if ("foo".equals(fn.getName())) { factory = ff; break; } } } assertNotNull(factory); Function f = factory.function("foo", null, null); assertNotNull(f); } /** GEOT-3841 */ @Test public void testThreadedFunctionLookup() throws Exception { final FilterFactory ff = CommonFactoryFinder.getFilterFactory(null); ExecutorService es = Executors.newCachedThreadPool(); List<Future<Exception>> tests = new ArrayList<Future<Exception>>(); for (int i = 0; i < 100; i++) { Future<Exception> f = es.submit( new Callable<Exception>() { public Exception call() throws Exception { try { ff.function("Length", ff.property(".")); return null; } catch (Exception e) { return e; } } }); tests.add(f); } for (Future<Exception> future : tests) { Exception e = future.get(); if (e != null) { java.util.logging.Logger.getGlobal().log(java.util.logging.Level.INFO, "", e); } assertNull("No exception was expected", e); } es.shutdown(); } }
{ "pile_set_name": "Github" }
Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "src\curl.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}" ProjectSection(ProjectDependencies) = postProject {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution DLL Debug = DLL Debug DLL Debug - DLL OpenSSL = DLL Debug - DLL OpenSSL DLL Debug - DLL OpenSSL - DLL LibSSH2 = DLL Debug - DLL OpenSSL - DLL LibSSH2 DLL Debug - DLL Windows SSPI = DLL Debug - DLL Windows SSPI DLL Debug - DLL Windows SSPI - DLL WinIDN = DLL Debug - DLL Windows SSPI - DLL WinIDN DLL Release = DLL Release DLL Release - DLL OpenSSL = DLL Release - DLL OpenSSL DLL Release - DLL OpenSSL - DLL LibSSH2 = DLL Release - DLL OpenSSL - DLL LibSSH2 DLL Release - DLL Windows SSPI = DLL Release - DLL Windows SSPI DLL Release - DLL Windows SSPI - DLL WinIDN = DLL Release - DLL Windows SSPI - DLL WinIDN LIB Debug = LIB Debug LIB Debug - DLL OpenSSL = LIB Debug - DLL OpenSSL LIB Debug - DLL OpenSSL - DLL LibSSH2 = LIB Debug - DLL OpenSSL - DLL LibSSH2 LIB Debug - DLL Windows SSPI = LIB Debug - DLL Windows SSPI LIB Debug - DLL Windows SSPI - DLL WinIDN = LIB Debug - DLL Windows SSPI - DLL WinIDN LIB Debug - LIB OpenSSL = LIB Debug - LIB OpenSSL LIB Debug - LIB OpenSSL - LIB LibSSH2 = LIB Debug - LIB OpenSSL - LIB LibSSH2 LIB Release = LIB Release LIB Release - DLL OpenSSL = LIB Release - DLL OpenSSL LIB Release - DLL OpenSSL - DLL LibSSH2 = LIB Release - DLL OpenSSL - DLL LibSSH2 LIB Release - DLL Windows SSPI = LIB Release - DLL Windows SSPI LIB Release - DLL Windows SSPI - DLL WinIDN = LIB Release - DLL Windows SSPI - DLL WinIDN LIB Release - LIB OpenSSL = LIB Release - LIB OpenSSL LIB Release - LIB OpenSSL - LIB LibSSH2 = LIB Release - LIB OpenSSL - LIB LibSSH2 EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.ActiveCfg = DLL Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.Build.0 = DLL Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.ActiveCfg = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release.Build.0 = DLL Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.ActiveCfg = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug.Build.0 = LIB Debug|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.ActiveCfg = LIB Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.Build.0 = LIB Release|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.ActiveCfg = DLL Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.Build.0 = DLL Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI.Build.0 = DLL Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.ActiveCfg = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release.Build.0 = DLL Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.ActiveCfg = DLL Release - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI.Build.0 = DLL Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.ActiveCfg = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug.Build.0 = LIB Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI.Build.0 = LIB Debug - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL.Build.0 = LIB Debug - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.ActiveCfg = LIB Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.Build.0 = LIB Release|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI.Build.0 = LIB Release - DLL Windows SSPI|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.ActiveCfg = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL.Build.0 = LIB Release - LIB OpenSSL|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal
{ "pile_set_name": "Github" }
124.287000 0.000000 0.000000 0.000000 0.000000 -0.000000 -0.000000 1.000000 124.390600 -0.004757 -0.011335 0.079164 -0.000549 -0.000155 -0.000237 1.000000 124.494400 -0.008107 -0.017200 0.150011 -0.000860 -0.000513 -0.000296 0.999999
{ "pile_set_name": "Github" }
<p> <ul> {%- for lang in ['en', 'fr', 'es'] %} <li> <a href="{% url 'lang_front' with lang=lang %}">${.locale.languages[lang]} (${lang})</a> </li> {%- endfor %} </ul> <h1>{% trans comment "greeting" %}Hello!{% end %}</h1> {% def "cats" %} {% trans number count comment "plural test" %} There is ${count} ${name} {% plural %} There are ${count} ${name}s {% endtrans %} {% enddef %} <ul> {% for count in [1, 2, 3] %} <li>{% call "cats" with count=count, name="cat" %}</li> {% endfor %} </ul> <p> {% trans context "month name" %}May{% endtrans %} </p> <p> {% trans context "to indicate possibility" %}May{% endtrans %} </p> </p>
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: org.eclipse.jetty.orbit:org.apache.jasper.glassfish:2.1.0.v201110031002"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/orbit/org.apache.jasper.glassfish/2.1.0.v201110031002/org.apache.jasper.glassfish-2.1.0.v201110031002.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/orbit/org.apache.jasper.glassfish/2.1.0.v201110031002/org.apache.jasper.glassfish-2.1.0.v201110031002-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/org/eclipse/jetty/orbit/org.apache.jasper.glassfish/2.1.0.v201110031002/org.apache.jasper.glassfish-2.1.0.v201110031002-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
@import "../../../common/css/theme/dark"; @import "analyse.free";
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> <global name="Category" module="erp5.portal_type"/> </pickle> <pickle> <dictionary> <item> <key> <string>_Add_portal_content_Permission</string> </key> <value> <tuple> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>_Add_portal_folders_Permission</string> </key> <value> <tuple> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>_Copy_or_Move_Permission</string> </key> <value> <tuple> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>_Delete_objects_Permission</string> </key> <value> <tuple> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>_Modify_portal_content_Permission</string> </key> <value> <tuple> <string>Assignee</string> <string>Assignor</string> <string>Manager</string> <string>Owner</string> </tuple> </value> </item> <item> <key> <string>_count</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> <key> <string>_mt_index</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> <item> <key> <string>_tree</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> </value> </item> <item> <key> <string>default_reference</string> </key> <value> <string>2351</string> </value> </item> <item> <key> <string>effective_date</string> </key> <value> <none/> </value> </item> <item> <key> <string>id</string> </key> <value> <string>2351</string> </value> </item> <item> <key> <string>portal_type</string> </key> <value> <string>Category</string> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Titres immobilisés (droit de propriété)</string> </value> </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> <global name="Length" module="BTrees.Length"/> </pickle> <pickle> <int>0</int> </pickle> </record> <record id="3" aka="AAAAAAAAAAM="> <pickle> <global name="OOBTree" module="BTrees.OOBTree"/> </pickle> <pickle> <none/> </pickle> </record> <record id="4" aka="AAAAAAAAAAQ="> <pickle> <global name="OOBTree" module="BTrees.OOBTree"/> </pickle> <pickle> <none/> </pickle> </record> </ZopeData>
{ "pile_set_name": "Github" }
export default { connected: true, loading: 0, darkMode: false, currentProjectId: null }
{ "pile_set_name": "Github" }
class NestedArrayLengthInference { public void doStuff(int r) { int[] length16array = new int[16]; int[] unknownLengthArray = new int[r]; // CF seems to think that if one array has constant length, all do?? int[][] myNewArray = new int[][] {unknownLengthArray, length16array}; int[][] myNewArray2 = new int[][] {length16array, unknownLengthArray}; } }
{ "pile_set_name": "Github" }
from __future__ import absolute_import SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
{ "pile_set_name": "Github" }
// // PhoneNumChain.m // Animations // // Created by YouXianMing on 2017/11/28. // Copyright © 2017年 YouXianMing. All rights reserved. // #import "PhoneNumChain.h" #import "RegexManager.h" @implementation PhoneNumChain - (ResponsibilityMessage *)canPassThrough { UITextField *field = self.object; ResponsibilityMessage *message = [ResponsibilityMessage new]; message.object = self.object; message.checkSuccess = YES; if (field.text.length <= 0) { message.errorMessage = @"手机号不能为空"; message.checkSuccess = NO; } else if ([field.text existWithRegexPattern:@"\\d{11}|\\d{13}"] == NO) { message.errorMessage = @"手机号码不正确,请重新输入"; message.checkSuccess = NO; } return message; } @end
{ "pile_set_name": "Github" }