text
stringlengths 2
100k
| meta
dict |
---|---|
#include "arm/sysregs.h"
#include "mm.h"
.section ".text.boot"
.globl _start
_start:
mrs x0, mpidr_el1
and x0, x0,#0xFF // Check processor id
cbz x0, master // Hang for all non-primary CPU
b proc_hang
proc_hang:
b proc_hang
master:
ldr x0, =SCTLR_VALUE_MMU_DISABLED
msr sctlr_el1, x0
ldr x0, =HCR_VALUE
msr hcr_el2, x0
ldr x0, =SCR_VALUE
msr scr_el3, x0
ldr x0, =SPSR_VALUE
msr spsr_el3, x0
adr x0, el1_entry
msr elr_el3, x0
eret
el1_entry:
adr x0, bss_begin
adr x1, bss_end
sub x1, x1, x0
bl memzero
mov sp, #(2 * SECTION_SIZE)
bl kernel_main
b proc_hang // should never come here
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2015 - 2018 Anton Tananaev ([email protected])
*
* 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.traccar.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
import org.traccar.helper.BitUtil;
import org.traccar.model.CellTower;
import org.traccar.model.Network;
import org.traccar.model.Position;
import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.Date;
public class ThinkRaceProtocolDecoder extends BaseProtocolDecoder {
public ThinkRaceProtocolDecoder(Protocol protocol) {
super(protocol);
}
public static final int MSG_LOGIN = 0x80;
public static final int MSG_GPS = 0x90;
private static double convertCoordinate(long raw, boolean negative) {
long degrees = raw / 1000000;
double minutes = (raw % 1000000) * 0.0001;
double result = degrees + minutes / 60;
if (negative) {
result = -result;
}
return result;
}
@Override
protected Object decode(
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
ByteBuf buf = (ByteBuf) msg;
buf.skipBytes(2); // header
ByteBuf id = buf.readSlice(12);
buf.readUnsignedByte(); // separator
int type = buf.readUnsignedByte();
buf.readUnsignedShort(); // length
if (type == MSG_LOGIN) {
int command = buf.readUnsignedByte(); // 0x00 - heartbeat
if (command == 0x01) {
String imei = buf.toString(buf.readerIndex(), 15, StandardCharsets.US_ASCII);
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, imei);
if (deviceSession != null && channel != null) {
ByteBuf response = Unpooled.buffer();
response.writeByte(0x48); response.writeByte(0x52); // header
response.writeBytes(id);
response.writeByte(0x2c); // separator
response.writeByte(type);
response.writeShort(0x0002); // length
response.writeShort(0x8000);
response.writeShort(0x0000); // checksum
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}
}
} else if (type == MSG_GPS) {
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);
if (deviceSession == null) {
return null;
}
Position position = new Position(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
position.setTime(new Date(buf.readUnsignedInt() * 1000));
int flags = buf.readUnsignedByte();
position.setValid(true);
position.setLatitude(convertCoordinate(buf.readUnsignedInt(), !BitUtil.check(flags, 0)));
position.setLongitude(convertCoordinate(buf.readUnsignedInt(), !BitUtil.check(flags, 1)));
position.setSpeed(buf.readUnsignedByte());
position.setCourse(buf.readUnsignedByte());
position.setNetwork(new Network(
CellTower.fromLacCid(buf.readUnsignedShort(), buf.readUnsignedShort())));
return position;
}
return null;
}
}
| {
"pile_set_name": "Github"
} |
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2020 MuseScore BVBA and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
#ifndef MU_MIDI_MIDIEVENT_H
#define MU_MIDI_MIDIEVENT_H
#include <cstdint>
#include <array>
#include <set>
#include "audio/midi/event.h"
namespace mu {
namespace midi {
using channel_t = uint8_t;
using EventType = Ms::EventType;
/*!
* MIDI Event stored in Universal MIDI Packet Format Message
* @see M2-104-UM
* @see midi.org
*/
struct Event {
enum MessageType {
Utility = 0x0,
SystemRealTime = 0x1,
//! MIDI1.0 voice message
ChannelVoice10 = 0x2,
SystemExclusiveData = 0x3,
//! MIDI2.0 voice message
ChannelVoice20 = 0x4,
Data = 0x5
};
enum Opcode {
RegisteredPerNoteController = 0b0000,
AssignablePerNoteController = 0b0001,
RegisteredController = 0b0010,
AssignableController = 0b0011,
RelativeRegisteredController= 0b0100,
RelativeAssignableController= 0b0101,
PerNotePitchBend = 0b0110,
NoteOff = 0b1000,
NoteOn = 0b1001,
PolyPressure = 0b1010,
ControlChange = 0b1011,
ProgramChange = 0b1100,
ChannelPressure = 0b1101,
PitchBend = 0b1110,
PerNoteManagement = 0b1111
};
enum AttributeType {
NoData = 0x00,
ManufacturerSpecific = 0x01,
ProfileSpecific = 0x02,
Pitch = 0x03
};
enum UtilityStatus {
NoOperation = 0x00,
JRClock = 0x01,
JRTimestamp = 0x02
};
Event()
: m_data({ 0, 0, 0, 0 }) {}
Event(Opcode opcode, MessageType type = ChannelVoice20)
{
setMessageType(type);
setOpcode(opcode);
}
[[deprecated]] Event(channel_t ch, EventType type)
{
setType(type);
setChannel(ch);
}
[[deprecated]] Event(channel_t ch, EventType type, uint8_t a = 0, uint8_t b = 0)
{
m_data[0] = (a << 8) | b;
setType(type);
setChannel(ch);
}
//! 4.8.1 NOOP Utility message
static Event NOOP() { return Event(); }
//! from standard MIDI1.0 (specification 1996)
static Event fromMIDI10Package(uint32_t data)
{
Event e;
union {
unsigned char byte[4];
uint32_t full;
} u;
u.full = data;
if (
(u.byte[0] & 0x80)
|| (u.byte[0] & 0x90)
|| (u.byte[0] & 0xA0)
|| (u.byte[0] & 0xB0)
|| (u.byte[0] & 0xC0)
|| (u.byte[0] & 0xD0)
|| (u.byte[0] & 0xE0)
) {
e.m_data[0] = (u.byte[0] << 16) | (u.byte[1] << 8) | u.byte[2];
e.setMessageType(ChannelVoice10);
}
return e;
}
uint32_t to_MIDI10Package() const
{
if (messageType() == ChannelVoice10) {
union {
unsigned char byte[4];
uint32_t uint32;
} p;
p.uint32 = m_data[0];
std::swap(p.byte[0], p.byte[2]);
p.byte[3] = 0;
return p.uint32;
}
return 0;
}
bool operator ==(const Event& other) const { return m_data == other.m_data; }
bool operator !=(const Event& other) const { return !operator==(other); }
operator bool() const {
return operator!=(NOOP()) && isValid();
}
bool isChannelVoice() const { return messageType() == ChannelVoice10 || messageType() == ChannelVoice20; }
bool isChannelVoice20() const { return messageType() == ChannelVoice20; }
bool isMessageTypeIn(const std::set<MessageType>& types) const { return types.find(messageType()) != types.end(); }
bool isOpcodeIn(const std::set<Opcode>& opcodes) const { return opcodes.find(opcode()) != opcodes.end(); }
//! check UMP for correct structure
bool isValid() const
{
switch (messageType()) {
case Utility: {
std::set<UtilityStatus> statuses = { NoOperation, JRClock, JRTimestamp };
return statuses.find(static_cast<UtilityStatus>(status())) != statuses.end();
}
case SystemRealTime:
case SystemExclusiveData:
case Data:
return true;
case ChannelVoice10:
return isOpcodeIn({ NoteOff, NoteOn, PolyPressure, ControlChange, ProgramChange, ChannelPressure, PitchBend });
case ChannelVoice20:
return isOpcodeIn({ RegisteredPerNoteController,
AssignablePerNoteController,
RegisteredController,
AssignableController,
RelativeRegisteredController,
RelativeAssignableController,
PerNotePitchBend,
NoteOff,
NoteOn,
PolyPressure,
ControlChange,
ProgramChange,
ChannelPressure,
PitchBend,
PerNoteManagement
});
}
return false;
}
MessageType messageType() const { return static_cast<MessageType>(m_data[0] >> 28); }
void setMessageType(MessageType type)
{
uint32_t mask = type << 28;
m_data[0] &= 0x0FFFFFFF;
m_data[0] |= mask;
}
channel_t group() const { return (m_data[0] >> 24) & 0b00001111; }
void setGroup(channel_t group)
{
assert(group < 16);
uint32_t mask = group << 24;
m_data[0] &= 0xF0FFFFFF;
m_data[0] |= mask;
}
Opcode opcode() const
{
assertChannelVoice();
return static_cast<Opcode>((m_data[0] >> 20) & 0b00001111);
}
void setOpcode(Opcode code)
{
assertChannelVoice();
uint32_t mask = code << 20;
m_data[0] &= 0xFF0FFFFF;
m_data[0] |= mask;
}
uint8_t status() const
{
assertMessageType({ SystemRealTime, Utility });
switch (messageType()) {
case SystemRealTime: return (m_data[0] >> 16) & 0b11111111;
case Utility: return (m_data[0] >> 16) & 0b00001111;
default: break;
}
return 0;
}
[[deprecated]] EventType type() const
{
if (isChannelVoice()) {
return static_cast<EventType>(opcode() << 4);
}
return EventType::ME_INVALID;
}
[[deprecated]] void setType(EventType type)
{
std::set<EventType> supportedTypes
= { EventType::ME_NOTEOFF, EventType::ME_NOTEON, EventType::ME_POLYAFTER, EventType::ME_CONTROLLER, EventType::ME_PROGRAM,
EventType::ME_AFTERTOUCH, EventType::ME_PITCHBEND };
assert(supportedTypes.find(type) != supportedTypes.end());
Opcode code = static_cast<Opcode>(type >> 4);
setMessageType(ChannelVoice10);
setOpcode(code);
}
channel_t channel() const
{
assertChannelVoice();
return (m_data[0] >> 16) & 0b00001111;
}
void setChannel(channel_t channel)
{
assertChannelVoice();
assert(channel < 16);
uint32_t mask = channel << 16;
m_data[0] &= 0xFFF0FFFF;
m_data[0] |= mask;
}
uint8_t note() const
{
assertOpcode({ NoteOn, NoteOff, PolyPressure,
PerNotePitchBend, PerNoteManagement,
RegisteredPerNoteController, AssignablePerNoteController });
switch (messageType()) {
case ChannelVoice10:
case ChannelVoice20: return (m_data[0] >> 8) & 0x7F;
break;
default: assert(false);
}
}
void setNote(uint8_t value)
{
assertOpcode({ NoteOn, NoteOff, PolyPressure,
PerNotePitchBend, PerNoteManagement,
RegisteredPerNoteController, AssignablePerNoteController });
assert(value < 128);
uint32_t mask = value << 8;
m_data[0] &= 0xFFFF00FF;
m_data[0] |= mask;
}
//! return note from Pitch attribute (for NoteOn & NoteOff) events) if exists else return note()
uint8_t pitchNote() const
{
assertOpcode({ NoteOn, NoteOff });
if (attributeType() == AttributeType::Pitch) {
return attribute() >> 9;
}
return note();
}
//! return tuning in semitones from Pitch attribute (for NoteOn & NoteOff) events) if exists else return 0.f
float pitchTuning() const
{
assertOpcode({ NoteOn, NoteOff });
if (attributeType() == AttributeType::Pitch) {
return (attribute() & 0x1FF) / static_cast<float>(0x200);
}
return 0.f;
}
//! return tuning in cents
float pitchTuningCents() const
{
return pitchTuning() * 100;
}
//! 4.2.14.3 @see pitchNote(), pitchTuning()
void setPitchNote(uint8_t note, float tuning)
{
assertOpcode({ NoteOn, NoteOff });
assertMessageType({ ChannelVoice20 });
setAttributeType(AttributeType::Pitch);
uint16_t attribute = static_cast<uint16_t>(tuning * 0x200);
attribute &= 0x1FF; //for safe clear first 7 bits
attribute |= static_cast<uint16_t>(note) << 9;
setAttribute(attribute);
}
uint16_t velocity() const
{
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
if (messageType() == ChannelVoice20) {
return m_data[1] >> 16;
}
return m_data[0] & 0x7F;
}
//!maximum available velocity value for current messageType
uint16_t maxVelocity() const
{
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
if (messageType() == ChannelVoice20) {
return 0xFFFF;
}
return 0x7F;
}
void setVelocity(uint16_t value)
{
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
if (messageType() == ChannelVoice20) {
uint32_t mask = value << 16;
m_data[1] &= 0x0000FFFF;
m_data[1] |= mask;
return;
}
assert(value < 128);
uint32_t mask = value & 0x7F;
m_data[0] &= 0xFFFFFF00;
m_data[0] |= mask;
}
//! set velocity as a fraction of 1. Will automatically scale.
void setVelocityFraction(float value)
{
assert(value >= 0.f && value <= 1.f);
setVelocity(value * maxVelocity());
}
//!return velocity in range [0.f, 1.f] independent from message type
float velocityFraction()
{
return velocity() / static_cast<float>(maxVelocity());
}
uint32_t data() const
{
switch (messageType()) {
case ChannelVoice10:
switch (opcode()) {
case PolyPressure:
case ControlChange:
return m_data[0] & 0x7F;
case ChannelPressure:
return (m_data[0] >> 8) & 0x7F;
case PitchBend:
return ((m_data[0] & 0x7F) << 7) | ((m_data[0] & 0x7F00) >> 8);
default: assert(false);
}
case ChannelVoice20:
switch (opcode()) {
case PolyPressure:
case RegisteredPerNoteController:
case AssignablePerNoteController:
case RegisteredController:
case AssignableController:
case RelativeRegisteredController:
case RelativeAssignableController:
case ControlChange:
case ChannelPressure:
case PitchBend:
case PerNotePitchBend:
return m_data[1];
default: assert(false);
}
default:; //TODO
}
return 0;
}
void setData(uint32_t data)
{
switch (messageType()) {
case ChannelVoice10:
switch (opcode()) {
case PolyPressure:
case ControlChange: {
assert(data < 128);
uint32_t mask = data & 0x7F;
m_data[0] &= 0xFFFFFF00;
m_data[0] |= mask;
break;
}
case ChannelPressure: {
assert(data < 128);
uint32_t mask = (data & 0x7F) << 8;
m_data[0] &= 0xFFFF00FF;
m_data[0] |= mask;
break;
}
case PitchBend: {
data &= 0x3FFF;
m_data[0] &= 0xFFFF0000;
//3d byte: r,lsb 4th: r,msb
m_data[0] |= ((data >> 7) & 0x7F) | ((data & 0x7F) << 8);
break;
}
default: assert(false);
}
break;
case ChannelVoice20:
switch (opcode()) {
case PolyPressure:
case RegisteredPerNoteController:
case AssignablePerNoteController:
case RegisteredController:
case AssignableController:
case RelativeRegisteredController:
case RelativeAssignableController:
case ControlChange:
case ChannelPressure:
case PitchBend:
case PerNotePitchBend:
m_data[1] = data;
break;
default: assert(false);
}
break;
default: assert(false);
}
}
/*! return signed value:
* float value for Pitch attribute of NoteOn
* @see: data() can return pitch centered unsigned raw value depenned on MIDI version
*/
float pitch() const
{
assertOpcode({ PitchBend });
switch (messageType()) {
case ChannelVoice20: return (data() - 0x80000000) / static_cast<float>(0xFFFFFFFF);
default: /* silence */ break;
}
return (data() - 8192) / static_cast<float>(0x3FFF);//MIDI1.0
}
uint8_t index() const
{
assertOpcode({ ControlChange, RegisteredPerNoteController, AssignablePerNoteController,
RegisteredController, AssignableController, RelativeRegisteredController, RelativeAssignableController });
switch (opcode()) {
case Opcode::ControlChange:
case Opcode::RegisteredController:
case Opcode::AssignableController:
case Opcode::RelativeRegisteredController:
case Opcode::RelativeAssignableController:
return (m_data[0] >> 8) & 0x7F;
case Opcode::RegisteredPerNoteController:
case Opcode::AssignablePerNoteController:
return m_data[0] & 0xFF;
default: assert(false);
}
}
void setIndex(uint8_t value)
{
assertOpcode({ ControlChange, RegisteredPerNoteController, AssignablePerNoteController,
RegisteredController, AssignableController, RelativeRegisteredController, RelativeAssignableController });
switch (opcode()) {
case Opcode::ControlChange:
case Opcode::RegisteredController:
case Opcode::AssignableController:
case Opcode::RelativeRegisteredController:
case Opcode::RelativeAssignableController: {
assert(value < 128);
uint32_t mask = value << 8;
m_data[0] &= 0xFFFF00FF;
m_data[0] |= mask;
break;
}
case Opcode::RegisteredPerNoteController:
case Opcode::AssignablePerNoteController: {
m_data[0] &= 0xFFFFFF00;
m_data[0] |= value;
break;
}
default: assert(false);
}
}
uint8_t program() const
{
assertOpcode({ Opcode::ProgramChange });
switch (messageType()) {
case ChannelVoice10: return (m_data[0] >> 8) & 0x7F;
break;
case ChannelVoice20: return (m_data[1] >> 24) & 0x7F;
break;
default: assert(false);
}
}
void setProgram(uint8_t value)
{
assertOpcode({ Opcode::ProgramChange });
assert(value < 128);
switch (messageType()) {
case ChannelVoice10: {
uint32_t mask = value << 8;
m_data[0] &= 0xFFFF00FF;
m_data[0] |= mask;
break;
}
case ChannelVoice20: {
uint32_t mask = value << 24;
m_data[1] &= 0x00FFFFFF;
m_data[1] |= mask;
break;
}
default: assert(false);
}
}
uint16_t bank() const
{
assertOpcode({ ProgramChange, RegisteredController, AssignableController, RelativeRegisteredController,
RelativeAssignableController });
assertMessageType({ ChannelVoice20 });
if (opcode() == ProgramChange) {
return ((m_data[1] & 0x7F00) >> 1) | (m_data[1] & 0x7F);
}
return (m_data[0] >> 8) & 0x7F;
}
void setBank(uint16_t bank)
{
assertOpcode({ ProgramChange, RegisteredController, AssignableController, RelativeRegisteredController,
RelativeAssignableController });
assertMessageType({ ChannelVoice20 });
if (opcode() == ProgramChange) {
m_data[0] |= 0x01; //set BankValid bit
uint32_t mask = (bank & 0x3F80) << 8 | (bank & 0x7F);
m_data[1] &= 0xFFFF0000;
m_data[1] |= mask;
return;
}
assert(bank < 128);
uint32_t mask = bank << 8;
m_data[0] &= 0xFFFF00FF;
m_data[0] |= mask;
}
bool isBankValid() const
{
assertOpcode({ ProgramChange });
assertMessageType({ ChannelVoice20 });
return m_data[0] & 0x01;
}
AttributeType attributeType() const
{
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
assertMessageType({ ChannelVoice20 });
return static_cast<AttributeType>(m_data[0] & 0xFF);
}
void setAttributeType(AttributeType type)
{
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
assertMessageType({ ChannelVoice20 });
m_data[0] &= 0xFFFFFF00;
m_data[0] |= type;
}
void setAttributeType(uint8_t type) { setAttributeType(static_cast<AttributeType>(type)); }
uint16_t attribute() const
{
assertOpcode({ NoteOn, NoteOff });
if (messageType() == ChannelVoice20) {
return m_data[1] & 0xFFFF;
}
return 0x00;
}
void setAttribute(uint16_t value)
{
assertOpcode({ NoteOn, NoteOff });
assertMessageType({ ChannelVoice20 });
m_data[1] &= 0xFFFF0000;
m_data[1] |= value;
}
void setPerNoteDetach(bool value)
{
assertOpcode({ PerNoteManagement });
assertMessageType({ ChannelVoice20 });
m_data[0] &= 0xFFFFFFFD;
m_data[0] |= value;
}
void setPerNoteReset(bool value)
{
assertOpcode({ PerNoteManagement });
assertMessageType({ ChannelVoice20 });
m_data[0] &= 0xFFFFFFFE;
m_data[0] |= value;
}
//!convert ChannelVoice from MIDI2.0 to MIDI1.0
std::list<Event> toMIDI10() const
{
std::list<Event> events;
switch (messageType()) {
case ChannelVoice10: events.push_back(*this);
break;
case ChannelVoice20: {
auto basic10Event = Event(opcode(), ChannelVoice10);
basic10Event.setChannel(channel());
basic10Event.setGroup(group());
switch (opcode()) {
//D2.1
case NoteOn:
case NoteOff: {
auto e = basic10Event;
auto v = scaleDown(velocity(), 16, 7);
e.setNote(note());
if (v != 0) {
e.setVelocity(v);
} else {
//4.2.2 velocity comment
e.setVelocity(1);
}
events.push_back(e);
break;
}
//D2.2
case ChannelPressure: {
auto e = basic10Event;
e.setData(scaleDown(data(), 32, 7));
events.push_back(e);
break;
}
//D2.3
case AssignableController:
case RegisteredController: {
std::list<std::pair<uint8_t, uint8_t> > controlChanges = {
{ (opcode() == RegisteredController ? 101 : 99), bank() },
{ (opcode() == RegisteredController ? 100 : 98), index() },
{ 6, (data() & 0x7FFFFFFF) >> 24 },
{ 38, (data() & 0x1FC0000) >> 18 }
};
for (auto& c : controlChanges) {
auto e = basic10Event;
e.setOpcode(ControlChange);
e.setIndex(c.first);
e.setData(c.second);
events.push_back(e);
}
break;
}
//D.4
case ProgramChange: {
if (isBankValid()) {
auto e = basic10Event;
e.setOpcode(ControlChange);
e.setIndex(0);
e.setData((bank() & 0x7F00) >> 8);
events.push_back(e);
e.setIndex(0);
e.setData(bank() & 0x7F);
events.push_back(e);
}
auto e = basic10Event;
e.setProgram(program());
events.push_back(e);
break;
}
//D2.5
case PitchBend: {
auto e = basic10Event;
e.setData(data());
events.push_back(e);
break;
}
default: break;
}
break;
}
default: break;
}
return events;
}
//!convert ChannelVoice from MIDI1.0 to MIDI2.0
Event toMIDI20(Event chain = NOOP()) const
{
Event event;
switch (messageType()) {
case ChannelVoice20: return *this;
break;
case ChannelVoice10: {
if (chain) {
event = chain;
} else {
event = Event(opcode(), ChannelVoice20);
event.setChannel(channel());
event.setGroup(group());
}
switch (opcode()) {
//D3.1
case NoteOn:
case NoteOff:
event.setNote(note());
event.setVelocity(scaleUp(velocity(), 7, 16));
if (velocity() == 0) {
event.setOpcode(NoteOff);
}
break;
//D3.2
case PolyPressure:
event.setNote(note());
event.setData(scaleUp(data(), 7, 32));
break;
//D3.3
case ControlChange: {
std::set<uint8_t> skip = { 6, 38, 98, 99, 100, 101 };
if (skip.find(index()) == skip.end()) {
break;
}
switch (index()) {
case 99:
event.setOpcode(AssignableController);
event.setBank(data());
break;
case 101:
event.setOpcode(RegisteredController);
event.setBank(data());
break;
case 98:
case 100:
event.setIndex(data());
break;
case 6:
event.m_data[0] &= 0x1FFFFFF;
event.m_data[0] |= (data() & 0x7F) << 25;
break;
case 38:
event.m_data[0] &= 0xFE03FFFF;
event.m_data[0] |= (data() & 0x7F) << 18;
break;
default:
event.setIndex(index());
event.setData(scaleUp(data(), 7, 32));
}
break;
}
//D3.4
case ProgramChange:
event.setProgram(program());
break;
//D3.5
case ChannelPressure:
event.setData(scaleUp(data(), 7, 32));
break;
//D3.6
case PitchBend:
event.setData(scaleUp(data(), 14, 32));
break;
default: break;
}
break;
}
default: break;
}
return event;
}
std::string opcodeString() const
{
#define opcodeValueMap(o) { o, std::string(#o) \
}
static std::map<Opcode, std::string> m = {
opcodeValueMap(Opcode::RegisteredPerNoteController),
opcodeValueMap(Opcode::AssignablePerNoteController),
opcodeValueMap(Opcode::RegisteredController),
opcodeValueMap(Opcode::AssignableController),
opcodeValueMap(Opcode::RelativeRegisteredController),
opcodeValueMap(Opcode::RelativeAssignableController),
opcodeValueMap(Opcode::PerNotePitchBend),
opcodeValueMap(Opcode::NoteOff),
opcodeValueMap(Opcode::NoteOn),
opcodeValueMap(Opcode::PolyPressure),
opcodeValueMap(Opcode::ControlChange),
opcodeValueMap(Opcode::ProgramChange),
opcodeValueMap(Opcode::ChannelPressure),
opcodeValueMap(Opcode::PitchBend),
opcodeValueMap(Opcode::PerNoteManagement)
};
#undef opcodeValueMap
return m[opcode()];
}
std::string to_string() const
{
std::string str;
auto dataToStr = [&str, this]() {
str += " {";
for (auto& d : m_data) {
str += " " + std::to_string(d);
}
str += "}";
};
switch (messageType()) {
case ChannelVoice10: {
str += "MIDI1.0 " + opcodeString();
str += " group: " + std::to_string(group());
str += " channel: " + std::to_string(channel());
switch (opcode()) {
case NoteOn:
case NoteOff:
str += " note: " + std::to_string(note())
+ " velocity: " + std::to_string(velocity());
break;
case PolyPressure:
str += " note: " + std::to_string(note())
+ " data: " + std::to_string(data());
break;
case ControlChange:
str += " index: " + std::to_string(index())
+ " data: " + std::to_string(data());
break;
case ProgramChange:
str += " program: " + std::to_string(program());
break;
case ChannelPressure:
str += " data: " + std::to_string(data());
break;
case PitchBend:
str += " value: " + std::to_string(pitch());
break;
default: /* silence warning */ break;
}
break;
}
case ChannelVoice20: {
str += "MIDI2.0 " + opcodeString();
str += " group: " + std::to_string(group());
str += " channel: " + std::to_string(channel());
switch (opcode()) {
case NoteOff:
case NoteOn:
str += " note: " + std::to_string(note())
+ " velocity: " + std::to_string(velocity())
+ " attr type: " + std::to_string(attributeType())
+ " attr value: " + std::to_string(attribute());
if (attributeType() == AttributeType::Pitch) {
str += "pitch: note:" + std::to_string(pitchNote()) + " " + std::to_string(pitchTuning()) + " semitone";
}
break;
case PolyPressure:
case PerNotePitchBend:
str += " note: " + std::to_string(note())
+ " data: " + std::to_string(data());
break;
case RegisteredPerNoteController:
case AssignablePerNoteController:
str += " note: " + std::to_string(note())
+ " index: " + std::to_string(index())
+ " data: " + std::to_string(data());
break;
case PerNoteManagement:
str += " note: " + std::to_string(note())
+ (m_data[0] & 0b10 ? " detach controller" : "")
+ (m_data[0] & 0b01 ? " reset controller" : "");
break;
case ControlChange:
str += " index: " + std::to_string(index())
+ " data: " + std::to_string(data());
break;
case ProgramChange:
str += " program: " + std::to_string(program())
+ (isBankValid() ? " set bank: " + std::to_string(bank()) : "");
break;
case RegisteredController:
case AssignableController:
case RelativeRegisteredController:
case RelativeAssignableController:
str += " bank: " + std::to_string(bank())
+ " index: " + std::to_string(index())
+ " data: " + std::to_string(data());
break;
case ChannelPressure:
str += " data: " + std::to_string(data());
break;
case PitchBend:
str += " value: " + std::to_string(pitch());
break;
}
break;
}
case Utility:
str += "MIDI2.0 Utility ";
if (m_data[0] == 0) {
str += " NOOP";
break;
}
dataToStr();
break;
case SystemRealTime:
str += "MIDI System";
dataToStr();
break;
case SystemExclusiveData:
str += "MIDI System Exlusive";
dataToStr();
break;
case Data:
str += "MIDI2.0 Data";
dataToStr();
break;
}
return str;
}
private:
void assertMessageType(std::set<MessageType> supportedTypes) const { assert(isMessageTypeIn(supportedTypes)); }
void assertChannelVoice() const { assert(isChannelVoice()); }
void assertOpcode(std::set<Opcode> supportedOpcodes) const { assert(isOpcodeIn(supportedOpcodes)); }
static uint32_t scaleUp(uint32_t srcVal, size_t srcBits, size_t dstBits)
{
// simple bit shift
size_t scaleBits = dstBits - srcBits;
uint32_t bitShiftedValue = srcVal << scaleBits;
uint32_t srcCenter = 2 ^ (srcBits - 1);
if (srcVal <= srcCenter) {
return bitShiftedValue;
}
// expanded bit repeat scheme
size_t repeatBits = srcBits - 1;
uint32_t repeatMask = (2 ^ repeatBits) - 1;
uint32_t repeatValue = srcVal & repeatMask;
if (scaleBits > repeatBits) {
repeatValue <<= scaleBits - repeatBits;
} else {
repeatValue >>= repeatBits - scaleBits;
}
while (repeatValue != 0) {
bitShiftedValue |= repeatValue;
repeatValue >>= repeatBits;
}
return bitShiftedValue;
}
static uint32_t scaleDown(uint32_t srcVal, size_t srcBits, size_t dstBits)
{
size_t scaleBits = (srcBits - dstBits);
return srcVal >> scaleBits;
}
std::array<uint32_t, 4> m_data = { { 0, 0, 0, 0 } };
};
}
}
#endif // MU_MIDI_MIDIEVENT_H
| {
"pile_set_name": "Github"
} |
jQuery(function($){
$.datepicker.regional['kk-KZ'] = {"Name":"kk-KZ","closeText":"Close","prevText":"Prev","nextText":"Next","currentText":"Today","monthNames":["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан",""],"monthNamesShort":["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""],"dayNames":["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],"dayNamesShort":["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],"dayNamesMin":["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],"dateFormat":"dd.mm.yy","firstDay":1,"isRTL":false};
$.datepicker.setDefaults($.datepicker.regional['kk-KZ']);
}); | {
"pile_set_name": "Github"
} |
public class I100 {
void f() {
Object o;
o = new String @A [] {"foo", "bar"};
o = new String @A @B [] @C [] {"foo", "bar"};
}
}
| {
"pile_set_name": "Github"
} |
//--------------------------------------------------------------------------------------
// File: WICTextureLoader12.h
//
// Function for loading a WIC image and creating a Direct3D runtime texture for it
// (auto-generating mipmaps if possible)
//
// Note: Assumes application has already called CoInitializeEx
//
// Note these functions are useful for images created as simple 2D textures. For
// more complex resources, DDSTextureLoader is an excellent light-weight runtime loader.
// For a full-featured DDS file reader, writer, and texture processing pipeline see
// the 'Texconv' sample and the 'DirectXTex' library.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkId=248926
// http://go.microsoft.com/fwlink/?LinkID=615561
//--------------------------------------------------------------------------------------
#pragma once
#include <d3d12.h>
#include <cstdint>
#include <memory>
namespace DirectX
{
#ifndef WIC_LOADER_FLAGS_DEFINED
#define WIC_LOADER_FLAGS_DEFINED
enum WIC_LOADER_FLAGS : uint32_t
{
WIC_LOADER_DEFAULT = 0,
WIC_LOADER_FORCE_SRGB = 0x1,
WIC_LOADER_IGNORE_SRGB = 0x2,
WIC_LOADER_SRGB_DEFAULT = 0x4,
WIC_LOADER_MIP_AUTOGEN = 0x8,
WIC_LOADER_MIP_RESERVE = 0x10,
WIC_LOADER_FIT_POW2 = 0x20,
WIC_LOADER_MAKE_SQUARE = 0x40,
WIC_LOADER_FORCE_RGBA32 = 0x80,
};
#endif
// Standard version
HRESULT __cdecl LoadWICTextureFromMemory(
_In_ ID3D12Device* d3dDevice,
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
size_t wicDataSize,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource,
size_t maxsize = 0) noexcept;
HRESULT __cdecl LoadWICTextureFromFile(
_In_ ID3D12Device* d3dDevice,
_In_z_ const wchar_t* szFileName,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource,
size_t maxsize = 0) noexcept;
// Extended version
HRESULT __cdecl LoadWICTextureFromMemoryEx(
_In_ ID3D12Device* d3dDevice,
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
size_t wicDataSize,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept;
HRESULT __cdecl LoadWICTextureFromFileEx(
_In_ ID3D12Device* d3dDevice,
_In_z_ const wchar_t* szFileName,
size_t maxsize,
D3D12_RESOURCE_FLAGS resFlags,
unsigned int loadFlags,
_Outptr_ ID3D12Resource** texture,
std::unique_ptr<uint8_t[]>& decodedData,
D3D12_SUBRESOURCE_DATA& subresource) noexcept;
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".view.DatePickerActivity"
tools:ignore="RtlHardcoded">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="16dp">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Calendar Type"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/civilRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingLeft="16dp"
android:text="Civil"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/persianRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Persian"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/hijriRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Hijri"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/japaneseRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Japanese"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@color/colorDivider" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Picker Type"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/singleRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingLeft="16dp"
android:text="Single Day"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/rangeRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Range of Days"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/multipleRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Multiple Days"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@color/colorDivider" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Locale"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/calendarDefaultLocaleRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingLeft="16dp"
android:text="Calendar Default"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/englishLocaleRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="English"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@color/colorDivider" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Theme"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/lightThemeRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingLeft="16dp"
android:text="Default Light"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/darkThemeRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Default Dark"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@color/colorDivider" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Bottom Sheet / Dialog"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/bottomSheetRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingLeft="16dp"
android:text="Bottom Sheet"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/dialogRadioButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Dialog"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="@color/colorDivider" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Date Boundary"
android:textColor="@color/gray600"
android:textSize="@dimen/text_size_normal"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/minDateCheckBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Min Date: 5 months earlier"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/maxDateCheckBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="Max Date: 5 months later"
android:textColor="@color/gray900"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/showDatePickerButton"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/material_size_16"
android:layout_marginTop="@dimen/material_size_16"
android:layout_marginRight="@dimen/material_size_16"
android:text="Show Date Picker" />
<Space
android:layout_width="24dp"
android:layout_height="24dp" />
</LinearLayout>
</ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
| {
"pile_set_name": "Github"
} |
import { CommonModule } from '@angular/common';
import {
NgModule, Component, OnInit, AfterViewInit, OnDestroy,
Input, ViewChild, ElementRef, Renderer2, EventEmitter, Output
} from '@angular/core';
@Component({
selector: 'free-chip-group',
template: `
<div class="free-chip-group" [ngClass]="chipClass">
<free-chip *ngFor="let chip of value" [value]="chip.value"
[delete]="chip.delete"></free-chip>
<input spellcheck="false" type="text" *ngIf="placeholder" placeholder="placeholder"
(focus)="onFocus()" (blur)="onFocus()" (keyup.enter)="onEnter($event)">
</div>
`
})
export class ChipGroupComponent implements OnInit {
@Input()
set chips(value: any) {
this.value = [];
for (const v of value) {
const isExited = this.value.find((elem) => {
return elem.value === v.value;
});
if (!isExited) {
this.value.push(v);
}
}
}
get chips(): any {
return this.value;
}
@Output() onChange: EventEmitter<any> = new EventEmitter();
@Input() placeholder: string;
chipClass = {};
focus: boolean;
groups: ChipComponent[] = [];
value: any[] = [];
constructor() {}
ngOnInit() {
this.setChipClass();
}
setChipClass() {
this.chipClass = {
'free-chip-input': this.placeholder,
'free-chip-focus': this.focus
};
}
addGroup(value: ChipComponent) {
this.groups.push(value);
if (this.placeholder) {
this.onChange.emit(this.value);
}
}
removeGroup(value: ChipComponent) {
const index = this.value.findIndex((elem) => {
return elem.value === value.value;
});
if (index !== -1) {
this.groups.splice(index, 1);
this.value.splice(index, 1);
this.onChange.emit(this.value);
}
}
onFocus() {
this.focus = !this.focus;
this.setChipClass();
}
onEnter(event: any) {
const value = event.target.value.trim();
if (value) {
this.chips.push({
value: value,
delete: true
});
this.value.push(value);
this.chips = this.chips.slice();
event.target.value = '';
}
}
}
@Component({
selector: 'free-chip',
template: `
<div class="free-chip" tabindex="0" #container>
{{value}} <i class="fa fa-times-circle delete-btn" *ngIf="delete" (click)="onDelete()"></i>
</div>
`
})
export class ChipComponent implements OnInit, AfterViewInit, OnDestroy {
group: ChipGroupComponent;
@Input() value: any;
@Input() delete: boolean;
@ViewChild('container') container: ElementRef;
constructor(public renderer2: Renderer2,
group: ChipGroupComponent) {
this.group = group;
}
ngOnInit() {
if (this.group) {
this.group.addGroup(this);
}
}
ngAfterViewInit() {
if (this.delete) {
this.renderer2.addClass(this.container.nativeElement, 'free-chip-delete');
} else {
this.renderer2.removeClass(this.container.nativeElement, 'free-chip-delete');
}
}
onDelete() {
if (this.group) {
this.group.removeGroup(this);
}
}
ngOnDestroy() {
if (this.group) {
this.group.removeGroup(this);
}
}
}
@NgModule({
imports: [CommonModule],
declarations: [ChipComponent, ChipGroupComponent],
exports: [ChipComponent, ChipGroupComponent]
})
export class ChipModule {}
| {
"pile_set_name": "Github"
} |
TAG TEXT COMMENT
GLOBAL_ACCOUNT Account
GLOBAL_ADDFRIEND_BUTTON Freund hinzufügen
GLOBAL_ADDFRIEND_ERROR_ALREADY_FRIEND Diese Person ist bereits Ihr Freund.
GLOBAL_ADDFRIEND_ERROR_MALFORMED Sie müssen eine E-Mail-Adresse oder ein BattleTag eingeben.
GLOBAL_ADDFRIEND_HEADER Freund hinzufügen
GLOBAL_ADDFRIEND_INSTRUCTION BattleTag oder E-Mail-Adresse eingeben
GLOBAL_ADDFRIEND_SENT_CONFIRMATION Freundschaftsanfrage gesendet.
GLOBAL_ADVENTURE_CHOOSE_BUTTON_TEXT Wählen
GLOBAL_ADVENTURE_DESC_HEADER Abenteuer
GLOBAL_ADVENTURE_TRAY_HEADER Wählt ein Abenteuer
GLOBAL_APPROXIMATE_DATETIME ~{0} 0=time string
GLOBAL_APPROXIMATE_DATETIME_RANGE ~{0} bis {1} 0=min seconds 1=max seconds string
GLOBAL_ARENA_MEDAL_0 Neulingsschlüssel
GLOBAL_ARENA_MEDAL_1 Lehrlingsschlüssel
GLOBAL_ARENA_MEDAL_10 Frostschlüssel
GLOBAL_ARENA_MEDAL_11 Glutschlüssel
GLOBAL_ARENA_MEDAL_12 Lichtschlüssel
GLOBAL_ARENA_MEDAL_2 Gesellenschlüssel
GLOBAL_ARENA_MEDAL_3 Kupferschlüssel
GLOBAL_ARENA_MEDAL_4 Silberschlüssel
GLOBAL_ARENA_MEDAL_5 Goldschlüssel
GLOBAL_ARENA_MEDAL_6 Platinschlüssel
GLOBAL_ARENA_MEDAL_7 Diamantschlüssel
GLOBAL_ARENA_MEDAL_8 Championschlüssel
GLOBAL_ARENA_MEDAL_9 Rubinschlüssel
GLOBAL_ARENA_SEASON_ERROR_NOT_ACTIVE Der gewählte Arenamodus ist leider nicht mehr verfügbar. Bitte warten Sie ein paar Minuten und versuchen Sie es dann erneut.
GLOBAL_ASSET_DOWNLOAD Download von Assets
GLOBAL_ASSET_DOWNLOAD_ALERT Downloads sind während des Spielens deaktiviert.
GLOBAL_ASSET_DOWNLOAD_AWAITING_FETCH Es wird nach Updates gesucht ...
GLOBAL_ASSET_DOWNLOAD_AWAITING_OTHER_DOWNLOAD Warte ...
GLOBAL_ASSET_DOWNLOAD_AWAITING_WIFI WLAN benötigt
GLOBAL_ASSET_DOWNLOAD_BYTE_SYMBOL B
GLOBAL_ASSET_DOWNLOAD_CELLULAR_DATA_BODY Erlaubt den Download über die mobile Datenverbindung.
GLOBAL_ASSET_DOWNLOAD_CELLULAR_DATA_HEADER Mobile Daten
GLOBAL_ASSET_DOWNLOAD_CELLULAR_POPUP_ADDITIONAL_BODY Keine WLAN-Verbindung verfügbar. Sollen die verbleibenden {0} der zusätzlichen Daten über die mobile Datenverbindung heruntergeladen werden?
GLOBAL_ASSET_DOWNLOAD_CELLULAR_POPUP_HEADER Mobile Daten
GLOBAL_ASSET_DOWNLOAD_CELLULAR_POPUP_INITIAL_BODY Keine WLAN-Verbindung verfügbar. Sollen die verbleibenden {0} der benötigten Daten über die mobile Datenverbindung heruntergeladen werden?
GLOBAL_ASSET_DOWNLOAD_COMPLETE Abgeschlossen
GLOBAL_ASSET_DOWNLOAD_DETAILS_AUDIO Ton
GLOBAL_ASSET_DOWNLOAD_DETAILS_HIGHRES Texturen in HD
GLOBAL_ASSET_DOWNLOAD_DISABLED Deaktiviert
GLOBAL_ASSET_DOWNLOAD_ENABLE_DOWNLOAD_BODY Erlaubt den Download von Assets.
GLOBAL_ASSET_DOWNLOAD_ENABLE_DOWNLOAD_HEADER Download im Spiel
GLOBAL_ASSET_DOWNLOAD_ENABLED Aktiviert
GLOBAL_ASSET_DOWNLOAD_ERROR_AGENT_IMPEDED Langsame Verbindung
GLOBAL_ASSET_DOWNLOAD_ERROR_CELLULAR_DISABLED Mobile Daten deaktiviert
GLOBAL_ASSET_DOWNLOAD_ERROR_DOWNLOAD_DISABLED Download deaktiviert
GLOBAL_ASSET_DOWNLOAD_ERROR_OUT_OF_STORAGE Kein Speicherplatz
GLOBAL_ASSET_DOWNLOAD_GIGABYTE_SYMBOL GB
GLOBAL_ASSET_DOWNLOAD_INTENTION_PAUSED {0} (pausiert)
GLOBAL_ASSET_DOWNLOAD_IOS_REQ_POPUP_BODY Download verfügbar. Restliche {0} herunterladen?
GLOBAL_ASSET_DOWNLOAD_IOS_REQ_POPUP_HEADER Zusätzliche Daten
GLOBAL_ASSET_DOWNLOAD_KILOBYTE_SYMBOL KB
GLOBAL_ASSET_DOWNLOAD_MEGABYTE_SYMBOL MB
GLOBAL_ASSET_DOWNLOAD_PAUSED Pausiert
GLOBAL_ASSET_DOWNLOAD_SETTINGS Einstellungen
GLOBAL_ASSET_DOWNLOAD_STATUS noch {0} bei {1}/s
GLOBAL_ASSET_DOWNLOAD_STATUS_DECIMAL_FORMAT {0},{1} {2}
GLOBAL_ASSET_DOWNLOAD_STATUS_SHORT {0} bei {1}/s
GLOBAL_ASSET_INTENTION_DONE Fertig
GLOBAL_ASSET_INTENTION_DOWNLOADING_EXPANSION_MUSIC Zusätzliche Audios (2/3)
GLOBAL_ASSET_INTENTION_DOWNLOADING_FONTS Schriftarten
GLOBAL_ASSET_INTENTION_DOWNLOADING_HERO_MUSIC Heldenmusik
GLOBAL_ASSET_INTENTION_DOWNLOADING_HIGH_RES_PORTRAITS Karten in HD
GLOBAL_ASSET_INTENTION_DOWNLOADING_LEGEND_STINGERS Zusätzliche Audios (1/3)
GLOBAL_ASSET_INTENTION_DOWNLOADING_MINION_PLAY_SOUNDS Dieneraudiodateien
GLOBAL_ASSET_INTENTION_DOWNLOADING_MISSION_SOUNDS Audiodateien für Soloabenteuer
GLOBAL_ASSET_INTENTION_DOWNLOADING_OTHER_MINION_SOUNDS Zusätzliche Audios (3/3)
GLOBAL_ASSET_INTENTION_DOWNLOADING_PREMIUM_ANIMATIONS Goldene Animationen
GLOBAL_ASSET_INTENTION_DOWNLOADING_SPELL_SOUNDS Zauberaudios
GLOBAL_ASSET_INTENTION_UNINITIALIZED Wird initialisiert
GLOBAL_ATTACK Angriff
GLOBAL_BACK Zurück
GLOBAL_BASIC_DECK_NAME {0} 0=class name
GLOBAL_BATTLEGROUNDS Schlachtfeld
GLOBAL_BETA_REIMBURSEMENT_DETAILS Dieses Gold stellt eine Gutschrift für getätigte Käufe dar. Vielen Dank!
GLOBAL_BETA_REIMBURSEMENT_HEADLINE Gutschrift nach Accountzurücksetzung
GLOBAL_BRAWLISEUM Kartenkolosseum
GLOBAL_BUTTON_AWESOME Super!
GLOBAL_BUTTON_BUY KAUFEN
GLOBAL_BUTTON_CLOSE _Schließen_
GLOBAL_BUTTON_CONVERT Umwandeln
GLOBAL_BUTTON_GO Los!
GLOBAL_BUTTON_INFO_LETTER i
GLOBAL_BUTTON_NEXT Weiter
GLOBAL_BUTTON_NO Nein
GLOBAL_BUTTON_NOT_NOW Nicht jetzt
GLOBAL_BUTTON_OK OK
GLOBAL_BUTTON_OR ODER
GLOBAL_BUTTON_OWNED Erworben
GLOBAL_BUTTON_YES Ja
GLOBAL_CANCEL Abbrechen
GLOBAL_CARD_SET_BOOMSDAY Dr. Bumms Geheimlabor
GLOBAL_CARD_SET_BOOMSDAY_SEARCHABLE_SHORTHAND_NAMES bd tbp bdp tbdp bp gl dbgl dbg dbl This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_BOOMSDAY_SHORT Dr. Bumm
GLOBAL_CARD_SET_BRM Der Schwarzfels
GLOBAL_CARD_SET_BRM_SEARCHABLE_SHORTHAND_NAMES brm sf This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_BT Ruinen der Scherbenwelt
GLOBAL_CARD_SET_BT_SEARCHABLE_SHORTHAND_NAMES aoo ao ashes rds rs ruinen This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_BT_SHORT Scherbenwelt
GLOBAL_CARD_SET_CORE Basis
GLOBAL_CARD_SET_DALARAN Verschwörung der Schatten
GLOBAL_CARD_SET_DALARAN_SEARCHABLE_SHORTHAND_NAMES ros vds This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_DALARAN_SHORT Schatten
GLOBAL_CARD_SET_DEBUG Debug
GLOBAL_CARD_SET_DHI Initiand der Dämonenjäger
GLOBAL_CARD_SET_DHI_SEARCHABLE_SHORTHAND_NAMES dji This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_DHI_SHORT Initiand
GLOBAL_CARD_SET_DRG Erbe der Drachen
GLOBAL_CARD_SET_DRG_SEARCHABLE_SHORTHAND_NAMES edd ed dod dd This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_DRG_SHORT Drachen
GLOBAL_CARD_SET_EXPERT1 Klassik
GLOBAL_CARD_SET_GANGS Die Straßen von Gadgetzan
GLOBAL_CARD_SET_GANGS_RESERVE Gang-Reserve
GLOBAL_CARD_SET_GANGS_SEARCHABLE_SHORTHAND_NAMES msg msog svg This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_GANGS_SHORT Gadgetzan
GLOBAL_CARD_SET_GILNEAS Der Hexenwald
GLOBAL_CARD_SET_GILNEAS_SEARCHABLE_SHORTHAND_NAMES ww hw This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_GILNEAS_SHORT Hexenwald
GLOBAL_CARD_SET_GVG Goblins gegen Gnome
GLOBAL_CARD_SET_GVG_SEARCHABLE_SHORTHAND_NAMES gvg ggg This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_HOF Zeitlose Klassiker
GLOBAL_CARD_SET_ICECROWN Ritter des Frostthrons
GLOBAL_CARD_SET_ICECROWN_SHORT Frostthron
GLOBAL_CARD_SET_KARA Eine Nacht in Karazhan
GLOBAL_CARD_SET_KARA_RESERVE Karazhan-Reserve
GLOBAL_CARD_SET_KARA_SHORT Karazhan
GLOBAL_CARD_SET_LOE Die Forscherliga
GLOBAL_CARD_SET_LOE_SEARCHABLE_SHORTHAND_NAMES loe fl This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_LOE_SHORT Forscherliga
GLOBAL_CARD_SET_LOOTAPALOOZA Kobolde & Katakomben
GLOBAL_CARD_SET_LOOTAPALOOZA_SEARCHABLE_SHORTHAND_NAMES kc kac knc kk kuk This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_LOOTAPALOOZA_SHORT Kobolde
GLOBAL_CARD_SET_NAXX Naxxramas
GLOBAL_CARD_SET_NAXX_SEARCHABLE_SHORTHAND_NAMES Nax Naxx This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_OG Das Flüstern der Alten Götter
GLOBAL_CARD_SET_OG_RESERVE Old Gods Reserve
GLOBAL_CARD_SET_OG_SEARCHABLE_SHORTHAND_NAMES tog dag dfdag fdg wotog wog This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored. For Whispers of the Old Gods, 'tog' should be available in all locales; wotog and wog are additional English shorthands, which should be replaced by locale specific variants.
GLOBAL_CARD_SET_OG_SHORT Die Alten Götter
GLOBAL_CARD_SET_PROMO Promo
GLOBAL_CARD_SET_SCH Akademie Scholomance
GLOBAL_CARD_SET_SCH_SEARCHABLE_SHORTHAND_NAMES scholo as This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_SCH_SHORT Scholomance
GLOBAL_CARD_SET_TGT Das Große Turnier
GLOBAL_CARD_SET_TGT_SEARCHABLE_SHORTHAND_NAMES tgt dgt This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_TGT_SHORT Das Große Turnier
GLOBAL_CARD_SET_TROLL Rastakhans Rambazamba
GLOBAL_CARD_SET_TROLL_SEARCHABLE_SHORTHAND_NAMES rr This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_TROLL_SHORT Rambazamba
GLOBAL_CARD_SET_ULDUM Retter von Uldum
GLOBAL_CARD_SET_ULDUM_SEARCHABLE_SHORTHAND_NAMES sou rvu This is a space-separated list indicating all of the allowable search keywords that can be used in Collection Manager screen's text-search feature to narrow down the cards to this specific Card Set via shorthand names (note: the full name above is also used for this feature). Also note: letter case is ignored.
GLOBAL_CARD_SET_ULDUM_SHORT Uldum
GLOBAL_CARD_SET_UNGORO Reise nach Un’Goro
GLOBAL_CARD_SET_UNGORO_SHORT Un’Goro
GLOBAL_CARD_SET_WILD_EVENT Wildes Event
GLOBAL_CARD_SET_WILD_EVENT_SHORT Wildes Event
GLOBAL_CARD_SET_YOD Galakronds Erwachen
GLOBAL_CARD_SET_YOD_SHORT Galakronds Erwachen
GLOBAL_CARDTYPE_ENCHANTMENT Verzauberung
GLOBAL_CARDTYPE_HERO Held
GLOBAL_CARDTYPE_HEROPOWER Heldenfähigkeit
GLOBAL_CARDTYPE_ITEM Gegenstand
GLOBAL_CARDTYPE_MINION Diener
GLOBAL_CARDTYPE_SPELL Zauber
GLOBAL_CARDTYPE_TOKEN Marke
GLOBAL_CARDTYPE_WEAPON Waffe
GLOBAL_CHAT_BUBBLE_RECEIVER_NAME An: {0} 0=player name
GLOBAL_CHAT_CHALLENGE Herausfordern
GLOBAL_CHAT_NO_FRIENDS_ONLINE Keiner Ihrer Freunde ist derzeit online.
GLOBAL_CHAT_NO_RECENT_CONVERSATIONS Verwenden Sie das Freundemenü, um ein Gespräch mit einem Freund zu beginnen.
GLOBAL_CHAT_RECEIVER_OFFLINE {0} ist offline. 0=player name
GLOBAL_CHAT_RECEIVER_ONLINE {0} ist online. 0=player name
GLOBAL_CHAT_SENDER_APPEAR_OFFLINE Sie können keine Chatnachrichten senden, während Sie als offline angezeigt werden.
GLOBAL_CHAT_SENDER_OFFLINE Sie sind im Moment offline.
GLOBAL_CHOOSE_PAYMENT Zahlungsmethode wählen
GLOBAL_CLASS_DEATHKNIGHT Todesritter
GLOBAL_CLASS_DEMONHUNTER Dämonenjäger
GLOBAL_CLASS_DRUID Druide
GLOBAL_CLASS_HUNTER Jäger
GLOBAL_CLASS_MAGE Magier
GLOBAL_CLASS_NEUTRAL Neutral
GLOBAL_CLASS_PALADIN Paladin
GLOBAL_CLASS_PRIEST Priester
GLOBAL_CLASS_ROGUE Schurke
GLOBAL_CLASS_SHAMAN Schamane
GLOBAL_CLASS_WARLOCK Hexenmeister
GLOBAL_CLASS_WARRIOR Krieger
GLOBAL_CLICK_TO_CONTINUE Klicken, um fortzufahren
GLOBAL_CLICK_TO_CONTINUE_TOUCH Tippen, um fortzufahren
GLOBAL_COLLECTION_GOLDEN Golden
GLOBAL_COMMA_SEPARATOR ,
GLOBAL_CONCEDE Aufgeben
GLOBAL_CONFIRM Bestätigen
GLOBAL_CONTINUE Weiter
GLOBAL_COST Kosten
GLOBAL_CREATE Herstellen
GLOBAL_CURRENT_DATE {0:dd.MM.yyyy} see http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
GLOBAL_CURRENT_TIME {0:HH:mm "Uhr"} see http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
GLOBAL_CURRENT_TIME_AM AM
GLOBAL_CURRENT_TIME_AND_DATE_DEV {0} ({1}, {2})
GLOBAL_CURRENT_TIME_PM PM
GLOBAL_DATETIME_AFK_DAY Seit mehr als einem Tag AFK
GLOBAL_DATETIME_AFK_DAYS Seit {0} |4(Tag,Tagen) AFK
GLOBAL_DATETIME_AFK_HOURS Seit {0} |4(Stunde,Stunden) AFK
GLOBAL_DATETIME_AFK_MINUTES Seit {0} |4(Minute,Minuten) AFK
GLOBAL_DATETIME_AFK_MONTH Seit mehr als einem Monat AFK
GLOBAL_DATETIME_AFK_SECONDS Seit weniger als einer Minute AFK
GLOBAL_DATETIME_AFK_WEEKS Seit {0} |4(Woche,Wochen) AFK
GLOBAL_DATETIME_COMING_SOON Bald verfügbar
GLOBAL_DATETIME_COMING_SOON_DAYS In {0} |4(Tag,Tagen)\nverfügbar
GLOBAL_DATETIME_COMING_SOON_HOURS In {0} |4(Stunde,Stunden)\nverfügbar
GLOBAL_DATETIME_COMING_SOON_MINUTES In weniger als\neiner Stunde verfügbar
GLOBAL_DATETIME_COMING_SOON_WEEKS In {0} |4(Woche,Wochen)\nverfügbar
GLOBAL_DATETIME_FRIENDREQUEST_DAY gestern
GLOBAL_DATETIME_FRIENDREQUEST_DAYS vor {0} |4(Tag,Tagen)
GLOBAL_DATETIME_FRIENDREQUEST_HOURS vor {0} |4(Stunde,Stunden)
GLOBAL_DATETIME_FRIENDREQUEST_MINUTES vor {0} |4(Minute,Minuten)
GLOBAL_DATETIME_FRIENDREQUEST_MONTH vor mehr als einem Monat
GLOBAL_DATETIME_FRIENDREQUEST_SECONDS vor weniger als einer Minute
GLOBAL_DATETIME_FRIENDREQUEST_WEEKS vor {0} |4(Woche,Wochen)
GLOBAL_DATETIME_GREATER_THAN_X_MINUTES > {0} |4(Minute,Minuten)
GLOBAL_DATETIME_LASTONLINE_DAY Gestern zuletzt online
GLOBAL_DATETIME_LASTONLINE_DAYS Vor {0} |4(Tag,Tagen) zuletzt online
GLOBAL_DATETIME_LASTONLINE_HOURS Vor {0} |4(Stunde,Stunden) zuletzt online
GLOBAL_DATETIME_LASTONLINE_MINUTES Vor {0} |4(Minute,Minuten) zuletzt online
GLOBAL_DATETIME_LASTONLINE_MONTH Vor über einem Monat zuletzt online
GLOBAL_DATETIME_LASTONLINE_SECONDS Vor weniger als einer Minute zuletzt online
GLOBAL_DATETIME_LASTONLINE_WEEKS Vor {0} |4(Woche,Wochen) zuletzt online
GLOBAL_DATETIME_SPINNER_DAY > 1 Tag
GLOBAL_DATETIME_SPINNER_DAYS {0} |4(Tag,Tage)
GLOBAL_DATETIME_SPINNER_HOURS {0} |4(Std.,Std.)
GLOBAL_DATETIME_SPINNER_MINUTES {0} |4(Min.,Min.)
GLOBAL_DATETIME_SPINNER_MONTH > 1 Monat
GLOBAL_DATETIME_SPINNER_SECONDS {0} Sek.
GLOBAL_DATETIME_SPINNER_WEEKS {0} |4(Woche,Wochen)
GLOBAL_DATETIME_SPLASHSCREEN_DAY > 1 Tag
GLOBAL_DATETIME_SPLASHSCREEN_DAYS {0} |4(Tag,Tage)
GLOBAL_DATETIME_SPLASHSCREEN_HOURS {0} |4(Stunde,Stunden)
GLOBAL_DATETIME_SPLASHSCREEN_MINUTES {0} |4(Min.,Min.)
GLOBAL_DATETIME_SPLASHSCREEN_MONTH > 1 Monat
GLOBAL_DATETIME_SPLASHSCREEN_SECONDS < 1 Min.
GLOBAL_DATETIME_SPLASHSCREEN_WEEKS {0} |4(Woche,Wochen)
GLOBAL_DATETIME_UNLOCKS_SOON_WEEKS Wird in {0} |4(Woche,Wochen)\nfreigeschaltet
GLOBAL_DECK_SHARE_ACCEPT_REQUEST Teilen
GLOBAL_DECK_SHARE_DECLINE_REQUEST Lieber nicht
GLOBAL_DECK_SHARE_ERROR Beim Teilen von Decks ist ein Fehler aufgetreten.
GLOBAL_DECK_SHARE_HEADER Decks teilen?
GLOBAL_DECK_SHARE_REQUEST_CANCELED {0} hat die Anfrage zum Teilen von Decks zurückgezogen. 0=friend name
GLOBAL_DECK_SHARE_REQUEST_DECLINED {0} hat Eure Anfrage zum Teilen von Decks abgelehnt. 0=friend name
GLOBAL_DECK_SHARE_REQUEST_WAITING_RESPONSE {0} hat noch nicht auf Eure Anfrage zum Teilen von Decks geantwortet.
GLOBAL_DECK_SHARE_REQUESTED {0} möchte eines Eurer Decks ausleihen. 0=friend name
GLOBAL_DEFAULT_ALERT_HEADER Achtung
GLOBAL_DEMO_COMPLETE_BODY Danke, dass Sie diese Demo von Hearthstone gespielt haben!
GLOBAL_DEMO_COMPLETE_HEADER Glückwunsch!
GLOBAL_DEMO_DISCLAIMER Diese Version von Hearthstone wurde spezifisch zu Demonstrationszwecken erstellt.
GLOBAL_DEMO_LEARN_MORE Mehr erfahren
GLOBAL_DISABLE Deaktivieren
GLOBAL_DONE Fertig
GLOBAL_ENABLE Aktivieren
GLOBAL_END_GAME Spiel beenden
GLOBAL_ENTER Eintreten
GLOBAL_ERROR Fehler
GLOBAL_ERROR_ACCOUNT_LICENSES Beim Abfragen Ihres Accounts ist ein Fehler aufgetreten, wodurch manche Ihrer Besitztümer möglicherweise nicht angezeigt werden. Das tut uns leid! Bei Ihrem nächsten Einloggen werden wir es erneut versuchen.
GLOBAL_ERROR_ASSET_CREATE_PERSISTENT_DATA_PATH In {0} konnte kein Ordner zum Speichern von Daten erstellt werden. 0=folder path
GLOBAL_ERROR_ASSET_DOWNLOAD_FAILED Asset {0} konnte nicht heruntergeladen werden. 0=asset name
GLOBAL_ERROR_ASSET_INCORRECT_DATA Asset {0} beinhaltet fehlerhafte Daten. 0=asset name
GLOBAL_ERROR_ASSET_LOAD_FAILED Asset {0} konnte nicht geladen werden. 0=asset name
GLOBAL_ERROR_ASSET_MANIFEST Assetverzeichnis konnte nicht geladen werden.
GLOBAL_ERROR_ASSET_NO_FILE_PATH Dateipfad für Asset {0} konnte nicht gefunden werden. 0=asset name
GLOBAL_ERROR_CURRENCY_INVALID Der Client hat versucht, eine ungültige Währung für eine Transaktion zu verwenden.
GLOBAL_ERROR_FIND_GAME_SCENARIO_INCORRECT_NUM_PLAYERS Beim Starten des Spiels ist ein Fehler aufgetreten: Das Szenario hat eine unerwartete Anzahl Spieler.
GLOBAL_ERROR_FIND_GAME_SCENARIO_MISCONFIGURED Beim Starten des Spiels ist ein Fehler aufgetreten: Die Szenariodaten sind falsch konfiguriert.
GLOBAL_ERROR_FIND_GAME_SCENARIO_NO_DECK_SPECIFIED Beim Starten des Spiels ist ein Fehler aufgetreten: Ein oder mehrere Spieler haben kein Deck angegeben.
GLOBAL_ERROR_GAME_DENIED Beim Starten des Spiels ist ein Fehler aufgetreten. Bitte warten Sie ein paar Minuten und versuchen Sie es dann erneut.
GLOBAL_ERROR_GAME_OPPONENT_TIMEOUT Die Partie konnte nicht gestartet werden, da die Verbindung des Gegners unterbrochen wurde. Bitte versuchen Sie es erneut.
GLOBAL_ERROR_GENERIC_HEADER Fehler
GLOBAL_ERROR_INACTIVITY_KICK Ihre Verbindung zum Server wurde getrennt, da Sie längere Zeit inaktiv waren. Starten Sie das Spiel erneut, wenn Sie wieder spielen möchten.
GLOBAL_ERROR_NETWORK_ACCOUNT_BANNED Ihr Account wurde gebannt.
GLOBAL_ERROR_NETWORK_ACCOUNT_SUSPENDED Ihr Account wurde suspendiert.
GLOBAL_ERROR_NETWORK_ADMIN_KICKED Sie wurden von den Blizzard-Diensten getrennt. Bitte starten Sie Hearthstone neu, um die Verbindung wiederherzustellen.
GLOBAL_ERROR_NETWORK_ADVENTURE_RECONNECT_TIMEOUT Spiel wurde gespeichert. Starten Sie Hearthstone neu, um an derselben Stelle weiterzuspielen.
GLOBAL_ERROR_NETWORK_CONNECTION_TIMEOUT Ihre Verbindung zum Spiel wurde getrennt. Bitte überprüfen Sie Ihre Internetverbindung.
GLOBAL_ERROR_NETWORK_DISCONNECT Die Verbindung zu den Blizzard-Diensten wurde unterbrochen. Bitte starten Sie Hearthstone neu, um die Verbindung wiederherzustellen.
GLOBAL_ERROR_NETWORK_DISCONNECT_GAME_SERVER Ihre Verbindung zum Hearthstone-Spieldienst wurde getrennt.
GLOBAL_ERROR_NETWORK_DISCONNECT_GENERIC Ihre Verbindung wurde unterbrochen.
GLOBAL_ERROR_NETWORK_DUPLICATE_LOGIN Jemand hat sich von einem anderen Gerät aus mit diesem Blizzard-Account in Hearthstone eingeloggt.\n\nDie Verbindung mit diesem Client wurde unterbrochen, weil jeweils nur eine Verbindung unterstützt wird.
GLOBAL_ERROR_NETWORK_GENERIC Es ist ein interner Netzwerkfehler aufgetreten.
GLOBAL_ERROR_NETWORK_INCORRECT_REGION Ihr Blizzard-Account kann derzeit nicht am Hearthstone-Betatest dieser Region teilnehmen. Versuchen Sie es erneut, sobald der Hearthstone-Betatest in Ihrer Heimatregion verfügbar ist.
GLOBAL_ERROR_NETWORK_LOGIN_FAILURE Anmeldung bei den Blizzard-Diensten nicht möglich. Bitte warten Sie ein paar Minuten und versuchen Sie es erneut.
GLOBAL_ERROR_NETWORK_LOST_GAME_CONNECTION Die Verbindung zum Blizzard-Spieldienst wurde unterbrochen. Sie können versuchen, die Verbindung wiederherzustellen, indem Sie ein weiteres Spiel starten.
GLOBAL_ERROR_NETWORK_NO_CONNECTION Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Internetverbindung.
GLOBAL_ERROR_NETWORK_NO_GAME_SERVER Wir konnten für Sie leider kein Spiel starten. Bitte versuchen Sie es erneut.
GLOBAL_ERROR_NETWORK_PARENTAL_CONTROLS Der Zugriff auf diesen Account ist momentan durch die Elterliche Freigabe eingeschränkt.
GLOBAL_ERROR_NETWORK_PHONE_LOCK Bitte rufen Sie die Nummer Ihrer Blizzard-Mobiltelefonsperre an, um das Einloggen zu erlauben.
GLOBAL_ERROR_NETWORK_RISK_ACCOUNT_LOCKED Ihr Account wurde gesperrt! Rufen Sie die Webseite https://eu.battle.net/support/de/ auf und suchen Sie nach 7537, um herauszufinden, was passiert ist.
GLOBAL_ERROR_NETWORK_SPAM Die Verbindung zum Blizzard-Dienst wurde aufgrund zu vieler Anfragen in zu kurzer Zeit unterbrochen. Bitte starten Sie Hearthstone neu, um die Verbindung wiederherzustellen.
GLOBAL_ERROR_NETWORK_TITLE NETZWERKFEHLER
GLOBAL_ERROR_NETWORK_UNAVAILABLE_NEW_VERSION Ihr Account verwendet eine neuere Version des Spiels. Bitte warten Sie, bis das Update abgeschlossen ist, bevor Sie auf diesem Gerät spielen.
GLOBAL_ERROR_NETWORK_UNAVAILABLE_OFFLINE Hearthstone ist gerade offline. Bitte warten Sie ein paar Minuten und versuchen Sie es dann erneut.
GLOBAL_ERROR_NETWORK_UNAVAILABLE_UNKNOWN Ups! Neckische Waldgeister haben Hearthstone durcheinandergebracht, während es versucht hat, sich mit unseren Servern zu verbinden. Bitte warten Sie ein paar Minuten und versuchen Sie es dann erneut.
GLOBAL_ERROR_NETWORK_UNAVAILABLE_UPGRADE Ein Update ist verfügbar! Bitte laden Sie die neueste Version von Hearthstone herunter.
GLOBAL_ERROR_NETWORK_UTIL_TIMEOUT Ihre Verbindung zum Spiel wurde getrennt, während es versucht hat, Daten vom Hearthstone-Hilfsdienst abzufragen. Bitte starten Sie Hearthstone neu, um die Verbindung wiederherzustellen.
GLOBAL_ERROR_NO_MAGE_PRECON Beim Laden Ihrer Kartensammlung ist ein Netzwerkfehler aufgetreten. Bitte starten Sie Hearthstone neu, um auf Ihre Sammlung zuzugreifen und weiterzuspielen.
GLOBAL_ERROR_STREAMING_ASSET_TIMEOUT Es ist eine Zeitüberschreitung beim Warten auf das Streaming-System aufgetreten (Asset {0}). 0=asset name
GLOBAL_ERROR_UNKNOWN_ERROR Ups! Neckische Waldgeister haben Hearthstone durcheinandergebracht, während es versucht hat, sich mit dem Blizzard-Dienst zu verbinden. Bitte warten Sie ein paar Minuten und versuchen Sie dann, das Spiel erneut zu starten.
GLOBAL_EXIT Verlassen
GLOBAL_FEATURE_DISABLED_MESSAGE_BATTLEGROUNDS Leider ist das Schlachtfeld derzeit nicht verfügbar.
GLOBAL_FEATURE_DISABLED_MESSAGE_COLLECTION Leider ist die Sammlung derzeit nicht verfügbar.
GLOBAL_FEATURE_DISABLED_MESSAGE_FORGE Leider ist die Arena derzeit nicht verfügbar.
GLOBAL_FEATURE_DISABLED_MESSAGE_PLAY Leider ist der Modus „Spielen“ derzeit nicht verfügbar.
GLOBAL_FEATURE_DISABLED_MESSAGE_PRACTICE Leider ist der Modus „Üben“ derzeit nicht verfügbar.
GLOBAL_FEATURE_DISABLED_TITLE Nicht verfügbar
GLOBAL_FINISH Beenden
GLOBAL_FIRESIDE_BRAWL Fireside-Chaos
GLOBAL_FIRESIDE_GATHERING Fireside Gathering
GLOBAL_FIRESIDE_GATHERING_CHOOSE_HEADER Option wählen
GLOBAL_FIRESIDE_GATHERING_DEFAULT_TAVERN_NAME Fireside Gathering
GLOBAL_FIRESIDE_GATHERING_FIRST_TIME_TAVERN_NAME Gasthaus von {0} 0=innkeeper battle tag
GLOBAL_FIRESIDE_GATHERING_PATRON_LIST_FOOTER_TEXT_LARGE_SCALE Über {0} Spieler bei diesem Fireside Gathering This is shown on the Friends List button whenever player is checked into a large scale Fireside Gathering (one that doesn't show the full patron list). the design decision was to show 99+ regardless of how many people are actually checked in.
GLOBAL_FIRESIDE_GATHERING_PATRON_LIST_FOOTER_TEXT_SOFT_LIMIT {0} Spieler bei diesem Fireside Gathering 0=The number of patrons up to 99.
GLOBAL_FIRESIDE_GATHERING_REUNPACK Einrichtung ändern
GLOBAL_FIRESIDE_GATHERING_SOCIAL_BUTTON_LARGE_SCALE_LABEL <size=32>99<size=26>+</size></size> This is shown on the Friends List button whenever player is checked into a large scale Fireside Gathering (one that doesn't show the full patron list). the design decision was to show 99+ regardless of how many people are actually checked in. NOTE: the size tag was used in enUS to shrink the + sign, to make sure 99+ fit into the small button.
GLOBAL_FORGE_END_DONE Fertig
GLOBAL_FORGE_END_JOKE_0 Da war ordentlich Feuer drin!
GLOBAL_FORGE_END_JOKE_1 Mir fehlen die Worte!
GLOBAL_FORGE_END_JOKE_2 Ich kann es kaum fassen!
GLOBAL_FORGE_END_JOKE_3 Ihr habt etwas Besonderes an Euch.
GLOBAL_FORGE_END_JOKE_4 Ob Ihr das noch toppen könnt?
GLOBAL_FORGE_END_JOKE_5 Da kommt bei mir der Tanzbär durch!
GLOBAL_FORGE_END_JOKE_6 Dieser eine Zug war einfach genial!
GLOBAL_FORGE_END_JOKE_7 SEHT HER!
GLOBAL_FORGE_END_JOKE_8 Es ist noch nicht vorbei! Oh ... ist es doch.
GLOBAL_FORGE_END_TITLE Arena abgeschlossen
GLOBAL_FRIEND_CHALLENGE_ACCEPT Annehmen
GLOBAL_FRIEND_CHALLENGE_BODY_BACON Ihr wurdet in eine Schlachtfeldgruppe\neingeladen von:
GLOBAL_FRIEND_CHALLENGE_BODY1 Ihr wurdet herausgefordert von:
GLOBAL_FRIEND_CHALLENGE_BODY1_STANDARD Ihr wurdet zu einem Standardspiel herausgefordert von:
GLOBAL_FRIEND_CHALLENGE_BODY1_WILD Ihr wurdet zu einem wilden Spiel herausgefordert von:
GLOBAL_FRIEND_CHALLENGE_BODY2 Nehmt Ihr an?
GLOBAL_FRIEND_CHALLENGE_DECLINE Ablehnen
GLOBAL_FRIEND_CHALLENGE_FIRESIDE_BRAWL_BODY1 Ihr wurdet zum Fireside-Chaos herausgefordert von:
GLOBAL_FRIEND_CHALLENGE_HEADER Herausforderung
GLOBAL_FRIEND_CHALLENGE_NEARBY_PLAYER_NOTE Sie können Einladungen von Spielern in der Nähe in der Freundesliste blockieren.
GLOBAL_FRIEND_CHALLENGE_OPPONENT_CANCELED {0} hat die Herausforderung abgebrochen. 0=friend name
GLOBAL_FRIEND_CHALLENGE_OPPONENT_DECLINED {0} hat Eure Herausforderung abgelehnt. 0=friend name
GLOBAL_FRIEND_CHALLENGE_OPPONENT_FRIEND_REMOVED Die Herausforderung wurde abgebrochen, da {0} nicht mehr Euer Freund ist. 0=friend name
GLOBAL_FRIEND_CHALLENGE_OPPONENT_WAITING_DECK Es wird darauf gewartet, dass {0} ein Deck auswählt. 0=friend name
GLOBAL_FRIEND_CHALLENGE_OPPONENT_WAITING_RESPONSE Es wird darauf gewartet, dass {0} die Herausforderung annimmt. 0=friend name
GLOBAL_FRIEND_CHALLENGE_QUEUE_CANCELED Die Herausforderung wurde abgebrochen.
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_BODY1 Ihr wurdet zum Kartenchaos herausgefordert von:
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_HEADER Herausforderung zum Kartenchaos
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_OPPONENT_WAITING_READY Es wird darauf gewartet, dass {0} sich ins Kartenchaos stürzt. 0=friend name
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NO_VALID_DECK_RECIPIENT {0} möchte Euch zum Kartenchaos herausfordern! Erstellt ein Kartenchaos-Deck, um die Herausforderung annehmen zu können.
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NO_VALID_DECK_SENDER Dieser Freund hat noch kein Kartenchaos-Deck. Fordert ihn erneut heraus, wenn er eines erstellt hat!
GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NOT_UNLOCKED_SENDER Dieser Freund hat den Modus „Kartenchaos“ noch nicht freigeschaltet. Fordert ihn erneut heraus, sobald er so weit ist!
GLOBAL_FRIEND_CHALLENGE_TITLE Spiel mit einem Freund
GLOBAL_FRIENDLIST_ADD_FRIEND_BUTTON Hinzufügen
GLOBAL_FRIENDLIST_BATTLEGROUNDS_TOOLTIP_INVITE_BODY Ladet {0} in Eure Schlachtfeldgruppe ein. 0=player name
GLOBAL_FRIENDLIST_BATTLEGROUNDS_TOOLTIP_INVITE_HEADER Einladen
GLOBAL_FRIENDLIST_BATTLEGROUNDS_TOOLTIP_KICK_BODY Entfernt {0} aus Eurer Schlachtfeldgruppe. 0=player name
GLOBAL_FRIENDLIST_BATTLEGROUNDS_TOOLTIP_KICK_HEADER Entfernen
GLOBAL_FRIENDLIST_BUSYSTATUS DND
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_AVAILABLE Fordert {0} zu einer Partie Hearthstone heraus. 0=player name
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_BATTLEGROUNDS_PARTY_MEMBER Ihr könnt keine Spieler herausfordern, während Ihr Euch in einer Schlachtfeldgruppe befindet.
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_EARLY_ACCESS Dieser Modus ist erst im Vorabzugang verfügbar.
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_HEADER Herausfordern
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_IM_APPEARING_OFFLINE Ihr könnt {0} im Moment nicht herausfordern. Ihr werdet als offline angezeigt. 0=player name
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_IM_UNAVAILABLE Ihr könnt {0} im Moment nicht herausfordern. Bitte kehrt ins Hauptmenü zurück. 0=player name
GLOBAL_FRIENDLIST_CHALLENGE_BUTTON_THEYRE_UNAVAILABLE Ihr könnt {0} im Moment nicht herausfordern. Wartet bitte, bis dieser Spieler sich wieder im Hauptmenü befindet. 0=player name
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_NO_BATTLEGROUNDS_EARLY_ACCESS Dieser Spieler hat keinen Vorabzugang zum Schlachtfeld-Modus.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_NO_DECK Dieser Spieler hat keine Decks.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_NO_STANDARD_DECK Dieser Spieler hat keine Standarddecks.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_NO_TAVERN_BRAWL_DECK Dieser Spieler hat noch kein Deck für das Kartenchaos erstellt.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_NOT_SEEN_WILD Dieser Spieler hat den wilden Modus noch nicht freigeschaltet.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_TAVERN_BRAWL_LOCKED Dieser Spieler hat den Modus „Kartenchaos“ noch nicht freigeschaltet.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGEE_USER_IS_BUSY Dieser Spieler ist zurzeit beschäftigt.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGER_NO_DECK Ihr müsst erst ein Deck erstellen.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGER_NO_STANDARD_DECK Ihr habt keine Standarddecks.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGER_NO_TAVERN_BRAWL_DECK Ihr müsst für das dieswöchige Kartenchaos ein Deck erstellen.
GLOBAL_FRIENDLIST_CHALLENGE_CHALLENGER_TAVERN_BRAWL_LOCKED Erreicht mit einer Klasse Stufe 20, um den Modus „Kartenchaos“ freizuschalten.
GLOBAL_FRIENDLIST_CHALLENGE_MENU_DUEL_BUTTON Duell
GLOBAL_FRIENDLIST_CHALLENGE_MENU_STANDARD_DUEL_BUTTON Standardduell
GLOBAL_FRIENDLIST_CHALLENGE_MENU_WILD_DUEL_BUTTON Wildes Duell
GLOBAL_FRIENDLIST_CHALLENGE_TOOLTIP_NO_TAVERN_BRAWL Zurzeit ist kein Kartenchaos verfügbar. Versucht es später wieder!
GLOBAL_FRIENDLIST_CHALLENGE_TOOLTIP_TAVERN_BRAWL_NOT_CHALLENGEABLE Freunde können in diesem Kartenchaos nicht herausgefordert werden.
GLOBAL_FRIENDLIST_CURRENT_GAMES_HEADER AKTUELLE SPIELE – {0} 0=number of friends you have unfinished games with
GLOBAL_FRIENDLIST_FRIENDS_HEADER FREUNDE – {0}/{1} online 0=number of online friends 1=number of offline friends
GLOBAL_FRIENDLIST_FRIENDS_HEADER_ALL_ONLINE FREUNDE – {0} online
GLOBAL_FRIENDLIST_LASTPLAYED Letzter Gegner:
GLOBAL_FRIENDLIST_MYSTATUS ONLINE
GLOBAL_FRIENDLIST_NEARBY_PLAYERS_DISABLED_HEADER SPIELER IN DER NÄHE (deaktiviert)
GLOBAL_FRIENDLIST_NEARBY_PLAYERS_HEADER SPIELER IN DER NÄHE – {0} 0=number of players
GLOBAL_FRIENDLIST_REMOVE_FRIEND_ALERT_MESSAGE Seid Ihr Euch sicher, dass Ihr {0} entfernen wollt? 0=friend name
GLOBAL_FRIENDLIST_REMOVE_FRIEND_BUTTON Entfernen
GLOBAL_FRIENDLIST_REQUEST_SENT_TIME Gesendet: {0} 0=one of the GLOBAL_DATETIME_ELAPSED_ strings
GLOBAL_FRIENDLIST_REQUESTS_HEADER FREUNDSCHAFTSANFRAGEN – {0} 0=number of received friend requests
GLOBAL_FRIENDLIST_SPECTATE_MENU_DESCRIPTION {0} ist in einem Spiel. 0=player name
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_AVAILABLE_HEADER Diesem Spiel zuschauen
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_AVAILABLE_TEXT Klickt hier, um der Partie dieses Spielers zuzuschauen.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_AVAILABLE_TEXT_TOUCH Tippt hier, um der Partie dieses Spielers zuzuschauen.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITE_HEADER Als Zuschauer einladen
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITE_OTHER_SIDE_HEADER Schaut dem Gegner zu
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITE_OTHER_SIDE_TEXT Klickt, um {0} auch Eure Hand zu zeigen. 0=player name
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITE_OTHER_SIDE_TEXT_TOUCH Tippt, um {0} auch Eure Hand zu zeigen. 0=player name
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITE_TEXT Ladet {0} ein, Euch zuzuschauen. 0=player name
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITED_HEADER Zuschauer eingeladen
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_INVITED_TEXT Ihr habt {0} eingeladen, Euch zuzuschauen. 0=player name
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_KICK_HEADER Entfernen
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_KICK_TEXT {0} schaut Euch zu. Klickt hier, um diesen Zuschauer zu entfernen.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_KICK_TEXT_TOUCH {0} schaut Euch zu. Tippt hier, um diesen Zuschauer zu entfernen.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_PREVIOUSLY_KICKED_HEADER Zuschauen gesperrt
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_PREVIOUSLY_KICKED_TEXT Dieser Spieler hat Euch schon einmal als Zuschauer entfernt. Ihr könnt ihm nicht wieder zuschauen.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_RECEIVED_INVITE_TEXT {0} hat Euch als Zuschauer eingeladen. Klickt hier, um in den Zuschauermodus zu wechseln.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_RECEIVED_INVITE_TEXT_TOUCH {0} hat Euch als Zuschauer eingeladen. Tippt hier, um in den Zuschauermodus zu wechseln.
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_SPECTATING_HEADER Im Zuschauermodus
GLOBAL_FRIENDLIST_SPECTATE_TOOLTIP_SPECTATING_TEXT Ihr schaut diesem Spieler momentan zu.
GLOBAL_FRIENDLYCHALLENGE_QUEST_REWARD_AT_LIMIT Ihr habt das tägliche Limit für Questbelohnungen von Freundesherausforderungen erreicht.
GLOBAL_FRIENDLYCHALLENGE_REWARD_CONCEDED_YOUR_OPPONENT Ihr könnt keine Belohnungen erhalten, weil Euer Gegner das Spiel zu früh verlassen hat.
GLOBAL_FRIENDLYCHALLENGE_REWARD_CONCEDED_YOURSELF Ihr könnt keine Belohnungen erhalten, weil Ihr das Spiel zu früh verlassen habt.
GLOBAL_GAME_MENU Spielmenü
GLOBAL_GAME_QUEUE_TIME_IN_QUEUE Zeit in Warteschlange
GLOBAL_GAME_QUEUE_WAIT_TIME Wartezeit
GLOBAL_GOLD_REWARD_ALREADY_CAPPED Ihr habt heute bereits {0} Gold erhalten.
GLOBAL_GOLD_REWARD_BAD_RATING Ihr oder Euer Gegner erfüllt nicht die Wertungsanforderungen für eine Goldbelohnung.
GLOBAL_GOLD_REWARD_OVER_CAIS Aufgrund des Vorsorgeprogramms gegen exzessives Spielen (CAIS) können Sie kein Gold mehr erhalten.
GLOBAL_GOLD_REWARD_SHORT_GAME_BY_TIME Euer Spiel hat die Zeitanforderung für eine Goldbelohnung nicht erfüllt.
GLOBAL_HEALTH Leben
GLOBAL_HEALTHY_GAMING_CHINA_CAIS_ACTIVE Vorsorgeprogramm gegen exzessives Spielen aktiv
GLOBAL_HEALTHY_GAMING_CHINA_LESS_THAN_THREE_HOURS 您累计在线时间已满{0}小时。
GLOBAL_HEALTHY_GAMING_CHINA_MORE_THAN_FIVE_HOURS 您已进入不健康游戏时间,为了您的健康,请您立即下线休息。如不下线,您的身体将受到损害,您的收益已降为零,直到您的累计下线时间满5小时后,才能恢复正常。
GLOBAL_HEALTHY_GAMING_CHINA_MORE_THAN_FIVE_HOURS_PHONE 您已进入不健康游戏时间,为了您的健康,请您立即下线休息。如不下线,您的身体将受到损害,\n您的收益已降为零,直到您的累计下线时间满5小时后,才能恢复正常。
GLOBAL_HEALTHY_GAMING_CHINA_STARTUP_MESSAGE 抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防上当受骗。\n适度游戏益脑,沉迷游戏伤身。\n合理安排时间,享受健康生活。
GLOBAL_HEALTHY_GAMING_CHINA_STARTUP_SUBTEXT ISBN:978-7-900262-36-3 版署批号:新出审字[2013]1510号 沪网文[2017]9633-727号 文网进字[2013]029号 著作权:暴雪娱乐有限公司 出版单位:金报电子音像出版中心
GLOBAL_HEALTHY_GAMING_CHINA_THREE_HOURS 您累计在线时间已满{0}小时,请您下线休息,做适当身体活动。
GLOBAL_HEALTHY_GAMING_CHINA_THREE_TO_FIVE_HOURS 您已经进入疲劳游戏时间,您的游戏收益将降为正常值的0%,为了您的健康,请尽快下线休息,做适当身体活动,合理安排学习生活。
GLOBAL_HEALTHY_GAMING_CHINA_THREE_TO_FIVE_HOURS_PHONE 您已经进入疲劳游戏时间,您的游戏收益将降为正常值的0%,为了您的健康,\n请尽快下线休息,做适当身体活动,合理安排学习生活。
GLOBAL_HEALTHY_GAMING_KOREA_STARTUP_MESSAGE 본 게임물은 만 12세 이용가 게임으로서 해당 연령 미만의 청소년이 이용하기에 부적절합니다. 반드시 보호자의 지도 감독이 필요합니다.
GLOBAL_HEALTHY_GAMING_TOAST 게임을 플레이한지 {0}시간 지났습니다. 과도한 게임이용은 정상적인 일상생활에 지장을 줄 수 있습니다
GLOBAL_HEALTHY_GAMING_TOAST_OVER_THRESHOLD Die aktuelle Spielzeit beträgt {0} |4(Stunde,Stunden). Das ist VIEL zu lang. 0=hours
GLOBAL_HELP Hilfe
GLOBAL_HERO_LEVEL_NEXT_REWARD_TITLE Belohnung für Stufe {0} 0=level
GLOBAL_HERO_LEVEL_REWARD_ARCANE_DUST {0} Arkanstaub 0=amount
GLOBAL_HERO_LEVEL_REWARD_BOOSTER {0}-Erweiterungspackung 0=booster type
GLOBAL_HERO_LEVEL_REWARD_GOLD {0} Gold 0=amount
GLOBAL_HERO_LEVEL_REWARD_GOLDEN_CARD {1} ({0}) 0=flair 1=card name
GLOBAL_HERO_WINS Siege: {0}/{1} 0=number of games this class has won 1=number of wins to get golden
GLOBAL_HERO_WINS_PAST_MAX Siege: {0} 0=number of games this class has won
GLOBAL_HERO_WINS_PAST_MAX_PHONE Siege\n{0} 0=number of games this class has won
GLOBAL_HERO_WINS_PHONE Siege\n{0}/{1} 0=number of games this class has won 1=number of wins to get golden
GLOBAL_HEROIC_BRAWL Heroisches Kartenchaos
GLOBAL_HIDE Ausblenden
GLOBAL_IN_PROGRESS_REWARD_CHEST_INSTRUCTIONS Gewinnt {0} |4(weiteres Spiel,weitere Spiele), um Eure Saisontruhe zu erhalten!\n(Kann nächsten Monat geöffnet werden.)
GLOBAL_JOIN Beitreten
GLOBAL_KEYWORD_ADAPT Mutieren
GLOBAL_KEYWORD_ADAPT_TEXT Wählt einen von drei Boni.
GLOBAL_KEYWORD_AUTOATTACK Automatischer Angriff
GLOBAL_KEYWORD_AUTOATTACK_TEXT Kann nicht angreifen. Am Ende Eures Zuges tritt ein Effekt in Kraft.
GLOBAL_KEYWORD_AUTOCAST Automatischer Einsatz
GLOBAL_KEYWORD_AUTOCAST_TEXT Diese Heldenfähigkeit muss in jedem Zug eingesetzt werden.
GLOBAL_KEYWORD_BATTLECRY Kampfschrei
GLOBAL_KEYWORD_BATTLECRY_TEXT Ein Effekt tritt in Kraft, wenn die Karte ausgespielt wird.
GLOBAL_KEYWORD_BOSS Boss
GLOBAL_KEYWORD_BOSS_TEXT Die Spieler kämpfen zusammen gegen den Boss.
GLOBAL_KEYWORD_CASTS_WHEN_DRAWN Beim Ziehen gewirkt
GLOBAL_KEYWORD_CASTS_WHEN_DRAWN_TEXT Wird beim Ziehen sofort gewirkt. Zieht danach eine weitere Karte.
GLOBAL_KEYWORD_CHARGE Ansturm
GLOBAL_KEYWORD_CHARGE_TEXT Sofort angriffsbereit.
GLOBAL_KEYWORD_COMBO Combo
GLOBAL_KEYWORD_COMBO_TEXT Ein Bonus, wenn in diesem Zug bereits eine Karte ausgespielt wurde.
GLOBAL_KEYWORD_COUNTER Konter
GLOBAL_KEYWORD_COUNTER_TEXT Eine Karte, die gekontert wird, hat keinen Effekt.
GLOBAL_KEYWORD_CTHUN C’Thun, Alter Gott
GLOBAL_KEYWORD_CTHUN_TEXT C’Thun kann immer verstärkt werden, sogar wenn er in Eurem Deck ist!
GLOBAL_KEYWORD_DEATHRATTLE Todesröcheln
GLOBAL_KEYWORD_DEATHRATTLE_TEXT Ein Effekt tritt in Kraft, wenn die Karte zerstört wird.
GLOBAL_KEYWORD_DISCOVER Entdecken
GLOBAL_KEYWORD_DISCOVER_TEXT Wählt eine von drei Karten und erhaltet sie auf die Hand.
GLOBAL_KEYWORD_DIVINE_SHIELD Gottesschild
GLOBAL_KEYWORD_DIVINE_SHIELD_REF_TEXT Der erste Schaden, den ein Diener mit Gottes[d]schild erleidet, wird ignoriert.
GLOBAL_KEYWORD_DIVINE_SHIELD_TEXT Ignoriert den ersten erlittenen Schaden.
GLOBAL_KEYWORD_DORMANT Inaktiv
GLOBAL_KEYWORD_DORMANT_TEXT Für beide Spieler unberührbar.
GLOBAL_KEYWORD_ECHO Echo
GLOBAL_KEYWORD_ECHO_TEXT Diese Karte kann in dem Zug, in dem Ihr sie ausspielt, mehrmals ausgespielt werden. Kopien können nicht weniger als (1) kosten.
GLOBAL_KEYWORD_EMPOWER Ermächtigen
GLOBAL_KEYWORD_EMPOWER_PRIEST Ermächtigen: Priester
GLOBAL_KEYWORD_EMPOWER_PRIEST_TEXT Setzt Galakronds Macht ein. <i>(Erhaltet einen zufälligen Priesterdiener auf die Hand.)</i>
GLOBAL_KEYWORD_EMPOWER_ROGUE Ermächtigen: Schurke
GLOBAL_KEYWORD_EMPOWER_ROGUE_COLLECTION_TEXT Setzt Galakronds Macht ein. <i>(Erhaltet einen Lakaien auf die Hand.)</i>
GLOBAL_KEYWORD_EMPOWER_ROGUE_TEXT Setzt Galakronds Macht ein. <i>(Erhaltet einen <b>Lakaien</b> auf die Hand.)</i>
GLOBAL_KEYWORD_EMPOWER_SHAMAN Ermächtigen: Schamane
GLOBAL_KEYWORD_EMPOWER_SHAMAN_COLLECTION_TEXT Setzt Galakronds Macht ein. <i>(Ruft einen Elementar (2/1) mit Eifer herbei.)</i>
GLOBAL_KEYWORD_EMPOWER_SHAMAN_TEXT Setzt Galakronds Macht ein. <i>(Ruft einen Elementar (2/1) mit <b>Eifer</b> herbei.)</i>
GLOBAL_KEYWORD_EMPOWER_TEXT Setzt Galakronds Macht ein.
GLOBAL_KEYWORD_EMPOWER_WARLOCK Ermächtigen: Hexenmeister
GLOBAL_KEYWORD_EMPOWER_WARLOCK_TEXT Setzt Galakronds Macht ein. <i>(Ruft 2 Wichtel (1/1) herbei.)</i>
GLOBAL_KEYWORD_EMPOWER_WARRIOR Ermächtigen: Krieger
GLOBAL_KEYWORD_EMPOWER_WARRIOR_TEXT Setzt Galakronds Macht ein. <i>(Verleiht Eurem Helden +3 Angriff in diesem Zug.)</i>
GLOBAL_KEYWORD_ENRAGED Wutanfall
GLOBAL_KEYWORD_ENRAGED_TEXT Wenn er verletzt ist, hat dieser Diener eine zusätzliche Fähigkeit.
GLOBAL_KEYWORD_EVILZUG Lakai
GLOBAL_KEYWORD_EVILZUG_TEXT Diener mit Kampfschrei, der 1 Mana kostet.
GLOBAL_KEYWORD_FATIGUE Erschöpfung
GLOBAL_KEYWORD_FATIGUE_TEXT Schaden, der beim Ziehen aus einem leeren Deck erlitten wird.
GLOBAL_KEYWORD_FLOOPY Flubbidinius Flurp
GLOBAL_KEYWORD_FLOOPY_TEXT Verwandelt sich, wenn Ihr einen Diener ausspielt.
GLOBAL_KEYWORD_FREEZE Einfrieren
GLOBAL_KEYWORD_FREEZE_TEXT Eingefrorene Charaktere verpassen ihren nächsten Angriff.
GLOBAL_KEYWORD_FROZEN Eingefroren
GLOBAL_KEYWORD_FROZEN_TEXT Verpasst den nächsten Angriff.
GLOBAL_KEYWORD_GALAKROND Galakrond
GLOBAL_KEYWORD_GALAKROND_COLLECTION_TEXT Kann in Priester-, Schurken-, Schamanen-, Hexenmeister- und Kriegerdecks verwendet werden.
GLOBAL_KEYWORD_GRIMY_GOONS Gassenhauer-Gang
GLOBAL_KEYWORD_GRIMY_GOONS_COLLECTION_TEXT Kann in Jäger-, Paladin- und Kriegerdecks verwendet werden.
GLOBAL_KEYWORD_HALL_OF_FAME Zeitlose Klassiker
GLOBAL_KEYWORD_HALL_OF_FAME_TEXT Spezielles Set mit Karten, die im Standardformat nicht mehr erlaubt sind.
GLOBAL_KEYWORD_IMMUNE Immun
GLOBAL_KEYWORD_IMMUNE_REF_TEXT Charaktere, die immun sind, können nicht verletzt werden.
GLOBAL_KEYWORD_IMMUNE_TEXT Kann nicht verletzt werden.
GLOBAL_KEYWORD_INSPIRE Inspiration
GLOBAL_KEYWORD_INSPIRE_TEXT Löst nach dem Einsatz Eurer Heldenfähigkeit einen Effekt aus.
GLOBAL_KEYWORD_JADE_GOLEM Jadegolem
GLOBAL_KEYWORD_JADE_GOLEM_COLLECTION_TEXT Euer erster Jadegolem hat die Werte 1/1. Jeder weitere hat +1/+1.
GLOBAL_KEYWORD_JADE_GOLEM_TEXT Jeder Jadegolem ist um +1/+1 größer als der vorherige.
GLOBAL_KEYWORD_JADE_LOTUS Jadelotus
GLOBAL_KEYWORD_JADE_LOTUS_COLLECTION_TEXT Kann in Schamanen-, Druiden- und Schurken[d]decks verwendet werden.
GLOBAL_KEYWORD_KABAL Kabale
GLOBAL_KEYWORD_KABAL_COLLECTION_TEXT Kann in Priester-, Magier- und Hexenmeister[d]decks verwendet werden.
GLOBAL_KEYWORD_LIFESTEAL Lebensentzug
GLOBAL_KEYWORD_LIFESTEAL_TEXT Verursachter Schaden heilt Euren Helden.
GLOBAL_KEYWORD_MEGAWINDFURY Super-Windzorn
GLOBAL_KEYWORD_MEGAWINDFURY_TEXT Kann viermal pro Zug angreifen.
GLOBAL_KEYWORD_MINION_TYPE_REFERENCE Dienertyp
GLOBAL_KEYWORD_MINION_TYPE_REFERENCE_TEXT Wildtier, Dämon, Drache, Mech, Murloc, Pirat oder Totem.
GLOBAL_KEYWORD_MODULAR Magnetisch
GLOBAL_KEYWORD_MODULAR_TEXT Spielt diesen Diener zur Linken eines Mechs aus, damit sie verschmelzen!
GLOBAL_KEYWORD_OFFHAND Nebenhand
GLOBAL_KEYWORD_OFFHAND_TEXT Unzerstörbar. Kann nicht verzaubert werden.
GLOBAL_KEYWORD_OUTCAST Außenseiter
GLOBAL_KEYWORD_OUTCAST_TEXT Ein Bonus, wenn sich die Karte beim Ausspielen ganz links oder rechts auf der Hand befindet.
GLOBAL_KEYWORD_OVERKILL Überwältigen
GLOBAL_KEYWORD_OVERKILL_TEXT Ein Bonus, wenn dieser Charakter in Eurem Zug überschüssigen Schaden verursacht.
GLOBAL_KEYWORD_OVERLOAD Überladung: X
GLOBAL_KEYWORD_OVERLOAD_REF_TEXT Karten mit Überladung verringern Euer Mana im nächsten Zug.
GLOBAL_KEYWORD_OVERLOAD_TEXT Im nächsten Zug habt Ihr X weniger Mana.
GLOBAL_KEYWORD_PASSIVE Passiv
GLOBAL_KEYWORD_PASSIVE_TEXT Ein permanenter Effekt für den aktuellen Beutezug.
GLOBAL_KEYWORD_POISONOUS Giftig
GLOBAL_KEYWORD_POISONOUS_TEXT Vernichtet jeden Diener, der davon verletzt wird.
GLOBAL_KEYWORD_QUEST Quest
GLOBAL_KEYWORD_QUEST_TEXT Startet auf Eurer Hand. Gewährt eine Belohnung, wenn Ihr sie abschließt.
GLOBAL_KEYWORD_REBORN Wiederkehr
GLOBAL_KEYWORD_REBORN_TEXT Wird nach dem ersten Tod mit 1 Leben wieder[d]belebt.
GLOBAL_KEYWORD_RECRUIT Rekrutieren
GLOBAL_KEYWORD_RECRUIT_TEXT Ruft einen Diener aus Eurem Deck herbei.
GLOBAL_KEYWORD_RUSH Eifer
GLOBAL_KEYWORD_RUSH_TEXT Kann sofort Diener angreifen.
GLOBAL_KEYWORD_SECRET Geheimnis
GLOBAL_KEYWORD_SECRET_TEXT Bleibt verdeckt, bis im\ngegnerischen Zug eine\nspezifische Aktion eintritt.
GLOBAL_KEYWORD_SHIFTING_MINION_TEXT Verwandelt sich zu Beginn Eures Zuges in einen neuen Diener.
GLOBAL_KEYWORD_SHIFTING_SPELL_TEXT Verwandelt sich zu Beginn Eures Zuges in einen neuen Zauber.
GLOBAL_KEYWORD_SHIFTING_TEXT Verwandelt sich zu Beginn Eures Zuges in eine neue Karte.
GLOBAL_KEYWORD_SHIFTING_WEAPON_TEXT Verwandelt sich zu Beginn Eures Zuges in eine neue Waffe.
GLOBAL_KEYWORD_SHRINE Schrein
GLOBAL_KEYWORD_SHRINE_TEXT Wird 3 Züge nach dem Tod wiederbelebt.
GLOBAL_KEYWORD_SIDEQUEST Nebenquest
GLOBAL_KEYWORD_SIDEQUEST_TEXT Gewährt eine Belohnung, wenn Ihr sie abschließt.
GLOBAL_KEYWORD_SILENCE Zum Schweigen bringen
GLOBAL_KEYWORD_SILENCE_TEXT Entfernt alle Kartentexte und Verzauberungen.
GLOBAL_KEYWORD_SPAREPART Ersatzteil
GLOBAL_KEYWORD_SPAREPART_TEXT Zauber für 1 Mana mit schwachem Effekt.
GLOBAL_KEYWORD_SPELLBURST Zauberschub
GLOBAL_KEYWORD_SPELLBURST_TEXT Ein einmaliger Effekt, nachdem Ihr einen Zauber gewirkt habt.
GLOBAL_KEYWORD_SPELLPOWER Zauberschaden
GLOBAL_KEYWORD_SPELLPOWER_REF_TEXT Eure Zauber verursachen mehr Schaden.
GLOBAL_KEYWORD_SPELLPOWER_TEXT Eure Zauber verursachen {0} Schaden mehr. 0=amount of spell damage
GLOBAL_KEYWORD_START_OF_COMBAT Kampfbeginn
GLOBAL_KEYWORD_START_OF_COMBAT_TEXT Löst zu Beginn der Kampfphase einen Effekt aus.
GLOBAL_KEYWORD_START_OF_GAME Spielbeginn
GLOBAL_KEYWORD_START_OF_GAME_TEXT Vor dem ersten Zug tritt ein Effekt in Kraft.
GLOBAL_KEYWORD_STEALTH Verstohlenheit
GLOBAL_KEYWORD_STEALTH_REF_TEXT Der Charakter kann nicht angegriffen oder als Ziel gewählt werden, bis er angreift.
GLOBAL_KEYWORD_STEALTH_TEXT Der Charakter kann nicht angegriffen oder als Ziel gewählt werden, bis er angreift.
GLOBAL_KEYWORD_TAUNT Spott
GLOBAL_KEYWORD_TAUNT_REF_TEXT Feinde müssen Diener angreifen, die Spott haben.
GLOBAL_KEYWORD_TAUNT_TEXT Feinde müssen diesen Diener angreifen.
GLOBAL_KEYWORD_TWINSPELL Zwillingszauber
GLOBAL_KEYWORD_TWINSPELL_TEXT Kann zweimal gewirkt werden.
GLOBAL_KEYWORD_WILD Wild
GLOBAL_KEYWORD_WILD_TEXT Wilde Karten sind Karten aus früheren Erweiterungen von Hearthstone, die im Standardformat nicht mehr erlaubt sind.
GLOBAL_KEYWORD_WINDFURY Windzorn
GLOBAL_KEYWORD_WINDFURY_TEXT Kann zweimal pro Zug angreifen.
GLOBAL_LANGUAGE_CHANGE_CONFIRM_MESSAGE Dadurch wird Ihre aktuelle Aktivität unterbrochen. Sind Sie sicher?
GLOBAL_LANGUAGE_CHANGE_CONFIRM_TITLE Sprache ändern?
GLOBAL_LANGUAGE_CHANGE_OUT_OF_SPACE_MESSAGE Es werden {0} freier Speicherplatz auf dem Gerät benötigt, um fortzufahren.
GLOBAL_LANGUAGE_CHANGE_OUT_OF_SPACE_TITLE Nicht genug Speicherplatz!
GLOBAL_LANGUAGE_DOWNLOAD_VOICE_PACK (DEV) Heruntergeladenes Sprachpaket
GLOBAL_LANGUAGE_DROPDOWN Sprache
GLOBAL_LANGUAGE_NATIVE_DEDE Deutsch The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ENGB English (UK) The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ENUS English The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ESES Español (España) The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ESMX Español (Latinoamérica) The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_FRFR Français The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ITIT Italiano The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_JAJP 日本語 The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_KOKR 한국어 The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_PLPL Polski The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_PTBR Português (Brasil) The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_RURU Русский The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_THTH ภาษาไทย The name of the laugnage IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ZHCN 中文(简体) The name of the language IN THAT LANGUAGE.
GLOBAL_LANGUAGE_NATIVE_ZHTW 繁體中文(台灣) The name of the language IN THAT LANGUAGE.
GLOBAL_LEAVE Verlassen
GLOBAL_LEAVE_SPECTATOR_MODE Verlassen
GLOBAL_LOCATIONS Mehr Infos
GLOBAL_LOGIN Einloggen
GLOBAL_LOGIN_CONFIRM_MESSAGE Dadurch geht Ihr aktueller Fortschritt verloren. Sind Sie sicher?
GLOBAL_LOGIN_CONFIRM_TITLE Einloggen?
GLOBAL_LOGO_COPYRIGHT 炉石传说 - 魔兽英雄传 ©2016 暴雪娱乐股份有限公司版权所有 由上海网之易网络科技发展有限公司运营
GLOBAL_LOGOUT Ausloggen
GLOBAL_LOGOUT_CONFIRM_MESSAGE Sind Sie sicher?
GLOBAL_LOGOUT_CONFIRM_TITLE Ausloggen?
GLOBAL_LOSSES Niederlagen
GLOBAL_MEDAL_0 Legende
GLOBAL_MEDAL_1 Gastwirt
GLOBAL_MEDAL_10 Ogermagier
GLOBAL_MEDAL_11 Großwildjäger
GLOBAL_MEDAL_12 Kriegshymnenanführerin
GLOBAL_MEDAL_13 Schreckenskorsar
GLOBAL_MEDAL_14 Schlachtzugsleiter
GLOBAL_MEDAL_15 Wache von Silbermond
GLOBAL_MEDAL_16 Rastloser Abenteurer
GLOBAL_MEDAL_17 Taurenkrieger
GLOBAL_MEDAL_18 Zauberlehrling
GLOBAL_MEDAL_19 Ingenieurslehrling
GLOBAL_MEDAL_2 Der Schwarze Ritter
GLOBAL_MEDAL_20 Schildträger
GLOBAL_MEDAL_21 Südmeerdeckmatrose
GLOBAL_MEDAL_22 Murlocräuber
GLOBAL_MEDAL_23 Argentumknappin
GLOBAL_MEDAL_24 Lepragnom
GLOBAL_MEDAL_25 Wütendes Huhn
GLOBAL_MEDAL_3 Geschmolzener Riese
GLOBAL_MEDAL_4 Bergriese
GLOBAL_MEDAL_5 Meeresriese
GLOBAL_MEDAL_6 Urtum des Krieges
GLOBAL_MEDAL_7 Sonnenläuferin
GLOBAL_MEDAL_8 Frostwolfkriegsfürst
GLOBAL_MEDAL_9 Ritter der Silbernen Hand
GLOBAL_MEDAL_ARENA_TOOLTIP_BODY Dies ist der beste Schlüssel, den Ihr in der Arena erhalten habt.\nSiege: {0} 0=num wins
GLOBAL_MEDAL_REWARD_CONGRATULATIONS Herzlichen Glückwunsch!
GLOBAL_MEDAL_REWARD_DESCRIPTION Letzte Woche erhaltene Medaille
GLOBAL_MEDAL_TOOLTIP_BEST_RANK_STANDARD Euer Standardrang ist zurzeit Euer bester Rang.
GLOBAL_MEDAL_TOOLTIP_BEST_RANK_WILD Euer wilder Rang ist zurzeit Euer bester Rang.
GLOBAL_MEDAL_TOOLTIP_BODY Gewinnt Spiele, um den nächsten Rang zu erreichen!
GLOBAL_MEDAL_TOOLTIP_BODY_ARENA_GRAND_MASTER Ihr seid ein Champion der Arena!
GLOBAL_MEDAL_TOOLTIP_BODY_LEGEND Ihr seid zur Legende aufgestiegen! Eure Platzierung innerhalb dieses Rangs verändert sich mit jedem Spiel.
GLOBAL_MEDAL_TOOLTIP_HEADER Wertung: {0} 0=medal name
GLOBAL_MEDAL_TOURNAMENT_TOOLTIP_BODY Ihr gehört diese Saison zu den besten {0} % des gewerteten Modus! 0=rank percentile
GLOBAL_MOBILE_ERROR_ANDROID_PHONE_DETECTED Es tut uns leid, Hearthstone läuft zurzeit nur auf Android-Tablets mit einer Displaygröße von mindestens 6 Zoll.
GLOBAL_MOBILE_ERROR_BREAKING_NEWS Eilmeldung:\n\n{0}
GLOBAL_MOBILE_ERROR_LOGON_WEB_TIMEOUT Ihre Verbindung zum Server wurde getrennt, da Sie längere Zeit inaktiv waren.
GLOBAL_MOBILE_ERROR_NETWORK_DISCONNECT Ihre Verbindung wurde unterbrochen.
GLOBAL_MOBILE_ERROR_NETWORK_SPAM Ihre Verbindung wurde unterbrochen, weil Sie zu viele Anfragen in zu kurzer Zeit gesendet haben.
GLOBAL_MOBILE_ERROR_NETWORK_UTIL_TIMEOUT Ihre Verbindung zum Spiel wurde getrennt, während es versucht hat, Daten von den Hearthstone-Servern abzufragen.
GLOBAL_MOBILE_ERROR_UNSUPPORTED_IOS_PHONE_DETECTED Es tut uns leid, für Hearthstone ist ein iPhone 4s, iPod Touch 5 oder ein neueres Gerät erforderlich.
GLOBAL_MOBILE_ERROR_UNSUPPORTED_IOS_TABLET_DETECTED Es tut uns leid, für Hearthstone ist ein iPad 2 oder neuer erforderlich.
GLOBAL_MOBILE_LOG_IN_TOOLTIP Loggen Sie sich ein, wenn Sie einen Account haben!
GLOBAL_MOBILE_LOGIN_POINTER Hier einloggen
GLOBAL_MOBILE_RESTART_APPLICATION Bitte starten Sie die App neu.
GLOBAL_MOBILE_TAP_TO_RECONNECT Tippen, um die Verbindung wiederherzustellen
GLOBAL_MOBILE_TAP_TO_UPDATE Tippen, um zu aktualisieren
GLOBAL_MOBILECHAT_NOTIFICATION_MULLIGAIN Spiel wurde gestartet!
GLOBAL_MOBILECHAT_NOTIFICATION_TURN_COUNTDOWN Die Zeit läuft ab!
GLOBAL_MOBILECHAT_NOTIFICATION_YOUR_TURN Euer Zug!
GLOBAL_MOBILECHAT_RETURN_TO_GAME Schließen
GLOBAL_MOBILECHAT_RETURN_TO_MENU Zurück zum Menü
GLOBAL_MORE Mehr
GLOBAL_MY_NUM_WINS {0} 0=number of games this player has won
GLOBAL_NOT_AVAILABLE Nicht verfügbar
GLOBAL_OFF Aus
GLOBAL_OFFLINE Offline
GLOBAL_OKAY OK
GLOBAL_ON Ein
GLOBAL_OPTIONS Optionen
GLOBAL_OPTIONS_CARDBACK_LABEL Wählt Euren Kartenrücken
GLOBAL_OPTIONS_CHOOSE_CARD_BACK Kartenrücken wählen
GLOBAL_OPTIONS_CINEMATIC Filmsequenz
GLOBAL_OPTIONS_CREDITS Das Team
GLOBAL_OPTIONS_GRAPHICS_FULLSCREEN_LABEL Vollbild
GLOBAL_OPTIONS_GRAPHICS_LABEL Grafik
GLOBAL_OPTIONS_GRAPHICS_QUALITY_HIGH Hoch
GLOBAL_OPTIONS_GRAPHICS_QUALITY_LABEL Qualität
GLOBAL_OPTIONS_GRAPHICS_QUALITY_LOW Niedrig
GLOBAL_OPTIONS_GRAPHICS_QUALITY_MEDIUM Mittel
GLOBAL_OPTIONS_GRAPHICS_RESOLUTION_CUSTOM Benutzerdefiniert
GLOBAL_OPTIONS_GRAPHICS_RESOLUTION_LABEL Auflösung
GLOBAL_OPTIONS_MISCELLANEOUS_LABEL Verschiedenes
GLOBAL_OPTIONS_NEARBY_PLAYERS Herausfordern von Spielern in der Nähe (Freundesliste)
GLOBAL_OPTIONS_OTHER_LABEL Sonstiges
GLOBAL_OPTIONS_PREFERENCES_LABEL Präferenzen
GLOBAL_OPTIONS_PRIVACY_POLICY Datenschutz
GLOBAL_OPTIONS_PUBLIC_CHAT_ENABLED Öffentlicher Chat
GLOBAL_OPTIONS_RESTORE_PURCHASES Käufe finden
GLOBAL_OPTIONS_RESTORE_PURCHASES_POPUP_TEXT Ihr könnt einen Kauf nicht finden? Stellt sicher, dass Ihr mit dem richtigen Account eingeloggt seid.
GLOBAL_OPTIONS_SCREEN_SHAKE Bildwackeleffekte aktivieren
GLOBAL_OPTIONS_SKIP_NPR Lehrlingsphase überspringen
GLOBAL_OPTIONS_SKIP_TO_RANK_25 Jetzt auf Rang 25
GLOBAL_OPTIONS_SOUND_IN_BACKGROUND Sound im Hintergrund
GLOBAL_OPTIONS_SOUND_LABEL Sound
GLOBAL_OPTIONS_SOUND_MASTER_VOLUME_LABEL Gesamtlautstärke
GLOBAL_OPTIONS_SOUND_MUSIC_VOLUME_LABEL Musiklautstärke
GLOBAL_OPTIONS_SPECTATOR_OPEN_JOIN Freunden erlauben, meinen Spielen zuzuschauen
GLOBAL_PLAY Spielen
GLOBAL_PLAY_RANKED Gewertetes\nSpiel
GLOBAL_PLAY_STANDARD Standard-\nspiel
GLOBAL_PLAY_WAITING Warte …
GLOBAL_PLAY_WILD Wildes Spiel
GLOBAL_PLAYER_MIGRATION_RESTART_BODY Accountaktualisierung erforderlich.\nBitte starten Sie das Spiel neu.
GLOBAL_PLAYER_MIGRATION_RESTART_HEADER Accountaktualisierung erforderlich.
GLOBAL_PLAYER_PLAYER Spieler this is the word for generic "Player" - this will be used when there a player's name is unknown at the time.
GLOBAL_PRACTICE_MAX_LEVEL_REACHED Max. Stufe gegen KI
GLOBAL_PROGRAMNAME_BLACKOPS4 Black Ops 4
GLOBAL_PROGRAMNAME_DESTINY2 Destiny 2
GLOBAL_PROGRAMNAME_DIABLO3 Diablo III
GLOBAL_PROGRAMNAME_HEARTHSTONE Hearthstone
GLOBAL_PROGRAMNAME_HEROES Heroes of the Storm
GLOBAL_PROGRAMNAME_MODERNWARFARE Moderne Kriegsführung
GLOBAL_PROGRAMNAME_MODERNWARFARE2_REMASTER MW2CR
GLOBAL_PROGRAMNAME_OVERWATCH Overwatch
GLOBAL_PROGRAMNAME_PHOENIX Online
GLOBAL_PROGRAMNAME_STARCRAFT StarCraft
GLOBAL_PROGRAMNAME_STARCRAFT2 StarCraft II
GLOBAL_PROGRAMNAME_WARCRAFT3 Warcraft III: Reforged
GLOBAL_PROGRAMNAME_WOW World of Warcraft
GLOBAL_QUEST_PROGRESS_COUNT {0}/{1} 0=progress,1=max progress
GLOBAL_QUIT Beenden
GLOBAL_RACE_ALL Alle
GLOBAL_RACE_ALL_BATTLEGROUNDS Mutationen This should be the plural of DAL_087t
GLOBAL_RACE_BLOODELF Blutelf
GLOBAL_RACE_BLOODELF_BATTLEGROUNDS Blutelfen
GLOBAL_RACE_DEMON Dämon
GLOBAL_RACE_DEMON_BATTLEGROUNDS Dämonen
GLOBAL_RACE_DRAENEI Feuer
GLOBAL_RACE_DRAENEI_BATTLEGROUNDS Feuer
GLOBAL_RACE_DRAGON Drache
GLOBAL_RACE_DRAGON_BATTLEGROUNDS Drachen
GLOBAL_RACE_DWARF Zwerg
GLOBAL_RACE_DWARF_BATTLEGROUNDS Zwerge
GLOBAL_RACE_EGG Ei
GLOBAL_RACE_EGG_BATTLEGROUNDS Eier
GLOBAL_RACE_ELEMENTAL Elementar
GLOBAL_RACE_ELEMENTAL_BATTLEGROUNDS Elementare
GLOBAL_RACE_GNOME Gnom
GLOBAL_RACE_GNOME_BATTLEGROUNDS Gnome
GLOBAL_RACE_GOBLIN Goblin
GLOBAL_RACE_GOBLIN_BATTLEGROUNDS Goblins
GLOBAL_RACE_HUMAN Mensch
GLOBAL_RACE_HUMAN_BATTLEGROUNDS Menschen
GLOBAL_RACE_MECHANICAL Mech
GLOBAL_RACE_MECHANICAL_BATTLEGROUNDS Mechs
GLOBAL_RACE_MIXED_BATTLEGROUNDS Diener mit mehreren Dienertypen
GLOBAL_RACE_MURLOC Murloc
GLOBAL_RACE_MURLOC_BATTLEGROUNDS Murlocs
GLOBAL_RACE_NERUBIAN Neruber
GLOBAL_RACE_NERUBIAN_BATTLEGROUNDS Neruber
GLOBAL_RACE_NIGHTELF Nachtelf
GLOBAL_RACE_NIGHTELF_BATTLEGROUNDS Nachtelfen
GLOBAL_RACE_OGRE Oger
GLOBAL_RACE_OGRE_BATTLEGROUNDS Oger
GLOBAL_RACE_ORC Orc
GLOBAL_RACE_ORC_BATTLEGROUNDS Orcs
GLOBAL_RACE_PET Wildtier
GLOBAL_RACE_PET_BATTLEGROUNDS Wildtiere
GLOBAL_RACE_PIRATE Pirat
GLOBAL_RACE_PIRATE_BATTLEGROUNDS Piraten
GLOBAL_RACE_SCOURGE Geißel
GLOBAL_RACE_SCOURGE_BATTLEGROUNDS Geißel
GLOBAL_RACE_TAUREN Tauren
GLOBAL_RACE_TAUREN_BATTLEGROUNDS Tauren
GLOBAL_RACE_TOTEM Totem
GLOBAL_RACE_TOTEM_BATTLEGROUNDS Totems
GLOBAL_RACE_TROLL Troll
GLOBAL_RACE_TROLL_BATTLEGROUNDS Trolle
GLOBAL_RACE_UNDEAD Untot
GLOBAL_RACE_UNDEAD_BATTLEGROUNDS Untote
GLOBAL_RACE_WORGEN Worgen
GLOBAL_RACE_WORGEN_BATTLEGROUNDS Worgen
GLOBAL_RANK_CANT_LOSE_LEVEL Ihr könnt nicht unter diesen Rang fallen.
GLOBAL_RANK_PROMOTION_DESC Ihr seid auf Rang 25 aufgestiegen!
GLOBAL_RANK_SCRUB_RANK_DESC Auf diesem Rang könnt Ihr keine Sterne verlieren.
GLOBAL_RANK_STAR_MULT Sternenbonus! x{0}
GLOBAL_RANK_STAR_MULT_STREAK Siegessträhnenbonus! x2
GLOBAL_RANK_WIN_STREAK Siegesserie – Bonusstern!
GLOBAL_RARITY_COMMON Gewöhnlich
GLOBAL_RARITY_EPIC Episch
GLOBAL_RARITY_FREE Gratis
GLOBAL_RARITY_LEGENDARY Legendär
GLOBAL_RARITY_RARE Selten
GLOBAL_RECONNECT_EXIT_BUTTON Verlassen
GLOBAL_RECONNECT_RECONNECTED Die Verbindung zu Ihrem Spiel wurde wiederhergestellt. Spiel wird fortgeführt ...
GLOBAL_RECONNECT_RECONNECTED_HEADER Verbindung hergestellt
GLOBAL_RECONNECT_RECONNECTED_LOGIN Die Verbindung zu Ihrem letzten Spiel wurde wiederhergestellt. Spiel wird fortgeführt ...
GLOBAL_RECONNECT_RECONNECTING Die Verbindung zu Ihrem Spiel wurde getrennt. Verbindung wird wiederhergestellt ...
GLOBAL_RECONNECT_RECONNECTING_HEADER Stelle Verbindung her
GLOBAL_RECONNECT_RECONNECTING_LOGIN Die Verbindung zu Ihrem letzten Spiel wurde getrennt. Verbindung wird wiederhergestellt ...
GLOBAL_RECONNECT_TIMEOUT Die Verbindung zu Ihrem Spiel konnte nicht wiederhergestellt werden.
GLOBAL_RECONNECT_TIMEOUT_HEADER Fehler
GLOBAL_REFRESH Aktualisieren
GLOBAL_REGION_AMERICAS Amerika & Südostasien
GLOBAL_REGION_ASIA Asien
GLOBAL_REGION_CHINA China
GLOBAL_REGION_EUROPE Europa
GLOBAL_RELAUNCH_APPLICATION_AFTER_INSTALLAPK Es wird versucht, einen neuen Client zu installieren. Bitte starten Sie Hearthstone neu, wenn der Client nicht installiert wurde.
GLOBAL_REMAINING_DATETIME {0} verbleibend 0=time string
GLOBAL_REMINDER_CARDBACK_SEASON_END_DIALOG Gewinnt {0} |4(Spiel,Spiele), um den Kartenrücken der aktuellen Saison zu erhalten.
GLOBAL_REMINDER_CHEST_QUESTION_MARK ? Label for unearned chest, assuming "?" universally means unknown, it doesn't need to be localized
GLOBAL_REMINDER_CHEST_SEASON_END_DIALOG Gewinnt 5 Spiele, um Eure Saisontruhe zu erhalten.
GLOBAL_RESTART Neu starten
GLOBAL_RESUME_GAME Fortfahren
GLOBAL_RETRY Neuer Versuch
GLOBAL_RETURNING_PLAYER_GENERATED_DECK Deck des Gastwirts
GLOBAL_REWARD_ARCANE_DUST_HEADLINE Arkanstaub erhalten!
GLOBAL_REWARD_ARCANE_ORBS_HEADLINE Arkane Kugeln erhalten!
GLOBAL_REWARD_ARENA_TICKET_ADMIT EINTRITT the word 'admit' in capital letters - displayed like "Admit 1" and looks like a movie/fair ticket. this is the Arena Ticket reward visual.
GLOBAL_REWARD_ARENA_TICKET_AUTHORIZED_BY Ausgestellt von a label that shows up in the Arena Ticket under the Player's name indicating this ticket reward was granted by some guy.
GLOBAL_REWARD_ARENA_TICKET_ENTRANT Teilnehmer a label that shows up in the Arena Ticket under the Player's name to say this person is allowed entrance into the Arena.
GLOBAL_REWARD_ARENA_TICKET_HEADLINE Gratiszugang!
GLOBAL_REWARD_ARENA_TICKET_LABEL Arena
GLOBAL_REWARD_ARENA_TICKET_STORE_COUNT_1 1
GLOBAL_REWARD_ARENA_TICKET_TITLE Arena
GLOBAL_REWARD_BONUS_CHALLENGE_HEADLINE Letzter Kampf freigeschaltet
GLOBAL_REWARD_BOOSTER_DETAILS_OUT_OF_BAND {0} |4(Kartenpackung wurde,Kartenpackungen wurden) Eurem Account von außerhalb des Spiels hinzugefügt. 0=count
GLOBAL_REWARD_BOOSTER_DETAILS_PRESALE_OUT_OF_BAND Euer Online-Kauf von {0} |4(Packung,Packungen) wird bald verfügbar sein! 0=count
GLOBAL_REWARD_BOOSTER_HEADLINE_GENERIC Packung erhalten!
GLOBAL_REWARD_BOOSTER_HEADLINE_MULTIPLE {0} |4(Packung,Packungen) erhalten!
GLOBAL_REWARD_BOOSTER_HEADLINE_OUT_OF_BAND Neue Kartenpackung!
GLOBAL_REWARD_BOOSTER_HEADLINE_OUT_OF_BAND_MULTI Neue Kartenpackungen!
GLOBAL_REWARD_CARD_BACK_HEADLINE Neuer Kartenrücken!
GLOBAL_REWARD_CARD_COUNT_MULTIPLIER x
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL01 Oh ja!
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL02 Das ist ziemlich beeindruckend.
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL03 Ihr seid nicht zu stoppen!
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL04 Das war unglaublich.
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL05 Herrlich!
GLOBAL_REWARD_CARD_DETAILS_TUTORIAL06 Heiß, heiß, heiß!
GLOBAL_REWARD_CARD_HEADLINE Belohnung!
GLOBAL_REWARD_CARD_LEVEL_UP Wird durch das Erreichen der Stufe {0} als {1} freigeschaltet 0=# level, 1=class
GLOBAL_REWARD_CHEST_HEADER Ihr habt Euch gewertete Belohnungen verdient!
GLOBAL_REWARD_CHEST_INSTRUCTIONS Ihr könnt Eure Schatztruhe am Ende der Saison öffnen.\nJe höher Euer Rang, desto besser die Belohnungen, die sie enthält!
GLOBAL_REWARD_CHEST_TIER1 Schatz des Meeresriesen
GLOBAL_REWARD_CHEST_TIER1_EARNED Ihr habt den Schatz des Meeresriesen erhalten!
GLOBAL_REWARD_CHEST_TIER2 Truhe des Ogermagiers
GLOBAL_REWARD_CHEST_TIER2_EARNED Ihr habt die Truhe des Ogermagiers erhalten!
GLOBAL_REWARD_CHEST_TIER3 Schatztruhe des Wächters
GLOBAL_REWARD_CHEST_TIER3_EARNED Ihr habt die Schatztruhe des Wächters erhalten!
GLOBAL_REWARD_CHEST_TIER4 Schließkiste des Schildträgers
GLOBAL_REWARD_CHEST_TIER4_EARNED Ihr habt die Schließkiste des Schildträgers erhalten!
GLOBAL_REWARD_CHEST_TIER5 Kiste des wütenden Huhns
GLOBAL_REWARD_CHEST_TIER5_EARNED Ihr habt die Kiste des wütenden Huhns erhalten!
GLOBAL_REWARD_CHEST_TIER6 Gastpaket
GLOBAL_REWARD_CHEST_TIER6_EARNED Ihr habt ein Gastpaket erhalten!
GLOBAL_REWARD_CLASS_CHALLENGE_DETAIL {0} 0=first class
GLOBAL_REWARD_CLASS_CHALLENGE_DETAIL_DOUBLE {0} und {1} 0=first class, 1=second class
GLOBAL_REWARD_CLASS_CHALLENGE_HEADLINE |4(Klassenherausforderung,Klassenherausforderungen) freigeschaltet!
GLOBAL_REWARD_CORE_CARD_DETAILS {2}: {0}/{1} Karten freigeschaltet 0=# cards unlocked, 1=# cards possible to unlock, 2=class
GLOBAL_REWARD_FORGE_DETAILS_OUT_OF_BAND {0} |4(Zugang zur Arena wurde,Zugänge zur Arena wurden) Eurem Account von außerhalb des Spiels hinzugefügt. 0=count
GLOBAL_REWARD_FORGE_HEADLINE Zugang zur Arena erhalten!
GLOBAL_REWARD_FORGE_UNLOCKED_HEADLINE Arena freigeschaltet!
GLOBAL_REWARD_FORGE_UNLOCKED_SOURCE Belohnung für das Betreten der Arena
GLOBAL_REWARD_GOLD_HEADLINE Gold erhalten!
GLOBAL_REWARD_GOLD_SOURCE_IGR Belohnung für das Einloggen aus einem IGR
GLOBAL_REWARD_GOLD_SOURCE_IGR_DATED Belohnung für das Einloggen aus einem IGR am {0} 0=GLOBAL_CURRENT_DATE
GLOBAL_REWARD_GOLD_SOURCE_TOURNEY Belohnung für {0} |4(Sieg,Siege) in den Modi „Spielen“, „Kartenchaos“ oder „Schlachtfeld“
GLOBAL_REWARD_GOLDEN_HERO_HEADLINE Goldener Held freigeschaltet!
GLOBAL_REWARD_HEARTHSTEED_HEADLINE Pegasus
GLOBAL_REWARD_HERO_DETAILS {0}/{1} Helden freigeschaltet
GLOBAL_REWARD_HERO_HEADLINE {0} freigeschaltet!
GLOBAL_REWARD_HEROES_CARD_MOUNT_HEADLINE Reittier: Hearthstone-Karte
GLOBAL_REWARD_PROGRESS {0}/{1} Siege 0=current wins,1=required wins
GLOBAL_SCAN Suchen
GLOBAL_SCREENSHOT_COMPLETE Screenshot wurde auf dem Desktop gespeichert.
GLOBAL_SCREENSHOT_COMPLETE_SPECIFIC_DIRECTORY Screenshot wurde gespeichert unter {0} 0=The directory that the file was saved to
GLOBAL_SEASON_CHEST_BANNER Saisontruhe Default label for the banner in the end game screen that is placed above the in progress chest
GLOBAL_SEASON_END_BEST_EVER_ABOVE_MAX Ihr startet dank Eurer vergangenen Leistungen immer auf Rang {0} oder höher. 0=rank
GLOBAL_SEASON_END_BONUS_STAR_BOOST Euer Sternenbonus katapultieren Euch auf
GLOBAL_SEASON_END_BONUS_STAR_TITLE Euer Rang aus der letzten Saison verleiht Euch
GLOBAL_SEASON_END_BONUS_STARS_LABEL |4(Bonusstern,Bonussterne)
GLOBAL_SEASON_END_CHEST_INSTRUCTIONS Zum Öffnen klicken
GLOBAL_SEASON_END_CHEST_INSTRUCTIONS_TOUCH Zum Öffnen tippen
GLOBAL_SEASON_END_NEW_CARD_BACK Ihr habt einen neuen Kartenrücken freigeschaltet!
GLOBAL_SEASON_END_NEW_CARDBACK_TITLE Neuer Saison-Kartenrücken!
GLOBAL_SEASON_END_NEW_CARDBACK_TITLE_PHONE Neuer Saison-\nKartenrücken!
GLOBAL_SEASON_END_NEW_SEASON Die {0} hat begonnen! 0=season name
GLOBAL_SEASON_END_PERCENTILE_LABEL Damit gehört Ihr zu den besten {0} % des gewerteten Modus! 0=rank percentile
GLOBAL_SEASON_END_RANK_LABEL Ihr habt folgenden Rang erreicht:
GLOBAL_SEASON_END_STAR_MULTIPLIER_LABEL Sternenbonus
GLOBAL_SEASON_END_STAR_MULTIPLIER_TITLE Eure gewertete Leistung in der letzten Saison verleiht Euch
GLOBAL_SEASON_END_WELCOME Willkommen
GLOBAL_SET_CORE Basisset
GLOBAL_SET_EXPERT1 Klassikset
GLOBAL_SET_ROTATION_ROLLOVER_BODY_DESKTOP Das neue Hearthstone-Jahr hat begonnen!\nStartet neu, um es mit uns zu feiern.
GLOBAL_SET_ROTATION_ROLLOVER_BODY_MOBILE Das neue Hearthstone-Jahr hat begonnen!\nSpiel wird neu gestartet, damit Ihr mitfeiern könnt.
GLOBAL_SET_ROTATION_ROLLOVER_HEADER Frohes neues Jahr!
GLOBAL_SHOW Anzeigen
GLOBAL_SHUTDOWN_TOAST <color=#{0}>Die Blizzard-Dienste werden in {1} |4(Minute,Minuten) heruntergefahren.</color> 0=color, 1=minutes
GLOBAL_SKIP Überspringen
GLOBAL_SKIP_TUTORIAL Tutorial verlassen
GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_COMPLETE <color=#{0}>{1}</color> hat eine Arenarunde beendet. ({2}:{3}) 0=name color,1=player name,2=Arena Wins,3=Arena Losses
GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_START <color=#{0}>{1}</color> hat eine neue Arenarunde begonnen. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_START_WITH_MANY_WINS <color=#{0}>{1}</color> hat in der Arena schon {2} Siege errungen und beginnt das nächste Spiel! 0=name color,1=player name,2=Arena Wins
GLOBAL_SOCIAL_TOAST_FRIEND_BRAWLISEUM_COMPLETE <color=#{0}>{1}</color> hat eine Runde im Kartenkolosseum beendet. ({2}:{3}) 0=name color,1=player name,2=Brawl Wins,3=Brawl Losses
GLOBAL_SOCIAL_TOAST_FRIEND_BRAWLISEUM_START <color=#{0}>{1}</color> hat eine neue Runde im Kartenkolosseum begonnen. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_BRAWLISEUM_START_WITH_MANY_WINS <color=#{0}>{1}</color> hat im Kartenkolosseum schon {2} Siege errungen und beginnt das nächste Spiel! 0=name color,1=player name,2=Brawl Wins
GLOBAL_SOCIAL_TOAST_FRIEND_DRUID_LEVEL <color=#{0}>{1}</color> ist als Druide auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_GAINED_RANK <color=#{0}>{1}</color> ist gerade auf Rang {2} aufgestiegen! 0=name color,1=player name,2=medal rank
GLOBAL_SOCIAL_TOAST_FRIEND_GAINED_RANK_WILD <color=#{0}>{1}</color> ist im wilden Format gerade auf Rang {2} aufgestiegen! 0=name color,1=player name,2=medal rank
GLOBAL_SOCIAL_TOAST_FRIEND_GOLDEN_LEGENDARY <color=#{0}>{1}</color> hat <color=#{3}>{2} (Golden)</color> erhalten! 0=name color,1=player name,2=card name,3=Golden Color
GLOBAL_SOCIAL_TOAST_FRIEND_HEROIC_BRAWL_COMPLETE <color=#{0}>{1}</color> hat ein heroisches Kartenchaos beendet. ({2}:{3}) 0=name color,1=player name,2=Heroic brawl Wins,3=Heroic brawl Losses
GLOBAL_SOCIAL_TOAST_FRIEND_HEROIC_BRAWL_START <color=#{0}>{1}</color> hat ein neues heroisches Kartenchaos begonnen. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_HEROIC_BRAWL_START_WITH_MANY_WINS <color=#{0}>{1}</color> hat in einem heroischen Kartenchaos bereits {2} Siege errungen und beginnt das nächste Spiel! 0=name color,1=player name,2=Heroic brawl Wins
GLOBAL_SOCIAL_TOAST_FRIEND_HUNTER_LEVEL <color=#{0}>{1}</color> ist als Jäger auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_ILLIDAN_COMPLETE <color=#{0}>{1}</color> hat Illidan Sturmgrimm besiegt! 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_LEGENDARY <color=#{0}>{1}</color> hat <color=#{3}>{2}</color> erhalten! 0=name color,1=player name,2=card name
GLOBAL_SOCIAL_TOAST_FRIEND_MAGE_LEVEL <color=#{0}>{1}</color> ist als Magier auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_OFFLINE <color=#{0}>{1}</color> ist jetzt offline. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_ONLINE <color=#{0}>{1}</color> ist jetzt online. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_PALADIN_LEVEL <color=#{0}>{1}</color> ist als Paladin auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_PRIEST_LEVEL <color=#{0}>{1}</color> ist als Priester auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_RANK_EARNED <color=#{0}>{1}</color> hat {2} erreicht! 0=name color,1=player name,2=medal name
GLOBAL_SOCIAL_TOAST_FRIEND_RANK_EARNED_WILD <color=#{0}>{1}</color> hat {2} im wilden Format erreicht! 0=name color,1=player name,2=medal name
GLOBAL_SOCIAL_TOAST_FRIEND_RANK_LEGEND <color=#{0}>{1}</color> ist zum Rang „Legende“ aufgestiegen! 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_RANK_LEGEND_WILD <color=#{0}>{1}</color> ist im wilden Format zum Rang „Legende“ aufgestiegen! 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_REQUEST <color=#{0}>{1}</color> hat Euch eine Freundschaftsanfrage geschickt. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_FRIEND_ROGUE_LEVEL <color=#{0}>{1}</color> ist als Schurke auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_SHAMAN_LEVEL <color=#{0}>{1}</color> ist als Schamane auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_WARLOCK_LEVEL <color=#{0}>{1}</color> ist als Hexenmeister auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_FRIEND_WARRIOR_LEVEL <color=#{0}>{1}</color> ist als Krieger auf Stufe {2} aufgestiegen. 0=name color,1=player name,2=level
GLOBAL_SOCIAL_TOAST_RECENT_OPPONENT_FRIEND_REQUEST Ein Spieler, mit dem Ihr es kürzlich aufgenommen habt, möchte Euer Freund werden!
GLOBAL_SOCIAL_TOAST_SPECTATOR_ADDED <color=#{0}>{1}</color> schaut Eurem Spiel jetzt zu. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_SPECTATOR_INVITE_RECEIVED <color=#{0}>{1}</color> hat Euch eingeladen, einem Spiel zuzuschauen! 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_SPECTATOR_INVITE_SENT Zuschauereinladung an <color=#{0}>{1}</color> geschickt. 0=name color,1=player name
GLOBAL_SOCIAL_TOAST_SPECTATOR_REMOVED <color=#{0}>{1}</color> schaut Eurem Spiel nicht mehr zu. 0=name color,1=player name
GLOBAL_SPECTATE Zuschauen
GLOBAL_SPECTATOR_COUNT_PANEL_HEADER Zuschauer
GLOBAL_SPECTATOR_COUNT_PANEL_TEXT_ONE {0} schaut Euch zu. 0=player name, this is shown when there's only 1 person spectating you.
GLOBAL_SPECTATOR_ERROR_CANNOT_SPECTATE_2_GAMES Ihr könnt nicht bei zwei Spielen gleichzeitig zuschauen.
GLOBAL_SPECTATOR_ERROR_CREATE_PARTY_TEXT Beim Erstellen einer Zuschauergruppe ist ein Fehler aufgetreten.
GLOBAL_SPECTATOR_ERROR_LEAVE_FOR_SPECTATE_PLAYER_TEXT Es ist ein Fehler aufgetreten, als Sie eine Zuschauergruppe verlassen wollten, um {0} zuzuschauen. 0=player name
GLOBAL_SPECTATOR_KICK_PROMPT_HEADER Zuschauer entfernen
GLOBAL_SPECTATOR_KICK_PROMPT_TEXT Seid Ihr sicher, dass Ihr {0} als Zuschauer entfernen wollt? Deaktiviert im Optionsmenü „Freunden erlauben, meinen Spielen zuzuschauen“, um zu verhindern, dass andere Euch zuschauen. 0=player name
GLOBAL_SPECTATOR_LEAVE_PROMPT_HEADER Zuschauermodus verlassen
GLOBAL_SPECTATOR_LEAVE_PROMPT_TEXT Seid Ihr sicher, dass Ihr den Zuschauermodus verlassen wollt?
GLOBAL_SPECTATOR_MODE_INDICATOR_TEXT Zuschauermodus text that shows up on the bottom left of screen showing that you're currently in Spectator Mode.
GLOBAL_SPECTATOR_REMOVED_PROMPT_APPEAR_OFFLINE_TEXT Der Zuschauermodus wird beendet, wenn Ihr als offline angezeigt werdet.
GLOBAL_SPECTATOR_REMOVED_PROMPT_HEADER Entfernt
GLOBAL_SPECTATOR_REMOVED_PROMPT_TEXT Ihr wurdet aus dem Zuschauermodus entfernt.
GLOBAL_SPECTATOR_SERVER_REJECTED_HEADER Zuschauer vom Spiel getrennt
GLOBAL_SPECTATOR_SERVER_REJECTED_TEXT Das Spiel, dem Sie zuschauen wollten, ist bereits voll, beendet oder für Zuschauer gesperrt.
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_HEADER Zuschauermodus
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT Ihr wartet auf das nächste Spiel.\n\n{0}: {1} 0=player name, 1=player's current activity -- will be filled in with values PRESENCE_STATUS_* and PRESENCE_SCENARIO_*_NORMAL_SCENARIO_* from PRESENCE.txt (e.g. "Jane Doe is Heading into Play Mode")
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT_BATTLING Ihr wartet auf das nächste Spiel.\n\n{0} kämpft gegen {1}. 0=player name, 1=player's current activity -- will be filled in with values PRESENCE_SCENARIO_*_HEROIC_* from PRESENCE.txt (e.g. "Jane Doe is Battling Heroic Gothik the Harvester")
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT_ENTERING Ihr wartet auf das nächste Spiel.\n\n{0} ist im Menü „{1}“. 0=player name, 1=player's current activity -- will be filled in with values PRESENCE_ADVENTURE_MODE_* from PRESENCE.txt (e.g. "Jane Doe is entering Naxxramas")
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT_OFFLINE Ihr wartet auf das nächste Spiel.\n\n{0} ist offline. 0=player name; shown when player is offline.
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT_ONLINE Ihr wartet auf das nächste Spiel.\n\n{0} ist online. 0=player name; shown when there is no current activity string available.
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TEXT_PLAYING Ihr wartet auf das nächste Spiel.\n\n{0} spielt eine {1}. 0=player name, 1=player's current activity -- will be filled in with values PRESENCE_SCENARIO_*_CLASS_CHALLENGE_* from PRESENCE.txt (e.g. "Jane Doe is playing Naxxramas Paladin Challenge")
GLOBAL_SPECTATOR_WAITING_FOR_NEXT_GAME_TIMEOUT Der Spieler, dem Ihr zuschaut, hat zu lange kein neues Spiel mehr gestartet. Der Zuschauermodus wurde beendet.
GLOBAL_SPLASH_CLOSED_RECONNECTING Verbinde erneut ...
GLOBAL_SPLASH_CLOSED_SIGN_TITLE Geschlossen
GLOBAL_STANDARD Standard
GLOBAL_STORE_MOBILE_NAME_AMAZON im Amazon Appstore
GLOBAL_STORE_MOBILE_NAME_APPLE im Apple App Store
GLOBAL_STORE_MOBILE_NAME_DEFAULT im Blizzard-Shop
GLOBAL_STORE_MOBILE_NAME_GOOGLE auf Google Play
GLOBAL_SUPPORT Support
GLOBAL_SWITCH_ACCOUNT Account wechseln
GLOBAL_TAVERN_BRAWL Kartenchaos
GLOBAL_TAVERN_BRAWL_ERROR_NOT_ACTIVE Dieses Kartenchaos ist zurzeit leider nicht aktiv. Bitte warten Sie ein paar Minuten und versuchen Sie es dann erneut.
GLOBAL_TAVERN_BRAWL_ERROR_SEASON_INCREMENTED Dieses Kartenchaos ist leider schon zu Ende, aber bald gibt’s ein neues!
GLOBAL_TOOLTIP_FRIEND_BUTTON_DESC Chattet mit Euren Freunden und fordert sie heraus.
GLOBAL_TOOLTIP_FRIEND_BUTTON_HEADER Freunde
GLOBAL_TOOLTIP_MENU_DESC Hier könnt Ihr das Optionsmenü einsehen, das Spiel verlassen und mehr.
GLOBAL_TOOLTIP_MENU_HEADER Spielmenü
GLOBAL_TOOLTIP_MENU_OFFLINE_DESC Sie sind im Moment offline. Klicken Sie hier, um die Verbindung wiederherzustellen.
GLOBAL_TOOLTIP_MENU_OFFLINE_HEADER Offline
GLOBAL_TUTORIAL_ATTACK Angriff
GLOBAL_TUTORIAL_ATTACKER Angreifer
GLOBAL_TUTORIAL_COST Kosten
GLOBAL_TUTORIAL_DEFENDER Verteidiger
GLOBAL_TUTORIAL_HEALTH Leben
GLOBAL_TUTORIAL_HERO_POWER Heldenfähigkeit
GLOBAL_TUTORIAL_MINION Diener
GLOBAL_TUTORIAL_TAUNT Spott
GLOBAL_TUTORIAL_TAUNT_DESCRIPTION Feinde müssen diesen Diener angreifen.
GLOBAL_TUTORIAL_USED Benutzt
GLOBAL_TUTORIAL_YOUR_MANA Euer Mana
GLOBAL_TUTORIAL_YOUR_TURN Euer Zug
GLOBAL_UPDATE Aktualisieren
GLOBAL_VERSION Version
GLOBAL_WAIT_FOR_OPPONENT_RECONNECT Warte auf die Wiederherstellung\nder Verbindung des Gegners_...({0}:{1})\nIhr könnt ins Optionsmenü wechseln,\num das Spiel zu beenden.
GLOBAL_WAIT_FOR_OPPONENT_RECONNECT_HEADER Spiel pausiert
GLOBAL_WAIT_FOR_OPPONENT_RECONNECT_SPECTATOR Warte auf die Wiederherstellung der Verbindung_...({0}:{1})
GLOBAL_WILD Wild
GLOBAL_WINS Siege
| {
"pile_set_name": "Github"
} |
/*
* This file is part of ELKI:
* Environment for Developing KDD-Applications Supported by Index-Structures
*
* Copyright (C) 2019
* ELKI Development Team
*
* 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 elki.distance;
import elki.database.query.distance.DatabaseDistanceQuery;
import elki.database.relation.Relation;
/**
* Abstract super class for distance functions needing a database context.
*
* @author Elke Achtert
* @since 0.1
*
* @has - - - AbstractDatabaseDistance.Instance
*
* @param <O> the type of DatabaseObject to compute the distances in between
*/
public abstract class AbstractDatabaseDistance<O> implements Distance<O> {
/**
* Constructor.
*/
public AbstractDatabaseDistance() {
super();
}
/**
* The actual instance bound to a particular database.
*
* @author Erich Schubert
*/
public abstract static class Instance<O> implements DatabaseDistanceQuery<O> {
/**
* Relation to query.
*/
protected final Relation<O> relation;
/**
* Parent distance
*/
protected final Distance<? super O> parent;
/**
* Constructor.
*
* @param relation Data relation
* @param parent Parent distance
*/
public Instance(Relation<O> relation, Distance<? super O> parent) {
super();
this.relation = relation;
this.parent = parent;
}
@Override
public Relation<? extends O> getRelation() {
return relation;
}
@Override
public Distance<? super O> getDistance() {
return parent;
}
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<project name="TopCoder Java Generic Build" default="dist" basedir=".">
<property file="${basedir}/build.version"/>
<property file="../topcoder_global.properties"/>
<!-- Import the dependencies of this build file -->
<import file="${basedir}/build-dependencies.xml"/>
<!-- COMPONENT PARAMETERS -->
<property name="component" value="${component.name}"/>
<property name="package" value="${component.package}"/>
<property name="packagedir" value="${component.packagedir}"/>
<property name="distfilename" value="${component.distfilename}"/>
<property name="component_version"
value="${component.version.major}.${component.version.minor}.${component.version.micro}"/>
<property name="component_path" value="${distfilename}/${component_version}"/>
<!-- Override these in ../topcoder_global.properties -->
<property name="javadoc.locale" value="en_US"/>
<property name="tcs_libdir" value="../tcs/lib/tcs"/>
<property name="ext_libdir" value="../tcs/lib/third_party"/>
<property name="debug" value="off"/>
<property name="verbose" value="no"/>
<property name="cobertura.dir" value="${ext_libdir}/cobertura/1.8"/>
<!-- Change this for custom component build -->
<!--
<property name="greekgod_libdir" value="../lib/greekgod"/>
<property name="target_libdir" value="${greekgod_libdir}"/>
-->
<property name="target_libdir" value="${tcs_libdir}"/>
<!-- DIRECTORY SETUP -->
<property name="srcdir" value="src"/>
<property name="docsdir" value="docs"/>
<property name="configdir" value="conf"/>
<property name="testlogdir" value="log"/>
<property name="test_reflib" value="test_reflib"/>
<property name="testfiles" value="test_files"/>
<property name="javadocsdir" value="${docsdir}/javadocs"/>
<property name="reports" value="${testlogdir}/reports"/>
<property name="javasrc" value="${srcdir}/java"/>
<property name="javamain" value="${javasrc}/main"/>
<property name="javatests" value="${javasrc}/tests"/>
<property name="builddir" value="build"/>
<property name="build_classdir" value="${builddir}/classes"/>
<property name="build_testclassdir" value="${builddir}/testClasses"/>
<property name="build_targetclassdir" value="${builddir}/targetclasses"/>
<property name="build_distdir" value="${builddir}/dist"/>
<property name="build_docsdir" value="${builddir}/${docsdir}"/>
<property name="build_javadocsdir" value="${builddir}/${javadocsdir}"/>
<property name="build_tcsdistdir" value="${build_distdir}/${distfilename}-${component_version}"/>
<property name="manifest_file_path" value="${build_tcsdistdir}/META-INF/"/>
<property name="manifest_file" value="${manifest_file_path}/MANIFEST.MF"/>
<!-- COMPONENT DISTRIBUTION STRUCTURE -->
<property name="dist_lib" value="${build_distdir}/lib/tcs"/>
<property name="dist_docs" value="${build_tcsdistdir}/${docsdir}"/>
<property name="dist_javadocs" value="${build_tcsdistdir}/${javadocsdir}"/>
<property name="dist_coverage" value="${dist_docs}/coverage"/>
<!-- NAME FOR .JAR FILES -->
<property name="component.jar" value="${dist_lib}/${component_path}/${distfilename}.jar"/>
<property name="javadoc.jar" value="javadocs.jar"/>
<property name="component.tests.jar" value="${dist_lib}/${distfilename}_tests.jar"/>
<property name="component.dist.jar" value="${build_distdir}/${distfilename}-${component_version}.jar"/>
<property name="dev_submission.jar" value="${distfilename}_${component_version}_dev_submission.jar"/>
<property name="design_submission.jar" value="${distfilename}_${component_version}_design_submission.jar"/>
<property name="dev_dist.jar" value="${distfilename}_${component_version}_dev_dist.jar"/>
<property name="design_dist.jar" value="${distfilename}_${component_version}_design_dist.jar"/>
<!-- DOCUMENT PACKAGE -->
<property name="dist_docpackage" value="${builddir}/doc_package"/>
<property name="docpackage.jar" value="${distfilename}_docs.jar"/>
<!-- classes needed to compile the production code -->
<path id="buildlibs">
<path refid="component.tcs-dependencies"/>
<path refid="component.3rdParty-dependencies"/>
</path>
<!-- classes needed to compile the test code -->
<path id="test.build.classpath">
<path refid="component.test.3rdParty-dependencies"/>
<fileset dir="${basedir}">
<include name="${test_reflib}/**/*.jar"/>
<include name="${test_reflib}/**/*.zip"/>
</fileset>
<path refid="buildlibs"/>
<pathelement location="${build_classdir}"/>
<pathelement location="${configdir}"/>
<pathelement location="${testfiles}"/>
</path>
<!-- cobertura task definition -->
<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar"/>
<include name="lib/**/*.jar"/>
</fileset>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
<property name="cobertura.datafile" value="${testlogdir}/cobertura.ser"/>
<property name="instrumented.dir" value="${builddir}/instrumented"/>
<target name="compile">
<mkdir dir="${build_classdir}"/>
<javac srcdir="${javamain}" destdir="${build_classdir}" includes="${packagedir}/**" debug="true"
verbose="${verbose}" includeAntRuntime="no">
<classpath refid="buildlibs"/>
</javac>
</target>
<target name="compile_tests" depends="compile">
<mkdir dir="${build_testclassdir}"/>
<javac
srcdir="${javatests}"
destdir="${build_testclassdir}"
includes="${packagedir}/**"
debug="true"
verbose="${verbose}"
includeAntRuntime="no"
>
<classpath refid="test.build.classpath"/>
</javac>
</target>
<macrodef name="compile_targets" description="Compiles the sources and test cases against target JDK">
<attribute name="target"/>
<attribute name="bootclasspath"/>
<sequential>
<mkdir dir="${build_targetclassdir}"/>
<mkdir dir="${javatests}"/>
<javac srcdir="${javamain}"
destdir="${build_targetclassdir}"
includes="${packagedir}/**"
debug="true"
verbose="${verbose}"
target="@{target}"
bootclasspath="@{bootclasspath}"
extdirs=""
>
<classpath refid="buildlibs"/>
</javac>
<!-- compile test cases -->
<javac srcdir="${javatests}"
destdir="${build_targetclassdir}"
includes="${packagedir}/**"
debug="true"
verbose="${verbose}"
target="@{target}"
bootclasspath="@{bootclasspath}"
extdirs=""
>
<classpath refid="test.build.classpath"/>
</javac>
<delete dir="${build_targetclassdir}"/>
</sequential>
</macrodef>
<target name="compile_targets">
<compile_targets target="${component.target}" bootclasspath="${component.bootclasspath}"/>
</target>
<macrodef name="test.setup">
<sequential/>
</macrodef>
<macrodef name="test.execute">
<!-- standard test task -->
<sequential>
<mkdir dir="${testlogdir}"/>
<junit fork="true" haltonerror="false">
<classpath location="${build_testclassdir}"/>
<classpath refid="test.build.classpath"/>
<classpath refid="cobertura.classpath"/>
<test name="${package}.AllTests" todir="${testlogdir}">
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
</test>
</junit>
</sequential>
</macrodef>
<macrodef name="coveragetest.execute">
<!-- standard test task -->
<sequential>
<mkdir dir="${testlogdir}"/>
<mkdir dir="${instrumented.dir}"/>
<delete file="${cobertura.datafile}"/>
<cobertura-instrument todir="${instrumented.dir}" datafile="${cobertura.datafile}">
<!-- all included -->
<fileset dir="${build_classdir}">
<include name="**/*.class"/>
</fileset>
</cobertura-instrument>
<junit fork="true" haltonerror="false">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}"/>
<classpath location="${instrumented.dir}"/>
<classpath location="${build_testclassdir}"/>
<classpath refid="test.build.classpath"/>
<classpath refid="cobertura.classpath"/>
<test name="${package}.AllTests" todir="${testlogdir}">
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
</test>
</junit>
</sequential>
</macrodef>
<macrodef name="test.teardown">
<sequential/>
</macrodef>
<target name="test" depends="compile_tests">
<test.setup/>
<test.execute/>
<test.teardown/>
</target>
<target name="coveragetest" depends="compile_tests">
<test.setup/>
<coveragetest.execute/>
<test.teardown/>
</target>
<target name="coveragereport" depends="coveragetest">
<cobertura-report format="html" destdir="${testlogdir}/coverage/" srcdir="${srcdir}"
datafile="${cobertura.datafile}">
<fileset dir="${javamain}">
<include name="**/*.java"/>
</fileset>
<fileset dir="${javatests}">
<include name="**/*.java"/>
</fileset>
</cobertura-report>
</target>
<target name="reports" depends="test">
<mkdir dir="${reports}"/>
<junitreport todir="${reports}">
<fileset dir="${testlogdir}">
<include name="*.xml"/>
</fileset>
<report format="frames" todir="${reports}"/>
</junitreport>
</target>
<target name="reports-all" depends="coveragereport,reports">
<echo>The execution of reports is complete. Reports are available in /${reports}</echo>
</target>
<target name="manifest">
<mkdir dir="${manifest_file_path}"/>
<manifest file="${manifest_file}">
<attribute name="Component-Vendor" value="TopCoder Inc."/>
<attribute name="Component-Name" value="${component}"/>
<attribute name="Component-Version" value="${component_version}.${component.version.build}"/>
</manifest>
</target>
<target name="dist" depends="compile, manifest">
<mkdir dir="${dist_lib}/${component_path}"/>
<jar jarfile="${component.jar}" manifest="${manifest_file}" basedir="${build_classdir}"/>
</target>
<target name="dist_tests" depends="compile_tests">
<mkdir dir="${dist_lib}"/>
<jar jarfile="${component.tests.jar}" basedir="${build_testclassdir}"/>
</target>
<target name="javadoc" depends="compile">
<mkdir dir="${dist_javadocs}"/>
<javadoc packagenames="${package}.*"
sourcepath="${javamain}"
classpath="${build_classdir}"
classpathref="buildlibs"
destdir="${dist_javadocs}"
windowtitle="Topcoder Software"
header="<table border=0 cellpadding=0 cellspacing=2><tr><td><font class=tcoder2>[ </font><font class=tcoder1>TOP</font><font class=tcoder2>CODER </font><font class=tcoder2>]</font></td><td><font class=tcoder4>™</font></td></tr><tr><td class=tcoder3 align=center><font class=tcoder3>SOFTWARE</font></td></tr></table>"
footer="<table border=0 cellpadding=0 cellspacing=2><tr><td><font class=tcoder2>[ </font><font class=tcoder1>TOP</font><font class=tcoder2>CODER </font><font class=tcoder2>]</font></td><td><font class=tcoder4>™</font></td></tr><tr><td class=tcoder3 align=center><font class=tcoder3>SOFTWARE</font></td></tr></table>"
bottom="<font class=tcoder5>Contact TopCoder Software at <a href='http://software.topcoder.com'>software.topcoder.com</a></font>"
stylesheetfile="${javadocsdir}/stylesheet.css"
locale="${javadoc.locale}"
verbose="${verbose}">
<tag name="copyright" description="Copyright:" scope="types"/>
</javadoc>
</target>
<target name="clean">
<delete dir="${builddir}"/>
</target>
<!-- ************************************************************************** -->
<!-- ************ DEPLOYMENT RELATED TARGETS ******************************* -->
<!-- ************************************************************************** -->
<macrodef name="deployCommand">
<!-- standard deploy command -->
<sequential>
<antcall target="dist"/>
</sequential>
</macrodef>
<target name="deploy">
<deployCommand/>
</target>
<target name="deploy-lib" depends="deploy,test">
<mkdir dir="${target_libdir}/${component_path}"/>
<copy file="${component.jar}" todir="${target_libdir}/${component_path}"/>
</target>
<target name="dist_tcs" depends="clean,dist,javadoc">
<!-- define tcs distribution format -->
<mkdir dir="${build_tcsdistdir}"/>
<copy todir="${build_tcsdistdir}">
<fileset dir="${basedir}">
<include name="${configdir}/**/*"/>
<include name="${docsdir}/**/*"/>
<include name="${srcdir}/**/*"/>
<include name="${testfiles}/**/*"/>
<include name="${test_reflib}/**/*"/>
<include name="build.version"/>
<include name="build-dependencies.xml"/>
<include name="README"/>
<include name="build.version"/>
</fileset>
</copy>
<copy file="build_dist.xml" tofile="${build_tcsdistdir}/build.xml"/>
<mkdir dir="${dist_coverage}"/>
<copy file="${testlogdir}/cobertura.ser" todir="${dist_docs}"/>
<copy todir="${dist_coverage}">
<fileset dir="${testlogdir}/coverage"/>
</copy>
<mkdir dir="${dist_javadocs}"/>
<copy todir="${dist_javadocs}">
<fileset dir="${javadocsdir}"/>
</copy>
<antcall target="package_docs"/>
<jar jarfile="${component.dist.jar}" basedir="${build_distdir}" manifest="${manifest_file}" excludes="*.jar"/>
<antcall target="move_to_tcs"/>
</target>
<target name="package_docs" depends="javadoc">
<mkdir dir="${dist_docpackage}"/>
<jar jarfile="${dist_docpackage}/${javadoc.jar}" basedir="${build_tcsdistdir}/${javadocsdir}"/>
<copy todir="${dist_docpackage}">
<fileset dir="${docsdir}" casesensitive="no">
<include name="${distfilename}_Class_Diagram*"/>
<include name="${distfilename}_Use_Case_Diagram*"/>
<include name="${distfilename}_Sequence_Diagram*"/>
<include name="${distfilename}_Requirements_Specification.pdf"/>
<include name="${distfilename}_Component_Specification.pdf"/>
</fileset>
</copy>
<jar jarfile="${builddir}/${docpackage.jar}" basedir="${dist_docpackage}"/>
</target>
<target name="move_to_tcs">
<mkdir dir="${target_libdir}/${component_path}"/>
<mkdir dir="${target_libdir}/${component_path}/dist"/>
<copy file="${component.jar}" todir="${target_libdir}/${component_path}"/>
<copy file="${component.dist.jar}" todir="${target_libdir}/${component_path}/dist"/>
</target>
<target name="dev_submission" depends="test">
<jar jarfile="${dev_submission.jar}"
basedir="."
includes="build-dependencies.xml,
README,
${configdir}/**,
${javamain}/**/*.java,
${javatests}/${packagedir}/**,
${testlogdir}/**,
${testfiles}/**,
${docsdir}/**,
${test_reflib}/**"
excludes="${javatests}/${packagedir}/AllTests.java,
${javatests}/${packagedir}/stresstests/*,
${javatests}/${packagedir}/failuretests/*,
${javatests}/${packagedir}/accuracytests/*"
/>
</target>
<target name="design_submission">
<jar jarfile="${design_submission.jar}"
basedir="."
includes="build-dependencies.xml,
${configdir}/**,
${javamain}/**,
${docsdir}/**,
${testfiles}/**"
/>
</target>
<target name="dev_dist">
<!-- copy TCS Dependencies -->
<jar jarfile="${dev_dist.jar}"
basedir="."
includes="build.xml,
README,
build.version,
build-dependencies.xml,
${configdir}/**,
${srcdir}/**,
${docsdir}/**,
${testfiles}/**"
/>
</target>
<target name="design_dist">
<jar jarfile="${design_dist.jar}"
basedir="."
includes="build.xml,
build.version,
build-dependencies.xml,
${configdir}/**,
${srcdir}/**,
${docsdir}/**,
${testfiles}/**"
/>
</target>
<!-- ************************************************************************** -->
<!-- ************ END DEPLOYMENT RELATED TARGETS *************************** -->
<!-- ************************************************************************** -->
<!-- Import the macro definitions used to override standard behaviour of
some of the targets of this build file. -->
<import file="${basedir}/build-override.xml" optional="true"/>
</project>
| {
"pile_set_name": "Github"
} |
/*
* FSEventsFix
*
* Works around a long-standing bug in realpath() that prevents FSEvents API from
* monitoring certain folders on a wide range of OS X releases (10.6-10.10 at least).
*
* The underlying issue is that for some folders, realpath() call starts returning
* a path with incorrect casing (e.g. "/users/smt" instead of "/Users/smt").
* FSEvents is case-sensitive and calls realpath() on the paths you pass in, so
* an incorrect value returned by realpath() prevents FSEvents from seeing any
* change events.
*
* See the discussion at https://github.com/thibaudgg/rb-fsevent/issues/10 about
* the history of this bug and how this library came to exist.
*
* This library uses Facebook's fishhook to replace a custom implementation of
* realpath in place of the system realpath; FSEvents will then invoke our custom
* implementation (which does not screw up the names) and will thus work correctly.
*
* Our implementation of realpath is based on the open-source implementation from
* OS X 10.10, with a single change applied (enclosed in "BEGIN WORKAROUND FOR
* OS X BUG" ... "END WORKAROUND FOR OS X BUG").
*
* Include FSEventsFix.{h,c} into your project and call FSEventsFixInstall().
*
* It is recommended that you install FSEventsFix on demand, using FSEventsFixIsBroken
* to check if the folder you're about to pass to FSEventStreamCreate needs the fix.
* Note that the fix must be applied before calling FSEventStreamCreate.
*
* FSEventsFixIsBroken requires a path that uses the correct case for all folder names,
* i.e. a path provided by the system APIs or constructed from folder names provided
* by the directory enumeration APIs.
*
* See .c file for license & copyrights, but basically this is available under a mix
* of MIT and BSD licenses.
*/
#ifndef __FSEventsFix__
#define __FSEventsFix__
#include <CoreFoundation/CoreFoundation.h>
/// A library version string (e.g. 1.2.3) for displaying and logging purposes
extern const char *const FSEventsFixVersionString;
/// See FSEventsFixDebugOptionSimulateBroken
#define FSEventsFixSimulatedBrokenFolderMarker "__!FSEventsBroken!__"
typedef CF_OPTIONS(unsigned, FSEventsFixDebugOptions) {
/// Always return an uppercase string from realpath
FSEventsFixDebugOptionUppercaseReturn = 0x01,
/// Log all calls to realpath using the logger configured via FSEventsFixConfigure
FSEventsFixDebugOptionLogCalls = 0x02,
/// In addition to the logging block (if any), log everything to stderr
FSEventsFixDebugOptionLogToStderr = 0x08,
/// Report paths containing FSEventsFixSimulatedBrokenFolderMarker as broken
FSEventsFixDebugOptionSimulateBroken = 0x10,
/// Repair paths containing FSEventsFixSimulatedBrokenFolderMarker by renaming them
FSEventsFixDebugOptionSimulateRepair = 0x20,
};
typedef CF_ENUM(int, FSEventsFixMessageType) {
/// Call logging requested via FSEventsFixDebugOptionLogCalls
FSEventsFixMessageTypeCall,
/// Results of actions like repair, and other pretty verbose, but notable, stuff.
FSEventsFixMessageTypeResult,
/// Enabled/disabled status change
FSEventsFixMessageTypeStatusChange,
/// Expected failure (treat as a warning)
FSEventsFixMessageTypeExpectedFailure,
/// Severe failure that most likely means that the library won't work
FSEventsFixMessageTypeFatalError
};
typedef CF_ENUM(int, FSEventsFixRepairStatus) {
FSEventsFixRepairStatusNotBroken,
FSEventsFixRepairStatusRepaired,
FSEventsFixRepairStatusFailed,
};
/// Note that the logging block can be called on any dispatch queue.
void FSEventsFixConfigure(FSEventsFixDebugOptions debugOptions, void(^loggingBlock)(FSEventsFixMessageType type, const char *message));
void FSEventsFixEnable();
void FSEventsFixDisable();
bool FSEventsFixIsOperational();
bool FSEventsFixIsBroken(const char *path);
/// If the path is broken, returns a string identifying the root broken folder,
/// otherwise, returns NULL. You need to free() the returned string.
char *FSEventsFixCopyRootBrokenFolderPath(const char *path);
FSEventsFixRepairStatus FSEventsFixRepairIfNeeded(const char *path);
#endif
| {
"pile_set_name": "Github"
} |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React, { FunctionComponent } from 'react';
import { EuiSuperSelect } from '../../form';
import { CommonProps } from '../../common';
import { getLinearGradient, getFixedLinearGradient } from '../utils';
import { ColorStop } from '../color_stops';
import { EuiSuperSelectProps } from '../../form/super_select';
export interface EuiColorPalettePickerPaletteTextProps extends CommonProps {
/**
* For storing unique value of item
*/
value: string;
/**
* The name of your palette
*/
title: string;
/**
* `text`: a text only option (a title is required).
*/
type: 'text';
/**
* Array of color `strings` or `ColorStops` in the form of
* `{ stop: number, color: string }`. The stops must be numbers in an ordered range.
*/
palette?: string[] | ColorStop[];
}
export interface EuiColorPalettePickerPaletteFixedProps extends CommonProps {
/**
* For storing unique value of item
*/
value: string;
/**
* The name of your palette
*/
title?: string;
/**
* `fixed`: individual color blocks
*/
type: 'fixed';
/**
* Array of color `strings`.
*/
palette: string[];
}
export interface EuiColorPalettePickerPaletteGradientProps extends CommonProps {
/**
* For storing unique value of item
*/
value: string;
/**
* The name of your palette
*/
title?: string;
/**
* `gradient`: each color fades into the next
*/
type: 'gradient';
/**
* Array of color `strings` or `ColorStops` in the form of
* `{ stop: number, color: string }`. The stops must be numbers in an ordered range.
*/
palette: string[] | ColorStop[];
}
export type EuiColorPalettePickerPaletteProps =
| EuiColorPalettePickerPaletteTextProps
| EuiColorPalettePickerPaletteFixedProps
| EuiColorPalettePickerPaletteGradientProps;
export type EuiColorPalettePickerProps<T extends string> = CommonProps &
Omit<
EuiSuperSelectProps<T>,
'options' | 'itemLayoutAlign' | 'hasDividers'
> & {
/**
* Specify what should be displayed after a selection: a `palette` or `title`
*/
selectionDisplay?: 'palette' | 'title';
/**
* An array of one of the following objects: #EuiColorPalettePickerPaletteText, #EuiColorPalettePickerPaletteFixed, #EuiColorPalettePickerPaletteGradient
*/
palettes: EuiColorPalettePickerPaletteProps[];
};
export const EuiColorPalettePicker: FunctionComponent<EuiColorPalettePickerProps<
string
>> = ({
className,
compressed = false,
disabled,
fullWidth = false,
isInvalid = false,
onChange,
readOnly = false,
valueOfSelected,
palettes,
append,
prepend,
selectionDisplay = 'palette',
...rest
}) => {
const getPalette = (
item:
| EuiColorPalettePickerPaletteFixedProps
| EuiColorPalettePickerPaletteGradientProps
) => {
const background =
item.type === 'fixed'
? getFixedLinearGradient(item.palette)
: getLinearGradient(item.palette);
return (
<div
className="euiColorPalettePicker__itemGradient"
style={{ background }}
/>
);
};
const paletteOptions = palettes.map(
(item: EuiColorPalettePickerPaletteProps) => {
const { type, value, title, palette, ...rest } = item;
const paletteForDisplay = item.type !== 'text' ? getPalette(item) : null;
return {
value: String(value),
inputDisplay:
selectionDisplay === 'title' || type === 'text'
? title
: paletteForDisplay,
dropdownDisplay: (
<div className="euiColorPalettePicker__item">
{title && type !== 'text' && (
<div className="euiColorPalettePicker__itemTitle">{title}</div>
)}
{type === 'text' ? title : paletteForDisplay}
</div>
),
...rest,
};
}
);
return (
<EuiSuperSelect
className={className}
options={paletteOptions}
valueOfSelected={valueOfSelected}
onChange={onChange}
hasDividers
isInvalid={isInvalid}
compressed={compressed}
disabled={disabled}
readOnly={readOnly}
fullWidth={fullWidth}
append={append}
prepend={prepend}
{...rest}
/>
);
};
| {
"pile_set_name": "Github"
} |
#define LineTypeSolid 0.0
#define LineTypeDash 1.0
#define Animate 0.0
attribute vec4 a_Color;
attribute vec3 a_Position;
attribute vec4 a_Instance;
attribute float a_Size;
uniform mat4 u_ModelMatrix;
uniform float segmentNumber;
uniform vec4 u_aimate: [ 0, 2., 1.0, 0.2 ];
varying vec4 v_color;
varying vec2 v_normal;
varying float v_distance_ratio;
uniform float u_line_type: 0.0;
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
varying vec4 v_dash_array;
#pragma include "projection"
#pragma include "project"
#pragma include "picking"
float maps (float value, float start1, float stop1, float start2, float stop2) {
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
}
float getSegmentRatio(float index) {
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
}
float paraboloid(vec2 source, vec2 target, float ratio) {
vec2 x = mix(source, target, ratio);
vec2 center = mix(source, target, 0.5);
float dSourceCenter = distance(source, center);
float dXCenter = distance(x, center);
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
}
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
float vertex_height = paraboloid(source, target, segmentRatio);
return vec3(
mix(source, target, segmentRatio),
sqrt(max(0.0, vertex_height))
);
}
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
// normalized direction of the line
vec2 dir_screenspace = normalize(line_clipspace);
// rotate by 90 degrees
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
return offset * vec2(1.0, -1.0);
}
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
// normalized direction of the line
vec2 dir_screenspace = normalize(line_clipspace);
// rotate by 90 degrees
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
}
float getAngularDist (vec2 source, vec2 target) {
vec2 delta = source - target;
vec2 sin_half_delta = sin(delta / 2.0);
float a =
sin_half_delta.y * sin_half_delta.y +
cos(source.y) * cos(target.y) *
sin_half_delta.x * sin_half_delta.x;
return 2.0 * atan(sqrt(a), sqrt(1.0 - a));
}
vec2 interpolate (vec2 source, vec2 target, float angularDist, float t) {
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
if(abs(angularDist - PI) < 0.001) {
return (1.0 - t) * source + t * target;
}
float a = sin((1.0 - t) * angularDist) / sin(angularDist);
float b = sin(t * angularDist) / sin(angularDist);
vec2 sin_source = sin(source);
vec2 cos_source = cos(source);
vec2 sin_target = sin(target);
vec2 cos_target = cos(target);
float x = a * cos_source.y * cos_source.x + b * cos_target.y * cos_target.x;
float y = a * cos_source.y * sin_source.x + b * cos_target.y * sin_target.x;
float z = a * sin_source.y + b * sin_target.y;
return vec2(atan(y, x), atan(z, sqrt(x * x + y * y)));
}
void main() {
v_color = a_Color;
vec2 source = radians(a_Instance.rg);
vec2 target = radians(a_Instance.ba);
float angularDist = getAngularDist(source, target);
float segmentIndex = a_Position.x;
float segmentRatio = getSegmentRatio(segmentIndex);
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
if(u_line_type == LineTypeDash) {
v_distance_ratio = segmentIndex / segmentNumber;
float total_Distance = pixelDistance(a_Instance.rg, a_Instance.ba);
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);
}
if(u_aimate.x == Animate) {
v_distance_ratio = segmentIndex / segmentNumber;
}
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
v_distance_ratio = segmentIndex / segmentNumber;
vec4 curr = project_position(vec4(degrees(interpolate(source, target, angularDist, segmentRatio)), 0.0, 1.0));
vec4 next = project_position(vec4(degrees(interpolate(source, target, angularDist, nextSegmentRatio)), 0.0, 1.0));
v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));
// vec4 project_pos = project_position(vec4(curr.xy, 0, 1.0));
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0));
setPickingColor(a_PickingColor);
}
| {
"pile_set_name": "Github"
} |
{{- if (not .Values.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "redmine.fullname" . }}
labels: {{- include "redmine.labels" . | nindent 4 }}
type: Opaque
data:
{{- if .Values.redminePassword }}
redmine-password: {{ default "" .Values.redminePassword | b64enc | quote }}
{{- else }}
redmine-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
{{- if or (and (eq .Values.databaseType "mariadb") (not .Values.mariadb.enabled)) (and (eq .Values.databaseType "postgresql") (not .Values.postgresql.enabled)) }}
{{- if .Values.externalDatabase.password }}
external-db-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
{{- else }}
external-db-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
{{- end }}
{{- if and .Values.mailReceiver.enabled .Values.mailReceiver.password }}
mail-receiver-password: {{ default "" .Values.mailReceiver.password | b64enc | quote }}
{{- end }}
{{- end }}
| {
"pile_set_name": "Github"
} |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'freeimu_cal.ui'
#
# Created: Mon Dec 17 17:22:26 2012
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_FreeIMUCal(object):
def setupUi(self, FreeIMUCal):
FreeIMUCal.setObjectName(_fromUtf8("FreeIMUCal"))
FreeIMUCal.resize(800, 680)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(FreeIMUCal.sizePolicy().hasHeightForWidth())
FreeIMUCal.setSizePolicy(sizePolicy)
FreeIMUCal.setMinimumSize(QtCore.QSize(800, 600))
FreeIMUCal.setMaximumSize(QtCore.QSize(800, 680))
FreeIMUCal.setDocumentMode(False)
self.centralwidget = QtGui.QWidget(FreeIMUCal)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.line = QtGui.QFrame(self.centralwidget)
self.line.setGeometry(QtCore.QRect(10, 20, 791, 16))
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.gridLayoutWidget = QtGui.QWidget(self.centralwidget)
self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 25))
self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget"))
self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.gridLayout.setMargin(0)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.line_2 = QtGui.QFrame(self.gridLayoutWidget)
self.line_2.setFrameShape(QtGui.QFrame.VLine)
self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
self.line_2.setObjectName(_fromUtf8("line_2"))
self.gridLayout.addWidget(self.line_2, 0, 4, 1, 1)
self.samplingToggleButton = QtGui.QPushButton(self.gridLayoutWidget)
self.samplingToggleButton.setEnabled(False)
self.samplingToggleButton.setAutoDefault(False)
self.samplingToggleButton.setDefault(False)
self.samplingToggleButton.setFlat(False)
self.samplingToggleButton.setObjectName(_fromUtf8("samplingToggleButton"))
self.gridLayout.addWidget(self.samplingToggleButton, 0, 7, 1, 1)
self.serialPortEdit = QtGui.QLineEdit(self.gridLayoutWidget)
self.serialPortEdit.setObjectName(_fromUtf8("serialPortEdit"))
self.gridLayout.addWidget(self.serialPortEdit, 0, 1, 1, 1)
self.calibrateButton = QtGui.QPushButton(self.gridLayoutWidget)
self.calibrateButton.setEnabled(False)
self.calibrateButton.setObjectName(_fromUtf8("calibrateButton"))
self.gridLayout.addWidget(self.calibrateButton, 0, 9, 1, 1)
self.label = QtGui.QLabel(self.gridLayoutWidget)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.calAlgorithmComboBox = QtGui.QComboBox(self.gridLayoutWidget)
self.calAlgorithmComboBox.setEnabled(False)
self.calAlgorithmComboBox.setObjectName(_fromUtf8("calAlgorithmComboBox"))
self.calAlgorithmComboBox.addItem(_fromUtf8(""))
self.gridLayout.addWidget(self.calAlgorithmComboBox, 0, 8, 1, 1)
self.connectButton = QtGui.QPushButton(self.gridLayoutWidget)
self.connectButton.setObjectName(_fromUtf8("connectButton"))
self.gridLayout.addWidget(self.connectButton, 0, 3, 1, 1)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 0, 6, 1, 1)
self.serialProtocol = QtGui.QComboBox(self.gridLayoutWidget)
self.serialProtocol.setEnabled(True)
self.serialProtocol.setObjectName(_fromUtf8("serialProtocol"))
self.serialProtocol.addItem(_fromUtf8(""))
self.gridLayout.addWidget(self.serialProtocol, 0, 2, 1, 1)
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(0, 30, 801, 631))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.uncalibratedTab = QtGui.QWidget()
self.uncalibratedTab.setObjectName(_fromUtf8("uncalibratedTab"))
self.gridLayoutWidget_4 = QtGui.QWidget(self.uncalibratedTab)
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 10, 791, 588))
self.gridLayoutWidget_4.setObjectName(_fromUtf8("gridLayoutWidget_4"))
self.gridLayout_4 = QtGui.QGridLayout(self.gridLayoutWidget_4)
self.gridLayout_4.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
self.gridLayout_4.setMargin(0)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
self.gridLayout_5 = QtGui.QGridLayout()
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.label_2 = QtGui.QLabel(self.gridLayoutWidget_4)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout_5.addWidget(self.label_2, 0, 1, 1, 1)
self.accYZ = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accYZ.sizePolicy().hasHeightForWidth())
self.accYZ.setSizePolicy(sizePolicy)
self.accYZ.setObjectName(_fromUtf8("accYZ"))
self.gridLayout_5.addWidget(self.accYZ, 1, 0, 1, 1)
self.accZX = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accZX.sizePolicy().hasHeightForWidth())
self.accZX.setSizePolicy(sizePolicy)
self.accZX.setObjectName(_fromUtf8("accZX"))
self.gridLayout_5.addWidget(self.accZX, 1, 1, 1, 1)
self.accXY = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accXY.sizePolicy().hasHeightForWidth())
self.accXY.setSizePolicy(sizePolicy)
self.accXY.setObjectName(_fromUtf8("accXY"))
self.gridLayout_5.addWidget(self.accXY, 0, 0, 1, 1)
self.gridLayout_4.addLayout(self.gridLayout_5, 1, 0, 1, 1)
self.gridLayout_3 = QtGui.QGridLayout()
self.gridLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.magnXY = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnXY.sizePolicy().hasHeightForWidth())
self.magnXY.setSizePolicy(sizePolicy)
self.magnXY.setObjectName(_fromUtf8("magnXY"))
self.gridLayout_3.addWidget(self.magnXY, 0, 0, 1, 1)
self.magnYZ = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnYZ.sizePolicy().hasHeightForWidth())
self.magnYZ.setSizePolicy(sizePolicy)
self.magnYZ.setObjectName(_fromUtf8("magnYZ"))
self.gridLayout_3.addWidget(self.magnYZ, 1, 0, 1, 1)
self.magnZX = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnZX.sizePolicy().hasHeightForWidth())
self.magnZX.setSizePolicy(sizePolicy)
self.magnZX.setObjectName(_fromUtf8("magnZX"))
self.gridLayout_3.addWidget(self.magnZX, 1, 1, 1, 1)
self.label_3 = QtGui.QLabel(self.gridLayoutWidget_4)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout_3.addWidget(self.label_3, 0, 1, 1, 1)
self.gridLayout_4.addLayout(self.gridLayout_3, 1, 2, 1, 1)
self.magn3D = GLViewWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.magn3D.sizePolicy().hasHeightForWidth())
self.magn3D.setSizePolicy(sizePolicy)
self.magn3D.setObjectName(_fromUtf8("magn3D"))
self.gridLayout_4.addWidget(self.magn3D, 0, 2, 1, 1)
self.acc3D = GLViewWidget(self.gridLayoutWidget_4)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.acc3D.sizePolicy().hasHeightForWidth())
self.acc3D.setSizePolicy(sizePolicy)
self.acc3D.setObjectName(_fromUtf8("acc3D"))
self.gridLayout_4.addWidget(self.acc3D, 0, 0, 1, 1)
self.line_3 = QtGui.QFrame(self.gridLayoutWidget_4)
self.line_3.setLineWidth(1)
self.line_3.setFrameShape(QtGui.QFrame.VLine)
self.line_3.setFrameShadow(QtGui.QFrame.Sunken)
self.line_3.setObjectName(_fromUtf8("line_3"))
self.gridLayout_4.addWidget(self.line_3, 1, 1, 1, 1)
self.tabWidget.addTab(self.uncalibratedTab, _fromUtf8(""))
self.calibratedTab = QtGui.QWidget()
self.calibratedTab.setObjectName(_fromUtf8("calibratedTab"))
self.horizontalLayoutWidget = QtGui.QWidget(self.calibratedTab)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 380, 791, 181))
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.groupBox = QtGui.QGroupBox(self.horizontalLayoutWidget)
self.groupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox.setFlat(False)
self.groupBox.setCheckable(False)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.layoutWidget = QtGui.QWidget(self.groupBox)
self.layoutWidget.setGeometry(QtCore.QRect(10, 20, 381, 154))
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
self.formLayout_3 = QtGui.QFormLayout(self.layoutWidget)
self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetNoConstraint)
self.formLayout_3.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout_3.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.formLayout_3.setMargin(0)
self.formLayout_3.setObjectName(_fromUtf8("formLayout_3"))
self.label_14 = QtGui.QLabel(self.layoutWidget)
self.label_14.setObjectName(_fromUtf8("label_14"))
self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_14)
self.calRes_acc_OSx = QtGui.QLineEdit(self.layoutWidget)
self.calRes_acc_OSx.setObjectName(_fromUtf8("calRes_acc_OSx"))
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.calRes_acc_OSx)
self.label_15 = QtGui.QLabel(self.layoutWidget)
self.label_15.setObjectName(_fromUtf8("label_15"))
self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_15)
self.calRes_acc_OSy = QtGui.QLineEdit(self.layoutWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.calRes_acc_OSy.sizePolicy().hasHeightForWidth())
self.calRes_acc_OSy.setSizePolicy(sizePolicy)
self.calRes_acc_OSy.setObjectName(_fromUtf8("calRes_acc_OSy"))
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.calRes_acc_OSy)
self.label_16 = QtGui.QLabel(self.layoutWidget)
self.label_16.setObjectName(_fromUtf8("label_16"))
self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_16)
self.calRes_acc_OSz = QtGui.QLineEdit(self.layoutWidget)
self.calRes_acc_OSz.setObjectName(_fromUtf8("calRes_acc_OSz"))
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.calRes_acc_OSz)
self.label_17 = QtGui.QLabel(self.layoutWidget)
self.label_17.setObjectName(_fromUtf8("label_17"))
self.formLayout_3.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_17)
self.calRes_acc_SCx = QtGui.QLineEdit(self.layoutWidget)
self.calRes_acc_SCx.setObjectName(_fromUtf8("calRes_acc_SCx"))
self.formLayout_3.setWidget(3, QtGui.QFormLayout.FieldRole, self.calRes_acc_SCx)
self.label_18 = QtGui.QLabel(self.layoutWidget)
self.label_18.setObjectName(_fromUtf8("label_18"))
self.formLayout_3.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_18)
self.calRes_acc_SCy = QtGui.QLineEdit(self.layoutWidget)
self.calRes_acc_SCy.setObjectName(_fromUtf8("calRes_acc_SCy"))
self.formLayout_3.setWidget(4, QtGui.QFormLayout.FieldRole, self.calRes_acc_SCy)
self.label_19 = QtGui.QLabel(self.layoutWidget)
self.label_19.setObjectName(_fromUtf8("label_19"))
self.formLayout_3.setWidget(5, QtGui.QFormLayout.LabelRole, self.label_19)
self.calRes_acc_SCz = QtGui.QLineEdit(self.layoutWidget)
self.calRes_acc_SCz.setObjectName(_fromUtf8("calRes_acc_SCz"))
self.formLayout_3.setWidget(5, QtGui.QFormLayout.FieldRole, self.calRes_acc_SCz)
self.horizontalLayout.addWidget(self.groupBox)
self.groupBox_2 = QtGui.QGroupBox(self.horizontalLayoutWidget)
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
self.layoutWidget_2 = QtGui.QWidget(self.groupBox_2)
self.layoutWidget_2.setGeometry(QtCore.QRect(10, 20, 381, 154))
self.layoutWidget_2.setObjectName(_fromUtf8("layoutWidget_2"))
self.formLayout_5 = QtGui.QFormLayout(self.layoutWidget_2)
self.formLayout_5.setSizeConstraint(QtGui.QLayout.SetNoConstraint)
self.formLayout_5.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout_5.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.formLayout_5.setMargin(0)
self.formLayout_5.setObjectName(_fromUtf8("formLayout_5"))
self.label_27 = QtGui.QLabel(self.layoutWidget_2)
self.label_27.setObjectName(_fromUtf8("label_27"))
self.formLayout_5.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_27)
self.calRes_magn_OSx = QtGui.QLineEdit(self.layoutWidget_2)
self.calRes_magn_OSx.setObjectName(_fromUtf8("calRes_magn_OSx"))
self.formLayout_5.setWidget(0, QtGui.QFormLayout.FieldRole, self.calRes_magn_OSx)
self.label_28 = QtGui.QLabel(self.layoutWidget_2)
self.label_28.setObjectName(_fromUtf8("label_28"))
self.formLayout_5.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_28)
self.calRes_magn_OSy = QtGui.QLineEdit(self.layoutWidget_2)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.calRes_magn_OSy.sizePolicy().hasHeightForWidth())
self.calRes_magn_OSy.setSizePolicy(sizePolicy)
self.calRes_magn_OSy.setObjectName(_fromUtf8("calRes_magn_OSy"))
self.formLayout_5.setWidget(1, QtGui.QFormLayout.FieldRole, self.calRes_magn_OSy)
self.label_29 = QtGui.QLabel(self.layoutWidget_2)
self.label_29.setObjectName(_fromUtf8("label_29"))
self.formLayout_5.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_29)
self.calRes_magn_OSz = QtGui.QLineEdit(self.layoutWidget_2)
self.calRes_magn_OSz.setObjectName(_fromUtf8("calRes_magn_OSz"))
self.formLayout_5.setWidget(2, QtGui.QFormLayout.FieldRole, self.calRes_magn_OSz)
self.label_30 = QtGui.QLabel(self.layoutWidget_2)
self.label_30.setObjectName(_fromUtf8("label_30"))
self.formLayout_5.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_30)
self.calRes_magn_SCx = QtGui.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCx.setObjectName(_fromUtf8("calRes_magn_SCx"))
self.formLayout_5.setWidget(3, QtGui.QFormLayout.FieldRole, self.calRes_magn_SCx)
self.label_31 = QtGui.QLabel(self.layoutWidget_2)
self.label_31.setObjectName(_fromUtf8("label_31"))
self.formLayout_5.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_31)
self.calRes_magn_SCy = QtGui.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCy.setObjectName(_fromUtf8("calRes_magn_SCy"))
self.formLayout_5.setWidget(4, QtGui.QFormLayout.FieldRole, self.calRes_magn_SCy)
self.label_32 = QtGui.QLabel(self.layoutWidget_2)
self.label_32.setObjectName(_fromUtf8("label_32"))
self.formLayout_5.setWidget(5, QtGui.QFormLayout.LabelRole, self.label_32)
self.calRes_magn_SCz = QtGui.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCz.setObjectName(_fromUtf8("calRes_magn_SCz"))
self.formLayout_5.setWidget(5, QtGui.QFormLayout.FieldRole, self.calRes_magn_SCz)
self.horizontalLayout.addWidget(self.groupBox_2)
self.horizontalLayoutWidget_2 = QtGui.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(488, 560, 301, 31))
self.horizontalLayoutWidget_2.setObjectName(_fromUtf8("horizontalLayoutWidget_2"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setMargin(0)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.saveCalibrationEEPROMButton = QtGui.QPushButton(self.horizontalLayoutWidget_2)
self.saveCalibrationEEPROMButton.setEnabled(False)
self.saveCalibrationEEPROMButton.setObjectName(_fromUtf8("saveCalibrationEEPROMButton"))
self.horizontalLayout_2.addWidget(self.saveCalibrationEEPROMButton)
self.saveCalibrationHeaderButton = QtGui.QPushButton(self.horizontalLayoutWidget_2)
self.saveCalibrationHeaderButton.setEnabled(False)
self.saveCalibrationHeaderButton.setObjectName(_fromUtf8("saveCalibrationHeaderButton"))
self.horizontalLayout_2.addWidget(self.saveCalibrationHeaderButton)
self.horizontalLayoutWidget_3 = QtGui.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 791, 381))
self.horizontalLayoutWidget_3.setObjectName(_fromUtf8("horizontalLayoutWidget_3"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_3)
self.horizontalLayout_3.setMargin(0)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.tabWidget_2 = QtGui.QTabWidget(self.horizontalLayoutWidget_3)
self.tabWidget_2.setTabPosition(QtGui.QTabWidget.South)
self.tabWidget_2.setTabShape(QtGui.QTabWidget.Rounded)
self.tabWidget_2.setUsesScrollButtons(True)
self.tabWidget_2.setDocumentMode(False)
self.tabWidget_2.setTabsClosable(False)
self.tabWidget_2.setMovable(False)
self.tabWidget_2.setObjectName(_fromUtf8("tabWidget_2"))
self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.accXY_cal = PlotWidget(self.tab)
self.accXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accXY_cal.sizePolicy().hasHeightForWidth())
self.accXY_cal.setSizePolicy(sizePolicy)
self.accXY_cal.setObjectName(_fromUtf8("accXY_cal"))
self.tabWidget_2.addTab(self.tab, _fromUtf8(""))
self.tab_4 = QtGui.QWidget()
self.tab_4.setObjectName(_fromUtf8("tab_4"))
self.accYZ_cal = PlotWidget(self.tab_4)
self.accYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accYZ_cal.sizePolicy().hasHeightForWidth())
self.accYZ_cal.setSizePolicy(sizePolicy)
self.accYZ_cal.setObjectName(_fromUtf8("accYZ_cal"))
self.tabWidget_2.addTab(self.tab_4, _fromUtf8(""))
self.tab_3 = QtGui.QWidget()
self.tab_3.setObjectName(_fromUtf8("tab_3"))
self.accZX_cal = PlotWidget(self.tab_3)
self.accZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accZX_cal.sizePolicy().hasHeightForWidth())
self.accZX_cal.setSizePolicy(sizePolicy)
self.accZX_cal.setObjectName(_fromUtf8("accZX_cal"))
self.tabWidget_2.addTab(self.tab_3, _fromUtf8(""))
self.tab_7 = QtGui.QWidget()
self.tab_7.setObjectName(_fromUtf8("tab_7"))
self.acc3D_cal = GLViewWidget(self.tab_7)
self.acc3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.acc3D_cal.sizePolicy().hasHeightForWidth())
self.acc3D_cal.setSizePolicy(sizePolicy)
self.acc3D_cal.setObjectName(_fromUtf8("acc3D_cal"))
self.tabWidget_2.addTab(self.tab_7, _fromUtf8(""))
self.horizontalLayout_3.addWidget(self.tabWidget_2)
self.tabWidget_3 = QtGui.QTabWidget(self.horizontalLayoutWidget_3)
self.tabWidget_3.setTabPosition(QtGui.QTabWidget.South)
self.tabWidget_3.setTabShape(QtGui.QTabWidget.Rounded)
self.tabWidget_3.setUsesScrollButtons(True)
self.tabWidget_3.setDocumentMode(False)
self.tabWidget_3.setTabsClosable(False)
self.tabWidget_3.setMovable(False)
self.tabWidget_3.setObjectName(_fromUtf8("tabWidget_3"))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.magnXY_cal = PlotWidget(self.tab_2)
self.magnXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnXY_cal.sizePolicy().hasHeightForWidth())
self.magnXY_cal.setSizePolicy(sizePolicy)
self.magnXY_cal.setObjectName(_fromUtf8("magnXY_cal"))
self.tabWidget_3.addTab(self.tab_2, _fromUtf8(""))
self.tab_5 = QtGui.QWidget()
self.tab_5.setObjectName(_fromUtf8("tab_5"))
self.magnYZ_cal = PlotWidget(self.tab_5)
self.magnYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnYZ_cal.sizePolicy().hasHeightForWidth())
self.magnYZ_cal.setSizePolicy(sizePolicy)
self.magnYZ_cal.setObjectName(_fromUtf8("magnYZ_cal"))
self.tabWidget_3.addTab(self.tab_5, _fromUtf8(""))
self.tab_6 = QtGui.QWidget()
self.tab_6.setObjectName(_fromUtf8("tab_6"))
self.magnZX_cal = PlotWidget(self.tab_6)
self.magnZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnZX_cal.sizePolicy().hasHeightForWidth())
self.magnZX_cal.setSizePolicy(sizePolicy)
self.magnZX_cal.setObjectName(_fromUtf8("magnZX_cal"))
self.tabWidget_3.addTab(self.tab_6, _fromUtf8(""))
self.tab_8 = QtGui.QWidget()
self.tab_8.setObjectName(_fromUtf8("tab_8"))
self.magn3D_cal = GLViewWidget(self.tab_8)
self.magn3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.magn3D_cal.sizePolicy().hasHeightForWidth())
self.magn3D_cal.setSizePolicy(sizePolicy)
self.magn3D_cal.setObjectName(_fromUtf8("magn3D_cal"))
self.tabWidget_3.addTab(self.tab_8, _fromUtf8(""))
self.horizontalLayout_3.addWidget(self.tabWidget_3)
self.horizontalLayoutWidget_4 = QtGui.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(0, 560, 161, 31))
self.horizontalLayoutWidget_4.setObjectName(_fromUtf8("horizontalLayoutWidget_4"))
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_4)
self.horizontalLayout_4.setMargin(0)
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.clearCalibrationEEPROMButton = QtGui.QPushButton(self.horizontalLayoutWidget_4)
self.clearCalibrationEEPROMButton.setEnabled(False)
self.clearCalibrationEEPROMButton.setObjectName(_fromUtf8("clearCalibrationEEPROMButton"))
self.horizontalLayout_4.addWidget(self.clearCalibrationEEPROMButton)
self.tabWidget.addTab(self.calibratedTab, _fromUtf8(""))
self.tab_9 = QtGui.QWidget()
self.tab_9.setObjectName(_fromUtf8("tab_9"))
self.label_4 = QtGui.QLabel(self.tab_9)
self.label_4.setGeometry(QtCore.QRect(290, 270, 261, 16))
self.label_4.setObjectName(_fromUtf8("label_4"))
self.tabWidget.addTab(self.tab_9, _fromUtf8(""))
FreeIMUCal.setCentralWidget(self.centralwidget)
self.statusbar = QtGui.QStatusBar(FreeIMUCal)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
FreeIMUCal.setStatusBar(self.statusbar)
self.retranslateUi(FreeIMUCal)
self.tabWidget.setCurrentIndex(0)
self.tabWidget_2.setCurrentIndex(0)
self.tabWidget_3.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(FreeIMUCal)
def retranslateUi(self, FreeIMUCal):
FreeIMUCal.setWindowTitle(_translate("FreeIMUCal", "FreeIMU Calibration Application", None))
self.samplingToggleButton.setToolTip(_translate("FreeIMUCal", "Toggle Start/Stop sampling of sensor data from the IMU", None))
self.samplingToggleButton.setText(_translate("FreeIMUCal", "Start Sampling", None))
self.calibrateButton.setToolTip(_translate("FreeIMUCal", "Run calibration algorithm over the data collected", None))
self.calibrateButton.setText(_translate("FreeIMUCal", "Calibrate", None))
self.label.setText(_translate("FreeIMUCal", "Serial Port:", None))
self.calAlgorithmComboBox.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Calibration Algorithm used.</p></body></html>", None))
self.calAlgorithmComboBox.setItemText(0, _translate("FreeIMUCal", "Ellipsoid to Sphere", None))
self.connectButton.setToolTip(_translate("FreeIMUCal", "Connect or Disconnect from the Arduino", None))
self.connectButton.setText(_translate("FreeIMUCal", "Connect", None))
self.serialProtocol.setToolTip(_translate("FreeIMUCal", "Serial Protocol to Communicate with IMU", None))
self.serialProtocol.setItemText(0, _translate("FreeIMUCal", "FreeIMU_serial", None))
self.label_2.setText(_translate("FreeIMUCal", "Accelerometer", None))
self.label_3.setText(_translate("FreeIMUCal", "Magnetometer", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.uncalibratedTab), _translate("FreeIMUCal", "Uncalibrated", None))
self.groupBox.setTitle(_translate("FreeIMUCal", "Accelerometer", None))
self.label_14.setText(_translate("FreeIMUCal", "Offset X", None))
self.label_15.setText(_translate("FreeIMUCal", "Offset Y", None))
self.label_16.setText(_translate("FreeIMUCal", "Offset Z", None))
self.label_17.setText(_translate("FreeIMUCal", "Scale X", None))
self.label_18.setText(_translate("FreeIMUCal", "Scale Y", None))
self.label_19.setText(_translate("FreeIMUCal", "Scale Z", None))
self.groupBox_2.setTitle(_translate("FreeIMUCal", "Magnetometer", None))
self.label_27.setText(_translate("FreeIMUCal", "Offset X", None))
self.label_28.setText(_translate("FreeIMUCal", "Offset Y", None))
self.label_29.setText(_translate("FreeIMUCal", "Offset Z", None))
self.label_30.setText(_translate("FreeIMUCal", "Scale X", None))
self.label_31.setText(_translate("FreeIMUCal", "Scale Y", None))
self.label_32.setText(_translate("FreeIMUCal", "Scale Z", None))
self.saveCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters to the microcontroller EEPROM", None))
self.saveCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Save to EEPROM", None))
self.saveCalibrationHeaderButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters in an header .h file. When such header is active the EEPROM calibration storage code is disabled thus saving program and data memory.", None))
self.saveCalibrationHeaderButton.setText(_translate("FreeIMUCal", "Save to calibration.h", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab), _translate("FreeIMUCal", "Acc XY", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), _translate("FreeIMUCal", "Acc YZ", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_3), _translate("FreeIMUCal", "Acc ZX", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_7), _translate("FreeIMUCal", "Acc 3D", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_2), _translate("FreeIMUCal", "Magn XY", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_5), _translate("FreeIMUCal", "Magn YZ", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_6), _translate("FreeIMUCal", "Magn ZX", None))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_8), _translate("FreeIMUCal", "Magn 3D", None))
self.clearCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Clear any calibration parameter from the microcontroller EEPROM</p></body></html>", None))
self.clearCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Clear EEPROM", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.calibratedTab), _translate("FreeIMUCal", "Calibrated", None))
self.label_4.setText(_translate("FreeIMUCal", "To Be Implemented", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_9), _translate("FreeIMUCal", "Orientation Sensing Test", None))
from pyqtgraph import PlotWidget
from pyqtgraph.opengl import GLViewWidget
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Dart test to catch error reporting bugs in class fields declarations.
// Should be an error because we have a function overriding a getter.
class A {
int get a {
return 10;
}
int a() {
return 1;
}
}
class Field6aNegativeTest {
static testMain() {
var a = new A();
}
}
main() {
Field6aNegativeTest.testMain();
}
| {
"pile_set_name": "Github"
} |
Metadata-Version: 2.0
Name: lxml
Version: 3.7.1
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
Home-page: http://lxml.de/
Author: lxml dev team
Author-email: [email protected]
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: C
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: cssselect
Requires-Dist: cssselect (>=0.7); extra == 'cssselect'
Provides-Extra: html5
Requires-Dist: html5lib; extra == 'html5'
Provides-Extra: htmlsoup
Requires-Dist: BeautifulSoup4; extra == 'htmlsoup'
Provides-Extra: source
Requires-Dist: Cython (>=0.20); extra == 'source'
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
provides safe and convenient access to these libraries using the ElementTree
API.
It extends the ElementTree API significantly to offer support for XPath,
RelaxNG, XML Schema, XSLT, C14N and much more.
To contact the project, go to the `project home page
<http://lxml.de/>`_ or see our bug tracker at
https://launchpad.net/lxml
In case you want to use the current in-development version of lxml,
you can get it from the github repository at
https://github.com/lxml/lxml . Note that this requires Cython to
build the sources, see the build instructions on the project home
page. To the same end, running ``easy_install lxml==dev`` will
install lxml from
https://github.com/lxml/lxml/tarball/master#egg=lxml-dev if you have
an appropriate version of Cython installed.
After an official release of a new stable series, bug fixes may become
available at
https://github.com/lxml/lxml/tree/lxml-3.7 .
Running ``easy_install lxml==3.7bugfix`` will install
the unreleased branch state from
https://github.com/lxml/lxml/tarball/lxml-3.7#egg=lxml-3.7bugfix
as soon as a maintenance branch has been established. Note that this
requires Cython to be installed at an appropriate version for the build.
3.7.1 (2016-12-23)
==================
* No source changes, issued only to solve problems with the
binary packages released for 3.7.0.
| {
"pile_set_name": "Github"
} |
/**
* Copyright (C) 2001-2020 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* 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 com.rapidminer.io.process.rules;
import com.rapidminer.gui.tools.VersionNumber;
import com.rapidminer.io.process.XMLImporter;
import com.rapidminer.operator.ExecutionUnit;
import com.rapidminer.operator.IOMultiplier;
import com.rapidminer.operator.IOMultiplyOperator;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorCreationException;
import com.rapidminer.operator.ports.InputPort;
import com.rapidminer.operator.ports.OutputPort;
import com.rapidminer.parameter.UndefinedParameterError;
import com.rapidminer.tools.I18N;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.OperatorService;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
/**
* Replaces the old {@link IOMultiplyOperator} by a number of {@link IOMultiplier}s.
*
* @author Simon Fischer
*
*/
public class ReplaceIOMultiplierRule extends AbstractGenericParseRule {
private static final VersionNumber APPLIES_UNTIL = new VersionNumber(5, 0, 0, null);
@Override
public String apply(final Operator oldMultiplier, VersionNumber processVersion, final XMLImporter importer) {
if (processVersion == null || processVersion.compareTo(APPLIES_UNTIL) < 0) {
if (oldMultiplier.getClass().equals(IOMultiplyOperator.class)) {
importer.doAfterAutoWire(new Runnable() {
@Override
public void run() {
int count = 0;
ExecutionUnit unit = oldMultiplier.getExecutionUnit();
int oldIndex = unit.getOperators().indexOf(oldMultiplier);
int numOutports;
try {
numOutports = oldMultiplier.getParameterAsInt(IOMultiplyOperator.PARAMETER_NUMBER_OF_COPIES) + 1;
} catch (UndefinedParameterError e) {
importer.addMessage("<div class=\"error\">Cannot replace <code>IOMultiplier</code>. Parameter <var>"
+ IOMultiplyOperator.PARAMETER_NUMBER_OF_COPIES + "</var> is not set.</div>");
return;
}
OutputPort[] sources = new OutputPort[oldMultiplier.getInputPorts().getNumberOfPorts()];
InputPort[][] sinks = new InputPort[oldMultiplier.getInputPorts().getNumberOfPorts()][numOutports];
// copy sources and destinations
for (int i = 0; i < sources.length; i++) {
InputPort in = oldMultiplier.getInputPorts().getPortByIndex(i);
if (in.isConnected()) {
sources[i] = in.getSource();
sources[i].lock();
for (int j = 0; j < numOutports; j++) {
sinks[i][j] = oldMultiplier.getOutputPorts().getPortByIndex(i * numOutports + j)
.getDestination();
if (sinks[i][j] != null) {
sinks[i][j].lock();
}
}
}
}
oldMultiplier.remove();
for (int i = 0; i < sources.length; i++) {
try {
if (sources[i] != null) {
IOMultiplier newMultiplier = OperatorService.createOperator(IOMultiplier.class);
unit.addOperator(newMultiplier, oldIndex);
count++;
newMultiplier.rename(oldMultiplier.getName() + "_" + count);
sources[i].connectTo(newMultiplier.getInputPorts().getPortByIndex(0));
for (int j = 0; j < numOutports; j++) {
if (sinks[i][j] != null) {
newMultiplier.getOutputPorts().getPortByIndex(j).connectTo(sinks[i][j]);
sinks[i][j].unlock();
}
}
sources[i].unlock();
}
} catch (OperatorCreationException e) {
importer.addMessage("<div class=\"error\">Cannot replace <code>IOMultiplier</code>. Cannot create <code>IOMultiplier2</code>.");
// LogService.getRoot().log(Level.WARNING,
// "Cannot create IOMultiplier2: " + e, e);
LogService
.getRoot()
.log(Level.WARNING,
I18N.getMessage(
LogService.getRoot().getResourceBundle(),
"com.rapidminer.io.process.rules.ReplaceIOMultiplierRule.creating_iomultiplier2_error",
e), e);
return;
}
}
importer.addMessage("Replaced <code>IOMultiplier</code> '<var>" + oldMultiplier.getName()
+ "</var>' by " + count + " <code>IOMultiplier2</code>.");
}
});
}
}
return null;
}
@Override
public List<String> getApplicableOperatorKeys() {
return Collections.singletonList("iomultiplier");
}
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* @file
* Defines an entity type.
*/
/**
* Implements hook_entity_info().
*/
function field_test_entity_info() {
// If requested, clear the field cache while this hook is being called. See
// testFieldInfoCache().
if (variable_get('field_test_clear_info_cache_in_hook_entity_info', FALSE)) {
field_info_cache_clear();
}
$bundles = variable_get('field_test_bundles', array('test_bundle' => array('label' => 'Test Bundle')));
$test_entity_modes = array(
'full' => array(
'label' => t('Full object'),
'custom settings' => TRUE,
),
'teaser' => array(
'label' => t('Teaser'),
'custom settings' => TRUE,
),
);
return array(
'test_entity' => array(
'label' => t('Test Entity'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'revision table' => 'test_entity_revision',
'entity keys' => array(
'id' => 'ftid',
'revision' => 'ftvid',
'bundle' => 'fttype',
),
'bundles' => $bundles,
'view modes' => $test_entity_modes,
),
// This entity type doesn't get form handling for now...
'test_cacheable_entity' => array(
'label' => t('Test Entity, cacheable'),
'fieldable' => TRUE,
'field cache' => TRUE,
'entity keys' => array(
'id' => 'ftid',
'revision' => 'ftvid',
'bundle' => 'fttype',
),
'bundles' => $bundles,
'view modes' => $test_entity_modes,
),
'test_entity_bundle_key' => array(
'label' => t('Test Entity with a bundle key.'),
'base table' => 'test_entity_bundle_key',
'fieldable' => TRUE,
'field cache' => FALSE,
'entity keys' => array(
'id' => 'ftid',
'bundle' => 'fttype',
),
'bundles' => array('bundle1' => array('label' => 'Bundle1'), 'bundle2' => array('label' => 'Bundle2')) + $bundles,
'view modes' => $test_entity_modes,
),
// In this case, the bundle key is not stored in the database.
'test_entity_bundle' => array(
'label' => t('Test Entity with a specified bundle.'),
'base table' => 'test_entity_bundle',
'fieldable' => TRUE,
'controller class' => 'TestEntityBundleController',
'field cache' => FALSE,
'entity keys' => array(
'id' => 'ftid',
'bundle' => 'fttype',
),
'bundles' => array('test_entity_2' => array('label' => 'Test entity 2')) + $bundles,
'view modes' => $test_entity_modes,
),
// @see EntityPropertiesTestCase::testEntityLabel()
'test_entity_no_label' => array(
'label' => t('Test entity without label'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'entity keys' => array(
'id' => 'ftid',
'revision' => 'ftvid',
'bundle' => 'fttype',
),
'bundles' => $bundles,
'view modes' => $test_entity_modes,
),
'test_entity_label' => array(
'label' => t('Test entity label'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'entity keys' => array(
'id' => 'ftid',
'revision' => 'ftvid',
'bundle' => 'fttype',
'label' => 'ftlabel',
),
'bundles' => $bundles,
'view modes' => $test_entity_modes,
),
'test_entity_label_callback' => array(
'label' => t('Test entity label callback'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'label callback' => 'field_test_entity_label_callback',
'entity keys' => array(
'id' => 'ftid',
'revision' => 'ftvid',
'bundle' => 'fttype',
),
'bundles' => $bundles,
'view modes' => $test_entity_modes,
),
);
}
/**
* Implements hook_entity_info_alter().
*/
function field_test_entity_info_alter(&$entity_info) {
// Enable/disable field_test as a translation handler.
foreach (field_test_entity_info_translatable() as $entity_type => $translatable) {
$entity_info[$entity_type]['translation']['field_test'] = $translatable;
}
// Disable locale as a translation handler.
foreach ($entity_info as $entity_type => $info) {
$entity_info[$entity_type]['translation']['locale'] = FALSE;
}
}
/**
* Helper function to enable entity translations.
*/
function field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL) {
drupal_static_reset('field_has_translation_handler');
$stored_value = &drupal_static(__FUNCTION__, array());
if (isset($entity_type)) {
$stored_value[$entity_type] = $translatable;
entity_info_cache_clear();
}
return $stored_value;
}
/**
* Creates a new bundle for test_entity entities.
*
* @param $bundle
* The machine-readable name of the bundle.
* @param $text
* The human-readable name of the bundle. If none is provided, the machine
* name will be used.
*/
function field_test_create_bundle($bundle, $text = NULL) {
$bundles = variable_get('field_test_bundles', array('test_bundle' => array('label' => 'Test Bundle')));
$bundles += array($bundle => array('label' => $text ? $text : $bundle));
variable_set('field_test_bundles', $bundles);
$info = field_test_entity_info();
foreach ($info as $type => $type_info) {
field_attach_create_bundle($type, $bundle);
}
}
/**
* Renames a bundle for test_entity entities.
*
* @param $bundle_old
* The machine-readable name of the bundle to rename.
* @param $bundle_new
* The new machine-readable name of the bundle.
*/
function field_test_rename_bundle($bundle_old, $bundle_new) {
$bundles = variable_get('field_test_bundles', array('test_bundle' => array('label' => 'Test Bundle')));
$bundles[$bundle_new] = $bundles[$bundle_old];
unset($bundles[$bundle_old]);
variable_set('field_test_bundles', $bundles);
$info = field_test_entity_info();
foreach ($info as $type => $type_info) {
field_attach_rename_bundle($type, $bundle_old, $bundle_new);
}
}
/**
* Deletes a bundle for test_entity objects.
*
* @param $bundle
* The machine-readable name of the bundle to delete.
*/
function field_test_delete_bundle($bundle) {
$bundles = variable_get('field_test_bundles', array('test_bundle' => array('label' => 'Test Bundle')));
unset($bundles[$bundle]);
variable_set('field_test_bundles', $bundles);
$info = field_test_entity_info();
foreach ($info as $type => $type_info) {
field_attach_delete_bundle($type, $bundle);
}
}
/**
* Creates a basic test_entity entity.
*/
function field_test_create_stub_entity($id = 1, $vid = 1, $bundle = 'test_bundle', $label = '') {
$entity = new stdClass();
// Only set id and vid properties if they don't come as NULL (creation form).
if (isset($id)) {
$entity->ftid = $id;
}
if (isset($vid)) {
$entity->ftvid = $vid;
}
$entity->fttype = $bundle;
$label = !empty($label) ? $label : $bundle . ' label';
$entity->ftlabel = $label;
return $entity;
}
/**
* Loads a test_entity.
*
* @param $ftid
* The id of the entity to load.
* @param $ftvid
* (Optional) The revision id of the entity to load. If not specified, the
* current revision will be used.
* @return
* The loaded entity.
*/
function field_test_entity_test_load($ftid, $ftvid = NULL) {
// Load basic strucure.
$query = db_select('test_entity', 'fte', array())
->condition('fte.ftid', $ftid);
if ($ftvid) {
$query->join('test_entity_revision', 'fter', 'fte.ftid = fter.ftid');
$query->addField('fte', 'ftid');
$query->addField('fte', 'fttype');
$query->addField('fter', 'ftvid');
$query->condition('fter.ftvid', $ftvid);
}
else {
$query->fields('fte');
}
$entities = $query->execute()->fetchAllAssoc('ftid');
// Attach fields.
if ($ftvid) {
field_attach_load_revision('test_entity', $entities);
}
else {
field_attach_load('test_entity', $entities);
}
return $entities[$ftid];
}
/**
* Saves a test_entity.
*
* A new entity is created if $entity->ftid and $entity->is_new are both empty.
* A new revision is created if $entity->revision is not empty.
*
* @param $entity
* The entity to save.
*/
function field_test_entity_save(&$entity) {
field_attach_presave('test_entity', $entity);
if (!isset($entity->is_new)) {
$entity->is_new = empty($entity->ftid);
}
if (!$entity->is_new && !empty($entity->revision)) {
$entity->old_ftvid = $entity->ftvid;
unset($entity->ftvid);
}
$update_entity = TRUE;
if ($entity->is_new) {
drupal_write_record('test_entity', $entity);
drupal_write_record('test_entity_revision', $entity);
$op = 'insert';
}
else {
drupal_write_record('test_entity', $entity, 'ftid');
if (!empty($entity->revision)) {
drupal_write_record('test_entity_revision', $entity);
}
else {
drupal_write_record('test_entity_revision', $entity, 'ftvid');
$update_entity = FALSE;
}
$op = 'update';
}
if ($update_entity) {
db_update('test_entity')
->fields(array('ftvid' => $entity->ftvid))
->condition('ftid', $entity->ftid)
->execute();
}
// Save fields.
$function = "field_attach_$op";
$function('test_entity', $entity);
}
/**
* Menu callback: displays the 'Add new test_entity' form.
*/
function field_test_entity_add($fttype) {
$fttype = str_replace('-', '_', $fttype);
$entity = (object)array('fttype' => $fttype);
drupal_set_title(t('Create test_entity @bundle', array('@bundle' => $fttype)), PASS_THROUGH);
return drupal_get_form('field_test_entity_form', $entity, TRUE);
}
/**
* Menu callback: displays the 'Edit exiisting test_entity' form.
*/
function field_test_entity_edit($entity) {
drupal_set_title(t('test_entity @ftid revision @ftvid', array('@ftid' => $entity->ftid, '@ftvid' => $entity->ftvid)), PASS_THROUGH);
return drupal_get_form('field_test_entity_form', $entity);
}
/**
* Test_entity form.
*/
function field_test_entity_form($form, &$form_state, $entity, $add = FALSE) {
// During initial form build, add the entity to the form state for use during
// form building and processing. During a rebuild, use what is in the form
// state.
if (!isset($form_state['test_entity'])) {
$form_state['test_entity'] = $entity;
}
else {
$entity = $form_state['test_entity'];
}
foreach (array('ftid', 'ftvid', 'fttype') as $key) {
$form[$key] = array(
'#type' => 'value',
'#value' => isset($entity->$key) ? $entity->$key : NULL,
);
}
// Add field widgets.
field_attach_form('test_entity', $entity, $form, $form_state);
if (!$add) {
$form['revision'] = array(
'#access' => user_access('administer field_test content'),
'#type' => 'checkbox',
'#title' => t('Create new revision'),
'#default_value' => FALSE,
'#weight' => 100,
);
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#weight' => 101,
);
return $form;
}
/**
* Validate handler for field_test_entity_form().
*/
function field_test_entity_form_validate($form, &$form_state) {
entity_form_field_validate('test_entity', $form, $form_state);
}
/**
* Submit handler for field_test_entity_form().
*/
function field_test_entity_form_submit($form, &$form_state) {
$entity = field_test_entity_form_submit_build_test_entity($form, $form_state);
$insert = empty($entity->ftid);
field_test_entity_save($entity);
$message = $insert ? t('test_entity @id has been created.', array('@id' => $entity->ftid)) : t('test_entity @id has been updated.', array('@id' => $entity->ftid));
drupal_set_message($message);
if ($entity->ftid) {
$form_state['redirect'] = 'test-entity/manage/' . $entity->ftid . '/edit';
}
else {
// Error on save.
drupal_set_message(t('The entity could not be saved.'), 'error');
$form_state['rebuild'] = TRUE;
}
}
/**
* Updates the form state's entity by processing this submission's values.
*/
function field_test_entity_form_submit_build_test_entity($form, &$form_state) {
$entity = $form_state['test_entity'];
entity_form_submit_build_entity('test_entity', $entity, $form, $form_state);
return $entity;
}
/**
* Form combining two separate entities.
*/
function field_test_entity_nested_form($form, &$form_state, $entity_1, $entity_2) {
// First entity.
foreach (array('ftid', 'ftvid', 'fttype') as $key) {
$form[$key] = array(
'#type' => 'value',
'#value' => $entity_1->$key,
);
}
field_attach_form('test_entity', $entity_1, $form, $form_state);
// Second entity.
$form['entity_2'] = array(
'#type' => 'fieldset',
'#title' => t('Second entity'),
'#tree' => TRUE,
'#parents' => array('entity_2'),
'#weight' => 50,
);
foreach (array('ftid', 'ftvid', 'fttype') as $key) {
$form['entity_2'][$key] = array(
'#type' => 'value',
'#value' => $entity_2->$key,
);
}
field_attach_form('test_entity', $entity_2, $form['entity_2'], $form_state);
$form['save'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#weight' => 100,
);
return $form;
}
/**
* Validate handler for field_test_entity_nested_form().
*/
function field_test_entity_nested_form_validate($form, &$form_state) {
$entity_1 = (object) $form_state['values'];
field_attach_form_validate('test_entity', $entity_1, $form, $form_state);
$entity_2 = (object) $form_state['values']['entity_2'];
field_attach_form_validate('test_entity', $entity_2, $form['entity_2'], $form_state);
}
/**
* Submit handler for field_test_entity_nested_form().
*/
function field_test_entity_nested_form_submit($form, &$form_state) {
$entity_1 = (object) $form_state['values'];
field_attach_submit('test_entity', $entity_1, $form, $form_state);
field_test_entity_save($entity_1);
$entity_2 = (object) $form_state['values']['entity_2'];
field_attach_submit('test_entity', $entity_2, $form['entity_2'], $form_state);
field_test_entity_save($entity_2);
drupal_set_message(t('test_entities @id_1 and @id_2 have been updated.', array('@id_1' => $entity_1->ftid, '@id_2' => $entity_2->ftid)));
}
/**
* Controller class for the test_entity_bundle entity type.
*
* This extends the DrupalDefaultEntityController class, adding required
* special handling for bundles (since they are not stored in the database).
*/
class TestEntityBundleController extends DrupalDefaultEntityController {
protected function attachLoad(&$entities, $revision_id = FALSE) {
// Add bundle information.
foreach ($entities as $key => $entity) {
$entity->fttype = 'test_entity_bundle';
$entities[$key] = $entity;
}
parent::attachLoad($entities, $revision_id);
}
}
| {
"pile_set_name": "Github"
} |
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE toc
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN"
"http://java.sun.com/products/javahelp/toc_2_0.dtd">
<toc version="2.0">
<tocitem text="ZAP User Guide" tocid="toplevelitem">
<tocitem text="Add Ons" tocid="addons">
<tocitem text="Online Menu" image="onlineMenu-icon" target="onlineMenu"/>
</tocitem>
</tocitem>
</toc>
| {
"pile_set_name": "Github"
} |
AUTOMAKE_OPTIONS = subdir-objects
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(RADEON_CFLAGS)
AM_CXXFLAGS = \
$(GALLIUM_DRIVER_CXXFLAGS) \
$(RADEON_CFLAGS)
noinst_LTLIBRARIES = libr600.la
libr600_la_SOURCES = \
$(C_SOURCES) \
$(CXX_SOURCES)
libr600_la_LIBADD = ../radeon/libradeon.la
if NEED_RADEON_LLVM
AM_CFLAGS += \
$(LLVM_CFLAGS) \
-I$(top_srcdir)/src/gallium/drivers/radeon/
libr600_la_SOURCES += \
$(LLVM_C_SOURCES)
libr600_la_LIBADD += ../radeon/libllvmradeon.la
endif
if USE_R600_LLVM_COMPILER
AM_CFLAGS += \
-DR600_USE_LLVM
endif
if HAVE_GALLIUM_COMPUTE
AM_CFLAGS += \
-DHAVE_OPENCL
endif
| {
"pile_set_name": "Github"
} |
//TODO: consider deprecating by adding necessary features to multiBar model
nv.models.discreteBar = function() {
//============================================================
// Public Variables with Default Settings
//------------------------------------------------------------
var margin = {top: 0, right: 0, bottom: 0, left: 0}
, width = 960
, height = 500
, id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
, x = d3.scale.ordinal()
, y = d3.scale.linear()
, getX = function(d) { return d.x }
, getY = function(d) { return d.y }
, forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
, color = nv.utils.defaultColor()
, showValues = false
, valueFormat = d3.format(',.2f')
, xDomain
, yDomain
, dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
, rectClass = 'discreteBar'
;
//============================================================
//============================================================
// Private Variables
//------------------------------------------------------------
var x0, y0;
//============================================================
function chart(selection) {
selection.each(function(data) {
var availableWidth = width - margin.left - margin.right,
availableHeight = height - margin.top - margin.bottom,
container = d3.select(this);
//add series index to each data point for reference
data = data.map(function(series, i) {
series.values = series.values.map(function(point) {
point.series = i;
return point;
});
return series;
});
//------------------------------------------------------------
// Setup Scales
// remap and flatten the data for use in calculating the scales' domains
var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
data.map(function(d) {
return d.values.map(function(d,i) {
return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
})
});
x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
.rangeBands([0, availableWidth], .1);
y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
// If showValues, pad the Y axis range to account for label height
if (showValues) y.range([availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
else y.range([availableHeight, 0]);
//store old scales if they exist
x0 = x0 || x;
y0 = y0 || y.copy().range([y(0),y(0)]);
//------------------------------------------------------------
//------------------------------------------------------------
// Setup containers and skeleton of chart
var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
var gEnter = wrapEnter.append('g');
var g = wrap.select('g');
gEnter.append('g').attr('class', 'nv-groups');
wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
//------------------------------------------------------------
//TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
var groups = wrap.select('.nv-groups').selectAll('.nv-group')
.data(function(d) { return d }, function(d) { return d.key });
groups.enter().append('g')
.style('stroke-opacity', 1e-6)
.style('fill-opacity', 1e-6);
d3.transition(groups.exit())
.style('stroke-opacity', 1e-6)
.style('fill-opacity', 1e-6)
.remove();
groups
.attr('class', function(d,i) { return 'nv-group nv-series-' + i })
.classed('hover', function(d) { return d.hover });
d3.transition(groups)
.style('stroke-opacity', 1)
.style('fill-opacity', .75);
var bars = groups.selectAll('g.nv-bar')
.data(function(d) { return d.values });
bars.exit().remove();
var barsEnter = bars.enter().append('g')
.attr('transform', function(d,i,j) {
return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
})
.on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
d3.select(this).classed('hover', true);
dispatch.elementMouseover({
value: getY(d,i),
point: d,
series: data[d.series],
pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
pointIndex: i,
seriesIndex: d.series,
e: d3.event
});
})
.on('mouseout', function(d,i) {
d3.select(this).classed('hover', false);
dispatch.elementMouseout({
value: getY(d,i),
point: d,
series: data[d.series],
pointIndex: i,
seriesIndex: d.series,
e: d3.event
});
})
.on('click', function(d,i) {
dispatch.elementClick({
value: getY(d,i),
point: d,
series: data[d.series],
pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
pointIndex: i,
seriesIndex: d.series,
e: d3.event
});
d3.event.stopPropagation();
})
.on('dblclick', function(d,i) {
dispatch.elementDblClick({
value: getY(d,i),
point: d,
series: data[d.series],
pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
pointIndex: i,
seriesIndex: d.series,
e: d3.event
});
d3.event.stopPropagation();
});
barsEnter.append('rect')
.attr('height', 0)
.attr('width', x.rangeBand() * .9 / data.length )
if (showValues) {
barsEnter.append('text')
.attr('text-anchor', 'middle')
bars.select('text')
.attr('x', x.rangeBand() * .9 / 2)
.attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
.text(function(d,i) { return valueFormat(getY(d,i)) });
} else {
bars.selectAll('text').remove();
}
bars
.attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
.style('fill', function(d,i) { return d.color || color(d,i) })
.style('stroke', function(d,i) { return d.color || color(d,i) })
.select('rect')
.attr('class', rectClass)
.attr('width', x.rangeBand() * .9 / data.length);
d3.transition(bars)
//.delay(function(d,i) { return i * 1200 / data[0].values.length })
.attr('transform', function(d,i) {
var left = x(getX(d,i)) + x.rangeBand() * .05,
top = getY(d,i) < 0 ?
y(0) :
y(0) - y(getY(d,i)) < 1 ?
y(0) - 1 : //make 1 px positive bars show up above y=0
y(getY(d,i));
return 'translate(' + left + ', ' + top + ')'
})
.select('rect')
.attr('height', function(d,i) {
return Math.max(Math.abs(y(getY(d,i)) - y(0)) || 1)
});
//store old scales for use in transitions on update
x0 = x.copy();
y0 = y.copy();
});
return chart;
}
//============================================================
// Expose Public Variables
//------------------------------------------------------------
chart.dispatch = dispatch;
chart.x = function(_) {
if (!arguments.length) return getX;
getX = _;
return chart;
};
chart.y = function(_) {
if (!arguments.length) return getY;
getY = _;
return chart;
};
chart.margin = function(_) {
if (!arguments.length) return margin;
margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
return chart;
};
chart.width = function(_) {
if (!arguments.length) return width;
width = _;
return chart;
};
chart.height = function(_) {
if (!arguments.length) return height;
height = _;
return chart;
};
chart.xScale = function(_) {
if (!arguments.length) return x;
x = _;
return chart;
};
chart.yScale = function(_) {
if (!arguments.length) return y;
y = _;
return chart;
};
chart.xDomain = function(_) {
if (!arguments.length) return xDomain;
xDomain = _;
return chart;
};
chart.yDomain = function(_) {
if (!arguments.length) return yDomain;
yDomain = _;
return chart;
};
chart.forceY = function(_) {
if (!arguments.length) return forceY;
forceY = _;
return chart;
};
chart.color = function(_) {
if (!arguments.length) return color;
color = nv.utils.getColor(_);
return chart;
};
chart.id = function(_) {
if (!arguments.length) return id;
id = _;
return chart;
};
chart.showValues = function(_) {
if (!arguments.length) return showValues;
showValues = _;
return chart;
};
chart.valueFormat= function(_) {
if (!arguments.length) return valueFormat;
valueFormat = _;
return chart;
};
chart.rectClass= function(_) {
if (!arguments.length) return rectClass;
rectClass = _;
return chart;
}
//============================================================
return chart;
}
| {
"pile_set_name": "Github"
} |
package httpauth
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
"os"
"testing"
)
func testSqlInit(t *testing.T, driver string, info string) {
con, err := sql.Open(driver, info)
if err != nil {
t.Errorf("Couldn't set up test database: %v", err)
fmt.Printf("Couldn't set up test database: %v\n", err)
os.Exit(1)
}
err = con.Ping()
if err != nil {
t.Errorf("Couldn't ping test database: %v", err)
fmt.Printf("Couldn't ping test database: %v\n", err)
// t.Errorf("Couldn't ping test database: %v\n", err)
os.Exit(1)
}
con.Exec("drop table goauth")
}
func testSqlBackend(t *testing.T, driver string, info string) {
var err error
_, err = NewSqlAuthBackend(driver, info+"_fail")
if err == nil {
t.Fatal("Expected error on invalid connection.")
}
backend, err := NewSqlAuthBackend(driver, info)
if err != nil {
t.Fatal(err.Error())
}
if backend.driverName != driver {
t.Fatal("Driver name.")
}
if backend.dataSourceName != info {
t.Fatal("Driver info not saved.")
}
testBackend(t, backend)
}
func testSqlReopen(t *testing.T, driver string, info string) {
var err error
backend, err := NewSqlAuthBackend(driver, info)
if err != nil {
t.Fatal(err.Error())
}
backend.Close()
backend, err = NewSqlAuthBackend(driver, info)
if err != nil {
t.Fatal(err.Error())
}
testAfterReopen(t, backend)
}
func sqlTests(t *testing.T, driver string, info string) {
testSqlInit(t, driver, info)
testSqlBackend(t, driver, info)
testSqlReopen(t, driver, info)
}
//
// mysql tests
//
func TestMysqlBackend(t *testing.T) {
sqlTests(t, "mysql", "travis@tcp(127.0.0.1:3306)/httpauth_test")
}
//
// postgres tests
//
func TestPostgresBackend(t *testing.T) {
sqlTests(t, "postgres", "user=postgres password='' dbname=httpauth_test sslmode=disable")
}
//
// sqlite3 tests
//
func TestSqliteBackend(t *testing.T) {
os.Create("./httpauth_test_sqlite.db")
sqlTests(t, "sqlite3", "./httpauth_test_sqlite.db")
os.Remove("./httpauth_test_sqlite.db")
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2016 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __DTS_IMX6SLL_PINFUNC_H
#define __DTS_IMX6SLL_PINFUNC_H
/*
* The pin function ID is a tuple of
* <mux_reg conf_reg input_reg mux_mode input_val>
*/
#define MX6SLL_PAD_WDOG_B__WDOG1_B 0x0014 0x02DC 0x0000 0x0 0x0
#define MX6SLL_PAD_WDOG_B__WDOG1_RESET_B_DEB 0x0014 0x02DC 0x0000 0x1 0x0
#define MX6SLL_PAD_WDOG_B__UART5_RI_B 0x0014 0x02DC 0x0000 0x2 0x0
#define MX6SLL_PAD_WDOG_B__GPIO3_IO18 0x0014 0x02DC 0x0000 0x5 0x0
#define MX6SLL_PAD_REF_CLK_24M__XTALOSC_REF_CLK_24M 0x0018 0x02E0 0x0000 0x0 0x0
#define MX6SLL_PAD_REF_CLK_24M__I2C3_SCL 0x0018 0x02E0 0x068C 0x1 0x0
#define MX6SLL_PAD_REF_CLK_24M__PWM3_OUT 0x0018 0x02E0 0x0000 0x2 0x0
#define MX6SLL_PAD_REF_CLK_24M__USB_OTG2_ID 0x0018 0x02E0 0x0560 0x3 0x0
#define MX6SLL_PAD_REF_CLK_24M__CCM_PMIC_READY 0x0018 0x02E0 0x05AC 0x4 0x0
#define MX6SLL_PAD_REF_CLK_24M__GPIO3_IO21 0x0018 0x02E0 0x0000 0x5 0x0
#define MX6SLL_PAD_REF_CLK_24M__SD3_WP 0x0018 0x02E0 0x0794 0x6 0x0
#define MX6SLL_PAD_REF_CLK_32K__XTALOSC_REF_CLK_32K 0x001C 0x02E4 0x0000 0x0 0x0
#define MX6SLL_PAD_REF_CLK_32K__I2C3_SDA 0x001C 0x02E4 0x0690 0x1 0x0
#define MX6SLL_PAD_REF_CLK_32K__PWM4_OUT 0x001C 0x02E4 0x0000 0x2 0x0
#define MX6SLL_PAD_REF_CLK_32K__USB_OTG1_ID 0x001C 0x02E4 0x055C 0x3 0x0
#define MX6SLL_PAD_REF_CLK_32K__SD1_LCTL 0x001C 0x02E4 0x0000 0x4 0x0
#define MX6SLL_PAD_REF_CLK_32K__GPIO3_IO22 0x001C 0x02E4 0x0000 0x5 0x0
#define MX6SLL_PAD_REF_CLK_32K__SD3_CD_B 0x001C 0x02E4 0x0780 0x6 0x0
#define MX6SLL_PAD_PWM1__PWM1_OUT 0x0020 0x02E8 0x0000 0x0 0x0
#define MX6SLL_PAD_PWM1__CCM_CLKO 0x0020 0x02E8 0x0000 0x1 0x0
#define MX6SLL_PAD_PWM1__AUDIO_CLK_OUT 0x0020 0x02E8 0x0000 0x2 0x0
#define MX6SLL_PAD_PWM1__CSI_MCLK 0x0020 0x02E8 0x0000 0x4 0x0
#define MX6SLL_PAD_PWM1__GPIO3_IO23 0x0020 0x02E8 0x0000 0x5 0x0
#define MX6SLL_PAD_PWM1__EPIT1_OUT 0x0020 0x02E8 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_COL0__KEY_COL0 0x0024 0x02EC 0x06A0 0x0 0x0
#define MX6SLL_PAD_KEY_COL0__I2C2_SCL 0x0024 0x02EC 0x0684 0x1 0x0
#define MX6SLL_PAD_KEY_COL0__LCD_DATA00 0x0024 0x02EC 0x06D8 0x2 0x0
#define MX6SLL_PAD_KEY_COL0__SD1_CD_B 0x0024 0x02EC 0x0770 0x4 0x1
#define MX6SLL_PAD_KEY_COL0__GPIO3_IO24 0x0024 0x02EC 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW0__KEY_ROW0 0x0028 0x02F0 0x06C0 0x0 0x0
#define MX6SLL_PAD_KEY_ROW0__I2C2_SDA 0x0028 0x02F0 0x0688 0x1 0x0
#define MX6SLL_PAD_KEY_ROW0__LCD_DATA01 0x0028 0x02F0 0x06DC 0x2 0x0
#define MX6SLL_PAD_KEY_ROW0__SD1_WP 0x0028 0x02F0 0x0774 0x4 0x1
#define MX6SLL_PAD_KEY_ROW0__GPIO3_IO25 0x0028 0x02F0 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL1__KEY_COL1 0x002C 0x02F4 0x06A4 0x0 0x0
#define MX6SLL_PAD_KEY_COL1__ECSPI4_MOSI 0x002C 0x02F4 0x0658 0x1 0x1
#define MX6SLL_PAD_KEY_COL1__LCD_DATA02 0x002C 0x02F4 0x06E0 0x2 0x0
#define MX6SLL_PAD_KEY_COL1__SD3_DATA4 0x002C 0x02F4 0x0784 0x4 0x0
#define MX6SLL_PAD_KEY_COL1__GPIO3_IO26 0x002C 0x02F4 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW1__KEY_ROW1 0x0030 0x02F8 0x06C4 0x0 0x0
#define MX6SLL_PAD_KEY_ROW1__ECSPI4_MISO 0x0030 0x02F8 0x0654 0x1 0x1
#define MX6SLL_PAD_KEY_ROW1__LCD_DATA03 0x0030 0x02F8 0x06E4 0x2 0x0
#define MX6SLL_PAD_KEY_ROW1__CSI_FIELD 0x0030 0x02F8 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_ROW1__SD3_DATA5 0x0030 0x02F8 0x0788 0x4 0x0
#define MX6SLL_PAD_KEY_ROW1__GPIO3_IO27 0x0030 0x02F8 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL2__KEY_COL2 0x0034 0x02FC 0x06A8 0x0 0x0
#define MX6SLL_PAD_KEY_COL2__ECSPI4_SS0 0x0034 0x02FC 0x065C 0x1 0x1
#define MX6SLL_PAD_KEY_COL2__LCD_DATA04 0x0034 0x02FC 0x06E8 0x2 0x0
#define MX6SLL_PAD_KEY_COL2__CSI_DATA12 0x0034 0x02FC 0x05B8 0x3 0x1
#define MX6SLL_PAD_KEY_COL2__SD3_DATA6 0x0034 0x02FC 0x078C 0x4 0x0
#define MX6SLL_PAD_KEY_COL2__GPIO3_IO28 0x0034 0x02FC 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW2__KEY_ROW2 0x0038 0x0300 0x06C8 0x0 0x0
#define MX6SLL_PAD_KEY_ROW2__ECSPI4_SCLK 0x0038 0x0300 0x0650 0x1 0x1
#define MX6SLL_PAD_KEY_ROW2__LCD_DATA05 0x0038 0x0300 0x06EC 0x2 0x0
#define MX6SLL_PAD_KEY_ROW2__CSI_DATA13 0x0038 0x0300 0x05BC 0x3 0x1
#define MX6SLL_PAD_KEY_ROW2__SD3_DATA7 0x0038 0x0300 0x0790 0x4 0x0
#define MX6SLL_PAD_KEY_ROW2__GPIO3_IO29 0x0038 0x0300 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL3__KEY_COL3 0x003C 0x0304 0x06AC 0x0 0x0
#define MX6SLL_PAD_KEY_COL3__AUD6_RXFS 0x003C 0x0304 0x05A0 0x1 0x1
#define MX6SLL_PAD_KEY_COL3__LCD_DATA06 0x003C 0x0304 0x06F0 0x2 0x0
#define MX6SLL_PAD_KEY_COL3__CSI_DATA14 0x003C 0x0304 0x05C0 0x3 0x1
#define MX6SLL_PAD_KEY_COL3__GPIO3_IO30 0x003C 0x0304 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL3__SD1_RESET 0x003C 0x0304 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_ROW3__KEY_ROW3 0x0040 0x0308 0x06CC 0x0 0x1
#define MX6SLL_PAD_KEY_ROW3__AUD6_RXC 0x0040 0x0308 0x059C 0x1 0x1
#define MX6SLL_PAD_KEY_ROW3__LCD_DATA07 0x0040 0x0308 0x06F4 0x2 0x1
#define MX6SLL_PAD_KEY_ROW3__CSI_DATA15 0x0040 0x0308 0x05C4 0x3 0x2
#define MX6SLL_PAD_KEY_ROW3__GPIO3_IO31 0x0040 0x0308 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW3__SD1_VSELECT 0x0040 0x0308 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_COL4__KEY_COL4 0x0044 0x030C 0x06B0 0x0 0x1
#define MX6SLL_PAD_KEY_COL4__AUD6_RXD 0x0044 0x030C 0x0594 0x1 0x1
#define MX6SLL_PAD_KEY_COL4__LCD_DATA08 0x0044 0x030C 0x06F8 0x2 0x1
#define MX6SLL_PAD_KEY_COL4__CSI_DATA16 0x0044 0x030C 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_COL4__GPIO4_IO00 0x0044 0x030C 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL4__USB_OTG1_PWR 0x0044 0x030C 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_ROW4__KEY_ROW4 0x0048 0x0310 0x06D0 0x0 0x1
#define MX6SLL_PAD_KEY_ROW4__AUD6_TXC 0x0048 0x0310 0x05A4 0x1 0x1
#define MX6SLL_PAD_KEY_ROW4__LCD_DATA09 0x0048 0x0310 0x06FC 0x2 0x1
#define MX6SLL_PAD_KEY_ROW4__CSI_DATA17 0x0048 0x0310 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_ROW4__GPIO4_IO01 0x0048 0x0310 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW4__USB_OTG1_OC 0x0048 0x0310 0x076C 0x6 0x2
#define MX6SLL_PAD_KEY_COL5__KEY_COL5 0x004C 0x0314 0x0694 0x0 0x1
#define MX6SLL_PAD_KEY_COL5__AUD6_TXFS 0x004C 0x0314 0x05A8 0x1 0x1
#define MX6SLL_PAD_KEY_COL5__LCD_DATA10 0x004C 0x0314 0x0700 0x2 0x0
#define MX6SLL_PAD_KEY_COL5__CSI_DATA18 0x004C 0x0314 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_COL5__GPIO4_IO02 0x004C 0x0314 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL5__USB_OTG2_PWR 0x004C 0x0314 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_ROW5__KEY_ROW5 0x0050 0x0318 0x06B4 0x0 0x2
#define MX6SLL_PAD_KEY_ROW5__AUD6_TXD 0x0050 0x0318 0x0598 0x1 0x1
#define MX6SLL_PAD_KEY_ROW5__LCD_DATA11 0x0050 0x0318 0x0704 0x2 0x1
#define MX6SLL_PAD_KEY_ROW5__CSI_DATA19 0x0050 0x0318 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_ROW5__GPIO4_IO03 0x0050 0x0318 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW5__USB_OTG2_OC 0x0050 0x0318 0x0768 0x6 0x3
#define MX6SLL_PAD_KEY_COL6__KEY_COL6 0x0054 0x031C 0x0698 0x0 0x2
#define MX6SLL_PAD_KEY_COL6__UART4_DCE_RX 0x0054 0x031C 0x075C 0x1 0x2
#define MX6SLL_PAD_KEY_COL6__UART4_DTE_TX 0x0054 0x031C 0x0000 0x1 0x0
#define MX6SLL_PAD_KEY_COL6__LCD_DATA12 0x0054 0x031C 0x0708 0x2 0x1
#define MX6SLL_PAD_KEY_COL6__CSI_DATA20 0x0054 0x031C 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_COL6__GPIO4_IO04 0x0054 0x031C 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL6__SD3_RESET 0x0054 0x031C 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_ROW6__KEY_ROW6 0x0058 0x0320 0x06B8 0x0 0x2
#define MX6SLL_PAD_KEY_ROW6__UART4_DCE_TX 0x0058 0x0320 0x0000 0x1 0x0
#define MX6SLL_PAD_KEY_ROW6__UART4_DTE_RX 0x0058 0x0320 0x075C 0x1 0x3
#define MX6SLL_PAD_KEY_ROW6__LCD_DATA13 0x0058 0x0320 0x070C 0x2 0x1
#define MX6SLL_PAD_KEY_ROW6__CSI_DATA21 0x0058 0x0320 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_ROW6__GPIO4_IO05 0x0058 0x0320 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW6__SD3_VSELECT 0x0058 0x0320 0x0000 0x6 0x0
#define MX6SLL_PAD_KEY_COL7__KEY_COL7 0x005C 0x0324 0x069C 0x0 0x2
#define MX6SLL_PAD_KEY_COL7__UART4_DCE_RTS 0x005C 0x0324 0x0758 0x1 0x2
#define MX6SLL_PAD_KEY_COL7__UART4_DTE_CTS 0x005C 0x0324 0x0000 0x1 0x0
#define MX6SLL_PAD_KEY_COL7__LCD_DATA14 0x005C 0x0324 0x0710 0x2 0x1
#define MX6SLL_PAD_KEY_COL7__CSI_DATA22 0x005C 0x0324 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_COL7__GPIO4_IO06 0x005C 0x0324 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_COL7__SD1_WP 0x005C 0x0324 0x0774 0x6 0x3
#define MX6SLL_PAD_KEY_ROW7__KEY_ROW7 0x0060 0x0328 0x06BC 0x0 0x2
#define MX6SLL_PAD_KEY_ROW7__UART4_DCE_CTS 0x0060 0x0328 0x0000 0x1 0x0
#define MX6SLL_PAD_KEY_ROW7__UART4_DTE_RTS 0x0060 0x0328 0x0758 0x1 0x3
#define MX6SLL_PAD_KEY_ROW7__LCD_DATA15 0x0060 0x0328 0x0714 0x2 0x1
#define MX6SLL_PAD_KEY_ROW7__CSI_DATA23 0x0060 0x0328 0x0000 0x3 0x0
#define MX6SLL_PAD_KEY_ROW7__GPIO4_IO07 0x0060 0x0328 0x0000 0x5 0x0
#define MX6SLL_PAD_KEY_ROW7__SD1_CD_B 0x0060 0x0328 0x0770 0x6 0x3
#define MX6SLL_PAD_EPDC_DATA00__EPDC_DATA00 0x0064 0x032C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA00__ECSPI4_MOSI 0x0064 0x032C 0x0658 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA00__LCD_DATA24 0x0064 0x032C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA00__CSI_DATA00 0x0064 0x032C 0x05C8 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA00__GPIO1_IO07 0x0064 0x032C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA01__EPDC_DATA01 0x0068 0x0330 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA01__ECSPI4_MISO 0x0068 0x0330 0x0654 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA01__LCD_DATA25 0x0068 0x0330 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA01__CSI_DATA01 0x0068 0x0330 0x05CC 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA01__GPIO1_IO08 0x0068 0x0330 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA02__EPDC_DATA02 0x006C 0x0334 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA02__ECSPI4_SS0 0x006C 0x0334 0x065C 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA02__LCD_DATA26 0x006C 0x0334 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA02__CSI_DATA02 0x006C 0x0334 0x05D0 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA02__GPIO1_IO09 0x006C 0x0334 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA03__EPDC_DATA03 0x0070 0x0338 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA03__ECSPI4_SCLK 0x0070 0x0338 0x0650 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA03__LCD_DATA27 0x0070 0x0338 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA03__CSI_DATA03 0x0070 0x0338 0x05D4 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA03__GPIO1_IO10 0x0070 0x0338 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA04__EPDC_DATA04 0x0074 0x033C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA04__ECSPI4_SS1 0x0074 0x033C 0x0660 0x1 0x1
#define MX6SLL_PAD_EPDC_DATA04__LCD_DATA28 0x0074 0x033C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA04__CSI_DATA04 0x0074 0x033C 0x05D8 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA04__GPIO1_IO11 0x0074 0x033C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA05__EPDC_DATA05 0x0078 0x0340 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA05__ECSPI4_SS2 0x0078 0x0340 0x0664 0x1 0x1
#define MX6SLL_PAD_EPDC_DATA05__LCD_DATA29 0x0078 0x0340 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA05__CSI_DATA05 0x0078 0x0340 0x05DC 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA05__GPIO1_IO12 0x0078 0x0340 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA06__EPDC_DATA06 0x007C 0x0344 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA06__ECSPI4_SS3 0x007C 0x0344 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA06__LCD_DATA30 0x007C 0x0344 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA06__CSI_DATA06 0x007C 0x0344 0x05E0 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA06__GPIO1_IO13 0x007C 0x0344 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA07__EPDC_DATA07 0x0080 0x0348 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA07__ECSPI4_RDY 0x0080 0x0348 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA07__LCD_DATA31 0x0080 0x0348 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA07__CSI_DATA07 0x0080 0x0348 0x05E4 0x3 0x2
#define MX6SLL_PAD_EPDC_DATA07__GPIO1_IO14 0x0080 0x0348 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA08__EPDC_DATA08 0x0084 0x034C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA08__ECSPI3_MOSI 0x0084 0x034C 0x063C 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA08__EPDC_PWR_CTRL0 0x0084 0x034C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA08__GPIO1_IO15 0x0084 0x034C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA09__EPDC_DATA09 0x0088 0x0350 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA09__ECSPI3_MISO 0x0088 0x0350 0x0638 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA09__EPDC_PWR_CTRL1 0x0088 0x0350 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA09__GPIO1_IO16 0x0088 0x0350 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA10__EPDC_DATA10 0x008C 0x0354 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA10__ECSPI3_SS0 0x008C 0x0354 0x0648 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA10__EPDC_PWR_CTRL2 0x008C 0x0354 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA10__GPIO1_IO17 0x008C 0x0354 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA11__EPDC_DATA11 0x0090 0x0358 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA11__ECSPI3_SCLK 0x0090 0x0358 0x0630 0x1 0x2
#define MX6SLL_PAD_EPDC_DATA11__EPDC_PWR_CTRL3 0x0090 0x0358 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA11__GPIO1_IO18 0x0090 0x0358 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA12__EPDC_DATA12 0x0094 0x035C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA12__UART2_DCE_RX 0x0094 0x035C 0x074C 0x1 0x4
#define MX6SLL_PAD_EPDC_DATA12__UART2_DTE_TX 0x0094 0x035C 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA12__EPDC_PWR_COM 0x0094 0x035C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA12__GPIO1_IO19 0x0094 0x035C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA12__ECSPI3_SS1 0x0094 0x035C 0x064C 0x6 0x1
#define MX6SLL_PAD_EPDC_DATA13__EPDC_DATA13 0x0098 0x0360 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA13__UART2_DCE_TX 0x0098 0x0360 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA13__UART2_DTE_RX 0x0098 0x0360 0x074C 0x1 0x5
#define MX6SLL_PAD_EPDC_DATA13__EPDC_PWR_IRQ 0x0098 0x0360 0x0668 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA13__GPIO1_IO20 0x0098 0x0360 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA13__ECSPI3_SS2 0x0098 0x0360 0x0640 0x6 0x1
#define MX6SLL_PAD_EPDC_DATA14__EPDC_DATA14 0x009C 0x0364 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA14__UART2_DCE_RTS 0x009C 0x0364 0x0748 0x1 0x4
#define MX6SLL_PAD_EPDC_DATA14__UART2_DTE_CTS 0x009C 0x0364 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA14__EPDC_PWR_STAT 0x009C 0x0364 0x066C 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA14__GPIO1_IO21 0x009C 0x0364 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA14__ECSPI3_SS3 0x009C 0x0364 0x0644 0x6 0x1
#define MX6SLL_PAD_EPDC_DATA15__EPDC_DATA15 0x00A0 0x0368 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_DATA15__UART2_DCE_CTS 0x00A0 0x0368 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_DATA15__UART2_DTE_RTS 0x00A0 0x0368 0x0748 0x1 0x5
#define MX6SLL_PAD_EPDC_DATA15__EPDC_PWR_WAKE 0x00A0 0x0368 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_DATA15__GPIO1_IO22 0x00A0 0x0368 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_DATA15__ECSPI3_RDY 0x00A0 0x0368 0x0634 0x6 0x1
#define MX6SLL_PAD_EPDC_SDCLK__EPDC_SDCLK_P 0x00A4 0x036C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDCLK__ECSPI2_MOSI 0x00A4 0x036C 0x0624 0x1 0x2
#define MX6SLL_PAD_EPDC_SDCLK__I2C2_SCL 0x00A4 0x036C 0x0684 0x2 0x2
#define MX6SLL_PAD_EPDC_SDCLK__CSI_DATA08 0x00A4 0x036C 0x05E8 0x3 0x2
#define MX6SLL_PAD_EPDC_SDCLK__GPIO1_IO23 0x00A4 0x036C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDLE__EPDC_SDLE 0x00A8 0x0370 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDLE__ECSPI2_MISO 0x00A8 0x0370 0x0620 0x1 0x2
#define MX6SLL_PAD_EPDC_SDLE__I2C2_SDA 0x00A8 0x0370 0x0688 0x2 0x2
#define MX6SLL_PAD_EPDC_SDLE__CSI_DATA09 0x00A8 0x0370 0x05EC 0x3 0x2
#define MX6SLL_PAD_EPDC_SDLE__GPIO1_IO24 0x00A8 0x0370 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDOE__EPDC_SDOE 0x00AC 0x0374 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDOE__ECSPI2_SS0 0x00AC 0x0374 0x0628 0x1 0x1
#define MX6SLL_PAD_EPDC_SDOE__CSI_DATA10 0x00AC 0x0374 0x05B0 0x3 0x2
#define MX6SLL_PAD_EPDC_SDOE__GPIO1_IO25 0x00AC 0x0374 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDSHR__EPDC_SDSHR 0x00B0 0x0378 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDSHR__ECSPI2_SCLK 0x00B0 0x0378 0x061C 0x1 0x2
#define MX6SLL_PAD_EPDC_SDSHR__EPDC_SDCE4 0x00B0 0x0378 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_SDSHR__CSI_DATA11 0x00B0 0x0378 0x05B4 0x3 0x2
#define MX6SLL_PAD_EPDC_SDSHR__GPIO1_IO26 0x00B0 0x0378 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDCE0__EPDC_SDCE0 0x00B4 0x037C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDCE0__ECSPI2_SS1 0x00B4 0x037C 0x062C 0x1 0x1
#define MX6SLL_PAD_EPDC_SDCE0__PWM3_OUT 0x00B4 0x037C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_SDCE0__GPIO1_IO27 0x00B4 0x037C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDCE1__EPDC_SDCE1 0x00B8 0x0380 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDCE1__WDOG2_B 0x00B8 0x0380 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_SDCE1__PWM4_OUT 0x00B8 0x0380 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_SDCE1__GPIO1_IO28 0x00B8 0x0380 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDCE2__EPDC_SDCE2 0x00BC 0x0384 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDCE2__I2C3_SCL 0x00BC 0x0384 0x068C 0x1 0x2
#define MX6SLL_PAD_EPDC_SDCE2__PWM1_OUT 0x00BC 0x0384 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_SDCE2__GPIO1_IO29 0x00BC 0x0384 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_SDCE3__EPDC_SDCE3 0x00C0 0x0388 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_SDCE3__I2C3_SDA 0x00C0 0x0388 0x0690 0x1 0x2
#define MX6SLL_PAD_EPDC_SDCE3__PWM2_OUT 0x00C0 0x0388 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_SDCE3__GPIO1_IO30 0x00C0 0x0388 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_GDCLK__EPDC_GDCLK 0x00C4 0x038C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_GDCLK__ECSPI2_SS2 0x00C4 0x038C 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_GDCLK__CSI_PIXCLK 0x00C4 0x038C 0x05F4 0x3 0x2
#define MX6SLL_PAD_EPDC_GDCLK__GPIO1_IO31 0x00C4 0x038C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_GDCLK__SD2_RESET 0x00C4 0x038C 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_GDOE__EPDC_GDOE 0x00C8 0x0390 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_GDOE__ECSPI2_SS3 0x00C8 0x0390 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_GDOE__CSI_HSYNC 0x00C8 0x0390 0x05F0 0x3 0x2
#define MX6SLL_PAD_EPDC_GDOE__GPIO2_IO00 0x00C8 0x0390 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_GDOE__SD2_VSELECT 0x00C8 0x0390 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_GDRL__EPDC_GDRL 0x00CC 0x0394 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_GDRL__ECSPI2_RDY 0x00CC 0x0394 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_GDRL__CSI_MCLK 0x00CC 0x0394 0x0000 0x3 0x0
#define MX6SLL_PAD_EPDC_GDRL__GPIO2_IO01 0x00CC 0x0394 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_GDRL__SD2_WP 0x00CC 0x0394 0x077C 0x6 0x2
#define MX6SLL_PAD_EPDC_GDSP__EPDC_GDSP 0x00D0 0x0398 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_GDSP__PWM4_OUT 0x00D0 0x0398 0x0000 0x1 0x0
#define MX6SLL_PAD_EPDC_GDSP__CSI_VSYNC 0x00D0 0x0398 0x05F8 0x3 0x2
#define MX6SLL_PAD_EPDC_GDSP__GPIO2_IO02 0x00D0 0x0398 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_GDSP__SD2_CD_B 0x00D0 0x0398 0x0778 0x6 0x2
#define MX6SLL_PAD_EPDC_VCOM0__EPDC_VCOM0 0x00D4 0x039C 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_VCOM0__AUD5_RXFS 0x00D4 0x039C 0x0588 0x1 0x1
#define MX6SLL_PAD_EPDC_VCOM0__UART3_DCE_RX 0x00D4 0x039C 0x0754 0x2 0x4
#define MX6SLL_PAD_EPDC_VCOM0__UART3_DTE_TX 0x00D4 0x039C 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_VCOM0__GPIO2_IO03 0x00D4 0x039C 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_VCOM0__EPDC_SDCE5 0x00D4 0x039C 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_VCOM1__EPDC_VCOM1 0x00D8 0x03A0 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_VCOM1__AUD5_RXD 0x00D8 0x03A0 0x057C 0x1 0x1
#define MX6SLL_PAD_EPDC_VCOM1__UART3_DCE_TX 0x00D8 0x03A0 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_VCOM1__UART3_DTE_RX 0x00D8 0x03A0 0x0754 0x2 0x5
#define MX6SLL_PAD_EPDC_VCOM1__GPIO2_IO04 0x00D8 0x03A0 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_VCOM1__EPDC_SDCE6 0x00D8 0x03A0 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_BDR0__EPDC_BDR0 0x00DC 0x03A4 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_BDR0__UART3_DCE_RTS 0x00DC 0x03A4 0x0750 0x2 0x2
#define MX6SLL_PAD_EPDC_BDR0__UART3_DTE_CTS 0x00DC 0x03A4 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_BDR0__GPIO2_IO05 0x00DC 0x03A4 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_BDR0__EPDC_SDCE7 0x00DC 0x03A4 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_BDR1__EPDC_BDR1 0x00E0 0x03A8 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_BDR1__UART3_DCE_CTS 0x00E0 0x03A8 0x0000 0x2 0x0
#define MX6SLL_PAD_EPDC_BDR1__UART3_DTE_RTS 0x00E0 0x03A8 0x0750 0x2 0x3
#define MX6SLL_PAD_EPDC_BDR1__GPIO2_IO06 0x00E0 0x03A8 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_BDR1__EPDC_SDCE8 0x00E0 0x03A8 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL0__EPDC_PWR_CTRL0 0x00E4 0x03AC 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL0__AUD5_RXC 0x00E4 0x03AC 0x0584 0x1 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL0__LCD_DATA16 0x00E4 0x03AC 0x0718 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL0__GPIO2_IO07 0x00E4 0x03AC 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL1__EPDC_PWR_CTRL1 0x00E8 0x03B0 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL1__AUD5_TXFS 0x00E8 0x03B0 0x0590 0x1 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL1__LCD_DATA17 0x00E8 0x03B0 0x071C 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL1__GPIO2_IO08 0x00E8 0x03B0 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL2__EPDC_PWR_CTRL2 0x00EC 0x03B4 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL2__AUD5_TXD 0x00EC 0x03B4 0x0580 0x1 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL2__LCD_DATA18 0x00EC 0x03B4 0x0720 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL2__GPIO2_IO09 0x00EC 0x03B4 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL3__EPDC_PWR_CTRL3 0x00F0 0x03B8 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_CTRL3__AUD5_TXC 0x00F0 0x03B8 0x058C 0x1 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL3__LCD_DATA19 0x00F0 0x03B8 0x0724 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_CTRL3__GPIO2_IO10 0x00F0 0x03B8 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_COM__EPDC_PWR_COM 0x00F4 0x03BC 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_COM__LCD_DATA20 0x00F4 0x03BC 0x0728 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_COM__USB_OTG1_ID 0x00F4 0x03BC 0x055C 0x4 0x4
#define MX6SLL_PAD_EPDC_PWR_COM__GPIO2_IO11 0x00F4 0x03BC 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_COM__SD3_RESET 0x00F4 0x03BC 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_PWR_IRQ__EPDC_PWR_IRQ 0x00F8 0x03C0 0x0668 0x0 0x1
#define MX6SLL_PAD_EPDC_PWR_IRQ__LCD_DATA21 0x00F8 0x03C0 0x072C 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_IRQ__USB_OTG2_ID 0x00F8 0x03C0 0x0560 0x4 0x3
#define MX6SLL_PAD_EPDC_PWR_IRQ__GPIO2_IO12 0x00F8 0x03C0 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_IRQ__SD3_VSELECT 0x00F8 0x03C0 0x0000 0x6 0x0
#define MX6SLL_PAD_EPDC_PWR_STAT__EPDC_PWR_STAT 0x00FC 0x03C4 0x066C 0x0 0x1
#define MX6SLL_PAD_EPDC_PWR_STAT__LCD_DATA22 0x00FC 0x03C4 0x0730 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_STAT__ARM_EVENTI 0x00FC 0x03C4 0x0000 0x4 0x0
#define MX6SLL_PAD_EPDC_PWR_STAT__GPIO2_IO13 0x00FC 0x03C4 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_STAT__SD3_WP 0x00FC 0x03C4 0x0794 0x6 0x2
#define MX6SLL_PAD_EPDC_PWR_WAKE__EPDC_PWR_WAKE 0x0100 0x03C8 0x0000 0x0 0x0
#define MX6SLL_PAD_EPDC_PWR_WAKE__LCD_DATA23 0x0100 0x03C8 0x0734 0x2 0x1
#define MX6SLL_PAD_EPDC_PWR_WAKE__ARM_EVENTO 0x0100 0x03C8 0x0000 0x4 0x0
#define MX6SLL_PAD_EPDC_PWR_WAKE__GPIO2_IO14 0x0100 0x03C8 0x0000 0x5 0x0
#define MX6SLL_PAD_EPDC_PWR_WAKE__SD3_CD_B 0x0100 0x03C8 0x0780 0x6 0x2
#define MX6SLL_PAD_LCD_CLK__LCD_CLK 0x0104 0x03CC 0x0000 0x0 0x0
#define MX6SLL_PAD_LCD_CLK__LCD_WR_RWN 0x0104 0x03CC 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_CLK__PWM4_OUT 0x0104 0x03CC 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_CLK__GPIO2_IO15 0x0104 0x03CC 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_ENABLE__LCD_ENABLE 0x0108 0x03D0 0x0000 0x0 0x0
#define MX6SLL_PAD_LCD_ENABLE__LCD_RD_E 0x0108 0x03D0 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_ENABLE__UART2_DCE_RX 0x0108 0x03D0 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_ENABLE__UART2_DTE_TX 0x0108 0x03D0 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_ENABLE__GPIO2_IO16 0x0108 0x03D0 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_HSYNC__LCD_HSYNC 0x010C 0x03D4 0x06D4 0x0 0x0
#define MX6SLL_PAD_LCD_HSYNC__LCD_CS 0x010C 0x03D4 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_HSYNC__UART2_DCE_TX 0x010C 0x03D4 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_HSYNC__UART2_DTE_RX 0x010C 0x03D4 0x074C 0x4 0x1
#define MX6SLL_PAD_LCD_HSYNC__GPIO2_IO17 0x010C 0x03D4 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_HSYNC__ARM_TRACE_CLK 0x010C 0x03D4 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_VSYNC__LCD_VSYNC 0x0110 0x03D8 0x0000 0x0 0x0
#define MX6SLL_PAD_LCD_VSYNC__LCD_RS 0x0110 0x03D8 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_VSYNC__UART2_DCE_RTS 0x0110 0x03D8 0x0748 0x4 0x0
#define MX6SLL_PAD_LCD_VSYNC__UART2_DTE_CTS 0x0110 0x03D8 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_VSYNC__GPIO2_IO18 0x0110 0x03D8 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_VSYNC__ARM_TRACE_CTL 0x0110 0x03D8 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_RESET__LCD_RESET 0x0114 0x03DC 0x0000 0x0 0x0
#define MX6SLL_PAD_LCD_RESET__LCD_BUSY 0x0114 0x03DC 0x06D4 0x2 0x1
#define MX6SLL_PAD_LCD_RESET__UART2_DCE_CTS 0x0114 0x03DC 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_RESET__UART2_DTE_RTS 0x0114 0x03DC 0x0748 0x4 0x1
#define MX6SLL_PAD_LCD_RESET__GPIO2_IO19 0x0114 0x03DC 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_RESET__CCM_PMIC_READY 0x0114 0x03DC 0x05AC 0x6 0x2
#define MX6SLL_PAD_LCD_DATA00__LCD_DATA00 0x0118 0x03E0 0x06D8 0x0 0x1
#define MX6SLL_PAD_LCD_DATA00__ECSPI1_MOSI 0x0118 0x03E0 0x0608 0x1 0x0
#define MX6SLL_PAD_LCD_DATA00__USB_OTG2_ID 0x0118 0x03E0 0x0560 0x2 0x2
#define MX6SLL_PAD_LCD_DATA00__PWM1_OUT 0x0118 0x03E0 0x0000 0x3 0x0
#define MX6SLL_PAD_LCD_DATA00__UART5_DTR_B 0x0118 0x03E0 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA00__GPIO2_IO20 0x0118 0x03E0 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA00__ARM_TRACE00 0x0118 0x03E0 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA00__SRC_BOOT_CFG00 0x0118 0x03E0 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA01__LCD_DATA01 0x011C 0x03E4 0x06DC 0x0 0x1
#define MX6SLL_PAD_LCD_DATA01__ECSPI1_MISO 0x011C 0x03E4 0x0604 0x1 0x0
#define MX6SLL_PAD_LCD_DATA01__USB_OTG1_ID 0x011C 0x03E4 0x055C 0x2 0x3
#define MX6SLL_PAD_LCD_DATA01__PWM2_OUT 0x011C 0x03E4 0x0000 0x3 0x0
#define MX6SLL_PAD_LCD_DATA01__AUD4_RXFS 0x011C 0x03E4 0x0570 0x4 0x0
#define MX6SLL_PAD_LCD_DATA01__GPIO2_IO21 0x011C 0x03E4 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA01__ARM_TRACE01 0x011C 0x03E4 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA01__SRC_BOOT_CFG01 0x011C 0x03E4 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA02__LCD_DATA02 0x0120 0x03E8 0x06E0 0x0 0x1
#define MX6SLL_PAD_LCD_DATA02__ECSPI1_SS0 0x0120 0x03E8 0x0614 0x1 0x0
#define MX6SLL_PAD_LCD_DATA02__EPIT2_OUT 0x0120 0x03E8 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_DATA02__PWM3_OUT 0x0120 0x03E8 0x0000 0x3 0x0
#define MX6SLL_PAD_LCD_DATA02__AUD4_RXC 0x0120 0x03E8 0x056C 0x4 0x0
#define MX6SLL_PAD_LCD_DATA02__GPIO2_IO22 0x0120 0x03E8 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA02__ARM_TRACE02 0x0120 0x03E8 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA02__SRC_BOOT_CFG02 0x0120 0x03E8 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA03__LCD_DATA03 0x0124 0x03EC 0x06E4 0x0 0x1
#define MX6SLL_PAD_LCD_DATA03__ECSPI1_SCLK 0x0124 0x03EC 0x05FC 0x1 0x0
#define MX6SLL_PAD_LCD_DATA03__UART5_DSR_B 0x0124 0x03EC 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_DATA03__PWM4_OUT 0x0124 0x03EC 0x0000 0x3 0x0
#define MX6SLL_PAD_LCD_DATA03__AUD4_RXD 0x0124 0x03EC 0x0564 0x4 0x0
#define MX6SLL_PAD_LCD_DATA03__GPIO2_IO23 0x0124 0x03EC 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA03__ARM_TRACE03 0x0124 0x03EC 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA03__SRC_BOOT_CFG03 0x0124 0x03EC 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA04__LCD_DATA04 0x0128 0x03F0 0x06E8 0x0 0x1
#define MX6SLL_PAD_LCD_DATA04__ECSPI1_SS1 0x0128 0x03F0 0x060C 0x1 0x1
#define MX6SLL_PAD_LCD_DATA04__CSI_VSYNC 0x0128 0x03F0 0x05F8 0x2 0x0
#define MX6SLL_PAD_LCD_DATA04__WDOG2_RESET_B_DEB 0x0128 0x03F0 0x0000 0x3 0x0
#define MX6SLL_PAD_LCD_DATA04__AUD4_TXC 0x0128 0x03F0 0x0574 0x4 0x0
#define MX6SLL_PAD_LCD_DATA04__GPIO2_IO24 0x0128 0x03F0 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA04__ARM_TRACE04 0x0128 0x03F0 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA04__SRC_BOOT_CFG04 0x0128 0x03F0 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA05__LCD_DATA05 0x012C 0x03F4 0x06EC 0x0 0x1
#define MX6SLL_PAD_LCD_DATA05__ECSPI1_SS2 0x012C 0x03F4 0x0610 0x1 0x1
#define MX6SLL_PAD_LCD_DATA05__CSI_HSYNC 0x012C 0x03F4 0x05F0 0x2 0x0
#define MX6SLL_PAD_LCD_DATA05__AUD4_TXFS 0x012C 0x03F4 0x0578 0x4 0x0
#define MX6SLL_PAD_LCD_DATA05__GPIO2_IO25 0x012C 0x03F4 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA05__ARM_TRACE05 0x012C 0x03F4 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA05__SRC_BOOT_CFG05 0x012C 0x03F4 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA06__LCD_DATA06 0x0130 0x03F8 0x06F0 0x0 0x1
#define MX6SLL_PAD_LCD_DATA06__ECSPI1_SS3 0x0130 0x03F8 0x0618 0x1 0x0
#define MX6SLL_PAD_LCD_DATA06__CSI_PIXCLK 0x0130 0x03F8 0x05F4 0x2 0x0
#define MX6SLL_PAD_LCD_DATA06__AUD4_TXD 0x0130 0x03F8 0x0568 0x4 0x0
#define MX6SLL_PAD_LCD_DATA06__GPIO2_IO26 0x0130 0x03F8 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA06__ARM_TRACE06 0x0130 0x03F8 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA06__SRC_BOOT_CFG06 0x0130 0x03F8 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA07__LCD_DATA07 0x0134 0x03FC 0x06F4 0x0 0x0
#define MX6SLL_PAD_LCD_DATA07__ECSPI1_RDY 0x0134 0x03FC 0x0600 0x1 0x0
#define MX6SLL_PAD_LCD_DATA07__CSI_MCLK 0x0134 0x03FC 0x0000 0x2 0x0
#define MX6SLL_PAD_LCD_DATA07__AUDIO_CLK_OUT 0x0134 0x03FC 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA07__GPIO2_IO27 0x0134 0x03FC 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA07__ARM_TRACE07 0x0134 0x03FC 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA07__SRC_BOOT_CFG07 0x0134 0x03FC 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA08__LCD_DATA08 0x0138 0x0400 0x06F8 0x0 0x0
#define MX6SLL_PAD_LCD_DATA08__KEY_COL0 0x0138 0x0400 0x06A0 0x1 0x1
#define MX6SLL_PAD_LCD_DATA08__CSI_DATA09 0x0138 0x0400 0x05EC 0x2 0x0
#define MX6SLL_PAD_LCD_DATA08__ECSPI2_SCLK 0x0138 0x0400 0x061C 0x4 0x0
#define MX6SLL_PAD_LCD_DATA08__GPIO2_IO28 0x0138 0x0400 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA08__ARM_TRACE08 0x0138 0x0400 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA08__SRC_BOOT_CFG08 0x0138 0x0400 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA09__LCD_DATA09 0x013C 0x0404 0x06FC 0x0 0x0
#define MX6SLL_PAD_LCD_DATA09__KEY_ROW0 0x013C 0x0404 0x06C0 0x1 0x1
#define MX6SLL_PAD_LCD_DATA09__CSI_DATA08 0x013C 0x0404 0x05E8 0x2 0x0
#define MX6SLL_PAD_LCD_DATA09__ECSPI2_MOSI 0x013C 0x0404 0x0624 0x4 0x0
#define MX6SLL_PAD_LCD_DATA09__GPIO2_IO29 0x013C 0x0404 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA09__ARM_TRACE09 0x013C 0x0404 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA09__SRC_BOOT_CFG09 0x013C 0x0404 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA10__LCD_DATA10 0x0140 0x0408 0x0700 0x0 0x1
#define MX6SLL_PAD_LCD_DATA10__KEY_COL1 0x0140 0x0408 0x06A4 0x1 0x1
#define MX6SLL_PAD_LCD_DATA10__CSI_DATA07 0x0140 0x0408 0x05E4 0x2 0x0
#define MX6SLL_PAD_LCD_DATA10__ECSPI2_MISO 0x0140 0x0408 0x0620 0x4 0x0
#define MX6SLL_PAD_LCD_DATA10__GPIO2_IO30 0x0140 0x0408 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA10__ARM_TRACE10 0x0140 0x0408 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA10__SRC_BOOT_CFG10 0x0140 0x0408 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA11__LCD_DATA11 0x0144 0x040C 0x0704 0x0 0x0
#define MX6SLL_PAD_LCD_DATA11__KEY_ROW1 0x0144 0x040C 0x06C4 0x1 0x1
#define MX6SLL_PAD_LCD_DATA11__CSI_DATA06 0x0144 0x040C 0x05E0 0x2 0x0
#define MX6SLL_PAD_LCD_DATA11__ECSPI2_SS1 0x0144 0x040C 0x062C 0x4 0x0
#define MX6SLL_PAD_LCD_DATA11__GPIO2_IO31 0x0144 0x040C 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA11__ARM_TRACE11 0x0144 0x040C 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA11__SRC_BOOT_CFG11 0x0144 0x040C 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA12__LCD_DATA12 0x0148 0x0410 0x0708 0x0 0x0
#define MX6SLL_PAD_LCD_DATA12__KEY_COL2 0x0148 0x0410 0x06A8 0x1 0x1
#define MX6SLL_PAD_LCD_DATA12__CSI_DATA05 0x0148 0x0410 0x05DC 0x2 0x0
#define MX6SLL_PAD_LCD_DATA12__UART5_DCE_RTS 0x0148 0x0410 0x0760 0x4 0x0
#define MX6SLL_PAD_LCD_DATA12__UART5_DTE_CTS 0x0148 0x0410 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA12__GPIO3_IO00 0x0148 0x0410 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA12__ARM_TRACE12 0x0148 0x0410 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA12__SRC_BOOT_CFG12 0x0148 0x0410 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA13__LCD_DATA13 0x014C 0x0414 0x070C 0x0 0x0
#define MX6SLL_PAD_LCD_DATA13__KEY_ROW2 0x014C 0x0414 0x06C8 0x1 0x1
#define MX6SLL_PAD_LCD_DATA13__CSI_DATA04 0x014C 0x0414 0x05D8 0x2 0x0
#define MX6SLL_PAD_LCD_DATA13__UART5_DCE_CTS 0x014C 0x0414 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA13__UART5_DTE_RTS 0x014C 0x0414 0x0760 0x4 0x1
#define MX6SLL_PAD_LCD_DATA13__GPIO3_IO01 0x014C 0x0414 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA13__ARM_TRACE13 0x014C 0x0414 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA13__SRC_BOOT_CFG13 0x014C 0x0414 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA14__LCD_DATA14 0x0150 0x0418 0x0710 0x0 0x0
#define MX6SLL_PAD_LCD_DATA14__KEY_COL3 0x0150 0x0418 0x06AC 0x1 0x1
#define MX6SLL_PAD_LCD_DATA14__CSI_DATA03 0x0150 0x0418 0x05D4 0x2 0x0
#define MX6SLL_PAD_LCD_DATA14__UART5_DCE_RX 0x0150 0x0418 0x0764 0x4 0x0
#define MX6SLL_PAD_LCD_DATA14__UART5_DTE_TX 0x0150 0x0418 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA14__GPIO3_IO02 0x0150 0x0418 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA14__ARM_TRACE14 0x0150 0x0418 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA14__SRC_BOOT_CFG14 0x0150 0x0418 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA15__LCD_DATA15 0x0154 0x041C 0x0714 0x0 0x0
#define MX6SLL_PAD_LCD_DATA15__KEY_ROW3 0x0154 0x041C 0x06CC 0x1 0x0
#define MX6SLL_PAD_LCD_DATA15__CSI_DATA02 0x0154 0x041C 0x05D0 0x2 0x0
#define MX6SLL_PAD_LCD_DATA15__UART5_DCE_TX 0x0154 0x041C 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA15__UART5_DTE_RX 0x0154 0x041C 0x0764 0x4 0x1
#define MX6SLL_PAD_LCD_DATA15__GPIO3_IO03 0x0154 0x041C 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA15__ARM_TRACE15 0x0154 0x041C 0x0000 0x6 0x0
#define MX6SLL_PAD_LCD_DATA15__SRC_BOOT_CFG15 0x0154 0x041C 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA16__LCD_DATA16 0x0158 0x0420 0x0718 0x0 0x0
#define MX6SLL_PAD_LCD_DATA16__KEY_COL4 0x0158 0x0420 0x06B0 0x1 0x0
#define MX6SLL_PAD_LCD_DATA16__CSI_DATA01 0x0158 0x0420 0x05CC 0x2 0x0
#define MX6SLL_PAD_LCD_DATA16__I2C2_SCL 0x0158 0x0420 0x0684 0x4 0x1
#define MX6SLL_PAD_LCD_DATA16__GPIO3_IO04 0x0158 0x0420 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA16__SRC_BOOT_CFG24 0x0158 0x0420 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA17__LCD_DATA17 0x015C 0x0424 0x071C 0x0 0x0
#define MX6SLL_PAD_LCD_DATA17__KEY_ROW4 0x015C 0x0424 0x06D0 0x1 0x0
#define MX6SLL_PAD_LCD_DATA17__CSI_DATA00 0x015C 0x0424 0x05C8 0x2 0x0
#define MX6SLL_PAD_LCD_DATA17__I2C2_SDA 0x015C 0x0424 0x0688 0x4 0x1
#define MX6SLL_PAD_LCD_DATA17__GPIO3_IO05 0x015C 0x0424 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA17__SRC_BOOT_CFG25 0x015C 0x0424 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA18__LCD_DATA18 0x0160 0x0428 0x0720 0x0 0x0
#define MX6SLL_PAD_LCD_DATA18__KEY_COL5 0x0160 0x0428 0x0694 0x1 0x2
#define MX6SLL_PAD_LCD_DATA18__CSI_DATA15 0x0160 0x0428 0x05C4 0x2 0x1
#define MX6SLL_PAD_LCD_DATA18__GPT_CAPTURE1 0x0160 0x0428 0x0670 0x4 0x1
#define MX6SLL_PAD_LCD_DATA18__GPIO3_IO06 0x0160 0x0428 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA18__SRC_BOOT_CFG26 0x0160 0x0428 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA19__LCD_DATA19 0x0164 0x042C 0x0724 0x0 0x0
#define MX6SLL_PAD_LCD_DATA19__KEY_ROW5 0x0164 0x042C 0x06B4 0x1 0x1
#define MX6SLL_PAD_LCD_DATA19__CSI_DATA14 0x0164 0x042C 0x05C0 0x2 0x2
#define MX6SLL_PAD_LCD_DATA19__GPT_CAPTURE2 0x0164 0x042C 0x0674 0x4 0x1
#define MX6SLL_PAD_LCD_DATA19__GPIO3_IO07 0x0164 0x042C 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA19__SRC_BOOT_CFG27 0x0164 0x042C 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA20__LCD_DATA20 0x0168 0x0430 0x0728 0x0 0x0
#define MX6SLL_PAD_LCD_DATA20__KEY_COL6 0x0168 0x0430 0x0698 0x1 0x1
#define MX6SLL_PAD_LCD_DATA20__CSI_DATA13 0x0168 0x0430 0x05BC 0x2 0x2
#define MX6SLL_PAD_LCD_DATA20__GPT_COMPARE1 0x0168 0x0430 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA20__GPIO3_IO08 0x0168 0x0430 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA20__SRC_BOOT_CFG28 0x0168 0x0430 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA21__LCD_DATA21 0x016C 0x0434 0x072C 0x0 0x0
#define MX6SLL_PAD_LCD_DATA21__KEY_ROW6 0x016C 0x0434 0x06B8 0x1 0x1
#define MX6SLL_PAD_LCD_DATA21__CSI_DATA12 0x016C 0x0434 0x05B8 0x2 0x2
#define MX6SLL_PAD_LCD_DATA21__GPT_COMPARE2 0x016C 0x0434 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA21__GPIO3_IO09 0x016C 0x0434 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA21__SRC_BOOT_CFG29 0x016C 0x0434 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA22__LCD_DATA22 0x0170 0x0438 0x0730 0x0 0x0
#define MX6SLL_PAD_LCD_DATA22__KEY_COL7 0x0170 0x0438 0x069C 0x1 0x1
#define MX6SLL_PAD_LCD_DATA22__CSI_DATA11 0x0170 0x0438 0x05B4 0x2 0x1
#define MX6SLL_PAD_LCD_DATA22__GPT_COMPARE3 0x0170 0x0438 0x0000 0x4 0x0
#define MX6SLL_PAD_LCD_DATA22__GPIO3_IO10 0x0170 0x0438 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA22__SRC_BOOT_CFG30 0x0170 0x0438 0x0000 0x7 0x0
#define MX6SLL_PAD_LCD_DATA23__LCD_DATA23 0x0174 0x043C 0x0734 0x0 0x0
#define MX6SLL_PAD_LCD_DATA23__KEY_ROW7 0x0174 0x043C 0x06BC 0x1 0x1
#define MX6SLL_PAD_LCD_DATA23__CSI_DATA10 0x0174 0x043C 0x05B0 0x2 0x1
#define MX6SLL_PAD_LCD_DATA23__GPT_CLKIN 0x0174 0x043C 0x0678 0x4 0x1
#define MX6SLL_PAD_LCD_DATA23__GPIO3_IO11 0x0174 0x043C 0x0000 0x5 0x0
#define MX6SLL_PAD_LCD_DATA23__SRC_BOOT_CFG31 0x0174 0x043C 0x0000 0x7 0x0
#define MX6SLL_PAD_AUD_RXFS__AUD3_RXFS 0x0178 0x0440 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_RXFS__I2C1_SCL 0x0178 0x0440 0x067C 0x1 0x1
#define MX6SLL_PAD_AUD_RXFS__UART3_DCE_RX 0x0178 0x0440 0x0754 0x2 0x0
#define MX6SLL_PAD_AUD_RXFS__UART3_DTE_TX 0x0178 0x0440 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_RXFS__I2C3_SCL 0x0178 0x0440 0x068C 0x4 0x1
#define MX6SLL_PAD_AUD_RXFS__GPIO1_IO00 0x0178 0x0440 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_RXFS__ECSPI3_SS0 0x0178 0x0440 0x0648 0x6 0x0
#define MX6SLL_PAD_AUD_RXFS__MBIST_BEND 0x0178 0x0440 0x0000 0x7 0x0
#define MX6SLL_PAD_AUD_RXC__AUD3_RXC 0x017C 0x0444 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_RXC__I2C1_SDA 0x017C 0x0444 0x0680 0x1 0x1
#define MX6SLL_PAD_AUD_RXC__UART3_DCE_TX 0x017C 0x0444 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_RXC__UART3_DTE_RX 0x017C 0x0444 0x0754 0x2 0x1
#define MX6SLL_PAD_AUD_RXC__I2C3_SDA 0x017C 0x0444 0x0690 0x4 0x1
#define MX6SLL_PAD_AUD_RXC__GPIO1_IO01 0x017C 0x0444 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_RXC__ECSPI3_SS1 0x017C 0x0444 0x064C 0x6 0x0
#define MX6SLL_PAD_AUD_RXD__AUD3_RXD 0x0180 0x0448 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_RXD__ECSPI3_MOSI 0x0180 0x0448 0x063C 0x1 0x0
#define MX6SLL_PAD_AUD_RXD__UART4_DCE_RX 0x0180 0x0448 0x075C 0x2 0x0
#define MX6SLL_PAD_AUD_RXD__UART4_DTE_TX 0x0180 0x0448 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_RXD__SD1_LCTL 0x0180 0x0448 0x0000 0x4 0x0
#define MX6SLL_PAD_AUD_RXD__GPIO1_IO02 0x0180 0x0448 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_TXC__AUD3_TXC 0x0184 0x044C 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_TXC__ECSPI3_MISO 0x0184 0x044C 0x0638 0x1 0x0
#define MX6SLL_PAD_AUD_TXC__UART4_DCE_TX 0x0184 0x044C 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_TXC__UART4_DTE_RX 0x0184 0x044C 0x075C 0x2 0x1
#define MX6SLL_PAD_AUD_TXC__SD2_LCTL 0x0184 0x044C 0x0000 0x4 0x0
#define MX6SLL_PAD_AUD_TXC__GPIO1_IO03 0x0184 0x044C 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_TXFS__AUD3_TXFS 0x0188 0x0450 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_TXFS__PWM3_OUT 0x0188 0x0450 0x0000 0x1 0x0
#define MX6SLL_PAD_AUD_TXFS__UART4_DCE_RTS 0x0188 0x0450 0x0758 0x2 0x0
#define MX6SLL_PAD_AUD_TXFS__UART4_DTE_CTS 0x0188 0x0450 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_TXFS__SD3_LCTL 0x0188 0x0450 0x0000 0x4 0x0
#define MX6SLL_PAD_AUD_TXFS__GPIO1_IO04 0x0188 0x0450 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_TXD__AUD3_TXD 0x018C 0x0454 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_TXD__ECSPI3_SCLK 0x018C 0x0454 0x0630 0x1 0x0
#define MX6SLL_PAD_AUD_TXD__UART4_DCE_CTS 0x018C 0x0454 0x0000 0x2 0x0
#define MX6SLL_PAD_AUD_TXD__UART4_DTE_RTS 0x018C 0x0454 0x0758 0x2 0x1
#define MX6SLL_PAD_AUD_TXD__GPIO1_IO05 0x018C 0x0454 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_MCLK__AUDIO_CLK_OUT 0x0190 0x0458 0x0000 0x0 0x0
#define MX6SLL_PAD_AUD_MCLK__PWM4_OUT 0x0190 0x0458 0x0000 0x1 0x0
#define MX6SLL_PAD_AUD_MCLK__ECSPI3_RDY 0x0190 0x0458 0x0634 0x2 0x0
#define MX6SLL_PAD_AUD_MCLK__WDOG2_RESET_B_DEB 0x0190 0x0458 0x0000 0x4 0x0
#define MX6SLL_PAD_AUD_MCLK__GPIO1_IO06 0x0190 0x0458 0x0000 0x5 0x0
#define MX6SLL_PAD_AUD_MCLK__SPDIF_EXT_CLK 0x0190 0x0458 0x073C 0x6 0x1
#define MX6SLL_PAD_UART1_RXD__UART1_DCE_RX 0x0194 0x045C 0x0744 0x0 0x0
#define MX6SLL_PAD_UART1_RXD__UART1_DTE_TX 0x0194 0x045C 0x0000 0x0 0x0
#define MX6SLL_PAD_UART1_RXD__PWM1_OUT 0x0194 0x045C 0x0000 0x1 0x0
#define MX6SLL_PAD_UART1_RXD__UART4_DCE_RX 0x0194 0x045C 0x075C 0x2 0x4
#define MX6SLL_PAD_UART1_RXD__UART4_DTE_TX 0x0194 0x045C 0x0000 0x2 0x0
#define MX6SLL_PAD_UART1_RXD__UART5_DCE_RX 0x0194 0x045C 0x0764 0x4 0x6
#define MX6SLL_PAD_UART1_RXD__UART5_DTE_TX 0x0194 0x045C 0x0000 0x4 0x0
#define MX6SLL_PAD_UART1_RXD__GPIO3_IO16 0x0194 0x045C 0x0000 0x5 0x0
#define MX6SLL_PAD_UART1_TXD__UART1_DCE_TX 0x0198 0x0460 0x0000 0x0 0x0
#define MX6SLL_PAD_UART1_TXD__UART1_DTE_RX 0x0198 0x0460 0x0744 0x0 0x1
#define MX6SLL_PAD_UART1_TXD__PWM2_OUT 0x0198 0x0460 0x0000 0x1 0x0
#define MX6SLL_PAD_UART1_TXD__UART4_DCE_TX 0x0198 0x0460 0x0000 0x2 0x0
#define MX6SLL_PAD_UART1_TXD__UART4_DTE_RX 0x0198 0x0460 0x075C 0x2 0x5
#define MX6SLL_PAD_UART1_TXD__UART5_DCE_TX 0x0198 0x0460 0x0000 0x4 0x0
#define MX6SLL_PAD_UART1_TXD__UART5_DTE_RX 0x0198 0x0460 0x0764 0x4 0x7
#define MX6SLL_PAD_UART1_TXD__GPIO3_IO17 0x0198 0x0460 0x0000 0x5 0x0
#define MX6SLL_PAD_UART1_TXD__UART5_DCD_B 0x0198 0x0460 0x0000 0x7 0x0
#define MX6SLL_PAD_I2C1_SCL__I2C1_SCL 0x019C 0x0464 0x067C 0x0 0x0
#define MX6SLL_PAD_I2C1_SCL__UART1_DCE_RTS 0x019C 0x0464 0x0740 0x1 0x0
#define MX6SLL_PAD_I2C1_SCL__UART1_DTE_CTS 0x019C 0x0464 0x0000 0x1 0x0
#define MX6SLL_PAD_I2C1_SCL__ECSPI3_SS2 0x019C 0x0464 0x0640 0x2 0x0
#define MX6SLL_PAD_I2C1_SCL__SD3_RESET 0x019C 0x0464 0x0000 0x4 0x0
#define MX6SLL_PAD_I2C1_SCL__GPIO3_IO12 0x019C 0x0464 0x0000 0x5 0x0
#define MX6SLL_PAD_I2C1_SCL__ECSPI1_SS1 0x019C 0x0464 0x060C 0x6 0x0
#define MX6SLL_PAD_I2C1_SDA__I2C1_SDA 0x01A0 0x0468 0x0680 0x0 0x0
#define MX6SLL_PAD_I2C1_SDA__UART1_DCE_CTS 0x01A0 0x0468 0x0000 0x1 0x0
#define MX6SLL_PAD_I2C1_SDA__UART1_DTE_RTS 0x01A0 0x0468 0x0740 0x1 0x1
#define MX6SLL_PAD_I2C1_SDA__ECSPI3_SS3 0x01A0 0x0468 0x0644 0x2 0x0
#define MX6SLL_PAD_I2C1_SDA__SD3_VSELECT 0x01A0 0x0468 0x0000 0x4 0x0
#define MX6SLL_PAD_I2C1_SDA__GPIO3_IO13 0x01A0 0x0468 0x0000 0x5 0x0
#define MX6SLL_PAD_I2C1_SDA__ECSPI1_SS2 0x01A0 0x0468 0x0610 0x6 0x0
#define MX6SLL_PAD_I2C2_SCL__I2C2_SCL 0x01A4 0x046C 0x0684 0x0 0x3
#define MX6SLL_PAD_I2C2_SCL__AUD4_RXFS 0x01A4 0x046C 0x0570 0x1 0x2
#define MX6SLL_PAD_I2C2_SCL__SPDIF_IN 0x01A4 0x046C 0x0738 0x2 0x2
#define MX6SLL_PAD_I2C2_SCL__SD3_WP 0x01A4 0x046C 0x0794 0x4 0x3
#define MX6SLL_PAD_I2C2_SCL__GPIO3_IO14 0x01A4 0x046C 0x0000 0x5 0x0
#define MX6SLL_PAD_I2C2_SCL__ECSPI1_RDY 0x01A4 0x046C 0x0600 0x6 0x1
#define MX6SLL_PAD_I2C2_SDA__I2C2_SDA 0x01A8 0x0470 0x0688 0x0 0x3
#define MX6SLL_PAD_I2C2_SDA__AUD4_RXC 0x01A8 0x0470 0x056C 0x1 0x2
#define MX6SLL_PAD_I2C2_SDA__SPDIF_OUT 0x01A8 0x0470 0x0000 0x2 0x0
#define MX6SLL_PAD_I2C2_SDA__SD3_CD_B 0x01A8 0x0470 0x0780 0x4 0x3
#define MX6SLL_PAD_I2C2_SDA__GPIO3_IO15 0x01A8 0x0470 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI1_SCLK__ECSPI1_SCLK 0x01AC 0x0474 0x05FC 0x0 0x1
#define MX6SLL_PAD_ECSPI1_SCLK__AUD4_TXD 0x01AC 0x0474 0x0568 0x1 0x1
#define MX6SLL_PAD_ECSPI1_SCLK__UART5_DCE_RX 0x01AC 0x0474 0x0764 0x2 0x2
#define MX6SLL_PAD_ECSPI1_SCLK__UART5_DTE_TX 0x01AC 0x0474 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI1_SCLK__EPDC_VCOM0 0x01AC 0x0474 0x0000 0x3 0x0
#define MX6SLL_PAD_ECSPI1_SCLK__SD2_RESET 0x01AC 0x0474 0x0000 0x4 0x0
#define MX6SLL_PAD_ECSPI1_SCLK__GPIO4_IO08 0x01AC 0x0474 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI1_SCLK__USB_OTG2_OC 0x01AC 0x0474 0x0768 0x6 0x1
#define MX6SLL_PAD_ECSPI1_MOSI__ECSPI1_MOSI 0x01B0 0x0478 0x0608 0x0 0x1
#define MX6SLL_PAD_ECSPI1_MOSI__AUD4_TXC 0x01B0 0x0478 0x0574 0x1 0x1
#define MX6SLL_PAD_ECSPI1_MOSI__UART5_DCE_TX 0x01B0 0x0478 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI1_MOSI__UART5_DTE_RX 0x01B0 0x0478 0x0764 0x2 0x3
#define MX6SLL_PAD_ECSPI1_MOSI__EPDC_VCOM1 0x01B0 0x0478 0x0000 0x3 0x0
#define MX6SLL_PAD_ECSPI1_MOSI__SD2_VSELECT 0x01B0 0x0478 0x0000 0x4 0x0
#define MX6SLL_PAD_ECSPI1_MOSI__GPIO4_IO09 0x01B0 0x0478 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI1_MISO__ECSPI1_MISO 0x01B4 0x047C 0x0604 0x0 0x1
#define MX6SLL_PAD_ECSPI1_MISO__AUD4_TXFS 0x01B4 0x047C 0x0578 0x1 0x1
#define MX6SLL_PAD_ECSPI1_MISO__UART5_DCE_RTS 0x01B4 0x047C 0x0760 0x2 0x2
#define MX6SLL_PAD_ECSPI1_MISO__UART5_DTE_CTS 0x01B4 0x047C 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI1_MISO__EPDC_BDR0 0x01B4 0x047C 0x0000 0x3 0x0
#define MX6SLL_PAD_ECSPI1_MISO__SD2_WP 0x01B4 0x047C 0x077C 0x4 0x0
#define MX6SLL_PAD_ECSPI1_MISO__GPIO4_IO10 0x01B4 0x047C 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI1_SS0__ECSPI1_SS0 0x01B8 0x0480 0x0614 0x0 0x1
#define MX6SLL_PAD_ECSPI1_SS0__AUD4_RXD 0x01B8 0x0480 0x0564 0x1 0x1
#define MX6SLL_PAD_ECSPI1_SS0__UART5_DCE_CTS 0x01B8 0x0480 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI1_SS0__UART5_DTE_RTS 0x01B8 0x0480 0x0760 0x2 0x3
#define MX6SLL_PAD_ECSPI1_SS0__EPDC_BDR1 0x01B8 0x0480 0x0000 0x3 0x0
#define MX6SLL_PAD_ECSPI1_SS0__SD2_CD_B 0x01B8 0x0480 0x0778 0x4 0x0
#define MX6SLL_PAD_ECSPI1_SS0__GPIO4_IO11 0x01B8 0x0480 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI1_SS0__USB_OTG2_PWR 0x01B8 0x0480 0x0000 0x6 0x0
#define MX6SLL_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x01BC 0x0484 0x061C 0x0 0x1
#define MX6SLL_PAD_ECSPI2_SCLK__SPDIF_EXT_CLK 0x01BC 0x0484 0x073C 0x1 0x2
#define MX6SLL_PAD_ECSPI2_SCLK__UART3_DCE_RX 0x01BC 0x0484 0x0754 0x2 0x2
#define MX6SLL_PAD_ECSPI2_SCLK__UART3_DTE_TX 0x01BC 0x0484 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI2_SCLK__CSI_PIXCLK 0x01BC 0x0484 0x05F4 0x3 0x1
#define MX6SLL_PAD_ECSPI2_SCLK__SD1_RESET 0x01BC 0x0484 0x0000 0x4 0x0
#define MX6SLL_PAD_ECSPI2_SCLK__GPIO4_IO12 0x01BC 0x0484 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI2_SCLK__USB_OTG2_OC 0x01BC 0x0484 0x0768 0x6 0x2
#define MX6SLL_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x01C0 0x0488 0x0624 0x0 0x1
#define MX6SLL_PAD_ECSPI2_MOSI__SDMA_EXT_EVENT1 0x01C0 0x0488 0x0000 0x1 0x0
#define MX6SLL_PAD_ECSPI2_MOSI__UART3_DCE_TX 0x01C0 0x0488 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI2_MOSI__UART3_DTE_RX 0x01C0 0x0488 0x0754 0x2 0x3
#define MX6SLL_PAD_ECSPI2_MOSI__CSI_HSYNC 0x01C0 0x0488 0x05F0 0x3 0x1
#define MX6SLL_PAD_ECSPI2_MOSI__SD1_VSELECT 0x01C0 0x0488 0x0000 0x4 0x0
#define MX6SLL_PAD_ECSPI2_MOSI__GPIO4_IO13 0x01C0 0x0488 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI2_MISO__ECSPI2_MISO 0x01C4 0x048C 0x0620 0x0 0x1
#define MX6SLL_PAD_ECSPI2_MISO__SDMA_EXT_EVENT0 0x01C4 0x048C 0x0000 0x1 0x0
#define MX6SLL_PAD_ECSPI2_MISO__UART3_DCE_RTS 0x01C4 0x048C 0x0750 0x2 0x0
#define MX6SLL_PAD_ECSPI2_MISO__UART3_DTE_CTS 0x01C4 0x048C 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI2_MISO__CSI_MCLK 0x01C4 0x048C 0x0000 0x3 0x0
#define MX6SLL_PAD_ECSPI2_MISO__SD1_WP 0x01C4 0x048C 0x0774 0x4 0x2
#define MX6SLL_PAD_ECSPI2_MISO__GPIO4_IO14 0x01C4 0x048C 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI2_MISO__USB_OTG1_OC 0x01C4 0x048C 0x076C 0x6 0x1
#define MX6SLL_PAD_ECSPI2_SS0__ECSPI2_SS0 0x01C8 0x0490 0x0628 0x0 0x0
#define MX6SLL_PAD_ECSPI2_SS0__ECSPI1_SS3 0x01C8 0x0490 0x0618 0x1 0x1
#define MX6SLL_PAD_ECSPI2_SS0__UART3_DCE_CTS 0x01C8 0x0490 0x0000 0x2 0x0
#define MX6SLL_PAD_ECSPI2_SS0__UART3_DTE_RTS 0x01C8 0x0490 0x0750 0x2 0x1
#define MX6SLL_PAD_ECSPI2_SS0__CSI_VSYNC 0x01C8 0x0490 0x05F8 0x3 0x1
#define MX6SLL_PAD_ECSPI2_SS0__SD1_CD_B 0x01C8 0x0490 0x0770 0x4 0x2
#define MX6SLL_PAD_ECSPI2_SS0__GPIO4_IO15 0x01C8 0x0490 0x0000 0x5 0x0
#define MX6SLL_PAD_ECSPI2_SS0__USB_OTG1_PWR 0x01C8 0x0490 0x0000 0x6 0x0
#define MX6SLL_PAD_SD1_CLK__SD1_CLK 0x01CC 0x0494 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_CLK__KEY_COL0 0x01CC 0x0494 0x06A0 0x2 0x2
#define MX6SLL_PAD_SD1_CLK__EPDC_SDCE4 0x01CC 0x0494 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_CLK__GPIO5_IO15 0x01CC 0x0494 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_CMD__SD1_CMD 0x01D0 0x0498 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_CMD__KEY_ROW0 0x01D0 0x0498 0x06C0 0x2 0x2
#define MX6SLL_PAD_SD1_CMD__EPDC_SDCE5 0x01D0 0x0498 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_CMD__GPIO5_IO14 0x01D0 0x0498 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA0__SD1_DATA0 0x01D4 0x049C 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA0__KEY_COL1 0x01D4 0x049C 0x06A4 0x2 0x2
#define MX6SLL_PAD_SD1_DATA0__EPDC_SDCE6 0x01D4 0x049C 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA0__GPIO5_IO11 0x01D4 0x049C 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA1__SD1_DATA1 0x01D8 0x04A0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA1__KEY_ROW1 0x01D8 0x04A0 0x06C4 0x2 0x2
#define MX6SLL_PAD_SD1_DATA1__EPDC_SDCE7 0x01D8 0x04A0 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA1__GPIO5_IO08 0x01D8 0x04A0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA2__SD1_DATA2 0x01DC 0x04A4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA2__KEY_COL2 0x01DC 0x04A4 0x06A8 0x2 0x2
#define MX6SLL_PAD_SD1_DATA2__EPDC_SDCE8 0x01DC 0x04A4 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA2__GPIO5_IO13 0x01DC 0x04A4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA3__SD1_DATA3 0x01E0 0x04A8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA3__KEY_ROW2 0x01E0 0x04A8 0x06C8 0x2 0x2
#define MX6SLL_PAD_SD1_DATA3__EPDC_SDCE9 0x01E0 0x04A8 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA3__GPIO5_IO06 0x01E0 0x04A8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA4__SD1_DATA4 0x01E4 0x04AC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA4__KEY_COL3 0x01E4 0x04AC 0x06AC 0x2 0x2
#define MX6SLL_PAD_SD1_DATA4__EPDC_SDCLK_N 0x01E4 0x04AC 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA4__UART4_DCE_RX 0x01E4 0x04AC 0x075C 0x4 0x6
#define MX6SLL_PAD_SD1_DATA4__UART4_DTE_TX 0x01E4 0x04AC 0x0000 0x4 0x0
#define MX6SLL_PAD_SD1_DATA4__GPIO5_IO12 0x01E4 0x04AC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA5__SD1_DATA5 0x01E8 0x04B0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA5__KEY_ROW3 0x01E8 0x04B0 0x06CC 0x2 0x2
#define MX6SLL_PAD_SD1_DATA5__EPDC_SDOED 0x01E8 0x04B0 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA5__UART4_DCE_TX 0x01E8 0x04B0 0x0000 0x4 0x0
#define MX6SLL_PAD_SD1_DATA5__UART4_DTE_RX 0x01E8 0x04B0 0x075C 0x4 0x7
#define MX6SLL_PAD_SD1_DATA5__GPIO5_IO09 0x01E8 0x04B0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA6__SD1_DATA6 0x01EC 0x04B4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA6__KEY_COL4 0x01EC 0x04B4 0x06B0 0x2 0x2
#define MX6SLL_PAD_SD1_DATA6__EPDC_SDOEZ 0x01EC 0x04B4 0x0000 0x3 0x0
#define MX6SLL_PAD_SD1_DATA6__UART4_DCE_RTS 0x01EC 0x04B4 0x0758 0x4 0x4
#define MX6SLL_PAD_SD1_DATA6__UART4_DTE_CTS 0x01EC 0x04B4 0x0000 0x4 0x0
#define MX6SLL_PAD_SD1_DATA6__GPIO5_IO07 0x01EC 0x04B4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD1_DATA7__SD1_DATA7 0x01F0 0x04B8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD1_DATA7__KEY_ROW4 0x01F0 0x04B8 0x06D0 0x2 0x2
#define MX6SLL_PAD_SD1_DATA7__CCM_PMIC_READY 0x01F0 0x04B8 0x05AC 0x3 0x3
#define MX6SLL_PAD_SD1_DATA7__UART4_DCE_CTS 0x01F0 0x04B8 0x0000 0x4 0x0
#define MX6SLL_PAD_SD1_DATA7__UART4_DTE_RTS 0x01F0 0x04B8 0x0758 0x4 0x5
#define MX6SLL_PAD_SD1_DATA7__GPIO5_IO10 0x01F0 0x04B8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_RESET__SD2_RESET 0x01F4 0x04BC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_RESET__WDOG2_B 0x01F4 0x04BC 0x0000 0x2 0x0
#define MX6SLL_PAD_SD2_RESET__SPDIF_OUT 0x01F4 0x04BC 0x0000 0x3 0x0
#define MX6SLL_PAD_SD2_RESET__CSI_MCLK 0x01F4 0x04BC 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_RESET__GPIO4_IO27 0x01F4 0x04BC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_CLK__SD2_CLK 0x01F8 0x04C0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_CLK__AUD4_RXFS 0x01F8 0x04C0 0x0570 0x1 0x1
#define MX6SLL_PAD_SD2_CLK__ECSPI3_SCLK 0x01F8 0x04C0 0x0630 0x2 0x1
#define MX6SLL_PAD_SD2_CLK__CSI_DATA00 0x01F8 0x04C0 0x05C8 0x3 0x1
#define MX6SLL_PAD_SD2_CLK__GPIO5_IO05 0x01F8 0x04C0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_CMD__SD2_CMD 0x01FC 0x04C4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_CMD__AUD4_RXC 0x01FC 0x04C4 0x056C 0x1 0x1
#define MX6SLL_PAD_SD2_CMD__ECSPI3_SS0 0x01FC 0x04C4 0x0648 0x2 0x1
#define MX6SLL_PAD_SD2_CMD__CSI_DATA01 0x01FC 0x04C4 0x05CC 0x3 0x1
#define MX6SLL_PAD_SD2_CMD__EPIT1_OUT 0x01FC 0x04C4 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_CMD__GPIO5_IO04 0x01FC 0x04C4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA0__SD2_DATA0 0x0200 0x04C8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA0__AUD4_RXD 0x0200 0x04C8 0x0564 0x1 0x2
#define MX6SLL_PAD_SD2_DATA0__ECSPI3_MOSI 0x0200 0x04C8 0x063C 0x2 0x1
#define MX6SLL_PAD_SD2_DATA0__CSI_DATA02 0x0200 0x04C8 0x05D0 0x3 0x1
#define MX6SLL_PAD_SD2_DATA0__UART5_DCE_RTS 0x0200 0x04C8 0x0760 0x4 0x4
#define MX6SLL_PAD_SD2_DATA0__UART5_DTE_CTS 0x0200 0x04C8 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_DATA0__GPIO5_IO01 0x0200 0x04C8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA1__SD2_DATA1 0x0204 0x04CC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA1__AUD4_TXC 0x0204 0x04CC 0x0574 0x1 0x2
#define MX6SLL_PAD_SD2_DATA1__ECSPI3_MISO 0x0204 0x04CC 0x0638 0x2 0x1
#define MX6SLL_PAD_SD2_DATA1__CSI_DATA03 0x0204 0x04CC 0x05D4 0x3 0x1
#define MX6SLL_PAD_SD2_DATA1__UART5_DCE_CTS 0x0204 0x04CC 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_DATA1__UART5_DTE_RTS 0x0204 0x04CC 0x0760 0x4 0x5
#define MX6SLL_PAD_SD2_DATA1__GPIO4_IO30 0x0204 0x04CC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA2__SD2_DATA2 0x0208 0x04D0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA2__AUD4_TXFS 0x0208 0x04D0 0x0578 0x1 0x2
#define MX6SLL_PAD_SD2_DATA2__CSI_DATA04 0x0208 0x04D0 0x05D8 0x3 0x1
#define MX6SLL_PAD_SD2_DATA2__UART5_DCE_RX 0x0208 0x04D0 0x0764 0x4 0x4
#define MX6SLL_PAD_SD2_DATA2__UART5_DTE_TX 0x0208 0x04D0 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_DATA2__GPIO5_IO03 0x0208 0x04D0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA3__SD2_DATA3 0x020C 0x04D4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA3__AUD4_TXD 0x020C 0x04D4 0x0568 0x1 0x2
#define MX6SLL_PAD_SD2_DATA3__CSI_DATA05 0x020C 0x04D4 0x05DC 0x3 0x1
#define MX6SLL_PAD_SD2_DATA3__UART5_DCE_TX 0x020C 0x04D4 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_DATA3__UART5_DTE_RX 0x020C 0x04D4 0x0764 0x4 0x5
#define MX6SLL_PAD_SD2_DATA3__GPIO4_IO28 0x020C 0x04D4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA4__SD2_DATA4 0x0210 0x04D8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA4__SD3_DATA4 0x0210 0x04D8 0x0784 0x1 0x1
#define MX6SLL_PAD_SD2_DATA4__UART2_DCE_RX 0x0210 0x04D8 0x074C 0x2 0x2
#define MX6SLL_PAD_SD2_DATA4__UART2_DTE_TX 0x0210 0x04D8 0x0000 0x2 0x0
#define MX6SLL_PAD_SD2_DATA4__CSI_DATA06 0x0210 0x04D8 0x05E0 0x3 0x1
#define MX6SLL_PAD_SD2_DATA4__SPDIF_OUT 0x0210 0x04D8 0x0000 0x4 0x0
#define MX6SLL_PAD_SD2_DATA4__GPIO5_IO02 0x0210 0x04D8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA5__SD2_DATA5 0x0214 0x04DC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA5__SD3_DATA5 0x0214 0x04DC 0x0788 0x1 0x1
#define MX6SLL_PAD_SD2_DATA5__UART2_DCE_TX 0x0214 0x04DC 0x0000 0x2 0x0
#define MX6SLL_PAD_SD2_DATA5__UART2_DTE_RX 0x0214 0x04DC 0x074C 0x2 0x3
#define MX6SLL_PAD_SD2_DATA5__CSI_DATA07 0x0214 0x04DC 0x05E4 0x3 0x1
#define MX6SLL_PAD_SD2_DATA5__SPDIF_IN 0x0214 0x04DC 0x0738 0x4 0x1
#define MX6SLL_PAD_SD2_DATA5__GPIO4_IO31 0x0214 0x04DC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA6__SD2_DATA6 0x0218 0x04E0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA6__SD3_DATA6 0x0218 0x04E0 0x078C 0x1 0x1
#define MX6SLL_PAD_SD2_DATA6__UART2_DCE_RTS 0x0218 0x04E0 0x0748 0x2 0x2
#define MX6SLL_PAD_SD2_DATA6__UART2_DTE_CTS 0x0218 0x04E0 0x0000 0x2 0x0
#define MX6SLL_PAD_SD2_DATA6__CSI_DATA08 0x0218 0x04E0 0x05E8 0x3 0x1
#define MX6SLL_PAD_SD2_DATA6__SD2_WP 0x0218 0x04E0 0x077C 0x4 0x1
#define MX6SLL_PAD_SD2_DATA6__GPIO4_IO29 0x0218 0x04E0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD2_DATA7__SD2_DATA7 0x021C 0x04E4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD2_DATA7__SD3_DATA7 0x021C 0x04E4 0x0790 0x1 0x1
#define MX6SLL_PAD_SD2_DATA7__UART2_DCE_CTS 0x021C 0x04E4 0x0000 0x2 0x0
#define MX6SLL_PAD_SD2_DATA7__UART2_DTE_RTS 0x021C 0x04E4 0x0748 0x2 0x3
#define MX6SLL_PAD_SD2_DATA7__CSI_DATA09 0x021C 0x04E4 0x05EC 0x3 0x1
#define MX6SLL_PAD_SD2_DATA7__SD2_CD_B 0x021C 0x04E4 0x0778 0x4 0x1
#define MX6SLL_PAD_SD2_DATA7__GPIO5_IO00 0x021C 0x04E4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_CLK__SD3_CLK 0x0220 0x04E8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_CLK__AUD5_RXFS 0x0220 0x04E8 0x0588 0x1 0x0
#define MX6SLL_PAD_SD3_CLK__KEY_COL5 0x0220 0x04E8 0x0694 0x2 0x0
#define MX6SLL_PAD_SD3_CLK__CSI_DATA10 0x0220 0x04E8 0x05B0 0x3 0x0
#define MX6SLL_PAD_SD3_CLK__WDOG1_RESET_B_DEB 0x0220 0x04E8 0x0000 0x4 0x0
#define MX6SLL_PAD_SD3_CLK__GPIO5_IO18 0x0220 0x04E8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_CLK__USB_OTG1_PWR 0x0220 0x04E8 0x0000 0x6 0x0
#define MX6SLL_PAD_SD3_CMD__SD3_CMD 0x0224 0x04EC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_CMD__AUD5_RXC 0x0224 0x04EC 0x0584 0x1 0x0
#define MX6SLL_PAD_SD3_CMD__KEY_ROW5 0x0224 0x04EC 0x06B4 0x2 0x0
#define MX6SLL_PAD_SD3_CMD__CSI_DATA11 0x0224 0x04EC 0x05B4 0x3 0x0
#define MX6SLL_PAD_SD3_CMD__USB_OTG2_ID 0x0224 0x04EC 0x0560 0x4 0x1
#define MX6SLL_PAD_SD3_CMD__GPIO5_IO21 0x0224 0x04EC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_CMD__USB_OTG2_PWR 0x0224 0x04EC 0x0000 0x6 0x0
#define MX6SLL_PAD_SD3_DATA0__SD3_DATA0 0x0228 0x04F0 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_DATA0__AUD5_RXD 0x0228 0x04F0 0x057C 0x1 0x0
#define MX6SLL_PAD_SD3_DATA0__KEY_COL6 0x0228 0x04F0 0x0698 0x2 0x0
#define MX6SLL_PAD_SD3_DATA0__CSI_DATA12 0x0228 0x04F0 0x05B8 0x3 0x0
#define MX6SLL_PAD_SD3_DATA0__USB_OTG1_ID 0x0228 0x04F0 0x055C 0x4 0x1
#define MX6SLL_PAD_SD3_DATA0__GPIO5_IO19 0x0228 0x04F0 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_DATA1__SD3_DATA1 0x022C 0x04F4 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_DATA1__AUD5_TXC 0x022C 0x04F4 0x058C 0x1 0x0
#define MX6SLL_PAD_SD3_DATA1__KEY_ROW6 0x022C 0x04F4 0x06B8 0x2 0x0
#define MX6SLL_PAD_SD3_DATA1__CSI_DATA13 0x022C 0x04F4 0x05BC 0x3 0x0
#define MX6SLL_PAD_SD3_DATA1__SD1_VSELECT 0x022C 0x04F4 0x0000 0x4 0x0
#define MX6SLL_PAD_SD3_DATA1__GPIO5_IO20 0x022C 0x04F4 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_DATA1__JTAG_DE_B 0x022C 0x04F4 0x0000 0x6 0x0
#define MX6SLL_PAD_SD3_DATA2__SD3_DATA2 0x0230 0x04F8 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_DATA2__AUD5_TXFS 0x0230 0x04F8 0x0590 0x1 0x0
#define MX6SLL_PAD_SD3_DATA2__KEY_COL7 0x0230 0x04F8 0x069C 0x2 0x0
#define MX6SLL_PAD_SD3_DATA2__CSI_DATA14 0x0230 0x04F8 0x05C0 0x3 0x0
#define MX6SLL_PAD_SD3_DATA2__EPIT1_OUT 0x0230 0x04F8 0x0000 0x4 0x0
#define MX6SLL_PAD_SD3_DATA2__GPIO5_IO16 0x0230 0x04F8 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_DATA2__USB_OTG2_OC 0x0230 0x04F8 0x0768 0x6 0x0
#define MX6SLL_PAD_SD3_DATA3__SD3_DATA3 0x0234 0x04FC 0x0000 0x0 0x0
#define MX6SLL_PAD_SD3_DATA3__AUD5_TXD 0x0234 0x04FC 0x0580 0x1 0x0
#define MX6SLL_PAD_SD3_DATA3__KEY_ROW7 0x0234 0x04FC 0x06BC 0x2 0x0
#define MX6SLL_PAD_SD3_DATA3__CSI_DATA15 0x0234 0x04FC 0x05C4 0x3 0x0
#define MX6SLL_PAD_SD3_DATA3__EPIT2_OUT 0x0234 0x04FC 0x0000 0x4 0x0
#define MX6SLL_PAD_SD3_DATA3__GPIO5_IO17 0x0234 0x04FC 0x0000 0x5 0x0
#define MX6SLL_PAD_SD3_DATA3__USB_OTG1_OC 0x0234 0x04FC 0x076C 0x6 0x0
#define MX6SLL_PAD_GPIO4_IO20__SD1_STROBE 0x0238 0x0500 0x0000 0x0 0x0
#define MX6SLL_PAD_GPIO4_IO20__AUD6_RXFS 0x0238 0x0500 0x05A0 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO20__ECSPI4_SS0 0x0238 0x0500 0x065C 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO20__GPT_CAPTURE1 0x0238 0x0500 0x0670 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO20__GPIO4_IO20 0x0238 0x0500 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO21__SD2_STROBE 0x023C 0x0504 0x0000 0x0 0x0
#define MX6SLL_PAD_GPIO4_IO21__AUD6_RXC 0x023C 0x0504 0x059C 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO21__ECSPI4_SCLK 0x023C 0x0504 0x0650 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO21__GPT_CAPTURE2 0x023C 0x0504 0x0674 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO21__GPIO4_IO21 0x023C 0x0504 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO19__SD3_STROBE 0x0240 0x0508 0x0000 0x0 0x0
#define MX6SLL_PAD_GPIO4_IO19__AUD6_RXD 0x0240 0x0508 0x0594 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO19__ECSPI4_MOSI 0x0240 0x0508 0x0658 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO19__GPT_COMPARE1 0x0240 0x0508 0x0000 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO19__GPIO4_IO19 0x0240 0x0508 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO25__AUD6_TXC 0x0244 0x050C 0x05A4 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO25__ECSPI4_MISO 0x0244 0x050C 0x0654 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO25__GPT_COMPARE2 0x0244 0x050C 0x0000 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO25__GPIO4_IO25 0x0244 0x050C 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO18__AUD6_TXFS 0x0248 0x0510 0x05A8 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO18__ECSPI4_SS1 0x0248 0x0510 0x0660 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO18__GPT_COMPARE3 0x0248 0x0510 0x0000 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO18__GPIO4_IO18 0x0248 0x0510 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO24__AUD6_TXD 0x024C 0x0514 0x0598 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO24__ECSPI4_SS2 0x024C 0x0514 0x0664 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO24__GPT_CLKIN 0x024C 0x0514 0x0678 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO24__GPIO4_IO24 0x024C 0x0514 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO23__AUDIO_CLK_OUT 0x0250 0x0518 0x0000 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO23__SD1_RESET 0x0250 0x0518 0x0000 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO23__SD3_RESET 0x0250 0x0518 0x0000 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO23__GPIO4_IO23 0x0250 0x0518 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO17__USB_OTG1_ID 0x0254 0x051C 0x055C 0x2 0x2
#define MX6SLL_PAD_GPIO4_IO17__SD1_VSELECT 0x0254 0x051C 0x0000 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO17__SD3_VSELECT 0x0254 0x051C 0x0000 0x4 0x0
#define MX6SLL_PAD_GPIO4_IO17__GPIO4_IO17 0x0254 0x051C 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO22__SPDIF_IN 0x0258 0x0520 0x0738 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO22__SD1_WP 0x0258 0x0520 0x0774 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO22__SD3_WP 0x0258 0x0520 0x0794 0x4 0x1
#define MX6SLL_PAD_GPIO4_IO22__GPIO4_IO22 0x0258 0x0520 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO16__SPDIF_OUT 0x025C 0x0524 0x0000 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO16__SD1_CD_B 0x025C 0x0524 0x0770 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO16__SD3_CD_B 0x025C 0x0524 0x0780 0x4 0x1
#define MX6SLL_PAD_GPIO4_IO16__GPIO4_IO16 0x025C 0x0524 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO26__WDOG1_B 0x0260 0x0528 0x0000 0x2 0x0
#define MX6SLL_PAD_GPIO4_IO26__PWM4_OUT 0x0260 0x0528 0x0000 0x3 0x0
#define MX6SLL_PAD_GPIO4_IO26__CCM_PMIC_READY 0x0260 0x0528 0x05AC 0x4 0x1
#define MX6SLL_PAD_GPIO4_IO26__GPIO4_IO26 0x0260 0x0528 0x0000 0x5 0x0
#define MX6SLL_PAD_GPIO4_IO26__SPDIF_EXT_CLK 0x0260 0x0528 0x073C 0x6 0x0
#endif /* __DTS_IMX6SLL_PINFUNC_H */
| {
"pile_set_name": "Github"
} |
{
"name": "web",
"reason": {
"react-jsx": 2
},
"sources": {
"dir": "src",
"subdirs": true
},
"package-specs": {
"module": "es6",
"in-source": true
},
"suffix": ".bs.js",
"refmt": 3
} | {
"pile_set_name": "Github"
} |
#! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
$as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by FreeType $as_me 2.4.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
on `(hostname || uname -n) 2>/dev/null | sed 1q`
"
# Files that config.status was made for.
config_files=" unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in"
config_headers=" ftconfig.h:ftconfig.in"
config_commands=" libtool"
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
--config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Configuration commands:
$config_commands
Report bugs to <[email protected]>."
ac_cs_config="'--host=arm-linux-androideabi' '--prefix=/freetype' '--without-zlib' 'host_alias=arm-linux-androideabi'"
ac_cs_version="\
FreeType config.status 2.4.12
configured by ./configure, generated by GNU Autoconf 2.69,
with options \"$ac_cs_config\"
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='/Users/tnewell/Downloads/freetype-2.4.12/builds/unix'
srcdir='.'
INSTALL='/usr/bin/install -c'
AWK='awk'
test -n "$AWK" || AWK=awk
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
--*=)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=
ac_shift=:
;;
*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
$as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
if $ac_cs_recheck; then
set X /bin/sh './configure' '--host=arm-linux-androideabi' '--prefix=/freetype' '--without-zlib' 'host_alias=arm-linux-androideabi' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
export CONFIG_SHELL
exec "$@"
fi
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
$as_echo "$ac_log"
} >&5
#
# INIT-COMMANDS
#
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
double_quote_subst='s/\(["`\\]\)/\\\1/g'
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
macro_version='2.4.2'
macro_revision='1.3337'
AS='as'
DLLTOOL='false'
OBJDUMP='arm-linux-androideabi-objdump'
enable_shared='yes'
enable_static='yes'
pic_mode='default'
enable_fast_install='yes'
SHELL='/bin/sh'
ECHO='printf %s\n'
PATH_SEPARATOR=':'
host_alias='arm-linux-androideabi'
host='arm-unknown-linux-androideabi'
host_os='linux-androideabi'
build_alias=''
build='x86_64-apple-darwin11.4.2'
build_os='darwin11.4.2'
SED='/usr/bin/sed'
Xsed='/usr/bin/sed -e 1s/^X//'
GREP='/usr/bin/grep'
EGREP='/usr/bin/grep -E'
FGREP='/usr/bin/grep -F'
LD='/Users/tnewell/androidDev/ndk-standalone-9/arm-linux-androideabi/bin/ld'
NM='/Users/tnewell/androidDev/ndk-standalone-9/bin/arm-linux-androideabi-nm -B'
LN_S='ln -s'
max_cmd_len='196608'
ac_objext='o'
exeext=''
lt_unset='unset'
lt_SP2NL='tr \040 \012'
lt_NL2SP='tr \015\012 \040\040'
lt_cv_to_host_file_cmd='func_convert_file_noop'
lt_cv_to_tool_file_cmd='func_convert_file_noop'
reload_flag=' -r'
reload_cmds='$LD$reload_flag -o $output$reload_objs'
deplibs_check_method='pass_all'
file_magic_cmd='$MAGIC_CMD'
file_magic_glob=''
want_nocaseglob='no'
sharedlib_from_linklib_cmd='printf %s\n'
AR='arm-linux-androideabi-ar'
AR_FLAGS='cru'
archiver_list_spec='@'
STRIP='arm-linux-androideabi-strip'
RANLIB='arm-linux-androideabi-ranlib'
old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib'
old_postuninstall_cmds=''
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib'
lock_old_archive_extraction='no'
CC='arm-linux-androideabi-gcc'
CFLAGS='-g -O2'
compiler='arm-linux-androideabi-gcc'
GCC='yes'
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\'''
nm_file_list_spec='@'
lt_sysroot=''
objdir='.libs'
MAGIC_CMD='file'
lt_prog_compiler_no_builtin_flag=' -fno-builtin'
lt_prog_compiler_pic=' -fPIC -DPIC'
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
lt_cv_prog_compiler_c_o='yes'
need_locks='no'
MANIFEST_TOOL=':'
DSYMUTIL=''
NMEDIT=''
LIPO=''
OTOOL=''
OTOOL64=''
libext='a'
shrext_cmds='.so'
extract_expsyms_cmds=''
archive_cmds_need_lc='no'
enable_shared_with_static_runtimes='no'
export_dynamic_flag_spec='${wl}--export-dynamic'
whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
compiler_needs_object='no'
old_archive_from_new_cmds=''
old_archive_from_expsyms_cmds=''
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
module_cmds=''
module_expsym_cmds=''
with_gnu_ld='yes'
allow_undefined_flag=''
no_undefined_flag=''
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=''
hardcode_direct='no'
hardcode_direct_absolute='no'
hardcode_minus_L='no'
hardcode_shlibpath_var='unsupported'
hardcode_automatic='no'
inherit_rpath='no'
link_all_deplibs='unknown'
always_export_symbols='no'
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
include_expsyms=''
prelink_cmds=''
postlink_cmds=''
file_list_spec=''
variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH'
need_lib_prefix='no'
need_version='no'
version_type='linux'
runpath_var='LD_RUN_PATH'
shlibpath_var='LD_LIBRARY_PATH'
shlibpath_overrides_runpath='no'
libname_spec='lib$name'
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
install_override_mode=''
postinstall_cmds=''
postuninstall_cmds=''
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
finish_eval=''
hardcode_into_libs='yes'
sys_lib_search_path_spec='/Users/tnewell/androidDev/ndk-standalone-9/lib/gcc/arm-linux-androideabi/4.6 /Users/tnewell/androidDev/ndk-standalone-9/lib/gcc /Users/tnewell/androidDev/ndk-standalone-9/arm-linux-androideabi/lib /Users/tnewell/androidDev/ndk-standalone-9/sysroot/usr/lib '
sys_lib_dlsearch_path_spec='/lib /usr/lib'
hardcode_action='immediate'
enable_dlopen='unknown'
enable_dlopen_self='unknown'
enable_dlopen_self_static='unknown'
old_striplib='arm-linux-androideabi-strip --strip-debug'
striplib='arm-linux-androideabi-strip --strip-unneeded'
LTCC='arm-linux-androideabi-gcc'
LTCFLAGS='-g -O2'
compiler='arm-linux-androideabi-gcc'
# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
eval 'cat <<_LTECHO_EOF
$1
_LTECHO_EOF'
}
# Quote evaled strings.
for var in AS DLLTOOL OBJDUMP SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix nm_file_list_spec lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib; do
case `eval \\$ECHO \\""\\$$var"\\"` in
*[\\\`\"\$]*)
eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\""
;;
*)
eval "lt_$var=\\\"\$$var\\\""
;;
esac
done
# Double-quote double-evaled strings.
for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec sys_lib_dlsearch_path_spec; do
case `eval \\$ECHO \\""\\$$var"\\"` in
*[\\\`\"\$]*)
eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
*)
eval "lt_$var=\\\"\$$var\\\""
;;
esac
done
ac_aux_dir='.'
xsi_shell='yes'
lt_shell_append='yes'
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes INIT.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
PACKAGE=''
VERSION=''
TIMESTAMP=''
RM='rm -f'
ofile='libtool'
# Handling of arguments.
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
"unix-cc.mk") CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
"unix-def.mk") CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
tmp= ac_tmp=
trap 'exit_status=$?
: "${ac_tmp:=$tmp}"
{ test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
S["LTLIBOBJS"]=""
S["LIBOBJS"]=""
S["build_libtool_libs"]=""
S["wl"]="-Wl,"
S["hardcode_libdir_flag_spec"]="${wl}-rpath ${wl}$libdir"
S["OTOOL64"]=""
S["OTOOL"]=""
S["LIPO"]=""
S["NMEDIT"]=""
S["DSYMUTIL"]=""
S["MANIFEST_TOOL"]=":"
S["AWK"]="awk"
S["RANLIB"]="arm-linux-androideabi-ranlib"
S["STRIP"]="arm-linux-androideabi-strip"
S["ac_ct_AR"]=""
S["AR"]="arm-linux-androideabi-ar"
S["LN_S"]="ln -s"
S["NM"]="/Users/tnewell/androidDev/ndk-standalone-9/bin/arm-linux-androideabi-nm -B"
S["ac_ct_DUMPBIN"]=""
S["DUMPBIN"]=""
S["LD"]="/Users/tnewell/androidDev/ndk-standalone-9/arm-linux-androideabi/bin/ld"
S["FGREP"]="/usr/bin/grep -F"
S["SED"]="/usr/bin/sed"
S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool"
S["OBJDUMP"]="arm-linux-androideabi-objdump"
S["DLLTOOL"]="false"
S["AS"]="as"
S["SYSTEM_ZLIB"]=""
S["FT2_EXTRA_LIBS"]=""
S["LIBBZ2"]=""
S["LIBZ"]=""
S["ftmac_c"]=""
S["XX_ANSIFLAGS"]=" -pedantic -ansi"
S["XX_CFLAGS"]="-Wall"
S["FTSYS_SRC"]="$(BASE_DIR)/ftsystem.c"
S["EGREP"]="/usr/bin/grep -E"
S["GREP"]="/usr/bin/grep"
S["INSTALL_DATA"]="${INSTALL} -m 644"
S["INSTALL_SCRIPT"]="${INSTALL}"
S["INSTALL_PROGRAM"]="${INSTALL}"
S["RMDIR"]="rmdir"
S["EXEEXT_BUILD"]=""
S["CC_BUILD"]="gcc"
S["CPP"]="arm-linux-androideabi-gcc -E"
S["OBJEXT"]="o"
S["EXEEXT"]=""
S["ac_ct_CC"]=""
S["CPPFLAGS"]=""
S["LDFLAGS"]=""
S["CFLAGS"]="-g -O2"
S["CC"]="arm-linux-androideabi-gcc"
S["host_os"]="linux-androideabi"
S["host_vendor"]="unknown"
S["host_cpu"]="arm"
S["host"]="arm-unknown-linux-androideabi"
S["build_os"]="darwin11.4.2"
S["build_vendor"]="apple"
S["build_cpu"]="x86_64"
S["build"]="x86_64-apple-darwin11.4.2"
S["ft_version"]="16.1.10"
S["version_info"]="16:1:10"
S["target_alias"]=""
S["host_alias"]="arm-linux-androideabi"
S["build_alias"]=""
S["LIBS"]=""
S["ECHO_T"]=""
S["ECHO_N"]=""
S["ECHO_C"]="\\c"
S["DEFS"]="-DHAVE_CONFIG_H"
S["mandir"]="${datarootdir}/man"
S["localedir"]="${datarootdir}/locale"
S["libdir"]="${exec_prefix}/lib"
S["psdir"]="${docdir}"
S["pdfdir"]="${docdir}"
S["dvidir"]="${docdir}"
S["htmldir"]="${docdir}"
S["infodir"]="${datarootdir}/info"
S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
S["oldincludedir"]="/usr/include"
S["includedir"]="${prefix}/include"
S["localstatedir"]="${prefix}/var"
S["sharedstatedir"]="${prefix}/com"
S["sysconfdir"]="${prefix}/etc"
S["datadir"]="${datarootdir}"
S["datarootdir"]="${prefix}/share"
S["libexecdir"]="${exec_prefix}/libexec"
S["sbindir"]="${exec_prefix}/sbin"
S["bindir"]="${exec_prefix}/bin"
S["program_transform_name"]="s,x,x,"
S["prefix"]="/freetype"
S["exec_prefix"]="${prefix}"
S["PACKAGE_URL"]=""
S["PACKAGE_BUGREPORT"]="[email protected]"
S["PACKAGE_STRING"]="FreeType 2.4.12"
S["PACKAGE_VERSION"]="2.4.12"
S["PACKAGE_TARNAME"]="freetype"
S["PACKAGE_NAME"]="FreeType"
S["PATH_SEPARATOR"]=":"
S["SHELL"]="/bin/sh"
_ACAWK
cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
}
{
line = $ 0
nfields = split(line, field, "@")
substed = 0
len = length(field[1])
for (i = 2; i < nfields; i++) {
key = field[i]
keylen = length(key)
if (S_is_set[key]) {
value = S[key]
line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
len += length(value) + length(field[++i])
substed = 1
} else
len += 1 + keylen
}
print line
}
_ACAWK
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
D["PACKAGE_NAME"]=" \"FreeType\""
D["PACKAGE_TARNAME"]=" \"freetype\""
D["PACKAGE_VERSION"]=" \"2.4.12\""
D["PACKAGE_STRING"]=" \"FreeType 2.4.12\""
D["PACKAGE_BUGREPORT"]=" \"[email protected]\""
D["PACKAGE_URL"]=" \"\""
D["STDC_HEADERS"]=" 1"
D["HAVE_SYS_TYPES_H"]=" 1"
D["HAVE_SYS_STAT_H"]=" 1"
D["HAVE_STDLIB_H"]=" 1"
D["HAVE_STRING_H"]=" 1"
D["HAVE_MEMORY_H"]=" 1"
D["HAVE_STRINGS_H"]=" 1"
D["HAVE_INTTYPES_H"]=" 1"
D["HAVE_STDINT_H"]=" 1"
D["HAVE_UNISTD_H"]=" 1"
D["HAVE_FCNTL_H"]=" 1"
D["HAVE_UNISTD_H"]=" 1"
D["SIZEOF_INT"]=" 4"
D["SIZEOF_LONG"]=" 4"
D["HAVE_STDLIB_H"]=" 1"
D["HAVE_UNISTD_H"]=" 1"
D["HAVE_SYS_PARAM_H"]=" 1"
D["HAVE_MEMCPY"]=" 1"
D["HAVE_MEMMOVE"]=" 1"
D["HAVE_DLFCN_H"]=" 1"
D["LT_OBJDIR"]=" \".libs/\""
for (key in D) D_is_set[key] = 1
FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ {
line = $ 0
split(line, arg, " ")
if (arg[1] == "#") {
defundef = arg[2]
mac1 = arg[3]
} else {
defundef = substr(arg[1], 2)
mac1 = arg[2]
}
split(mac1, mac2, "(") #)
macro = mac2[1]
prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
print prefix "define", macro P[macro] D[macro]
next
} else {
# Replace #undef with comments. This is necessary, for example,
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
print "/*", prefix defundef, macro, "*/"
next
}
}
}
{ print }
_ACAWK
as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
:L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
ac_save_IFS=$IFS
IFS=:
set x $ac_tag
IFS=$ac_save_IFS
shift
ac_file=$1
shift
case $ac_mode in
:L) ac_source=$1;;
:[FH])
ac_file_inputs=
for ac_f
do
case $ac_f in
-) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
$as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
ac_sed_conf_input=`$as_echo "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
case $ac_tag in
*:-:* | *:-) cat >"$ac_tmp/stdin" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
case $ac_mode in
:F)
#
# CONFIG_FILE
#
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
p
q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
ac_datarootdir_hack='
s&@datadir@&${datarootdir}&g
s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
s&@infodir@&${datarootdir}/info&g
s&@localedir@&${datarootdir}/locale&g
s&@mandir@&${datarootdir}/man&g
s&\${datarootdir}&${prefix}/share&g' ;;
esac
ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{
h
s///
s/^/:/
s/[ ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[ ]*\).*/\1/
G
s/\n//
s/^[^=]*=[ ]*$//
}
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
>$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
case $ac_file in
-) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
*) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
# CONFIG_HEADER
#
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
:C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
case $ac_file$ac_mode in
"libtool":C)
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
cfgfile="${ofile}T"
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
#
# GNU Libtool 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.
#
# As a special exception to the GNU General Public License,
# if you distribute this file as part of a program or library that
# is built using GNU Libtool, you may include this file under the
# same distribution terms that you use for the rest of that program.
#
# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
# obtained by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# The names of the tagged configurations supported by this script.
available_tags=""
# ### BEGIN LIBTOOL CONFIG
# Which release of libtool.m4 was used?
macro_version=$macro_version
macro_revision=$macro_revision
# Assembler program.
AS=$lt_AS
# DLL creation program.
DLLTOOL=$lt_DLLTOOL
# Object dumper program.
OBJDUMP=$lt_OBJDUMP
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
# Whether or not to build static libraries.
build_old_libs=$enable_static
# What type of objects to build.
pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
# An echo program that protects backslashes.
ECHO=$lt_ECHO
# The PATH separator for the build system.
PATH_SEPARATOR=$lt_PATH_SEPARATOR
# The host system.
host_alias=$host_alias
host=$host
host_os=$host_os
# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os
# A sed program that does not truncate output.
SED=$lt_SED
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="\$SED -e 1s/^X//"
# A grep program that handles long lines.
GREP=$lt_GREP
# An ERE matcher.
EGREP=$lt_EGREP
# A literal string matcher.
FGREP=$lt_FGREP
# A BSD- or MS-compatible name lister.
NM=$lt_NM
# Whether we need soft or hard links.
LN_S=$lt_LN_S
# What is the maximum length of a command?
max_cmd_len=$max_cmd_len
# Object file suffix (normally "o").
objext=$ac_objext
# Executable file suffix (normally "").
exeext=$exeext
# whether the shell understands "unset".
lt_unset=$lt_unset
# turn spaces into newlines.
SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
# convert \$build file names to \$host format.
to_host_file_cmd=$lt_cv_to_host_file_cmd
# convert \$build files to toolchain format.
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
# Command to use when deplibs_check_method = "file_magic".
file_magic_cmd=$lt_file_magic_cmd
# How to find potential files when deplibs_check_method = "file_magic".
file_magic_glob=$lt_file_magic_glob
# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
want_nocaseglob=$lt_want_nocaseglob
# Command to associate shared and link libraries.
sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
# The archiver.
AR=$lt_AR
# Flags to create an archive.
AR_FLAGS=$lt_AR_FLAGS
# How to feed a file listing to the archiver.
archiver_list_spec=$lt_archiver_list_spec
# A symbol stripping program.
STRIP=$lt_STRIP
# Commands used to install an old-style archive.
RANLIB=$lt_RANLIB
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Whether to use a lock for old archive extraction.
lock_old_archive_extraction=$lock_old_archive_extraction
# A C compiler.
LTCC=$lt_CC
# LTCC compiler flags.
LTCFLAGS=$lt_CFLAGS
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
# The root where to search for dependent libraries,and in which our libraries should be installed.
lt_sysroot=$lt_sysroot
# The name of the directory that contains temporary libtool files.
objdir=$objdir
# Used to examine libraries when file_magic_cmd begins with "file".
MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Manifest tool.
MANIFEST_TOOL=$lt_MANIFEST_TOOL
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
# Tool to change global to local symbols on Mac OS X.
NMEDIT=$lt_NMEDIT
# Tool to manipulate fat objects and archives on Mac OS X.
LIPO=$lt_LIPO
# ldd/readelf like tool for Mach-O binaries on Mac OS X.
OTOOL=$lt_OTOOL
# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
OTOOL64=$lt_OTOOL64
# Old archive suffix (normally "a").
libext=$libext
# Shared library suffix (normally ".so").
shrext_cmds=$lt_shrext_cmds
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Variables whose values should be saved in libtool wrapper scripts and
# restored at link time.
variables_saved_for_relink=$lt_variables_saved_for_relink
# Do we need the "lib" prefix for modules?
need_lib_prefix=$need_lib_prefix
# Do we need a version for libraries?
need_version=$need_version
# Library versioning type.
version_type=$version_type
# Shared library runtime path variable.
runpath_var=$runpath_var
# Shared library path variable.
shlibpath_var=$shlibpath_var
# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# Format of library name prefix.
libname_spec=$lt_libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME
library_names_spec=$lt_library_names_spec
# The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec
# Permission mode override for installation of shared libraries.
install_override_mode=$lt_install_override_mode
# Command to use after installation of a shared archive.
postinstall_cmds=$lt_postinstall_cmds
# Command to use after uninstallation of a shared archive.
postuninstall_cmds=$lt_postuninstall_cmds
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
# As "finish_cmds", except a single script fragment to be evaled but
# not shown.
finish_eval=$lt_finish_eval
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries.
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self
# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
# The linker used to build libraries.
LD=$lt_LD
# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# Commands used to build an old-style archive.
old_archive_cmds=$lt_old_archive_cmds
# A language specific compiler.
CC=$lt_compiler
# Is the compiler the GNU compiler?
with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic
# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o
# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$archive_cmds_need_lc
# Whether or not to disallow shared libs when runtime libs are static.
allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$lt_whole_archive_flag_spec
# Whether the compiler copes with passing no objects directly.
compiler_needs_object=$lt_compiler_needs_object
# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
# Commands used to build a shared archive.
archive_cmds=$lt_archive_cmds
archive_expsym_cmds=$lt_archive_expsym_cmds
# Commands used to build a loadable module if different from building
# a shared archive.
module_cmds=$lt_module_cmds
module_expsym_cmds=$lt_module_expsym_cmds
# Whether we are building with GNU ld or not.
with_gnu_ld=$lt_with_gnu_ld
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$lt_allow_undefined_flag
# Flag that enforces no undefined symbols.
no_undefined_flag=$lt_no_undefined_flag
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
# into the resulting binary.
hardcode_minus_L=$hardcode_minus_L
# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
# into the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
# Set to "yes" if building a shared library automatically hardcodes DIR
# into the library and all subsequent libraries and executables linked
# against it.
hardcode_automatic=$hardcode_automatic
# Set to yes if linker adds runtime paths of dependent libraries
# to runtime path list.
inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
# The commands to list exported symbols.
export_symbols_cmds=$lt_export_symbols_cmds
# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$lt_exclude_expsyms
# Symbols that must always be exported.
include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
# Commands necessary for finishing linking programs.
postlink_cmds=$lt_postlink_cmds
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
# ### END LIBTOOL CONFIG
_LT_EOF
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
_LT_EOF
;;
esac
ltmain="$ac_aux_dir/ltmain.sh"
# We use sed instead of cat because bash on DJGPP gets confused if
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
if test x"$xsi_shell" = xyes; then
sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
func_dirname ()\
{\
\ case ${1} in\
\ */*) func_dirname_result="${1%/*}${2}" ;;\
\ * ) func_dirname_result="${3}" ;;\
\ esac\
} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_basename ()$/,/^} # func_basename /c\
func_basename ()\
{\
\ func_basename_result="${1##*/}"\
} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
func_dirname_and_basename ()\
{\
\ case ${1} in\
\ */*) func_dirname_result="${1%/*}${2}" ;;\
\ * ) func_dirname_result="${3}" ;;\
\ esac\
\ func_basename_result="${1##*/}"\
} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
func_stripname ()\
{\
\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
\ # positional parameters, so assign one to ordinary parameter first.\
\ func_stripname_result=${3}\
\ func_stripname_result=${func_stripname_result#"${1}"}\
\ func_stripname_result=${func_stripname_result%"${2}"}\
} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
func_split_long_opt ()\
{\
\ func_split_long_opt_name=${1%%=*}\
\ func_split_long_opt_arg=${1#*=}\
} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
func_split_short_opt ()\
{\
\ func_split_short_opt_arg=${1#??}\
\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
func_lo2o ()\
{\
\ case ${1} in\
\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
\ *) func_lo2o_result=${1} ;;\
\ esac\
} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_xform ()$/,/^} # func_xform /c\
func_xform ()\
{\
func_xform_result=${1%.*}.lo\
} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_arith ()$/,/^} # func_arith /c\
func_arith ()\
{\
func_arith_result=$(( $* ))\
} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_len ()$/,/^} # func_len /c\
func_len ()\
{\
func_len_result=${#1}\
} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
fi
if test x"$lt_shell_append" = xyes; then
sed -e '/^func_append ()$/,/^} # func_append /c\
func_append ()\
{\
eval "${1}+=\\${2}"\
} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
func_append_quoted ()\
{\
\ func_quote_for_eval "${2}"\
\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
# Save a `func_append' function call where possible by direct use of '+='
sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
else
# Save a `func_append' function call even when '+=' is not available
sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
&& mv -f "$cfgfile.tmp" "$cfgfile" \
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
test 0 -eq $? || _lt_function_replace_fail=:
fi
if test x"$_lt_function_replace_fail" = x":"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
fi
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
;;
"ftconfig.h":H) mv ftconfig.h ftconfig.tmp
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
rm ftconfig.tmp ;;
esac
done # for ac_tag
as_fn_exit 0
| {
"pile_set_name": "Github"
} |
<title>帖子列表</title>
<div class="layui-card layadmin-header">
<div class="layui-breadcrumb" lay-filter="breadcrumb">
<a lay-href="">主页</a>
<a><cite>应用</cite></a>
<a><cite>帖子列表</cite></a>
</div>
</div>
<div class="layui-fluid">
<div class="layui-card">
<div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="app-forum-list">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">ID</label>
<div class="layui-input-block">
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发帖人</label>
<div class="layui-input-block">
<input type="text" name="poster" placeholder="请输入" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发帖内容</label>
<div class="layui-input-block">
<input type="text" name="content" placeholder="请输入" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">帖子状态</label>
<div class="layui-input-block">
<select name="top">
<option value="0">正常</option>
<option value="1">置顶</option>
<option value="2">封禁</option>
</select>
</div>
</div>
<div class="layui-inline">
<button class="layui-btn layuiadmin-btn-forum-list" lay-submit lay-filter="LAY-app-forumlist-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</div>
<div class="layui-card-body">
<div style="padding-bottom: 10px;">
<button class="layui-btn layuiadmin-btn-forum-list" data-type="batchdel">删除</button>
</div>
<table id="LAY-app-forum-list" lay-filter="LAY-app-forum-list"></table>
<script type="text/html" id="imgTpl">
<img style="display: inline-block; width: 50%; height: 100%;" src= {{ d.avatar }}>
</script>
<script type="text/html" id="buttonTpl">
{{# if(d.top == true){ }}
<button class="layui-btn layui-btn-xs">已置顶</button>
{{# } else { }}
<button class="layui-btn layui-btn-primary layui-btn-xs">正常显示</button>
{{# } }}
</script>
<script type="text/html" id="table-forum-list">
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
</script>
</div>
</div>
</div>
<script>
layui.use('forum', layui.factory('forum')).use(['admin', 'forum', 'table'], function(){
var $ = layui.$
,form = layui.form
,table = layui.table;
form.render(null, 'app-forum-list');
//监听搜索
form.on('submit(LAY-app-forumlist-search)', function(data){
var field = data.field;
//执行重载
table.reload('LAY-app-forum-list', {
where: field
});
});
//事件
var active = {
batchdel: function(){
var checkStatus = table.checkStatus('LAY-app-forum-list')
,checkData = checkStatus.data; //得到选中的数据
if(checkData.length === 0){
return layer.msg('请选择数据');
}
layer.confirm('确定删除吗?', function(index) {
//执行 Ajax 后重载
/*
admin.req({
url: 'xxx'
//,……
});
*/
table.reload('LAY-app-forum-list');
layer.msg('已删除');
});
}
}
$('.layui-btn.layuiadmin-btn-forum-list').on('click', function(){
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
});
</script> | {
"pile_set_name": "Github"
} |
type Person record {
string name;
};
type Employee record {
string name;
boolean intern;
};
Person person1 = {name: "John"};
Employee employee1 = {name: "John", intern: true};
function basicTupleAssignment() returns string {
[int, string, boolean...] t = [1, "s", true, true];
[int, string,
boolean...] t1 = [2, "s", true];
[int, string, boolean...] t2 = [3, "s"];
return t.toString() + " " + t1.toString() + " " + t2.toString();
}
function tupleAssignmentWithNilRestDescriptor() returns string {
[int, string, ()...] t = [1, "s"];
[int, string, ()...] t1 = [1, "s", ()];
[int, string, ()...] t2 = [1, "s", (), ()];
[(
()
|
())...] t3 = [(), ()];
return t.toString() + " " + t1.toString() + " " + t2.toString() + " " + t3.toString();
}
function tupleAssignmentWithOnlyRestDescriptor() returns string {
[int...] t = [1, 2];
[
string
...] t1 = ["s", "s"];
[()...] t2 = [(), ()];
return t.toString() + " " + t1.toString() + " " + t2.toString();
}
function tupleCovarianceWithRestDescriptor() returns string {
[string, Employee...] e = ["s", employee1, employee1, employee1];
[string, Person...] t = e;
string s = "";
foreach var i in t {
s += i.toString() + " ";
}
return s;
}
function tupleCovarianceWithOnlyRestDescriptor() returns string {
[Employee...] e = [employee1, employee1, employee1];
[Person...] t = e;
string s = "";
foreach var i in t {
s += i.toString() + " ";
}
return s;
}
function testFunctionInvocation() returns string {
[string, float, boolean...] t = ["y", 5.0, true, false];
string x = testTuples(t);
return x;
}
function testTuples([string, float, boolean...] t) returns string {
string s = "";
foreach var i in t {
s += i.toString() + " ";
}
return s;
}
function testFunctionReturnValue() returns string {
[string, float, boolean...] t = testReturnTuples("x");
string s = "";
foreach var i in t {
s += i.toString() + " ";
}
return s;
}
function testReturnTuples(string a) returns [string, float, boolean...] {
[string, float, boolean...] t = [a, 5.0, true, false];
return t;
}
function testIndexBasedAccess() returns string {
[boolean, string...] t = [true, "a", "b", "c"];
boolean tempBool = t[0];
string tempStringA = t[1];
string tempStringB = t[2];
string tempStringC = t[3];
t[0] = false;
t[1] = "a1";
t[2] = "b1";
t[3] = "c1";
string s = "";
foreach var i in t {
s += i.toString() + " ";
}
return s;
}
function testIndexBasedAccessNegative() returns string {
[boolean, string...] t = [true, "a", "b", "c"];
string tempStringC = t[4];
string s = "";
foreach var i in t {
s += i.toString();
}
return s;
}
| {
"pile_set_name": "Github"
} |
##===- lib/Target/Mips/TargetDesc/Makefile -----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
LIBRARYNAME = LLVMMipsDesc
# Hack: we need to include 'main' target directory to grab private headers
CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
include $(LEVEL)/Makefile.common
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "[email protected]",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "[email protected]",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "[email protected]",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "[email protected]",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "[email protected]",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "[email protected]",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "[email protected]",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "[email protected]",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "[email protected]",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-tools-settingenviron">
<?dbhtml filename="settingenvironment.html"?>
<title>设置环境</title>
<para>通过为 <command>bash</command> shell 创建两个开机启动的文件,设置合适的工作环境。当以 <systemitem class="username">lfs</systemitem> 用户身份登录时,运行以下命令创建一个新的 <filename>.bash_profile</filename> 文件:</para>
<screen><userinput>cat > ~/.bash_profile << "EOF"
<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
EOF</userinput></screen>
<para>当以 <systemitem class="username">lfs</systemitem> 用户身份登录时,初始 shell 通常是一个 <emphasis>login</emphasis> 的 shell,它先读取宿主机的 <filename>/etc/profile</filename> 文件(很可能包括一些设定和环境变量),然后是 <filename>.bash_profile</filename> 文件。<filename>.bash_profile</filename> 中的命令 <command>exec env -i.../bin/bash</command> 用一个除了 <envar>HOME</envar>,<envar>TERM</envar> 和 <envar>PS1</envar> 变量外,其他环境完全为空的新 shell 代替运行中的 shell。这能确保不会有潜在的和意想不到的危险环境变量,从宿主机泄露到构建环境中。这样做主要是为了确保环境的干净。</para>
<para>新的 shell 实例是一个 <emphasis>non-login</emphasis> 的 shell,不会读取 <filename>/etc/profile</filename> 或者 <filename>.bash_profile</filename> 文件,而是读取 <filename>.bashrc</filename>。现在,创建 <filename>.bashrc</filename> 文件:</para>
<screen><userinput>cat > ~/.bashrc << "EOF"
<literal>set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH</literal>
EOF</userinput></screen>
<para><command>set +h</command> 命令关闭了 <command>bash</command> 的哈希功能。哈希通常是个好用的功能——<command>bash</command> 用一个哈希表来记录可执行文件的完整路径,以规避对 <envar>PATH</envar> 进行检索的时间和对同一个可执行文件的重复寻找。然而,新工具在安装后,应马上使用。通过关闭哈希功能,程序执行的时候就会一直搜索 <envar>PATH</envar>。如此,新编译的工具一旦可用,shell 便能在马上在文件夹 <filename class="directory">$LFS/tools</filename> 中找到它们,而不会去记录存在于不同地方的旧版该程序。</para>
<para>设置用户文件新建时的掩码(umask)为 022,以确保新建的文件和目录只有其所有者可写,但任何人都可读可执行(假设系统调用的 <function>open(2)</function> 使用的是默认模式,新文件将使用 664 权限模式、文件夹为 755 模式)。</para>
<para><envar>LFS</envar> 变量应设置成选定的挂载点。</para>
<para><envar>LC_ALL</envar> 变量控制某些程序的本地化,使它们的消息遵循特定国家的惯例。设置 <envar>LC_ALL</envar> 为「POSIX」或「C」(两者是等价的),确保在 chroot 环境中一切能如期望的那样进行。</para>
<para><envar>LFS_TGT</envar> 变量设置了一个虽非默认,但在构建交叉编译器、连接器和交叉编译临时工作链时,用得上到的兼容的机器说明。<xref linkend="ch-tools-toolchaintechnotes" role=""/>中包含更多信息。</para>
<para>通过把 <filename class="directory">/tools/bin</filename> 放在标准 <envar>PATH</envar> 变量的前面,使得所有在 <xref linkend="chapter-temporary-tools"/> 中安装的程序,一经安装 shell 便能马上使用。与之配合的关闭哈希功能,能在第五章环境中的程序在可用的情况下,限制使用宿主机中旧程序的风险。</para>
<para>最后,启用刚才创建的用户配置,为构建临时工具完全准备好环境:</para>
<screen><userinput>source ~/.bash_profile</userinput></screen>
</sect1>
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 6 2019 20:12:56).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <AppKit/NSPathComponentCell.h>
@class NSImageCell;
@interface DVTPathComponentCell : NSPathComponentCell
{
NSImageCell *_imageCell;
BOOL _isLastItem;
BOOL _isFirstItem;
int _gradientStyle;
unsigned long long _textAlignment;
}
@property unsigned long long textAlignment; // @synthesize textAlignment=_textAlignment;
@property BOOL isFirstItem; // @synthesize isFirstItem=_isFirstItem;
@property BOOL isLastItem; // @synthesize isLastItem=_isLastItem;
@property int gradientStyle; // @synthesize gradientStyle=_gradientStyle;
- (void).cxx_destruct;
- (BOOL)_delegateRespondsToAndIsDeemphasizedInView:(id)arg1;
- (void)drawInteriorWithFrame:(struct CGRect)arg1 inView:(id)arg2;
- (void)drawWithFrame:(struct CGRect)arg1 inView:(id)arg2;
- (BOOL)iconHitTest:(struct CGPoint)arg1 inFrame:(struct CGRect)arg2;
- (double)_textOffsetForIcon:(id)arg1 inFrame:(struct CGRect)arg2 doDraw:(BOOL)arg3 isActive:(BOOL)arg4;
- (void)_drawDividerForFrame:(struct CGRect)arg1 inControlView:(id)arg2;
- (struct CGSize)cellSizeForBounds:(struct CGRect)arg1;
- (double)_rightDividerWidth;
- (double)_leftDividerWidth;
- (void)_useChevronForLeftEdge:(char *)arg1 rightEdge:(char *)arg2;
- (id)textColor;
- (void)_commonInit;
- (id)initTextCell:(id)arg1;
- (id)initWithCoder:(id)arg1;
@end
| {
"pile_set_name": "Github"
} |
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.designer.features;
import org.activiti.bpmn.model.TextAnnotation;
import org.activiti.designer.eclipse.common.ActivitiPlugin;
import org.activiti.designer.util.bpmn.BpmnExtensionUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.MultiText;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
public class DirectEditTextAnnotationFeature extends
AbstractDirectEditingFeature {
public DirectEditTextAnnotationFeature(final IFeatureProvider fp) {
super(fp);
}
@Override
public int getEditingType() {
return TYPE_MULTILINETEXT;
}
@Override
public String getInitialValue(final IDirectEditingContext context) {
final PictogramElement pe = context.getPictogramElement();
final TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
return BpmnExtensionUtil.getTextAnnotationText(annotation, ActivitiPlugin.getDefault());
}
@Override
public boolean canDirectEdit(IDirectEditingContext context) {
final PictogramElement pe = context.getPictogramElement();
final Object bo = getBusinessObjectForPictogramElement(pe);
final GraphicsAlgorithm ga = context.getGraphicsAlgorithm();
return bo instanceof TextAnnotation && ga instanceof MultiText;
}
@Override
public void setValue(String value, IDirectEditingContext context) {
final PictogramElement pe = context.getPictogramElement();
final TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
BpmnExtensionUtil.setTextAnnotationText(annotation, value, ActivitiPlugin.getDefault());
updatePictogramElement(((Shape) pe).getContainer());
}
}
| {
"pile_set_name": "Github"
} |
# Debugger
Calva comes with a powerful expression-based debugger, inspired by [Cider](https://cider.mx/)'s debugger, and using the same underlying library, [cider-nrepl](https://github.com/clojure-emacs/cider-nrepl). We hope you love it!

!!! note
The debugger currently does not support ClojureScript. Calva's debugger utilizes cider-nrepl for debugging. See [this Cider issue](https://github.com/clojure-emacs/cider/issues/1416) for more information.
## Features
### Current
* Instrument functions for debugging with `ctrl+alt+c i`
* Instrument a function manually with `#dbg` (as opposed to the above command)
* Set individual breakpoints with `#break`
* Continue to next breakpoint
* Step over form
* Step into form
* Step out of form
* Evaluate code in the debug context
* See variable values in the debugger side pane
* See variable values on hover in the editor
### Future goals
* See structured variables in the debugger side pane (currently maps and collections are just shown as strings)
* Inject values into the debug context
* Trace: continue, printing expressions and their values
## Dependencies
The debugger itself relies pretty heavily on [cider-nrepl](https://github.com/clojure-emacs/cider-nrepl), as do other parts of Calva, and the decorations to show instrumented functions rely on [clj-kondo](https://github.com/borkdude/clj-kondo). Both of these libraries are loaded as dependencies when you use Calva Jack-in. If you are not using Calva Jack-in, you can add these dependencies in your project definition or user profile. See the [Calva Jack-in guide](/jack-in-guide) for more information.
## Using the Debugger
If you're new to Clojure or expression-based debuggers, this debugger may function differently than what you're used to. Instead of placing breakpoints in the side margin and then hitting F5 to start debugging, you instead use Clojure reader tags, `#break` and `#dbg`, to denote breakpoints anywhere in a Clojure form. When you evaluate a call to a function that has been evaluated with that reader tag, the debugger will start when execution reaches the first breakpoint. There's also a convenience command to instrument functions. Read below about both options.
### Instrumenting a Function
You can instrument a top level function for debugging with `ctrl+alt+c i`. This places invisible breakpoints throughout the function where pausing makes sense. When you evaluate a call to this function, the debugger will start and execution will pause at the first breakpoint. Annotations show the value of the form at the cursor.
A border is placed around the definition of the instrumented function and its references to show that it's instrumented. You can remove instrumentation by evaluating the function again normally, such as with `alt+enter`.

### Setting Breakpoints with `#break`
You can insert a breakpoint manually into any code by placing a `#break` in front of the form where you want execution to pause, and then evaluating the top level form with `alt+enter`. When you evaluate a call to this code the VS Code debugger will start, the cursor will move to right after the form that's preceded by `#break`, and the line will be highlighted to show execution is paused there.

!!! note
Code will be executed up to and *including* the form after the breakpoint.
### Conditional Breakpoints
You can set conditional breapoints by adding metadata before the form that the `#break` applies to.
```clojure
(defn print-nums [n]
(dotimes [i n]
#break ^{:break/when (= i 7)} ;; This breakpoint will only be hit when i equals 7
(prn i)))
```
### Instrumenting a Form with `#dbg`
Adding `#dbg` before a form then evaluating the form with `alt+enter` will instrument the form. This has the same effect as using [the instrument command](#instrumenting-a-function).


### Evaluating Code in the Paused Context
When execution is paused at a breakpoint, you can evaluate code in that context. This can be done in the editor or in the REPL window, as usual.

### Viewing Variable Values While Debugging
While debugging, you can view the values of variables in VS Code's debugger side pane. You can also view values by hovering over the variables in the editor. Currently, values for collections and maps are shown as strings, but we plan to make them structured in the future. For now, if you want to see the value of a large structured variable, you can evaluate the variable from the editor or from the REPL window.

### Stepping Commands
You can use VS Code's debugger UI to advance execution while debugging.

!!! note
Clicking restart does nothing, since this functionality does not make sense for our debugger.
* **Continue** - Continues without stopping for the current breakpoint
* **Step over** - Continues to the next breakpoint
* **Step in** - Steps in to the function about to be called. If the next breakpoint is not around a function call, does the same as next. Note that not all functions can be stepped in to - only normal functions stored in vars, for which cider-nrepl can find the source. You cannot currently step in to multimethods, protocol functions, or functions in clojure.core (although multimethods and protocols can be instrumented manually).
* **Step out** - Steps to the next breakpoint that is outside of the current sexp
* **Restart** - Does nothing. To restart debugging, you can hit disconnect or continue execution through the final result, then re-evaluate the expression that started the debugger.
* **Disconnect** - Disconnects the debugger
## Caveats
### Breakpoints in loop/recur
One construct where the debugger is limited is `loop`/`recur`. As recur always has to appear in a tail-position inside a `loop` or a `fn` and the debugger uses macros to interleave breakpoints in the forms, it **might** happen that a `recur` no longer appears in a tail position. In that case we have to avoid setting up the breakpoint. An example of such a case is:
```clojure
(loop [i 0]
#break
(when (< i 10)
(println i)
(recur (inc i))))
```
Here the breakpoint is exactly in front of a form that contains as its last expression a `recur` which is wrapped in a loop. This breakpoint has no effect. This does not mean you cannot use the debugger with `loop`, it just means you have to set your debug statements more carefully.
### Loading the File and "Eval On Save"
When you load a file, any breakpoints that were previously set in functions will be unset. If you have the "Eval On Save" setting enabled, your file is also loaded with each save, therefore saving the file will remove breakpoints previously set.
## Troubleshooting
### Debugger hangs when stepping over infinite seqs
This is because the debugger tries to evaluate the form when it's stepped over, and if `clojure.core/*print-length*` is set to `nil` as it is by default, evaluation will never complete. If you want to debug a form with an infinite seq, make sure to set `*print-length*` beforehand. For example:
```clojure
(set! *print-length* 3)
;; Or, to be more precise
(set! clojure.core/*print-length* 3)
```
Calva does not set this for you during debug mode, instead leaving it up to you to decide the value.
### My breakpoint isn't being hit
It's likely that your breakpoint is in a place that cider-nrepl does not see as an appropriate place to break execution. For example, if you put a breakpoint before a literal number, it will not be hit, because there's no need to show the value of a literal.
```clojure
(defn simple [x]
(+ 1 #break 1)) ;; This breakpoint will not be hit
```
Another possible issue is that you're loading the file again after setting breakpoints, which unsets them. See [Loading the File and "Eval On Save"](#loading-the-file-and-eval-on-save) under Caveats.
| {
"pile_set_name": "Github"
} |
{ "prover": "why3:Alt-Ergo,2.0.0", "verdict": "valid", "time": 0.0113,
"steps": 13 }
| {
"pile_set_name": "Github"
} |
package flags
import (
"reflect"
)
// Arg represents a positional argument on the command line.
type Arg struct {
// The name of the positional argument (used in the help)
Name string
// A description of the positional argument (used in the help)
Description string
// The minimal number of required positional arguments
Required int
// The maximum number of required positional arguments
RequiredMaximum int
value reflect.Value
tag multiTag
}
func (a *Arg) isRemaining() bool {
return a.value.Type().Kind() == reflect.Slice
}
| {
"pile_set_name": "Github"
} |
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
| {
"pile_set_name": "Github"
} |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []
| {
"pile_set_name": "Github"
} |
// ***************************************************************************
// *
// * Copyright (C) 2013 International Business Machines
// * Corporation and others. All Rights Reserved.
// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
// * Source File:<path>/icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* generated alias target
*/
ha_Latn_NE{
/**
* so genrb doesn't issue warnings
*/
___{""}
}
| {
"pile_set_name": "Github"
} |
syms T(x) a b
s = input('Ingrese la ecuación: ') k = sym(s);
eq = diff(k * diff(T, x), x) == 0;
dsolve(eq, 'x') | {
"pile_set_name": "Github"
} |
""" Python 'undefined' Codec
This codec will always raise a ValueError exception when being
used. It is intended for use by the site.py file to switch off
automatic string to Unicode coercion.
Written by Marc-Andre Lemburg ([email protected]).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
raise UnicodeError("undefined encoding")
def decode(self,input,errors='strict'):
raise UnicodeError("undefined encoding")
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
raise UnicodeError("undefined encoding")
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False):
raise UnicodeError("undefined encoding")
class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
pass
### encodings module API
def getregentry():
return codecs.CodecInfo(
name='undefined',
encode=Codec().encode,
decode=Codec().decode,
incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder,
streamwriter=StreamWriter,
streamreader=StreamReader,
)
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.execution.configurations;
import com.intellij.execution.BeforeRunTask;
import com.intellij.execution.RunManager;
import com.intellij.openapi.project.Project;
import consulo.util.dataholder.Key;
import consulo.ui.image.Image;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Factory for run configuration instances.
*
* @author dyoma
* @see com.intellij.execution.configurations.ConfigurationType#getConfigurationFactories()
*/
public abstract class ConfigurationFactory {
private final ConfigurationType myType;
protected ConfigurationFactory(@Nonnull final ConfigurationType type) {
myType = type;
}
/**
* Creates a new run configuration with the specified name by cloning the specified template.
*
* @param name the name for the new run configuration.
* @param template the template from which the run configuration is copied
* @return the new run configuration.
*/
public RunConfiguration createConfiguration(String name, RunConfiguration template) {
RunConfiguration newConfiguration = template.clone();
newConfiguration.setName(name);
return newConfiguration;
}
/**
* Override this method and return {@code false} to hide the configuration from 'New' popup in 'Edit Configurations' dialog
*
* @return {@code true} if it makes sense to create configurations of this type in {@code project}
*/
public boolean isApplicable(@Nonnull Project project) {
return true;
}
/**
* Creates a new template run configuration within the context of the specified project.
*
* @param project the project in which the run configuration will be used
* @return the run configuration instance.
*/
public abstract RunConfiguration createTemplateConfiguration(Project project);
public RunConfiguration createTemplateConfiguration(Project project, RunManager runManager) {
return createTemplateConfiguration(project);
}
/**
* Returns the name of the run configuration variant created by this factory.
*
* @return the name of the run configuration variant created by this factory
*/
public String getName() {
return myType.getDisplayName();
}
@Nullable
public Image getIcon(@Nonnull final RunConfiguration configuration) {
return getIcon();
}
@Nullable
public Image getIcon() {
return myType.getIcon();
}
@Nonnull
public ConfigurationType getType() {
return myType;
}
/**
* In this method you can configure defaults for the task, which are preferable to be used for your particular configuration type
*
* @param providerID
* @param task
*/
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
}
public boolean isConfigurationSingletonByDefault() {
return false;
}
public boolean canConfigurationBeSingleton() {
return true; // Configuration may be marked as singleton by default
}
}
| {
"pile_set_name": "Github"
} |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkCountFaces.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkCountFaces.h"
#include "vtkCellData.h"
#include "vtkCellIterator.h"
#include "vtkDataSet.h"
#include "vtkIdTypeArray.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
vtkStandardNewMacro(vtkCountFaces);
//------------------------------------------------------------------------------
void vtkCountFaces::PrintSelf(std::ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent
<< "OutputArrayName: " << (this->OutputArrayName ? this->OutputArrayName : "(nullptr)")
<< "\n";
}
//------------------------------------------------------------------------------
vtkCountFaces::vtkCountFaces()
: OutputArrayName(nullptr)
{
this->SetOutputArrayName("Face Count");
}
//------------------------------------------------------------------------------
vtkCountFaces::~vtkCountFaces()
{
this->SetOutputArrayName(nullptr);
}
//------------------------------------------------------------------------------
int vtkCountFaces::RequestData(
vtkInformation*, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec)
{
// get the info objects
vtkInformation* inInfo = inInfoVec[0]->GetInformationObject(0);
vtkInformation* outInfo = outInfoVec->GetInformationObject(0);
// get the input and output
vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
assert(input && output);
output->ShallowCopy(input);
vtkNew<vtkIdTypeArray> faceCount;
faceCount->Allocate(input->GetNumberOfCells());
faceCount->SetName(this->OutputArrayName);
output->GetCellData()->AddArray(faceCount);
vtkCellIterator* it = input->NewCellIterator();
for (it->InitTraversal(); !it->IsDoneWithTraversal(); it->GoToNextCell())
{
faceCount->InsertNextValue(it->GetNumberOfFaces());
}
it->Delete();
return 1;
}
//------------------------------------------------------------------------------
int vtkCountFaces::FillOutputPortInformation(int, vtkInformation* info)
{
info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkDataSet");
return 1;
}
//------------------------------------------------------------------------------
int vtkCountFaces::FillInputPortInformation(int, vtkInformation* info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="Neos.Neos" source-language="en" datatype="plaintext" target-language="tr">
<body>
<trans-unit id="properties._hidden" xml:space="preserve">
<source>Hide</source>
<target state="translated">Gizle</target></trans-unit>
</body>
</file>
</xliff>
| {
"pile_set_name": "Github"
} |
--------------ofCamera parameters--------------
transformMatrix
0.999386, 0.0350086, 0, 0
-0.0350087, 0.999388, 0, 0
0, 0, 1, 0
0, 0, 261.083, 1
fov
60
near
6.65107
far
6651.07
lensOffset
0, 0
isOrtho
0
--------------ofEasyCam parameters--------------
target
0, 0, 0
bEnableMouseMiddleButton
1
bMouseInputEnabled
1
drag
0.9
doTranslationKey
m
| {
"pile_set_name": "Github"
} |
SUBROUTINE ccsdt_y_tr2_6_2(d_a,k_a_offset,d_b,k_b_offset,d_c,k_c_o
&ffset)
C $Id$
C This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C i1 ( h3 h4 h10 h11 )_vtr + = -1/4 * Sum ( p5 p6 ) * tr ( p5 p6 h10 h11 )_tr * v ( h3 h4 p5 p6 )_v
IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
INTEGER d_a
INTEGER k_a_offset
INTEGER d_b
INTEGER k_b_offset
INTEGER d_c
INTEGER k_c_offset
INTEGER nxtask
INTEGER next
INTEGER nprocs
INTEGER count
INTEGER h3b
INTEGER h4b
INTEGER h10b
INTEGER h11b
INTEGER dimc
INTEGER l_c_sort
INTEGER k_c_sort
INTEGER p5b
INTEGER p6b
INTEGER p5b_1
INTEGER p6b_1
INTEGER h10b_1
INTEGER h11b_1
INTEGER h3b_2
INTEGER h4b_2
INTEGER p5b_2
INTEGER p6b_2
INTEGER dim_common
INTEGER dima_sort
INTEGER dima
INTEGER dimb_sort
INTEGER dimb
INTEGER l_a_sort
INTEGER k_a_sort
INTEGER l_a
INTEGER k_a
INTEGER l_b_sort
INTEGER k_b_sort
INTEGER l_b
INTEGER k_b
INTEGER nsuperp(2)
INTEGER isuperp
INTEGER l_c
INTEGER k_c
DOUBLE PRECISION FACTORIAL
EXTERNAL nxtask
EXTERNAL FACTORIAL
nprocs = GA_NNODES()
count = 0
next = nxtask(nprocs,1)
DO h3b = 1,noab
DO h4b = h3b,noab
DO h10b = 1,noab
DO h11b = h10b,noab
IF (next.eq.count) THEN
IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
&)+int_mb(k_spin+h10b-1)+int_mb(k_spin+h11b-1).ne.8)) THEN
IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
&10b-1)+int_mb(k_spin+h11b-1)) THEN
IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
&k_sym+h10b-1),int_mb(k_sym+h11b-1)))) .eq. ieor(irrep_v,irrep_tr))
& THEN
dimc = int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_mb(k_ra
&nge+h10b-1) * int_mb(k_range+h11b-1)
IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c_sort,k_c_sort)) CALL
& ERRQUIT('ccsdt_y_tr2_6_2',0,MA_ERR)
CALL DFILL(dimc,0.0d0,dbl_mb(k_c_sort),1)
DO p5b = noab+1,noab+nvab
DO p6b = p5b,noab+nvab
IF (int_mb(k_spin+p5b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+h
&10b-1)+int_mb(k_spin+h11b-1)) THEN
IF (ieor(int_mb(k_sym+p5b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb(
&k_sym+h10b-1),int_mb(k_sym+h11b-1)))) .eq. irrep_tr) THEN
CALL TCE_RESTRICTED_4(p5b,p6b,h10b,h11b,p5b_1,p6b_1,h10b_1,h11b_1)
CALL TCE_RESTRICTED_4(h3b,h4b,p5b,p6b,h3b_2,h4b_2,p5b_2,p6b_2)
dim_common = int_mb(k_range+p5b-1) * int_mb(k_range+p6b-1)
dima_sort = int_mb(k_range+h10b-1) * int_mb(k_range+h11b-1)
dima = dim_common * dima_sort
dimb_sort = int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1)
dimb = dim_common * dimb_sort
IF ((dima .gt. 0) .and. (dimb .gt. 0)) THEN
IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a_sort,k_a_sort)) CALL
& ERRQUIT('ccsdt_y_tr2_6_2',1,MA_ERR)
IF (.not.MA_PUSH_GET(mt_dbl,dima,'noname',l_a,k_a)) CALL ERRQUIT('
&ccsdt_y_tr2_6_2',2,MA_ERR)
CALL GET_HASH_BLOCK(d_a,dbl_mb(k_a),dima,int_mb(k_a_offset),(h11b_
&1 - 1 + noab * (h10b_1 - 1 + noab * (p6b_1 - noab - 1 + nvab * (p5
&b_1 - noab - 1)))))
CALL TCE_SORT_4(dbl_mb(k_a),dbl_mb(k_a_sort),int_mb(k_range+p5b-1)
&,int_mb(k_range+p6b-1),int_mb(k_range+h10b-1),int_mb(k_range+h11b-
&1),4,3,2,1,1.0d0)
IF (.not.MA_POP_STACK(l_a)) CALL ERRQUIT('ccsdt_y_tr2_6_2',3,MA_ER
&R)
IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b_sort,k_b_sort)) CALL
& ERRQUIT('ccsdt_y_tr2_6_2',4,MA_ERR)
IF (.not.MA_PUSH_GET(mt_dbl,dimb,'noname',l_b,k_b)) CALL ERRQUIT('
&ccsdt_y_tr2_6_2',5,MA_ERR)
CALL GET_HASH_BLOCK(d_b,dbl_mb(k_b),dimb,int_mb(k_b_offset),(p6b_2
& - 1 + (noab+nvab) * (p5b_2 - 1 + (noab+nvab) * (h4b_2 - 1 + (noab
&+nvab) * (h3b_2 - 1)))))
CALL TCE_SORT_4(dbl_mb(k_b),dbl_mb(k_b_sort),int_mb(k_range+h3b-1)
&,int_mb(k_range+h4b-1),int_mb(k_range+p5b-1),int_mb(k_range+p6b-1)
&,2,1,4,3,1.0d0)
IF (.not.MA_POP_STACK(l_b)) CALL ERRQUIT('ccsdt_y_tr2_6_2',6,MA_ER
&R)
nsuperp(1) = 1
nsuperp(2) = 1
isuperp = 1
IF (p5b .eq. p6b) THEN
nsuperp(isuperp) = nsuperp(isuperp) + 1
ELSE
isuperp = isuperp + 1
END IF
CALL DGEMM('T','N',dima_sort,dimb_sort,dim_common,2.0d0/FACTORIAL(
&nsuperp(1))/FACTORIAL(nsuperp(2)),dbl_mb(k_a_sort),dim_common,dbl_
&mb(k_b_sort),dim_common,1.0d0,dbl_mb(k_c_sort),dima_sort)
IF (.not.MA_POP_STACK(l_b_sort)) CALL ERRQUIT('ccsdt_y_tr2_6_2',7,
&MA_ERR)
IF (.not.MA_POP_STACK(l_a_sort)) CALL ERRQUIT('ccsdt_y_tr2_6_2',8,
&MA_ERR)
END IF
END IF
END IF
END DO
END DO
IF (.not.MA_PUSH_GET(mt_dbl,dimc,'noname',l_c,k_c)) CALL ERRQUIT('
&ccsdt_y_tr2_6_2',9,MA_ERR)
CALL TCE_SORT_4(dbl_mb(k_c_sort),dbl_mb(k_c),int_mb(k_range+h4b-1)
&,int_mb(k_range+h3b-1),int_mb(k_range+h11b-1),int_mb(k_range+h10b-
&1),2,1,4,3,-1.0d0/4.0d0)
CALL ADD_HASH_BLOCK(d_c,dbl_mb(k_c),dimc,int_mb(k_c_offset),(h11b
&- 1 + noab * (h10b - 1 + noab * (h4b - 1 + noab * (h3b - 1)))))
IF (.not.MA_POP_STACK(l_c)) CALL ERRQUIT('ccsdt_y_tr2_6_2',10,MA_E
&RR)
IF (.not.MA_POP_STACK(l_c_sort)) CALL ERRQUIT('ccsdt_y_tr2_6_2',11
&,MA_ERR)
END IF
END IF
END IF
next = nxtask(nprocs,1)
END IF
count = count + 1
END DO
END DO
END DO
END DO
next = nxtask(-nprocs,1)
call GA_SYNC()
RETURN
END
| {
"pile_set_name": "Github"
} |
#ifndef ParticleFlowReco_PFDisplacedVertexFwd_h
#define ParticleFlowReco_PFDisplacedVertexFwd_h
#include <vector>
#include "DataFormats/Common/interface/Ref.h"
/* #include "DataFormats/Common/interface/RefVector.h" */
/* #include "DataFormats/Common/interface/RefProd.h" */
namespace reco {
class PFDisplacedVertex;
/// collection of PFDisplacedVertex objects
typedef std::vector<PFDisplacedVertex> PFDisplacedVertexCollection;
/// persistent reference to a PFDisplacedVertex objects
typedef edm::Ref<PFDisplacedVertexCollection> PFDisplacedVertexRef;
/// handle to a PFDisplacedVertex collection
typedef edm::Handle<PFDisplacedVertexCollection> PFDisplacedVertexHandle;
/// iterator over a vector of references to PFDisplacedVertex objects
/* typedef PFDisplacedVertexRefVector::iterator PFDisplacedVertex_iterator; */
} // namespace reco
#endif
| {
"pile_set_name": "Github"
} |
# Access Control
The Torus CLI can be used to restrict access to secrets stored within your org. To control access to specific objects we will be using [Path](../concepts/path.md) expressions.
## teams
Users in Torus can be grouped into Teams inside an Organization. These teams have segmented access to the secrets which have been saved.
Each command within this group must be supplied an Organization flag using `--org <name>`, or `-o <name>` for short. The organization can also be supplied by executing these commands within a [linked directory](./project-structure.md#link).
Organizations have three default teams:
- Member
- Admin
- Owner
The creator of the organization is automatically added to all three teams. Anyone invited to the org is automatically added to the member team (and cannot be removed from that team without removing them from t#he organization).
Only users who are a member of the "admin" team can manage resources within an organization.
### Command Options
All teams commands accept the following flags:
Option | Environment Variable | Description
---- | ---- | ----
--org, ORG, -o ORG | TORUS_ORG | The org the team or teams belong to
### create
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus teams create [name]` will create a new team for the specified organization.
A team is given a unique name within the organization that adheres to the naming scheme. If no name argument is supplied, the user will be prompted to enter the new team’s name.
### list
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus teams list` displays all available teams for the specified organization. Each team that the authenticated user is currently a member of will be noted with a `*`.
### members
`torus teams members <name>` displays all members for the specified team name. Should the authenticated user be a member of the team they will be noted with a `*`.
To display all members of your organization display the members of the "member" team using `torus teams members member`. This is useful when using the add and remove commands.
**Example**
```
$ torus teams members member --org matt
USERNAME NAME
* matt Matt Wright
barnaby barnaby
team member has (2) members.
```
### add
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus teams add <username> <name>` adds the user specified (by username) to the specified team.
To display all members in your organization see the [`members`](./#members) command.
### remove
###### Added [v0.4.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus teams remove <username> <name>` removes the user specified (by username) from the specified team.
Users cannot be removed from the "member" team. Owners cannot remove themselves from the "owner" team.
## policies
Access to resources is controlled using documents that define access called Policies.
A policy contains rules about which actions can be taken on specific resources. Policies are then attached to teams, which enables you to control access in a very specific manner.
Each default team has its own default policy, and can have additional policies attached to the team. You can view the [complete default policies here](../concepts/policies.md), in short:
**Member team:** cannot manage resources, can set credentials in their own "dev-username" environment and share credentials through the "dev-\*"
environment.
**Admin team:** has mostly full access. Can manage all resources: teams, policies, projects, environments, etc. Cannot add members to "owner" team.
**Owner team:** can do everything found in admin, but can add members to the "owner" team.
Each command within this group must be supplied an Organization flag using `--org <name>`, or `-o <name>` for short. The organization can also be supplied by executing these commands within a [linked directory](./project-structure.md#link).
### Command Options
All policies commands accept the following flags:
Option | Environment Variable | Description
---- | ---- | ----
--org, ORG, -o ORG | TORUS_ORG | The org the policy or policies belong to
### list
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus policies list` displays all available policies for the specified organization.
Each row has a name, type (system or member), and list of teams and machine roles the policy is attached to.
### view
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus policies view <name>` displays all of the rules within the named policy.
Each row has the effect (allow or deny), the list of actions (crudl - create, read, update, delete, list), and the resource path.
### attach
###### Added [v0.26.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus policies attach <name> <team|machine-role>` attaches the policy (identified by the poliy name) to the given team (or machine role).
This enables you to re-use policies by attaching one to multiple teams and machine roles.
### detach
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus policies detach <name> <team|machine-role>` detaches the policy (identified by name) from the given team (or machine role).
This enables you to lift restrictions (or grants) from a team.
### delete
###### Added [v0.26.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus policies delete <name>` deletes a policy and all of it's attachments (identified by name) from the given org.
This enables you to permanently delete a policy from an organization.
#### Command Options
The delete command accepts the following additional flags:
Option | Description
---- | -----
--yes, -y | Automatically accept the confirm dialog
## allow
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus allow <crudl> <path> <team|machine-role>` generates a new policy and attaches it to the given team (or machine role). The policy created is given a generated name.
CRUDL (create, read, update, delete, list) represents the actions that are being granted. The supplied Path represents the resource that you are enabling the aforementioned actions on.
If a name (`--name` flag) is not provided, one will be automatically generated.
#### Command Options
The `allow` command accepts the following flags:
Option | Environment Variable | Description
---- | ----- | ----
--org ORG, -o ORG | TORUS_ORG | The org to generate the policy for
--name NAME, -n NAME | TORUS_NAME | The name to give the generated policy (e.g. allow-prod-env)
--description DESCRIPTION, -d DESCRIPTION | TORUS_DESCRIPTION | A sentence or two explaining the purpose of the policy
**Example**
```bash
# Create a policy allowing it's subjects to read secrets from prod environment
# in the api project which belongs to the myorg organization and attach it to
# the api-prod-machines machine role.
$ torus allow -n read-api-prod-env rl /myorg/api/prod/** api-prod-machines
```
## deny
###### Added [v0.1.0](https://github.com/manifoldco/torus-cli/blob/master/CHANGELOG.md)
`torus deny <crudl> <path> <team|machine-role>` generates a new policy and attaches it to the given team (or machine role). The policy created is given a generated name.
CRUDL (create, read, update, delete, list) represents the actions that are being denied (or restricted). The supplied Path represents the resource that you are disabling the aforementioned actions on.
If a name (`--name` flag) is not provided, one will be automatically generated.
#### Command Options
The `deny` command accepts the following flags:
Option | Environment Variable | Description
---- | ----- | ----
--org ORG, -o ORG | TORUS_ORG | The org to generate the policy for
--name NAME, -n NAME | TORUS_NAME | The name to give the generated policy (e.g. allow-prod-env)
--description DESCRIPTION, -d DESCRIPTION | TORUS_DESCRIPTION | A sentence or two explaining the purpose of the policy
| {
"pile_set_name": "Github"
} |
//
// TTMCaptureManager.h
// SlowMotionVideoRecorder
// https://github.com/shu223/SlowMotionVideoRecorder
//
// Created by shuichi on 12/17/13.
// Copyright (c) 2013 Shuichi Tsutsumi. All rights reserved.
//
#import <Foundation/Foundation.h>
@import CoreMedia;
typedef NS_ENUM(NSUInteger, CameraType) {
CameraTypeBack,
CameraTypeFront,
};
typedef NS_ENUM(NSUInteger, OutputMode) {
OutputModeVideoData,
OutputModeMovieFile,
};
@protocol TTMCaptureManagerDelegate <NSObject>
- (void)didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
error:(NSError *)error;
@end
@interface TTMCaptureManager : NSObject
@property (nonatomic, assign) id<TTMCaptureManagerDelegate> delegate;
@property (nonatomic, readonly) BOOL isRecording;
@property (nonatomic, copy) void (^onBuffer)(CMSampleBufferRef sampleBuffer);
- (instancetype)initWithPreviewView:(UIView *)previewView
preferredCameraType:(CameraType)cameraType
outputMode:(OutputMode)outputMode;
- (void)toggleContentsGravity;
- (void)resetFormat;
- (void)switchFormatWithDesiredFPS:(CGFloat)desiredFPS;
- (void)startRecording;
- (void)stopRecording;
- (void)updateOrientationWithPreviewView:(UIView *)previewView;
@end
| {
"pile_set_name": "Github"
} |
<testcase>
<info>
<keywords>
SMTP
</keywords>
</info>
#
# Server-side
<reply>
</reply>
#
# Client-side
<client>
<server>
smtp
</server>
<name>
SMTP with no mail data
</name>
<stdin nonewline="yes">
</stdin>
<command>
smtp://%HOSTIP:%SMTPPORT/911 --mail-rcpt [email protected] --mail-from [email protected] -T -
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO 911
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
QUIT
</protocol>
<upload>
.
</upload>
</verify>
</testcase>
| {
"pile_set_name": "Github"
} |
package secret
import (
kapi "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"github.com/Qihoo360/wayne/src/backend/resources/common"
)
type SecretType string
type Secret struct {
// metav1.TypeMeta `json:",inline"`
ObjectMeta common.ObjectMeta `json:"objectMeta"`
Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"`
Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"`
}
func CreateOrUpdateSecret(cli *kubernetes.Clientset, secret *kapi.Secret) (*kapi.Secret, error) {
old, err := cli.CoreV1().Secrets(secret.Namespace).Get(secret.Name, metaV1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
return cli.CoreV1().Secrets(secret.Namespace).Create(secret)
}
return nil, err
}
old.Labels = secret.Labels
old.Data = secret.Data
return cli.CoreV1().Secrets(secret.Namespace).Update(old)
}
func DeleteSecret(cli *kubernetes.Clientset, name, namespace string) error {
return cli.CoreV1().Secrets(namespace).Delete(name, &metaV1.DeleteOptions{})
}
| {
"pile_set_name": "Github"
} |
html, body {
background-color: #F2F2F2;
-webkit-tap-highlight-color: transparent;
min-height: 100%;
height: auto;
}
ul,ul li{
list-style: none;
}
section.weui-cells__recent{
margin-bottom:60px;
}
.hide{
display: none;
}
.weui-cells{
margin-top: 0rem;
}
.Topcarousel {
display: block;
color: #fff;
font-size: 1rem;
width: 2rem;
height: 2rem;
line-height: 2rem;
text-align: center;
border-radius: 50%;
margin-right: 0.5rem;
font-weight: bold;
}
.weui-cell__bd{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
.weui-cell__bd h4{
color: #555555;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
.weui-cell__hd .special_avatar_class {
display: block;
width: 2rem;
height: 2rem;
line-height: 2rem;
border-radius: 50%;
margin-right: 0.5rem;
}
.weui-submit{
padding: 0.75rem;
}
.weui-btn_primary_color{
background-color: #3779ff;
}
.weui-cell_longpress{
background-color: #FFFFFF;
}
.weui-cell__hd .weui-cell__recentimg {
width: 2rem;
height: 2rem;
margin-right: 0.5rem;
border-radius: 2px;
}
.weui-cell__bd p{
color: #999999;
font-size: 0.7rem;
}
.weui-cell__bd p i {
font-style: normal;
margin: 0px 0.25rem;
}
.weui-share-dzzicon{
font-size: 1.1rem;
color: #3779ff;
}
/*地址栏开始*/
.weui-address {
position: relative;
}
.weui-index {
position: absolute;
top: 0.4rem;
left: 0.5rem;
width: 3rem;
line-height: 1rem;
}
.weui-index .dzz-index {
font-size: 1.2rem;
color: #3779FF;
}
.weui-index .dzz-index-vline {
font-size: 1.2rem;
color: #DDDDDD;
}
.weui-address-container {
margin-left: 0.5rem;
overflow: hidden;
line-height: 1.7rem;
position: relative;
height: 2rem;
}
.weui-address-field {
position: absolute;
top: 0;
right: 0;
left: 0;
white-space: nowrap;
padding: 0.15rem;
min-width: 100%;
}
.weui-address-field li {
float: left;
color: #666666;
}
.weui-address-field li a {
font-size: 0.7rem;
color: #666666;
}
.weui-address-field li span {
vertical-align: middle;
}
/*地址栏结束*/
.weui-member-footer{
background-color: #FFFFFF;
position: fixed;
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
}
.weui-cells_checkbox .weui-check:checked+.weui-icon-checked:before{
color: #4c8afb;
}
| {
"pile_set_name": "Github"
} |
//snippet-sourcedescription:[LongPolling.java demonstrates how to enable long polling on a queue.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Simple Queue Service]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[2/20/2020]
//snippet-sourceauthor:[scmacdon-aws]
/*
* Copyright Amazon.com, Inc. or its affiliates. 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://aws.amazon.com/apache2.0
*
* This file 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.
*/
// snippet-start:[sqs.java2.long_polling.complete]
package com.example.sqs;
// snippet-start:[sqs.java2.long_polling.import]
import java.util.Date;
import java.util.HashMap;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.CreateQueueRequest;
import software.amazon.awssdk.services.sqs.model.GetQueueUrlRequest;
import software.amazon.awssdk.services.sqs.model.QueueAttributeName;
import software.amazon.awssdk.services.sqs.model.SetQueueAttributesRequest;
import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest;
import software.amazon.awssdk.services.sqs.model.QueueNameExistsException;
// snippet-end:[sqs.java2.long_polling.import]
/*
Although the regular short polling returns immediately,
long polling doesn't return a response until a message arrives
in the message queue, or the long polling times out.
*/
public class LongPolling {
private static final String QueueName = "testQueue" + new Date().getTime();
public static void main(String[] args) {
// Create an SqsClient object
SqsClient sqsClient = SqsClient.builder()
.region(Region.US_WEST_2)
.build();
setLongPoll(sqsClient) ;
}
// snippet-start:[sqs.java2.long_polling.main]
public static void setLongPoll( SqsClient sqsClient) {
// Enable long polling when creating a queue
HashMap<QueueAttributeName, String> attributes = new HashMap<QueueAttributeName, String>();
attributes.put(QueueAttributeName.RECEIVE_MESSAGE_WAIT_TIME_SECONDS, "20");
CreateQueueRequest createRequest = CreateQueueRequest.builder()
.queueName(QueueName)
.attributes(attributes)
.build();
try {
sqsClient.createQueue(createRequest);
GetQueueUrlRequest getQueueRequest = GetQueueUrlRequest.builder()
.queueName(QueueName)
.build();
String queueUrl = sqsClient.getQueueUrl(getQueueRequest).queueUrl();
// Enable long polling on an existing queue
SetQueueAttributesRequest setAttrsRequest = SetQueueAttributesRequest.builder()
.queueUrl(queueUrl)
.attributes(attributes)
.build();
sqsClient.setQueueAttributes(setAttrsRequest);
// Enable long polling on a message receipt
ReceiveMessageRequest receiveRequest = ReceiveMessageRequest.builder()
.queueUrl(queueUrl)
.waitTimeSeconds(20)
.build();
sqsClient.receiveMessage(receiveRequest);
} catch (QueueNameExistsException e) {
throw e;
}
}
}
// snippet-end:[sqs.java2.long_polling.main]
// snippet-end:[sqs.java2.long_polling.complete]
| {
"pile_set_name": "Github"
} |
2000
| {
"pile_set_name": "Github"
} |
package com.swifty.fillcolor.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.widget.Toast;
import com.google.gson.Gson;
import com.swifty.fillcolor.MyApplication;
import com.swifty.fillcolor.broadcast.LoginSuccessBroadcast;
import com.swifty.fillcolor.broadcast.LogoutSuccessBroadcast;
import com.swifty.fillcolor.controller.main.ThemeListFragment;
import com.swifty.fillcolor.controller.main.UserFragment;
import com.swifty.fillcolor.factory.MyDialogFactory;
import com.swifty.fillcolor.factory.SharedPreferencesFactory;
import com.swifty.fillcolor.listener.OnLoginSuccessListener;
import com.swifty.fillcolor.R;
import com.swifty.fillcolor.model.bean.UserBean;
import com.swifty.fillcolor.view.MyProgressDialog;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.controller.UMServiceFactory;
import com.umeng.socialize.controller.UMSocialService;
import com.umeng.socialize.controller.listener.SocializeListeners;
import com.umeng.socialize.exception.SocializeException;
import com.umeng.socialize.facebook.controller.UMFacebookHandler;
import com.umeng.socialize.sso.UMQQSsoHandler;
import com.umeng.socialize.sso.UMSsoHandler;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Created by Swifty.Wang on 2015/9/10.
*/
public class UmengLoginUtil {
private static UMSocialService mController;
private static OnLoginSuccessListener mOnLoginSuccessListener;
private static UmengLoginUtil ourInstance;
private AsyncTask asyncTask;
public void serverBackgroundLogin(OnLoginSuccessListener mOnLoginSuccessListener) {
this.mOnLoginSuccessListener = mOnLoginSuccessListener;
asyncTask = new LoginAsyn();
asyncTask.execute();
}
public void loginSuccessEvent(Context context, UserBean userBean, MyDialogFactory myDialogFactory) {
if (userBean.getUsers() != null) {
Toast.makeText(context, context.getString(R.string.loginSuccess), Toast.LENGTH_SHORT).show();
MyApplication.user = userBean.getUsers();
SharedPreferencesFactory.saveString(context, SharedPreferencesFactory.USERSESSION, MyApplication.user.getToken());
MyApplication.userToken = MyApplication.user.getToken();
myDialogFactory.dismissDialog();
LoginSuccessBroadcast.getInstance().sendBroadcast(context);
} else {
Toast.makeText(context, context.getString(R.string.loginFailed), Toast.LENGTH_SHORT).show();
}
}
public void loginSuccessEvent(Context context, UserBean userBean) {
if (userBean.getUsers() != null) {
Toast.makeText(context, context.getString(R.string.loginSuccess), Toast.LENGTH_SHORT).show();
MyApplication.user = userBean.getUsers();
SharedPreferencesFactory.saveString(context, SharedPreferencesFactory.USERSESSION, MyApplication.user.getToken());
MyApplication.userToken = MyApplication.user.getToken();
LoginSuccessBroadcast.getInstance().sendBroadcast(context);
} else {
Toast.makeText(context, context.getString(R.string.loginFailed), Toast.LENGTH_SHORT).show();
}
}
public enum LoginMethod {
QQ,
FACEBOOK,
}
public static UmengLoginUtil getInstance() {
if (ourInstance == null)
ourInstance = new UmengLoginUtil();
return ourInstance;
}
private UmengLoginUtil() {
}
public UMSocialService qqLogin(final Context context, OnLoginSuccessListener onLoginSuccessListener) {
mOnLoginSuccessListener = onLoginSuccessListener;
mController = UMServiceFactory.getUMSocialService("com.umeng.login");
//参数1为当前Activity, 参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler((Activity) context, "1104727259",
"NddWVIV3BNdRqh97");
qqSsoHandler.addToSocialSDK();
MyProgressDialog.show(context, null, context.getString(R.string.pullqqloging));
mController.doOauthVerify(context, SHARE_MEDIA.QQ, new SocializeListeners.UMAuthListener() {
@Override
public void onStart(SHARE_MEDIA platform) {
}
@Override
public void onError(SocializeException e, SHARE_MEDIA platform) {
Toast.makeText(context, "授权错误", Toast.LENGTH_SHORT).show();
MyProgressDialog.DismissDialog();
}
@Override
public void onComplete(final Bundle value, SHARE_MEDIA platform) {
StringBuilder sb = new StringBuilder();
Set<String> keys = value.keySet();
for (String key : keys) {
sb.append(key + "=" + value.get(key).toString() + "\r\n");
}
L.d("TestData2", sb.toString());
//获取相关授权信息
mController.getPlatformInfo(context, SHARE_MEDIA.QQ, new SocializeListeners.UMDataListener() {
@Override
public void onStart() {
}
@Override
public void onComplete(int status, Map<String, Object> info) {
if (status == 200 && info != null) {
StringBuilder sb = new StringBuilder();
Set<String> keys = info.keySet();
for (String key : keys) {
sb.append(key + "=" + info.get(key).toString() + "\r\n");
}
//do register or login
registerToServer(LoginMethod.QQ, value, info);
L.d("TestData", sb.toString());
} else {
L.d("TestData", "发生错误:" + status);
}
}
});
}
@Override
public void onCancel(SHARE_MEDIA platform) {
Toast.makeText(context, "授权取消", Toast.LENGTH_SHORT).show();
MyProgressDialog.DismissDialog();
}
});
return mController;
}
private void registerToServer(LoginMethod loginMethod, Bundle bundle, Map<String, Object> info) {
List<NameValuePair> params = new ArrayList<NameValuePair>();
String ret;
switch (loginMethod) {
case QQ:
params.clear();
params.add(new BasicNameValuePair("type", "qq"));
params.add(new BasicNameValuePair("uid", bundle.getString("uid")));
params.add(new BasicNameValuePair("usericon", info.get("profile_image_url").toString()));
params.add(new BasicNameValuePair("gender", convertGender(info.get("gender").toString())));
params.add(new BasicNameValuePair("location", info.get("province").toString() + " " + info.get("city").toString()));
params.add(new BasicNameValuePair("name", info.get("screen_name").toString()));
asyncTask = new RegisterAsyn();
asyncTask.execute(params);
break;
case FACEBOOK:
params.clear();
params.add(new BasicNameValuePair("type", "facebook"));
params.add(new BasicNameValuePair("uid", info.get("id").toString()));
params.add(new BasicNameValuePair("usericon", info.get("profilePictureUri").toString()));
params.add(new BasicNameValuePair("name", info.get("name").toString()));
asyncTask = new RegisterAsyn();
asyncTask.execute(params);
break;
}
}
private String convertGender(String gender) {
if (gender == null) {
return null;
}
if (gender.toLowerCase().trim().equals("male") || gender.toLowerCase().trim().equals("男")) {
return "M";
} else {
return "F";
}
}
public UMSocialService faceBookLogin(final Context context, OnLoginSuccessListener onLoginSuccessListener) {
mOnLoginSuccessListener = onLoginSuccessListener;
mController = UMServiceFactory.getUMSocialService("com.umeng.login");
//参数1为当前Activity, 参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
UMFacebookHandler mFacebookHandler = new UMFacebookHandler((Activity) context);
mFacebookHandler.addToSocialSDK();
MyProgressDialog.show(context, null, context.getString(R.string.pullfacebookloging));
mController.doOauthVerify(context, SHARE_MEDIA.FACEBOOK, new SocializeListeners.UMAuthListener() {
@Override
public void onStart(SHARE_MEDIA platform) {
}
@Override
public void onError(SocializeException e, SHARE_MEDIA platform) {
Toast.makeText(context, "授权错误", Toast.LENGTH_SHORT).show();
MyProgressDialog.DismissDialog();
}
@Override
public void onComplete(final Bundle value, SHARE_MEDIA platform) {
StringBuilder sb = new StringBuilder();
Set<String> keys = value.keySet();
for (String key : keys) {
sb.append(key + "=" + value.get(key).toString() + "\r\n");
}
L.d("TestData2", sb.toString());
//获取相关授权信息
mController.getPlatformInfo(context, SHARE_MEDIA.FACEBOOK, new SocializeListeners.UMDataListener() {
@Override
public void onStart() {
}
@Override
public void onComplete(int status, Map<String, Object> info) {
if (status == 200 && info != null) {
StringBuilder sb = new StringBuilder();
Set<String> keys = info.keySet();
for (String key : keys) {
sb.append(key + "=" + info.get(key).toString() + "\r\n");
}
//do register or login
registerToServer(LoginMethod.FACEBOOK, value, info);
L.d("TestData", sb.toString());
} else {
L.d("TestData", "发生错误:" + status);
}
}
});
}
@Override
public void onCancel(SHARE_MEDIA platform) {
Toast.makeText(context, "授权取消", Toast.LENGTH_SHORT).show();
MyProgressDialog.DismissDialog();
}
});
return mController;
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
UMSsoHandler ssoHandler = mController.getConfig().getSsoHandler(
requestCode);
if (ssoHandler != null) {
ssoHandler.authorizeCallBack(requestCode, resultCode, data);
}
}
public void logout(Context mContext) {
MyApplication.user = null;
SharedPreferencesFactory.saveString(mContext, SharedPreferencesFactory.USERSESSION, null);
LogoutSuccessBroadcast.getInstance().sendBroadcast(mContext);
}
class RegisterAsyn extends AsyncTask {
@Override
protected Object doInBackground(Object[] objects) {
MyHttpClient myHttpClient = new MyHttpClient();
List<NameValuePair> params = (List<NameValuePair>) objects[0];
String ret = myHttpClient.executePostRequest(MyApplication.UserRegisterUrl, params);
L.e(ret);
Gson gson = new Gson();
UserBean userBean = gson.fromJson(ret, UserBean.class);
return userBean;
}
@Override
protected void onPostExecute(Object o) {
super.onPostExecute(o);
MyProgressDialog.DismissDialog();
if (UserFragment.getInstance().isAdded() && mOnLoginSuccessListener != null) {
mOnLoginSuccessListener.onLoginSuccess((UserBean) o);
}
}
}
class LoginAsyn extends AsyncTask {
@Override
protected Object doInBackground(Object[] objects) {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
MyHttpClient myHttpClient = new MyHttpClient();
String ret;
UserBean userBean = null;
try {
ret = myHttpClient.executeGetRequest(MyApplication.UserLoginUrl);
L.e(ret);
Gson gson = new Gson();
userBean = gson.fromJson(ret, UserBean.class);
if (userBean.getUsers() != null) {
MyApplication.user = userBean.getUsers();
}
} catch (Exception e) {
e.printStackTrace();
}
return userBean;
}
@Override
protected void onPostExecute(Object o) {
super.onPostExecute(o);
if (mOnLoginSuccessListener != null) {
mOnLoginSuccessListener.onLoginSuccess((UserBean) o);
}
}
}
}
| {
"pile_set_name": "Github"
} |
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
* $Date: 19. March 2015
* $Revision: V.1.4.5
*
* Project: CMSIS DSP Library
* Title: arm_dct4_q31.c
*
* Description: Processing function of DCT4 & IDCT4 Q31.
*
* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
#include "arm_math.h"
/**
* @addtogroup DCT4_IDCT4
* @{
*/
/**
* @brief Processing function for the Q31 DCT4/IDCT4.
* @param[in] *S points to an instance of the Q31 DCT4 structure.
* @param[in] *pState points to state buffer.
* @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
* @return none.
* \par Input an output formats:
* Input samples need to be downscaled by 1 bit to avoid saturations in the Q31 DCT process,
* as the conversion from DCT2 to DCT4 involves one subtraction.
* Internally inputs are downscaled in the RFFT process function to avoid overflows.
* Number of bits downscaled, depends on the size of the transform.
* The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:
*
* \image html dct4FormatsQ31Table.gif
*/
void arm_dct4_q31(
const arm_dct4_instance_q31 * S,
q31_t * pState,
q31_t * pInlineBuffer)
{
uint16_t i; /* Loop counter */
q31_t *weights = S->pTwiddle; /* Pointer to the Weights table */
q31_t *cosFact = S->pCosFactor; /* Pointer to the cos factors table */
q31_t *pS1, *pS2, *pbuff; /* Temporary pointers for input buffer and pState buffer */
q31_t in; /* Temporary variable */
/* DCT4 computation involves DCT2 (which is calculated using RFFT)
* along with some pre-processing and post-processing.
* Computational procedure is explained as follows:
* (a) Pre-processing involves multiplying input with cos factor,
* r(n) = 2 * u(n) * cos(pi*(2*n+1)/(4*n))
* where,
* r(n) -- output of preprocessing
* u(n) -- input to preprocessing(actual Source buffer)
* (b) Calculation of DCT2 using FFT is divided into three steps:
* Step1: Re-ordering of even and odd elements of input.
* Step2: Calculating FFT of the re-ordered input.
* Step3: Taking the real part of the product of FFT output and weights.
* (c) Post-processing - DCT4 can be obtained from DCT2 output using the following equation:
* Y4(k) = Y2(k) - Y4(k-1) and Y4(-1) = Y4(0)
* where,
* Y4 -- DCT4 output, Y2 -- DCT2 output
* (d) Multiplying the output with the normalizing factor sqrt(2/N).
*/
/*-------- Pre-processing ------------*/
/* Multiplying input with cos factor i.e. r(n) = 2 * x(n) * cos(pi*(2*n+1)/(4*n)) */
arm_mult_q31(pInlineBuffer, cosFact, pInlineBuffer, S->N);
arm_shift_q31(pInlineBuffer, 1, pInlineBuffer, S->N);
/* ----------------------------------------------------------------
* Step1: Re-ordering of even and odd elements as
* pState[i] = pInlineBuffer[2*i] and
* pState[N-i-1] = pInlineBuffer[2*i+1] where i = 0 to N/2
---------------------------------------------------------------------*/
/* pS1 initialized to pState */
pS1 = pState;
/* pS2 initialized to pState+N-1, so that it points to the end of the state buffer */
pS2 = pState + (S->N - 1u);
/* pbuff initialized to input buffer */
pbuff = pInlineBuffer;
#ifndef ARM_MATH_CM0_FAMILY
/* Run the below code for Cortex-M4 and Cortex-M3 */
/* Initializing the loop counter to N/2 >> 2 for loop unrolling by 4 */
i = S->Nby2 >> 2u;
/* First part of the processing with loop unrolling. Compute 4 outputs at a time.
** a second loop below computes the remaining 1 to 3 samples. */
do
{
/* Re-ordering of even and odd elements */
/* pState[i] = pInlineBuffer[2*i] */
*pS1++ = *pbuff++;
/* pState[N-i-1] = pInlineBuffer[2*i+1] */
*pS2-- = *pbuff++;
*pS1++ = *pbuff++;
*pS2-- = *pbuff++;
*pS1++ = *pbuff++;
*pS2-- = *pbuff++;
*pS1++ = *pbuff++;
*pS2-- = *pbuff++;
/* Decrement the loop counter */
i--;
} while(i > 0u);
/* pbuff initialized to input buffer */
pbuff = pInlineBuffer;
/* pS1 initialized to pState */
pS1 = pState;
/* Initializing the loop counter to N/4 instead of N for loop unrolling */
i = S->N >> 2u;
/* Processing with loop unrolling 4 times as N is always multiple of 4.
* Compute 4 outputs at a time */
do
{
/* Writing the re-ordered output back to inplace input buffer */
*pbuff++ = *pS1++;
*pbuff++ = *pS1++;
*pbuff++ = *pS1++;
*pbuff++ = *pS1++;
/* Decrement the loop counter */
i--;
} while(i > 0u);
/* ---------------------------------------------------------
* Step2: Calculate RFFT for N-point input
* ---------------------------------------------------------- */
/* pInlineBuffer is real input of length N , pState is the complex output of length 2N */
arm_rfft_q31(S->pRfft, pInlineBuffer, pState);
/*----------------------------------------------------------------------
* Step3: Multiply the FFT output with the weights.
*----------------------------------------------------------------------*/
arm_cmplx_mult_cmplx_q31(pState, weights, pState, S->N);
/* The output of complex multiplication is in 3.29 format.
* Hence changing the format of N (i.e. 2*N elements) complex numbers to 1.31 format by shifting left by 2 bits. */
arm_shift_q31(pState, 2, pState, S->N * 2);
/* ----------- Post-processing ---------- */
/* DCT-IV can be obtained from DCT-II by the equation,
* Y4(k) = Y2(k) - Y4(k-1) and Y4(-1) = Y4(0)
* Hence, Y4(0) = Y2(0)/2 */
/* Getting only real part from the output and Converting to DCT-IV */
/* Initializing the loop counter to N >> 2 for loop unrolling by 4 */
i = (S->N - 1u) >> 2u;
/* pbuff initialized to input buffer. */
pbuff = pInlineBuffer;
/* pS1 initialized to pState */
pS1 = pState;
/* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */
in = *pS1++ >> 1u;
/* input buffer acts as inplace, so output values are stored in the input itself. */
*pbuff++ = in;
/* pState pointer is incremented twice as the real values are located alternatively in the array */
pS1++;
/* First part of the processing with loop unrolling. Compute 4 outputs at a time.
** a second loop below computes the remaining 1 to 3 samples. */
do
{
/* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */
/* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */
in = *pS1++ - in;
*pbuff++ = in;
/* points to the next real value */
pS1++;
in = *pS1++ - in;
*pbuff++ = in;
pS1++;
in = *pS1++ - in;
*pbuff++ = in;
pS1++;
in = *pS1++ - in;
*pbuff++ = in;
pS1++;
/* Decrement the loop counter */
i--;
} while(i > 0u);
/* If the blockSize is not a multiple of 4, compute any remaining output samples here.
** No loop unrolling is used. */
i = (S->N - 1u) % 0x4u;
while(i > 0u)
{
/* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */
/* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */
in = *pS1++ - in;
*pbuff++ = in;
/* points to the next real value */
pS1++;
/* Decrement the loop counter */
i--;
}
/*------------ Normalizing the output by multiplying with the normalizing factor ----------*/
/* Initializing the loop counter to N/4 instead of N for loop unrolling */
i = S->N >> 2u;
/* pbuff initialized to the pInlineBuffer(now contains the output values) */
pbuff = pInlineBuffer;
/* Processing with loop unrolling 4 times as N is always multiple of 4. Compute 4 outputs at a time */
do
{
/* Multiplying pInlineBuffer with the normalizing factor sqrt(2/N) */
in = *pbuff;
*pbuff++ = ((q31_t) (((q63_t) in * S->normalize) >> 31));
in = *pbuff;
*pbuff++ = ((q31_t) (((q63_t) in * S->normalize) >> 31));
in = *pbuff;
*pbuff++ = ((q31_t) (((q63_t) in * S->normalize) >> 31));
in = *pbuff;
*pbuff++ = ((q31_t) (((q63_t) in * S->normalize) >> 31));
/* Decrement the loop counter */
i--;
} while(i > 0u);
#else
/* Run the below code for Cortex-M0 */
/* Initializing the loop counter to N/2 */
i = S->Nby2;
do
{
/* Re-ordering of even and odd elements */
/* pState[i] = pInlineBuffer[2*i] */
*pS1++ = *pbuff++;
/* pState[N-i-1] = pInlineBuffer[2*i+1] */
*pS2-- = *pbuff++;
/* Decrement the loop counter */
i--;
} while(i > 0u);
/* pbuff initialized to input buffer */
pbuff = pInlineBuffer;
/* pS1 initialized to pState */
pS1 = pState;
/* Initializing the loop counter */
i = S->N;
do
{
/* Writing the re-ordered output back to inplace input buffer */
*pbuff++ = *pS1++;
/* Decrement the loop counter */
i--;
} while(i > 0u);
/* ---------------------------------------------------------
* Step2: Calculate RFFT for N-point input
* ---------------------------------------------------------- */
/* pInlineBuffer is real input of length N , pState is the complex output of length 2N */
arm_rfft_q31(S->pRfft, pInlineBuffer, pState);
/*----------------------------------------------------------------------
* Step3: Multiply the FFT output with the weights.
*----------------------------------------------------------------------*/
arm_cmplx_mult_cmplx_q31(pState, weights, pState, S->N);
/* The output of complex multiplication is in 3.29 format.
* Hence changing the format of N (i.e. 2*N elements) complex numbers to 1.31 format by shifting left by 2 bits. */
arm_shift_q31(pState, 2, pState, S->N * 2);
/* ----------- Post-processing ---------- */
/* DCT-IV can be obtained from DCT-II by the equation,
* Y4(k) = Y2(k) - Y4(k-1) and Y4(-1) = Y4(0)
* Hence, Y4(0) = Y2(0)/2 */
/* Getting only real part from the output and Converting to DCT-IV */
/* pbuff initialized to input buffer. */
pbuff = pInlineBuffer;
/* pS1 initialized to pState */
pS1 = pState;
/* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */
in = *pS1++ >> 1u;
/* input buffer acts as inplace, so output values are stored in the input itself. */
*pbuff++ = in;
/* pState pointer is incremented twice as the real values are located alternatively in the array */
pS1++;
/* Initializing the loop counter */
i = (S->N - 1u);
while(i > 0u)
{
/* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */
/* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */
in = *pS1++ - in;
*pbuff++ = in;
/* points to the next real value */
pS1++;
/* Decrement the loop counter */
i--;
}
/*------------ Normalizing the output by multiplying with the normalizing factor ----------*/
/* Initializing the loop counter */
i = S->N;
/* pbuff initialized to the pInlineBuffer(now contains the output values) */
pbuff = pInlineBuffer;
do
{
/* Multiplying pInlineBuffer with the normalizing factor sqrt(2/N) */
in = *pbuff;
*pbuff++ = ((q31_t) (((q63_t) in * S->normalize) >> 31));
/* Decrement the loop counter */
i--;
} while(i > 0u);
#endif /* #ifndef ARM_MATH_CM0_FAMILY */
}
/**
* @} end of DCT4_IDCT4 group
*/
| {
"pile_set_name": "Github"
} |
# Tools to create benchmarks
| {
"pile_set_name": "Github"
} |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.openwire.tool;
/**
* A simple helper class to help auto-generate test data when code generating test cases
*
*
*/
public class TestDataGenerator {
private int stringCounter;
private boolean boolCounter;
private byte byteCounter;
private char charCounter = 'a';
private short shortCounter;
private int intCounter;
private long longCounter;
public String createByte() {
return "(byte) " + (++byteCounter);
}
public String createChar() {
return "'" + (charCounter++) + "'";
}
public String createShort() {
return "(short) " + (++shortCounter);
}
public int createInt() {
return ++intCounter;
}
public long createLong() {
return ++longCounter;
}
public String createString(String property) {
return property + ":" + (++stringCounter);
}
public boolean createBool() {
boolCounter = !boolCounter;
return boolCounter;
}
public String createByteArray(String property) {
return "\"" + createString(property) + "\".getBytes()";
}
}
| {
"pile_set_name": "Github"
} |
<!--- Copyright (C) Lightbend Inc. <https://www.lightbend.com> -->
# Using CoffeeScript
[CoffeeScript](https://coffeescript.org/) is a small and elegant language that compiles into JavaScript. It provides a nice syntax for writing JavaScript code.
Compiled assets in Play must be defined in the `app/assets` directory. They are handled by the build process and CoffeeScript sources are compiled into standard JavaScript files. The generated JavaScript files are distributed as standard resources into the same `public/` folder as other unmanaged assets, meaning that there is no difference in the way you use them once compiled.
For example a CoffeeScript source file `app/assets/javascripts/main.coffee` will be available as a standard JavaScript resource, at `public/javascripts/main.js`.
CoffeeScript sources are compiled automatically during an `assets` command, or when you refresh any page in your browser while you are running in development mode. Any compilation errors will be displayed in your browser:
[[images/coffeeError.png]]
## Layout
Here is an example layout for using CoffeeScript in your projects:
```
app
└ assets
└ javascripts
└ main.coffee
```
You can use the following syntax to use the compiled JavaScript file in your template:
```html
<script src="@routes.Assets.at("javascripts/main.js")">
```
## Enablement and Configuration
CoffeeScript compilation is enabled by simply adding the plugin to your plugins.sbt file when using the `PlayJava` or `PlayScala` plugins:
```scala
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.1")
```
The plugin's default configuration is normally sufficient. However please refer to the [plugin's documentation](https://github.com/sbt/sbt-coffeescript#sbt-coffeescript) for information on how it may be configured.
| {
"pile_set_name": "Github"
} |
/**
* Copyright 2012 Impetus Infotech.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.impetus.kundera.entity.photo;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.impetus.kundera.entity.album.AlbumBi_M_1_1_M;
/**
* Entity class for photo
*
* @author amresh.singh
*/
@Entity
@Table(name = "PHOTO", schema = "KunderaTest@kunderatest")
public class PhotoBi_M_1_1_M
{
@Id
@Column(name = "PHOTO_ID")
private String photoId;
@Column(name = "PHOTO_CAPTION")
private String photoCaption;
@Column(name = "PHOTO_DESC")
private String photoDescription;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ALBUM_ID")
private AlbumBi_M_1_1_M album;
public PhotoBi_M_1_1_M()
{
}
public PhotoBi_M_1_1_M(String photoId, String caption, String description)
{
this.photoId = photoId;
this.photoCaption = caption;
this.photoDescription = description;
}
/**
* @return the photoId
*/
public String getPhotoId()
{
return photoId;
}
/**
* @param photoId
* the photoId to set
*/
public void setPhotoId(String photoId)
{
this.photoId = photoId;
}
/**
* @return the photoCaption
*/
public String getPhotoCaption()
{
return photoCaption;
}
/**
* @param photoCaption
* the photoCaption to set
*/
public void setPhotoCaption(String photoCaption)
{
this.photoCaption = photoCaption;
}
/**
* @return the photoDescription
*/
public String getPhotoDescription()
{
return photoDescription;
}
/**
* @param photoDescription
* the photoDescription to set
*/
public void setPhotoDescription(String photoDescription)
{
this.photoDescription = photoDescription;
}
/**
* @return the album
*/
public AlbumBi_M_1_1_M getAlbum()
{
return album;
}
/**
* @param album
* the album to set
*/
public void setAlbum(AlbumBi_M_1_1_M album)
{
this.album = album;
}
}
| {
"pile_set_name": "Github"
} |
# SkyWalking 跨进程传播的头部协议
* 版本 2.0
## 摘要
SkyWalking 跨进程传播的头部协议版本 2.0 也叫做 sw6 协议. 第二版的协议与[第一版协议(亦即 sw3)](Skywalking-Cross-Process-Propagation-Headers-Protocol-v1.md)有相同的目的.
就是确保上下文得以正常传播.
## 与版本 v1 的差异
两个版本的差异主要来自 SkyWalking 的演进, 包括
1. 服务网格和语言并不总是一样, 头部中的某些信息应该是可选的
1. 需要 BASE64 编码
1. 包括了采样标记
## 头部项
* 头部名称: `sw6`
* 头部值: 由 `-` 分割, 各部分如下. 头部值的最大长度(默认)应该小于 2k.
值格式示例, `XXXXX-XXXXX-XXXX-XXXX`
## 值
头部值包含以下段, 所有字符串类型的值都是 BASE64 编码的.
- 必须项
1. 采样(Sample). 0 或 1. 0 表示上下文存在, 但是可以(也很可能)忽略. 1 表示此追踪需要采样并发送到后端.
1. 追踪标识(Trace Id). **字符串(BASE64 编码)**. 由 `.` 分割的三个 long 类型值, 表示此追踪的唯一标识.
1. 父追踪段 ID(Parent trace segment Id). **字符串(BASE64 编码)**. 由 `.` 分割的三个 long 类型值, 表示父服务中的追踪段的唯一标识.
1. 父 Span 标识(Parent span Id). 整数. 从 0 开始. 此 Span ID 指向了父追踪段中的 Span.
1. 父服务实例标识(Parent service instance Id). 整数. 父服务的实例 ID.
1. 入口服务实例标识(Entrance service instance Id). 整数. 入口服务的实例 ID.
1. 本请求的目标地址(Target address of this request). **字符串(BASE64 编码)**. 客户端用于访问目标服务的网络地址(不一定是 IP + 端口). **该值可以使用压缩收集器服务来获得一个 id(整数) 来代表这个字符串, 如果你使用字符串, 则字符串必须以 `#` 开始, 否则直接使用整数 ID.**
- 可选项
当代理/SDK 没有这些信息时, 或者头部大于阈值(默认 2k)时, 可选项可以不存在头部值中
1. 追踪的入口端点. **字符串(BASE64 编码)**.
**字符串(BASE64 编码)**. 客户端用于访问目标服务的网络地址(不一定是 IP + 端口). **该值可以使用压缩收集器服务来获得一个 id(整数) 来代表这个字符串, 如果你使用字符串, 则字符串必须以 `#` 开始, 否则直接使用整数 ID.**
1. 父服务的端点. **字符串(BASE64 编码)**.
**字符串(BASE64 编码)**. 客户端用于访问目标服务的网络地址(不一定是 IP + 端口). **该值可以使用压缩收集器服务来获得一个 id(整数) 来代表这个字符串, 如果你使用字符串, 则字符串必须以 `#` 开始, 否则直接使用整数 ID.**
## 示例
1. 简单版本, `1-TRACEID-SEGMENTID-3-5-2-IPPORT`
1. 完整版本 `1-TRACEID-SEGMENTID-3-5-2-IPPORT-ENTRYURI-PARENTURI`
| {
"pile_set_name": "Github"
} |
<template>
<view>
<view class="cu-list menu card-menu margin-top">
<view class="cu-item" v-for="(x , index) in addressList" :key="index">
<view class="content padding-tb-sm" @tap.stop="select(x)">
<view class="content">
<text class="cuIcon-location text-red"></text>
<text class="text-black text-bold text-lg">{{x.LocationLable}}</text>
</view>
<view class="text-black flex" style="margin-left:calc(1.6em + 10rpx)">
<view>{{x.RealName}}</view>
<view class="margin-left">{{x.Phone}}</view>
</view>
</view>
<view class="action">
<button class="cu-btn round bg-white lg" @tap="edit($event,x)" data-target="addAddress">
<text class="cuIcon-edit text-green"></text></button>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName==='addAddress'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-gray justify-end">
<view class="content">新增收货地址</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="bg-white">
<form>
<view class="cu-form-group">
<view class="title">收件人</view>
<input placeholder="收件人" :value="form.RealName" @input="onInput" data-name="RealName" />
</view>
<view class="cu-form-group">
<view class="title">手机号</view>
<input placeholder="手机号" :value="form.Phone" @input="onInput" data-name="Phone" />
<button class='cu-btn bg-green shadow sm' @getphonenumber="getPhoneNumber" open-type="getPhoneNumber">微信获取</button>
</view>
<view class="cu-form-group">
<view class="title">小区</view>
<input placeholder="请点击地图获取" :value="form.Address" @input="onInput" data-name="Address" />
<button class='cu-btn bg-green shadow sm' @tap="getAddress">地图</button>
</view>
<view class="cu-form-group">
<view class="title">楼号-门牌</view>
<input placeholder="具体收货地址" :value="form.LocationLable" @input="onInput" data-name="LocationLable" />
</view>
<view class="flex margin-xs">
<view class="flex-treble">
<button class="cu-btn block bg-red lg shadow" @tap="submit">确定</button>
</view>
<view class="flex-sub padding-left-xs" v-if="form.Id">
<button class="cu-btn block bg-grey lg shadow" @tap="deleteAddress">删除</button>
</view>
</view>
</form>
</view>
</view>
</view>
<button class="cu-btn block bg-red margin lg fix-bottom shadow" @tap="addAddress($event)" data-target="addAddress">新增收货地址</button>
</view>
</template>
<script lang="ts">
import { Component, Vue, Inject, Watch, Ref } from "vue-property-decorator";
import uniPopup from "@/components/uni-popup/uni-popup.vue";
import api from "@/utils/api";
import { SystemModule } from "@/store/modules/system";
import { IAddress, UserModule } from "@/store/modules/user";
import { BaseView } from "../baseView";
import { Tips } from "../../utils/tips";
@Component({
components: { uniPopup }
})
export default class MyAddress extends BaseView {
get addressList() {
return UserModule.getAddressList;
}
form: any = {};
get info() {
return SystemModule.getInfo;
}
onInput(e: any) {
console.log(e);
let value = e.detail.value;
let key = e.currentTarget.dataset.name;
let o: any = {};
o[key] = value;
this.form = Object.assign({}, this.form, o);
}
async deleteAddress() {
if (this.form.Id > 0) {
api.AddressDelete(this.form).then((res: any) => {
if (res.success) {
this.hideModal();
this.initUser();
}
});
}
}
async submit() {
if (this.form.Id > 0)
await api.AddressEdit(this.form).then((res: any) => {
if (res.success) {
this.initUser();
this.hideModal();
}
});
else
await api.postNewAddress(this.form).then((res: any) => {
if (res.success) {
this.initUser();
this.hideModal();
}
});
}
addAddress(e: any) {
this.form = { Id: 0 };
this.showModal(e);
}
edit(e: any, x: IAddress) {
this.form = x;
this.showModal(e);
}
bindPhone(e: any) {
if (e)
if (e.mp.detail.errMsg.indexOf("ok") > 0) {
console.log("action:getPhoneNumber", e.mp.detail);
// await this.$api
// .getPhone({
// iv: e.mp.detail.iv,
// encryptedData: e.mp.detail.encryptedData,
// session_key: this.session_key
// })
// .then(res => {
// this.$api.updatePhone(res.phoneNumber).then(res => {
// this.$store.commit("SET_PHONE", res.phoneNumber);
// });
// });
} else {
if (e.mp.detail.errMsg === "getPhoneNumber:fail user deny")
uni.showToast({
title: "取消了授权"
});
else
uni.showToast({
icon: "none",
title: e.mp.detail.errMsg
});
}
}
async select(x: IAddress) {
console.log(x);
await api.SetAddressDefault({ Id: x.Id! }).then((res: any) => {
this.initUser();
if (res.success) uni.navigateBack();
});
}
getAddress() {
uni.chooseLocation({
success: res => {
console.log("位置名称:" + res.name);
console.log("详细地址:" + res.address);
console.log("纬度:" + res.latitude);
console.log("经度:" + res.longitude);
this.form = Object.assign({}, this.form, {
Address: res.address,
LocationLable: res.name,
Lat: res.latitude,
Lng: res.longitude
});
}
});
}
getPhoneNumber(e: any) {
if (e.mp.detail.errMsg.indexOf("ok") > 0) {
console.log("action:getPhoneNumber", e.mp.detail);
api.GetPhone({
iv: e.mp.detail.iv,
encryptedData: e.mp.detail.encryptedData
}).then((res: any) => {
console.log(res);
if (res.success) {
Tips.info("获取成功");
const p = JSON.parse(res.data);
this.form = Object.assign({}, this.form, {
Phone: p.phoneNumber
});
}
});
} else {
if (e.mp.detail.errMsg === "getPhoneNumber:fail user deny")
Tips.info("您取消了授权");
else {
Tips.info(e.mp.detail.errMsg);
}
}
}
}
</script>
<style lang="scss" scoped>
.cu-modal {
input {
text-align: left;
}
}
</style> | {
"pile_set_name": "Github"
} |
---
title: "Check-in Stations (Badge Printing)"
linkTitle: "Badge Printing"
weight: 2
description: >
How to assemble and configure your check-in stations for check-in and badge printing
---

{{% pageinfo %}}
Please note that:
- Check-in stations **require an Alf.io server instance** to download attendees' data and to upload successful scans
- It's not advisable to check-in using check-in stations and our mobile app at the same time. Since the stations can work offline, successful check-ins could be sent to the Alf.io server with a slight delay, whereas the mobile app expects them to be immediately available.
{{% /pageinfo %}}
## Hardware needed
In order to print badges, you'll need the following hardware:
- One or more check-in stations [tutorial](./assemble-station)
- A supported Label Printer, see [details](./supported-printers)
- An USB **QR-Code** (2D) scanner, set to emulate an **US** Keyboard Layout, and to add a **Newline Feed** after the scanned content. This is often the factory settings for these devices
{{% pageinfo %}}
**If you plan to deploy more than one station, you'll need a local network connection, either wired or wireless.**
The stations can work without internet connection after downloading the ticket details, but they need to **communicate with each other** to validate a scan and guarantee that the same ticket can't be scanned on different stations at the same time.
{{% /pageinfo %}}
| {
"pile_set_name": "Github"
} |
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
Name : libtinyIPSec
Description : Doubango Telecom tinyIPSec (IPSec) library
Version : @PACKAGE_VERSION@
Requires:
Requires.private: tinySAK = @PACKAGE_VERSION@
Conflicts:
Cflags : -I${includedir}/tinyipsec
Libs : -L${libdir} -ltinyIPSec
Libs.private:
| {
"pile_set_name": "Github"
} |
typeof_eq_undefined: {
options = {
comparisons: true,
unsafe: false
};
input: { a = typeof b.c != "undefined" }
expect: { a = "undefined" != typeof b.c }
}
typeof_eq_undefined_unsafe: {
options = {
comparisons: true,
unsafe: true
};
input: { a = typeof b.c != "undefined" }
expect: { a = b.c !== void 0 }
}
| {
"pile_set_name": "Github"
} |
//
// OCHamcrest - HCIsCloseTo.h
// Copyright 2011 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid
//
#import <OCHamcrestIOS/HCBaseMatcher.h>
@interface HCIsCloseTo : HCBaseMatcher
{
double value;
double delta;
}
+ (id)isCloseTo:(double)aValue within:(double)aDelta;
- (id)initWithValue:(double)aValue delta:(double)aDelta;
@end
OBJC_EXPORT id<HCMatcher> HC_closeTo(double aValue, double aDelta);
/**
closeTo(aValue, aDelta) -
Matches if object is a number close to a given value, within a given delta.
@param aValue The @c double value to compare against as the expected value.
@param aDelta The @c double maximum delta between the values for which the numbers are considered close.
This matcher invokes @c -doubleValue on the evaluated object to get its value as a @c double.
The result is compared against @a aValue to see if the difference is within a positive @a aDelta.
Example:
@li @ref closeTo(3.0, 0.25)
(In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
@c HC_closeTo instead.)
@ingroup number_matchers
*/
#ifdef HC_SHORTHAND
#define closeTo HC_closeTo
#endif
| {
"pile_set_name": "Github"
} |
// -------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using EnsureThat;
using Microsoft.Azure.Cosmos;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.Health.Fhir.CosmosDb.Configs;
namespace Microsoft.Health.Fhir.CosmosDb.Features.Storage.Versioning
{
internal class CollectionUpgradeManager : IUpgradeManager
{
private readonly IEnumerable<ICollectionUpdater> _collectionUpdater;
private readonly CosmosDataStoreConfiguration _configuration;
private readonly CosmosCollectionConfiguration _collectionConfiguration;
private readonly ICosmosDbDistributedLockFactory _lockFactory;
private readonly ILogger<CollectionUpgradeManager> _logger;
public CollectionUpgradeManager(
IEnumerable<ICollectionUpdater> collectionUpdater,
CosmosDataStoreConfiguration configuration,
IOptionsMonitor<CosmosCollectionConfiguration> namedCosmosCollectionConfigurationAccessor,
ICosmosDbDistributedLockFactory lockFactory,
ILogger<CollectionUpgradeManager> logger)
{
EnsureArg.IsNotNull(collectionUpdater, nameof(collectionUpdater));
EnsureArg.IsNotNull(configuration, nameof(configuration));
EnsureArg.IsNotNull(namedCosmosCollectionConfigurationAccessor, nameof(namedCosmosCollectionConfigurationAccessor));
EnsureArg.IsNotNull(lockFactory, nameof(lockFactory));
EnsureArg.IsNotNull(logger, nameof(logger));
_collectionUpdater = collectionUpdater;
_configuration = configuration;
_collectionConfiguration = GetCosmosCollectionConfiguration(namedCosmosCollectionConfigurationAccessor, Constants.CollectionConfigurationName);
_lockFactory = lockFactory;
_logger = logger;
}
/// <summary>
/// This integer should be incremented in the derived instance when changing any configuration in the derived CollectionUpgradeManager
/// </summary>
public int CollectionSettingsVersion { get; } = 2;
public async Task SetupContainerAsync(Container container)
{
EnsureArg.IsNotNull(container, nameof(container));
using (var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromMinutes(5)))
{
await using (var distributedLock = _lockFactory.Create(container, $"UpgradeLock:{CollectionSettingsVersion}"))
{
_logger.LogDebug("Attempting to acquire upgrade lock");
await distributedLock.AcquireLock(cancellationTokenSource.Token);
foreach (var updater in _collectionUpdater)
{
_logger.LogDebug("Running {CollectionUpdater} on {CollectionId}", updater.GetType().Name, _collectionConfiguration.CollectionId);
await updater.ExecuteAsync(container);
}
await distributedLock.ReleaseLock();
}
}
}
protected static CosmosCollectionConfiguration GetCosmosCollectionConfiguration(
IOptionsMonitor<CosmosCollectionConfiguration> namedCosmosCollectionConfigurationAccessor,
string collectionConfigurationName)
{
EnsureArg.IsNotNull(namedCosmosCollectionConfigurationAccessor, nameof(namedCosmosCollectionConfigurationAccessor));
EnsureArg.IsNotNullOrWhiteSpace(collectionConfigurationName, nameof(collectionConfigurationName));
return namedCosmosCollectionConfigurationAccessor.Get(collectionConfigurationName);
}
}
}
| {
"pile_set_name": "Github"
} |
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "quark:soul_sandstone_bricks"
},
"result": "quark:soul_sandstone_bricks_vertical_slab",
"count": 2,
"conditions": [
{
"type": "forge:and",
"values": [
{
"type": "quark:flag",
"flag": "soul_sandstone"
},
{
"type": "quark:flag",
"flag": "sandstone_bricks"
}
]
}
]
} | {
"pile_set_name": "Github"
} |
using System.Collections.Generic;
using FizzWare.NBuilder;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Disk;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Download;
using NzbDrone.Core.Download.TrackedDownloads;
using NzbDrone.Core.History;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.EpisodeImport;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
{
[TestFixture]
public class ProcessFixture : CoreTest<CompletedDownloadService>
{
private TrackedDownload _trackedDownload;
[SetUp]
public void Setup()
{
var completed = Builder<DownloadClientItem>.CreateNew()
.With(h => h.Status = DownloadItemStatus.Completed)
.With(h => h.OutputPath = new OsPath(@"C:\DropFolder\MyDownload".AsOsAgnostic()))
.With(h => h.Title = "Drone.S01E01.HDTV")
.Build();
var remoteEpisode = BuildRemoteEpisode();
_trackedDownload = Builder<TrackedDownload>.CreateNew()
.With(c => c.State = TrackedDownloadState.Downloading)
.With(c => c.DownloadItem = completed)
.With(c => c.RemoteEpisode = remoteEpisode)
.Build();
Mocker.GetMock<IDownloadClient>()
.SetupGet(c => c.Definition)
.Returns(new DownloadClientDefinition { Id = 1, Name = "testClient" });
Mocker.GetMock<IProvideDownloadClient>()
.Setup(c => c.Get(It.IsAny<int>()))
.Returns(Mocker.GetMock<IDownloadClient>().Object);
Mocker.GetMock<IHistoryService>()
.Setup(s => s.MostRecentForDownloadId(_trackedDownload.DownloadItem.DownloadId))
.Returns(new EpisodeHistory());
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetSeries("Drone.S01E01.HDTV"))
.Returns(remoteEpisode.Series);
}
private RemoteEpisode BuildRemoteEpisode()
{
return new RemoteEpisode
{
Series = new Series(),
Episodes = new List<Episode> { new Episode { Id = 1 } }
};
}
private void GivenNoGrabbedHistory()
{
Mocker.GetMock<IHistoryService>()
.Setup(s => s.MostRecentForDownloadId(_trackedDownload.DownloadItem.DownloadId))
.Returns((EpisodeHistory)null);
}
private void GivenSeriesMatch()
{
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetSeries(It.IsAny<string>()))
.Returns(_trackedDownload.RemoteEpisode.Series);
}
private void GivenABadlyNamedDownload()
{
_trackedDownload.DownloadItem.DownloadId = "1234";
_trackedDownload.DownloadItem.Title = "Droned Pilot"; // Set a badly named download
Mocker.GetMock<IHistoryService>()
.Setup(s => s.MostRecentForDownloadId(It.Is<string>(i => i == "1234")))
.Returns(new EpisodeHistory() { SourceTitle = "Droned S01E01" });
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetSeries(It.IsAny<string>()))
.Returns((Series)null);
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetSeries("Droned S01E01"))
.Returns(BuildRemoteEpisode().Series);
}
[TestCase(DownloadItemStatus.Downloading)]
[TestCase(DownloadItemStatus.Failed)]
[TestCase(DownloadItemStatus.Queued)]
[TestCase(DownloadItemStatus.Paused)]
[TestCase(DownloadItemStatus.Warning)]
public void should_not_process_if_download_status_isnt_completed(DownloadItemStatus status)
{
_trackedDownload.DownloadItem.Status = status;
Subject.Check(_trackedDownload);
AssertNotReadyToImport();
}
[Test]
public void should_not_process_if_matching_history_is_not_found_and_no_category_specified()
{
_trackedDownload.DownloadItem.Category = null;
GivenNoGrabbedHistory();
Subject.Check(_trackedDownload);
AssertNotReadyToImport();
}
[Test]
public void should_process_if_matching_history_is_not_found_but_category_specified()
{
_trackedDownload.DownloadItem.Category = "tv";
GivenNoGrabbedHistory();
GivenSeriesMatch();
Subject.Check(_trackedDownload);
AssertReadyToImport();
}
[Test]
public void should_not_process_if_output_path_is_empty()
{
_trackedDownload.DownloadItem.OutputPath = new OsPath();
Subject.Check(_trackedDownload);
AssertNotReadyToImport();
}
[Test]
public void should_not_process_if_the_download_cannot_be_tracked_using_the_source_title_as_it_was_initiated_externally()
{
GivenABadlyNamedDownload();
Mocker.GetMock<IDownloadedEpisodesImportService>()
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Series>(), It.IsAny<DownloadClientItem>()))
.Returns(new List<ImportResult>
{
new ImportResult(new ImportDecision(new LocalEpisode {Path = @"C:\TestPath\Droned.S01E01.mkv"}))
});
Mocker.GetMock<IHistoryService>()
.Setup(s => s.MostRecentForDownloadId(It.Is<string>(i => i == "1234")));
Subject.Check(_trackedDownload);
AssertNotReadyToImport();
}
[Test]
public void should_not_process_when_there_is_a_title_mismatch()
{
Mocker.GetMock<IParsingService>()
.Setup(s => s.GetSeries("Drone.S01E01.HDTV"))
.Returns((Series)null);
Subject.Check(_trackedDownload);
AssertNotReadyToImport();
}
private void AssertNotReadyToImport()
{
_trackedDownload.State.Should().NotBe(TrackedDownloadState.ImportPending);
}
private void AssertReadyToImport()
{
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportPending);
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LayerFragment_h
#define LayerFragment_h
#include "ClipRect.h"
namespace WebCore {
class LayerFragment {
public:
LayerFragment() = default;
void setRects(const LayoutRect& bounds, const ClipRect& background, const ClipRect& foreground, const LayoutRect* bbox)
{
layerBounds = bounds;
backgroundRect = background;
foregroundRect = foreground;
if (bbox) {
boundingBox = *bbox;
hasBoundingBox = true;
}
}
void moveBy(const LayoutPoint& offset)
{
layerBounds.moveBy(offset);
backgroundRect.moveBy(offset);
foregroundRect.moveBy(offset);
paginationClip.moveBy(offset);
boundingBox.moveBy(offset);
}
void intersect(const LayoutRect& rect)
{
backgroundRect.intersect(rect);
foregroundRect.intersect(rect);
boundingBox.intersect(rect);
}
void intersect(const ClipRect& clipRect)
{
backgroundRect.intersect(clipRect);
foregroundRect.intersect(clipRect);
}
bool shouldPaintContent = false;
bool hasBoundingBox = false;
LayoutRect layerBounds;
ClipRect backgroundRect;
ClipRect foregroundRect;
LayoutRect boundingBox;
// Unique to paginated fragments. The physical translation to apply to shift the layer when painting/hit-testing.
LayoutSize paginationOffset;
// Also unique to paginated fragments. An additional clip that applies to the layer. It is in layer-local
// (physical) coordinates.
LayoutRect paginationClip;
};
typedef Vector<LayerFragment, 1> LayerFragments;
}
#endif
| {
"pile_set_name": "Github"
} |
/**
* Catalan translation for bootstrap-datetimepicker
* J. Garcia <[email protected]>
*/
;(function($){
$.fn.datetimepicker.dates['ca'] = {
days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"],
daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"],
daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds", "dg"],
months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"],
monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"],
today: "Avui",
suffix: [],
meridiem: []
};
}(jQuery));
| {
"pile_set_name": "Github"
} |
#ifndef ZOOM_H
#define ZOOM_H
#ifndef STDTYPES_H
#include "stdtypes.h"
#endif
struct button;
struct rast;
struct short_xy;
extern struct button zpan_cycle_group;
/* muparts.c */
extern void zpan_ccycle_redraw(struct button *hanger);
/* zoom.c */
extern Boolean check_zoom_drag(void);
extern Boolean curs_in_zoombox(void);
extern void get_zoomcurs_flixy(struct short_xy *xy);
extern void close_zwinmenu(void);
extern Errcode zoom_handtool(void);
extern Boolean y_needs_zoom(Coor y);
extern void upd_zoom_dot(Pixel c, Coor x, Coor y);
extern void zoom_put_dot(struct raster *r, Pixel c, Coor x, Coor y);
extern void both_put_dot(struct raster *r, Pixel c, Coor x, Coor y);
extern void
zoom_put_hseg(struct raster *r, Pixel *pixbuf, Coor x, Coor y, Ucoor width);
extern void
zoom_txlatblit(struct raster *src, Coor sx, Coor sy, Ucoor width, Ucoor height,
Coor dx, Coor dy, struct tcolxldat *tcxl);
extern void
zoom_put_vseg(struct raster *r, Pixel *pixbuf, Coor x, Coor y, Ucoor height);
extern void
zoom_blitrect(struct raster *src, Coor sx, Coor sy,
Coor x, Coor y, Coor width, Coor height);
extern void rect_zoom_it(Coor x, Coor y, Coor w, Coor h);
extern void go_zoom_settings(void);
extern void zoom_it(void);
extern Boolean zoom_disabled(void);
extern void toggle_zoom(struct button *m);
extern void ktoggle_zoom(void);
extern Boolean zoom_hidden(void);
extern void unzoom(void);
extern void rezoom(void);
extern void init_zoom(void);
#endif
| {
"pile_set_name": "Github"
} |
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Regular/Main.js
*
* Copyright (c) 2012 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXSizeOneSym={directory:"SizeOneSym/Regular",family:"STIXSizeOneSym",Ranges:[[688,767,"All"],[768,824,"All"],[8254,8254,"All"],[8400,8431,"All"],[8512,8512,"All"],[8730,8732,"All"],[8992,8993,"All"],[9115,9145,"All"],[9180,9185,"All"],[10098,10099,"All"],[10214,10219,"All"],[10627,10630,"All"],[10744,10745,"All"],[10752,10762,"All"],[11004,11007,"All"]],32:[0,0,250,0,0],40:[1066,164,468,139,382],41:[1066,164,468,86,329],47:[1066,164,579,25,552],91:[1066,164,383,180,363],92:[1066,164,579,27,552],93:[1066,164,383,20,203],95:[-127,177,1000,0,1000],123:[1066,164,575,114,466],125:[1066,164,575,109,461],160:[0,0,250,0,0],770:[767,-554,0,-720,-160],771:[750,-598,0,-722,-162],8719:[1500,-49,1355,50,1305],8720:[1500,-49,1355,50,1305],8721:[1499,-49,1292,90,1202],8730:[1552,295,1057,112,1089],8896:[1500,-49,1265,60,1205],8897:[1500,-49,1265,60,1205],8898:[1510,-49,1265,118,1147],8899:[1500,-39,1265,118,1147],8968:[1066,164,453,180,426],8969:[1066,164,453,25,273],8970:[1066,164,453,180,428],8971:[1066,164,453,27,273],9115:[700,305,450,50,400],9116:[705,305,450,50,174],9117:[705,300,450,50,400],9118:[700,305,450,50,400],9119:[705,305,450,276,400],9120:[705,300,450,50,400],9121:[682,323,450,50,415],9122:[687,323,450,50,150],9123:[687,318,450,50,415],9124:[682,323,450,35,400],9125:[687,323,450,300,400],9126:[687,318,450,35,400],9127:[700,305,640,260,600],9128:[705,305,640,40,380],9129:[705,300,640,260,600],9130:[705,305,640,260,380],9131:[700,305,640,40,380],9132:[705,305,640,260,600],9133:[705,300,640,40,380],9134:[610,25,688,294,394],9136:[700,301,600,35,566],9137:[700,301,600,35,566],9143:[1510,345,1184,112,895],9144:[1566,289,721,0,66],9145:[1566,289,721,655,721],9182:[136,89,926,0,925],9183:[789,-564,926,0,925],10216:[1066,164,578,116,462],10217:[1066,164,578,116,462],10752:[1500,-49,1555,52,1503],10753:[1500,-49,1555,52,1503],10754:[1500,-49,1555,52,1503],10756:[1500,-39,1265,118,1147],10757:[1500,-49,1153,82,1071],10758:[1500,-49,1153,82,1071]};MathJax.OutputJax["HTML-CSS"].initFont("STIXSizeOneSym");MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/SizeOneSym/Regular/Main.js");
| {
"pile_set_name": "Github"
} |
var convert = require('./convert'),
func = convert('flip', require('../flip'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
| {
"pile_set_name": "Github"
} |
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename 404.tpl ##
## Developed by: aggenkeech ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
## ##
#################################################################################
?>
<div style="margin-top: 50px;">
<center>
<h1>404 - File not found</h1>
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
<p>This system is not complete yet. So the page probably does not exist.</p><br>
</center>
</div> | {
"pile_set_name": "Github"
} |
{
"name": "The Future is Like Pie",
"url": "https://thefutureislikepie.com",
"description": "My name is Lisa Maria Martin, and I am an independent consultant, writer, speaker, and editor.",
"twitter": "redsesame"
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2012 Samsung Electronics Co.Ltd
* Author: Joonyoung Shim <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <linux/i2c.h>
#include <linux/i2c/mms114.h>
#include <linux/input/mt.h>
#include <linux/interrupt.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
/* Write only registers */
#define MMS114_MODE_CONTROL 0x01
#define MMS114_OPERATION_MODE_MASK 0xE
#define MMS114_ACTIVE (1 << 1)
#define MMS114_XY_RESOLUTION_H 0x02
#define MMS114_X_RESOLUTION 0x03
#define MMS114_Y_RESOLUTION 0x04
#define MMS114_CONTACT_THRESHOLD 0x05
#define MMS114_MOVING_THRESHOLD 0x06
/* Read only registers */
#define MMS114_PACKET_SIZE 0x0F
#define MMS114_INFOMATION 0x10
#define MMS114_TSP_REV 0xF0
/* Minimum delay time is 50us between stop and start signal of i2c */
#define MMS114_I2C_DELAY 50
/* 200ms needs after power on */
#define MMS114_POWERON_DELAY 200
/* Touchscreen absolute values */
#define MMS114_MAX_AREA 0xff
#define MMS114_MAX_TOUCH 10
#define MMS114_PACKET_NUM 8
/* Touch type */
#define MMS114_TYPE_NONE 0
#define MMS114_TYPE_TOUCHSCREEN 1
#define MMS114_TYPE_TOUCHKEY 2
struct mms114_data {
struct i2c_client *client;
struct input_dev *input_dev;
struct regulator *core_reg;
struct regulator *io_reg;
const struct mms114_platform_data *pdata;
/* Use cache data for mode control register(write only) */
u8 cache_mode_control;
};
struct mms114_touch {
u8 id:4, reserved_bit4:1, type:2, pressed:1;
u8 x_hi:4, y_hi:4;
u8 x_lo;
u8 y_lo;
u8 width;
u8 strength;
u8 reserved[2];
} __packed;
static int __mms114_read_reg(struct mms114_data *data, unsigned int reg,
unsigned int len, u8 *val)
{
struct i2c_client *client = data->client;
struct i2c_msg xfer[2];
u8 buf = reg & 0xff;
int error;
if (reg <= MMS114_MODE_CONTROL && reg + len > MMS114_MODE_CONTROL)
BUG();
/* Write register: use repeated start */
xfer[0].addr = client->addr;
xfer[0].flags = I2C_M_TEN | I2C_M_NOSTART;
xfer[0].len = 1;
xfer[0].buf = &buf;
/* Read data */
xfer[1].addr = client->addr;
xfer[1].flags = I2C_M_RD;
xfer[1].len = len;
xfer[1].buf = val;
error = i2c_transfer(client->adapter, xfer, 2);
if (error != 2) {
dev_err(&client->dev,
"%s: i2c transfer failed (%d)\n", __func__, error);
return error < 0 ? error : -EIO;
}
udelay(MMS114_I2C_DELAY);
return 0;
}
static int mms114_read_reg(struct mms114_data *data, unsigned int reg)
{
u8 val;
int error;
if (reg == MMS114_MODE_CONTROL)
return data->cache_mode_control;
error = __mms114_read_reg(data, reg, 1, &val);
return error < 0 ? error : val;
}
static int mms114_write_reg(struct mms114_data *data, unsigned int reg,
unsigned int val)
{
struct i2c_client *client = data->client;
u8 buf[2];
int error;
buf[0] = reg & 0xff;
buf[1] = val & 0xff;
error = i2c_master_send(client, buf, 2);
if (error != 2) {
dev_err(&client->dev,
"%s: i2c send failed (%d)\n", __func__, error);
return error < 0 ? error : -EIO;
}
udelay(MMS114_I2C_DELAY);
if (reg == MMS114_MODE_CONTROL)
data->cache_mode_control = val;
return 0;
}
static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *touch)
{
const struct mms114_platform_data *pdata = data->pdata;
struct i2c_client *client = data->client;
struct input_dev *input_dev = data->input_dev;
unsigned int id;
unsigned int x;
unsigned int y;
if (touch->id > MMS114_MAX_TOUCH) {
dev_err(&client->dev, "Wrong touch id (%d)\n", touch->id);
return;
}
if (touch->type != MMS114_TYPE_TOUCHSCREEN) {
dev_err(&client->dev, "Wrong touch type (%d)\n", touch->type);
return;
}
id = touch->id - 1;
x = touch->x_lo | touch->x_hi << 8;
y = touch->y_lo | touch->y_hi << 8;
if (x > pdata->x_size || y > pdata->y_size) {
dev_dbg(&client->dev,
"Wrong touch coordinates (%d, %d)\n", x, y);
return;
}
if (pdata->x_invert)
x = pdata->x_size - x;
if (pdata->y_invert)
y = pdata->y_size - y;
dev_dbg(&client->dev,
"id: %d, type: %d, pressed: %d, x: %d, y: %d, width: %d, strength: %d\n",
id, touch->type, touch->pressed,
x, y, touch->width, touch->strength);
input_mt_slot(input_dev, id);
input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, touch->pressed);
if (touch->pressed) {
input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, touch->width);
input_report_abs(input_dev, ABS_MT_POSITION_X, x);
input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
input_report_abs(input_dev, ABS_MT_PRESSURE, touch->strength);
}
}
static irqreturn_t mms114_interrupt(int irq, void *dev_id)
{
struct mms114_data *data = dev_id;
struct input_dev *input_dev = data->input_dev;
struct mms114_touch touch[MMS114_MAX_TOUCH];
int packet_size;
int touch_size;
int index;
int error;
mutex_lock(&input_dev->mutex);
if (!input_dev->users) {
mutex_unlock(&input_dev->mutex);
goto out;
}
mutex_unlock(&input_dev->mutex);
packet_size = mms114_read_reg(data, MMS114_PACKET_SIZE);
if (packet_size <= 0)
goto out;
touch_size = packet_size / MMS114_PACKET_NUM;
error = __mms114_read_reg(data, MMS114_INFOMATION, packet_size,
(u8 *)touch);
if (error < 0)
goto out;
for (index = 0; index < touch_size; index++)
mms114_process_mt(data, touch + index);
input_mt_report_pointer_emulation(data->input_dev, true);
input_sync(data->input_dev);
out:
return IRQ_HANDLED;
}
static int mms114_set_active(struct mms114_data *data, bool active)
{
int val;
val = mms114_read_reg(data, MMS114_MODE_CONTROL);
if (val < 0)
return val;
val &= ~MMS114_OPERATION_MODE_MASK;
/* If active is false, sleep mode */
if (active)
val |= MMS114_ACTIVE;
return mms114_write_reg(data, MMS114_MODE_CONTROL, val);
}
static int mms114_get_version(struct mms114_data *data)
{
struct device *dev = &data->client->dev;
u8 buf[6];
int error;
error = __mms114_read_reg(data, MMS114_TSP_REV, 6, buf);
if (error < 0)
return error;
dev_info(dev, "TSP Rev: 0x%x, HW Rev: 0x%x, Firmware Ver: 0x%x\n",
buf[0], buf[1], buf[3]);
return 0;
}
static int mms114_setup_regs(struct mms114_data *data)
{
const struct mms114_platform_data *pdata = data->pdata;
int val;
int error;
error = mms114_get_version(data);
if (error < 0)
return error;
error = mms114_set_active(data, true);
if (error < 0)
return error;
val = (pdata->x_size >> 8) & 0xf;
val |= ((pdata->y_size >> 8) & 0xf) << 4;
error = mms114_write_reg(data, MMS114_XY_RESOLUTION_H, val);
if (error < 0)
return error;
val = pdata->x_size & 0xff;
error = mms114_write_reg(data, MMS114_X_RESOLUTION, val);
if (error < 0)
return error;
val = pdata->y_size & 0xff;
error = mms114_write_reg(data, MMS114_Y_RESOLUTION, val);
if (error < 0)
return error;
if (pdata->contact_threshold) {
error = mms114_write_reg(data, MMS114_CONTACT_THRESHOLD,
pdata->contact_threshold);
if (error < 0)
return error;
}
if (pdata->moving_threshold) {
error = mms114_write_reg(data, MMS114_MOVING_THRESHOLD,
pdata->moving_threshold);
if (error < 0)
return error;
}
return 0;
}
static int mms114_start(struct mms114_data *data)
{
struct i2c_client *client = data->client;
int error;
error = regulator_enable(data->core_reg);
if (error) {
dev_err(&client->dev, "Failed to enable avdd: %d\n", error);
return error;
}
error = regulator_enable(data->io_reg);
if (error) {
dev_err(&client->dev, "Failed to enable vdd: %d\n", error);
regulator_disable(data->core_reg);
return error;
}
mdelay(MMS114_POWERON_DELAY);
error = mms114_setup_regs(data);
if (error < 0) {
regulator_disable(data->io_reg);
regulator_disable(data->core_reg);
return error;
}
if (data->pdata->cfg_pin)
data->pdata->cfg_pin(true);
enable_irq(client->irq);
return 0;
}
static void mms114_stop(struct mms114_data *data)
{
struct i2c_client *client = data->client;
int error;
disable_irq(client->irq);
if (data->pdata->cfg_pin)
data->pdata->cfg_pin(false);
error = regulator_disable(data->io_reg);
if (error)
dev_warn(&client->dev, "Failed to disable vdd: %d\n", error);
error = regulator_disable(data->core_reg);
if (error)
dev_warn(&client->dev, "Failed to disable avdd: %d\n", error);
}
static int mms114_input_open(struct input_dev *dev)
{
struct mms114_data *data = input_get_drvdata(dev);
return mms114_start(data);
}
static void mms114_input_close(struct input_dev *dev)
{
struct mms114_data *data = input_get_drvdata(dev);
mms114_stop(data);
}
#ifdef CONFIG_OF
static struct mms114_platform_data *mms114_parse_dt(struct device *dev)
{
struct mms114_platform_data *pdata;
struct device_node *np = dev->of_node;
if (!np)
return NULL;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
dev_err(dev, "failed to allocate platform data\n");
return NULL;
}
if (of_property_read_u32(np, "x-size", &pdata->x_size)) {
dev_err(dev, "failed to get x-size property\n");
return NULL;
}
if (of_property_read_u32(np, "y-size", &pdata->y_size)) {
dev_err(dev, "failed to get y-size property\n");
return NULL;
}
of_property_read_u32(np, "contact-threshold",
&pdata->contact_threshold);
of_property_read_u32(np, "moving-threshold",
&pdata->moving_threshold);
if (of_find_property(np, "x-invert", NULL))
pdata->x_invert = true;
if (of_find_property(np, "y-invert", NULL))
pdata->y_invert = true;
return pdata;
}
#else
static inline struct mms114_platform_data *mms114_parse_dt(struct device *dev)
{
return NULL;
}
#endif
static int mms114_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
const struct mms114_platform_data *pdata;
struct mms114_data *data;
struct input_dev *input_dev;
int error;
pdata = dev_get_platdata(&client->dev);
if (!pdata)
pdata = mms114_parse_dt(&client->dev);
if (!pdata) {
dev_err(&client->dev, "Need platform data\n");
return -EINVAL;
}
if (!i2c_check_functionality(client->adapter,
I2C_FUNC_PROTOCOL_MANGLING)) {
dev_err(&client->dev,
"Need i2c bus that supports protocol mangling\n");
return -ENODEV;
}
data = devm_kzalloc(&client->dev, sizeof(struct mms114_data),
GFP_KERNEL);
input_dev = devm_input_allocate_device(&client->dev);
if (!data || !input_dev) {
dev_err(&client->dev, "Failed to allocate memory\n");
return -ENOMEM;
}
data->client = client;
data->input_dev = input_dev;
data->pdata = pdata;
input_dev->name = "MELFAS MMS114 Touchscreen";
input_dev->id.bustype = BUS_I2C;
input_dev->dev.parent = &client->dev;
input_dev->open = mms114_input_open;
input_dev->close = mms114_input_close;
__set_bit(EV_ABS, input_dev->evbit);
__set_bit(EV_KEY, input_dev->evbit);
__set_bit(BTN_TOUCH, input_dev->keybit);
input_set_abs_params(input_dev, ABS_X, 0, data->pdata->x_size, 0, 0);
input_set_abs_params(input_dev, ABS_Y, 0, data->pdata->y_size, 0, 0);
/* For multi touch */
input_mt_init_slots(input_dev, MMS114_MAX_TOUCH, 0);
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR,
0, MMS114_MAX_AREA, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_X,
0, data->pdata->x_size, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
0, data->pdata->y_size, 0, 0);
input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
input_set_drvdata(input_dev, data);
i2c_set_clientdata(client, data);
data->core_reg = devm_regulator_get(&client->dev, "avdd");
if (IS_ERR(data->core_reg)) {
error = PTR_ERR(data->core_reg);
dev_err(&client->dev,
"Unable to get the Core regulator (%d)\n", error);
return error;
}
data->io_reg = devm_regulator_get(&client->dev, "vdd");
if (IS_ERR(data->io_reg)) {
error = PTR_ERR(data->io_reg);
dev_err(&client->dev,
"Unable to get the IO regulator (%d)\n", error);
return error;
}
error = devm_request_threaded_irq(&client->dev, client->irq, NULL,
mms114_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
dev_name(&client->dev), data);
if (error) {
dev_err(&client->dev, "Failed to register interrupt\n");
return error;
}
disable_irq(client->irq);
error = input_register_device(data->input_dev);
if (error) {
dev_err(&client->dev, "Failed to register input device\n");
return error;
}
return 0;
}
static int __maybe_unused mms114_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct mms114_data *data = i2c_get_clientdata(client);
struct input_dev *input_dev = data->input_dev;
int id;
/* Release all touch */
for (id = 0; id < MMS114_MAX_TOUCH; id++) {
input_mt_slot(input_dev, id);
input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, false);
}
input_mt_report_pointer_emulation(input_dev, true);
input_sync(input_dev);
mutex_lock(&input_dev->mutex);
if (input_dev->users)
mms114_stop(data);
mutex_unlock(&input_dev->mutex);
return 0;
}
static int __maybe_unused mms114_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct mms114_data *data = i2c_get_clientdata(client);
struct input_dev *input_dev = data->input_dev;
int error;
mutex_lock(&input_dev->mutex);
if (input_dev->users) {
error = mms114_start(data);
if (error < 0) {
mutex_unlock(&input_dev->mutex);
return error;
}
}
mutex_unlock(&input_dev->mutex);
return 0;
}
static SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume);
static const struct i2c_device_id mms114_id[] = {
{ "mms114", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, mms114_id);
#ifdef CONFIG_OF
static const struct of_device_id mms114_dt_match[] = {
{ .compatible = "melfas,mms114" },
{ }
};
MODULE_DEVICE_TABLE(of, mms114_dt_match);
#endif
static struct i2c_driver mms114_driver = {
.driver = {
.name = "mms114",
.pm = &mms114_pm_ops,
.of_match_table = of_match_ptr(mms114_dt_match),
},
.probe = mms114_probe,
.id_table = mms114_id,
};
module_i2c_driver(mms114_driver);
/* Module information */
MODULE_AUTHOR("Joonyoung Shim <[email protected]>");
MODULE_DESCRIPTION("MELFAS mms114 Touchscreen driver");
MODULE_LICENSE("GPL");
| {
"pile_set_name": "Github"
} |
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_VECTOR30_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR30_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector30_fwd.hpp")
#endif
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
This is an auto-generated file. Do not edit!
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
namespace boost { namespace fusion
{
// expand vector21 to vector30
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector30_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (21, 30)
#include BOOST_PP_ITERATE()
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif
| {
"pile_set_name": "Github"
} |
<?php
/**
* Defines common attribute collections that modules reference
*/
class HTMLPurifier_AttrCollections
{
/**
* Associative array of attribute collections, indexed by name
*/
public $info = array();
/**
* Performs all expansions on internal data for use by other inclusions
* It also collects all attribute collection extensions from
* modules
* @param $attr_types HTMLPurifier_AttrTypes instance
* @param $modules Hash array of HTMLPurifier_HTMLModule members
*/
public function __construct($attr_types, $modules) {
// load extensions from the modules
foreach ($modules as $module) {
foreach ($module->attr_collections as $coll_i => $coll) {
if (!isset($this->info[$coll_i])) {
$this->info[$coll_i] = array();
}
foreach ($coll as $attr_i => $attr) {
if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) {
// merge in includes
$this->info[$coll_i][$attr_i] = array_merge(
$this->info[$coll_i][$attr_i], $attr);
continue;
}
$this->info[$coll_i][$attr_i] = $attr;
}
}
}
// perform internal expansions and inclusions
foreach ($this->info as $name => $attr) {
// merge attribute collections that include others
$this->performInclusions($this->info[$name]);
// replace string identifiers with actual attribute objects
$this->expandIdentifiers($this->info[$name], $attr_types);
}
}
/**
* Takes a reference to an attribute associative array and performs
* all inclusions specified by the zero index.
* @param &$attr Reference to attribute array
*/
public function performInclusions(&$attr) {
if (!isset($attr[0])) return;
$merge = $attr[0];
$seen = array(); // recursion guard
// loop through all the inclusions
for ($i = 0; isset($merge[$i]); $i++) {
if (isset($seen[$merge[$i]])) continue;
$seen[$merge[$i]] = true;
// foreach attribute of the inclusion, copy it over
if (!isset($this->info[$merge[$i]])) continue;
foreach ($this->info[$merge[$i]] as $key => $value) {
if (isset($attr[$key])) continue; // also catches more inclusions
$attr[$key] = $value;
}
if (isset($this->info[$merge[$i]][0])) {
// recursion
$merge = array_merge($merge, $this->info[$merge[$i]][0]);
}
}
unset($attr[0]);
}
/**
* Expands all string identifiers in an attribute array by replacing
* them with the appropriate values inside HTMLPurifier_AttrTypes
* @param &$attr Reference to attribute array
* @param $attr_types HTMLPurifier_AttrTypes instance
*/
public function expandIdentifiers(&$attr, $attr_types) {
// because foreach will process new elements we add, make sure we
// skip duplicates
$processed = array();
foreach ($attr as $def_i => $def) {
// skip inclusions
if ($def_i === 0) continue;
if (isset($processed[$def_i])) continue;
// determine whether or not attribute is required
if ($required = (strpos($def_i, '*') !== false)) {
// rename the definition
unset($attr[$def_i]);
$def_i = trim($def_i, '*');
$attr[$def_i] = $def;
}
$processed[$def_i] = true;
// if we've already got a literal object, move on
if (is_object($def)) {
// preserve previous required
$attr[$def_i]->required = ($required || $attr[$def_i]->required);
continue;
}
if ($def === false) {
unset($attr[$def_i]);
continue;
}
if ($t = $attr_types->get($def)) {
$attr[$def_i] = $t;
$attr[$def_i]->required = $required;
} else {
unset($attr[$def_i]);
}
}
}
}
| {
"pile_set_name": "Github"
} |
android_binary(
name = "bin",
keystore = ":debug_keystore",
manifest = "AndroidManifest.xml",
native_library_merge_map = {
"libnative.so": [],
},
)
keystore(
name = "debug_keystore",
properties = "debug.keystore.properties",
store = "debug.keystore",
)
| {
"pile_set_name": "Github"
} |
#include <math.h>
#include "stat.h"
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
void update_stats(struct stats *stats, u64 val)
{
double delta;
stats->n++;
delta = val - stats->mean;
stats->mean += delta / stats->n;
stats->M2 += delta*(val - stats->mean);
if (val > stats->max)
stats->max = val;
if (val < stats->min)
stats->min = val;
}
double avg_stats(struct stats *stats)
{
return stats->mean;
}
/*
* http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
*
* (\Sum n_i^2) - ((\Sum n_i)^2)/n
* s^2 = -------------------------------
* n - 1
*
* http://en.wikipedia.org/wiki/Stddev
*
* The std dev of the mean is related to the std dev by:
*
* s
* s_mean = -------
* sqrt(n)
*
*/
double stddev_stats(struct stats *stats)
{
double variance, variance_mean;
if (stats->n < 2)
return 0.0;
variance = stats->M2 / (stats->n - 1);
variance_mean = variance / stats->n;
return sqrt(variance_mean);
}
double rel_stddev_stats(double stddev, double avg)
{
double pct = 0.0;
if (avg)
pct = 100.0 * stddev/avg;
return pct;
}
bool __perf_evsel_stat__is(struct perf_evsel *evsel,
enum perf_stat_evsel_id id)
{
struct perf_stat_evsel *ps = evsel->priv;
return ps->id == id;
}
#define ID(id, name) [PERF_STAT_EVSEL_ID__##id] = #name
static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = {
ID(NONE, x),
ID(CYCLES_IN_TX, cpu/cycles-t/),
ID(TRANSACTION_START, cpu/tx-start/),
ID(ELISION_START, cpu/el-start/),
ID(CYCLES_IN_TX_CP, cpu/cycles-ct/),
};
#undef ID
void perf_stat_evsel_id_init(struct perf_evsel *evsel)
{
struct perf_stat_evsel *ps = evsel->priv;
int i;
/* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */
for (i = 0; i < PERF_STAT_EVSEL_ID__MAX; i++) {
if (!strcmp(perf_evsel__name(evsel), id_str[i])) {
ps->id = i;
break;
}
}
}
void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
{
int i;
struct perf_stat_evsel *ps = evsel->priv;
for (i = 0; i < 3; i++)
init_stats(&ps->res_stats[i]);
perf_stat_evsel_id_init(evsel);
}
int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
{
evsel->priv = zalloc(sizeof(struct perf_stat_evsel));
if (evsel->priv == NULL)
return -ENOMEM;
perf_evsel__reset_stat_priv(evsel);
return 0;
}
void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
{
zfree(&evsel->priv);
}
int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel,
int ncpus, int nthreads)
{
struct perf_counts *counts;
counts = perf_counts__new(ncpus, nthreads);
if (counts)
evsel->prev_raw_counts = counts;
return counts ? 0 : -ENOMEM;
}
void perf_evsel__free_prev_raw_counts(struct perf_evsel *evsel)
{
perf_counts__delete(evsel->prev_raw_counts);
evsel->prev_raw_counts = NULL;
}
int perf_evsel__alloc_stats(struct perf_evsel *evsel, bool alloc_raw)
{
int ncpus = perf_evsel__nr_cpus(evsel);
int nthreads = thread_map__nr(evsel->threads);
if (perf_evsel__alloc_stat_priv(evsel) < 0 ||
perf_evsel__alloc_counts(evsel, ncpus, nthreads) < 0 ||
(alloc_raw && perf_evsel__alloc_prev_raw_counts(evsel, ncpus, nthreads) < 0))
return -ENOMEM;
return 0;
}
int perf_evlist__alloc_stats(struct perf_evlist *evlist, bool alloc_raw)
{
struct perf_evsel *evsel;
evlist__for_each(evlist, evsel) {
if (perf_evsel__alloc_stats(evsel, alloc_raw))
goto out_free;
}
return 0;
out_free:
perf_evlist__free_stats(evlist);
return -1;
}
void perf_evlist__free_stats(struct perf_evlist *evlist)
{
struct perf_evsel *evsel;
evlist__for_each(evlist, evsel) {
perf_evsel__free_stat_priv(evsel);
perf_evsel__free_counts(evsel);
perf_evsel__free_prev_raw_counts(evsel);
}
}
void perf_evlist__reset_stats(struct perf_evlist *evlist)
{
struct perf_evsel *evsel;
evlist__for_each(evlist, evsel) {
perf_evsel__reset_stat_priv(evsel);
perf_evsel__reset_counts(evsel);
}
}
static void zero_per_pkg(struct perf_evsel *counter)
{
if (counter->per_pkg_mask)
memset(counter->per_pkg_mask, 0, MAX_NR_CPUS);
}
static int check_per_pkg(struct perf_evsel *counter,
struct perf_counts_values *vals, int cpu, bool *skip)
{
unsigned long *mask = counter->per_pkg_mask;
struct cpu_map *cpus = perf_evsel__cpus(counter);
int s;
*skip = false;
if (!counter->per_pkg)
return 0;
if (cpu_map__empty(cpus))
return 0;
if (!mask) {
mask = zalloc(MAX_NR_CPUS);
if (!mask)
return -ENOMEM;
counter->per_pkg_mask = mask;
}
/*
* we do not consider an event that has not run as a good
* instance to mark a package as used (skip=1). Otherwise
* we may run into a situation where the first CPU in a package
* is not running anything, yet the second is, and this function
* would mark the package as used after the first CPU and would
* not read the values from the second CPU.
*/
if (!(vals->run && vals->ena))
return 0;
s = cpu_map__get_socket(cpus, cpu, NULL);
if (s < 0)
return -1;
*skip = test_and_set_bit(s, mask) == 1;
return 0;
}
static int
process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel,
int cpu, int thread,
struct perf_counts_values *count)
{
struct perf_counts_values *aggr = &evsel->counts->aggr;
static struct perf_counts_values zero;
bool skip = false;
if (check_per_pkg(evsel, count, cpu, &skip)) {
pr_err("failed to read per-pkg counter\n");
return -1;
}
if (skip)
count = &zero;
switch (config->aggr_mode) {
case AGGR_THREAD:
case AGGR_CORE:
case AGGR_SOCKET:
case AGGR_NONE:
if (!evsel->snapshot)
perf_evsel__compute_deltas(evsel, cpu, thread, count);
perf_counts_values__scale(count, config->scale, NULL);
if (config->aggr_mode == AGGR_NONE)
perf_stat__update_shadow_stats(evsel, count->values, cpu);
break;
case AGGR_GLOBAL:
aggr->val += count->val;
if (config->scale) {
aggr->ena += count->ena;
aggr->run += count->run;
}
case AGGR_UNSET:
default:
break;
}
return 0;
}
static int process_counter_maps(struct perf_stat_config *config,
struct perf_evsel *counter)
{
int nthreads = thread_map__nr(counter->threads);
int ncpus = perf_evsel__nr_cpus(counter);
int cpu, thread;
if (counter->system_wide)
nthreads = 1;
for (thread = 0; thread < nthreads; thread++) {
for (cpu = 0; cpu < ncpus; cpu++) {
if (process_counter_values(config, counter, cpu, thread,
perf_counts(counter->counts, cpu, thread)))
return -1;
}
}
return 0;
}
int perf_stat_process_counter(struct perf_stat_config *config,
struct perf_evsel *counter)
{
struct perf_counts_values *aggr = &counter->counts->aggr;
struct perf_stat_evsel *ps = counter->priv;
u64 *count = counter->counts->aggr.values;
int i, ret;
aggr->val = aggr->ena = aggr->run = 0;
/*
* We calculate counter's data every interval,
* and the display code shows ps->res_stats
* avg value. We need to zero the stats for
* interval mode, otherwise overall avg running
* averages will be shown for each interval.
*/
if (config->interval)
init_stats(ps->res_stats);
if (counter->per_pkg)
zero_per_pkg(counter);
ret = process_counter_maps(config, counter);
if (ret)
return ret;
if (config->aggr_mode != AGGR_GLOBAL)
return 0;
if (!counter->snapshot)
perf_evsel__compute_deltas(counter, -1, -1, aggr);
perf_counts_values__scale(aggr, config->scale, &counter->counts->scaled);
for (i = 0; i < 3; i++)
update_stats(&ps->res_stats[i], count[i]);
if (verbose) {
fprintf(config->output, "%s: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
perf_evsel__name(counter), count[0], count[1], count[2]);
}
/*
* Save the full runtime - to allow normalization during printout:
*/
perf_stat__update_shadow_stats(counter, count, 0);
return 0;
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 1998-2006, 2008-2010, 2014 Proofpoint, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*/
#include <sendmail.h>
SM_RCSID("@(#)$Id: usersmtp.c,v 8.488 2013-11-22 20:51:57 ca Exp $")
#include <sysexits.h>
static void esmtp_check __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
static void helo_options __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
static int smtprcptstat __P((ADDRESS *, MAILER *, MCI *, ENVELOPE *));
#if SASL
extern void *sm_sasl_malloc __P((unsigned long));
extern void sm_sasl_free __P((void *));
#endif
/*
** USERSMTP -- run SMTP protocol from the user end.
**
** This protocol is described in RFC821.
*/
#define SMTPCLOSING 421 /* "Service Shutting Down" */
#define ENHSCN(e, d) ((e) == NULL ? (d) : (e))
#define ENHSCN_RPOOL(e, d, rpool) \
((e) == NULL ? (d) : sm_rpool_strdup_x(rpool, e))
static char SmtpMsgBuffer[MAXLINE]; /* buffer for commands */
static char SmtpReplyBuffer[MAXLINE]; /* buffer for replies */
static bool SmtpNeedIntro; /* need "while talking" in transcript */
/*
** SMTPINIT -- initialize SMTP.
**
** Opens the connection and sends the initial protocol.
**
** Parameters:
** m -- mailer to create connection to.
** mci -- the mailer connection info.
** e -- the envelope.
** onlyhelo -- send only helo command?
**
** Returns:
** none.
**
** Side Effects:
** creates connection and sends initial protocol.
*/
void
smtpinit(m, mci, e, onlyhelo)
MAILER *m;
register MCI *mci;
ENVELOPE *e;
bool onlyhelo;
{
register int r;
int state;
register char *p;
register char *hn;
#if _FFR_EXPAND_HELONAME
char hnbuf[MAXNAME + 1];
#endif
char *enhsc;
enhsc = NULL;
if (tTd(18, 1))
{
sm_dprintf("smtpinit ");
mci_dump(sm_debug_file(), mci, false);
}
/*
** Open the connection to the mailer.
*/
SmtpError[0] = '\0';
SmtpMsgBuffer[0] = '\0';
CurHostName = mci->mci_host; /* XXX UGLY XXX */
if (CurHostName == NULL)
CurHostName = MyHostName;
SmtpNeedIntro = true;
state = mci->mci_state;
e->e_rcode = 0;
e->e_renhsc[0] = '\0';
e->e_text = NULL;
switch (state)
{
case MCIS_MAIL:
case MCIS_RCPT:
case MCIS_DATA:
/* need to clear old information */
smtprset(m, mci, e);
/* FALLTHROUGH */
case MCIS_OPEN:
if (!onlyhelo)
return;
break;
case MCIS_ERROR:
case MCIS_QUITING:
case MCIS_SSD:
/* shouldn't happen */
smtpquit(m, mci, e);
/* FALLTHROUGH */
case MCIS_CLOSED:
syserr("451 4.4.0 smtpinit: state CLOSED (was %d)", state);
return;
case MCIS_OPENING:
break;
}
if (onlyhelo)
goto helo;
mci->mci_state = MCIS_OPENING;
clrsessenvelope(e);
/*
** Get the greeting message.
** This should appear spontaneously. Give it five minutes to
** happen.
*/
SmtpPhase = mci->mci_phase = "client greeting";
sm_setproctitle(true, e, "%s %s: %s",
qid_printname(e), CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check, NULL, XS_GREET);
if (r < 0)
goto tempfail1;
if (REPLYTYPE(r) == 4)
goto tempfail2;
if (REPLYTYPE(r) != 2)
goto unavailable;
/*
** Send the HELO command.
** My mother taught me to always introduce myself.
*/
helo:
if (bitnset(M_ESMTP, m->m_flags) || bitnset(M_LMTP, m->m_flags))
mci->mci_flags |= MCIF_ESMTP;
if (mci->mci_heloname != NULL)
{
#if _FFR_EXPAND_HELONAME
expand(mci->mci_heloname, hnbuf, sizeof(hnbuf), e);
hn = hnbuf;
#else
hn = mci->mci_heloname;
#endif
}
else
hn = MyHostName;
tryhelo:
#if _FFR_IGNORE_EXT_ON_HELO
mci->mci_flags &= ~MCIF_HELO;
#endif
if (bitnset(M_LMTP, m->m_flags))
{
smtpmessage("LHLO %s", m, mci, hn);
SmtpPhase = mci->mci_phase = "client LHLO";
}
else if (bitset(MCIF_ESMTP, mci->mci_flags) &&
!bitnset(M_FSMTP, m->m_flags))
{
smtpmessage("EHLO %s", m, mci, hn);
SmtpPhase = mci->mci_phase = "client EHLO";
}
else
{
smtpmessage("HELO %s", m, mci, hn);
SmtpPhase = mci->mci_phase = "client HELO";
#if _FFR_IGNORE_EXT_ON_HELO
mci->mci_flags |= MCIF_HELO;
#endif
}
sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
CurHostName, mci->mci_phase);
r = reply(m, mci, e,
bitnset(M_LMTP, m->m_flags) ? TimeOuts.to_lhlo
: TimeOuts.to_helo,
helo_options, NULL, XS_EHLO);
if (r < 0)
goto tempfail1;
else if (REPLYTYPE(r) == 5)
{
if (bitset(MCIF_ESMTP, mci->mci_flags) &&
!bitnset(M_LMTP, m->m_flags))
{
/* try old SMTP instead */
mci->mci_flags &= ~MCIF_ESMTP;
goto tryhelo;
}
goto unavailable;
}
else if (REPLYTYPE(r) != 2)
goto tempfail2;
/*
** Check to see if we actually ended up talking to ourself.
** This means we didn't know about an alias or MX, or we managed
** to connect to an echo server.
*/
p = strchr(&SmtpReplyBuffer[4], ' ');
if (p != NULL)
*p = '\0';
if (!bitnset(M_NOLOOPCHECK, m->m_flags) &&
!bitnset(M_LMTP, m->m_flags) &&
sm_strcasecmp(&SmtpReplyBuffer[4], MyHostName) == 0)
{
syserr("553 5.3.5 %s config error: mail loops back to me (MX problem?)",
CurHostName);
mci_setstat(mci, EX_CONFIG, "5.3.5",
"553 5.3.5 system config error");
mci->mci_errno = 0;
smtpquit(m, mci, e);
return;
}
/*
** If this is expected to be another sendmail, send some internal
** commands.
** If we're running as MSP, "propagate" -v flag if possible.
*/
if ((UseMSP && Verbose && bitset(MCIF_VERB, mci->mci_flags))
|| bitnset(M_INTERNAL, m->m_flags))
{
/* tell it to be verbose */
smtpmessage("VERB", m, mci);
r = reply(m, mci, e, TimeOuts.to_miscshort, NULL, &enhsc,
XS_DEFAULT);
if (r < 0)
goto tempfail1;
}
if (mci->mci_state != MCIS_CLOSED)
{
mci->mci_state = MCIS_OPEN;
return;
}
/* got a 421 error code during startup */
tempfail1:
mci_setstat(mci, EX_TEMPFAIL, ENHSCN(enhsc, "4.4.2"), NULL);
if (mci->mci_state != MCIS_CLOSED)
smtpquit(m, mci, e);
return;
tempfail2:
/* XXX should use code from other end iff ENHANCEDSTATUSCODES */
mci_setstat(mci, EX_TEMPFAIL, ENHSCN(enhsc, "4.5.0"),
SmtpReplyBuffer);
if (mci->mci_state != MCIS_CLOSED)
smtpquit(m, mci, e);
return;
unavailable:
mci_setstat(mci, EX_UNAVAILABLE, "5.5.0", SmtpReplyBuffer);
smtpquit(m, mci, e);
return;
}
/*
** ESMTP_CHECK -- check to see if this implementation likes ESMTP protocol
**
** Parameters:
** line -- the response line.
** firstline -- set if this is the first line of the reply.
** m -- the mailer.
** mci -- the mailer connection info.
** e -- the envelope.
**
** Returns:
** none.
*/
static void
esmtp_check(line, firstline, m, mci, e)
char *line;
bool firstline;
MAILER *m;
register MCI *mci;
ENVELOPE *e;
{
if (strstr(line, "ESMTP") != NULL)
mci->mci_flags |= MCIF_ESMTP;
/*
** Dirty hack below. Quoting the author:
** This was a response to people who wanted SMTP transmission to be
** just-send-8 by default. Essentially, you could put this tag into
** your greeting message to behave as though the F=8 flag was set on
** the mailer.
*/
if (strstr(line, "8BIT-OK") != NULL)
mci->mci_flags |= MCIF_8BITOK;
}
#if SASL
/* specify prototype so compiler can check calls */
static char *str_union __P((char *, char *, SM_RPOOL_T *));
/*
** STR_UNION -- create the union of two lists
**
** Parameters:
** s1, s2 -- lists of items (separated by single blanks).
** rpool -- resource pool from which result is allocated.
**
** Returns:
** the union of both lists.
*/
static char *
str_union(s1, s2, rpool)
char *s1, *s2;
SM_RPOOL_T *rpool;
{
char *hr, *h1, *h, *res;
int l1, l2, rl;
if (s1 == NULL || *s1 == '\0')
return s2;
if (s2 == NULL || *s2 == '\0')
return s1;
l1 = strlen(s1);
l2 = strlen(s2);
rl = l1 + l2;
if (rl <= 0)
{
sm_syslog(LOG_WARNING, NOQID,
"str_union: stringlen1=%d, stringlen2=%d, sum=%d, status=overflow",
l1, l2, rl);
res = NULL;
}
else
res = (char *) sm_rpool_malloc(rpool, rl + 2);
if (res == NULL)
{
if (l1 > l2)
return s1;
return s2;
}
(void) sm_strlcpy(res, s1, rl);
hr = res + l1;
h1 = s2;
h = s2;
/* walk through s2 */
while (h != NULL && *h1 != '\0')
{
/* is there something after the current word? */
if ((h = strchr(h1, ' ')) != NULL)
*h = '\0';
l1 = strlen(h1);
/* does the current word appear in s1 ? */
if (iteminlist(h1, s1, " ") == NULL)
{
/* add space as delimiter */
*hr++ = ' ';
/* copy the item */
memcpy(hr, h1, l1);
/* advance pointer in result list */
hr += l1;
*hr = '\0';
}
if (h != NULL)
{
/* there are more items */
*h = ' ';
h1 = h + 1;
}
}
return res;
}
#endif /* SASL */
/*
** HELO_OPTIONS -- process the options on a HELO line.
**
** Parameters:
** line -- the response line.
** firstline -- set if this is the first line of the reply.
** m -- the mailer.
** mci -- the mailer connection info.
** e -- the envelope (unused).
**
** Returns:
** none.
*/
static void
helo_options(line, firstline, m, mci, e)
char *line;
bool firstline;
MAILER *m;
register MCI *mci;
ENVELOPE *e;
{
register char *p;
#if _FFR_IGNORE_EXT_ON_HELO
static bool logged = false;
#endif
if (firstline)
{
mci_clr_extensions(mci);
#if _FFR_IGNORE_EXT_ON_HELO
logged = false;
#endif
return;
}
#if _FFR_IGNORE_EXT_ON_HELO
else if (bitset(MCIF_HELO, mci->mci_flags))
{
if (LogLevel > 8 && !logged)
{
sm_syslog(LOG_WARNING, NOQID,
"server=%s [%s] returned extensions despite HELO command",
macvalue(macid("{server_name}"), e),
macvalue(macid("{server_addr}"), e));
logged = true;
}
return;
}
#endif /* _FFR_IGNORE_EXT_ON_HELO */
if (strlen(line) < 5)
return;
line += 4;
p = strpbrk(line, " =");
if (p != NULL)
*p++ = '\0';
if (sm_strcasecmp(line, "size") == 0)
{
mci->mci_flags |= MCIF_SIZE;
if (p != NULL)
mci->mci_maxsize = atol(p);
}
else if (sm_strcasecmp(line, "8bitmime") == 0)
{
mci->mci_flags |= MCIF_8BITMIME;
mci->mci_flags &= ~MCIF_7BIT;
}
else if (sm_strcasecmp(line, "expn") == 0)
mci->mci_flags |= MCIF_EXPN;
else if (sm_strcasecmp(line, "dsn") == 0)
mci->mci_flags |= MCIF_DSN;
else if (sm_strcasecmp(line, "enhancedstatuscodes") == 0)
mci->mci_flags |= MCIF_ENHSTAT;
else if (sm_strcasecmp(line, "pipelining") == 0)
mci->mci_flags |= MCIF_PIPELINED;
else if (sm_strcasecmp(line, "verb") == 0)
mci->mci_flags |= MCIF_VERB;
#if _FFR_EAI
else if (sm_strcasecmp(line, "smtputf8") == 0)
mci->mci_flags |= MCIF_EAI;
#endif /* _FFR_EAI */
#if STARTTLS
else if (sm_strcasecmp(line, "starttls") == 0)
mci->mci_flags |= MCIF_TLS;
#endif
else if (sm_strcasecmp(line, "deliverby") == 0)
{
mci->mci_flags |= MCIF_DLVR_BY;
if (p != NULL)
mci->mci_min_by = atol(p);
}
#if SASL
else if (sm_strcasecmp(line, "auth") == 0)
{
if (p != NULL && *p != '\0' &&
!bitset(MCIF_AUTH2, mci->mci_flags))
{
if (mci->mci_saslcap != NULL)
{
/*
** Create the union with previous auth
** offerings because we recognize "auth "
** and "auth=" (old format).
*/
mci->mci_saslcap = str_union(mci->mci_saslcap,
p, mci->mci_rpool);
mci->mci_flags |= MCIF_AUTH2;
}
else
{
int l;
l = strlen(p) + 1;
mci->mci_saslcap = (char *)
sm_rpool_malloc(mci->mci_rpool, l);
if (mci->mci_saslcap != NULL)
{
(void) sm_strlcpy(mci->mci_saslcap, p,
l);
mci->mci_flags |= MCIF_AUTH;
}
}
}
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "AUTH flags=%lx, mechs=%s",
mci->mci_flags, mci->mci_saslcap);
}
#endif /* SASL */
}
#if SASL
static int getsimple __P((void *, int, const char **, unsigned *));
static int getsecret __P((sasl_conn_t *, void *, int, sasl_secret_t **));
static int saslgetrealm __P((void *, int, const char **, const char **));
static int readauth __P((char *, bool, SASL_AI_T *m, SM_RPOOL_T *));
static int getauth __P((MCI *, ENVELOPE *, SASL_AI_T *));
static char *removemech __P((char *, char *, SM_RPOOL_T *));
static int attemptauth __P((MAILER *, MCI *, ENVELOPE *, SASL_AI_T *));
static sasl_callback_t callbacks[] =
{
{ SASL_CB_GETREALM, (sasl_callback_ft)&saslgetrealm, NULL },
#define CB_GETREALM_IDX 0
{ SASL_CB_PASS, (sasl_callback_ft)&getsecret, NULL },
#define CB_PASS_IDX 1
{ SASL_CB_USER, (sasl_callback_ft)&getsimple, NULL },
#define CB_USER_IDX 2
{ SASL_CB_AUTHNAME, (sasl_callback_ft)&getsimple, NULL },
#define CB_AUTHNAME_IDX 3
{ SASL_CB_VERIFYFILE, (sasl_callback_ft)&safesaslfile, NULL },
#define CB_SAFESASL_IDX 4
{ SASL_CB_LIST_END, NULL, NULL }
};
/*
** INIT_SASL_CLIENT -- initialize client side of Cyrus-SASL
**
** Parameters:
** none.
**
** Returns:
** SASL_OK -- if successful.
** SASL error code -- otherwise.
**
** Side Effects:
** checks/sets sasl_clt_init.
**
** Note:
** Callbacks are ignored if sasl_client_init() has
** been called before (by a library such as libnss_ldap)
*/
static bool sasl_clt_init = false;
static int
init_sasl_client()
{
int result;
if (sasl_clt_init)
return SASL_OK;
result = sasl_client_init(callbacks);
/* should we retry later again or just remember that it failed? */
if (result == SASL_OK)
sasl_clt_init = true;
return result;
}
/*
** STOP_SASL_CLIENT -- shutdown client side of Cyrus-SASL
**
** Parameters:
** none.
**
** Returns:
** none.
**
** Side Effects:
** checks/sets sasl_clt_init.
*/
void
stop_sasl_client()
{
if (!sasl_clt_init)
return;
sasl_clt_init = false;
sasl_done();
}
/*
** GETSASLDATA -- process the challenges from the SASL protocol
**
** This gets the relevant sasl response data out of the reply
** from the server.
**
** Parameters:
** line -- the response line.
** firstline -- set if this is the first line of the reply.
** m -- the mailer.
** mci -- the mailer connection info.
** e -- the envelope (unused).
**
** Returns:
** none.
*/
static void getsasldata __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
static void
getsasldata(line, firstline, m, mci, e)
char *line;
bool firstline;
MAILER *m;
register MCI *mci;
ENVELOPE *e;
{
int len;
int result;
# if SASL < 20000
char *out;
# endif
/* if not a continue we don't care about it */
len = strlen(line);
if ((len <= 4) ||
(line[0] != '3') ||
!isascii(line[1]) || !isdigit(line[1]) ||
!isascii(line[2]) || !isdigit(line[2]))
{
SM_FREE(mci->mci_sasl_string);
return;
}
/* forget about "334 " */
line += 4;
len -= 4;
# if SASL >= 20000
/* XXX put this into a macro/function? It's duplicated below */
if (mci->mci_sasl_string != NULL)
{
if (mci->mci_sasl_string_len <= len)
{
sm_free(mci->mci_sasl_string); /* XXX */
mci->mci_sasl_string = xalloc(len + 1);
}
}
else
mci->mci_sasl_string = xalloc(len + 1);
result = sasl_decode64(line, len, mci->mci_sasl_string, len + 1,
(unsigned int *) &mci->mci_sasl_string_len);
if (result != SASL_OK)
{
mci->mci_sasl_string_len = 0;
*mci->mci_sasl_string = '\0';
}
# else /* SASL >= 20000 */
out = (char *) sm_rpool_malloc_x(mci->mci_rpool, len + 1);
result = sasl_decode64(line, len, out, (unsigned int *) &len);
if (result != SASL_OK)
{
len = 0;
*out = '\0';
}
/*
** mci_sasl_string is "shared" with Cyrus-SASL library; hence
** it can't be in an rpool unless we use the same memory
** management mechanism (with same rpool!) for Cyrus SASL.
*/
if (mci->mci_sasl_string != NULL)
{
if (mci->mci_sasl_string_len <= len)
{
sm_free(mci->mci_sasl_string); /* XXX */
mci->mci_sasl_string = xalloc(len + 1);
}
}
else
mci->mci_sasl_string = xalloc(len + 1);
memcpy(mci->mci_sasl_string, out, len);
mci->mci_sasl_string[len] = '\0';
mci->mci_sasl_string_len = len;
# endif /* SASL >= 20000 */
return;
}
/*
** READAUTH -- read auth values from a file
**
** Parameters:
** filename -- name of file to read.
** safe -- if set, this is a safe read.
** sai -- where to store auth_info.
** rpool -- resource pool for sai.
**
** Returns:
** EX_OK -- data successfully read.
** EX_UNAVAILABLE -- no valid filename.
** EX_TEMPFAIL -- temporary failure.
*/
static char *sasl_info_name[] =
{
"user id",
"authentication id",
"password",
"realm",
"mechlist"
};
static int
readauth(filename, safe, sai, rpool)
char *filename;
bool safe;
SASL_AI_T *sai;
SM_RPOOL_T *rpool;
{
SM_FILE_T *f;
long sff;
pid_t pid;
int lc;
char *s;
char buf[MAXLINE];
if (filename == NULL || filename[0] == '\0')
return EX_UNAVAILABLE;
#if !_FFR_ALLOW_SASLINFO
/*
** make sure we don't use a program that is not
** accessible to the user who specified a different authinfo file.
** However, currently we don't pass this info (authinfo file
** specified by user) around, so we just turn off program access.
*/
if (filename[0] == '|')
{
auto int fd;
int i;
char *p;
char *argv[MAXPV + 1];
i = 0;
for (p = strtok(&filename[1], " \t"); p != NULL;
p = strtok(NULL, " \t"))
{
if (i >= MAXPV)
break;
argv[i++] = p;
}
argv[i] = NULL;
pid = prog_open(argv, &fd, CurEnv);
if (pid < 0)
f = NULL;
else
f = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT,
(void *) &fd, SM_IO_RDONLY, NULL);
}
else
#endif /* !_FFR_ALLOW_SASLINFO */
{
pid = -1;
sff = SFF_REGONLY|SFF_SAFEDIRPATH|SFF_NOWLINK
|SFF_NOGWFILES|SFF_NOWWFILES|SFF_NOWRFILES;
if (!bitnset(DBS_GROUPREADABLEAUTHINFOFILE, DontBlameSendmail))
sff |= SFF_NOGRFILES;
if (DontLockReadFiles)
sff |= SFF_NOLOCK;
#if _FFR_ALLOW_SASLINFO
/*
** XXX: make sure we don't read or open files that are not
** accessible to the user who specified a different authinfo
** file.
*/
sff |= SFF_MUSTOWN;
#else /* _FFR_ALLOW_SASLINFO */
if (safe)
sff |= SFF_OPENASROOT;
#endif /* _FFR_ALLOW_SASLINFO */
f = safefopen(filename, O_RDONLY, 0, sff);
}
if (f == NULL)
{
if (LogLevel > 5)
sm_syslog(LOG_ERR, NOQID,
"AUTH=client, error: can't open %s: %s",
filename, sm_errstring(errno));
return EX_TEMPFAIL;
}
lc = 0;
while (lc <= SASL_MECHLIST &&
sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
{
if (buf[0] != '#')
{
(*sai)[lc] = sm_rpool_strdup_x(rpool, buf);
if ((s = strchr((*sai)[lc], '\n')) != NULL)
*s = '\0';
lc++;
}
}
(void) sm_io_close(f, SM_TIME_DEFAULT);
if (pid > 0)
(void) waitfor(pid);
if (lc < SASL_PASSWORD)
{
if (LogLevel > 8)
sm_syslog(LOG_ERR, NOQID,
"AUTH=client, error: can't read %s from %s",
sasl_info_name[lc + 1], filename);
return EX_TEMPFAIL;
}
return EX_OK;
}
/*
** GETAUTH -- get authinfo from ruleset call
**
** {server_name}, {server_addr} must be set
**
** Parameters:
** mci -- the mailer connection structure.
** e -- the envelope (including the sender to specify).
** sai -- pointer to authinfo (result).
**
** Returns:
** EX_OK -- ruleset was successfully called, data may not
** be available, sai must be checked.
** EX_UNAVAILABLE -- ruleset unavailable (or failed).
** EX_TEMPFAIL -- temporary failure (from ruleset).
**
** Side Effects:
** Fills in sai if successful.
*/
static int
getauth(mci, e, sai)
MCI *mci;
ENVELOPE *e;
SASL_AI_T *sai;
{
int i, r, l, got, ret;
char **pvp;
char pvpbuf[PSBUFSIZE];
r = rscap("authinfo", macvalue(macid("{server_name}"), e),
macvalue(macid("{server_addr}"), e), e,
&pvp, pvpbuf, sizeof(pvpbuf));
if (r != EX_OK)
return EX_UNAVAILABLE;
/* other than expected return value: ok (i.e., no auth) */
if (pvp == NULL || pvp[0] == NULL || (pvp[0][0] & 0377) != CANONNET)
return EX_OK;
if (pvp[1] != NULL && sm_strncasecmp(pvp[1], "temp", 4) == 0)
return EX_TEMPFAIL;
/*
** parse the data, put it into sai
** format: "TDstring" (including the '"' !)
** where T is a tag: 'U', ...
** D is a delimiter: ':' or '='
*/
ret = EX_OK; /* default return value */
i = 0;
got = 0;
while (i < SASL_ENTRIES)
{
if (pvp[i + 1] == NULL)
break;
if (pvp[i + 1][0] != '"')
break;
switch (pvp[i + 1][1])
{
case 'U':
case 'u':
r = SASL_USER;
break;
case 'I':
case 'i':
r = SASL_AUTHID;
break;
case 'P':
case 'p':
r = SASL_PASSWORD;
break;
case 'R':
case 'r':
r = SASL_DEFREALM;
break;
case 'M':
case 'm':
r = SASL_MECHLIST;
break;
default:
goto fail;
}
l = strlen(pvp[i + 1]);
/* check syntax */
if (l <= 3 || pvp[i + 1][l - 1] != '"')
goto fail;
/* remove closing quote */
pvp[i + 1][l - 1] = '\0';
/* remove "TD and " */
l -= 4;
(*sai)[r] = (char *) sm_rpool_malloc(mci->mci_rpool, l + 1);
if ((*sai)[r] == NULL)
goto tempfail;
if (pvp[i + 1][2] == ':')
{
/* ':text' (just copy) */
(void) sm_strlcpy((*sai)[r], pvp[i + 1] + 3, l + 1);
got |= 1 << r;
}
else if (pvp[i + 1][2] == '=')
{
unsigned int len;
/* '=base64' (decode) */
# if SASL >= 20000
ret = sasl_decode64(pvp[i + 1] + 3,
(unsigned int) l, (*sai)[r],
(unsigned int) l + 1, &len);
# else /* SASL >= 20000 */
ret = sasl_decode64(pvp[i + 1] + 3,
(unsigned int) l, (*sai)[r], &len);
# endif /* SASL >= 20000 */
if (ret != SASL_OK)
goto fail;
got |= 1 << r;
}
else
goto fail;
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "getauth %s=%s",
sasl_info_name[r], (*sai)[r]);
++i;
}
/* did we get the expected data? */
/* XXX: EXTERNAL mechanism only requires (and only uses) SASL_USER */
if (!(bitset(SASL_USER_BIT|SASL_AUTHID_BIT, got) &&
bitset(SASL_PASSWORD_BIT, got)))
goto fail;
/* no authid? copy uid */
if (!bitset(SASL_AUTHID_BIT, got))
{
l = strlen((*sai)[SASL_USER]) + 1;
(*sai)[SASL_AUTHID] = (char *) sm_rpool_malloc(mci->mci_rpool,
l + 1);
if ((*sai)[SASL_AUTHID] == NULL)
goto tempfail;
(void) sm_strlcpy((*sai)[SASL_AUTHID], (*sai)[SASL_USER], l);
}
/* no uid? copy authid */
if (!bitset(SASL_USER_BIT, got))
{
l = strlen((*sai)[SASL_AUTHID]) + 1;
(*sai)[SASL_USER] = (char *) sm_rpool_malloc(mci->mci_rpool,
l + 1);
if ((*sai)[SASL_USER] == NULL)
goto tempfail;
(void) sm_strlcpy((*sai)[SASL_USER], (*sai)[SASL_AUTHID], l);
}
return EX_OK;
tempfail:
ret = EX_TEMPFAIL;
fail:
if (LogLevel > 8)
sm_syslog(LOG_WARNING, NOQID,
"AUTH=client, relay=%.64s [%.16s], authinfo %sfailed",
macvalue(macid("{server_name}"), e),
macvalue(macid("{server_addr}"), e),
ret == EX_TEMPFAIL ? "temp" : "");
for (i = 0; i <= SASL_MECHLIST; i++)
(*sai)[i] = NULL; /* just clear; rpool */
return ret;
}
# if SASL >= 20000
/*
** GETSIMPLE -- callback to get userid or authid
**
** Parameters:
** context -- sai
** id -- what to do
** result -- (pointer to) result
** len -- (pointer to) length of result
**
** Returns:
** OK/failure values
*/
static int
getsimple(context, id, result, len)
void *context;
int id;
const char **result;
unsigned *len;
{
SASL_AI_T *sai;
if (result == NULL || context == NULL)
return SASL_BADPARAM;
sai = (SASL_AI_T *) context;
switch (id)
{
case SASL_CB_USER:
*result = (*sai)[SASL_USER];
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "AUTH username '%s'",
*result);
if (len != NULL)
*len = *result != NULL ? strlen(*result) : 0;
break;
case SASL_CB_AUTHNAME:
*result = (*sai)[SASL_AUTHID];
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "AUTH authid '%s'",
*result);
if (len != NULL)
*len = *result != NULL ? strlen(*result) : 0;
break;
case SASL_CB_LANGUAGE:
*result = NULL;
if (len != NULL)
*len = 0;
break;
default:
return SASL_BADPARAM;
}
return SASL_OK;
}
/*
** GETSECRET -- callback to get password
**
** Parameters:
** conn -- connection information
** context -- sai
** id -- what to do
** psecret -- (pointer to) result
**
** Returns:
** OK/failure values
*/
static int
getsecret(conn, context, id, psecret)
sasl_conn_t *conn;
SM_UNUSED(void *context);
int id;
sasl_secret_t **psecret;
{
int len;
char *authpass;
MCI *mci;
if (conn == NULL || psecret == NULL || id != SASL_CB_PASS)
return SASL_BADPARAM;
mci = (MCI *) context;
authpass = mci->mci_sai[SASL_PASSWORD];
len = strlen(authpass);
/*
** use an rpool because we are responsible for free()ing the secret,
** but we can't free() it until after the auth completes
*/
*psecret = (sasl_secret_t *) sm_rpool_malloc(mci->mci_rpool,
sizeof(sasl_secret_t) +
len + 1);
if (*psecret == NULL)
return SASL_FAIL;
(void) sm_strlcpy((char *) (*psecret)->data, authpass, len + 1);
(*psecret)->len = (unsigned long) len;
return SASL_OK;
}
# else /* SASL >= 20000 */
/*
** GETSIMPLE -- callback to get userid or authid
**
** Parameters:
** context -- sai
** id -- what to do
** result -- (pointer to) result
** len -- (pointer to) length of result
**
** Returns:
** OK/failure values
*/
static int
getsimple(context, id, result, len)
void *context;
int id;
const char **result;
unsigned *len;
{
char *h, *s;
# if SASL > 10509
bool addrealm;
# endif
size_t l;
SASL_AI_T *sai;
char *authid = NULL;
if (result == NULL || context == NULL)
return SASL_BADPARAM;
sai = (SASL_AI_T *) context;
/*
** Unfortunately it is not clear whether this routine should
** return a copy of a string or just a pointer to a string.
** The Cyrus-SASL plugins treat these return values differently, e.g.,
** plugins/cram.c free()s authid, plugings/digestmd5.c does not.
** The best solution to this problem is to fix Cyrus-SASL, but it
** seems there is nobody who creates patches... Hello CMU!?
** The second best solution is to have flags that tell this routine
** whether to return an malloc()ed copy.
** The next best solution is to always return an malloc()ed copy,
** and suffer from some memory leak, which is ugly for persistent
** queue runners.
** For now we go with the last solution...
** We can't use rpools (which would avoid this particular problem)
** as explained in sasl.c.
*/
switch (id)
{
case SASL_CB_USER:
l = strlen((*sai)[SASL_USER]) + 1;
s = sm_sasl_malloc(l);
if (s == NULL)
{
if (len != NULL)
*len = 0;
*result = NULL;
return SASL_NOMEM;
}
(void) sm_strlcpy(s, (*sai)[SASL_USER], l);
*result = s;
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "AUTH username '%s'",
*result);
if (len != NULL)
*len = *result != NULL ? strlen(*result) : 0;
break;
case SASL_CB_AUTHNAME:
h = (*sai)[SASL_AUTHID];
# if SASL > 10509
/* XXX maybe other mechanisms too?! */
addrealm = (*sai)[SASL_MECH] != NULL &&
sm_strcasecmp((*sai)[SASL_MECH], "CRAM-MD5") == 0;
/*
** Add realm to authentication id unless authid contains
** '@' (i.e., a realm) or the default realm is empty.
*/
if (addrealm && h != NULL && strchr(h, '@') == NULL)
{
/* has this been done before? */
if ((*sai)[SASL_ID_REALM] == NULL)
{
char *realm;
realm = (*sai)[SASL_DEFREALM];
/* do not add an empty realm */
if (*realm == '\0')
{
authid = h;
(*sai)[SASL_ID_REALM] = NULL;
}
else
{
l = strlen(h) + strlen(realm) + 2;
/* should use rpool, but from where? */
authid = sm_sasl_malloc(l);
if (authid != NULL)
{
(void) sm_snprintf(authid, l,
"%s@%s",
h, realm);
(*sai)[SASL_ID_REALM] = authid;
}
else
{
authid = h;
(*sai)[SASL_ID_REALM] = NULL;
}
}
}
else
authid = (*sai)[SASL_ID_REALM];
}
else
# endif /* SASL > 10509 */
authid = h;
l = strlen(authid) + 1;
s = sm_sasl_malloc(l);
if (s == NULL)
{
if (len != NULL)
*len = 0;
*result = NULL;
return SASL_NOMEM;
}
(void) sm_strlcpy(s, authid, l);
*result = s;
if (tTd(95, 5))
sm_syslog(LOG_DEBUG, NOQID, "AUTH authid '%s'",
*result);
if (len != NULL)
*len = authid ? strlen(authid) : 0;
break;
case SASL_CB_LANGUAGE:
*result = NULL;
if (len != NULL)
*len = 0;
break;
default:
return SASL_BADPARAM;
}
return SASL_OK;
}
/*
** GETSECRET -- callback to get password
**
** Parameters:
** conn -- connection information
** context -- sai
** id -- what to do
** psecret -- (pointer to) result
**
** Returns:
** OK/failure values
*/
static int
getsecret(conn, context, id, psecret)
sasl_conn_t *conn;
SM_UNUSED(void *context);
int id;
sasl_secret_t **psecret;
{
int len;
char *authpass;
SASL_AI_T *sai;
if (conn == NULL || psecret == NULL || id != SASL_CB_PASS)
return SASL_BADPARAM;
sai = (SASL_AI_T *) context;
authpass = (*sai)[SASL_PASSWORD];
len = strlen(authpass);
*psecret = (sasl_secret_t *) sm_sasl_malloc(sizeof(sasl_secret_t) +
len + 1);
if (*psecret == NULL)
return SASL_FAIL;
(void) sm_strlcpy((*psecret)->data, authpass, len + 1);
(*psecret)->len = (unsigned long) len;
return SASL_OK;
}
# endif /* SASL >= 20000 */
/*
** SAFESASLFILE -- callback for sasl: is file safe?
**
** Parameters:
** context -- pointer to context between invocations (unused)
** file -- name of file to check
** type -- type of file to check
**
** Returns:
** SASL_OK -- file can be used
** SASL_CONTINUE -- don't use file
** SASL_FAIL -- failure (not used here)
**
*/
int
#if SASL > 10515
safesaslfile(context, file, type)
#else
safesaslfile(context, file)
#endif
void *context;
# if SASL >= 20000
const char *file;
# else
char *file;
# endif
#if SASL > 10515
# if SASL >= 20000
sasl_verify_type_t type;
# else
int type;
# endif
#endif
{
long sff;
int r;
#if SASL <= 10515
size_t len;
#endif
char *p;
if (file == NULL || *file == '\0')
return SASL_OK;
if (tTd(95, 16))
sm_dprintf("safesaslfile=%s\n", file);
sff = SFF_SAFEDIRPATH|SFF_NOWLINK|SFF_NOWWFILES|SFF_ROOTOK;
#if SASL <= 10515
if ((p = strrchr(file, '/')) == NULL)
p = file;
else
++p;
/* everything beside libs and .conf files must not be readable */
len = strlen(p);
if ((len <= 3 || strncmp(p, "lib", 3) != 0) &&
(len <= 5 || strncmp(p + len - 5, ".conf", 5) != 0))
{
if (!bitnset(DBS_GROUPREADABLESASLDBFILE, DontBlameSendmail))
sff |= SFF_NORFILES;
if (!bitnset(DBS_GROUPWRITABLESASLDBFILE, DontBlameSendmail))
sff |= SFF_NOGWFILES;
}
#else /* SASL <= 10515 */
/* files containing passwords should be not readable */
if (type == SASL_VRFY_PASSWD)
{
if (bitnset(DBS_GROUPREADABLESASLDBFILE, DontBlameSendmail))
sff |= SFF_NOWRFILES;
else
sff |= SFF_NORFILES;
if (!bitnset(DBS_GROUPWRITABLESASLDBFILE, DontBlameSendmail))
sff |= SFF_NOGWFILES;
}
#endif /* SASL <= 10515 */
p = (char *) file;
if ((r = safefile(p, RunAsUid, RunAsGid, RunAsUserName, sff,
S_IRUSR, NULL)) == 0)
return SASL_OK;
if (LogLevel > (r != ENOENT ? 8 : 10))
sm_syslog(LOG_WARNING, NOQID, "error: safesasl(%s) failed: %s",
p, sm_errstring(r));
return SASL_CONTINUE;
}
/*
** SASLGETREALM -- return the realm for SASL
**
** return the realm for the client
**
** Parameters:
** context -- context shared between invocations
** availrealms -- list of available realms
** {realm, realm, ...}
** result -- pointer to result
**
** Returns:
** failure/success
*/
static int
saslgetrealm(context, id, availrealms, result)
void *context;
int id;
const char **availrealms;
const char **result;
{
char *r;
SASL_AI_T *sai;
sai = (SASL_AI_T *) context;
if (sai == NULL)
return SASL_FAIL;
r = (*sai)[SASL_DEFREALM];
if (LogLevel > 12)
sm_syslog(LOG_INFO, NOQID,
"AUTH=client, realm=%s, available realms=%s",
r == NULL ? "<No Realm>" : r,
(availrealms == NULL || *availrealms == NULL)
? "<No Realms>" : *availrealms);
/* check whether context is in list */
if (availrealms != NULL && *availrealms != NULL)
{
if (iteminlist(context, (char *)(*availrealms + 1), " ,}") ==
NULL)
{
if (LogLevel > 8)
sm_syslog(LOG_ERR, NOQID,
"AUTH=client, realm=%s not in list=%s",
r, *availrealms);
return SASL_FAIL;
}
}
*result = r;
return SASL_OK;
}
/*
** ITEMINLIST -- does item appear in list?
**
** Check whether item appears in list (which must be separated by a
** character in delim) as a "word", i.e. it must appear at the begin
** of the list or after a space, and it must end with a space or the
** end of the list.
**
** Parameters:
** item -- item to search.
** list -- list of items.
** delim -- list of delimiters.
**
** Returns:
** pointer to occurrence (NULL if not found).
*/
char *
iteminlist(item, list, delim)
char *item;
char *list;
char *delim;
{
char *s;
int len;
if (list == NULL || *list == '\0')
return NULL;
if (item == NULL || *item == '\0')
return NULL;
s = list;
len = strlen(item);
while (s != NULL && *s != '\0')
{
if (sm_strncasecmp(s, item, len) == 0 &&
(s[len] == '\0' || strchr(delim, s[len]) != NULL))
return s;
s = strpbrk(s, delim);
if (s != NULL)
while (*++s == ' ')
continue;
}
return NULL;
}
/*
** REMOVEMECH -- remove item [rem] from list [list]
**
** Parameters:
** rem -- item to remove
** list -- list of items
** rpool -- resource pool from which result is allocated.
**
** Returns:
** pointer to new list (NULL in case of error).
*/
static char *
removemech(rem, list, rpool)
char *rem;
char *list;
SM_RPOOL_T *rpool;
{
char *ret;
char *needle;
int len;
if (list == NULL)
return NULL;
if (rem == NULL || *rem == '\0')
{
/* take out what? */
return NULL;
}
/* find the item in the list */
if ((needle = iteminlist(rem, list, " ")) == NULL)
{
/* not in there: return original */
return list;
}
/* length of string without rem */
len = strlen(list) - strlen(rem);
if (len <= 0)
{
ret = (char *) sm_rpool_malloc_x(rpool, 1);
*ret = '\0';
return ret;
}
ret = (char *) sm_rpool_malloc_x(rpool, len);
memset(ret, '\0', len);
/* copy from start to removed item */
memcpy(ret, list, needle - list);
/* length of rest of string past removed item */
len = strlen(needle) - strlen(rem) - 1;
if (len > 0)
{
/* not last item -- copy into string */
memcpy(ret + (needle - list),
list + (needle - list) + strlen(rem) + 1,
len);
}
else
ret[(needle - list) - 1] = '\0';
return ret;
}
/*
** ATTEMPTAUTH -- try to AUTHenticate using one mechanism
**
** Parameters:
** m -- the mailer.
** mci -- the mailer connection structure.
** e -- the envelope (including the sender to specify).
** sai - sasl authinfo
**
** Returns:
** EX_OK -- authentication was successful.
** EX_NOPERM -- authentication failed.
** EX_IOERR -- authentication dialogue failed (I/O problem?).
** EX_TEMPFAIL -- temporary failure.
**
*/
static int
attemptauth(m, mci, e, sai)
MAILER *m;
MCI *mci;
ENVELOPE *e;
SASL_AI_T *sai;
{
int saslresult, smtpresult;
# if SASL >= 20000
sasl_ssf_t ssf;
const char *auth_id;
const char *out;
# else /* SASL >= 20000 */
sasl_external_properties_t ssf;
char *out;
# endif /* SASL >= 20000 */
unsigned int outlen;
sasl_interact_t *client_interact = NULL;
char *mechusing;
sasl_security_properties_t ssp;
/* MUST NOT be a multiple of 4: bug in some sasl_encode64() versions */
char in64[MAXOUTLEN + 1];
#if NETINET || (NETINET6 && SASL >= 20000)
extern SOCKADDR CurHostAddr;
#endif
/* no mechanism selected (yet) */
(*sai)[SASL_MECH] = NULL;
/* dispose old connection */
if (mci->mci_conn != NULL)
sasl_dispose(&(mci->mci_conn));
/* make a new client sasl connection */
# if SASL >= 20000
/*
** We provide the callbacks again because global callbacks in
** sasl_client_init() are ignored if SASL has been initialized
** before, for example, by a library such as libnss-ldap.
*/
saslresult = sasl_client_new(bitnset(M_LMTP, m->m_flags) ? "lmtp"
: "smtp",
CurHostName, NULL, NULL, callbacks, 0,
&mci->mci_conn);
# else /* SASL >= 20000 */
saslresult = sasl_client_new(bitnset(M_LMTP, m->m_flags) ? "lmtp"
: "smtp",
CurHostName, NULL, 0, &mci->mci_conn);
# endif /* SASL >= 20000 */
if (saslresult != SASL_OK)
return EX_TEMPFAIL;
/* set properties */
(void) memset(&ssp, '\0', sizeof(ssp));
/* XXX should these be options settable via .cf ? */
ssp.max_ssf = MaxSLBits;
ssp.maxbufsize = MAXOUTLEN;
# if 0
ssp.security_flags = SASL_SEC_NOPLAINTEXT;
# endif
saslresult = sasl_setprop(mci->mci_conn, SASL_SEC_PROPS, &ssp);
if (saslresult != SASL_OK)
return EX_TEMPFAIL;
# if SASL >= 20000
/* external security strength factor, authentication id */
ssf = 0;
auth_id = NULL;
# if STARTTLS
out = macvalue(macid("{cert_subject}"), e);
if (out != NULL && *out != '\0')
auth_id = out;
out = macvalue(macid("{cipher_bits}"), e);
if (out != NULL && *out != '\0')
ssf = atoi(out);
# endif /* STARTTLS */
saslresult = sasl_setprop(mci->mci_conn, SASL_SSF_EXTERNAL, &ssf);
if (saslresult != SASL_OK)
return EX_TEMPFAIL;
saslresult = sasl_setprop(mci->mci_conn, SASL_AUTH_EXTERNAL, auth_id);
if (saslresult != SASL_OK)
return EX_TEMPFAIL;
# if NETINET || NETINET6
/* set local/remote ipv4 addresses */
if (mci->mci_out != NULL && (
# if NETINET6
CurHostAddr.sa.sa_family == AF_INET6 ||
# endif
CurHostAddr.sa.sa_family == AF_INET))
{
SOCKADDR_LEN_T addrsize;
SOCKADDR saddr_l;
char localip[60], remoteip[60];
switch (CurHostAddr.sa.sa_family)
{
case AF_INET:
addrsize = sizeof(struct sockaddr_in);
break;
# if NETINET6
case AF_INET6:
addrsize = sizeof(struct sockaddr_in6);
break;
# endif
default:
break;
}
if (iptostring(&CurHostAddr, addrsize,
remoteip, sizeof(remoteip)))
{
if (sasl_setprop(mci->mci_conn, SASL_IPREMOTEPORT,
remoteip) != SASL_OK)
return EX_TEMPFAIL;
}
addrsize = sizeof(saddr_l);
if (getsockname(sm_io_getinfo(mci->mci_out, SM_IO_WHAT_FD,
NULL),
(struct sockaddr *) &saddr_l, &addrsize) == 0)
{
if (iptostring(&saddr_l, addrsize,
localip, sizeof(localip)))
{
if (sasl_setprop(mci->mci_conn,
SASL_IPLOCALPORT,
localip) != SASL_OK)
return EX_TEMPFAIL;
}
}
}
# endif /* NETINET || NETINET6 */
/* start client side of sasl */
saslresult = sasl_client_start(mci->mci_conn, mci->mci_saslcap,
&client_interact,
&out, &outlen,
(const char **) &mechusing);
# else /* SASL >= 20000 */
/* external security strength factor, authentication id */
ssf.ssf = 0;
ssf.auth_id = NULL;
# if STARTTLS
out = macvalue(macid("{cert_subject}"), e);
if (out != NULL && *out != '\0')
ssf.auth_id = out;
out = macvalue(macid("{cipher_bits}"), e);
if (out != NULL && *out != '\0')
ssf.ssf = atoi(out);
# endif /* STARTTLS */
saslresult = sasl_setprop(mci->mci_conn, SASL_SSF_EXTERNAL, &ssf);
if (saslresult != SASL_OK)
return EX_TEMPFAIL;
# if NETINET
/* set local/remote ipv4 addresses */
if (mci->mci_out != NULL && CurHostAddr.sa.sa_family == AF_INET)
{
SOCKADDR_LEN_T addrsize;
struct sockaddr_in saddr_l;
if (sasl_setprop(mci->mci_conn, SASL_IP_REMOTE,
(struct sockaddr_in *) &CurHostAddr)
!= SASL_OK)
return EX_TEMPFAIL;
addrsize = sizeof(struct sockaddr_in);
if (getsockname(sm_io_getinfo(mci->mci_out, SM_IO_WHAT_FD,
NULL),
(struct sockaddr *) &saddr_l, &addrsize) == 0)
{
if (sasl_setprop(mci->mci_conn, SASL_IP_LOCAL,
&saddr_l) != SASL_OK)
return EX_TEMPFAIL;
}
}
# endif /* NETINET */
/* start client side of sasl */
saslresult = sasl_client_start(mci->mci_conn, mci->mci_saslcap,
NULL, &client_interact,
&out, &outlen,
(const char **) &mechusing);
# endif /* SASL >= 20000 */
if (saslresult != SASL_OK && saslresult != SASL_CONTINUE)
{
if (saslresult == SASL_NOMECH && LogLevel > 8)
{
sm_syslog(LOG_NOTICE, e->e_id,
"AUTH=client, available mechanisms=%s do not fulfill requirements", mci->mci_saslcap);
}
return EX_TEMPFAIL;
}
/* just point current mechanism to the data in the sasl library */
(*sai)[SASL_MECH] = mechusing;
/* send the info across the wire */
if (out == NULL
/* login and digest-md5 up to 1.5.28 set out="" */
|| (outlen == 0 &&
(sm_strcasecmp(mechusing, "LOGIN") == 0 ||
sm_strcasecmp(mechusing, "DIGEST-MD5") == 0))
)
{
/* no initial response */
smtpmessage("AUTH %s", m, mci, mechusing);
}
else if (outlen == 0)
{
/*
** zero-length initial response, per RFC 2554 4.:
** "Unlike a zero-length client answer to a 334 reply, a zero-
** length initial response is sent as a single equals sign"
*/
smtpmessage("AUTH %s =", m, mci, mechusing);
}
else
{
saslresult = sasl_encode64(out, outlen, in64, sizeof(in64),
NULL);
if (saslresult != SASL_OK) /* internal error */
{
if (LogLevel > 8)
sm_syslog(LOG_ERR, e->e_id,
"encode64 for AUTH failed");
return EX_TEMPFAIL;
}
smtpmessage("AUTH %s %s", m, mci, mechusing, in64);
}
# if SASL < 20000
sm_sasl_free(out); /* XXX only if no rpool is used */
# endif
/* get the reply */
smtpresult = reply(m, mci, e, TimeOuts.to_auth, getsasldata, NULL,
XS_AUTH);
for (;;)
{
/* check return code from server */
if (smtpresult == 235)
{
macdefine(&mci->mci_macro, A_TEMP, macid("{auth_type}"),
mechusing);
return EX_OK;
}
if (smtpresult == -1)
return EX_IOERR;
if (REPLYTYPE(smtpresult) == 5)
return EX_NOPERM; /* ugly, but ... */
if (REPLYTYPE(smtpresult) != 3)
{
/* should we fail deliberately, see RFC 2554 4. ? */
/* smtpmessage("*", m, mci); */
return EX_TEMPFAIL;
}
saslresult = sasl_client_step(mci->mci_conn,
mci->mci_sasl_string,
mci->mci_sasl_string_len,
&client_interact,
&out, &outlen);
if (saslresult != SASL_OK && saslresult != SASL_CONTINUE)
{
if (tTd(95, 5))
sm_dprintf("AUTH FAIL=%s (%d)\n",
sasl_errstring(saslresult, NULL, NULL),
saslresult);
/* fail deliberately, see RFC 2554 4. */
smtpmessage("*", m, mci);
/*
** but we should only fail for this authentication
** mechanism; how to do that?
*/
smtpresult = reply(m, mci, e, TimeOuts.to_auth,
getsasldata, NULL, XS_AUTH);
return EX_NOPERM;
}
if (outlen > 0)
{
saslresult = sasl_encode64(out, outlen, in64,
sizeof(in64), NULL);
if (saslresult != SASL_OK)
{
/* give an error reply to the other side! */
smtpmessage("*", m, mci);
return EX_TEMPFAIL;
}
}
else
in64[0] = '\0';
# if SASL < 20000
sm_sasl_free(out); /* XXX only if no rpool is used */
# endif
smtpmessage("%s", m, mci, in64);
smtpresult = reply(m, mci, e, TimeOuts.to_auth,
getsasldata, NULL, XS_AUTH);
}
/* NOTREACHED */
}
/*
** SMTPAUTH -- try to AUTHenticate
**
** This will try mechanisms in the order the sasl library decided until:
** - there are no more mechanisms
** - a mechanism succeeds
** - the sasl library fails initializing
**
** Parameters:
** m -- the mailer.
** mci -- the mailer connection info.
** e -- the envelope.
**
** Returns:
** EX_OK -- authentication was successful
** EX_UNAVAILABLE -- authentication not possible, e.g.,
** no data available.
** EX_NOPERM -- authentication failed.
** EX_TEMPFAIL -- temporary failure.
**
** Notice: AuthInfo is used for all connections, hence we must
** return EX_TEMPFAIL only if we really want to retry, i.e.,
** iff getauth() tempfailed or getauth() was used and
** authentication tempfailed.
*/
int
smtpauth(m, mci, e)
MAILER *m;
MCI *mci;
ENVELOPE *e;
{
int result;
int i;
bool usedgetauth;
mci->mci_sasl_auth = false;
for (i = 0; i < SASL_MECH ; i++)
mci->mci_sai[i] = NULL;
result = getauth(mci, e, &(mci->mci_sai));
if (result == EX_TEMPFAIL)
return result;
usedgetauth = true;
/* no data available: don't try to authenticate */
if (result == EX_OK && mci->mci_sai[SASL_AUTHID] == NULL)
return result;
if (result != EX_OK)
{
if (SASLInfo == NULL)
return EX_UNAVAILABLE;
/* read authinfo from file */
result = readauth(SASLInfo, true, &(mci->mci_sai),
mci->mci_rpool);
if (result != EX_OK)
return result;
usedgetauth = false;
}
/* check whether sufficient data is available */
if (mci->mci_sai[SASL_PASSWORD] == NULL ||
*(mci->mci_sai)[SASL_PASSWORD] == '\0')
return EX_UNAVAILABLE;
if ((mci->mci_sai[SASL_AUTHID] == NULL ||
*(mci->mci_sai)[SASL_AUTHID] == '\0') &&
(mci->mci_sai[SASL_USER] == NULL ||
*(mci->mci_sai)[SASL_USER] == '\0'))
return EX_UNAVAILABLE;
/* set the context for the callback function to sai */
# if SASL >= 20000
callbacks[CB_PASS_IDX].context = (void *) mci;
# else
callbacks[CB_PASS_IDX].context = (void *) &mci->mci_sai;
# endif
callbacks[CB_USER_IDX].context = (void *) &mci->mci_sai;
callbacks[CB_AUTHNAME_IDX].context = (void *) &mci->mci_sai;
callbacks[CB_GETREALM_IDX].context = (void *) &mci->mci_sai;
#if 0
callbacks[CB_SAFESASL_IDX].context = (void *) &mci->mci_sai;
#endif
/* set default value for realm */
if ((mci->mci_sai)[SASL_DEFREALM] == NULL)
(mci->mci_sai)[SASL_DEFREALM] = sm_rpool_strdup_x(e->e_rpool,
macvalue('j', CurEnv));
/* set default value for list of mechanism to use */
if ((mci->mci_sai)[SASL_MECHLIST] == NULL ||
*(mci->mci_sai)[SASL_MECHLIST] == '\0')
(mci->mci_sai)[SASL_MECHLIST] = AuthMechanisms;
/* create list of mechanisms to try */
mci->mci_saslcap = intersect((mci->mci_sai)[SASL_MECHLIST],
mci->mci_saslcap, mci->mci_rpool);
/* initialize sasl client library */
result = init_sasl_client();
if (result != SASL_OK)
return usedgetauth ? EX_TEMPFAIL : EX_UNAVAILABLE;
do
{
result = attemptauth(m, mci, e, &(mci->mci_sai));
if (result == EX_OK)
mci->mci_sasl_auth = true;
else if (result == EX_TEMPFAIL || result == EX_NOPERM)
{
mci->mci_saslcap = removemech((mci->mci_sai)[SASL_MECH],
mci->mci_saslcap,
mci->mci_rpool);
if (mci->mci_saslcap == NULL ||
*(mci->mci_saslcap) == '\0')
return usedgetauth ? result
: EX_UNAVAILABLE;
}
else
return result;
} while (result != EX_OK);
return result;
}
#endif /* SASL */
/*
** SMTPMAILFROM -- send MAIL command
**
** Parameters:
** m -- the mailer.
** mci -- the mailer connection structure.
** e -- the envelope (including the sender to specify).
*/
int
smtpmailfrom(m, mci, e)
MAILER *m;
MCI *mci;
ENVELOPE *e;
{
int r;
char *bufp;
char *bodytype;
char *enhsc;
char buf[MAXNAME + 1];
char optbuf[MAXLINE];
if (tTd(18, 2))
sm_dprintf("smtpmailfrom: CurHost=%s\n", CurHostName);
enhsc = NULL;
/*
** Check if connection is gone, if so
** it's a tempfail and we use mci_errno
** for the reason.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
#if _FFR_EAI
/*
** Abort right away if the message needs SMTPUTF8 and the
** server does not advertise SMTPUTF8.
*/
if (e->e_smtputf8 && !bitset(MCIF_EAI, mci->mci_flags)) {
usrerrenh("5.6.7", "%s does not support SMTPUTF8", CurHostName);
mci_setstat(mci, EX_NOTSTICKY, "5.6.7", NULL);
return EX_DATAERR;
}
#endif /* _FFR_EAI */
/* set up appropriate options to include */
if (bitset(MCIF_SIZE, mci->mci_flags) && e->e_msgsize > 0)
{
(void) sm_snprintf(optbuf, sizeof(optbuf), " SIZE=%ld",
e->e_msgsize);
bufp = &optbuf[strlen(optbuf)];
}
else
{
optbuf[0] = '\0';
bufp = optbuf;
}
#if _FFR_EAI
if (e->e_smtputf8) {
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" SMTPUTF8");
bufp += strlen(bufp);
}
#endif /* _FFR_EAI */
bodytype = e->e_bodytype;
if (bitset(MCIF_8BITMIME, mci->mci_flags))
{
if (bodytype == NULL &&
bitset(MM_MIME8BIT, MimeMode) &&
bitset(EF_HAS8BIT, e->e_flags) &&
!bitset(EF_DONT_MIME, e->e_flags) &&
!bitnset(M_8BITS, m->m_flags))
bodytype = "8BITMIME";
if (bodytype != NULL &&
SPACELEFT(optbuf, bufp) > strlen(bodytype) + 7)
{
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" BODY=%s", bodytype);
bufp += strlen(bufp);
}
}
else if (bitnset(M_8BITS, m->m_flags) ||
!bitset(EF_HAS8BIT, e->e_flags) ||
bitset(MCIF_8BITOK, mci->mci_flags))
{
/* EMPTY */
/* just pass it through */
}
#if MIME8TO7
else if (bitset(MM_CVTMIME, MimeMode) &&
!bitset(EF_DONT_MIME, e->e_flags) &&
(!bitset(MM_PASS8BIT, MimeMode) ||
bitset(EF_IS_MIME, e->e_flags)))
{
/* must convert from 8bit MIME format to 7bit encoded */
mci->mci_flags |= MCIF_CVT8TO7;
}
#endif /* MIME8TO7 */
else if (!bitset(MM_PASS8BIT, MimeMode))
{
/* cannot just send a 8-bit version */
extern char MsgBuf[];
usrerrenh("5.6.3", "%s does not support 8BITMIME", CurHostName);
mci_setstat(mci, EX_NOTSTICKY, "5.6.3", MsgBuf);
return EX_DATAERR;
}
if (bitset(MCIF_DSN, mci->mci_flags))
{
if (e->e_envid != NULL &&
SPACELEFT(optbuf, bufp) > strlen(e->e_envid) + 7)
{
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" ENVID=%s", e->e_envid);
bufp += strlen(bufp);
}
/* RET= parameter */
if (bitset(EF_RET_PARAM, e->e_flags) &&
SPACELEFT(optbuf, bufp) > 9)
{
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" RET=%s",
bitset(EF_NO_BODY_RETN, e->e_flags) ?
"HDRS" : "FULL");
bufp += strlen(bufp);
}
}
if (bitset(MCIF_AUTH, mci->mci_flags) && e->e_auth_param != NULL &&
SPACELEFT(optbuf, bufp) > strlen(e->e_auth_param) + 7
#if SASL
&& (!bitset(SASL_AUTH_AUTH, SASLOpts) || mci->mci_sasl_auth)
#endif
)
{
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" AUTH=%s", e->e_auth_param);
bufp += strlen(bufp);
}
/*
** 17 is the max length required, we could use log() to compute
** the exact length (and check IS_DLVR_TRACE())
*/
if (bitset(MCIF_DLVR_BY, mci->mci_flags) &&
IS_DLVR_BY(e) && SPACELEFT(optbuf, bufp) > 17)
{
long dby;
/*
** Avoid problems with delays (for R) since the check
** in deliver() whether min-deliver-time is sufficient.
** Alternatively we could pass the computed time to this
** function.
*/
dby = e->e_deliver_by - (curtime() - e->e_ctime);
if (dby <= 0 && IS_DLVR_RETURN(e))
dby = mci->mci_min_by <= 0 ? 1 : mci->mci_min_by;
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" BY=%ld;%c%s",
dby,
IS_DLVR_RETURN(e) ? 'R' : 'N',
IS_DLVR_TRACE(e) ? "T" : "");
bufp += strlen(bufp);
}
/*
** Send the MAIL command.
** Designates the sender.
*/
mci->mci_state = MCIS_MAIL;
if (bitset(EF_RESPONSE, e->e_flags) &&
!bitnset(M_NO_NULL_FROM, m->m_flags))
buf[0] = '\0';
else
expand("\201g", buf, sizeof(buf), e);
if (buf[0] == '<')
{
/* strip off <angle brackets> (put back on below) */
bufp = &buf[strlen(buf) - 1];
if (*bufp == '>')
*bufp = '\0';
bufp = &buf[1];
}
else
bufp = buf;
if (bitnset(M_LOCALMAILER, e->e_from.q_mailer->m_flags) ||
!bitnset(M_FROMPATH, m->m_flags))
{
smtpmessage("MAIL From:<%s>%s", m, mci, bufp, optbuf);
}
else
{
smtpmessage("MAIL From:<@%s%c%s>%s", m, mci, MyHostName,
*bufp == '@' ? ',' : ':', bufp, optbuf);
}
SmtpPhase = mci->mci_phase = "client MAIL";
sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_mail, NULL, &enhsc, XS_MAIL);
if (r < 0)
{
/* communications failure */
mci_setstat(mci, EX_TEMPFAIL, "4.4.2", NULL);
return EX_TEMPFAIL;
}
else if (r == SMTPCLOSING)
{
/* service shutting down: handled by reply() */
return EX_TEMPFAIL;
}
else if (REPLYTYPE(r) == 4)
{
mci_setstat(mci, EX_NOTSTICKY, ENHSCN(enhsc, smtptodsn(r)),
SmtpReplyBuffer);
return EX_TEMPFAIL;
}
else if (REPLYTYPE(r) == 2)
{
return EX_OK;
}
else if (r == 501)
{
/* syntax error in arguments */
mci_setstat(mci, EX_NOTSTICKY, ENHSCN(enhsc, "5.5.2"),
SmtpReplyBuffer);
return EX_DATAERR;
}
else if (r == 553)
{
/* mailbox name not allowed */
mci_setstat(mci, EX_NOTSTICKY, ENHSCN(enhsc, "5.1.3"),
SmtpReplyBuffer);
return EX_DATAERR;
}
else if (r == 552)
{
/* exceeded storage allocation */
mci_setstat(mci, EX_NOTSTICKY, ENHSCN(enhsc, "5.3.4"),
SmtpReplyBuffer);
if (bitset(MCIF_SIZE, mci->mci_flags))
e->e_flags |= EF_NO_BODY_RETN;
return EX_UNAVAILABLE;
}
else if (REPLYTYPE(r) == 5)
{
/* unknown error */
mci_setstat(mci, EX_NOTSTICKY, ENHSCN(enhsc, "5.0.0"),
SmtpReplyBuffer);
return EX_UNAVAILABLE;
}
if (LogLevel > 1)
{
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP MAIL protocol error: %s",
CurHostName,
shortenstring(SmtpReplyBuffer, 403));
}
/* protocol error -- close up */
mci_setstat(mci, EX_PROTOCOL, ENHSCN(enhsc, "5.5.1"),
SmtpReplyBuffer);
smtpquit(m, mci, e);
return EX_PROTOCOL;
}
/*
** SMTPRCPT -- designate recipient.
**
** Parameters:
** to -- address of recipient.
** m -- the mailer we are sending to.
** mci -- the connection info for this transaction.
** e -- the envelope for this transaction.
**
** Returns:
** exit status corresponding to recipient status.
**
** Side Effects:
** Sends the mail via SMTP.
*/
int
smtprcpt(to, m, mci, e, ctladdr, xstart)
ADDRESS *to;
register MAILER *m;
MCI *mci;
ENVELOPE *e;
ADDRESS *ctladdr;
time_t xstart;
{
char *bufp;
char optbuf[MAXLINE];
#if PIPELINING
/*
** If there is status waiting from the other end, read it.
** This should normally happen because of SMTP pipelining.
*/
while (mci->mci_nextaddr != NULL &&
sm_io_getinfo(mci->mci_in, SM_IO_IS_READABLE, NULL) > 0)
{
int r;
r = smtprcptstat(mci->mci_nextaddr, m, mci, e);
if (r != EX_OK)
{
markfailure(e, mci->mci_nextaddr, mci, r, false);
giveresponse(r, mci->mci_nextaddr->q_status, m, mci,
ctladdr, xstart, e, to);
}
mci->mci_nextaddr = mci->mci_nextaddr->q_pchain;
}
#endif /* PIPELINING */
/*
** Check if connection is gone, if so
** it's a tempfail and we use mci_errno
** for the reason.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
optbuf[0] = '\0';
bufp = optbuf;
/*
** Warning: in the following it is assumed that the free space
** in bufp is sizeof(optbuf)
*/
if (bitset(MCIF_DSN, mci->mci_flags))
{
if (IS_DLVR_NOTIFY(e) &&
!bitset(MCIF_DLVR_BY, mci->mci_flags))
{
/* RFC 2852: 4.1.4.2 */
if (!bitset(QHASNOTIFY, to->q_flags))
to->q_flags |= QPINGONFAILURE|QPINGONDELAY|QHASNOTIFY;
else if (bitset(QPINGONSUCCESS, to->q_flags) ||
bitset(QPINGONFAILURE, to->q_flags) ||
bitset(QPINGONDELAY, to->q_flags))
to->q_flags |= QPINGONDELAY;
}
/* NOTIFY= parameter */
if (bitset(QHASNOTIFY, to->q_flags) &&
bitset(QPRIMARY, to->q_flags) &&
!bitnset(M_LOCALMAILER, m->m_flags))
{
bool firstone = true;
(void) sm_strlcat(bufp, " NOTIFY=", sizeof(optbuf));
if (bitset(QPINGONSUCCESS, to->q_flags))
{
(void) sm_strlcat(bufp, "SUCCESS", sizeof(optbuf));
firstone = false;
}
if (bitset(QPINGONFAILURE, to->q_flags))
{
if (!firstone)
(void) sm_strlcat(bufp, ",",
sizeof(optbuf));
(void) sm_strlcat(bufp, "FAILURE", sizeof(optbuf));
firstone = false;
}
if (bitset(QPINGONDELAY, to->q_flags))
{
if (!firstone)
(void) sm_strlcat(bufp, ",",
sizeof(optbuf));
(void) sm_strlcat(bufp, "DELAY", sizeof(optbuf));
firstone = false;
}
if (firstone)
(void) sm_strlcat(bufp, "NEVER", sizeof(optbuf));
bufp += strlen(bufp);
}
/* ORCPT= parameter */
if (to->q_orcpt != NULL &&
SPACELEFT(optbuf, bufp) > strlen(to->q_orcpt) + 7)
{
(void) sm_snprintf(bufp, SPACELEFT(optbuf, bufp),
" ORCPT=%s", to->q_orcpt);
bufp += strlen(bufp);
}
}
smtpmessage("RCPT To:<%s>%s", m, mci, to->q_user, optbuf);
mci->mci_state = MCIS_RCPT;
SmtpPhase = mci->mci_phase = "client RCPT";
sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
CurHostName, mci->mci_phase);
#if PIPELINING
/*
** If running SMTP pipelining, we will pick up status later
*/
if (bitset(MCIF_PIPELINED, mci->mci_flags))
return EX_OK;
#endif /* PIPELINING */
return smtprcptstat(to, m, mci, e);
}
/*
** SMTPRCPTSTAT -- get recipient status
**
** This is only called during SMTP pipelining
**
** Parameters:
** to -- address of recipient.
** m -- mailer being sent to.
** mci -- the mailer connection information.
** e -- the envelope for this message.
**
** Returns:
** EX_* -- protocol status
*/
static int
smtprcptstat(to, m, mci, e)
ADDRESS *to;
MAILER *m;
register MCI *mci;
register ENVELOPE *e;
{
int r;
int save_errno;
char *enhsc;
/*
** Check if connection is gone, if so
** it's a tempfail and we use mci_errno
** for the reason.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
enhsc = NULL;
r = reply(m, mci, e, TimeOuts.to_rcpt, NULL, &enhsc, XS_RCPT);
save_errno = errno;
to->q_rstatus = sm_rpool_strdup_x(e->e_rpool, SmtpReplyBuffer);
to->q_status = ENHSCN_RPOOL(enhsc, smtptodsn(r), e->e_rpool);
if (!bitnset(M_LMTP, m->m_flags))
to->q_statmta = mci->mci_host;
if (r < 0 || REPLYTYPE(r) == 4)
{
mci->mci_retryrcpt = true;
errno = save_errno;
return EX_TEMPFAIL;
}
else if (REPLYTYPE(r) == 2)
{
char *t;
if ((t = mci->mci_tolist) != NULL)
{
char *p;
*t++ = ',';
for (p = to->q_paddr; *p != '\0'; *t++ = *p++)
continue;
*t = '\0';
mci->mci_tolist = t;
}
#if PIPELINING
mci->mci_okrcpts++;
#endif
return EX_OK;
}
else if (r == 550)
{
to->q_status = ENHSCN_RPOOL(enhsc, "5.1.1", e->e_rpool);
return EX_NOUSER;
}
else if (r == 551)
{
to->q_status = ENHSCN_RPOOL(enhsc, "5.1.6", e->e_rpool);
return EX_NOUSER;
}
else if (r == 553)
{
to->q_status = ENHSCN_RPOOL(enhsc, "5.1.3", e->e_rpool);
return EX_NOUSER;
}
else if (REPLYTYPE(r) == 5)
{
return EX_UNAVAILABLE;
}
if (LogLevel > 1)
{
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP RCPT protocol error: %s",
CurHostName,
shortenstring(SmtpReplyBuffer, 403));
}
mci_setstat(mci, EX_PROTOCOL, ENHSCN(enhsc, "5.5.1"),
SmtpReplyBuffer);
return EX_PROTOCOL;
}
/*
** SMTPDATA -- send the data and clean up the transaction.
**
** Parameters:
** m -- mailer being sent to.
** mci -- the mailer connection information.
** e -- the envelope for this message.
**
** Returns:
** exit status corresponding to DATA command.
*/
int
smtpdata(m, mci, e, ctladdr, xstart)
MAILER *m;
register MCI *mci;
register ENVELOPE *e;
ADDRESS *ctladdr;
time_t xstart;
{
register int r;
int rstat;
int xstat;
int timeout;
char *enhsc;
/*
** Check if connection is gone, if so
** it's a tempfail and we use mci_errno
** for the reason.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
enhsc = NULL;
/*
** Send the data.
** First send the command and check that it is ok.
** Then send the data (if there are valid recipients).
** Follow it up with a dot to terminate.
** Finally get the results of the transaction.
*/
/* send the command and check ok to proceed */
smtpmessage("DATA", m, mci);
#if PIPELINING
if (mci->mci_nextaddr != NULL)
{
char *oldto = e->e_to;
/* pick up any pending RCPT responses for SMTP pipelining */
while (mci->mci_nextaddr != NULL)
{
e->e_to = mci->mci_nextaddr->q_paddr;
r = smtprcptstat(mci->mci_nextaddr, m, mci, e);
if (r != EX_OK)
{
markfailure(e, mci->mci_nextaddr, mci, r,
false);
giveresponse(r, mci->mci_nextaddr->q_status, m,
mci, ctladdr, xstart, e,
mci->mci_nextaddr);
if (r == EX_TEMPFAIL)
mci->mci_nextaddr->q_state = QS_RETRY;
}
mci->mci_nextaddr = mci->mci_nextaddr->q_pchain;
}
e->e_to = oldto;
/*
** Connection might be closed in response to a RCPT command,
** i.e., the server responded with 421. In that case (at
** least) one RCPT has a temporary failure, hence we don't
** need to check mci_okrcpts (as it is done below) to figure
** out which error to return.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
}
#endif /* PIPELINING */
/* now proceed with DATA phase */
SmtpPhase = mci->mci_phase = "client DATA 354";
mci->mci_state = MCIS_DATA;
sm_setproctitle(true, e, "%s %s: %s",
qid_printname(e), CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_datainit, NULL, &enhsc, XS_DATA);
if (r < 0 || REPLYTYPE(r) == 4)
{
if (r >= 0)
smtpquit(m, mci, e);
errno = mci->mci_errno;
return EX_TEMPFAIL;
}
else if (REPLYTYPE(r) == 5)
{
smtprset(m, mci, e);
#if PIPELINING
if (mci->mci_okrcpts <= 0)
return mci->mci_retryrcpt ? EX_TEMPFAIL
: EX_UNAVAILABLE;
#endif
return EX_UNAVAILABLE;
}
else if (REPLYTYPE(r) != 3)
{
if (LogLevel > 1)
{
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP DATA-1 protocol error: %s",
CurHostName,
shortenstring(SmtpReplyBuffer, 403));
}
smtprset(m, mci, e);
mci_setstat(mci, EX_PROTOCOL, ENHSCN(enhsc, "5.5.1"),
SmtpReplyBuffer);
#if PIPELINING
if (mci->mci_okrcpts <= 0)
return mci->mci_retryrcpt ? EX_TEMPFAIL
: EX_PROTOCOL;
#endif
return EX_PROTOCOL;
}
#if PIPELINING
if (mci->mci_okrcpts > 0)
{
#endif
/*
** Set timeout around data writes. Make it at least large
** enough for DNS timeouts on all recipients plus some fudge
** factor. The main thing is that it should not be infinite.
*/
if (tTd(18, 101))
{
/* simulate a DATA timeout */
timeout = 10;
}
else
timeout = DATA_PROGRESS_TIMEOUT * 1000;
sm_io_setinfo(mci->mci_out, SM_IO_WHAT_TIMEOUT, &timeout);
/*
** Output the actual message.
*/
if (!(*e->e_puthdr)(mci, e->e_header, e, M87F_OUTER))
goto writeerr;
if (tTd(18, 101))
{
/* simulate a DATA timeout */
(void) sleep(2);
}
if (!(*e->e_putbody)(mci, e, NULL))
goto writeerr;
/*
** Cleanup after sending message.
*/
#if PIPELINING
}
#endif
#if _FFR_CATCH_BROKEN_MTAS
if (sm_io_getinfo(mci->mci_in, SM_IO_IS_READABLE, NULL) > 0)
{
/* terminate the message */
(void) sm_io_fprintf(mci->mci_out, SM_TIME_DEFAULT, ".%s",
m->m_eol);
if (TrafficLogFile != NULL)
(void) sm_io_fprintf(TrafficLogFile, SM_TIME_DEFAULT,
"%05d >>> .\n", (int) CurrentPid);
if (Verbose)
nmessage(">>> .");
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP DATA-1 protocol error: remote server returned response before final dot",
CurHostName);
mci->mci_errno = EIO;
mci->mci_state = MCIS_ERROR;
mci_setstat(mci, EX_PROTOCOL, "5.5.0", NULL);
smtpquit(m, mci, e);
return EX_PROTOCOL;
}
#endif /* _FFR_CATCH_BROKEN_MTAS */
if (sm_io_error(mci->mci_out))
{
/* error during processing -- don't send the dot */
mci->mci_errno = EIO;
mci->mci_state = MCIS_ERROR;
mci_setstat(mci, EX_IOERR, "4.4.2", NULL);
smtpquit(m, mci, e);
return EX_IOERR;
}
/* terminate the message */
if (sm_io_fprintf(mci->mci_out, SM_TIME_DEFAULT, "%s.%s",
bitset(MCIF_INLONGLINE, mci->mci_flags) ? m->m_eol : "",
m->m_eol) == SM_IO_EOF)
goto writeerr;
if (TrafficLogFile != NULL)
(void) sm_io_fprintf(TrafficLogFile, SM_TIME_DEFAULT,
"%05d >>> .\n", (int) CurrentPid);
if (Verbose)
nmessage(">>> .");
/* check for the results of the transaction */
SmtpPhase = mci->mci_phase = "client DATA status";
sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
CurHostName, mci->mci_phase);
if (bitnset(M_LMTP, m->m_flags))
return EX_OK;
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_EOM);
if (r < 0)
return EX_TEMPFAIL;
if (mci->mci_state == MCIS_DATA)
mci->mci_state = MCIS_OPEN;
xstat = EX_NOTSTICKY;
if (r == 452)
rstat = EX_TEMPFAIL;
else if (REPLYTYPE(r) == 4)
rstat = xstat = EX_TEMPFAIL;
else if (REPLYTYPE(r) == 2)
rstat = xstat = EX_OK;
else if (REPLYCLASS(r) != 5)
rstat = xstat = EX_PROTOCOL;
else if (REPLYTYPE(r) == 5)
rstat = EX_UNAVAILABLE;
else
rstat = EX_PROTOCOL;
mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)),
SmtpReplyBuffer);
if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
(r = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
r += 5;
else
r = 4;
e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[r]);
SmtpPhase = mci->mci_phase = "idle";
sm_setproctitle(true, e, "%s: %s", CurHostName, mci->mci_phase);
if (rstat != EX_PROTOCOL)
return rstat;
if (LogLevel > 1)
{
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP DATA-2 protocol error: %s",
CurHostName,
shortenstring(SmtpReplyBuffer, 403));
}
return rstat;
writeerr:
mci->mci_errno = errno;
mci->mci_state = MCIS_ERROR;
mci_setstat(mci, bitset(MCIF_NOTSTICKY, mci->mci_flags)
? EX_NOTSTICKY: EX_TEMPFAIL,
"4.4.2", NULL);
mci->mci_flags &= ~MCIF_NOTSTICKY;
/*
** If putbody() couldn't finish due to a timeout,
** rewind it here in the timeout handler. See
** comments at the end of putbody() for reasoning.
*/
if (e->e_dfp != NULL)
(void) bfrewind(e->e_dfp);
errno = mci->mci_errno;
syserr("+451 4.4.1 timeout writing message to %s", CurHostName);
smtpquit(m, mci, e);
return EX_TEMPFAIL;
}
/*
** SMTPGETSTAT -- get status code from DATA in LMTP
**
** Parameters:
** m -- the mailer to which we are sending the message.
** mci -- the mailer connection structure.
** e -- the current envelope.
**
** Returns:
** The exit status corresponding to the reply code.
*/
int
smtpgetstat(m, mci, e)
MAILER *m;
MCI *mci;
ENVELOPE *e;
{
int r;
int off;
int status, xstat;
char *enhsc;
enhsc = NULL;
/* check for the results of the transaction */
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DATA2);
if (r < 0)
return EX_TEMPFAIL;
xstat = EX_NOTSTICKY;
if (REPLYTYPE(r) == 4)
status = EX_TEMPFAIL;
else if (REPLYTYPE(r) == 2)
status = xstat = EX_OK;
else if (REPLYCLASS(r) != 5)
status = xstat = EX_PROTOCOL;
else if (REPLYTYPE(r) == 5)
status = EX_UNAVAILABLE;
else
status = EX_PROTOCOL;
if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
(off = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
off += 5;
else
off = 4;
e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[off]);
mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)), SmtpReplyBuffer);
if (LogLevel > 1 && status == EX_PROTOCOL)
{
sm_syslog(LOG_CRIT, e->e_id,
"%.100s: SMTP DATA-3 protocol error: %s",
CurHostName,
shortenstring(SmtpReplyBuffer, 403));
}
return status;
}
/*
** SMTPQUIT -- close the SMTP connection.
**
** Parameters:
** m -- a pointer to the mailer.
** mci -- the mailer connection information.
** e -- the current envelope.
**
** Returns:
** none.
**
** Side Effects:
** sends the final protocol and closes the connection.
*/
void
smtpquit(m, mci, e)
register MAILER *m;
register MCI *mci;
ENVELOPE *e;
{
bool oldSuprErrs = SuprErrs;
int rcode;
char *oldcurhost;
if (mci->mci_state == MCIS_CLOSED)
{
mci_close(mci, "smtpquit:1");
return;
}
oldcurhost = CurHostName;
CurHostName = mci->mci_host; /* XXX UGLY XXX */
if (CurHostName == NULL)
CurHostName = MyHostName;
#if PIPELINING
mci->mci_okrcpts = 0;
#endif
/*
** Suppress errors here -- we may be processing a different
** job when we do the quit connection, and we don't want the
** new job to be penalized for something that isn't it's
** problem.
*/
SuprErrs = true;
/* send the quit message if we haven't gotten I/O error */
if (mci->mci_state != MCIS_ERROR &&
mci->mci_state != MCIS_QUITING)
{
SmtpPhase = "client QUIT";
mci->mci_state = MCIS_QUITING;
smtpmessage("QUIT", m, mci);
(void) reply(m, mci, e, TimeOuts.to_quit, NULL, NULL, XS_QUIT);
SuprErrs = oldSuprErrs;
if (mci->mci_state == MCIS_CLOSED)
goto end;
}
/* now actually close the connection and pick up the zombie */
rcode = endmailer(mci, e, NULL);
if (rcode != EX_OK)
{
char *mailer = NULL;
if (mci->mci_mailer != NULL &&
mci->mci_mailer->m_name != NULL)
mailer = mci->mci_mailer->m_name;
/* look for naughty mailers */
sm_syslog(LOG_ERR, e->e_id,
"smtpquit: mailer%s%s exited with exit value %d",
mailer == NULL ? "" : " ",
mailer == NULL ? "" : mailer,
rcode);
}
SuprErrs = oldSuprErrs;
end:
CurHostName = oldcurhost;
return;
}
/*
** SMTPRSET -- send a RSET (reset) command
**
** Parameters:
** m -- a pointer to the mailer.
** mci -- the mailer connection information.
** e -- the current envelope.
**
** Returns:
** none.
**
** Side Effects:
** closes the connection if there is no reply to RSET.
*/
void
smtprset(m, mci, e)
register MAILER *m;
register MCI *mci;
ENVELOPE *e;
{
int r;
CurHostName = mci->mci_host; /* XXX UGLY XXX */
if (CurHostName == NULL)
CurHostName = MyHostName;
#if PIPELINING
mci->mci_okrcpts = 0;
#endif
/*
** Check if connection is gone, if so
** it's a tempfail and we use mci_errno
** for the reason.
*/
if (mci->mci_state == MCIS_CLOSED)
{
errno = mci->mci_errno;
return;
}
SmtpPhase = "client RSET";
smtpmessage("RSET", m, mci);
r = reply(m, mci, e, TimeOuts.to_rset, NULL, NULL, XS_DEFAULT);
if (r < 0)
return;
/*
** Any response is deemed to be acceptable.
** The standard does not state the proper action
** to take when a value other than 250 is received.
**
** However, if 421 is returned for the RSET, leave
** mci_state alone (MCIS_SSD can be set in reply()
** and MCIS_CLOSED can be set in smtpquit() if
** reply() gets a 421 and calls smtpquit()).
*/
if (mci->mci_state != MCIS_SSD && mci->mci_state != MCIS_CLOSED)
mci->mci_state = MCIS_OPEN;
else if (mci->mci_exitstat == EX_OK)
mci_setstat(mci, EX_TEMPFAIL, "4.5.0", NULL);
}
/*
** SMTPPROBE -- check the connection state
**
** Parameters:
** mci -- the mailer connection information.
**
** Returns:
** none.
**
** Side Effects:
** closes the connection if there is no reply to RSET.
*/
int
smtpprobe(mci)
register MCI *mci;
{
int r;
MAILER *m = mci->mci_mailer;
ENVELOPE *e;
extern ENVELOPE BlankEnvelope;
CurHostName = mci->mci_host; /* XXX UGLY XXX */
if (CurHostName == NULL)
CurHostName = MyHostName;
e = &BlankEnvelope;
SmtpPhase = "client probe";
smtpmessage("RSET", m, mci);
r = reply(m, mci, e, TimeOuts.to_miscshort, NULL, NULL, XS_DEFAULT);
if (REPLYTYPE(r) != 2)
smtpquit(m, mci, e);
return r;
}
/*
** REPLY -- read arpanet reply
**
** Parameters:
** m -- the mailer we are reading the reply from.
** mci -- the mailer connection info structure.
** e -- the current envelope.
** timeout -- the timeout for reads.
** pfunc -- processing function called on each line of response.
** If null, no special processing is done.
** enhstat -- optional, returns enhanced error code string (if set)
** rtype -- type of SmtpMsgBuffer: does it contains secret data?
**
** Returns:
** reply code it reads.
**
** Side Effects:
** flushes the mail file.
*/
int
reply(m, mci, e, timeout, pfunc, enhstat, rtype)
MAILER *m;
MCI *mci;
ENVELOPE *e;
time_t timeout;
void (*pfunc) __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
char **enhstat;
int rtype;
{
register char *bufp;
register int r;
bool firstline = true;
char junkbuf[MAXLINE];
static char enhstatcode[ENHSCLEN];
int save_errno;
/*
** Flush the output before reading response.
**
** For SMTP pipelining, it would be better if we didn't do
** this if there was already data waiting to be read. But
** to do it properly means pushing it to the I/O library,
** since it really needs to be done below the buffer layer.
*/
if (mci->mci_out != NULL)
(void) sm_io_flush(mci->mci_out, SM_TIME_DEFAULT);
if (tTd(18, 1))
{
char *what;
if (SmtpMsgBuffer[0] != '\0')
what = SmtpMsgBuffer;
else if (SmtpPhase != NULL && SmtpPhase[0] != '\0')
what = SmtpPhase;
else if (XS_GREET == rtype)
what = "greeting";
else
what = "unknown";
sm_dprintf("reply to %s\n", what);
}
/*
** Read the input line, being careful not to hang.
*/
bufp = SmtpReplyBuffer;
(void) set_tls_rd_tmo(timeout);
for (;;)
{
register char *p;
/* actually do the read */
if (e->e_xfp != NULL) /* for debugging */
(void) sm_io_flush(e->e_xfp, SM_TIME_DEFAULT);
/* if we are in the process of closing just give the code */
if (mci->mci_state == MCIS_CLOSED)
return SMTPCLOSING;
/* don't try to read from a non-existent fd */
if (mci->mci_in == NULL)
{
if (mci->mci_errno == 0)
mci->mci_errno = EBADF;
/* errors on QUIT should be ignored */
if (strncmp(SmtpMsgBuffer, "QUIT", 4) == 0)
{
errno = mci->mci_errno;
mci_close(mci, "reply:1");
return -1;
}
mci->mci_state = MCIS_ERROR;
smtpquit(m, mci, e);
errno = mci->mci_errno;
return -1;
}
if (mci->mci_out != NULL)
(void) sm_io_flush(mci->mci_out, SM_TIME_DEFAULT);
/* get the line from the other side */
p = sfgets(bufp, MAXLINE, mci->mci_in, timeout, SmtpPhase);
save_errno = errno;
mci->mci_lastuse = curtime();
if (p == NULL)
{
bool oldholderrs;
extern char MsgBuf[];
/* errors on QUIT should be ignored */
if (strncmp(SmtpMsgBuffer, "QUIT", 4) == 0)
{
mci_close(mci, "reply:2");
return -1;
}
/* if the remote end closed early, fake an error */
errno = save_errno;
if (errno == 0)
{
(void) sm_snprintf(SmtpReplyBuffer,
sizeof(SmtpReplyBuffer),
"421 4.4.1 Connection reset by %s",
CURHOSTNAME);
#ifdef ECONNRESET
errno = ECONNRESET;
#else
errno = EPIPE;
#endif
}
mci->mci_errno = errno;
oldholderrs = HoldErrs;
HoldErrs = true;
usrerr("451 4.4.1 reply: read error from %s",
CURHOSTNAME);
mci_setstat(mci, EX_TEMPFAIL, "4.4.2", MsgBuf);
/* if debugging, pause so we can see state */
if (tTd(18, 100))
(void) pause();
mci->mci_state = MCIS_ERROR;
smtpquit(m, mci, e);
#if XDEBUG
{
char wbuf[MAXLINE];
p = wbuf;
if (e->e_to != NULL)
{
(void) sm_snprintf(p,
SPACELEFT(wbuf, p),
"%s... ",
shortenstring(e->e_to, MAXSHORTSTR));
p += strlen(p);
}
(void) sm_snprintf(p, SPACELEFT(wbuf, p),
"reply(%.100s) during %s",
CURHOSTNAME, SmtpPhase);
checkfd012(wbuf);
}
#endif /* XDEBUG */
HoldErrs = oldholderrs;
errno = save_errno;
return -1;
}
fixcrlf(bufp, true);
/* EHLO failure is not a real error */
if (e->e_xfp != NULL && (bufp[0] == '4' ||
(bufp[0] == '5' && strncmp(SmtpMsgBuffer, "EHLO", 4) != 0)))
{
/* serious error -- log the previous command */
if (SmtpNeedIntro)
{
/* inform user who we are chatting with */
(void) sm_io_fprintf(CurEnv->e_xfp,
SM_TIME_DEFAULT,
"... while talking to %s:\n",
CURHOSTNAME);
SmtpNeedIntro = false;
}
if (SmtpMsgBuffer[0] != '\0')
{
(void) sm_io_fprintf(e->e_xfp,
SM_TIME_DEFAULT,
">>> %s\n",
(rtype == XS_STARTTLS)
? "STARTTLS dialogue"
: ((rtype == XS_AUTH)
? "AUTH dialogue"
: SmtpMsgBuffer));
SmtpMsgBuffer[0] = '\0';
}
/* now log the message as from the other side */
(void) sm_io_fprintf(e->e_xfp, SM_TIME_DEFAULT,
"<<< %s\n", bufp);
}
/* display the input for verbose mode */
if (Verbose)
nmessage("050 %s", bufp);
/* ignore improperly formatted input */
if (!ISSMTPREPLY(bufp))
continue;
if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
enhstat != NULL &&
extenhsc(bufp + 4, ' ', enhstatcode) > 0)
*enhstat = enhstatcode;
/* process the line */
if (pfunc != NULL)
(*pfunc)(bufp, firstline, m, mci, e);
/* decode the reply code */
r = atoi(bufp);
/* extra semantics: 0xx codes are "informational" */
if (r < 100)
{
firstline = false;
continue;
}
if (REPLYTYPE(r) > 3 && firstline
# if _FFR_PROXY
&&
(e->e_sendmode != SM_PROXY
|| (e->e_sendmode == SM_PROXY
&& (e->e_rcode == 0 || REPLYTYPE(e->e_rcode) < 5))
)
# endif
)
{
int o = -1;
# if PIPELINING
/*
** ignore error iff: DATA, 5xy error, but we had
** "retryable" recipients. XREF: smtpdata()
*/
if (!(rtype == XS_DATA && REPLYTYPE(r) == 5 &&
mci->mci_okrcpts <= 0 && mci->mci_retryrcpt))
# endif /* PIPELINING */
{
o = extenhsc(bufp + 4, ' ', enhstatcode);
if (o > 0)
{
sm_strlcpy(e->e_renhsc, enhstatcode,
sizeof(e->e_renhsc));
/* skip SMTP reply code, delimiters */
o += 5;
}
else
o = 4;
/*
** Don't use this for reply= logging
** if it was for QUIT.
** (Note: use the debug option to
** reproduce the original error.)
*/
if (rtype != XS_QUIT || tTd(87, 101))
{
e->e_rcode = r;
e->e_text = sm_rpool_strdup_x(
e->e_rpool, bufp + o);
}
}
if (tTd(87, 2))
{
sm_dprintf("user: e=%p, offset=%d, bufp=%s, rcode=%d, enhstat=%s, rtype=%d, text=%s\n"
, (void *)e, o, bufp, r, e->e_renhsc
, rtype, e->e_text);
}
}
firstline = false;
/* if no continuation lines, return this line */
if (bufp[3] != '-')
break;
/* first line of real reply -- ignore rest */
bufp = junkbuf;
}
/*
** Now look at SmtpReplyBuffer -- only care about the first
** line of the response from here on out.
*/
/* save temporary failure messages for posterity */
if (SmtpReplyBuffer[0] == '4')
(void) sm_strlcpy(SmtpError, SmtpReplyBuffer, sizeof(SmtpError));
/* reply code 421 is "Service Shutting Down" */
if (r == SMTPCLOSING && mci->mci_state != MCIS_SSD &&
mci->mci_state != MCIS_QUITING)
{
/* send the quit protocol */
mci->mci_state = MCIS_SSD;
smtpquit(m, mci, e);
}
return r;
}
/*
** SMTPMESSAGE -- send message to server
**
** Parameters:
** f -- format
** m -- the mailer to control formatting.
** a, b, c -- parameters
**
** Returns:
** none.
**
** Side Effects:
** writes message to mci->mci_out.
*/
/*VARARGS1*/
void
#ifdef __STDC__
smtpmessage(char *f, MAILER *m, MCI *mci, ...)
#else /* __STDC__ */
smtpmessage(f, m, mci, va_alist)
char *f;
MAILER *m;
MCI *mci;
va_dcl
#endif /* __STDC__ */
{
SM_VA_LOCAL_DECL
SM_VA_START(ap, mci);
(void) sm_vsnprintf(SmtpMsgBuffer, sizeof(SmtpMsgBuffer), f, ap);
SM_VA_END(ap);
if (tTd(18, 1) || Verbose)
nmessage(">>> %s", SmtpMsgBuffer);
if (TrafficLogFile != NULL)
(void) sm_io_fprintf(TrafficLogFile, SM_TIME_DEFAULT,
"%05d >>> %s\n", (int) CurrentPid,
SmtpMsgBuffer);
if (mci->mci_out != NULL)
{
(void) sm_io_fprintf(mci->mci_out, SM_TIME_DEFAULT, "%s%s",
SmtpMsgBuffer, m == NULL ? "\r\n"
: m->m_eol);
}
else if (tTd(18, 1))
{
sm_dprintf("smtpmessage: NULL mci_out\n");
}
}
| {
"pile_set_name": "Github"
} |
//
// SyncManager.swift
// Potatso
//
// Created by LEI on 8/2/16.
// Copyright © 2016 TouchingApp. All rights reserved.
//
import Foundation
import CloudKit
public enum SyncServiceType: String {
case None
case iCloud
}
public protocol SyncServiceProtocol {
func setup(_ completion: ((Error?) -> Void)?)
func sync(_ manually: Bool, completion: ((Error?) -> Void)?)
func stop()
}
open class SyncManager {
static let shared = SyncManager()
open static let syncServiceChangedNotification = "syncServiceChangedNotification"
fileprivate var services: [SyncServiceType: SyncServiceProtocol] = [:]
fileprivate static let serviceTypeKey = "serviceTypeKey"
fileprivate(set) var syncing = false
var currentSyncServiceType: SyncServiceType {
get {
if let raw = UserDefaults.standard.object(forKey: SyncManager.serviceTypeKey) as? String, let type = SyncServiceType(rawValue: raw) {
return type
}
return .None
}
set(new) {
guard currentSyncServiceType != new else {
return
}
getCurrentSyncService()?.stop()
UserDefaults.standard.set(new.rawValue, forKey: SyncManager.serviceTypeKey)
UserDefaults.standard.synchronize()
NotificationCenter.default.post(name: Notification.Name(rawValue: SyncManager.syncServiceChangedNotification), object: nil)
}
}
init() {
}
func getCurrentSyncService() -> SyncServiceProtocol? {
return getSyncService(forType: currentSyncServiceType)
}
func getSyncService(forType type: SyncServiceType) -> SyncServiceProtocol? {
if let service = services[type] {
return service
}
let s: SyncServiceProtocol
switch type {
case .iCloud:
s = ICloudSyncService()
default:
return nil
}
services[type] = s
return s
}
func showSyncVC(inVC vc:UIViewController? = nil) {
guard let currentVC = vc ?? UIApplication.shared.keyWindow?.rootViewController else {
return
}
let syncVC = SyncVC()
currentVC.show(syncVC, sender: self)
}
}
extension SyncManager {
func setupNewService(_ type: SyncServiceType, completion: ((Error?) -> Void)?) {
if let service = getSyncService(forType: type) {
service.setup(completion)
} else {
completion?(nil)
}
}
func setup(_ completion: ((Error?) -> Void)?) {
getCurrentSyncService()?.setup(completion)
}
func sync(_ manually: Bool = false, completion: ((Error?) -> Void)? = nil) {
if let service = getCurrentSyncService() {
syncing = true
NotificationCenter.default.post(name: Notification.Name(rawValue: SyncManager.syncServiceChangedNotification), object: nil)
service.sync(manually) { [weak self] error in
self?.syncing = false
NotificationCenter.default.post(name: Notification.Name(rawValue: SyncManager.syncServiceChangedNotification), object: nil)
completion?(error)
}
}
}
}
| {
"pile_set_name": "Github"
} |
#pragma once
#include <time.h>
#include <iostream>
#include <memory>
#include <vector>
#include "../common/record.h"
#include "data_loader.h"
#include "elf/base/context.h"
#include "elf/legacy/python_options_utils_cpp.h"
inline elf::shared::Options getNetOptions(
const ContextOptions& contextOptions,
const GameOptions& options) {
elf::shared::Options netOptions;
netOptions.addr =
options.server_addr == "" ? "localhost" : options.server_addr;
netOptions.port = options.port;
netOptions.use_ipv6 = true;
netOptions.verbose = options.verbose;
netOptions.identity = contextOptions.job_id;
return netOptions;
}
| {
"pile_set_name": "Github"
} |
TIMUS_1223
This is the EGGs puzzle. It was popular in the past, due to Google interviews for case eggs=2
Tutorial (Study all): https://brilliant.org/wiki/egg-dropping
You may go directly to solutions below first.
====
Solutions with Editorials below:
DP Solution
https://github.com/Otrebus/timus/blob/master/1223.cpp
https://github.com/achrafmam2/CompetitiveProgramming/blob/master/TIMUS/1223.cc
https://github.com/Omaar22/CompetitiveProgramming/blob/master/TIMUS/TIMUS%201223.cpp
Binary Search Solution
https://github.com/arvindr9/CompetitiveProgramming/blob/master/Timus/TIMUS%201223.cpp
====
Leet code has a similar problem, no need to solve
LEETCODE 375
====
Same version but tough constraints/strict time limit: SPOJ NPC2015E
Be careful from integer overflow
Discussion: http://codeforces.com/blog/entry/47686
Binary Search:
https://github.com/arvindr9/CompetitiveProgramming/blob/master/SPOJ/SPOJ%20NPC2015E.cpp
https://github.com/OmarHashim/Competitive-Programming/blob/master/SPOJ/NPC2015E.cpp
https://github.com/achrafmam2/CompetitiveProgramming/blob/master/SPOJ/NPC2015E.cc
| {
"pile_set_name": "Github"
} |
package simpledb_test
import (
"bytes"
"io/ioutil"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/simpledb"
)
var statusCodeErrorTests = []struct {
scode int
status string
code string
message string
}{
{301, "Moved Permanently", "MovedPermanently", "Moved Permanently"},
{403, "Forbidden", "Forbidden", "Forbidden"},
{400, "Bad Request", "BadRequest", "Bad Request"},
{404, "Not Found", "NotFound", "Not Found"},
{500, "Internal Error", "InternalError", "Internal Error"},
}
func TestStatusCodeError(t *testing.T) {
for _, test := range statusCodeErrorTests {
s := simpledb.New(unit.Session)
s.Handlers.Send.Clear()
s.Handlers.Send.PushBack(func(r *request.Request) {
body := ioutil.NopCloser(bytes.NewReader([]byte{}))
r.HTTPResponse = &http.Response{
ContentLength: 0,
StatusCode: test.scode,
Status: test.status,
Body: body,
}
})
_, err := s.CreateDomain(&simpledb.CreateDomainInput{
DomainName: aws.String("test-domain"),
})
assert.Error(t, err)
assert.Equal(t, test.code, err.(awserr.Error).Code())
assert.Equal(t, test.message, err.(awserr.Error).Message())
}
}
var responseErrorTests = []struct {
scode int
status string
code string
message string
requestID string
errors []struct {
code string
message string
}
}{
{
scode: 400,
status: "Bad Request",
code: "MissingError",
message: "missing error code in SimpleDB XML error response",
requestID: "101",
errors: []struct{ code, message string }{},
},
{
scode: 403,
status: "Forbidden",
code: "AuthFailure",
message: "AWS was not able to validate the provided access keys.",
requestID: "1111",
errors: []struct{ code, message string }{
{"AuthFailure", "AWS was not able to validate the provided access keys."},
},
},
{
scode: 500,
status: "Internal Error",
code: "MissingParameter",
message: "Message #1",
requestID: "8756",
errors: []struct{ code, message string }{
{"MissingParameter", "Message #1"},
{"InternalError", "Message #2"},
},
},
}
func TestResponseError(t *testing.T) {
for _, test := range responseErrorTests {
s := simpledb.New(unit.Session)
s.Handlers.Send.Clear()
s.Handlers.Send.PushBack(func(r *request.Request) {
xml := createXMLResponse(test.requestID, test.errors)
body := ioutil.NopCloser(bytes.NewReader([]byte(xml)))
r.HTTPResponse = &http.Response{
ContentLength: int64(len(xml)),
StatusCode: test.scode,
Status: test.status,
Body: body,
}
})
_, err := s.CreateDomain(&simpledb.CreateDomainInput{
DomainName: aws.String("test-domain"),
})
assert.Error(t, err)
assert.Equal(t, test.code, err.(awserr.Error).Code())
assert.Equal(t, test.message, err.(awserr.Error).Message())
if len(test.errors) > 0 {
assert.Equal(t, test.requestID, err.(awserr.RequestFailure).RequestID())
assert.Equal(t, test.scode, err.(awserr.RequestFailure).StatusCode())
}
}
}
// createXMLResponse constructs an XML string that has one or more error messages in it.
func createXMLResponse(requestID string, errors []struct{ code, message string }) []byte {
var buf bytes.Buffer
buf.WriteString(`<?xml version="1.0"?><Response><Errors>`)
for _, e := range errors {
buf.WriteString(`<Error><Code>`)
buf.WriteString(e.code)
buf.WriteString(`</Code><Message>`)
buf.WriteString(e.message)
buf.WriteString(`</Message></Error>`)
}
buf.WriteString(`</Errors><RequestID>`)
buf.WriteString(requestID)
buf.WriteString(`</RequestID></Response>`)
return buf.Bytes()
}
| {
"pile_set_name": "Github"
} |
# MIT License
#
# Copyright (c) 2015-2020 Iakiv Kramarenko
#
# 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.
from __future__ import annotations
import warnings
from abc import abstractmethod, ABC
from typing import TypeVar, Union, List, Dict, Any, Callable
from selenium.webdriver import ActionChains
from selenium.webdriver.android.webdriver import WebDriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.remote.switch_to import SwitchTo
from selenium.webdriver.remote.webelement import WebElement
from selene.common.fp import pipe
from selene.core.configuration import Config
from selene.core.wait import Wait, Command, Query
from selene.core.condition import Condition
from selene.core.locator import Locator
from selene.common.helpers import to_by, flatten, is_absolute_url
from selene.core.exceptions import TimeoutException
E = TypeVar('E', bound='Assertable')
R = TypeVar('R')
class Assertable(ABC):
@abstractmethod
def should(self, condition: Condition[E]) -> E:
pass
# todo: try as Matchable(ABC) and check if autocomplete will still work
class Matchable(Assertable):
@abstractmethod
def wait_until(self, condition: Condition[E]) -> bool:
pass
@abstractmethod
def matching(self, condition: Condition[E]) -> bool:
pass
class Configured(ABC):
@property
@abstractmethod
def config(self) -> Config:
pass
class WaitingEntity(Matchable, Configured):
def __init__(self, config: Config):
self._config = config
@property
def wait(self) -> Wait[E]:
return self.config.wait(self)
def perform(self, command: Command[E]) -> E:
"""Useful to call external commands.
Commands might be predefined in Selene:
element.perform(command.js.scroll_into_view)
or some custom defined by selene user:
element.perform(my_action.triple_click)
You might think that it will be useful to use these methods also in Selene internally
in order to define built in commands e.g. in Element class, like:
def click(self):
return self.perform(Command('click', lambda element: element().click()))
instead of:
def click(self):
self.wait.for_(Command('click', lambda element: element().click()))
return self
But so far, we use the latter version - though, less concise, but more explicit,
making it more obvious that waiting is built in;)
"""
self.wait.for_(command)
return self
# todo: what about `entity[query.something]` syntax over or in addition to `entity.get(query.something)` ?
def get(self, query: Query[E, R]) -> R:
return self.wait.for_(query)
# --- Configured --- #
@property
def config(self) -> Config:
return self._config
# --- Assertable --- #
def should(self, condition: Condition[E]) -> E:
self.wait.for_(condition)
return self
# --- Matchable --- #
def wait_until(self, condition: Condition[E]) -> bool:
return self.wait.until(condition)
def matching(self, condition: Condition[E]) -> bool:
return condition.predicate(self)
class Element(WaitingEntity):
@staticmethod
def _log_webelement_outer_html_for(element: Element) -> Callable[[TimeoutException], Exception]:
def log_webelement_outer_html(error: TimeoutException) -> Exception:
from selene.core import query
from selene.core.match import element_is_present
cached = element.cached
if cached.matching(element_is_present):
return TimeoutException(
error.msg +
f'\nActual webelement: {query.outer_html(element)}')
else:
return error
return log_webelement_outer_html
# todo: should we move locator based init and with_ to Located base abstract class?
def __init__(self, locator: Locator[WebElement], config: Config):
self._locator = locator
super().__init__(config)
# --- Configured --- #
def with_(self, config: Config = None, **config_as_kwargs) -> Element:
return Element(self._locator, self.config.with_(config, **config_as_kwargs))
# --- Located --- #
def __str__(self):
return str(self._locator)
def __call__(self) -> WebElement:
return self._locator()
# --- WaitingEntity --- #
@property
def wait(self) -> Wait[E]: # todo: will not it break code like browser.with_(timeout=...)?
# todo: fix that will disable/break shared hooks (snapshots)
# return Wait(self, # todo: isn't it slower to create it each time from scratch? move to __init__?
# at_most=self.config.timeout,
# or_fail_with=pipe(
# Element._log_webelement_outer_html_for(self),
# self.config.hook_wait_failure))
return super().wait.or_fail_with(pipe(
Element._log_webelement_outer_html_for(self),
super().wait.hook_failure))
@property
def cached(self) -> Element: # todo: do we need caching ? with lazy save of webelement to cache
cache = None
error = None
try:
cache = self()
except Exception as e:
error = e
def get_webelement():
if cache:
return cache
raise error
return Element(Locator(f'{self}.cached',
lambda: get_webelement()),
self.config)
# --- Relative location --- #
def element(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
by = to_by(css_or_xpath_or_by)
return Element(
Locator(f'{self}.element({by})',
lambda: self().find_element(*by)),
self.config)
def all(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
by = to_by(css_or_xpath_or_by)
return Collection(
Locator(f'{self}.all({by})',
lambda: self().find_elements(*by)),
self.config)
# --- Commands --- #
def execute_script(self, script_on_self: str, *extra_args):
driver: WebDriver = self.config.driver
webelement = self()
# todo: should we wrap it in wait or not?
return driver.execute_script(script_on_self, webelement, *extra_args)
def set_value(self, value: Union[str, int]) -> Element:
# todo: should we move all commands like following or queries like in conditions - to separate py modules?
# todo: should we make them webelement based (Callable[[WebElement], None]) instead of element based?
def fn(element: Element):
webelement = element()
webelement.clear() # todo: change to impl based not on clear, because clear generates post-events...
webelement.send_keys(str(value))
from selene.core import command
self.wait.for_(command.js.set_value(value) if self.config.set_value_by_js
else Command(f'set value: {value}', fn))
# todo: consider returning self.cached, since after first successful call,
# all next ones should normally pass
# no waiting will be needed normally
# if yes - then we should pass fn commands to wait.for_ so the latter will return webelement to cache
# also it will make sense to make this behaviour configurable...
return self
def type(self, text: Union[str, int]) -> Element:
# todo: do we need a separate send_keys method?
def fn(element: Element):
webelement = element()
webelement.send_keys(str(text))
from selene.core import command
self.wait.for_(command.js.type(text) if self.config.type_by_js
else Command(f'type: {text}', fn))
return self
def press(self, *keys) -> Element:
self.wait.command(f'press keys: {keys}', lambda element: element().send_keys(*keys))
return self
def press_enter(self) -> Element:
return self.press(Keys.ENTER)
def press_escape(self) -> Element:
return self.press(Keys.ESCAPE)
def press_tab(self) -> Element:
return self.press(Keys.TAB)
def clear(self) -> Element:
self.wait.command('clear', lambda element: element().clear())
return self
def submit(self) -> Element:
self.wait.command('submit', lambda element: element().submit())
return self
# todo: do we need config.click_by_js?
# todo: add offset args with defaults, or add additional method, think on what is better
def click(self) -> Element:
"""Just a normal click:)
You might ask, why don't we have config.click_by_js?
Because making all clicks js based is not a "normal case".
You might need to speed up all "set value" in your tests, but command.js.click will not speed up anything.
Yet, sometimes, it might be useful as workaround.
In such cases - use
element.perform(command.js.click)
to achieve the goal in less concise way,
thus, identifying by this "awkwardness" that it is really a workaround;)
"""
self.wait.command('click', lambda element: element().click())
return self
def double_click(self) -> Element:
actions: ActionChains = ActionChains(self.config.driver)
self.wait.command('double click', lambda element: actions.double_click(element()).perform())
return self
def context_click(self) -> Element:
actions: ActionChains = ActionChains(self.config.driver)
self.wait.command('context click', lambda element: actions.context_click(element()).perform())
return self
def hover(self) -> Element:
actions: ActionChains = ActionChains(self.config.driver)
self.wait.command('hover', lambda element: actions.move_to_element(element()).perform())
return self
# todo: should we reflect queries as self methods? or not...
# pros: faster to query element attributes
# cons: queries are not test oriented. test is steps + asserts
# so queries will be used only occasionally, then why to make a heap from Element?
# hence, occasionally it's enough to have them called as
# query.outer_html(element) # non-waiting version
# or
# element.get(query.outer_html) # waiting version
# def outer_html(self) -> str:
# return self.wait.for_(query.outer_html)
# --- Assertable --- #
# we need this method here in order to make autocompletion work...
# unfortunately the "base class" version is not enough
def should(self, condition: Condition[Element], timeout: int = None) -> Element:
if timeout:
warnings.warn(
"using timeout argument is deprecated; "
"use `browser.element('#foo').with_(Config(timeout=6)).should(be.enabled)`"
"or just `...with_(timeout=6).should(...` style instead",
DeprecationWarning)
return self.with_(Config(timeout=timeout)).should(condition)
super().should(condition)
return self
# --- Deprecated --- #
def get_actual_webelement(self) -> WebElement:
warnings.warn(
"considering to be deprecated; use element as callable instead, like: browser.element('#foo')()",
PendingDeprecationWarning)
return self()
def caching(self) -> Element:
warnings.warn("deprecated; use `cached` property instead: browser.element('#foo').cached", DeprecationWarning)
return self.cached
def s(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
# warnings.warn(
# "consider using more explicit `element` instead: browser.element('#foo').element('.bar')",
# SyntaxWarning)
return self.element(css_or_xpath_or_by)
def find(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
warnings.warn(
"deprecated; consider using `element` instead: browser.element('#foo').element('.bar')",
DeprecationWarning)
return self.element(css_or_xpath_or_by)
def ss(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
# warnings.warn(
# "consider using `all` instead: browser.element('#foo').all('.bar')",
# SyntaxWarning)
return self.all(css_or_xpath_or_by)
def find_all(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn(
"deprecated; consider using `all` instead: browser.element('#foo').all('.bar')",
DeprecationWarning)
return self.all(css_or_xpath_or_by)
def elements(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn(
"deprecated; consider using `all` instead: browser.element('#foo').all('.bar')",
DeprecationWarning)
return self.all(css_or_xpath_or_by)
@property
def parent_element(self):
warnings.warn(
"considering to deprecate because such impl makes less sens for mobile automation; "
"consider using corresponding xpath instead if you really need it for web:"
"browser.element('#foo').element('..')",
PendingDeprecationWarning)
return self.element('..')
@property
def following_sibling(self):
warnings.warn(
"considering to deprecate because such impl makes less sens for mobile automation; "
"consider using corresponding xpath instead if you really need it for web:"
"browser.element('#foo').element('./following-sibling::*')",
PendingDeprecationWarning)
return self.element('./following-sibling::*')
@property
def first_child(self):
warnings.warn(
"considering to deprecate because such impl makes less sens for mobile automation; "
"consider using corresponding xpath instead if you really need it for web: "
"browser.element('#foo').element('./*[1]')",
PendingDeprecationWarning)
return self.element('./*[1]')
def assure(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method instead: browser.element('#foo').should(be.enabled)",
DeprecationWarning)
return self.should(condition, timeout)
def should_be(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `be.*` style conditions instead: "
"browser.element('#foo').should(be.enabled)",
DeprecationWarning)
return self.should(condition, timeout)
def should_have(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `have.*` style conditions instead: "
"browser.element('#foo').should(have.text('bar')",
DeprecationWarning)
return self.should(condition, timeout)
def should_not(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.element('#foo').should(be.not_.enabled).should(have.no.css_class('bar')`, "
"you also can build your own inverted conditions by: `not_ok = Condition.as_not(have.text('Ok'))`",
DeprecationWarning)
return self.should(condition, timeout)
def assure_not(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.element('#foo').should(be.not_.enabled).should(have.no.css_class('bar')`, "
"you also can build your own inverted conditions by: `not_ok = Condition.as_not(have.text('Ok'))`",
DeprecationWarning)
return self.should(condition, timeout)
def should_not_be(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.element('#foo').should(be.not_.enabled).should(have.no.css_class('bar')`, "
"you also can build your own inverted conditions by: `not_ok = Condition.as_not(have.text('Ok'))`",
DeprecationWarning)
return self.should(condition, timeout)
def should_not_have(self, condition: ElementCondition, timeout=None) -> Element:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.element('#foo').should(be.not_.enabled).should(have.no.css_class('bar')`, "
"you also can build your own inverted conditions by: `not_ok = Condition.as_not(have.text('Ok'))`",
DeprecationWarning)
return self.should(condition, timeout)
def set(self, value: Union[str, int]) -> Element:
warnings.warn(
"deprecated; use `set_value` method instead",
DeprecationWarning)
return self.set_value(value)
def scroll_to(self):
warnings.warn(
"deprecated; use `browser.element('#foo').perform(command.js.scroll_into_view)` style instead",
DeprecationWarning)
from selene.core import command
self.perform(command.js.scroll_into_view)
return self
def press_down(self):
warnings.warn(
"deprecated; use `browser.element('#foo').type(Keys.ARROW_DOWN)` style instead",
DeprecationWarning)
return self.type(Keys.ARROW_DOWN)
def find_element(self, by=By.ID, value=None):
self.wait.command('find element', lambda element: element().find_element(by, value))
return self
def find_elements(self, by=By.ID, value=None):
self.wait.command('find elements', lambda element: element().find_elements(by, value))
return self
def send_keys(self, *value) -> Element:
warnings.warn(
"send_keys is deprecated because the name is not user-oriented in context of web ui e2e tests; "
"use `type` for 'typing text', press(*key) or press_* for 'pressing keys' methods instead",
DeprecationWarning)
self.wait.command('send keys', lambda element: element().send_keys(*value))
return self
@property
def tag_name(self) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.tag_name)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.tag)
@property
def text(self) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.text)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.text)
def attribute(self, name: str) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.attribute('name'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.attribute(name))
def js_property(self, name: str) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.js_property('name'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.js_property(name))
def value_of_css_property(self, name: str) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.css_property('name'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.css_property(name))
def get_attribute(self, name: str) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.attribute('name'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.attribute(name))
def get_property(self, name: str) -> str:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.js_property('name'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.js_property(name))
def is_selected(self) -> bool:
warnings.warn(
"deprecated; use `browser.element('#foo').matching(be.selected)` style instead",
DeprecationWarning)
from selene.support.conditions import be
return self.matching(be.selected)
def is_enabled(self):
warnings.warn(
"deprecated; use `browser.element('#foo').matching(be.enabled)` style instead",
DeprecationWarning)
from selene.support.conditions import be
return self.matching(be.enabled)
def is_displayed(self):
warnings.warn(
"deprecated; use `browser.element('#foo').matching(be.visible)` style instead",
DeprecationWarning)
from selene.support.conditions import be
return self.matching(be.visible)
@property
def location(self) -> Dict[str, int]:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.location)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.location)
@property
def location_once_scrolled_into_view(self) -> Dict[str, int]:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.location_once_scrolled_into_view)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.location_once_scrolled_into_view)
@property
def size(self) -> Dict[str, Any]:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.size)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.size)
@property
def rect(self) -> Dict[str, Any]:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.rect)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.rect)
@property
def screenshot_as_base64(self) -> Any:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.screenshot_as_base64)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.screenshot_as_base64)
@property
def screenshot_as_png(self) -> Any:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.screenshot_as_base64)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.screenshot_as_png)
def screenshot(self, filename: str) -> bool:
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.screenshot('filename'))` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.screenshot(filename))
@property
def parent(self):
warnings.warn(
"deprecated; use `browser.element('#foo').config.driver` style for the majority of cases",
DeprecationWarning)
return self.get(Query('parent search context', lambda element: element().parent))
@property
def id(self):
warnings.warn(
"deprecated; use `browser.element('#foo').get(query.internal_id)` style instead",
DeprecationWarning)
from selene.core import query
return self.get(query.internal_id)
class SeleneElement(Element): # todo: consider deprecating this name
pass
class Collection(WaitingEntity):
def __init__(self, locator: Locator[List[WebElement]], config: Config):
self._locator = locator
super().__init__(config)
def with_(self, config: Config = None, **config_as_kwargs) -> Collection:
return Collection(self._locator, self.config.with_(config, **config_as_kwargs))
def __str__(self):
return str(self._locator)
def __call__(self) -> List[WebElement]:
return self._locator()
@property
def cached(self) -> Collection:
webelements = self()
return Collection(Locator(f'{self}.cached', lambda: webelements), self.config)
def __iter__(self):
i = 0
cached = self.cached
while i < len(cached()):
element = cached[i]
yield element
i += 1
def __len__(self):
from selene.core import query
return self.get(query.size)
# todo: add config.index_collection_from_1, disabled by default
def element(self, index: int) -> Element:
def find() -> WebElement:
webelements = self()
length = len(webelements)
if length <= index:
raise AssertionError(
f'Cannot get element with index {index} ' +
f'from webelements collection with length {length}')
return webelements[index]
return Element(Locator(f'{self}[{index}]', find), self.config)
@property
def first(self):
"""
in the past you used .first() was a method, now it's a property: .first
probably when migrating to 2.* your code was broken here with an attribute error.
just change .first() to .first everywhere in you code base;)
"""
return self.element(0)
def sliced(self, start: int, stop: int, step: int = 1) -> Collection:
def find() -> List[WebElement]:
webelements = self()
# todo: assert length according to provided start, stop...
return webelements[start:stop:step]
return Collection(Locator(f'{self}[{start}:{stop}:{step}]', find), self.config)
def __getitem__(self, index_or_slice: Union[int, slice]) -> Union[Element, Collection]:
if isinstance(index_or_slice, slice):
return self.sliced(index_or_slice.start, index_or_slice.stop, index_or_slice.step)
return self.element(index_or_slice)
def from_(self, start: int) -> Collection:
return self[start:]
def to(self, stop: int) -> Collection:
return self[:stop]
def filtered_by(self,
condition: Union[
Condition[Element],
Callable[[E], None]]) -> Collection:
condition = condition if isinstance(condition, Condition) \
else Condition(str(condition), condition)
return Collection(
Locator(f'{self}.filtered_by({condition})',
lambda: [element() for element in self.cached if element.matching(condition)]),
self.config)
def filtered_by_their(
self,
selector_or_callable: Union[str,
tuple,
Callable[[Element], Element]],
condition: Condition[Element]) -> Collection:
"""
:param selector_or_callable:
- selector may be a str with css/xpath selector or tuple with by.* locator
- callable should be a function on element that returns element
:param condition: a condition to
:return: collection subset with inner/relative element matching condition
GIVEN html elements somewhere in DOM::
.result
.result-title
.result-url
.result-snippet
THEN::
browser.all('.result')\
.filtered_by_their('.result-title', have.text('Selene'))\
.should(have.size(3))
... is a shortcut for::
browser.all('.result')\
.filtered_by_their(lambda it: have.text(text)(it.element('.result-title')))\
.should(have.size(3))
OR with PageObject:
THEN::
results.element_by_its(lambda it: Result(it).title, have.text(text))\
.should(have.size(3))
Shortcut for::
results.element_by(lambda it: have.text(text)(Result(it).title))\
.should(have.size(3))
WHERE::
results = browser.all('.result')
class Result:
def __init__(self, element):
self.element = element
self.title = self.element.element('.result-title')
self.url = self.element.element('.result-url')
# ...
"""
warnings.warn(
'filtered_by_their is experimental; might be renamed or removed in future',
FutureWarning)
def find_in(parent: Element):
if callable(selector_or_callable):
return selector_or_callable(parent)
else:
return parent.element(selector_or_callable)
return self.filtered_by(lambda it: condition(find_in(it)))
def element_by(self,
condition: Union[
Condition[Element],
Callable[[E], None]]) -> Element:
# todo: In the implementation below...
# We use condition in context of "matching", i.e. as a predicate...
# why then not accept Callable[[E], bool] also?
# (as you remember, Condition is Callable[[E], None] throwing Error)
# This will allow the following code be possible
# results.element_by(lambda it:
# Result(it).title.matching(have.text(text)))
# instead of:
# results.element_by(lambda it: have.text(text)(
# Result(it).title))
# in addition to:
# results.element_by_its(lambda it:
# Result(it).title, have.text(text))
# Open Points:
# - do we need element_by_its, if we allow Callable[[E], bool] ?
# - if we add elements_by_its, do we need then to accept Callable[[E], bool] ?
# - probably... Callable[[E], bool] will lead to worse error messages,
# in such case we ignore thrown error's message
# - hm... ut seems like we nevertheless ignore it...
# we use element.matching(condition) below
condition = condition if isinstance(condition, Condition) \
else Condition(str(condition), condition)
def find() -> WebElement:
cached = self.cached
for element in cached:
if element.matching(condition):
return element()
from selene.core import query
outer_htmls = [query.outer_html(element) for element in cached]
raise AssertionError(
f'\n\tCannot find element by condition «{condition}» '
f'\n\tAmong {self}'
f'\n\tActual webelements collection:'
f'\n\t{outer_htmls}') # todo: isn't it better to print it all the time via hook, like for Element?
return Element(Locator(f'{self}.element_by({condition})', find), self.config)
def element_by_its(
self,
selector_or_callable: Union[str,
tuple,
Callable[[Element], Element]],
condition: Condition[Element]) -> Element:
"""
:param selector_or_callable:
- selector may be a str with css/xpath selector or tuple with by.* locator
- callable should be a function on element that returns element
:param condition: a condition to
:return: element from collection that has inner/relative element matching condition
GIVEN html elements somewhere in DOM::
.result
.result-title
.result-url
.result-snippet
THEN::
browser.all('.result')\
.element_by_its('.result-title', have.text(text))\
.element('.result-url').click()
... is a shortcut for::
browser.all('.result')\
.element_by(lambda it: have.text(text)(it.element('.result-title')))\
.element('.result-url').click()
OR with PageObject:
THEN::
Result(results.element_by_its(lambda it: Result(it).title, have.text(text)))\
.url.click()
Shortcut for::
Result(results.element_by(lambda it: have.text(text)(Result(it).title)))\
.url.click()
WHERE::
results = browser.all('.result')
class Result:
def __init__(self, element):
self.element = element
self.title = self.element.element('.result-title')
self.url = self.element.element('.result-url')
# ...
"""
# todo: main questions to answer before removing warning:
# - isn't it enough to allow Callable[[Element], bool] as condition?
# browser.all('.result').element_by(
# lambda it: it.element('.result-title').matching(have.text('browser tests in Python')))
# .element('.result-url').click()
# - how to improve error messages in case we pass lambda (not a fun with good name/str repr)?
# - what about accepting collection condition? should we allow it?
warnings.warn(
'element_by_its is experimental; might be renamed or removed in future',
FutureWarning)
def find_in(parent: Element):
if callable(selector_or_callable):
return selector_or_callable(parent)
else:
return parent.element(selector_or_callable)
return self.element_by(lambda it: condition(find_in(it)))
# todo: consider adding ss alias
def all(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn('might be renamed or deprecated in future; '
'all is actually a shortcut for collected(lambda element: element.all(selector)...'
'but we also have all_first and...'
'it is yet unclear what name would be best for all_first as addition to all... '
'all_first might confuse with all(...).first... I mean: '
'all_first(selector) is actually '
'collected(lambda e: e.element(selector)) '
'but it is not the same as '
'all(selector).first '
'that is collected(lambda e: e.all(selector)).first ... o_O ', FutureWarning)
by = to_by(css_or_xpath_or_by)
# todo: consider implement it through calling self.collected
# because actually the impl is self.collected(lambda element: element.all(selector))
return Collection(
Locator(f'{self}.all({by})',
lambda: flatten([webelement.find_elements(*by) for webelement in self()])),
self.config)
# todo: consider adding s alias
def all_first(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn('might be renamed or deprecated in future; '
'it is yet unclear what name would be best... '
'all_first might confuse with all(...).first... I mean: '
'all_first(selector) is actually '
'collected(lambda e: e.element(selector)) '
'but it is not the same as '
'all(selector).first '
'that is collected(lambda e: e.all(selector)).first ... o_O ', FutureWarning)
by = to_by(css_or_xpath_or_by)
# todo: consider implement it through calling self.collected
# because actually the impl is self.collected(lambda element: element.element(selector))
return Collection(
Locator(f'{self}.all_first({by})',
lambda: [webelement.find_element(*by) for webelement in self()]),
self.config)
def collected(self, finder: Callable[[Element], Union[Element, Collection]]) -> Collection:
# todo: consider adding predefined queries to be able to write
# collected(query.element(selector))
# over
# collected(lambda element: element.element(selector))
# and
# collected(query.all(selector))
# over
# collected(lambda element: element.all(selector))
# consider also putting such element builders like to find.* module instead of query.* module
# because they are not supposed to be used in entity.get(*) context defined for other query.* fns
return Collection(
Locator(f'{self}.collected({finder})', # todo: consider skipping None while flattening
lambda: flatten([finder(element)() for element in self.cached])),
self.config)
# --- Assertable --- #
def should(self, condition: Union[Condition[Collection], Condition[Element]], timeout: int = None) -> Collection:
if isinstance(condition, ElementCondition):
# todo: consider deprecating... makes everything too complicated...
for element in self:
if timeout:
warnings.warn(
"using timeout argument is deprecated; "
"use `browser.all('.foo').with_(Config(timeout=6)).should(have.size(0))`"
"or just `...with_(timeout=6).should(...` style instead",
DeprecationWarning)
element.with_(Config(timeout=timeout)).should(condition)
element.should(condition)
else:
if timeout:
warnings.warn(
"using timeout argument is deprecated; "
"use `browser.all('.foo').with_(Config(timeout=6)).should(have.size(0))` "
"or just `...with_(timeout=6).should(...` style instead",
DeprecationWarning)
self.with_(Config(timeout=timeout)).should(condition)
super().should(condition)
return self
# --- Deprecated --- #
def get_actual_webelements(self) -> List[WebElement]:
warnings.warn(
"considering to be deprecated; use collection as callable instead, like: browser.all('.foo')()",
PendingDeprecationWarning)
return self()
def caching(self) -> Collection:
warnings.warn("deprecated; use `cached` property instead: browser.all('#foo').cached", DeprecationWarning)
return self.cached
def all_by(self, condition: Condition[Element]) -> Collection:
warnings.warn(
"deprecated; use `filtered_by` instead: browser.all('.foo').filtered_by(be.enabled)",
DeprecationWarning)
return self.filtered_by(condition)
def filter_by(self, condition: Condition[Element]) -> Collection:
warnings.warn(
"deprecated; use `filtered_by` instead: browser.all('.foo').filtered_by(be.enabled)",
DeprecationWarning)
return self.filtered_by(condition)
def find_by(self, condition: Condition[Element]) -> Element:
warnings.warn(
"deprecated; use `element_by` instead: browser.all('.foo').element_by(be.enabled)",
DeprecationWarning)
return self.element_by(condition)
def size(self):
warnings.warn(
"deprecated; use `len` standard function instead: len(browser.all('.foo'))",
DeprecationWarning)
return len(self)
def should_each(self, condition: ElementCondition, timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method instead: browser.all('.foo').should(have.css_class('bar'))",
DeprecationWarning)
return self.should(condition, timeout)
def assure(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method instead: browser.all('.foo').should(have.size(0))",
DeprecationWarning)
return self.should(condition, timeout)
def should_be(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `be.*` style conditions instead: "
"browser.all('.foo').should(be.*)",
DeprecationWarning)
return self.should(condition, timeout)
def should_have(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `have.*` style conditions instead: "
"browser.all('.foo').should(have.size(0))",
DeprecationWarning)
return self.should(condition, timeout)
def should_not(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.all('.foo').should(have.no.size(2))`, "
"you also can build your own inverted conditions by: `not_zero = Condition.as_not(have.size(0'))`",
DeprecationWarning)
return self.should(condition, timeout)
def assure_not(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.all('.foo').should(have.no.size(2))`, "
"you also can build your own inverted conditions by: `not_zero = Condition.as_not(have.size(0'))`",
DeprecationWarning)
return self.should(condition, timeout)
def should_not_be(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.all('.foo').should(have.no.size(2))`, "
"you also can build your own inverted conditions by: `not_zero = Condition.as_not(have.size(0'))`",
DeprecationWarning)
return self.should(condition, timeout)
def should_not_have(self, condition: Union[CollectionCondition, ElementCondition], timeout=None) -> Collection:
warnings.warn(
"deprecated; use `should` method with `be.not_.*` or `have.no.*` style conditions instead: "
"`browser.element('#foo').should(have.no.size(2))`, "
"you also can build your own inverted conditions by: `not_zero = Condition.as_not(have.size(0'))`",
DeprecationWarning)
return self.should(condition, timeout)
class SeleneCollection(Collection): # todo: consider deprecating this name
pass
class Browser(WaitingEntity):
def __init__(self, config: Config): # todo: what about adding **config_as_kwargs?
super().__init__(config)
# todo: consider implement it as context manager too...
def with_(self, config: Config = None, **config_as_kwargs) -> Browser:
return Browser(self.config.with_(config, **config_as_kwargs))
def __str__(self):
return 'browser'
# todo: consider making it callable ...
@property
def driver(self) -> WebDriver:
return self.config.driver
# @property
# def actions(self) -> ActionChains:
# """
# It's kind of just a shortcut for pretty low level actions from selenium webdriver
# Yet unsure about this property here:)
# comparing to usual high level Selene API...
# Maybe later it would be better to make own Actions with selene-style retries, etc.
# """
# return ActionChains(self.config.driver)
# --- Element builders --- #
def element(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
by = to_by(css_or_xpath_or_by)
return Element(
Locator(f'{self}.element({by})',
lambda: self.driver.find_element(*by)),
self.config)
def all(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
by = to_by(css_or_xpath_or_by)
return Collection(
Locator(f'{self}.all({by})',
lambda: self.driver.find_elements(*by)),
self.config)
# --- High Level Commands--- #
def open(self, relative_or_absolute_url: str) -> Browser:
width = self.config.window_width
height = self.config.window_height
if width and height:
self.driver.set_window_size(int(width), int(height))
is_absolute = is_absolute_url(relative_or_absolute_url)
base_url = self.config.base_url
url = relative_or_absolute_url if is_absolute else base_url + relative_or_absolute_url
self.driver.get(url)
return self
def switch_to_next_tab(self) -> Browser:
from selene.core import query
self.driver.switch_to.window(query.next_tab(self))
# todo: should we user waiting version here (and in other similar cases)?
# self.perform(Command(
# 'open next tab',
# lambda browser: browser.driver.switch_to.window(query.next_tab(self))))
return self
def switch_to_previous_tab(self) -> Browser:
from selene.core import query
self.driver.switch_to.window(query.previous_tab(self))
return self
def switch_to_tab(self, index_or_name: Union[int, str]) -> Browser:
if isinstance(index_or_name, int):
from selene.core import query
self.driver.switch_to(query.tab(index_or_name)(self))
else:
self.driver.switch_to.window(index_or_name)
return self
@property
def switch_to(self) -> SwitchTo:
return self.driver.switch_to
# todo: should we add also a shortcut for self.driver.switch_to.alert ?
# if we don't need to switch_to.'back' after switch to alert - then for sure we should...
# question is - should we implement our own alert as waiting entity?
def close_current_tab(self) -> Browser:
self.driver.close()
return self
def quit(self) -> None:
self.driver.quit()
def clear_local_storage(self) -> Browser:
self.driver.execute_script('window.localStorage.clear();') # todo: should we catch and ignore errors?
return self
def clear_session_storage(self) -> Browser:
self.driver.execute_script('window.sessionStorage.clear();')
return self
# --- Assertable --- #
# we need this method here in order to make autocompletion work...
# unfortunately the "base class" version is not enough
def should(self, condition: BrowserCondition) -> Browser:
super().should(condition)
return self
# --- Deprecated --- #
def close(self) -> Browser:
warnings.warn("deprecated; use a `close_current_tab` method instead", DeprecationWarning)
return self.close_current_tab()
def quit_driver(self) -> None:
warnings.warn("deprecated; use a `quit` method instead", DeprecationWarning)
self.quit()
@classmethod
def wrap(cls, webdriver: WebDriver):
warnings.warn(
"deprecated; use a normal constructor style instead: "
"`Browser(Config(driver=webdriver))`",
DeprecationWarning)
return Browser(Config(driver=webdriver))
def s(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
warnings.warn(
"deprecated; use an `element` method instead: "
"`browser.element('#foo')`",
DeprecationWarning)
return self.element(css_or_xpath_or_by)
def find(self, css_or_xpath_or_by: Union[str, tuple]) -> Element:
warnings.warn(
"deprecated; use an `element` method instead: "
"`browser.element('#foo')`",
DeprecationWarning)
return self.element(css_or_xpath_or_by)
def ss(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn(
"deprecated; use an `all` method instead: "
"`browser.all('.foo')`",
DeprecationWarning)
return self.all(css_or_xpath_or_by)
def find_all(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn(
"deprecated; use an `all` method instead: "
"`browser.all('.foo')`",
DeprecationWarning)
return self.all(css_or_xpath_or_by)
def elements(self, css_or_xpath_or_by: Union[str, tuple]) -> Collection:
warnings.warn(
"deprecated; use an `all` method instead: "
"`browser.all('.foo')`",
DeprecationWarning)
return self.all(css_or_xpath_or_by)
def find_elements(self, by=By.ID, value=None):
warnings.warn(
"deprecated; use instead: `browser.driver.find_elements(...)`",
DeprecationWarning)
return self.driver.find_elements(by, value)
def find_element(self, by=By.ID, value=None):
warnings.warn(
"deprecated; use instead: `browser.driver.find_element(...)`",
DeprecationWarning)
return self.driver.find_element(by, value)
from selene.core.conditions import CollectionCondition, ElementCondition, BrowserCondition
# --- Deprecated --- # todo: remove in future versions
class SeleneDriver(Browser):
pass
| {
"pile_set_name": "Github"
} |
{% extends 'admin/master.html' %}
{% block body %}
<br>
<h3>ReportView</h3>
<h4><i>Beta</i> Version 0.1</h4>
<p>aciConSearch is a GUI application for searching connections the ACI policy configuration.</p>
<h4>License</h4>
<p>Copyright 2015 Cisco Systems, Inc.</p>
<p>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</p>
<pre><code>http://www.apache.org/licenses/LICENSE-2.0
</code></pre>
<p>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.</p>
<h4>Authors</h4>
<p>Tom Edsall <a href="mailto:[email protected]">[email protected]</a></p>
{% endblock %}
| {
"pile_set_name": "Github"
} |
proxy=Ð#Ð,Ù#Ð
localencoding=1 | {
"pile_set_name": "Github"
} |
/* Copyright (c) 2002-2012 Croteam Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as published by
the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef SE_INCL_UPDATEABLE_H
#define SE_INCL_UPDATEABLE_H
#ifdef PRAGMA_ONCE
#pragma once
#endif
/*
* Object that can be updated to reflect changes in some changeable object(s).
*/
class ENGINE_API CUpdateable {
private:
TIME ud_LastUpdateTime; // last time this object has been updated
public:
/* Constructor. */
CUpdateable(void);
/* Get time when last updated. */
TIME LastUpdateTime(void) const ;
/* Mark that the object has been updated. */
void MarkUpdated(void);
/* Mark that the object has become invalid in spite of its time stamp. */
void Invalidate(void);
};
#endif /* include-once check. */
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="keywords" content="@ViewBag.keywords">
<meta name="description" content="@ViewBag.description">
<link rel="Bookmark" href="/favicon.ico">
<link rel="Shortcut Icon" href="/favicon.ico" />
@await Html.PartialAsync("_Css")
<title>
开源免费WMS仓库管理系统,张家港软件开发
</title>
<style>
.col-sm-2-1 {
padding-top: 7px;
}
</style>
@RenderSection("styles", false)
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div id="app" class="wrapper" v-cloak>
@await Html.PartialAsync("_Header")
<!-- Left side column. contains the logo and sidebar -->
@await Html.PartialAsync("_Sidebar", "menu")
@*@await Component.InvokeAsync("Menu")*@
<!-- Content Wrapper. Contains page content -->
@RenderBody()
@await Html.PartialAsync("_Footer")
<!-- Control Sidebar -->
@await Html.PartialAsync("_Aside")
</div>
@await Html.PartialAsync("_Js")
@RenderSection("scripts", false)
<script type="text/javascript">
function userInfo() {
yui.layershow("个人信息", "/User/Info", 600, 400);
};
function updatePwd() {
yui.layershow("修改密码", "/User/UpdatePwd", 600, 400);
};
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
/*
* EFI Time Services Driver for Linux
*
* Copyright (C) 1999 Hewlett-Packard Co
* Copyright (C) 1999 Stephane Eranian <[email protected]>
*
* Based on skeleton from the drivers/char/rtc.c driver by P. Gortmaker
*
* This code provides an architected & portable interface to the real time
* clock by using EFI instead of direct bit fiddling. The functionalities are
* quite different from the rtc.c driver. The only way to talk to the device
* is by using ioctl(). There is a /proc interface which provides the raw
* information.
*
* Please note that we have kept the API as close as possible to the
* legacy RTC. The standard /sbin/hwclock program should work normally
* when used to get/set the time.
*
* NOTES:
* - Locking is required for safe execution of EFI calls with regards
* to interrupts and SMP.
*
* TODO (December 1999):
* - provide the API to set/get the WakeUp Alarm (different from the
* rtc.c alarm).
* - SMP testing
* - Add module support
*/
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/rtc.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/efi.h>
#include <linux/uaccess.h>
#define EFI_RTC_VERSION "0.4"
#define EFI_ISDST (EFI_TIME_ADJUST_DAYLIGHT|EFI_TIME_IN_DAYLIGHT)
/*
* EFI Epoch is 1/1/1998
*/
#define EFI_RTC_EPOCH 1998
static DEFINE_SPINLOCK(efi_rtc_lock);
static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
unsigned long arg);
#define is_leap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
static const unsigned short int __mon_yday[2][13] =
{
/* Normal years. */
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
/* Leap years. */
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
/*
* returns day of the year [0-365]
*/
static inline int
compute_yday(efi_time_t *eft)
{
/* efi_time_t.month is in the [1-12] so, we need -1 */
return __mon_yday[is_leap(eft->year)][eft->month-1]+ eft->day -1;
}
/*
* returns day of the week [0-6] 0=Sunday
*
* Don't try to provide a year that's before 1998, please !
*/
static int
compute_wday(efi_time_t *eft)
{
int y;
int ndays = 0;
if ( eft->year < 1998 ) {
printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n");
return -1;
}
for(y=EFI_RTC_EPOCH; y < eft->year; y++ ) {
ndays += 365 + (is_leap(y) ? 1 : 0);
}
ndays += compute_yday(eft);
/*
* 4=1/1/1998 was a Thursday
*/
return (ndays + 4) % 7;
}
static void
convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)
{
eft->year = wtime->tm_year + 1900;
eft->month = wtime->tm_mon + 1;
eft->day = wtime->tm_mday;
eft->hour = wtime->tm_hour;
eft->minute = wtime->tm_min;
eft->second = wtime->tm_sec;
eft->nanosecond = 0;
eft->daylight = wtime->tm_isdst ? EFI_ISDST: 0;
eft->timezone = EFI_UNSPECIFIED_TIMEZONE;
}
static void
convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
{
memset(wtime, 0, sizeof(*wtime));
wtime->tm_sec = eft->second;
wtime->tm_min = eft->minute;
wtime->tm_hour = eft->hour;
wtime->tm_mday = eft->day;
wtime->tm_mon = eft->month - 1;
wtime->tm_year = eft->year - 1900;
/* day of the week [0-6], Sunday=0 */
wtime->tm_wday = compute_wday(eft);
/* day in the year [1-365]*/
wtime->tm_yday = compute_yday(eft);
switch (eft->daylight & EFI_ISDST) {
case EFI_ISDST:
wtime->tm_isdst = 1;
break;
case EFI_TIME_ADJUST_DAYLIGHT:
wtime->tm_isdst = 0;
break;
default:
wtime->tm_isdst = -1;
}
}
static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
efi_status_t status;
unsigned long flags;
efi_time_t eft;
efi_time_cap_t cap;
struct rtc_time wtime;
struct rtc_wkalrm __user *ewp;
unsigned char enabled, pending;
switch (cmd) {
case RTC_UIE_ON:
case RTC_UIE_OFF:
case RTC_PIE_ON:
case RTC_PIE_OFF:
case RTC_AIE_ON:
case RTC_AIE_OFF:
case RTC_ALM_SET:
case RTC_ALM_READ:
case RTC_IRQP_READ:
case RTC_IRQP_SET:
case RTC_EPOCH_READ:
case RTC_EPOCH_SET:
return -EINVAL;
case RTC_RD_TIME:
spin_lock_irqsave(&efi_rtc_lock, flags);
status = efi.get_time(&eft, &cap);
spin_unlock_irqrestore(&efi_rtc_lock,flags);
if (status != EFI_SUCCESS) {
/* should never happen */
printk(KERN_ERR "efitime: can't read time\n");
return -EINVAL;
}
convert_from_efi_time(&eft, &wtime);
return copy_to_user((void __user *)arg, &wtime,
sizeof (struct rtc_time)) ? - EFAULT : 0;
case RTC_SET_TIME:
if (!capable(CAP_SYS_TIME)) return -EACCES;
if (copy_from_user(&wtime, (struct rtc_time __user *)arg,
sizeof(struct rtc_time)) )
return -EFAULT;
convert_to_efi_time(&wtime, &eft);
spin_lock_irqsave(&efi_rtc_lock, flags);
status = efi.set_time(&eft);
spin_unlock_irqrestore(&efi_rtc_lock,flags);
return status == EFI_SUCCESS ? 0 : -EINVAL;
case RTC_WKALM_SET:
if (!capable(CAP_SYS_TIME)) return -EACCES;
ewp = (struct rtc_wkalrm __user *)arg;
if ( get_user(enabled, &ewp->enabled)
|| copy_from_user(&wtime, &ewp->time, sizeof(struct rtc_time)) )
return -EFAULT;
convert_to_efi_time(&wtime, &eft);
spin_lock_irqsave(&efi_rtc_lock, flags);
/*
* XXX Fixme:
* As of EFI 0.92 with the firmware I have on my
* machine this call does not seem to work quite
* right
*/
status = efi.set_wakeup_time((efi_bool_t)enabled, &eft);
spin_unlock_irqrestore(&efi_rtc_lock,flags);
return status == EFI_SUCCESS ? 0 : -EINVAL;
case RTC_WKALM_RD:
spin_lock_irqsave(&efi_rtc_lock, flags);
status = efi.get_wakeup_time((efi_bool_t *)&enabled, (efi_bool_t *)&pending, &eft);
spin_unlock_irqrestore(&efi_rtc_lock,flags);
if (status != EFI_SUCCESS) return -EINVAL;
ewp = (struct rtc_wkalrm __user *)arg;
if ( put_user(enabled, &ewp->enabled)
|| put_user(pending, &ewp->pending)) return -EFAULT;
convert_from_efi_time(&eft, &wtime);
return copy_to_user(&ewp->time, &wtime,
sizeof(struct rtc_time)) ? -EFAULT : 0;
}
return -ENOTTY;
}
/*
* We enforce only one user at a time here with the open/close.
* Also clear the previous interrupt data on an open, and clean
* up things on a close.
*/
static int efi_rtc_open(struct inode *inode, struct file *file)
{
/*
* nothing special to do here
* We do accept multiple open files at the same time as we
* synchronize on the per call operation.
*/
return 0;
}
static int efi_rtc_close(struct inode *inode, struct file *file)
{
return 0;
}
/*
* The various file operations we support.
*/
static const struct file_operations efi_rtc_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = efi_rtc_ioctl,
.open = efi_rtc_open,
.release = efi_rtc_close,
.llseek = no_llseek,
};
static struct miscdevice efi_rtc_dev= {
EFI_RTC_MINOR,
"efirtc",
&efi_rtc_fops
};
/*
* We export RAW EFI information to /proc/driver/efirtc
*/
static int efi_rtc_proc_show(struct seq_file *m, void *v)
{
efi_time_t eft, alm;
efi_time_cap_t cap;
efi_bool_t enabled, pending;
unsigned long flags;
memset(&eft, 0, sizeof(eft));
memset(&alm, 0, sizeof(alm));
memset(&cap, 0, sizeof(cap));
spin_lock_irqsave(&efi_rtc_lock, flags);
efi.get_time(&eft, &cap);
efi.get_wakeup_time(&enabled, &pending, &alm);
spin_unlock_irqrestore(&efi_rtc_lock,flags);
seq_printf(m,
"Time : %u:%u:%u.%09u\n"
"Date : %u-%u-%u\n"
"Daylight : %u\n",
eft.hour, eft.minute, eft.second, eft.nanosecond,
eft.year, eft.month, eft.day,
eft.daylight);
if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
seq_puts(m, "Timezone : unspecified\n");
else
/* XXX fixme: convert to string? */
seq_printf(m, "Timezone : %u\n", eft.timezone);
seq_printf(m,
"Alarm Time : %u:%u:%u.%09u\n"
"Alarm Date : %u-%u-%u\n"
"Alarm Daylight : %u\n"
"Enabled : %s\n"
"Pending : %s\n",
alm.hour, alm.minute, alm.second, alm.nanosecond,
alm.year, alm.month, alm.day,
alm.daylight,
enabled == 1 ? "yes" : "no",
pending == 1 ? "yes" : "no");
if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
seq_puts(m, "Timezone : unspecified\n");
else
/* XXX fixme: convert to string? */
seq_printf(m, "Timezone : %u\n", alm.timezone);
/*
* now prints the capabilities
*/
seq_printf(m,
"Resolution : %u\n"
"Accuracy : %u\n"
"SetstoZero : %u\n",
cap.resolution, cap.accuracy, cap.sets_to_zero);
return 0;
}
static int efi_rtc_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, efi_rtc_proc_show, NULL);
}
static const struct file_operations efi_rtc_proc_fops = {
.open = efi_rtc_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int __init
efi_rtc_init(void)
{
int ret;
struct proc_dir_entry *dir;
printk(KERN_INFO "EFI Time Services Driver v%s\n", EFI_RTC_VERSION);
ret = misc_register(&efi_rtc_dev);
if (ret) {
printk(KERN_ERR "efirtc: can't misc_register on minor=%d\n",
EFI_RTC_MINOR);
return ret;
}
dir = proc_create("driver/efirtc", 0, NULL, &efi_rtc_proc_fops);
if (dir == NULL) {
printk(KERN_ERR "efirtc: can't create /proc/driver/efirtc.\n");
misc_deregister(&efi_rtc_dev);
return -1;
}
return 0;
}
static void __exit
efi_rtc_exit(void)
{
/* not yet used */
}
module_init(efi_rtc_init);
module_exit(efi_rtc_exit);
MODULE_LICENSE("GPL");
| {
"pile_set_name": "Github"
} |
from django.db.models import Count
from django.template.loader import render_to_string
from jinja2.ext import Extension
from agreements.models import Issuer
def issuer_select(selected_issuer_slug=None):
# Select all issuers that have associated agreements, ordered by name.
#
# This is equivalent to the following SQL query:
#
# SELECT
# agreements_issuer.id,
# agreements_issuer.name,
# agreements_issuer.slug,
# COUNT(agreements_agreement.id) AS number_of_agreements
# FROM
# agreements_issuer
# LEFT OUTER JOIN
# agreements_agreement
# ON
# agreements_issuer.id = agreements_agreement.issuer_id
# GROUP BY
# agreements_issuer.id
# HAVING
# COUNT(agreements_agreement.id) > 0
# ORDER BY
# agreements_issuer.name ASC
issuers = Issuer.objects \
.annotate(number_of_agreements=Count('agreement')) \
.filter(number_of_agreements__gt=0) \
.order_by('name')
return render_to_string('agreements/_select.html', {
'issuers': issuers,
'selected_issuer_slug': selected_issuer_slug,
})
class AgreementsExtension(Extension):
"""
This will give us an {% agreements_issuer_select %} tag.
"""
def __init__(self, environment):
super(AgreementsExtension, self).__init__(environment)
self.environment.globals.update({
'agreements_issuer_select': issuer_select,
})
agreements = AgreementsExtension
| {
"pile_set_name": "Github"
} |
# Extensions for Protocol Buffers to create more go like structures.
#
# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
# http://github.com/gogo/protobuf/gogoproto
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate:
protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../:../protobuf/:. *.proto
restore:
cp gogo.pb.golden gogo.pb.go
preserve:
cp gogo.pb.go gogo.pb.golden
| {
"pile_set_name": "Github"
} |
module ActiveSupport
# MessageVerifier makes it easy to generate and verify messages which are signed
# to prevent tampering.
#
# This is useful for cases like remember-me tokens and auto-unsubscribe links where the
# session store isn't suitable or available.
#
# Remember Me:
# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now])
#
# In the authentication filter:
#
# id, time = @verifier.verify(cookies[:remember_me])
# if time < Time.now
# self.current_user = User.find(id)
# end
#
class MessageVerifier
class InvalidSignature < StandardError; end
def initialize(secret, digest = 'SHA1')
@secret = secret
@digest = digest
end
def verify(signed_message)
data, digest = signed_message.split("--")
if secure_compare(digest, generate_digest(data))
Marshal.load(ActiveSupport::Base64.decode64(data))
else
raise InvalidSignature
end
end
def generate(value)
data = ActiveSupport::Base64.encode64s(Marshal.dump(value))
"#{data}--#{generate_digest(data)}"
end
private
# constant-time comparison algorithm to prevent timing attacks
def secure_compare(a, b)
if a.length == b.length
result = 0
for i in 0..(a.length - 1)
result |= a[i] ^ b[i]
end
result == 0
else
false
end
end
def generate_digest(data)
require 'openssl' unless defined?(OpenSSL)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, data)
end
end
end
| {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: 6ccf6a5caacb0274f97a42d589391ab4
timeCreated: 1536827136
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
| {
"pile_set_name": "Github"
} |
{
"name": "qs",
"main": "dist/qs.js",
"version": "5.1.0",
"homepage": "https://github.com/hapijs/qs",
"authors": [
"Nathan LaFreniere <[email protected]>"
],
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
"keywords": [
"querystring",
"qs"
],
"license": "BSD-3-Clause",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main"/>
<title>Streama</title>
</head>
<body>
<div class="message-wrapper">
<i class="ion-ios-checkmark"></i>
<h1>${title}</h1>
<h3>${message}</h3>
<br/><br/>
<g:link uri="/" class="btn btn-secondary">Return to Dashboard</g:link>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.